text
stringlengths
2.85k
2.55M
label
class label
11 classes
1 Secure SWIPT for Directional Modulation Aided AF Relaying Networks arXiv:1803.05278v1 [cs.IT] 14 Mar 2018 Xiaobo Zhou, Jun Li, Feng Shu, Qingqing Wu, Yongpeng Wu, Wen Chen, and Hanzo Lajos Abstract—Secure wireless information and power transfer based on directional modulation is conceived for amplify-andforward (AF) relaying networks. Explicitly, we first formulate a secrecy rate maximization (SRM) problem, which can be decomposed into a twin-level optimization problem and solved by a one-dimensional (1D) search and semidefinite relaxation (SDR) technique. Then in order to reduce the search complexity, we formulate an optimization problem based on maximizing the signal-to-leakage-AN-noise-ratio (Max-SLANR) criterion, and transform it into a SDR problem. Additionally, the relaxation is proved to be tight according to the classic Karush-KuhnTucker (KKT) conditions. Finally, to reduce the computational complexity, a successive convex approximation (SCA) scheme is proposed to find a near-optimal solution. The complexity of the SCA scheme is much lower than that of the SRM and the Max-SLANR schemes. Simulation results demonstrate that the performance of the SCA scheme is very close to that of the SRM scheme in terms of its secrecy rate and bit error rate (BER), but much better than that of the zero forcing (ZF) scheme. Index Terms—Directional modulation, simultaneous wireless information and power transfer, AF, artificial noise, secrecy rate. I. I NTRODUCTION The past decade has witnessed the rapid development of Internet of Things (IoT). It is forecast that by 2025 about 30 billion IoT devices will be used worldwide [1], [2]. As conventional battery is not convenient for such a huge number of devices, simultaneous wireless information and power transfer (SWIPT) is recognized as a promising technology to prolong the operation time of wireless devices [3]–[14]. The separated information receiver (IR) and energy receiver (ER) are considered in [3]–[5]. The authors in [3], [15] considered a multi-user wireless information and power transfer system, where the beamforming vector was designed by the zero-forcing (ZF) algorithm and updated by maximizing the energy harvested. In [4], the optimal beamforming scheme was proposed for achieving the maximum secrecy rate, while meeting the minimum energy requirement at the ER. In [5], [16], the authors designed the robust information and energy beamforming vectors for maximizing the energy harvested by Xiaobo Zhou, Jun Li, and Feng Shu are with the School of Electronic and Optical Engineering, Nanjing University of Science and Technology, Nanjing, 210094, China. e-mail: {zxb,jun.li}@njust.edu.cn, [email protected]. Xiaobo Zhou is also with the School of Fuyang normal university, Fuyang, 236037, China. Qingqing Wu is with the Department of Electrical and Computer Engineering, National University of Singapore, 117583, Singapore. e-mail: [email protected]. Yongpeng Wu and Wen Chen are with Shanghai Jiao Tong University, Minhang 200240, China. e-mail: {yongpeng.wu,wenchen}@sjtu.edu.cn. Hanzo Lajos is with the Department of Electronics and Computer Science, University of Southampton, U. K. email:[email protected]. the ER under specific constraints on the signal-to-interference plus noise ratio (SINR) at the IR. A power splitting (PS) scheme was utilized to divide the received signal into two parts in order to simultaneously harvest energy and to decode information [6], [7], [9], [10]. The authors of [11], [12] investigated both PS and time switching (TS) schemes and compared the performance of these two schemes. As an important technique of expanding the coverage of networks, relaying can also beneficially enhance the communication security, whilst simultaneously enhancing energy harvesting [17]–[21]. For the case of perfect channel state information (CSI) situations, secure SWIPT invoked in relaying networks has been investigated [22]–[24]. Literature [22], proposed a constrained concave convex procedure (CCCP)-based iterative algorithm for designing the beamforming vector of multi-antenna aided non-regenerative relay networks. While in [23], the analytical expressions of the ergodic secrecy capacity were derived separately based on TS, PS and on ideal relaying protocols. The beamforming vectors of SWIPT were designed for amplify and forward (AF) two-way relay networks through a sequential parametric convex approximation (SPCA)-based iterative algorithm to find its locally optimal solution in [24]. By contrast, for the imperfect CSI scenarios, the channel estimation uncertainty model was considered [25]–[29]. In [25]–[27], the robust information beamformer and artificial noise (AN) covariance matrix were designed with the objective of maximizing the secrecy rate under the constraint of a certain maximum transmit power. The secrecy rate maximization (SRM) problem was a non-convex problem in [25]–[27], the critical process is, how to transform it into a tractable convex optimization problem by using the S-Procedure. In [28] and [29], the authors formulate the power minimization problem under a specific secrecy rate constraint and minimum energy requirement at the energy harvester (EH), which was solved in a similar manner. In general, for the imperfect CSI situations, the channel estimation error is usually modeled obeying the ellipsoid bound constraint, and then be transformed into a convex constraint by using the S-procedure. Recently, a promising physical layer security technique, known as directional modulation (DM), has attracted a lot of attention. In contrast to conventional information beamforming techniques, DM has the ability to directly transmit the confidential messages in desired directions to guarantee the security of information transmission, while distorting the signals leaking out in other directions [30]–[34]. In [30], the authors proposed a DM technique that employed a phased array to generate the modulation. By controlling the phase shift for each array element, the magnitude and phase of each 2 computational complexity, we propose an algorithm based on successive convex approximation (SCA). Specifically, we first formulate the SRM optimization problem and then transform it into a second-order cone programming (SOCP) which is finally solved by the SCA method. Furthermore, we analyse and compare the complexity of the aforementioned three schemes. 3) The formulated optimization problems include random variables corresponding to the estimation error of the direction angles, which makes the optimization problems very difficult to tackle directly. To facilitate solving this problem, we derive the analytical expression of the covariance matrix of each eavesdroppers’ steering vector and substitute it into the optimization problems to replace the random variable. Moveover, we add relay and energy harvesting node to the DM-based secure systems, which further expand the application of DM technology. Simulation results demonstrate that the bit error rate (BER) performance of all our schemes in the desired direction is significantly better than that in other directions, while the BER is poor in the vicinity of the eavesdroppers’ directions, showing the advantages of our DM technology in the field of physical layer security. The rest of this paper is organized as follows. Section II introduces the system model. In Section III, three algorithms are proposed to design the robust secure beamforming. Section IV provides our simulation results. while, Section V concludes the paper. Notation: Boldface lowercase and uppercase letters represent vectors and matrices, respectively, A∗ , AT , AH , Tr(A), rank(A), A ≻ 0 and A  0 denote conjugate, transpose, conjugate transpose, trace, rank, positiveness and semidefiniteness of matrix A, respectively, E[·], j, and k · k denote the statistical expectation, pure imaginary number, and Euclidean norm, respectively, and ⊗ denotes the Kronecker product. II. S YSTEM M ODEL As shown in Fig. 1, we consider AF-aided secure SWIPT, where the source transmitter sends confidential messages to an IR with the aid of an AF relay in the presence of an ER and M eavesdroppers (E1 , · · · , EM ). It is assumed that the AF relay is equipped with an N -element antenna array, while all other nodes have a single antenna. IR h(q rd ) h(q r p ) ER h(q s r ) h(qr ) e1 Source Relay h(q E1 re M ) ... symbol can be adjusted in the desired direction. The authors in [31] proposed a method of orthogonal vectors and introduced the concept of AN into DM systems and synthesis. Since the AN contaminates the undesired receiver, the security of the DM systems is greatly improved. Subsequently, the orthogonal vector method was applied to the synthesis of multi-beam DM systems [32]. The proposed methods in [31] and [32] achieve better performance at the perfect direction angle, but it is very sensitive to the estimation error of the direction angle. The authors in [33] modeled the error of angle estimation as uniform distribution and proposed a robust synthesis method for the DM system to reduce the effect of estimation error. In [34], the authors also considered the estimation error of the direction angle and proposed a robust beamforming scheme in the DM broadcast scenario. However, none of these contributions consider DM-based relaying techniques. For example, if the desired user is beyond the coverage of the transmitter or there is no direct link between the transmitter and the desired user, the above methods are not applicable. Moreover, in [33], [34], the proposed robust methods only designed the normalized confidential messages beamforming and AN projection matrix without considering the power allocation problem. In fact, the power allocation of confidential messages and AN has a great impact on the security of DM systems. To the best of our knowledge, there exists no DM-based scheme considering secure SWIPT, which thus motivates this work. To tackle this open problem, we propose a secure SWIPT scheme based on AF aided DM. Compared to [25]–[29], instead of channel estimation error modeled obeying the ellipsoid bound constraint, we model the estimation error of direction angle as the truncated Gaussian distribution which is more practical in our DM scenario [34]. The main contributions of this paper are summarized as follows. 1) We formulate the SRM problem subject to the total power constraint at an AF relay and to the minimum energy requirement at the ER. Since the secrecy rate expression is the difference of two logarithmic functions, it is noncovex and difficult to tackle directly. Additionally, the estimates of the eavesdropper directions are usually biased. To solve this problem and to find the robust information beamforming matrix as well as the AN covariance matrix, we convert the original problem into a twin-level optimization problem, which can be solved by a one-dimensional (1D) search and the classic semidefinite relaxation (SDR) technique. The 1D search range is bounded into a feasible interval. Furthermore, the SDR is proved tight by invoking the Karush-Kuhn-Tucker (KKT) condition. 2) To reduce the the search complexity, we propose a suboptimal solution for maximizing the signal-to-leakage-ANnoise-ratio (Max-SLANR) subject to the total power constraint of the relay and to the minimum energy required at the ER. Due to the existence of multiple eavesdroppers, we consider the sum-power of the confidential messages leaked out to all the eavesdroppers. This optimization problem is also shown to be nonconvex, but it can be transformed into a semidefinite programming (SDP) problem and then solved by the SDR technique. Its tightness is also quantified. To further reduce the EM Fig. 1. System model of secure beamforming with SWIPT based on directional modulation in AF relaying networks 3 Similar to the literature on DM [33], [34], this paper adopts the free-space path loss model which is practical for some scenarios such as communication in the air and rural areas. The steering vector between node a and node b can be expressed as [31] iT √ 1 h j2πΨθ (1) ab e , · · · , ej2πΨθab (N ) , (1) h(θab ) = gab √ N | {z } The normalized steering vector where gab is the path loss between node a and node b. The function Ψθab (n) can be expressed as (n − (N + 1)/2)l cos θab , n = 1, . . . , N, (2) λ where θab denotes the angle of direction between node a and node b, l denotes the distance between two adjacent antenna elements, and λ is the wavelength. We assume that there is no direct link from the source to the IR, ER or to any of the eavesdroppers. Thus the relay helps the source to transmit the confidential message x to IR. The relay node is assumed to operate in an AF half-duplex mode. Simultaneously, ER intends to harvest energy, while the eavesdroppers try to intercept the confidential message. The power of the signal x is normalized to, E[xxH ] = 1. In the first time slot, the source transmits the signal x to the relay, and the signal received at the relay is given by p yr = Ps h(θsr )x + nr , (3) Ψθab (n) , − where Ps is the transmission power of the source, h(θsr ) denotes the steering vector between the source and the relay, nr ∼ CN (0, σr2 IN ) is a circularly symmetric complex Gaussian (CSCG) noise vector, and θsr is the angle of direction between the source and the relay. In the second time slot, the relay amplifies and forwards the received signal to IR. The signal transmitted from the relay is given by p (4) xr = Wyr + z = Ps Wh(θsr )x + Wnr + z, respectively, where h(θrd ), h(θrp ), and h(θrem ) denote the steering vectors from the relay to IR, ER, and the m-th eavesdropper respectively. Furthermore, n0 , np , and ne represent the CSCG noise at IR, ER, and the m-th eavesdropper, respectively, while n0 ∼ CN (0, σ02 ), np ∼ CN (0, σk2 ), and ne ∼ CN (0, σe2 ). Without loss of generality, we assume that σr2 , σ02 , σk2 , and σe2 are all equal to σ 2 . Similar to the considerations in [26] and [28], namely that the perfect CSI of the destination is available at the relay, here we assume that the relay has the perfect knowledge of direction angles to the IR. However, there is an estimation error of the direction angles of eavesdroppers at the relay, and we assume that the relay has the statistical information about these estimation errors. Therefore, the m-th eavesdropper’s direction angle to the relay can be modeled as θrem = θ̂rem + ∆θrem , m ∈ M, (9) where θ̂rem is the estimate of the m-th eavesdropper’s direction angle at the relay, and ∆θrem denotes the estimation error, while is assumed to follow a truncated Gaussian distribution spread over the interval [−∆θmax , ∆θmax ] with zero mean and variance σθ2 . The probability density function of ∆θrem can be expressed as f (∆θrem ) =  2 −∆θre m  1 2σ2 √ θ e , −∆θmax ≤ ∆θrem ≤ ∆θmax , (10) Ke 2πσθ  0, otherwise, where Ke is the normalization factor defined as 2 Z ∆θmax −∆θre m 1 2σ2 θ √ e d(∆θrem ). Ke = 2πσθ −∆θmax (11) III. ROBUST S ECURE SWIPT D ESIGN (5) In this section, three algorithms are proposed to design the robust secure beamforming under the assumption that an estimation error of the direction angles of eavesdroppers exists at the relay. To design the robust beamforming matrix and AN covariance matrix, we first define i h Hrem , E h(θ̂rem + ∆θrem )hH (θ̂rem + ∆θrem ) , m ∈ M, (12) The signal received at the IR, ER, and the m-th eavesdropper can be expressed as and Hrem ∈ CN ×N . Let Hrem (p, q) denote the p-th row and q-th column entry of Hrem , and Hrem (p, q) can be written as yd =hH (θrd )xr + n0 p = Ps hH (θrd )Wh(θsr )x + hH (θrd )Wnr Hrem (p, q) = Γ1m (p, q) − jΓ2m (p, q), + hH (θrd )z + n0 , (6) p Ps hH (θrp )Wh(θsr )x + hH (θrp )Wnr (7) p Ps hH (θrem )Wh(θsr )x + hH (θrem )Wnr (8) where W ∈ CN ×N is the beamforming matrix, and z ∈ CN ×1 is the AN vector assumed to obey a (CSCG) distribution CN (0, Ω) with Ω  0. In general, the relay has a total transmit power constraint Pt , therefore we have Ps kWh(θsr )k2 + σr2 Tr(WH W) + Tr(Ω) ≤ Pt . yp = + hH (θrp )z + np , and yem = + hH (θrem )z + ne , m ∈ M = [1, 2, ..., M ], (13) where Γ1m and Γ2m can be found in (64) and (67), respectively. The specific derivation procedure is detailed in Appendix A. According to (7), the energy harvested at the ER is given by [35]  E =ρ Ps |hH (θrp )Wh(θsr )|2 + σ 2 kWH h(θrp )k2  + hH (θrp )Ωh(θrp ) , (14) where 0 < ρ ≤ 1 denotes the energy transfer efficiency of the ER. 4 From (6), the SINR at the IR can be expressed as SINRd = and Ps |hH (θrd )Wh(θsr )|2 . (15) 2 H σ kW h(θrd )k2 + hH (θrd )Ωh(θrd ) + σ 2 According to (8), the m-th eavesdropper’s SINR is given by SINRem = Ps |hH (θrem )Wh(θsr )|2 . 2 2 H rem )k + h (θrem )Ωh(θrem ) + σ (16) σ 2 kWH h(θ Thus, the achievable secrecy rate at the IR can be expressed as [36] Rs = min m∈M 1 {log2 (1 + SINRd ) − E [log2 (1 + SINRem )]}, 2 (17) where the scaling factor 12 is due to the fact that two time slots are required to transmit one message. By invoking Jensen’s inequality, the worst-case secrecy rate is given by Rs ≥ R̄s = 1 min {log2 (1 + SINRd ) − log2 (1 + E [SINRem ])}, (18) m∈M 2 where the expectation of the SINRem can be approximated as [37] [38] (19) E [SINRem ] ≈ 2 H E[Ps |h (θrem )Wh(θsr )| ] . E[σ 2 kWH h(θrem )k2 ] + E[hH (θrem )Ωh(θrem )] + σ 2 A. Secrecy Rate Maximization based on One-Dimensional search Scheme (SRM-1D) In this subsection, the robust information beamforming matrix W and AN covariance matrix Ω are designed by our SRM-1D scheme. Specifically, according to (5), (14), and (17), we maximize the worst-case secrecy rate subject to the total transmit power and the harvested energy constraints. Then the optimization problem can be formulated as (P1) : max R̄s (20a) W,Ω 2 2 H s.t. Ps kWh(θsr )k + σ Tr(W W) + Tr(Ω) ≤ Pt , (20b)  ρ Ps |hH (θrp )Wh(θsr )|2 + σ 2 kWH h(θrp )k2  + hH (θrp )Ωh(θrp ) ≥ Pmin , Ω  0, (20c) where (20b) denotes total power constraint at the relay, and the first term in (20c) denotes the minimum power required by the ER. We employ a 1D search and a SDR-based algorithm to solve problem (P1). Observe that R̄s is the difference of two logarithmic functions, which is non-convex and untractable. Similar to [35], we decompose (20) into two sub-problems, yielding:   1 + φ(β) 1 max log2 β 2 1+β s.t. 0 ≤ β ≤ βmax , (21) Ps |hH (θrd )Wh(θsr )|2 W,Ω σ 2 kWH h(θrd )k2 + hH (θrd )Ωh(θrd ) + σ 2 E[Ps |hH (θrem )Wh(θsr )|2 ] s.t. E[σ 2 kWH h(θrem )k2 ] + E[hH (θrem )Ωh(θrem )] + σ 2 ≤ β, m ∈ M, (20b), (20c), (22) φ(β) = max where β is a slack variable. The main steps to solve the problem (P1) are as follows. First, for each β inside the interval [0, βmax ], we can obtain a corresponding φ(β) by solving the problem (22). Second, upon substituting β and φ(β) into the objective function of (21), we obtain the secrecy rate corresponding to the given β. Thirdly, we perform a 1D search for β, compare all the secrecy rates obtained and then finally we find the optimal value for (21). As for the above procedure of solving the problem (P1), the most important and complex part is to solve the problem (22) to obtain φ(β). This are illustrated as follows. Upon defining 2 w , vec(W) ∈ CN ×1 , we can rewrite (22) as Ps wH A1 w , (23a) w,Ω σ 2 wH A2 w + hH (θrd )Ωh(θrd ) + σ 2 Ps wH B1m w s.t. 2 H ≤ β, m ∈ M, (23b) σ w B2m w + Tr(Hrem Ω) + σ 2 Ps wH C1 w + σ 2 wH w + Tr(Ω) ≤ Pt , (23c) φ(β) = max Ps wH D1 w + σ 2 wH D2 w + hH (θrp )Ωh(θrp ) Pmin , Ω  0, ≥ ρ (23d) where     A1 = h∗ (θsr )hT (θsr ) ⊗ h(θrd )hH (θrd ) ,   A2 =IN ⊗ h(θrd )hH (θrd ) ,  ∗  B1m = h (θsr )hT (θsr ) ⊗ (Hrem ) , m ∈ M, B2m =IN ⊗ (Hrem ) , m ∈ M,   C1 = h∗ (θsr )hT (θsr ) ⊗ IN ,     D1 = h∗ (θsr )hT (θsr ) ⊗ h(θrp )hH (θrp ) ,   D2 =IN ⊗ h(θrp )hH (θrp ) . (24a) (24b) (24c) (24d) (24e) (24f) (24g) With the above vectorization, we show problem (23) can be transformed into a standard SDP problem. Upon defining 2 2 W̃ , wwH ∈ CN ×N , (23) can be rewritten as Ps Tr(A1 W̃) (25a) σ 2 Tr(A2 W̃) + hH (θrd )Ωh(θrd ) + σ 2 s.t. Ps Tr(B1m W̃) − βσ 2 Tr(B2m W̃) − βTr(Hrem Ω) φ(β) = max W̃,Ω − βσ 2 ≤ 0, m ∈ M, (25b) 2 Ps Tr(C1 W̃) + σ Tr(W̃) + Tr(Ω) ≤ Pt , 2 H (25c) Ps Tr(D1 W̃) + σ Tr(D2 W̃) + h (θrp )Ωh(θrp ) Pmin , (25d) ≥ ρ rank(W̃) = 1, W̃  0, Ω  0. (25e) 5 Note that the rank constraint in (25e) is non-convex. By dropping the rank-one constraint in (25e), the SDR of problem (25) can be expressed as Ps Tr(A1 W̃) + hH (θrd )Ωh(θrd ) + σ 2 s.t. (25b), (25c), (25d), W̃  0, Ω  0. (26) According to the fact that the secrecy rate is always higher than or equal to zero, we get Ps wH A1 w σ 2 wH A2 w + hH (θrd )Ωh(θrd ) + σ 2 Ps wH A1 w . ≤ 2 H σ w A2 w + σ 2 β≤ φ(β) = max W̃,Ω σ 2 Tr(A2 W̃) It can be observed that (26) constitutes a quasi-convex problem, which can be transformed into a convex optimization problem by using the Charnes-Cooper transformation [39]. Upon introducing slack variable τ , problem (26) can be equivalently rewritten as φ(β) = max Ps Tr(A1 Q) From the transmit power constraint in (23), we have σ2 H Pt w w ≤ 1, hence β≤ Ps wH A1 w Ps wH A1 w = . 4 4 σ 2 wH A2 w + σPt wH w wH (σ 2 A2 + σPt IN 2 )w (30) − βσ 2 τ ≤ 0, m ∈ M, Observe that A1 can be recast as   A1 = [h∗ (θsr ) ⊗ h(θrd )] hT (θsr ) ⊗ hH (θrd ) = a1 aH 1 , (31) σ 2 Tr(A2 Q) + hH (θrd )Υh(θrd ) + σ 2 τ = 1, where a1 ∈ CN ×1 . Therefore, we have rank(A1 ) = 1. According to (30) and (31), the upper bound of β is given by Q,Υ,τ s.t. Ps Tr(B1m Q) − βσ 2 Tr(B2m Q) − βTr(H̄rem Υ) Ps Tr(C1 Q) + σ 2 Tr(Q) + Tr(Υ) ≤ Pt τ, Ps Tr(D1 Q) + σ 2 Tr(D2 Q) + hH (θrp )Υh(θrp ) Pmin τ , Q  0, Υ  0, τ > 0, (27) ≥ ρ where Q = W̃τ and Υ = Ωτ . Since problem (27) is a standard SDP problem [40], its optimal solution can be found by using SDP solvers, such as CVX. If the optimal solution of problem (27) is (Q⋆ , Υ⋆ , τ ), then (Q⋆ /τ, Υ⋆ /τ ) will be the optimal solution of problem (26). Since we have dropped the rank-one constraint in the problem (25) and reformulated it as a SDR problem (26), the optimal solution of (26) may not be rank-one and thus the optimal objective value of (26) generally serves an upper bound of (25). Next, we show that the above SDR is in fact tight. We consider the power minimization problem as follows min Ps Tr(C1 W̃) + σ 2 Tr(W̃) W̃,Ω s.t. (29) Ps Tr(A1 W̃) ≥ φ(β), + hH (θrd )Ωh(θrd ) + σ 2 (25b), (25c), (25d), W̃  0, Ω  0, (28) σ 2 Tr(A2 W̃) where φ(β) is the optimal value of problem (26). Observe that the optimal solution of problem (28) is also an optimal solution of (26). The proof is similar to that in [41] and thus omitted here for brevity. In order to obtain the optimal solution of (25), we should first obtain the optimal solution (W̃⋆ , Ω⋆ ) and the optimal value φ(β) of problem (26) by solving (27). If rank(W̃⋆ ) = 1, then we get the optimal solution of (25). Otherwise, the rank-one solution can be found by solving (28). Lemma 1: The optimal solution W̃⋆ in (28) satisfies rank(W̃⋆ ) = 1. Proof : See Appendix B. Since W̃⋆ is a rank-one matrix, we can write W̃⋆ = ⋆ ⋆H w w by using eigenvalue decomposition. Thus, the SDR is tight and the optimal solution of (23) is w⋆ and Ω⋆ . Up to now, we have solved the problem (22). Let us now return to the procedure used for the problem (21). The maximum of β should be found by a 1D search. 2 2 β ≤ Ps aH 1 (σ A2 + σ4 IN 2 )−1 a1 = βmax . Pt (32) The proposed SRM-1D scheme is summarized in Algorithm 1. Algorithm 1 Maximize secrecy rate based on 1D search Initialize ε, n, β, and compute βmax . repeat 1) Set n = n + 1, β = β + ε. 2) Solve problem (27) and obtain the optimal solution (Q̃⋆ (n), Υ⋆ (n), τ ⋆ (n)) and optimal value φ(β)(n). 3) Compute secrecy rate Rs (n) according to the objective function of (21). until β > βmax . • n = arg max Rs(n), and W̃⋆ = Q⋆ (n)/τ ⋆ (n), n Ω⋆ = Υ̃⋆ (n)/τ ⋆ (n). If rank(W̃⋆ )=1, then go to next step; otherwise, solve (28). • By using eigenvalue decomposition, we can obtain w⋆ , 1 and reconstruct W⋆ ; z = Ω⋆ 2 v and v ∼ CN (0, IN ). return W⋆ and z⋆ . B. Maximization of Signal-to-Leakage-AN-Noise-Ratio (MaxSLANR) Scheme In the previous subsection, we employed a 1D search and a SDR-based algorithm to solve problem (P1). Although we have already derived βmax , to limit the range of the 1D search, the complexity of the 1D search still remains high since for each β, a SDP with O(N 13 ) needs to be solved. In order to avoid employing the 1D search, we propose an alternative algorithm for the suboptimal solution of (P1). Specifically, we propose an algorithm to maximize the SLANR rather than secrecy rate, subject to the total power and to the harvested energy constraints. Based on the concept of leakage [42], from (6) and (8), the optimization problem (P1) can be reformulated as (33) at the top of the next page. The numerator of the 6 Ps |hH (θrd )Wh(θsr )|2 max PM E[Ps |hH (θrem )Wh(θsr )|2 ] + hH (θrd )Ωh(θrd ) + σ 2 kWH h(θrd )k2 + σ 2 s.t. Ps kWh(θsr )k2 + σ 2 Tr(WH W) + Tr(Ω) ≤ Pt , Pmin Ps |hH (θrp )Wh(θsr )|2 + σ 2 kWH h(θrp )k2 + hH (θrp )Ωh(θrp ) ≥ , Ω  0. ρ W,Ω m=1 max PM W̃,Ω m=1 Ps Tr(A1 W̃) Ps Tr(B1m W̃) + hH (θrd )Ωh(θrd ) + σ 2 Tr(A2 W̃) + σ 2 s.t. Ps Tr(C1 W̃) + σ 2 Tr(W̃) + Tr(Ω) ≤ Pt , Ps Tr(D1 W̃) + σ 2 Tr(D2 W̃) + hH (θrp )Ωh(θrp ) ≥ objective function in (33) represents the received confidential message power at the IR, and the first term in the denominator denotes the sum of confidential message power leaked to all eavesdroppers. Following similar steps as in Section III-A and dropping the rank-one constraint, the related SDR problem can be formulated as show in (34) at the top of the page, where 2 2 2 W̃ = wwH ∈ CN ×N and w = vec(W) ∈ CN ×1 . Note that all constraints in (34) are convex. However, the objective function is a linear fractional function, which is quasi-convex. Similar to (26), we transform (34) into a convex optimization problem by using the Charnes-Cooper transformation [39]. Problem (34) can then be equivalently rewritten as max Ps Tr(A1 Q) Q,Υ,τ M X s.t. (33) Ps Tr(B1m Q) + hH (θrd )Υh(θrd )+ m=1 σ 2 Tr(A2 Q) + σ 2 τ = 1, Ps Tr(C1 Q) + σ 2 Tr(Q) + Tr(Υ) ≤ Pt τ, Ps Tr(D1 Q) + σ 2 Tr(D2 Q) + hH (θrp )Υh(θrp ) Pmin τ , Q  0, Υ  0, τ > 0, (35) ≥ ρ where τ is a slack variable, Q = W̃τ and Υ = Ωτ . To prove that the relaxation is tight, we consider the associated power minimization problem, which is similar to that in Section III-A, yielding min Ps Tr(C1 W̃) + σ 2 Tr(W̃) Pmin , W̃  0, Ω  0. ρ (34) Lemma 2: The optimal solution W̃⋆ in (36) satisfies rank(W̃⋆ ) = 1. Proof : See Appendix C. C. Low-complexity SCA Scheme In the III-A and III-B, we have proposed the SRM-1D and the Max-SLANR schemes to obtain the information beamforming matrix and the AN covariance matrix. Both of the two schemes have high computational complexity because their optimization variables are matrices. To facilitate implementation in practice, we propose a low complexity scheme based on SCA in this subsection. Specifically, we first formulate the optimization problem, then convert it into the SOCP problem, and use the SCA method to solve the problem iteratively. Different from designing the AN covariance matrix Ω in the previous two subsections, here we are devoted to designing the AN beamforming vector v, where Ω = vvH . The optimization problem (20) can be rewritten as 1 + SINRd 1 + E[SINRem ] s.t. wH (Ps C1 + σ 2 IN 2 )w + vH v ≤ Pt , max min w,v m (37a) (37b) P min , wH (Ps D1 + σ 2 D2 )w + vH h(θrp )hH (θrp )v ≥ ρ (37c) W̃,Ω s.t. − Ps Tr(A1 W̃) + φ M X Ps Tr(B1m W̃)+ m=1 φhH (θrd )Ωh(θrd ) + φσ 2 Tr(A2 W̃) + φσ 2 ≤ 0, Ps Tr(C1 W̃) + σ 2 Tr(W̃) + Tr(Ω) ≤ Pt , Ps Tr(D1 W̃) + σ 2 Tr(D2 W̃) + hH (θrp )Ωh(θrp ) Pmin ≥ , Ω  0, W̃  0, (36) ρ where φ is the optimal value of (35). Problem (36) is a standard SDP problem. where SINRd and E[SINRem ] are defined in (23a) and (23b), respectively. By introducing slack variables r1 and r2 , problem (37) is equivalently rewritten as max w,v,r1 ,r2 r1 r2 s.t. 1 + SINRd ≥ r1 , 1 1 + E[SINRem ] ≤ , m ∈ M, r2 (37b), (37c). (38a) (38b) (38c) (38d) 7 (38b) and (38c) can be rearranged as σ 2 wH A2 w + vH h(θrd )hH (θrd )v + σ 2 ≤ H Ps w A1 w , r1 − 1 (39a) wH (Ps B1m + σ 2 B2m )w + vH Hrem v + σ 2 1 ≤ (σ 2 wH B2m w + vH Hrem v + σ 2 ), m ∈ M, (39b) r2 respectively. Since the quadratic-over-linear function is convex [40], the right-hand-side (RHS) of (39a) and (39b) are convex functions (r1 > 1, r2 > 0). In the following, we first transform the (39a) and (39b) into convex constraints by using the firstorder Talyor expansions [43], and then convert them into the second-order cone (SOC) constraints. To this end, we define H x Ax , (40) r−a where A  0 and r > a. We perform a first-order Taylor expansion on (40) at point (x̃, r̃) [22], yielding: fA,a (x, r) = fA,a (x, r) ≥FA,a (x, r, x̃, r̃) 2Re{x̃H Ax} x̃H Ax̃ = (r − a), − r̃ − a (r̃ − a)2 (41) where the inequality holds due to the convexity of fA,a (x, r) with respect to x and r. Therefore, (39a) and (39b) can be rewritten as σ 2 wH A2 w + vH h(θrd )hH (θrd )v + σ 2 ≤ Ps FA1 ,1 (w, r1 , w̃, r̃1 ), H 2 H (42a) w (Ps B1m + σ B2m )w + v Hrem v + σ ≤ Fm , which can be transformed into the SOC constraints, i.e., 1   2σA22 w; 2hH (θrd )v; 2σ; Ps FA1 ,1 (w, r1 , w̃, r̃1 ) − 1 ≤ Fm + 1, m ∈ M, (43a) (43b) where Fm is defined as Fm =σ 2 FB2m ,0 (w, r2 , w̃, r̃2 ) + FHrem ,0 (v, r2 , ṽ, r̃2 )   r2 2 2 (44) − 2 . +σ r̃2 r̃2 It is easy to see that the objective function of the problem (38) is non-concave and the constraint (37c) is non-convex. To handle the non-concave objective function, we introduce slack variables t and ψ and then rewrite the problem (38) as max w,v,r1 ,r2 ,t,ψ t s.t. r1 r2 ≥ ψ 2 , ψ 2 ≥ t, . (43a), (43b), (37b), (37c). (45a) (45b) (45c) Note that the first term of the (45b) can be rearranged as the SOC constraint, i.e., k[r1 − r2 ; 2ψ]k ≤ r1 + r2 . (46) (47) In the following, we will focus on dealing with the nonconvex constraint (37c). To convert (37c) into the convex constraint, we define uA (x) = xH Ax, (48) where A  0. Since uA (x) is a convex function, we have the following inequality uA (x) ≥ UA (x, x̃) = 2Re(x̃H Ax) − x̃H Ax̃, (49) where the inequality (49) holds based on the first-order Taylor expansion at the point x̃. According to (49), (37c) can be rewritten as Pmin , (50) UG (w, w̃) + UHrp (v, ṽ) ≥ ρ where G = Ps D1 + σ 2 D2 and Hrp = h(θrp )hH (θrp ). In addition, (37b) can be equivalently rewritten as p   1 (Ps C1 + σ 2 IN 2 ) 2 w; v ≤ Pt . (51) According to the above transformation of the objective function and the constraints of problem (37), we can convert (37) into the following SOCP problem w,v,r1 ,r2 ,t,ψ (42b) ≤ Ps FA1 ,1 (w, r1 , w̃, r̃1 ) + 1, 1   1 2 2(Ps B1m + σ 2 B2m ) 2 w; 2Hre m v; 2σ; Fm − 1 2ψ̃ψ − ψ̃ 2 ≥ t. max 2 m ∈ M, For the second term of the (45b), we employ the first-order Taylor expansion at the point ψ̃ and transform it into the linear constraint, i.e., t s.t. (46), (47), (50), (51), (43a), (43b). (52) It can be seen that the optimization problem (52) consists of a linear objective function and several SOC constraints. Therefore, problem (52) is a convex optimization problem. For a given feasible solution (w̃, ṽ, r̃1 , r̃2 , ψ̃), we can solve the problem (52) by means of convex optimization tools such as CVX [40]. Based on the idea of SCA, the original optimization problem (37) can be solved iteratively by solving a series of convex subproblems (52). The current optimal solution of the convex subproblem (52) is gradually approaching the optimal solution of the original problem with the increase of the number of iterations, until the algorithm converges [44]. Algorithm 2 lists the detailed process of the SCA algorithm. Algorithm 2 SCA Algorithm for Solving Problem (37) Initialize: Given a feasible solution (w̃0 , ṽ0 , r̃10 , r̃20 , ψ̃ 0 ); n=0. repeat 1. Solve the problem (52) with (w̃n , ṽn , r̃1n , r̃2n , ψ̃ n ) and obtain the current optimal solution (w̃∗ , ṽ∗ , r̃1∗ , r̃2∗ , ψ̃ ∗ ); n=n+1. 2. Update (w̃n , ṽn , r̃1n , r̃2n , ψ̃ n )=(w̃∗ , ṽ∗ , r̃1∗ , r̃2∗ , ψ̃ ∗ ). 3. Compute secrecy rate R̄sn . until |R̄sn − R̄sn−1 | < δ is met, where δ denotes the convergence tolerance. 8 TABLE I C OMPLEXITY ANALYSIS OF PROPOSED ALGORITHMS Algorithms SRM-1D-Robust Max-SLANR-Robust SCA-Robust  Complexity order suppressing ln( 1ǫ )  √  O nT N 2 + N + M + 5 N 6 + N 3 + n(N 4 + N 2 + M + 5) + M + 5 + n2 , where n = O(N 4 + N 2 + 1).  √  O n N 2 + N + 5 N 6 + N 3 + n(N 4 + N 2 + 5) + 5 + n2 , where n = O(N 4 + N 2 + 1).  √  O nL 2M + 8 (N 2 + N )2 + (M + 1)(N 2 + N + 1)2 + 6 + 2n + n2 , where n = O(N 2 + N + 4). D. Complexity Analysis In this section, we analyze and compare the complexity of the proposed three schemes in the previous three subsections. For the SRM-1D scheme, we convert the SRM problem to the SDP form and solve it with an 1D search. The complexity of each search is calculated according to problem (27). Problem (27) consists of M + 5 linear constraints with dimension 1, one LMI constraint of size N 2 , and one LMI constraint of size N . The number of decision variables n is on the order of N 4 + N 2 + 1. Therefore, the total complexity based on the SRM-1D scheme can be expressed as [45]  p O nT N 2 + N + M + 5 N 6 + N 3 + n(N 4 + N 2 +   (53) M + 5) + M + 5 + n2 ln (1/ǫ) , where T denotes the number of iterations in the 1D search and ǫ denotes the computation accuracy. For the Max-SLANR scheme, we compute the complexity of the optimization problem (35), which consists of one LMI constraint with size of N 2 , one LMI constraint with size of N and five linear constraints. The number of decision variables n is on the order of N 4 +N 2 +1. Therefore, the total complexity based on the Max-SLANR scheme can be expressed as  p O n N 2 + N + 5 N 6 + N 3 + n(N 4 + N 2 + 5)   (54) + 5 + n2 ln (1/ǫ) , For the proposed SCA scheme, we first formulate the SRM problem, then convert it into the SOCP form, and use the SCA algorithm to solve it iteratively. The complexity of each iteration is calculated according to problem (52). Problem (52) includes two linear constraints, one SOC constraint of dimension 2, one SOC constraint of dimension N 2 + N , M+1 SOC constraints of dimension N 2 + N + 1. The number of decision variables n is on the order of N 2 + N + 4. Therefore, the total complexity based on the SCA scheme is given by  √ O nL 2M + 8 (N 2 + N )2 + (M + 1)(N 2 + N + 1)2   (55) + 6 + 2n + n2 ln (1/ǫ) , where L is the number of iterations. The complexity of the proposed algorithms are also listed in Table I at the top the page. Discussions: Upon comparing (53), (54) and (55), it can be observed that the complexity of the SCA algorithm is much lower than that of the SRM-1D and the Max-SLANR schemes. The complexity of Max-SLANR scheme is slightly less than that of the SRM-1D scheme, but the SLANR scheme does not require 1D search. Moreover, the complexity of the SRM-1D scheme grows linearly upon increasing the precision of the 1D search, with the number of iterations T , and it grows with the number M of eavesdroppers, while the complexity of the Max-SLANR scheme is not related to either of them. This implies that when the number of eavesdroppers increases, the complexity of the Max-SLANR scheme remains constant, while the complexity of the SRM-1D and SCA schemes increases. For example, for a system with N = 6, M = 2, T = 12 and L = 6, the complexity of the SRM1D, the Max-SLANR, and SCA schemes, are O(3.98 × 1011), O(3.25 × 1010 ), and O(8.87 × 106 ), respectively. Therefore, the complexity of the SCA scheme is much lower than that of the other two schemes. IV. S IMULATION R ESULTS TABLE II S IMULATION PARAMETER Parameters The transmit power at the relay (Pt ) The transmit power at the source (Ps ) the noise variance (σ2 ) The number of transmit antennas at the relay (N ) The number of eavesdroppers (M ) the minimum energy required by the ER (Pmin ) The maximum angle estimation error (△θmax ) The normalization factor (Ke ) The energy transfer efficiency (ρ) The direction angle of the source (θsr ) The direction angle of the IR (θrd ) The direction angle of the eavesdroppers (θre1 , θre2 ) The convergence tolerance (δ) Values 30dBm 30dBm −10dBm 6 2 10dBm 6◦ 0.9 0.8 − 7π 18 π 2 π 11π , 3 18 10−4 In this section, we evaluate the performance of our SRM1D, Max-SLANR, and SCA schemes by Monte Carlo simulations. Furthermore, we develop a method based on ZF [25] to show the superiority of our schemes. Additionally, since in our proposed scheme, we take into account the estimation error of the direction angles of the eavesdroppers at the relay, we also consider the scenario relying on perfect estimation of the direction angle of eavesdroppers from the relay to arrive at a performance upper-bound of our schemes. In the following, we denote by ‘SRM-1D-Perfect’ and ‘SRM-1D-Robust’ the SRM-1D method with perfect and imperfect knowledge of the direction angles from the relay to the eavesdroppers, respectively, and represent by ‘SCA-Robust’ and ‘Max-SLANR-Robust’ our SCA and MaxSLANR schemes, respectively, when takeing into consideration the estimation error of direction angles at the relay. The 9 simulation parameters are listed in Table II, unless otherwise stated. The free-space path loss model used is defined as  −2 dmn gmn = , (56) d0 where gmn and dmn denote the path loss and distance between node m and node n, while d0 is the reference distance, which is set to 10m. The distances from relay to other nodes (source, IR, ER and eavesdroppers) are assumed to be the same, which 1 . The direction angle of are set to 80 meters, i.e., gmn = 64 the source, IR, ER and eavesdroppers are θsr = − 7π 18 , θrd = π 11π π π } = { , θ , θ = and {θ , }, respectively. The rp re1 re2 2 4 3 18 location of the source, relay, IR, ER and eavesdroppers in the Cartesian coordinate system is shown in Fig. 2. y E2 scheme has the best secrecy rate, because it has perfectly obtain the eavesdroppers’ directional angle information. Third, the proposed SRM-1D-Robust slightly outperforms the proposed Max-SLANR-Robust arrangement. For example, when Pt = 30dBm, the secrecy rate of the Max-SLANR-Robust scheme is 0.05bits/s/Hz lower than that of the SRM-1DRobust scheme. This is because the SRM-1D-Robust scheme is the optimal solution, while the Max-SLANR-Robust scheme is a suboptimal solution. Fourth, the secrecy rate of SCARobust scheme is very close to that of the SRM-1D-Robust scheme. However, the complexity of the SCA-Robust scheme is much lower than that of the SRM-1D-Robust scheme. Finally, compared to the ZF scheme, our schemes provide significant performance improvement. 3.2 IR E1 3 Secrecy rate(bits/s/Hz) ER x R 80m 2.8 2.76 2.74 2.72 2.6 2.4 8 2.2 2 S 1.8 6 7 8 9 10 Fig. 4. Secrecy rate versus the minimum energy required by the ER for N = 6, M = 2, Ps = 30dBm, Pt = 30dBm, ∆θmax = 6◦ . 3.2 Secrecy rate(bits/s/Hz) 5 Pmin(dBm) Fig. 2. The location of source, relay, IR, ER and eavesdroppers. 3 2.62 2.8 2.6 2.6 28 2.4 2.2 2 SRM-Perfect SRM-Robust SCA-Robust Max-SLANR-Robust ZF 1.8 1.6 1.4 25 8.1 SRM-1D-Perfect SRM-1D-Robust SCA-Robust Max-SLANR-Robust ZF 26 27 28 29 30 Pt(dBm) Fig. 3. Secrecy rate versus the transmit power at relay for N = 6, M = 2, Ps = 30dBm, Pmin = 5dBm, ∆θmax = 6◦ . In Fig. 3, we show the secrecy rate versus the total power Pt at the relay. First, it can be observed that the secrecy rate grows upon increasing the transmit power Pt at the relay for all cases. Second, compared to other schemes, SRM-1D-Perfect Fig. 4 shows the secrecy rate versus the minimum energy required by the ER for N = 6, Ps = 30dBm, Pt = 30dBm, ∆θ = 6◦ . Naturally, the secrecy rate decreases with the increase of the minimum energy required by the ER for all cases. The reason behind this is that the more power is used for energy harvesting, the less power remains for secure communication, when the transmit power at the relay is fixed. Furthermore, when Pmin < 9dBm, it is observed that the secrecy rate decreases slowly. But when Pmin > 9dBm, the secrecy rate decreases rapidly. This is because the signal is transmitted over 80m away from the relay, hence the power of the signal is only 12dBm due to the path loss. Since the energy transfer efficiency is ρ = 0.8 and Pmin > 9dBm, the power of the transmit signal is mainly used for satisfying the energy harvesting constraint, which results in a rapid reduction of the secrecy rate for all the schemes. In Fig. 5, by fixing Pt = 30dBm and Pmin = 10dBm, we investigate the effect of the maximum angular estimation error ∆θmax of the eavesdroppers on the secrecy rate. The SRM1D-Perfect curve remains constant for all ∆θmax values and outperforms the other schemes due to the perfect knowledge of the directional angle. With the increase of ∆θmax , the secrecy 10 2.5 2.5 2.3 2.335 2.2 2.33 2.1 4 2 4.02 SRM-1D-Perfect SRM-1D-Robust SCA-Robust Max-SLANR-Robust ZF 1.9 1.8 Secrecy rate(bits/s/Hz) Secrecy rate(bits/s/Hz) 2.4 2 3 2 2.27 2.26 2.25 2.24 2.23 3.96 1.5 1 SRM-1D-Perfect SRM-1D-Robust SCA-Robust Max-SLANR-Robust ZF 0.5 4 5 0 6 4 1 2 3 4 5 6 ∆θ max(degree) The number of eavesdroppers (M) Fig. 5. Secrecy rate versus the maximum estimate error angle for N = 6, M = 2, Ps = 30dBm, Pt = 30dBm, Pmin = 10dBm. Fig. 7. Secrecy rate versus the number of eavesdroppers for N = 6, {θre1 , θre2 , θre3 , θre4 , θre5 , θre6 } = { π3 , 11π , 3π , π , 2π , 4π }, Ps = 18 4 6 3 9 30dBm, Pt = 30dBm, Pmin = 10dBm, ∆θmax = 6◦ . rates achieved by robust schemes degrades slowly, because the proposed algorithms have considered the statistical property of the estimation error. As such, they are robust against the effects of estimation errors. 3 IR. The secrecy rate decreases because, as the relay continues approaching the IR, it is getting farther away from the source node, which decreases the SNR of the IR. We can observe that the optimal point is yr = 30m. Moreover, when yr = 60m, it is observed that the secrecy rates of all schemes converge to the same points, because when the relay has a low SNR, all these schemes have a similar secrecy rate performance. 2.914 2.912 2.91 2.908 2.906 2.904 2.902 2.6 2.4 100 5 SRM-1D-Perfect SRM-1D-Robust SCA-Robust Max-SLANR-Robust ZF 2 1.8 0 1 2 3 4 5 E1 10-1 2.2 E2 ×10-3 BER Secrecy rate(bits/s/Hz) 2.8 4 3 10-2 2 6 yr(m) 10-3 Fig. 6. Secrecy rate versus the location of relay for N = 6, M = 2, Ps = 30dBm, Pt = 30dBm, Pmin = 10dBm, ∆θmax = 6◦ . Fig. 6 shows the secrecy rate versus the location of the relay. We denote the coordinates of the relay by (xr , yr ). In this simulation, we fix xr to zero and assume that the relay moves vertically along the y-axis, starting from the origin towards the IR, while the locations of all the other nodes are fixed. As the relay moves, it becomes closer to the IR and farther from the source. We can see from Fig. 6 that for all the schemes, the secrecy rate increases first and then decreases. The secrecy rate increases because the received signal-to-noise ratio (SNR) increases as the relay moves to the SRM-1D-Perfect SRM-1D-Robust SCA-Robust Max-SLANR-Robust ZF 1 90 0 30 60 90 120 150 180 Direction Angle(degree) Fig. 8. The performance of BER versus direction angle for N = 6, M = 2, Ps = 30dBm, Pt = 25dBm, Pmin = 5dBm, ∆θmax = 6◦ . Fig. 7 shows the secrecy rate versus the number of eavesdroppers. As can be seen from the Fig. 7, when M = 2 and M = 6, the secrecy rate of the proposed algorithm decreases rapidly. This is because the second and sixth eavesdroppers are located near the DR. Moreover, when M = 6, the secrecy rate of the ZF scheme is 0. This is because, the degrees of 11 freedom of the relay is 6 (N = 6), whereas the degrees of freedom at eavesdroppers are 6 when M = 6. Therefore, there is no degrees of freedom left for the DR. Fig. 8 studies the bit error rate (BER) versus the direction angle. We employ quadrature phase shift keying (QPSK) modulation. As seen from Fig. 8, the BER performance in the desired direction of 90◦ is significantly better than in other directions for all cases. Observe from Fig. 8, that in the vicinity of the two eavesdroppers’ directions, the BER performance is poor, since the signals in these two directions are contaminated by the AN. Thus the eavesdroppers cannot successfully receive the information destined to the IR. Substituting (58) into (57) yields Z ∆θmax Hrem (p, q) = Ĥrem (p, q) e −∆θmax   ∆θ2 m +sin(θ̂ −jαpq cos(θ̂rem ) re rem )∆θrem 2 Z = Ĥrem (p, q) ∆θmax −∆θmax f (∆θrem ) d(∆θrem )    m m cos ξp,q − j sin ξp,q f (∆θrem ) d(∆θrem ) = Γ1m (p, q) − jΓ2m (p, q), where Ĥrem (p, q) = V. C ONCLUSION In this paper, we investigated secure wireless information and power transfer based on DM in AF relay networks. Specifically, the robust information beamforming matrix and the AN covariance matrix were designed based on the SRM1D scheme and on the Max-SLANR scheme. To solve the optimization problem of SRM, we proposed a twin-level optimization method that includes a 1D search and the SDR technique. Furthermore, we proposed a suboptimal solution for the SRM problem, which was based on the Max-SLANR criterion. Finally, we formulated a SRM problem, which was transformed into a SOCP problem, and solved by a lowcomplexity SCA method. Simulation results show that the performance of the SCA scheme is very close to that of the SRM-1D scheme in terms of its secrecy rate and bit error rate (BER), and compared to the ZF scheme, the SCA scheme and Max-SLANR schemes provide a significant performance improvement. A PPENDIX A D ERIVATION OF Hrem (p, q) Hrem (p, q) can be expressed as i h ) + ∆θ ( θ̂ Hrem (p, q) = E hp (θ̂rem + ∆θrem )hH re re m m q Z ∆θmax grem ejαpq cos(θ̂rem +∆θrem ) f (∆θrem ) d(∆θrem ) = N −∆θmax Z n grem ∆θmax = exp jαpq cos(θ̂rem ) cos(∆θrem ) N −∆θmax o (57) − sin(θ̂rem ) sin(∆θrem ) f (∆θrem ) d(∆θrem ), where αpq = 2π(q−p)l . Assuming ∆θmax is a small value λ near zero, we get the following approximate expression using second-order Taylor expansion sin(∆θrem ) ≈∆θrem 2 ∆θre m . cos(∆θrem ) ≈1 − 2 (58) (59) grem jαpq cos(θ̂rem ) e N (60) represents the p-th row and q-th column entry of h(θ̂rem )hH (θ̂rem ), and   2 ∆θre m m ξp,q = αpq cos(θ̂rem ) + sin(θ̂rem )∆θrem , (61a) 2 Γ1m (p, q) = Z ∆θmax  m cos ξp,q f (∆θrem ) d(∆θrem ), (61b) Ĥrem (p, q) −∆θmax Γ2m (p, q) = Z Ĥrem (p, q) ∆θmax −∆θmax  m f (∆θrem ) d(∆θrem ). (61c) sin ξp,q Now the task is to derive the analytic expression of Γ1m (p, q) and Γ2m (p, q). To this end, we first expand the trigonometric function into the following form  m = (62) cos ξp,q   2 ∆θre m cos αpq cos(θ̂rem ) + αpq sin(θ̂rem )∆θrem 2     ∆θ2 = cos αpq cos(θ̂rem ) rem cos αpq sin(θ̂rem )∆θrem 2     2 ∆θre m − sin αpq cos(θ̂rem ) sin αpq sin(θ̂rem )∆θrem . 2 Then using the second-order Taylor series to approximate each term, we can rewrite (62) as ! 4 2 2  )∆θ α cos ( θ̂ re m re pq m m × cos ξp,q = 1− 8 ! 2 α2pq sin2 (θ̂rem )∆θre m 1− 2    2 ∆θre m αpq sin(θ̂rem )∆θrem − αpq cos(θ̂rem ) 2   1 2 ≈ 1 − α2pq sin2 (θ̂rem )∆θre − m 2    ∆θ2 αpq sin(θ̂rem )∆θrem . (63) αpq cos(θ̂rem ) rem 2 Since the last term in (63) is an odd function with respect to ∆θrem , hence we have (64) at the top of the next page. 12   1 2 f (∆θrem ) d(∆θrem ) 1 − α2pq sin2 (θ̂rem )∆θre m 2 −∆θmax    2 ∆θmax − 2σ12 ∆θmax ∆θmax 1 ∆θmax (a) Ĥrem (p, q) 2 2 2 θ √ √ √ , = ) − αpq sin (θ̂rem )σθ )− e erf( erf( Kem 2 2σθ 2σθ 2πσθ Γ1m (p, q) ≈ Ĥrem (p, q) Z ∆θmax (64)   1 2 f (∆θrem ) d(∆θrem ) αpq cos(θ̂rem )∆θre m 2 −∆θmax   2 ∆θmax − 2σ12 ∆θmax ∆θmax Ĥrem (p, q)αpq cos(θ̂rem )σθ2 1 θ √ √ )− e erf( = . Kem 2 2σθ 2πσθ Γ2m (p, q) ≈ Ĥrem (p, q) Z ∆θmax (67) L(W̃, Ω, µ, νm , η, ζ, S1 , S2 ) =   Ps Tr(C1 W̃) + σ 2 Tr(W̃) + µ −Ps Tr(A1 W̃) + σ 2 φ(β)Tr(A2 W̃) + φ(β)hH (θrd )Ωh(θrd ) + φ(β)σ 2 + M X m=1     νm Ps Tr(B1m W̃) − βσ 2 Tr(B2m W̃) − βTr(H̄rem Ω) − βσ 2 + η Ps Tr(C1 W̃) + σ 2 Tr(W̃) + Tr(Ω) − Pt   Pmin H 2 − Tr(S1 W̃) − Tr(S2 Ω). − ζ Ps Tr(D1 W̃) + σ Tr(D2 W̃) + h (θrp )Ωh(θrp ) − ρ Note that step (a) in (64) results from the following equation [46] √  Z x 1 π −q2 x2 2 −q2 t2 , (65) erf(qx) − qxe t e dt = 3 2q 2 0 Karush-Kuhn-Tucker (KKT) conditions related to the proof are given as follows S⋆1 = Ps C1 + σ 2 IN 2 − µ⋆ Ps A1 + µ⋆ σ 2 φ(β)A2 + Ps where erf(x) represents the error function defined as 2 erf(x) = √ π Z x e −t2 (69) M X m=1 ⋆ νm B1m − βσ 2 M X ⋆ νm B2m + η ⋆ Ps C1 + m=1 η ⋆ σ 2 IN 2 − ζ ⋆ Ps D1 − ζ ⋆ σ 2 D2 , dt. (66) 0 Using a similar method as above, Γ2m (p, q) can be approximated as (67) at the top of the page. Combining (59), (64) and (67), we obtain the analytic expression of Hrem (p, q) and the proof is completed.  S⋆2 = µ⋆ φ(β)h(θrd )hH (θrd ) − β ⋆ ⋆ H η IN − ζ h(θrp )h (θrp ), (70a) M X ⋆ νm Hrem + m=1 (70b) S⋆1 W̃⋆ = 0, S⋆2 Ω⋆ = 0, S⋆1  0, S⋆2  0, W̃  0. (70c) From (70b), we arrive at:  Ps h∗ (θsr )hT (θsr ) + σ 2 IN ⊗ S⋆2 = µ⋆ Ps φ(β)A1 + A PPENDIX B P ROOF OF L EMMA 1 µ⋆ σ 2 φ(β)A2 − βPs The optimization problem (28) can be rewritten as M X m=1 ⋆ νm B1m − βσ 2 M X ⋆ νm B2m + m=1 η ⋆ Ps C1 + η ⋆ σ 2 IN 2 − ζ ⋆ Ps D1 − ζ ⋆ σ 2 D2 . min Ps Tr(C1 W̃) + σ 2 Tr(W̃) (71) Substituting (71) into (70a), we have W̃,Ω S⋆1 + µ⋆ Ps [φ(β) + 1] A1 = Ξ, s.t. − Ps Tr(A1 W̃) + σ 2 φ(β)Tr(A2 W̃)+ φ(β)hH (θrd )Ωh(θrd ) + φ(β)σ 2 ≤ 0, (25b), (25c), (25d), W̃  0, Ω  0. (72) where (68) Since the problem (68) satisfies Slater’s constraint qualification [40], its objective function and constraints are convex, and the optimal solution must satisfy KKT conditions. The Lagrangian of (68) is given in (69) at the top of the page, where µ, νm , η, ζ, S1 and S2 denote the dual variables associated with the constraint in (68). Let W̃⋆ , Ω⋆ be the optimal primal ⋆ variables and µ⋆ , νm , η ⋆ , ζ ⋆ , S⋆1 , S⋆2 be the dual variables. The Ξ =σ 2 IN 2 + Ps C1 + Ps (β + 1)  M X ⋆ νm B1m + m=1 ⋆ Ps h (θsr )h (θsr ) + σ IN ⊗ S2 . (73) µ⋆ Ps (φ(β) + 1) A1 W̃⋆ = ΞW̃⋆ . (74) ∗ T 2 Let us multiply both sides of (72) by W̃⋆ and substitute the first term of (70c) into the resultant equation, yielding: 13  Since Ps h∗ (θsr )hT (θsr ) + σ 2 IN is a Hermitian positive definite matrix, and S⋆2  0, according to the fact that [47] λ(X ⊗ Y) = {µi γj , µi ∈ λ(X), γj ∈ λ(Y)}, Substituting (80) into (79a), we have S⋆1 + µ⋆ Ps (1 + φ) A1 = Ξ, where we have  2 T ∗  Ps h (θsr )h (θsr ) + σ IN ⊗ S⋆2  0, (76) where λ(•) denotes the set of matrix eigenvalues. Upon observing that the first term in (73) is the identity matrix and the other three terms are Hermitian semidefinite matrices, we have Ξ ≻ 0. By exploiting the fact that rank(AB) ≤ min{rank(A), rank(B)}, we obtain rank(ΞW̃⋆ ) = rank(W̃⋆ ) ≤ rank(µ⋆ Ps (φ(β) + 1) A1 ). (77) Combining (74) with (77) and considering that A1 is a rankone matrix, we conclude that rank(W̃⋆ ) = 1 for µ⋆ > 0, rank(W̃⋆ ) = 0 for µ⋆ = 0. However, W̃⋆ = 0 corresponds to no signal transmission. Hence we can conclude that rank(W̃⋆ ) = 1, and the proof is completed.  A PPENDIX C P ROOF OF L EMMA 2 Since the problem (36) satisfies Slater’s constraint qualification [40], its objective function and constraints are convex, and the optimal solution must satisfy KKT conditions. The Lagrangian associated with the problem (36) is given by L(W̃, Ω, µ, η, ζ, S1 , S2 ) = Ps Tr(C1 W̃) + σ 2 Tr(W̃) M  X Ps Tr(B1m W̃) + µ − Ps Tr(A1 W̃) + φ m=1  + φh (θrd )Ωh(θrd ) + φσ 2 Tr(A2 W̃) + φσ 2   + η Ps Tr(C1 W̃) + σ 2 Tr(W̃) + Tr(Ω) − Pt  − ζ Ps Tr(D1 W̃) + σ 2 Tr(D2 W̃) + hH (θrp )Ωh(θrp ) Pmin  − (78) − Tr(S1 W̃) − Tr(S1 W̃) − Tr(S2 Ω), ρ H where µ, η, ζ, S1 and S2 are dual variables associated with the constraint in (36), while W̃⋆ , Ω⋆ are the optimal primal variables and µ⋆ , η ⋆ , ζ ⋆ , S⋆1 , S⋆2 are dual variables. The KKT conditions that are relevant to the proof are given by S⋆1 = Ps C1 − µ⋆ Ps A1 + µ⋆ φσ 2 A2 + µ⋆ φPs M X B1m + m=1 ⋆ 2 σ 2 IN 2 + η ⋆ Ps C1 + η ⋆ σ 2 IN 2 − ζ ⋆ Ps D1 − ζ σ D2 , (79a) S⋆2 = µ⋆ φh(θrd )hH (θrd ) + η ⋆ IN − ζ ⋆ h(θrp )hH (θrp ), (79b) S⋆1 W̃⋆ = 0, S⋆2 Ω⋆ = 0, S⋆1  0, S⋆2  0, W̃  0. (79c) From (79b), we get   Ps h∗ (θsr )hT (θsr ) + σ 2 IN ⊗ S⋆2 = µ⋆ Ps φA1 + (80) ⋆ 2 ⋆ ⋆ 2 ⋆ ⋆ 2 (81) (75) µ σ φA2 + η Ps C1 + η σ IN 2 − ζ Ps D1 − ζ σ D2 . Ξ =σ 2 IN 2 + Ps C1 + µ⋆ φPs  Ps h∗ (θsr )hT (θsr ) + M X m=1  σ 2 IN B1m + ⊗ S⋆2 . (82) It is clear from (82) that Ξ is a Hermitian positive definite matrix. The remaining steps of the proof are similar to the Lemma 1 and is omitted here. The proof is completed.  R EFERENCES [1] Q. Wu, W. Chen, D. W. K. Ng, and R. Schober, “Spectral and energy efficient wireless powered IoT networks: Noma or tdma?” IEEE Trans. Veh. Technol., vol. PP, no. 99, pp. 1–1, 2018. [2] Q. Wu, M. Tao, and W. Chen, “Joint Tx/Rx energy-efficient scheduling in multi-radio wireless networks: A divide-and-conquer approach,” IEEE Trans. Wireless Commun., vol. 15, no. 4, pp. 2727–2740, Apr. 2016. [3] H. Son and B. Clerckx, “Joint beamforming design for multi-user wireless information and power transfer,” IEEE Trans. Wireless Commun., vol. 13, no. 11, pp. 6397–6409, Nov 2014. [4] Z. Chu, Z. Zhu, M. Johnston, and S. Y. L. Goff, “Simultaneous wireless information power transfer for MISO secrecy channel,” IEEE Trans. Veh. Technol., vol. 65, no. 9, pp. 6913–6925, Sep. 2016. [5] H. Zhang, Y. Huang, C. Li, and L. Yang, “Secure beamforming design for SWIPT in MISO broadcast channel with confidential messages and external eavesdroppers,” IEEE Trans. Wireless Commun., vol. 15, no. 11, pp. 7807–7819, Nov. 2016. [6] D. W. K. Ng, E. S. Lo, and R. Schober, “Robust beamforming for secure communication in systems with wireless information and power transfer,” IEEE Trans. Wireless Commun., vol. 13, no. 8, pp. 4599–4615, Aug. 2013. [7] W. Wu and B. Wang, “Robust secrecy beamforming for wireless information and power transfer in multiuser MISO communication system,” Eurasip Journal on Wireless Communications Networking, vol. 2015, no. 1, pp. 161–171, Jun. 2015. [8] Q. Wu, G. Li, W. Chen, and D. W. K. Ng, “Energy-efficient small cell with spectrum-power trading,” IEEE J. Sel. Areas Commun., vol. 34, no. 12, pp. 3394–3408, Dec. 2016. [9] M. R. A. Khandaker and K. K. Wong, “Robust secrecy beamforming with energy-harvesting eavesdroppers,” IEEE Wireless Commun. Lett., vol. 4, no. 1, pp. 10–13, Feb. 2015. [10] W. Mei, Z. Chen, and J. Fang, “Artificial noise aided energy efficiency optimization in MIMOME system with SWIPT,” IEEE Commun. Lett., vol. 21, no. 8, pp. 1795–1798, Aug 2017. [11] Z. Xun, Z. Rui, and C. K. Ho, “Wireless information and power transfer: Architecture design and rate-energy tradeoff,” IEEE Trans. Commun., vol. 61, no. 11, pp. 4754–4767, Nov. 2013. [12] R. Zhang and C. K. Ho, “MIMO broadcasting for simultaneous wireless information and power transfer,” IEEE Trans. Wireless Commun., vol. 12, no. 5, pp. 1989–2001, May. 2013. [13] Q. Wu, G. Y. Li, W. Chen, D. W. K. Ng, and R. Schober, “An overview of sustainable green 5G networks,” IEEE Wireless Commun., vol. 24, no. 4, pp. 72–80, Aug 2017. [14] Q. Wu, M. Tao, D. W. K. Ng, W. Chen, and R. Schober, “Energy-efficient resource allocation for wireless powered communication networks,” IEEE Trans. Wireless Commun., vol. 15, no. 3, pp. 2312–2327, March 2016. [15] Q. Wu, W. Chen, D. W. K. Ng, J. Li, and R. Schober, “User-centric energy efficiency maximization for wireless powered communications,” IEEE Trans. Wireless Commun., vol. 15, no. 10, pp. 6898–6912, Oct. 2016. [16] Q. Wu, G. Li, W. Chen, and D. W. K. Ng, “Energy-efficient d2d overlaying communications with spectrum-power trading,” IEEE Trans. Wireless Commun., vol. 16, no. 7, pp. 4404–4419, Jul 2017. [17] X. Chen, D. W. K. Ng, and H. H. Chen, “Secrecy wireless information and power transfer: challenges and opportunities,” IEEE Wireless Commun., vol. 23, no. 2, pp. 54–61, Apr. 2015. 14 [18] Y. Zou, J. Zhu, X. Wang, and L. Hanzo, “A survey on wireless security: Technical challenges, recent advances, and future trends,” Proc. IEEE, vol. 104, no. 9, pp. 1727–1765, Sep. 2015. [19] Y. Zou, B. Champagne, W. P. Zhu, and L. Hanzo, “Relay-selection improves the security-reliability trade-off in cognitive radio systems,” IEEE Trans. Commu., vol. 63, no. 1, pp. 215–228, Jan. 2014. [20] Y. Huang and B. Clerckx, “Relaying strategies for wireless-powered mimo relay networks,” IEEE Trans. Wireless Commun., vol. 15, no. 9, pp. 6033–6047, Sep 2016. [21] P. Liu, S. Gazor, I. M. Kim, and D. I. Kim, “Noncoherent relaying in energy harvesting communication systems,” IEEE Trans. Wireless Commun., vol. 14, no. 12, pp. 6940–6954, Dec 2015. [22] Q. Li, Q. Zhang, and J. Qin, “Secure relay beamforming for simultaneous wireless information and power transfer in nonregenerative relay networks,” IEEE Trans. Veh. Technol., vol. 63, no. 5, pp. 2462–2467, Jun. 2014. [23] A. Salem, K. A. Hamdi, and K. M. Rabie, “Physical layer security with RF energy harvesting in AF multi-antenna relaying networks,” IEEE Trans. Commun., vol. 64, no. 7, pp. 3025–3038, Jul. 2016. [24] Q. Li, Q. Zhang, and J. Qin, “Secure relay beamforming for SWIPT in amplify-and-forward two-way relay networks,” IEEE Trans. Veh. Technol., vol. 65, no. 11, pp. 9006–9019, Nov. 2016. [25] H. Xing, K. K. Wong, Z. Chu, and A. Nallanathan, “To harvest and jam: A paradigm of self-sustaining friendly jammers for secure AF relaying,” IEEE Trans. Signal Process., vol. 63, no. 24, pp. 6616–6631, Dec. 2015. [26] Y. Feng, Z. Yang, W. P. Zhu, Q. Li, and B. Lv, “Robust cooperative secure beamforming for simultaneous wireless information and power transfer in amplify-and-forward relay networks,” IEEE Trans. Veh. Technol., vol. 66, no. 3, pp. 2354–2366, Mar. 2017. [27] B. Li, Z. Fei, Z. Chu, and Y. Zhang, “Secure transmission for heterogeneous cellular networks with wireless information and power transfer,” IEEE Syst. J., vol. PP, no. 99, pp. 1–12, 2017. [28] H. Niu, B. Zhang, D. Guo, and Y. Huang, “Joint robust design for secure AF relay networks with SWIPT,” IEEE Access, vol. 5, pp. 9369–9377, 2017. [29] B. Li, Z. Fei, and H. Chen, “Robust artificial noise-aided secure beamforming in wireless-powered non-regenerative relay networks,” IEEE Access, vol. 4, pp. 7921–7929, 2016. [30] M. P. Daly and J. T. Bernhard, “Directional modulation technique for phased arrays,” IEEE Trans. Antennas Propag., vol. 57, no. 9, pp. 2633– 2640, Sep 2009. [31] Y. Ding and V. Fusco, “A vector approach for the analysis and synthesis of directional modulation transmitters,” IEEE Trans. Antennas Propag., vol. 62, no. 1, pp. 361–370, Jan. 2014. [32] ——, “Orthogonal vector approach for synthesis of multi-beam directional modulation transmitters,” IEEE Antennas Wireless Propag. Lett., vol. 14, pp. 1330–1333, 2015. [33] J. Hu, F. Shu, and J. Li, “Robust synthesis method for secure directional modulation with imperfect direction angle,” IEEE Commun. Lett., vol. 20, no. 6, pp. 1084–1087, Jun. 2016. [34] F. Shu, X. Wu, J. Li, R. Chen, and B. Vucetic, “Robust synthesis scheme for secure multi-beam directional modulation in broadcasting systems,” IEEE Access, vol. 4, no. 99, pp. 6614–6623, 2016. [35] L. Liu, R. Zhang, and K. C. Chua, “Secrecy wireless information and power transfer with MISO beamforming,” IEEE Trans. Signal Process., vol. 62, no. 7, pp. 1850–1863, Apr. 2014. [36] L. Dong, Z. Han, A. P. Petropulu, and H. V. Poor, “Improving wireless physical layer security via cooperating relays,” IEEE Trans. Signal Process., vol. 58, no. 3, pp. 1875–1888, Mar. 2010. [37] A. Mukherjee and A. L. Swindlehurst, “Robust beamforming for security in MIMO wiretap channels with imperfect CSI,” IEEE Trans. Signal Process., vol. 59, no. 1, pp. 351–361, Jan. 2011. [38] A. M. Alam, P. Mary, J. Y. Baudais, and X. Lagrange, “Asymptotic analysis of area spectral efficiency and energy efficiency in PPP networks with SLNR precoder,” IEEE Trans. Commun., vol. 65, no. 7, pp. 3172– 3185, Jul. 2017. [39] A. Charnes and W. W. Cooper, “Programming with linear fractional functionals,” Naval Research Logistics, vol. 9, no. 3-4, pp. 181–186, 1962. [40] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge U.K.: Cambridge Univ. Press, 2004. [41] Q. Li, Y. Yang, W. K. Ma, M. Lin, J. Ge, and J. Lin, “Robust cooperative beamforming and artificial noise design for physical-layer secrecy in AF multi-antenna multi-relay networks,” IEEE Trans. Signal Process., vol. 63, no. 1, pp. 206–220, Jan. 2015. [42] F. Shu, J. Tong, X. You, G. U. Chen, and W. U. Jiajun, “Adaptive robust Max-SLNR precoder for MU-MIMO-OFDM systems with imperfect CSI,” Science China Information Sciences, vol. 59, no. 6, pp. 1–14, Jul. 2016. [43] A. A. Nasir, H. D. Tuan, T. Q. Duong, and H. V. Poor, “Secrecy rate beamforming for multicell networks with information and energy harvesting,” IEEE Trans. Signal Process., vol. 65, no. 3, pp. 677–689, Feb 2017. [44] A. Zappone, E. Bjornson, L. Sanguinetti, and E. Jorswieck, “Globally optimal energy-efficient power control and receiver design in wireless networks,” IEEE Trans. Signal Process., vol. 65, no. 11, pp. 2844–2859, Jun. 2017. [45] K. Y. Wang, A. M. C. So, T. H. Chang, W. K. Ma, and C. Y. Chi, “Outage constrained robust transmit optimization for multiuser miso downlinks: Tractable approximations by conic optimization,” IEEE Trans. Signal Process., vol. 62, no. 21, pp. 5690–5705, Nov 2014. [46] I. S. Gradshteyn and I. M. Ryzhik, Table of Integrals, Series, and Products, Seventh Edition. San Diego, CA, USA: Academic, 2007. [47] G. H. Golub and C. F. Van Loan, Matrix computations. John Hopkins University Press, 1996.
7cs.IT
arXiv:1710.01696v1 [math.ST] 4 Oct 2017 MAXIMUM LIKELIHOOD ESTIMATION OF THE LATENT CLASS MODEL THROUGH MODEL BOUNDARY DECOMPOSITION ELIZABETH ALLMAN, HECTOR BAÑOS CERVANTES, ROBIN EVANS, SERKAN HOŞTEN, KAIE KUBJAS, DANIEL LEMKE, JOHN RHODES, AND PIOTR ZWIERNIK Abstract. The Expectation-Maximization (EM) algorithm is routinely used for the maximum likelihood estimation in the latent class analysis. However, the EM algorithm comes with no guarantees of reaching the global optimum. We study the geometry of the latent class model in order to understand the behavior of the maximum likelihood estimator. In particular, we characterize the boundary stratification of the binary latent class model with a binary hidden variable. For small models, such as for three binary observed variables, we show that this stratification allows exact computation of the maximum likelihood estimator. In this case we use simulations to study the maximum likelihood estimation attraction basins of the various strata. Our theoretical study is complemented with a careful analysis of the EM fixed point ideal which provides an alternative method of studying the boundary stratification and maximizing the likelihood function. In particular, we compute the minimal primes of this ideal in the case of a binary latent class model with a binary or ternary hidden random variable. 1. Introduction Latent class models are popular models used in social sciences and machine learning. They were introduced in the 1950s by Paul Lazarsfeld [23] and were used to find groups in a population based on a hidden attribute (see also [24]). The model obtained its modern probabilistic formulation in the 1970s (e.g. [16]). We refer to [11] for a more detailed literature review. More recently, latent class models became also widely used in machine learning, where they are called naive Bayes models. They became a popular method of text categorization and of other types of classification schemes [4, Section 8.2.2]. The latent class model is an instance of a model with incomplete data. The maximum likelihood estimation of such models may be challenging, and this is typically done via the EM algorithm [8]. Stephen Fienberg in his discussion [10] of the paper introducing the EM algorithm shed some light on the potential problems with this algorithm. His comments are relevant in our case of the latent class model. Referring to [17] Fienberg noted two main problems: (a) even for cases where the likelihood for the problem with complete data is concave, the likelihood for the incomplete problem need not be concave, and (b) the likelihood equations may not have a solution in the interior of the parameter space. He then wrote: In the first case multiple solutions of the likelihood equations can exist, not simply a ridge of solutions corresponding to a lack of identification of parameters, and in the second case the solutions of the likelihood equations occur on the boundary of the parameter space,[. . . ]. Date: 30 September 2017. Kubjas was supported by the European Union’s Horizon 2020 research and innovation programme (Marie Sklodowska-Curie grant agreement No 748354). 1 The latent class model can be formulated as a graphical model with an unobserved variable defined by a star graph like in Figure 1. The one-factor analysis model is a Gaussian model with the same graphical representation, and there are many parallels between these two models. Given that the variable for the internal vertex was observed, the underlying model becomes a simple instance of an exponential family; so it admits a concave likelihood function with a closed formula for the maximizer. However, the marginal likelihood will typically have many critical points, and the maxima may lie on the boundary of the model. In practice, to avoid the boundary problem, Bayesian methods need to be employed to push the solutions away from the boundary by using appropriate priors [13]. 2 1 3 5 4 Figure 1. The star graph model with 5 leaves. The internal vertex represents an unobserved random variable. 1.1. Outline of Results. Our aim is to study the boundary problem for the latent class model from the perspective of maximum likelihood estimation. We will use the link between the latent class models and nonnegative tensor rank. For instance, the latent class model with three binary observed variables and one binary hidden variable is the model of normalized nonnegative 2 × 2 × 2 tensors of nonnegative rank (rank+ ) at most two. We will rely on recent work in algebraic statistics on the description of the (algebraic) boundary of tensors of nonnegative rank two [2]. Our Theorem 9 gives a complete characterization of the boundary strata of binary latent class models with a binary hidden variable. The geometry of these models allows us to identify boundary strata for which the maximum likelihood problem is easy, such as certain codimension two strata; see Section 4.1. In Section 4.2, we will showcase the use of Theorem 9 for the maximum likelihood estimation in the 2 × 2 × 2 case of rank+ ≤ 2 by solving the problem exactly: we will provide a formula for the maximizer of the likelihood function over the algebraic set defining each boundary strata. Together with the recent work in [27], this is the first non-trivial example of the exact solution provided for a latent class model, which typically is fitted using the EM algorithm. The geometry used for this exact solution provides also insight into the maximum likelihood estimation in this model class, validating some of the concerns of Fienberg. We report the results of our simulations which show that overwhelming majority of data has a maximum likelihood estimator on the boundary of the model (where some model parameters are zero). In fact, under certain scenarios, even if the true underlying distribution lies in the interior of the model, the maximum likelihood estimator may be found on the boundary with high probability. In Section 5, we study the algebraic description of the fixed points of the EM algorithm inspired by [21]. Here, we no longer look at just the cases where rank+ ≤ 2. In particular, we compute the irreducible components of the EM fixed-point ideal for the 2 × 2 × 2 tensors of rank+ ≤ 2 (Section 5) and of rank+ ≤ 3 (Section 6). In the first case, we demonstrate that we can recover the formulas in Section 4.2 from certain components of the EM fixed-point ideal 2 via elimination. We will also prove Theorem 27 which shows that, essentially, the zero set of the EM-fixed point ideal is the same as the zero set of the ideal corresponding to the KarushKuhn-Tucker (KKT) conditions of the likelihood optimization problem. This result provides a different angle for looking at the EM-fixed point ideals since it implies that the equations of the EM-fixed point ideal as in Proposition 25 are just the complementary slackness part of the KKT conditions. We close in Section 6 by suggesting future directions for research. In particular, we give the minimal primes of the EM fixed-point ideal for the 2 × 2 × 2 tensors of rank+ ≤ 3. Our work on the EM fixed point ideal validates the results in [27]. We also examine briefly the model of 3 × 3 × 2 tensors of nonnegative rank 3. Our simulations indicate that this model occupies a tiny portion (approximately .019%) of the probability simplex. 2. Definitions and Background If X is a random variable with values in {1, . . . , k} then its distribution is a point (p1 , . . . , pk ) in the probability simplex ∆k−1 = {(x1 , . . . , xk ) ∈ Rk : x1 + . . . + xk = 1, x1 , . . . , xk ≥ 0}. The vector X = (X1 , . . . , Xn ) is a binary random vector if Xi ∈ {1, 2} for each 1 ≤ i ≤ n. A binary tensor P = (pi1 ···in ), where ij ∈ {1, 2}, is a 2 × 2 × · · · × 2 table of real numbers in n R2×···×2 = R2 . A tensor is nonnegative if it has only nonnegative entries. Every probability distribution for a binary vector X = (X1 , . . . , Xn ) is a nonnegative binary tensor in the probability simplex ∆2n −1 : pi1 i2 ···in = Prob({X1 = i1 , X2 = i2 , . . . , Xn = in }). The binary latent class model Mn,r is a statistical model for a vector of n binary random variables X = (X1 , . . . , Xn ). It contains all distributions such that X1 , X2 , . . . , Xn are independent given an unobserved random variable with r ≥ 1 states. The model is therefore parameterized by the distribution λ = (λ1 , λ2 , . . . , λr ) ∈ ∆r−1 of the unobserved variable and the conditional distributions of each Xi given the unobserved variable, which we write in form of a stochastic matrix  (i) (i)  a11 a12     . . (i) ..  A =   , i = 1, . . . , n,  ..   (i) (i) ar1 ar2 (i) (i) where A(i) ≥ 0 and aj1 + aj2 = 1 for each j = 1, . . . , r. Letting Cn denote the n-dimensional cube ∆n1 , then the parameter space of Mn,r is Θ := ∆r−1 × (Cn )r with elements (1) (1) (1) (1) (n) (n) (n) (n) θ = (λ1 , . . . , λr , a11 , a12 , . . . , ar1 , ar2 , . . . , a11 , a12 , . . . , ar1 , ar2 ). To be succinct, a choice of parameters θ is also denoted by θ = (λ, A(1) , A(2) , . . . , A(n) ). The parameterization φn,r : Θ → ∆2n −1 of Mn,r is given by (1) φn,r : θ 7→ (1) (2) (n) (1) (2) (n) pj1 j2 ···jn (θ) = λ1 a1j1 a1j2 · · · a1jn + · · · + λr arj1 arj2 · · · arjn . This parameterization shows that the distributions in Mn,r admit a decomposition into r summands, which can be phrased in terms of tensor decompositions. A binary tensor P has rank one if it is an outer product of n vectors in R2 , that is, there exist u1 , . . . , un ∈ R2 such 3 that pi1 i2 ···in = u1i1 u2i2 · · · unin . A nonnegative tensor of rank one can be always written as the outer product of nonnegative vectors in R2≥0 . A tensor has nonnegative rank (rank+ ) at most r if it can be written as a sum of r nonnegative tensors of rank one. Equivalently, a n binary tensor with rank+ ≤ r is a point in the image of a map ψn,r : (R2≥0 )nr −→ R2 defined as r r n Y X Y (1) (2) (n) (i) (i) uji1 uji2 · · · ujin . (uj1 , uj2 ) 7→ pi1 i2 ···in = ψn,r : j=1 i=1 j=1 For more on the connection between tensor rank, nonnegative tensor rank, and several of the latent class models under consideration here, see, for example, [1, 7] or for a connection to phylogenetic models [3]. Here we simply formulate the following result. Proposition 1. The set of binary tensors with rank+ ≤ r is the cone over the binary latent class model Mn,r . In this paper we focus primarily on models with two latent classes, r = 2, and write Mn := Mn,2 and φn := φn,2 . Binary tensors of rank+ ≤ 2 were studied in [2], where the following theorem gives a description of Mn as a semi-algebraic set. Theorem 2. [2, cf. Theorem 1.1] A binary tensor P = (pi1 i2 ···in ) has nonnegative rank at most two if and only if P has flattening rank at most two and P is supermodular. A matrix flattening of the binary tensor P is a 2|Γ| × 2n−|Γ| matrix where Γ ⊂ {1, . . . , n} with 1 ≤ |Γ| ≤ n − 1. The flattening rank is the maximal rank of any of these matrices. This rank condition provides the equations for the semi-algebraic description since the rank of a matrix is at most two if and only if all 3−minors of that matrix vanish. Now, we briefly also explain the supermodularity. Let π = (π1 , . . . , πn ) be an n-tuple of permutations πj ∈ S2 . We say P is π−supermodular if (2) pi1 i2 ···in pj1 j2 ···jn ≤ pk1 k2 ···kn pℓ1 ℓ2 ···ℓn holds when {is , js } = {ks , ℓs } and πs (ks ) ≤ πs (ℓs ) for s = 1, . . . , n. The tensor P is supermodular if it is π−supermodular for some π. Corollary 3. The semi-algebraic description of P the binary latent class model is given by Theorem 2 together with the extra constraint that i1 ,...,in pi1 ···in = 1. We close this section with a result that will simplify some of our arguments regarding the boundary stratification of Mn . Lemma 4. Let Mn,r be the latent class model for the random vector X = (X1 , . . . , Xn ), and let B ⊂ {1, . . . , n} with |B| = m. Then the induced marginal model for XB = (Xi : i ∈ B) is Mm,r . In particular, if P is a tensor in Mn,r given by parameters (λ1 , . . . , λr , A(1) , . . . , A(n) ), then the corresponding marginal distribution PB is given by parameters λ1 , . . . , λr , and A(i) for i ∈ B. Proof. The marginal distribution PB is obtained from P = (pj1 ...jn ) by summing over all indices jk with k ∈ / B. When we compute the sum using the parameterization (1) the result (k) (k)  follows because ai1 + ai2 = 1 for all i = 1, . . . , r. 4 3. Boundary Stratification of Mn The semi-algebraic description of Mn can be further used to understand the topological boundary of this set. We begin our analysis with the following proposition. Proposition 5. The dimension of the model Mn is 2n + 1. The boundary of this semialgebraic set is defined by 2n irreducible components. Each component is the image of the set (i) in the domain of φn given by a1j = 0 for i = 1, . . . , n and j = 1, 2. Proof. The dimension of Mn can be easily computed by counting independent parameters in the domain of φn . The statement about the boundary is Theorem 1.2 in [2], and the statement about each component is found in the proof of the same result.  (i) Observe that these components are also defined by a2j = 0, but one can interchange the first and second rows of the matrices A(i) and get the same points on the boundary. Each such component is the collection of tensors where one slice has rank one. Here by a slice of a tensor P = (pi1 ···in ) we mean a subtensor obtained by fixing one index ik . We note that for general tensors with nonnegative rank bigger than two, the boundary of the corresponding model M is not well understood. For instance, points on the boundary of the parameter space defined by setting one parameter equal to zero no longer map to the boundary of the model M; see Section 6.1 as well as Example 5.2 in [2]. A recent development is [27] where the boundary of M3,3 has been described. In this paper, we consider also lower dimensional pieces of the boundary of Mn . Our motivation is to perform maximum likelihood estimation over such models efficiently. Proposition 5 implies that various intersections of the 2n irreducible codimension one components define lower dimensional boundary pieces. We call a set of boundary points of dimension k obtained as such an intersection a k-dimensional stratum. We will identify and describe the boundary strata that are relevant for maximum likelihood estimation. The relevant boundary strata are those which are not degenerate. Definition 1. The degenerate part of ∆2n −1 is the set of tensors P = (pi1 ···in ) where for fixed 1 ≤ j < k ≤ n and a choice ij = s and ik = t with s, t ∈ {1, 2} the entries pi1 ···s···t···in = 0 for all iu , u 6= j, k. Another way of detecting that a binary tensor P is degenerate is to look at the marginal table P{j,k} . If any of the entries of this 2 × 2 table is zero for any j, k, then P is degenerate. For instance, if     p11 p12 α 0 P{j,k} = = p21 p22 β γ with α, β, γ > 0, then knowing that Xj = 1 implies that Xk = 1. By restricting to nondegenerate tensors, we will avoid this kind of probabilistically degenerate situations. We note that our main theorem could be formulated only for the interior of the probability simplex. From the mathematical point of view, extending it to some parts of the boundary seems like an incremental gain. As we will see later, from the statistical point of view, the gain is quite dramatic because it allows us to understand the maximum likelihood estimation even when the data tables contain zeros (as long as two-way marginal tables have no zeros). This will be especially important to validate our simulations in Section 4, when the sample sizes are relatively small. 5 3.1. Singular locus of the parametrization map. To state and prove our main result, we need an understanding of the singular locus of the parameterization map φn . Recall that a point of the domain Θ is a singular point of φn if the Jacobian of the map drops rank at this point. To describe this set, we look at various (overlapping) subsets of the parameter space. Specifically, let Θλ1 λ2 ⊆ Θ be the subset defined by λ1 λ2 = 0; Θij ⊆ Θ be the subset where rank(A(k) ) = 1 for all k 6= i, j with 1 ≤ i 6= j ≤ n; and Θj ⊆ Θ be the subset where rank(A(k) ) = 1 for all k 6= j. Finally, we denote by Θ1 the subset of Θ where rank(A(k) ) = 1 for all k. It is clear that Θij = Θji and Θ1 ⊂ Θk ⊂ Θjk for all 1 ≤ j 6= k ≤ n. Remark : For those familiar with tensor decompositions, these subsets of parameters have simple descriptions in terms of the ranks of the matrices A(i) . Suppose that θ = (λ, A(1) , . . . , A(n) ), then the m-rank of θ is the n-tuple (rank(A(1) ), . . . , rank(A(n) )). In this setting, we see that, for example, Θ12 corresponds to parameters with m-rank (r1 , r2 , 1, 1, . . . , 1) with r1 , r2 ≤ 2. The subset Θ1 corresponds to parameters with m-rank (r1 , 1, 1, . . . , 1), and Θ1 to those parameters with m-rank (1, 1, . . . , 1). Indeed, this perspective makes it quite easy to determine the singular locus of φn . S Proposition 6. The singular locus of the parametrization map φn is equal to Θλ1 λ2 ∪ 1≤i6=j≤n Θij . Proof. It is clear that the image of Θλ1 λ2 and Θ1 map under φn to distributions in Mn of nonnegative rank 1, and thus that the Jacobian drops rank at these points. A simple computation shows that φn maps points in Θk to tensors of rank+ = 1, and the Jacobian is rank deficient at these parameter points too. Consider now those parameters θ with (up to permutation) m-rank (2, 2, 1, . . . , 1) and, without loss of generality, θ ∈ / Θλ1 ,λ2 . Let Pθ = φn (θ). We quickly show that Pθ has nonnegative rank 2, and that θ is a singular point of the parameterization. Since A(3) , . . . , A(n) are singular matrices, let v be the tensor product of their top rows. Stated in more statistical language, v is the (vectorized) joint distribution of the independent binary variables X3 , . . . , Xn . Using A(1) , A(2) for the matrix parameters of rank 2, then the joint distribution Pθ is Pθ = (A(1) )T diag([λ1 , λ2 ]) A(2) ⊗ v. Since (A(1) )T diag([λ1 , λ2 ]) A(2) is a rank 2 matrix, Pθ is a rank 2 tensor. However, the fiber of Pθ is positive dimensional. This follows because the matrix factorization (A(1) )T diag([λ1 , λ2 ]) A(2) above is not unique. If Σ is taken to be any matrix sufficiently close to the identity andwith  column sums equal 1 (1) T (1) −1 (2) to 1, then à = Σ A is Markov, λ̃ = Σ diag([λ1 , λ2 ])A has positive entries, 1 Ã(2) = diag(λ̃)−1 Σ−1 diag([λ1 , λ2 ])A(2) is Markov, and φn (λ̃, Ã(1) , Ã(2) , A(3) , . . . A(n) ) also equals Pθ . It follows that θ is a singular point of the parameterization φn . Finally, consider parameters θ of m-rank (2, 2, 2, r4 , . . . , rn ) up to permutation, θ ∈ / Θλ1 λ2 . Then by Kruskal’s Theorem [19, 20] together with techniques developed in [1] for proving parameter identifiability, θ is identifiable and the fiber of Pθ is of size 2. This means that θ is not a singular point of φn .  This result is not new, cf. [25, Corollary 7.17]. It could be also inferred from Theorem 13 and Theorem 14 in [14]. The proof above is based on ideas from [1] and [7]. Next, we state and prove two lemmas which we will use in the proof of Theorem 9 repeatedly. Lemma 7. φn (Θij ) is an (n + 1)-dimensional subset of ∆2n −1 isomorphic to ∆3 × (∆1 )n−2 . 6 Proof. A 2 × 2 stochastic matrix has rank one if and only if both of its rows are equal. Therefore, points in the image of Θij are of the form Y (l) (i) (j) (i) (j) pk1 ···kn = (λ1 a1ki a1kj + λ2 a2ki a2kj ) a1kl . l6=i,j It is then clear that φn (Θij ) is a subset of ∆2n −1 isomorphic to ∆3 × (∆1 )n−2 . The equality follows from a well-known fact that M2 = ∆3 , see, e.g., [15, Corollary 2.2].  (k) Lemma 8. The parametrization φn maps Θij ∩ {ast = 0} for k 6= i, j and s, t ∈ {1, 2} to the degenerate part of the boundary of ∆2n −1 . (k) (k) Proof. Consider the case a11 = 0. Then a12 = 1, and since A(k) has rank one we conclude (k) (k) that a21 = 0 and a22 = 1. This means that the first slice of the image tensor along dimension (k)  k is identically zero. Similar reasoning applies for all ast = 0. Below we consider the intersection of various subsets of the boundary of Θ with pieces of the singular locus. Motivated by the last lemma, we will denote Θij ∩ int(Θ) by Θ◦ij . We also let Θ◦k = Θk ∩ int(Θ). 3.2. Main Theorem. Now we are ready to state our main theorem. Theorem 9. For n ≤ k ≤ 2n + 1, the k-dimensional strata of the nondegenerate part of Mn are in bijection with the k − (n + 1)-dimensional faces of the cube Cn , except for k = 2n − 1 n when n additional strata are present, and for k = n+1 when 2 additional strata are present. More precisely, (1) the interior of Mn has dimension 2n + 1 and each point is the image under φn of a nonsingular point in the interior of Θ, (2) except for k = 2n − 1 and k = n + 1, each k-dimensional stratum with k > n is the image of points in     [ \ (i) \ (i)   {a = 0} {a = 0} 1si 2si si :i∈I si :i∈I where |I| = 2n + 1 − k; for k = 2n − 1, a stratum corresponding to a codimension two face of Cn is the image of points in [ (i) [ (i) (j) (j) {a1s = 0} ∩ {a1t = 0} {a2s = 0} ∩ {a2t = 0} Θ◦ij , for 1 ≤ i < j ≤ n and s, t = 1, 2, (3) for k = 2n − 1, there are n additional (2n − 1)-dimensional strata; each such stratum is the image of points in [ (i) (i) (i) (i) {a11 = 0} ∩ {a22 = 0} {a12 = 0} ∩ {a21 = 0}, for i = 1, . . . , n,  (4) for k = n + 1, there are n2 additional (n + 1)-dimensional strata; each such stratum is the image of points in Θ◦ij for 1 ≤ i < j ≤ n, (5) there is a single n-dimensional stratum corresponding to the empty face of Cn given by the image of points in Θλ1 λ2 . 7 Corollary 10. Let n ≤ k ≤ 2n + 1 with k = 2n + 1 − ℓ. Then the number of nondegenerate k-dimensional strata of Mn is    n ℓ    2 ℓ 6= 2, n, n + 1   ℓ         n 4+n ℓ=2 2      n  n  2 + ℓ=n   2     1 ℓ = n+1 We turn to the proof of Theorem 9 at the end of this section. First a few comments are in order. In general, the set of probability distributions contained in a single stratum does not allow a clean and simple interpretation. Though, in a few cases we do observe nice patterns. Here we will describe them. (a) Codimension one strata. The 2n codimension one strata have a simple recursive descrip(1) (1) tion. For example, if a11 = 0 then a12 = 1, and the slice (p1j2 ···jn ) of the tensor P is a binary tensor of rank one. This corresponds to the context specific independence model where X2 , . . . , Xn are independent conditionally on {X1 = 1}. It is described in the probability simplex ∆2n−1 −1 by the binomial equations (3) p1i2 ···in p1j2 ···jn − p1k2 ···kn p1l2 ···ln = 0 for {is , js } = {ks , ls } and s = 2, . . . , n. The other slice (p2j2 ···jn ), after normalization, is a tensor from the model Mn−1 . Hence, knowing the description of Mn−1 will help describe the codimension one strata of Mn . (b) The exceptional codimension two strata (type (3)). If A(1) is the identity matrix, then the parameterization in (1) specializes to (2) (n) (2) p1j2 ···jn = λ1 a1j2 · · · a1jn , (n) p2j2 ···jn = λ2 a2j2 · · · a2jn . Since A(2) , . . . , A(n) are arbitrary stochastic matrices, this strata of type (3) corresponds to the conditional independence model, where X2 , . . . , Xn are independent conditionally on X1 . This is a graphical model given by the graph in Figure 2. This model is fully described in the probability simplex ∆2n −1 by the binomial equations pii2 ···in pij2 ···jn − pik2 ···kn pil2 ···ln = 0 for i = 1, 2, {is , js } = {ks , ls } and s = 2, . . . , n with no additional inequalities. The analysis is analogous for the n − 1 remaining strata given by one of A(2) , . . . , A(n) being the identity matrix. (c) The n dimensional stratum (type(5)). This unique stratum is given by all rank one tensors in ∆2n −1 . This stratum is defined by the equations pi1 i2 ···in pj1 j2 ···jn − pk1 k2 ···kn pl1 l2 ···ln = 0 if {is , js } = {ks , ls } for s = 1, . . . , n. The strata of Mn form a partially ordered set where for two strata S, S ′ we have S  S ′ if the closure of S is contained in the closure of S ′ . In particular, the interior of Mn is the unique maximal element, and the unique strata of type (5) is the unique minimal element. 8 2 1 3 5 4 (1) (1) Figure 2. The graph representing the strata given by a12 = a21 = 0. For example for M3 there are six dimension 6 strata, which we label by {1, 2, 3, 4, 5, 6} corresponding to equations (1) p111 p122 = p112 p121 (2) p211 p222 = p212 p221 (3) p111 p212 = p112 p211 (4) p121 p222 = p122 p221 (5) p111 p221 = p121 p211 (6) p112 p222 = p122 p212 respectively. These six equations are naturally grouped in pairs as indicated by the three rows above. Each of these three pairs defines one of the three special strata of type (3). In general, each special stratum of this kind is obtained as the intersection of codimension one strata which correspond to “opposite” facets of Cn . For M3 , each special stratum of type (4) is defined by four equations found in two rows of the six equations above. If one ignores these special strata, the poset is isomorphic to the face poset of the cube Cn . The Hasse diagram of the poset for M3 is given in Figure 3. ∅ 1 12 1234 13 14 135 15 136 2 16 145 23 3 24 146 4 34 1256 5 25 235 26 6 35 236 36 245 45 46 246 56 3456 123456 Figure 3. The boundary stratification poset of M3 . The red and blue nodes correspond to strata of type (3) and of type (4), respectively. Now we turn to the proof of Theorem 9. The result will follow from a sequence of lemmas. By Proposition 5 there are exactly 2n strata of codimension one. Each consists of tensors where in one slice along a given dimension the subtensor has rank at most one. In other 9 words, each strata is described by a collection of equations of the form (3) together with the inequalities forcing supermodularity. We will denote these strata by Γis where i = 1, . . . , n and s = 1, 2. We first formulate a lemma that shows that boundary points are mapped to boundary points under the marginalization P 7→ PB (c.f. Lemma 4). Lemma 11. Suppose that n ≥ 4 and let B ⊂ {1, . . . , n} with |B| = m ≥ 3. For i ∈ B, if a point P in Mn lies on Γis , then PB lies in the corresponding stratum Γis of the marginal model Mm . Proof. If P is the image of (λ1 , λ2 , A(k) : k = 1, . . . , n), by Lemma 4, PB is the image of (λ1 , λ2 , A(k) : k ∈ B). Hence if the slice s in dimension i of P has rank one, so will the slice s in dimension i of PB .  Proposition 12. The preimage of the codimension one stratum Γis under φn is [ [ (i) (i) ∪k6=i Θ◦ik . φ−1 Θλ1 λ2 n (Γis ) = {a1s = 0} ∪ {a2s = 0} Proof. We first show that (i) (i) {a1s = 0} ∪ {a2s = 0} (i) (i) [ Θλ1 λ2 [ ∪k6=i Θ◦ik ⊂ φ−1 n (Γis ). Clearly {a1s = 0} ∪ {a2s = 0} ∪ Θλ1 λ2 lies in the preimage. To show that the preimage contains also Θ◦ik for each k 6= i, note that the image of a point in Θ◦ik is given by Y (r) (i) (k) (i) (k) a1jr . pj1 ···ji ···jk ···jn = (λ1 a1ji a1jk + λ2 a2ji a2jk ) r6=i,k The points on Γis must satisfy pi1 ···s···in pj1 ···s···jn = pν1 ···s···νn pµ1 ···s···µn for {it , jt } = {νt , µt } where 1 ≤ t 6= i ≤ n. The above point satisfies such equations since (i) (k) (i) (k) (i) (k) (i) (k) (λ1 a1s a1ik + λ2 a2s a2ik )(λ1 a1s a1jk + λ2 a2s a2jk ) = (i) (k) (i) (k) (i) (k) (i) (k) (λ1 a1s a1νk + λ2 a2s a2νk )(λ1 a1s a1µk + λ2 a2s a2µk ). Next we show that no other points lie in the preimage. To this end, from now on suppose S (i) (i) that a1s 6= 0, a2s 6= 0, λ1 · λ2 6= 0 and the parameters are not in k6=i Θ◦ik . Hence we can assume that P ∈ Γis is given by a parameter vector such that for some j, k 6= i the matrices A(j) , A(k) have rank 2. Consider the marginal distribution over {i, j, k} and denote its coordinates by qui uj uk , ui , uj , uk ∈ {1, 2}. By Lemma 11, it is a point in M3 parameterized by (λ1 , λ2 , A(i) , A(j) , A(k) ), and it satisfies qs11 qs22 = qs12 qs21 . A quick computation shows that this is equivalent to (4) (i) (i) λ1 λ2 a1s a2s det(A(j) ) det(A(k) ) = 0. However, by our assumption, this is impossible.  Our strategy to prove Theorem 9 is to intersect preimages of codimension one strata Γis . Proposition 12 implies that we will have to consider intersections of subsets of the boundary of the parameter space Θ and intersections of various subsets of the singular locus of φn in the interior of Θ. When doing this, we would like to disregard two types of intersections. The first type consists of subsets of the parameter space whose points map to the degenerate part of ∆2n −1 . Since we will compute nondegenerate intersections of Γis , these kinds of subsets 10 are irrelevant. The second type consists of subsets of the parameter space whose points map to tensors of rank one. The next proposition justifies the irrelevance of these subsets. Proposition 13. The intersection of all Γis for i = 1, . . . , n and s = 1, 2 contains all tensors of rank one. Proof. Every tensor in ∆2n −1 of rank one is the image of a parameter vector in Θ where λ1 = 0. Such a parameter vector is in Θλ1 λ2 . By Proposition 12, the image of Θλ1 λ2 under the parametrization map is contained in every Γis .  In Corollary 22 we will prove that intersection of all nondegenerate Γis for i = 1, . . . , n and s = 1, 2 is equal to the set of tensors of rank one. This intersection will give us the unique n-dimensional stratum (type (5)). Hence, when we are intersecting preimages of Γis we will ignore this second type of subsets since they are in every possible intersection. In summary, when we refer to intersections of φ−1 n (Γis ) we will consider only the relevant part, meaning only those points that are not the two types of irrelevant points. For the rest of the paper, whenever we refer to a subset of Θ being relevant, we will be removing those parameter vectors that map to the degenerate part of the boundary of ∆2n −1 as well as those which map to rank-one tensors. Notice that the relevant part of the singular set, say, Θ◦12 consists of parameter vectors with m-rank (2, 2, 1, 1, . . . , 1). However, to not make the notation further complicated, we will refer to the relevant part of these singular sets by Θ◦ij as well. For instance, by Proposition S (i) (i) ◦ 12 the relevant part of φ−1 n (Γis ) consists of {a1s = 0} ∪ {a2s = 0} ∪ k6=i Θik . −1 Lemma 14. The relevant part of φ−1 n (Γis ) ∩ φn (Γjt ) where i 6= j is [ (i) [ (i) (j) (j) {a1s = 0} ∩ {a1t = 0} {a2s = 0} ∩ {a2t = 0} Θ◦ij . (i) (j) Proof. The points in the set {a1s = 0} ∩ {a2t = 0} map to degenerate tensors since in the marginalization of the image tensor P{i,j} (Xi = s, Xj = t) = 0. A similar argument shows (i) (j) that {a2s = 0} ∩ {a1t = 0} is irrelevant. So we just need to compute the intersection of ∪k6=i Θ◦ik and ∪k̄6=j Θ◦j k̄ . When k = j and k̄ = i, we get Θ◦ij . Also, Θ◦ij ∩ Θj k̄ = Θ◦j when k̄ 6= i, and Θ◦ik ∩ Θji = Θ◦i when k 6= j. Both are irrelevant. For the case k 6= j and k̄ 6= i, we either  get Θ1 if k 6= k̄, or Θ◦k if k = k̄. Again both cases give irrelevant subsets. Corollary 15. The nondegenerate intersection of Γis with Γjt where i 6= j is a stratum of n dimension 2n − 1. There are 2 4 such strata. S (i) (j) Proof. The parametrization map φn is generically smooth on u=1,2 {aus = 0} ∩ {aut = 0}, and a simple parameter count shows that this set has dimension equal to 2n − 1. Together with Lemma 7 this implies the result. For each 1 ≤ i < j ≤ n and each choice of s, t ∈ {1, 2}  we get such a stratum. Hence, there are n2 4 of them.  −1 Lemma 16. The relevant part of φ−1 n (Γi1 ) ∩ φn (Γi2 ) is [ (i) [ (i) (i) (i) {a11 = 0} ∩ {a22 = 0} {a12 = 0} ∩ {a21 = 0} ∪k6=i Θ◦ik . (i) (i) (i) (i) Proof. The intersections {a11 = 0} ∩ {a12 = 0} and {a21 = 0} ∩ {a22 = 0} are empty in the parameter space Θ.  Corollary 17. The nondegenerate intersection Γi1 ∩ Γi2 is a stratum of dimension 2n − 1. There are n such exceptional strata. 11 (i) (i) Proof. The parametrization map φn is generically smooth on {a11 = 0} ∩ {a22 = 0}, and on (i) (i) {a12 = 0} ∩ {a21 = 0}, and the dimension of this set is 2n − 1. Together with Lemma 7 this gives the first statement. The count is obvious.  −1 −1 Lemma 18. The relevant part of φ−1 n (Γis ) ∩ φn (Γjt ) ∩ φn (Γkv ) where i, j, k are distinct is [ (j) (i) {aus = 0} ∩ {aut = 0} ∩ {a(k) uv = 0}. u=1,2 Proof. We proceed as in the proof Lemma 14. After discarding irrelevant subsets such as (i) (j) (k) {a1s = 0} ∩ {a1t = 0} ∩ {a2v = 0} (since they map to degenerate tensors) we also see that  the desired intersection contains Θ◦ij ∩ Θ◦ik ∩ Θ◦jk = Θ1 . This is also irrelevant. Corollary 19. Let I ⊂ {1, . . . , n} where T |I| = ℓ ≥ 3. Then for each choice of si ∈ {1, 2} for i ∈ I the nondegenerate intersection i∈I Γisi is a stratum of dimension 2n + 1 − ℓ. There are nℓ 2ℓ such strata. T Proof. Lemma 18 implies that the relevant part of i∈I φ−1 n (Γisi ) is   [ \   {a(i) usi = 0} . u=1,2 si :i∈I Each piece of this union T has dimension 2n + 1 − ℓ, and since φn is generically smooth on these sets the intersection i∈I Γisi is a stratum of the same dimension. One more time it is easy to count such strata.  −1 −1 ◦ Lemma 20. The relevant part of φ−1 n (Γi1 ) ∩ φn (Γi2 ) ∩ φn (Γj1 ) is Θij . Moreover, this is −1 −1 −1 equal to the relevant part of φ−1 n (Γi1 ) ∩ φn (Γi2 ) ∩ φn (Γj1 ) ∩ φn (Γj2 ). −1 Proof. We have computed φ−1 n (Γi1 ) ∩ φn (Γi2 ) in Lemma 16. Together with Proposition 12 we conclude that we need to describe the intersection of [ (i) [ (i) (i) (i) {a11 = 0} ∩ {a22 = 0} {a12 = 0} ∩ {a21 = 0} ∪k6=i Θ◦ik with (j) (j) {a11 = 0} ∪ {a21 = 0} [ ∪k6=j Θ◦jk . (i) (i) (j) Up to symmetry, we get the following intersections: (i) {a12 = 0, a21 = 0, a11 = 0}, (ii) Θ◦ij . It is therefore enough to show that the first set is irrelevant. Let P be a tensor that is in the image of a point in the set (i). Then in the marginal distribution P{i,j} we have P{i,j} (Xi = 1, Xj = 1) = 0. Hence P is degenerate. Finally, when we intersect further with S (j) (j) ◦ φ−1 n (Γj2 ) = {a12 = 0} ∪ {a22 = 0} ∪ k6=j Θjk , still the only thing that survives as relevant ◦ is Θij .  Corollary 21. For i 6= j, the nondegenerate intersection of Γi1 ∩ Γi2 ∩ Γj1 ∩ Γj2 is a stratum n of dimension n + 1. There are 2 such strata. Proof. The nondegenerate intersection given in the statement is the image of Θ◦ij by Lemma 20. This intersection is not contained in any other Γk1 or Γk2 for k 6= i, j since by Proposition 12 everything in Θ◦ij ∩φ−1 n (Γk1 ) maps to tensors of rank one. Hence, indeed Γi1 ∩Γi2 ∩Γj1 ∩Γj2 defines a stratum. Lemma 7 implies that the dimension of this stratum is n + 1. Clearly,  there are n2 such strata.  12 Corollary 22. The intersection of all nondegenerate Γis for i = 1, . . . , n and s = 1, 2 is the unique stratum of dimension n consisting of all tensors of rank one. Proof. Proposition 13 says that T the intersection contains the set of tensors of rank one. Corollary 21 implies that already s=1,2 (Γis ∩ Γjs ∩ Γks ) is contained in the set of tensors of rank one. This shows that indeed the intersection of all codimension one strata is a stratum. The dimension of the set of all tensors of rank one is n.  Finally we are in a position to prove our main theorem. Proof of Theorem 9: Proposition 5 implies that the interior of Mn has dimension 2n + 1. The (i) (i) above results imply that any parameter vector with a1s = 0 or a2s = 0 for s = 1, 2 maps to ◦ the boundary of Mn . Similarly, any parameter vector in Θij for 1 ≤ i 6= j ≤ n as well as a parameter vector in Θλ1 λ2 is mapped to the boundary of Mn . The remaining parameter vectors must map to the interior of Mn , and these points are nonsingular parameter vectors that are in the interior of Θ. We will associate the interior of Mn with the interior of the n-dimensional cube Cn . Proposition 5 also implies that Γis for i = 1, . . . , n and s = 1, 2 are precisely 2n boundary strata of dimension 2n. They are in bijection with the 2n facets of Cn . By Proposition 12, S S (i) (i) the preimage of each Γis is {a1s = 0} ∪ {a2s = 0} Θλ1 λ2 ∪k6=i Θ◦ik . An argument that can be found in the proof of Lemma 4.5 in [2] shows that points in Γis can be obtained as images (i) (i) of points in {a1s = 0} ∪ {a2s = 0} only. Lemma 14 proves that Γis ∩ Γjt for i 6= j is the S (i) S ◦ (i) (j) (j) image of points in {a1s = 0} ∩ {a1t = 0} {a2s = 0} ∩ {a2t = 0} Θij . By Corollary 15 this is the non-exceptional strata of dimension k = 2n − 1 and they correspond to n − 2 dimensional faces of Cn which are obtained as intersections of nonparallel facets of the cube (i.e. i 6= j). Lemma 18 and Corollary 19 take care of the non-exceptional strata of dimension T  S (i) n < k < 2n − 1 as the image of u=1,2 si :i∈I {ausi = 0} . This image is the intersection of T i∈I Γisi where |I| = 2n + 1 − k. They correspond to faces of Cn of dimension k − n − 1. This gives us all nondegenerate strata accounted by (1) and (2) in the statement of the theorem. The exceptional strata of codimension two (k = 2n − 1) in (3) is dealt with in Lemma 16 and Corollary 17 together with the proof of Lemma 4.5 in [2]. The statement about the exceptional strata of dimension k = n + 1 in (4) follows from Lemma 20 and Corollary 21. And finally, the proof of Lemma 20 and Corollary 22 provide the description of the unique n-dimensional stratum in (5).  In the next section we present how our understanding of the boundary of Mn provides a partial understanding of the maximum likelihood estimation over this model class. In the special case of M3 we were able to solve this problem exactly. 4. Maximum likelihood estimation over Mn Suppose an independent sample of size N > 1 was observed from a binary distribution. We report the data in a tensor of counts U = (ui1 ···in ) where ui1 ···in is the number of times the event {X1 = i1 , . . . , Xn = in } was observed. The sum of all elements in U is equal to N . The log-likelihood function ℓ : Θ −→ R is (5) ℓ(θ) = 2 X ui1 ···in log(pi1 ···in (θ)), i1 ,...,in =1 13 where pi1 ···in (θ) is as in (1). In this section we are interested in maximizing the log-likelihood function over Mn to compute a maximum likelihood estimate (MLE) for the data U . We remark that ℓ(θ) is a strictly concave function on the entire ∆2n −1 , and if its unique maximizer over the entire probability simplex is not in Mn , then its maximizer over Mn , i.e. the MLE, must be on the boundary of Mn . In our analysis of the boundary strata we restricted ourselves to the nondegenerate part of ∆2n −1 . The lemma below ensures that by looking at the data U we can detect when the MLE is going to lie in this nondegenerate part, and so, when we can apply Theorem 9. It implies that if the sample proportions tensor Q = N1 U lies outside the degenerate part of ∆2n −1 , then the MLE P̂ over Mn will also be nondegenerate. Lemma 23. Let M be a model in ∆k−1 for some k ≥ 1 and let Q = N1 U be the sample proportions for data U . Then if the MLE P̂ for U exists, the support of Q is contained in the support of P̂ . Proof. The MLE is the constrained maximizer over M of the log-likelihood k X i=1 X ui log Pi = ui log Pi . i∈supp(Q) It is equal to −∞ at all points P with Pi = 0 for some i ∈ supp(Q).  4.1. General results. In order to solve the optimization problem for the log-likelihood (5), one can compute all critical points of ℓ(θ) over the interior and all boundary strata of Mn . For many parametrized statistical models the equations defining these critical points are just rational functions in the parameter vector θ. This is the case for the latent class models that we study in this paper. We will call the number of complex critical points of ℓ(θ) over a model for generic data U the maximum likelihood degree (ML-degree) of that model. The ML-degree for general algebraic statistical models were introduced in [6] and [18]. In particular, it was shown that the ML-degree of such a model is a stable number. We will use the ML-degrees of the boundary strata of Mn as an indication for the complexity of solving the maximum likelihood estimation problem. For instance, if the ML-degree is ≤ 4, then one can express the MLE with closed form formulas as a function of U . In particular, if the ML-degree is equal to one, then the MLE can be expressed as a rational function of U . In order to solve the constrained optimization problem of maximizing the likelihood function, one can employ the following simple scheme: (a) For each stratum S of Mn list the critical points of the log-likelihood function constrained to its closure S. (b) Pick the best point from the list of those critical points that lie in Mn . Our first observation for this procedure is that we never need to check all the strata to find the global maximum. For this consider the poset of the boundary stratification as described in the previous section. In our search for the global maximum we will start from the maximal element of the poset and move recursively down. If a global maximum over the closure S lies in the stratum S, there is no need to optimize over any stratum S ′  S. As we will see below, indeed for many strata the MLE is guaranteed to lie in Mn . Our second observation is that maximizing the log-likelihood over most of the strata is challenging. The defining constraints correspond to complicated context specific independence constraints [5], and there is yet no general theory on how to optimize over these models 14 exactly. However, there are several exceptions. They are the strata we considered in Section 3. Before we go through them we introduce notation that will be used below: For the (r,s) data tensor U = (ui1 ···in ) denote by U (r,s) = (uij ) the matrix whose (i, j)-th entry is the (r) count of the event {Xr = i, Xs = j} and by U (r) = (ui ) the vector whose entries are the counts of the event {Xr = i}. (a) Codimension one strata. Each tensor on one of these 2n strata corresponds to a context specific independence model, such as where X2 , . . . , Xn are independent conditionally on {X1 = 1}. The ML-degree of the corresponding conditional model is one; hence, the MLE is expressed as a rational function of the data: (12) (13) p̂1j2 ···ji ···jn = (1n) u1j2 u1j3 · · · u1jn (1) n−2 . N u1 After normalization, the other slice is a tensor from the model Mn−1 . Therefore p̂2j2 ···ji ···jn can be computed by employing any procedure that can be used for Mn−1 . For instance, in the next section we will get a closed form formula for the maximizer on each boundary stratum of M3 . Hence, in the case of M4 all codimension one strata will also have closed form formulas. (b) The exceptional codimension two strata (type (3)). As we noted in Section 3, these strata correspond to simple graphical models over graphs like in Figure 2. The ML-degree of this model is one; hence, the MLE is expressed as a rational function of the data (also see [22, Section 4.4.2]): (12) (13) p̂j1 j2 ···ji ···jn = (1n) uj1 j2 uj1 j3 · · · uj1 jn (1) n−2 . N uj1 This point is always guaranteed to lie in Mn and so we never have to check strata that lie n below that in the Hasse diagram defined in the previous section. These are the 2 strata of type (4) and the type (5) stratum. Nevertheless, optimizing over these special strata is simple so we describe it next. (c) The n + 1 dimensional strata of type(4). These strata correspond to graphical models with one edge and n − 2 disconnected nodes. The ML-degree of this model is one. For example, if 1 and 2 are connected by an edge and all other nodes are disconnected, the MLE is p̂j1 j2 j3 ···jn = 1 (12) (3) (n) u u · · · uj n . N n−1 j1 j2 j3 (d) The n dimensional stratum of type(5). This stratum corresponds to the full-independence model and has ML-degree one. The MLE over this stratum is simply p̂j1j2 ···ji ···jn = 1 (1) (2) (n) u u · · · uj n . N n j1 j2 There is one exceptional case, n = 3, when all strata are defined by binomial equations, in which case the closure of each strata corresponds to a log-linear model. The MLE is therefore uniquely given and can be easily computed. We discuss this in more detail in the following subsection. 15 4.2. Maximum Likelihood Estimation for M3 . The binary latent class model for three observed variables in the probability simplex ∆7 is parametrized by pijk = λ1 a1i b1j c1k + λ2 a2i b2j c2k where       a11 a12 b11 b12 c11 c12 A= B= C= , a21 a22 b21 b22 c21 c22 are stochastic matrices. We will depict the resulting tensor P as     a11 b11 c11 a11 b11 c12 a12 b11 c11 a12 b11 c12 a21 b21 c21 a21 b21 c22 a22 b21 c21 a22 b21 c22 λ1 +λ2 a11 b12 c11 a11 b12 c12 a12 b12 c11 a12 b12 c12 a21 b22 c21 a21 b22 c22 a22 b22 c21 a22 b22 c22 M3 has dimension 7 and it has the following stratification, c.f. Figure 3. P 1. The interior of M3 has dimension 7. Its Zariski closure is the linear space {p : pijk = 1}. Its ML-degree is one and the MLE is computed by uijk i, j, k = 1, 2 p̂ijk = u+++ 2. There are six 6-dimensional strata. Each is obtained as the image of those matrices where one entry in the first row of A, B, or C is set to 0, such as a11 = 0. The resulting tensor is of the form     0 0 b11 c11 b11 c12 a21 b21 c21 a21 b21 c22 a22 b21 c21 a22 b21 c22 λ1 + λ2 0 0 b12 c11 b12 c12 a21 b22 c21 a21 b22 c22 a22 b22 c21 a22 b22 c22 Hence its first slice is a rank one matrix whereas its second slice is generically P a rank two matrix. The Zariski closure is defined by p111 p122 − p112 p121 (together with pijk − 1) and forms a log-linear model. From the statistical point of view this stratum corresponds to the context specific independence model, where X2 is independent of X3 given {X1 = 1}. Its ML-degree is one and the MLE is computed by u2jk u1j+ · u1+k , p̂2jk = j, k = 1, 2 p̂1jk = u1++ · u+++ u+++ There are two kinds of boundary strata of dimension 5. 3a. There are 12 of the first kind. Each is obtained as the image of two types of parameters. The first type comes from parameters where from two matrices one entry in the first row of each is zero. The canonical example is a11 = 0 and b11 = 0. The resulting tensor is of the form     a21 b21 c21 a21 b21 c22 a22 b21 c21 a22 b21 c22 0 0 0 0 + λ2 λ1 a21 b22 c21 a21 b22 c22 a22 b22 c21 a22 b22 c22 0 0 c11 c12 The second type comes from parameters where one of the matrices has rank one. The corresponding example for the above canonical example is when rank(C) = 1, in which case, c11 = c21 = c and c12 = c22 = c̄, since C is a stochastic matrix. The resulting tensor is of the form     a21 b21 c a21 b21 c̄ a22 b21 c a22 b21 c̄ a11 b11 c a11 b11 c̄ a12 b11 c a12 b11 c̄ + λ2 λ1 a11 b12 c a11 b12 c̄ a12 b12 c a12 b12 c̄ a21 b22 c a21 b22 c̄ a22 b22 c a22 b22 c̄ Two (overlapping) tensors are  slices of both  of these   rank one matrices, namely, the slices p111 p112 p111 p112 corresponding to and . The Zariski closure is defined by the p121 p122 p211 p212 16   p111 p121 p211 2-minors of , and it corresponds to two context specific independence p112 p122 p212 constraints. Its ML-degree is one and the MLE is computed by p̂ijk = uij+ · (u++k − u22k ) (u+++ − u221 − u222 ) · u+++ ijk 6= 221, 222 p̂22k = u22k u+++ k = 1, 2 3b. There are three of the second kind. Each is also obtained as the image of two types of parameters. The first type comes from parameters where one of the matrices A, B, C is the identity matrix. The canonical example is a12 = 0 and a21 = 0. The resulting tensor is of the form     0 0 b21 c21 b21 c22 b11 c11 b11 c12 0 0 + λ2 λ1 0 0 b22 c21 b22 c22 b12 c11 b12 c12 0 0 The second type comes from parameters where one of the matrices has rank one. The corresponding example for the above canonical example is when rank(C) = 1 or rank(B) = 1. In the case of rank(C) = 1 we obtain the tensor as the second tensor in 3a. Two parallel are each rank one matrices, namely, the slices corresponding to  slices of these  tensors  p111 p112 p211 p212 and . The Zariski closure is defined by p111 p122 − p112 p121 and p121 p122 p212 p222 p211 p222 − p212 p221 , and it corresponds to conditional independence of X2 and X3 given X1 . As indicated in the end of Section 3, the ML degree is one and the MLE is computed by p̂ijk = uij+ · ui+k ui++ · u+++ i, j, k = 1, 2 4a. There are 8 four-dimensional strata of type (2). They are defined by the image of matrices where one entry from the first row of each matrix is zero. The canonical example is a11 = b11 = c11 = 0. The resulting tensor is of the form     a21 b21 c21 a21 b21 c22 a22 b21 c21 a22 b21 c22 0 0 0 0 + λ2 λ1 a21 b22 c21 a21 b22 c22 a22 b22 c21 a22 b22 c22 0 0 0 1 The Zariski closure is also a log-linear  1  0   0 A=  1   0 0 model whose design matrix A can be chosen to be  1 0 0 0 0 −1 0 0 1 1 0 0 1 0   0 0 0 1 1 1 0   0 1 0 1 0 1 0   1 0 1 0 1 0 0  0 0 0 0 0 0 1 where the columns correspond to p111 , p112 , p121 , p122 , p211 , p212 , p221 , p222 . The defining equations are given by the ideal     p111 p121 p111 p121 p211 I2 + I2  p112 p122  p112 p122 p212 p211 p221 which is minimally generated by five quadrics. The ML-degree is two and the MLE is com222 . Then puted by choosing one of the two solutions obtained as follows. First p̂222 = uu+++ 17 let u111 + u112 − u221 u+++ u121 + u122 + u221 B= u+++ u211 + u212 + u221 C= u+++ u111 + u121 + u211 + u221 D= u+++ A= Then for each root p̂221 of Dp2221 − [(A + C)(A + B) + D(C + B)]p221 + BCD = 0 compute p̂212 p̂211 p̂122 p̂121 p̂111 p̂112   D CD = p̂221 + C − A+C A+C = −p̂212 − p̂221 + C   BD D p̂221 + B − = A+B A+B = −p̂122 − p̂221 + B = −p̂121 − p̂211 − p̂221 + D = −p̂111 + p̂221 + A Note that the computations should be done in the exact order given above. 4b. There are three four dimensional strata of type (4). They are obtained by letting one of the matrices A, B, C to have rank one. A canonical example is where a21 = a11 = a, a22 = a12 = ā. The resulting tensor is of the form     ab21 c21 ab21 c22 āb21 c21 āb21 c22 ab11 c11 ab11 c12 āb11 c11 āb11 c12 + λ2 λ1 ab12 c11 ab12 c12 āb12 c11 āb12 c12 ab22 c21 ab22 c22 āb22 c21 āb22 c22 As indicated in the end of Section 3, the ML degree is one and the MLE is computed by uij+ · u++k p̂ijk = u2+++ 5. There is one stratum of dimension three formed by rank one tensors, also known as the independence model on three binary random variables. This is a toric model and has ML degree one where the ML estimate is computed by ui++ · u+j+ · u++k p̂ijk = u3+++ 4.3. Simulations. The exact maximum likelihood estimation for M3 gives us a valuable insight into the geometry of the likelihood function for the latent class models. In this subsection we report on simulations that were designed to unearth this geometry. 18 (a) We say that a point P ∈ ∆7 lies in the attraction basin of a stratum S, if, given that the sample proportions tensor is P , the global maximum of the likelihood function lies in S. In our first simulation we approximate the relative volumes of the attraction basins of each stratum. Attraction basins for strata of type (4) and (5) are lower dimensional and so have volume zero. We run 106 iterations, each time sampling P uniformly from ∆7 and then sampling data of size N = 1000 from P . We use the resulting data tensor to find the MLE. Table 1 reports our findings. In 8.38% of cases, the MLE lies in the interior of M3 . Quite interestingly, the fifteen 5-dimensional strata attract almost 50% of the points. In particular, the three special strata of type (3) attract 17.29% of the points so each of them attracts approximately 6%. This is not far from how much the interior attracts, and virtually same as any of the codimension one strata. Because we are trying to estimate the attraction basin volumes, we omitted strata of type (4) and (5) in the table. However, despite the fact that for a given sample size (especially if small) there may be a positive probability of the MLE lying on this strata, this did not happen in simulations that led to Table 1. Table 1 Relative volume of MLE attraction basins of strata in M3 ; for data uniformly distributed over ∆7 . 1× 7-dim 6× 6-dim 12× 5a-dim 3× 5b-dim 8× 4a-dim 8.38 36.24 29.75 17.29 8.34 The fact that codimension two strata attract more points than the interior and the codimension one strata together may be a bit counterintuitive at first, but follows directly from the geometry of the model. The log-likelihood function is a strictly concave function over ∆7 with the unique maximum given by the sample proportions. Its level sets are convex and centered around the sample proportions Q = N1 U . On the other hand, M3 is highly concave, as illustrated by its 3-dimensional linear section in Figure 1 of [2]. It is then natural to expect that lower-dimensional strata have higher probability of containing the global maximum as long as the sample proportions lie outside of M3 . In the next simulation, we argue that this is not a desirable feature of the latent class model. (b) Suppose that the true data generating distribution lies in M3 and the corresponding parameters are λ1 = λ2 = 21 and   1−ǫ ǫ A=B=C= for ǫ ∈ (0, 0.5]. ǫ 1−ǫ If ǫ is small, all variables are closely correlated with the unobserved variable. On the other extreme, if ǫ = 0.5, all variables are independent of the unobserved variable. We generate N samples from the given distribution with a fixed ǫ and compute the MLE, repeating this 10,000 times. We start with N = 1000 which is a large number for such a small contingency table. In Table 2 we see that for ǫ close to 0.5 the probability of the MLE landing in the interior of M3 is small despite the fact that the data generating distribution lies in the model and that N is very large. This means that, even when the data generating distribution lies in the model, with high probability we can expect estimates with zeros. This obviously becomes more dramatic for smaller values of N = 100 and N = 50, see Table 3 and Table 4 respectively. In the last case, even for small values of ǫ, there is a high probability of hitting the boundary. 19 This shows that the latent class models must be used with caution, especially if correlations between variables are small and the sample size is relatively small. Finally, we note that in producing the last row of Table 4 we observed some MLEs on the 3-dimensional strata of rank one tensors. Because these MLEs are also MLEs over the strata 5b, we report them there. Table 2 Relative volume of MLE attraction basins of strata in M3 ; for the special generating distributions given by ǫ. Sample size N = 1000, number of iterations 10000. ǫ 1× 7-dim 6× 6-dim 12× 5a-dim 3× 5b-dim 8× 4a-dim 0.5 12.02 47.59 22.09 13.06 5.24 0.4 34.52 43.87 12.13 7.94 1.54 0.3 99.32 0.67 0.01 0.00 0.00 0.2 100 0 0 0 0 0.1 100 0 0 0 0 Table 3 Same as in Table 2 but with sample size N = 100. ǫ 1× 7-dim 6× 6-dim 12× 5a-dim 3× 5b-dim 8× 4a-dim 0.5 10.72 45.97 22.92 14.35 6.04 0.4 12.15 46.07 21.29 15.27 5.22 0.3 38.00 43.62 10.84 6.36 1.18 0.2 80.53 17.92 1.60 0.32 0.03 0.1 90.02 9.54 0.3 0.13 0.01 Table 4 Same as in Table 2 but with sample size N = 50. ǫ 1× 7-dim 6× 6-dim 12× 5a-dim 3× 5b-dim 8× 4a-dim 0.5 10.52 45.74 23.33 14.3 6.06 0.4 10.83 45.24 23.36 14.67 5.90 0.3 21.59 47.16 17.11 11.49 2.65 0.2 51.84 38.72 5.87 3.25 0.32 0.1 48.59 39.37 8.33 2.42 1.29 5. EM fixed point ideals A common algorithm for finding the maximum likelihood estimate for latent class models is the EM algorithm [8]. However, it does not come with a guarantee for converging to the global optimum of the likelihood function. In this section, we study an object, the EM fixed point ideal introduced in [21], that eliminates this drawback as we will explain now. An EM fixed point for an observed data tensor U is a parameter vector in Θ which stays fixed after one iteration of the EM algorithm. The EM fixed points are precisely the candidates for the global maxima of the likelihood function; see Lemma 24. The solution set of the EM fixed point ideal contains all the EM fixed points, and in particular all the global maxima of the likelihood function. Once one finds all the solutions of the EM fixed ideal, then one has also found all the global maxima of the likelihood function. Moreover, for a given model M, the 20 EM fixed point ideal consists of the equations defining all EM fixed points for any data tensor U . Hence, for M it has to be computed and investigated once and for all. In this section, after describing the equations of the EM fixed point ideal for M3 in Proposition 25, we will present the full prime decomposition of this ideal in Theorem 26. Then we will illustrate two important uses of this decomposition. First, we will show that using these components one can recover the formulas for the maximum likelihood estimator for various strata that we presented in Section 4.2. Those formulas were obtained by painstaking work and attention, whereas an automatic elimination process performed by a computer algebra system could compute them provided that the decomposition of the EM fixed point ideal is computed. Second, we will point out that the relevant components of this decomposition which contain stochastic parameter matrices correspond precisely to the boundary strata of M3 , also reported in Section 4.2. This hints at the usefulness of the EM fixed point ideal for the discovery of such boundary strata. In fact, we will showcase this discovery process in Section 6.1 by computing the decomposition of the EM fixed point ideal of M3,3 . The components we get give the boundary stratification of M3,3 as reported in [27]. We present a version of the EM algorithm adapted to latent class models with three observed variables in Algorithm 1. We no longer assume that the observed or hidden variables are binary. We let X1 , X2 , X3 be the observed random variables with d1 , d2 , d3 states, respectively, and we assume that the hidden variable takes values in {1, . . . , r}. We denote this model by Md1 ×d2 ×d3 ,r . Our presentation is based on [26, Section 1.3] and [21, Algorithm 1]. Input: Observed data tensor U ∈ Zd1 ×d2 ×d3 . Output: A proposed maximum P̂ ∈ ∆d1 d2 d3 −1 of the log-likelihood function ℓ on the model Md1 ×d2 ×d3 ,r . Step 0: Initialize randomly (λ1 , . . . , λr ) ∈ ∆r−1 , (ai1 , . . . , aid1 ) ∈ ∆d1 −1 , (bi1 , . . . , bid2 ) ∈ ∆d2 −1 , and (ci1 , . . . , cid3 ) ∈ ∆d3 −1 for i = 1, . . . , r. Run the E-step and M-step until the entries of P ∈ ∆d1 d2 d3 −1 converge. E-Step: Estimate the hidden data: λa b c Set vlijk := Pr l λlil aljli blklj clk uijk for l = 1, . . . , r, i = 1, . . . , d1 , j = 1, . . . , d2 , and l=1 k = 1, . . . , d3 . M-Step: Maximize the log-likelihood function of the model with complete data using the estimates for the hidden data from the E-step: P 1 Pd2 Pd3 Set λl := di=1 i=1 vijkl /u+++ for l = 1, ..., r. Pd2 Pi=1 d3 Set ali := j=1 k=1 vijkl /(u+++ λl ) for l = 1, . . . , r, i = 1, . . . , d1 . P 1 Pd3 vijkl /(u+++ λl ) for l = 1, . . . , r, j = 1, . . . , d2 . Set blj := di=1 Pd1 Pk=1 d2 Set clk := i=1 j=1 vijkl /(u+++ λl ) for l = 1, . . . , r, k = 1, . . . , d3 . Update the joint distribution for the latent class model: P Set pijk := rl=1 λl ali blj clk for i = 1, . . . , d1 , j = 1, . . . , d2 , k = 1, . . . , d3 . Return P . Algorithm 1: EM algorithm for the latent class model with three observed variables An EM fixed point for an observed data tensor U is an element of Θ := ∆r−1 × (∆d1 −1 )r × (∆d2 −1 )r × (∆d3 −1 )r which stays fixed after one E-step and M-step of the EM-algorithm with the input U . Lemma 24. An element of Θ to which the EM-algorithm can converge to for some random starting point is an EM fixed point. 21 Proof. Denote the function defined by one step of the EM-algorithm by EM . Pick an initial point (λ(0) , A(0) , B (0) , C (0) ) ∈ Θ. Let (6) (λ(k+1) , A(k+1) , B (k+1) , C (k+1) ) = EM (λ(k) , A(k) , B (k) , C (k) ). Assume that limk→∞ (λ(k) , A(k) , B (k) , C (k) ) exists and the limit is (λ, A, B, C). Then taking the limit of both sides of (6) gives lim (λ(k+1) , A(k+1) , B (k+1) , C (k+1) ) = lim EM (λ(k) , A(k) , B (k) , C (k) ). k→∞ k→∞ Since EM is a continuous function, on the right hand side, we can bring the limit inside: lim (λ(k+1) , A(k+1) , B (k+1) , C (k+1) ) = EM ( lim (λ(k) , A(k) , B (k) , C (k) )). k→∞ k→∞ Hence (λ, A, B, C) = EM (λ, A, B, C).  Lemma 24 justifies the study of the set of the EM fixed points as they contain the approximate outputs of the EM algorithm. In [21, Section 3], the set of all EM fixed points of a latent class model with two observed variables is studied through the minimal set of polynomial equations that they satisfy. These equations are called the EM fixed point equations and they define the EM fixed point ideal. Here we study the EM fixed point ideal for M3 . Proposition 25. The EM fixed point equations for 2 × 2 × 2-tensors of rank+ ≤ 2 on the parameter space Θ are   2 X aℓi  rijk bℓj cℓk  = 0 for all ℓ, i = 1, 2, j,k=1  bℓj  2 X i,k=1  cℓk  h where [rijk ] = u+++ − 2 X i,j=1 uijk pijk i .  rijk aℓi cℓk  = 0 for all ℓ, j = 1, 2,  rijk aℓi bℓj  = 0 for all ℓ, k = 1, 2, Proof. This proof follows the proof of [21, Theorem 3.5]. Elements of Θ that stay fixed after one E-step and M-step are characterized by the rational equations λℓ = aℓi = bℓj = cℓk = 1 u+++ 1 2 X λℓ aℓi bℓj cℓk · uijk P2 λ a b c s si sj sk s=1 i,j,k=1 u+++ λℓ 1 u+++ λℓ 1 u+++ λℓ 2 X λℓ aℓi bℓj cℓk · uijk P2 λ a b c s si sj sk s=1 j,k=1 2 X λℓ aℓi bℓj cℓk · uijk P2 λ a b c s si sj sk s=1 i,k=1 2 X λℓ aℓi bℓj cℓk · uijk P2 λ a b c s si sj sk s=1 i,j=1 22 for ℓ = 1, 2, for ℓ, i = 1, 2, for ℓ, j = 1, 2, for ℓ, k = 1, 2. Assuming that the observed data tensor U and the starting parameters are positive, then λl will always stay positive, because al , bl , cl being stochastic vectors implies that there is always one non-zero summand in the equation for λl . This allows us to cancel out λl from other equations. After this cancellation, the first equation follows from any of the other equations. We can further modify these equations: aℓi = 1 u+++ aℓi u+++ = 2 X j,k=1 2 X j,k=1 aℓi u+++  aℓi  2 X j,k=1 2 X 2 X aℓi bℓj cℓk P2 aℓi bℓj cℓk P2 aℓi bℓj cℓk s=1 λs asi bsj csk s=1 λs asi bsj csk · uijk =⇒ · uijk =⇒ · uijk =⇒ λ a b c s si sj sk s=1 j,k=1 j,k=1  ! uijk u+++ − P2 · bℓj cℓk  = 0 =⇒ s=1 λs asi bsj csk    2  X u ijk · bℓj cℓk  = 0, for ℓ, i = 1, 2. aℓi  u+++ − pijk bℓj cℓk = P2 j,k=1 P2 The third line follows from j,k=1 bℓj cℓk = 1 and the last line follows from pijk = Applying similar arguments for the equations for blj and clk and setting uijk rijk = u+++ − , pijk gives the desired equations. P2 ℓ=1 λℓ aℓi bℓj cℓk .  We call the ideal generated by the equations in Proposition 25 the EM fixed point ideal and denote it by F. This ideal is not prime and it defines a reducible variety. A minimal prime of P2 F is called relevant if it contains none of the 8 polynomials pijk = ℓ=1 aℓi bℓj cℓk and none of the six ideals hal1 , al2 i, hbl1 , bl2 i and hcl1 , cl2 i. Equivalently, an ideal is relevant, if not all its solutions have a coordinate of P identically zero and after normalizing the parameters come from stochastic matrices. Theorem 26. The radical of the EM fixed point ideal F for M3 has precisely 63 relevant primes consisting of 9 orbital classes. Proof. This proof follows the proof of [21, Theorem 5.5] in using the approach of cellular components from [9]. The EM fixed point ideal F is given by      *  2 + 2 2 X X X aℓi  rijk bℓj cℓk  , bℓj  rijk aℓi cℓk  , cℓk  rijk aℓi bℓj  : i, j, k, l = 1, 2 . j,k=1 i,j=1 i,k=1 P2 Any prime ideal containing F contains either aℓi or j,k=1 rijk bℓj cℓk for ℓ, i ∈ {1, 2}, and P P either bℓj or 2i,k=1 rijk aℓi cℓk for ℓ, j ∈ {1, 2}, and either cℓk or 2i,j=1 rijk aℓi bℓj for ℓ, k ∈ {1, 2}. We categorize all primes containing F according to the set S of parameters aℓi , bℓj , and cℓk contained in them. The symmetry group acts on the parameters by permuting 23 the rows of A, B, and C simultaneously, the columns of A, B, and C separately, and the matrices A, B, and C themselves. For each orbit that consists of relevant ideals, Q we pick one representative S and compute the cellular component FS = ((F + hSi) : ( S c )∞ ), where S c = {a11 , ...a22 , b11 , ..., b22 , c11 , ...c22 }\S. Next we remove all representatives S such that FT ⊂ FS for a representative T in another orbit. For each remaining cellular component FS , we compute its minimal primes. In each case, we use either the Macaulay2 minimalPrimes function or the linear elimination sequence from [12, Proposition 23(b)]. Finally, we remove those minimal primes of FS that contain a cellular component FT for a set T (not necessarily a representative) in another orbit. The remaining 9 minimal primes correspond to the rows of Table 5 and are uniquely determined by their properties. These are the set S, the degree and codimension, the ranks rA = rank(A), rB = rank(B), and rC = rank(C) at a generic point. The 63 ideals are obtained when counting each orbit with its orbit size in the last column of Table 5.  Table 5 Minimal primes of EM fixed point ideal F for 2 × 2 × 2-tensors of rank+ 2. |S| a’s b’s c’s deg codim rA rB rC orbit 0 0 0 0 60 7 1 1 1 1 0 0 0 0 48 7 2 2 1 1 0 0 0 0 48 7 2 1 2 1 0 0 0 0 48 7 1 2 2 1 0 0 0 0 1 8 2 2 2 1 {a11 } 1 1 0 0 5 8 2 2 2 12 {a11 , a22 } 2 2 0 0 25 8 2 2 2 6 {a11 , b11 } 2 1 1 0 11 8 2 2 2 24 {a11 , b11 , c11 } 3 1 1 1 23 8 2 2 2 16 Class S {∅} The orbit sizes in Table 5 are twice the number of corresponding strata in Corollary 10, except for the rows represented by {∅}. The reason for this is that in this table we consider the ideal that is obtained by switching the rows of A, B and C different from the original ideal. The rows of Table 5 correspond to different boundary strata in Theorem 9. The row 1 corresponds to the unique 3-dimensional type (5) stratum that consists of rank-one tensors. This can be seen by considering ranks of A, B and C that are all one. The rows 2–4 correspond to the type (4) boundary strata, where exactly one Markov matrix A, B or C is of rank one. The row 5 corresponds to the interior (type(1)). The row 6 corresponds to a 6-dimensional type (2) stratum, where a11 = 0. The row 7 corresponds to a 5-dimensional type (3) stratum, where a11 = a22 = 0. The row 8 corresponds to a 5-dimensional type (2) stratum, where a11 = b11 = 0. The row 9 corresponds to a 4dimensional type (2) stratum, where a11 = b11 = c11 = 0. In the next example we will explain how to derive the EM fixed points and the potential MLEs from the former type of minimal primes of the EM fixed point ideal. 24 Example 1. Consider the minimal prime of the EM fixed point ideal corresponding to a11 = a22 = 0: I1 =ha22 , a11 , r212 r221 − r211 r222 , c11 r221 + c12 r222 , b11 r212 + b12 r222 , c11 r211 + c12 r212 , b11 r211 + b12 r221 , r112 r121 − r111 r122 , c21 r121 + c22 r122 , b21 r112 + b22 r122 , c21 r111 + c22 r112 , b21 r111 + b22 r121 i. We add to the ideal I1 the ideal of the parametrization map I2 =h−a21 b21 c21 + p111 , −a21 b21 c22 + p112 , −a21 b22 c21 + p121 , −a21 b22 c22 + p122 , − a12 b11 c11 + p211 , −a12 b11 c12 + p212 , −a12 b12 c11 + p221 , −a12 b12 c12 + p222 i. Eliminating parameters a11 , . . . , c22 from I1 + I2 , gives the ideal J =hp212 p221 − p211 p222 , r221 p221 + r222 p222 , r211 p221 + r212 p222 , r212 p212 + r222 p222 , r211 p212 + r221 p222 , r221 p211 + r222 p212 , r212 p211 + r222 p221 , r211 p211 − r222 p222 , p112 p121 − p111 p122 , r121 p121 + r122 p122 , r111 p121 + r112 p122 , r112 p112 + r122 p122 , r111 p112 + r121 p122 , r121 p111 + r122 p112 , r112 p111 + r122 p121 , r111 p111 − r122 p122 , r212 r221 − r211 r222 , r112 r121 − r111 r122 i Finally, we substitute to the ideal J the expressions rijk = u+++ − uijk pijk and clear the denominators. To obtain an estimate for p111 , we eliminate all other pijk . This gives the ideal generated by p111 u1++ u+++ − u11+ u1+1 . Hence p111 = u11+ u1+1 , u1++ u+++ as in Section 4. Similarly, one can derive estimates for other pijk . We used the method in Example 1 to verify the formulas in Section 4.2 for MLEs on different strata for all cases besides the 3- and 4-dimensional strata. For the 3- and 4-dimensional strata, the elimination of pijk ’s did not terminate. Since the rows of Table 5 are in correspondence with the boundary strata of M3 , we believe that the method of decomposing the EM fixed point ideal will be useful for identifying boundary strata for models whose geometry is not as well understood as for M3 . In Section 6, we will present the minimal primes of the EM fixed point ideal for 2 × 2 × 2 tensors of nonnegative rank at most three. We hope that such computations will serve as a starting point for studying tensors of higher nonnegative rank. 5.1. The KKT ideal and the EM fixed point ideal. This section is devoted to a small detour which we believe is the beginning for future work to understand the EM algorithm better. Here, we start with the observation that the EM algorithm is trying to solve a particular optimization problem. Then we demonstrate that the equations defining the EM fixed point ideal are nothing but the complementary slackness conditions that appear in the optimality (KKT) conditions for this optimization problem. 25 We start with the straightforward formulation of the MLE problem as an optimization problem: max 2 2 X 2 X X uijk log(pijk ) i=1 j=1 k=1 subject to a11 + a12 = 1 a21 + a22 = 1 b11 + b12 = 1 b21 + b22 = 1 c11 + c12 = 1 c21 + c22 = 1 λ1 + λ2 = 1 aℓj , bℓj , cℓj , λℓ ≥ 0 for ℓ, j = 1, 2 where pijk is defined as in (1). For equality constraints we introduce dual variables µa1 , µa2 , µb1 , µb2 , µc1 , µc2 , µλ , and for inequality constraints we also introduce dual variables νaℓj , νbℓj , νcℓj , νλℓ for ℓ, j = 1, 2. The Karush-Kuhn-Tucker (KKT) conditions for our optimization problem consist of all the feasibility conditions in this problem together with the complementary slackness conditions aℓj · νaℓj = 0, bℓj · νbℓj = 0, cℓj · νcℓj = 0, λℓ · νλℓ = 0, for ℓ, j = 1, 2 and the stationarity conditions ∂f ∂aℓj ∂f ∂bℓj ∂f ∂cℓj ∂f ∂λℓ = µaℓ + νaℓj = µbℓ + νbℓj = µcℓ + νcℓj = µλ + νλℓ , where f= 2 X 2 X 2 X i=1 j=1 k=1 uijk log(pijk ) = 2 X 2 X 2 X i=1 j=1 k=1   2 X 2 X 2 X pijk  . uijk log(pijk ) − u+++ log  i=1 j=1 k=1 The KKT conditions are necessary conditions for optimality: if (a∗ℓj , b∗ℓj , c∗ℓj , λ∗ℓ ) is solution for the original MLE problem and (µ∗aℓ , µ∗bℓ , µ∗cℓ , µ∗λ , νa∗ℓj , νb∗ℓj , νc∗ℓj , νλ∗ℓ ) is an optimal an optimal solution to the Lagrangian dual problem, then together they make up a solution for the KKT conditions. We call the ideal defined by the equations in the KKT conditions (but disregarding all inequality constraints) the KKT ideal. Theorem 27. Let (a∗ℓj , b∗ℓj , c∗ℓj , λ∗ℓ ; µ∗aℓ , µ∗bℓ , µ∗cℓ , µ∗λ , νa∗ℓj , νb∗ℓj , νc∗ℓj , νλ∗ℓ ) be a zero of the KKT ideal with λ1 , λ2 6= 0. Then (a∗ℓj , b∗ℓj , c∗ℓj , λ∗ℓ ) is a zero of the EM fixed point ideal. Conversely, if (a∗ℓj , b∗ℓj , c∗ℓj , λ∗ℓ ) is a zero of the EM fixed point ideal with aℓ1 + aℓ2 = bℓ1 + bℓ2 = cℓ1 + cℓ2 = 1 26 for ℓ = 1, 2, and λ1 + λ2 = 1, then there exists (µ∗aℓ , µ∗bℓ , µ∗cℓ , µ∗λ , νa∗ℓj , νb∗ℓj , νc∗ℓj , νλ∗ℓ ) which extends to a zero of the KKT ideal. Proof. For the forward direction, we first prove that µ∗aℓ , µ∗bℓ , µ∗cℓ , µ∗λ = 0. We compute that 2 2 2 XXX ∂f = ∂λℓ i=1 j=1 k=1   uijk − u+++ aℓi bℓj cℓk = µλ + νλℓ . pijk ∂f ∂f +λ2 ∂λ = 0, and this in turn is equal to µλ (λ1 +λ2 )+νλ1 λ1 +νλ2 λ2 = It is easily seen that λ1 ∂λ 1 2 µλ . We will also explicitly prove that µa1 = 0 (the other cases are done with the exact same reasoning). Again we compute that 2 2 XX ∂f = ∂a1s j=1 k=1   usjk − u+++ λ1 b1j c1k = µa1 + νa1s . psjk Now on the one hand a11 ∂f ∂f + a12 = µa1 (a11 + a12 ) + νa11 a11 + νa12 a12 = µa1 , ∂a11 ∂a12 and on the other hand the direct computation gives a11 ∂f ∂f + a12 = 0. ∂a11 ∂a12 This shows that µa1 = 0. We are ready to conclude, for instance,    2  2 X X u1jk ∂f = a11  − u+++ λ1 b1j c1k  = 0. a11 ∂a11 p1jk j=1 k=1 After dividing by λ1 6= 0 we obtain an equation of the EM fixed point ideal:   2 2 X X r1jk b1j c1k  = 0. a11  j=1 k=1 The other equations are derived in a similar way. Conversely, given a solution of the EM fixed point ideal, let µaℓ = µbℓ = µcℓ = µλ = 0, and let 2 X 2 X rijk λℓ bℓj cℓk . νaℓi := j=1 k=1 Define νbℓj and νcℓk in a similar manner. Note that νaℓi = νλℓ := 2 2 X 2 X X ∂f ∂aℓi . Also let rijk aℓi bℓj cℓk , i=1 j=1 k=1 and note that νλℓ = ∂f ∂λℓ .  27 6. Other models and Simulations In this section, we briefly outline some interesting questions that our investigations have brought up, and highlight possible directions for future research. We will not be comprehensive here, only reporting preliminary results in scant detail, but with an eye towards spurring and encouraging a wider audience to be interested in these topics where so much remains unknown. In particular, we note that we have focused primarily on latent class models with r = 2 states at the hidden node. This corresponds to distributions that are tensors of rank+ ≤ 2. This case in some ways is ‘easy’ since both the algebraic boundary and the singular set of the parameterization map are well understood. Indeed, it is convenient that if a Markov matrix parameter is singular, then it has identical rows. When considering questions of higher nonnegative rank, we have no such tools at our disposal. In a first extension of our work, we investigate 2 × 2 × 2 tensors of rank+ ≤ 3 and in particular minimal primes of its EM fixed point ideal. We link the results with the boundary stratification poset of M3,3 in [27]. For a second generalization, we consider 3 × 3 × 2 tensors of nonnegative rank 3. This latent class model has the advantage, like M3 , that its Zariski closure is the full ambient space so that its points satisfy a single trivial equation: the sum of coordinates is 1. Here we have no theorems about the boundary stratification nor formulas for MLEs. Instead, we looked at EM attraction basins for interior points and facets corresponding to the boundary of parameter space Θ. In doing so, we can report the relative volume of the model space in the simplex ∆17 . Details are given below in subsection 6.2. Since we only consider distributions for models with only n = 3 random variables in this section, we that the matrix parameters will be denoted by   adapt the convention  once again A = aij , B = bij , and C = cij and the format determined by the particular model under consideration. Thus, for instance, in the EM fixed point ideal computation all three matrices are 3 × 2. 6.1. EM fixed point ideal for M3 . We extend the computations of Theorem 26 to the case of 2 × 2 × 2-tensors of nonnegative rank ≤ 3. Theorem 28. The radical of the EM fixed point ideal F for M3,3 has precisely 317 relevant primes consisting of 21 orbital classes. The properties of these orbital classes are listed in Table 6. Table 6 Minimal primes of EM fixed point ideal F for 2 × 2 × 2-tensors of rank+ 3. Set S {∅} {a11 } {a11 , a21 } |S| a’s b’s c’s deg cdim rA rB rC orbit 0 0 0 0 121 10 1 1 1 1 0 0 0 0 162 9 1 2 2 1 0 0 0 0 162 9 2 1 2 1 0 0 0 0 162 9 2 2 1 1 0 0 0 0 38 10 2 2 2 6×1 0 0 0 0 1 8 2 2 2 1 1 1 0 0 10 10 2 2 2 18 2 2 0 0 5 9 2 2 2 18 28 Table 6 (Continued) Set S |S| a’s b’s c’s deg cdim rA rB rC orbit {a11 , b11 } 2 1 1 0 39 10 2 2 2 36 {a11 , a21 , a32 } 3 3 0 0 50 11 2 2 2 18 {a11 , b11 , c11 } 3 1 1 1 60 11 2 2 2 24 {a11 , a21 , b11 , b21 } 4 2 2 0 11 10 2 2 2 36 {a11 , a22 , b11 , b22 } 4 2 2 0 8 11 2 2 2 36 {a11 , a21 , b11 , b21 , c11 , c21 } 6 2 2 2 23 11 2 2 2 24 {a11 , a21 , b11 , b22 , c11 , c22 } 6 2 2 2 20 12 2 2 2 72 {a11 , a22 , b11 , b22 , c11 , c22 } 6 2 2 2 23 12 2 2 2 24 Some of the ideals listed in Table 6 have further constraints on A, B and C that cannot be read off directly from the table. These constraints are: (1) One out of the six ideals of degree 38 corresponding to {∅} contains polynomials a11 a22 − a12 a21 , b21 b32 − b22 b31 and c11 c32 − c12 c31 . Constraints for the rest of the five ideals are obtained by permuting simultaneously the rows of A, B and C. (2) The ideal corresponding to {a11 } contains polynomials b21 b32 − b22 b31 and c21 c32 − c22 c31 . (3) The ideal corresponding to {a11 , b11 } contains the polynomial c21 c32 − c22 c31 . (4) The ideal corresponding to {a11 , a21 , a32 } contains polynomials b11 b22 − b12 b21 and c11 c22 − c12 c21 . (5) The ideal corresponding to {a11 , b11 , c11 } contains polynomials a21 a32 −a22 a31 , b21 b32 − b22 b31 and c21 c32 − c22 c31 . The semialgebraic description, boundary stratification and closed formulas for MLEs for M3,3 are obtained in [27]. The boundary stratification poset for M3,3 agrees with the one for M3 in Figure 3. The parameters that yield different types of boundary strata for M3,3 are included in Table 6: (1) Interior: {∅} (A, B, C rank 2, no further constraints on A, B and C). (2) Codimension 1 strata: {a11 }∗ , {a11 , a21 }. (3) Exceptional codimension 2 strata: {a11 , a21 , a32 }∗ . (4) Codimension 2 strata: {a11 , b11 }∗ , {a11 , a21 , b11 , b21 }. (5) Exceptional codimension 3 strata: {∅}∗ (A, B or C rank 1). (6) Codimension 3 strata: {a11 , b11 , c11 }∗ , {a11 , a21 , b11 , b21 , c11 , c21 }. (7) Unique codimension 4 stratum: {∅}∗ (A, B and C rank 1). (8) Other: {∅}∗ (A, B, C rank 2, further constraints on A, B and C), {a11 , a22 , b11 , b22 }, {a11 , a21 , b11 , b22 , c11 , c22 }, {a11 , a22 , b11 , b22 , c11 , c22 }. A star indicates that besides setting the elements in the set to zero, further equation constraints on the parameters (either rank constraints from Table 6 or other constraints from the list above) are needed to define the stratum. Taking these further constraints into account, for a fixed type of boundary stratum, all parametrizations from Table 6 are minimal. All the rows of Table 6 that do not give boundary strata lie on the singular locus of M3,3 . 6.2. EM attraction basins for 3×3×2 tensors of rank+ ≤ 3. We do not have a complete description of the boundary strata for tensors of nonnegative rank 3, nor formulas for MLEs. This model, denoted by M∗ , lies as a full-dimensional, proper subset of ∆17 (i.e. with Zariski closure the full ambient space). To be concrete, dim(Θ) = 17 = dim(M∗ ), and we are 29 interested in giving an estimate for the relative volume of M∗ in ∆17 and in obtaining some preliminary understanding of attraction basins for distributions sampled from ∆17 under EM. The EM algorithm was coded in MATLAB, and two sorts of tests were undertaken. For an arbitrary distribution P ∈ ∆17 , we ran EM from ten different starting points, recorded the parameters θ0 ∈ Θ to which EM converged, and took the optimal estimate. Without a full description of the boundary strata of M∗ , we classified the EM estimate into four categories: 1) the EM estimate θ0 contains strictly positive entries; 2) the EM estimate θ0 contains exactly one zero entry in a 3 × 3 Markov matrix; 3) the EM estimate θ0 contains exactly one zero entry in the 3 × 2 Markov matrix; 4) the EM estimate θ0 contains exactly k zero entries for k ∈ {2, ..., 11}. The idea is that these numbers give approximations to which points of Θ, either interior or on a boundary face of Θ, the EM estimates are drawn. Concretely, these numbers are used to estimate (1) the relative volume of M∗ ( ∆17 ; (2) the EM attraction basin proportion for the 6 irreducible components of the algebraic boundary given by a single zero in a 3 × 3 Markov matrix A or B; (3) the EM attraction basin proportion for the 2 irreducible components of the algebraic boundary given by a single zero in the 3 × 2 Markov matrix C; (4) the EM attraction basin proportions for intersections of k facets of Θ. For 106 iterations, the proportions (given as percentages) of these EM attraction basins are given in Table 7, where 1a-codim corresponds to the relative volume of category (2) and 1b-codim to the relative volume of category (3). We separated categories (2) and (3), since (3) corresponds to a context specific independence model, but (2) does not. We note that the highest concentration of estimates is in the faces of Θ of codimension 4, though we have no insight as to why this is the case. Also the relative volume of M∗ ( ∆17 , filling out only approximately .019% is remarkably small, particularly when compared to relative volume estimates for M3 and M3,3 . As a second test, we ran EM for the same P ∈ ∆17 , but with 104 different starting points. As expected, EM converged to many local optima on the nonconvex M∗ , with a majority (almost 76%) in the codim-4 stratum. Table 7 Relative volume of EM attraction basins of strata in M∗ using 10 different starting parameters for 106 uniformly distributed points over ∆17 . 0-codim 1a-codim 1b-codim 2-codim 3-codim 4-codim 0.019 0.2845 0.0621 3.4814 17.0098 40.1676 5-codim 6-codim 7-codim 8-codim 9-codim 10-codim 11-codim 25.7120 11.2486 1.7677 0.2249 0.0199 0.0025 0 7. Conclusions Latent class model admits a nonconvex likelihood function with many local maxima. Typically, the model is fitted with the EM algorithm but this procedure comes with no guarantees of reaching the global maximum. The complicated geometry of this model class does not allow for a simple analysis. In this paper we carefully studied the boundary of the binary latent class model in order to get better control over the likelihood optimization process. 30 For the 2 × 2 × 2 case we obtained an exact procedure of computing the global maximum of the likelihood function over the corresponding model. This gave us tools for studying the performance of the EM algorithm. Our simulations provide evidence that unless correlations between the variables in the model are high and the sample size is reasonably large, with high probability, the MLE will lie on the boundary of the probability simplex. This points to a limitation of the latent class models. Our theoretical work shows that the boundary of the binary latent class model is very structured and the singular locus plays an important role in its description. The complementary work of [27] exhibits that similar techniques can be used for latent class models with a larger number of latent states. Understanding more general latent class models and their connections to other models, like Restricted Boltzmann Machines, is an important research direction. We expect that further simplifications can be obtained by taking into account various group actions. References [1] Elizabeth S. Allman, Catherine Matias, and John A. Rhodes. Identifiability of parameters in latent structure models with many observed variables. Ann. Statist., 37(6A):3099–3132, 2009. [2] Elizabeth S. Allman, John A. Rhodes, Bernd Sturmfels, and Piotr Zwiernik. Tensors of nonnegative rank two. Linear Algebra Appl., 473:37–53, 2015. [3] Elizabeth S. Allman, John A. Rhodes, and Amelia Taylor. A semialgebraic description of the general Markov model on phylogenetic trees. SIAM J. Discrete Math., 28(2):736–755, 2014. [4] Christopher M. Bishop. Pattern recognition and machine learning. Information Science and Statistics. Springer, New York, 2006. [5] Craig Boutilier, Nir Friedman, Moises Goldszmidt, and Daphne Koller. Context-specific independence in bayesian networks. In Proceedings of the Twelfth international conference on Uncertainty in artificial intelligence, pages 115–123. Morgan Kaufmann Publishers Inc., 1996. [6] Fabrizio Catanese, Serkan Hoşten, Amit Khetan, and Bernd Sturmfels. The maximum likelihood degree. Amer. J. Math., 128(3):671–697, 2006. [7] Vin de Silva and Lek-Heng Lim. Tensor rank and the ill-posedness of the best low-rank approximation problem. SIAM J. Matrix Anal. Appl., 30(3):1084–1127, 2008. [8] A. P. Dempster, N. M. Laird, and D. B. Rubin. Maximum likelihood from incomplete data via the EM algorithm. J. Roy. Statist. Soc. Ser. B, 39(1):1–38, 1977. With discussion. [9] David Eisenbud and Bernd Sturmfels. Binomial ideals. Duke Mathematical Journal, 84(1):1–45, 1996. [10] Stephen E. Fienberg. Discussion on the paper by Dempster, Laird, and Rubin. J. Roy. Statist. Soc. Ser. B, 39(1):29–30, 1977. [11] Stephen E. Fienberg, Patricia Hersh, Alessandro Rinaldo, and Yi Zhou. Maximum likelihood estimation in latent class models for contingency table data. In Algebraic and geometric methods in statistics, pages 27–62. Cambridge Univ. Press, Cambridge, 2010. [12] Luis David Garcia, Michael Stillman, and Bernd Sturmfels. Algebraic geometry of Bayesian networks. J. Symbolic Comput., 39(3-4):331–355, 2005. [13] Francisca Galindo Garre and Jeroen K Vermunt. Avoiding boundary estimates in latent class analysis by bayesian posterior mode estimation. Behaviormetrika, 33(1):43–59, 2006. [14] Dan Geiger, David Heckerman, Henry King, and Christopher Meek. Stratified exponential families: graphical models and model selection. Annals of Statistics, pages 505–529, 2001. [15] Zvi Gilula. Singular value decomposition of probability matrices: Probabilistic aspects of latent dichotomous variables. Biometrika, 66(2):339–344, 1979. [16] Leo A. Goodman. On the estimation of parameters in latent structure analysis. Psychometrika, 44(1):123– 128, Mar 1979. [17] Shelby J. Haberman. Log-linear models for frequency tables derived by indirect observation: maximum likelihood equations. Ann. Statist., 2:911–924, 1974. [18] Serkan Hoşten, Amit Khetan, and Bernd Sturmfels. Solving the likelihood equations. Found. Comput. Math., 5(4):389–407, 2005. 31 [19] Joseph B. Kruskal. More factors than subjects, tests and treatments: an indeterminacy theorem for canonical decomposition and individual differences scaling. Psychometrika, 41(3):281–293, 1976. [20] Joseph B. Kruskal. Three-way arrays: rank and uniqueness of trilinear decompositions, with application to arithmetic complexity and statistics. Linear Algebra and Appl., 18(2):95–138, 1977. [21] Kaie Kubjas, Elina Robeva, and Bernd Sturmfels. Fixed points EM algorithm and nonnegative rank boundaries. Ann. Statist., 43(1):422–461, 2015. [22] Steffen L. Lauritzen. Graphical models, volume 17 of Oxford Statistical Science Series. The Clarendon Press, Oxford University Press, New York, 1996. Oxford Science Publications. [23] Paul F. Lazarsfeld. The logical and mathematical foundation of latent structure analysis. Studies in Social Psychology in World War II Vol. IV: Measurement and Prediction, pages 362–412, 1950. [24] Paul F. Lazarsfeld and Neil W. Henry. Latent Structure Analysis. Houghton, Mifflin, New York, 1968. [25] Mateusz Michalek, Luke Oeding, and Piotr Zwiernik. Secant cumulants and toric geometry. International Mathematics Research Notices, 2015(12):4019–4063, 2015. [26] Lior Pachter and Bernd Sturmfels. Algebraic statistics for computational biology, volume 13. Cambridge university press, 2005. [27] Anna Seigal and Guido Montúfar. Mixtures and products in two graphical models. arXiv:1709.05276, 2017. E-mail address: [email protected] Department of Mathematics and Statistics, University of Alaska, Fairbanks E-mail address: [email protected] Department of Mathematics and Statistics, University of Alaska, Fairbanks E-mail address: [email protected] Department of Statistics, University of Oxford E-mail address: [email protected] Department of Mathematics, San Francisco State University. E-mail address: [email protected] Laboratory for Information & Decision Systems, Massachusetts Institute of Technology, Laboratoire d’Informatique, Universite Pierre et Marie Curie. E-mail address: [email protected] Department of Mathematics, San Francisco State University. E-mail address: [email protected] Department of Mathematics and Statistics, University of Alaska, Fairbanks E-mail address: [email protected] Department of Economics and Business, Universitat Pompeu Fabra, Barcelona 32
10math.ST
OPERAD GROUPS AND THEIR FINITENESS PROPERTIES arXiv:1409.1085v3 [math.GR] 2 Apr 2016 WERNER THUMANN Abstract. We propose a new unifying framework for Thompson-like groups using a well-known device called operads and category theory as language. We discuss examples of operad groups which have appeared in the literature before. As a first application, we proof a theorem which implies that planar or symmetric or braided operads with transformations satisfying some finiteness conditions yield operad groups of type F∞ . This unifies and extends existing proofs that certain Thompson-like groups are of type F∞ . Contents 1. Introduction 1.1. Structure of the article 1.2. Notation and conventions 1.3. Acknowledgements 2. Preliminaries on categories 2.1. Comma categories 2.2. The classifying space of a category 2.3. The fundamental groupoid of a category 2.4. Coverings of categories 2.5. Contractibility and homotopy equivalences 2.6. Smashing isomorphisms in categories 2.7. Calculus of fractions and cancellation properties 2.8. Monoidal categories 2.9. Cones and joins 2.10. The Morse method for categories 3. Operad groups 3.1. Basic definitions 3.2. Normal forms 3.3. Calculus of fractions and cancellation properties 3.4. Operads with transformations 3.5. Examples 4. A topological finiteness result 4.1. Three types of arc complexes 4.2. A contractible complex 4.3. Isotropy groups 4.4. Finite type filtration 4.5. Connectivity of the filtration 4.6. Applications References 2 3 4 4 4 4 5 5 6 7 8 9 11 13 14 18 18 22 23 24 26 32 33 39 39 42 43 53 54 2010 Mathematics Subject Classification. Primary 20F65; Secondary 57M07, 20F05, 18D50. Key words and phrases. Thompson groups, operads, finiteness properties. 1 2 WERNER THUMANN 1. Introduction In unpublished notes of 1965, Richard Thompson defined three interesting groups F, T, V . For example, F is the group of all orientation preserving piecewise linear homeomorphisms of the unit interval with breakpoints lying in the dyadic rationals and with slopes being powers of 2. It has the presentation F = x0 , x1 , x2 , . . . | x−1 k xn xk = xn+1 for k < n In the subsequent years until the present days, hundreds of papers have been devoted to these and to related groups. The reason for this is that they have the ability to unite seemingly incompatible properties. For example, Thompson showed that V is an infinite finitely-presented simple group which contains every finite group as a subgroup. Even more is true: Brown showed in [7] that V is of type F∞ which means that there is a classifying space for V with finitely many cells in every dimension. For F , this was proven by Brown and Geoghegan in [8]. They also showed that H k (F, ZF ) = 0 for every k ≥ 0. This implies in particular that all homotopy groups of F at infinity vanish and that F has infinite cohomological dimension. Thus, they found the first example of an infinite dimensional torsion-free group of type F∞ . In [6], Brin and Squier showed that F is a free group free group, i.e. contains no non-abelian free subgroups. Geoghegan conjectured in 1979 that F is non-amenable. If this is true, F would be an elegant counterexample to the von Neumann conjecture. Ol’shanskii disproved the von Neumann conjecture around 1980 by giving a different counterexample (see [32] and the references therein). Despite several attempts of various authors, the amenability question for F still seems to be open at the time of writing. During the 1970s, Thompson’s group F was rediscovered twice: In the context of homotopy theory by Freyd and Heller [21] and in connection with a problem in shape theory by Dydak [12]. Since the introduction of the classical Thompson groups F, T and V , a lot of generalizations have appeared in the literature which have a “Thompson-esque” feeling to them. Among them are the so-called diagram or picture groups [25], various groups of piecewise linear homeomorphisms of the unit interval [39], groups acting on ultrametric spaces via local similarities [26], higher dimensional Thompson groups nV [4] and the braided Thompson group BV [5]. A recurrent theme in the study of these groups are topological finiteness properties, most notably property F∞ . The proof of this property is very similar in each case, going back to a method of Brown, the Brown criterion [7], and a technique of Bestvina and Brady, the discrete Morse Lemma for affine complexes [2]. This program has been conducted in all the above mentioned classes of groups: For diagram or picture groups in [14, 15], for the piecewise linear homeomorphisms in [39], for local similarity groups in [16], for the higher dimensional Thompson groups in [20] and for the braided Thompson group in [9]. The main motivation to define the class of operad groups, which are the central objects in this article, was to find a framework in which a lot of the Thompsonlike groups could be recovered and in which the established techniques could be performed to show property F∞ , thus unifying and extending existing proofs in the literature. The main device to define these groups are discrete operads. Operads are well established objects whose importance in mathematics and physics has steadily increased during the last decades. Representations of operads constitute algebras of various types and consequently find applications in such diverse areas as LieTheory, Noncommutative Geometry, Algebraic Topology, Differential Geometry, Field Theories and many more. To apply our F∞ theorem to a given Thompsonlike group, one has to find the operadic structure underlying the group. Then one OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 3 has to check whether this operad satisfies certain finiteness conditions. In a lot of cases, the proofs of these conditions are either trivial or straightforward. 1.1. Structure of the article. Our language will be strongly category theory flavoured. Although we assume the basics of category theory, we collect and recall in Section 2 all the tools we will need for the definition of operad groups and for our main result. We lay a particular emphasis on topological aspects of categories by considering categories as topological objects via the nerve functor. This can be made precise by endowing the category of (small) categories with a model structure Quillen equivalent to the usual homotopy category of spaces, but we won’t use this fact. In Subsection 2.10, we will discuss a tool which is probably not so well-known as the others. There, we introduce the discrete Morse method for categories in analogy to the one for simplicial complexes: With the help of a Morse function, a category can be filtered by a nested sequence of full subcategories. The relative connectivity of such a filtration is controlled by the connectivity of certain categories associated to each filtration step, the so-called descending links. This can be used to compute lower bounds for the connectivity of categories. In Section 3, we will introduce the main objects of this article, the so-called operad groups. Before we do this, we recall the notion of operads (internal to the category of sets). This is an abstract algebraic structure generalizing that of a monoid. It comes with an associative multiplication and with identity elements. However, elements in an operad, which are called operations, can be of higher arity (or degree): An operation posseses several inputs and one output. If we have an operation with n inputs, then we can plug the outputs of n other operations into the inputs of the first one, yielding composition maps for the operad. This concept can be generalized even more: Just as one proceeds from monoids to categories by introducing further objects, we can introduce colors to operads and label the inputs and outputs of operations with these colors. Then we require that the composition maps respect this coloring. Furthermore, we can introduce actions of the symmetric or braid groups on the inputs of the operations and obtain symmetric or braided operads. We then attach, in a very natural way, a category to each operad, called the category of operators. When taking fundamental groups of these categories, we arrive at the concept of operad groups. In Subsection 3.5, we then discuss some examples of operads and corresponding operad groups. We will see that all of the Thompson-like groups mentioned in the first part of the introduction can be realized as operad groups. Furthermore, we give new examples and even a procedure how to generate a lot of these Thompson-like groups as operad groups associated to suboperads of endomorphism operads. We will also discuss so-called operads with transformations which are operads with invertible degree 1 operations. In this context, we will introduce very elementary and elementary operations. These model in some sense the generators and relations in such an operad with transformations. In particular, we can define what it means for such an operad to be finitely generated or of finite type. This will be important in Section 4 where we prove the following Theorem. Let O be a finite type (symmetric/braided) operad with transformations which is color-tame and such that there are only finitely many colors and degree 1 operations. Assume further that O satisfies the cancellative calculus of fractions. Then the operad groups associated to O are of type F∞ . The conditions are explained in the text and are usually not hard to verify in practice. The proof proceeds roughly as follows and the ideas are mainly inspired by [2, 7, 9, 20, 39]. Denote by S the category of operators of O. We then can 4 WERNER THUMANN look at the universal covering category U of S which is contractible due to the conditions in the theorem. We mod out the isomorphisms in U and obtain the quotient category U/G which is still contractible. The operad group Γ, which is the fundamental group of S, acts on U by deck transformations. This induces an action on U/G. Brown’s criterion applied to this action yields that Γ is of type F∞ if we show that the isotropy groups of the action are of type F∞ and if we find a filtration by invariant finity type subcategories with relative connectivity tending to infinity. The latter is shown by appealing to the discrete Morse method for categories mentioned earlier. Thus, we have to inspect the connectivity of certain descending links. This is the hardest part of the proof. We filter each descending link by two subcategories, the core and the corona. The core is related to certain arc complexes in Rd with d = 1, 2, 3. A lower bound for the connectivity of these complexes is given in Theorem 4.9. The connectivity for the corona and for the whole descending link is then deduced from the connectivity of the core by using again the discrete Morse method. 1.2. Notation and conventions. When f : A → B and g : B → C are two composable arrows, we write f ∗ g or f g for the composite A → C instead of the usual notation g ◦ f . Consequently, it is often better to plug in arguments from the left. When we do this, we use the notation x⊲f for the evaluation of f at x. However, we won’t entirely drop the usual notation f (x) and use both notations side by side. Objects of type Aut(X) will be made into a group by the definition f · g := f ∗ g. Conversely, a group G is considered as a groupoid with one object and arrows the elements in G together with the composition f ∗ g := f · g. 1.3. Acknowledgements. I want to thank my adviser Roman Sauer for the opportunity to pursue mathematics, for his guidance, encouragement and support over the last few years. I also gratefully acknowledge financial support by the DFG grants 1661/3-1 and 1661/3-2. 2. Preliminaries on categories In this section, we review some aspects of category theory which we need for later considerations. In particular, we want to emphasize the concept of seeing categories as topological objects. Note that everything, except the Morse method for categories explained in Subsection 2.10, should be mathematical folklore and we make no claim of originality. f g 2.1. Comma categories. Let A − → C ← − B be two functors. Then the comma category f ↓g has as objects all the triples (A, B, γ) where A resp. B is an object in A resp. B and γ : f (A) → g(B) is an arrow in C. An arrow from (A, B, γ) to (A′ , B ′ , γ ′ ) is a pair (α, β) of arrows α : A → A′ in A and β : B → B ′ in B such that the diagram f (A) γ f (α)  f (A′ ) / g(B) g(β) γ′  / g(B ′ ) commutes. Composition is given by composing the components. If f is the inclusion of a subcategory, we write A↓g for the comma category f ↓g. Furthermore, if A is just a subcategory with one object A and its identity arrow, we write A↓g. In this case, the objects of the comma category are pairs (B, γ) where OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 5 B is an object in B and γ : A → g(B) is an arrow. An arrow from (B, γ) to (B ′ , γ ′ ) is an arrow β : B → B ′ such that the triangle g(B) ③< ③ ③③ ③③ ③③ g(β) A❉ ❉❉ ❉❉ ❉❉ ❉"  γ′ g(B ′ ) γ commutes. Of course, there are analogous abbreviations for the right factor. 2.2. The classifying space of a category. We assume that the reader is familiar with the basics of simplicial sets (see e.g. [24]). The nerve N (C) of a category C is a simplicial set defined as follows: A k-simplex is a sequence α α αk−1 1 0 . . . −−−→ Ak A1 −→ A0 −→ of k composable arrows. The i’th face map di : N (C)k → N (C)k−1 is given by composing the arrows at the object Ai . When i is 0 or k, then the object Ai is removed from the sequence instead. The i’th degeneracy map si : N (C)k → N (C)k+1 is given by inserting the identity at the object Ai . The geometric realization |N (C)| of N (C) is a CW-complex which we call the classifying space B(C) of C. See [43] for the reason why this is called a classifying space. If the category C is a group, then B(C) is the usual classifying space of the group which is defined as the unique space (up to homotopy equivalence) with fundamental group the given group and with higher homotopy groups vanishing. Since we can view any category as a space via the above construction, any topological notion or concept can be transported to the world of categories. For example, if we say that the category C is connected, then we mean that B(C) is connected. Of course, one can easily think of an intrinsic definition of connectedness for categories and we will give some for other topological concepts below. But there are also concepts for which a combinatorial description is at least unknown, for example higher homotopy groups. Transporting topological concepts to the category CAT of (small) categories via the nerve functor can be made precise: The Thomason model structure on CAT [10, 40] is a model structure Quillen equivalent to the usual model structure on SSET, the category of simplicial sets. Every simplicial complex is homeomorphic to the classifying space of some category: A simplicial complex can be seen as a partially ordered set of simplices with the order relation given by the face relation. Moreover, a partially ordered set (poset) is just a category with at most one arrow between any two objects. The classifying space of a poset coming from a simplicial complex is exactly the barycentric subdivision of the simplicial complex. Even more is true: McDuff showed in [31] that for each connected simplicial complex there is a monoid (i.e. a category with only one object) with classifying space homotopy equivalent to the given complex. Thus, every path-connected space has the weak homotopy type of some monoid. For example, observe the monoid consisting of the identity element and elements xij with multiplication rules xij xkl = xil . In [17] it is shown that its classifying space is homotopy equivalent to the 2-sphere. 2.3. The fundamental groupoid of a category. Following the philosophy of transporting topological concepts to categories via the nerve functor, we define the fundamental groupoid π1 (C) of a category C to be the fundamental groupoid of its 6 WERNER THUMANN classifying space. There is also an intrinsic description of the fundamental groupoid of C in terms of the category itself which we will describe now (see e.g. [24, Chapter III, Corollary 1.2] that these two notions are indeed the same up to equivalence). The objects of π1 (C) are the objects of C and the arrows of π1 (C) are paths modulo homotopy. Here, a path in C from an object A to an object B is a zig-zag of morphisms from A to B, i.e. starting from A, one travels from object to object over the arrows of C, regardless of the direction of the arrows. For example, the following zig-zag is a path in C A ← C1 → C2 ← C3 ← C4 → C5 → B Paths can be concatenated in the obvious way. The homotopy relation on paths is the smallest equivalence relation respecting the operation of concatenation of paths generated by the following elementary relations: α β α β α α A A id A id A A− →B− →C A← −B← −C αβ ∼ A −−→ C ∼ A ←−− C A− →B← −A ∼ α α A← −B− →A ∼ A −→ A ∼ A ←− A ∼ βα where the A’s on the right represent the empty path at A. Composition in π1 (C) is given by concatenating representatives. The identities are represented by the empty paths. If A is an object of C then we denote by π1 (C, A) the automorphism group of π1 (C) at A and call it the fundamental group of C at A. The fundamental groupoid of C has two further descriptions: First, denote by G the left adjoint functor to the inclusion functor from groupoids to categories. Then we have π1 (C) = G(C). Second, it is the localization C[C −1 ] of C (at all its morphisms) since it comes with a canonical functor ϕ : C → π1 (C) satisfying the following universal property: Having any other functor η : C → A with the property that η(f ) is an isomorphism in A for every arrow f in C, then there is a unique functor ǫ : π1 (C) → A such that ϕǫ = η. ϕ / π1 (C) C❉ ❉❉ ❉❉ ❉ ǫ η ❉❉ ❉!  A 2.4. Coverings of categories. Let P : D → C be a functor. We say that P is a covering if for every arrow a in C and every object X in D which projects via P onto the domain or the codomain of a, there exists exactly one arrow b in D with domain resp. codomain X and projecting onto a via P . In other words, arrows can be lifted uniquely provided that the lift of the domain or codomain is given. Of course, P yields a map on the classifying spaces. To justify the definition of covering functor, we have the following: Proposition 2.1. Let P : D → C be a functor. Then P is a covering functor if and only if BP : BD → BC is a covering map of spaces. Proof. By [22, Appendix I, 3.2], BP = |N P | : |N D| → |N C| is a covering map if and only if N P : N D → N C is a covering of simplicial sets as defined in [22, Appendix I, 2.1]. This means that every n-simplex in N C uniquely lifts to N D provided that the lift of a vertex of the simplex is given. The lifting property for P as defined above says that this is true for 1-simplices. So it is clear that P is a covering functor OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 7 provided that BP is a covering map of spaces. For the converse implication, one exploits special properties of nerves of categories. Not every simplicial set arises as the nerve of a category. The Segal condition gives a necessary and sufficient condition for a simplicial set to come from a category: Every horn Λin for 0 < i < n can be uniquely filled by an n-simplex. Using this, the lifting property for 1simplices implies the lifting property for n-simplices.  Now let C be a category and X an object in C. Observe the canonical functor ϕ : C → π1 (C). Define UX (C) to be the category X↓ϕ. The canonical projection UX (C) → C sending an object (B, γ) to B is a covering. Furthermore, UX (C) is simply connected, i.e. connected and its fundamental groupoid is equivalent to the terminal category (see [33]). So it deserves the name universal covering category. More precisely, it is the universal covering of the component of C which contains the object X. There is a canonical functor π1 (C) → CAT taking objects X to the category UX (C) and an arrow f : X → Y to a functor UX (C) → UY (C) which is given by precomposition with f −1 . Fixing the object X, this functor restricts to a functor π1 (C, X) → CAT sending the unique object of the group π1 (C, X) to the universal covering UX (C). This is the same as a representation of π1 (C, X) in CAT, i.e. a group  homomorphism ρ : π1 (C, X) → Aut UX (C) into the group of invertible functors with multiplication given by f · g := f ∗ g. Equivalently, this is a right action of the group π1 (C, X) on UX (C) given by the formula α · γ := α⊲(γ⊲ρ) for γ ∈ π1 (C, X) and arrows α in UX (C). This gives the usual deck transformations on the universal covering. 2.5. Contractibility and homotopy equivalences. We say that a category is contractible if its classifying space is contractible and we say that a functor F : C → D is a homotopy equivalence if BF : BC → BD is one. There are some standard conditions which assure that a category is contractible or a functor is a homotopy equivalence. These will be recalled below. A non-empty category C is contractible if i) C has an initial object. ii) C has binary products. iii) C is a generalized poset (see Definition 2.8) and there is an object X0 together with a functor F : C → C such that for each object X there exist arrows X → F (X) ← X0 (compare with [35, Subsection 1.5]). iv) C is filtered which means that for every two objects X, Y there is an object Z with arrows X → Z, Y → Z and for every two arrows f, g : A → B there is an arrow h : B → C such that f h = gh. Of course, the dual statements are also true. It is instructive to sketch the arguments for these four claims: i) Let I be the category with two objects and one non-identity arrow from the first to the second object. The classifying space of I is the unit interval I. A natural transformation of two functors f, g : C → D can be interpreted as a functor C × I → D. On the level of spaces, this gives a homotopy BC × I → BD. If C is a category with initial object X0 , then there is a unique natural transformation from the functor constX0 (sending every arrow of C to idX0 ) to the identity functor idC . On the level of spaces, this yields a homotopy between idBC and the constant map BC → BC with value the point X0 . ii) Choose an object X0 in C. Let F : C → C be the functor Y 7→ X0 × Y . Projection onto the first factor yields a natural transformation F → constX0 and projection onto the second factor yields a natural transformation F → 8 WERNER THUMANN idC . This gives two homotopies which together give the desired contraction of BC. iii) First note that, if F, G : C → C are two functors with the property that there is an arrow F (X) → G(X) for each object X, then this already defines a natural transformation F → G by uniqueness of arrows in the generalized poset. Now the conditions on X0 and F yield that there are natural transformations idC → F and constX0 → F . On the level of spaces this gives the desired contraction of BC. iv) First, let D be a finite subcategory of C. We claim that there exists a cocone over D in C, i.e. there is an object Z in C and for each object Y in D an arrow Y → Z which commute with the arrows in D. This cocone is contractible because Z is a terminal object. A cocone can be constructed as follows: First pick two objects Y1 , Y2 in D and find an object Z ′ with arrows Y1 → Z ′ and Y2 → Z ′ . Pick another object Y3 and find an object Z ′′ with arrows Y3 → Z ′′ and Z ′ → Z ′′ . Repeating this with all objects of D, we obtain an object Q together with arrows fY : Y → Q for every object Y in D. The fY probably won’t commute with the arrows in D yet, but we can repair this by repeatedly applying the second property of filteredness. Pick an arrow d : Y → Y ′ in D and observe the parallel arrows dfY ′ and fY . Apply the second property to find an arrow ω : Q → Q′ with dfY ′ ω = fY ω. Replace Q by Q′ and all the arrows fD for objects D in D by fD ω. Repeat this with all the other arrows in D. Now to finish the proof of this item, take a map S n → BC. Since S n is compact, it can be homotoped to a map such that the image is covered by the geometric realization of a finite subcategory. The cocone over this subcategory then gives the desired null-homotopy. We recall Quillen’s famous Theorem A from [34] which gives a sufficient but in general not necessary condition for a functor to be a homotopy equivalence. Theorem 2.2. Let f : C → D be a functor. If for each object Y in D the category Y ↓f is contractible, then the functor f is a homotopy equivalence. Similarly, if the category f ↓Y is contractible for each object Y in D, then f is a homotopy equivalence. Remark 2.3. When applying this theorem to an inclusion f : A → B of a full subcategory, it suffices to check Y ↓f = Y ↓A for objects Y not in A. If Y is an object in A, the comma category Y ↓A has the object (Y, idY ) as initial object and thus is automatically contractible. Similar remarks apply to the comma categories f ↓Y = A↓Y . Remark 2.4. If D is a groupoid, then for Y, Y ′ ∈ D the comma categories Y ↓f and Y ′ ↓f are isomorphic. Thus one has to check contractibility only for one Y . The same remarks apply to the comma categories f ↓Y . 2.6. Smashing isomorphisms in categories. Recall that a connected groupoid is equivalent, as a category, to any of its automorphism groups. Consequently, a connected groupoid is contractible if and only if its automorphism groups are trivial. This is the case if and only if there is exactly one isomorphism between any two objects. Let C be a category and G ⊂ C a subcategory which is a disjoint union of contractible groupoids. We define the quotient category C/G as follows: The objects of C/G are equivalence classes of objects of C where we say that X ∼ Y are equivalent if there is an isomorphism X → Y in G. Note that such an isomorphism is unique since each component of G is contractible. We define    HomC/G [X], [Y ] := A → B in C A ∈ [X], B ∈ [Y ] ∼ OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 9 where two elements (A → B) ∼ (A′ → B ′ ) in the set are defined to be equivalent if the diagram /B A✤ ✤ ✤ ✤ G∋ ✤ ✤ ∈G   ′ / B′ A commutes. Let [α : A → B] and [β : C → D] be two composable arrows, i.e. [B] = [C], then there is a unique isomorphism γ : B → C in G and one defines [α : A → B] ∗ [β : C → D] := [αγβ : A → D] Set id[X] = [idX ]. One easily checks that C/G is a well-defined category. Remark 2.5. Observe that if X → Y is an arrow in C/G and representatives X and Y have been chosen for X and Y, then there is a unique arrow X → Y representing X → Y. Remark 2.6. Let X and Y be two objects in C/G. Fix some object X0 representing X . Then the arrows X → Y in C/G are in one to one correspondence with arrows X0 → Y in C modulo isomorphisms in G on the right. Likewise, if we fix some object Y0 representing Y, then arrows X → Y in C/G are in one to one correspondence with arrows X → Y0 in C modulo isomorphisms in G on the left. Proposition 2.7. The canonical projection p : C → C/G is a homotopy equivalence. Proof. We want to apply Quillen’s Theorem A (Theorem 2.2) to the projection p : C → C/G. Hence, we have to show that for each object [X] in C/G the comma category [X]↓p is contracible. Indeed, it follows with Remark 2.5 that the object (X, id[X] ) in [X]↓p is an initial object.  In the following, this technique will be applied primarily to generalized posets: Definition 2.8. A generalized poset is a category such that α = β whenever α, β : A → B. Recall that a (honest) poset is a category with at most one arrow between any two objects (regardless of the direction of the arow). In a generalized poset C, however, we allow objects to be uniquely isomorphic. Every subgroupoid G of a generalized poset is a disjoint union of contractible ones and C/G is a generalized poset again. If we collapse each connected component of the subgroupoid consisting of all the isomorphisms, we even get a homotopy equivalent (honest) poset which we call the underlying poset of the generalized poset. 2.7. Calculus of fractions and cancellation properties. The next definition is very classical and due to Gabriel and Zisman [22]. Definition 2.9. Let C be a category. It satisfies the calculus of fractions if the following two conditions are satisfied: • (Square filling) For every pair of arrows f : B → A and g : C → A there are arrows a : D → B and b : D → C such that af = bg. D a f b  C /B g  /A 10 WERNER THUMANN • (Equalization) Whenever we have arrows f, g : A → B and a : B → C such that f a = ga, then there exists an arrow b : D → A with bf = bg. D b /A f g // B a /C More precisely, this is called the right calculus of fractions. There is also a dual left calculus of fractions. Since we are mainly interested in the right calculus of fractions, we omit the word “right”. Remark 2.10. The existence of binary pullbacks in C trivially implies the square filling property but it also implies the equalization property [1, Lemma 1.2]. So a category with binary pullbacks satisfies the calculus of fractions. The calculus of fractions has positive effects on the complexity of the fundamental groupoid π1 (C): One can show (see e.g. [22] or [3]) that each class in π1 (C) can be represented by a span which is a zig-zag of the form /• •o • Furthermore, two spans • ⑧ ❅❅❅ ⑧ ❅❅ ⑧ ❅❅ ⑧⑧  ⑧ ⑧ • _❅ • ? ❅❅ ⑧⑧ ❅❅ ⑧ ❅❅ ⑧⑧⑧ ⑧ • are homotopic if and only if the diagram can be filled in the following way: • ⑧ O ❅❅❅ ⑧ ❅❅ ⑧ ❅❅ ⑧⑧ o ⑧ ⑧ / • _❅ • ?• ❅❅ ⑧ ❅❅ ⑧⑧ ❅❅ ⑧⑧⑧  ⑧ • In other words, the elements in the localization can be described as fractions and this explains the name of the calculus of fractions. We will frequently write (α, β) for a span consisting of arrows α and β where the first arrow α points to the left (i.e. is the denominator) and the second arrow β points to the right (i.e. is the nominator). Two spans are composed by concatenating representatives to a zig-zag and then transforming the zig-zag into a span by choosing a square filling of the middle cospan. •❖ ❖ ♦ ♦ ❖ ❖ ♦ ♦ ❖ ❖ ♦ ♦   ❖'/ w♦ /•o • • •o • The canonical functor ϕ : C → π1 (C) is given by sending an arrow α to the class represented by the span id α / •o • • Using the special form of the homotopy relation from above, we see that two arrows α, β : X → Y are homotopic if and only if there is an arrow ω : A → X such that ωα = ωβ. We now turn to cancellation properties in categories. OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 11 Definition 2.11. Let C be a category. It is called right cancellative if f a = ga for arrows f, g, a implies f = g. It is called left cancellative if af = ag implies f = g. It is called cancellative if it is left and right cancellative. Remark 2.12. Note that we have the following implications: right cancellation =⇒ equalization equalization + left cancellation =⇒ right cancellation Proposition 2.13. Let C be a category satisfying the cancellative calculus of fractions. Then the canonical functor ϕ : C → π1 (C) is faithful and a homotopy equivalence. Proof. Injectivity is easy: Let f, g be arrows in C which are mapped to the same arrow in π1 (C). This means that f, g are homotopic. Since C satisfies the calculus of fractions, this implies that there is an arrow ω with ωf = ωg. From the cancellation property it follows that f = g. For showing that the functor is a homotopy equivalence, we apply Quillen’s Theorem A (Theorem 2.2) to the functor ϕ : C → π1 (C). Let X be an object in π1 (C), i.e. an object in C. We have to check that the comma category X↓ϕ is contractible. Note that this is the universal covering category UX (C). First we claim that this category is a generalized poset: Let (Z, a) and (Z ′ , a′ ) be objects in X↓ϕ and γ1 , γ2 be two arrows from (Z, a) to (Z ′ , a′ ). This means that Z, Z ′ are objects in C, a : X → Z⊲ϕ and a′ : X → Z ′ ⊲ϕ are arrows in π1 (C) and γ1 , γ2 : Z → Z ′ are arrows in C such that a ∗ (γ1 ⊲ϕ) = a′ = a ∗ (γ2 ⊲ϕ) in π1 (C). It follows γ1 ⊲ϕ = γ2 ⊲ϕ and therefore γ1 = γ2 by injectivity. Now we want to show that this generalized poset is cofiltered. Then we can apply item iv) of Subsection 2.5. We have to show that for each two objects A, A′ in X↓ϕ there is another object B and arrows B → A and B → A′ . Let A = (Z, a) and A′ = (Z ′ , a′ ) with arrows a : X → Z⊲ϕ and a′ : X → Z ′ ⊲ϕ which can be represented by spans (α, β) and (α′ , β ′ ) respectively. Choose a square filling (γ, γ ′ ) of the cospan (α, α′ ). Z⊲ϕ β ②②< O✤ ②② ✤ ②② ✤ • c❋❋ ✤ ⑥ γ ❋ α ⑥ ❋❋ ✤ ⑥ ⑥ ❋ ~⑥ X `❆o❴ ❴ ❴ ❴ ❴ Y✤ ❆❆ ①① ❆ ①① ✤ α′ ❆ {①① γ ′ ✤ • ❊❊ ✤ ❊❊ ❊❊ ✤ β′ "  Z ′ ⊲ϕ Then the arrow ω := γα = γ ′ α′ can be interpreted as the denominator of a span representing an arrow in π1 (C) which we denote by ω −1 . Furthermore, since ϕ : C → π1 (C) is the identity on objects, we can write Y = Y ⊲ϕ. Thus, we can define the object B := (Y, ω −1 ) in X↓ϕ. Finally, the arrows γβ and γ ′ β ′ give arrows B → A and B → A′ respectively.  Remark 2.14. The functor ϕ : C → π1 (C) in Proposition 2.13 is still a homotopy equivalence if we drop the cancellation property from the hypothesis. This is proved in [11, Section 7]. 2.8. Monoidal categories. We assume that the reader is acquainted with the definition of monoidal categories, symmetric monoidal categories and braided monoidal categories (see e.g. [30]). In the following, we will always assume the strict versions, 12 WERNER THUMANN i.e. the associator, right and left unitor are identities. We frequently use the symbol I to denote the unit object. Moreover, for objects X and Y , the symbol γX,Y denotes the natural braiding isomorphism X ⊗ Y → Y ⊗ X. We will sometimes call a monoidal category planar in order to stress that it’s neither symmetric nor braided. Joyal and Street introduced the notion of braided monoidal categories in [27]. It is designed such that the braided monoidal category freely generated by a single object is the groupoid with components the braid groups Bn . More precisely, we have an object for each natural number n, there are no morphisms n → m with n 6= m and Hom(n, n) = Bn . More generally, they indroduced the braided monoidal category Braid(C) freely generated by another category C [27, page 37]: The objects are free words in the objects of C, i.e. finite sequences of objects of C. A morphism consists of a braid β ∈ Bn where the strands are labelled with morphisms αi : Ai → Bi of C, yielding an arrow (β, α1 , . . . , αn ) : (A1⊲β , . . . , An⊲β ) → (B1 , . . . , Bn ) in Braid(C). Composition is performed by composing the braids and applying composition in C to every strand. The tensor product is given by juxtaposition, i.e. by  (β, α1 , . . . , αn ) ⊗ (β ′ , α′1 , . . . , α′n ) = β ⊗ β ′ , α1 , . . . , αn , α′1 , . . . , α′n where β ⊗ β ′ means juxtaposition of braids. A set C can be viewed as a discrete category, so we also obtain the notion of a braided monoidal category Braid(C) freely generated by a set. The arrows are just braids with strands labelled by the elements of C, i.e. are colored. The same remarks apply to the symmetric version. In particular, a category C freely generates a symmetric monoidal category Sym(C). Even simpler, we can form the free monoidal category Mon(C) generated by a category C. The strands are decorated by arrows in C but they are not allowed to braid or cross each other. If C is a (symmetric/braided) monoidal category, then there is exactly one tensor structure on π1 (C) making it into a (symmetric/braided) monoidal category and such that the canonical functor ϕ : C → π1 (C) respects that structure, i.e. ϕ(X ⊗ Y ) ϕ(α ⊗ β) ϕ(I) ϕ(γX,Y ) = ϕ(X) ⊗ ϕ(Y ) = ϕ(α) ⊗ ϕ(β) = I = γϕ(X),ϕ(Y ) for objects X, Y and arrows α, β. The tensor product on the level of arrows can be constructed as follows: Let one arrow be represented by the zig-zag A0 α 1 ←− A1 α 2 −→ ··· α k −−→ Ak and the other arrow by the zig-zag B0 β1 −→ B1 β2 ←− ··· βl −→ Bl Then the tensor product may be represented by the zig-zag α A0 ⊗ 1 ←− ⊗ B0 ←− id α A1 ⊗ 2 −→ ··· ⊗ ··· B0 −→ id ··· α k −−→ Ak ⊗ ⊗ id −→ B0 id −→ ⊗ β1 −→ id Ak ⊗ ←− ⊗ B1 ←− β2 id ··· ··· −→ ⊗ ··· −→ βl Ak ⊗ Bl OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 13 2.9. Cones and joins. Let C, D be two categories. We define the join C ∗ D. The set of objects of C ∗ D is the disjoint union of the objects of C and D. The set of arrows is the disjoint union of the arrows of C and D together with exactly one arrow C → D for each pair (C, D) of objects C of C and D of D. The composition rules are the unique ones extending the compositions in C and D. The classifying space of the join is homotopy equivalent to the join of the classifying spaces B(C ∗D) ≃ BC ∗BD. Now we define the cone over a category. The objects of Cone(C) are the objects of C plus another object called tip. The arrows are the arrows of C together with exactly one arrow from tip to every object in C. Dually, there is a Cocone(C) over C. In the cocone, the extra arrows go from the objects of C to the extra object tip. Last but not least, when we have a join C ∗ D of two categories, there is a mixed version Coone(C ∗ D) which we call the coone over the join. Again, there is one extra object tip and for every object in C ∗ D we have an extra arrow. When we have an object in C, the extra arrow goes to tip. When we have an arrow in D, the extra arrow comes from tip. The composition of an arrow C → tip with an arrow tip → D is the unique arrow C → D from the definition of the join. All three coning versions give the usual conings on the topological level: B(Cone(C)) B(Cocone(C)) B(Coone(C ∗ D)) ∼ = ∼ = ∼ = Cone(B(C)) Cone(B(C)) Cone(B(C ∗ D)) The join of two spaces X and Y is defined to be the homotopy pushout of the two projections X ← X × Y → Y . Thus, it is defined only up to homotopy and there is some freedom to choose models of a join. Indeed, there is another construction giving the join of two categories. For this, we need to recall the Grothendieck construction: Let J be some indexing categoryRand F : J → CAT a diagram in CAT. The objects of the Grothendieck construction F are pairs (J, X) of objects J in J and X in J⊲F . An arrow from (J, X) to (J ′ , X ′ ) is a pair (f, α) consisting of an arrow f : J → J ′ and an arrow α : X⊲(f ⊲F ) → X ′ . Composition is given by  (f, α) ∗ (f ′ , α′ ) := f ∗ f ′ , α⊲(f ′ ⊲F ) ∗ α′ In [40] it is shown that there is a model structure on CAT Quillen equivalent to SSET, nowadays called the Thomason model Rstructure, and in [41] it is shown that the nerve of the Grothendieck construction F is homotopy equivalent to the homotopy pushout of the diagram F R∗ N which is obtained from the diagram F by applying the nerve functor. In fact, F realizes the homotopy pushout of F with respect to the Thomason model structure on CAT [19, Section 3]. Now let C, D be categories. We call the Grothendieck construction of the diagram pr pr C D C ←−− C × D −−→ D the Grothendieck join of C and D and denote it by C ◦ D. From [41] we know that B(C ◦ D) is homotopy equivalent to the homotopy pushout of the diagram pr pr BC ←−BC −− BC × BD −−BD −→ BD But the latter is the join BC ∗ BD by definition. So we have B(C ◦ D) ≃ BC ∗ BD. One can show that the Grothendieck join is associative and thus we can write C1 ◦ . . . ◦ Ck for a finite collection Ci of categories. The objects of such an iterated Grothendieck join are elements of the set a Y obj(C1 ◦ . . . ◦ Ck ) = obj(Cs ) S⊂{1,...,k} s∈S 14 WERNER THUMANN Whenever we have S ⊂ T ⊂ {1, . . . , k}, objects (Yt )t∈T and (Xs )s∈S and arrows αs : Ys → Xs in Cs for each s ∈ S, then there is an arrow (αs )s∈S : (Yt )t∈T → (Xs )s∈S For R ⊂ S ⊂ T the composition is given by (αs )s∈S ∗ (βr )r∈R = (αr ∗ βr )r∈R There is also a dual notion of the Grothendieck join which we define as C • D := (C op ◦ Dop )op Since B(Aop ) = B(A) for any category, we still have B(C • D) ≃ BC ∗ BD. Furthermore, it is still associative, so that we can write C1 • . . . • Ck for a finite collection Ci of categories. The objects of such an iterated dual Grothendieck join are elements of the set a Y obj(C1 • . . . • Ck ) = obj(Cs ) S⊂{1,...,k} s∈S Whenever we have S ⊂ T ⊂ {1, . . . , k}, objects (Xs )s∈S and (Yt )t∈T and arrows αs : Xs → Ys in Cs for each s ∈ S, then there is an arrow (αs )s∈S : (Xs )s∈S → (Yt )t∈T For R ⊂ S ⊂ T the composition is given by (βr )r∈R ∗ (αs )s∈S = (βr ∗ αr )r∈R 2.10. The Morse method for categories. We first recall the Morse method in the case of simplicial complexes which has been used in [2] to prove finiteness properties of certain groups. We then explain the same method in the context of categories. Let C be a simplicial complex. Let v be a vertex in C. Denote by C −v the full subcomplex spanned by the vertices of C except v. Observe the link lk(v) of v in C which is contained in C −v . We then have a canonical pushout diagram  / Cone lk(v) lk(v)  C −v  /C  where Cone lk(v) denotes the simplicial cone over lk(v). The following lemma expresses the connectivity of the pair (C, C −v ) in terms of the connectivity of lk(v). Lemma 2.15. Let X and L be two spaces and L → C a cofibration into a contractible space C. Let /C L   /Z X be a pushout of spaces. If L is (n−1)-connected, then the pair (Z, X) is n-connected. The proof is a standard application of the Seifert–van Kampen theorem, the Hurewicz theorem and the Mayer–Vietoris sequence for pushouts. More generally, let X0 be the full subcomplex of the simplicial complex X spanned by a subset of vertices. Then X can be built up from X0 by successively adding vertices. We thus get a filtration X0 ⊂ X1 ⊂ . . . ⊂ X of X by full subcomplexes. If v is the vertex in Xi which is not contained in Xi−1 , then we define lk↓ (v) := lkXi (v) = lkX (v) ∩ Xi−1 OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 15 to be the descending link of v. If all the descending links appearing this way are highly connected, then also the pair (X , X0 ) will be highly connected and, using the long exact homotopy sequence, we obtain the following: Proposition 2.16. Let x0 ∈ X0 be a point. Assume that each descending link is n-connected. Then, we have πk (X0 , x0 ) ∼ = πk (X , x0 ) for k = 0, . . . , n. Note that, in general, the descending links depend on the order in which the vertices are added. We call two vertices v1 , v2 in X \ X0 independent if they are not joined by an edge in X . Assume now that we want to add v1 and then v2 at some step of the process. The independence condition ensures that the descending links of v1 and v2 do not depend on the order in which v1 and v2 are added. The adding order is often encoded in a Morse function. This is a function f assigning to each vertex in X \ X0 an element in a totally ordered set, e.g. N. We require that vertices with the same f -value are pairwise independent. We then add vertices in order of ascending f -values. Because of the independence property, the adding order of vertices with the same f -value can be chosen arbitrarily. Alternatively, we can add vertices with the same f -value all at once. We now give a version of this concept for categories. Let C be a category and X an object in C with HomC (X, X) = {idX }. Define C −X to be the full subcategory of C spanned by the objects of C except X. We define lk↓ (X) := C −X ↓X to be the descending up link of X and lk↓ (X) := X↓C −X to be the descending down link of X. Furthermore, define lk↓ (X) := lk↓ (X) ∗ lk↓ (X) to be the descending link of X. We have a commutative diagram D as follows: lk↓ (X)  / Coone lk↓ (X) ∗ lk (X) ↓  C −X  /C The horizontal arrows are the obvious inclusions. We explain the vertical arrows, starting with lk ↓ (X) ∗ lk↓ (X) → C −X An object either comes from lk↓ (X) and thus is a pair (Y, Y → X) with Y an object in C −X or comes from lk↓ (X) and thus is a pair (Y, X → Y ) with Y an object in C −X . In both cases, the object will be sent to Y . Similarly, on the level of arrows, it is also the canonical projection from lk↓ (X) or lk ↓ (X) to C −X . However, for each object (Y, Y → X) in lk↓ (X) and each object (Y ′ , X → Y ′ ) in lk ↓ (X), there is another unique arrow in the join. Send this arrow to the composed arrow Y → X → Y ′ . Next, we will define the arrow  Coone lk↓ (X) ∗ lk↓ (X) → C Of course, in order to make the diagram commutative, this functor restricted to the base lk↓ (X) of the coone is the one already defined above. So we have to define the images of the extra object tip and the extra arrows. Send tip to X. Let 16 WERNER THUMANN (Y, Y → X) be an object of lk↓ (X). The arrow from this object to tip is sent to the arrow Y → X. Similarly, let (Y, X → Y ) be an object of lk↓ (X). Then the arrow from tip to this object is sent to the arrow X → Y . Our goal is to show that the diagram D becomes a pushout on the level of classifying spaces. Unfortunately, this is not always the case. Consider for example the groupoid • ⇄ • with two objects and two non-identity arrows which are inverse to each other. In all these cases, however, the situation is even better: Lemma 2.17. Assume that there is an object A 6= X and arrows α : X → A and β : A → X. Then the inclusion C −X → C is a homotopy equivalence. Proof. We show that C −X ↓X is filtered and thus contractible. The lemma then follows from Theorem 2.2 and Remark 2.3. Let (Y, γ) be an object in C −X ↓X, i.e. γ : Y → X is an arrow in C with Y an object in C −X . Set ǫ := γα. Because of the assumption HomC (X, X) = {idX }, the arrow αβ : X → X must be the identity. Then we calculate γ = γ(αβ) = (γα)β = ǫβ This shows that ǫ represents an arrow (Y, γ) → (A, β) in C −X ↓X. In particular, for every two objects in the comma category, there are arrows to the object (A, β). This shows the first property of a filtered category. For the second property, we have to show that any two parallel arrows are coequalized by another arrow. So let (Z, ν) and (Y, γ) be two objects and ǫ, ǫ′ : (Z, ν) → (Y, γ) be two arrows, i.e. ǫ, ǫ′ : Z → Y are arrows in C −X and we have ǫγ = ν = ǫ′ γ. Set µ = γα which is an arrow (Y, γ) → (A, β) as already pointed out. Then we calculate ǫµ = ǫγα = να = ǫ′ γα = ǫ′ µ and we are done.  In all other cases, diagram D is indeed a pushout on the level of classifying spaces: Lemma 2.18. Assume that for any object A 6= X either there are only arrows from X to A or there are only arrows from A to X, but never both. Then the diagram B(D)   / Cone B lk↓ X B lk↓ X   B C −X  / B(C) is a pushout of spaces. Proof. We claim that the nerve functor applied to the diagram D   / N Coone lk↓ X ∗ lk↓ X N lk↓ X   N C −X  / N (C) yields a pushout in SSET. Since the geometric realization functor |?| : SSET → TOP is left adjoint to the singular simplex functor, it preserves all colimits and in particular all pushouts. Therefore, applying the geometric realization functor |?| to the diagram N (D), we obtain a pushout in TOP, as claimed in the lemma. A simplex in N (C) is just a string of composable arrows A0 → . . . → Ak . One can easily deduce from the assumption that whenever there are two occurences of X in such a string of composable arrows, then there cannot be objects different OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 17 from X in between. In other words, if X occurs at all, then all the X in the string are contained in a maximal substring of the form X → X → . . . → X where all the arrows are (necessarily) idX . Assume now that we have a commutative diagram as follows:   / N Coone lk↓ X ∗ lk↓ X N lk↓ X ❇❇ ❇❇ ❇❇ ❇❇    ❇❇f −X / ❇❇ N C N (C) ◗ ❨❨❨❨❨❨❨ ❇ ❨❨❨❨❨❨ ◗ ◗ ◗h ❇❇❇ ❨❨❨❨❨❨ ❨❨❨❨❨❨ ◗ ❇❇ ❨❨❨❨❨❨ g ❨❨❨❨❨❨◗ ◗ ❇◗❇ ❨❨❨❨,( Z We will show that h is uniquely determined by f and g. Assume σ is a simplex in N (C) given by a string of composable arrows A0 → . . . → Ak . If all the Ai are −X contained then σ is a simplex in the simplicial subset  in the full subcategory C −X N C and then necessarily h(σ) = g(σ). On the other hand, assume that not all the Ai are objects of C −X , i.e. at least one Ai = X. As pointed out above, σ must be of the form B0 → . . . → Br → X → . . . → X → C0 → . . . → Cs where Bi 6= X for all i = 0, . . . , r and Cj 6= X for all j = 0, . . . , s. All the Bi are in the image of lk↓ (X) because, after composing, we get an arrow Bi → X. Analogously, all the Cj are in the image of lk↓ (X). Such a simplex σ always lifts to a unique simplex σ̄ along the map  N Coone lk ↓ X ∗ lk ↓ X → N (C) Thus we have h(σ) = f (σ̄). This proves uniqueness of h. Showing that h actually defines a map of simplicial sets is left to the reader.  We combine Lemmas 2.15, 2.17 and 2.18 to get: Proposition 2.19. If the descending link lk↓ (X) is (n − 1)-connected, then the pair (C, C −X ) is n-connected. More generally, let X0 be the full subcategory of the category X spanned by a collection of objects in X . Assume that HomX (X, X) = {idX } for all objects X in X \ X0 . Then X can be built up from X0 by successively adding objects. If all the descending links appearing this way are highly connected, then also the pair (X , X0 ) will be highly connected and, using the long exact homotopy sequence, we obtain the following: Theorem 2.20. Let x0 ∈ X0 be an object. Assume that each descending link is n-connected. Then, we have ∼ πk (X , x0 ) πk (X0 , x0 ) = for k = 0, . . . , n. We say that two objects x1 and x2 in X \ X0 are independent if there are no arrows x1 → x2 or x2 → x1 in X . This guarantees independence of lk↓ (x1 ) and lk↓ (x2 ) from the adding order of x1 and x2 . Again, we can encode the adding order with the help of a Morse function f which assigns to each object in X \ X0 an element in a totally ordered set, e.g. N. We require that objects with the same f -value are pairwise independent and we add objects in order of increasing f -values. 18 WERNER THUMANN 3. Operad groups In this section, we want to introduce our main objects of study, the operad groups. We first define the types of operads we will be working with. We will then define operad groups to be the fundamental groups of the category of operators naturally associated to operads. In the last subsection, we will discuss examples of operads and their corresponding operad groups. We will recover some already well-known Thompson-like groups this way. 3.1. Basic definitions. Definition 3.1. An operad O consists of a set of colors C and sets of operations O(a1 , . . . , an ; b) for each finite ordered sequence a1 , . . . , an , b of colors in C (the ai are the input colors and b is the output color) with n ≥ 1 (allowing operations with no inputs is possible, but we won’t consider such operads). See Figure 1 for a visualization of operations. There are composition maps (Figure 1) O(c11 , . . . , c1k1 ; a1 ) × . . . × O(cn1 , . . . , cnkn ; an ) × O(a1 , . . . , an ; b)  O(c11 , . . . , c1k1 , c21 , . . . , cnkn ; b) denoted by (φ1 , . . . , φn ) ∗ θ. Composition is associative (Figure 2):  (ψ11 , . . . , ψ1k1 ) ∗ φ1 , . . . , (ψn1 , . . . , ψnkn ) ∗ φn ∗ θ k (ψ11 , . . . , ψ1k1 , ψ21 , . . . , ψnkn ) ∗ (φ1 , . . . , φn ) ∗ θ  For each color a there are distinguished unit elements 1a ∈ O(a; a) such that (1a1 , . . . , 1an ) ∗ θ = θ = θ ∗ 1b for each operation θ. Sometimes we call such an operad planar in order to distinguish it from the symmetric or braided versions below. A symmetric/braided operad comes with additional maps (Figure 3) x · : O(a1 , . . . , an ; b) → O(a1⊲x , . . . , an⊲x ; b) for each x in the symmetric group Sn or in the braid group Bn respectively. Here, i⊲x for x ∈ Sn means plugging the element i into the permutation x which is considered as a bijection of the set {1, . . . , n}. There is a canonical projection Bn → Sn , so this makes sense also in the braided case. These maps are assumed to be actions: x · (y · θ) = (xy) · θ 1·θ =θ They also have to be equivariant with respect to composition (Figure 4):  (φ1⊲x , . . . , φn⊲x ) ∗ (x · θ) = x̄ · (φ1 , . . . , φn ) ∗ θ  (y1 · φ1 , . . . , yn · φn ) ∗ θ = (y1 , . . . , yn ) · (φ1 , . . . , φn ) ∗ θ Here, x̄ is obtained from x by replacing the i’th strand of x by ni strands and ni is the number of inputs of φi⊲x . Furthermore, (y1 , . . . , yn ) is the juxtaposition of the permutations resp. braidings yi . Remark 3.2. There is an equivalent way of writing the composition, namely with so-called partial compositions. The i’th partial compositions ∗i : O(c1 , . . . , ck ; ai ) × O(a1 , . . . , an ; b) → O(a1 , . . . , ai−1 , c1 , . . . , ck , ai+1 , . . . , an ; b) are defined as  φ ∗i θ := 1a1 , . . . , 1ai−1 , φ, 1ai+1 , . . . , 1an ∗ θ OPERAD GROUPS AND THEIR FINITENESS PROPERTIES c11 c12 a1 a2 θ a3 a1 φ1 c21 c31 c32 c33 b 19 a2 φ2 θ b a3 φ3 Figure 1. Visualization of an operation and composition of operations. ψ11 φ1 ψ21 θ φ2 ψ22 ψ11 φ1 ψ21 θ φ2 ψ22 Figure 2. Associativity. aa22 a3 aa11 a1 a2 a3 θ b Figure 3. Action of the braid groups on the operations. φ1 φ2 φ3 θ φ2 θ φ3 φ1 φ1 φ1 φ2 φ3 θ φ2 φ3 Figure 4. First and second equivariance property. θ 20 WERNER THUMANN φ1 φ2 φ3 Figure 5. Arrow in S(O). Conversely, one could define operads via partial compositions and obtain the usual composition from successive partial compositions. The planar operads, symmetric operads and braided operads can be organized into categories OP, SYM.OP and BRA.OP respectively. Denote by MON, SYM.MON and BRA.MON the categories of monoidal categories, symmetric monoidal categories and braided monoidal categories respectively. There are functors End : MON −→ OP End : SYM.MON −→ SYM.OP End : BRA.MON −→ BRA.OP assigning to each (symmetric/braided) monoidal category C an operad End(C), called the endomorphism operad. The colors of End(C) are the objects of C and the sets of operations are given by End(C)(a1 , . . . , an ; b) = HomC (a1 ⊗ . . . ⊗ an , b) Composition in End(C) is induced by the composition in C in the obvious way. The unit element in End(C)(a; a) is the identity ida : a → a in C. In the symmetric or braided case, C comes with additional natural isomorphisms γX,Y : X ⊗Y → Y ⊗X. These can be used to define the action of the symmetric resp. braid groups on the sets of operations. In the theory of operads, these endomorphism operads play an important role since morphisms of operads O → End(C) are representations of or algebras over the operad O. The functors End have left adjoints S : OP −→ MON S : SYM.OP −→ SYM.MON S : BRA.OP −→ BRA.MON The (symmetric/braided) monoidal category S(O) is called the category of operators. We will define these categories explicitly. We start with the planar case and then use it to define the braided case. The symmetric case is similar to the braided case. So let O be a planar operad with a set of colors C. The objects of S(O) are free words in the colors, i.e. finite sequences of colors in C. An arrow in S(O) is a finite sequence of operations in O: If X1 , . . . , Xn are operations in O, the (ordered) input colors of Xi are (c1i , . . . , cki i ) and the output color of Xi is di , then the Xi give an arrow (X1 , . . . , Xn ) : (c11 , . . . , ck11 , c12 , . . . , cknn ) → (d1 , . . . , dn ) in S(O). Composition is induced by the composition in the operad O and the identities are given by the identity operations in O. The tensor product is given by juxtaposition. OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 21 φ1 φ2 φ3 φ1 φ2 φ3 φ1 φ2 φ3 Figure 6. Equivalence in S(O). Now let O be a braided operad with set of colors C. By forgetting the action of the braid groups, we get a planar operad Opl . The braided monoidal category S(O) is a certain product Braid(C) ⊠ S(Opl ). The objects of S(O) are once more finite sequences of colors in C. Arrows in S(O) are equivalence classes of pairs (β, X) ∈ Braid(C) × S(Opl ) consisting of a C-colored braid β and a sequence X = (X1 , . . . , Xn ) of operations of O where the codomain of β equals the domain of X (Figure 5). The equivalence relation on such pairs is the following: Let (β, X) be such a pair with X = (X1 , . . . , Xn ). For each i = 1, . . . , n let σi be a C-colored braid such that σi · Xi is defined. Let σ := σ1 ⊗ . . . ⊗ σn and define  σ · (β, X) := β ∗ σ −1 , (σ1 · X1 , . . . , σn · Xn ) We require (β, X) and (β ′ , X ′ ) to be equivalent if there exists a σ as above such that (β ′ , X ′ ) = σ · (β, X). In other words, it is the smallest equivalence relation respecting juxtaposition and which is generated by the relation (β ∗ σ, X) ∼ (β, σ · X) with X a single operation. This is visualized in Figure 6. Composition in S(O) is defined on representatives (β, X) and (δ, Y ). Loosely speaking, we push the sequence X of operations through the colored braid δ just as in the definition of equivariance for operads, obtain another colored braid Xyδ which is obtained from δ by multiplying the strands according to X and another sequence of operations Xxδ which is obtained from X by permuting the operations according to δ, and finally compose the left and right side in Braid(C) and S(Opl ) 22 WERNER THUMANN φ1 ψ1 φ2 ψ2 φ3 φ1 ψ1 φ3 φ2 φ1 ψ2 ψ1 φ3 φ2 ψ2 Figure 7. Composition in S(O). respectively:  (β, X) ∗ (δ, Y ) := β ∗ Xyδ, Xxδ ∗ Y See Figure 7 for a visualization of this procedure. That this definition is independent of the chosen representatives follows from the equivariance properties of operads. Last but not least, the tensor product is defined on representatives (β, X) and (δ, Y ) via juxtaposition, i.e. (β, X) ⊗ (δ, Y ) := (β ⊗ δ, X ⊗ Y ). The identity arrows are those represented by a pair of identities. Definition 3.3. The degree of an operation is its number of inputs. The degree of an object in S(O) is the length of the corresponding color word. The degree of an arrow in S(O) is the degree of its domain. A higher degree operation resp. object resp. arrow is one with degree at least 2. Definition 3.4. Let O be a planar, symmetric or braided operad and let X be an object in S(O). Then the group  π1 (O, X) := π1 S(O), X is called the operad group associated to O based at X. 3.2. Normal forms. In case O is a planar operad, arrows in S(O) are just tensor products of operations. In the symmetric and braided case, however, arrows are equivalence classes of pairs (β, X). In this subsection, we want to give a normal form of such arrows, i.e. canonical representatives (β, X). We will treat the braided case, the symmetric case is similar and simpler. OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 23 Consider a colored braid β with n strands. The i’th strand is the strand starting from the node with index i ∈ {1, . . . , n}. Let S be a subset of the index set {1, . . . , n}. Deleting all strands in β other than those with an index in S yields another colored braid β|S . We say that β is unbraided on S if β|S is trivial. Let (n1 , . . . , nk ) be a sequence of natural numbers with 1 = n1 < n2 < . . . < nk = n + 1. A sequence like this is called a partition of n, denoted by [n1 , . . . , nk ], because the sets Si := {ni , . . . , ni+1 − 1} form a partition of the set {1, . . . , n}. We say β is unbraided with respect to the partition [n1 , . . . , nk ] if it is unbraided on the sets Si . Lemma 3.5. Let [n1 , . . . , nk ] be a partition of n and β a colored braid with n strands. Then there is a unique decomposition β = βp ∗ βu into colored braids βp and βu such that βp = βp1 ⊗ . . . ⊗ βpk−1 is a tensor product of colored braids βpi with |Si | strands and βu is unbraided with respect to [n1 , . . . , nk ]. Proof. Define βpi := β|Si and   −1 βu := β|−1 S1 ⊗ . . . ⊗ β|Sk−1 ∗ β Then we have β = βp ∗ βu and βu is unbraided with respect to [n1 , . . . , nk ]. The uniqueness statement is left to the reader.  Now let [β, X] be an arrow in S(O) with X = (X1 , . . . , Xk ). Assume deg(Xi ) = Pi−1 di and d1 + . . . + dk = n. Define ni = 1 + j=1 dj for i = 1, . . . , k + 1 and observe the partition [n1 , . . . , nk+1 ]. Decompose the colored braid β −1 as in the previous lemma to obtain β = τ ∗ ρ where τ −1 is unbraided with respect to [n1 , . . . , nk+1 ] and ρ = ρ1 ⊗ . . .⊗ ρk is a tensor product of colored braids ρi with di strands. Define Yi = ρi · Xi . Then from the definition of arrows in S(O) it follows that [β, X] = [τ, Y ] with Y = (Y1 , . . . , Yk ). So each arrow has a representative (τ, Y ) such that τ −1 is unbraided in the ranges defined by the domains of the operations in the second component. It is easy to see that there is at most one such pair. Similarly, in the symmetric case, for each arrow in S(O), there is a unique representative (τ, Y ) such that the colored permutation τ −1 is unpermuted on the domains of the operations in the second component. Definition 3.6. The unique representative (τ, Y ) of an arrow in S(O) with τ −1 unpermuted resp. unbraided on the domains of the operations in Y is called the normal form of that arrow. 3.3. Calculus of fractions and cancellation properties. In the following, we write θ ≈ ψ if two operations θ, ψ in an operad are equivalent modulo the action of the symmetric resp. braid groups, i.e. there exists a permutation resp. braid γ such that θ = γ · ψ. Of course, in the planar case, this just means equality of operations. Definition 3.7. Let O be a (symmetric/braided) operad. We say that O satisfies the calculus of fractions if the following two conditions are satisfied: • (Square filling) For every pair of operations θ1 and θ2 with the same output color, there are sequences of operations Ψ1 = (ψ11 , . . . , ψ1k1 ) and Ψ2 = (ψ21 , . . . , ψ2k2 ) such that Ψi ∗ θi is defined for i = 1, 2 and such that Ψ1 ∗ θ1 ≈ Ψ 2 ∗ θ2 . • (Equalization) Assume we have an operation θ and sequences of operations Ψ1 = (ψ11 , . . . , ψ1k ) and Ψ2 = (ψ21 , . . . , ψ2k ) such that Ψ1 ∗θ ≈ Ψ2 ∗θ, i.e. there is a γ with Ψ1 ∗θ = γ ·(Ψ2 ∗θ). Then γ is already of the form γ = γ1 ⊗. . .⊗γk 24 WERNER THUMANN such that γj · ψ2j is defined for each j = 1, . . . , k and there is a sequence of operations Ξj for each j = 1, . . . , k such that Ξj ∗ ψ1j = Ξj ∗ (γj · ψ2j ). Definition 3.8. Let O be a (symmetric/braided) operad. We define right cancellativity and left cancellativity for O as follows: • (Right cancellativity) Assume we have an operation θ and sequences of operations Ψ1 = (ψ11 , . . . , ψ1k ) and Ψ2 = (ψ21 , . . . , ψ2k ) such that Ψ1 ∗ θ ≈ Ψ2 ∗ θ, i.e. there is a γ with Ψ1 ∗ θ = γ · (Ψ2 ∗ θ). Then γ is already of the form γ = γ1 ⊗ . . . ⊗ γk such that γj · ψ2j is defined and equal to ψ1j for each j = 1, . . . , k. • (Left cancellativity) Assume we have operations θ1 and θ2 and a sequence of operations Ψ such that Ψ ∗ θ1 = Ψ ∗ θ2 . Then θ1 = θ2 . We say that O is cancellative if it is both left and right cancellative. These two definitions are designed such that the following two propositions hold. The proofs are straightforward and left to the reader (see also [42]). Proposition 3.9. O satisfies the calculus of fractions if and only if S(O) does. Proposition 3.10. O satisfies the left resp. right cancellation property if and only if S(O) does. 3.4. Operads with transformations. Observe that the colors of an operad O together with the degree 1 operations form a category I(O). In general, this category could be any category. Thus, to prove certain theorems, it is often necessary to impose restrictions on the degree 1 operations. Definition 3.11. A planar resp. symmetric resp. braided operad O is called a planar resp. symmetric resp. braided operad with transformations if the category I(O) is a groupoid. In other words, all the degree 1 operations are invertible. For such an operad, a transformation is an arrow in S(O) of the form [σ, X] where X = (X1 , . . . , Xn ) is a sequence of operations of degree 1. The transformations form a groupoid which we call T (O). We say that two operations θ1 and θ2 are transformation equivalent if there is a transformation α such that θ2 = α ∗ θ1 . We denote by T C(O) the set of equivalence classes of operations modulo transformation. Note that two transformation equivalent operations have the same degree. Thus, we also have a notion of degree for elements in T C(O). We define a partial order on the set T C(O) as follows: Write Θ1 ≤ Θ2 if there is an operation θ1 with [θ1 ] = Θ1 and operations ψ1 , . . . , ψn such that (ψ1 , . . . , ψn ) ∗ θ1 ∈ Θ2 . Then, for every θ1 with [θ1 ] = Θ1 there are operations ψ1 , . . . , ψn such that (ψ1 , . . . , ψn )∗θ1 ∈ Θ2 . It is not hard to prove that this relation is indeed a partial order. Note that the degree function on T C(O) strictly respects this order relation which means Θ1 < Θ2 =⇒ deg(Θ1 ) < deg(Θ2 ) The following observation, which easily follows from the definitions, reinterpretes the square filling property of Definition 3.7 in terms of the poset T C(O) of transformation classes: Observation 3.12. Let O be a (symmetric/braided) operad with transformations. Then O satisfies the square filling property if and only if for each pair Θ1 , Θ2 of transformation classes with the same codomain color there is another transformation class Θ with Θ1 ≤ Θ ≥ Θ2 . OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 25 3.4.1. Spines in graded posets. We call a poset P graded if there is degree function deg : P → N such that deg(x) < deg(y) whenever x < y. For example, T C(O) above is graded. Definition 3.13. Let P be a graded poset and M ⊂ P be the subset of minimal elements in P . The spine S of P is the smallest subset S ⊂ P such that M ⊂ S and which satisfies the following property: Whenever v ∈ P \ S, then there is a greatest element g ∈ S such that g < v. We want to prove that the spine of a graded poset always exists. Construction 3.14. We define Si ⊂ P for i ∈ {0, 1, 2, . . .} inductively. Set S0 = M . Assume that Si has been constructed. For each pair x, y ∈ Si with x 6= y, define Mi+1 (x, y) ⊂ P to be the set consisting of all the minimal elements z with the property x ≤ z ≥ y. Now, let Si+1 be the union of all the Mi+1 (x, y). Finally, S∞ define S = i=0 Si . In the following, we want to show that this S satisfies the defining properties of the spine of P . Observation 3.15. Let A ⊂ P . Assume that v ∈ P satisfies a < v for all a ∈ A. We claim that there is a minimal element p in the set {z ∈ P | ∀a∈A a ≤ z} which also satisfies p ≤ v. If v is already minimal, then we can set p = v. If it is not minimal, there must be another element v ′ ∈ P with a ≤ v ′ < v for all a ∈ A. Then v ′ has strictly smaller degree than v. If we repeat this argument with v ′ , we have to end up with a minimal element p at some time, because the degree function is bounded below. This p surely satisfies p ≤ v. Let v ∈ P \ S. We want to find the greatest element in the set V := {z ∈ S | z < v} Si↓ For each i, set = Si ∩ V . We claim: There exists exactly one i0 such that |Sj↓ | > 1 for j < i0 , |Si↓0 | = 1 and Sj↓ = ∅ for j > i0 and the unique element in Si↓0 is the greatest element in V . Observation 3.15 applied to A = ∅ reveals that S0↓ 6= ∅. Note that either all but finitely many of the Si are empty or the sequence of numbers di := min{deg(z) | z ∈ Si } tends to infinity. But the degree of all the elements in all the Si↓ is bounded by deg(v). It follows that in any case there must be an i0 such that Sj↓ = ∅ for all j > i0 . Choose the i0 which is minimal with respect to this property, i.e. Si↓0 6= ∅. Assume |Si↓0 | > 1 and let x 6= y be two elements in this set. Write A = {x, y} and recall that x, y < v. Thus, by Observation 3.15, we know that there must be a p ∈ Mi0 +1 (x, y) with p ≤ v. Since v 6∈ S, we have indeed p < v. Consequently, p ∈ Si↓0 +1 , a contradiction. So we have indeed |Si↓0 | = 1. Next, observe that for any j, if Sj 6= ∅, then Sj−1 consists of at least two elements. This follows directly from the definitions. Consequently, the same holds for the Sj↓ . From this, it easily follows |Sj↓ | > 1 for j < i0 . We now use this to prove that the unique element g ∈ Si↓0 is the greatest element in V , i.e. x ≤ g whenever x ∈ S with x < v. Let x be such an element. If x 6= g, then there must be some j < i0 such that x ∈ Sj↓ . There is another element x′ ↓ in this Sj↓ . Observation 3.15 applied to A = {x, x′ } shows that there is p ∈ Sj+1 with x ≤ p. If j + 1 = i0 , that p must be g and we are done. Else, we repeat this process with p in place of x until we reach level i0 . This completes the proof that S satisfies the last property in Definition 3.13. 26 WERNER THUMANN Remains to prove that S is the smallest subset containing M and satisfying this property. So let S ′ ⊂ P be another subset containing M and satisfying this property. We have to show S ⊂ S ′ . We will prove Si ⊂ S ′ by induction over i. The induction start is trivial because S0 = M . For the induction step, assume Si ⊂ S ′ . Let v ∈ Si+1 . Assume that v 6∈ S ′ . Then there is a greatest element p ∈ S ′ with p < v. Furthermore, there must be x, y ∈ Si with x 6= y and v ∈ Mi+1 (x, y). This means that v is minimal with respect to x ≤ v ≥ y. Since x, y ∈ S ′ but v 6∈ S ′ we have indeed x < v > y. Since p is the greatest element in S ′ with p < v, we obtain x ≤ p ≥ y. This contradicts the minimality of v. So we must have v ∈ S ′ and thus Si+1 ⊂ S ′ . 3.4.2. Elementary and very elementary operations. Denote by T C ∗ (O) the full subposet of T C(O) spanned by the higher degree classes (i.e. the elements of degree at least 2). Definition 3.16. Let O be a (symmetric/braided) operad with transformations. The minimal elements in T C ∗ (O) are called very elementary transformation classes. Denote the set of very elementary classes by V E. Let Θ, Θ1 , . . . , Θk ∈ T C(O) be (not necessarily distinct) transformation classes. We say that Θ is decomposable into the classes Θi if we find operations θi ∈ Θi for i = 1, . . . , k which can be partially composed (see Remark 3.2) in a certain way to an operation in Θ. It can be shown that any class in T C ∗ (O) decomposes into very elementary classes. Definition 3.17. Let O be a (symmetric/braided) operad with transformations. The elements in the spine of T C ∗ (O) are called elementary transformation classes. Denote the set of elementary classes by E. An operation in O is called (very) elementary if it is contained in a (very) elementary transformation class. We will call the elementary but not very elementary classes resp. operations strictly elementary. Definition 3.18. O is finitely generated if there are only finitely many very elementary transformation classes. It is of finite type if there are only finitely many elementary transformation classes. The following proposition states that the subsets V E and E are invariant under the right action of degree 1 operations. Proposition 3.19. Let O be a (symmetric/braided) operad with transformations. Let θ be a higher degree operation and γ be a degree 1 operation. Then the transformation class [θ] is (very) elementary if and only if the class [θ] ∗ γ := [θ ∗ γ] is (very) elementary. In particular, the operation θ is (very) elementary if and only if θ ∗ γ is (very) elementary. Proof. The main observation is that if Θ, Θ′ are two transformation classes, then Θ < Θ′ holds if and only if Θ ∗ γ < Θ′ ∗ γ holds. This implies that Θ ∈ V E if and only if Θ ∗ γ ∈ V E or, in other words, V E ∗ γ = V E. Now write E ′ = E ∗ γ. We then have V E ⊂ E ′ . Let Θ ∈ T C ∗ (O) \ E ′ . Then Θ ∗ γ −1 ∈ T C ∗ (O) \ E. Thus, by the definition of E as the spine of T C ∗ (O), we have that there is a greatest element Ψ ∈ E with Ψ < Θ ∗ γ −1 . Then Ψ ∗ γ ∈ E ′ is the greatest element with Ψ ∗ γ < Θ. Consequently, E ′ satisfies the defining properties of the spine E. It follows E ⊂ E ′ = E ∗ γ. Since this holds for arbitrary γ, we obtain E = E ∗ γ.  3.5. Examples. In this subsection, we want to present some examples of operads leading to already well-known operad groups as well as to new groups to which the finiteness result of Section 4 is applicable. OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 27 3.5.1. Free operads. Only very briefly we want to remark that the operad groups associated to operads freely generated by operations of degree at least 2 correspond exactly to the so-called diagram groups defined in [25]. When considering free symmetric operads, we get symmetric versions of diagram groups which are called “braided” in [25, Definition 16.2]. The truly braided diagram groups are the ones arising from free braided operads. In particular, the operad group associated to the operad OF freely generated by one color and a single binary operation is isomorphic to Thompson’s group F . This has first been observed in [18]. Moreover, if we consider the symmetric resp. braided operad OV resp. OBV freely generated by one color and a single binary operation, we obtain Thompson’s group V resp. the braided Thompson group BV . More details on the free case can be found in [42]. 3.5.2. Suboperads of endomorphism operads. Recall that there is a planar resp. symmetric resp. braided operad End(C) naturally associated to each planar resp. symmetric resp. braided monoidal category C, called the endomorphism operad. The colors of End(C) are the objects in C and the sets of operations are given by End(C)(a1 , . . . , an ; b) = HomC (a1 ⊗ . . . ⊗ an , b) Let G be a subgroupoid of C and S be a set of higher degree operations in E := End(C) with outputs and inputs being objects of G. Then we can look at the suboperad of E generated by this data: It is the smallest suboperad O such that I(O) = G and such that the elements in S are operations in O. These suboperads are in general not free in the sense of 3.5.1 though we have only specified generators. The relations are automatically modelled by the ambient category C. Not always is the map S → T C(O) sending an operation to its transformation class a bijection onto the set of very elementary classes. However, this is true if the following conditions are satisfied: (V1 ) If θ, θ′ ∈ S with θ 6= θ′ , then [θ] and [θ′ ] are incomparable, i.e. [θ] 6≤ [θ′ ] and [θ] 6≥ [θ′ ]. In particular, they are not equal. (V2 ) The set of transformation classes represented by operations in S is closed under right multiplication with operations in G, i.e. for each θ ∈ S and γ ∈ G there is θ′ ∈ S with [θ ∗ γ] = [θ′ ]. We want to be a bit more explicit now and observe suboperads of the endomorphism operad E of the symmetric monoidal category (TOP, ⊔) where ⊔ is the coproduct (i.e. the disjoint union) of topological spaces. We call an operation (f1 , . . . , fk ) in E mono if the images of the maps fi : Xi → X are pairwise disjoint in X and the fi are injective. We call it epi if the images cover X. It is not hard to prove that if all operations in a suboperad of E are mono, then it satisfies the right cancellation property. Likewise, if all the operations are epi, then it satisfies the left cancellation property. We give an explicit example to illustrate the above procedure. Consider the unit square and the right angled triangle obtained by halving the unit square: Consider all isometries of the square and the triangle, i.e. the dihedral group D4 and Z/2Z. The disjoint union of these isometry groups forms a groupoid G lying in TOP. Consider the following subdivisions, called very elementary subdivisions: 28 WERNER THUMANN The set S has three elements, one for each sudivision: The first one maps four squares to each square in the first subdivision via coordinate-wise linear transformations. The second one maps four triangles to each triangle in the second subdivision via orientation preserving similarities. The third one maps two triangles to each triangle in the third subdivision via orientation preserving similarities. As above, the groupoid G together with the set S generate a suboperad O of the symmetric operad E = End(TOP, ⊔). The transformation classes are in one to one correspondence with subdivisions of the square or the triangle which can be obtained by iteratively applying the three subdivisions above. We have Θ1 ≤ Θ2 if and only if Θ2 can be obtained from Θ1 by performing further subdivisions. For example, we have ≤ From this it follows easily that the transformation classes represented by the very elementary subdivisions are not comparable, i.e. (V1 ) is satisfied. Furthermore, when applying an isometry of the square or the triangle to one of the operations in S, we obtain the same operation with a transformation precomposed. Thus, also (V2 ) is satisfied. It follows that the very elementary subdivisions correspond exactly to the very elementary classes of O. To find all the elementary transformation classes, we have to follow the construction in 3.14. There is exactly one minimal subdivision of the square which refines the two very elementary subdivisions of the square: Thus, this subdivision represents the only elementary class which is not very elementary. All the operations in O are clearly epi, so it satisfies the left cancellation property. Not all of them are mono, but we can change the definitions a little bit and obtain an isomorphic operad where all operations are mono: Instead of the closed square and triangle, we can consider the open square and triangle and also subdivisions into open squares and triangles. Thus, O also satisfies the right cancellation property. Moreover, we claim that it satisfies square filling. To see this, consider the following chains of subdivisions: ··· ··· These are cofinal in the sense that every subdivision of the square resp. triangle is smaller than or equal to one of the subdivisions of the first resp. second chain. From Observation 3.12 it follows that O satisfies square filling. All in all, O satisfies the cancellative calculus of fractions. ⊲ Cube cutting operads. Let N be a finite set of natural numbers greater than or equal to 2. Denote by hN i the multiplicative submonoid of N generated by the numbers in N . We say that the numbers in N are independent if, whenever a natural number n can be written as a product nr11 · · · nrkk of pairwise distinct numbers ni ∈ N , then the exponents ri are already uniquely determined by n. In OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 29 other words, N is a basis for hN i. This is satisfied for example if the numbers in N are pairwise coprime or, even stronger, if they are prime. For later reference, we record the following two trivial observations: (B1 ) No number n ∈ N is a product of other numbers in N . (B2 ) Whenever n1 , . . . , nk ∈ N are pairwise distinct numbers and n ∈ hN i is divisible by each ni in hN i, i.e. there is mi ∈ hN i with n = ni mi , then n is also divisible by the product n1 · · · nk in hN i. There are non-bases N which satisfy (B1 ) but not (B2 ), for example N = {2, 6, 7, 21}. For this N we have 6 · 7 = 42 = 2 · 21. In the same vein as above, we now construct cube cutting operads. For d ≥ 1, consider the d-dimensional unit cube and a subgroup if its group of isometries. Define this group to be the groupoid G lying in TOP. Next, we want to specify very elementary subdivisions of the cube. For each j ∈ {1, . . . , d}, let Nj ⊂ N be a set of natural numbers as in the preceding paragraph. For each such j and n ∈ Nj , there is a very elementary subdivision of the cube given by cutting it, perpendicularly to the j’th coordinate axis, into n congruent subbricks. The following are the very elementary subdivisions in the case d = 2, N1 = {2} and N2 = {3}: There is one operation in S for each such very elementary subdivision: Cubes are coordinate-wise linearly rescaled to fit into the subbricks of the subdivisions. The groupoid G together with the set S generate a suboperad O of E = End(TOP, ⊔) which we call a symmetric cube cutting operad since we will also define planar cube cutting operads below. The transformation classes are in one to one correspondence with subdivisions of the cube obtained by iteratively applying n-cuts in direction j as above. Two transformation classes are comparable if and only if one is a subdivision of the other. From (B1 ) it follows that two very elementary subdivisions are not comparable. Consequently, (V1 ) is satisfied. It is not always true that right multiplication of elements in G with operations in S yields another operation in S up to transformation. For example, a rotation of a vertically cutted square by an angle of π/2 yields a horizontally cutted square. Whether (V2 ) is satisfied or not depends on the interplay between the isometries in G and the sets Nj . For example, it is satisfied if G = 1 or if N1 = . . . = Nd . Let us always assume that G and the Nj are compatible in a way such that (V2 ) is satisfied. Then the very elementary subdivisions are in one to one correspondence with the very elementary transformation classes. We want to identify the elementary transformation classes. For each element T = (T1 , . . . , Td ) ∈ 2N1 × . . . × 2Nd of the product of the power sets such that T 6= (∅, . . . , ∅), there is a transformation class ΘT which is obtained by iteratively performing, for each j ∈ {1, . . . , d} and each n ∈ Tj , an n-cut in direction j on every subbrick. The result is independent of the order of the cuts. These classes are exactly the elementary classes. To see this, we make the following claim: If ΘT and ΘT ′ are two such classes, then ΘT ∪T ′ is the smallest class Θ satisfying ΘT ≤ Θ ≥ ΘT ′ . Here, the inclusion T ⊂ T ′ and the union T ∪ T ′ is meant to be coordinate-wise. The figure below pictures the elementary operations in the case d = 2, N1 = {2, 3} and N2 = {2, 3}. 30 WERNER THUMANN E0 E1 E2 E3 To see the above claim, we consider the case d = 1 and set N := N1 . The case d > 1 can be derived by applying the following observations coordinate-wise. Call a transformation class regular if all the subintervals in the corresponding subdivision of the unit interval have the same length. Now, let Θ be a transformation class with ΘT ≤ Θ ≥ ΘT ′ . It is not hard to find the greatest regular class Θr with Θr ≤ Θ. Since ΘT and ΘT ′ are regular, we have ΘT ≤ Θr ≥ ΘT ′ . There is a unique n ∈ hN i such that n1 is the length of the subintervals in the subdivision of Θr . Then ΘT ≤ Θr means that the product of the numbers in T divides n in hN i. In particular, each t ∈ T divides n in hN i. Likewise, each t′ ∈ T ′ divides n in hN i. It follows from (B2 ) that the product of the numbers in T ∪ T ′ divides n in hN i. This implies ΘT ∪T ′ ≤ Θr and it follows ΘT ∪T ′ ≤ Θ, q.e.d. All the operations in O are epi and O is isomorphic to a suboperad of E where all operations are mono by considering open cubes instead of closed ones. Consequently, O satisfies the left and right cancellation property. We also find a cofinal chain of subdivisions: The first subdivision in this chain is obtained by iteratively applying, for each j ∈ {1, . . . , d} and each n ∈ Nj , an n-cut in direction j on every subbrick. Then the whole chain is obtained by iterating this with every subbrick. For example, in the case d = 2, N1 = {2} and N2 = {3}, we can take the following chain: ··· Thus, O satisfies the square filling property. All in all, it satisfies the cancellative calculus of fractions. Note that the symmetric cube cutting operads are symmetric operads with transformations. When forgetting the symmetric structure on E, we obtain a planar operad Epl and we can define suboperads, which are then planar operads with transformations and which we call planar cube cutting operads, as follows: Consider the case d = 1. Set G = 1. Let N ⊂ N be a set of natural numbers as in the first paragraph. There is one very elementary subdivision of the unit interval for each n ∈ N , cutting it into n pieces of equal length. The operations in S linearly map unit intervals to the subintervals of very elementary subdivisions. This time, however, we specify the order of these maps. We require that they are ordered by their images via the natural ordering on the unit interval. Denote by O the suboperad of Epl generated by this data. Note that O is a planar operad with transformations which is degenerate in the sense that there are no degree 1 operations besides the identities. Thus, a transformation class is the same as an operation. Operations in O are in one to one correspondence with subdivision of the unit interval which are obtained by iteratively applying n-cuts for various n ∈ N . Two operations are related if and only if one is a subdivision of the other. The very OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 31 elementary operations are in one to one correspondence with the very elementary subdivisions and the elementary operations can be described just as in the case of symmetric cube cutting operads. Furthermore, O satisfies the cancellative calculus of fractions. We now look at the operad groups associated to these planar resp. symmetric cube cutting operads. Using the fact that arrows in the fundamental groupoid of a category satisfying the calculus of fractions can be represented by spans, it is easy to identify the following operad groups (where G = 1 in each case): • The Higman-Thompson groups Fn,r resp. Vn,r arise as the operad groups (based at the object represented by a disjoint union of r unit intervals) associated to the planar resp. symmetric cube cutting operads with d = 1 and N = {n}. • The groups of piecewise linear homeomorphisms of the (Cantor) unit   inter1 1 val F r, Z[ n1 ···n ], hn , . . . , n i resp. G r, Z[ ], hn , . . . , n i consid1 k 1 k n1 ···nk k ered in [39] arise as the operad groups (based at the object represented by a disjoint union of r unit intervals) associated to the planar resp. symmetric cube cutting operads with d = 1 and N = {n1 , . . . , nk }. • The higher dimensional Thompson groups nV (see [4]) arise as the operad groups (based at the object represented by the n-dimensional unit cube) associated to the symmetric cube cutting operads with d = n and Nj = {2} for all j = 1, . . . , d. ⊲ Local similarity operads. In [26] groups were defined which act in a certain way on compact ultrametric spaces. We recall the definition of a finite similarity structure: Definition 3.20. Let X be a compact ultrametric space. A finite similarity structure SimX on X consists of a finite set SimX (B1 , B2 ) of similarities B1 → B2 for every ordered pair of balls (B1 , B2 ) such that the following axioms are satisfied: • (Identities) Each SimX (B, B) contains the identity. • (Inverses) If γ ∈ SimX (B1 , B2 ), then also γ −1 ∈ SimX (B2 , B1 ). • (Compositions) If γ1 ∈ SimX (B1 , B2 ) and γ2 ∈ SimX (B2 , B3 ), then also γ1 γ2 ∈ SimX (B1 , B3 ). • (Restrictions) If γ ∈ SimX (B1 , B2 ) and B3 ⊂ B1 is a subball, then also γ|B3 ∈ SimX (B3 , γ(B3 )). Here, a similarity γ : X → Y of metric spaces is a homeomorphism such that there is a λ > 0 with d(γ(x1 ), γ(x2 )) = λd(x1 , x2 ) for all x1 , x2 ∈ X. Let SimX be a finite similarity structure on the compact ultrametric space X. A homeomorphism γ : X → X is said to be locally determined by SimX if for every x ∈ X there is a ball x ∈ B ⊂ X such that γ(B) is a ball and γ|B ∈ SimX (B, γ(B)). The set of all such homeomorphisms forms a group which we denote by Γ(SimX ). To a finite similarity structure SimX , we can associate a symmetric operad with transformations O, a suboperad of E = End(TOP, ⊔), and reobtain the groups Γ(SimX ) as operad groups. We do this by appealing to the procedure above. Two balls B1 , B2 in X are called SimX -equivalent if SimX (B1 , B2 ) 6= ∅. Choose one ball in each SimX -equivalence class (the isomorphism class of the operad we will define does not depend on this choice). Consider the groupoid G lying in TOP which is the disjoint union of the groups SimX (B, B) with B a chosen ball. The set S contains one operation in E for each chosen ball B: Consider the maximal proper subballs A1 , . . . , Ak of B. For each i = 1, . . . , k choose a similarity γi ∈ SimX (Bi , Ai ) where Bi is the unique chosen ball equivalent to Ai . Now the operation associated to B maps the chosen balls Bi to Ai using the similarities γi . The data (G, S) generates a suboperad O of E. 32 WERNER THUMANN Each transformation class in O is uniquely determined by a chosen ball together with a subdivision into subballs. Two such subdivisions are related if and only if one can be obtained from the other by further subdividing the subballs. Condition (V1 ) is trivially true since the operations in S have different codomains. A similarity in SimX (B, B) is an isometry γ : B → B which permutes the maximal proper subballs and the restriction of γ to a maximal proper subball is again a similarity in SimX . It follows that right multiplication of an element in G with an operation in S gives the same operation modulo transformation. In particular, (V2 ) is satisfied. Thus, the very elementary classes of O are in one to one correspondence with the chosen balls together with their subdivisions into the proper maximal subballs. Since every two very elementary classes have different colors as codomains, there are no elementary classes which are not very elementary. All the operations in O are both mono and epi. Thus, it satisfies both left and right cancellation. It also satisfies square filling and thus the cancellative calculus of fractions since we again find a cofinal sequence of subdivisions for each chosen ball B: Define the chain inductively by subdividing each subball by their maximal proper subballs. Using the fact that arrows in the fundamental groupoid of a category satisfying the calculus of fractions can be represented by spans, it is not hard to establish an isomorphism π1 (O, X) ∼ = Γ(SimX ) where we assume that X is the chosen ball of its SimX -equivalence class. 3.5.3. Ribbon Thompson group. To close this subsection, we briefly want to discuss an operad yielding an operad group RV which naturally fits into the sequence of well-known groups F, V, BV . First observe the free braided operad with transformations generated by a single color, the group Z as groupoid of degree 1 operations and a single binary operation. The components of the corresponding groupoid of transformations are the groups Bn ⋉ Zn . Think of elements of these groups as ribbons which can braid and twist. A single twist corresponds to a generator in Z. Then we impose the following relation on this operad: = The caret corresponds to the generating binary operation. The operations in this braided operad with transformations are in one to one correspondence with binary trees together with braiding and twisting ribbons attached to the leaves. The transformation classes are in one to one correspondence with binary trees. The only very elementary class is represented by the binary tree with two leaves (the caret). There are no strictly elementary classes. It satisfies the cancellative calculus of fractions. Consequently, elements in the associated operad group based at 1 can be represented by pairs of binary trees where the leaves are connected by braiding and twisting ribbons. Composition is modelled by concatenating two such tree pair diagrams, removing all dipoles formed by carets and then applying the above relation in order to obtain another tree pair diagram. 4. A topological finiteness result Before we state the main theorem of this article, we have to introduce two more definitions. + Definition 4.1. We say that a group G is of type F∞ if G and all of its sub+ groups are of type F∞ . We then say that a groupoid is of type F∞ (or F∞ ) if its + automorphism groups are of type F∞ (or F∞ ). OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 33 + For example, all finite groups and Z are of type F∞ . Definition 4.2. Let O be a (symmetric/braided) operad with transformations. An object X in S(O) is called reduced if no non-transformation arrow in S(O) has X as its domain. We call O color-tame if the degree of all reduced objects is bounded from above. Note that if O is monochromatic and there exists at least one higher degree operation, then it is automatically color-tame. Theorem 4.3. Let O be a planar or symmetric or braided operad with transformations. Assume that O has only finitely many colors and is color-tame. Assume further that O satisfies the cancellative calculus of fractions, is of finite type and + I(O) is a groupoid of type F∞ . Then for every object X in S(O) the operad group π1 (O, X) is of type F∞ . Question 4.4. Can the requirement color-tameness be dropped? Remark 4.5. There is also a version of this theorem for free operads: Assume that O is free as a (symmetric/braided) operad with transformations, has only finitely many colors, is color-tame, finitely generated and that I(O) is a groupoid of type F∞ . Then π1 (O, X) is of type F∞ . The proof of the free case is parallel to the proof in this article (with small modifications and additions, see [42]). Parts of the theorem for the free case are also proven in [14, 15] (in the language of diagram groups). Concerning the examples in Subsection 3.5, it should be noted that the free operads OF , OV and OBV also satisfy the conditions in Theorem 4.3. The main tool to prove this theorem is, as usual, Brown’s criterion [7]. More precisely, we will need the following special version of it: Theorem 4.6. Let Γ be a discrete group and X be a contractible Γ-CW-complex with isotropy groups of type F∞ . Assume we have a filtration (Xn )n∈N of X such that each Xn is a Γ-CW-subcomplex of finite type and such that the connectivity of the pairs (Xn , Xn−1 ) tends to infinity as n → ∞. Then Γ is of type F∞ . We sketch a geometric proof of this criterion using a blow-up construction of Lück [29, Lemma 4.1]: For each conjugacy class [H] of isotropy groups of X, we choose a free contractible H-CW-complex EH of finite type. Using these, we can construct a free Γ-CW-complex F (X) which is homotopy equivalent to X. The idea is to replace the equivariant cell Γ/H × Dn in X by the Γ-CW-complex (Γ ×H EH) × Dn . More details can be found in the proofs of [29, Lemma 4.1 and Theorem 3.1]. We can also apply this construction to each Γ-CW-subcomplex Xn and obtain free Γ-CW-complexes F (Xi ) homotopy equivalent to Xi and of finite type. For each n ∈ N we find k ∈ N big enough so that Xk and hence F (Xk ) is n-connected. By equivariantly gluing cells in dimensions n + 2 and higher, we obtain a free contractible Γ-CW-complex with finitely many equivariant cells up to dimension n + 1. Consequently, Γ is of type Fn+1 . Since n was arbitrary, it follows that Γ is of type F∞ (see e.g. [23, Proposition 7.2.2]). The remaining subsections are devoted to the proof of Theorem 4.3. 4.1. Three types of arc complexes. Let d ∈ {1, 2, 3} and C be a set of colors. Let X = (c1 , . . . , cn ) be a word in the colors of C. An archetype consists of a unique identifier together with a word in the colors of C of length at least 2. Let A be a set of archetypes. To this data, we will associate a simplicial complex AC d (C, A; X). Consider the points 1, . . . , n ∈ R and embed them into Rd via the first component embedding R → Rd . Color these points with the colors in the word X (i.e. the point 34 WERNER THUMANN i is colored with the color ci ) and call them nodes. Denote the set of nodes by N . A link is the image of an embedding γ : [0, 1] → Rd such that γ(0) and γ(1) are nodes. Note that a link may contain more than two nodes. Two links connecting the same set of nodes are equivalent if there is an isotopy of Rd \ N which takes one link to the other. An equivalence class of links is called an arc. Note that in the case d = 1, arcs and links are the same since each arc is represented by a unique link. We say that two arcs are disjoint if there are representing links which are disjoint. In the cases d = 2, 3, we can choose representing links of a collection of arcs such that the links are in minimal position: Lemma 4.7. Assume d = 2 or d = 3. Let a0 , . . . , ak be arcs with ai 6= aj for each i 6= j. Then there are representing links α0 , . . . , αk such that |αi ∩ αj | is finite and minimal for each i 6= j. Proof. In the case d = 3, we can always find representing links which only intersect at nodes, if at all. The case d = 2 is a bit more complicated. We use the ideas from [9, Lemma 3.2]: Consider the nodes as punctures in the plane R2 . Then we can find a hyperbolic metric on that punctured plane. Now define αi to be the geodesic within the class ai .  A link connecting a set of nodes M is called admissible if there is an isotopy of Rd \ M taking the link into the image of the first component embedding R → Rd . In the case d = 1, this is vacuous. In the case d = 2, this implies in particular that, when travelling the link starting from the lowest node, the nodes are visited in ascending order. This last property is even equivalent to being admissible in the case d = 3. An arc is called admissible if one and consequently all of its links are admissible. Now label an admissible arc with the identifier of an archetype in A. We require that the word formed by the colors of the connected nodes (in ascending order) equals the color word of the archetype. Call such a labelled admissible arc an archetypal arc. The vertices of AC d (C, A; X) are the archetypal arcs. Two vertices are joined by an edge if the corresponding arcs are disjoint. This determines the complex as a flag complex. A k-simplex is therefore a set of k + 1 pairwise disjoint archetypal arcs. We call this an archetypal arc system. It follows from Lemma 4.7 above that if {a0 , . . . , ak } is an archetypal arc system, then we always find representing links αi of ai such that the αi are pairwise disjoint. The following are examples of 2-simplices in the cases d = 1, 2, 3 (where we have omitted the labels on the arcs). The following are non-examples of simplices in the case d = 2. In the first diagram, the two arcs are not disjoint and in the second diagram, the arc is not admissible. However, the second diagram would represent an admissible arc in the case d = 3. OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 35 Definition 4.8. Let C be a set of colors and A be a set of archetypes. A word in the colors of C is called reduced if it admits no archetypal arc on it. The set of archetypes A is called tame if the length of all reduced words is bounded from above. The length of an archetype is the length of its color word. The set of archetypes A is of finite type if the length of all archetypes is bounded from above. Theorem 4.9. Let d ∈ {1, 2, 3}. Let C be a set of colors and A be a set of archetypes. Assume that A is tame and of finite type. Let mr be the smallest natural number greater than the length of any reduced color word and ma be the maximal length of archetypes in A. Define   l − mr −1 νκ (l) := κ Let X be a word in the colors of C and denote by lX the length of X. Then the complex AC d (C, A; X) is νκd (lX)-connected where κ1 := 2ma + mr − 2 κ2 := 2ma − 1 κ3 := 2ma − 1 For the proof in the case d = 2 we have to pass to a slightly larger class of complexes: Instead of R2 we consider links and arcs in the punctured plane S = R2 \ {p1 , . . . , pl } with finitely many punctures pi ∈ R2 disjoint from the nodes. Here, we define two links connecting the same set of nodes to be equivalent if they differ by an isotopy of S \ N and a link connecting a set of nodes M to be admissible if there is an isotopy of R2 \ M taking the link into the image of the first component embedding R → R2 . Note that in the latter case, we require an isotopy of R2 \ M and not of S \ M , i.e. we allow the links to be pulled over punctures. We denote the corresponding complex of archetypal arc systems again by AC d (C, A; X), suppressing the additional data of punctures since, as we will see, Theorem 4.9 is still valid for this larger class of complexes. 4.1.1. Proof of the connectivity theorem. The proof essentially consists of slightly modified ideas from [9, Subsection 3.3]. We induct over the length lX of X. The induction start is lX ≥ mr . This implies that X is not reduced and thus admits an archetypal arc on it. It follows that AC d (C, A; X) is non-empty, i.e. (−1)-connected. For the induction step, assume lX ≥ mr + κd . We look at the cases d = 1, 2, 3 separately, starting with the case d = 2 since it is the hardest one. ⊲ The two-dimensional case. Choose a vertex of AC 2 := AC 2 (C, A; X) represented by an archetypal arc b. Let v1 < . . . < vt be the nodes connected by b. Let AC 02 be the full subcomplex of AC 2 spanned by the archetypal arcs which do not meet the nodes vi . We want to estimate the connectivity of the pair (AC 2 , AC 02 ) using the Morse method for simplicial complexes (see e.g. Subsection 2.10). Let a be an archetypal arc. Define ( 1 if a meets vi si (a) := 0 else 36 WERNER THUMANN for each i = 1, . . . , t. Now set  h(a) := s1 (a), . . . , st (a) Note that the right side is a sequence of t numbers in {0, 1}. Interpret these sequences as binary numbers and order them accordingly. Then h is a Morse function building up AC 2 from AC 02 since archetypal arcs with h-value equal to (0, . . . , 0) are exactly the archetypal arcs in AC 02 and two archetypal arcs with the same h-value different from (0, . . . , 0) are not connected by an edge. We want to inspect the descending links with respect to this Morse function h. Let a be an archetypal arc with Morse height greater than (0, . . . , 0). Find the smallest τ ∈ {1, . . . , t} such that sτ (a) = 1. It is not hard to prove that lk↓ (a) is the full subcomplex of AC 2 spanned by archetypal arcs disjoint from a and not meeting any vi with i < τ . Let X ′ be the color word which is obtained from X by removing the colors corresponding to nodes which are contained in a and to the nodes vi with i < τ . Then we see that lk↓ (a) is isomorphic to AC 2 (C, A; X ′ ) with an additional puncture corresponding to a and further additional punctures corresponding to the nodes vi with i < τ . By induction, it follows that lk↓ (a) is νκ2 (lX ′ )-connected. Denote by la the length of a, i.e. the number of nodes it meets. Then we can estimate lX ′ = lX − la − (τ − 1) ≥ lX − la − t + 1 ≥ lX − ma − t + 1 ≥ lX − 2ma + 1 Thus, lk↓ (a) is νκ2 (lX − 2ma + 1)-connected. Consequently, by the Morse method, the connectivity of the pair (AC 2 , AC 02 ) is νκ2 (lX − 2ma + 1) + 1 = νκ2 (lX) because of κ2 = 2ma − 1. The second step of the proof consists of showing that the inclusion ι : AC 02 → AC 2 induces the trivial map in πm for m ≤ νκ2 (lX). It then follows from the long exact homotopy sequence of the pair (AC 2 , AC 02 ) that AC 2 is νκ2 (lX)-connected which completes the proof in the case d = 2. Let ϕ : S m → AC 02 be a map with m ≤ νκ2 (lX). We have to show that ψ := ϕ ∗ ι : S m → AC 2 is homotopic to a constant map. Think of S m as the boundary of an (m + 1)-simplex. By simplicial approximation [37, Theorem 3.4.8] we can subdivide S m and homotope ϕ to a simplicial map. So we will assume in the following that ϕ is simplicial. Next, we want to apply [9, Lemma 3.9] in order to subdivide S m further and homotope ψ to a simplexwise injective map. This means that whenever vertices v 6= w in S m are joined by an edge, then ψ(v) 6= ψ(w). To apply the lemma, we have to show that the link of every k-simplex σ in AC 2 is (m − 2k − 2)-connected. So let a0 , . . . , ak be pairwise disjoint archetypal arcs representing a k-simplex σ. The link of this simplex is the full subcomplex spanned by the archetypal arcs which are disjoint from every ai . Deleting every color corresponding to nodes which are contained in one of the ai from X, we obtain a color word X ′ and it is easy to see that the link of σ is isomorphic to AC 2 (C, A; X ′ ) with one additional puncture for each ai . By induction, we obtain that lk(σ) is νκ2 (lX ′ )-connected. We have the estimate lX ′ ≥ lX − (k + 1)ma and thus  νκ2 (lX ′ ) ≥ νκ2 lX − (k + 1)ma   lX − (k + 1)ma − mr = −1 2ma − 1 OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 37  (k + 1)ma lX − mr −1 − 2ma − 1 2ma − 1   lX − mr (2k + 2)(2ma − 1) ≥ − −1 2ma − 1 2ma − 1 = νκ2 (lX) − (2k + 2) =  ≥ m − 2k − 2 So the hypothesis of the lemma is satisfied and we will assume in the following that ψ is simplexwise injective. We now want to show that ψ can be homotoped so that the image is contained in the star of b. Since the star of a vertex is always contractible, this will finish the proof. We will homotope ψ by moving single vertices of S m step by step, eventually landing in the star of b. Consider the vertices a1 , . . . , al of ψ(S m ) which do net yet lie in the star of b, i.e. which are not disjoint to b. Choose representing links αi of ai and β of b such that the system of links (β, α1 , . . . , αl ) is in minimal position as in Lemma 4.7. Note the little subtlety that archetypal arcs may have the same underlying arc but are different because they have different labels. In this case, homotope the corresponding links a little bit so that they intersect only at nodes. Note also that each αi intersects β, but not at nodes since each ai comes from AC 02 . Last but not least, we can assume that whenever p is an intersection point of β with one of the αi , then there is at most one αi meeting the point p. Now look at the intersection point p of one of the αi with β which is closest to v1 along β. Write α for the link which intersects β at this point and a for the corresponding arc. α vj w vj+1 w′ β Choose a vertex x in S m which maps to a via ψ. Define another link α′ as follows: Let j be such that the intersection point p lies on the segment of β connecting vj with vj+1 . Denote by w < w′ the nodes such that p lies on the segment of α connecting w with w′ . Now push this segment of α along β over the node vj such that α and α′ bound a disk whose interior does not contain any puncture or node other than vj . α′ β Note that α′ is still admissible. Denote by a′ the archetypal arc with link α′ and the same label as a. Our goal is now to homotope ψ to a simplicial map ψ ′ such that ψ ′ (x) = a′ and ψ ′ (y) = ψ(y) for all other vertices y. Iterating this procedure often enough, we arrive at a map ψ ∗ homotopic to ψ such that ψ ∗ (y) ∈ st(b) for each vertex y. For example, the next step would be to move x to the vertex α′′ : 38 WERNER THUMANN α′′ β By simplexwise injectivity, no vertex of lk(x) is mapped to a. Furthermore, a vertex of AC 2 in the image of ψ disjoint to a must also be disjoint to a′ because we have chosen α such that no other αi intersects β between p and v1 . From these observations, it follows that  ψ lk(x) ⊂ lk(a) ∩ lk(a′ ) This inclusion enables us to define a simplicial map ψ ′ : S m → AC 2 with ψ ′ (x) = a′ and ψ ′ (y) = ψ(y) for all other vertices y. Let X ′ be the color word obtained from X by removing all colors corresponding to nodes which are contained in a or to the node vj . Then lk(a) ∩ lk(a′ ) is isomorphic to AC 2 (C, A; X ′ ) with an additional puncture corresponding to the disk bounded by α ∪ α′ . Thus, by induction, it is νκ2 (lX ′ )-connected. We have the estimate lX ′ ≥ lX − ma − 1 and therefore  νκ2 (lX ′ ) ≥ νκ2 lX − ma − 1   lX − ma − 1 − mr −1 = 2ma − 1   ma + 1 lX − mr −1 − = 2ma − 1 2ma − 1   lX − mr 2ma − 1 ≥ − −1 2ma − 1 2ma − 1 = νκ2 (lX) − 1 ≥m−1 Since lk(x) is an (m − 1)-sphere, this connectivity bound for lk(a) ∩ lk(a′ ) implies that the map ψ|lk(x) : lk(x) → lk(a) ∩ lk(a′ ) can be extended to the star st(x) of x which is an m-disk. So we obtain a map ϑ : st(x) → lk(a) ∩ lk(a′ ) coinciding with ψ on the boundary lk(x). We can now homotope ψ|st(x) rel lk(x) to ϑ within st(a) and further to ψ ′ within st(a′ ). This finishes the proof of the theorem in the case d = 2. ⊲ The three-dimensional case. Choose an archetypal arc b connecting the nodes v1 < . . . < vt and let AC 03 be the full subcomplex of AC 3 := AC 3 (C, A; X) spanned by the archetypal arcs which do not meet the nodes vi . With a very similar Morse argument as in the case d = 2 above, we can show that the pair (AC 3 , AC 03 ) is νκ3 (lX)-connected. Again, the second step consists of showing that the inclusion ι : AC 03 → AC 3 induces the trivial map in πm for m ≤ νκ3 (lX). This is much easier in the case d = 3: Let ϕ : S m → AC 03 be a map and assume without loss of generality that it is simplicial. But then the map ψ := ϕ ∗ ι : S m → AC 3 already lies in the star st(b) of b since an archetypal arc not meeting any of the nodes vi is already disjoint to b. Consequently, ψ can be homotoped to a constant map and this concludes the proof in the case d = 3. ⊲ The one-dimensional case. Choose an archetypal arc b connecting the nodes v1 < . . . < vt such that the color word formed by the first r nodes w < v1 is reduced. Let AC 01 be the full subcomplex of AC 1 := AC 1 (C, A; X) spanned by the archetypal arcs which do not meet the nodes vi . This condition is equivalent to not OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 39 meeting any nodes w ≤ vt . These are simply the first s nodes w1 < . . . < ws where s = r + t. In other words, wi is the point i ∈ R colored with the color ci from X. For each archetypal arc a not contained in AC 01 there exists a unique 1 ≤ q ≤ s such that a meets wq but not w1 , . . . , wq−1 . In this case, define h(a) = −q. Then h is a Morse function building up AC 1 from AC 01 . So let a be such an archetypal arc. Let X ′ be the color word obtained from X by removing all colors corresponding to the nodes contained in a and to the nodes w1 , . . . , wq−1 . Then the descending link lk↓ (a) is isomorphic to AC 1 (C, A; X ′ ) and by induction, it is νκ1 (lX ′ )-connected. We can estimate lX ′ = lX − la − (q − 1) = lX − la − q + 1 ≥ lX − ma − q + 1 ≥ lX − ma − (ma + mr − 1) + 1 = lX − 2ma − mr + 2 Thus, lk↓ (a) is νκ1 (lX − 2ma − mr + 2)-connected. Consequently, by the Morse method, the connectivity of the pair (AC 1 , AC 01 ) is νκ1 (lX − 2ma − mr + 2) + 1 = νκ1 (lX) because of κ1 = 2ma + mr − 2. Just as in the case d = 3, one can show that the inclusion ι : AC 01 → AC 1 induces the trivial map in πm for m ≤ νκ1 (lX). This proves the theorem in the case d = 1. Remark 4.10. The method used in the proof of [14, Proposition 4.11] yields the better connectivity νκ (lX) with κ = ma + mr − 1 for the case d = 1. 4.2. A contractible complex. From now on, let O be an operad as in Theorem 4.3. Furthermore, let X be an object in S := S(O). By abuse of notation, the connected component of S containing the object X will again be denoted by S. Furthermore, we abbreviate Γ := π1 (O, X). As already noted above, the strategy to prove Theorem 4.3 is to apply Brown’s criterion 4.6 to a suitable contractible complex on which the group in question acts. Consider the universal covering category U := UX (S) of S based at X. We claim: U is a generalized poset and contractible. This follows from Proposition 2.13. The first claim together with the remarks after Definition 2.8 implies that we can form the quotient category U/G where G is the subgroupoid of U consisting of the transformations in S (lifted to U) and that U/G is a poset, the underlying poset of U. Recall that Γ acts on U which is encoded in a functor Γ → CAT sending the unique object of Γ to U. One can easily see that this functor induces a functor Γ → CAT sending the unique object to U/G. In other words, Γ also acts on U/G. More concretely, an arrow f : X → X in Γ acts on an object [g : X → Y ] of U/G from the right via [g] · f := [f −1 g]. This will be the action to which we want to apply Brown’s criterion. Since U/G is homotopy equivalent to U, the second claim implies that also U/G is contractible. So the first condition in Brown’s criterion is satisfied. 4.3. Isotropy groups. We continue to verify the conditions in Brown’s criterion for the action of Γ on U/G. In this subsection, we show that cell stabilizers are of type F∞ . First, we note that U/G is indeed a Γ-CW-complex. This follows from the following general remark. Remark 4.11. Let G be a group acting on a category C. An element g ∈ G fixing a cell setwise already fixes its vertices and so fixes the cell pointwise. Consequently, 40 WERNER THUMANN a category with an action of a discrete group G is a G-CW-complex. If C is a generalized poset, a cell stabilizer is equal to the intersection of the vertex stabilizers of that cell. In the following, we abbreviate T := T (O) and I := I(O). Lemma 4.12. The groupoid T formed by the transformations in S is of type F∞ . Proof. By assumption, the groupoid I formed by the degree 1 operations is of type F∞ . The groupoid T is Mon(I) in the planar case, Sym(I) in the symmetric case and Braid(I) in the braided case (see Subsection 2.8 for the definitions of these categories). Choose a color in each component of I. Let Y be an object in T . We have to show that AutT (Y ) is of type F∞ . We can assume without loss of generality that Y decomposes as a tensor product of chosen colors: Y = c1 ⊗ . . . ⊗ ck . In the planar case we have AutMon(I) (Y ) = AutI (c1 ) × . . . × AutI (ck ) and the claim follows because the AutI (ci ) are of type F∞ . For the symmetric and braided case, first assume that all the colors ci are equal to one chosen color c. In the symmetric case, we then have AutSym(I) (Y ) = Sk ⋉ AutI (c)k where Sk , the symmetric group on k strands, acts by permutation of the factors. More precisely, we have the group homomorphism   ϕ : Sk → Aut(Gk ) σ 7→ (g1 , . . . , gk ) 7→ (g1⊲σ−1 , . . . , gk⊲σ−1 ) which gives a right action of Sk on Gk by the definition g · σ = g⊲(σ⊲ϕ). The multiplication in the semidirect product Sk ⋉ Gk is then given by  (σ, g) ∗ (σ ′ , g ′ ) := σ ∗ σ ′ , (g · σ ′ ) ∗ g ′ Since Sk is a finite group, it is also of type F∞ . Since semidirect products of type F∞ groups are of type F∞ [23, Exercise 1 on page 176 and Proposition 7.2.2], it follows that AutSym(I) (Y ) is of type F∞ . In the braided case we have AutBraid(I) (Y ) = Bk ⋉ AutI (c)k where Bk , the braid group on k strands, acts via permutation of the factors through the projection Bk → Sk . The braid groups Bk are of type F∞ [38, Theorem A]. As above, it follows that AutBraid(I) (Y ) is of type F∞ . Remains to handle the case where not all the colors ci lie in the same component of I. Denote by Bk′ the finite index subgroup of Bk consisting of the elements σ with the property ci⊲σ = ci . Since different ci are not connected by an isomorphism in I, we now have  AutBraid(I) (Y ) = Bk′ ⋉ AutI (c1 ) × .. × AutI (ck ) where Bk′ still acts by permuting the factors. This action is well-defined due to the definition of Bk′ . Recall that a group is of type F∞ if and only if a finite index subgroup is of type F∞ [23, Corollary 7.2.4]. It follows that Bk′ and thus AutBraid(I) (Y ) is of type F∞ . The symmetric case can be treated similarly.  Lemma 4.13. Let P be an object in U/G. Then the stabilizer subgroup StabΓ (P) is of type F∞ . Proof. Fix an arrow p : X → Y in π1 (S) which represents the object P in U/G, i.e. [p] = P. Let γ ∈ Γ fix the point P. This means [γ −1 p] = [p] · γ = [p]. It follows that there is some transformation t : Y → Y such that γ −1 p = pt. This is equivalent to p−1 γp = t−1 which implies that p−1 γp is an element in AutT (Y ). OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 41 Conversely, for τ a transformation in AutT (Y ), the element pτ p−1 is contained in StabΓ (P). Thus, the map StabΓ (P) → AutT (Y ) γ 7→ p−1 γp is an isomorphism with inverse given by τ 7→ pτ p−1 . Since AutT (Y ) is of type F∞ by the previous lemma, the claim follows. Note that this isomorphism depends on the choice of p. However, two such choices differ by a transformation τ and the two corresponding isomorphisms differ by conjugation with τ .  We say that two operations θ1 and θ2 are two-sided transformation equivalent if there are transformations α, γ such that θ2 = α ∗ θ1 ∗ γ. Proposition 4.14. The stabilizer subgroups of cells in U/G are of type F∞ . Proof. In the following, we restrict ourselves to the braided case. The planar and symmetric cases are similar and simpler. We first choose a color in each connected component of I. Next, we choose an operation in each two-sided transformation class such that the output of the chosen operation is a chosen color. A non-degenerate cell in the geometric realization of U/G is a sequence of composable non-trivial arrows in U/G P0 ǫ0 ǫ1 / P1 / ··· ǫk−1 / Pk Let pk : X → Yk be a representing path of Pk such that Yk = c1 ⊗ . . . ⊗ cl is a tensor product of chosen colors. In the proofs of Lemmas 4.12 and 4.13, we have seen that pk induces an isomorphism  ϕ : StabΓ (Pk ) → Bl′ ⋉ AutI (c1 ) × .. × AutI (cl ) Choose some Pi =: P different from Pk and observe the arrow ǫ : P → Pk which is the composition of the ǫj in between. Choose a representing path p : X → Y of P. Then there is exactly one arrow e : Y → Yk representing ǫ. One can compose p and pk with transformations η and λ such that λ : Yk → Yk is a tensor product of degree 1 operations λi : ci → ci and e is a tensor product of chosen operations. Write p′k = pk λ for the new representative of Pk . To p′k corresponds another isomorphism  ϕ′ : StabΓ (Pk ) → Bl′ ⋉ AutI (c1 ) × .. × AutI (cl ) which differs from ϕ by conjugation with λ. Denote the new representative pη of P again by p. Now let γ ∈ StabΓ (Pk ). Then γ fixes also P, i.e. P · γ = P, if and only if [p′k e−1 ] = [p] = [p] · γ = [γ −1 p] = [γ −1 p′k e−1 ] −1 −1 ′ −1 γ pk e ] ′ −1 −1 [pk tγ e ] = [p′k p′k = −1 where we have set tγ := p′k γp′k , an element in the image of the isomorphism ϕ′ . Therefore, we have to identify all such tγ which satisfy this equation. In other words, we look for all tγ such that there is a transformation τ with etγ = τ e Roughly speaking, we look for all tγ which can be pulled through e from the codomain to the domain. 42 WERNER THUMANN For better readability, we assume without loss of generality that the colors ci are all equal to one color c. In particular, the codomains of ϕ and ϕ′ are of the form Bl ⋉ AutI (c)l . Then write e = θ1 ⊗ . . . ⊗ θl where the θi are chosen operations with codomain the chosen color c. Define Hi to be the subgroup of AutI (c) consisting of elements h which can be pulled through the operation θi , i.e. there exists a transformation τ with θi h = τ θi . Furthermore, let Bl∗ be the finite index subgroup of Bl consisting of the elements σ with the property θi⊲σ = θi . Denote by StabΓ (P, Pk ) the subgroup of StabΓ (Pk ) which also fixes P. Then the isomorphism ϕ′ restricts to an isomorphism ϕ′P : StabΓ (P, Pk ) → Bl∗ ⋉ (H1 × . . . × Hl ) =: ΛP where the subgroup Bl∗ still acts via permutation of the factors and this is welldefined due to the definition of Bl∗ . The proof of this is straightforward and uses the fact that two two-sided transformation equivalent θi must be equal. Recall that ϕ′ differs from ϕ by conjugation with λ. So the image of StabΓ (P, Pk ) under ϕ is its image under ϕ′ conjugated with λ. More precisely, ϕ restricts to an isomorphism ϕP : StabΓ (P, Pk ) → λΛP λ−1 =: ΩP Consider the pure braid group Pl which is a finite index subgroup of Bl . It is also a finite index subgroup of Bl∗ . Recall that we have λ = λ1 ⊗ . . . ⊗ λl where the λi are degree 1 operations. We have   λ Pl ⋉ (H1 × . . . × Hl ) λ−1 = λ Pl × (H1 × . . . × Hl ) λ−1  = Pl × λ1 H1 λ1−1 × . . . × λl Hl λ−1 l  = Pl × H1P × . . . × HlP where HiP := λi Hi λ−1 is isomorphic to Hi . This is a finite index subgroup of ΩP . i Remains to consider the case when γ ∈ StabΓ (Pk ) fixes more than one additional vertex Pi . For this we have to show that the intersection ΩP0 ∩ . . . ∩ ΩPk−1 ⊂ Bl ⋉ AutI (c)l is of type F∞ . For better readability, we assume without loss of generality that k = 2. Then the last statement is equivalent to     Pl × H1P0 × . . . × HlP0 ∩ Pl × H1P1 × . . . × HlP1 =    Pl × H1P0 ∩ H1P1 × . . . × HlP0 ∩ HlP1 being of type F∞ since it is a finite index subgroup. This is true because Pl is of type F∞ and all the groups HiP0 ∩ HiP1 are of type F∞ . The latter statement is + . true because the groups HiP0 ∩ HiP1 are subgroups of AutI (c) which is of type F∞ This completes the proof of the proposition.  4.4. Finite type filtration. To apply Brown’s criterion to the Γ-CW-complex U/G, we need a filtration by Γ-CW-subcomplexes (U/G)n which are of finite type. Observe that the degree function on S induces degree functions on U and U/G. Define Sn resp. Un resp. (U/G)n to be the full subcategories spanned by the objects of degree at most n. Note that we have Un /Gn = (U/G)n where Gn = G ∩ Un . In the following, we want to show that (U/G)n only has finitely many Γ-equivariant cells in each dimension. Choose one operation in each very elementary transformation class and denote the resulting set of operations by S. By the assumptions in Theorem 4.3, S is a finite set. OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 43 Observation 4.15. Let θ ∈ S and γ be a degree 1 operation such that θ ∗γ is defined. Then, by Proposition 3.19, θ ∗ γ is again very elementary and there is a θ′ ∈ S and a transformation τ with θ ∗ γ = τ ∗ θ′ . Denote by Ω the set of all identity operations together with all operations of degree at most n which are obtained by partially composing operations in S. Note that Ω is finite because S is finite and there are only finitely many colors by assumption. Denote by Λ the set of arrows in Sn which are obtained by taking tensor products of operations in Ω. Again, the set Λ is finite. Let Λ∗p ⊂ Λp be the subset of p-tuples of composable arrows in Λ. We claim that there is a surjective function   Λ∗p ։ p-cells in (U/G)n Γ which proves that there are only finitely many Γ-equivariant cells in (U/G)n . Let (e0 , . . . , ep−1 ) ∈ Λ∗p . Choose a path p0 : X → dom(e0 ). Define paths pk : X → dom(ek ) by the composite pk := p0 e0 . . . ek−1 . The pi represent objects Pi and the ei represent arrows ǫi : Pi → Pi+1 in (U/G)n . Thus, the sequence ǫ0 , . . . , ǫp−1 gives a p-cell in (U/G)n . This p-cell surely depends on the choice of p0 but two such choices give equivalent p-cells modulo the action of Γ. So we get a well-defined function as above. Remains to show that this function is indeed surjective. Consider a p-cell in (U/G)n in the form of a string ǫ ǫ ǫp−1 1 0 · · · −−−→ Pp P1 −→ P0 −→ of composable arrows in (U/G)n . For each Pi we can choose representatives Pi in Un . Then each ǫi is represented by a unique arrow ei : Pi → Pi+1 in Un . We now want to change these representatives so that each ei lies in Λ. Start with the last arrow ep−1 = [σ, Θ]. Let T be the set of operations of the form τ ∗ θ where τ is a transformation and θ ∈ S. In other words, T is the set of all very elementary operations. Each higher degree operation θ in the sequence Θ can be written, up to transformation, as a partial composition of operations in T (see the remarks after Definition 3.16). It follows θ = s ∗ ψ where s is a transformation and ψ is an operation decomposable into operations of the form (γ1 , . . . , γk ) ∗ ξ with ξ ∈ S and γi of degree 1. Using Observation 4.15, we can pull the degree 1 operations to the domain of ψ, starting with the rightmost degree 1 operations, and obtain θ = s ∗ ψ where s is a transformation and ψ is an operation decomposable into operations of S. We now have ep−1 = τ ∗Ψ where τ is some transformation and Ψ is simply a tensor product of identities or higher degree operations decomposable into operations of S. By changing the representives Pp−1 , ep−1 and ep−2 in their respective classes modulo the subgroupoid G, we can assume τ = id and thus that ep−1 lies in Λ. We can now repeat this argument with ep−2 and then with ep−3 and so forth until we have changed each ei to lie in Λ. This proves surjectivity. 4.5. Connectivity of the filtration. It remains to show the connectivity statement in Brown’s criterion, i.e. we have to show that the connectivity of the pair  (U/G)n , (U/G)n−1 tends to infinity as n → ∞. To show this, we apply the Morse method for categories. The degree function on U/G is a Morse function and the corresponding filtration is exactly (U/G)n . Thus, we have to prove that the connectivity of the descending link lk↓ (K) tends to infinity as the degree of the object K tends to infinity. Note that the descending up link lk↓ (K) is always empty, so we have lk↓ (K) = lk↓ (K). Definition 4.16. An arrow [σ, Θ] in S is called (very) elementary if it is not a transformation and every higher degree operation in Θ is (very) elementary. An 44 WERNER THUMANN arrow in U is called (very) elementary if the corresponding arrow in S is (very) elementary. An arrow in U/G is called (very) elementary if there is a (very) elementary representative in U. It follows from Proposition 3.19 that the number of (very) elementary operations in an arrow a ∈ U does does not change if we replace a by another representative in the class [a] ∈ U/G. In particular, if the arrow α ∈ U/G is (very) elementary, then all representing arrows a ∈ U of α are (very) elementary. The data of an object in lk↓ (K) consists of an object Y in U/G with deg(Y) < deg(K) and an arrow α : K → Y in U/G. Now we define Core(K) to be the full subcategory of lk↓ (K) spanned by the objects (Y, α) where α is a very elementary arrow. Denote by Corona(K) the full subcategory of lk↓ (K) spanned by the objects (Y, α) with α an elementary arrow. So we have Core(K) ⊂ Corona(K) ⊂ lk ↓ (K) and we will study the connectivity of these spaces successively. 4.5.1. The core. In this subsubsection, we adopt the normal form point of view of Subsection 3.2: Arrows in S are always represented by a unique pair (σ, Θ) such that σ −1 is unpermuted resp. unbraided on the domains of the operations in the sequence Θ. We say that two operations θ1 and θ2 are right transformation equivalent if there is a transformation γ such that θ2 = θ1 ∗ γ. Recall from Proposition 3.19 that being elementary or very elementary is invariant under right transformations. The object K in U/G is a class of objects in U modulo transformations. Fix some representing object K. Then the objects in Core(K) are in one to one correspondence with pairs (Y, a) where Y is an object in U with deg(Y ) < deg(K) and a : K → Y is a very elementary arrow in U modulo transformations on the codomain (compare with Remark 2.6). Choose one operation in each right transformation equivalence class and denote the resulting set of operations by R. We choose the identity for a class of degree 1 operations so that the degree 1 operations in R are identities. Now define a very elementary R-arrow to be a very elementary arrow (σ, Θ) in S such that the operations in Θ are elements of R. Thus, Θ is a tensor product of identities and at least one very elementary operation lying in R. This notion of very elementary R-arrows can be lifted to arrows in U. Now the objects in Core(K) are in one to one correspondence with pairs (Y, a) where Y is an object with deg(Y ) < deg(K) and a : K → Y is • (planar case) a very elementary R-arrow. • (symmetric case) a very elementary R-arrow modulo colored permutations on the codomain. • (braided case) a very elementary R-arrow modulo colored braidings on the codomain. The equivalence relation modulo braidings on the codomain is called “dangling” in [9] because these objects may be visualized as a braiding where some strands at one end are connected by very elementary operations in R, called “feet”, and these are allowed to dangle freely (see [9, Figure 9]). Now let C be the set of colors of the operad O. We define a set of archetypes A as follows: For each operation in R, form an archetype with identifier this operation and with color word the domain of that operation. The object K in U is a path of arrows in S modulo homotopy. It starts at the color word X and ends at some other color word T . Consider the simplicial complex AC d (C, A; T ) from Subsection 4.1. It can be seen as a poset of simplices with an arrow from a simplex σ to another simplex σ ′ if and only if σ is a face of σ ′ . OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 45 Proposition 4.17. The category Core(K) is a poset and isomorphic, as a poset, to AC d (C, A; T ) where d = 1 in the planar case, d = 2 in the braided case and d = 3 in the symmetric case. Proof. We restrict our attention to the braided case, i.e. d = 2. The other two cases are much simpler. First, it is clear that Core(K) is a poset since U/G is a poset. We want to understand the poset structure a bit better: Let Λ be an object of Core(K) in the form of a very elementary R-arrow K → Y modulo dangling. Fix some very elementary R-arrow λ representing this class with the property that the colored braiding of that arrow is unbraided not only on the sets of strands connected to single operations but also on the set of strands connected to identity operations. Then arrows in Core(K) with domain Λ are in one to one correspondence with very elementary R-arrows α in U, modulo dangling, such that the very elementary operations of α only connect to identity operations of λ in the composition λ ∗ α (since compositions of very elementary operations are not very elementary anymore). The following diagram, in which the gray triangles are identity operations, illustrates such a situation: λ α These considerations yield the following interpretation of the poset structure: We have Λ → Λ′ if and only if there is a very elementary R-arrow λ representing the dangling class Λ such that adding very elementary operations of R to loose strands of λ (i.e. strands connected to identity operations) gives a very elementary R-arrow representing the dangling class Λ′ . We will consider an isomorphism of posets comb : Core(K) → AC2 (C, A; T ) called “combing” as in [9, Section 4] and its inverse weave: AC2 (C, A; T ) → Core(K) which we call “weaving”. To define the first map, start with an object Λ in Core(K). As above, it is a very elementary R-arrow in normal form modulo dangling. Thus, it is represented by a colored braid with unbraided strands connected by very elementary operations in R. Think of the domain of the braid as being fixed on the line L1 := {(x, 0, 1) | x ∈ R} ⊂ R3 the codomain as being fixed on the line L0 := {(x, 0, 0) | x ∈ R} ⊂ R3 and visualize the operations as straight lines in L0 connecting the ends of the corresponding strands. Now “combing straight” the braid means moving around the ends of the braid in the plane P := R2 × {0} ⊂ R3 such that the whole braid becomes unbraided. The segments representing the operations get deformed in P this way and in fact become the archetypal arcs in comb(Λ). They are admissible 46 WERNER THUMANN because the braid was required to be unbraided on the domains of the operations. This process is visualized in [9, Figure 17]. Note that combing does not depend on the representative under dangling, so it is a well-defined map on the objects of Core(K). It also respects the poset structures, so it is a map of posets. To define the second map, start with an archetypal arc system A. This is a priori embedded in R2 but embed it in R3 via the embedding R2 × {0} ⊂ R3 . Connect the nodes of the archetypal arc system with the line L1 by straight lines parallel to the third coordinate axis. The process of weaving first tries to separate the archetypal arcs by moving the nodes in the plane P . Here, being separate means being separated by a straight line in P parallel to the second coordinate axis. Also, the set of nodes which are not contained in an arc should be separated from the arcs. By doing these moves, the vertical strands connecting the nodes with the line L1 become braided in a certain way. The separation process is always possible but the resulting braid is not unique (think of two nodes connected by an arc and turn around the arc several times). To make the resulting braid unique (up to dangling), we additionally require that the subbraid determined by an archetypal arc never becomes braided during the separation process. This can be achieved for example by the following additional movement rule: The nodes of an archetypal arc always have to stay on the same line L in P parallel to the first coordinate axis. This line L may move up and down and the nodes of the archetypal arc may move left and right on L but they must never cross each other on L. Then, when the archetypal arcs are separated from each other and from the isolated nodes, the property admissible of the archetypal arcs ensures that they can be homotoped to straight lines lying in L0 . The following figure visualizes this process: Replacing the archetypal arcs by the identifier operations of the corresponding archetype yields a representative of weave(A) and the class modulo dangling does not depend on the weaving process. Thus, we get a well-defined map on the objects of AC 2 (C, A; T ). It also respects the poset structures, so it is a map of posets.  It follows from the finiteness of V E that the set of archetypes A is of finite type (though not finite in general) and from the color-tameness of O that it is tame. More precisely, let mV be the largest degree of very elementary classes and mC be the smallest natural number greater than the degree of any reduced object in S. Then we can set ma = mV and mr = mC in Theorem 4.9. We thus get the following Corollary 4.18. Core(K) is νd (deg K)-connected where   l − mC −1 ν1 (l) := 2mV + mC − 2 OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 47  l − mC −1 2mV − 1   l − mC ν3 (l) := −1 2mV − 1 ν2 (l) :=  Here, d = 1 corresponds to the planar case, d = 2 to the braided case and d = 3 to the symmetric case. 4.5.2. The corona. We build up Corona(K) from Core(K) using again the Morse method for categories. We then get a connectivity result for the corona from the connectivity result for the core. The idea is attributed to [20]. We assumed O to be of finite type, i.e. the set of elementary classes E is finite. Let mE be the largest degree of elementary classes. An object in Corona(K) is a pair (Y, α : K → Y) where deg(Y) < deg(K) and α is an elementary arrow in U/G. For 2 ≤ k ≤ mE denote by #kse (α) the number of strictly elementary operations of degree k in any representative of α. Define   mE −1 E (α), . . . , #2se (α), deg(Y) f (Y, α) := #m se (α), #se Order the values of f lexicographically. Then f becomes a Morse function building up Corona(K) from Core(K). Define   l − mC −2 µ1 (l) := 2mV + mC + mE   l − mC µ2 (l) := −1 2mV + mE   l − mC −1 µ3 (l) := 2mV + mE Proposition 4.19. For each object (Y, α) in Corona(K) which is not an object in Core(K), the descending link lk↓ (Y, α) with respect to the Morse function f above is µd (deg K)-connected. From Theorem 2.20 we get that Core(K) and Corona(K) share the same homotopy groups up to dimension µd (deg K). We already know that Core(K) is νd (deg K)-connected. Furthermore, we have νd (l) ≥ µd (l). Consequently, we get the following Corollary 4.20. Corona(K) is µd (deg K)-connected. In particular, its connectivity tends to infinity as deg(K) → ∞. In the rest of this subsubsection, we give a proof of Proposition 4.19. We distinguish between two sorts of objects (Y, α) in Corona(K) which are not objects in Core(K): Such an object is called mixed if there is at least one very elementary operation in α. It is called pure if there is no very elementary operation in α. Lemma 4.21. Let (Y, α) be mixed. Then lk↓ (Y, α) and therefore lk↓ (Y, α) is contractible. In particular, Proposition 4.19 is true for mixed objects.  Proof. The data of an object in lk ↓ (Y, α) is Ω = (L, β1 ), β2 where L is an object in U/G, β1 is an elementary arrow in U/G, β2 is an arrow in U/G such that β1 β2 = α and (L, β1 ) forms an object in Corona(K) of strictly smaller Morse height than (Y, α). Let Ω′ = (L′ , β1′ ), β2′ be another such object. An arrow Ω → Ω′ is 48 WERNER THUMANN represented by an arrow δ : L → L′ such that β1 δ = β1′ and δβ2′ = β2 . α / K ❄❚❚❚❚ ❥❥❥⑦5? Y ❥ ❄❄ ❚❚❚❚ ❥ ❥ ❚❚❚❚ ❄❄ ❥❥❥ ⑦⑦⑦ ❚❚❚❚ ❄❄ ❥❥❥❥ ⑦ ❥ ❥ ′ ❚ ❥ ❄❄ β ❚❚❚❚ ❥❥❥ 2 β ⑦⑦β ′ β1 ⑦ ❥ ❄❄ 1 ❚ ❥ ⑦ 2 ❚❚❚❚ ❄ ❥❥❥❥ ⑦⑦ ❚❚❚) ❥ ❥ ❥ / L′ L❥ δ It follows that lk ↓ (Y, α) is a poset since U/G is a poset. Choose representatives K and Y of K and Y. Then α is represented by a unique arrow a : K → Y . We can choose K such that a is a tensor product of higher degree operations and identities. Let av : K → Y v be the arrow obtained from a by replacing all strictly elementary operations θ with deg(θ) identity operations. Let ase : Y v → Y be the arrow obtained from a by replacing all very elementary operations by one identity operation each. We have av ase = a. An example of a, av , ase is pictured below. There, a white triangle is a placeholder for a strictly elementary operation. A black triangle indicates a very elementary operation. A straight horizontal line represents an identity operation. av a ase Set Y v := [Y v ] and αv := [av ] as well as αse := [ase ]. Then (Y v , αv ) is an object in Core(K) and αse represents an arrow (Y v , αv ) → (Y, α) in Corona(K). Moreover, the pair Ξ := (Y v , αv ), αse is an object in lk↓ (Y, α).  Let Ω = (L, β1 ), β2 be an object in lk↓ (Y, α). We define another object F (Ω) =  (M, γ1 ), γ2 of lk↓ (Y, α) as follows: Choose a representative L of L such that β2 is represented by b2 : L → Y which is a tensor product of identities and higher degree operations. Then β1 is represented by a unique b1 : K → L. Note that b1 b2 = a. Think of b1 as splitting higher degree operations of a into operations of smaller degree and of b2 as merging them back to their original form. Now define the arrows g1 : K → M and g2 : M → Y to be the same splitting of a with the only exception that no very elementary operation of a is splitted. An example fitting to the example above is pictured below. There, a gray triangle is a placeholder for an elementary operation or a degree 1 operation, a blue triangle can be any operation and a dot on a straight horizontal line indicates a possibly non-trivial degree 1 operation. b1 b2 g1 Now set M := [M ] and γ1 := [g1 ] as well as γ2 = [g2 ]. g2 OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 49 It is not hard to see that Ω 7→ F (Ω) extends to a functor lk↓ (Y, α) → lk↓ (Y, α) which means that whenever we have an arrow δ : Ω → Ω′ , then there is an arrow ∆ : F (Ω) → F (Ω′ ). M′ ✈: O ●●● ✈ ●● ✈✈ ∆ ●● ✈✈ ● ′ ✈ ′ M γ1 ✈✈ 6 P P ♥ PPP ●●●γ●2 ✈ ♥♥♥♥ ✈ P PPP ●●● ✈✈ ♥♥ P ● ✈✈♥♥♥♥γ1♥ ✈ γ2 PPPP ●● ✈♥♥♥ PPP●● ✈ P#( ✈✈♥♥ ♥ α K ❅❯ ❖❖❯❖❯❯❯ ✐4/? E Y ✐ ✐ ✐ ❅❅ ❖❖ ❯❯❯❯ ✐✐✐✐ ⑧⑧☛ ❅❅ ❖❖❖ ❯❯❯❯ β1′ ✐✐se✐✐ ′ ⑧⑧⑧☛☛☛ ❅❅ ❖❖❖ ❯❯❯❯ ✐ ✐ ✐ ❯❯ ✐✐ α ❖❖❖ β2 ⑧⑧ ☛ αv ❅❅❅ ❖✐❖✐❖✐✐✐✐❯✐❯❯❯❯❯❯ ⑧ ☛☛ ✐ ❯ ❖ ✐ ❯* ′ ⑧ ☛☛ β2 ❖❖❖ v ✐ LO ☛☛ Y ❖❖❖ ❖❖❖ ☛ δ ❖❖❖ ☛☛ β1 ' L We also have arrows ξΩ : Ξ → F (Ω) and ιΩ : Ω → F (Ω). 6M❖ ♥♥♥ ✌✌F W✵✵✵ ❖❖❖❖❖ ♥ ♥ ❖❖❖γ2 γ1 ♥♥♥ ✌ ✵✵ ❖❖❖ ιΩ ξΩ ✌✌ ♥♥♥ ✵ ♥ ❖❖❖ ♥ ✌ ✵✵ ♥♥ ✌ ❖❖' ♥ ♥ ✌ ♥ α ✵✵ ✌ K ❆❯❯❯❯ ✌ ✐4/ Y ✐ ✵ ✐ ✌ ❆❆ ❯❯❯❯❯ ✌ ✵✵ ✐✐✐✐✐ ⑧⑧? ✐ se ❆❆ β1 ❯❯❯✌✌❯ ✐✵✐ α ⑧⑧ ❆❆ ⑧ ✌ ❯❯❯❯❯❯✐✐✐✐✐✐✐ ✵✵ ❆❆ ✌✌ ❯ αv ✐ ⑧⑧ β2 ❯ ✐ ✵ ❯ ✐ ⑧ ❯ ✐ ❯ ✌ ✐✐✐✐ ❯❯❯* ⑧ L Yv The arrow ξΩ is represented by an arrow xΩ : Y v → M which satisfies av xΩ = g1 and xΩ g2 = ase . The arrow ιΩ is represented by iΩ : L → M which satisfies b1 iΩ = g1 and iΩ g2 = b2 . In the example from above, these arrows look as follows: xΩ iΩ The claim of the proposition now follows from item iii) in Subsection 2.5 applied to the functor F and the object Ξ.  Lemma 4.22. Let (Y, α) be pure. Then lk↓ (Y, α) is µd (deg K)-connected and Proposition 4.19 is true for pure objects. Proof. Choose representatives K and Y of K and Y such that a : K → Y representing α is a tensor product of higher degree operations and identities. First observe the descending up link lk↓ (Y, α). An object in lk ↓ (Y, α) is a pair  (L, β1 ), β2 with f (L, β1 ) < f (Y, α) and β1 β2 = α. When choosing a representative L of L, we get unique representatives b1 : K → L of β1 and b2 : L → Y of β2 such that b1 b2 = a. As in the proof of the previous lemma, b1 can be interpreted as splitting higher degree operations of a into operations of smaller degree and b2 as merging them back to their original form. Denote by Ai the full subcategory of lk↓ (Y, α) spanned by the objects which only split the i’th higher degree operation 50 WERNER THUMANN in a. Denote by n the number of higher degree operations in a. Observe now that when splitting operations in a one by one, then we can also split all that operations at once. This observation reveals that lk↓ (Y, α) = A1 ◦ . . . ◦ An is the Grothendieck join of the Ai (see Subsection 2.9). Note that the categories Ai are all non-empty since all the higher degree operations in a are elementary but not very elementary and splitting such a strictly elementary operation decreases the Morse height. Thus, lk ↓ (Y, α) is (n − 2)-connected.  Now look at the descending down link lk↓ (Y, α). Objects are pairs (L, β1 ), β2 with f (L, β1 ) < f (Y, α) and αβ2 = β1 . When choosing a representative L of L, we get unique representatives b1 : K → L of β1 and b2 : Y → L of β2 such that ab2 = b1 . Looking at the Morse function f for the corona, one sees that the higher degree operations of b2 must be very elementary operations which only compose with identity operations of a. At this point, we have to distinguish between the planar case on the one hand and the braided resp. symmetric case on the other. We start with the braided resp. symmetric case: The arguments in the proof of Proposition 4.17 reveal that lk ↓ (Y, α) is isomorphic to AC d (C, A; T ′ ) where T ′ is the color word obtained from the codomain of a (viewed as an arrow in S) after deleting the higher degree operations. Denote by l the length of T ′ , i.e. the number of identity operations in a. Then we already know that AC d (C, A; T ′ ) is νd (l)connected (compare with Corollary 4.18). Consequently, the connectivity of the descending link lk↓ (Y, α) = lk↓ (Y, α) ∗ lk↓ (Y, α) is   l − mC −1 n + νd (l) = n + 2mV − 1   deg K − nmE − mC −1 ≥n+ 2mV − 1   deg K − nmE − mC ≥n+ −1 2mV + mE   deg K − mC + 2mV n = −1 2mV + mE   deg K − mC −1 ≥ 2mV + mE = µd (deg K) where we have used that nmE + l ≥ deg K. Now we turn to the planar case: An identity component in a is a maximal subsequence of identity operations. Let m be the number of identity components and denote by li for i = 1, . . . , m the length of the i’th identity component. Denote by l the total number of identity operations in a, i.e. the sum of the li . Define Bi to be the full subcategory of lk ↓ (Y, α) spanned by the objects which only add very elementary operations into the i’th identity component. Observe now that when adding very elementary operations into different identity components one by one, then we can also add all that operations at once. This reveals that lk↓ (Y, α) is the Grothendieck join of the Bi . Note, though, when inspecting the direction of the arrows in lk↓ (Y, α), one sees that it is in fact the dual Grothendieck join. So we have lk ↓ (Y, α) = B1 • . . . • Bm Similarly as in the braided resp. symmetric case, Bi is isomorphic to AC 1 (C, A; Ti ) where Ti is the color word obtained from the codomain of a after deleting all operations except the identity operations of the i’th identity component. The length OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 51 of Ti is li . Then we already know that AC 1 (C, A; Ti ) is ν1 (li )-connected. Therefore, the connectivity of lk↓ (Y, α) is at least 2m − 2 + m X ν1 (lj ) j=1 Thus, the connectivity of lk↓ (Y, α) is at least n + 2m − 2 + m X ν1 (lj ) ≥ n + m − 2 + j=1 ≥n−2+  m  X lj − mC 2mV + mC j=1 m X lj − mC 2mV + mC j=1 l − mmC 2mV + mC deg K − nmE − (n + 1)mC ≥n−2+ 2mV + mC deg K − nmE − nmC − mC −2 ≥n+ 2mV + mC + mE deg K − mC + 2mV n = −2 2mV + mC + mE deg K − mC ≥ −2 2mV + mC + mE ≥ µ1 (deg K) =n−2+ where we have used in the fourth step that m ≤ n + 1 and nmE + l ≥ deg K.  4.5.3. The whole link. In this last step, we show that the inclusion Corona(K) ⊂ lk↓ (K) is a homotopy equivalence. It then follows from Corollary 4.20 that the connectivity of lk↓ (K) tends to infinity as deg(K) → ∞ which is what we wanted to show in order to finish the proof of Theorem 4.3. This step is analogous to the reduction to the Stein space of elementary intervals in [39]. We again apply the Morse method for categories to build lk↓ (K) up from Corona(K). The Morse function on objects of lk ↓ (K) which do not lie in Corona(K) is given by  f (Y, α) := − deg(Y) We have lk↓ (Y, α) = ∅ and thus lk↓ (Y, α) = lk↓ (Y, α) with respect to this Morse function. Similarly as in the proofs of Lemmas 4.21 and 4.22, we obtain lk↓ (Y, α) = A1 ◦ . . . ◦ An where the Ai are full subcategories of lk↓ (Y, α) spanned by the objects which correspond to splitting exactly one of the n higher degree operations in a representative a of α. At least one of these operations must be non-elementary since (Y, α) is not an object in Corona(K). Without loss of generality, assume that A1 corresponds to such a non-elementary higher degree operation. If we show that A1 is contractible, it follows that lk↓ (Y, α) is contractible. Thus, we are building lk ↓ (K) up from Corona(K) along contractible descending links and it follows from Theorem 2.20 that the inclusion Corona(K) ⊂ lk↓ (K) is a homotopy equivalence. That A1 is contractible follows from Proposition 4.24 below. First, we want to reinterprete the defining property of E as the spine of T C ∗ (O) in terms of the category U/G. 52 WERNER THUMANN Lemma 4.23. Let α : K → Y be a non-elementary arrow in U/G such that deg(K) = n > 1 and deg(Y) = 1. Then there is a unique pair (α1 , α2 ) of arrows in U/G (called the maximal elementary factorization of α) such that α2 is elementary, α1 α2 = α and such that the following universal property is satisfied: Whenever (β1 , β2 ) is another pair with β2 elementary and β1 β2 = α (called an elementary factorization of α), then there is a unique arrow γ with α1 γ = β1 and γβ2 = α2 . K ✌ ✶✶✶ ✌ ✶✶ ✌ ✶✶ ✌✌ ✌ α1 ✌ ✶✶β1 α ✌ ✶✶ ✌ ✌ ✶✶ ✌  ✌✌  / o Q α2 Y P A β 2 ❄ ⑧ ❏ γ t ❚ ❴ ❥ Proof. Recall that U/G is a poset. So there is at most one such γ. If also (β1 , β2 ) satisfies the universal property, then we must have Q = P and consequently α1 = β1 as well as α2 = β2 . This shows the uniqueness statements. Remains to prove the existence of such a pair: Choose representatives K, Y of K, Y. Then α is represented by a unique arrow a : K → Y . Note that a is just an operation since deg(Y ) = 1. Denote the transformation class of a by Ω. Its degree is deg(K) = n > 1 and it is non-elementary by assumption. Thus, by the definition of E as the spine, there is a greatest elementary class Θ with the property Θ < Ω. This implies that there is an operation θ ∈ Θ and an arrow q in S such that q ∗θ = a in S. Define Q := K ∗ q as an object in U and further Q := [Q] as an object in U/G. The arrows q : K → Q resp. θ : Q → Y in U represent arrows α1 resp. α2 in U/G such that α1 α2 = α and α2 is elementary. These two arrows satisfy the universal property: Let b1 : K → P and b2 : P → Y be representatives of β1 : K → P and β2 : P → Y. Obviously, the transformation class [b2 ] of b2 is elementary and satisfies [b2 ] < [a] = Ω. Since Θ = [θ] is the greatest such class, we obtain [b2 ] ≤ [θ]. This means that there is an arrow g in S such that g ∗ b2 = θ in S. If g is interpreted as an arrow Q → P in U, then it represents an arrow γ : Q → Y in U/G which satisfies γβ2 = α2 . We then also have α1 γ = β1 since U/G is a poset.  We now turn to the announced proposition which concludes the proof of the main theorem. Proposition 4.24. Let α : K → Y be a non-elementary arrow in U/G such that deg(K) = n > 1 and deg(Y) = 1. Let M be the full subcategory of K↓(U/G)n−1 spanned by the objects (Z, β : K → Z) with deg(Z) > 1 and L := M↓(Y, α) the descending up link of (Y, α) with respect to the Morse function f above. Then L is contractible. Proof. Note that the data of an object of L is a non-trivial factorization of α, i.e. a pair (α1 , α2 ) of arrows in U/G such that α1 6= id 6= α2 and α1 α2 = α. An arrow from (α1 , α2 ) to (β1 , β2 ) is an arrow γ such that α1 γ = β1 and γβ2 = α2 . Clearly, L is a poset. Apply Lemma 4.23 above to obtain a maximal elementary factorization (α1 , α2 ) of α. Note that (α1 , α2 ) is an object of L and the universal property says that this object is initial among the objects (β1 , β2 ) of L with β2 elementary. OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 53 More generally, for an object (ǫ1 , ǫ2 ) of L with ǫ2 non-elementary, we can apply the lemma to obtain a maximal elementary factorization (ǫ∗1 , ǫ∗2 ) of ǫ2 . Then define F (ǫ1 , ǫ2 ) := (ǫ1 ǫ∗1 , ǫ∗2 ) which is again an object in L. If ǫ2 is already elementary, we set ǫ∗1 = id and ǫ∗2 = ǫ2 so that F (ǫ1 , ǫ2 ) = (ǫ1 , ǫ2 ). We claim that F extends to a functor L → L. So let (ǫ1 , ǫ2 ) and (β1 , β2 ) be two objects of L and γ : (ǫ1 , ǫ2 ) → (β1 , β2 ) an arrow in L. We have to show that there is an arrow ϕ : F (ǫ1 , ǫ2 ) → F (β1 , β2 ). • ⑧ ❅❅❅ β1 ⑧ ❅❅ ⑧ ❅❅ ⑧⑧ α ⑧ γ ⑧ / • •❅ ❅❅ ⑧ ⑧ ❅❅ ǫ∗ ⑧⑧ β1∗ 1 ⑧ ǫ2 ❅❅ β    ⑧⑧ 2  • ∗ / • o ∗ B• β2 ❂ ǫ2 ❍ ϕ ✈ ✁ ❚❴❥ ǫ1 Observe first that if ǫ∗1 = id, then γβ1∗ is an arrow F (ǫ1 , ǫ2 ) → F (β1 , β2 ) as required. Else, observe that the pair (γβ1∗ , β2∗ ) is another elementary factorization of ǫ2 . Thus, by the universal property, we get a unique arrow ϕ such that ϕβ2∗ = ǫ∗2 and ǫ∗1 ϕ = γβ1∗ . This amounts to an arrow F (ǫ1 , ǫ2 ) → F (β1 , β2 ). Since F (ǫ1 , ǫ2 ) is an elementary factorization of α, we get an arrow (α1 , α2 ) → F (ǫ1 , ǫ2 ) for each object (ǫ1 , ǫ2 ) in L. Furthermore, ǫ∗1 clearly gives an arrow (ǫ1 , ǫ2 ) → F (ǫ1 , ǫ2 ). The claim of the proposition now follows from item iii) in Subsection 2.5 applied to the functor F and the object (α1 , α2 ).  4.6. Applications. 4.6.1. Suboperads of endomorphism operads. Consider the example with squares and triangles, the cube cutting operads (planar or symmetric) and the local similarity operads from Subsubsection 3.5.2. There, we have seen that they all satisfy the cancellative calculus of fractions. The squares and triangles operad and the cube cutting operads are of finite type. The local similarity operads are of finite type if and only if there are only finitely many SimX -equivalence classes of balls, so we will assume this in the following. Then, in all three cases, the groupoid I(O) is finite. In order to apply Theorem 4.3, it therefore remains to check color-tameness. The cube cutting operads are monochromatic, so color-tameness is trivially satisfied here. The squares and triangles operad has two colors (the square and the triangle). It is easy to check that any sequence of at least five squares and triangles is the domain of a very elementary arrow in S(O). Consequently, it is color-tame as well. In general, a local similarity operad is not color-tame. As a special case, we obtain that the higher dimensional Thompson groups nV are of type F∞ . This has been shown before in [20]. The one dimensional cube cutting operads (planar or symmetric) with trivial groupoid of degree 1 operations yield the groups of piecewise linear homeomorphisms of the unit (Cantor) interval studied in [39] and from the main theorem, it follows that they are of type F∞ . This has already been shown in [39]. The finiteness result for the local similarity groups has also been obtained in [16, Theorem 6.5]. The hypothesis in this theorem consists of demanding that the finite similarity structure posseses only finitely many SimX -equivalence classes of balls and of the property rich in simple contractions which is implied by the easier to state property rich in ball contractions [16, Definition 5.12]. It is not hard to see 54 WERNER THUMANN that the latter property exactly means that O, the local similarity operad associated to SimX , is color-tame. 4.6.2. Ribbon Thompson group. The braided operad O with transformations discussed in Subsubsection 3.5.3 satisfies the cancellative calculus of fractions. It is monochromatic and therefore color-tame. There is only one very elementary transformation class and thus, O is of finite type. The groupoid I(O) is the group Z + which is of type F∞ . The main theorem yields that the Ribbon Thompson group RV is of type F∞ . References [1] J. Bénabou, Some remarks on 2-categorical algebra. I, Bull. Soc. Math. Belg. Sér. A 41 (1989), no. 2, 127–194. [2] M. Bestvina and N. Brady, Morse theory and finiteness properties of groups, Invent. Math. 129 (1997), no. 3, 445–470. [3] F. Borceux, Handbook of categorical algebra. 1, Encyclopedia of Mathematics and its Applications, vol. 50, Cambridge University Press, Cambridge, 1994. [4] M. G. Brin, Higher dimensional Thompson groups, Geom. Dedicata 108 (2004), 163–192. [5] , The algebra of strand splitting. I. A braided version of Thompson’s group V , J. Group Theory 10 (2007), no. 6, 757–788. [6] M. G. Brin and C. C. Squier, Groups of piecewise linear homeomorphisms of the real line, Invent. Math. 79 (1985), no. 3, 485–498. [7] K. S. Brown, Finiteness properties of groups, Proceedings of the Northwestern conference on cohomology of groups (Evanston, Ill., 1985), 1987, pp. 45–75. [8] K. S. Brown and R. Geoghegan, An infinite-dimensional torsion-free FP∞ group, Invent. Math. 77 (1984), no. 2, 367–381. [9] K.-U. Bux, M. G. Fluch, M. Marschler, S. Witzel, and M. C. B. Zaremsky, The braided Thompson’s groups are of type F∞ , arXiv:1210.2931v2 (2014). [10] D.-C. Cisinski, La classe des morphismes de Dwyer n’est pas stable par retractes, Cahiers Topologie Géom. Différentielle Catég. 40 (1999), no. 3, 227–231 (French, with English summary). [11] W. G. Dwyer and D. M. Kan, Calculating simplicial localizations, J. Pure Appl. Algebra 18 (1980), no. 1, 17–35. [12] J. Dydak, A simple proof that pointed FANR-spaces are regular fundamental retracts of ANR’s, Bull. Acad. Polon. Sci. Sér. Sci. Math. Astronom. Phys. 25 (1977), no. 1, 55–62 (English, with Russian summary). [13] D. S. Farley, Actions of picture groups on CAT(0) cubical complexes, Geom. Dedicata 110 (2005), 221–242. , Finiteness and CAT(0) properties of diagram groups, Topology 42 (2003), no. 5, [14] 1065–1082. [15] , Homological and finiteness properties of picture groups, Trans. Amer. Math. Soc. 357 (2005), no. 9, 3567–3584 (electronic). [16] D. S. Farley and B. Hughes, Finiteness properties of some groups of local similarities, Proc. Edinb. Math. Soc. (2) 58 (2015), no. 2, 379–402. [17] Z. Fiedorowicz, A counterexample to a group completion conjecture of J. C. Moore, Algebr. Geom. Topol. 2 (2002), 33–35 (electronic). [18] M. Fiore and T. Leinster, An abstract characterization of Thompson’s group F , Semigroup Forum 80 (2010), no. 2, 325–340. [19] T. M. Fiore, W. Lück, and R. Sauer, Euler characteristics of categories and homotopy colimits, Doc. Math. 16 (2011), 301–354. [20] M. G. Fluch, M. Marschler, S. Witzel, and M. C. B. Zaremsky, The Brin-Thompson groups sV are of type F∞ , Pacific J. Math. 266 (2013), no. 2, 283–295. [21] P. Freyd and A. Heller, Splitting homotopy idempotents. II, J. Pure Appl. Algebra 89 (1993), no. 1-2, 93–106. [22] P. Gabriel and M. Zisman, Calculus of fractions and homotopy theory, Ergebnisse der Mathematik und ihrer Grenzgebiete, Band 35, Springer-Verlag New York, Inc., New York, 1967. [23] R. Geoghegan, Topological methods in group theory, Graduate Texts in Mathematics, vol. 243, Springer, New York, 2008. [24] P. G. Goerss and J. F. Jardine, Simplicial homotopy theory, Modern Birkhäuser Classics, Birkhäuser Verlag, Basel, 2009. [25] V. Guba and M. Sapir, Diagram groups, Mem. Amer. Math. Soc. 130 (1997), no. 620. OPERAD GROUPS AND THEIR FINITENESS PROPERTIES 55 [26] B. Hughes, Local similarities and the Haagerup property, Groups Geom. Dyn. 3 (2009), no. 2, 299–315. With an appendix by Daniel S. Farley. [27] A. Joyal and R. Street, Braided tensor categories, Adv. Math. 102 (1993), no. 1, 20–78. , The geometry of tensor calculus. I, Adv. Math. 88 (1991), no. 1, 55–112. [28] [29] W. Lück, The type of the classifying space for a family of subgroups, J. Pure Appl. Algebra 149 (2000), no. 2, 177–203. [30] S. Mac Lane, Categories for the working mathematician, 2nd ed., Graduate Texts in Mathematics, vol. 5, Springer-Verlag, New York, 1998. [31] D. McDuff, On the classifying spaces of discrete monoids, Topology 18 (1979), no. 4, 313–320. [32] N. Monod, Groups of piecewise projective homeomorphisms, Proc. Natl. Acad. Sci. USA 110 (2013), no. 12, 4524–4527. [33] R. Paré, Universal covering categories, Rend. Istit. Mat. Univ. Trieste 25 (1993), no. 1-2, 391–411 (1994). [34] D. Quillen, Higher algebraic K-theory. I, Springer, Berlin, 1973, pp. 85–147. Lecture Notes in Math., Vol. 341. [35] , Homotopy properties of the poset of nontrivial p-subgroups of a group, Adv. in Math. 28 (1978), no. 2, 101–128. [36] P. Selinger, A survey of graphical languages for monoidal categories, New structures for physics, Lecture Notes in Phys., vol. 813, Springer, Heidelberg, 2011, pp. 289–355. [37] E. H. Spanier, Algebraic topology, McGraw-Hill Book Co., New York-Toronto, Ont.-London, 1966. [38] C. C. Squier, The homological algebra of Artin groups, Math. Scand. 75 (1994), no. 1, 5–43. [39] M. Stein, Groups of piecewise linear homeomorphisms, Trans. Amer. Math. Soc. 332 (1992), no. 2, 477–514. [40] R. W. Thomason, Cat as a closed model category, Cahiers Topologie Géom. Différentielle 21 (1980), no. 3, 305–324. [41] , Homotopy colimits in the category of small categories, Math. Proc. Cambridge Philos. Soc. 85 (1979), no. 1, 91–109. [42] W. Thumann, Operad groups, PhD thesis, KIT Karlsruhe, 2015. urn:nbn:de:swb:90-454145. [43] M. Weiss, What does the classifying space of a category classify?, Homology Homotopy Appl. 7 (2005), no. 1, 185–195. Karlsruhe Institute of Technology, Karlsruhe, Germany
4math.GR
RESEARCH REPORT N° 8581 March 2015 Project-Teams Neo ISRN INRIA/RR--8581--FR+ENG Konstantin Avrachenkov, Alexey Piunovskiy, Yi Zhang ISSN 0249-6399 arXiv:1503.08548v2 [cs.PF] 10 Mar 2017 Hitting Times in Markov Chains with Restart and their Application to Network Centrality Hitting Times in Markov Chains with Restart and their Application to Network Centrality Konstantin Avrachenkov∗ , Alexey Piunovskiy† , Yi Zhang‡ Project-Teams Neo Research Report n° 8581 — March 2015 — 17 pages Abstract: Motivated by applications in telecommunications, computer science and physics, we consider a discrete-time Markov process with restart. At each step the process either with a positive probability restarts from a given distribution, or with the complementary probability continues according to a Markov transition kernel. The main contribution of the present work is that we obtain an explicit expression for the expectation of the hitting time (to a given target set) of the process with restart. The formula is convenient when considering the problem of optimization of the expected hitting time with respect to the restart probability. We illustrate our results with two examples in uncountable and countable state spaces and with an application to network centrality. Key-words: Centrality ∗ † ‡ Discrete-time Markov Process with Restart, Expected Hitting Time, Network Inria Sophia Antipolis, France, [email protected] University of Liverpool, United Kingdom, [email protected] University of Liverpool, United Kingdom, [email protected] RESEARCH CENTRE SOPHIA ANTIPOLIS – MÉDITERRANÉE 2004 route des Lucioles - BP 93 06902 Sophia Antipolis Cedex Le Temps de Premier Passage dans les Processus de Markov avec Redémarrage et leur Application à la Mesure de Centralité de Réseau Résumé : Motivé par diverses applications provenant de télécommunications, informatique et de la physique, nous considerons un processus generale de Markov dans l’espace de Borel avec une possibilité de redémarrage. À chaque étape, avec une probabilité le processus redémarre a partir d’une distribution donnée et avec la probabilité complémentaire le processus continue l’évolution selon une noyau de Markov. Nous étudions l’espérance du temps de premier passage à l’ensemble donné. Nous obtenons une formule explicite pour l’espérance du temps de premier passage et démontrons que le processus avec redémarrage est Harris positif récurrent. Ensuite, nous établissons que les assertions suivantes sont équivalentes : (a) le fait d’être limité (par rapport à l’état initiale) de l’espérance du temps de premier passage; (b) la finitude de l’espérance du temps de premier passage pour presque tous les états initiaux par rapport à la probabilité invariante unique; et, (c) l’ensemble cible est de mesure positive par rapport à la probabilité invariante. Enfin, nous illustrons nos résultats théoriques avec deux exemples dans les espaces dénombrables et non dénombrables et avec l’application à la mesure de centralité de réseau. Mots-clés : Processus de Markov en Temps Discret, L’Espérance du Temps de Premier Passage, La Mesure de Centralité de Réseau Hitting Times in Markov Chains with Restart 1 3 Introduction We give a self-contained study of a discrete-time Markov process with restart. At each step the process either with the positive probability p restarts from a given distribution, or with the complementary probability 1 − p continues according to a Markov transition kernel. Such processes have many applications in telecommunications, computer science and physics. Let us cite just a few. Both TCP (Transmission Control Protocol) and HTTP (Hypertext Transfer Protocol) can be viewed as protocols restarting from time to time, [16], [20]. The PageRank network centrality [10], in information retrieval, models the behaviour of an Internet user surfing the web and restarting from a new topic from time to time. The sybil attack resistant network centralities based on the hitting times of a random walk with restart have been proposed in [14, 18]. Markov processes with restart are useful for the analysis of replace and restart types protocols in computer reliability, [2], [3], [17]. The restart policy is also used to speedup the Las Vegas type randomized algorithms [1], [19]. Finally, human and animal mobility patterns can be modeled by Markov processes that restart from some locations [12], [24]. The main focus of the present work is the expectation of the hitting time (to a given target set) of the process with restart, for which we obtain simple explicit expressions in terms of the expected discounted hitting time of the original process without restart; see Theorem 2.1. These formula is useful in the optimization of the expected hitting time with respect to the restart probability. In addition, the formulae allow us to either refine, or give simple and self-contained proofs of the stability results for the process with restart in terms of hitting times. Finally, in Section 3, we illustrate the main results with two examples in uncountable and countable state spaces and with an application to network centrality. In particular, we show that the hitting time based network centrality can be more discerning than PageRank. Let us mention some related work to the present one in the current literature. The continuoustime Markov process with restart was considered in [7]. According to Theorem 2.2 in [7], the continuous-time Markov process with restart is positive Harris recurrent in case the original process is honest. At the same time, the process with restart is not positive Harris recurrent if the original process is not honest (i.e., the transition kernel is substochastic; in case the state space is countable, that means the accumulation of jumps). The objective of [7] does not lie in the expected hitting time, but in the representation of the transition probability function of the (continuous-time) process with restart in terms of the one of the original (continuous-time) process without restart. This is trivial in the present discrete-time setup. Here our focus is on the characterization of the expected hitting time. We also would like to mention the two works [11] and [15], dealing with the control theoretic formulation, where the controller decides (dynamically) whether it is beneficial or not to perform a restart at the current state. That line of research can be considered complementary to ours. The rest of this paper is organized as follows. The description of the process with restart and the main statements are presented in Section 2, which are illustrated by two examples and network centrality application in Section 3. The paper is finished with a conclusion in Section 4. 2 Main statements Let us introduce the model formally. As in [21], let E be a nonempty locally compact Borel state space endowed with its Borel σ-algebra B(E). Consider a discrete-time Markov chain X̃ = {X̃t , t = 0, 1, . . . } in the state space E with the transition probability function P̃ (x, dy) being defined by P̃ (x, Γ) := pν(Γ) + (1 − p)P (x, Γ), RR n° 8581 (1) 4 K. Avrachenkov & A. Piunovskiy & Y. Zhang for each Γ ∈ B(E), where p ∈ (0, 1) and P (x, dy) is a transition probability function, and ν is a probability measure on B(E). Let X := {Xt , t = 0, 1, . . . } denote the Markov chain corresponding to the transition probability P (x, dy). We assume the two processes X and X̃ are defined on the common probability space (Ω, F, P); if we emphasize that the initial state is x ∈ E, then Ex denotes the corresponding expectation operator, and the notation Px is similarly understood. The process X̃ is understood as the modified version of the process X, and is obtained by restarting (independently of anything else) the process X after each transition with probability p ∈ (0, 1) and the distribution of the state after each restart being given by ν; whereas if there is no restart after the transition (with probability 1 − p), the distribution of the post-transition state is P (x, dy) (given that the current state is x). The following notation is used throughout this paper. Let P t (x, dy), t = 0, 1, . . . , be defined iteratively as follows; for each Γ ∈ B(E), P 0 (x, Γ) P t+1 (x, Γ) := I{x ∈ Γ}, Z := P t (x, dy)P (y, Γ). E The power of other kernels is understood similarly. Finally, thoughout this paper, the convention 0 · +∞ := 0 is in use. 2.1 Known facts The materials in this subsection are standard and known from [21]. The purpose here is to give a short and self-contained presentation. The main result of this paper is postponed to the next subsection. From (1) it is clear that the process X̃ is Harris recurrent with an irreducibility measure ν. (Recall that the process X̃ is ν-irreducible if for each set Γ ∈ B(E) satisfying ν(Γ) > 0, it holds that Px (τΓ < ∞) > 0 for each x ∈ E, where τΓ := inf{t = 1, 2, · · · : X̃t ∈ Γ}. (2) As usual, inf ∅ := ∞.) If a Harris recurrent process admits an invariant probability, then it is called positive Harris recurrent; in that case the invariant probability is unique. We verify that X̃ is positive Harris recurrent with the unique invariant probability q given in the next statement. Proposition 2.1 The process X̃ is positive Harris recurrent with the unique invariant probability measure q(dy) given by q(Γ) = Z X ∞ p(1 − p)t P t (y, Γ)ν(dy) (3) E t=0 for each Γ ∈ B(E). Proof. Clearly, q(dy) is a probability measure, and routine calculations verify Z q(Γ) = q(dx)P̃ (x, Γ) E for each Γ ∈ B(E). 2 We strengthen the above statement in the next corollary. Observe that the process X̃ is aperiodic in the sense of p.118 of [21], and the state space E is a petite set since P̃ (x, ·) ≥ pν(·) Inria 5 Hitting Times in Markov Chains with Restart for each x ∈ E. By Theorem 16.0.2 (vi) of [21], we see that the process X̃ is uniformly ergodic (see also related arguments in [22, 23]). However, in the next statement, we give a direct simple proof of this fact, and obtain the rate of convergence in terms of the restart probability. Below, || · ||T V stands for the total variation norm of finite signed measures. Corollary 2.1 The process X̃ is uniformly ergodic with the unique invariant probability measure q(·) given in Proposition 2.1. In particular, we have ||P̃ n (x, ·) − q(·)||T V ≤ 2(1 − p)n . (4) Proof. We first note that P̃ n (x, Γ) = Z n−1 X p(1 − p)t P t (y, Γ)ν(dy) + (1 − p)n P n (x, Γ), E t=0 which can be easily shown by induction. Next, using the above expression and Proposition 2.1, we can write Z X ∞ ||P̃ n (x, ·) − q(·)||T V = || − p(1 − p)t P t (y, ·)ν(dy) + (1 − p)n P n (x, ·)||T V E t=n ≤ (1 − p)n || − Z X ∞ p(1 − p)t P t+n (y, ·)ν(dy) + P n (x, ·)||T V E t=0 ≤ 2(1 − p)n . Thus, we have established inequality (4) and hence the uniform ergodicity. 2.2 2 Hitting times In this paper we are primarily interested in the expected hitting time of the process X̃ to a given set H ∈ B(E), defined by ηH := inf{t = 0, 1, · · · : X̃t ∈ H}. For the future reference, we put HP 0 (x, E) := I{x ∈ E \ H}. Denote V (x) := Ex [ηH ] (5) and let H P (x, Γ) = P (x, Γ \ H) be the taboo transition kernel with respect to the set H. Then, one can write Z Z V (x) = 1 + p V (y)ν(dy) + (1 − p) V (y)H P (x, dy), ∀ x ∈ E \ H, E V (x) = 0, RR n° 8581 ∀ x ∈ H. E (6) 6 K. Avrachenkov & A. Piunovskiy & Y. Zhang Furthermore, it is well known that the function V (x) defined by (5) is the minimal nonnegative (measurable) solution to equation (6), and can be obtained by iterations Z Z V (n+1) (x) = 1 + p V (n) (y)ν(dy) + (1 − p) V (n) (y)H P (x, dy), x ∈ E \ H, n = 0, 1, ... E E with V (x) = 0 if x ∈ H for each n = 0, 1, . . . , and V (0) (x) ≡ 0; c.f. e.g., Proposition 9.10 of [9]. One can actually obtain the minimal nonnegative solution to (6) in the explicit form. (n) Theorem 2.1 (a) The minimal nonnegative solution to (6) is given by the following explicit form t ∞  Z X V (x) = V1 (x) p V1 (y)ν(dy) , ∀ x ∈ E \ H, E t=0 (7) ∀ x ∈ H, V (x) = 0, where the function V1 is given by V1 (x) := ∞ X (1 − p)t H P t (x, E), ∀ x ∈ E \ H; t=0 (8) ∀ x ∈ H. V1 (x) := 0, It coincides with the unique bounded solution to the equation Z V1 (x) = 1 + (1 − p) V1 (y)H P (x, dy), ∀ x ∈ E \ H; E (9) ∀ x ∈ H. V1 (x) = 0, (b) If q(H) > 0, then V (x) = 1−p R V1 (x) < ∞, V (y)ν(dy) E 1 ∀ x ∈ H. V (x) = 0, ∀ x ∈ E \ H, (10) Proof. (a) Observe that the function V1 given by (8) represents the expected total discounted time before the first hitting of the process X at the set H given the initial state x and the discount factor 1 − p. It thus follows from the standard result about the discounted dynamic programming with a bounded reward that the function V1 is the unique bounded solution to equation (9); see e.g., Theorem 8.3.6 of [13]. Now by multiplying both sides of the equation (9) by the expression t ∞  Z X p V1 (y)ν(dy) t=0 E for all x ∈ E \ H, it can be directly verified that the function V defined in terms of V1 by (7) is a nonnegative solution to (6). We show that it is indeed the minimal nonnegative solution to (6) as follows. Let U ≥ 0 be an arbitrarily fixed nonnegative solution to (6). It will be shown by induction that t n  Z X U (x) ≥ V1 (x) p V1 (y)ν(dy) ∀ n = 0, 1, . . . , ∀ x ∈ E. (11) t=0 E Inria 7 Hitting Times in Markov Chains with Restart The case when x ∈ H is trivial. Let x ∈ E \ H be arbitrarily fixed. It follows from (6) that Z U (x) ≥ 1 + (1 − p) H P (x, dy) = E Z 1 X (1 − p)t  t P (x, dy) ≥ 1. H (12) E t=0 If for some n ≥ 1 Z n X t U (x) ≥ (1 − p)  H P (x, dy) , (13) t E t=0 then by (6), Z U (x) ≥ 1 + (1 − p) U (y)H P (x, dy) E n X Z ≥ 1 + (1 − p) E = n+1 X (1 − p)t (1 − p) t Z ! H P (x, dy) H P (y, dz) t E t=0  t H P (x, dy) , Z E t=0 and so (13) holds for all n ≥ 0 and thus by (8) U (x) ≥ V1 (x). Consequently, (11) holds when n = 0. Suppose (11) holds for n, and consider the case of n + 1. Then from (6), Z Z U (x) = 1 + p U (y)ν(dy) + (1 − p) U (y)H P (x, dy) ≥ n+1 X E E Z t Z V1 (y)ν(dy) + (1 − p) U (y)H P (x, dy), p E t=0 (14) E where the inequality follows from the inductive supposition. Define the function W on E by W (z) = Pn+1 t=0 U (z) t , R p E V1 (y)ν(dy) ∀ z ∈ E. Then by (14), Z W (x) ≥ 1 + (1 − p) H P (x, dy) = E 1 X (1 − p)t t=0 Z  t P (x, dy) ; H E c.f. (12). Now, based on (14), a similar reasoning by induction as to the verification of (13) for all n ≥ 0 shows that W (x) ≥ Z k X (1 − p)t t=0 RR n° 8581 E HP t  (x, dy) , ∀ k = 0, 1, . . . , 8 K. Avrachenkov & A. Piunovskiy & Y. Zhang and thus W (x) ≥ V1 (x). This means U (x) ≥ V1 (x) n+1 X t V1 (y)ν(dy) . Z p t=0 E Thus by induction, (11) holds for all n ≥ 0, and thus U (x) ≥ V (x) by (7), as desired. R (b) If q(H) > 0, then there exists some T ≥ 0 such that E P T (y, H)ν(dy) > 0, meaning that R 0 there exists some T 0 ≤ T such that E H P T (x, E)ν(dx) < 1. Thus, 0≤p Z X ∞ (1 − p)t H P t (y, E)ν(dy) < 1, E t=0 and so the geometric series P∞ t=0 R p E t V1 (y)ν(dy) converges. The statement follows. 2 The next corollary is immediate. Corollary 2.2 If q(H) > 0, then both V1 (x) and V (x) are bounded with respect to the state x ∈ E. In particular, we have V1 (x) ≤ 1 . p There is a nice probabilistic interpretation of the decomposition presented in Theorem 2.1. Suppose q(H) > 0, which is case (b) in Theorem 2.1. Let us make a change of variable ρ(x) = 1 − pV1 (x) = 1 − p ∞ X (1 − p)t H P t (x, E) = Px [hit before restart]. t=0 Then, equation (10) takes the form V (x) = 1 − ρ(x) Px [no hit before restart] = . pPν [hit before restart] p E ρ(y)ν(dy) R The expected number of steps in a cycle from one restart to another is 1/p, and the expected number of cycles until we hit the set H is roughly 1/Pν [hit before restart]. Thus, the total expected steps is approximately equal to 1/(pPν [hit before restart]). This is only an approximation since we did not carefully take into account the impact of the first and the last incomplete cycles. It turns out that the factor Px [no hit before restart] gives the necessary correction. Theorem 2.1 can be viewed as a generalization of the results of [5, 14] to the general state space from the finite state space. We also have the following chain of equivalent statements. Theorem 2.2 The following statements are equivalent. (a) q(H) > 0. (b) V (x) = Ex [ηH ] < ∞ for each x ∈ E. (c) V (x) = Ex [ηH ] < ∞ for almost all x ∈ E with respect to q(dy). (d) supx∈E V (x) = supx∈E Ex [ηH ] < ∞. Inria 9 Hitting Times in Markov Chains with Restart The proof of this theorem follows from the next lemma. Lemma 2.1 Statements (a) and (c) in Theorem 2.2 are equivalent. Proof. Statement (a) implies statement (c) by Theorem 2.1(b). It remains to show that statement (c) implies statement (a). To this end, suppose for contradiction that statement (a) does not hold, i.e., q(H) = 0. Then it follows from (3) that Z X ∞ P t (y, H)ν(dy) = 0. E t=0 Thus, there exists a measurable subset Γ of E \ H such that ν(Γ) = 1 (15) X Px [ηH = ∞] = 1 ∀ x ∈ Γ, (16) X ηH := inf{t = 0, 1, · · · : Xt ∈ H}. (17) and where Let x ∈ Γ be fixed. Then by (8) and (16)   X ηH −1 V1 (x) = Ex  X (1 − p)t  = Ex t=0 "∞ X t=0 # (1 − p)t = 1 . p Since x ∈ Γ is arbitrarily fixed, and ν(Γ) = 1 by (15), we see from (7) and the fact that V1 (y) ≥ 1 if y ∈ E \ H that V (y) = ∞ for each y ∈ E \ H. Since q(E \ H) = 1, we see that statement (c) does not hold. 2 Proof of Theorem 2.2. From Theorem 2.1(b), we see that (a) implies (b), which implies (c). From Lemma 2.1, (c) implies (a). Clearly, (d) implies (b). Finally, (a) implies (d) because V1 (x) is bounded; see Corollary 2.2. 2 Remark 2.1 Corollary 2.1 and Theorem 16.0.2 of [21] immediately give the relation (a) ⇒ (d) ⇒ (b) ⇒ (c) in Theorem 2.2. However, we gave its self-contained proof in the above without referring to the result concerning the general Markov chains in [21]. 2.3 Optimization problem Next let us consider the dependance of V (x) on the restart probability p for each fixed x ∈ E. When we emphasize the dependance on p, we explicitly write V (x, p) and V1 (x, p). In the above, p ∈ (0, 1) was fixed. Now we formally put V (x, 0) := ∞ X HP t (x, E) ∈ [1, ∞], ∀ x ∈ E \ H; t=0 V (x, 0) := 0, ∀ x ∈ H, RR n° 8581 10 K. Avrachenkov & A. Piunovskiy & Y. Zhang which represents the expected hitting time of the process without restart, and 1 ∈ [1, ∞], ∀ x ∈ E \ H; ν(H) V (x, 1) := 0, ∀ x ∈ H, V (x, 1) := which represents the expected hitting time of the process that restarts with full probability at each transition. Here and below, 0c := ∞ for any c > 0. As usual, the continuity of V (x, p) at p = a means limp→a V (x, p) = V (x, a) ∈ [−∞, ∞]. Theorem 2.3 Suppose Z X ∞ P t (y, H)ν(dy) > 0. (18) E t=0 Then the function V (x, p) is infinitely many times differentiable in p ∈ (0, 1) and is continuous in p ∈ [0, 1]. As a consequence, the problem Miniminize V (x, p) with respect to p ∈ [0, 1] (19) is solvable. Remark 2.2 The condition (18) in the above statement is equivalent to q(H) > 0 for some and then all p ∈ (0, 1) by (3). Proof of Theorem 2.3. If x ∈ H, the statement holds trivially since V (x, p) = R0 for each p ∈ [0, 1]. Consider now x ∈ E \H. One can see that V1 (x, p) (as given by (8)) and (1−p E V1 (y, p)ν(dy))−1 are both infinitely many times differentiable in p ∈ (0, 1). It follows from this and (10) that V (x, p) is infinitely many times differentiable in p ∈ (0, 1). For the the continuity of V (x, p) at p = 0, it holds that  X  Z Z ηH −1 X 1−p V1 (y, p)ν(dy) = 1 − p Ey  (1 − p)t  ν(dy) E Z =1− E t=0 Z h i h i X X Ey 1 − (1 − p)ηH ν(dy) = Ey (1 − p)ηH ν(dy) → 1, E E X as p → 0, by the monotone convergence theorem; recall (17) for the definition of ηH . It follows from this fact, (8), (10) and the monotone convergence theorem that lim V (x, p) p→0 = lim V (x, p)  p→0R 1 = V (x, 0) limp→0 1 − p E V1 (y, p)ν(dy) as desired. The continuity of the function V (x, p) at p = 1 can be similarly established. The last assertion is a well known fact; see e.g., [9]. 2 We shall illustrate the optimization problem (19) by two examples in the next section. Inria 11 Hitting Times in Markov Chains with Restart 3 Numerical examples and application 3.1 Uni-directional random walk on the line Let E = R, H = [a, b] with a < b being two real numbers. The process X only moves to the right, and the increments of each of the transitions are i.i.d. exponential random variables with the common mean µ1 > 0. The restart probability is denoted as p ∈ (0, 1) as usual, and the restart distribution ν is arbitrary. Below by using Theorem 2.1 we provide the explicit formula for the expected hitting time at H of the restarted process X̃. (Clearly, if the initial state is outside H, then the expected hitting time of the process X at the set H is infinite.) We can give the following informal description of this example. There is a treasure hidden in the interval [a, b] and one tries to find the treasure. Once the searcher checks one point in the interval [a, b], he finds the treasure. The searcher has the means only to stop and to check points between the exponentially distributed steps. This models the cost of checking frequently. It is also natural to restart the search from some base. Intuitively, by restarting too frequently, the searcher spends most of the time near the base and does not explore the area sufficiently. On the other hand, restarting too seldom leads the search to very far locations where the searcher spends most of the time for nothing. Hence, intuitively there should be an optimal value for restarting probability. One can verify that in this example the unique bounded solution to (9) is given by V1 (x) = 0 for each x ∈ [a, b], 1 p (20)  1 1−p − 1 − e−µ(b−a) e−µ(a−x)p p p (21) V1 (x) = for each x > b, V1 (x) = for each x < a. In fact, this can be conveniently established using the following probabilistic argument. Recall that V1 (x) represents the expected total discounted time up to the hitting of the set H by the process X; see (8). So for (20) one merely notes that with the initial state X X is defined by (17). For (21), one can write for each x < a that = ∞, where ηH x > b, ηH  X    X  ηH −1 ηH −1 X X X  V1 (x) = Ex  (1 − p)t  = Ex Ex  (1 − p)t ηH . t=0 t=0 Now the expected hitting time of the restarted process X̃ to the set H = [a, b] is given by  X t ∞  Z  1 1−p V (x) = − 1 − e−µ(b−a) e−µ(a−x)p p V1 (y)ν(dy) , p p E t=0 with the initial state x < a, and by t ∞  Z 1X V (x) = p V1 (y)ν(dy) , p t=0 E with the initial state x > b, recall (7). If the restart distribution ν is not concentrated on (b, ∞), then q(H) > 0, and by Theorem 2.1(b) we have  1−p 1 1 − e−µ(b−a) e−µ(a−x)p p − p R , V (x) = 1 − p E V1 (y)ν(dy) RR n° 8581 12 K. Avrachenkov & A. Piunovskiy & Y. Zhang with the initial state x < a and by V (x) = 1 , p 1 − p E V1 (y)ν(dy) R for each x > b. In particular, if the process restarts from a single point r < a, the above expressions can be specified to V (x) = 1 − (1 − p)(1 − e−µ(b−a) )e−µ(a−x)p , p(1 − p)(1 − e−µ(b−a) )e−µ(a−r)p for the initial state x < a and to    1 1 V (x) = , 1 − e−µ(b−a) p(1 − p)e−µ(a−r)p for each x > b. For the latter case (x > b), by standard analysis of derivatives, one can find the optimal value of the restart probability minimizing the expected hitting time of the process with restart in a closed form, as given by popt = 2 + µ(a − r) + 2 p 4 + µ2 (a − r)2 . Now we can make several observations: the first somewhat interesting observation is that in the case when the initial state is to the right of the interval [a, b], the value of the optimal restart probability does not depend on the length of the interval but only on the average step size and on the restart position. The second observation is that when µ(a − r) is small, i.e., when either the average step size is large or the restart position is close to H, the optimal restart probability is close to 1/2. Thirdly, when µ(a − r) is large, the optimal restart probability is small and reads   1 1 popt = +o . 1 + µ(a − r) µ(a − r) 3.2 Random walk on the one dimensional lattice Let us consider a symmetric random walk on the one dimensional lattice which aims to hit H = {0} with restart at some node r. Assume without loss of generality that the restart state r is on the positive half-line, i.e., r > 0. From Theorem 2.1 we conclude that it is sufficient to solve the following equations V1 (k) = 1 + 1−p [V1 (k − 1) + V1 (k + 1)], 2 k 6= 0, V1 (0) = 0. Following the standard approach for solution of difference equations, we obtain 1 V1 (k) = cα1k + , p where α1 < 1 is the minimal solution to the characteristic equation α= 1−p [1 + α2 ], 2 Inria Hitting Times in Markov Chains with Restart 13 and the constant c = − p1 comes from the condition V1 (0) = 0. Consequently, V (k) = V1 (k) 1 − α1k . = 1 − pV1 (r) pα1r An elegant analysis can be done for the limiting case when the initial position k goes large, and hence we now minimize limk→∞ V (k) = 1/(pα1r ), or equivalently, maximize pα1r with respect to p ∈ (0, 1). This leads to the following equation for the optimal restart probability p dα1 1 =− . α1 dp r (22) Indeed, we note that p dα1 p dα1 = 0, lim = −∞, p→1 α1 dp p→0 α1 dp lim and d dp  p dα1 α1 dp  1 − (1 − p2 )(1 − p) 1 < 0. = −p 1 − (1 − p)2 (1 − p)2 (1 − (1 − p)2 ) Thus, the left hand side of (22) is a monotone function decreasing from zero to minus infinity. Consequently, the unique solution of equation (22) is the global minimizer of 1/(pα1r ). The equation (22) can be transformed to the polynomial equation 1 (1 − p)2 (2 − p) = p r2 Consider the case of large r. This is a so-called case of singular perturbation, as the small parameter 1/r2 is in front of the largest degree term, [4], [8]. It is not difficult to see that for large values of r, the equation has one real root that can be expanded as popt = c1 c2 + 4 + ... r2 r (23) and two complex roots that move to infinity as r → ∞. By substituting the series (23) into the polynomial equation, we can identify the terms ci , i = 1, 2, .... Thus, we obtain popt = 3.3 2 10 − 4 + o(r−4 ). 2 r r Application to network centrality One of the main tasks in network analysis is to determine which nodes are more “central” than the others. Node degree and PageRank [10] are examples of widely used centrality measures. We note that PageRank is a stationary distribution of the random walk with restart and in our setting it is just measure q. Both node degree and PageRank are prone to manipulation or so-called “sybil attack”. To mitigate this problem, the authors of [14, 18] proposed hitting time based centrality measures. Here we show that the hitting time based centrality can be more discerning. Let us first consider a simple 6-node network with weighted edges, see Figure 1. The weights are depicted near the edges. In Table 1 we give centrality values of the nodes with respect to node degree, PageRank and Expected Hitting Times starting and restarting both from the uniform distribution. RR n° 8581 14 K. Avrachenkov & A. Piunovskiy & Y. Zhang Figure 1: Example of 6-node network with weighted edges. Nodes Node degree PageRank, ∀p Hitting time, p = 0.15 Table 1: Centralities for 6-node network. A B C D E F 3 3 3 3 3 3 1/6 1/6 1/6 1/6 1/6 1/6 6.28 8.28 8.28 6.28 8.28 8.28 The last row in Table 1 lists down the expected hitting times to the target state A, B, and so on. It is intuitively clear that nodes A and D are more central in this network. However, both node degree and PageRank indicate equal importance for the nodes. In contrast, the hitting time based centrality clearly indicates that nodes A and D are more central than the other nodes. Let us now consider an example of a real social network. The example was taken from online social network VKontakte and represents a principal component of the interest group about Game Theory [6]. The example has 71 nodes and 116 weighted edges, see Figure 2 (taken from [6]). The edge weight is equal to the number of common friends. Only the edges with a weight more than two have been kept. Figure 2: Example of a social network. In Table 2 we provide top-10 lists of nodes according to node degree, PageRank and the expected hitting time. Inria 15 Hitting Times in Markov Chains with Restart Table 2: Top-10 Node degree 1 8 4 PageRank, p = 0.15 1 8 56 Hitting time, p = 0.15 1 8 56 lists for the social network example. 20 6 56 7 28 44 32 28 44 4 32 20 63 6 28 63 22 13 33 69 4 We observe that the top-10 list by PageRank has 9 nodes from the top-10 list by node degree. The top-10 list by the expected hitting time has only 5 nodes from the top-10 list by node degree. Note that nodes 22 and 13, which intuitively look quite central, are not in the top-10 list by PageRank. Finally, we would like to show in Figure 3 the expected hitting time from node A to node B in the 6-node example as a function of the restart probability p. This function has a minimum inside the interval [0, 1]. We think it will be interesting to study the minimization of the expected hitting time in the context of network community analysis. 8 7.5 hAB(p) 7 6.5 6 5.5 5 0 0.2 0.4 0.6 0.8 1 p Figure 3: The expected hitting time from A to B. 4 Conclusion In conclusion, in this paper we present a self-contained study of a discrete-time Markov process with restart. Our primary interest is in the expected hitting time of the process with restart to a target set. We obtained the formula of the expected hitting time of the restarted process to a target set, and considered the optimization problem of the expected hitting time with respect to the restart probability. We illustrated our results with two examples in uncountable and countable state spaces and one application to network centrality. In particular, we show that the network centrality based on hitting times is more selective. Our general results may also have potential application to network community analysis, which we intend to explore in the future. RR n° 8581 16 K. Avrachenkov & A. Piunovskiy & Y. Zhang Acknowledgements This work was partially supported by the European Commission within the framework of the CONGAS project FP7-ICT-2011-8-317672. Y.Zhang’s work was carried out with a financial grant from the Research Fund for Coal and Steel of the European Commission, within the INDUSE-2-SAFETY project (Grant No. RFSR-CT-2014-00025). References [1] Alt H., Guibas L., Mehlhorn K., Karp R. and Wigderson A., A method for obtaining randomized algorithms with small tail probabilities. Algorithmica. 16, 543-547, (1996). [2] Asmussen S., Fiorini P., Lipsky L., Rolski T. and Sheahan R., Asymptotic behavior of total times for jobs that must start over if a failure occurs. Mathematics of Operations Research. 33(4), 932-944, (2008). [3] Asmussen S., Lipsky L. and Thompson S., Checkpointing in failure recovery in computing and data transmission, In Proceedings of ASMTA’14, also in LNCS v.8499, 253-272, Springer, (2014). [4] Avrachenkov K., Filar J.A. and Howlett P.G., Analytic perturbation theory and its applications, SIAM, (2013). [5] Avrachenkov K. and Litvak N., The effect of new links on Google PageRank. Stochastic Models, 22(2), 319-331, (2006). [6] Avrachenkov K., Mazalov V. and Tsynguev B., Beta current flow centrality for weighted networks. In Proceedings of CSoNet 2015, also in Springer LNCS v.9197, 216-227, (2015). [7] Avrachenkov K., Piunovskiy A. and Zhang Y., Markov processes with restart. Journal of Applied Probability, 50, 960-968, (2013). [8] Baumgärtel H., Analytic perturbation theory for matrices and operators, Birkhäuser, Basel, (1985). [9] Bertsekas D. and Shreve S., Stochastic optimal control: the discrete-time case. Academic Press, New York, (1978). [10] Brin S. and Page L., The anatomy of a large-scale hypertextual Web search engine. Computer Networks and ISDN Systems, 30, 107-117, (1998). [11] Dumitriu I., Tetali P. and Winkler P., On playing golf with two balls. SIAM Journal on Discrete Mathematics. 16(4), 604-615, (2003). [12] González M.C., Hidalgo C.A. and Barabási A.-L., Understanding individual human mobility patterns. Nature, 453, 779-782, (2008). [13] Hernández-Lerma O. and Lasserre J.-B., Further topics in discrete-time Markov control processes. Springer, New York, (1999). [14] Hopcroft J. and Sheldon D., Manipulation-resistant reputations using hitting time. Internet Mathematics, 5(1-2), 71-90, (2008). Inria Hitting Times in Markov Chains with Restart 17 [15] Janson S. and Peres Y., Hitting times for random walks with restarts. SIAM Journal on Discrete Mathematics. 26(2), 537-547, (2012). [16] Krishnamurthy B. and Rexford J., Web protocols and practice: HTTP/1.1, networking protocols, caching, and traffic measurement. Addison Wesley, (2001). [17] Kulkarni V., Nicola V. and Trivedi K., The completion time of a job on a multimode system. Advances in Applied Probability. 19, 932-954, (1987). [18] Liu B.K., Parkes D.C. and Seuken S., Personalized hitting time for informative trust mechanisms despite sybils. In Proceedings of the 2016 International Conference on Autonomous Agents & Multiagent Systems, pp. 1124-1132, (2016). [19] Luby M., Sinclair A. and Zuckerman D., Optimal speedup of Las Vegas algorithms. Information Processing Letters. 47, 173-180, (1993). [20] Maurer S.M. and Huberman B.A., Restart strategies and Internet congestion. Journal of Economic Dynamics and Control. 25, 641-654, (2001). [21] Meyn S. and Tweedie R., Markov chains and stochastic stability. Springer, London, (1993). [22] Nummelin E., MC’s for MCMC’ists. International Statistical Review. 70(2), 215-240, (2002). [23] Nummelin, E. and Tuominen, P., Geometric ergodicity of Harris recurrent Marcov chains with applications to renewal theory. Stochastic Processes and Their Applications. 12(2), pp.187-202, (1982). [24] Walsh P.D., Boyer D. and Crofoot M.C., Monkey and cell-phone-user mobilities scale similarly. Nature Physics. 6, 929-930, (2010). Contents 1 Introduction 3 2 Main statements 2.1 Known facts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Hitting times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Optimization problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4 5 9 3 Numerical examples and application 3.1 Uni-directional random walk on the line . . . . . . . . . . . . . . . . . . . . . . . 3.2 Random walk on the one dimensional lattice . . . . . . . . . . . . . . . . . . . . . 3.3 Application to network centrality . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 12 13 4 Conclusion 15 RR n° 8581 RESEARCH CENTRE SOPHIA ANTIPOLIS – MÉDITERRANÉE 2004 route des Lucioles - BP 93 06902 Sophia Antipolis Cedex Publisher Inria Domaine de Voluceau - Rocquencourt BP 105 - 78153 Le Chesnay Cedex inria.fr ISSN 0249-6399
3cs.SY
Single-sink Fractionally Subadditive Network Design Guru Guruganesh ∗1 , Jennifer Iglesias † 1 , R. Ravi ‡1 , and Laura Sanità2 1 arXiv:1707.01487v2 [cs.DS] 11 Jul 2017 Carnegie Mellon University, Pittsburgh, PA, USA , {ggurugan, jiglesia, ravi}@andrew.cmu.edu 2 University of Waterloo, Waterloo, Canada , [email protected] July 12, 2017 Abstract We study a generalization of the Steiner tree problem, where we are given a weighted network G together with a collection of k subsets of its vertices and a root r. We wish to construct a minimum cost network such that the network supports one unit of flow to the root from every node in a subset simultaneously. The network constructed does not need to support flows from all the subsets simultaneously. We settle an open question regarding the complexity of this problem for k = 2, and give a 3 2 -approximation algorithm that improves over a (trivial) known 2-approximation. Furthermore, we prove some structural results that prevent many well-known techniques from doing better than the known O(log n)-approximation. Despite these obstacles, we conjecture that this problem should have an O(1)-approximation. We also give an approximation result for a variant of the problem where the solution is required to be a path. Subject Class: F.2.2 Nonnumerical Algorithms and Problems, G2.2 Graph Theory Keywords: Network design, single-commodity flow, approximation algorithms, Steiner tree. 1 Introduction We study a robust version of a single-sink network design problem that we call the Single-sink fractionally-subadditive network design (f-SAND) problem. In an instance of f-SAND, we are given an undirected graph G = (V, E) with edge costs we ≥ 0 for all e ∈ E, a root node r ∈ V , and k colors represented as vertex subsets Ci ⊆ V \ {r} for all i ∈ [k], that wish to send flow to r. A feasible solution is an integer capacity installation on the edges of G, such that for every i ∈ [k], each node in Ci can simultaneously send one unit of flow to r. Thus, the total flow sent by color i nodes is is |Ci | while the flows sent from nodes of different colors are instead non-simultaneous and can share capacity. An optimal solution is a feasible one that minimizes the total cost of the installation. ∗ This material is based upon work supported in part by National Science Foundation awards CCF-1319811,CCF1536002, and CCF-1617790 † This material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. 2013170941 ‡ This material is based upon research supported in part by the U. S. Office of Naval Research under award number N00014-12-1-1001, and the U. S. National Science Foundation under award number CCF-1527032. 1 The single-sink nature of the problem suggests a natural cut-covering formulation, namely: X min we xe s.t. e∈E X xe ≥ f (S) ∀S ⊂ V \ {r} (IP) e∈δ(S) x ≥ 0, x ∈ Z, where δ(S) denotes the set of edges with exactly one endpoint in S, and f (S) := max{|Ci ∩ S|} (1) i∈[k] for all S ⊆ V \ {r}. Despite having exponentially many constraints, the LP-relaxation of (IP) can be solved in polynomial-time because the separation problem reduces to performing k max-flow computations. The main challenge is to round the resulting solution into an integer solution. Rounding algorithms for the LP relaxation of (IP) have been investigated by many authors, under certain assumptions of the function f (S). Prominent examples are some classes of 0/1-functions (such as uncrossable functions), or integer-valued functions such as proper functions, or weakly supermodular functions [12, 19]; however, these papers consider arbitrary cut requirements rather than the single-sink connectivity requirements we study. Our single-sink problem is a special case of a broader class of subadditive network design problems where the function f is allowed to be a general subadditive function. Despite their generality, the single-sink network design problem for general subadditive functions can be approximated within an O(log |V |) factor by using a tree drawn from the probabilistic tree decomposition of the metric induced by G using the results of Fakcharoenphol, Rao, and Talwar [8], and installing the required capacity on the tree edges. Hence, a natural direction is to consider special cases of such subadditive cut requirement functions. Our function f (S) defined in (1) is an interesting and important special case of subadditive functions. It was introduced as XOS-functions (max-of-sum functions) in the context of combinatorial auctions by Lehman et al. [21]. Feige [9] proved that this function is equivalent to fractionallysubadditive functions which are a strict generalization of submodular functions (hence the title). These functions have been extensively studied in the context of learning theory and algorithmic game theory [1, 3, 21]. Our work is an attempt to understand their behavior as single-sink network design requirement functions. f-SAND was first studied by Oriolo et al. [22] in the context of robust network design, where the goal is to install minimum cost capacity on a network in order to satisfy a given set of (nonsimultaneous) traffic demands among terminal nodes. Each subset Ci can in fact be seen as a way to specify a distinct traffic demand that the network would like to support. They observed that f-SAND generalizes the Steiner tree problem: an instance of the Steiner tree problem with k + 1 terminals t1 , . . . , tk+1 is equivalent to the f-SAND instance with r := tk+1 and Ci := {ti } for all i ∈ [k]. This immediately shows that f-SAND is NP-hard (in fact, APX-hard [6]) when k is part of the input. The authors in [22] strengthened the hardness result by proving that f-SAND is NP-hard even if k is not part of the input, and in particular for k = 3 (if k = 1 the problem is trivially solvable in polynomial-time by computing a shortest path tree rooted at r). From the positive side, they observed that there is a trivial k-approximation algorithm, that relies on routing via shortest paths, and an O(log | ∪i Ci |)-approximation algorithm using metric embeddings [8, 17]. The authors conclude their paper mentioning two open questions, namely whether the problem is polynomial-time solvable for k = 2, and whether there exists an O(1)-approximation algorithm. 2 1.1 Our results 1. In this paper, we answer the first open question in [22] by showing that f-SAND is NP-hard for k = 2 via a reduction from SAT. 2. We give a 32 -approximation algorithm for this case (k = 2). This is the first improvement over the (trivial) k-approximation obtained using shortest paths for any k. Our approximation algorithm is based on pairing terminals of different groups together, and therefore reducing to a suitable minimum cost matching problem. While the idea behind the algorithm is natural, its analysis requires a deeper understanding of the structure of the optimal solution. 3. We also introduce an interesting variant of f-SAND, which we call the Latency-f-SAND problem, where the network built is restricted to being a path with the root r being one of the endpoints (f-SAND-path). We show a O(log2 k log n)-approximation using a new reformulation of the problem that allows us to exploit techniques recently developed for latency problems [4]. 4. While being a generalization of well-studied problems, f-SAND does not seem to admit an easy O(1)-approximation via standard LP-rounding techniques for arbitrary values of k. We prove some structural results that highlight the difficulty of the general problem (see Appendix A). In particular, we show a family of a instances providing a super-constant gap between an optimal f-SAND solution and an optimal tree-solution, i.e., a solution whose support is a tree – this rules out many methods that output a solution with a tree structure. The bulk of the construction was shown in [13] and we amend it to our problem using a simple observation. Furthermore, we give some evidence that an iterative rounding approach (as in Jain’s fundamental work [19]) is unlikely to work. This follows by considering a special class of Kneser Graphs, where the LP seems to put low fractional weight on each edge in an extreme point. 5. Open Questions. We offer the following conjecture as our main open question. 1 Conjecture 1 There exists an O(1)-approximation algorithm for the f-SAND problem. Although standard LP-based approaches seem to fail in providing a constant factor approximation, the worst known integrality gap example we are aware of yields a (trivial) lower bound of 2 on the integrality gap of (IP) for f-SAND. A related open question is if there is an instance of f-SAND for which the integrality gap of (IP) is greater than 2. 1.2 Related work. Network design problems where the goal is to build a minimum cost network in order to support a given set of flow demands, have been extensively studied in the literature (we refer to the survey [5]). There has been a huge amount of research focusing on the case the set of demands is described via a polyhedron (see e.g. [2]). In this context a very popular model is the Virtual private network [7, 11], for which many approximation results have been developed (see e.g. [14, 15, 16] and the references therein). For the case where the set of demands is instead given as a (finite) discrete list, the authors in [22] developed a constant factor approximation algorithm on ring networks, and proved that f-SAND is polynomial-time solvable on ring networks. 1 Although the problem is known in some circles, it has not been explicitly stated as a conjecture. We do so here, in the hopes that it will encourage others to work on this problem. 3 Regarding the formulation (IP), Goemans and Williamson [12] gave a O(log(fmax ))-approximation algorithm for solving (IP) whenever f (S) is an integer-valued proper function that can take values up to fmax , based on a primal-dual approach. Subsequently, Jain [19] improved this result by giving a 2-approximation algorithm using iterative rounding of the LP-relaxation. Recently, a strongly-polynomial time FPTAS to solve the LP-relaxation of (IP) with proper functions has been given in [10]. 2 3/2-approximation for the two color case The goal of this section is to give a 32 -approximation algorithm for SAND with two colors. We remark that our algorithm bypasses the difficulties mentioned in the previous section. In particular, the final output is not a tree. 2.1 Simplifying Assumptions. We will refer to the two colors as green and blue, and let CG ⊂ V denote the set of green terminals, and CB ⊂ V denote the set of blue terminals. Without loss of generality, we will assume that |CG | = |CB |, i.e., the cardinality of green terminals is equal to the cardinality of blue terminals (if not, we could easily add dummy nodes at distance 0 from the root). Furthermore, by replacing each edge in the original graph with |CG | parallel edges of the same cost, we can assume that in a feasible solution the capacity installed on each edge must be either 0 or 1. This means that each edge is used by at most one terminal of CG (resp. CB ) to carry flow to the root. Lastly, we assume that every terminal in CG shares at least one edge with some terminal in CB in the optimal solution.2 Let OPT denote an optimal solution to a given instance of SAND with two colors. We start by developing some results on the structure of OPT, that will be crucial to analyze our approximation algorithm later. 2.2 Understanding the structure of OPT A feasible solution of a SAND instance consists of a (integer valued) capacity installation on the edges that allows for a flow from the terminals to the root. Given a feasible solution, each terminal will send its unit of flow to t on a single path. Let us call the collection of such paths a routing associated with the feasible solution. The first important concept we need is the concept of splits. 2.2.1 Shared Edges and Splits. Given a routing, for each terminal g ∈ CG (and b ∈ CB respectively) let Pg (Pb ) denote the path along which g (b) sends flow to the root; i.e. Pg := {g = x0 , x1 , . . . , x|Pg | = r}. We say that an edge e is shared if the paths of two terminals of different color contain the edge. We say that g ∈ CG and b ∈ CB are partners with respect to a shared edge e = uv, if their respective paths use the edge e; i.e. e ∈ Pg ∩ Pb . Definition 2.1 A split in the path Pg is a maximal set of consecutive edges of the path such that g is partnered with some b on all the edges of this set. We can easily ensure this e.g. by modifying our instance as follows: we add a dummy node r0 which is only connected to r with |CG | parallel edges of 0 cost, and we make r0 be the new root. In this way, all terminals will use one copy of the edge (r, r0 ). 2 4 If {(xi , xi+1 ), (xi+1 , xi+2 ), . . . , (xi+j−1 , xi+j )} is a split in the path Pg = {g = x0 , x1 , . . . , x|Pg | = r} for g ∈ CG , then there exists a unique terminal b ∈ CB such that Pb contains the edges {(xi , xi+1 ), (xi+1 , xi+2 ), . . . , (xi+j−1 , xi+j )}, Pb does not contain the edge (xi−1 , xi ), and if xi+j 6= r then Pb does not contain the edge (xi+j , xi+j+1 ). By our assumptions, the terminal b is unique as each edge is used by at most one terminal of each color. Since the flow is going from a terminal g to r, the path Pg naturally induces an orientation on its edges given by the direction of the flow, even though the edges are undirected. Of course, the paths of different terminals could potentially induce opposite orientations on (some of) the shared edges (see Figure 1). Definition 2.2 A split is wide, if the paths of the two terminals that are partners on the edges of the split induce opposite orientations on the edges. A split is thin, if the paths of the two terminals that are partners on the edges of the split induce the same orientation on the edges. The above notions are well defined for any routing with respect to a feasible solution. Now, we focus on the structure of an optimal routing, i.e., a routing with respect to an optimal solution. For the rest of this section, we let {Pg }g∈CG and {Pb }b∈CB be an optimal routing. The following lemma is immediate. Lemma 2.3 Let {(xi , xi+1 ), (xi+1 , xi+2 ), . . . , (xi+j−1 , xi+j )} be a split in the path Pg (for some g ∈ CG ). The edges of the split form a shortest path from xi to xi+j . Proof. If not, we could replace this set of edges with the set of edges of a shortest path from xi to xi+j , in both Pg and Pb , where b is the partner of g on the split. Therefore, we can install one unit of capacity on these edges, and remove the unit of capacity from the edges of the split. We get another feasible solution with smaller cost, a contradiction to the optimality of our initial solution. 2 2.2.2 Split Graph. A consequence of Lemma 2.3 is each split is entirely characterized by the endpoints of the split and the terminals that share them. We denote each split by a tuple (u, v, g, b) which states that there is a shortest path between u and v whose edges are shared by g and b. Let S denote the set of all splits in the optimal routing. We construct a directed graph GS whose vertex set corresponds to V = S ∪ CG ∪ CB (i.e. the vertex set contains one vertex for each split and one vertex for each terminal). For each g ∈ CG , we place a directed green edge going between two consecutive splits in Pg . Specifically, if {(xi , xi+1 ), . . . , (xi+j−1 , xi+j )} and {(xi0 , xi0 +1 ), . . . , (xi0 +j 0 −1 , xi0 +j 0 )} are two splits in Pg with i < i0 , we say that they are consecutive if the subpath from xi+j to xi0 does not contain any split. In this case, we place a directed edge in GS whose tail is the vertex corresponding to the first split, and whose head is the vertex corresponding to the second one. Similarly, for each b ∈ CB we place a directed blue edge between vertices of consecutive splits that appear in Pb . Furthermore, for each g ∈ CG (resp. b ∈ CB ) we place a directed green (resp. blue) edge from g (resp. b) to the vertex corresponding to the first split on the path Pg (resp. Pb ), if any. This graph is denoted as the Split Graph (see Figure 1). Each split indicates that two terminals of different colors are sharing the capacity on a set of edges in an optimal routing. Hence, each split-vertex in GS has indegree 2 (in particular, one edge of each color). Furthermore, each split-vertex in GS has outdegree either 0 or 2; if it has two outgoing edges, one is green and one is blue. Similarly, each terminal has indegree 0, and outdegree 1 (as we assume that each terminal shares at least one edge). 5 r g1 − b2 g2 − b1 g1 − b1 b2 g2 g2 b2 b1 g1 b1 g1 Figure 1: The above left graph (where each undirected edge is supposed to have unit capacity) shows an optimal routing for some f-SAND instance. Note that b1 and g2 (resp. b2 and g1 ) send flow to r going counterclockwise (resp. clockwise) on the edges of the cycle. The path Pb1 contains two splits: the first is wide (b1 is partnered with g1 ), the second is thin (b1 is partnered with g2 ). The graph on the right is the Split Graph for the optimal solution on the left. The pair of vertices g1 , b1 and the pair of vertices g2 , b2 constitute the fresh pairs. 2.2.3 Fresh Pairs. We need one additional definition before proceeding to the algorithm. Definition 2.4 An S-alternating sequence is a sequence of vertices of the Split Graph {v, s1 , s2 , . . . , sh , w} with h ≥ 1, that satisfies the following: (i) (v, s1 ) and (w, sh ) are directed edges in GS and v, w are terminals of different color. (ii) For all even i ≥ 2, (si , si−1 ) and (si , si+1 ) are both directed edges in GS with opposite colors. We call the path obtained by taking the edges in (i) and (ii) an S-alternating path. We call (v, w) a fresh pair if they are the endpoints of an S-alternating path. By definition, in an S-alternating sequence the vertices s1 , . . . , sh are all split-vertices, and h is odd. We remark here that an S-alternating path is not a directed path. (See again Figure 1). Lemma 2.5 We can find a set of edge-disjoint S-alternating paths in the Split Graph such that each terminal is the endpoint of exactly one path in this set. Proof. We construct the desired set as follows. For each vertex g ∈ CG , there is a unique outgoing edge to a split vertex s ∈ S (as we assume every terminal participates in a split). Since each split-vertex has indegree 2, s has another ingoing edge coming from a different vertex w. If w ∈ CB , then (v, w) is a fresh pair and we have found an S-alternating sequence {v, s, w}. If w is a split-vertex, then it has another outgoing edge to a different split-vertex s0 , which in its turn has another incoming edge from a different vertex w0 . We continue to build an alternating sequence (and a corresponding alternating path) in this way until it terminates in a terminal. Since the path is of even length and the colors alternate, we can conclude that this will terminate in a terminal of opposite color. We remove the edges of this path from the Split Graph, and iterate the process. Each terminal will belong to exactly one S-alternating path, as it has outdegree exactly 1, and all the paths are edge-disjoint, proving the lemma. 2 6 2.3 The Algorithm We are now ready to present our matching algorithm. The algorithm has two steps. First, construct a complete bipartite graph H with the bipartitions CG and CB , where the weight on the edge (g, b) ∈ CG × CB is equal to the cost of the Steiner tree in G connecting g, b and the root. Note that the graph H can be computed in polynomial time, since a Steiner tree on 3 vertices can be easily computed in polynomial time. Second, find a minimum-weight perfect matching M in H, and for each edge (g, b) ∈ M install (cumulatively) one unit of capacity on each edge of G that is in the Steiner tree associated to the edge (g, b) ∈ M. The capacity installation output by this procedure is a feasible solution to f-SAND, and has total cost equal to the weight of M. Lemma 2.6 The matching algorithm is a 32 -approximation algorithm. Proof. First, we partition OP T into four parts; let wb (and wg respectively) be the cost of the edges which are used only by blue (green respectively) terminals in OP T , and let wt (wd ) be the cost of edges in thin (wide) splits in OP T . Thus, w(OP T ) = wb + wg + wt + wd . By Lemma 2.5, we can extract from the Split Graph associated to OP T a set of S-alternating paths such that each terminal is contained in exactly one fresh pair. Consider the matching M1 determined by the set of fresh pairs found by the aforementioned procedure. We will now bound the weight of M1 . Claim 1 The weight of the matching formed by connecting the fresh pairs is at most 3 3 · wb + · wg + 1 · wt + 3 · wd . 2 2 Proof. Let (g, b) be a fresh pair and (g, s1 , . . . , sh , b) be the corresponding S-alternating sequence. The edges of the associated S-alternating path naturally correspond to paths in G composed by non-shared edges (that connect either the endpoints of two different splits, or one terminal and one endpoint of a split). These paths together with the edges of the wide splits in the sequence, naturally yield a path P (b, g) in G connecting g and b. If we do this for all fresh pairs, we obtain that the total cost of the paths P (b, g) is upper bounded by 1 · wb + 1 · wg + 2 · wd . The reason for having a coefficient of 2 in front of wd is because the S-alternating paths of Lemma 2.5 are edge-disjoint, but not necessarily vertex-disjoint: however, since each split-vertex has at most 4 edges incident into it, it can be part of at most 2 S-alternating paths. Using the aforementioned connection, we can move all terminals in CG to their partners in CB . Subsequently, we connect them to the root using the Pb for all b ∈ CB . This connection to the root will incur a cost of 1 · wb + 1 · wd + 1 · wt . Combining this together, we get a total cost of 2 · wb + 1 · wg + 1 · wt + 3 · wd . Analogously, if we connect the partners in CG to the root using the the path Pg for all g ∈ CG , we will incur a total cost of 1 · wb + 2 · wg + 1 · wt + 3 · wd . Since the sum of the cost of the Steiner trees connecting the fresh pairs to the root is no more than either of these two values, we can bound the weight of M1 by their average: 3 3 · wb + · wg + 1 · wt + 3 · wd . 2 2 2 Claim 2 There exists a matching in H of weight at most 1 · wb + 1 · wg + 2 · wt . 7 Proof. Consider the flow routed on the optimal paths by the set of all terminals CG ∪ CB . We modify the flow (and the corresponding routing) as follows. Whenever two terminals traverse a wide-split, re-route the flows so as to not use the wide-split. This is always possible as the two terminals traverse these edges in opposite directions (by definition of wide splits). This re-routing ensures that all the edges of wide-splits are not used anymore in the resulting paths. However, thin-splits which contained terminals of different colors passing in the same direction, might now contain two terminals of the same color passing through the edges. This means that these edges will be used twice (or must have twice the capacity installed). All other edges do not need to have their capacity changed. Thus, the resulting flow can be associated with a feasible solution of cost at most 1 · wb + 1 · wg + 2 · wt + 0 · wd . This flow corresponds to all vertices directly connecting to the root as any shared edge is counted twice. Hence, this is a bound on any matching in H. 2 The average weight of the above matchings is an upper-bound on the minimum weight of a matching in H. Hence, the weight of M is at most  1  1 3 3 · · wb + · wg + 1 · wt + 3 · wd + · 1 · wb + 1 · wg + 2 · wt + 0 · wd 2 2 2 2 3 ≤ · wb + wg + wt + wd ) 2 Therefore, the matching algorithm is 32 -approximation algorithm. 3 2 Hardness for two colors We prove that the SAND problem is NP-hard even with just two colors. Theorem 3.1 The SAND problem with 2 colors is NP-hard. Proof. We use a reduction from a variant of the Satisfiability (SAT) problem, where each variable can appear in at most 3 clauses, that is known to be NP-hard [23]. Formally, in a SAT instance we are given m clauses K1 , . . . , Km , and p variables x1 , . . . , xp . Each clause Kj is a disjunction of some literals, where a literal is either a variable xi or its negation x̄i , for some i in 1, . . . , p. The goal is to find a truth assignment for the variables that satisfies all clauses, where a clause is satisfied if at least one of its literals takes value true. In the instances under consideration, each variable xi appears in at most 3 clauses, either as a literal xi , or as a literal x̄i . It is not difficult to see that, without loss of generality, we can assume that every variable appears in exactly 3 clauses. Furthermore, by possibly replacing all occurrences of xj with x̄j and vice versa, we can assume that each variable xi appears in exactly one clause in its negated form (x̄i ). Given such a SAT instance, we define an instance of SAND as follows (see Fig. 2). We construct a graph G = (V, E) by introducing one sink node r, one node kj for each clause Kj , and 7 distinct nodes yi` , (` = 1, . . . , 7), for each variable xi . That is, ( p ) [ V := {r} ∪ {k1 , . . . , km } ∪ {yi1 , yi2 , yi3 , yi4 , yi5 , yi6 , yi7 } i=1 The set of edges E is the disjoint union of three different sets, E := E1 ∪ E2 ∪ E3 , where: ( 4 ) ( 6 ) p p [ [ [ [ E1 := {r, yi2`−1 } ; E2 := {yi` , yi`+1 } . i=1 i=1 `=1 8 `=1 Figure 2: The picture shows the subgraph introduced for every variable xi . Bold edges have cost 2, solid edges have cost 1, and dashed edges have cost M . Black circles indicate nodes in C1 , and grey circles indicate nodes in C2 . Nodes in C1 ∩ C2 are colored half-black and half-grey. To define the set E3 , we need to introduce some more notation. For a variable xi , we let i1 and i2 be the two indices of the clauses containing the literal xi , and we let i3 be the index of the clause containing the literal x̄i . We then have E3 := p [  {yi2 , ki1 }, {yi4 , ki3 }, {yi6 , ki2 } . i=1 We assign cost 2 to the edges in E1 , unit cost to the edges in E2 , and a big cost M >> 0 to the edges of E3 (in particular, M > 2m + 8p). Finally, we let the color classes3 be defined as: ( p ) ( p ) [ [ 1 5 3 7 C1 := {k1 , . . . , km } ∪ {yi , yi } ; C2 := {k1 , . . . , km } ∪ {yi , yi } . i=1 i=1 We claim that there exists an optimal solution to the SAND instance of cost at most (M +2)m+8p if and only if there is a truth assignment satisfying all clauses for the SAT instance. 3.1 Completeness First, let us assume that the SAT instance is satisfiable. For each clause Kj , we select one literal that is set to true in the truth S assignment. We define the paths for our terminal nodes in C1 as follows. For each node y ∈ pi=1 {yi1 , yi5 }, we let the flow travel from y to r along the edge {y, r}. For each kj , we let the flow travel to r on a path P1j , that we define based on the literal selected for Kj . Specifically, let xi be the variable corresponding to the literal selected for the clause Kj . Then: • if Kj = Ki1 , we let P1j be the path with nodes {kj , yi2 , yi3 , r}, • if Kj = Ki2 , we let P1j be the path with nodes {kj , yi6 , yi7 , r}, • if Kj = Ki3 , we let P1j be the path with nodes {kj , yi4 , yi3 , r}. S We define the paths for our terminal nodes in C2 similarly. For each node y ∈ pi=1 {yi3 , yi7 }, we let the flow travel from y to r along the edge {y, r}. For each kj , we let the flow travel to r on a path P2j defined as follows. Let xi be the variable corresponding to the literal selected for the clause Kj . Then: 3 We here have C1 ∩ C2 6= ∅. However, the reduction can be easily modified to prove hardness of instances where C1 ∩ C2 = ∅, by simply adding for all j two nodes kj1 , kj2 adjacent to kj with an edge of zero cost, and by letting kj1 (resp. kj2 ) be in C1 (resp. C2 ) instead of kj . 9 • if Kj = Ki1 , we let P2j be the path with nodes {kj , yi2 , yi1 , r}, • if Kj = Ki2 , we let P2j be the path with nodes {kj , yi6 , yi5 , r}, • if Kj = Ki3 , we let P2j be the path with nodes {kj , yi4 , yi5 , r}. Note that the paths of terminals belonging to the same color set do not share edges. In fact, by construction, the paths of two terminals in C1 could possibly share an edge only if for two distinct clauses Kj 6= Kj 0 we selected a literal corresponding to the same variable xi , and we have Kj = Ki1 0 and Kj 0 = Ki3 , since in this case the paths P1j and P1j would share the edge {yi3 , r}. However, selecting xi for Ki1 means xi takes value true in the truth assignment, while selecting xi for Ki3 means xi takes value false in the truth assignment, which is clearly a contradiction. A similar observation applies to paths of terminals in C2 . It follows that installing one unit of capacity on every edge that appears in (at least) one selected path is enough to support the flow of both color sets. The total installation cost is exactly 8p + (M + 2)m. 3.2 Soundness Suppose there is an optimal solution to the SAND instance of cost at most (M + 2)m + 8p. Let S denote such solution. Since the support of any feasible solution has to include at least one distinct edge of cost M for each node kj , and M > 2m + 8p, it follows that S has exactly m edges of cost M in its support, each with one unit of capacity installed. Hence, if we denote by P1j (resp. P2j ) the path used by kj to send flow to r with terminals in C1 (resp. C2 ), we have the following fact. Fact 1. For each j = 1, . . . , m, the paths P1j and P2j from kj to r share the first edge. We use this insight to construct a truth assignment for the SAT variables. Specifically, let yi` be the endpoint of the first edge of P1j and P2j . We set xi to true if yi` = yi2 or if yi` = yi6 , and we set xi to false if yi` = yi4 . We repeat this for all clauses j = 1, . . . , m, and we assign an arbitrary truth value to all remaining variables, if any. In order to finish the proof, we have to show that this assignment is consistent for all i = 1, . . . , p. To this aim, let us say that a variable xi is in conflict if there is a node kj sending flow to r on a path whose first edge has endpoint yi4 , and there is node kj 0 6= kj sending flow to r on a path whose first edge has endpoint yi2 or yi6 . Note that our assignment procedure is consistent and yields indeed a valid truth assignment if and only if there is no variable in conflict. We now make a few claims on the structure of S, that will be useful to show that no variable can be in conflict. Next fact follows from basic flow theory. Fact 2. Without loss of generality, we can assume that the flow sent from terminals in C1 (resp. C2 ) to r, does not induce directed cycles. Claim 3 Without loss of generality, assume that every terminal sends flow to r on a path Spwe can 1 that contains exactly one node y ∈ i=1 {yi , yi3 , yi5 , yi7 }. We defer the proof of this claim which is central to the remaining proof to the end. Let Gi be the subgraph of G induced by the nodes {r, yi1 , . . . , yi7 }, and let χi be the total costPof the capacity that S installs on the subgraph Gi . Note that, by Fact 1, the cost of S is m · M + m i=1 χi . We will use Claim 1 to give a bound on the value χi . To this aim, let ni be the number of nodes kj whose path P1j contains edges of Gi . Note that 0 ≤ ni ≤ 3, and each kj contributes to exactly one ni , for some i = 1, . . . , p. Claim 4 We have χi ≥ 8 + 2ni , with the inequality being strict if the variable xi is in conflict. 10 Claim 4 finishes our proof, since it implies that the cost of S is at least m·M + p X χi ≥ m · M + i=1 p X (8 + 2ni ) = m · M + 8p + 2m, i=1 with the inequality being tight if and only if there is no variable in conflict. 4 2 Latency SAND As described in Section A, there is a Ω(log n) gap between the tree and graph version of f-SAND. This naturally raises the question of approximating f-SAND when the solution must be restricted to different topologies. In this section, we consider the f-SAND when the output topology must be a path. Since this variant of f-SANDis not easy to solve on a tree, it is not clear how to solve it using tree metrics. Definition 4.1 In the latency-f-SAND problem, we are given an instance of f-SAND, but require the output to be a path with the root r as one of its endpoints. Our goal is output a minimum cost path, where the cost of an edge is we · (load on e). The load on an edge is the maximum number of nodes of one color it separates from the root. We assume that the lengths are integers and polynomially bounded in the input and give a time-indexed length formulation for this problem. This linear programming formulation was introduced by Chakrabarty and Swamy [4] for orienteering problems. The Linear Programming Formulation for Latency-f-SAND X min t · xj,t (LPbP ) j,t X s.t. xj,t ≥ 1 ∀j ∈ [m] (2) zP,t ≤ 1 ∀t ∈ [T ] (3) ∀j ∈ [m], t ∈ [T ] (4) t X P ∈Pb·t X P ∈Pb·t :j∈P zP,t ≥ X xj,t0 t0 ≤t x, z ≥ 0 We assume without loss of generality, that |Ci | = m for all i ∈ [k]. Pt denotes the set of paths of weight at most t starting from the root. Since the lengths are polynomially bounded, we can contain a variable for each possible length (we denote T to be the maximum possible length). We use j ∈ Pt to indicate that the path Pt contains j terminals of each color. The variable xj,t indicates that we have seen j terminals of each color by time t and zP,t indicates that we use path P to visit the terminals at time t. Lemma 4.2 The linear program LPbP is a relaxation of Latency-f-SANDfor b ≥ 1. Proof. We show that the contraints and objective are valid for any feasible solution to Latency-fSAND. 11 • Constraint 2 ensures that j terminals of each color are covered at some given time period, for every j ∈ [m]. • Constraint 3 ensures that only one path is (fractionally) picked for each time period t. • Constraint 4 indicates that we must have picked a path P that covers j terminals by time t if P 0 x = 1. 0 t ≤t j,t • The objective function correctly captures the cost of the path. For an integer solution, xj,t = 1 indicates that time t is the first time j terminals of each color are present in the path. Thus the objective counts the prefix length t1 corresponding to where x1,t1 = 1 in all m of the terms, the next prefix of length t2 − t1 in m − 1 of them and so on. This accurately accounts for the loads in these segments of the path according to the objective function in f-SAND. Finally, b ≥ 1 only allows the paths to be of lengths longer by a factor of b so keeps the optimal solution feasible. 2 First, we can relax the above LP by replacing Pt with Tt which is the set of all trees of size at most t. This is a relaxation as Pt ⊆ Tt . Lemma 4.3, shows that we can round LPbT to get a O(b) approximation to latency-f-SAND. Lemma 4.3 Given a fractional solution (x, z) to LPbT , we can round it to a solution to latency-f-SAND with cost at most O(b) times the cost of LPbT . We defer the proof to the appendix due to space constraints but briefly sketch the argument. Roughly, we sample the trees at geometric intervals and “eulerify” them to produce a solution whose cost is not too much larger than the LP-objective. Despite, being able to round the LP, we cannot hope to solve it effeciently due to the exponential number of variables in the primal. We will use the dual to obtain a solution to a relaxed version of the primal. X X max αj − βt (DualbP ) j t αj ≤ t + s.t. X θj,t0 ∀j, t (5) ∀t, P ∈ Pbt (6) t0 ≥t X θj,t ≤ βt j∈P α, β, θ ≥ 0. (7) Following [4] it is suffient that an “approximate separation oracle” in the sense of Lemma 4.4 is sufficient to compute an optimal solution to LPbT . Lemma 4.4 Given a solution (α, β, θ), we can show that either (α, β, θ) is a solution to Dual1T or find a violated inequality for (α, β, θ) for DualbT for b = O(log2 k log n). Once again, we defer the proof to the appendix, but sketch the argument. To efficiently separate, we observe that constraint 6 can be recast as a covering Steiner tree problem. Using approximation algorithms for this problem, we find a violated inequality for a (stronger) constraint. This results in the “approximate separation oracle”. 12 Theorem 4.5 There exists a O(log2 k log n) approximation to the Latency-SAND problem. Proof. Combining Lemma 3.2 of [4] with Lemma 4.4, we can now compute an -additive optimal solution to LPbT for b = O(log2 k log n). Using Lemma 4.3, we then achieve an O(b) approximation for our problem. 2 References [1] M. Balcan, F. Constantin, S. Iwata, and L. Wang. Learning valuation functions. In Conference on Learning Theory, volume 23, pages 4–1, 2012. [2] W. Ben-Ameur and H. Kerivin. Routing of uncertain demands. Optimization and Engineering, 3:283–313, 2005. [3] K. Bhawalkar and T. Roughgarden. Welfare guarantees for combinatorial auctions with item bidding. In Proceedings of the twenty-second annual ACM-SIAM symposium on Discrete Algorithms, pages 700–709. Society for Industrial and Applied Mathematics, 2011. [4] D. Chakrabarty and C. Swamy. Facility location with client latencies: LP-based techniques for minimum-latency problems. Mathematics of Operations Research, 41(3):865–883, 2016. [5] C. Chekuri. Routing and network design with robustness to changing or uncertain traffic demands. SIGACT News, 38(3):106–128, 2007. [6] M. Chlebik and J. Chlebikova. Approximation hardness of the steiner tree problem on graphs. Proceedings of the Scandinavian Workshop on Algorithm Theory, pages 170–170, 2002. [7] N.G. Duffield, P. Goyal, A.G. Greenberg, P.P. Mishra, K.K. Ramakrishnan, and J.E. van der Merwe. A flexible model for resource management in virtual private networks. Proceedings of SIGCOMM, 29:95–108, 1999. [8] J. Fakcharoenphol, S. Rao, and K. Talwar. A tight bound on approximating arbitrary metrics by tree metrics. Journal of Computer and System Sciences, 69:485–497, 2004. [9] U. Feige. On maximizing welfare when utility functions are subadditive. SIAM Journal on Computing, 39(1):122–142, 2009. [10] A.E. Feldmann, J. Könemann, K. Pashkovich, and L. Sanità. Fast approximation algorithms for the generalized survivable network design problem. Proceedings of ISAAC (International symposium on algorithms and computation), pages 33:1– 33:12, 2016. [11] J. Fingerhut, S. Suri, and J. Turner. Designing least-cost nonblocking broadband networks. Journal of Algorithms, 24(2):287–309, 1997. [12] M.X. Goemans and D.P. Williamson. A general approximation technique for constrained forest problems. SIAM Journal on Computing, 24(2):296–317, 1995. [13] N. Goyal, N. Olver, and F. B. Shepherd. Dynamic vs. oblivious routing in network design. Algorithmica, 61(1):161–173, 2011. [14] N. Goyal, N. Olver, and F. B. Shepherd. The VPN conjecture is true. Journal of the ACM, 60(3):17:1–17:17, June 2013. 13 [15] F. Grandoni, T. Rothvoß, and L. Sanità. From uncertainty to non-linearity: Solving virtual private network via single-sink buy-at-bulk. Mathematics of Operations Research, 36(2):185–204, 2011. [16] A. Gupta, J. Kleingerg, R. Kumar, B. Rastogi, and B. Yener. Provisioning a virtual private network: A network design problem for multicommodity flow. Proceedings of Symposium on Theory of Computing (STOC), pages 389–398, 2001. [17] A. Gupta, V. Nagarajan, and R. Ravi. An improved approximation algorithm for requirement cut. Operations Research Letters, 38(4):322–325, 2010. [18] A. Gupta and A. Srinivasan. On the covering steiner problem. In International Conference on Foundations of Software Technology and Theoretical Computer Science, pages 244–251. Springer, 2003. [19] K. Jain. A factor 2 approximation algorithm for the generalized steiner network problem. Combinatorica, 21(1):39–60, 2001. [20] G. Konjevod and R. Ravi. An approximation algorithm for the covering steiner problem. In Proceedings of the Eleventh Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’00, pages 338–344, 2000. [21] B. Lehmann, D. Lehmann, and N. Nisan. Combinatorial auctions with decreasing marginal utilities. In Proceedings of the 3rd ACM conference on Electronic Commerce, pages 18–28. ACM, 2001. [22] G. Oriolo, L. Sanità, and R. Zenklusen. Network design with a discrete set of traffic matrices. Operations Research Letters, 41(4):390–396, 2013. [23] M. Yannakakis. Node-and edge-deletion np-complete problems. In Proceedings of the tenth annual ACM symposium on Theory of computing, pages 253–264. ACM, 1978. A Obstacles to an O(1)-approximation f-SAND, while being a generalization of well-studied problems, cannot be easily approximated by many common approximation techniques. This section presents some of the obstacles to getting a O(1)-approximation for f-SAND. A.1 Tree solutions are far from optimal One of the most interesting (and frustrating) aspect of this problem is that a tree solution can be far from optimal. This rules out many algorithms used for other network design problems (such as the primal-dual “moat-growing”) as the resulting solution produced is a tree. Lemma A.1 There exists a family of instances with a Ω(log n) gap between the best solution on a graph and the best solution which is a tree. We emphasize that n is not the length of the input but the number of nodes in the graph. Proof. We adapt a construction from [13]. Consider an expander graph G = (V, E) with constant degree d ≥ 3 and edge-expansion at least 1. Now let G0 be G with an additional node r, where r 14 has an edge to every vertex in V . Let the colors consist of all sets of size b = log n of the vertices, V n b . All edges adjacent to the root r have cost b and the remaining edges have cost 1. 0 One valid graph solution on G is to take any b edges adjacent to r and then all the edges in G. Consider any color Ci . Consider any subset S of vertices of V . By the expansion property of G, the number of edges adjacent to S is at least |S| when |S| ≤ n/2, so δ(S) ≥ |S ∩ Ci |. When |S| > n/2, at least n − |S| edges from G and at least b − (n − |S|) edges adjacent to r. Hence, δ(S) ≥ b when |S| > n/2 implying δ(S) ≥ |S ∩ Ci |. Therefore a flow from Ci to r exists and this is a feasible solution. This solution has cost 3 · n + b · n/b = 4n = O(n). The original paper [13] presenting this example shows that any tree solution has cost Ω(n log n). They prove this by arguing that either a large number of b cost edges adjacent must be used or there must be a large number of long paths which are disjoint. 2 Therefore, if any algorithm always built a tree, we can’t expect to do better than Ω(log n). We can achieve O(log n) with a tree solution by simply using FRT though. Therefore, any algorithm which improves on O(log n) must avoid always build a tree. A.2 A Bad Case for Iterative Rounding We now give a set of examples which seems to rule out the iterative rounding approach due to Jain [19]. This example comes from a special case of Kneser Graphs known as Odd Graphs. Odd Graphs, denoted Os , contain a vertex for every s-size subset of [2s + 1]. We connect to sets S, T ⊆ [2s + 1] in this graph iff S ∩ T = ∅. The graph has n = 2s+1 vertices and every vertex has s degree s + 1. Our instance considers Os with an additional node r which will serve as the root. We connect the root r to all other nodes in Os . The edges adjacent to the root r all have weight 2 and all the remaining edges have weight 1. In a For any edge (u, v) ∈ E, we define a color Cuv = ({u} ∪ N (u)) − {v} (i.e. u and u’s whole neighborhood except for v). One valid fractional solution is for all the edges e, adjacent to the root to have xe = s+1 n , and all the edges e, not adjacent to the root to have weight xe = 2n s+1 s2 +1 − (s+1)2 . (s2 +1)n So, the total cost is: s + 1 n(s + 1) s + 1 (s + 1)2 n s+1 n 3 + ( 2 − 2 ) ≈ 2(s + 1) + − ≈ + (s + 1) n 2 s + 1 (s + 1)n 2 2 2 2 Any valid integral solution must have every node attached to the root. Therefore, the cost of the minimum spanning tree is a lower bound on the cost of the best integral solution. The cost of a minimum spanning tree is at least n + 1; there are n + 1 nodes in the whole graph, and all the edges have weight 1 except for all the edges adjacent to the root which all have weight 2. As s increases, then we get the ratio between the best fractional solution and the best integral solution goes to 2. Therefore, the best approximation we can hope for when using this LP is 2. In addition, we believe that the solution we gave above is an extreme point and can numerically verify this for s ≤ 15 (a graph containing over 300 million vertices). The values xe get arbitrarily close to 0 as s increases. This indicates that iterative rounding on this LP will not yield a constant approximation. B B.1 Missing Proofs in Section 3 Proof of Claim 3 Proof. In order to prove this claim, it is enough to show that if S does not satisfy the condition of the claim for some subset of terminals C ⊆ C1 ∪ C2 , then we can construct another solution S 0 , 15 whose cost is at most the cost of S, that does not satisfy the condition of the claim for some subset of nodes C 0 ⊂ C. Let z ∈ Cq be an arbitrary terminal for S which the condition of the claim is not satisfied, with q ∈ {1, 2}, and let y be the first node in pi=1 {yi1 , yi3 , yi5 , yi7 } on its path P to r. By assumption, P does not contain the edge e := {y, r}. Suppose first that y = yi1 for some index i (the proof for y = yi7 is similar). Then, necessarily, z = yi1 , and the first two edges of P are {yi1 , yi2 } and {yi2 , yi3 }. We construct S 0 by changing P with the path formed by the single edge e = {yi1 , r}. If e is in the support of S, by Fact 2, there can be only terminals in C2 using it, and therefore in S 0 we do not need to increase the capacity of any edge. If instead the edge e is not in the support of S, then the node yi1 is a node of degree one in the support of S. When we change the path for yi1 , in S 0 we have to increase the capacity of e to one. On the other hand, we can decrease the amount of capacity of the edge {yi1 , yi2 } by one, since no other terminal is using that edge. As for the edge {yi2 , yi3 }, note that this edge is either not used by any terminal, or it is used by one terminal kj ∈ C1 ∩ C2 for some j. In both cases, we can decrease its amount of capacity by one. It follows that the cost of S 0 is at most the cost of S, and C 0 ⊂ C. Suppose now that y = yi3 for some index i (the proof for yi5 is similar). Then, necessarily, the first two edges of the subpath P̃ ⊆ P from yi3 to r, are either {yi3 , yi2 } and {yi2 , yi1 }, or {yi3 , yi4 } and {yi4 , yi5 }, and we have therefore two cases. Case A: the first two edges of P̃ are {yi3 , yi2 } and {yi2 , yi1 }. Let q̄ ∈ {1, 2} be different from q. If there is no terminal in Cq̄ whose path to r uses these edges, then changing P̃ to e = {yi3 , r} implies increasing the capacity on e by one, and decreasing the capacity of the edges {yi3 , yi2 } and {yi2 , yi1 } by one. This yields a solution S 0 with C 0 ⊂ C, whose cost is no greater than the cost of S. Suppose now that there is a terminal z̄ in Cq̄ whose path uses both the edges {yi3 , yi2 } and {yi2 , yi1 }. Note that z̄ 6= yi1 , since otherwise yi1 ∈ C but by the previous argument we can assume that this is not the case. Therefore, necessarily, the flow going from z̄ to r travels first on the edge {yi3 , yi2 } and then on {yi2 , yi1 } (i.e. the flow from z to r and the flow from z̄ to r induce the same orientation on these edges). Then, in the solution S 0 we change the paths for both z and z̄, by substituting the subpaths from yi3 to r with the edge e. Once again, this implies increasing the capacity on e by one, and decreasing the capacity of the edges {yi3 , yi2 } and {yi2 , yi1 } by one, and therefore S 0 has C 0 ⊂ C, and cost no greater than the cost of S. Finally, suppose that there is no terminal in Cq̄ whose path uses both the edges {yi3 , yi2 } and {yi2 , yi1 }, but there is a terminal z̄ ∈ Cq̄ that uses exactly one of them. Then, z̄ = ki1 . If Pq̄i1 is the path with nodes {ki1 , yi2 , yi1 , r}, then we construct S 0 by changing Pq̄i1 to the path with nodes {ki1 , yi2 , yi3 , r}, and by changing P̃ to e. This implies decreasing the capacity on the edges {yi2 , yi1 } and {yi1 , r} by one, and increasing by one the capacity on the edges {yi2 , yi3 } and {yi3 , r}. One can see that S 0 has C 0 ⊂ C, and cost no greater than the cost of S. If instead Pq̄i1 is not the path with nodes {ki1 , yi2 , yi1 , r}, then necessarily the second edge of Pq̄i1 is {yi2 , yi3 }. By Fact 2, this implies that there is no terminal of Cq̄ using the edge {yi1 , r}, other than possibly yi1 . Furthermore, by Fact 1, we know that also the first edge of Pqi1 is {kj , yi2 }, and by Fact 2, the other edges of Pqi1 are {yi2 , yi1 } and {yi1 , r}. This implies that the capacity of the edge {yi1 , r} is at least 2 in S. If we construct S 0 by changing P̃ to e, we can decrease the capacity of the edge {yi1 , r} by one, and increase the capacity on e by one. Once again, the result follows. Case B: the first two edges of P̃ are {yi3 , yi4 } and {yi4 , yi5 }. If there is no terminal in Cq̄ using the edges {yi3 , yi4 } and {yi4 , yi5 }, or if there is a terminal z̄ ∈ Cq̄ that uses (at least one of) these edges, but such that the flow going from z to r and the flow from z̄ to r induce the same orientation on these edges, then the statement follows similarly to the previous Case A. The only additional case we have to handle here, arises if there is a terminal z̄ ∈ Cq̄ that uses the edge {yi3 , yi4 } but such that the flow from z̄ to r and the flow from z to r induce opposite orientation on this edge. In this 16 case, by the arguments of Case A, we can assume that the flow from z̄ to r travels on the edge e = {yi3 , r}. Therefore, if there is no terminal in Cq using e we construct S 0 by simply changing P̃ to e. One sees that S 0 has the same cost as S and C 0 ⊂ C. Suppose instead that there is some terminal in Cq using e. Then, necessarily q 6= 1 (because the only terminal in C1 different from z that could potentially use e without violating Fact 2 is yi1 , but we already argued that yi1 routes on the edge {yi1 , r}). Furthermore, using again Fact 2, we can say that there is exactly one terminal z̃ in C2 routing on e, and we have either z̃ = yi3 and z̄ = ki1 , or z̄ = yi3 and z̃ = ki1 . In either case, by Fact 1 and Fact 2, we know that P1i1 must contain the edges {yi2 , yi1 } and {yi1 , r}. We construct S 0 by changing P̃ to e, and by changing P2i1 to be equal to P1i1 . One can see that these changes do not require increasing the capacity on any edge, and therefore the result follows. 2 B.2 Proof of Claim 4 Proof. First, observe that a straightforward corollary of Claim 3 is that every terminal y ∈ Sp 1 , y 3 , y 5 , y 7 } sends flow to r on the path {y, r}. Let ñ ≤ n be the number of nodes k {y i i j i i i i=1 i j j that use edges of Gi to route flow to r and, in addition, satisfy P1 = P2 . Using the previous observation, the cost of the capacity on the edges E1 ∩ E(Gi ) is at least 2(4 + ñi ). Furthermore, another consequence of Claim 1 is that if a terminal kj uses edges of Gi to route flow to r, and the paths P1j and P2j share the second edge, then P1j = P2j and these paths contain exactly one edge of E2 (and one edge of E1 ). It follows that the capacity installed on the edges E2 ∩ E(Gi ) is exactly ñi + 2(ni − ñi ) = 2ni − ñi . Putting things together, χi ≥ 2(4 + ñi ) + 2ni − ñi = 8 + 2ni + ñi ≥ 8 + 2ni (8) We now prove that if xi is in conflict, then either the first or the last inequality of (8) is strict. If xi is in conflict, then ni > 1. Suppose ni = 2, and let kj , kj 0 be the terminals that use edges of Gi to route flow to r. Without loss of generality, let the endpoint of the first edge of Pj1 be yi2 , and the endpoint of the first edge of Pj10 be yi4 (the other case is similar). If ñi > 0 then the last inequality 0 0 of (8) is strict. If instead ñi = 0, we know that P1j and P2j as well as P1j and P2j do not share the second edge. In this case, the cost of the capacity installed on the edges E2 ∩ E(Gi ) is 4. However, we need 2 units of capacity on at least one edge of E1 ∩ E(Gi ), implying that the cost of the capacity installed on the edges E1 ∩ E(Gi ) is at least 10, and therefore χi is at least 14 > 8 + 2ni . Suppose ni = 3. As in the previous case, if ñi > 0 the last inequality of (8) is strict. If instead ñi = 0, then all the paths used by these ni terminals to route flow to r do not share the second edge. Then, the cost of the capacity installed on the edges E2 ∩ E(Gi ) is 6. However, in this case we also need 2 units of capacity on at least two edges of E1 ∩ E(Gi ), implying that the cost of the capacity installed on the edges E1 ∩ E(Gi ) is at least 12, and therefore χi ≥ 18 > 8 + 2ni . 2 C C.1 Missing Proofs in Section 4 Proof of Lemma 4.3 Proof. For each time t = 2i for i = 0, . . . , log L, sample a tree based on the distribution zT ,t - here L is an upper bound on the length of a tree that covers all colors, such as the value of an MST on them. Denote the tree sampled at time t by Tt . We “Eulerify” (walk around the tree) Tt into a path Pt which starts and ends at r. This path Pt has length at most 2bt. Now our solution will be the path formed by concatenating P1 , P2 , P4 , . . . , PL . This is a feasible solution because at time 2L 17 we are able to pick up all the nodes of all colors by taking a path around a spanning tree. (By using standard scaling methods [4], we can reduce the log L factor in this sampling to O(log n) to get a strongly polynomial algorithm - we omit the details.) Now we show that the expected P cost of this solution is O(b) times the cost of the linear program. Let tj denote the first time when t xj,t ≥ 2/3. Then, we know the contribution of the xj,t to the objective function is at least 13 tj . For every time t0 ≥ tj the probability the tree we pick has j elements of each color is at least 2/3 by our definition of tj . So, the expected length of the path before we get j elements of each colors in the path is given by a geometric sum. ∞ X Pr[ j ∈ T2i and j ∈ / T2i−1 ](Cost of the first i trees) i=log tj   ∞ X 2 1 i−log tj = (4b2i ) 3 3 i=log tj   ∞ 8 log tj X i−log tj 1 i−log tj 2 = b2 3 3 i=log tj 8 = btj 3 ∞ X i=0 2i 3 16 = btj 3 Since the contribution of the xj,t to the objective function is at least 13 tj , the expected cost of the whole path is at most O(b) times the cost of the LP. 2 C.2 Proof of Lemma 4.4 Proof. Given (α, β, θ), it is easy to verify all constraints except for Equation 6. We interpret θj,t to be the reward for collecting j terminals of each color by time t and βt to be the budget by time t. This constraint says that we want to ensure that every path (tree in the relaxation) rooted at r of length at most bt can achieve no more than βt rewards. To find a violated constraint, we solve a covering Steiner tree problem [20], one for each j: the problem is defined by k groups one for each color Ci and we require that each group has j terminals connected using the smallest length tree. Using the best-known approximation algorithm for covering Steiner tree [18] we obtain an approximation factor of b = O(log2 k log n). Now we can check for each time t, if the rewards collected are bounded above by the budget βt where we allow trees of size bt. 2 18
8cs.DS
Flexible Resource Allocation for Clouds and All-Optical Networks Dmitriy Katz1 , Baruch Schieber1 , and Hadas Shachnai2? arXiv:1605.04982v1 [cs.DS] 16 May 2016 1 IBM T.J. Watson Research Center, Yorktown Heights, NY 10598. E-mail: {katzrog,sbar}@us.ibm.com 2 Computer Science Department, Technion, Haifa 3200003, Israel. E-mail: [email protected] Abstract. Motivated by the cloud computing paradigm, and by key optimization problems in all-optical networks, we study two variants of the classic job interval scheduling problem, where a reusable resource is allocated to competing job intervals in a flexible manner. Each job, Ji , requires the use of up to rmax (i) units of the resource, with a profit of pi ≥ 1 accrued for each allocated unit. The goal is to feasibly schedule a subset of the jobs so as to maximize the total profit. The resource can be allocated either in contiguous or non-contiguous blocks. These problems can be viewed as flexible variants of the well known storage allocation and bandwidth allocation problems. We show that the contiguous version is strongly NP-hard, already for instances where all jobs have the same profit and the same maximum resource requirement. For such instances, we derive the best possible positive result, namely, a polynomial time approximation scheme. We further show that the contiguous variant admits a ( 45 + ε)-approximation algorithm, for any fixed ε > 0, on instances whose job intervals form a proper interval graph. At the heart of the algorithm lies a non-standard parameterization of the approximation ratio itself, which is of independent interest. For the non-contiguous case, we uncover an interesting relation to the paging problem that leads to a simple O(n log n) algorithm for uniform profit instances of n jobs. The algorithm is easy to implement and is thus practical. 1 Introduction 1.1 Background and Motivation Interval scheduling is one of the basic problems in the study of algorithms, with a wide range of applications in computer science and in operations research (see, e.g., [17]). We focus on scheduling intervals with resource requirements. In this ? This work was partly carried out during a visit to DIMACS supported by the National Science Foundation under grant number CCF-1144502. model, we have a set of intervals (or, activities) competing for a reusable resource.3 Each activity utilizes a certain amount of the resource for the duration of its execution and frees it upon completion. The problem is to find a feasible schedule of the activities that satisfies certain constraints, including the requirement that the total amount of resource allocated simultaneously to activities never exceeds the amount of resource available. In this classic model, two well-studied variants are the storage allocation (see, e.g., [18,5]), and the bandwidth allocation problems (see, e.g., [3,10]). In the storage allocation problem (sap), each activity requires the allocation of a contiguous block of the resource for the duration of its execution. Thus, the input is often viewed as a set of axis-parallel rectangles; and the goal is to pack a maximum profit subset of rectangles into a horizontal strip of a given height, by sliding the rectangles vertically but not horizontally. When the resource can be allocated in non-contiguous blocks, we have the bandwidth allocation (ba) problem, where we only need to allocate to each activity the required amount of the resource. Scheduling problems of this ilk arise naturally in scenarios where activities require (non-contiguous or contiguous) portion of an available resource, with some revenue associated with the allocated amount. In the cloud computing paradigm, the resource can be servers in a large computing cluster, storage capacity, or bandwidth allocated to time-critical jobs (see, e.g. [14,20]). In flexgrid all-optical networks, the resource is the available spectrum of light that is divided into frequency intervals of variable width, with a gap of unused frequencies between them (see, e.g., [15,13]). Several high-speed signals connecting different source-destination pairs may share a link, provided they are assigned disjoint sub-spectra (see, e.g., in [22]). Given a path network and a set of connection requests, represented by intervals, each associated with a profit per allocated spectrum unit and a maximum bandwidth requirement, we need to feasibly allocate frequencies to the requests, with the goal of maximizing the total profit. In the fbap variant the sub-spectra allocated to each request need not be contiguous, while in the fsap variant each request requires a contiguous frequency spectrum. 1.2 Problem Statement We consider a variant of sap where each interval can be allocated any amount of the resource up to its maximum requirement, with a profit accrued from each resource unit allocated to it. The goal is to schedule the intervals contiguously, subject to resource availability, so as to maximize the total profit. We refer to this variant below as the flexible storage allocation problem (fsap). We also consider the flexible bandwidth allocation (fbap) problem, where each interval specifies an upper bound on the amount of the resource it can be allocated, as well as the profit accrued from each allocated unit of the resource. 3 Throughout the paper, we use the terms ‘intervals’ and ‘activities’ interchangeably. 2 The goal is to determine the amount of resource allocated to each interval so as to maximize the total profit. Formally, in our general framework, the input consists of a set J of n intervals. Each interval Ji ∈ J requires the utilization of a given, limited, resource. The amount of resource available, denoted by W > 0, is fixed over time. Each interval Ji is defined by the following parameters. (1) A left endpoint, si ≥ 0, and a right endpoint, ei ≥ 0. In this case Ji is associated with the half-open interval [si , ei ) on the real line. (2) The amount of resource allocated each interval, Ji , which can take any value up to the maximum possible value for Ji , given by rmax (i). (3) The profit pi ≥ 1 gained for each unit of the resource allocated to Ji . A feasible solution has to satisfy the following conditions. (i) Each interval Ji ∈ J is allotted an amount of the resource in its given range. (ii) The total amount of the resource allocated at any time does not exceed the available amount, W . In fbap, we seek a feasible allocation which maximizes the total profit accrued by the intervals. In fsap, we add the requirement that the allocation to each interval is a contiguous block of the resource. Given an algorithm A, let A(J ), OP T (J ) denote the profit of A and an optimal solution for a problem instance J , respectively. For ρ ≥ 1, we say that T (J ) A is a ρ-approximation algorithm if, for any instance J , OP A(J ) ≤ ρ. 1.3 Our Contribution We derive both positive and negative results. On the positive side, we uncover an interesting relation of fbap to the classic paging problem that leads to a simple O(n log n) algorithm for uniform profit instances (see Section 3). Thus, we substantially improve the running time of the best known algorithm for fbap (due to [25]) which uses flow techniques. Our algorithm is easy to implement and is thus practical. On the negative side, we show (in Section 5) that fsap is strongly NP-hard, already for instances where all jobs have the same profit and the same maximum resource requirement. For such instances, we derive the best possible positive 2k result, namely, a PTAS. We also present (in the Appendix) a 2k−1 -approximation W algorithm, where k = d Max e, which is of practical interest. We further show (in Section 4) that fsap admits a ( 54 + ε)-approximation algorithm, for any fixed ε > 0, on instances whose job intervals form a proper interval graph. Techniques: Our Algorithm, Paging fba, for the non-contiguous version of the problem, uses an interesting relation to the offline paging problem. The key idea is to view the available resource as slots in fast memory, and each job (interval) Ji as rmax (i) pairs of requests for pages in the main memory. Each pair of requests is associated with a distinct page: one request at si and one at ei − 1. We apply Belady’s offline paging algorithm that − in case of a page fault − evicts the page that is requested furthest in the future (see Section 3). If a page remains in the fast memory between the two times it was requested, then the resource that 3 corresponds to its fast memory slot is allocated to the corresponding job. In fact, Paging fba solves the flexible bandwidth allocation problem optimally for more general instances, where each interval Ji has also a lower bound, 0 < rmin (i) on the amount of resource Ji is allocated.4 At the heart of our ( 45 + ε)-approximation algorithm for proper instances lies a non-standard parameterization of the approximation ratio itself. Specifically, the algorithm uses a parameter β ∈ {0, 1} to guess the fraction of total profit obtained by wide intervals, i.e., intervals with high maximum resource requirement, in some optimal solution. If the profit from these intervals is at least this fraction β of the optimum for the given instance, such a high profit subset of wide intervals is found by the algorithm; else, the algorithm proceeds to find a high profit subset of narrow and wide intervals, by solving an LP relaxation of a modified problem instance. In solving this instance, we require that the profit from extra units of the resource assigned to wide intervals (i.e., above certain threshold value) is bounded by a β fraction of the optimum (see Section 4). This tighter constraint guarantees a small loss in profit when rounding the (fractional) solution for the LP. The approximation ratio of ( 54 + ε) is attained by optimizing on the value of β. We believe this novel technique can lead to better approximation algorithms for other problems as well. 1.4 Related Work The classic interval scheduling problem, where each interval requires all of the resource for its execution, is solvable in O(n log n) time [3]. The storage allocation problem (sap) is NP-hard, since it includes Knapsack as a special case. sap was first studied in [3,18]. Bar-Noy et al. [3] presented an approximation algorithm that yields a ratio of 7. Chen et al. [11] presented a polynomial time exact algorithm for the special case where all resource requirements are multiples of W/K, for some fixed integer K ≥ 1. Bar-Yehuda et al. [4] presented a randomized algorithm for sap with ratio 2 + ε, and a deterministic algorithm with ratio 2e−1 e−1 + ε < 2.582. The best known result is a deterministic (2 + ε)-approximation algorithm due to [23]. The bandwidth allocation (ba) problem is known to be strongly NP-hard, already for uniform profits [12]. The results of Albers et al. [1] imply a constant factor approximation (where the constant is about 22). The ratio was improved to 3 by Bar-Noy et al. [3]. Calinescu et al. [8] developed a randomized approximation algorithm for ba with expected performance ratio of 2 + ε, for every ε > 0. The best known result is an LP-based deterministic (2+ε)-approximation algorithm for ba due to Chekuri et al. [10]. Both ba and sap have been widely studied also in the non-uniform resource case, where the amount of available resource may change over time. In this setting, ba can be viewed as the unsplittable flow problem (UFP) on a path. The best known result is a (2+ε)-approximation algorithm due to Anagnostopoulos et al. [2]. Batra et al.[6] obtained approximation schemes for some spacial cases.5 4 5 In obtaining all other results, we assume that rmin (i) = 0 for 1 ≤ i ≤ n. See also the recent results on UFP with Bag constraints (BagUFP) [9]. 4 For sap with non-uniform resource, the best known ratio is 2 + ε, obtained by a randomized algorithm of Mömke and Wiese [21]. The flexible variants of sap and ba were introduced by Shalom et al.[25]. The authors study instances where each interval i has a minimum and a maximum resource requirement, satisfying 0 ≤ rmin (i) < rmax (i) ≤ W , and the goal is to find a maximum profit schedule, such that the amount of resource allocated to each interval i is in [rmin (i), rmax (i)]. The authors show that fbap can be optimally solved using flow techniques. The paper also presents a 43 approximation algorithm for fsap instances in which the input graph is proper, (i) e, for all 1 ≤ i ≤ n. The paper [24] shows NP-hardness and rmin (i) ≤ d rmax 2 of fsap instances where each interval has positive lower and upper bounds on the amount of resource it can be allocated. The problem remains difficult even if the bounds are identical for all activities, i.e., rmin (i) = Min and rmax (i) = Max, for all i, where 0 < Min < Max ≤ W . The authors also show that fsap is NPhard for the subclass of instances where rmin (i) = 0 and rmax (i) is arbitrary, for all i, and present a (2 + ε)-approximation algorithm for such instances, for any fixed ε > 0. We strengthen the hardness result of [24], by showing that fsap is strongly NP-hard even if rmin (i) = 0 and rmax (i) = Max, for all i. Finally, the paper [23] considers variants of fsap and fbap where 0 ≤ rmin (i) < rmax (i) ≤ W , and the goal is to feasibly schedule a subset S of the intervals of maximum total profit (namely, the amount of resource allocated to each interval i ∈ S is in [rmin (i), rmax (i)]). The paper presents a 3-approximation algorithm for this version of fbap, and a (3 + ε)-approximation for the corresponding version of fsap, for any fixed ε > 0. 2 Preliminaries We represent the input J as an interval graph, G = (V, E), in which the set of vertices, V , represents the n jobs, and there is an edge (vi , vj ) ∈ E if the intervals representing the jobs Ji , Jj intersect. For simplicity, we interchangeably use Ji to denote the i-th job, and the interval representing the i-th job on the realline. We say that an input J is proper, if in the corresponding interval graph G = (V, E), no interval Ji is properly contained in another interval Jj , for all 1 ≤ i, j ≤ n. Throughout the paper, we use coloring terminology when referring to the assignment of bandwidth to the jobs. Specifically, the amount of available resource, W , can be viewed as the amount of available distinct colors. Thus, the demand of a job Ji for (contiguous) allocation from the resource, where the allocated amount is an integer in the range [0, rmax (i)], can be satisfied by coloring Ji with a (contiguous) set of colors, of size in the range [0, rmax (i)]. Let C = {1, 2, . . . , W } denote the set of available colors. Recall that in a contiguous coloring, c, each interval Ji is assigned a block of |c(Ji )| consecutive colors in {1, . . . , W }. In a circular contiguous coloring, c, we have the set of colors positioned consecutively on a circle. Each interval Ji ∈ J is assigned a block of |c(Ji )| consecutive colors on the circle. Formally, Ji can be assigned 5 any consecutive sequence of |c(Ji )| indices, {`, (` mod W ) + 1, . . . , [(` + |c(Ji )| − 2) mod W ]+1}, where 1 ≤ ` ≤ W . Given a coloring of the intervals, c : J → 2C , let |c(Ji )|P be the number of colors assigned to Ji , then the total profit accrued n from c is i=1 pi |c(Ji )|. Let S ⊆ J be the subset of jobs Ji for which |c(Ji )| ≥ 1 in a (contiguous) coloring C for the input graph G. We call the subgraph of G induced by S, denoted GS = (S, ES ), the support graph of S. 3 The Flexible Bandwidth Allocation Problem In this section we study fbap, the non-contiguous version of our problem. We consider a generalized version of fbap, where each activity i has also a lower bound rmin (i) on the amount of resource it is allocated. Shalom et al.[25] showed that this generalized fbap can be solved optimally by using flow techniques. We show that in the special case where all jobs have the same (unit) profit per allocated color (i.e., resource unit), the problem can be solved by an efficient algorithm based on Belady’s well known algorithm for offline paging [7]. From now on, assume that we have a feasible instance, that is, there are enough colors to allocate at least rmin (i) colors to each job Ji . To gain some intuition, assume first that rmin (i) = 0 for all i ∈ [1..n]. We view the available colors as slots in fast memory, and each job (interval) Ji as rmax (i) pairs of requests for pages in the main memory. Each pair of requests is associated with a distinct page: one request at si and one at ei − 1. We now apply Belady’s offline paging algorithm: if a page remains in the fast memory between the two times it was requested, then the color that corresponds to its fast memory slot is allocated to the corresponding job. When rmin (i) > 0, we follow the same intuition while allocating at least rmin (i) colors to each Ji , to ensure feasibility. We show below that the optimality of the paging algorithm implies the optimality of the solution for our fbap instance. The algorithm is implemented iteratively, by reassigning colors as follows. The algorithm scans the left endpoints of the intervals, from left to right. When the algorithm scans si , it first assigns rmin (i) colors to Ji to ensure feasibility. The algorithm starts by assigning the available colors. If there are less than rmin (i) colors available at si , the algorithm examines the intervals intersecting Ji at si in decreasing order of right endpoints, and feasibly decreases the number of colors assigned to these intervals and reassigns them to Ji , until Ji is allocated rmin (i) colors. The feasibility of the instance implies that so many colors can be reassigned. Next, the algorithm allocates up to rmax (i) − rmin (i) additional colors to interval Ji , to maximize profit. If rmax (i) − rmin (i) colors are available at si , then they are assigned to Ji . If so many colors are unavailable, and thus Ji is assigned less than rmax (i) colors, then the algorithm follows Belady’s algorithm to potentially assign additional colors to Ji . The algorithm examines the intervals intersecting Ji at si , and in case there are such intervals with larger right 6 endpoint than ei , it feasibly decreases the number of colors assigned to such intervals with the largest right endpoints (furthest in the future), and increases the number of colors assigned to Ji , up to rmax (i). When the algorithm scans ei , the right endpoint of an interval Ji , the colors assigned to Ji are released and become available. The pseudocode for Paging fba is given in the Appendix (see Algorithm 2). Theorem 1. Paging fba is an optimal O(n log n) time algorithm, for any fbap instance where pi = 1 for all 1 ≤ i ≤ n. Proof. Given an instance of fbap, where pi = 1 for all 1 ≤ i ≤ n, define a respective multipaging problem instance, where the size of the fast memory is W , as follows. (The multipaging problem is a variant of the paging problem, where more than one page is requested at the same time.) For each job Ji ∈ J define two types of page requests: feasibility requests and profit requests. For each si ≤ t < ei there are rmin (i) feasibility requests for the same rmin (i) pages. In addition there are rmax (i) − rmin (i) pairs of requests for rmax (i) − rmin (i) distinct pages. The first request of each pair is at si and the second at ei − 1. It is not difficult to see that Belady’s algorithm is optimal also for the multipaging problem [19]. Consider an implementation of Belady’s algorithm for this instance where the feasibility requests are always processed before the profit requests. In this case it is easy to see that none of the pages that are requested in the feasibility requests will be evicted before the last time in which they are requested. Note that Paging fba implements this variant of Belady’s algorithm, where AVAIL corresponds to the available memory slots. The optimality of Belady’s algorithm guarantees that the number of page faults is minimized. The page faults Pnwhenever a new page is requested cannot be avoided. (Note that there are i=1 rmax (i) such faults.) Additional page faults may occur when the second occurrence of a page in the pairs of the profit requests needs to be accessed. Minimizing the number of such page faults is equivalent to maximizing the number of pairs of profit requests for which the requested page is in memory throughout the interval [si , ei ), that is, maximizing the profit of allocated resources in the fbap instance. Paging fba can be implemented in O(n log n) time, by noting that the total number of color reassignments is linear, and that once we sort the intervals by left endpoints, the ‘active’ intervals can be stored in a priority queue by right endpoints to implement the reassignments. 4 Approximating Flexible Storage Allocation In this section we consider the flexible storage allocation problem. We focus below on fsap instances in which the jobs form a proper interval graph, and give an approximation algorithm that yields a ratio of ( 45 +ε) to optimal. Our Algorithm, Proper fsap, uses the parameters ε > 0 and β ∈ (0, 1) (to be determined). Initially, Proper fsap guesses the value of an optimal solution OP T fsap (J ). (The guessing is done by binary search and it is straightforward to verify by the 7 results of Proper fsap whether the guess is correct, or whether it is under or above the optimal value.) Let Jwide denote the set of wide intervals Ji for which rmax (i) ≥ εW . Let Jnarrow denote the complement set of narrow intervals. If the profit from the wide intervals that are actually assigned at least εW colors is large, namely, at least β · OP T fsap (J ), then such a high profit subset of intervals is found and returned by the algorithm as the solution. Otherwise, Proper fsap calls Algorithm AN arrow Color that finds a solution of high profit accrued from both narrow and wide intervals. The pseudocode for Proper fsap follows. Algorithm 1 Proper fsap(J , r̄max , p̄, W, ε, β) 1: Guess the value of OP T fsap (J ), the optimal solution of fsap on the input J. 2: Find in Jwide a solution S of fsap with maximum total profit among all solutions in which intervals that are assigned colors are assigned at least dεW e colors. 3: if P (S) < βOP Tfsap (J ) then 4: Let S be the solution output by AN arrow Color (J , r̄max , p̄, W, ε, βOP T fsap (J )) 5: end if 6: Return S and the respective contiguous coloring We now describe Algorithm AN arrow Color that finds an approximate solution for fsap in case the extra profit of the wide intervals − above the profit of their first dεW e assigned colors − is bounded by β fraction of the optimal solution. First, AN arrow Color solves a linear program LPfba that finds a (fractional) maximum profit solution of the fbap problem on the set J , in which the number of colors used is no more than (1 − ε)W . Note that, according to our guess, the value of the solution is at least (1 − ε)OP Tfsap (J ). This is since the value of the optimal solution for LPfba when all W colors are used is at least OP Tfsap (J ). The solution needs to satisfy an upper bound on the extra profit accrued from wide intervals that are assigned more than εW colors. Next, this solution is rounded to an integral solution of the fbap instance, of value at least (1 − 2ε)OP T fsap (J ). AN arrow Color proceeds by converting the resulting (non-contiguous) coloring to a contiguous circular coloring with the same profit. Finally, this coloring is converted to a valid (non-circular) coloring. In this part, AN arrow Color searches for the ‘best’ index for ‘cutting’ the circular coloring. This is done by examining a polynomial number of integral points, ` ∈ [1, (1 − ε)W ], and calculating in each the loss in profit due to eliminating at most half of the colors for each wide interval whose (contiguous) color set includes color `. The algorithm ‘cuts the circle’ in the point ` which causes the smallest harm to the total profit. For each wide interval Ji crossing `, we assign the largest among its first block of colors (whose last color is `), or the second block of colors (which starts at ` mod b(1 − ε)W c + 1). For each narrow 8 interval that included `, we assign the same number of new colors in the range [(1 − ε)W, W ]. We give the pseudocode of AN arrow Color in Algorithm 3 in the Appendix. 4.1 Analysis of Proper fsap Our main result is the following. Theorem 2. Proper fsap is a ( 45 +ε)-approximation algorithm for any instance of fsap in which the input graph is proper. We prove the theorem using the following results. First, we consider the case where there exists an optimal solution of fsap in which the profit from the intervals in Jwide that are assigned at least εW colors is at least βOP T fsap (J ). Lemma 3 If there exists an optimal solution of fsap for J in which the profit from the intervals in Jwide that are assigned at least εW colors is at least βOP T fsap (J ), then a solution of profit at least βOP T fsap (J ) can be found in polynomial time. Proof. We consider only the intervals in Jwide and the set of feasible solutions S with the property that each interval in S is assigned at least εW colors. Note that for each such feasible solution, at any time t > 0, the number of active intervals is bounded by 1/ε, which is a constant. Hence, we can use dynamic programming to find a solution of maximum profit among all these feasible solutions.6 By our assumption, the value of this solution is at least βOP T fsap (J ). Next, we consider the complement case. In Figure 1 we give the linear program used by Algorithm AN arrow Color . For each Ji ∈ Jnarrow the linear program has a variable xi indicating the number of colors assigned to Ji . For each Ji ∈ Jwide , the linear program has two variables: xi and yi , where xi + yi is the number of colors assigned to Ji ; yi gives the number of assigned colors “over” the first dεW e colors. Constraint (1) bounds the total profit from the extra allocation for each interval Ji ∈ Jwide . The constraints (2) bound the total number of colors used at any time t > 0 by (1 − ε)W . We note that the number of constraints in (2) is polynomial in |J |, since we only need to consider the “interesting” points of time t, when t = si for some interval Ji ∈ J , i.e., we have at most n constraints. Lemma 4 For any ε > 0, there is an integral solution of LP fba of total profit at least (1 − 2ε)OP T fsap (J ). Proof. Let x̄∗ , ȳ ∗ be an optimal (fractional) solution of LP fba . Note that, by possibly move value from yi∗ to x∗i , we can always find such a solution in which for any Ji ∈ Jwide , if yi∗ > 0 then x∗i = dεW e. 6 This is similar to the dynamic programming algorithm for bounded load instances given in [25]. Thus, we omit the details. 9 (LP fba ) : max X Ji ∈Jnarrow s.t. X X p i xi + pi (xi + yi ) Ji ∈Jwide pi yi ≤ β(1 − ε)OP Tfsap (J ) (1) Ji ∈Jwide X X xi + {Ji ∈J :t∈Ji } yi ≤ (1 − ε)W ∀t > 0 (2) {Ji ∈Jwide :t∈Ji } 0 ≤ xi ≤ min{rmax (i), dεW e} 0 ≤ yi ≤ rmax (i) − dεW e for 1 ≤ i ≤ n for Ji ∈ Jwide . Fig. 1: The linear program LPfba Let Sw be the set of intervals in Jwide for which yi > 0. Consider now the solution x̄∗ , z̄, where zi = byi∗ c, for all Ji ∈ Sw . We bound the loss due to the rounding down. P P Ji ∈Sw pi (xi + byi c) ≥ PJi ∈Sw pi (xi + yi − 1) ≥ Ji ∈Sw pi (xi + yi )(1 − x1i ) P 1 ≥ Ji ∈Sw pi (xi + yi )(1 − dεW e) The last inequality follows from the fact that xi = dεW e, for any Ji ∈ Sw . Thus, for W ≥ 1/ε2 , we have that the total profit after rounding the yi values is at least (1 − 2ε)OP T fba (J ). Now, consider the linear program LPround , in which we fix bi = byi∗ c, for Ji ∈ Sw . We have that x̄∗ is a feasible (fractional) solution of LP round with (LP round ) : max n X pi xi i=1 s.t. X {Ji ∈J :t∈Ji } X xi + bi ≤ (1 − ε)W ∀t > 0 {Ji ∈Sw :t∈Ji } 0 ≤ xi ≤ min{rmax (i), dεW e} for 1 ≤ i ≤ n P profit at least (1 − 2ε)OP T fba (J ) − Ji ∈Sw pi bi . The rows of the coefficient matrix of LP round can be permuted so that the time points associated with the rows form an increasing sequence. In the permuted matrix each column has consecutive 1’s, thus this matrix is totally unimodular (TU). It follows that we can find in polynomial time an integral solution, x̄∗I , of the same total profit. Thus, the integral solution x̄∗I , z̄ satisfies the lemma. 10 0 Lemma 5 Let P (c0 (Sw )), P (c0 (Sn0 )) be the total profit from the intervals in the 0 0 sets Sw and Sn in the circular coloring c0 generated in Step 3. of AN arrow Color . 0 0 Then, (i) P (c00 (Sw )) ≥ 34 P (c0 (Sw )), and (ii) P (c00 (Sn0 )) = P (c0 (Sn0 )). Proof. Property (i) follows from a result of [25], which implies that the non0 circular contiguous coloring c00 , obtained for Sw in Steps 17−18 of AN arrow Color , 3 0 0 has a total profit at least 4 P (c (Sw )). As shown in [25], this algorithm can be implemented in polynomial time. Also, (ii) holds since (in Steps 22−23) Algorithm AN arrow Color assigns |c0 (Ji )| colors to any Ji ∈ Sn0 , i.e., in the resulting non-circular contiguous coloring, c00 , we have |c00 (Ji )| = |c0 (Ji )|, ∀ Ji ∈ Sn0 . We note that c00 is a valid coloring, since at most one interval (in particular, an interval Ji ∈ Sn0 ) can be assigned the color `good at any time t > 0. It follows, that the intervals Ji in Sn0 that contain in c0 (Ji ) `good form an independent set. Since, for any Ji ∈ Sn0 , rmax (i) ≤ dεW e, we can assign to all of these intervals the same set of new colors in the range {b(1 − ε)W c + 1, . . . , W }. Proof of Theorem 2: Let 0 < β < 1 be the parameter used by Proper fsap. For a correct guess of OP T fsap (J ) and a fixed value of ε > 0, let ε̂ = ε/3. (i) If there is an optimal solution in which the profit from the intervals in Jwide that are assigned at least εW colors is at least βOP T fsap (J ) then, by Lemma 3, Proper fsap finds in Step 2 a solution of profit at least βOP Tfsap (J ) in polynomial time. (ii) Otherwise, consider the coloring c00 output by AN arrow Color . Then, using Lemma 5, we have that 0 )) + P (c0 (Sn0 )) P (c0 (J )) P (c0 (Sw = ≤ max 0 0 3P (c (Sw )) 0<x≤β P (c00 (J )) + P (c0 (Sn0 )) 4 3x 4 4 1 = 4 − β +1−x Now, applying Lemma 4, and the rounding in Step 6 of AN arrow Color with ε̂, we have that P (c0 (J )) ≥ (1 − 3ε̂)OP T fsap (J ) = (1 − ε)OP T fsap (J ). The theorem follows by taking β = 45 . 5 Uniform fsap Instances We now consider uniform instances of fsap, in which rmax (i) = Max, for some 1 ≤ Max ≤ W , and pi = 1, for all 1 ≤ i ≤ n. Let k = dW/Maxe. We first prove that if k = W/Max (i.e., W is an integral multiple of Max) then fsap can be solved optimally by finding a maximum k-colorable subgraph in G, and assigning to each interval in this subgraph Max contiguous colors. In contrast to this case if k > W/Max, then we show that fsap is NP-Hard, and give a polynomial approximation scheme to solve such instances. Lemma 6 An fsap instance where for all 1 ≤ i ≤ n, rmax (i) = Max, and W is multiple of Max can be solved exactly in polynomial time. 11 Proof. Consider an fbap instance where for all 1 ≤ i ≤ n, rmax (i) = Max, and W is multiple of Max. We claim that there exists an optimal solution to this fbap instance in which each job gets either 0 or Max colors. To see that consider the behavior of the algorithm Paging fba on such an instance, i.e., in which rmin (i) = 0 and rmax (i) = Max. Note that when we start the algorithm |AVAIL| is a multiple of Max and thus when the first (left) endpoint s1 is considered the job J1 is allocated Max colors and |AVAIL| remains a multiple of Max. Assume inductively that as the endpoints are scanned all the jobs that were allocated colors up to this endpoint were allocated Max colors and that |AVAIL| is a multiple of Max. If the current scanned endpoint is a right endpoint ei then by the induction hypothesis either 0 or Max colors are added to AVAIL and nothing else is changed. Suppose that the scanned endpoint is a left endpoint si . If |AVAIL| > 0 then Max colors from AVAIL are allocated to Ji . Otherwise, Ji may be allocated colors that were previously allocated to another job J` , for ` < i. However, in this case because rmin (`) = 0 all the Max colors allocated to J` will be moved to Ji , and the hypothesis still holds. The optimal way to assign either 0 or Max colors to each job is given by computing the maximum k = (W/Max)-colorable subgraph of G and assigning Max colors to each interval in the maximum k-colorable subgraph. Since the assignment of these colors can be done contiguously it follows that this is also the optimal solution to the respective fsap instance. In the Appendix, we give a proof of hardness in case k > W/Max. Theorem 7. fsap is strongly NP-hard even if for all 1 ≤ i ≤ n rmax (i) = 3, and W is not divisible by 3. 5.1 An Approximation Scheme We now describe a PTAS for uniform istances of fsap. Fix ε > 0, and let J be a uniform input for fsap. Denote by OP Tfsap (J ) the value of an optimal solution for instance J of fsap. The scheme handles separately two subclasses of inputs, depending on the value of Max. First, we consider the case where Max is large relative to W , or more precisely k = dW/Maxe ≤ 1/ε. We prove in the next lemma that in this case if we partition the colors into a constant number of contiguous strips and limit our solution to always assigning all the colors in the same strip to the same job, we can find a solution that is at least (1 − ε)OP Tfsap (J ). The size of each strip (except possibly the last one) is bεMax/4c ≥ 1. Since the number of strips is O(1/ε2 ), we can find an approximation in this case using dynamic programming as shown in [25]. Lemma 8 Any optimal solution for a uniform input J for fsap where k = dW/Maxe ≤ 1/ε can be converted to a solution where each interval is assigned a number of colors that is an integral number of strips, and the total profit is at least (1 − ε)OP Tfsap (J ). 12 Proof. W.l.o.g., we may assume that bεMax/4c ≥ 1, else we have that W is a constant, and we can solve fsap optimally in polynomial time (see [25]). Given an optimal solution for a uniform input J , let S be the subset of intervals Ji for which |c(Ji )| > 0, and let GS be the support graph for S (i.e., the subgraph of the original interval graph induced by the intervals in S). Using the above 4W e strips. Denote by Cj partition of the colors to strips, we have 1 ≤ N ≤ d εMax the subset of colors of strip j. We obtain the strip structure for the solution as follows. Let Sj ⊆ S be the subset of intervals with colors in strip j, i.e., Sj = {Ji |c(Ji )∩Cj 6= ∅}. Initialize for all Ji ∈ S, c0 (Ji ) = ∅. (i) For all 1 ≤ j ≤ N , find in GS a maximum independent set, Ij of intervals Ji ∈ Sj . For any Ji ∈ Ij , assign to Ji all colors in Cj , i.e., c0 (Ji ) = c0 (Ji ) ∪ Cj . (ii) For any Ji ∈ S, if |c0 (Ji )| > Max then omit from the coloring of Ji a consecutive subset of strips, starting from the highest 1 ≤ j ≤ N , such that Cj ⊆ c0 (Ji ), until for the first time |c0 (Ji )| ≤ Max. We show below that the above strip coloring for S is feasible, and that the total profit from the strip coloring is at least (1 − ε)OP T fsap (J). To show feasibility, note that if Ji ∈ Sj and Ji ∈ Sj+2 then because the coloring is contiguous Ji is allocated all the colors in Sj+1 , and thus any maximum independent set Ij+1 will contain Ji since it has no conflicts with other jobs in Sj+1 . It follows that if a job Ji is allocated colors in more than two consecutive strips, i.e., Ji ∈ Sj ∩ Sj+1 ∩ · · · ∩ Sj+` , for ` > 1, then Ji ∈ Ij+1 ∩ · · · ∩ Ij+`−1 . Thus, each interval Ji ∈ S will be assigned in step (i) a consecutive set of strips. Hence c0 is a contiguous coloring. In addition, after step (ii), for all Ji ∈ S we have that |c0 (Ji )| ≤ Max. Now, consider the profit of the strip coloring. We note that after step (i), the total profit of c0 is at least OP T fsap (J). This is because for each strip j, |Cj | · |Ij | is an upper bound on the profit that can be obtained from this strip. We show that the harm of reducing the number of colors in step (ii) is small. We distinguish between two type of intervals in S. (a) Intervals Ji for which |c(Ji )| ≥ (1−ε/2)Max. Since coloring c is valid it follows that |c0 (Ji )| is reduced in step (ii) only if before this step |c0 (Ji )| > |c(Ji )|. Consider all the strips that contain colors assigned to Ji in the original coloring c. Note that in all such strips except at most two no colors are assigned to any interval that intersects Ji . Thus |c0 (Ji )| is reduced in step (ii) by at most 2b εMax 4 c ≤ (ε/2)Max. Since |c(Ji )| ≥ (1 − ε/2)Max, we have that after step (ii), |c0 (Ji )| ≥ |c(Ji )| − (ε/2)Max ≥ (1 − ε)Max. (b) For any interval Ji for which |c(Ji )| < (1 − ε/2)Max, since after step (i) 0 |c0 (Ji )| ≤ |c(Ji )| + 2b εMax 4 c, we have that |c (Ji )| ≤ Max. Thus, no colors are omitted from Ji in step (ii). From (a) and (b), we have that the total profit from the strip coloring satisfies OP T 0 fsap (J ) ≥ (1 − ε)OP T fsap (J ). Now, consider the case where Max is small, i.e., k = dW/Maxe > 1/ε. In this case we consider just (k − 1)Max consecutive colors and ignore the remainder up to εW colors. Recall that when the number of colors is a multiple of Max we can 13 find an optimal solution. Let OP Tfsap(W ) (J ) denote the value of an optimal solution for instance J of fsap with W colors, and recall that k = dW/Maxe. Since (k − 1)Max < W < kMax, OP Tfsap((k−1)Max) (J ) < OP Tfsap(W ) (J ) < OP Tfsap(kMax) (J ). The value of OP Tfsap((k−1)Max) is Max times the size of the max (k − 1)-colorable subgraph of G, and the value of OP Tfsap(kMax) is Max times the size of the max k-colorable subgraph of G. Clearly, the ratio of the sizes of these subgraphs and thus the ratio of the two optimal values is bounded by 1−1/k > 1−ε. It follows that OP Tfsap((k−1)Max) (J ) ≥ (1−ε)OP Tfsap(kMax) (J ) > (1 − ε)OP Tfsap(W ) (J ). Combining the results, we have Theorem 9. The above algorithm is a PTAS for uniform fsap instances. Acknowledgments: We thank Magnús Halldórsson and Viswanath Nagarajan for valuable discussions. References 1. S. Albers, S. Arora, and S. Khanna. Page replacement for general caching problems. In SODA, pages 31–40, 1999. 2. A. Anagnostopoulos, F. Grandoni, S. Leonardi, and A. Wiese. A mazing 2+ approximation for unsplittable flow on a path. In SODA, pages 26–41, 2014. 3. A. Bar-Noy, R. Bar-Yehuda, A. Freund, J. Naor, and B. Schieber. A unified approach to approximating resource allocation and scheduling. JACM, 48(5):735–744, 2000. 4. R. Bar-Yehuda, M. Beder, Y. Cohen, and D. Rawitz. Resource allocation in bounded degree trees. Algorithmica, 54(1):89–106, 2009. 5. R. Bar-Yehuda, M. Beder, and D. Rawitz. A constant factor approximation algorithm for the storage allocation problem: extended abstract. In SPAA, pages 204–213, 2013. 6. J. Batra, N. Garg, A. Kumar, T. Mömke, and A. Wiese. New approximation schemes for unsplittable flow on a path. In SODA, pages 47–58, 2015. 7. L. A. Belady. A study of replacement algorithms for virtual-storage computer. IBM Systems Journal, 5(2):78–101, 1966. 8. G. Călinescu, A. Chakrabarti, H. J. Karloff, and Y. Rabani. An improved approximation algorithm for resource allocation. ACM Transactions on Algorithms, 7(4), 2011. 9. V. T. Chakaravarthy, A. R. Choudhury, S. Gupta, S. Roy, and Y. Sabharwal. Improved algorithms for resource allocation under varying capacity. In ESA, pages 222–234, 2014. 10. C. Chekuri, M. Mydlarz, and F. B. Shepherd. Multicommodity demand flow in a tree and packing integer programs. ACM Transactions on Algorithms, 3(3), 2007. 11. B. Chen, R. Hassin, and M. Tzur. Allocation of bandwidth and storage. IIE Transactions, 34(5):501–507, 2002. 12. M. Chrobak, G. J. Woeginger, K. Makino, and H. Xu. Caching is hard - even in the fault model. Algorithmica, 63(4):781–794, 2012. 13. O. Gerstel. Flexible use of spectrum and photonic grooming. In Photonics in Switching, 2010. 14. N. Jain, I. Menache, J. Naor, and J. Yaniv. A truthful mechanism for value-based scheduling in cloud computing. In SAGT, pages 178–189, 2011. 14 15. M. Jinno, H. Takara, B. Kozicki, Y. Tsukishima, Y. Sone, and S. Matsuoka. Spectrum-efficient and scalable elastic optical path network: architecture, benefits, and enabling technologies. Comm. Mag., 47:66–73, 2009. 16. R. M. Karp. Reducibility among combinatorial problems. In Proc. Complexity of Computer Computations, pages 85–103, 1972. 17. A. W. Kolen, J. K. Lenstra, C. H. Papadimitriou, and F. C. Spieksma. Interval scheduling: A survey. Naval Research Logistics, 54(5):530–543, 2007. 18. S. Leonardi, A. Marchetti-Spaccamela, and A. Vitaletti. Approximation algorithms for bandwidth and storage allocation problems under real time constraints. In FSTTCS, pages 409–420, 2000. 19. V. Liberatore. Uniform multipaging reduces to paging. Inf. Process. Lett., 67(1):9– 12, 1998. 20. M. Mao and M. Humphrey. Auto-scaling to minimize cost and meet application deadlines in cloud workflows. In SC, 2011. 21. T. Mömke and A. Wiese. A (2+)-approximation algorithm for the storage allocation problem. In ICALP, pages 973–984, 2015. 22. R. Ramaswami, K. N. Sivarajan, and G. H. Sasaki. Optical Networks: A Practical Perspective. Morgan Kaufmann Publisher Inc., San Francisco, 2009. 23. H. Shachnai, A. Voloshin, and S. Zaks. Flexible bandwidth assignment with application to optical networks. In MFCS, 2014. 24. H. Shachnai, A. Voloshin, and S. Zaks. Optimizing bandwidth allocation in flexgrid optical networks with application to scheduling. In IPDPS, 2014. 25. M. Shalom, P. Wong, and S. Zaks. Profit maximization in flex-grid all-optical networks. In SIROCCO, 2013. A Algorithm Paging fba Algorithm 2 gives the pseudocode of Paging fba. B Hardness of fsap for Uniform Instances Proof of Theorem 7: The reduction is from of the 3-Exact-Cover (3XC) problem defined as follows. Given a universal set U = {e1 , . . . , e3n } and a collection S = {S1 , . . . , Sm } of 3 element subsets of U , is there a sub-collection S 0 ⊆ S such that each element of U occurs in exactly one member of S 0 . Note that |S 0 | = n, if such exists. Recall that Karp showed in his seminal paper [16] that 3XC is NP-Complete. To simplify the presentation, we first assume that the intervals have different profits per allocated unit. For the reduction, we use several sets of intervals. One such set is shown in Fig. 2. It consists of 16 intervals whose lengths and relative positions are given in the figure. Assume that the profit of each of the intervals 9, . . . , 16 is higher than the sum of the profits of intervals 1, . . . , 8, and that the profit of each of the intervals 2 to 7 is higher than the profit of intervals 1 and 8. Suppose that we are given two “banks” of contiguous colors to allocate to this set of intervals: one bank consists of four contiguous colors and one consists of three contiguous colors. Given that rmax (i) = 3, our first priority is to allocate three colors to each interval in [9..16]. Assuming that three colors are indeed 15 Algorithm 2 Paging fba(J , r̄min , r̄max , W ) 1: SOL = 0. 2: AVAIL = [1..W ]. 3: W.l.o.g. assume that all endpoints are distinct. Sort the left endpoints of the intervals in J in non-decreasing order. Let L denote the sorted list. 4: while not end-of-list do 5: Consider the next endpoint L. 6: if the endpoint is si , the left endpoint of Ji , then 7: SOL+ = rmin (i). 8: Ai = ∅. 9: if |AVAIL| > rmin (i) then 10: Move rmin (i) colors from AVAIL to Ai . 11: else 12: Ai = AVAIL 13: AVAIL = ∅. 14: while |Ai | < rmin (i) do 15: Among all intervals such that sk < si and |Ak | > rmin (k), let Jk be the interval with maximum right endpoint ek . 16: Move min{|Ak | − rmin (k), rmin (i) − |Ai |} colors from Ak to Ai . 17: end while 18: end if 19: Move min{|AVAIL|, rmax (i) − rmin (i)} colors from AVAIL to Ai . 20: SOL+ = min{|AVAIL|, rmax (i) − rmin (i)}. 21: Let Ji = {Jk ∈ J |sk < si ∧ ek > ei ∧ |Ak | > rmin (k)}. 22: while |Ai | < rmax (i) ∧ |Ji | > 0 do 23: Let Jk be the interval with the maximum right endpoint in Ji . 24: Move min{|Ak | − rmin (k), rmax (i) − |Ai |} colors from Ak to Ai 25: end while 26: else 27: {The endpoint is ei , the right endpoint of Ji } 28: AVAIL = AVAIL ∪ Ai 29: end if 30: end while 31: Return SOL and the sets A1 , . . . An of colors assigned to the jobs in J . allocated to each interval in [9..16], note that any other interval can be allocated at most one color. This is since any other interval intersects two intervals from [9..16] at a point. We say that two intervals from [1..8] conflict if both cannot be allocated colors simultaneously. Note that two such intervals conflict if both intersect two intervals from [9..16] at the same time point because only 7 colors are available. Define the conflict graph to be a graph over the vertices [1..8], where two vertices are connected if the respective intervals conflict. It is easy to see that the conflict graph is the path 1 – 5 – 2 – 6 – 3 – 7 – 4 – 8. Since the profit of intervals [2..7] 16 2 4 1 3 7 5 6 9 8 10 11 13 12 14 1 2 3 4 5 15 6 7 9 8 16 10 11 12 13 14 15 Fig. 2: The “two-choice” set of intervals is higher than the profit of intervals 1 and 8, the best strategy is to allocate one color to three of the intervals in [2..7] and one color to either interval 1 or 8. The only two possibilities for allocating the two banks of colors in such a way are illustrated in Fig. 3. Because of this property, we call this set of intervals a “two-choice” gadget. Note that, in the first option, the bank of 3 colors is unassigned at times: 5, 9 and 13, while in the second option, it is unassigned at times 3, 7 and 11. 1 3 10 9 12 11 2 9 4 11 10 12 8 6 15 13 13 15 14 16 5 Option 1 14 7 16 Option 2 Fig. 3: The set of intervals We need to define also a pair of intervals called an “overlapping” pair of intervals, illustrated in Fig. 4. Note that to be able to allocate 3 colors to both intervals, we need one bank of 3 contiguous colors at time interval [t1 , t2 + 1) and another at time interval [t2 , t3 ); that is, we need both banks at time interval [t2 , t2 + 1). 17 t2 t3 t1 Fig. 4: Overlapping intervals We now describe the reduction from the 3XC problem. For each set Si ∈ S, associate a “two-choice” gadget. The “two choices” correspond to the decision whether to include Si in the cover or not. For each element e ∈ U , and for each set Si such that e ∈ Si , we associate a pair of overlapping intervals, where the overlap is in one of the times in which the “two choice” gadget corresponding to set Si has an unassigned bank of 3 colors. In addition, we define some extra intervals as detailed below. Given a 3XC problem instance, set W = 9m+7 and rmax = 3 for all intervals. Let P = 8n + 45m. In the reduction, we have 5 groups of intervals defined as follows. (i) Left border: 3m + 3 intervals L1 , . . . , L3m+3 each of profit P 2 . For i ∈ [1..3n], Li = [0, i), for i ∈ [3n + 1..3m], Li = [0, 4n), and for i ∈ [3m + 1..3m + 3], Li = [0, 4n + 15m). (ii) Right border: 3m+3 intervals R1 , . . . R3m+3 each of profit P 2 . For i ∈ [1..3n], Ri = [5n + 45m + i, 8n + 45m + 1), for i ∈ [3n + 1..3m], Ri = [4n + 45m, 8n + 45m + 1), and for i ∈ [3m + 1..3m + 3], Ri = [4n + 30m, 8n + 45m + 1). (iii) “two choice” gadgets: m copies of the “two choice” gadget, one for each set Si ∈ S. The gadget associated with set Si starts at time 4n + 15m + 15(i − 1) and its length is 15 time units. The profit of intervals 1 and 8 in each copy is 1, the profit of intervals 2 to 7 is 2, and the profit of intervals 9 to 16 is P 2. (iv) element overlapping pairs: 3m overlapping pairs of intervals, one per occurrence of an element in a set. For each Si ∈ S, let Si = {ea , eb , ec }, where {a, b, c} ⊆ [1..3n]. The respective three overlapping pairs are (1) [a, 4n + 15m + 15(i − 1) + 3) and [4n + 15m + 15(i − 1) + 2, 5n + 45m + a), (2) [b, 4n + 15m + 15(i − 1) + 7) and [4n + 15m + 15(i − 1) + 6, 5n + 45m + b), and (3) [c, 4n+15m+15(i−1)+ 11) and [4n+15m+15(i−1)+10, 5n+45m+c). The profit of each such interval is its length. Note that the profit of any pair of overlapping intervals is 5n + 45m + 1. (v) “filler” overlapping pairs: 3m overlapping pairs, three per set. For each Si ∈ S, the respective three overlapping pairs are (1) [4n, 4n+15m+15(i−1)+5) and [4n+15m+15(i−1)+4, 4n+45m), (2) [4n, 4n+15m+15(i−1)+9) and [4n + 15m + 15(i − 1) + 8, 4n + 45m), and (3) [4n, 4n + 15m + 15(i − 1) + 13) and [4n + 15m + 15(i − 1) + 12, 4n + 45m). The profit of each such interval is its length. Note that the profit of any pair of overlapping intervals is 45m+1. 18 Lemma 10 The 3XC instance has an exact cover if and only if the associated fsap instance has profit (18m + 14 + 24m)P 2 + 7m + 9n(5n + 45m + 1) + (9m − 9n)(45m + 1) = (42m + 14)P 2 + 405m2 + 45n2 + 16m. Proof. Assume that the 3XC instance has an exact cover. We show an assignment of the intervals in the fsap instance that achieves the desired profit. First, assign color 1 to L3m+2 and R3m+2 and colors 2, 3, 4 to L3m+3 and R3m+3 . Also assign colors 5, 6, 7 to L3m+1 and colors 9m+5, 9m+6, 9m+7 to R3m+1 . Now, consider Si , for i ∈ [1..m]. Assume that 0 ≤ k < i sets Sj , for j < i are in the cover. (See also Fig. 5.) 1 3 10 9 12 11 2 OL3i+1 OL3i+2 14 9 OLa OR3i+2 15 OL3i+3 15 13 14 5 4 OR3i+1 13 8 6 OR3i+3 OLb 16 OLc 16 7 ORa 10 ORb 11 ORc 12 (OL3i+1 ,OR3i+1) (OL3i+2 ,OR3i+2) and (OL3i+3 ,OR3i+3) are (OLa ,ORa) (OLb ,ORb) and (OLc ,ORc) are element “filler”overlapping pairs overlapping pairs of elements ea, eb, ec Fig. 5: Assigning intervals related to Si If Si is not in the cover choose the first option for the “two choice” gadget associated with Si . Namely, assign colors [1..4] to intervals [1..4] and [9..12] in the gadget, and for j ∈ [13..16] assign colors 9i + 3j − 43, 9i + 3j − 42, 9i + 3j − 41 to interval j. Also, assign colors 9i−4, 9i−3, 9i−2 to R3(n+i−k)−2 ; for j ∈ {2, 3}, assign colors 9i+3j−7, 9i+3j−6, 9i+3j−5 to L3(n+i−k)+j−4 and R3(n+i−k)+j−3 , and assign colors 9i+5, 9i+6, 9i+7 to L3(n+i−k) . Finally, assign 3 colors to the 3 “filler” overlapping pairs corresponding to Si as follows: colors 9i−4, 9i−3, 9i−2 to interval [4n + 15m + 15(i − 1) + 4, 4n + 45m), colors 9i − 1, 9i, 9i + 1 to intervals [4n, 4n + 15m + 15(i − 1) + 5) and [4n + 15m + 15(i − 1) + 8, 4n + 45m), colors 9i + 2, 9i + 3, 9i + 4 to intervals [4n, 4n + 15m + 15(i − 1) + 9) and 19 [4n + 15m + 15(i − 1) + 12, 4n + 45m), and colors 9i + 5, 9i + 6, 9i + 7 to interval [4n, 4n + 15m + 15(i − 1) + 13). Suppose that Si is in the cover. Let Si = {ea , eb , ec }, where {a, b, c} ⊆ [1..3n]. Choose the second option for the “two choice” gadget associated with Si . Namely, assign colors [1..4] to intervals [5..8] and [13..16] in the gadget, and for j ∈ [9..12] assign colors 9i + 3j − 31, 9i + 3j − 30, 9i + 3j − 29 to interval j. The respective element overlapping pairs and the border intervals are assigned colors as follows: colors 9i−4, 9i−3, 9i−2 to [4n+15m+15(i−1)+2, 5n+45m+a) and Ra , colors 9i − 1, 9i, 9i + 1 to La , [a, 4n + 15m + 15(i − 1) + 3), [4n + 15m + 15(i − 1) + 6, 5n + 45m + b) and Rb , colors 9i + 2, 9i + 3, 9i + 4 to Lb , [b, 4n + 15m + 15(i − 1) + 7), [4n + 15m + 15(i − 1) + 10, 5n + 45m + c) and Rc , and colors 9i + 5, 9i + 6, 9i + 7 to Lc and [c, 4n + 15m + 15(i − 1) + 11). Note that the assignment is valid, that is, no two overlapping intervals are assigned the same color. To calculate the total profit of the assignment note that L3m+1 , L3m+3 , R3m+1 and R3m+3 are each assigned 3 colors and L3m+2 , R3m+2 are assigned a single color. This contributes 14P 2 to the profit. Also, intervals [9..16] in all the “two choice” gadgets are assigned 3 colors, and either intervals [1..4] or [5..8] are assigned a single color. This contributes 24mP 2 + 7m to the profit. Since we start from a cover, all the element overlapping pairs as well as the corresponding left and right border intervals are assigned 3 colors each. This contributes 3 · 6nP 2 + 3 · 3n(5n + 45m + 1) to the profit. Since the cover is exact, 3m − 3n “filler” overlapping pairs as well as the corresponding left and right border intervals are assigned 3 colors each. This contributes 3(6m − 6n)P 2 + 3(3m − 3n)(45m + 1) to the profit. Overall, the profit is (42m + 14)P 2 + 405m2 + 45n2 + 16m. We now prove the other direction. Suppose that we find an assignment of colors to intervals with total profit (42m + 14)P 2 + 405m2 + 45n2 + 16m. The only way to get total profit of at least (42m + 14)P 2 is by assigning 3 colors to all intervals with P 2 profit per allocated unit in the “two choice” gadgets, and in addition, by assigning 3 colors to all but one left (and right) border intervals, and by assigning the 1 remaining color to the remaining left (and right) border interval. Consider the (element and “filler”) overlapping pairs. At most 3m left (and right) intervals out of these overlapping pairs can be assigned 3 colors each, since any additional assignment would conflict with the assignment of colors to the border intervals. Out of these 3m left and right intervals, at most 3n left (and right) intervals can be element overlapping intervals. Since all intervals with P 2 profit per allocated unit in the “two choice” gadgets are assigned 3 colors, there are 3m remaining 3 color blocks throughout the interval [4n + 15m, 4n + 30m) and at most one more block of 3 colors is available in each of the 6m time units when some of the intervals with P 2 profit per allocated unit in the “two choice” gadgets are not assigned any color (see Fig. 3). The maximum profit that can be attained by assigning these colors to the unassigned intervals in the “two choice” gadgets is at most 3 · (2 · 6 + 2)m = 42m. Thus the only way to achieve the 405m2 term in the profit (for large enough 20 m) is by actually assigning 3 colors to 3m left and 3m right intervals out of the overlapping pairs. Consider the 3m left intervals of the overlapping pairs that are assigned 3 colors in increasing length order and the right intervals of the overlapping pairs that are assigned 3 colors in decreasing length order. Denote these two sequences L R by O1L , . . . , O3m and O1R , . . . , O3m . Claim 1 For i ∈ [1..3m], if OiL and OiR overlap, they cannot overlap by more than one time unit. Proof. Suppose the claim does not hold, and let i be the minimum index for which OiL and OiR overlap by more than one time unit. However, in this case OiL and OiR must overlap in at least one time unit t when the intervals with P 2 profit per allocated unit in the “two choice” gadgets are assigned two blocks of 3 R colors. Since OiR contains time t, t is contained also in O1R , . . . , Oi−1 . Similarly, L L L since Oi contains time t, t is contained also in Oi+1 , . . . , O3m . But this implies that 3m + 1 intervals out of the overlapping pairs and 2 intervals from the “two choice” gadget are each assigned 3 colors. This is impossible, since there are only 9m + 7 colors. From the discussion above, it follows that if OiL and OiR overlap they must be an overlapping pair. The maximum profit that can be attained from the intervals in the “two choice” gadgets that do not have P 2 profit per allocated unit is 14m. Thus, to achieve the additional 405m2 + 45n2 terms in the profit, we must have that for all i ∈ [1..3m], intervals OiL and OiR are an overlapping pair, and 3n out of these overlapping pairs are element overlapping pairs. This will contribute 405m2 + 45n2 + 9m to the profit. The extra 7m profit needs to be attained by assigning colors to the intervals in the “two choice” gadgets that do not have P 2 profit per allocated unit. It follows that each “two choice” gadget needs to be colored using one of the two options described above and exactly n of them have to be colored using the second option. These n gadgets correspond to the exact cover. Finally, we note how the reduction can be modified to include only intervals of identical profit per allocated unit. The idea is to “slice” each interval in the original reduction to smaller intervals whose number is the profit per allocated unit of the original interval. When doing so, we need to ensure that it is not beneficial to move from a “slice” of one interval to a “slice” of another interval. This is done by assigning different displacements to the slices in different intervals, so that whenever we attempt to gain from a move from a “slice” of one interval to a “slice” of another interval, we lose at least one slice due to the different displacements. Thus, the same set of colors will be used for all slices associated with the original interval. This completes the proof of the theorem. C Algorithm AN arrow The pseudocode of AN arrow Color Color is given in Algorithm 3. 21 Algorithm 3 AN arrow Color (J , r̄max , p̄, W, ε, P )) 1: Solve the linear program LP fba 2: Round the solution to obtain a (non-contiguous) coloring c. 3: Find a circular contiguous coloring c0 of the same total profit as c. Such a coloring exists since the input graph is proper, and is obtained by scanning the intervals from left to right and assigning the colors in a fixed circular order. 4: Let S 0 be the set of colored intervals in c0 . 0 5: Let Sw ⊆ S 0 be the subset of intervals Ji ∈ S 0 for which |c0 (Ji )| ≥ εW , and 0 0 let Sn = S 0 \ Sw . 0 6: for any Ji ∈ Sw , round down |c0 (Ji )| to the nearest integral multiple of ε2 W , and eliminate the corresponding amount of colors in c0 (Ji ), such the first color assigned to Ji is fi = br · ε2 W c, for some integer r ≥ 0. 7: for ` = br · ε2 W c, r = 0, 1, . . . , d ε12 e do 0 0 |{`, [` mod b(1 − ε)W c] + 1} ⊆ c0 (Ji )} (`) = {Ji ∈ Sw 8: Let Sw 0 9: Let P (Sw (`)) = 0 0 (`) do 10: for Ji ∈ Sw 11: Suppose that c0 (Ji ) = {fi , [fi mod b(1 − ε)W c] + 1, . . . , ti }, for some 1 ≤ fi , ti ≤ b(1 − ε)W c. 12: Partition the set of |c0 (Ji )| colors assigned to Ji into two contiguous blocks: Block 1 (i) = {fi , . . . , `}, and Block 2 (i) = {` mod b(1 − ε)W c + 1, . . . , ti }. 0 13: Let P (Sw (`))+ = pi · min{|Block 1 (i)|, |Block 2 (i)|} 14: end for 15: end for 0 (`)). 16: Let `good = argmin1≤`≤b(1−ε)W c P (Sw 0 17: for Ji ∈ Sw (`good ) do 18: Assign to Ji the larger of Block 1 (i) and Block 2 (i). 19: end for 20: Renumber the first b(1 − ε)W c colors starting at `good mod b(1 − ε)W c + 1. 21: Let Sn0 (`good ) = {Ji ∈ Sn0 |{`good , [`good mod b(1 − ε)W c] + 1} ⊆ c0 (Ji )} 22: for Ji ∈ Sn0 (`good ) do 23: Assign to Ji |c0 (Ji )| contiguous colors in the set {b(1 − ε)W c + 1, . . . , W }. 24: end for 25: Return c00 the resulting coloring of S 0 . D A 2k -approximation 2k−1 Algorithm for Uniform fsap We describe below Algorithm AM axSmall for uniform fsap instances. It yields soW lutions that are close to the optimal as k = d Max e gets large. Initially, AM axSmall solves optimally fbap on the input graph G. Let G0 be the support graph for this solution. AM axSmall proceeds by generating a feasible solution for fsap as 22 follows. Consider the set of intervals Ji ∈ G0 for which |c(Ji )| = Max. Denote the support subgraph of this set of intervals G2 . Observe that the graph G2 is (k − 1)-colorable, since there is no clique of size k in G2 (as it would require kMax > W colors). Consequently, each interval in G2 can be assigned a set of Max contiguous colors, using a total of (k − 1)Max colors. AM axSmall then finds a maximum independent set of intervals in the remaining subgraph G1 = G0 \ G2 , and colors contiguously each interval in this set using the remaining W mod Max colors (see the pseudocode in Algorithm 4). Algorithm 4 AM axSmall (J , Max, W ) 1: Find an optimal solution for fbap on G, the interval graph of J , using Algorithm Paging fba. 2: Let S ⊆ J be the solution set of intervals, and G0 ⊆ G the support graph of S. 3: Let G2 ⊆ G0 the subgraph induced by the intervals Ji for which |c(Ji )| = Max. 4: Let G1 ⊆ G0 be the subgraph induced by the rest of the intervals, i.e., intervals Ji for which |c(Ji )| < Max. 5: Scan the intervals Ji in G2 from left to right and color contiguously each 6: 7: 8: 9: interval with the lowest available Max colors. Let r = W mod Max. Let I be a maximum independent set in G1 . Color each interval in I contiguously with r colors. Return the coloring of the intervals in G1 ∪ G2 . Theorem 11. For any uniform instance of fsap, AM axSmall yields an optimal 2k solution for fsap, if k ∈ {1, 2}, and a 2k−1 -approximation for any k ≥ 3. The proof of Theorem 11 uses the next lemma. Recall that G1 ⊆ G0 is the subgraph induced by the intervals Ji for which |c(Ji )| < Max. Lemma 12 The subgraph G1 ⊆ G0 is proper and 2-colorable. Proof. We first note that if G1 is not proper, then there exist two intervals, Ji and Jj , such that Jj is properly contained in Ji . By the way Paging fba proceeds, when it colors Jj , some colors that were assigned to Ji should be assigned to Jj , until either |c(Jj )| = Max, or |c(Ji )| = 0. Since none of the two occurs - a contradiction. We now show that G1 is 2-colorable. Throughout the proof, we assume that there are n1 intervals in G1 sorted by their starting points, and numbered 1, 2, . . . P , n1 , i.e., s1 < s2 , < · · · < sn1 . For any t ∈ [s1 , en1 ), say that t is tight if {J` ∈J :t∈J` } |c(J` )| = W . Let T denote the set of tight time points. To keep a discrete set of such points, we consider only tight points t which are also the start-times of intervals, i.e., t = si for some 1 ≤ i ≤ n. We note that every 23 interval Ji ∈ G1 contains at least one tight time point (otherwise, Paging fba would assign more colors to Ji ). We complete the proof using the next claim. Claim 2 Every time point t ∈ T is contained in exactly one interval Ji ∈ G1 . We now show that Claim 2 implies that G1 is 2-colorable. Assume that there exists in G1 a clique of at least 3 intervals. Let Ja , Jb , Jc be three ordered intervals in this clique. We note that there is no t ∈ Jb that is not contained in either Ja or Jc . However, Jb must contain a tight time point. Contradiction to Claim 2. Proof of Claim 2: First, note that since W is not a multiple of Max every tight time point has to be contained in at least one interval Ji ∈ G1 . We prove that it cannot be contained in more than one such interval by induction. Let t1 be the earliest time point in T . Since each Ji ∈ G1 contains a tight time point, t1 ∈ J1 . If t1 < s2 then clearly the claim holds for t1 . Suppose that t1 ≥ s2 . In this case, since there is at least one available color in [s1 , s2 ), and since e2 > e1 , Algorithm Paging fba would assign at least one additional color to J1 rather than to J2 . A contradiction. For the inductive step, let i > 1, and consider ti ∈ T . Assume that the claim holds for ti−1 ∈ T , and let ti−1 ∈ J` . Since ti−1 is not contained in any other interval in G1 , and since it is tight, we must have |c(J` )| = W mod Max. To obtain a contradiction assume that ti is contained in more than one interval in G1 . At least one of these intervals must be J`+1 (since ti > e`−1 ). If ti is not contained in J` then clearly, by our assumption, ti must also be contained in J`+2 . However, even if ti ∈ J` , since |c(J` )| = W mod Max, in order for ti to be tight, it must be contained also in J`+2 . In this case, since there is at least one available color in [s`+1 , s`+2 ), and since e`+2 > e`+1 , Algorithm Paging fba would assign at least one additional color to J`+1 , rather than to J`+2 . A contradiction. We are ready to show the performance ratio of Algorithm AM axSmall . Proof of Theorem 11: Given the graphs G0 and G1 , G2 , as defined in Steps 4, and 3 of AM axSmall , respectively. Let OP T fsap (G) and A(G) be the value of an optimal solution and the solution output by AM axSmall , respectively, for an input graph G. Clearly, OP T fsap (G) ≤ OP T fba (G). Case 1: k < 3. Since in this case G1 is an independent set, A(G) = OP T fba (G), and thus A(G) = OP T fsap (G). Case 2: k ≥ 3. Since in this case G1 is 2-colorable, A(G) ≥ OP T fba (G) − 21 · 2k (W mod Max) · |G1 |. Hence, to get the approximation ratio 2k−1 , we need to 1 show that (W mod Max) · |G1 | ≤ k OP T fba (G). Let λMax = W mod Max. Note that 0 < λ < 1. In fact, we prove a slightly better bound, as we show that (W mod Max) · |G1 | λ 1 ≤ < . OP T fba (G) k−1+λ k (3) 2k This implies the approximation ratio 2k−2+2λ 2k−2+λ < 2k−1 . To obtain a contradiction, assume that inequality (3) does not hold. Recall that OP T fba (G) = (W mod 24 Max) · |G1 | + Max · |G2 |, and that |G2 | = |G0 | − |G1 |. We get (W mod Max) · |G1 | λMax|G1 | = 0 OP T fba (G) Max|G | − Max(1 − λ)|G1 | = |G0 | λ|G1 | λ > . − (1 − λ)|G1 | k−1+λ This implies k|G1 | > |G0 |, and thus OP T fba (G) = λMax|G1 | + Max(|G0 | − |G1 |) = Max|G0 | − (1 − λ)Max|G1 | k−1+λ 1 · Max|G0 |. < (1 − (1 − λ))Max|G0 | = k k Note than G0 , the support graph of the solution obtained by Paging fba, is k-colorable, since it cannot contain any clique of size k + 1. Indeed, such a clique can have at most 2 intervals from G1 , and at least k − 1 intervals from G2 , and thus requires more than W colors (since Algorithm Paging fba assigns W mod Max colors to each interval in G1 ). We can use the k coloring to obtain a solution of the fbap instance, by assigning Max colors to intervals in the k − 1 largest color classes, and W mod Max to the remaining color class. Thus, k−1+λ 0 OP T fba (G) ≥ k1 · λMax|G0 | + k−1 · Max|G0 |. A contradiction. k · Max|G | = k 25
8cs.DS
The pure braid groups and their relatives arXiv:1602.05291v2 [math.GR] 29 May 2016 Alexander I. Suciu and He Wang Abstract In this mostly survey paper, we investigate the resonance varieties, the lower central series ranks, and the Chen ranks, as well as the residual and formality properties of several families of braid-like groups: the pure braid groups Pn , the welded pure braid groups wPn , the virtual pure braid groups vPn , as well as their ‘upper’ variants, wPn+ and vPn+ . We also discuss several natural homomorphisms between these groups, and various ways to distinguish among the pure braid groups and their relatives. Key words: Pure braid groups, welded pure braid group, virtual pure braid groups, lower central series, Chen ranks, resonance varieties, residually nilpotent, formality. 1 Introduction 1.1 Cast of characters Let Fn be the free group on generators x1 , . . . , xn , and let Aut(Fn ) be its automorphism group. Magnus [51] showed that the map Aut(Fn ) → GLn (Z) which sends an automorphism to the induced map on the abelianization (Fn )ab = Zn is surjective. Furthermore, the kernel of this homomorphism, denoted by IAn , is generated by automorphisms αi j and αi jk (1 ≤ i 6= j 6= k ≤ n) which send xi to x j xi x−1 j and Alexander I. Suciu Department of Mathematics, Northeastern University, Boston, MA 02115, USA e-mail: [email protected] Supported in part by the National Security Agency (grant H98230-13-1-0225) and the Simons Foundation (collaboration grant for mathematicians 354156) He Wang Department of Mathematics, Northeastern University, Boston, MA 02115, USA e-mail: [email protected] 1 2 Alexander I. Suciu and He Wang IA+ n vPn+ wPn+ Aut(Fn ) IAn vPn wPn GLn (Z) vBn wBn Pn Sn Sn Bn Sn Fig. 1 Braid-like groups and automorphism groups of free groups. −1 xi x j xk x−1 j xk , respectively, and leave invariant the remaining generators of Fn . The subgroup generated by the automorphisms αi j and αi jk with i < j < k is denoted by IA+ n. An automorphism of Fn is called a ‘permutation-conjugacy’ if it sends each generator xi to a conjugate of xτ(i) , for some permutation τ ∈ Sn . The classical Artin braid group Bn is the subgroup of Aut(Fn ) consisting of those permutationconjugacy automorphisms which fix the word x1 · · · xn ∈ Fn , see for instance Birman’s book [17]. The kernel of the canonical projection from Bn to the symmetric group Sn is the pure braid group Pn on n strings. As shown by Fadell, Fox, and Neuwirth [33, 38], a classifying space for Pn is Confn (C), the configuration space of n ordered points on the complex line. The set of all permutation-conjugacy automorphisms of Fn forms a subgroup of Aut(Fn ), denoted by BΣn . The subgroup PΣn = BΣn ∩ IAn is generated by the Magnus automorphisms αi j (1 ≤ i 6= j ≤ n), while the subgroup PΣn+ = PΣn ∩IA+ n is generated by the automorphisms αi j with i < j. In [56], McCool gave presentations for the groups PΣn and PΣn+ ; these groups are now also called the McCool groups and the upper McCool groups, respectively. The welded braid groups were introduced by Fenn, Rimányi, and Rourke in [37], who showed that the welded braid group wBn is isomorphic to BΣn . These groups, together with the welded pure braid groups wPn ∼ = PΣn and the upper welded pure braid groups wPn+ ∼ = PΣn+ have generated quite a bit of interest since then, see for instance [3, 4, 8, 15, 30] and references therein. The welded pure braid group wPn can be identified with group of motions of n unknotted, unlinked circles in the 3sphere. As shown by Brendle and Hatcher in [18], this group can be realized as the fundamental group of the space of configurations of parallel rings in R3 . A related class of groups are the virtual braid groups vBn , which were introduced by Kauffman in [45] in the context of virtual knot theory, see also [42]. The kernel of the canonical epimorphism vBn → Sn is called the virtual pure braid group vPn . In [5], Bardakov found a concise presentation for vPn , and defined accordingly the The pure braid groups and their relatives 3 upper virtual pure braid group vPn+ . Whether or not the virtual (pure) braid groups are subgroups of Aut(Fn ) is an open question that goes back to [5]. The groups vPn and vPn+ were also independently studied by Bartholdi, Enriquez, Etingof, and Rains [11] and P. Lee [50] as groups arising from the Yang-Baxter equations. Classifying spaces for these groups (also known as the quasi-triangular groups and the triangular groups, respectively) can be constructed by taking quotients of permutahedra by suitable actions of the symmetric groups. The groups mentioned so far fit into the diagram from Figure 1 (a related diagram can be found in [3]). We will discuss presentations for these groups, various extensions and homomorphisms between them, as well as their centers in §2. 1.2 Lie algebras, LCS ranks, and formality To any finitely generated group G, there corresponds a graded Lie algebra, gr(G), obtained by taking the direct sum of the successive quotients of the lower central series of G, and tensoring with C. The LCS ranks of the group G are defined as the dimensions, φk (G) = dim grk (G), of the graded pieces of this Lie algebra. As explained in Theorem 9, the computation of these ranks is greatly simplified if the group G satisfies certain formality properties, and its cohomology algebra is Koszul. d is a complete, The set of primitive elements of the completed group algebra CG filtered Lie algebra over C, called the Malcev Lie algebra of G, and denoted by m(G). By a theorem of Quillen [62], there exists an isomorphism of graded Lie algebras between gr(G) and gr(m(G)). The group G is said to be graded-formal if its associated graded Lie algebra, gr(G), admits a quadratic presentation. The group G is said to be filtered-formal if there exists an isomorphism of filtered Lie algebras between m(G) and the degree completion of gr(G). Furthermore, the group G is called 1-formal if it is gradedformal and filtered-formal, or, equivalently, if there is a 1-quasi-isomorphism between the 1-minimal model of G and the cohomology algebra H ∗ (G, C) endowed with the zero differential. We refer to [69] for a comprehensive study of these formality notions for groups. A presentation for the Malcev Lie algebra of Pn was given by Kohno in [48], while the associated graded Lie algebra gr(Pn ) and its graded ranks were computed by Kohno [49] and Falk–Randell [35]. It was also realized around that time that the pure braid groups Pn are 1-formal. As shown by Berceanu and Papadima in [15], the Malcev Lie algebras of wPn and wPn+ admit quadratic presentations, that is, the groups wPn and wPn+ are 1-formal. Furthermore, as shown in [11, 50], the groups vPn and vPn+ are graded-formal. On the other hand, we show in [71] that the virtual pure braid groups vPn and vPn+ are 1-formal if and only if n ≤ 3. A lot is also known about the residual properties of the pure braid-like groups, especially as they relate to the lower central series. For instance, a theorem of Berceanu and Papadima [15], which uses work of Andreadakis [1] and an idea of Hain [43], shows that the groups IAn are residually torsion-free nilpotent, for all n. 4 Alexander I. Suciu and He Wang Table 1 Hilbert series, Koszulness, and formality of pure braid-like groups. G Hilbert series Hilb(H ∗ (G; C),t) Koszulness 1-Formality n−1 ∏ (1 + jt) Pn j=1 (1 + nt)n−1 wPn [49] [44] Yes No (for n ≥ 4) [2, 49, 64] [29] Yes Yes [48] [15] n−1 wPn+ ∏ (1 + jt) j=1 n−1 vPn ∑ i=0 [28] n! n−1 ti i (n − i)! Yes n ∑ j=1  j−1  j ∑ (−1)i i (k − i)n t n− j [11, 50] j! [11] [15] [70] No (for n ≥ 4) Yes i=0 Yes No (for n ≥ 4) Yes [11] vPn+ [22] [11, 50] [70] Thus, the groups Pn , wPn , and wPn+ also enjoy this property. The fact that the pure braid groups Pn are residually torsion-free nilpotent also follows from the work of Falk and Randell [35, 36]. It is also known that the virtual pure braid groups vPn and vPn+ are residually torsion-free nilpotent for n ≤ 3, but it is not known whether this is the case for n ≥ 4. 1.3 Resonance varieties and Chen ranks We conclude our survey with a discussion of the cohomology algebras of the pure braid-like groups, and of two other related objects: the resonance varieties attached to these graded algebras, and the Chen ranks associated to the groups themselves. The cohomology algebra of the classical pure braid group Pn was computed by Arnol0 d in his seminal paper on the subject, [2]. An explicit presentation for the cohomology algebra of the McCool group wPn was given by Jensen, McCammond and Meier [44], thereby confirming a conjecture of A. Brownstein and R. Lee. Using different methods, F. Cohen, Pakianathan, Vershinin, and Wu [28] determined the cohomology algebra of the upper McCool group wPn+ . Finally, the cohomology algebras of the virtual pure braid groups vPn and vPn+ were computed by Bartholdi et al. [11] and Lee [50]. For all these groups G, the cohomology algebra A = H ∗ (G, C) is quadratic, i.e., it is generated in degree 1 and the ideal of relations is generated in degree 2. In fact, for all but the groups wPn , n ≥ 4, the ideal of relations admits a quadratic Gröbner The pure braid groups and their relatives 5 Table 2 Resonance and Chen ranks of braid-like groups. G First resonance variety R1 (G) ⊆ H 1 (G; C) n n 3 + 4 Pn n planes Resonance– Chen ranks formula Chen ranks θk (G), k ≥ 3 (k − 1) [27] n (k − 1) wPn 2 planes and 4 linear spaces of dimension 3 [21] wPn+ (n − i) linear spaces of dimension i ≥ 2 [71] vP3 H 1 (vP3 , C) = C6 vP4+ 3-dimensional non-linear subvariety of degree 6 k [10, 70] [70] ∑ i=3 n+1 4 n 2 2 + (k − 1) for k  3 n+i−2 n+1 i+1 + 4 [24] k 2 [27] n 3 [23] [71] k+3 k+2 k+1 5 + 4 + 3 + k [70] 6 2 +k−2 (k3 − 1) + Yes [70] Yes No No No [23] [71] [70] [70] basis, and so the algebra A is Koszul. For more details and references regarding this topic, we direct the reader to Table 1 and to §3.1. Given a group G satisfying appropriate finiteness conditions, the resonance varieties Rsi (G) are certain closed, homogeneous subvarieties of the affine space A1 = H 1 (G; C), defined by means of the vanishing cup products in the cohomology algebra A = H ∗ (G, C). We restrict our attention here to the first resonance variety R1 (G) = R11 (G) attached to a finitely generated group G. This variety consists of all elements a ∈ A1 for which there exists an element b ∈ A1 such that a ∪ b = 0, yet b is not proportional to a. The aforementioned computations of the cohomology algebras of the various pure braid-like groups allows one to determine the corresponding resonance varieties, at least in principle. In the case of the first resonance varieties of the groups Pn , wPn , and wPn+ , complete answers can be found in [27], [21], and [71], respectively, while for the virtual pure braid groups, partial answers are given in [70]. We list some of the features of these varieties in Table 2. By comparing the resonance varieties of the groups Pn and wPn+ , it can be shown that these groups are not isomorphic for n ≥ 4 (cf. [71]); this answers a question of F. Cohen et al. [28], see Remark 18. By computing the resonance variety R1 (vP4+ ), and using the Tangent Cone Theorem from [32], we prove that the group vP4+ is not 1-formal. In view of the retraction property for 1-formality established in [69], we conclude that the groups vPn and vPn+ are not 1-formal for n ≥ 4. The Chen ranks of a finitely generated group G are the dimensions, θk (G) = dim grk (G/G00 ), of the graded pieces of the graded Lie algebra associated to the maximal metabelian quotient of G. In [19], K.-T. Chen computed the Chen ranks 6 Alexander I. Suciu and He Wang of the free groups Fn , while in [54], W.S. Massey gave an alternative method for computing the Chen ranks of a group G in terms of the Alexander invariant G0 /G00 . The Chen ranks of the pure braid groups Pn were computed in [24], while an explicit relation between the Chen ranks and the resonance varieties of an arrangement group was conjectured in [67]. Building on work from [26, 63, 65] and especially [58], Cohen and Schenck confirmed this conjecture in [23] for a class of 1-formal groups which includes arrangement groups. In the process, they also computed the Chen ranks θk (wPn ) for k sufficiently large. Using the Gröbner basis algorithm from [24, 26], we compute in [71] all the Chen ranks of the upper McCool groups wPn+ . This computation, recorded here in Theorem 16, shows that, for each n ≥ 4, the group wPn+ is not isomorphic to either the pure braid group Pn , or to the product ∏n−1 i=1 Fi , although these three groups share the same LCS ranks and the same Betti numbers. We also provide the Chen ranks of the groups vPn and vPn+ for low values of n. The full computation of the Chen ranks of the virtual pure braid groups remains to be done. 2 Braid groups and their relatives 2.1 Braid groups and pure braid groups Let Aut(Fn ) be the group of (right) automorphisms of the free group Fn on generators x1 , . . . , xn . Recall that the Artin braid group Bn consists of those permutationconjugacy automorphisms which fix the word x1 · · · xn ∈ Fn . In particular, B1 = {1} and B2 = Z. The natural inclusion αn : Bn ,→ Aut(Fn ) is also known as the Artin representation of the braid group. For each 1 ≤ i < n, let σi be the braid automorphism which sends xi to xi xi+1 xi−1 and xi+1 to xi , while leaving the other generators of Fn fixed. As shown for instance in [17], the braid group Bn is generated by the elementary braids σ1 , . . . , σn−1 , subject to the well-known relations ( σi σi+1 σi = σi+1 σi σi+1 , 1 ≤ i ≤ n − 2, (R1) |i − j| ≥ 2. σi σ j = σ j σi , On the other hand, the symmetric group Sn has a presentation with generators si for 1 ≤ i ≤ n − 1 and relations    si si+1 si = si+1 si si+1 , 1 ≤ i ≤ n − 2, |i − j| ≥ 2. si s j = s j si , (R2)   2 1 ≤ i ≤ n − 1; si = 1, The canonical projection from the braid group to the symmetric group, which sends the elementary braid σi to the transposition si , has kernel the pure braid group The pure braid groups and their relatives 7 on n strings, Pn = ker(φ : Bn  Sn ) = Bn ∩ IAn , (1) where φ (σi ) = si for 1 ≤ i ≤ n − 1. The group Pn is generated by the n-stranded braids −1 −1 (2) · · · σ −1 Ai j = σ j−1 σ j−2 · · · σi+1 σi2 σi+1 j−2 σ j−1 , for 1 ≤ i < j ≤ n. It is readily seen that P1 = {1}, P2 = Z, and P3 ∼ = F2 × Z. More generally, as shown by Fadell and Neuwirth [33] (see also [35, 36, 25]), the pure braid group Pn can be decomposed as an iterated semi-direct product of free groups, Pn = Fn−1 oαn−1 Pn−1 = Fn−1 o Fn−2 o · · · o F1 , (3) where αn−1 : Pn−1 ,→ Aut(Fn ) is the restriction of the Artin representation of the braid group Bn−1 to the pure braid subgroup Pn−1 . Work of Chow [20] and Birman [17] shows that the center Z(Pn ) of the pure braid group on n ≥ 2 strands is infinite cyclic, generated by the full twist braid = Pn × Z, where Pn = Pn /Z(Pn ). ∏1≤i< j≤n Ai j . It follows that Pn ∼ 2.2 Welded braid groups The set of all permutation-conjugacy automorphisms of the free group of rank n forms the braid-permutation group wBn . This group has a presentation with generators σi and si (1 ≤ i < n) and relations (R1) and (R2), as well as ( si σ j = σ j si , |i − j| ≥ 2, (R3) σi si+1 si = si+1 si σi+1 , 1 ≤ i ≤ n − 2, and si σi+1 σi = σi+1 σi si+1 , classical 1 ≤ i ≤ n − 2. welded (R4) virtual Fig. 2 Braid crossings. The three types of braid crossings mentioned above are depicted in Figure 2. The welded pure braid group wPn , also known as the group of basis-conjugating automorphisms in [4, 37, 21], or the McCool group in [15], is defined as wPn = ker(ρ : wBn  Sn ) = wBn ∩ IAn , (4) 8 Alexander I. Suciu and He Wang where ρ(σi ) = ρ(si ) = si for 1 ≤ i ≤ n − 1. As shown by McCool in [56], this group is generated by the Magnus automorphisms αi j , for all 1 ≤ i 6= j ≤ n, subject to the relations αi j αik α jk = α jk αik αi j , for i, j, k distinct, [αi j , αst ] = 1, if {i, j} ∩ {s,t} = 0, / [αik , α jk ] = 1, for i, j, k distinct. In particular, wP1 = {1} and wP2 = F2 . Consider now the upper welded pure braid group (or, the upper McCool group) wPn+ = wPn ∩ IA+ n . This is the subgroup of wPn generated by all the automorphisms αi j with i < j. It readily seen that wP1+ = {1}, wP2+ = Z, and wP3+ ∼ = F2 × Z. Furthermore, as shown by F. Cohen et al. [28], the group wPn+ can be decomposed as an iterated semi-direct product of free groups, + wPn+ = Fn−1 oα + wPn−1 = Fn−1 o Fn−2 o · · · o F1 , n−1 (5) + + ,→ Aut(Fn−1 ) is the restriction of the Artin representation of : wPn−1 where αn−1 + Bn−1 to wPn−1 . It follows from the previous discussion that Pn ∼ = wPn+ for n ≤ 3. In view of this fact, a natural question (asked by F. Cohen et al. in [28]) is whether the groups Pn and wPn+ are isomorphic for n ≥ 4. A negative answer will be given in Corollary 17. In the same circle of ideas, let us also mention the following result from [71]. Proposition 1 ([71]). For each n ≥ 4, the inclusion map wPn+ ,→ wPn is not a split monomorphism. The proof of this proposition is based upon the contrasting nature of the resonance varieties of the two groups. We will come back to this point in §3. Cohen and Pruidze showed in [22] that the center of the group wPn+ (n ≥ 2) is infinite cyclic, generated by the automorphism ∏1≤ j≤n−1 α j,n . On the other hand, Dies and Nicas showed in [31] that the center of the group wPn is trivial for n ≥ 2. 2.3 Virtual braid groups Closely related are the virtual braid groups vBn , the virtual pure braid groups vPn , and their upper triangular subgroups, vPn+ , obtained by omitting certain commutation relations from the respective McCool groups. The group vBn admits a presentation with generators σi and si for i = 1, . . . , n − 1, subject to the relations (R1), (R2), and (R3). The virtual pure braid group vPn is defined as the kernel of the canonical epimorphism ψ : vBn → Sn given by ψ(σi ) = ψ(si ) = si for 1 ≤ i ≤ n − 1, see [5]. A finite presentation for vPn was given by Bardakov [5]. The virtual pure braid group vPn and its ‘upper’ subgroup, vPn+ , were both studied in depth (under different names) by Bartholdi et al. and Lee in [11, 50]. These groups are generated by The pure braid groups and their relatives 9 elements xi j for i 6= j (respectively, for i < j), subject to the relations xi j xik x jk = x jk xik xi j , for i, j, k distinct, if {i, j} ∩ {s,t} = 0. / [xi j , xst ] = 1, Unlike the inclusion map wPn+ ,→ wPn from Proposition 1, the inclusion vPn+ ,→ vPn does admit a splitting, see [11, 70]. Proposition 2. There exist monomorphisms and epimorphisms making the following diagram commute. Bn Pn ϕn vBn vPn πn wBn wPn Furthermore, the compositions of the horizontal homomorphisms are also injective. Proof. There are natural inclusions ϕn : Bn ,→ vBn and ψn : Bn ,→ wBn that send σi to σi , as well as a canonical projection πn : vBn  wBn , that matches the generators σi and si of the respective groups. By construction, we have that πn ◦ ϕn = ψn . We claim that these homomorphisms restrict to homomorphisms between the respective pure-braid like groups. Indeed, as shown Bartholdi et al. in [11], the homomorphism ϕn restricts to a map Pn ,→ vPn , given by Ai j 7→ x j−1, j . . . xi+1, j xi, j x j,i (x j−1, j . . . xi+1, j )−1 . (6) Clearly, the projection πn restricts to a map vPn  wPn that sends xi j to αi j . Using these observations, together with work of Bardakov [5], we see that the homomorphism ψn restricts to an injective map Pn ,→ wPn . t u From the defining presentations, it is readily seen that vP2+ ∼ = Z and vP2 ∼ = F2 , + ∼ 2 while vP3 = Z ∗ Z . Moreover, using a computation of Bardakov et al. [10], we show in [70] that vP3 ∼ = P4 ∗ Z. Consequently vP2 , vP3 and vP3+ have trivial centers. More generally, Dies and Nicas showed in [31] that the center of the group vPn is trivial for n ≥ 2; furthermore, the center of vPn+ is trivial for n ≥ 3, with one possible exception (and no exception if Wilf’s conjecture is true). Remark 3. In Lemma 6 from [5], Bardakov states that the group vPn splits as a semi-direct product of the form Vn∗ o vPn−1 , where Vn∗ is a free group. This lemma would imply, via an easy induction argument, that Z(vPn ) = {1} for n ≥ 2 and Z(vPn+ ) = {1} for n ≥ 3. Unfortunately, there seems to be a problem with this lemma, according to the penultimate remark from [39, §6]. 10 Alexander I. Suciu and He Wang 2.4 Topological interpretations All the braid-like groups mentioned previously admit nice topological interpretations. For instance, the braid group Bn can be realized as the mapping class group of the 2-disk with n marked points, Mod10,n , while the pure braid group Pn can be viewed as the fundamental group of the configuration space of n ordered points on the complex line, Confn (C) = {(z1 , . . . , zn ) ∈ Cn | zi 6= z j for i 6= j}, see for instance [17]. Classical move Welded move Fig. 3 Untwisted flying rings. The welded braid group wBn is the fundamental group of the ‘untwisted ring space,’ which consists of all configurations of n parallel rings (i.e., unknotted circles) in R3 , see Figure 3. However, as shown in [18], this space is not aspherical. The welded pure braid group wPn can be viewed as the pure motion group of n unknotted, unlinked circles in R3 , cf. Goldsmith [40]. The group wPn+ is the fundamental group of the subspace consisting of all configurations of circles of unequal diameters in the ‘untwisted ring space,’ see Brendle–Hatcher [18] and Bellingeri–Bodin [13]. (2,1,3) (1,2,3) (1,3,2) (2,3,1) (3,2,1) (3,1,2) Fig. 4 P3 and P4 . A classifying space for the group vPn+ is identified in [11] as the quotient space of the (n − 1)-dimensional permutahedron Pn by actions of certain symmetric groups. More precisely, let Pn be the convex hull of the orbit of a generic point in Rn under The pure braid groups and their relatives 11 the permutation action of the symmetric group Sn on its coordinates. Then Pn is a polytope whose faces are indexed by all ordered partitions of the set [n] = {1, . . . , n}; see Figure 4. For each r ∈ [n], there is a natural action of Sr on the disjoint union of all (n − r)-dimensional faces of this polytope, C1 t · · · tCr . Similarly, a classifying space for vPn can be constructed as a quotient space of Pn × Sn . 3 Cohomology algebras and resonance varieties 3.1 Cohomology algebras Recall that the pure braid group Pn is the fundamental group of the configuration space Confn (C). As shown by Arnol0 d in [2], the cohomology ring H ∗ (Pn ; Z) is the skew-commutative ring generated by degree 1 elements ui j (1 ≤ i < j ≤ n), dz −dz identified with the de Rham cocycles zii −z j j . The cohomology algebras of the other pure braid-like groups were computed by several groups of researchers over the last ten years, see [44, 28, 11, 50]. We summarize these computations, as follows. To start with, we denote the standard (degree 1) generators of H ∗ (wPn ; C) and H ∗ (vPn ; C) by ai j for 1 ≤ i 6= j ≤ n, and we denote the generators of H ∗ (wPn+ ; C) and H ∗ (vPn+ ; C) by ei j for 1 ≤ i < j ≤ n. Next, we list several types of relations that occur in these algebras. u jk uik = ui j (uik − u jk ) for i < j < k, (I1) for i 6= j, (I2) ak j aik = ai j (aik − a jk ) for i, j, k distinct, (I3) a ji aik = (ai j − aik )a jk for i, j, k distinct, (I4) ei j (eik − e jk ) = 0 for i < j < k, (I5) (ei j − eik )e jk = 0 for i < j < k. (I6) ai j a ji = 0 Finally, we record in Table 3 the cohomology algebras of the pure braid groups, the welded pure braid groups, the virtual pure braid groups, and their upper triangular subgroups. Table 3 Cohomology algebras of the pure braid-like groups. Generators Relations H ∗ (Pn ; C) H ∗ (wPn ; C) H ∗ (wPn+ ; C) H ∗ (vPn ; C) H ∗ (vPn+ ; C) [2] [44] [28] [11, 50] [11, 50] ui j ai j 1 ≤ i < j ≤ n 1 ≤ i 6= j ≤ n (I1) (I2) (I3) ei j ai j ei j 1 ≤ i < j ≤ n 1 ≤ i 6= j ≤ n 1 ≤ i < j ≤ n (I5) (I2) (I3) (I4) (I5) (I6) 12 Alexander I. Suciu and He Wang The above presentations of the cohomology algebras differ slightly from those given in the original papers. Using these presentations, it is easily seen that the aforementioned homomorphisms, fn : vPn ,→ wPn and gn : vPn+ ,→ wPn+ , induce epimorphisms in cohomology with C-coefficients. Let us also highlight the fact that the cohomology algebras of the pure braidlike groups are quadratic algebras. More precisely, they are all algebras of the form A = E/I, where E is an exterior algebra generated in degree 1, and I is an ideal generated in degree 2. It is also known that the cohomology algebras of all these groups (with the exception of wPn for n ≥ 4) are Koszul algebras. That is to say, for each such algebra A, the ground field C admits a free, linear resolution over A, or equivalently, TorAi (C, C) j = 0 for i 6= j. In fact, it is known that in all these cases, the relations specified in Table 3 form a quadratic Gröbner basis for the ideal of relations I, a fact which implies Koszulness for the algebra A = E/I. On the other hand, it was recently shown by Conner and Goetz [29] that the cohomology algebras of the groups wPn are not Koszul for n ≥ 4. For a summary of the above discussion, as well as detailed references for the various statements therein we refer to Table 1. 3.2 Resonance varieties Now let A = i≥0 Ai be a graded, graded-commutative algebra over C. We shall assume that A is connected, i.e., A0 = C, generated by the unit 1. For each element a ∈ A1 , one can form a cochain complex, (A, δa ), known as the Aomoto complex, with differentials δai : Ai → Ai+1 given by δai (u) = a · u. The resonance varieties of the graded algebra A are the jump loci for the cohomology of the Aomoto complexes parametrized by the vector space A1 . More precisely, for each i ≥ 0 and s ≥ 1, the (degree i, depth s) resonance variety of A is the set Rsi (A) = {a ∈ A1 | dim H i (A, δa ) ≥ s}. (7) L If A is locally finite (i.e., each graded piece Ai is finite-dimensional), then all these sets are closed, homogeneous subvarieties of the affine space A1 . The resonance varieties of a finitely-generated group G are defined as Rsi (G) := i Rs (A), where A = H ∗ (G, C) is the cohomology algebra of the group. If G admits a classifying space with finite k-skeleton, for some k ≥ 1, then the sets Rsi (G) are algebraic subvarieties of the affine space A1 , for all i ≤ k, see [60, Corollary 4.2]. We will focus here on the first resonance variety R1 (G) := R11 (G), which can be described more succinctly as R1 (G) = {a ∈ A1 | ∃ b ∈ A1 \ C · a such that ab = 0 ∈ A2 }. (8) The idea of studying a family of cochain complexes parametrized by the cohomology ring in degree 1 originated from the theory of hyperplane arrangements, in The pure braid groups and their relatives 13 the work of Falk [34], while the more general concept from (8) first appeared in work of Matei and Suciu [55]. The resonance varieties of a variety spaces and groups have been studied intensively from many perspectives and in varying degrees of generality, see for instance [32, 68, 60] and reference therein. In particular, the first resonance varieties of the groups Pn , wPn , and wPn+ have been completely determined in [27, 21, 71]. We summarize those results as follows. Theorem 4 ([27]). For each n ≥ 3, the first resonance variety of the pure braid group Pn has decomposition into irreducible components given by R1 (Pn ) = [ [ Li jk ∪ Li jkl , 1≤i< j<k<l≤n 1≤i< j<k≤n where • Li jk is the plane defined by the equations ∑{p,q}⊂{i, j,k} x pq = 0 and xst = 0 if {s,t} * {i, j, k}; • Li jkl is the plane defined by the equations ∑{p,q}⊂{i, j,k,l} x pq = 0, xi j = xkl , x jk = xil , xik = x jl and xst = 0 if {s,t} * {i, j, k, l}. Theorem 5 ([21]). For each n ≥ 2, the first resonance variety of the group wPn has decomposition into irreducible components given by R1 (wPn ) = [ [ Li j ∪ 1≤i< j≤n Li jk , 1≤i< j<k≤n where Li j is the plane defined by the equations x pq = 0 if {p, q} = 6 {i, j} and Li jk is the 3-dimensional linear subspace defined by the equations x ji + xki = xi j + xk j = xik + x jk = 0 and xst = 0 if {s,t} * {i, j, k}. Theorem 6 ([71]). For each n ≥ 2, the first resonance variety of the group wPn+ has decomposition into irreducible components given by R1 (wPn+ ) = [ Li, j , n−1≥i> j≥1 where Li, j is the linear subspace of dimension j +1 spanned by ei+1, j+1 and e j+1,k − ei+1,k , for 1 ≤ k ≤ j. Much less is known about the resonance varieties of the virtual pure braid groups. For low values of n, the varieties R1 (vPn ) and R1 (vPn+ ) have been determined in [70]. For instance, the decomposition vP3 ∼ = P4 ∗ Z and known properties of resonance varieties of free products leads to the equality R1 (vP3 ) = H 1 (vP3 , C). We will need the following computation later on. Proposition 7 ([70]). The resonance variety R1 (vP4+ ) is the degree 6, irreducible, 3-dimensional subvariety of the affine space H 1 (vP4+ , C) = C6 defined by the equations 14 Alexander I. Suciu and He Wang x12 x24 (x13 + x23 ) + x13 x34 (x12 − x23 ) − x24 x34 (x12 + x13 ) = 0, x12 x23 (x14 + x24 ) + x12 x34 (x23 − x14 ) + x14 x34 (x23 + x24 ) = 0, x13 x23 (x14 + x24 ) + x14 x24 (x13 + x23 ) + x34 (x13 x23 − x14 x24 ) = 0, x12 (x13 x14 − x23 x24 ) + x34 (x13 x23 − x14 x24 ) = 0. 4 Lie algebras and formality 4.1 The associated graded Lie algebra of a group The lower central series of a group G is a descending sequence of normal subgroups, {γk G}k≥1 , defined inductively by γ1 G = G and γk+1 G = [γk G, G]. The successive quotients of this series, γk G/γk+1 G, are abelian groups. The direct sum of these groups, M gr(G; Z) = γk G/γk+1 G, (9) k≥1 endowed with the Lie bracket [x, y] induced from the group commutator, has the structure of a graded Lie algebra over Z. The associated graded Lie algebra of G over C is defined as gr(G) = gr(G; Z) ⊗Z C. Before proceeding, let us recall the following lemma due to Falk and Randell [36]. Lemma 8 ([36]). Let 1 / N / G / Q / 1 be a split exact sequence of groups, and suppose Q acts trivially on N/[N, N]. Then, for each k ≥ 1, there is an induced split exact sequence, 1 / γk (N) / γk (G) / γk (Q) / 1 . If a group G is finitely generated, its lower central series quotients are finitely generated abelian groups. Set φk (G) = rank γk G/γk+1 G, (10) or, equivalently, φk (G) = dim grk (G). These LCS ranks can be computed from the Hilbert series of the universal enveloping algebra of gr(G) by means of the Poincaré–Birkhoff–Witt theorem, as follows: ∏ (1 − t k )−φk (G) = Hilb(U(gr(G)),t). (11) k≥1 A finitely generated group G is said to be graded-formal if the associated graded Lie algebra gr(G) is quadratic, that is, admits a presentation with generators in degree 1 and relators in degree 2. The next theorem was proved under some stronger hypothesis by Papadima and Yuzvinsky in [61], and essentially in this form in [69]. For completeness, we sketch the proof. Theorem 9 ([61, 69]). If G is a finitely generated, graded-formal group, and its cohomology algebra, A = H ∗ (G; C), is Koszul, then the LCS ranks of G are given The pure braid groups and their relatives 15 by ∞ ∏ (1 − t k )φk (G) = Hilb(A, −t). (12) k=1 Proof. By assumption, the graded Lie algebra g = gr(G) is quadratic, while the algebra A = H ∗ (G; C) is Koszul, hence quadratic. Write A = T (V )/I, where T (V ) is the tensor algebra on a finite-dimensional C-vector space V concentrated in degree 1, and I is an ideal generated in degree 2. Define the quadratic dual of A as A! = T (V ∗ )/I ⊥ , where V ∗ is the vector space dual to V and I ⊥ is the ideal generated by all α ∈ V ∗ ∧V ∗ with α(I2 ) = 0, see [64]. It follows from [61, Lemma 4.1] that A! is isomorphic to U(g). Now, since A is Koszul, its quadratic dual is also Koszul. Thus, the following Koszul duality formula holds: Hilb(A,t) · Hilb(A! , −t) = 1. (13) t u Putting things together and using (11) completes the proof. 4.2 The LCS ranks of the pure-braid like groups We now turn to the associated graded Lie algebras of the pure braid-like groups. We start by listing the types of relations occurring in these Lie algebras: [xi j , xik ] + [xi j , x jk ] + [xik , x jk ] = 0 for distinct i, j, k, (L1) [xi j , xkl ] = 0 for {i, j} ∩ {k, l} = 0, / (L2) [xik , x jk ] = 0 for distinct i, j, k, (L3) for m = j, k and i, j, m distinct. (L4) [xim , xi j + xik + x jk ] = 0 The corresponding presentations for the associated graded Lie algebras of the groups Pn , wPn , wPn+ , vPn , and vPn+ are summarized in Table 4. It is readily seen that all these graded Lie algebras are quadratic. Consequently, all aforementioned pure braid-like groups are graded-formal. Table 4 Associated graded Lie algebras of the pure braid-like groups. Generators Relations gr(Pn ) gr(wPn ) gr(wPn+ ) gr(vPn ) gr(vPn+ ) [48, 35] [44] [28] [11, 50] [11, 50] xi j , xi j , 1 ≤ i < j ≤ n 1 ≤ i 6= j ≤ n (L2) (L4) xi j , xi j , xi j , 1 ≤ i < j ≤ n 1 ≤ i 6= j ≤ n 1 ≤ i < j ≤ n (L1) (L2) (L3) (L1) (L2) (L3) (L1) (L2) (L1) (L2) 16 Alexander I. Suciu and He Wang The various homomorphisms between the pure-braid like groups defined previously induce morphisms between the corresponding associated graded Lie algebras. These morphisms fit into the following commuting diagram. gr(vPn+ ) gr(vPn ) gr(Pn ) . gr(wPn+ ) (14) gr(wPn ) As shown by Bartholdi et al. in [11], the morphism gr(ϕn ) : gr(Pn ) → gr(vPn ) is injective. Using the presentations given in Table 4, we see that the remaining morphisms are either injective or surjective (as indicated in the diagram), with the possible exception of gr(ψn ) : gr(Pn ) → gr(wPn ), whose injectivity has not been established, as far as we know. The LCS ranks of the pure braid groups Pn were computed by Kohno [49], using methods from rational homotopy theory, and by Falk and Randell [35], using the decomposition (3) and Lemma 8. The LCS ranks of the upper welded braid groups wPn+ were computed by F. Cohen et al. [28], using the decomposition (5) and again Lemma 8. Finally, work of Bartholdi et al. [11] and P. Lee [50] gives the LCS ranks of vPn and vPn+ . We summarize these results in the next theorem. Theorem 10. The LCS ranks of the groups G = Pn , wPn+ , vPn , and vPn+ are given k φk (G) = Hilb(H ∗ (G; C), −t), with the relevant Hilbert by the identity ∏∞ k=1 (1 − t ) series given in Table 1. Alternatively, this result follows from Theorem 9 once it is shown that, in all these cases, the Lie algebra gr(G) is quadratic and the cohomology algebra A = H ∗ (G; C) is Koszul. On the other hand, as mentioned previously, the cohomology algebras H ∗ (wPn , C) are not Koszul for n ≥ 4. The (computer-aided) proof of this fact by Conner and Goetz [29] implies that the LCS ranks of wPn are not given by formula (12). For instance, the formula would say that the first eight LCS ranks of wP4 are 12, 18, 60, 180, 612, 2 010, 7 020, and 24 480. Using the computations from [29], we see that the first seven values of φk (wP4 ) are correct, but that φ8 (wP4 ) = 24 490. 4.3 Residual properties Let P be a group-theoretic property. A group G is said to be residually P if for any g ∈ G, g 6= 1, there exists a group Q satisfying property P, and an epimorphism ψ : G → Q such that ψ(g) 6= 1. We are mainly interested here in the residual properties related to the lower central series of G. For instance, we say that the group G is residually nilpotent if every non-trivial element can be detected in a nilpotentT quotient. This happens precisely when the nilpotent radical of G is trivial, that is, k≥1 γk G = {1}. The pure braid groups and their relatives 17 Likewise, we say that a group G is residually torsion-free nilpotent if every nontrivial element can be detected in a torsion-free nilpotent quotient. This happens T precisely when k≥1 τk G = {1}, where τk G = {g ∈ G | gn ∈ γk G, for some n ∈ N}. (15) Clearly, the second property is stronger than the first. Nevertheless, the following holds: if G is residually nilpotent and grk (G, Z) is torsion-free, for each k ≥ 1, then G is residually torsion-free nilpotent. In turn, this last property implies that G is torsion-free. Moreover, residually nilpotent groups are residually finite. For a group G, the properties of being residually nilpotent or residually torsionfree nilpotent are inherited by subgroups H < G, since γk H < γk G and τk H < τk G. Moreover, both properties are preserved under direct products and free products, see Malcev [52] and Baumslag [12]. For more on this subject, see also [6, 7, 46]. In [1], Andreadakis introduced a new filtration on the automorphism group of a group G, nowadays called the Andreadakis–Johnson filtration. This filtration is defined by setting Φk (Aut(G)) = ker(Aut(G) → Aut(G/γk+1 (G)), (16) for all k ≥ 0. Note that Φ0 (Aut(G)) = Aut(G); the group I (G) = Φ1 (Aut(G)) is called the Torelli group of G. T As shown by Andreadakis, if the intersection k≥1 γk G is trivial then the interT section k≥1 Φk (Aut(G)) is also trivial. Furthermore, a theorem of L. Kaloujnine implies that γk (I (G)) < Φk (Aut(G)) for all k ≥ 1, see e.g. [59]. We thus have the following basic result. Theorem 11 ([1]). Let G be a residually nilpotent group. Then the Torelli group I (G) is also residually nilpotent. As noted by Hain [43] in the case of the Torelli group of a Riemann surface and proved by Berceanu and Papadima [15] in full generality, a stronger assumption leads to a stronger conclusion. Theorem 12 ([43, 15]). Let G be a finitely generated, residually nilpotent group, and suppose grk (G, Z) is torsion-free for all k ≥ 1. Then the Torelli group I (G) is residually torsion-free nilpotent. We specialize now to the case G = Fn . In [51] Magnus showed that all free groups are residually torsion-free nilpotent (this also follows from the aforementioned results of Malcev and Baumslag). Furthermore, P. Hall and Magnus showed that gr(Fn , Z) is the free Lie algebra on n generators, and thus is torsion-free (see [66, Ch. IV, §6]). Therefore, by Theorem 12, the Torelli group IAn = I (Fn ) is resid+ ually torsion-free nilpotent. Hence, all its subgroups, such as IA+ n , Pn , wPn , and wPn also enjoy this property. Let us now look in more detail at the residual properties of the braid groups and their relatives. We start with the classical braid groups. As shown by Krammer [47] 18 Alexander I. Suciu and He Wang and Bigelow [16], the braid groups Bn admit faithful linear representations, and thus, by a theorem of Malcev, they are residually finite. On the other hand, it was shown in [41] by Gorin and Lin that γ2 Bn = γ3 Bn for n ≥ 3 (see [14] for an alternative proof); thus, the braid groups Bn are not residually nilpotent for n ≥ 3. Since both the welded braid group wBn and the virtual braid group vBn contain the braid group Bn as a subgroup, we conclude that wBn and vBn are not residually nilpotent for n ≥ 3, either (see also [6]). A different approach to the residual properties of the pure braid groups was taken by Falk and Randell in [36]. Using the semi-direct product decomposition (3) and Lemma 8, these authors gave another proof that the groups Pn are residually nilpotent; in fact, their proof shows that Pn is residually torsion-free nilpotent, see [6]. A similar approach, based on decomposition (5) provides another proof that the upper McCool groups wPn+ are residually torsion-free nilpotent. From the work of Berceanu and Papadima [15] mentioned above, we know that the full McCool groups wPn are residually torsion-free nilpotent. For n = 3, an even stronger result was proved by Metaftsis and Papistas [57], who showed that grk (wP3 , Z) is torsion-free for all k. Whether an analogous statement holds for the McCool groups wPn with n ≥ 4 is an open problem. Finally, let us consider the virtual pure braid groups. Clearly, the groups vP2+ = Z, vP2 = F2 , and vP3+ = Z ∗ Z2 are all residually torsion-free nilpotent. Bardakov et al. [10] show that the group vP3 also enjoys this property. Alternatively, this can be seen from our decomposition vP3 ∼ = P4 ∗ Z, the fact that both P4 and Z have this property, and the aforementioned result of Malcev. Whether or not the groups vPn and vPn+ are residually torsion-free nilpotent for n ≥ 4 is an open problem, see [6]. 4.4 Malcev Lie algebras and formality properties For each finitely-generated, torsion-free nilpotent group N, A.I. Malcev [53] constructed a filtered Lie algebra m(N) over Q, which is now called the Malcev Lie algebra of N. Given a finitely generated group G, the inverse limit of the Malcev Lie algebras of the torsion free parts of the nilpotent quotients G/γi G for i ≥ 2 defines the Malcev Lie algebra of the group G, which we denote by m(G). This Lie algebra coincides with the dual Lie algebra of the 1-minimal model of G defined by D. Sullivan. For relevant background, we refer to [69] and references therein. We will use another equivalent definition of the Malcev Lie algebra which was given by Quillen in [62]. The group-algebra CG has a natural Hopf algebra structure with comultiplication ∆ : CG ⊗ CG → CG given by ∆ (x) = x ⊗ x for x ∈ G. Let d = lim CG/I r be the completion of CG with respect to the I-adic filtration, CG ←−r d is called primitive if ∆bx = where I is the augmentation ideal. An element x ∈ CG ˆ ˆ x⊗1 + 1⊗x. The Malcev Lie algebra m(G) is then the set of all primitive elements d with Lie bracket [x, y] = xy − yx, and endowed with the induced filtration. in CG, The pure braid groups and their relatives 19 The group G is said to be filtered-formal if there exists an isomorphism of filtered b Lie algebras, m(G) ∼ The group G is 1-formal if there exists an filtered Lie = gr(G). algebra isomorphism m(G) ∼ h, where h is a quadratic Lie algebra. As shown in =b [69], a finitely generated group G is 1-formal if and only if it is both graded-formal and filtered-formal. Theorem 13. For each n ≥ 1, the following hold. 1. ([2, 48]) The pure braid group Pn is 1-formal. 2. ([15]) The welded pure braid groups wPn and wPn+ are 1-formal. 3. ([11, 50]) The virtual pure braid groups vPn and vPn+ are graded-formal. Let us now recall the following consequence of the ‘Tangent Cone Theorem’ from [32]. Theorem 14 ([32]). Let G be a finitely generated, 1-formal group. Then all irreducible components of R1 (G) are rationally defined linear subspaces of H 1 (G, C). In view of Proposition 7 and Theorem 14, the group vP4+ is not 1-formal. In fact, we have the following theorem. Theorem 15 ([71]). For the virtual pure braid group vPn and its upper-triangular subgroup, vPn+ , the following hold: both are 1-formal for n ≤ 3, and both are nonfiltered-formal for n ≥ 4. 4.5 Chen ranks The Chen Lie algebra of a finitely generated group G is defined to be the associated graded Lie algebra of its second derived quotient, G/G00 . The projection π : G  G/G00 induces an epimorphism, gr(π) : gr(G)  gr(G/G00 ). It is readily verified that grk (π) is an isomorphism for k ≤ 3. In [19], K.-T. Chen gave a method for finding a basis for gr(G/G00 ) via a path integral technique for free groups. In the process, he showed that the Chen ranks of the free group of rank n are given by θ1 (Fn ) = n and   n+k−2 θk (Fn ) = (k − 1), for k ≥ 2. (17) k As shown by Massey in [54], the Chen ranks of a group G can be computed from the Alexander invariant G0 /G00 . In [24, 26], Cohen and Suciu developed this method, by introducing the use of Gröbner basis techniques in this context. As an application, they showed in [24] that the Chen ranks of the pure braid groups Pn are given by   n+1 θk (Pn ) = (k − 1) , for k ≥ 3. (18) 4 20 Alexander I. Suciu and He Wang Based on this and many other similar computations, the first author conjectured in [67] that for k  0, the Chen ranks of an arrangement group G are given by θk (G) = ∑ cm · θk (Fm ), (19) m≥2 where cm is the number of m-dimensional components of R1 (G). Much work has gone into proving this conjecture, with special cases being verified in [63, 58, 65]. A key advance was made in [58], where it was shown that the Chen ranks of a finitely presented, 1-formal group G are determined by the truncated cohomology ring H ≤2 (G, C). Using this fact, Cohen and Schenck show in [23] that, for a finitely presented, commutator-relators 1-formal group G, the Chen ranks formula (19) holds, provided the components of R1 (G) are isotropic, projectively disjoint, and reduced as a scheme. They also verify that arrangement groups and the welded pure braid groups wPn satisfy these conditions. From the Chen ranks formula (19) and the first resonance varieties of wPn in (5), they deduce that for k  1, the Chen ranks of wPn are given by     n n θk (wPn ) = (k − 1) + (k2 − 1) . (20) 2 3 We conjecture that formula (20) holds for all n and all k ≥ 4. We have verified this conjecture for n ≤ 8, based on direct computations of the Chen ranks of the groups wPn in that range. However, the resonance varieties of wPn+ do not satisfy the isotropicity hypothesis. Nevertheless, we compute in [71] the Chen ranks of these groups, using the Gröbner basis algorithm outlined in [24]. The result reads as follows.   Theorem 16 ([71]). The Chen ranks of wPn+ are given by θ1 = n2 , θ2 = n3 , θ3 =  2 n+1 4 , and θk =      k  n+k−2 n+i−2 n+1 + θk−1 = ∑ + k+1 i+1 4 i=3 for k ≥ 4. We have seen previously that the pure braid group Pn , the upper McCool group wPn+ , and the group Πn = ∏n−1 i=1 Fi share the same LCS ranks and the same Betti numbers. Furthermore, the centers of all these groups are infinite cyclic, provided n ≥ 2. However, the Chen ranks can distinguish these groups. Corollary 17 ([71]). For n ≥ 4, the pure braid group Pn , the upper McCool group wPn+ , and the group Πn are all pairwise non-isomorphic. Remark 18. The fact that Pn ∼ 6 wPn+ for n ≥ 4 answers in the negative Problem = 1 from [28, §10]. An alternate solution for n = 4 was given by Bardakov and Mikhailov in [9], but that solution relies on the claim that the single-variable Alexander polynomial of a finitely presented group G is an invariant of the group, a claim which is far from being true if b1 (G) > 1. The pure braid groups and their relatives 21 The Chen ranks of the virtual pure braid groups and their upper triangular subgroups are more complicated. We summarize some of our computations of these ranks, as follows. ∑ θk (vP3+ )t k−2 = (2 − t)/(1 − t)3 , k≥2 ∑ θk (vP4+ )t k−2 = (8 − 3t + t 2 )/(1 − t)4 , k≥2 ∑ θk (vP5+ )t k−2 = (20 + 15t + 5t 2 )/(1 − t)4 , k≥2 ∑ θk (vP6+ )t k−2 = (40 + 35t − 40t 2 − 20t 3 )/(1 − t)5 . k≥2 ∑ θk (vP3 )t k−2 = (9 − 20t + 15t 2 − 4t 4 + t 5 )/(1 − t)6 . k≥2 It would be interesting to find closed formulas for the Chen ranks of the groups vPn+ and vPn , but this seems to be a very challenging undertaking. References 1. Stylianos Andreadakis, On the automorphisms of free groups and free nilpotent groups, Proc. London Math. Soc. (3) 15 (1965), no. 1, 239–268. MR0188307 1.2, 4.3, 11 2. Vladimir I. Arnol0 d, The cohomology ring of the group of dyed braids, Mat. Zametki 5 (1969), no. 2, 227–231. MR0242196 1, 1.3, 3.1, 3, 1 3. Benjamin Audoux, Paolo Bellingeri, Jean-Baptiste Meilhan, and Emmanuel Wagner, On usual, virtual and welded knotted objects up to homotopy, J. Math. Soc. Japan (to appear), arXiv:1507.00202v2. 1.1 4. Dror Bar-Natan and Zsuzsanna Dancso, Finite type invariants of w-knotted objects I: wknots and the Alexander polynomial, Algebr. Geom. Topol. 16 (2016), no. 2, 1063–1133. MR3493416 1.1, 2.2 5. Valerij G. Bardakov, The virtual and universal braids, Fund. Math. 184 (2004), 1–18. MR2128039 1.1, 2.3, 2.3, 3 6. Valerij G. Bardakov and Paolo Bellingeri, Combinatorial properties of virtual braids, Topology Appl. 156 (2009), no. 6, 1071–1082. MR2493369 4.3, 4.3 7. Valerij G. Bardakov and Paolo Bellingeri, On residual properties of pure braid groups of closed surfaces, Comm. Algebra 37 (2009), no. 5, 1481–1490. MR2526317 4.3 8. Valeriy G. Bardakov and Paolo Bellingeri, Groups of virtual and welded links, J. Knot Theory Ramifications 23 (2014), no. 3, 1450014, 23 pp. MR3200494 1.1 9. Valery G. Bardakov and Roman Mikhailov, On certain questions of the free group automorphisms theory, Comm. Algebra 36 (2008), no. 4, 1489–1499. MR2406602 18 10. Valery G. Bardakov, Roman Mikhailov, Vladimir Vershinin, and Jie Wu, On the pure virtual braid group PV3 , Comm. Algebra 44 (2016), no. 3, 1350–1378. MR3463147 2, 2.3, 4.3 11. Laurent Bartholdi, Benjamin Enriquez, Pavel Etingof, and Eric Rains, Groups and Lie algebras corresponding to the Yang-Baxter equations, J. Algebra 305 (2006), no. 2, 742–764. MR2266850 1.1, 1.2, 1, 1.3, 2.3, 2.3, 2.4, 3.1, 3, 4, 4.2, 3 12. Gilbert Baumslag, Finitely generated residually torsion-free nilpotent groups. I, J. Austral. Math. Soc. Ser. A 67 (1999), no. 3, 289–317. MR1716698 4.3 22 Alexander I. Suciu and He Wang 13. Paolo Bellingeri and Arnaud Bodin, The braid group of a necklace, Math. Zeit. (to appear), arXiv:1404.2511v3. 2.4 14. Paolo Bellingeri, Sylvain Gervais, and John Guaschi, Lower central series of Artin-Tits and surface braid groups, J. Algebra 319 (2008), no. 4, 1409–1427. MR2383053 4.3 15. Barbu Berceanu and Ştefan Papadima, Universal representations of braid and braid-permutation groups, J. Knot Theory Ramifications 18 (2009), no. 7, 999–1019. MR2549480 1.1, 1.2, 1, 2.2, 4.3, 12, 4.3, 2 16. Stephen J. Bigelow, Braid groups are linear, J. Amer. Math. Soc. 14 (2001), no. 2, 471–486. MR1815219 4.3 17. Joan S. Birman, Braids, links, and mapping class groups, Annals of Mathematics Studies, no. 82, Princeton University Press, Princeton, N.J.; University of Tokyo Press, Tokyo, 1974. MR0375281 1.1, 2.1, 2.1, 2.4 18. Tara E. Brendle and Allen Hatcher, Configuration spaces of rings and wickets, Comment. Math. Helv. 88 (2013), no. 1, 131–162. MR3008915 1.1, 2.4 19. Kuo-Tsai Chen, Integration in free groups, Ann. of Math. (2) 54 (1951), no. 1, 147–162. MR0042414 1.3, 4.5 20. Wei-Liang Chow, On the algebraical braid group, Ann. of Math. (2) 49, (1948), no. 3, 654– 658. MR0026050 2.1 21. Daniel C. Cohen, Resonance of basis-conjugating automorphism groups, Proc. Amer. Math. Soc. 137 (2009), no. 9, 2835–2841. MR2506439 2, 1.3, 2.2, 3.2, 5 22. Daniel C. Cohen and Goderdzi Pruidze, Topological complexity of basis-conjugating automorphism groups, Pacific J. Math. 238 (2008), no. 2, 233–248. MR2442993 1, 2.2 23. Daniel C. Cohen and Henry K. Schenck, Chen ranks and resonance, Advances in Math. 285 (2015), 1–27. MR3406494 2, 1.3, 4.5 24. Daniel C. Cohen and Alexander I. Suciu, The Chen groups of the pure braid group, in: The Čech centennial (Boston, MA, 1993), 45–64, Contemp. Math., vol. 181, Amer. Math. Soc., Providence, RI, 1995, MR1320987 2, 1.3, 4.5, 4.5 25. Daniel C. Cohen and Alexander I. Suciu, Homology of iterated semidirect products of free groups, J. Pure Appl. Algebra 126 (1998), no. 1-3, 87–120. MR1600518 2.1 26. Daniel C. Cohen and Alexander I. Suciu, Alexander invariants of complex hyperplane arrangements, Trans. Amer. Math. Soc. 351 (1999), no. 10, 4043–4067. MR1475679 1.3, 4.5 27. Daniel C. Cohen and Alexander I. Suciu, Characteristic varieties of arrangements, Math. Proc. Cambridge Philos. Soc. 127 (1999), no. 1, 33–53. MR1692519 2, 1.3, 3.2, 4 28. Frederick R. Cohen, Jonathan Pakianathan, Vladimir V. Vershinin, and Jie Wu, Basis-conjugating automorphisms of a free group and associated Lie algebras, in: Groups, homotopy and configuration spaces, 147–168, Geom. Topol. Monogr., vol. 13, Geom. Topol. Publ., Coventry, 2008. MR2508204 1, 1.3, 1.3, 2.2, 2.2, 3.1, 3, 4, 4.2, 18 29. Andrew Conner and Peter Goetz, Some non-Koszul algebras from rational homotopy theory, Bull. Lond. Math. Soc. 47 (2015), no. 3, 473–482. MR3354442 1, 3.1, 4.2 30. Celeste Damiani, A journey through loop braid groups, preprint (2016), arXiv:1605.02323v2. 1.1 31. Emily Dies and Andrew Nicas, The center of the virtual braid group is trivial, J. Knot Theory Ramifications 23 (2014), no. 8, 1450042, 6 pp. MR3261954 2.2, 2.3 32. Alexandru Dimca, Ştefan Papadima, and Alexander I. Suciu, Topology and geometry of cohomology jump loci, Duke Math. J. 148 (2009), no. 3, 405–457. MR2527322 1.3, 3.2, 4.4, 14 33. Edward Fadell and Lee Neuwirth, Configuration spaces, Math. Scand. 10 (1962), 111–118. MR0141126 1.1, 2.1 34. Michael Falk, Arrangements and cohomology, Ann. Comb. 1 (1997), no. 2, 135–157. MR1629681 3.2 35. Michael Falk and Richard Randell, The lower central series of a fiber-type arrangement, Invent. Math. 82 (1985), no. 1, 77–88. MR808110 1.2, 2.1, 4, 4.2 36. Michael Falk and Richard Randell, Pure braid groups and products of free groups, in: Braids (Santa Cruz, CA, 1986), 217–228, Contemp. Math., vol. 78, Amer. Math. Soc., Providence, RI, 1988. MR975081 1.2, 2.1, 4.1, 8, 4.3 The pure braid groups and their relatives 23 37. Roger Fenn, Richárd Rimányi, and Colin Rourke, The braid-permutation group, Topology 36 (1997), no. 1, 123–135. MR1410467 1.1, 2.2 38. Edward Fadell and Ralph Fox, The braid groups, Math. Scand. 10 (1962), 119–126. MR0150755 1.1 39. Eddy Godelle and Luis Paris, K(π, 1) and word problems for infinite type Artin-Tits groups, and applications to virtual braid groups, Math. Z. 272 (2012), no. 3-4, 1339–1364. MR2995171 3 40. Deborah L. Goldsmith, The theory of motion groups, Michigan Math. J. 28 (1981), no. 1, 3–17. MR600411 2.4 41. Evgeny A. Gorin and Vladimir Ja. Lin, Algebraic equations with continuous coefficients, and certain questions of the algebraic theory of braids, Mat. Sb. (N.S.) 78 (120) (1969), no. 4, 579–610. MR0251712 4.3 42. Mikhail Goussarov, Michael Polyak, and Oleg Viro, Finite-type invariants of classical and virtual knots, Topology 39 (2000), no. 5, 1045–1068. MR1763963 1.1 43. Richard M. Hain, Infinitesimal presentations of the Torelli groups, J. Amer. Math. Soc. 10 (1997), no. 3, 597–651. MR1431828 1.2, 4.3, 12 44. Craig Jensen, Jon McCammond, and John Meier, The integral cohomology of the group of loops, Geom. Topol. 10 (2006), 759–784. MR2240905 1, 1.3, 3.1, 3, 4 45. Louis H. Kauffman, Virtual knot theory, European J. Combin. 20 (1999), no. 7, 663–690. MR1721925 1.1 46. Constantinos Kofinas, Vassilis Metaftsis, and Athanassios I. Papistas, Relatively free nilpotent torsion-free groups and their Lie algebras, Comm. Algebra 39 (2011), no. 3, 843–880. MR2782568 4.3 47. Daan Krammer, Braid groups are linear, Ann. of Math. (2) 155 (2002), no. 1, 131–156. MR1888796 4.3 48. Toshitake Kohno, On the holonomy Lie algebra and the nilpotent completion of the fundamental group of the complement of hypersurfaces, Nagoya Math. J. 92 (1983), 21–37. MR726138 1.2, 1, 4, 1 49. Toshitake Kohno, Série de Poincaré-Koszul associée aux groupes de tresses pures, Invent. Math. 82 (1985), no. 1, 57–75. MR808109 1.2, 1, 4.2 50. Peter Lee, The pure virtual braid group is quadratic, Selecta Math. (N.S.) 19 (2013), no. 2, 461–508. MR3090235 1.1, 1.2, 1, 1.3, 2.3, 3.1, 3, 4, 4.2, 3 51. Wilhelm Magnus, Beziehungen zwischen Gruppen und Idealen in einem speziellen Ring, Math. Ann. 111 (1935), no. 1, 259–280. MR1512992 1.1, 4.3 52. Anatoli I. Mal0 cev, Generalized nilpotent algebras and their associated groups, Mat. Sbornik N.S. 25(67) (1949), no. 3, 347–366. MR0032644 4.3 53. Anatoli I. Mal0 cev, On a class of homogeneous spaces, Izvestiya Akad. Nauk. SSSR. Ser. Mat. 13 (1949), no. 1, 9–32. MR0028842 4.4 54. William S. Massey, Completion of link modules, Duke Math. J. 47 (1980), no. 2, 399–420. MR575904 1.3, 4.5 55. Daniel Matei and Alexander I. Suciu, Cohomology rings and nilpotent quotients of real and complex arrangements, in: Arrangements–Tokyo 1998, 185–215, Advanced Studies Pure Math., vol. 27, Kinokuniya, Tokyo, 2000. MR1796900 3.2 56. James McCool, On basis-conjugating automorphisms of free groups, Canad. J. Math. 38 (1986), no. 6, 1525–1529. MR873421 1.1, 2.2 57. Vassilis Metaftsis and Athanassios I. Papistas, On the McCool group M3 and its associated Lie algebra, preprint (2015), arXiv:1506.06495v1. 4.3 58. Stefan Papadima and Alexander I. Suciu, Chen Lie algebras, Int. Math. Res. Not. 2004, no. 21, 1057–1086. MR2037049 1.3, 4.5 59. Stefan Papadima and Alexander I. Suciu, Homological finiteness in the Johnson filtration of the automorphism group of a free group, J. Topol. 5 (2012), no. 4, 909–944. MR3001315 4.3 60. Stefan Papadima and Alexander I. Suciu, Jump loci in the equivariant spectral sequence, Math. Res. Lett. 21 (2014), no. 4, 863–883. MR3275650 3.2, 3.2 61. Stefan Papadima and Sergey Yuzvinsky, On rational K[π, 1] spaces and Koszul algebras, J. Pure Appl. Algebra 144 (1999), no. 2, 157–167. MR1731434 4.1, 9, 4.1 24 Alexander I. Suciu and He Wang 62. Daniel Quillen, Rational homotopy theory, Ann. of Math. 90 (1969), no. 2, 205–295. MR0258031 1.2, 4.4 63. Henry K. Schenck and Alexander I. Suciu, Lower central series and free resolutions of hyperplane arrangements, Trans. Amer. Math. Soc. 354 (2002), no. 9, 3409–3433. MR1911506 1.3, 4.5 64. Brad Shelton and Sergey Yuzvinsky, Koszul algebras from graphs and hyperplane arrangements, J. London Math. Soc. 56 (1997), no. 3, 477–490. MR1610447 1, 4.1 65. Henry K. Schenck and Alexander I. Suciu, Resonance, linear syzygies, Chen groups, and the Bernstein–Gelfand–Gelfand correspondence, Trans. Amer. Math. Soc. 358 (2006), no. 5, 2269–2289. MR2197444 1.3, 4.5 66. Jean-Pierre Serre, Lie algebras and Lie groups, 1964 lectures given at Harvard University. Second edition. Lecture Notes in Mathematics, vol. 1500, Springer-Verlag, Berlin, 1992. MR1176100 4.3 67. Alexander I. Suciu, Fundamental groups of line arrangements: enumerative aspects, in: Advances in algebraic geometry motivated by physics (Lowell, MA, 2000), 43–79, Contemp. Math., vol. 276, Amer. Math. Soc., Providence, RI, 2001. MR1837109 1.3, 4.5 68. Alexander I. Suciu, Resonance varieties and Dwyer–Fried invariants, in: Arrangements of Hyperplanes—Sapporo 2009, 359–398, Adv. Stud. Pure Math., vol. 62, Kinokuniya, Tokyo, 2012. MR2933803 3.2 69. Alexander I. Suciu and He Wang, Formality properties of finitely generated groups and Lie algebras, preprint (2015), arXiv:1504.08294v2. 1.2, 1.3, 4.1, 9, 4.4 70. Alexander I. Suciu and He Wang, Pure virtual braids, resonance, and formality, preprint (2016), arXiv:1602.04273v1. 1, 2, 1.3, 2.3, 2.3, 3.2, 7 71. Alexander I. Suciu and He Wang, Chen ranks and resonance varieties of the upper McCool groups, preprint (2016). 1.2, 2, 1.3, 1.3, 2.2, 1, 3.2, 6, 15, 4.5, 16, 17
4math.GR
Registration and Fusion of Multi-Spectral Images Using a Novel Edge Descriptor Nati Ofir Shai Silberstein Dani Rozenbaum Sharon Duvdevani Bar arXiv:1711.01543v4 [cs.CV] 24 Jan 2018 Abstract In this paper we introduce a fully end-to-end approach for multi-spectral image registration and fusion. Our method for fusion combines images from different spectral channels into a single fused image by different approaches for low and high frequency signals. A prerequisite of fusion is a stage of geometric alignment between the spectral bands, commonly referred to as registration. Unfortunately, common methods for image registration of a single spectral channel do not yield reasonable results on images from different modalities. For that end, we introduce a new algorithm for multi-spectral image registration, based on a novel edge descriptor of feature points. Our method achieves an accurate alignment of a level that allows us to further fuse the images. As our experiments show, we produce a high quality of multi-spectral image registration and fusion under many challenging scenarios. Figure 1. Example of a multi-spectral image registration and fusion. Left: RGB image of the visible channel 0.4 − 0.7µm, contains the information about the color. Right: aligned grayscale MWIR images 3 − 5µm, ”sees” behind the haze, captures information about the cars in the far road. Center: fused image with the advantages of both channels, color information combines with good visibility of far objects. images from the same modal [25, 27] is by Scale-InvariantFeature-Transform (SIFT) [18]. Even though this method is robust, it does not reproduce its success on images from different modalities. The reason for this failure is that the appearance of the same object, under different spectral wavelengths, varies. Since we found out that unfortunately, SIFT descriptors are not invariant to different wavelengths, we offer to perform registration of multi-spectral images in a similar way, but to use instead a novel edge descriptor. Our method detects keypoints by Harris corner detection [11] and describes them using an edge descriptor. We measure the keypoint similarities by correlation of descriptors and we compute the final transformation by a new variant of Random-Sample-Consensus (RANSAC). As our experiments show, this new approach produces accurate registration results on multi-spectral images, since their edge information is indeed invariant to different wavelengths. Moreover, since measuring similarities by our edge descriptors is fast, our scheme can be incorporated into real-time vision systems. 1. Introduction This paper addresses the problem of multi-spectral registration and fusion. Different spectral channels capture different scenes, therefore, their fusion is interesting, and their registration is challenging. See Figure 1 for example, the visible channel in wavelength 0.4 − 0.7µm, captures the colors of the scene on the one hand, but suffers from low visibility due to haze on the other hand. On the right, the Middle-Wave-Infrared (MWIR) channel in wavelength of 3 − 5µm, is complementary to the visible channel. It does not capture colors, but utilizes a good visibility even in the presence of haze. For an example of good visibility, see the objects in the far road, where ”hot” cars can be easily seen in the thermal (MWIR) image. The fused image in the middle contains the advantages of both channels: good visibility of far distant objects combined with color information. In this work we introduce a method for performing registration of this kind of images, that manages to align multi-spectral images even though their captured information is highly different. In addition, we introduce a fast method for fusion of color-visible with IR-thermal images. Image registration is a famous problem in computer vision with profound research. A classic way to align two The paper is organized as follows. In Section 2 we cover previous work on the topics of registration and fusion. In Section 3 we introduce our method, for registration of multi-spectral images, based on our new edge descriptor. Then, in Section 4, we explain how to fuse two registered images: a color image of the visible channel, and a MWIR gray-scale image. In Section 5, we demonstrate evaluations of the accuracy of our registration algorithm, as well as examples of fusion of images captured from different sensors. 1 2. Previous Work Image registration is a fundamental problem in computer vision which has been studied for decades. Image registration methods [3, 27] are being used to fuse images, for matching stereo to recover object shape, or to produce a wide panorama image. Early methods rely on primitive characteristics of the images, for example, techniques that find translation by correlation [22] of image pixels, [19] solves registration based on the spatial intensity gradient of the image. [23] solves translation, rotation and scale by and FFT-based technique. More advanced methods rely on key-points [11, 18] and invariant descriptors to find featurebased registration [25]. A distinct group of works tried to solve the problem of image registration on images from different modalities or spectral channels [7, 24]. In [20] registration was carried out by two medical images based on maximization of mutual information. Since contours and gradients are invariant to different spectral images, [4, 14, 15, 16] offer to utilize them for registration. When trying to solve only translation, measuring correlation on Sobel image [10], or Canny image [6] may help to register multi-modal images. We show experimentally that our method outperforms these approaches. Note that we align images of a wide spectral range, visible to MWIR, while other methods [4, 15] work on a narrower range, visible to Near-Infrared (NIR). When spectral ranges are closer, the captured images are more similar and therefore easier to align. [1] solves registration by FAST features [26] and unique descriptors for non linear intensity variations. [2] measures cross spectral similarity by Convolutional-Neural-Network (CNN). They achieve high accuracy in classification of patches as same or different, however, their method cannot be incorporated into a fully registration scheme due to insensitivity to slight geometrical transformations. Our approach utilizes the fact that edges are invariant to multi-spectral images, and use it within a feature-based registration. Edge descriptors are effective and relevant for our purpose also because they are sensitive to geometric transformation and since their computation is fast. In Section 3 we describe in details our novel edge descriptor and how to use it for multi-spectral registration. Fusion of images retrieved from different sensors is a fundamental image processing problem addressed by many previous works [13, 8]. The most basic group of fusion methods, named α blending, and can be written as a linear combination, αI1 + (1 − α)I2 , where I1 , I2 are the input images. Early methods of image fusion are based on wavelets transform [17], or on Laplacian pyramid of an image [5]. More advanced approaches rely on PrincipalComponent-Analysis (PCA) transform of the fused images [21], and on Intensity-Hue-Saturation (IHS) technique [12]. In this work, we introduce a new technique named High- Pass-Low-Pass (HPLP). This method applies different fusion techniques to the low frequency signals and the high frequencies, it is described in details in Section 4. 3. Multi-Spectral Image Registration The algorithm for multi-spectral image registration consists of 3 major steps: corners detection by Harris [11], feature matching by a novel edge descriptor and iterative Random-Sample-Consensus (RANSAC) [9] for outliers rejection. Corners Detection. Our multi-spectral registration scheme is based on feature-points, whereas each point is a Harris corner [11]. This method is useful for our purpose, since the groups of corners of the two spectral images has a large overlap. We apply the following algorithm to detect the corners in each spectral image. Let I be the input image, Ix , Iy be the horizontal and vertical derivatives of I respectively. Given a Gaussian window w compute the Harris matrix for every pixel:   XX Ix (u, v)2 Ix (u, v)Iy (u, v) A= w(u, v) Ix (u, v)Iy (u, v) Ix (u, v)2 u v (1) A corner is characterized by a large positive eigenvalues λ1 , λ2 of the matrix A. Since the computation of exact eigenvalues is expensive, we instead compute the corner score: S = λ1 λ2 − k(λ1 + λ2 )2 = det(A) − k · trace2 (A), where k is a sensitivity parameter. For every pixel x we compute the score S to obtain a Harris score image S(x). In practice, we apply a non-maximal-suppression by a window of size w1 × w1 , such that every corner pixel, is a local maximum in its surrounding window in S(x). Feature Matching by an Edge Descriptor. We describe every corner point in one of the multi-spectral images by a novel edge descriptor. The uniqueness of this descriptor is its invariance over different wavelengths. Note that although the same object is acquired differently in the visible channel and in the MWIR channel, it has high similarity after applying our edge descriptor. Denote by CV the set of corners in the visible image and by CIR the corners in the MWIR image. Every point p ∈ CV or p ∈ CIR is basically described by its center pixel (xp , yp ). In addition, in a surrounding window of size w2 × w2 , we compute the Canny [6] edge image Ep and the Gradient directions Gp . Note that Ep is a binary image, Gp is an image with indexes of directions and reasonable results are achieved also with smaller size of window. The whole 360o directions are quantized in Gp to k1 bins. To conclude, the descriptor Dp of a point contains the following information: Dp = {xp , yp , Ep , Gp }. Given two points, p ∈ CV and q ∈ CIR , we match them according to their descriptors Dp , Dq . We first require that the difference in the gradient direction, will be less or equal than a single bin in any pixel x: SameGradp,q (x) = |Gp (x)−Gq (x)|mod16 ≤ 1. Hence, the similarity measure between p and q is the normalized correlation of the pixels that are in the same Gradient directions: P Ep (x) ∧ Eq (x) ∧ SameGradp,q (x) pP . Similarity(p, q) = x x Eq (x) (2) Then, for every corner p ∈ CV , we iterate over all the corners q ∈ CIR and search for the match with p theP highest similarity. We normalize Similarity(p, q) by x Eq (x) to avoid high scores in cases of many edge pixels in Eq . Iterative RANSAC. Eventually, we compute the final transformation between the images by our iterative version of RANSAC [9]. We do so in 3 iterations, the first one is a by applying RANSAC in the regular way as follows. We compute for each corner p ∈ CV its best match q ∗ ∈ CIR , and thus we get a group of matches M1 . This group contains inlier and outlier matches, therefore we apply the RANSAC outliers rejection approach. We sample small groups of matches m1 , ..., ml , ... ∈ M1 and compute by least square the transformation Tl that best describes these matches for every subgroup ml . Each match induces two linear constraints and therefore if our transformation T is characterized by n parameters, |ml | = d n2 e. Finally, we select the best transformation T ∗ derived from the best group of matches m∗ , that has the greatest support in the whole group of matches M1 . The support of a transformation is the number of other matches that ”agree” with it, a match ”agree” with a transformation if     xp xq ∗ ||T2×3  yp  −  yq∗  ||2 ≤ RansacDistance. (3) 1 1 The RansacDistance in the first iteration is rd1 . We denote by T1 the transformation that is found by RANSAC in the first iteration. In the second iteration we repeat the same process as in the first, but with initial guess T1 . We use this initial guess to restrict the group of all matches in the second iteration M2 as follows. p ∈ CV can be matched to q ∈ CIR only if their distance under T1 (similar to Eq. (3)), is less than M atchDistance. In iteration 2, M atchDistance = md1 and RansacDistance = rd1 such that md1 < ∞. We denote by T2 the transformation found by our iterative RANSAC in the second iteration. In the third and final iteration, we use T2 as initial guess and we decrease the thresholds, such that RansacDistance = rd2 and M atchDistance = md2 such that rd2 < rd1 , md2 < md1 . Because these thresholds are relatively low, the final transformation is more accurate. Finally, we denote by T3 the transformation found by RANSAC in the third iteration. This is the final transformation of our multi-spectral registration algorithm. Note that we can search for different types of transformations between the input images. Our implementation supports searching for any type of geometric relations. 4. Fast Image Fusion Given two registered images, a visible channel image V and a MWIR image IR, we would like to obtain their colored fusion image Fc , which its luminance gray-scale image is F . Since V is an RGB image, we denote by Y (V ) its luminance channel and by R(V ), G(V ), B(V ) its color channels. In this section we introduce a new fusion technique which we call High-Pass-Low-Pass (HPLP). This method fuses Y (V ) with IR by different approach for the lowfrequency signals in the image and for the high-frequency signals. Then we explain how to restore the colors of V in the fused color image Fc . Note that our fusion method is fast and can be run in real-time algorithms easily. Given an image I and a Gaussian kernel gσ with standard deviation of σ, we divide the image to high and low frequencies by a simple convolution, LPσ (I) = I ∗ gσ for low pass, and then the high-pass is HPσ (I) = I − LPσ (I). We fuse the low-frequencies by alpha-fusion, LPσ (F ) = α · LPσ (Y (V )) + (1 − α) · LPσ (IR). (4) The high-frequency image is fused by maximum criterion, such that in each pixel we take the value of the channel with the highest absolute value. Denote by b the indicator b = 1|HPσ (Y (V ))|≥|HPσ (IR)| , then in any pixel, HPσ (F ) = b · HPσ (Y (V )) + (1 − b) · HPσ (IR). (5) Now, the fused image is the low-pass plus the high-pass times gain to emphasize sharpness, Fσ = LPσ (F )+gain× HPσ (F ). We repeat the whole process for three levels of σ = σ1 , σ2 , σ3 and then we fuse all the three with equal weights, F = 31 (Fσ1 + Fσ2 + Fσ3 ). Now that we have a gray-scale fusion of V and IR, we would like to compute the color fusion Fc . For that end we apply color restoration from V . Our criterion is that the folR(Fc ) G(Fc ) F lowing ratio will be preserved, Y (V ) = R(V ) = G(V ) = B(Fc ) B(V ) . Therefore, the final color fusion is this ratio times F the input visible image, Fc = Y (V ) ·V. 5. Experiments We tested our algorithm for multi-spectral registration and fusion on various real images captured by multi-spectral imaging systems. The transformation between the channels is unknown in advance and we found it automatically by our method to create fusion examples. We evaluated the accuracy of our approach by creating a dataset of manuallyaligned images, and then finding a solution to a known simulated transformation. We tested our method on this dataset Algorithm Our method Canny Sobel Mutual Information LGHD VIS-SWIR 0.62 2.13 3.84 1.38 24.1 VIS-MWIR 0.76 1.43 3.2 2.48 8.13 Table 1. Accuracy in pixels of multi-spectral registration when searching for translation only. Our method is compared to correlation of Canny, correlation of Sobel, maximization of mutualinformation and LGHD. As can be seen (in bold), our approach achieves the highest accuracy and it is the only one which is subpixel accurate (score is less than 1). and compared it to several approaches for solving simple multi-spectral registrations. Our registration code is written in C++ and its runtime is less than 4 seconds on a CPU. By utilizing parallel computing or GPU its runtime could be dramatically decreased, even to the level of real time algorithm. Our fusion scheme is implemented in Matlab and its runtime is negligible since it contains simple arithmetic computations. In Table 1 we present a comparison between our accuracy to those of correlation of Canny [6] images, correlation of Sobel [10] images and maximization of mutualinformation [20]. We also compare to [1] but this method achieves no accurate results on our dataset. We simulated a known translation between the channels and tested the various methods when trying to solve translation only. Eventually, we find the Euclidean distance between the known translation to the output of each method to derive accuracy in pixels. We repeat this test for several images and store the mean of accuracy of all iterations. We test the performance for visible to Short-Wave-Infrared (SWIR, 1.4 − 3µm) registration, and for visible to MWIR registration. It can be seen that in both wavelengths we achieve the most accurate results among all the compared approaches. Moreover, our algorithm is the only one that produces registration with sub-pixel accuracy (its score is less that 1 pixel in both channels). We evaluate our accuracy on different scales between two spectral channels in Figure 2. We report the Euclidean distance between the translation we found automatically to the one we simulated. The same distance in the scale parameter is less than 0.001 and therefore it is negligible. It can be seen that our accuracy is around 1 pixel, in both channels SWIR and MWIR. In addition, we maintain this level of accuracy along all simulated scale transformations from 0.9 to 1.1. We show an interesting example of registration and fusion in Figure 3 . We perform registration between different spectral channels visible and MWIR, by our method. Then, we fuse the aligned images by HPLP technique. It can be seen that the left column contains all the information about Figure 2. Accuracy in pixels of multi-spectral registration as a function of scale between the images. Left: visible to SWIR registration. Right: visible to MWIR registration. The accuracy is around 1 pixel for all scales between 0.9 to 1.1 in both graphs. Figure 3. Example of a multi-spectral image registration and fusion. Left: RGB image of the visible channel 0.4 − 0.7µm, contains color information. Right: aligned grayscale MWIR images 3 − 5µm captures thermal information of objects. Center: fusion image with the advantages of both channels. Figure 4. Example of HPLP fusion captured by an aerial platform. From left to right: visible image, MWIR image and regular HPLP fusion. colors of the captured objects, while the right column contains all the thermal information of the objects. The image of the ”hot” factory building demonstrates how the two channels are naturally different. This object is very hot in the MWIR image and yet very colorful in the visible image. In the fused image we can see its colors together with its brightness indicating a high temperature. In Figure 4 we show images captured by and aerial platform. The images provide an interesting example of fusion. The visible image captures color of the clouds, but cannot provide information beyond far distances, whereas the MWIR image captures the far land. As can be seen, the fusion method contains the interesting information captured in both channels. 6. Conclusions We introduced a novel method to register images captured by multi-spectral sensors. Our approach is feature based and it utilizes the characteristic that edge descriptors are invariant to different wavelengths. The multi-spectral registration is accurate enough to allow the fusion of images. For that end we developed a new technique for fusion, named High-Pass-Low-Pass, that fuses the images in different ways for the low and high frequencies. Our method out- puts informative fusion results that use the benefits of both spectral channels. References [1] C. Aguilera, A. D. Sappa, and R. Toledo. Lghd: A feature descriptor for matching across non-linear intensity variations. In Image Processing (ICIP), 2015 IEEE International Conference on, page 5. IEEE, Sep 2015. 2, 4 [2] C. A. Aguilera, F. J. Aguilera, A. D. Sappa, and R. Toledo. Learning cross-spectral similarity measures with deep convolutional neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 1–9, 2016. 2 [3] L. G. Brown. A survey of image registration techniques. ACM computing surveys (CSUR), 24(4):325–376, 1992. 2 [4] M. Brown and S. Süsstrunk. Multispectral SIFT for scene category recognition. In Computer Vision and Pattern Recognition (CVPR11), pages 177–184, Colorado Springs, June 2011. 2 [5] P. Burt and E. Adelson. The laplacian pyramid as a compact image code. IEEE Transactions on communications, 31(4):532–540, 1983. 2 [6] J. Canny. A computational approach to edge detection. IEEE Transactions on pattern analysis and machine intelligence, (6):679–698, 1986. 2, 4 [7] C. Chen, Y. Li, W. Liu, and J. Huang. Sirf: simultaneous satellite image registration and fusion in a unified framework. IEEE Transactions on Image Processing, 24(11):4213–4224, 2015. 2 [8] L. Dong, Q. Yang, H. Wu, H. Xiao, and M. Xu. High quality multi-spectral and panchromatic image fusion technologies based on curvelet transform. Neurocomputing, 159:268–274, 2015. 2 [9] M. A. Fischler and R. C. Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24(6):381–395, 1981. 2, 3 [10] W. Gao, X. Zhang, L. Yang, and H. Liu. An improved sobel edge detection. In Computer Science and Information Technology (ICCSIT), 2010 3rd IEEE International Conference on, volume 5, pages 67–71. IEEE, 2010. 2, 4 [11] C. Harris and M. Stephens. A combined corner and edge detector. In Alvey vision conference, volume 15, pages 10– 5244. Manchester, UK, 1988. 1, 2 [12] C. He, Q. Liu, H. Li, and H. Wang. Multimodal medical image fusion based on ihs and pca. Procedia Engineering, 7:280–285, 2010. 2 [13] B. Huang, H. Song, H. Cui, J. Peng, and Z. Xu. Spatial and spectral image fusion using sparse matrix factorization. IEEE Transactions on Geoscience and Remote Sensing, 52(3):1693–1704, 2014. 2 [14] M. Irani and P. Anandan. Robust multi-sensor image alignment. In Computer Vision, 1998. Sixth International Conference on, pages 959–966. IEEE, 1998. 2 [15] Y. Keller and A. Averbuch. Multisensor image registration via implicit similarity. IEEE transactions on pattern analysis and machine intelligence, 28(5):794–801, 2006. 2 [16] H. Li, B. Manjunath, and S. K. Mitra. A contour-based approach to multisensor image registration. IEEE transactions on image processing, 4(3):320–334, 1995. 2 [17] H. Li, B. Manjunath, and S. K. Mitra. Multisensor image fusion using the wavelet transform. Graphical models and image processing, 57(3):235–245, 1995. 2 [18] D. G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60:91– 110, 2004. 1, 2 [19] B. D. Lucas, T. Kanade, et al. An iterative image registration technique with an application to stereo vision. 1981. 2 [20] F. Maes, A. Collignon, D. Vandermeulen, G. Marchal, and P. Suetens. Multimodality image registration by maximization of mutual information. IEEE transactions on medical imaging, 16(2):187–198, 1997. 2, 4 [21] U. Patil and U. Mudengudi. Image fusion using hierarchical pca. In image Information Processing (ICIIP), 2011 International Conference on, pages 1–6. IEEE, 2011. 2 [22] W. K. Pratt. Correlation techniques of image registration. IEEE transactions on Aerospace and Electronic Systems, (3):353–358, 1974. 2 [23] B. S. Reddy and B. N. Chatterji. An fft-based technique for translation, rotation, and scale-invariant image registration. IEEE transactions on image processing, 5(8):1266– 1271, 1996. 2 [24] X. Shen, L. Xu, Q. Zhang, and J. Jia. Multi-modal and multispectral registration for natural images. In European Conference on Computer Vision, pages 309–324. Springer, 2014. 2 [25] M. Subramanyam et al. Automatic feature based image registration using sift algorithm. In Computing Communication & Networking Technologies (ICCCNT), 2012 Third International Conference on, pages 1–5. IEEE, 2012. 1, 2 [26] G. Takacs, V. Chandrasekhar, S. Tsai, D. Chen, R. Grzeszczuk, and B. Girod. Unified real-time tracking and recognition with rotation-invariant fast features. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 934–941. IEEE, 2010. 2 [27] B. Zitova and J. Flusser. Image registration methods: a survey. Image and vision computing, 21(11):977–1000, 2003. 1, 2
1cs.CV
arXiv:1602.08307v2 [math.ST] 13 Nov 2017 A note on maximum likelihood estimation for cubic and quartic canonical toric Del Pezzo surfaces Dimitra Kosta Abstract This article focuses on the study of algebraic statistical models corresponding to toric Del Pezzo surfaces with Du Val singularities. A closedform for the maximum likelihood estimate of algebraic statistical models which correspond to cubic and quartic toric Del Pezzo surfaces with Du Val singular points is given. Also, we calculate the ML degrees of some toric Del Pezzo surfaces of degree less than or equal to six and show that they equal the degree of the surface in all the cases but one, namely the quintic Del Pezzo with two points of type A1 . 1 Introduction Maximum likelihood estimation (MLE) is a standard approach to parameter estimation and inference, and a fundamental computational task in statistics. It consists of the following problem: given the observed data and a model of interest, find the probability distribution that is most likely to have produced the data. In the past decade, algebraic techniques for the computation of maximum likelihood estimates have been developed for algebraic statistical models for discrete data (see [3], [6], [7]). These efforts to solve the likelihood equations for algebraic statistical models have focused on specifying the ML-degree of the corresponding models (see [3], [6], [7] and [12]). In [7] algebraic algorithms are presented for computing all critical points of the likelihood function, with the aim of identifying the local maxima in the probability simplex. Using these algorithms the authors derived an explicit formula for the ML-degree of a projective variety which is a generic complete intersection and this formula serves as an upper bound for the MLdegree of special complete intersections. Moreover, a geometric characterisation of the ML-degree of a smooth variety in the case when the divisor corresponding to the rational function is a normal crossings divisor was given in [3]. In the same The author would like to thank Ivan Cheltsov, Alexander Davie, Milena Hering, Kaie Kubjas and Bernd Sturmfels for valuable comments and suggestions. This article was completed during a Daphne Jackson Trust Fellowship, funded jointly by EPSRC and the University of Edinburgh. 1 paper an explicit combinatorial formula for the ML-degree of a toric variety is derived by relaxing the restrictive smoothness assumption and allowing some mild singularities. Also, in [8] a geometric description of all varieties with MLdegree 1 is given via Horn Uniformization, however given a variety it is hard to tell if that variety has ML-degree 1. For an introduction to the geometry behind the MLE for algebraic statistical models for discrete data the interested reader is refered to [9], which includes most of the current results on the MLE problem from the perspective of algebraic geometry as well as statistical motivation. This article is concerned with the problem of MLE for algebraic statistical models with singularities, in particular those which correspond to toric Del Pezzo surfaces with Du Val singular points (also called canonical toric Del Pezzo surfaces). The focus is not towards specifying the ML degree, but towards providing a closed form for the maximum likelihood estimate. Throughout this paper, we work over the field C of complex numbers. In particular we prove the following result. Theorem 1.1 Let Xd be a toric Del Pezzo surface of degree d with Du Val singularities. Then there is a closed form for the unique maximum likelihood estimate for the corresponding algebraic statistical model only in the case of a cubic X3 and a quartic X4 toric Del Pezzo surface. The importance of algebraic statistical models corresponding to toric varieties is due to their correspondence to log-linear models in Statistics (see [5]). Since the seminal papers by L.A. Goodman in the 70s, log-linear models have been widely used in statistics and areas like natural language processing when analysing crossclassified data in multidimensional contingency tables [2]. Another reason for studying the MLE for such algebraic statistical models, is that they correspond to singular varieties. Singularities play an important role in statistical inference as the commonly assumed smoothness of algebraic statistical models is very restrictive and is almost never satisfied for models of statistical relevance (see [5, p. 100], [16]). For instance, algebraic statistical models of binary symmetric phylogenetic three-valent trees are proven to be Fano varieties with Gorenstein terminal singularities in [17]. Statistical applications point towards a better understanding of the MLE problem for higher dimensional singular toric Fano models and studying the MLE problem for algebraic statistical models corresponding to toric Del Pezzo surfaces with Du Val singular points is the natural first step. 2 Preliminaries The relevant definitions to this problem are given in this section. In section 2.1 we introduce the reader to the MLE problem from the perspective of algebraic geometry. In section 2.2, we define toric models following the notation used in Chapter 1.2 of [13]. Section 2.3 serves as a brief introduction to canonical Del 2 Pezzo surfaces with a focus on the properties of the toric ones that will be used in the proof of Theorem 1.1. 2.1 Maximum Likelihood Estimation Consider the complex projective space Pn with coordinates (p0 , p1 , ..., pn ). In our setting we will consider X to be a discrete random variable taking values on the state space [n]. Then the coordinate pi represents the probability of the i-event pi = P (X = i), where i = 0, · · · , n, therefore p0 + p1 + ... + pn = 1. The set of points in Pn with positive real coefficients is identified with the probability simplex ∆n = {(p0 , p1 , ..., pn ) ∈ Rn+1 : p0 , p1 , ..., pn ≥ 0 and p0 + p1 + ... + pn = 1} . An algebraic statistical model is a Zariski closed subset M of complex projective space Pn , with the model itself being the intersection of M with the probability simplex ∆n . The data is given by a non-negative integer vector (u0 , u1 , ..., un ) ∈ Nn+1 , where ui is the number of times the i-event is observed. The maximum likelihood estimation problem consists of finding a model point p ∈ M which maximises the likelihood of observing the data. This amounts to maximising the corresponding likelihood function L(p0 , p1 , ..., pn ) = pu0 0 · pu1 1 · · · punn (p0 + p1 + ... + pn )(u0 +u1 +...+un ) over the model M, where here we ignore a multinomial coefficient. Statistical computations are usually implemented in the affine n-plane p0 +p1 +...+pn = 1. However, including the denominator makes the likelihood function a well-defined rational function on the projective space Pn , enabling one to use projective algebraic geometry to study its restriction to the variety M. The likelihood function might not be convex, so it can have many local maxima and the problem of finding and certifying a global maximum is difficult. Therefore, in most recent works the problem of finding all critical points of the likelihood function is considered, with the aim of identifying all local maxima (see [3], [6] and [7]). This corresponds to solving a system of polynomial equations and these equations, defining the critical points of the likelihood function L, are called likelihood equations. The number of complex solutions to the likelihood equations equals the number of complex critical points of the restriction of the likelihood function L to the model M, which is called the maximum likelihood (ML) degree of the variety M. 2.2 Toric models In this article we are studying the maximum likelihood estimation problem for toric models which are models with a well behaved likelihood function. Toric 3 models are known as log-linear models in statistics, because the logarithms of the probabilities are linear functions in the logarithms of the parameters θi . They have the property that maximum likelihood estimation is a convex optimization problem. Assuming that the parameter domain Θ is bounded, it follows that the likelihood function has exactly one local maximum. Let A = (aij ) be a non-negative integer d × m matrix with the property that all column sums are equal: d X ai1 = d X ai2 = ... = aim . i=1 i=1 i=1 d X The j-th column vector aj of the matrix A represents the monomial a a a θaj := θ1 1j · θ2 2j · · · θd dj for all j = 1, ...m and the assumption that the column sums of the matrix A are all equal means these monomials all have the same degree. Definition 2.1 The toric model of A is the image of the orthant Θ = Rd>0 under the map 1 f : Rd → Rm , θ 7→ Pm aj j=1 θ · (θa1 , θa2 , ..., θam ) . Maximum likelihood estimation for the toric model means solving the optimization problem of maximising the function pu1 1 · pu1 2 · ... · pumm subject to the constrains f (Rd>0 ). This is equivalent to maximising function θA·u subject to θ ∈ Rd>0 and where θAu = d Y m X θaj = 1, j=1 θiai1 u1 +ai2 u2 +...+aim um and θaj = d Y a θi ij . i=1 i=1 Let b := Au denote the sufficient statistic, then the optimisation problem above is equivalent to maximising θb subject to θ ∈ Rd>0 and m X θ aj = 1 . j=1 Then by the next Proposition [13, Proposition 1.9] we get an equation satisfied by the local maximum. 4 Proposition 2.2 Fix a toric model A and data u ∈ Nm with sample size N = u1 +· · ·+um and sufficient statistic b = Au. Let p̂ = f (θ̂) be any local maximum for the equivalent optimization problems above. Then A · p̂ = 1 · b. N Given a matrix A ∈ Nd×m and any vector b ∈ Rd , we consider the set PA (b) = {p ∈ Rm : A · p = 1 · b and pj > 0 for all j}. N This is a relatively open polytope and Birch’s theorem [13, Theorem 1.10] below asserts that it is either empty or meets the toric model in precisely one point. Theorem 2.3 (Birch’s Theorem) Fix a toric model A and let u ∈ Nm >0 be a strictly positive data vector with sufficient statistic b = Au. The intersection of the polytope PA (b) with the toric model f (Rd>0 ) consists of precisely one point. That point is the maximum likelihood estimate p̂ for the data u. 2.3 Del Pezzo surfaces This section aims to provide a brief introduction to Del Pezzo surfaces with the reader being referred to [4] for a more detailed study of this classical subject of algebraic geometry. In particular, we are focusing on the characterisation of toric Del Pezzo surfaces with Du Val singularities in terms of their polytopes which will be used in the proof of Theorem 1.1. Del Pezzo surfaces were named after the Italian mathematician Pasquale Del Pezzo who encountered this class of surfaces when studying surfaces of degree d embedded in Pd . They are two dimensional examples of Fano varieties, a class of varieties with ample anticanonical divisor class which have been extensively studied in birational geometry in the context of the minimal model program (see [10]). Definition 2.4 A complex projective algebraic surface X with ample anticanonical divisor class −KX is called a Del Pezzo surface. 2 The self-intersection number KX of the canonical class of the Del Pezzo surface is called the degree d of the Del Pezzo surface X. Often Del Pezzo surfaces are assumed to be smooth, but here our Del Pezzo surfaces are allowed to have mild singularities and, in particular, at most Du Val singularities. Definition 2.5 A point P of a normal surface X is called a Du Val singularity if there exists a minimal resolution π : X̃ → X such that KX̃ · Ei = 0 for every exceptional curve Ei ⊂ X̃. Every Del Pezzo surface is either a product of two projective lines P1 × P1 (with d=8), or the blow-up of a projective plane in 9 − d points with no three 5 collinear, no six on a conic, and no eight of them on a cubic having a node at one of them. Conversely any blowup of the plane in points satisfying these conditions is a Del Pezzo surface. In dimension two, the class of Du Val singularities is the same as the class of canonical singularities firstly introduced by M. Reid (see [14]), although this is not the case in higher dimensions. This is why we refer to Del Pezzo surfaces with Du Val singularities also as canonical Del Pezzo surfaces. Toric Del Pezzo surfaces correspond to certain convex lattice polytopes whose boundary lattice points are dictated by the singularities involved. In particular, the corresponing polytope of a toric Del Pezzo surface with Du Val singularities is a reflexive polytope. According to the classification results of reflexive polytopes (see [11], [15]), we have the following. Proposition 2.6 There are exactly 16 isomorphism classes of two-dimensional reflexive polytopes given in the list bellow. The number in the labels is the number of lattice points on the boundary. Table 1: Two-dimensional reflexive polytopes 6 3 Main Calculation In this section we determine a closed form for the maximum likelihood estimates of all algebraic statistical models corresponding to cubic (d=3) and quartic (d=4) toric Del Pezzo surfaces with Du Val singularities. In each case we will explain how one can detect the type and number of singular points from the corresponding polytope. 3.1 Cubic Del Pezzo with three singular points of type A2 Consider the case of a reflexive polytope in Z2 with three lattice points (1, 0), (0, 1) and (−1, −1) on the boundary, as in the graph below. By computing the normal fan we see its minimal generators span a sublattice of index 3 in Z2 . This corresponds to a cubic surface with three Du Val singular points of type A2 . Another way to see this is by using the characters coming from the lattice points of the polygon. The corresponding toric variety is isomorphic to the cubic surface with three double points of type A2 and equation S3 : p34 − p1 p2 p3 = 0 in P3 . This polytope generated by the lattice points (1, 0), (0, 1), (−1, −1) in Z2 gives rise to the same projective toric variety as the polytope which is generated by the lattice points (2, 1, 0), (1, 2, 0), (0, 0, 3), (1, 1, 1) in Z3 . We are interested in the algebraic statistical model given by the matrix   2 1 0 1 A = 1 2 0 1 . 0 0 3 1 This non-negative integer matrix A corresponds to the map f : C3 → C3 , (θ1 , θ2 , θ3 ) 7→ (θ12 θ2 , θ1 θ22 , θ33 , θ1 θ2 θ3 ) 2 (θ1 θ2 + θ1 θ22 + θ33 + θ1 θ2 θ3 ) . According then to Birch’s theorem there is a unique maximum likelihood estimate p̂ for the data u = (u1 , u2 , u3 , u4 ) with N = u1 + u2 + u3 + u4 . This unique MLE satisfies the equation A · p̂ = 1 ·A·u , N 7 where N = u1 + u2 + u3 + u4 and p̂ is the probability distribution corresponding to the parameter values (θ̂1 , θ̂2 , θ̂3 ). This gives us the equations 1 (3u1 + u4 ) N 1 3p̂2 + p̂4 = (3u2 + u4 ) N 1 3p̂3 + p̂4 = (3u3 + u4 ) . N s s 2 p p2 √ We then compute (θ̂1 , θ̂2 , θ̂3 ) = ( 3 1 , 3 2 , 3 p3 ), where each pk , k = 1, 2, 3 is p2 p1 given by a cubic equation 3p̂1 + p̂4 = N − 28(3uk + u4 ) 2 p̂k 28N (ui − uk )(uj − uk ) − 9(3uk + u4 )2 (3uk + u4 )3 + p̂ − =0 k 28N 2 28N 3 p̂3k − for i, j, k = 1, 2, 3 and i 6= j 6= k. 3.2 Quartic Del Pezzo with fourA1 type singular points. Consider the reflexive polytope with four lattice points on the boundary, as in the graph below. If we compute the normal fan, we see that it corresponds to a quartic surface with four Du Val singular points of type A1 . Another way to see this, is by using the characters coming from the lattice points of the polygon. Then the corresponding projective toric variety is isomorphic to a quartic surface. This is the complete intersection of the two quadric equations S4 : p1 p4 − p25 = p2 p3 − p25 = 0 in P4 , which has four double points of type A1 . The polytope generated by the lattice points (1, 0), (0, 1), (0, −1), (−1, 0) ∈ Z2 gives rise to the same projective toric variety as the polytope generated by the lattice points (2, 1, 0), (1, 2, 0), (1, 0, 2), (0, 1, 2), (1, 1, 1) in Z3 . The non-negative integer matrix   2 1 1 0 1 A = 1 2 0 1 1 0 0 2 2 1 8 corresponds to the map f : C3 → C4 , (θ1 , θ2 , θ3 ) 7→ (θ12 θ2 , θ1 θ22 , θ1 θ32 , θ2 θ32 , θ1 θ2 θ3 ) . (θ12 θ2 + θ1 θ22 + θ1 θ32 + θ2 θ32 ) According to Birch’s theorem there is a unique maximum likelihood estimate θ̂ for the data u = (u1 , u2 , u3 , u4 , u5 ) which satisfies the equation A · p̂ = 1 ·A·u , N where N = u1 + u2 + u3 + u4 + u5 and p̂ is the probability distribution corresponding to the parameter values (θ̂1 , θ̂2 , θ̂3 ). This gives us the equations p̂1 − p̂4 = p̂2 − p̂3 = 2p̂3 + 2p̂4 − p̂5 = 1 (u1 − u4 ) N 1 (u2 − u3 ) N 1 (2u3 + 2u4 − u5 ). N Then s the s unique s maximum likelihood estimate θ̂ for the data u is (θ̂1 , θ̂2 , θ̂3 ) = 2 2 p̂ p̂ p̂35 ( 3 1, 3 2, 3 ), where p̂1 , p̂2 , p̂5 are given by the quartic equations below p̂2 p̂1 p̂1 p̂2 and and h (2u1 + 2u2 + u5 )(2u1 + 2u3 + u5 ) i2 4N + (u1 − u4 ) p̂1 + p̂21 − N N2 h ih (u1 − u4 )p̂1 2N + 2(u1 − u4 ) i2 − p̂21 − =0 4p̂1 − N N h 4N + (u2 − u3 ) (2u1 + 2u2 + u5 )(2u2 + 2u4 + u5 ) i2 p̂22 − p̂2 + N N2 ih h 2N + 2(u − u3 ) i 2 (u − u )p̂ 2 2 3 2 4p̂2 − =0 − p̂22 − N N h (2u1 + 2u2 + u5 )(2u3 + 2u4 + u5 ) p̂25 − 2p̂5 + N2 (2u1 − 2u4 )(N + u2 − u3 ) i2 (u1 − u4 ) + − (2 − 2p̂5 )2 [ + 4p̂25 ] = 0 2 N N2 3.3 Quartic Del Pezzo with one A2 and two A1 type singular points Consider the case of a reflexive polytope with four lattice points on the boundary. By using the characters coming from the lattice points of the polygon, 9 the corresponding toric variety is isomorphic to a quartic surface. This is the ′′ complete intersection of two quadrics S4 : p1 p3 − p2 p5 = p2 p4 − p25 = 0 in P4 , which has one A2 and two A1 type singular points. The polytope generated by the lattice points (1, 0), (0, 1), (−1, 1), (0, −1) in Z2 gives rise to the same projective toric variety as the polytope generated by the lattice points (2, 1, 0), (1, 2, 0), (0, 2, 1), (1, 0, 2), (1, 1, 1) in Z3 . The non-negative integer matrix  2 1 A = 1 2 0 0 0 1 2 0 1 2 corresponds to the map f : C3 → C4 , (θ1 , θ2 , θ3 ) 7→  1 1 1 (θ12 θ2 , θ1 θ22 , θ22 θ3 , θ1 θ32 , θ1 θ2 θ3 ) . (θ1 θ32 + θ22 θ3 + θ1 θ22 + θ12 θ2 + θ1 θ2 θ3 ) According to Birch’s theorem there is a unique maximum likelihood estimate θ̂ for the data u = (u1 , u2 , u3 , u4 , u5 ) which satisfies the equation A · p̂ = 1 ·A·u , N where N = u1 + u2 + u3 + u4 + u5 and p̂ is the probability distribution corresponding to the parameter values (θ̂1 , θ̂2 , θ̂3 ). This gives us the equations p̂1 + 2p̂4 + p̂5 = p̂2 − 3p̂4 − p̂5 = p̂3 + 2p̂4 + p̂5 = 1 (u1 + 2u4 + u5 ) N 1 (u2 − 3u4 − u5 ) N 1 (u3 + 2u4 + u5 ) . N Then the unique maximum likelihood estimate θ̂ for the data u is (θ̂1 , θ̂2 , θ̂3 ) = 10 ( s 3 p̂21 , p̂2 s 3 p̂22 , p̂1 s 3 p̂35 ), where p̂1 is given by the quartic equation below p̂1 p̂2 h 4(3u1 + 2u2 + u5 ) − 6(u1 − u3 ) (u1 − u3 )2 ih 16p̂2 9p̂22 + p̂2 + N N2 i h 6(3u1 + 2u2 + u5 ) − 9(u1 − u3 ) 2 − 33p̂22 + N 23(3u1 + 2u2 + u5 ) − 43(u1 − u3 ) + (u1 + u2 − u4 ) + p̂2 N 2 i2 (3u3 + 2u2 + u5 ) =0 + N2 p̂2 is given by the quartic equation h (3u1 + 2u2 + u5 )2 ih 8(u1 − u3 ) − 6(3u1 + 2u2 + u5 ) 19p̂1 p̂1 + p̂21 + N N2 2(u1 + u2 − u4 ) − 7(3u1 + 2u2 + u5 ) i2 h 2 − 3p̂1 + N 12(u1 − u3 ) − 8(3u1 + 2u2 + u5 ) − 6(u1 + u2 − u4 ) + p̂1 N (3u3 + 2u2 + u5 )2 + 2(3u3 + 2u2 + u5 )(u1 + u2 − u4 ) i2 =0 + N2 and the probability distribution p̂5 is given by the quartic equation a5 p̂45 + b5 p̂35 + c5 p̂25 + d5 p̂5 + e5 = 0 where a5 = 51 b5 c4 = −35(u + v + w) − 4v = (u + v + w)(9u + 36v + w) + 75uw − 8v 2 d4 e4 with u = 3.4 = −3(u + v + w)[12uw + (6v + 6w + 4v)v] − 3uvw = 3uw[9uw + (6u + 6w + 4v)v] , u1 +2u4 +u5 , N v= u3 +2u4 +u5 N and w = u2 −3u4 −u5 . N Quartic Del Pezzo surface with one A3 and two A1 type singular points. Consider the case of a reflexive polytope with four lattice points on the boundary, as in the graph below. 11 We use the characters coming from the lattice points of the polygon. Then the corresponding toric variety is isomorphic to a quartic surface, which is the ′′′ complete intersection of two quadrics S4 : p2 p4 − p23 = p1 p3 − p25 = 0 in P4 , which has one A3 and two A1 type singular points. We can see that the polytope generated by the lattice points (1, 1), (0, 1), (−1, 1) and (0, −1) in Z2 gives rise to the same projective toric variety as the polytope generated by the lattice points (1, 0, 3), (2, 2, 0), (1, 2, 1), (0, 2, 2), (1, 1, 2) in Z3 . The non-negative integer matrix   1 2 1 0 1 A = 0 2 2 2 1 3 0 1 2 2 gives the map f : C3 → C4 , (θ1 , θ2 , θ3 ) 7→ (θ1 θ33 , θ12 θ22 , θ1 θ22 θ3 , θ22 θ32 , θ1 θ2 θ32 ) . (θ1 θ33 + θ12 θ22 + θ1 θ22 θ3 + θ22 θ32 ) According to Birch’s theorem there is a unique maximum likelihood estimate θ̂ for the data u = (u1 , u2 , u3 , u4 , u5 ) which satisfies the equation A · p̂ = 1 ·A·u , N where N = u1 + u2 + u3 + u4 + u5 and p̂ is the probability distribution corresponding to the parameter values (θ̂1 , θ̂2 , θ̂3 ). This gives us the equations p̂1 − p̂4 = 2p̂2 + p̂4 + p̂5 = 2p̂3 + p̂5 = 1 (u1 − u4 ) N 1 (2u2 + u4 + u5 ) N 1 (2u3 + u5 ) . N We can compute the unique maximum likelihood estimate θ̂ for the data u, which is s p̂2 4 p̂25 θ̂1 = p̂3 p̂2 s p̂3 θ̂2 = p̂3 4 26 p̂5 s p̂2 θ̂3 = 4 5 , p̂2 where p̂2 is given by the quartic equation −40p̂42 + (76w − 92u + 16v)p̂32 + [ − 4u2 + 4(u − w)(3w − 5u + 2v) − 2(w + v − u)2 ]p̂22 + [(w − u)(w + v − u) − 2u2 (3u + v − w)]p̂2 + u4 = 0 , 12 where p̂3 is given by the quartic equation 10p̂43 − 2(10u + 3v + 2w)p̂33 + [6u2 + (4u + v)(3u + v + w)]p̂23 − u2 (7u + 2v + w)p̂3 + u4 = 0 , and p̂5 is given by the quartic equation 5p̂45 + (6v + 4w)p̂35 + [6u2 + (2v − 4u)(v + w)]p̂25 + [ − 4u3 − 2v(u2 + 2uv + 2wu)]p̂5 + [u4 + 2uv(uv + wu)] = 0 with u = 3.5 2u3 +u5 , N v= u1 −u4 N and w = 2u2 +u4 +u5 . N Toric Del Pezzo surfaces of degree greater than five. When the degree of the Del Pezzo surface is greater than or equal to five, each of the defining equations of the probability distribution (p̂1 , p̂2 , p̂3 , · · · p̂n ) satisfy an equation of degree five or higher. By the Abel-Ruffini theorem there is no algebraic solution for a general polynomial equation of degree five or higher, therefore one cannot obtain a closed form solution for the maximum likelihood estimate in these cases. Also, Table 2 provides a list of the ML degrees of toric Del Pezzo surfaces of degree up to six using Macaulay2 and Algorithm 6 in Section 4 of [7]. Already for the case of a septic Del Pezzo surface corresponding to the reflexive polytope 7a in Table 1, the memory of a Dell laptop with 2.4 GHz Intel Core i5 processor was not sufficient for the computation to be completed. However, the results described in Table 2 are in accordance with [9, Theorem 3.2], which states that the ML degree of a projective toric variety is bounded above by its degree. The cubic and quartic Del Pezzo surfaces in Table 2 are complete intersections and have ML degree which equals the degree of the Del Pezzo surface. It is known, that Del Pezzo surfaces of degree greater than or equal to five are no longer complete intersections (see [4]). We see in Table 2 that the ML degree drops to three in the case of a quintic Del Pezzo surface S5 corresponding to the reflexive polytope 5b in Table 1. The natural next step is to consider the maximum likelihood estimation problem for scaled toric Del Pezzo surfaces which give different embeddings of isomorphic Del Pezzo surfaces in projective space and compute their ML degrees, as is the line of research in [1]. The author would like to thank the referees for their useful comments and suggestions which greatly improved this paper. References [1] C. Amendola, N. Bliss, I. Burke, C. R. Gibbons, M. Helmer, S. Hosten, E. D. Nash, J. I. Rodriguez, D. Smolkin, The maximum likelihood degree of toric varieties, https://arxiv.org/pdf/1703.02251.pdf. 13 Ideal of some degree d Del Pezzo Sd p34 S3 : p 1 p 2 p 3 − S4 : p1 p4 − p25 , p2 p3 − p1 p4 ′ S4 : p2 p4 − p3 p5 , p1 p3 − p25 ′′ S4 : p2 p4 − p23 , p1 p3 − p25 S5 : p3 p5 − p4 p6 , p2 p5 − p26 , p2 p4 − p3 p6 p1 p4 − p26 , p1 p3 − p2 p6 ′ S5 : p3 p5 − p4 p6 , p2 p5 − p26 , p2 p4 − p3 p6 p1 p4 − p2 p6 , p22 − p1 p3 S6 : p4 p6 − p5 p7 , p3 p6 − p27 , p2 p6 − p1 p7 p3 p5 − p4 p7 , p2 p5 − p27 , p1 p5 − p6 p7 p2 p4 − p3 p7 , p1 p4 − p27 , p1 p3 − p2 p7 ′ S6 : p 5 p 6 − p 1 p 7 , p 4 p 6 − p 2 p 7 , p 3 p 5 − p 4 p 7 p2 p5 − p27 , p2 p4 − p3 p7 , p1 p4 − p27 p1 p3 − p2 p7 , p22 − p3 p6 , p1 p2 − p6 p7 ′′ S6 : p26 − p5 p7 , p4 p6 − p3 p7 , p3 p6 − p2 p7 p4 p5 − p2 p7 , p3 p5 − p2 p6 , p2 p4 − p1 p7 p23 − p1 p7 , p2 p3 − p1 p6 , p22 − p1 p5 ′′′ S6 : p26 − p5 p7 , p5 p6 − p4 p7 , p3 p6 − p2 p7 p25 − p4 p6 , p3 p5 − p2 p6 , p3 p4 − p2 p5 p23 − p1 p6 , p2 p3 − p1 p5 , p22 − p1 p4 ML-degree 3 4 4 4 3 5 6 6 6 6 Table 2: ML degree of some Del Pezzo surfaces [2] Y. M. Bishop, S. E. Fienberg and P. W. Holland, Discrete Multivariate Analysis: Theory and Practice, Springer-Verlag (2007), New York. [3] F. Catanese, S. Hosten, A. Khetan and B. Sturmfels, The Maximum likelihood degree, American Journal of Mathematics, 18 (2006), 671-697. [4] I. V. Dolgachev, Del Pezzo surfaces in Classical Algebraic Geometry: A Modern View, Cambridge University Press (2012), 347-425. [5] M. Drton, B. Sturmfels, S. Sullivant, Lectures on Algebraic Statistics, Oberwolfach Seminars, 39 (2008), Birkhuser, Basel. [6] J. D. Hauenstein, J. Rodriguez, and B. Sturmfels, Maximum likelihood for matrices with rank constraints, Journal of Algebraic Statistics, 5 (2014), 18-38. [7] S. Hosten, A. Khetan and B. Sturmfels, Solving the likelihood equations, Foundations of Computational Mathematics, 5 (2005), 389-407. [8] J. Huh, Varieties with maximum likelihood degree one, Journal of Algebraic Statistics, 5 (2014), 1-17. 14 [9] J. Huh, B. Sturmfels, Likelihood Geometry in Combinatorial Algebraic Geometry, Lecture Notes in Mathematics, 2108 (2014), 63-117. [10] J. Kollár, Minimal models of algebraic threefolds: Mori’s program, Astrisque 177 (1989), 303-326. [11] M. Kreuzer, H. Skarke, On the classification of reflexive polyhedra, Commun. Math. Phys. 185 (1997) 495-508. [12] S. Lin, B. Sturmfels, and Z. Xu, Marginal Likelihood Integrals for Mixtures of Independence Models, Journal of Machine Learning Research, 10 (2009), 1611-1631. [13] L. Pachter and B. Sturmfels, Algebraic Statistics for Computational Biology, (2005) Cambridge University Press, New York. [14] M. Reid, Canonical 3-folds, Journées de Géometrie Algébrique dAngers, Juillet 1979/Algebraic Geometry, Angers, 1979, Sijthoff & Noordhoff, Alphen aan den Rijn (1980), 273-310. [15] H. Sato, Toward the classification of higher-dimensional Fano varieties, Tohoku Math. J., 52 (2000), 383-413. [16] B. Sturmfels, Open problems in Algebraic Statistics, In ”Emerging Applications of Algebraic Geometry”, I.M.A. Volumes in Mathematics and its Applications, 149 (2009), Springer, New York, 351-364. [17] W. Buczynska, J. Wisniewski, On the geometry of binary symmetric models of phylogenetic trees, J. Euro. Math. Society, 9 (2007), no. 3, 609-635. Dimitra Kosta School of Mathematics and Statistics, University of Glasgow, Glasgow G12 8SQ, UK. [email protected] 15
10math.ST
arXiv:1506.01074v3 [math.GR] 11 Mar 2016 Discrete Mathematics and Theoretical Computer Science DMTCS vol. 18:3, 2016, #1 Factoriality and the Pin-Reutenauer procedure J. Almeida1∗ 1 2 3 J. C. Costa2† M. Zeitoun3‡ Centro de Matemática e Departamento de Matemática, Faculdade de Ciências, Universidade do Porto, Portugal Centro de Matemática e Departamento de Matemática e Aplicações, Universidade do Minho, Portugal Univ. Bordeaux, LaBRI, UMR 5800, F-33400 Talence, France received 4th June 2015, accepted 2nd Feb. 2016. We consider implicit signatures over finite semigroups determined by sets of pseudonatural numbers. We prove that, under relatively simple hypotheses on a pseudovariety V of semigroups, the finitely generated free algebra for the largest such signature is closed under taking factors within the free pro-V semigroup on the same set of generators. Furthermore, we show that the natural analogue of the Pin-Reutenauer descriptive procedure for the closure of a rational language in the free group with respect to the profinite topology holds for the pseudovariety of all finite semigroups. As an application, we establish that a pseudovariety enjoys this property if and only if it is full. Keywords: pseudovariety, profinite semigroup, profinite topology, topological closure, unary implicit signature, pure implicit signature, rational language, aperiodic semigroup, Burnside pseudovariety, factorial pseudovariety, full pseudovariety, Pin-Reutenauer procedure 1 Introduction Context and motivations. This paper deals with the computation of the closure of a given rational language within a relatively free algebra, with respect to a suitable implicit signature and a profinite topology. A motivation for this line of research is the separation problem, which, given two rational languages K and L, asks whether there is a rational language from a fixed class C containing K and disjoint from L. The separation problem has several motivations. First, the membership problem for C reduces to the separation problem for C, since a language belongs to the class C if and only if it is separable from its complement by a language from C. ∗ Work partially supported by CMUP (UID/MAT/ 00144/2013), which is funded by FCT (Portugal) with national (MCTES) and European structural funds (FEDER), under the partnership agreement PT2020. † Work supported, in part, by the European Regional Development Fund, through the program COMPETE, and by the Portuguese Government through FCT, under the project PEst-OE/MAT/UI0013/2014. ‡ Work carried out with financial support from the French State, managed by the French National Research Agency (ANR) in the frame of ANR 2010 BLAN 0202 01 FREC and of the "Investments for the future" Programme IdEx Bordeaux – CPU (ANR-10IDEX-03-02). ISSN 1365–8050 c 2016 by the author(s) Distributed under a Creative Commons Attribution 4.0 International License 2 J. Almeida, J. C. Costa, M. Zeitoun Furthermore, solving this problem gives more information about the class under investigation, and is more robust when applying transformations to the class. For instance, is was proved by Steinberg (2001) and Place and Zeitoun (2015) that the classical operator V 7→ V ∗ D on pseudovarieties preserves decidability of the separation problem, while it has been shown by Auinger (2010) that it does not preserve decidability of the membership problem (on the other hand, the status with respect to separation is unknown for other operators that do not preserve the decidability of membership, such as the power, as shown by Auinger and Steinberg (2003)). Finally, deciding separation for some class can be used to decide membership for more involved classes: this is for instance a generic result in the quantifier alternation hierarchy, established by Place and Zeitoun (2014a), that deciding separation at level Σn in this hierarchy entails a decision procedure for membership at level Σn+1 . Almeida (1999) has related the separation problem with a purely topological question, which is the main topic of this paper: the separation problem has a negative answer on an instance K, L of rational languages if and only if the closures of K and L in a suitable relatively free profinite semigroup, which depends on the class of separator languages we started from, have a nonempty intersection. Determining whether such closures intersect can be in turn reformulated in terms of computation of pointlike twoelement sets in a given semigroup. Deciding whether closures of rational languages intersect is often nontrivial, in particular because the profinite semigroup in question is uncountable in general. Yet, several classes of languages enjoy a property called reducibility(i) that states that the closures of two rational languages intersect in the suitable relatively free profinite semigroup if and only if their traces in a more manageable universe also intersect. This more manageable universe may in particular be countable, and is therefore amenable to algorithmic treatment. In summary, reducibility is a property of the class of separators under investigation (or of the class of semigroups recognizing these separators), which reduces the search of a witness in the intersection into a simpler universe. The most important example from the historical point of view is the class of languages recognized by finite groups. In this case, the relatively free algebra is the free group over some set X of generators, which is indisputably much better understood than the free profinite group over X. In particular, it is countable. Since it is known that the closures in the free profinite group of two rational languages intersect if and only if their traces in the free group also intersect (that is, the class of finite groups enjoys the reducibility property), this justifies the quest for an algorithm computing the closure in the free group of a rational language. Such an algorithm is known as the Pin-Reutenauer procedure, which we describe below, and has been developed along a successful line of research, see the work of Pin and Reutenauer (1991); Pin (1991); Ash (1991); Henckell et al. (1991); Ribes and Zalesskiı̆ (1993); Herwig and Lascar (2000); Auinger (2004); Auinger and Steinberg (2005). As a consequence, the separation problem by group languages is decidable. This framework can be generalized to classes consiting of other types of semigroups than just groups. Denote by κ the signature consisting of the binary multiplication and the unary (ω − 1)-power, with their usual interpretation in profinite semigroups. Note that the set of all κ-terms over X is isomorphic to the free group over X: the mapping sending each generator to itself and xω−1 to x−1 , the inverse of x in the free group, can be extended to a group isomorphism. More generally, given a pseudovariety V of finite semigroups, consider the semigroup ΩκX V, which can be seen as the set of all interpretations over V of (i) More precisely and technically, reducibility for 2-pointlike sets. Factoriality and the Pin-Reutenauer procedure 3 κ-terms over X. This subalgebra of the pro-V semigroup over X is countable and thus, as said above, amenable to algorithmic treatment. One central problem in this context is the κ-word problem: given two κ-terms over X, decide whether they represent the same element in the relatively free profinite semigroup in the pseudovariety under consideration. This problem has already been investigated for several classical pseudovarieties besides that of finite groups, for instance by Almeida (1991, 1995) for the pseudovariety J of all finite J-trivial semigroups, by Almeida and Zeitoun (2004, 2007) for the pseudovariety R of all finite R-trivial semigroups, by Costa (2001) for the pseudovariety LSl of all finite semigroups whose local monoids are semilattices and by Moura (2011) for the pseudovariety DA of all finite semigroups whose regular J-classes are aperiodic semigroups. Moreover, reducibility has been shown to hold for several pseudovarieties, in particular by Almeida (2002) for J, by Almeida et al. (2005) for R, by Costa and Teixeira (2004) for LSl and, as already mentioned, by Ash (1991); Almeida and Steinberg (2000a) for the pseudovariety G of all finite groups. A further example is the pseudovariety A of aperiodic languages which, in a forthcoming paper, will be derived from the work of Henckell (1988), recently revisited by Place and Zeitoun (2014b, 2016), from which one can derive reducibility of this class. In other words, for these classes of languages, the separation problem reduces to testing that the intersection of the closures of two given rational languages in the suitable countable relatively free algebra is empty. This motivates designing algorithms to compute closures of rational languages in these relatively free algebras. This is one of the main contributions of this paper. The Pin-Reutenauer procedure. In the core of the paper, we investigate how the profinite closure of rational languages in free unary algebras interacts with concatenation and iteration. The natural guide for this work is provided by a procedure proposed by Pin and Reutenauer (1991) for the case of the free group. This procedure gives a way to compute a representation of the closure of a rational language inductively on the structure of the rational expression. Of course, the closure of a union is the union of the closures. The other two rules of the Pin-Reutenauer procedure deal with concatenation and iteration. For instance, when computing in ΩκX V, the smallest subalgebra of the pro-V semigroup closed under multiplication and (ω − 1)-power, establishing the Pin-Reutenauer procedure amounts to showing the following equalities: KL = K L, L+ = hLiκ , where L is the topological closure of L in ΩκX V, and hLiκ is the subalgebra of ΩκX V generated by L. Notice that these equalities yield a recursive procedure to compute a finite algebraic representation of L when L is rational. Such a finite representation may not immediately yield algorithms to decide membership in L for a given rational language L, but it reduces the problem of computing topological closures L to the problem of computing algebraic closures hLiκ . Since the signature κ is finite, this representation also provides a recursive enumeration of elements of L. Additionally, assume that the following two properties hold: (1) the word problem for κ-terms over V is decidable, (2) the pseudovariety V is κ-reducible. Then one can decide the separation problem of two rational languages K, L by a V-recognizable language. Indeed, Almeida (1999) has shown that this problem is equivalent to checking whether the closures of K 4 J. Almeida, J. C. Costa, M. Zeitoun and L in ΩX V intersect, which by reducibility is equivalent to checking whether K ∩ L 6= ∅. In turn, this may be tested by running two semi-algorithms in parallel: (1) one that enumerates elements of K and L and checks, using the solution over V of the word problem for κ-terms, whether there is some common element; (2) another one that enumerates all potential V-recognizable separators. Thus, the Pin-Reutenauer procedure is one of the ingredients to understand why a given class has decidable separation problem. Contributions. It has been established recently by Almeida et al. (2014) that The Pin-Reutenauer procedure holds for a number of pseudovarieties. However, the results of this paper rely on independent, technically nontrivial results for the pseudovariety A of aperiodic semigroups: first, it was proved that the Pin-Reutenauer procedure is valid for A using the solution of the word problem for the free aperiodic κ-algebra given by McCammond (2001); Huschenbett and Kufleitner (2014); Almeida et al. (2015). Then, a transfer result was established to show that it is also valid for subpseudovarieties of A. In this paper, we revisit the Pin-Reutenauer procedure, obtaining general results with simpler arguments. We consider unary signatures, made of multiplication and operations of arity 1. Our main result, Theorem 3.1, establishes that the Pin-Reutenauer procedure holds for the pseudovariety S of all finite semigroups, for unary signatures satisfying an additional technical condition, which is met for κ. The fact that rational languages are involved is crucial, since, as observed by Almeida et al. (2014, p. 10), the equality KL = K · L fails for some languages K, L ⊆ X + , where closures are taken with respect to S and the signature κ. This result is obtained by first investigating a property named factoriality. Factoriality of V with respect to, say, the signature κ means that ΩκX V is closed under taking factors in ΩX V. It was shown by Almeida et al. (2014) that if V is factorial, then the Pin-Reutenauer procedure holds with respect to concatenation, that is, KL = K L for arbitrary K, L (not just for rational ones). However, it was also noted that the pseudovariety S cannot be factorial for nontrivial countable signatures, such as κ. In contrast, we show that any nontrivial pseudovariety of semigroups V closed under concatenation is factorial for the signature 1 consisting of multiplication and all unary operations. As an application, we obtain a new proof that the minimum ideal of the free pro-V semigroup on at least two generators contains no 1-word. This property is a weaker version of a result obtained by Almeida and Volkov (2006). Besides the independent interest of such results, the technical tool used to prove them, named factorization history, is also the key to establish that the Pin-Reutenauer is valid for S. We further characterize pseudovarieties in which the PinReutenauer procedure holds in terms of an abstract property named fullness, introduced by Almeida and Steinberg (2000a). The main idea is that the validity of the Pin-Reutenauer procedure for a pseudovariety V is inherited by a subpseudovariety W, as established by Almeida et al. (2014), provided both V and W are full. Conversely, we prove that if the Pin-Reutenauer procedure works for V, then V is full. Since the pseudovariety of all finite semigroups is full, this yields that a pseudovariety enjoys the Pin-Reutenauer property if and only if it is full. Finally, we show that a variation of the Pin-Reutenauer procedure, known to hold in the case of all groups, also holds for pseudovarieties of groups in which every finitely generated subgroup of the free κ-algebra is closed. Factoriality and the Pin-Reutenauer procedure 5 Organization. The paper is organized as follows. In Section 2, we introduce the notion of history of a factorization and we show that any nontrivial pseudovariety closed under concatenation product is 1factorial. In Section 3, we establish that the Pin-Reutenauer property holds for S and unary signatures satisfying an additional condition. In Section 4, we relate the Pin-Reutenauer property with fullness, in the general case and in the case of pseudovarieties of groups. 2 1-factoriality We assume that the reader has some familiarity with profinite semigroups. For details, we refer the reader to the books of Almeida (1995); Rhodes and Steinberg (2009) and to the article of Almeida (2005). Here, we briefly introduce the required notation and key notions. Preliminaries. Throughout the paper, we work with a finite alphabet X. For a pseudovariety V of semigroups, we denote by ΩX V the free pro-V semigroup generated by X. Elements of ΩX V are called X-ary implicit operations over V. See the paper of Almeida (1995) for details. An implicit signature, as defined by Almeida and Steinberg (2000a), is a set of implicit operations of finite arity including the formal binary multiplication. A σ-semigroup is an algebra in the signature σ whose multiplication is associative. Thus, σ-semigroups form a Birkhoff variety. We call an element of the free σ-semigroup generated by X a σ-term. For convenience, we allow the empty σ-term. Every pro-V semigroup has a natural structure of σ-semigroup. We denote by ΩσX V the sub-σ-semigroup of ΩX V generated by X. A σ-word over V is an element of ΩσX V. We denote by [_]V the surjective homomorphism of σ-semigroups that associates to a σ-term t its interpretation [t]V in ΩσX V. When t is a word and V is clear from the context, we write t instead of [t]V . b be the profinite completion of (N, +), i.e., the free profinite monoid Unary implicit signatures. Let N on one generator. We denote by 1 the implicit signature consisting of multiplication together with all b \ N. An implicit signature is called unary if it is contained in 1 and it implicit operations _α with α ∈ N b such contains at least one unary implicit operation. For a unary implicit signature σ, an element α ∈ N α that the α-power operation _ belongs to σ is said to be a σ-exponent. Note that by definition of 1, every σ-exponent is infinite. An important example of a unary implicit signature is the signature κ, for which ω − 1 is the only κ-exponent. The σ-rank rankσ (t) of a σ-term t is the maximal nesting depth of elements of σ, disregarding multiplication, that occur in t. It is defined inductively by rankσ (t1 t2 ) = max(rankσ (t1 ), rankσ (t2 )) and rankσ (π(t1 , . . . , tn )) = 1 + max1,...,n (rankσ (ti )) in case π is an operation from σ which is not multiplication. For a σ-term αm 1 t = t0 s α (2.1) 1 t1 · · · s m tm , where the ti ’s and the sj ’s are σ-terms such that rankσ (ti ) 6 rankσ (sj ) = rankσ (t) − 1 and each αj is i a σ-exponent, we denote by νσ (t) the number m of subterms sα i of t. When σ is clear from the context, we may write rank(t), ν(t) instead of rankσ (t), νσ (t), respectively. Complete unary implicit signatures. A unary implicit signature σ is said to be complete if the set of σexponents is stable under the mappings α 7→ α − 1 and α 7→ α + 1. Note that 1 is complete, while κ is not. The intersection of a nonempty set of complete unary signatures either consists of multiplication solely, or 6 J. Almeida, J. C. Costa, M. Zeitoun is again a complete unary signature. Therefore, the smallest complete unary signature containing a given unary signature σ exists. It is called the completion of σ and it is denoted by σ̄. By definition, we have σ ⊆ σ̄, and a signature σ is complete if and only if σ̄ = σ. Note that for every 1-exponent α and every u ∈ ΩX S, the equalities uα−1 = uα uω−1 and uα+1 = uα u hold. This proves the following useful fact. Remark 1. Let σ be a unary signature containing κ. Then Ωσ̄X V = ΩσX V. 2.1 Factorization sequences b we choose a sequence (ξn (α))n of natural integers converging to α. One can assume that For α ∈ N, (ξn (α))n is constant if α is finite, or strictly increasing otherwise. Let t be a 1-term. We denote by ξn (t) the word obtained by replacing each subterm v α with α infinite by v ξn (α) , recursively. For instance, ξn ((aα b)β ) = (aξn (α) b)ξn (β) . The factorizations ξn (t) = x·y with x ∈ X ∗ and y ∈ X + may be obtained recursively as follows: • if rank(t) = 0, then ξn (t) = t for all n and there are |t| such factorizations of ξn (t); αm 1 • if rank(t) > 0 and t = t0 sα 1 t1 · · · sm tm , where the ti ’s and the sj ’s are σ-terms such that rank(ti ) 6 rank(sj ) = rank(t) − 1 (where the ti ’s may be empty), then the factorizations of ξn (t) are those of the following forms: α α j+1 j αm ′ ′′ 1 ξn (t) = ξn (t0 sα 1 · · · tj−1 sj ) tj · tj ξn (sj+1 tj+1 · · · sm tm ) (2.2) where ξn (tj ) = t′j t′′j , and α α j+1 j−1 αm k ′ ′′ ℓ 1 ξn (t) = ξn (t0 sα 1 · · · sj−1 tj−1 sj )sj · sj ξn (sj tj sj+1 · · · sm tm ) (2.3) where ξn (sj ) = s′j s′′j , k, ℓ ∈ N, and k + ℓ + 1 = ξn (αj ). The condition y ∈ X + , forbidding y to be empty, is used recursively to ensure that each factorization of ξn (t) is either of type (2.2) or (2.3), but not of both types: one can verify that each factorization of ξn (t) is obtained by exactly one of the equations (2.2) and (2.3), where j, t′j , t′′j (in case (2.2)), or j, k, ℓ, s′j , s′′j (in case (2.3)) are uniquely determined. In particular, the factorization α p+1 αp αm 1 ξn (t0 sα 1 · · · tp−1 sp tp ) · ξn (sp+1 tp+1 · · · sm tm ) cannot be of type (2.2), since this would force t′′p to be empty, which is forbidden. This factorization is in fact of type (2.3) with j = p + 1 and k = 0. As an example, for t = aω baω , the expression (2.1) is obtained for m = 2, where t0 and t2 are empty, α2 ω ω 1 while sα 1 = a , t1 = b, and s2 = a . Assuming ξn (ω) = n!, we obtain – the factorization an! · ban! by (2.2), with j = 1, t′1 empty and t′′1 = b; – the factorization an! b · an! by (2.3), j = 2, k = 0, ℓ = n! − 1, s′2 empty and s′′2 = a. The history hn (t, x, y) of a factorization ξn (t) = xy is defined recursively as follows: – if rank(t) = 0, then hn (t, x, y) = (x, y); Factoriality and the Pin-Reutenauer procedure 7 – if rank(t) > 0 and the factorization is of the form (2.2), then hn (t, x, y) is obtained by concatenating the pair (1, j) with hn (tj , t′j , t′′j ); – if rank(t) > 0 and the factorization is of the form (2.3), then hn (t, x, y) is obtained by concatenating the 4-tuple (2, j, k, ℓ) with hn (sj , s′j , s′′j ). The history hn (t, x, y) is thus a word on an alphabet that depends on the integer n, which gives information on how the word ξn (t) is split by the factorization xy. Note that the length of the history hn (t, x, y) is at most rank(t) + 1. The simplified history sh n (t, x, y) of the factorization ξn (t) = xy is obtained from the history hn (t, x, y) by replacing each 4-tuple (2, j, k, ℓ) by (2, j). On the other hand, dropping the first two components of each letter of the history hn (t, x, y), we obtain a word whose letters are pairs of nonnegative integers, which we identify with an integer vector in even dimension, called the exponent vector. A factorization of ξn (t) can be recovered from its history but may not be recoverable from its simplified history without the extra information contained in the exponent vector. Observe that (ξn (t))n converges to [t]S in ΩX S. We will be interested in sequences (xn , yn )n such that xn yn = ξn (t). We call such a sequence a factorization sequence for t. It will be convenient in the proofs to work with factorization sequences having additional properties. Note that the set of simplified histories of factorizations of ξn (t) is finite and depends only on t. Moreover, the dimension of all exponent vectors is bounded by 2 rank(t). Therefore, any factorization sequence for t has a subsequence whose (a) induced sequence of simplified histories is constant, b d \ Nd . (b) induced sequence of exponent vectors belongs to Nd for some constant d and converges in N We call filtered a sequence with these properties. An application of this notion is the following simple statement. Lemma 2.1. Let (xn , yn )n be a factorization sequence for a 1-term. Then both (xn )n and (yn )n have subsequences converging in ΩX S to 1-words. Proof: Let t be the 1-term of the statement. By the above, one may assume that the sequence (xn , yn )n is filtered. We proceed by induction on rank(t). The case rank(t) = 0 is straightforward. Otherwise, αm 1 let t = t0 sα 1 t1 · · · sm tm as in (2.1). There are two cases, according to the first letter of sh n (t, x, y), which can be of the form (1, j) or (2, j). Both cases are similar, so assume that it is of the form (1, j). αj ′ 1 Therefore, the factorization xn yn of ξn (t) is given by (2.2), hence xn = ξn (t0 sα 1 · · · tj−1 sj ) tj,n and αj+1 ′′ αm ′ ′′ yn = tj,n ξn (sj+1 tj+1 · · · sm tm ) where ξn (tj ) = tj,n tj,n . By definition, tj is a 1-term and rank(tj ) < rank(t), whence by induction (t′j,n )n and (t′′j,n )n have subsequences converging to 1-terms, respectively αj ′ 1 t′j and t′′j . Therefore, (xn )n (resp. (yn )n ) has a subsequence converging to the 1-term t0 sα 1 · · · tj−1 sj ·tj αj+1 m tj+1 · · · sα (resp. t′′j · sj+1 m tm ). 8 J. Almeida, J. C. Costa, M. Zeitoun 2.2 Factoriality of some pseudovarieties A pseudovariety of semigroups is said to be closed under concatenation if the corresponding variety of rational languages has that property. A nontrivial pseudovariety V is closed under concatenation if and only if it contains A, the pseudovariety of aperiodic (or group-free) semigroups, and the multiplication of the profinite semigroup ΩX V is an open mapping for every finite alphabet X as proved by Almeida and Costa (2009) based on results of Straubing (1979) (in the monoid case) and Chaubard et al. (2006) (in the semigroup case) characterizing such pseudovarieties in terms of certain algebraic closure properties. A pseudovariety V is said σ-factorial if, for every finite alphabet X, every factor in ΩX V of a σ-word over V is also a σ-word over V. Note that the pseudovariety S is not κ-factorial, since xα is a prefix of xω b for every α ∈ N. Theorem 2.2. Let V be a pseudovariety closed under concatenation. Then V is 1-factorial. Proof: The statement is obvious if V is trivial. Otherwise, let u = vw be a factorization in ΩX V of an arbitrary element of Ω1X V. Let t be a 1-term such that [t]V = u. Since the sequence (ξn (t))n converges to u = vw in ΩX V and the multiplication is open in ΩX V, for all sufficiently large n, each ξn (t) may be factorized as ξn (t) = vn wn in such a way that lim vn = v and lim wn = w. By Lemma 2.1, both (vn )n and (wn )n have subsequences converging, in ΩX S, to 1-words over S. Therefore, in ΩX V, these subsequences converge to 1-words over V, so that v and w are actually 1-words over V. For a pseudovariety H of groups, H denotes the pseudovariety of all finite semigroups whose subgroups lie in H. In particular, when H is the trivial pseudovariety, then H = A. It is a well-known and elementary fact that H is always closed under concatenation. Denote by Bn the Burnside pseudovariety of all finite groups of exponent dividing n. The pseudovariety Bn is thus defined by the pseudoidentity xω+n = xω . In the following result, the special case n = 1, corresponding to the pseudovariety A, was first shown by Almeida et al. (2015) with a much more involved proof. Corollary 2.3. For every positive integer n the pseudovariety Bn is κ-factorial. In particular, the pseudovariety A is κ-factorial. Proof: We claim that the equality ΩκX Bn = Ω1X Bn holds for |X| = 1 and so also for every finite alphabet X. Therefore, the result follows from Theorem 2.2. To prove the claim, we show that Ω{x} Bn = {xk | k ∈ N} ∪ {xω , xω+1 , . . . , xω+(n−1) }. For this, let α be a 1-exponent and let (ak )k be a sequence of integers converging to α. One can assume that ak modulo n is a constant a, hence ak = nbk + a with bk ∈ N for all k. In Ω{x} Bn , we then have xα = xω+α = limk xω+ak = limk xω+nbk +a = xω+a ∈ ΩκX Bn . Another application of Theorem 2.2 is the following result, which is a weaker version of one that was established in (Almeida and Volkov, 2006, Corollary 8.12). Although the original result was formulated for the pseudovariety of all finite semigroups, the proof applies unchanged to pseudovarieties containing all finite local semilattices. Related results, under the same hypothesis as the following corollary, have been obtained by Steinberg (2010). Corollary 2.4. If |X| > 2 and V is a nontrivial pseudovariety closed under concatenation, then there is no 1-word in the minimum ideal of ΩX V. Factoriality and the Pin-Reutenauer procedure 9 Proof: Since V is 1-factorial by Theorem 2.2 and since every element of ΩX V is a factor of every element of the minimum ideal, if there were a 1-word in the minimum ideal then every element of ΩX V would be a 1-word. We claim that this is impossible under the hypothesis that |X| > 2. To prove the claim, observe that by definition, every 1-word of ΩX V which is not a word has at least one infinite power of a finite word as an infix. In particular, it admits as factors powers of finite words of arbitrarily large exponent. Thus, it suffices to exhibit an element of ΩX V that fails this condition. For this purpose let x, y ∈ X be distinct letters and consider the Prouhet-Thue-Morse substitution, defined by ϕ(x) = xy, ϕ(y) = yx, and ϕ(z) = z for all z ∈ X \ {x, y}. This extends to a unique continuous endomorphism of ΩX V, which we also denote ϕ. Since, as proved by Hunter (1983), the monoid of continuous endomorphisms of ΩX V is profinite under the pointwise convergence topology, we may consider the element ϕω (x) = lim ϕn! (x). Now, it is well known that each word ϕn! (x) is cube free (see, for instance, Lothaire (1983)). Since V is nontrivial and closed under concatenation product, it contains A. Therefore, the sets of the form (ΩX V)1 u(ΩX V)1 , where u is a word, are open (Almeida, 1995, Theorem 3.6.1). Hence, ϕω (x) is also free of cubes of finite words and so ϕω (x) is not a 1-word. 3 The Pin-Reutenauer procedure over S for pure signatures Given a pseudovariety V of semigroups, an implicit signature σ and a subset L ⊆ ΩσX V, we denote by L the closure of L in ΩσX V. Both the implicit signature σ and the pseudovariety V are understood in this notation. We are interested in computing a representation of such closures in two cases: (a) when L is of the form pV (K) for some rational subset K of X + , where pV is the natural continuous homomorphism from ΩX S to ΩX V; (b) when L is a rational subset of ΩσX V. Recall that the class of rational subsets of a semigroup M is the smallest family of subsets of M containing the empty set and the singletons {m} for m ∈ M , and closed under union S (Y, Z) 7→ Y + Z, product (Y, Z) 7→ Y Z = {yz | y ∈ Y, z ∈ Z} and iteration Y 7→ Y + = k>1 Y k . Since the homomorphic image of a rational set is rational, any set of the form a is also of the form b. Conversely, there are of course rational sets of ΩσX V that are not obtained as image of a rational set of X + under pV , b is a σ-exponent. such as the singletons {aα } where α ∈ N We say that the Pin-Reutenauer procedure holds for a class C of subsets of ΩσX V if, for every K, L ∈ C, the following conditions are satisfied: KL = K L, (3.1) L+ (3.2) = hLiσ , where hU iσ denotes the σ-subalgebra generated by the subset U of ΩσX V. Again, in this notation, the fact that closures are taken in ΩσX V is understood. We say that V is (weakly) σ-PR if, for every finite alphabet X, the Pin-Reutenauer procedure holds for the class of all subsets of ΩσX V of the form pV (L) with L ⊆ X + a rational language. We say that V is strongly σ-PR if, for every finite alphabet X, the Pin-Reutenauer procedure holds for the class of all rational subsets of ΩσX V. 10 J. Almeida, J. C. Costa, M. Zeitoun In this section, we only deal with the pseudovariety S. In Section 4, we shall transfer our results from S to other pseudovarieties. The main result of this section is the following theorem. It applies only to pure signatures, which we describe below. Theorem 3.1. The pseudovariety S is σ-PR for every pure unary signature σ containing κ. The additional purity property that σ is required to possess is the following. b if dα Definition. A unary signature σ is said to be pure if, for every positive integer d and for all α ∈ N, is a σ̄-exponent, then α is also a σ̄-exponent. b and d ∈ N \ {0} Note that the quotient of dα by d is actually uniquely determined: if α, β ∈ N are such that dα = dβ, then α = β. This follows immediately from the fact that the free profinite b \ N, is torsion-free. Let us show this fact directly: group on one generator, which is isomorphic to N dα = dβ means that all finite semigroups satisfy xdα = xdβ . To show that all finite semigroups also satisfy xα = xβ , it is sufficient to consider 1-generated semigroups. Such semigroups have presentations of the form Sm,p = ha : am = am+p i, for integers m, p > 0. Note that the semigroup homomorphism ϕ : Sm,p → Sdm,dp mapping a to ad is injective. Since Sdm,dp satisfies xdα = xdβ , we have in Sdm,dp the equalities ϕ(aα ) = adα = adβ = ϕ(aβ ), whence Sm,p satisfies xα = xβ . This proves that α = β. In view of the following lemma, Theorem 3.1 can be applied to the signature κ. Lemma 3.2. The unary signature κ is pure. Proof: Every κ̄-exponent is of the form ω + n, where n ∈ Z. Therefore, it suffices to show that, if n is an b is such that ω + n = dα, then d divides n, whence α = ω + n is integer, d is a positive integer, and α ∈ N d again a κ̄-exponent. For that purpose, consider the unique continuous homomorphism of additive monoids b → Z/dZ which maps 1 to 1. We have ϕ(ω) = ϕ(limk k!) = 0 and ϕ(dα) = dϕ(α) = 0, and we ϕ:N deduce from the equality ω + n = dα that ϕ(n) = 0. To establish Theorem 3.1, we first prove a technical key lemma in Section 3.1. We shall then consider separately the cases of concatenation and iteration respectively in Sections 3.2 and 3.3. 3.1 A key lemma We first prove a technical result which will be the key lemma in the sequel. It shows that, under suitable hypotheses, one can balance the factors of a factorization of a given σ̄-term to make them σ̄-terms themselves, without affecting membership in given clopen sets. For L ⊆ X + , we denote by cl(L) the topological closure of L in ΩX S. Given 1-terms t1 , . . . , tm and languages L1 , . . . , Lm , we say that (t1 , . . . , tm ) is a (L1 , . . . , Lm )splitting of a 1-term t if the following conditions hold: (i) t = t1 · · · tm ; (ii) [ti ]S ∈ cl(Li ) for every i = 1, . . . , m. Given a σ-term t, let λσ (t) = (rankσ (t), νσ (t)). We may write λ instead of λσ when σ is clear from the context. Lemma 3.3. Let σ be a unary signature containing κ, let t be a σ̄-term, and let L1 , . . . , Lm be rational languages. If t admits an (L1 , . . . , Lm )-splitting (t1 , . . . , tm ), then there exists a σ̄-term z admitting an (L1 , . . . , Lm )-splitting (z1 , . . . , zm ) such that: Factoriality and the Pin-Reutenauer procedure 11 (1) [z]S = [t]S , (2) zi is a σ̄-term for i = 1, . . . , m, (3) λσ̄ (zi ) = λ1 (ti ) for i = 1, . . . , m. Proof: We only prove the statement for m = 2, since it is representative of the general case, and it allows a simplified notation. Let (t1 , t2 ) be an (L1 , L2 )-splitting of t. Set xn = ξn (t1 ) and yn = ξn (t2 ). By ii, lim xn = [t1 ]S belongs to cl(L1 ), which is open by rationality of L1 (Almeida, 1995, Thm. 3.6.1). Therefore, the word xn belongs to L1 for all sufficiently large n. Similarly, the word yn belongs to L2 for all sufficiently large n. Let ϕ : X + → S be a homomorphism into a finite semigroup recognizing both languages L1 and L2 . In view of i, (xn , yn )n is a factorization sequence for t. Let (xnr , ynr )r be a filtered subsequence of (xn , yn )n , and let (k1,r , ℓ1,r , . . . , kd,r , ℓd,r )r be the sequence of exponent vectors for the factorization ξnr (t) = xnr ynr . When (ki,r )r (resp. (ℓi,r )r ) is constant, let ki (resp. ℓi ) be this constant value. Otherwise, by taking a subsequence, we may assume that for each s ∈ S, each of the sequences (ski,r )r and (sℓi,r )r is constant, say with value respectively ski and sℓi (i = 1, . . . , d), the integers ki and ℓi being independent of the element s ∈ S. In view of Case (2.3) of the definition of factorization sequence and since t is a σ̄-term, each sequence (ki,r + ℓi,r + 1)r converges to some σ̄-exponent γi . In particular, γi is infinite. Define (αi , βi ) by   if (ki,r )r is constant and (ℓi,r )r unbounded, (ki , γi − ki − 1) (αi , βi ) = (γi − ℓi − 1, ℓi ) if (ki,r )r is unbounded and (ℓi,r )r constant,   (γi − ℓi − 1, ω + ℓi ) if both (ki,r )r and (ℓi,r )r are unbounded. Note that in all cases, we have αi + βi + 1 = γi . (3.3) Let z1 (resp. z2 ) be the 1-term obtained from xnr (resp. from ynr ) by replacing for every i the exponent ki,r by αi and the exponent ℓi,r by βi . Set z = z1 z2 , and let us verify that z1 , z2 and z fulfill the desired properties. We have to show properties 1–3, and that (z1 , z2 ) is an (L1 , L2 )-splitting of z. First note that, by (3.3), we have [y αi +βi +1 ]S = [y γi ]S for all 1-term y. Since (ki,r + ℓi,r + 1)r converges to γi , using (2.3) we deduce that [z]S = [t]S , which proves 1. Next, by definition αi and βi either belong to N, or are of one of the forms γi − n or ω + n where n ∈ N. Since γi is a σ̄-exponent and since σ contains κ, both αi and βi are σ̄-exponents, whence both z1 , z2 are σ̄-terms, which proves 2. Finally, we have λσ̄ (zi ) = λ1 (ti ) by construction, which is 3. It remains to verify that (z1 , z2 ) is an (L1 , L2 )-splitting of z. Condition i is satisfied by definition of z. Let us verify that z1 ∈ cl(L1 ) (showing that z2 ∈ cl(L2 ) is similar). Let ϕ̂ : ΩX S → S be the continuous extension of ϕ to ΩX S. By ii applied to the (L1 , L2 )-splitting (t1 , t2 ) of t, we have t1 ∈ cl(L1 ) = ϕ̂−1 (ϕ(L1 )). Since t1 is the limit of (xnr )r , it suffices to show that ϕ̂(z1 ) = ϕ(xnr ). This follows from the claim that for r large enough, sξnr (αi ) = ski = skir , which is clear if (kir )r is constant, while it is obtained by reasoning in the group {sω+p | p > 0} if (kir )r is unbounded. 12 J. Almeida, J. C. Costa, M. Zeitoun 3.2 The case of concatenation We are now ready to treat the case of concatenation, that is, to establish Property (3.1). Theorem 3.4. Equality (3.1) holds over the pseudovariety S for every unary signature σ containing κ and for all rational languages K, L ⊆ X + . Proof: The inclusion from right to left in (3.1) amounts to continuity of multiplication in ΩσX S and thus it is always valid. For the direct inclusion, let v be an arbitrary element of KL. We need to show that v belongs to K · L. Choose a σ-term t such that [t]S = v. Since v ∈ cl(KL) and since the closure cl(KL) of the rational language KL is clopen (Almeida, 1995, Thm. 3.6.1), the word ξn (t) belongs to KL for all sufficiently large n. For such n, let t1,n ∈ K and t2,n ∈ L be words such that ξn (t) = t1,n t2,n , and let (t1,nr , t2,nr )r be a filtered subsequence of (t1,n , t2,n )n . For i = 1, 2, let ti be the term obtained by substituting each b d , so that lim ti,n = [ti ]S , and exponent vector with the limit of the sequence of exponent vectors, in N r (t1 , t2 ) is a (K, L)-splitting of t. By Lemma 3.3, it follows that there exists a σ̄-term z such that v = [z]S and z admits a (K, L)-splitting (z1 , z2 ) into σ̄-terms. Since the unary signature σ contains κ, we have Ωσ̄X S = ΩσX S by Remark 1. Hence, [z1 ]S ∈ cl(K) ∩ Ωσ̄X S = cl(K) ∩ ΩσX S = K, and similarly [z2 ]S ∈ L. Finally, v = [z]S = [z1 z2 ]S = [z1 ]S · [z2 ]S ∈ K · L. 3.3 The case of iteration We now show that (3.2) holds over the pseudovariety S, for every pure implicit signature σ containing κ and every rational language L ⊆ X + . It is easy to see that the inclusion from right to left in (3.2) always holds, see Almeida et al. (2014). The rest of this subsection is devoted to the proof of the other inclusion. Theorem 3.5. Equality (3.2) holds over the pseudovariety S for every pure unary signature σ containing κ and for every rational language L ⊆ X + . The proof of Theorem 3.5 follows the lines of its analog for the pseudovariety A which is presented in (Almeida et al., 2014, Section 6), even though the argument requires significant changes in several points. Consider an element v of L+ . We must show that there is a σ-term which coincides with v when evaluated on (finitely many) suitable elements of L. It turns out to be convenient to assume more generally that v ∈ clσ̄ (L+ ), so that there exists a σ̄-term t such that [t]S = v. Therefore, we want to show that, for every σ̄-term t, for every rational language L, [t]S ∈ L+ implies [t]S ∈ hLiσ . (Pt ) Let wk = ξk (t). The sequence of words (wk )k converges to v = [t]S in ΩX S. As v belongs to the open set L+ , the word wk belongs to L+ for all sufficiently large k, and we may therefore assume that there are factorizations wk = w1,k · · · wrk ,k , (3.4) with each wi,j ∈ L. If there is a bounded subsequence of the sequence (rk )k , which counts the number of factors from L, then Theorem 3.4 yields that v belongs to the subsemigroup of ΩσX S generated by L and we are done. We may therefore assume that lim rk = ∞, which implies that rank(t) > 1. We first reduce the problem to the case ν(t) = 1. Factoriality and the Pin-Reutenauer procedure 13 Proposition 3.6. Assume that (Pt ) holds for every σ̄-term t with ν(t) = 1. Then, it holds for every σ̄-term t. Proof: Let t be a σ̄-term such that ν(t) > 1. Let v = [t]S , and assume that v ∈ L+ . To show that v ∈ hLiσ , we proceed by induction on λ(t), for the lexicographical order on N × N. Consider the factorization of t in σ̄-terms as in (2.1) and the factorization (3.4) of wk = ξk (t). We distinguish three cases. Case 1 Suppose first that there are infinitely many indices k for which there exists ik ∈ {1, . . . , rk } such that the first letter of the simplified history sh k (t, w1,k · · · wik ,k , wik +1,k · · · wrk ,k ) is of one of the forms (1, j) with 0 6= j 6= m, or (2, j) with 1 6= j 6= m. That is, the corresponding factorizations (xk , yk ), where xk = w1,k · · · wik ,k and yk = wik +1,k · · · wrk ,k , do not split ξk (t) in its αm 1 prefix ξk (t0 sα 1 ), nor in its suffix ξk (sm tm ). By Lemma 2.1, both (xk )k and (yk )k admit subsequences converging to 1-words, say v1 = [u1 ]S and v2 = [u2 ]S respectively, with u1 u2 = t. Since both xk and yk belong to L+ , we deduce that v1 , v2 ∈ cl(L+ ). Therefore, one can apply Lemma 3.3: there exist σ̄-terms z1 and z2 such that v = [z1 z2 ]S , and for i = 1, 2, λ(zi ) = λ(ui ) and [zi ]S ∈ cl(L+ ). By Remark 1, we obtain [zi ]S ∈ L+ . By the assumption on the first letter of the simplified histories, we have rank(ui ) = rank(t) and ν(ui ) < ν(t), hence λ(zi ) = λ(ui ) < λ(t) (i = 1, 2). Arguing inductively, we deduce that [z1 ]S and [z2 ]S belong to hLiσ , whence so does v = [z1 z2 ]S = [z1 ]S · [z2 ]S . This concludes the proof for Case 1. Case 2 Assume now that for all sufficiently large k, there is an index ik such that the first letters of the simplified histories sh k (t, w1,k · · · wik −1,k , wik ,k · · · wrk ,k ) sh k (t, w1,k · · · wik ,k , wik +1,k · · · wrk ,k ) are of the forms (1,0) or (2,1) for the first one, and (1, m) or (2, m) for the second one. In other words, αm 1 the factor wik ,k of ξk (t) jumps from the prefix ξk (t0 sα 1 ) to the suffix ξk (sm tm ). As in the first case, we may apply twice Lemma 2.1 to obtain from the following sequence of factorizations wk = w1,k · · · wik −1,k · wik ,k · wik +1,k · · · wrk ,k (k > 1), an (L+ , L, L+ )-splitting of t into 1-terms, say t = u1 u2 u3 . Applying Lemma 3.3, we deduce that there exists an (L+ , L, L+ )-splitting (z1 , z2 , z3 ) into σ̄-terms of a σ̄-term z such that [z]S = v and λ(zi ) = λ(ui ), i = 1, 2, 3. By Remark 1, we obtain [z1 ]S , [z3 ]S ∈ L+ and [z2 ]S ∈ L. By the hypothesis of Case 2, we know that for i = 1, 3, we have either rank(ui ) = rank(t) and ν(ui ) = 1, or rank(ui ) < rank(t). Hence, λ(zi ) < λ(t). Thus, we may apply the induction hypothesis to deduce that [z1 ]S and [z3 ]S belong to hLiσ . Hence, we finally have v = [z1 ]S · [z2 ]S · [z3 ]S ∈ hLiσ · L · hLiσ ⊆ hLiσ . Case 3 Assume finally that for all sufficiently large k and for all indices ik , the first letter of the simplified history sh k (t, w1,k · · · wik −1,k , wik ,k · · · wrk ,k ) is 1 (a) either of the form (1,0) or (2,1), which means that wrk ,k spans from the prefix ξk (t0 sα 1 ) to the end of ξk (t), 14 J. Almeida, J. C. Costa, M. Zeitoun (b) or of the form (1, n) or (2, n), which means that w1,k jumps from the beginning of ξk (t) to the suffix m ξk (sα m tm ). This case is treated as Case 2, setting v3 (resp. v1 ) to be the empty term, in case a or b occurs. To conclude the proof of Theorem 3.5, it remains to treat the case where ν(t) = 1. For dealing with this case, we use directed weighted multigraphs. A (multi)graph is a tuple (Q, (Ep,q )(p,q)∈Q×Q ) where Q is a set of vertices, and Ep,q is a set of edges having source p and target q, for each pair of vertices (p, q) ∈ Q × Q. In the sequel, the graphs shall always be finite. A weighted multigraph is given by a multigraph together with a weight function, which associates to each edge e a nonnegative integer w(e). If e is an edge with source p and target q, we represent this edge by w(e) p −−−→ q. For a path γ of a graph Γ, let c(γ) denote the edge-induced subgraph of Γ whose edges are those traversed by γ. We call c(γ) the support of γ. Furthermore, if ζ is an edge of Γ, then |γ|ζ denotes the number of times γ goes through the edge ζ. For a subgraph Γ′ of Γ, we denote by |γ|Γ′ the minimum of |γ|ζ with ζ an arbitrary edge of Γ′ . Lemma 3.7. Let (πk )k be a sequence of paths of a finite multigraph Γ. If there is some edge ζ for which the sequence (|πk |ζ )k is unbounded, then there is some cycle γ such that (|πk |c(γ) )k is unbounded. Proof: Consider on each path πk the subpaths which start with the edge ζ and whose length is the total number of vertices of the graph Γ. Since there are only finitely many such subpaths, at least one of them, say δ, must be used an unbounded number of times. Because δ must go at least twice through the same vertex, δ contains some cycle which satisfies the required condition. We conclude the proof of Theorem 3.5 by establishing the following result, which, combined with Proposition 3.6, implies that Property (Pt ) holds for every σ̄-term t. Proposition 3.8. Property (Pt ) holds for every σ̄-term t with ν(t) = 1. Proof: Let t be a σ̄-term with ν(t) = 1. Let w = [t]S . Assuming that w ∈ L+ , we want to show that 1 w ∈ hLiσ . We have t = t0 sα 1 t1 , with rank(t0 ), rank(t1 ) 6 rank(s1 ) = rank(t) − 1. Let wk = ξk (t). Since for k large enough, we have wk ∈ L+ , one may consider a factorization (3.4) of wk . Using a similar argument as in the proof of Case 2 of Proposition 3.6, we may assume, replacing (wk )k by a subsequence if necessary, that ξk (t0 ) is a prefix of w1,k and ξk (t1 ) is a suffix of wrk ,k . Since L is a rational language of X + , there is a homomorphism ϕ : X ∗ → M onto a finite monoid M such that ϕ−1 (1) = {1} and ϕ−1 (ϕ(L)) = L. Let m and p be positive integers such that am+p = am for every a ∈ M . (3.5) We construct for each k a finite directed multigraph Γk . The set of vertices is  Vk = (a, b) ∈ M × M : ξk (s1 ) ∈ ϕ−1 (a)L∗ ϕ−1 (b) ∪ {ˆ, $}, where the two symbols ˆ and $ do not belong to M . The following are the edges of the graph Γk , where e denotes a natural number that does not exceed ξk (α1 ): Factoriality and the Pin-Reutenauer procedure 15 e+1 • there is an edge (a1 , b1 ) −−→ (a2 , b2 ) if L ∩ ϕ−1 (b1 )ξk (se1 )ϕ−1 (a2 ) 6= ∅; e • there is an edge ˆ − → (a, b) if L ∩ ξk (t0 se1 )ϕ−1 (a) 6= ∅; e+1 • there is an edge (a, b) −−→ $ if L ∩ ϕ−1 (b)ξk (se1 t1 ) 6= ∅. e → q2 with e > m if and only Observe that, in view of (3.5), there is an edge in the graph of the form q1 − e+p if there is also an edge q1 −−→ q2 and e + p 6 ξk (α1 ). The purpose of this graph is to capture factorizations of the product ξk (t0 )ξk (s1 )ξk (α1 ) ξk (t1 ) belonging to L+ . More precisely, for each k, the factorizations wk = ξk (t0 )ξk (s1 )ξk (α1 ) ξk (t1 ) (3.6) = w1,k · · · wrk ,k determine a path πk from vertex ˆ to vertex $: the factors wi,k which are not completely contained in some factor ξk (s1 ) determine the edges. Each intermediate vertex in the path corresponds to a factor ξk (s1 ) together with a factorization into a word, followed by a possibly empty product of elements from L, followed by a word, where only the values under ϕ of the prefix and suffix words are relevant. Conversely, every path γ from ˆ to $ determines a factorization of a word of the form ξk (t0 sℓ1 t1 ) into a product of elements of L. Indeed, we may choose for each intermediate vertex q words uq,k , vq,k ∈ X ∗ and zq,k ∈ L∗ such that ξk (s1 ) = uq,k zq,k vq,k . (3.7) e+1 Then, for each edge ζ : qζ −−→ qζ′ , the word yζ,k = vqζ ,k ξk (se1 ) uqζ′ ,k (3.8) e e+1 belongs to L. If the path γ is the sequence of edges (ζ0 , ζ1 , . . . , ζr ), with ζ0 : ˆ − → qζ′ 0 and ζr : qζr −−→ $, then we also have words yζ0 ,k = ξk (t0 se1 ) uqζ′ 0 ,k yζr ,k = vqζr ,k ξk (se1 t1 ) in L. Then the following is the factorization associated with the path: ξk (t0 sℓ1 t1 ) = yζ0 ,k zqζ1 ,k yζ1 ,k · · · zqζr ,k yζr ,k . (3.9) The total number ℓ of factors ξk (s1 ) that are covered by following the path γ is the sum of the weights of the edges, taking into account multiplicities; we call it the total weight of the path. Combining with Euler’s Theorem (Almeida, 1995, Theorem 5.7.1), it is now easy to deduce that each of the following transformations does not change the total weight of a path and therefore the value of the left side of the equality (3.9): 1. to traverse the edges in a path in a different order, without changing the number of times we go through each edge; 16 J. Almeida, J. C. Costa, M. Zeitoun 2. suppose that in the support of the path there are two cycles δ1 and δ2 , with respective total weights n1 and n2 , and that the positive integers r1 and r2 are such that n1 r1 = n2 r2 ; suppose further that the path goes through each edge in δi more than ri times; to replace the path by another one which goes through each edge in δ1 less r1 times than before and through each edge in δ2 more r2 than before; e e2 +p 1 q2 and q3 −−−→ q4 in the path with both e1 , e2 > m, to replace in the 3. if there are two edges q1 −→ e1 +p e1 q2 by that of the edge q1 −−−→ q2 , provided we compensate path one occurrence of the edge q1 −→ e2 +p e2 q4 ; by replacing one occurrence of the edge q3 −−−→ q4 by q3 −→ 4. suppose that in the support of the path there is a cycle δ with total weight n and that the path goes e → q2 with through each edge in δ at least p + 1 times; suppose further that there is an edge q1 − weight at least m; replace the path by another one which goes through each edge in δ less p times e+np e → q2 by q1 −−−→ q2 . than before and change the edge q1 − Using transformations of type 3, we may assume that the path πk goes through at most one edge whose weight exceeds m + p − 1. Therefore, the remaining edges in πk are taken from a fixed finite set. Thus, by taking a subsequence, we may further assume that all paths πk use exactly the same edges of weight at most m + p − 1 and, either none of the πk use any other edges or, otherwise they all use only one additional edge ζk connecting two fixed vertices. Hence all the graphs c(πk ) are the same finite graph, up to an isomorphism that only changes one edge. On the other hand, using transformations of type 4, we may assume that if all the paths πk go through some edge of weight at least m, then the graph c(πk ) contains no cycle in which every edge is used at least p + 1 times. We now split the argument into two cases. Suppose first that every c(πk ) contains an edge of weight at least m. In this case, one can apply Lemma 3.7 to deduce that there is a bound on the length of the paths πk and, therefore, we may assume that they all have the same length. Moreover, we may further assume that, except for the edge ζi,k , at the same position i, all paths πk = (ζ0 , . . . , ζi−1 , ζi,k , ζi+1 , . . . , ζr ) are identical. Consider the factorizations wk = yζ0 ,k zqζ1 ,k · · · yζi−1 ,k zqζi ,k yζi,k ,k zqζi+1 ,k yζi+1 ,k · · · zqζr ,k yζr ,k of the form (3.9) associated with each of the paths πk . Let ej be the weight of each edge ζj (j 6= i) and let ei,k be the weight of the edge ζi,k . Computing the total weight, we obtain the formula ξk (α1 ) = ei,k + X ej . (3.10) j6=i P Letting k → ∞ in (3.10), we deduce that lim ei,k = α1 − j6=i ej and, therefore, ei = lim ei,k is a σ̄-exponent, since so is α1 and since by definition, σ̄ is complete. According to (3.8), the factors yζj ,k with j ∈ / {0, i, r} are given by e yζj ,k = vqζj ,k ξk (s1j )uqζj+1 ,k . Factoriality and the Pin-Reutenauer procedure 17 By compactness of ΩX S, we may assume that each of the sequences (uq,k )k , (vq,k )k , and (zq,k )k converges to the respective limit uq , vq , and zq (q = qζ1 , . . . , qζr ). Let y0 = [t0 se10 ]S uqζ1 yr = vqζr [se1r t1 ]S e yj = vqζj [s1j ]S uqζj+1 (j = 1, . . . , r − 1). Then we obtain a factorization w = y0 zqζ1 · · · yi−1 zqζi yi zqζi+1 yi+1 · · · zqζr yr in which each yj belongs to cl(L), while the zq belong to cl(L+ ) ∪ {1}. By Lemma 3.3, we may assume that each uq , vq , and zq is a σ̄-word. By definition (3.7) of the words zq,k , the latter has rank less than rank(w). It follows that so is each yj . Hence the yj ’s belong to L and the zq belong to L+ ∪ {1}. By the induction hypothesis, each zq belongs to hLiσ . Hence, w belongs to hLiσ , which completes the proof of the first case. It remains to consider the case where all edges have weight less than m. By previous reductions, we know that the graph c(πk ) is constant. Because the total weight tends to ∞, so does the length of the path πk . By Lemma 3.7, there is some simple cycle γ for which the sequence (|πk |c(γ) )k is unbounded. Applying transformations of type 2, we may assume that there is only one such cycle. By Lemma 3.7, we deduce that the paths δ with c(δ) ⊆ c(πk ) which go at most once through each edge in c(γ) have bounded length. Hence, using transformations of type 1, we may assume that there is a path δ from ˆ to $ such that the path πk is obtained by inserting the power cycle γ ℓk at a fixed vertex in the path δ, say πk is the concatenated path δ0 γ ℓk δ1 . Let the total weights of the paths δi and γ be respectively ni and n. Then the total weight of the path πk is given by the formula ξk (α1 ) = n0 + n1 + nℓk . (3.11) b From (3.11), By taking a subsequence, we may assume that the sequence (ℓk )k converges to some β ∈ N. it follows that nβ = α1 − n0 − n1 . Since the signature σ is assumed to be pure, we deduce that β is a σ̄-exponent. By the argument in the preceding case, using the induction hypothesis, each of the paths δi and γ determines a corresponding element of hLiσ , say respectively yi and y, such that w = y0 y β y1 . Since β is a σ̄-exponent, we may now end the proof by observing that it follows that w ∈ hLiσ . 4 Pin-Reutenauer versus fullness In this section, we apply the main results of Section 3 to show that the Pin-Reutenauer procedure is valid for many pseudovarieties. For this purpose, we establish relationships between that property and fullness, a notion introduced by Almeida and Steinberg (2000a). See also Almeida and Steinberg (2000b); Almeida et al. (2014) for related properties and other applications of fullness. Recall that pV denotes the natural continuous homomorphism from ΩX S to ΩX V. The pseudovariety V is said to be full with respect to a class C of subsets of ΩσX S if the following equality holds for every L ∈ C: (4.1) pV (L) = pV (L). 18 J. Almeida, J. C. Costa, M. Zeitoun The closure of the left hand side of (4.1) is taken in ΩσX S, while the closure of the right hand side is taken in ΩσX V. We say that V is (weakly) σ-full if, for every finite alphabet X, V is full with respect to the set of all rational languages of X + . We also say that V is strongly σ-full if, for every finite alphabet X, V is full with respect to the class of all rational subsets of ΩσX S. 4.1 The general case We first consider the case of arbitrary pseudovarieties and signatures. Proposition 4.1. Let σ be an arbitrary implicit signature, V be a pseudovariety, and C be the closure under the rational operations of some set of finite subsets of ΩσX S. If the Pin-Reutenauer procedure holds for C, then V is full with respect to C. Proof: Let L be an arbitrary member of C. We need to show that the equality (4.1) holds. The inclusion from left to right is an immediate consequence of the continuity of the mapping pV . For the reverse inclusion, we proceed by induction on the construction of a rational expression of L in terms of finite sets in C. If L is a finite set, then pV (L) = pV (L) and pV (L) = pV (L), and so the equality (4.1) is trivially verified. Suppose next that L1 and L2 are elements of C for which the equality (4.1) holds. Since topological closure and the application of mappings commutes with union, the equality (4.1) also holds for L = L1 ∪ L2 . On the other hand, we have the following equalities and inclusions: pV (L1 L2 ) = pV (L1 ) · pV (L2 ) since the Pin-Reutenauer procedure holds for C = pV (L1 ) · pV (L2 ) by the induction hypothesis = pV (L1 · L2 ) since pV is a homomorphism ⊆ pV (L1 L2 ) by continuity of multiplication. Taking into account that pV is a homomorphism of σ-semigroups and that the inclusion from right to left in (3.2) always holds (see the paragraph preceding Theorem 3.5, p. 12), one can similarly show that (4.1) holds for L = L+ 1. The following is an immediate application of Proposition 4.1. Corollary 4.2. Let σ be an arbitrary implicit signature and V a pseudovariety. If V is (strongly) σ-PR then V is (respectively strongly) σ-full. The weak version of the following result is proved in (Almeida et al., 2014, Proposition 3.2). The same proof applies to the strong case. Proposition 4.3. Let V and W be two (strongly) σ-full pseudovarieties such that V ⊆ W. If W is (respectively strongly) σ-PR, then so is V. Note that S is trivially σ-full for every implicit signature σ. Combining Theorem 3.1 with Corollary 4.2 and Proposition 4.3, we obtain the following result. Corollary 4.4. Let σ be a pure unary signature containing κ. Then a pseudovariety V is σ-PR if and only if it is σ-full. We do not know whether the hypothesis on the signature can be dropped in Corollary 4.4. Factoriality and the Pin-Reutenauer procedure 19 4.2 The group case We now consider the case of pseudovarieties of groups, for the signature κ. Recall that a group is LERF (locally extendible residually finite) if every finitely generated subgroup is closed in the profinite topology. We say that a pseudovariety of groups H is LERF if, for every finite alphabet X, the relatively free group ΩκX H is LERF. By a classical result of Hall (1950), the pseudovariety G of all finite groups is LERF. By (Margolis et al., 2001, Proposition 2.9), G is in fact the only nontrivial extension-closed pseudovariety of groups that is LERF. On the other hand, it is easy to check that, for the pseudovariety Ab of all finite Abelian groups, every subgroup of ΩκX Ab is closed (Delgado, 1998, Proposition 3.8). A slightly different notion of strongly κ-PR pseudovariety was considered by Pin and Reutenauer (1991) and Delgado (2001) (where it is simply called PR). Instead of property (3.2), the following property is considered: L+ = hLiσ . (4.2) Compared to (3.2), the topological closure in the right hand side of (4.2) has been dropped. As observed in (Almeida et al., 2014, end of Section 4), Equation (4.2) fails for the pseudovariety S and the implicit signature κ, for L = a+ b+ , since aω b ∈ L+ \ hLiσ . However, the two notions coincide for the pseudovariety G (Pin and Reutenauer, 1991, Theorem 2.4). With same argument, we generalize this result to LERF pseudovarieties. Lemma 4.5. Let V be a pseudovariety. If V satisfies (4.2) for a subset L of ΩσX V, then (3.2) also holds. If V is a LERF pseudovariety of groups and σ = κ, then (4.2) holds for rational subsets L of ΩκX V. Proof: Since for L ⊆ ΩσX V, the inclusions hLiσ ⊆ hLiσ ⊆ L+ always hold, it is clear that (4.2) implies (3.2). For the second part, we argue as in (Almeida et al., 2014, p. 4). Let L be a rational subset of ΩκX V. Then, hLiκ = (L∪L−1 )+ is rational in ΩκX V. By a well-known theorem of Anissimow and Seifert (1975), the subgroup hLiκ is therefore finitely generated. Hence, hLiκ is closed in ΩκX V, by the assumption that V is a LERF pseudovariety. Finally, we have L+ ⊆ hLiκ , hence L+ ⊆ hLiκ , which, combined with the reverse inclusion, which always holds, yields the result. It can be shown easily that a κ-PR pseudovariety of groups is LERF (see Delgado (1997)). Thus, a pseudovariety of groups is strongly κ-PR if and only if it is PR in the sense of Delgado (2001). In (Delgado, 2001, Corollary 3.9), it is also established that every “weakly PR” pseudovariety of groups is κ-full, a result which is considerably improved in the present paper, in the form of Corollaries 4.2 and 4.4. It was conjectured by Pin and Reutenauer (1991) that G is strongly κ-PR. Their conjecture was reduced to another conjecture, namely that the product of finitely many finitely generated subgroups of a free group is closed. The latter conjecture was established by Ribes and Zalesskiı̆ (1993). Combining with Proposition 4.3 and Corollary 4.2, we obtain the following result. Theorem 4.6. A pseudovariety of groups is strongly κ-PR if and only if it is strongly κ-full. The diagram in Fig. 1 summarizes the results of this subsection. We say that a pseudovariety of groups H is strong RZ if in every finitely generated free H-group, any finite product of finitely generated subgroups is closed. We say that H is weak RZ if, in every finitely generated free H-group, any finite product of finitely generated closed subgroups is also closed. 20 J. Almeida, J. C. Costa, M. Zeitoun Strong κ-full Thm. 4.6 Strong κ-PR (Delgado, 1997, Thm. 4.2.1) Strong RZ LERF Weak κ-full Cor. 4.4 Weak κ-PR Weak RZ Fig. 1: Summary of results: pseudovarieties of groups References J. Almeida. Implicit operations on finite J-trivial semigroups and a conjecture of I. Simon. J. Pure Appl. Algebra, 69(3):205–218, 1991. J. Almeida. Finite Semigroups and Universal Algebra. World Scientific, Singapore, 1995. J. Almeida. Some algorithmic problems for pseudovarieties. Publ. Math. Debrecen, 54 Suppl.:531–552, 1999. J. Almeida. Finite semigroups: an introduction to a unified theory of pseudovarieties. In G. M. S. Gomes, J.-É. Pin, and P. V. Silva, editors, Semigroups, Algorithms, Automata and Languages, pages 3–64, Singapore, 2002. World Scientific. J. Almeida. Profinite semigroups and applications. In V. B. Kudryavtsev and I. G. Rosenberg, editors, Structural Theory of Automata, Semigroups, and Universal Algebra, volume 207 of NATO Science Series II: Mathematics, Physics Chemistry, New York, 2005. Springer. Proceedings of the NATO Advanced Study Institute on Structural Theory of Automata, Semigroups and Universal Algebra, Montréal, Québec, Canada, 7-18 July 2003. J. Almeida and A. Costa. Infinite-vertex free profinite semigroupoids and symbolic dynamics. J. Pure Appl. Algebra, 213:605–631, 2009. J. Almeida and B. Steinberg. On the decidability of iterated semidirect products and applications to complexity. Proc. London Math. Soc., 80:50–74, 2000a. J. Almeida and B. Steinberg. Syntactic and global semigroup theory, a synthesis approach. In J. C. Birget, S. W. Margolis, J. Meakin, and M. V. Sapir, editors, Algorithmic Problems in Groups and Semigroups, pages 1–23. Birkhäuser, 2000b. J. Almeida and M. V. Volkov. Subword complexity of profinite words and subgroups of free profinite semigroups. Int. J. Algebra Comput., 16(2):221–258, 2006. J. Almeida and M. Zeitoun. The equational theory of ω-terms for finite R-trivial semigroups. In M. Branco and G. Gomes, editors, Semigroups and Languages, pages 1–23. World Scientific, 2004. Factoriality and the Pin-Reutenauer procedure 21 J. Almeida and M. Zeitoun. An automata-theoretic approach to the word problem for ω-terms over r. Theoret. Comput. Sci., 370(1–3):131–169, 2007. J. Almeida, J. C. Costa, and M. Zeitoun. Tameness of pseudovariety joins involving R. Monatsh. Math., 146:89–111, 2005. J. Almeida, J. C. Costa, and M. Zeitoun. Closures of regular languages for profinite topologies. Semigroup Forum, 89:20–40, 2014. J. Almeida, J. C. Costa, and M. Zeitoun. McCammond normal forms for free aperiodic semigroups revisited. LMS J. Comput. Math., 18:130–147, 2015. A. W. Anissimow and F. D. Seifert. Zur algebraischen Charakteristik der durch kontext-freie Sprachen definierten Gruppen. Elektron. Informationsverarbeit. Kybernetik, 11(10–12):695–702, 1975. C. J. Ash. Inevitable graphs: a proof of the type II conjecture and some related decision procedures. Int. J. Algebra Comput., 1:127–146, 1991. K. Auinger. A new proof of the Rhodes type II conjecture. Int. J. Algebra Comput., 14:551–568, 2004. K. Auinger. On the decidability of membership in the global of a monoid pseudovariety. Int. J. Algebra Comput., 20(2):181–188, 2010. K. Auinger and B. Steinberg. On the extension problem for partial permutations. Proc. Amer. Math. Soc., 131:2693–2703, 2003. K. Auinger and B. Steinberg. A constructive version of the Ribes-Zalesskiı̆ product theorem. Math. Z., 250:287–297, 2005. L. Chaubard, J.-É. Pin, and H. Straubing. Actions, wreath products of C-varieties and concatenation product. Theor. Comp. Sci., 356:73–89, 2006. J. C. Costa. Free profinite locally idempotent and locally commutative semigroups. J. Pure Appl. Algebra, 163(1):19–47, 2001. J. C. Costa and M. L. Teixeira. Tameness of the pseudovariety LSl. Int. J. Algebra Comput., 14:627–654, 2004. M. Delgado. The type II theorem and hyperdecidability of pseudovarieties of groups. PhD thesis, Univ. Porto, 1997. In Portuguese. M. Delgado. Abelian poinlikes of a monoid. Semigroup Forum, 56:339–361, 1998. M. Delgado. On the hyperdecidability of pseudovarieties of groups. Int. J. Algebra Comput., 11:753–772, 2001. M. Hall. A topology for free groups and related groups. Ann. of Math., 52:127–139, 1950. K. Henckell. Pointlike sets: the finest aperiodic cover of a finite semigroup. J. Pure Appl. Algebra, 55: 85–126, 1988. 22 J. Almeida, J. C. Costa, M. Zeitoun K. Henckell, S. W. Margolis, J.-É. Pin, and J. Rhodes. Ash’s type II theorem, profinite topology and Malc’ev products. I. Int. J. Algebra Comput., 1:411–436, 1991. B. Herwig and D. Lascar. Extending partial automorphisms and the profinite topology on free groups. Trans. Amer. Math. Soc., 352:1985–2021, 2000. R. P. Hunter. Some remarks on subgroups defined by the Bohr compactification. Semigroup Forum, 26: 125–137, 1983. M. Huschenbett and M. Kufleitner. Ehrenfeucht-Fraissé Games on Omega-Terms. In E. W. Mayr and N. Portier, editors, STACS’14), volume 25 of Leibniz International Proceedings in Informatics (LIPIcs), pages 374–385. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 2014. M. Lothaire. Combinatorics on Words. Addison-Wesley, Reading, Mass., 1983. S. W. Margolis, M. V. Sapir, and P. Weil. Closed subgroups in pro-V topologies and the extension problem for inverse automata. Int. J. Algebra Comput., 11:405–446, 2001. J. P. McCammond. Normal forms for free aperiodic semigroups. Int. J. Algebra Comput., 11:581–625, 2001. A. Moura. The word problem for ω-terms over DA. Theor. Comp. Sci., pages 6556–6569, 2011. J. Pin. Topologies for the free monoid. J. Algebra, 137(2):297–337, 1991. J.-É. Pin and Ch. Reutenauer. A conjecture on the Hall topology for the free group. Bull. London Math. Soc., 23:356–362, 1991. T. Place and M. Zeitoun. Going higher in the first-order quantifier alternation hierarchy on words. In J. Esparza, P. Fraigniaud, T. Husfeldt, and E. Koutsoupias, editors, ICALP’14, volume 8573 of Lect. Notes Comp. Sci., pages 342–353, 2014a. T. Place and M. Zeitoun. Separating regular languages with first-order logic. In CSL-LICS’14, pages 75:1–75:10, 2014b. T. Place and M. Zeitoun. Separation and the Successor Relation. In E. W. Mayr and N. Ollinger, editors, STACS’15), volume 30 of Leibniz International Proceedings in Informatics (LIPIcs), pages 662–675. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 2015. T. Place and M. Zeitoun. Separating regular languages with first-order logic. Logical Methods in Computer Science, 12(5):1–30, 2016. J. Rhodes and B. Steinberg. The q-theory of finite semigroups. Springer Monographs in Mathematics. Springer, 2009. L. Ribes and P. A. Zalesskiı̆. On the profinite topology on a free group. Bull. London Math. Soc., 25: 37–43, 1993. B. Steinberg. A delay theorem for pointlikes. Semigroup Forum, 63:281–304, 2001. Factoriality and the Pin-Reutenauer procedure 23 B. Steinberg. A combinatorial property of ideals in free profinite monoids. J. Pure Appl. Algebra, 214: 1693–1695, 2010. H. Straubing. Aperiodic homomorphisms and the concatenation product of recognizable sets. J. Pure Appl. Algebra, 15:319–327, 1979.
4math.GR
1 Adversarial Generation of Training Examples: Applications to Moving Vehicle License Plate Recognition arXiv:1707.03124v3 [cs.CV] 10 Nov 2017 Xinlong Wang, Zhipeng Man, Mingyu You, Chunhua Shen Abstract—Generative Adversarial Networks (GAN) have attracted much research attention recently, leading to impressive results for natural image generation. However, to date little success was observed in using GAN generated images for improving classification tasks. Here we attempt to explore, in the context of license plate recognition for moving cars using a moving camera, whether it is possible to generate synthetic training data using GAN to improve recognition accuracy. With a carefullydesigned pipeline, we show that the answer is affirmative. First, a large-scale image set is generated using the generator of GAN, without manual annotation. Then, these images are fed to a deep convolutional neural network (DCNN) followed by a bidirectional recurrent neural network (BRNN) with long short-term memory (LSTM), which performs the feature learning and sequence labelling. Finally, the pre-trained model is fine-tuned on real images. Our experimental results on a few data sets demonstrate the effectiveness of using GAN images: an improvement of 7.5 recognition accuracy percent points (pp) over a strong baseline with moderate-sized real data being available. We show that the proposed framework achieves competitive recognition accuracy on challenging test datasets. We also leverage the depthwise separate convolution to construct a lightweight convolutional recurrent neural network (LightCRNN), which is about half size and 2× faster on CPU. Combining this framework and the proposed pipeline, we make progress in performing accurate recognition on mobile and embedded devices. Index Terms—Generative adversarial network (GAN), Convolutional neural network (CNN), Bidirectional recurrent neural network (BRNN), Long short-term memory (LSTM), Depthwise separate convolution. I. I NTRODUCTION S GANs [6, 27] have been developed to generate compelling natural images, we attempt to explore whether GAN-generated images can help training as well as real images. GANs are used to generate images through an adversarial training procedure that learns the real data distribution. Most of previous work focuses on using GANs to manipulate images for computer graphics applications [14, 29]. However, to date little success was observed in using GAN generated images for improving classification tasks. To our knowledge, we are one of the first to exploit GAN-generated images to supervised recognition tasks and gain remarkable improvements. For many tasks, labelled data are limited and hard to collect, not to A X. Wang, Z. Man, M. You are with College of Electronic and Information Engineering, Tongji University, Shanghai China (e-mail: [email protected]). C. Shen is with School of Computer Science, The University of Adelaide, SA 5005, Australia (e-mail: [email protected]). mention the fact that training data with manual annotation typically costs tremendous effort. This problem becomes worse in the deep learning era as in general deep learning methods are much more data-hungry. Applications are hampered in these fields when training data for the task is scarce. Inspired by the excellent photo-realistic quality of images generated by GANs, we explore its effectiveness in supervised learning tasks. More specifically, in this work we study the problem of using GAN images in the context of license plate recognition (LPR). License plate recognition is an important research topic, as a crucial part in intelligent transportation systems (ITS). A license plate is a principal identifier of a vehicle. This binding relationship creates many applications using license plate recognition, such as traffic control, electronic payment systems and criminal investigation. Most research on LPR have been focused on using a fixed camera to capture car license images. However, the task of using a moving camera to capture license plate images of moving cars can be much more challenging. This task is not well studied in the literature. Moreover, Lack of a large labelled training data for this task renders data-hungry deep learning methods to not well. Recent advances in deep learning algorithms bring multiple choices which can achieve great performance in specific datasets. A notable cascade framework [18] applies a sliding window to feature extraction, which perform the LPR without segmentation. Inspired by the work of [18, 33] and CNN’s strong capabilities of learning informative representations from images, we combine deep convolutional neural network and recurrent neural network in a single framework, and recognize a license plate without segmentation, which views a license plate as a whole object and learns its inner rules from data. Independent of the deep models being applied, to achieve a high recognition accuracy requires a large amount of annotated license plate image data. However, due to privacy issues, image data of license plates are hard to collect. Moreover, manual annotation is expensive and time-consuming. What is more, LPR is a task with regional characteristic: license plates differ in countries and regions. For many of regions, it is even harder to collect sufficient samples to build a robust and high-performance model. To tackle this problem, we propose a novel pipeline which leverages GAN-generated images in training. The experiments on Chinese license plates show its effectiveness especially when training data are scarce. To achieve this goal, first, we use computer graphic scripts to synthesize images of license plates, following the fonts, colors and composition rules. Note that these synthetic images 2 are not photo realistic, as it is very difficult to model the complex distribution of real license plate images by using hand-crafted rules only. This step is necessary as we use these synthetic images as the input to the GAN. Thus the GAN model refines the image style to make images look close to real images. At the same time the content, which is the actual vehicle plate number, is kept. This is important as we need the plate number—the ground-truth label—for supervised classification in the sequel. We then train a CycleGAN [44] model to generate realistic images of license plates with labels, by learning the mapping from synthetic images to real images. The main reason for using CycleGAN is that, we do not have paired input-output examples for training the GAN. As such, methods like pixel-to-pixel GAN [14] are not applicable. CycleGAN can learn to translate between domains without paired input-output examples. An assumption of CycleGAN is that there is an underlying relationship between the two domains. In our case, this relationship is two different renderings of the same license plate: synthetic graphics versus real photos. We rely on CycleGAN to learn the translation from synthetic graphics to real photos. Finally, we train the convolutional recurrent neural network [33] on the GAN images, and fine-tune it on real images, as illustrated in Fig. 1(b) in the manner of curriculum learning paradigm [4]. The core insight behind this is that we exploit the license number from synthetic license plates and the photo-realistic style from real license plates, which combines knowledgebased (i.e., hand-crafted rules) and learning-based data-driven approaches. Applying the proposed pipeline, we achieve significantly improved recognition accuracy on moderate-sized training sets of real images. Specifically, the model trained on 25% training data (50k) achieves an impressive accuracy of 96.3%, while the accuracy is 96.1% when trained on the whole training set (200k) without our approach. Besides the proposed framework, we consider semisupervised learning using unlabeled images generated by deep convolutional GAN (DCGAN) [27] as an add-on, for the sake of comparison between our approach and existing semisupervised method using GAN images. To run the deep LPR models on mobile devices, we replace the standard convolutions with depthwise separate convolutions [34] and construct a lightweight convolutional RNN. This architecture efficiently decreases the model size and speed up the inference process, with only a small reduction in accuracy. The main contributions of this work can be summarized as follows. • We propose a pipeline that applies GAN-generated images to supervised learning as auxiliary data. Furthermore, we follow a curriculum learning strategy to train the system with gradually more complex training data. In the first step, we use a large number of GAN-generated images whose appearance is simpler than real images, and a large lexicon of license plate numbers1 . At the 1 Recall that the vehicle license plate numbers/letters follow some rules or grammars. Our system learns the combinatorial rules with BRNN on the large number of GAN images. same time, the first step finds a good initialization of the appearance model for the second step. By employing relatively small real-world images, the system gradually learns how to handle complex appearance patterns. • We show the effectiveness of Wasserstein distance loss in CycleGAN training, which aids data variety and converged much better. The original CycleGAN uses a leastsquares loss for the adversarial loss, which is more stable than the standard maximum-likelihood loss. We show that the Wasserstein distance loss as in Wasserstein GAN (WGAN) [3] works better for CycleGAN as well. • We show that when and why GAN images help in supervised learning. • We build a small and efficient LightCRNN, which is half model size and 2× faster on CPU. The rest of paper is arranged as follows. In Section 2 we review the related works briefly. In Section 3 we describe the details of networks used in our approach. Experimental results are provided in Section 4, and conclusions are drawn in Section 5. II. R ELATED W ORK In this section, we discuss the relevant work on license plate recognition, generative adversarial networks and data generation for training. A. License Plate Recognition Existing methods on license plate recognition (LPR) can be divided into two categories: segmentation-based [7, 9, 23] and segmentation free-based [18]. Segmentation-based methods firstly segment the license plate into individual characters, and then recognize the segmented character respectively using a classifier. Segmentation algorithms mainly consist of projection-based [9, 23] and connected component-based [2, 16]. After the segmentation, template matching based [5, 28] and learning based [16, 21, 38] algorithms can be used to tackle this character level classification task. Learning based algorithms including support vector machine [38], hidden Markov model (HMM) [21] and neural networks [16, 35] are more robust than the template matching based methods since they extract discriminative features. However, the segmentation process loses information about inner rules in license plates and the segmentation performance has a significant influence on the recognition performance. Li and Shen [18] proposed a cascade framework using deep convolutional neural networks and LSTMs for license plate recognition without segmentation, where a sliding window is applied to extracting feature sequence. Our method is also a segmentation-free approach based on framework proposed by [33], where a deep CNN is applied for feature extracting directly without a sliding window, and a bidirectional LSTM network is used for sequence labeling. B. Generative Adversarial Networks The generative adversarial networks [6] train a generative model and discriminative model simultaneously via an adversarial process. Deep convolutional generative adversarial 3 (a) The CycleGAN Model (b) Our proposed Pipeline Fig. 1. (a) The architecture of the CycleGAN model, which is essential for our framework. There are two generators (or mapping functions): G and F . S and R represent the synthetic and real images respectively. Adversarial loss (Lad ) is used to evaluate the performance of each generator and corresponding discriminator. Besides, the cycle consistency loss (Lcyc ) is employed to evaluate whether G and F are cycle-consistent. (b) The pipeline of proposed approach. There are two components: a generative adversarial model and a convolutional recurrent neural network. The “Synthetic Data” represent the labeled images generated by our scripts. networks (DCGANs) [27] provide a stable architecture for training GANs. Conditional GAN [22] generate images with specific class labels by conditioning on both the generator and discriminator. Not only class labels, GANs can be conditioned on text descriptions [29] and images [14], which build a textto-image or image-to-image translation. Zhu et al. [44] proposed the CycleGAN. It learns a mapping between two domains without paired images, upon which our model builds. In order to use unpaired images for training, CycleGAN introduces the cycle consistency loss to fulfill the idea of “If we translate from one domain to another and back again we must arrive where we start”. The work of Wasserstein GAN (WGAN) [3] designed a training algorithm that provides some techniques to improve the stability of learning and prevent from mode collapse. Beyond that, GANs have also achieved impressive results in image inpainting [25], representation learning [32] and 3D object generation [39]. However, to date, little results were reported to demonstrate the GAN images’ effectiveness in supervised learning. We propose to use CycleGAN [44] and techniques in WGAN to generate labeled images and show that these generated images indeed help improve the performance of recognition. C. Data Generation for Training Typically, supervised deep networks achieve acceptable performance only with a large amount of labeled examples available. The performance often improves as the dataset size increases. However, in many cases, it is hard or even impossible to obtain a large number of labeled data. Synthetic data are used to show great performance in text localisation [10] and scene text recognition [15], without manual annotation. Additional synthetic training data [19] yields improvements in person detection [40], font recognition [36] and semantic segmentation [30]. But, the knowledgebased approach which hard encodes knowledge about what the real images look like are fragile, as the generated examples often look like toys to discriminative model when compared to real images. Zheng et al. [43] use unlabeled samples generated by a vanilla DCGAN for semi-supervised learning, which slightly improves the person re-identification performance. In this work, we combine knowledge-based approach and learning-based approach, to generate labeled license plates from generator of GANs for supervised training. For comparison, we also perform a semi-supervised learning using unlabeled GAN images. III. N ETWORK OVERVIEW In this section, the pipeline of the proposed method is described. As shown in Fig. 1, we train the GAN model using synthetic images and real images simultaneously. We then use the generated images to train a convolutional BRNN model. Finally we fine tune this model using real images. Below is an illustration of the two components, namely, the GAN and the convolutional RNN, in detail. A. Generative Adversarial Network The generative adversarial networks generally consists of two sub-networks: a generator and a discriminator. The adversarial training process is a minimax game: both subnetworks aim to minimize its own cost and maximize the other’s cost. This adversarial process leads to a converged status that the generator outputs realistic images and the discriminator extracts deep features. The GAN frameworks we used in this pipeline are Cycle-Consistent Adversarial Networks (CycleGAN) [44] with the Wasserstein distance loss as in Wasserstein GAN (WGAN) [3]. CycleGAN As our goal is to learn a mapping that maps synthetic images into real images, namely domain S to domain R, we use two generators: G : S → R, F : R → S, and two discriminators DS and DR . The core insight behind this is that, we not only want to have G(S) ≈ R, but also F (G(S)) ≈ S, which is an additional restriction used to prevent the well-known problem of mode collapse, where all input images map into the same output image. As illustrated in Fig. 1(a), mapping functions G and F both should be cycle-consistent. We follow the settings in [44]. The generator network consists of two stride-2 convolutions, six residual 4 blocks and two fractionally-strided convolutions with stride 1 2 , i.e., deconvolutions that upsample the feature maps. For the discriminator networks, we use 70 × 70 PatchGANs [14], which, instead of classifying the entire image, classifies 70×70 image patches to be fake or real. The objective is defined as the sum of adversarial loss and cycle consistency loss: TABLE I C ONFIGURATION OF THE CONVOLUTIONAL RNN MODEL . “ K ”, “ S ” AND “ P ” REPRESENT KERNEL SIZE , STRIDE AND PADDING SIZE . Layer Type Bidirectional-LSTM Bidirectional-LSTM ReLu BatchNormalization Convolution ReLu BatchNormalization Convolution MaxPooling ReLu Convolution ReLu BatchNormalization Convolution MaxPooling ReLu Convolution ReLu BatchNormalization Convolution MaxPooling ReLu Convolution MaxPooling ReLu Convolution Input L(G, F, DS , DR ) =LLSGAN (G, DR , S, R) + LLSGAN (F, DS , R, S) (1) + λLcyc (G, F ). Here LLSGAN (G, DR , S, R) evaluates the adversarial leastsquares loss of the mapping function G : S → R and discriminator DR : LLSGAN (G, DR , S, R) =Er∼pdata (r) [(DR (r) − 1)2 ] + Es∼pdata (s) [DR (G(s))2 ]. (2) G tries to minimize (2) against DR that tries to maximize it: while G aims to generate images G(s) that look similar to real images, DR tries to distinguish between G(s) and real images r, and vice versa. Cycle consistency loss is defined as below: Lcyc (G, F ) =Es∼pdata (s) [kF (G(s)) − sk1 ] + Er∼pdata (r) [kG(F (r)) − rk1 ]. (3) The optimization of (3) brings F (G(s)) back to s, G(F (r)) to r. λ in (1) represent the strength of the cycle consistency. Details of CycleGAN can be referred to [44]. Wasserstein GAN We apply the techniques proposed in [3] to CycleGAN and propose the CycleWGAN. In training of GANs, the method of measuring the distance between two distances plays a crucial role. A poor evaluation of distance makes it hard to train, even causes mode collapse. The EarthMover (EM) distance, a.k.a. Wasserstein distance, is used when deriving the loss metric, as it is more sensible and converges better. The EM distance between two distributions Pr and Ps is defined as below: EM (Pr , Ps ) = E(x,y)∼λ [kx Qinf λ∈ (Pr ,Ps ) − yk], (4) which can be interpreted as the “mass” must be moved to transform the distribution Pr into the distribution Ps . To make it tractable, we apply the Kantorovich-Rubinstein duality and get EM (Pr , Ps ) = sup Ex∼Pr [f (x)] − Ex∼Ps [f (x)], (6) we can find a parameterized family of functions {fw }w∈W which are K-Lipschitz for some constant K such that kf kL ≤ K. Then this problem is transformed to max Ex∼Pr [f (x)] − Ex∼Ps [f (x)]. w∈W LWGAN (G, DR , S, R) =Er∼pdata (r) [DR (r)] − Es∼pdata (s) [DR (G(s))]. (8) • • • The same to LLSGAN (F, DS , R, S). Update discriminators diter times before each update of generators. Clamp the parameters of discriminators to a fixed range after each gradient update. Use RMSProp [31] for optimization, instead of Adam [17]. B. Convolutional Recurrent Neural Network where f are 1-Lipschitz function. To solve the problem max Ex∼Pr [f (x)] − Ex∼Ps [f (x)], range after each gradient update. In the training of GAN, the discriminator play the role of f above. Specifically, we make four modifications based on CycleGAN described above: • Replace the original adversarial loss (2) with: (5) kf kL ≤1 kf kL ≤1 Configurations #hidden units: 256 #hidden units: 256 #filters:512, k:2 × 2, s:1, p:0 #filters:512, k:2 × 2, s:1, p:0 s:1 × 2, p:1 × 0 #filters:512, k:3 × 3, s:1, p:1 #filters:512, k:3 × 3, s:1, p:1 s:1 × 2, p:1 × 0 #filters:256, k:3 × 3, s:1, p:1 #filters:256, k:3 × 3, s:1, p:1 p:2 × 2, s:2 #filters:128, k:3 × 3, s:1, p:1 p:2 × 2, s:2 #filters:64, k:3 × 3, s:1, p:1 160 × 48 × 3 RGB images (7) In order to enforce a Lipschitz constraint that parameters w range in a compact space, we clamp the weights to a fixed The framework that we use is a combination of deep convolutional neural networks and recurrent neural networks based on [33]. The recognition procedure consists of three components: Sequence feature learning, sequence labelling and sequence decoding, corresponding to the convolutional RNN architecture of convolutional layers, recurrent layers and decoding layer one to one. The overall configurations are presented in Table I. Sequence feature learning CNNs have demonstrated impressive ability of extracting deep features from image [37]. An 8-layer CNN model is applied to extracting sequence 5 TABLE II C OMPOSITION OF THE REAL DATASETS . T HE TWO DATASETS ARE COLLECTED SEPARATELY BUT BOTH COME FROM OPEN ENVIRONMENTS . Name Dataset-1 Dataset-2 Width 100 ∼ 160 50 ∼ 150 Height 30 ∼ 50 15 ∼ 40 Time Day, Night Day, Night Style Blue, Yellow Blue, Yellow features, as shown in Table I. Batch normalization is applied in 3rd, 5th, 7th and 8th layers, and rectified linear units are followed after all these 8 layers. All three channel in RGB images are used: images are resized to 160 × 48 × 3 before fed to networks. After the 8-layer extraction, a sequence of feature vectors is outputted, as the informative representation of the raw images, and the input for the recurrent layers. Sequence labelling The RNNs have achieved great success in sequential problems such as handwritten recognition and language translation. To learn contextual cues in license numbers, a deep bidirectional recurrent neural network is built on the top of CNNs. To avoid gradient vanishing, LSTM is employed, instead of vanilla RNN unit. LSTM is a special type of RNN unit, which consists of a memory cell and gates. The form of LSTM in [41] is adopted in this paper, where a LSTM contains a memory cell and four multiplicative gates, namely input, input modulation, forget and output gates. A fully-connected layer with 68 neurons is added behind the last BiLSTM layer, for the 68 classes of label—31 Chinese characters, 26 letters, 10 digits and “blank”. Finally the feature sequence is transformed into a sequence of probability distributions X = {x1 , x2 , ..., xT } where T is the sequence length of input feature vectors and the superscript can be interpreted as time step. xt is a probability distribution of time t: xtk is interpreted as the probability of observing label k at time t, which is a probability distribution over the set L(T ) where T is the length and L contains all of the 68 labels, as illustrated in Fig. 2. Sequence decoding Once we have the sequence of probability distributions, we transform it into character string using best path decoding [8]. The probability of a specific path π given an input x is defined as below: Provinces 30/31 4/31 Training set size 203,774 45,139 Test set size 9,986 5,925 Fig. 2. License plate recognition confidence map. The top is the license plate to be predicted. The color map is the recognition probabilities from the linear projections of output by the last LSTM layer. The recognition probabilities on 68 classes are shown vertically (with classes order from top to bottom: 0-9, A-Z, Chinese characters and “blank”). Confidence increases from green to white. (9) Fig. 3. Some Samples of Dataset-1. The license plates in Dataset-1 come from 30 different provinces of all 31 provinces. All of them are captured from real traffic monitoring scenes. As described above, yπt t means the probability of observing label πt at time t, which is visualized in Fig. 2. For the best path decoding, the output is the labelling of most probable path: l = B(π ∗ ), (10) Training method We train the networks with stochastic gradient descent (SGD). The labelling loss is derived using Connectionist Temporal Classification (CTC) [8]. Then the optimization algorithm Adadelta [42] is applied, as it converges fast and requires no manual setting of a learning rate. p(π | x) = T Y yπt t . t=1 where π ∗ = arg max p(π | x). π Here we define the operation B as removing all blanks and repeated labels from the path. For example, B(aa − ab − −) = B(−a−aa−b) = aab. As there is no tractable globally optimal decoding algorithm for this problem, the best path decoding is an approximate method that assumes the most probable path corresponds to the most probable labelling, which simply takes the most active output at each time step as π ∗ and then map π ∗ onto l . More sophisticated decoding methods such as dynamic programming may lead to better results. IV. E XPERIMENTS A. Datasets We collect two datasets in which images are captured from a wide variety of real traffic monitoring scenes under various viewpoints, blurring and illumination. As listed in Table II, Dataset-1 contains a training set of 203,774 plates and a test set of 9,986 plates; Dataset-2 contains a training set of 45,139 plates and a test set of 5,925 plates. Some sample images are shown in Fig. 3 and Fig. 4. For Chinese license 6 TABLE III C OMPARISON OF MODELS USING DIFFERENT FRAMEWORKS ON DATASET-1. R ECOGNITION ACCURACY (%) AND CHARACTER RECOGNITION ACCURACY (%) ACCURACY ARE LISTED . SVM + ANN [20] CNN + LSTMs Fig. 4. Some samples of Dataset-2. All of license plates in Dataset-2 are collected from four provinces, from different channels with Dataset-1. plates, the first character is a Chinese character that represents province. While there are 31 abbreviations for all of the provinces, Dataset-1 contains 30 classes of them and Dataset2 contains 4 classes of them, which means the source areas of our data covers a wide range of ground-truth license plates. Our datasets are very challenging and comprehensive due to the extreme diversity of character patterns, such as different resolution, illumination and character distortion. Note that these two datasets come from different sources and do not follow the same distribution. B. Evaluation Criterion In this work, we evaluate the model performance in terms of recognition accuracy and character recognition accuracy, which are evaluated at the license plate level and character level, respectively. Recognition accuracy is defined as the number of license plates that each character is correctly recognized divided by the total number of license plates: Number of correctly recognized license plates . Number of all license plates (11) Character recognition accuracy is defined as the number of correctly recognized characters divided by the number of all characters: Number of correctly recognized characters CRA = . Number of all characters (12) Besides, we compute the top-N recognition accuracy as well. Top-N recognition accuracy is defined as the number of license plates that ground-truth label is in top N predictions divided by the total number of license plates. The recognition accuracy defined above is a special case of the top-N recognition with N equals 1. Benefiting from LSTMs sequence output, we can easily obtain the top-N recognition accuracy by making a beam search decoding on the output logits. The top-N recognition accuracy make sense in criminal investigation: an accurate list of candidates can be provided when searching for a specific license plate, which means a high top-N accuracy promise a low missing rate. RA = C. Implementation Details The recognition framework The convolutional RNN framework is similar to that of [33] and [18], We implement it using Tensorflow [1]. The images are first resized to 160 × 48 and then fed to the recognition framework. We modify the last fully-connected layer to have 68 neurons according to the 68 classes of label—31 Chinese characters, 26 letters, 10 digits RA (top-1) 68.2 96.1 CRA 82.5 98.9 and “blank”. Note that, the decoding method that we use in the above decoding process, independent of top-1 or top-N , is based on a greedy strategy. It means that we get the best path— most probable path, not the most probable labelling. Graves et al. [8] find the almost best labeling using prefix search decoding, which achieves a slight improvement over best path decoding, at the cost of expensive computation and decoding time. Same as [18, 33], we adopt the best path decoding in inference. Synthetic data We generate 200,000 synthetic license plates as our SynthDataset using computer graphics scripts, following the fonts, composition rules and colors, adding some Gaussian noise, motion blurring and affine deformation. The composition rules is according to the standard of Chinese license plates, such as the second character must be letter and at most two letters (exclude “I” and “O”) in last five characters, as depicted in Fig. 6. Some synthetic license plates are shown in Fig. 5(a). GAN training and testing We first train the CycleGAN model on 4,500 synthetic blue license plates from SynthDataset and 4,500 real blue license plates from training set of Dataset-1, as depicted in Fig. 1. We follow the settings in [44]. The λ in Equation (1) is set to 10 in our experiments. All the images are scaled to 143 × 143, cropped to 128 × 128 and randomly flipped for data augmentation. We use Adam with β1 = 0.5, β2 = 0.999 and learning rate of 0.0002. We save the model for each epoch and stop training after 30 epochs. When testing, we use the last 20 models to generate 100,000 blue license plates. The same goes for yellow license plates. Finally, we obtain 200,000 license plates that acquire the license number and realistic style from SynthDataset and Dataset-1 separately. When applying the training method of WGAN, diter is set to 5, and the parameters of discriminator are clamped to [−0.01, 0.01] after each gradient update. Note that only the training set of Dataset-1 is used when training the GAN models. For data augmentation, 200,000 images are randomly cropped to obtain 800,000 images before fed to the convolutional RNN models. D. Evaluation The convolutional RNN baseline model We train the baseline models on two datasets directly. As shown in Table V, we achieve a top-1 recognition accuracy of 96.1% and character accuracy of 98.9% on Dataset-1, without additional data. This baseline already yields a high accuracy, especially the top-3 and top-5 accuracy which are 98.0% and 98.5%. On Dataset-2, the recognition accuracy and character recognition accuracy are 94.5% and 98.4%, as shown in Table VI. For comparison and to demonstrate the effectiveness of the CRNN framework on the task of license plate recognition, 7 (a) Script Images (b) CycleGAN Images (c) CycleWGAN Images (d) Real Images Fig. 5. (a) The examples of license plates generated by our scripts (simple graphics with hand-crafted rules; in other words, colors and character deformation are hard-coded). Note that these images are generated with labels. (b) The examples of license plates generated by CycleGAN [44] model, using synthetic images as input. (c) The examples of license plates generated by CycleWGAN model, in which WGAN [3] techniques are applied. (d) Real license plates from Dataset-1. TABLE IV C OMPARISON OF MODELS THAT USE DIFFERENT GENERATED IMAGES FOR SUPERVISED LEARNING WITHOUT REAL IMAGES . T HE PERFORMANCE IS EVALUATED ON TEST SET OF DATASET-1. “R ANDOM ” REPRESENTS THE RANDOMLY INITIALIZED MODEL . R ECOGNITION ACCURACY (%) AND CHARACTER RECOGNITION ACCURACY (%) ARE LISTED . “CRA-C” IS THE RECOGNITION ACCURACY (%) OF C HINESE CHARACTER WHICH IS THE FIRST CHARACTER , AND “CRA-NC” IS THE RECOGNITION ACCURACY (%) OF LETTERS AND DIGITS WHICH ARE THE LAST SIX CHARACTERS . Random Script CycleGAN CycleWGAN RA (top-1) 0.0 4.4 34.6 61.3 CRA 0.8 30.0 82.8 90.6 CRA-C 0.0 20.0 41.3 66.2 9k 50k 200k (All) Methods Baseline Script CycleWGAN Baseline Script CycleWGAN Baseline Script CycleWGAN RA (top-1) 86.1 90.2 93.6 93.1 95.2 96.3 96.1 96.7 97.6 CRA 94.9 97.0 98.4 97.9 98.8 99.2 98.9 99.1 99.5 Baseline CycleWGAN RA (top-1) 94.5 96.2 CRA 98.4 99.2 top-3 97.6 98.7 top-5 98.1 99.1 CRA-NC 0.9 31.7 89.8 94.8 TABLE V C OMPARISON OF USING DIFFERENT VOLUMES OF THE REAL DATA AND SYNTHETIC DATA GENERATED BY DIFFERENT METHODS ON DATASET-1, I . E ., SCRIPTS AND C YCLE WGAN MODEL . I T MEANS THE GENERATED IMAGES ARE USED FOR TRAINING FIRST, THEN SPECIFIC PROPORTION OF DATASET-1 IS FED TO THE MODEL . T HE PERFORMANCE IS EVALUATED ON THE TEST SET OF DATASET-1. T HE CRNN BASELINE THAT TRAINED ON DATASET-1 ONLY IS ALSO PROVIDED . R ECOGNITION ACCURACY (%), CHARACTER RECOGNITION ACCURACY (%), TOP -3 RECOGNITION ACCURACY (%) AND TOP -5 RECOGNITION (%) ACCURACY ARE LISTED . Training Data TABLE VI C OMPARISON OF THE BASELINE ON DATASET-2. W E FINE - TUNE THE MODEL ON DATASET-2 AFTER PRETRAINING ON C YCLE WGAN IMAGES . R ECOGNITION ACCURACY (%), CHARACTER RECOGNITION ACCURACY (%), TOP -3 RECOGNITION ACCURACY (%) AND TOP -5 RECOGNITION (%) ACCURACY ARE SHOWN . top-3 90.1 94.6 96.8 96.4 97.7 98.3 98.0 98.6 98.9 top-5 92.3 95.6 97.4 97.2 98.1 98.8 98.5 98.8 99.2 we also evaluate the performance of EasyPR [20] on test set of Dataset-1, which is a popular open source software using support vector machines to locate plates and a single hidden layer neural network for character-level recognition. EasyPR is a segmentation based method. As shown in Table III, our approach yield a superior accuracy. Fig. 6. Standard Chinese license plate. The first character is Chinese character representing region. The second must be a letter. And the last 5 characters can be letter (exclude “I” and “O”) or digit, but there should be no more than two letters. Synthetic data only To directly evaluate the effectiveness of the data generated by different methods, we train the models using synthetic data generated by script, CycleGAN and CycleWGAN respectively. Then accuracy evaluations are performed, which are listed in Table IV. When we only use the SynthDataset which is generated by script for training, the recognition accuracy on test set of Dataset-1 is just 4.4%. To rule out the possibility of random initialization, we take a test on the model with random initial weights, which produces a result of 0.0% and 0.8% on recognition accuracy and character recognition accuracy. It means these synthetic images generated by script do help. However, compared with real license plates in Fig. 3, our synthetic license plates generated by script are overly simple. The CycleGAN images achieve a recognition accuracy of 8 34.6%. The improvement of recognition accuracy from 4.4% to 34.6% demonstrates that the distribution generated by CycleGAN is much closer to the real distribution, which means that the generator performs a good mapping from synthetic data to real data with the regularization of discriminator. Some of the samples are shown in Fig. 5(b). However, we observe the phenomenon that the outputs of generator tend to converge to a specific style, which shows some kind of mode collapse [6, 13, 27], the well-known problem of GAN training. As shown in Fig. 5(c), the CycleWGAN images show more various styles of texture and colors. Part of them are really undistinguishable from real images. Although to the naked eyes the images quality may be slightly lower, which is similar to the observation in [3], CycleWGAN shows aggressive rendering ability that prevents from mode collapse. When we use the CycleWGAN images, we yield 61.3 RA, which indicates the CycleWGAN images make a relatively improvements of 1300% compared to the script images. Note that, the recognition accuracy of non-Chinese characters (last six characters) has already achieved 94.8% without using any real data, as letters and digits are much easier than Chinese characters. The results are consistent with the appearance of the images in Fig. 5. We conclude that the trained model is more accurate if the synthetic data is more real. Curriculum learning To further explore these synthetic images’ significance, we then fine tune the pre-trained models on Dataset-1. Thus, we follow a curriculum learning strategy to train the system with gradually more complex training data. As in the first step, the large number of synthetic images whose appearance is simpler than real images, and a large lexicon of license plate numbers. At the same time, the first step finds a good initialization of the appearance model for the second step which uses real images. As shown in Table V, with the help of CycleWGAN images, we obtain an impressive improvement of 1.5 pp over such a strong baseline. To provide more general insights about the ability of GAN to generate synthetic training data, we adopt a crossdataset strategy where the CycleWGAN is trained on data from Dataset-1 and produces images that will be used to train a model on Dataset-2. Thus, the model pre-trained on CycleWGAN images is fine tuned on Dataset-2, with the same procedure. We observe an improvement of 1.7 pp (from 94.5% to 96.2%) in Table VI. The experimental results on the Dataset-1 and Dataset-2 demonstrate the effectiveness: even on a strong baseline, these CycleWGAN images effectively yield remarkable improvements. Smaller datasets, more significant improvements What if we only have a small real dataset? It is a common problem faced by some special tasks, especially when related to personal privacy. We sample a small set of 9,000 ground-truth labeled license plate images from Dataset-1, For the first method, we train our recognition networks directly using these 9,000 license plates. The second method is the pipeline proposed in Section 1 that we use this dataset to train a GAN model and generate synthetic license plates. We then fine-tune this pre-trained model using 9,000 real images. As shown in Table V, when we add 800k GAN images to the network’s training, our method significantly improves the LPR performance. We observe an impressive improvement of 7.5 pp (from 86.1% to 93.6%). When using 50,000 real images for the fine-tuning instead of 9,000, we also observe impactful improvement of 3.2 pp (from 93.1% to 96.3%). It is clear that the improvement is more remarkable with a smaller training set of real images. What is more, the model trained on 9,000 training set and GAN images deliver better performance than the model trained on a training set with size of 50,000. This comparison can also be found between 50k and 200k in Table V. It means that we can train a better model on a smaller real training set using this method, validating the effectiveness of the proposed pipeline. Fig. 7. License plate samples generated by a DCGAN model trained on part of Dataset-1. Through the all-in-one method, they are mixed with real license plates to regularize the CRNN model. TABLE VII C OMPARISON OF MIXING DIFFERENT AMOUNT OF REAL IMAGES WITH DCGAN IMAGES . F OR ALL - IN - ONE METHOD , 50,000 DCGAN IMAGES IS MIXED WITH REAL IMAGES . R ECOGNITION ACCURACY (%), CHARACTER RECOGNITION ACCURACY (%), TOP -3 RECOGNITION ACCURACY (%) AND TOP -5 RECOGNITION (%) ACCURACY ARE SHOWN . Dataset-1-9k Dataset-1-9k + All in one Dataset-1-50k Dataset-1-50k + All in one Dataset-1-200k Dataset-1-200k + All in one RA (top-1) 86.1 78.1 93.1 92.6 96.1 96.0 CRA 94.9 92.8 97.9 97.7 98.9 98.9 Unlabeled DCGAN images To compare the effectiveness of labeded CycleWGAN images and unlabeled images generated by DCGAN [27], we train a DCGAN model to generate unlabeled images, and apply the all-in-one [24, 32, 43] method to them for a semi-supervised learning. All-in-one is an approach that takes all generated unlabeled data as one class. DCGAN provides a stable architecture for training GANs and can only generate unlabeled images. It consists of one generator and one discriminator. We follow the settings in [27]. For the generator, we use four fractionally-strided convolutions after projecting and reshaping a 100-dim random vectors to 4 × 4 × 16 to generate images with size of 64 × 64 × 3. For the discriminator, a fully-connected layer following four stride2 convolutions with kernel size of 5 × 5 is used to perform a binary classification that whether the image is real or fake. We train the DCGAN model on 46,400 images from Dataset-1, and then use the model to generate 50,000 images by inputting 100-dim random vectors in which each entry is in a range of [−1, 1]. Some samples are shown in Fig. 7. 9 For all of our license plates, there are 68 different characters, which means 68 classes. We create a new character class, and every character in generated license plate is assigned to this class. Same as [43], these generated images and ground truth images are mixed and trained simultaneously. As shown in Table VII, we explore the effect of adding these 50,000 images to Dataset-1-9k, Dataset-1-50k and Dataset-1-200k. The results show that the DCGAN images fail to obtain improvements, which is opposite to the results of [43]. We think it is because that the bias in the task of person reidentification does not exist in LPR. Fig. 8. Random images that consist of random value at each pixel. They are input to a trained model to produce the condition distribution which can be viewed as the knowledge of the model. E. Interpretation Thus far we empirically prove the effectiveness of CycleGAN generated images for recognition. However from a theoretical perspective, it is not clear about the effect of images generated by GAN, in real learning tasks. Thus, we perform some visualizations to interpret the effectiveness of GAN images. The knowledge of a model can be viewed as the conditional distribution it produces over outputs given an input [11, 26]. Inspired by this insight, we input 5,000 random-generated images to models, then average the outputs of last fullyconnected layer together as a confidence map to simulate the output distribution. Some samples of random images are shown in Fig. 8. The confidence map namely y is illustrated in Fig. 2, where ytk can interpreted as probability of observing label k at time t as described in Section 3.2. Here, we mainly explain this question: why do those labeled GAN images yield further improvements? First, the model trained on script-generated images only is visualized, as shown in Fig. 11(a). We observe that the bottom of the first column is blue while the top is green, which means that it is more probable to observe Chinese characters in the place of license plate’s first character. On the contrary, the rest places tend to be digits and letters. When we observe the model trained on CycleWGAN images only, the composition rules of license plates are more clear, as illustrated in Fig. 11(b). Besides, the columns next to the first column show concentrated probabilities in middle position, which indicate the second character tends to be letters. These observations match the ground truth rules explicitly. The above results indicate the knowledge of composition rules that are hard-coded in scripts is learned by the model and help in sequence labelling. Once the model pre-trained on CycleWGAN images is fine-tuned on real images instead of script images, these general rules are still clear. However, the model trained on real images directly learns the non-general features, e.g., very high probability of “9” which is caused by the many “9”s in training set, as depicted in Fig. 11(d). The non-general features cause over-fitting. Besides, we pick the images that make up the improvements. About 35% of them are caused by the first character (Chinese character), and about one quarter of them are caused by the confusing pairs like “0” & “D”, “8” & “B” and “5” & “S”. It means that these CycleWGAN images help extract discriminative features of license plates. In a word, the knowledge and prior hard-coded in script does help; the GAN images soften these knowledge and make output distribution be close to ground-truth distribution which lead to further improvements. It is consistent with the experimental results in Section 4.4. When training data is large, the knowledge in additional GAN images help less because the real training set is sufficiently large to carry most of these knowledge. F. Model Compression To further meet requirements of inference on mobile and embedded devices, we replace the standard convolution with depth-wise separable convolution [34] and adopt the hyperparameter width multiplier proposed by [12]. A depth-wise separate convolution contains a depth-wise convolution and a 1×1 (point-wise) convolution. For depth-wise convolution, a single filter is applied to each input channel separately. Then a pointwise convolution is applied which is a 1×1 convolution that combines different channels to create new features. This factorized convolution efficiently reduces the model size and computation. With stride one and padding, a standard convolution filtering on a H ×W ×M feature map R outputs a H ×W ×N feature map O. Here, H and W represent the height and width of the feature map. M and N are the depth of the input and output feature map. While the size of convolution kernel K is F × F × M × N where F denotes the spatial dimension of the kernel, we can compute the output feature map O as: X Op,q,n = Ki,j,m,n · Rp+i−1,q+j−1,m . (13) i,j,m During this forward computation, the computation cost is defined as below: Cstandard = F · F · M · N · H · W. (14) As for the depth-wise convolution, the temporary output feature map is computed as: X Ôp,q,m = K̂i,j,m · Rp+i−1,q+j−1,m . (15) i,j Then we perform a 1 × 1 convolution to produce the final output feature map of this depth-wise separate convolution. Over all, the computation cost of the depth-wise separate convolution is: F · F · M · H · W + M · N · H · W. (16) To explore the trade off between the accuracy and inference speed, we bring in a hyper-parameter called width multiplier. At each layer, we multiply both input depth M and output 10 depth N by α. Then the computation cost of the separate depth-wise convolution becomes: Cseparate = F · F · αM · H · W + αM · αN · H · W. (17) Dividing the Cseparate by Cstandard , we then get the ratio of computation cost: Cseparate F · F · αM · H · W + αM · αN · H · W = Cstandard F ·F ·M ·N ·H ·W (18) 1 2 1 = α + α 2. N F If we use the default width multiplier of 1.0 and 3×3 depthwise separable convolutions, the computation cost becomes about 9 times less than the original standard convolution, while the output depth N is large. Based on this efficient depth-wise separable convolution and the existing CRNN framework, we construct a lightweight convolutional recurrent neural network and denote it as “LightCRNN”. Note that only the convolutions are modified, while the parameters and computation cost in LSTM and the fully-connected layer in it are kept. The entire architecture is defined in Table VIII. TABLE VIII C ONFIGURATION OF THE L IGHT CRNN MODEL . “ K ”, “ S ” AND “ P ” REPRESENT KERNEL SIZE , STRIDE AND PADDING SIZE . E ACH CONVOLUTION IS FOLLOWED BY BATCH NORMALIZATION AND R E LU NONLINEARITIES . Layer Type Bidirectional-LSTM Bidirectional-LSTM Conv Depthwise Conv Conv Depthwise Conv MaxPooling Conv Depthwise Conv MaxPooling Conv Depthwise Conv Conv Depthwise Conv Conv Input Configurations #hidden units: 256 #hidden units: 256 #filters:512, k:1 × 1, s:1, p:0 k:2 × 2, s:1, p:0 #filters:512, k:1 × 1, s:1, p:0 k:2 × 2, s:1, p:0 s:1 × 2, p:1 × 0 #filters:512, k:1 × 1, s:1, p:0 k:3 × 3, s:1, p:1 s:1 × 2, p:1 × 0 #filters:256, k:1 × 1, s:1, p:0 k:3 × 3, s:2, p:1 #filters:128, k:1 × 1, s:1, p:0 k:3 × 3, s:2, p:1 #filters:64, k:3 × 3, s:1, p:1 160 × 48 × 3 RGB images TABLE X R ESULTS ON TEST SET OF DATASET-3. F INE - TUNING ON THE MODEL PRE - TRAINED ON THE C YCLE WGAN IMAGES IMPROVES THE BASELINE . R ECOGNITION ACCURACY (%) AND CHARACTER RECOGNITION ACCURACY (%) ACCURACY ARE LISTED . Baseline CycleWGAN + PROPOSED ARCHITECTURE SIGNIFICANTLY DECREASES THE MODEL SIZE AND SPEEDS UP THE INFERENCE . RA (top-1) 96.5 97.0 98.6 Size 40.3 44.2 44.2 Fig. 9. Some samples of Dataset-3. The videos are shot when both the source and target objects are moving. Fig. 10. Some samples of CycleWGAN images for moving LPR. The CycleWGAN models are trained using script images and training set of Dataset-3. TABLE IX C OMPARISON OF USING DIFFERENT MODELS . A LL ARE TRAINED ON DATASET-1 AND TESTED ON ITS TEST SET. R ECOGNITION ACCURACY (%), MODEL SIZE (MB) AND INFERENCE SPEED (FPS) ARE LISTED . T HE Model LightCRNN 1.2 LightCRNN 1.2 LightCRNN + CycleWGAN images forward inference. As shown in Table IX, the LightCRNN not only efficiently decreases the model size from 71.4M B to 40.3M B and speeds up the inference from 7.2F P S to 13.9F P S, but also increase the recognition accuracy. It is probably because this LightCRNN reduce the overfitting of the model. To adjust the trade off between latency and accuracy, we apply the width multiplier of 1.2. This 1.2 LightCRNN brings another improvement of 0.5 pp. We then apply the proposed pipeline which leverages CycleWGAN image data and yields an improvement of 1.6 pp. Thus, the combination of our proposed pipeline and architecture make it more close to perform accurate recognition on mobile and embedded devices. Speed 13.9 11.5 11.5 We evaluate the proposed LightCRNN on Dataset-1 without GPU. The following experiments are carried out on a workstation with 2.40 GHz Intel(R) Xeon(R) E5-2620 CPU and 64GB RAM. The LightCRNN models are trained and tested using TensorFlow [1]. Only a single core is used when we perform RA (top-1) 89.4 92.1 CRA 97.6 98.0 G. Moving LPR We further validate our pipeline on more complicated data. We shoot in a moving car and capture the license plates of other vehicles. Both the viewpoint and target object are moving fast and irregularly. This data is much more hard than the normal monitoring data which is collected at settled location and angle. The LPR task then becomes more challenging and we denote it as the task of moving LPR, which is with wide applications in driving assistance, surveillance and mobile robotics, etc. The moving LPR has two main bottlenecks. First, this harder task needs more examples and large-scale data are expensive to collected, as you can not just export the data from 11 monitoring camera but have to shoot videos in various regions to meet the requirement of diversity. Second, the models need to be more efficient when you deploy the systems in vehicles or drones. Our proposed pipeline eases up the first bottleneck, and the proposed LightCRNN helps the latter. These images are collected in Suzhou, a normal Chinese city. They cover various situatiions, such as night, highway, crossroad and so on. Some samples are shown in Fig. 9. After the images are annotated and cropped, we obtain 22026 license plates, namely, the Dataset-3. 2000 of them are splitted as test set of Dataset-3. Considering the trade off between accuracy and latency, we adopt the 1.2x LightCRNN in our following experiments. We first train a model using the training set of Dataset-3 and evaluate on the corresponding test set. We obtain a recognition accuracy of 89.4%. Then the proposed pipeline is applied. First, we train the CycleWGAN using script images and the training set of Dataset-3. Both are 20k images. Then we feed the script images to the trained generators and obtain 800k synthetic CycleWGAN images. We show some samples in Fig. 10. The recognition model is pre-trained on the CycleWGAN images and fine-tuned on the training set of Dataset-3. As thus, we yield an improvement of 2.7 pp, as listed in Table X. It indicates that our methods work well on even more hard LPR scenario. V. C ONCLUSION In this paper, we integrate the GAN images into supervised learning, i.e., license plate recognition. Using our method, large-scale realistic license plates with arbitrary license numbers are generated by a CycleGAN model equipped with WGAN techniques. The convolutional RNN baseline network is trained on GAN images first, and then real images in a curriculum learning manner. Experimental results demonstrate that the proposed pipeline brings significant improvements on different license plates datasets. The significance of GAN-generated data is magnified when real annotated data is limited. Furthermore, the question that why and when do these GAN images help in supervised learning is answered, using clear visualizations. We also propose a lightweight convolutional RNN model using depth-wise separate convolution, to perform fast and efficient inference. ACKNOWLEDGMENT The work was supported by the Shanghai Natural Science Foundation (No. 17ZR1431500). R EFERENCES [1] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, et al. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467, 2016. [2] C. N. E. Anagnostopoulos, I. E. Anagnostopoulos, V. Loumos, and E. Kayafas. A license plate-recognition algorithm for intelligent transportation system applications. IEEE Transactions on Intelligent transportation systems, 7(3):377–392, 2006. [3] M. Arjovsky, S. Chintala, and L. Bottou. Wasserstein generative adversarial networks. In D. Precup and Y. W. Teh, editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 214–223, International Convention Centre, Sydney, Australia, 06–11 Aug 2017. PMLR. [4] Y. Bengio, J. Louradour, R. Collobert, and J. Weston. Curriculum learning. In Proceedings of International Conference on Machine Learning, pages 41–48, 2009. [5] S. Goel and S. Dabas. Vehicle registration plate recognition system using template matching. In Signal Processing and Communication (ICSC), 2013 International Conference on, pages 315–318. IEEE, 2013. [6] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. [7] C. Gou, K. Wang, Y. Yao, and Z. Li. Vehicle license plate recognition based on extremal regions and restricted boltzmann machines. IEEE Transactions on Intelligent Transportation Systems, 17(4):1096–1107, 2016. [8] A. Graves, S. Fernández, F. Gomez, and J. Schmidhuber. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In Proceedings of the 23rd international conference on Machine learning, pages 369–376. ACM, 2006. [9] J.-M. Guo and Y.-F. Liu. License plate localization and character segmentation with feedback self-learning and hybrid binarization techniques. IEEE Transactions on Vehicular Technology, 57(3):1417–1424, 2008. [10] A. Gupta, A. Vedaldi, and A. Zisserman. Synthetic data for text localisation in natural images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2315–2324, 2016. [11] G. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. [12] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. [13] D. J. Im, C. D. Kim, H. Jiang, and R. Memisevic. Generating images with recurrent adversarial networks. arXiv preprint arXiv:1602.05110, 2016. [14] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2017. [15] M. Jaderberg, K. Simonyan, A. Vedaldi, and A. Zisserman. Synthetic data and artificial neural networks for natural scene text recognition. arXiv preprint arXiv:1406.2227, 2014. [16] J. Jiao, Q. Ye, and Q. Huang. A configurable method for multi-style license plate recognition. Pattern Recognition, 42(3):358–369, 2009. [17] D. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. [18] H. Li and C. Shen. Reading car license plates using deep convolutional neural networks and lstms. arXiv preprint arXiv:1601.05610, 2016. [19] P. Lim, C. K. Goh, and K. C. Tan. Evolutionary cluster-based synthetic oversampling ensemble (eco-ensemble) for imbalance learning. IEEE transactions on cybernetics, 2017. [20] R. Liu and M. Li. Easypr. https://github.com/liuruoze/EasyPR, 2016. [21] D. Llorens, A. Marzal, V. Palazón, and J. Vilar. Car license plates extraction and recognition based on connected components analysis and hmm decoding. Pattern Recognition and Image Analysis, pages 357– 362, 2005. [22] M. Mirza and S. Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. [23] S. Nomura, K. Yamanaka, O. Katai, H. Kawakami, and T. Shiose. A novel adaptive morphological approach for degraded character image segmentation. Pattern Recognition, 38(11):1961–1975, 2005. [24] A. Odena. Semi-supervised learning with generative adversarial networks. arXiv preprint arXiv:1606.01583, 2016. [25] D. Pathak, P. Krahenbuhl, J. Donahue, T. Darrell, and A. A. Efros. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2536–2544, 2016. [26] G. Pereyra, G. Tucker, J. Chorowski, Ł. Kaiser, and G. Hinton. Regularizing neural networks by penalizing confident output distributions. arXiv preprint arXiv:1701.06548, 2017. [27] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. [28] S. Rasheed, A. Naeem, and O. Ishaq. Automated number plate recognition using hough lines and template matching. In Proceedings of the World Congress on Engineering and Computer Science, volume 1, pages 24–26, 2012. [29] S. Reed, Z. Akata, X. Yan, L. Logeswaran, B. Schiele, and H. Lee. Generative adversarial text to image synthesis. In Proceedings of International Conference on Machine Learning, volume 3, 2016. [30] G. Ros, L. Sellart, J. Materzynska, D. Vazquez, and A. M. Lopez. The 12 [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] synthia dataset: A large collection of synthetic images for semantic segmentation of urban scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3234–3243, 2016. S. Ruder. An overview of gradient descent optimization algorithms. arXiv preprint arXiv:1609.04747, 2016. T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, pages 2226–2234, 2016. B. Shi, X. Bai, and C. Yao. An end-to-end trainable neural network for image-based sequence recognition and its application to scene text recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2016. L. Sifre. Rigid-motion scattering for image classification. PhD thesis, Ph. D. thesis, 2014. D. Tao, X. Lin, L. Jin, and X. Li. Principal component 2-d long shortterm memory for font recognition on single chinese characters. IEEE transactions on cybernetics, 46(3):756–765, 2016. Z. Wang, J. Yang, H. Jin, E. Shechtman, A. Agarwala, J. Brandt, and T. S. Huang. Deepfont: Identify your font from an image. In Proceedings of the 23rd ACM international conference on Multimedia, pages 451– 459. ACM, 2015. Y. Wei, Y. Zhao, C. Lu, S. Wei, L. Liu, Z. Zhu, and S. Yan. Cross-modal retrieval with cnn visual features: A new baseline. IEEE transactions on cybernetics, 47(2):449–460, 2017. Y. Wen, Y. Lu, J. Yan, Z. Zhou, K. M. von Deneen, and P. Shi. An algorithm for license plate recognition applied to intelligent transportation system. IEEE Transactions on Intelligent Transportation Systems, 12(3):830–845, 2011. J. Wu, C. Zhang, T. Xue, W. T. Freeman, and J. B. Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. In Advances in Neural Information Processing Systems, pages 82–90, 2016. J. Yu, D. Farin, C. Krüger, and B. Schiele. Improving person detection using synthetic training data. In Image Processing (ICIP), 2010 17th IEEE International Conference on, pages 3477–3480. IEEE, 2010. W. Zaremba, I. Sutskever, and O. Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. M. D. Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012. Z. Zheng, L. Zheng, and Y. Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. 13 (a) 800k script images (b) 800k CycleWGAN images (c) 200k real after 800k CycleGAN images (d) 200k real images Fig. 11. Comparison of models trained on different datasets. The recognition probabilities on 68 classes are shown vertically (with classes order from top to bottom: 0-9, A-Z, Chinese characters and “blank”). Confidence increases from green to white. (a) The model trained on 800k script-generated images only. The blue area indicates a higher probability to be digits and letters. (b) The model trained on 800k CycleWGAN images only. Here shows a more clear color distribution which indicates the composition rule of the Chinese license plates. (c) The model pre-trained on 800k CycleWGAN images and fine-tuned on 200k real images. (d) The model trained on 200k real images only. The high confidence in the red bounding box represent the not discriminative features.
1cs.CV
A COFFEE: an Optimizing Compiler for Finite Element Local Assembly arXiv:1407.0904v2 [cs.MS] 4 Jul 2014 Fabio Luporini, Imperial College London Ana Lucia Varbanescu, University of Amsterdam Florian Rathgeber, Imperial College London Gheorghe-Teodor Bercea, Imperial College London J. Ramanujam, Louisiana State University David A. Ham, Imperial College London Paul H.J. Kelly, Imperial College London The numerical solution of partial differential equations using the finite element method is one of the key applications of high performance computing. Local assembly is its characteristic operation. This entails the execution of a problem-specific kernel to numerically evaluate an integral for each element in the discretized problem domain. Since the domain size can be huge, executing efficient kernels is fundamental. Their optimization is, however, a challenging issue. Even though affine loop nests are generally present, the short trip counts and the complexity of mathematical expressions make it hard to determine a single or unique sequence of successful transformations. Therefore, we present the design and systematic evaluation of COFFEE, a domain-specific compiler for local assembly kernels. COFFEE manipulates abstract syntax trees generated from a high-level domain-specific language for PDEs by introducing domain-aware composable optimizations aimed at improving instruction-level parallelism, especially SIMD vectorization, and register locality. It then generates C code including vector intrinsics. Experiments using a range of finite-element forms of increasing complexity show that significant performance improvement is achieved. Categories and Subject Descriptors: G.1.8 [Numerical Analysis]: Partial Differential Equations - Finite element methods; G.4 [Mathematical Software]: Parallel and vector implementations General Terms: Design, Performance Additional Key Words and Phrases: Finite element integration, local assembly, compilers, optimizations, SIMD vectorization ACM Reference Format: Fabio Luporini, Ana Lucia Varbanescu, Florian Rathgeber, Gheorghe-Teodor Bercea, J. Ramanujam, David A. Ham, and Paul H. J. Kelly, 2014. COFFEE: an Optimizing Compilerfor Finite Element Local Assembly. ACM Trans. Arch. & Code Opt. V, N, Article A (January YYYY), 22 pages. DOI:http://dx.doi.org/10.1145/0000000.0000000 This research is partly funded by the MAPDES project, by the Department of Computing at Imperial College London, by EPSRC through grants EP/I00677X/1, EP/I006761/1, and EP/L000407/1, by NERC grants NE/K008951/1 and NE/K006789/1, by the U.S. National Science Foundation through grants 0811457 and 0926687, by the U.S. Army through contract W911NF-10-1-000, and by a HiPEAC collaboration grant. The authors would like to thank Dr. Carlo Bertolli, Dr. Lawrence Mitchell, and Dr. Francis Russell for their invaluable suggestions and their contribution to the Firedrake project. Author’s addresses: Fabio Luporini & Florian Rathgeber & Gheorghe-Teodor Bercea & Paul H. J. Kelly, Department of Computing, Imperial College London; Ana Lucia Varbanescu, Informatics Institute, University of Amsterdam; David A. Ham, Department of Computing and Department of Mathematics, Imperial College London; J. Ramanujam, iCenter for Computation and Technology and the School of Elec. Engr.& Comp. Sci., Louisiana State University. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies show this notice on the first page or initial screen of a display along with the full citation. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept., ACM, Inc., 2 Penn Plaza, Suite 701, New York, NY 10121-0701 USA, fax +1 (212) 869-0481, or [email protected]. c YYYY ACM 1539-9087/YYYY/01-ARTA $15.00 DOI:http://dx.doi.org/10.1145/0000000.0000000 ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:2 F. Luporini et al. 1. INTRODUCTION In many fields such as computational fluid dynamics, computational electromagnetics and structural mechanics, phenomena are modelled by partial differential equations (PDEs). Numerical techniques, like the finite volume method and the finite element method, are widely employed to approximate solutions of these PDEs. Unstructured meshes are often used to discretize the computational domain, since they allow an accurate representation of complex geometries. The solution is sought by applying suitable numerical operations, or kernels, to the entities of a mesh, such as edges, vertices, or cells. On standard clusters of multicores, typically, a kernel is executed sequentially by a thread, while parallelism is achieved by partitioning the mesh and assigning each partition to a different node or thread. Such an execution model, with minor variations, is adopted, for example, in [Markall et al. 2013], [Logg et al. 2012], [AMCG 2010], [DeVito et al. 2011]. The time required to apply the numerical kernels is a major issue, since the equation domain needs to be discretized into an extremely large number of cells to obtain a satisfactory approximation of the PDE, possibly of the order of trillions [Rossinelli et al. 2013]. For example, it has been well established that mesh resolution is critical in the accuracy of numerical weather forecasts. However, operational forecast centers have a strict time limit in which to produce a forecast - 60 minutes in the case of the UK Met Office. Producing efficient kernels has a direct scientific payoff in higher resolution, and therefore more accurate, forecasts. Computational cost is a dominant problem in computational science simulations, especially for those based on finite elements, which are the subject of this paper. We address, in particular, the well-known problem of optimizing the local assembly phase of the finite element method [Russell and Kelly 2013; Olgaard and Wells 2010; Knepley and Terrel 2013; Kirby et al. 2005], which can be responsible for a significant fraction of the overall computation run-time, often in the range 30-60%. With respect to these studies, we propose a novel set of composable code transformations targeting, for the first time, instruction-level parallelism - with emphasis on SIMD vectorization - and register locality. During the assembly phase, the solution of the PDE is approximated by executing a problem-specific kernel over all cells, or elements, in the discretized domain. In this work, we focus on relatively low order finite element methods, in which an assembly kernel’s working set is usually small enough to fit the L1 cache. Low order methods are by no means exotic: they are employed in a wide variety of fields, including climate and ocean modeling, computational fluid dynamics, and structural mechanics. High order methods such as the spectral element method [Vos et al. 2010] commonly require different algorithms to solve PDEs and therefore are excluded from our study. An assembly kernel is characterized by the presence of an affine, often non-perfect loop nest, in which individual loops are rather small: their trip count rarely exceeds 30, and may be as low as 3 for low order methods. In the innermost loop, a problemspecific, compute intensive expression evaluates a two dimensional array, representing the result of local assembly in an element of the discretized domain. With such a kernel structure, we focus on aspects like minimization of floating-point operations, register allocation and instruction-level parallelism, especially in the form of SIMD vectorization. Achieving high-performance is non-trivial. The complexity of the mathematical expressions, often characterized by a large number of operations on constants and small matrices, makes it hard to determine a single or specific sequence of transformations that is successfully applicable to all problems. Loop trip counts are typically small and can vary significantly, which further exacerbates the issue. A compiler-based approach is, therefore, the only reasonable option to obtain close-to-peak performance in a wide ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly A:3 range of different local assembly kernels. Optimizations like padding, generalized loopinvariant code motion, vector-register tiling, and expression splitting, as well as their composition, are essential. but none are supported by state-of-the-art polyhedral and vendor compilers. BLAS routines could theoretically be employed, although a fairly complicated control and data flow analysis would be required to automate identification and extraction of matrix-matrix multiplies. In addition, as detailed in Section 5.9, the small dimension of the matrices involved and the potential loss in data locality can limit or eliminate the performance gain of this approach. In order to overcome the constraints of the available compilers and specialized linear algebra libraries, we have automated a set of generic and model-driven code transformations in COFFEE1 , a compiler for optimizing local assembly kernels. COFFEE is integrated with Firedrake [Firedrake contributors 2014], a system for solving PDEs through the finite element method based on the PyOP2 abstraction [Rathgeber et al. 2012; Markall et al. 2013]. All problems expressible with this framework are supported by COFFEE, including equations that can be found at the core of real-world simulations, such as those used in our performance evaluation. In evaluating our code transformations for a range of relevant problems, we vary two key parameters that impact solution accuracy and kernel cost: the polynomial order of the method (we investigate from p = 1 to p = 4) and the geometry of elements in the discretized domain (2D triangle, 3D tetrahedron, 3D prism). From the point of view of the generated code, these two parameters directly impact the size of both loop nests and mathematical expressions, as elaborated in Section 5.2. Our experiments show that the original generated code for non-trivial assembly kernels, despite following state-of-the-art techniques, remains suboptimal in the context of modern multicore architectures. Our domain-aware cost-model-driven sequence of code transformations, aimed at improving SIMD vectorization and register data locality, can result in performance improvements up to 4.4× over original kernels, and around 70% of the test cases obtain a speed up greater than 2×. The contributions of this paper are (1) An optimization strategy for finite element local assembly that exploits domain knowledge and goes beyond the limits of both vendor and research compilers. (2) The design and implementation of a compiler that automates the proposed code transformations for any problems expressible in Firedrake. (3) A systematic analysis using a suite of examples of real-world importance that is evidence of significant performance improvements on two Intel architectures, a Sandy Bridge CPU and the Xeon Phi. The paper is organized as follows. In Section 2 we provide some background on local assembly, show code generated by Firedrake and emphasize the critical computational aspects. Section 3 describes the various code transformations, highlighting when and how domain knowledge has been exploited. The design and implementation of our compiler is discussed in Section 4. Section 5 shows performance results. Related work is described in Section 6, while Section 7 reviews our contributions in the light of our results, and identifies priorities for future work. 2. BACKGROUND AND MOTIVATING EXAMPLES Local assembly is the computation of contributions of a specific cell in the discretized domain to the linear system which yields the PDE solution. The process consists of numerically evaluating problem-specific integrals to produce a matrix and a vector [Olgaard and Wells 2010; AMCG 2010], whose sizes depend on the order of the method. 1 COFFEE stands for COmpiler For FinitE Element local assembly. ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:4 F. Luporini et al. Input: element matrix (2D array, initialized to 0), element coordinates (array), coefficient fields (array, e.g. velocity) Output: element matrix (2D array) - Compute Jacobian from coordinates - Define basis functions - Compute element matrix in an affine loop nest Fig. 1: Structure of a local assembly kernel This operation is applied to all cells in the discretized domain. In this work we focus on local matrices, or “element matrices”, which are more costly to compute than element vectors. Given a finite element description of the input problem, expressed through the domain-specific Unified Form Language (UFL) [Alnæs et al. 2014], Firedrake employs the FEniCS form compiler (FFC) [Kirby and Logg 2006] to generate a C-code kernel implementing assembly using a numerical quadrature. This kernel can be applied to any element in the mesh, which follows from a mathematical property of the finite element method. The evaluation of a local matrix can be reduced to integration on a fixed “reference” element — a special element that does not belong to the domain — after a suitable change of coordinates. Firedrake triggers the compilation of an assembly kernel using an available vendor compiler, and manages its (parallel) execution over all elements in the mesh. As already explained, the subject of this paper is to enhance this execution model by adding an optimization stage prior to the generation of C code. The structure of a local assembly kernel is shown in Figure 1. The inputs are a zero-initialized two dimensional array used to store the element matrix, the element’s coordinates in the discretized domain, and coefficient fields, for instance indicating the values of velocity or pressure in the element. The output is the evaluated element matrix. The kernel body can be logically split into three parts: (1) Calculation of the Jacobian matrix, its determinant and its inverse required for the aforementioned change of coordinates from the reference element to the one being computed. (2) Definition of basis functions used, intuitively, to interpolate the contribution to the PDE solution over the element. The choice of basis functions is expressed in UFL directly by users. In the generated code, they are represented as global read-only two dimensional arrays (i.e., using static const in C) of double precision floats. (3) Evaluation of the element matrix in an affine loop nest, in which the integration is performed. Table I shows the variable names we will use in the upcoming code snippets to refer to the various kernel objects. Table I: Type and variable names used in the various listings to identify local assembly objects. Object name Determinant of the Jacobian matrix Inverse of the Jacobian matrix Coordinates Fields Numerical integration weights Basis functions (and derivatives) Element matrix Type double double double** double** double[] double[][] double[][] Variable name(s) det K1, K2, ... coords w W X, Y, X1, ... A ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly A:5 LISTING 1: Local assembly code generated by Firedrake for a Helmholtz problem on a 2D triangular mesh using Lagrange p = 1 elements. void helmholtz(double A[3][3], double **coords) { // K, det = Compute Jacobian (coords) static const double W[3] = {...} static const double X D10[3][3] = {{...}} static const double X D01[3][3] = {{...}} for (int i = 0; i<3; i++) for (int j = 0; j<3; j++) for (int k = 0; k<3; k++) A[j][k] += ((Y[i][k]*Y[i][j]+ +((K1*X D10[i][k]+K3*X D01[i][k])*(K1*X D10[i][j]+K3*X D01[i][j]))+ +((K0*X D10[i][k]+K2*X D01[i][k])*(K0*X D10[i][j]+K2*X D01[i][j])))* *det*W[i]); } LISTING 2: Local assembly code generated by Firedrake for a Burgers problem on a 3D tetrahedral mesh using Lagrange p = 1 elements. void burgers(double A[12][12], double **coords, double **w) { // K, det = Compute Jacobian (coords) static const double W[5] = {...} static const double X1 D001[5][12] = {{...}} static const double X2 D001[5][12] = {{...}} //11 other basis functions definitions. ... for (int i = 0; i<5; i++) { double F0 = 0.0; //10 other declarations (F1, F2,...) ... for (int r = 0; r<12; r++) { F0 += (w[r][0]*X1 D100[i][r]); //10 analogous statements (F1, F2, ...) ... } for (int j = 0; j<12; j++) for (int k = 0; k<12; k++) A[j][k] += (..(K5*F9)+(K8*F10))*Y1[i][j])+ +(((K0*X1 D100[i][k])+(K3*X1 D010[i][k])+(K6*X1 D001[i][k]))*Y2[i][j]))*F11)+ +(..((K2*X2 D100[i][k])+...+(K8*X2 D001[i][k]))*((K2*X2 D100[i][j])+...+(K8*X2 D001[i][j]))..)+ + <roughly a hundred sum/muls go here>)..)* *det*W[i]); } } The actual complexity of a local assembly kernel depends on the finite element problem being solved. In simpler cases, the loop nest is perfect, has short trip counts (in the range 3–15), and the computation reduces to a summation of a few products involving basis functions. An example is provided in Listing 1, which shows the assembly kernel for a Helmholtz problem using Lagrange basis functions on 2D elements with polynomial order p = 1. In other scenarios, for instance when solving the Burgers equation, ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:6 F. Luporini et al. the number of arrays involved in the computation of the element matrix can be much larger. The assembly code is given in Listing 2 and contains 14 unique arrays that are accessed, where the same array can be referenced multiple times within the same expression. This may also require the evaluation of constants in outer loops (called F in the code) to act as scaling factors of arrays. Trip counts grow proportionally to the order of the method and arrays may be block-sparse. In addition to a larger number of operations, more complex cases like the Burgers equation are characterized by high register pressure. The Helmholtz and Burgers equations exemplify a large class of problems and, as such, will constitute our benchmark problems, along with the Diffusion equation. We carefully motivate this choice in Section 5.2. Despite the infinite variety of assembly kernels which Firedrake can generate, it is still possible to identify common domain-specific traits that can be exploited for effective code transformations and SIMD vectorization. These include: 1) memory accesses along the three loop dimensions are always unit stride; 2) the j and k loops are interchangeable, whereas interchanges involving the i loop require pre-computation of values (e.g. the F values in Burgers) and introduction of temporary arrays, as explained in Section 3; 3) depending on the problem being solved, the j and k loops could iterate over the same iteration space; 4) most of the sub-expressions on the right hand side of the element matrix computation depend on just two loops (either i-j or i-k). In Section 3 we show how to exploit these observations to define a set of systematic, composable optimizations. 3. CODE TRANSFORMATIONS The code transformations presented in this section are applicable to all finite element problems that can be formulated in Firedrake. As already emphasized, the structure of mathematical expressions evaluating the element matrix and the variation in loop trip counts, although typically limited to the order of tens of iterations, render the optimization process challenging. It is not always the same set of optimizations that bring performance closest to the machine peak. For example, the Burgers problem in Listing 2, given the large number of arrays accessed, suffers from high register pressure, whereas the Helmholtz problem in Listing 1 does not; this intuitively suggests that the two problems require a different treatment, based on an in-depth analysis of both data and iteration spaces. Furthermore, domain-knowledge enables transformations that a general-purpose compiler could not apply, making the optimization space even larger. In this context, our goal is to understand the relationship between distinct code transformations, their impact on local assembly kernels, and to what extent their composability is effective in a class of problems and architectures. 3.1. Padding and Data Alignment The absence of stencils renders the element matrix computation easily autovectorizable by a vendor compiler. Nevertheless, auto-vectorization is not efficient if data are not aligned and if the length of the innermost loop is not a multiple of the vector length VL, especially when the loops are small as in local assembly. Data alignment is enforced in two steps. Firstly, all arrays are allocated to addresses that are multiples of VL. Then, two dimensional arrays are padded by rounding the number of columns to the nearest multiple of VL. For instance, assume the original size of a basis function array is 3×3 and VL = 4 (e.g. AVX processor, with 256 bit long vector registers and 64-bit double-precision floats). In this case, a padded version of the array will have size 3×4. The compiler is explicitly informed about data alignment using a suitable pragma. ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly A:7 Padding of all two dimensional arrays involved in the evaluation of the element matrix also allows to safely round the loop trip count to the nearest multiple of VL. This avoids the introduction of a remainder (scalar) loop from the compiler, which would render vectorization less efficient. These extra iterations only write to the padded region of the element matrix, and therefore have no side effects on the final result. 3.2. Generalized Loop-invariant Code Motion From the inspection of the codes in Listings 1 and 2, it can be noticed that the computation of A involves evaluating many sub-expressions which only depend on two iteration variables. Since symbols in most of these sub-expressions are read-only variables, there is ample space for loop-invariant code motion. Vendor compilers apply this technique, although not in the systematic way we need for our assembly kernels. We want to overcome two deficiencies that both Intel and GNU compilers exhibit. First, they only identify sub-expressions that are invariant with respect to the innermost loop. This is an issue for sub-expressions depending on i-k, which are not automatically lifted in the loop order ijk. Second, the hoisted code is scalar and therefore not subjected to auto-vectorization. We work around these limitations with source-level loop-invariant code motion. In particular, we pre-compute all values that an invariant sub-expression assumes along its fastest varying dimension. This is implemented by introducing a temporary array per invariant sub-expression and by adding a new loop to the nest. At the price of extra memory for storing temporaries, the gain is that lifted terms can be autovectorized as part of an inner loop. Given the short trip counts of our loops, it is important to achieve auto-vectorization of hoisted terms in order to minimize the percentage of scalar instructions, which could otherwise be significant. It is also worth noting that, in some problems (e.g. Helmholtz), invariant sub-expressions along j are identical to those along k, and both loops iterate over the same iteration space, as anticipated in Section 2. In these cases, we safely avoid redundant pre-computation. Listing 3 shows the Helmholtz assembly code after the application of loop-invariant code motion, padding, and data alignment. 3.3. Model-driven Vector-register Tiling One notable problem of assembly kernels concerns register allocation and register locality. The critical situation occurs when loop trip counts and the variables accessed are such that the vector-register pressure is high. Since the kernel’s working set fits the L1 cache, it is particularly important to optimize register management. Standard optimizations, such as loop interchange, unroll, and unroll-and-jam, can be employed to deal with this problem. In COFFEE, these optimizations are supported either by means of explicit code transformations (interchange, unroll-and-jam) or indirectly by delegation to the compiler through standard pragmas (unroll). Tiling at the level of vector registers is an additional feature of COFFEE. Based on the observation that the evaluation of the element matrix can be reduced to a summation of outer products along the j and k dimensions, a model-driven vector-register tiling strategy can be implemented. If we consider the code snippet in Listing 3 and we ignore the presence of the operation det*W3[i], the computation of the element matrix is abstractly expressible as X Ajk = xj · yk j, k = 0, ..., 2 (1) x∈B 0 ⊆B y∈B 00 ⊆B where B is the set of all basis functions (or temporary variables, e.g., LI 0) accessed in the kernel, whereas B 0 and B 00 are generic problem-dependent subsets. Regardless of ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:8 F. Luporini et al. LISTING 3: Local assembly code for the Helmholtz problem in Listing 1 after application of padding, data alignment, and licm, for an AVX architecture. In this example, sub-expressions invariant to j are identical to those invariant to k, so they can be precomputed once in the r loop. void helmholtz(double A[3][4], double **coords) { #define ALIGN attribute ((aligned(32))) // K, det = Compute Jacobian (coords) static const double W[3] ALIGN = {...} static const double X D10[3][4] ALIGN = {{...}} static const double X D01[3][4] ALIGN = {{...}} for (int i = 0; i<3; i++) { double LI 0[4] ALIGN; double LI 1[4] ALIGN; for (int r = 0; r<4; r++) { LI 0[r] = ((K1*X D10[i][r])+(K3*X D01[i][r])); LI 1[r] = ((K0*X D10[i][r])+(K2*X D01[i][r])); } for (int j = 0; j<3; j++) #pragma vector aligned for (int k = 0; k<4; k++) A[j][k] += (Y[i][k]*Y[i][j]+LI 0[k]*LI 0[j]+LI 1[k]*LI 1[j])*det*W[i]); } } the specific input problem, by abstracting from the presence of all variables independent of both j and k, the element matrix computation is always reducible to this form. Figure 2 illustrates how we can evaluate 16 entries (j, k = 0, ..., 3) of the element matrix using just 2 vector registers, which represent a 4×4 tile, assuming |B 0 | = |B 00 | = 1. Values in a register are shuffled each time a product is performed. Standard compiler auto-vectorization for both GNU and Intel compilers, instead, executes 4 broadcast operations (i.e., “splat” of a value over all of the register locations) along the outer dimension to perform the calculation. In addition to incurring a larger number of cache accesses, it needs to keep between f = 1 and f = 3 extra registers to perform the same 16 evaluations when unroll-and-jam is used, with f being the unroll-and-jam factor. After the first permutation Intial configuration x 0 1 2 3 0 1 × y 0 1 1,1 3 After the second permutation After the third permutation 0 1 2 3 1 0 3 2 2 3 = 2,2 3,3 0,1 1,0 2 3 0 1 × × = A 0,0 2 0 1 3 2 3,2 0,2 1,3 3 1 0 2,1 3,0 = = 2,3 2 × 2,0 3,1 0,3 1,2 Fig. 2: Outer-product vectorization by permuting values in a vector register. The storage layout of A, however, is incorrect after the application of this outerproduct-based vectorization (op-vect, in the following). It can be efficiently restored with a sequence of vector shuffles following the pattern highlighted in Figure 3, executed once outside of the ijk loop nest. The generated pseudo-code for the simple Helmholtz problem when using op-vect is shown in Figure 4. ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly Initial configuration After the first set of shuffles A:9 After the second set of shuffles Layout restored (0, 0) (1, 1) (2, 2) (3, 3) (0, 0) (1, 1) (2, 2) (3, 3) (0, 0) (0, 1) (2, 2) (2, 3) (0, 0) (0, 1) (0, 2) (0, 3) (0, 1) (1, 0) (2, 3) (3, 2) (0, 1) (1, 0) (2, 3) (3, 2) (1, 0) (1, 1) (3, 2) (3, 3) (1, 0) (1, 1) (1, 2) (1, 3) (0, 2) (1, 3) (2, 0) (3, 1) (0, 2) (1, 3) (2, 0) (3, 1) (0, 2) (0, 3) (2, 0) (2, 1) (2, 0) (2, 1) (2, 2) (2, 3) (0, 3) (1, 2) (2, 1) (3, 0) (0, 3) (1, 2) (2, 1) (3, 0) (1, 2) (1, 3) (3, 0) (3, 1) (3, 0) (3, 1) (3, 2) (3, 3) Fig. 3: Restoring the storage layout after op-vect. The figure shows how 4×4 elements in the top-left block of the element matrix A can be moved to their correct positions. Each rotation, represented by a group of three same-colored arrows, is implemented by a single shuffle intrinsic. LISTING 4: Local assembly code generated by Firedrake for the Helmholtz problem after application of op-vect on top of the optimizations shown in Listing 3. In this example, the unrolland-jam factor is 1. void helmholtz(double A[4][4], double **coords) { // K, det = Compute Jacobian (coords) // Declaration of basis function matrices for (int i = 0; i<3; i++) { // Do generalized loop-invariant code motion for (int j = 0; j<4; j+=4) for (int k = 0; k<4; k+=4) { // load and set intrinsics // Compute A[0,0], A[1,1], A[2,2], A[3,3] // One permute pd intrinsic per k-loop load // Compute A[0,1], A[1,0], A[2,3], A[3,2] // One permute2f 128 pd intrinsic per k-loop load // ... } // Remainder loop (from j = 4 to j = 6) } // Restore the storage layout: for (int j = 0; j<4; j+=4) { m256d r0, r1, r2, r3, r4, r5, r6, r7; for (int k = 0; k<4; k+=4) { r0 = mm256 load pd (&A[j+0][k]); // Load A[j+1][k], A[j+2][k], A[j+3][k] r4 = mm256 unpackhi pd (r1, r0); r5 = mm256 unpacklo pd (r0, r1); r6 = mm256 unpackhi pd (r2, r3); r7 = mm256 unpacklo pd (r3, r2); r0 = mm256 permute2f128 pd (r5, r7, 32); r1 = mm256 permute2f128 pd (r4, r6, 32); r2 = mm256 permute2f128 pd (r7, r5, 49); r3 = mm256 permute2f128 pd (r6, r4, 49); mm256 store pd (&A[j+0][k], r0); // Store A[j+1][k], A[j+2][k], A[j+3][k] } } } ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:10 F. Luporini et al. 3.4. Expression Splitting LISTING 5: Local assembly code generated by Firedrake for the Helmholtz problem in which split has been applied on top of the optimizations shown in Listing 3. In this example, the split factor is 2. void helmholtz(double A[3][4], double **coords) { // Same code as in Listing 3 up to the j loop for (int j = 0; j<3; j++) #pragma vector aligned for (int k = 0; k<4; k++) A[j][k] += (Y[i][k]*Y[i][j]+LI 0[k]*LI 0[j])*det*W3[i]; for (int j = 0; j<3; j++) #pragma vector aligned for (int k = 0; k<4; k++) A[j][k] += LI 1[k]*LI 1[j]*det*W3[i]; } In complex kernels, like Burgers in Listing 2, and on certain architectures, achieving effective register allocation can be challenging. If the number of variables independent of the innermost-loop dimension is close to or greater than the number of available CPU registers, poor register reuse is likely. This usually happens when the number of basis function arrays, temporaries introduced by generalized loop-invariant code motion, and problem constants is large. For example, applying loop-invariant code motion to Burgers on a 3D mesh requires 24 temporaries for the ijk loop order. This can make hoisting of the invariant loads out of the k loop inefficient on architectures with a relatively low number of registers. One potential solution to this problem consists of suitably “splitting” the computation of the element matrix A into multiple sub-expressions; an example, for the Helmholtz problem, is given in Listing 5. The transformation can be regarded as a special case of classic loop fission, in which associativity of the sum is exploited to distribute the expression across multiple loops. To the best of our knowledge, expression splitting is not supported by available compilers. Splitting an expression has, however, several drawbacks. Firstly, it increases the number of accesses to A proportionally to the “split factor”, which is the number of sub-expressions produced. Also, depending on how the split is executed, it can lead to redundant computation. For example, the number of times the product det ∗ W 3[i] is performed is proportional to the number of sub-expressions, as shown in the code snippet. Further, it increases loop overhead, for example through additional branch instructions. Finally, it might affect register locality: for instance, the same array could be accessed in different sub-expressions, requiring a proportional number of loads be performed. This is not the case for the Helmholtz example. Nevertheless, as shown in Section 5, the performance gain from improved register reuse along inner dimensions can still be greater, especially if the split factor and the splitting itself use heuristics to minimize the aforementioned issues. Table II summarizes the code transformations described so far. Given that many of these transformations depend on some parameters (e.g. tile size), we need a mechanism to prune such a large optimization space. This aspect is treated in Section 4. 4. OVERVIEW OF COFFEE Firedrake users employ the Unified Form Language to express problems in a notation resembling mathematical equations. At run-time, the high-level specification is translated by a modified version of the FEniCS Form Compiler (FFC) [Kirby and Logg 2006] ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly A:11 Table II: Overview of code transformations for Firedrake-generated assembly kernels. Name (Abbreviation) Generalized loop-invariant code motion (licm) Padding Data Alignment Loop interchange Loop unrolling Outer-product vectorization (op-vect) Expression splitting (split) Parameter loops unroll factor tile size split point, split factor into an abstract syntax tree (AST) representation of one or more finite element assembly kernels. ASTs are then passed to COFFEE to apply the transformations described in Section 3. The output of COFFEE, C code, is eventually provided to PyOP2 [Rathgeber et al. 2012; Markall et al. 2013], where just-in-time compilation and execution over the discretized domain take place. The flow is summarized in Figure 4. Because of the large number of parametric transformations, COFFEE needs a mechanism to select the most suitable optimization strategy for a given problem. Autotuning might be used, although it would significantly increase the run-time overhead, since the generation of ASTs occurs at run-time as soon as problem-specific data are available. Our optimization strategy, based on heuristics and a simple cost model, is described in the following, along with an overview of the compiler. The compiler structure is outlined in Figure 5. Initially the AST is inspected, looking for the presence of iteration spaces and domain-specific information provided by the higher layer. If the kernel lacks an iteration space, then so-called inter-kernel vectorization, in which the outer, non-affine loop over mesh elements is vectorized, can be applied. This feature, currently under development, has been shown to be useful in several finite volume applications [Reguly et al. 2007]. Subsequently, an ordered sequence of optimization steps are executed. Application of licm must precede padding and data alignment, due to the introduction of temporary arrays. Based on a cost model, loop interchange, split, and op-vect may be introduced. Their implementation is based on analysis and transformation of the kernel’s AST. When op-vect is selected, the compiler outputs AVX or AVX-512 intrinsics code. Any possible corner cases are handled: for example, if op-vect is to be applied, but the size of the iteration space is not a multiple of the vector length, then a remainder loop, amenable to auto-vectorization, is inserted. All loops are interchangeable, provided that temporaries are introduced if the nest is not perfect. For the employed storage layout, the loop permutations ijk and ikj are UFL UFL code FFC Kernel AST COFFEE Kernel C code PyOP2 Run-time compilation Execution over the mesh Handle parallelism Unstructured mesh used to discretized the domain of the PDE. A local assembly kernel is executed in all cells Fig. 4: High-level view of Firedrake. COFFEE is at the core, receiving ASTs from a modified version of the FEniCS Form compiler and producing optimized C code kernels. ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:12 F. Luporini et al. Input: ast: abstract syntax tree of a local assembly kernel produced by FFC wrapper: the function within which the kernel is invoked isa: represents the SIMD Instruction Set Architecture Output: assembly code (C string) // Analyze ast and build optimization plan it space = analyze(ast) if not it space ast.apply inter kernel vectorization(wrapper, isa) return wrapper + ast.from ast to c() plan = cost model(it space.n inner arrays, isa.n regs) // Optimize ast based on plan ast.licm() ast.padding() ast.align data() if plan.permute ast.permute assembly loops() if plan.split factor ast.split(plan.split factor) if plan.uaj factor uaj = MIN(plan.uaj factor, it space.j.size/isa.vf) ast.op vect(uaj) return wrapper + ast.from ast to c() Fig. 5: Outline of the COFFEE architecture. likely to maximize performance. Conceptually, this is motivated by the fact that if the i loop were in an inner position, then a significantly higher number of load instructions would be required at every iteration. We tested this hypothesis in manually crafted kernels. We found that the performance loss is greater than the gain due to the possibility of accumulating increments in a register, rather than memory, along the i loop. The choice between ijk and ikj depends on the number of load instructions that can be hoisted out of the innermost dimension. Our compiler chooses as outermost the loop along which the number of invariant loads is smaller so that more registers remain available to carry out the computation of the element matrix. Loop unroll (or unroll-and-jam of outer loops) is fundamental to the exposure of instruction-level parallelism, and tuning the unroll factor is particularly important. However, we noticed, by comparison with implementations having manually-unrolled loops, that recent versions of the Intel compiler estimate close-to-optimal unroll factors when the loops are affine and their bounds are small and known at compile-time, which is the case of our kernels. We therefore leave the backend compiler in charge of selecting unroll factors. This choice also simplifies COFFEE’s cost model. The only situation in which we explicitly unroll-and-jam a loop is when op-vect is used, since the transformed code prevents the Intel compiler from applying this optimization, even if specific pragmas are added. The cost model is shown in Figure 6. It takes into account the number of available logical vector registers, n regs, and the number of unique variables accessed: n consts counts variables independent of both j and k loops and temporary registers, n outer arrays counts j-dependent variables, and n inner arrays counts k-dependent variables, assuming the ijk loop order. These values are used to estimate unroll-andjam and split factors for op-vect and split. If a factor is 0, then the corresponding transformation is not applied. The split transformation is triggered whenever the number of hoistable terms is larger than the available registers along the outer dimension (lines 3-8), which is approximated as half of the total (line 3). A split factor of n means that the assembly expression should be “cut” into n sub-expressions. Depending on ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly 1 2 3 4 5 6 7 8 9 10 11 12 13 14 A:13 Input: n outer arrays, n inner arrays, n consts, n regs Output: uaj factor, split factor n outer regs = n regs / 2 split factor = 0 // Compute spltting factor while n outer arrays > n outer regs n outer arrays = n outer arrays / 2 split factor = split factor + 1 // Compute unroll-and-jam factor for op-vect n regs avail = n regs - (n outer arrays + n consts) uaj factor = n reg avail / n inner arrays // Estimate the benefit of permuting loops permute = n outer arrays > n inner arrays return <permute, split factor, uaj factor> Fig. 6: The cost model is employed by the compiler to estimate the most suitable unrolland-jam (when op-vect is used) and split factors, avoiding the overhead of auto-tuning. the structure of the assembly expression, each sub-expression might end up accessing a different number of arrays; the cost model is simplified by assuming that all sub-expressions are of the same size. The unroll-and-jam factor for the op-vect transformation is determined as a function of the available logical registers, i.e., those not used for storing hoisted terms (line 9-11). Finally, the profitability of loop interchange is evaluated (line 13). 5. PERFORMANCE EVALUATION 5.1. Experimental Setup Experiments were run on a single core of two Intel architectures, a Sandy Bridge (I72600 CPU, running at 3.4GHz, 32KB L1 cache and 256KB L2 cache) and a Xeon Phi (5110P, running at 1.05Ghz in native mode, 32KB L1 cache and 512KB L2 cache). We have chosen these two architectures because of the differences in the number of logical registers and SIMD lanes, which can impact the effectiveness of the optimization strategy. The icc 13.1 compiler was used. On the Sandy Bridge, the compilation flags used were -O2 and -xAVX for auto-vectorization. On the Xeon Phi, optimization level -O3 was used. Other optimization levels performed, in general, slightly worse. 5.2. The Helmholtz, Diffusion, and Burgers equations Our code transformations were evaluated in three real-world problems based on the following PDEs (1) Helmholtz (2) Advection-Diffusion (3) Burgers The three chosen benchmarks are real-life kernels and comprise the core differential operators in some of the most frequently encountered finite element problems in scientific computing. The Helmholtz and Diffusion kernels are archetypal second order elliptic operators. They are complete and unsimplified examples of the operators occurring for diffusion and viscosity in fluids, and for imposing pressure in compressible fluids. As such, they are both extensively used in climate and ocean modeling. Very similar operators, for which the same optimisations are expected to be equally effective, apply to elasticity problems, which are at the base of computational structural mechanics. The Burgers kernel is a typical example of a first order hyperbolic conservation law, which occurs in real applications whenever a quantity is transported by a fluid (the momentum itself, in our case). We chose this particular kernel since it apACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:14 F. Luporini et al. Table III: Performance improvement due to generalized loop-invariant code motion, for different element shapes (triangle, tetrahedron, prism) and polynomial orders (p ∈ [1, 4]), over the original non-optimized code, for the Helmholtz, Diffusion and Burgers problems. Sandy Bridge p2 p3 1.46 1.68 2.10 2.64 2.28 2.45 problem Helmholtz Helmholtz Helmholtz shape triangle tetrahedron prism p1 1.05 1.36 2.16 Diffusion Diffusion Diffusion triangle tetrahedron prism 1.09 1.30 2.15 1.68 2.20 1.82 Burgers Burgers Burgers triangle tetrahedron prism 1.53 1.61 2.11 1.81 2.24 2.20 p4 1.67 2.27 2.06 p1 1,49 1,28 1,04 Xeon p2 1,06 1,29 2,26 Phi p3 1,05 2,05 1,93 p4 1,17 1,73 1,64 1.97 3.12 2.71 1.64 2.60 2.32 1,07 1,00 1,11 1,06 1,38 2,16 1,18 2,02 1,85 1,16 1,74 2,83 2.68 1.69 1.66 2.46 1.59 1.32 1,21 1,01 1,39 1,42 2,55 1,56 2,34 0,98 1,18 2,97 1,21 1,04 plies to a vector-valued quantity, while the elliptic operators apply to scalar quantities; this impacts the generated code, as explained next. In this way, the operators we have selected are characteristic of both the second and first order operators that dominate in fluids and solids simulations, and a wide variety on local assembly codes can be tested. The benchmarks were written in UFL (code available at [Luporini 2014]) and executed over real unstructured meshes through Firedrake. The Helmholtz code has already been shown in Listing 1. For Advection-Diffusion, the Diffusion equation, which uses the same differential operators as Helmholtz, is considered. In the Diffusion kernel code, the main differences with respect to Helmholtz are the absence of the Y array and the presence of a few more constants for computing the element matrix. Burgers is a non-linear problem employing differential operators different from those of Helmholtz and relying on vector-valued quantities, which has a major impact on the generated assembly code (see Listing 2), where a larger number of basis function arrays (X1, X2, ...) and constants (F 0, F 1, ..., K0, K1, ...) are generated. These problems were studied varying both the shape of mesh elements and the polynomial order p of the method, whereas the element family, Lagrange, is fixed. As might be expected, the larger the element shape and p, the larger the iteration space. Triangles, tetrahedron, and prisms were tested as element shape. For instance, in the case of Helmholtz with p = 1, the size of the j and k loops for the three element shapes is, respectively, 3, 4, and 6. Moving to bigger shapes has the effect of increasing the number of basis function arrays, since, intuitively, the behavior of the equation has now to be approximated also along a third axis. On the other hand, the polynomial order affects only the problem size (the three loops i, j, and k, and, as a consequence, the size of X and Y arrays). A range of polynomial orders from p = 1 to p = 4 were tested; higher polynomial orders are excluded from the study because of current Firedrake limitations. In all these cases, the size of the element matrix rarely exceeds 30×30, with a peak of 105×105 in Burgers with prisms and p = 4. 5.3. Loop permutation In the following, only results for the loop order ijk are shown. For the considerations exposed in Section 4, loop interchanges having an inner loop along i caused slow downs; also, interchanging j and k loops while keeping i as outermost loop did not provide any benefits. ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly A:15 Table IV: Performance improvement due to generalized loop-invariant code motion, data alignment, and padding, for different element shapes (triangle, tetrahedron, prism) and polynomial orders (p ∈ [1, 4]), over the original non-optimized code, for the Helmholtz, Diffusion and Burgers problems. Sandy Bridge p2 p3 problem shape p1 Helmholtz Helmholtz Helmholtz triangle tetrahedron prism 1.32 1.35 2.63 1.88 3.32 2.74 Diffusion Diffusion Diffusion triangle tetrahedron prism 1.38 1.41 2.55 Burgers Burgers Burgers triangle tetrahedron prism 1.56 1.61 2.19 Xeon Phi p2 p3 p4 p1 2.87 2.66 2.43 4.13 3.27 2.75 1,50 1,41 2,38 2,41 1,50 2,47 1,30 2,79 2,15 1,96 2,81 1,71 p4 1.99 3.70 3.13 3.07 3.18 2.73 4.28 3.82 2.69 1,08 1,05 2,41 1,88 1,51 2,52 1,20 2,76 2,05 1,97 3,00 2,48 2.28 2.10 2.32 2.61 1.60 1.64 2.77 1.78 1.42 2,84 1,48 2,18 2,26 3,83 2,82 3,96 1,55 1,24 4,27 1,29 1,25 5.4. Impact of Generalized Loop-invariant Code Motion Table III illustrates the performance improvement obtained when licm is applied. In general, the speed ups are notable. The main reasons were anticipated in Section 3.2: in the original code, 1) sub-expressions invariant to outer loops are not automatically hoisted, while 2) sub-expressions invariant to the innermost loop are hoisted, but their execution is not auto-vectorized. These observations come from inspection of assembly code generated by the compiler. The gain tends to grow with the computational cost of the kernels: bigger loop nests (i.e., larger element shapes and polynomial orders) usually benefit from the reduction in redundant computation, even though extra memory for the temporary arrays is required. Some discrepancies to this trend are due to a less effective auto-vectorization. For instance, on the Sandy Bridge, the improvement at p = 3 is larger than that at p = 4 because, in the latter case, the size of the innermost loop is not a multiple of the vector length, and a reminder scalar loop is introduced at compile time. Since the loop nest is small, the cost of executing the extra scalar iterations can have a significant impact. The reminder loop overhead is more pronounced on the Xeon Phi, where the vector length is twice as big, which leads to proportionally larger scalar reminder loops. 5.5. Impact of Padding and Data Alignment Table IV shows the cumulative impact of licm, data alignment, and padding over the original code. In the following, this version of the code is referred to as licm-ap. Padding, which avoids the introduction of a reminder loop as described in Section 5.4, as well as data alignment, enhance the quality of auto-vectorization. Occasionally the run-time of licm-ap is close to that of licm, since the non-padded element matrix size is already a multiple of the vector length. Rarely licm-ap is slower than licm (e.g. in Burgers p = 3 on the Sandy Bridge). One possible explanation is that the number of aligned temporaries introduced by licm is so large to induce cache associativity conflicts. 5.6. Impact of Vector-register Tiling In this section, we evaluate the impact of vector-register tiling. We compare two versions: the baseline, licm-ap; and vector-register tiling on top of licm-ap, which in the following is referred to simply as op-vect. Figures 7 and 8 illustrate the speed up achieved by op-vect over licm-ap in the Helmoltz and Diffusion kernels, respectively. As explained in Section 4, the op-vect version requires the unroll-and-jam factor to be explicitly set. To distinguish between the two ways this parameter was determined, for each problem instance (equation, element ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:16 F. Luporini et al. shape, polynomial order) we report two bars: one shows the best speed-up obtained after all feasible unroll-and-jam factors were tried; the other shows the speed up when the unroll-and-jam factor was retrieved via the cost model. In a plot legend, cost model bars are suffixed with “CM”. It is worth noticing that, in most cases, the cost model successfully determines how to transform a kernel to maximize its performance. This is chiefly because assembly kernels fit the L1 cache, so, within a certain degree of confidence, it is possible to predict how to obtain a fast implementation by simply reasoning on the register pressure. For each problem, the cost model stated to use the default loop permutation, to apply a particular unroll-and-jam factor, and not to perform expression splitting, which, as explained in Section 5.7, only deteriorates performance in Helmholtz and Diffusion. The rationale behind these results is that the effect of op-vect is significant in problems in which the assembly loop nest is relatively big. When the loops are short, since the number of arrays accessed at every loop iteration is rather small (between 4 and 8 temporaries, plus the element matrix itself), there is no need for vector-register tiling; extensive unrolling is sufficient to improve register re-use and, therefore, to maximize the performance. However, as the iteration space becomes larger, op-vect leads to improvements up to 1.4× on the Sandy Bridge (Diffusion, prismatic mesh, p = 4 - increasing the overall speed up from 2.69× to 3.87×), and up to 1.4× on the Xeon Phi (Helmholtz, tetrahedral mesh, p = 3 - bringing the overall speed up from 1.71× to 2.42×). Using the Intel Architecture Code Analyzer tool [Intel Corporation 2012] on the Sandy Bridge, we confirmed that speed ups are a consequence of increased register re-use. In Helmholtz p = 4, for example, the tool showed that when using op-vect the number of clock cycles to execute one iteration of the j loop decreases by roughly 17%, and that this is a result of the relieved pressure on both of the data (cache) ports available in the core. On the Sandy Bridge, we have also measured the performance of individual kernels in terms of floating-point operations per second. The theoretical peak on a single core, with the Intel Turbo Boost technology activated, is 30.4 GFlop/s. In the case of Diffusion using a prismatic mesh and p = 4, we achieved a maximum of 21.9 GFlop/s with op-vect enabled, whereas 16.4 GFlop/s was obtained when only licm-ap is used. This result is in line with the expectations: analysis of assembly code showed that, in the jk loop nest, which in this problem represents the bulk of the computation, 73% of instructions are actually floating-point operations. Application of op-vect to the Burgers problem induces significant slow downs due to the large number of temporary arrays that need to be tiled, which exceeds the available logical registers on the underlying architecture. Expression splitting can be used in combination with op-vect to alleviate this issue; this is discussed in the next section. 5.7. Impact of Expression Splitting Expression splitting relieves the register pressure when the element matrix evaluation needs to read from a large number of basis function arrays. As detailed in Section 3.4, in the price to pay for this optimazion, there are an increased number of accesses to the element matrix and, potentially, redundant computation. Similarly to the analysis of vector-register tiling, we compare two versions: the baseline, licm-ap; and expression splitting on top of licm-ap, which, for simplicity, in the following is referred to as split. For the Helmholtz and Diffusion kernels, in which only between 4 and 8 temporaries are read at every loop iteration, split tends to slow down the computation, because of the aforementioned drawbacks. Slow downs up to 1.4× and up to 1.6× were observed, respectively, on the Sandy Bridge and the Xeon Phi. Note that the cost model prevents ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly 1.4 Triangles Triangles-CM Tetrahedrons Tetrahedrons-CM Prisms Prisms-CM 1.2 1 0.8 0.6 p1 p2 p3 Impact of op-vect on the Helmoltz kernel (Xeon Phi) Performance improvement over licm-ap Performance improvement over licm-ap Impact of op-vect on the Helmholtz kernel (Sandy Bridge) 1.6 A:17 p4 1.6 1.4 Triangles Triangles-CM Tetrahedrons Tetrahedrons-CM Prisms Prisms-CM 1.2 1 0.8 0.6 p1 Polynomial Order p2 p3 p4 Polynomial Order (a) Sandy Bridge (b) Xeon Phi Fig. 7: Performance improvement over licm-ap obtained by op-vect in the Helmholtz kernel. Bars suffixed with “CM” indicate that the cost model was used to transform the kernel. 1.4 Triangles Triangles-CM Tetrahedrons Tetrahedrons-CM Prisms Prism-CM 1.2 1 0.8 0.6 p1 p2 p3 Polynomial Order (a) Sandy Bridge Impact of op-vect on the Diffusion kernel (Xeon Phi) Performance improvement over licm-ap Performance improvement over licm-ap Impact of op-vect on the Diffusion kernel (Sandy Bridge) 1.6 p4 1.6 1.4 Triangles Triangles-CM Tetrahedrons Tetrahedrons-CM Prisms Prism-CM 1.2 1 0.8 0.6 p1 p2 p3 p4 Polynomial Order (b) Xeon Phi Fig. 8: Performance improvement over licm-ap obtained by op-vect in the Diffusion kernel. Bars suffixed with “CM” indicate that the cost model was used to transform the kernel. the adoption of the transformation: the while statement in Figure 6 is indeed never entered. In the Burgers kernels, between 12 and 24 temporaries are accessed at every loop iteration, so split plays a key role on the Sandy Bridge, where the number of available logical registers is only 16. Figure 9 shows the performance improvement achieved by split over licm-ap. In almost all cases, a split factor of 1, meaning that the original expression was divided into two parts, ensured close-to-peak perforance. The transformation negligibly affected register locality, so speed ups up to 1.5× were observed. For instance, on the Sandy Bridge, when p = 4 and a prismatic mesh is employed, the overall performance improvement (i.e., the one over the original code) increases from 1.44× to 2.11×. On the Xeon Phi, the impact of split is only marginal, since register spilling is limited by the presence of 32 logical vector units. On the Sandy Bridge, the performance of the Burgers kernel on a prismatic mesh was 20.0 GFlop/s from p = 1 to p = 3, while it was 21.3 GFlop/s in the case of p = 4. These values are notably close to the peak performance of 30.4 GFlop/s. Disabling split makes the performance drop to 17.0 GFlop/s for p = 1, 2, 18.2 GFlop/s for p = 3, and 14.3 GFlop/s for p = 4. These values are in line with the speedups shown in Figure 9. ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:18 F. Luporini et al. The split transformation was also tried in combination with op-vect (split-op-vect), although the cost model prevents its adoption on both platforms. Despite improvements up to 1.22×, split-op-vect never outperforms split. This is motivated by two factors: for small split factors, such as 1 and 2, the data space to be tiled is still too big, and register spilling affects run-time; for higher ones, sub-expressions become so small that, as explained in Section 5.6, extensive unrolling already allows to achieve a certain degree of register re-use. 1.4 Triangles Triangles-CM Tetrahedrons Tetrahedrons-CM Prisms Prisms-CM 1.2 1 0.8 0.6 p1 p2 p3 Polynomial Order (a) Sandy Bridge Impact of split on the Burgers kernel (Xeon Phi) Performance improvement over licm-ap Performance improvement over licm-ap Impact of split on the Burgers kernel (Sandy Bridge) 1.6 p4 1.6 1.4 Triangles Triangles-CM Tetrahedrons Tetrahedrons-CM Prisms Prisms-CM 1.2 1 0.8 0.6 p1 p2 p3 p4 Polynomial Order (b) Xeon Phi Fig. 9: Performance improvement over licm-ap obtained by split in the Burgers kernel. Bars suffixed with “CM” indicate that the cost model was used to transform the kernel. 5.8. Comparison with FEniCS Form Compiler’s built-in Optimizations We have modified the FEniCS Form Compiler (FFC) to return an abstract syntax tree representation of a local assembly kernel, rather than plain C++ code, so as to enable code transformations in COFFEE. Besides Firedrake, FFC is used in the FEniCS project [Logg et al. 2012]. In FEniCS, FFC can apply its own model-driven optimizations to local assembly kernels [Olgaard and Wells 2010], which mainly consist of loop-invariant code motion and elimination, at code generation time, of floating point operations involving zero-valued entries in basis function arrays. The FEniCS Form Compiler’s loop-invariant code motion is different from COFFEE’s. It is based on expansion of arithmetic operations, for example applying distributivity and associativity to products and sums at code generation time, to identify terms that are invariant of the whole loop nest. Depending on the way expansion is performed, operation count may not decrease significantly. Elimination of zero-valued terms, which are the result of using vector-valued quantities in the finite element problem, has the effect of introducing indirection arrays in the generated code. This kind of optimization is currently under development in COFFEE, although it will differ from FEniCS’ by avoiding non-contiguous memory accesses, which would otherwise affect vectorization, at the price of removing fewer zero-valued contributions. Table V summarizes the performance achieved by COFFEE over the fastest FEniCS (FFC) implementation on the Sandy Bridge for the Burgers, Helmholtz and Diffusion kernels. Burgers’ slow downs occur in presence of a small iteration space (triangular mesh, p ∈ [1, 2]; tetrahedral mesh, p ∈ [1, 2]; prismatic mesh, p = 1). The result shown represents the worst slow down, which was obtained with a triangular mesh and p = 1. This is a result of removing zero-valued entries in FEniCS’ basis function arrays: some operations are avoided, but indirection arrays prevent auto-vectorization, ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly A:19 which significantly impacts performance as soon as the element matrix becomes bigger than 12×12. However, with the forthcoming zero-removal optimization in COFFEE, we expect to outperform FEniCS in all problems. In the cases of Helmholtz and Diffusion, the minimum improvements are, respectively, 1.10× and 1.18× (2D mesh, p = 1), which tend to increase with polynomial order and element shape up to the values illustrated in the table. Table V: Performance comparison between FEniCS and COFFEE on the Sandy Bridge. Problem Helmholtz Diffusion Burgers Max slow down 2.24× Max speed up 4.14× 4.28× 1.61× 5.9. Comparison with hand-made BLAS-based implementations For the Helmholtz problem on a tetrahedral mesh, manual implementations based on Intel MKL BLAS were tested on the Sandy Bridge. This particular kernel can be easily reduced to a sequence of four matrix-matrix multiplies that can be computed via calls to BLAS dgemm. In the case of p = 4, where the element matrix is of size 35×35, the computation was almost twice slower than the case in which licm-ap was used, with the slow down being even worse for smaller problem sizes. These experiments suggest that the question regarding to what extent linear algebra libraries can improve performance cannot be trivially answered. This is due to a combination of issues: the potential loss in data locality, as exposed in Section 3.4, the actual effectiveness of these libraries when the arrays are relatively small, and the problem inherent to assembly kernels concerning extraction of matrix-matrix multiplies from static analysis of the kernel’s code. A comprehensive study of these aspects will be addressed in further work. 6. RELATED WORK The finite element method is extensively used to approximate solutions of PDEs. Wellknown frameworks and applications include nek5000 [Paul F. Fischer and Kerkemeier 2008], the FEniCS project [Logg et al. 2012], Fluidity [AMCG 2010], and of course Firedrake. Numerical integration is usually employed to implement the local assembly phase. The recent introduction of domain specific languages (DSLs) to decouple the finite element specification from its underlying implementation facilitated, however, the development of novel approaches. Methods based on tensor contraction [Kirby and Logg 2006] and symbolic manipulation [Russell and Kelly 2013] have been implemented. We have designed COFFEE to specifically target numerical integration because it has been demonstrated that it remains the optimal choice for a wide class of problems [Olgaard and Wells 2010]. Optimization of local assembly using numerical integration for CPU platforms has been addressed in FEniCS [Olgaard and Wells 2010]. The comparison between COFFEE and this work is presented in Section 5.8. In [Markall et al. 2010], and more recently in [Knepley and Terrel 2013], the problem has been studied for GPU architectures. In [Kruel and Bana 2013], variants of the standard numerical integration algorithm have been specialized and evaluated for the PowerXCell processor, but an exhaustive study from the compiler viewpoint - like ours - is missing, and none of the optimizations presented in Section 3 are mentioned. Among these efforts, to the best of our knowledge, COFFEE is the first work targeting low-level optimizations through a real compiler approach. ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:20 F. Luporini et al. Our compiler-based optimization approach is made possible by the top-level DSL, which enables automated code generation. DSLs have been proven successful in autogenerating optimized code for other domains: Spiral [Püschel et al. 2005] for digital signal processing numerical algorithms, [Spampinato and Püschel 2014] for dense linear algebra, or Pochoir [Tang et al. 2011] and SDSL [Henretty et al. 2013] for image processing and finite difference stencils. Similarly, PyOP2 is used by Firedrake to express iteration over unstructured meshes in scientific codes. COFFEE improves automated code generation in Firedrake. Many code generators, like those based on the Polyhedral model [Bondhugula et al. 2008] and those driven by domain-knowledge [Stock et al. 2011], make use of cost models. The alternative of using auto-tuning to select the best implementation for a given problem on a certain platform has been adopted by nek5000 [Shin et al. 2010] for small matrix-matrix multiplies, the ATLAS library [Whaley and Dongarra 1998], and FFTW [Frigo et al. 2005] for fast fourier transforms. In both cases, pruning the implementation space is fundamental to mitigate complexity and overhead. Likewise, COFFEE uses a cost model and heuristics (Section 4) to steer the optimization process. 7. CONCLUSIONS In this paper, we have presented the design, optimizations and systematic performance evaluation of COFFEE, a compiler for finite element local assembly. In this context, to the best of our knowledge, COFFEE is the first compiler capable of introducing low-level optimizations to maximize instruction-level parallelism, register locality and SIMD vectorization. Assembly kernels have particular characteristics. Their iteration space is usually very small, with the size depending on aspects like the degree of accuracy one wants to reach (polynomial order of the method) and the mesh discretization employed. The data space, in terms of number of arrays and scalars required to evaluate the element matrix, grows proportionally with the complexity of the finite element problem. COFFEE has been developed taking into account all of these degrees of freedom, based on the idea that reducing the problem of local assembly optimization to a fixed sequence of transformations is far too superficial if close-to-peak performance needs to be reached. The various optimizations overcome limitations of current vendor and research compilers. The exploitation of domain knowledge allows some of them to be particularly effective, as demonstrated by our experiments on two state-of-the-art Intel platforms. Further work includes a comprehensive study about feasibility and constraints on transforming kernels into a sequence of calls to external linear algebra libraries. COFFEE supports all of the problems expressible in Firedrake, and is already integrated with this framework. REFERENCES M. S. Alnæs, A. Logg, K. B. Ølgaard, M. E. Rognes, and G. N. Wells. 2014. Unified Form Language: A domainspecific language for weak formulations of partial differential equations. ACM Trans Math Software 40, 2, Article 9 (2014), 9:1–9:37 pages. DOI:http://dx.doi.org/10.1145/2566630 AMCG. 2010. Fluidity Manual (version 4.0-release ed.). Applied Modelling and Computation Group, Department of Earth Science and Engineering, South Kensington Campus, Imperial College London, London, SW7 2AZ, UK. available at http://hdl.handle.net/10044/1/7086. Uday Bondhugula, Albert Hartono, J. Ramanujam, and P. Sadayappan. 2008. A Practical Automatic Polyhedral Parallelizer and Locality Optimizer. In Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’08). ACM, New York, NY, USA, 101–113. DOI:http://dx.doi.org/10.1145/1375581.1375595 Zachary DeVito, Niels Joubert, Francisco Palacios, Stephen Oakley, Montserrat Medina, Mike Barrientos, Erich Elsen, Frank Ham, Alex Aiken, Karthik Duraisamy, Eric Darve, Juan Alonso, and Pat Hanrahan. 2011. Liszt: A Domain Specific Language for Building Portable Mesh-based PDE Solvers. In Proceedings of 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC ’11). ACM, New York, NY, USA, Article 9, 12 pages. DOI:http://dx.doi.org/10.1145/2063384.2063396 ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. COFFEE: an Optimizing Compiler for Finite Element Local Assembly A:21 Firedrake contributors. 2014. The Firedrake Project. http://www.firedrakeproject.org. (2014). Matteo Frigo, Steven, and G. Johnson. 2005. The design and implementation of FFTW3. In Proceedings of the IEEE. 216–231. Tom Henretty, Richard Veras, Franz Franchetti, Louis-Noël Pouchet, J. Ramanujam, and P. Sadayappan. 2013. A Stencil Compiler for Short-vector SIMD Architectures. In Proceedings of the 27th International ACM Conference on International Conference on Supercomputing (ICS ’13). ACM, New York, NY, USA, 13–24. DOI:http://dx.doi.org/10.1145/2464996.2467268 Intel Corporation. 2012. Intel architecture code analyzer (IACA). [Online]. Available: http://software.intel.com/en-us/articles/intel-architecture-code-analyzer/. Robert C. Kirby, Matthew Knepley, Anders Logg, and L. Ridgway Scott. 2005. Optimizing the Evaluation of Finite Element Matrices. SIAM J. Sci. Comput. 27, 3 (Oct. 2005), 741–758. DOI:http://dx.doi.org/10.1137/040607824 Robert C. Kirby and Anders Logg. 2006. A Compiler for Variational Forms. ACM Trans. Math. Softw. 32, 3 (Sept. 2006), 417–444. DOI:http://dx.doi.org/10.1145/1163641.1163644 Matthew G. Knepley and Andy R. Terrel. 2013. Finite Element Integration on GPUs. ACM Trans. Math. Softw. 39, 2, Article 10 (Feb. 2013), 13 pages. DOI:http://dx.doi.org/10.1145/2427023.2427027 Filip Kruel and Krzysztof Bana. 2013. Vectorized OpenCL Implementation of Numerical Integration for Higher Order Finite Elements. Comput. Math. Appl. 66, 10 (Dec. 2013), 2030–2044. DOI:http://dx.doi.org/10.1016/j.camwa.2013.08.026 Anders Logg, Kent-Andre Mardal, Garth N. Wells, and others. 2012. Automated Solution of Differential Equations by the Finite Element Method. Springer. DOI:http://dx.doi.org/10.1007/978-3-642-23099-8 Fabio Luporini. 2014. Helmholtz, Advection-Diffusion, and Burgers UFL code. https://github.com/ firedrakeproject/firedrake/tree/pyop2-ir-perf-eval/tests/perf-eval. (2014). Graham R. Markall, David A. Ham, and Paul H.J. Kelly. 2010. Towards generating optimised finite element solvers for {GPUs} from high-level specifications. Procedia Computer Science 1, 1 (2010), 1815 – 1823. DOI:http://dx.doi.org/10.1016/j.procs.2010.04.203 {ICCS} 2010. G. R. Markall, F. Rathgeber, L. Mitchell, N. Loriant, C. Bertolli, D. A. Ham, and P. H. J. Kelly. 2013. Performance portable finite element assembly using PyOP2 and FEniCS. In Proceedings of the International Supercomputing Conference (ISC) ’13 (Lecture Notes in Computer Science), Vol. 7905. In press. Kristian B. Olgaard and Garth N. Wells. 2010. Optimizations for quadrature representations of finite element tensors through automated code generation. ACM Trans. Math. Softw. 37, 1, Article 8 (Jan. 2010), 23 pages. DOI:http://dx.doi.org/10.1145/1644001.1644009 James W. Lottes Paul F. Fischer and Stefan G. Kerkemeier. 2008. nek5000 Web page. (2008). http://nek5000.mcs.anl.gov. Markus Püschel, José M. F. Moura, Jeremy Johnson, David Padua, Manuela Veloso, Bryan Singer, Jianxin Xiong, Franz Franchetti, Aca Gacic, Yevgen Voronenko, Kang Chen, Robert W. Johnson, and Nicholas Rizzolo. 2005. SPIRAL: Code Generation for DSP Transforms. Proceedings of the IEEE, special issue on “Program Generation, Optimization, and Adaptation” 93, 2 (2005), 232– 275. Florian Rathgeber, Graham R. Markall, Lawrence Mitchell, Nicolas Loriant, David A. Ham, Carlo Bertolli, and Paul H.J. Kelly. 2012. PyOP2: A High-Level Framework for Performance-Portable Simulations on Unstructured Meshes. In High Performance Computing, Networking, Storage and Analysis (SCC), 2012 SC Companion:. 1116–1123. DOI:http://dx.doi.org/10.1109/SC.Companion.2012.134 I. Z. Reguly, E. László, G. R. Mudalige, and M. B. Giles. 2007. Vectorizing Unstructured Mesh Computations for Many-core Architectures. In Proceedings of Programming Models and Applications on Multicores and Manycores (PMAM’14). ACM, New York, NY, USA, Article 39, 12 pages. DOI:http://dx.doi.org/10.1145/2560683.2560686 Diego Rossinelli, Babak Hejazialhosseini, Panagiotis Hadjidoukas, Costas Bekas, Alessandro Curioni, Adam Bertsch, Scott Futral, Steffen J. Schmidt, Nikolaus A. Adams, and Petros Koumoutsakos. 2013. 11 PFLOP/s Simulations of Cloud Cavitation Collapse. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis (SC ’13). ACM, New York, NY, USA, Article 3, 13 pages. DOI:http://dx.doi.org/10.1145/2503210.2504565 Francis P. Russell and Paul H. J. Kelly. 2013. Optimized Code Generation for Finite Element Local Assembly Using Symbolic Manipulation. ACM Trans. Math. Software 39, 4 (2013). Jaewook Shin, Mary W. Hall, Jacqueline Chame, Chun Chen, Paul F. Fischer, and Paul D. Hovland. 2010. Speeding Up Nek5000 with Autotuning and Specialization. In Proceedings of the 24th ACM International Conference on Supercomputing (ICS ’10). ACM, New York, NY, USA, 253–262. DOI:http://dx.doi.org/10.1145/1810085.1810120 Daniele G. Spampinato and Markus Püschel. 2014. A Basic Linear Algebra Compiler. In International Symposium on Code Generation and Optimization (CGO). ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY. A:22 F. Luporini et al. Kevin Stock, Tom Henretty, Iyyappa Murugandi, P. Sadayappan, and Robert Harrison. 2011. Model-Driven SIMD Code Generation for a Multi-resolution Tensor Kernel. In Proceedings of the 2011 IEEE International Parallel & Distributed Processing Symposium (IPDPS ’11). IEEE Computer Society, Washington, DC, USA, 1058–1067. DOI:http://dx.doi.org/10.1109/IPDPS.2011.101 Yuan Tang, Rezaul Alam Chowdhury, Bradley C. Kuszmaul, Chi-Keung Luk, and Charles E. Leiserson. 2011. The Pochoir Stencil Compiler. In Proceedings of the Twenty-third Annual ACM Symposium on Parallelism in Algorithms and Architectures (SPAA ’11). ACM, New York, NY, USA, 117–128. DOI:http://dx.doi.org/10.1145/1989493.1989508 Peter E. J. Vos, Spencer J. Sherwin, and Robert M. Kirby. 2010. From H to P Efficiently: Implementing Finite and Spectral/Hp Element Methods to Achieve Optimal Performance for Low- and High-order Discretisations. J. Comput. Phys. 229, 13 (July 2010), 5161–5181. DOI:http://dx.doi.org/10.1016/j.jcp.2010.03.031 R. Clint Whaley and Jack J. Dongarra. 1998. Automatically Tuned Linear Algebra Software. In Proceedings of the 1998 ACM/IEEE Conference on Supercomputing (Supercomputing ’98). IEEE Computer Society, Washington, DC, USA, 1–27. http://dl.acm.org/citation.cfm?id=509058.509096 ACM Transactions on Architecture and Code Optimization, Vol. V, No. N, Article A, Publication date: January YYYY.
5cs.CE
ON FUNCTION COMPOSITIONS THAT ARE POLYNOMIALS arXiv:1601.01779v1 [math.AC] 8 Jan 2016 ERHARD AICHINGER Abstract. For a polynomial map f : k n → k m (k a field), we investigate those polynomials g ∈ k[t1 , . . . , tn ] that can be written as a composition g = h ◦ f , where h : k m → k is an arbitrary function. In the case that k is algebraically closed of characteristic 0 and f is surjective, we will show that g = h◦f implies that h is a polynomial. 1. Introduction In the present note we investigate the situation that the value of a polynomial depends only on the value of certain given polynomials. To be precise, let k be a field, m, n ∈ N, and let g, f1, . . . , fm ∈ k[t1 , . . . , tn ]. We say that g is determined by f = (f1 , . . . , fm ) if for all a, b ∈ k n with f1 (a) = f1 (b), . . . , fm (a) = fm (b), we have g(a) = g(b). In other words, g is determined by f if and only if there is a function h : k m → k such that g(a) = h(f1 (a), . . . , fm (a)) for all a ∈ k n . For given f1 , . . . , fm ∈ k[t1 , . . . , tn ], the set of all elements of k[t1 , . . . , tn ] that are determined by (f1 , . . . , fm ) is a k-subalgebra of k[t1 , . . . , tn ]; we will denote this k-subalgebra by khf1 , . . . , fm i or khf i. As an example, we see that t1 ∈ Rht1 3 i; more generally, if (f1 , . . . , fm ) ∈ k[t1 , . . . , tn ]m induces an injective map from k n to k m , we have khf i = k[t1 , . . . , tn ]. In the present note, we will describe khf i in the case that k is algebraically closed and f induces a map from k n to k m that is surjective, or, in a sense specified later, at least close to being surjective. The first set that khf i is compared with is the k-subalgebra of k[t1 , . . . , tn ] generated by {f1 , . . . , fm }, which we will denote by k[f1 , . . . , fm ] or k[f ]; in this algebra, we find exactly those polynomials that can be written as p(f1 , . . . , fm ) with p ∈ k[x1 , . . . , xm ]. Clearly, k[f ] ⊆ khf i. The other inclusion need not hold f2 in general: on any field k, let f1 = t1 , f2 = t1 t2 . Then f21 = t1 t22 is (f1 , f2 )determined, but t1 t22 6∈ k[f1 , f2 ]. 2010 Mathematics Subject Classification. 13B25 (12E05). Key words and phrases. polynomial composition, polynomial maps. Supported by the Austrian Science Fund (FWF):P24077. 1 2 ERHARD AICHINGER The second set with which we will compare khf i is the set of all polynomials that can be written as rational functions in f1 , . . . , fm . We denote the quotient field of k[t1 , . . . , tn ] by k(t1 , . . . , tn ). For r1 , . . . , rm ∈ k(t1 , . . . , tn ), the subfield of k(t1 , . . . , tn ) that is generated by k ∪ {r1 , . . . , rm } is denoted k(r1 , . . . , rm ). We first observe that there are polynomials that can be written as rational functions in f , but fail to be f -determined. As an example, we see that t2 ∈ k(t1 , t1 t2 ), but since (0, 0 · 0) = (0, 0 · 1) and 0 6= 1, the polynomial t2 is not (t1 , t1 t2 )-determined. As for the converse inclusion, we take a field k of positive characteristic χ. Then t1 is (t1 χ )-determined, but t1 6∈ k(t1 χ ). On the positive side, it is known that k[f1 , . . . , fm ] = khf1 , . . . , fm i holds in the following cases (cf. [1, Theorem 3.1]): • k is algebraically closed, m = n = 1, and the derivative f ′ of f is not the zero polynomial, and, more generally, • k is algebraically closed, m = n, and there are univariate polynomials ′ g1 , . . . , gm ∈ k[t] with g1′ 6= 0, . . . , gm 6= 0, f1 = g1 (t1 ), . . . , fm = gm (tm ). Let us now briefly outline the results obtained in the present note: Let k be an algebraically closed field of characteristic 0, and let f1 , . . . , fm ∈ k[t1 , . . . , tn ] be algebraically independent over k. Then we have khf i ⊆ k(f ) (Theorem 3.3). The equality k[f ] = khf i holds if and only if f induces a map from k n to k m that is almost surjective (see Definition 2.1). This equality is stated in Theorem 3.4. Similar results are given for the case of positive characteristic. The last equality has a consequence on the functional decomposition of polynomials. If f induces a surjective mapping from k n to k m , (k algebraically closed of characteristic 0), and if h : k m → k is an arbitrary function such that h ◦ f is a polynomial function, then h is a polynomial function. In an algebraically closed field of positive characteristic χ, we will conclude that h is a composition of taking χ-th roots and a polynomial function (Corollary 4.2). 2. Preliminaries about polynomials For the notions from algebraic geometry used in this note, we refer to [2]; deviating from their definitions, we call the set of solutions of a system of polynomial equations an algebraic set (instead of affine variety). For an algebraically closed field k and A ⊆ k m , we let Im (A) (or simply I(A)) be the set of polynomials vanishing on every point in A, and for P ⊆ k[t1 , . . . , tm ], we let Vm (P ) (or simply V (P )) be the set of common zeroes of P in k m . The Zariski-closure V (I(A)) of a set A ⊆ k m will be abbreviated by A. The dimension of an algebraic set A is the maximal d ∈ {0, . . . , m} such that there are i1 < i2 < · · · < id ∈ {1, . . . , m} with I(A) ∩ k[xi1 , . . . , xid ] = {0}. We abbreviate the dimension of A by dim(A) and set dim(∅) := −1. For f1 , . . . , fm , g ∈ k[t1 , . . . , tn ], and ON FUNCTION COMPOSITIONS THAT ARE POLYNOMIALS 3 D := {(f1 (a), . . . , fm (a), g(a)) | a ∈ k n }, its Zariski-closure D is an irreducible algebraic set, and its dimension is the maximal number of algebraically independent elements in {f1 , . . . , fm , g}. The Closure Theorem [2, p. 258] tells that there exists an algebraic set W ⊆ k m+1 with dim(W ) < dim(D) such that D = D ∪ W . If dim(D) = m, then there exists an irreducible polynomial p ∈ k[x1 , . . . , xm+1 ] such that D = V (p). We will denote this p by Irr(D); Irr(D) is then defined up to a multiplication with a nonzero element from k. Above this, we recall that a set is constructible if and only if it can be generated from algebraic sets by a finite application of the set-theoretic operations of forming the union of two sets, the intersection of two sets, and the complement of a set, and that the range of a polynomial map from k n to k m and its complement are constructible. This is of course a consequence of the Theorem of Chevalley-Tarski [4, Exercise II.3.19], but since we are only concerned with the image of k n , it also follows from [2, p.262, Corollary 2]. Definition 2.1. Let k be an algebraically closed field, m, n ∈ N, and let f = (f1 , . . . , fm ) ∈ (k[t1 , . . . , tn ])m . By range(f ), we denote the image of the mapping f̂ : k n → k m that is induced by f . We say that f is almost surjective on k if the dimension of the Zariski-closure of k m \ range(f ) is at most m − 2. Proposition 2.2. Let k be an algebraically closed field, and let (f1 , . . . , fm ) ∈ k[t1 , . . . , tn ]m be almost surjective on k. Then the sequence (f1 , . . . , fm ) is algebraically independent over k. Proof: Seeking a contradiction, we suppose that there is u ∈ k[x1 , . . . , xm ] with u 6= 0 and u(f1 , . . . , fm ) = 0. Then range(f ) ⊆ V (u), hence dim(range(f )) ≤ m − 1. Since f is almost surjective, k m is then the union of two algebraic sets of dimension ≤ m − 1, a contradiction.  We will use the following easy consequence of the description of constructible sets: Proposition 2.3. Let k be an algebraically closed field, and let B be a constructible subset of k m with dim(B) ≥ m−1. Then there exist algebraic sets W, X such that W is irreducible, dim(W ) = m − 1, dim(X) ≤ m − 2, W \ X ⊆ B. Since B is constructible, there are irreducible algebraic sets V1 , . . . , Vp and Sp algebraic sets W1 , . . . , Wp with Wi ( Vi and B = i=1 (Vi \ Wi ) (cf. [2, p. 262]). We assume that the Vi ’s are ordered with nonincreasing dimension. If dim(V1 ) = m, then k m \ W1 ⊆ B. Let U be an irreducible algebraic set of dimension m − 1 with U 6⊆ W1 . Then U ∩ (k m \ W1 ) = U \ (W1 ∩ U). Since W1 ∩ U 6= U, setting W := U, X := W1 ∩ U yields the required sets. If dim(V1 ) = m − 1, then W := V1 and X := W1 are the required sets. The case dim(V1 ) ≤ m − 2 cannot occur because then B ⊆ V1 ∪ . . . ∪ Vp has dimension at most m − 2.  4 ERHARD AICHINGER Let k be a field, and let p, q, f ∈ k[t] such that deg(f ) > 0. It is known that p(f ) divides q(f ) if and only if p divides q [3, Lemma 2.1 and 2.2]. The following Lemma yields a multivariate version of this result. Lemma 2.4. Let k be an algebraically closed field, m, n ∈ N, and let f = (f1 , . . . , fm ) ∈ (k[t1 , . . . , tn ])m . Then the following are equivalent: (1) f is almost surjective on k. (2) k(f1 , . . . , fm )∩k[t1 , . . . , tn ] = k[f1 , . . . , fm ] and (f1 , . . . , fm ) is algebraically independent over k. (3) For all p, q ∈ k[x1 , . . . , xm ] with p(f1 , . . . , fm ) | q(f1 , . . . , fm ), we have p | q. Proof: (1)⇒(2): (This proof uses some ideas from the proof of Theorem 4.2.1 in [5, p. 82].) Let g ∈ k(f1 , . . . , fm )∩k[t1 , . . . , tn ]. Then there are r, s ∈ k[x1 , . . . , xm ] with gcd(r, s) = 1 and g = r(f1 , . . . , fm )/s(f1 , . . . , fm ), and thus (2.1) g(t1 , . . . , tn ) · s(f1 , . . . , fm ) = r(f1 , . . . , fm ). Suppose s 6∈ k. Then V (s) has dimension m − 1. We have V (s) = (V (s) ∩ range(f )) ∪ (V (s) ∩ (k m \ range(f ))) ⊆ V (s) ∩ range(f ) ∪ V (s) ∩ (k m \ range(f )). Since f is almost surjective, V (s) ∩ range(f ) is then of dimension m − 1. Hence it contains an irreducible component of dimension m − 1, and thus there is an irreducible p ∈ k[x1 , . . . , xm ] such that V (p) ⊆ V (s) ∩ range(f ). Since then V (p) ⊆ V (s), the Nullstellensatz yields n1 ∈ N with p | sn1 , and thus by the irreducibility of p, p | s. Now we show that for all a ∈ V (s) ∩ range(f ), we have r(a) = 0. To this end, let b ∈ k n with f (b) = a. Setting t := b in (2.1), we obtain r(a) = 0. Thus V (s) ∩ range(f ) ⊆ V (r), and therefore V (s) ∩ range(f ) ⊆ V (r), which implies V (p) ⊆ V (r). By the Nullstellensatz, we have an n2 ∈ N with p | r n2 and thus by the irreducibility of p, p | r. Now p | r and p | s, contradicting gcd(r, s) = 1. Hence s ∈ k, and thus g ∈ k[f1 , . . . , fm ]. The algebraic independence of (f1 , . . . , fm ) follows from Proposition 2.2. (2)⇒(3): Let p, q ∈ k[x1 , . . . , xm ] such that p(f1 , . . . , fm ) | q(f1 , . . . , fm ). If p(f1 , . . . , fm ) = 0, then q(f1 , . . . , fm ) = 0, and thus by the algebraic independence of (f1 , . . . , fm ), we have q = 0 and thus p | q. Now assume p(f1 , . . . , fm ) 6= 0. We have a(t1 , . . . , tn ) ∈ k[t1 , . . . , tn ] such that (2.2) q(f1 , . . . , fm ) = a(t1 , . . . , tn ) · p(f1 , . . . , fm ) and thus a(t1 , . . . , tn ) ∈ k(f1 , . . . , fm ) ∩ k[t1 , . . . , tn ]. Thus there exists b ∈ k[x1 , . . . , xm ] such that a(t1 , . . . , tn ) = b(f1 , . . . , fm ). Now (2.2) yields q(f1 , . . . , fm ) = b(f1 , . . . , fm ) · p(f1 , . . . , fm ). Using the algebraic independence of (f1 , . . . , fm ), we obtain q(x1 , . . . , xm ) = b(x1 , . . . , xm ) · p(x1 , . . . , xm ), and thus p | q. ON FUNCTION COMPOSITIONS THAT ARE POLYNOMIALS 5 (3)⇒(1) Seeking a contradiction, we suppose that f is not almost surjective. Let B := k m \ range(f ). Then dim(B) ≥ m − 1. Since B is constructible, Proposition 2.3 yields W, X with W irreducible, dim(W ) = m − 1, dim(X) ≤ m − 2, W \ X ⊆ B. Since W is irreducible of dimension m − 1, there is p ∈ k[x1 , . . . , xm ] such that W = V (p). Since dim(W ) > dim(X), we have W 6⊆ X, thus I(X) 6⊆ I(W ), and therefore there is q ∈ I(X) with q 6∈ I(W ). We have W ⊆ B ∪ X, and thus W ∩ range(f ) ⊆ X. This implies that for all a ∈ k n with p(f (a)) = 0, we have q(f (a)) = 0: in fact, if p(f (a)) = 0, then f (a) ∈ V (p)∩range(f ) = W ∩range(f ) ⊆ X. Hence q(f (a)) = 0. By the Nullstellensatz, we obtain a ν ∈ N such that p(f1 , . . . , fm ) | q(f1 , . . . , fm )ν . Therefore, using (3), we have p | q ν . This implies V (p) ⊆ V (q). Thus we have W ⊆ V (q) and therefore q ∈ I(W ), contradicting the choice of q. Hence f is almost surjective, proving (1).  3. f -determined polynomials We will first show that often all f -determined polynomials are rational functions of f . Special care, however, is needed in the case of positive characteristic. In an algebraically closed field of characteristic χ > 0, the unary polynomial t1 is (tχ1 )-determined, but t1 is neither a polynomial nor a rational function of tχ1 . Definition 3.1. Let k be a field of characteristic χ > 0, let n ∈ N, and let P be a subset of k[t1 , . . . , tn ]. We define the set radχ (P ) by ν radχ (P ) := {f ∈ k[t1 , . . . , tn ] | there is ν ∈ N0 such that f χ ∈ P }. Lemma 3.2. Let k be an algebraically closed field, let m, n ∈ N, let f1 , . . . , fm be algebraically independent polynomials in k[t1 , . . . , tn ], let g ∈ khf1 , . . . , fm i, and let D := {(f1 (a), . . . , fm (a), g(a)) | a ∈ k n }. Then dim(D) = m. Proof: By the closure theorem [2, p. 258], there is an algebraic set W such that D = D ∪ W and dim(W ) < dim(D). Let π : k m+1 → k m , (y1 , . . . , ym+1 ) 7→ (y1 , . . . , ym ) be the projection of k m+1 onto the first m coordinates, and let π(W ) be the Zariski-closure of π(W ) in k m . We will now examine the projection of D. Since (f1 , . . . , fm ) is algebraically independent, π(D) is Zariski-dense in k m , and hence dim(π(D)) = m. Since dim(V ) ≥ dim(π(V )) holds for every algebraic set V , we then obtain dim(D) ≥ dim(π(D)) ≥ dim(π(D)) = m. Seeking a contradiction, we suppose that dim(D) = m + 1. In the case dim(π(W )) = m, we use [2, p. 193, Theorem 3], which tells π(W ) = Vm (I(W ) ∩ k[x1 , . . . , xm ]), and we obtain that k m = Vm (I(W ) ∩ k[x1 , . . . , xm ]), and therefore I(W ) ∩ k[x1 , . . . , xm ] = {0}. Hence, x1 + I(W ), . . . , xm + I(W ) are algebraically independent in k[x1 , . . . , xm+1 ]/I(W ). Since dim(W ) ≤ m, we observe that the sequence (x1 + I(W ), . . . , xm+1 + I(W )) is algebraically dependent over k, and therefore, there is a polynomial q(x1 , . . . , xm+1 ) ∈ I(W ) with 6 ERHARD AICHINGER degxm+1 (q) > 0. Let r be the leading coefficient of q with respect to xm+1 , and let (y1 , . . . , ym ) ∈ k m be such that r(y1, . . . , ym ) 6= 0. Then there are only finitely many z ∈ k with (y1 , . . . , ym, z) ∈ W . Since D = k m+1 , there are then infinitely many z ∈ k with (y1 , . . . , ym , z) ∈ D, a contradiction to the fact that g is f -determined. In the case dim(π(W )) ≤ m − 1, we take (y1 , . . . , ym ) ∈ k m \ π(W ). For all z ∈ k, we have (y1 , . . . , ym , z) ∈ D and (y1 , . . . , ym , z) 6∈ W , and therefore all (y1 , . . . , ym , z) are elements of D, a contradiction to the fact that g is f determined. Hence, we have dim(D) = m.  Theorem 3.3. Let k be an algebraically closed field, let χ be its characteristic, let m, n ∈ N, and let (f1 , . . . , fm ) be a sequence of polynomials in k[t1 , . . . , tn ] that is algebraically independent over k. Then we have: (1) If χ = 0, then khf1 , . . . , fm i ⊆ k(f1 , . . . , fm ) ∩ k[t1 , . . . , tn ]. (2) If χ > 0, then khf1 , . . . , fm i ⊆ radχ (k(f1 , . . . , fm ) ∩ k[t1 , . . . , tn ]). Proof: Let g ∈ khf1 , . . . , fm i. We define D := {(f1 (a), . . . , fm (a), g(a)) | a ∈ k n }, we let D be its Zariski-closure in k m+1 , and we let W be an algebraic set with dim(W ) < dim(D) and D = D ∪ W . By Lemma 3.2, we have dim(D) = m. Now, we distinguish cases according to the characteristic of k. Let us first suppose χ = 0. Let q := Irr(D) be an irreducible polynomial with D = V (q), and let d := degxm+1 (q). Since f1 , . . . , fm are algebraically independent over k, wePhave d ≥ 1. We will now prove d = 1. Suppose d > 1. We write q = di=0 qi (x1 , . . . , xm ) xim+1 . We recall that for a field K, and f, g ∈ K[t] of positive degree, the resultant rest (f, g) is 0 if and only if deg(gcdK[t] (f, g)) ≥ 1 ∂ [2, p. 156, Proposition 8]. Let r := resxm+1 (q, ∂xm+1 q) be the resultant of q and its derivative when seen as elements of the ring k(x1 , . . . , xm )[xm+1 ]. If ∂ q have a common divisor in k(x1 , . . . , xm )[xm+1 ] with r = 0, then q and ∂xm+1 1 ≤ degxm+1 (q) ≤ d − 1 in k(x1 , . . . , xm )[xm+1 ]. Using a standard argument involving Gauß’s Lemma, we find a divisor a of q in k[x1 , . . . , xm+1 ] such that 1 ≤ degxm+1 (a) ≤ d − 1. This contradicts the irreducibility of q. Hence r 6= 0. Since dim(π(W )) ≤ m−1, r 6= 0, and qd 6= 0, we have V (r) ∪V (qd ) ∪π(W ) 6= k m . Thus we can choose a ∈ k m such that r(a) 6= 0, qd (a) 6= 0, and a 6∈ π(W ). Let q̃(t) := q(a, t). Since rest (q̃(t), q̃ ′ (t)) = r(a) 6= 0, q̃ has d different roots in k, and thus q(a, x) = 0 has d distinct solutions for x, say b1 , . . . , bd . We will now show {(a, bi ) | i ∈ {1, . . . , d}} ⊆ D. Let i ∈ {1, . . . , d}, and suppose that (a, bi ) 6∈ D. Then (a, bi ) ∈ W , and thus a ∈ π(W ), a contradiction. Thus all the elements (a, b1 ), . . . , (a, bd ) lie in D. Since d > 1, this implies that g is not ON FUNCTION COMPOSITIONS THAT ARE POLYNOMIALS 7 (f1 , . . . , fm )-determined. Therefore we have d = 1. Since (f1 , . . . , fm ) is algebraically independent, the polynomial q witnesses that g is algebraic of degree 1 over k(f1 , . . . , fm ), and thus lies in k(f1 , . . . , fm ). This concludes the case χ = 0. Now we assume χ > 0. It follows from Lemma 3.2 that for every h ∈ kht1 , . . . , tn i, the Zariski-closure of D(h) := {(f1 (a), . . . , fm (a), h(a)) | a ∈ k n } is an irreducible variety of dimension m in k m+1 . This implies that there is an irreducible polynomial Irr(D(h)) ∈ k[x1 , . . . , xm ] such that D(h) = V (Irr(D(h))). Furthermore, by the closure theorem [2], there is an algebraic set W (h) ⊆ k m such that dim(W (h)) ≤ m − 1 and D(h) ∪ W (h) = D(h). We will now prove the following statement by induction on degxm+1 (Irr(D(h))). Every f -determined polynomial h ∈ k[t1 , . . . , tn ] is an element of radχ (k(f1 , . . . , fm ) ∩ k[t1 , . . . , tn ]). Let d := degxm+1 (Irr(D(h))). If d = 0, then f1 , . . . , fm are algebraically dependent, a contradiction. If d = 1, then since f1 , . . . , fm are algebraically independent, h is algebraic of degree 1 over k(f1 , . . . , fm ), and thus lies in k(f1 , . . . , fm ) ∩ k[t1 , . . . , tn ]. Let us now consider the case d > 1. We set ∂ Irr(D(h))). e := degxm+1 ( ∂xm+1 If ∂ Irr(D(h)) ∂xm+1 = 0, then there is a polynomial p ∈ k[x1 , . . . , xm+1 ] such that Irr(D(h)) = p(x1 , . . . , xm , xχm+1 ). We know that hχ is f -determined, hence by Lemma 3.2, D(hχ ) is of dimension m. Since p (f1 , . . . , fm , hχ ) = Irr(D(h)) (f1 , . . . , fm , h) = 0, we have p ∈ I(D(hχ )). Thus D(hχ ) ⊆ V (p). Therefore, the irreducible polynomial Irr(D(hχ )) divides p, and thus degxm+1 (Irr(D(hχ ))) ≤ degxm+1 (p) < degxm+1 (Irr(D(h))). By the induction hypothesis, we obtain that hχ is an element of radχ (k(f1 , . . . , fm )∩k[t1 , . . . , tn ]). Therefore, h ∈ radχ (k(f1 , . . . , fm )∩k[t1 , . . . , tn ]). ∂ This concludes the case that ∂xm+1 (Irr(D(h))) = 0. If e = 0, we choose a = (a1 , . . . , am ) ∈ k m such that ∂ Irr(D(h)) (a1 , . . . , am , 0) 6= 0, ∂xm+1 such that the leading coefficient of Irr(D(h)) with respect to xm+1 does not vanish at a, and such that a 6∈ π(W (h)). Then Irr(D(h))(a, x) = 0 has d different solutions for x, say b1 , . . . , bd . Since {(a, bi ) | i ∈ {1, . . . , d}}∩W (h) = ∅ because 8 ERHARD AICHINGER a 6∈ π(W (h)), we have {(a, bi ) | i ∈ {1, . . . , d}} ⊆ D(h). Since h is f -determined, d = 1, contradicting the case assumption. (d,e) ∂ If e > 0, then we compute the resultant r := resxm+1 (Irr(D(h)), ∂xm+1 Irr(D(h))), seen as polynomials of degrees d and e over the field k(x1 , . . . , xm ) in the variable xm+1 . As in the case χ = 0, the irreducibility of Irr(D(h)) yields r 6= 0. Now we let a ∈ k m be such that r(a) 6= 0, the leading coefficient (Irr(D(h)))d of Irr(D(h)) with respect to xm+1 does not vanish at a, and a 6∈ π(W (h)). Setting (d,e) q̃(t) := Irr(D(h)) (a, t), we see that rest (q̃(t), q̃ ′ (t)) 6= 0. Thus q̃ has d distinct zeroes b1 , . . . , bd , and then {(a, bi ) | i ∈ {1, . . . , d}} ⊆ D(h). Since d > 1, this contradicts the fact that h is f -determined.  Theorem 3.4. Let k be an algebraically closed field of characteristic 0, let m, n ∈ N, and let f = (f1 , . . . , fm ) be a sequence of algebraically independent polynomials in k[t1 , . . . , tn ]. Then the following are equivalent: (1) khf1 , . . . , fm i = k[f1 , . . . , fm ]. (2) f is almost surjective. Proof: (1)⇒(2): Suppose that f is not almost surjective. Then by Lemma 2.4, there are p, q ∈ k[x1 , . . . , xm ] such that p(f1 , . . . , fm ) | q(f1 , . . . , fm ) and p ∤ q. Let d := gcd(p, q), p1 := p/d, q1 := q/d. Let a(t1 , . . . , tn ) ∈ k[t1 , . . . , tn ] be such that (3.1) p1 (f1 , . . . , fm ) · a(t1 , . . . , tn ) = q1 (f1 , . . . , fm ). We claim that b(t1 , . . . , tn ) := q1 (f1 , . . . , fm ) · a(t1 , . . . , tm ) is f -determined and is not an element of k[f1 , . . . , fm ]. In order to show that b is f -determined, we let c, d ∈ k n such that f (c) = f (d ). If p1 (f (c)) 6= 0, we have b(c) = (c)) (d )) q1 (f (c)) · a(c) = q1 (f (c)) · pq11(f = q1 (f (d )) · pq11(f = q1 (f (d )) · a(d ) = b(d ). (f (c)) (f (d )) If p1 (f (c)) = 0, we have b(c) = q1 (f (c)) · a(c). By (3.1), we have q1 (f (c)) = 0, and thus b(c) = 0. Similarly b(d ) = 0. This concludes the proof that b is f -determined. Let us now show that b 6∈ k[f1 , . . . , fm ]. We have b(t1 , . . . , tn ) = q1 (f1 , . . . , fm )2 . p1 (f1 , . . . , fm ) If b ∈ k[f1 , . . . , fm ], there is r ∈ k[x1 , . . . , xm ] with r(f1 , . . . , fm ) = b(t1 , . . . , tn ). Then r(f1 , . . . , fm )·p1 (f1 , . . . , fm ) = q1 (f1 , . . . , fm )2 . From the algebraic independence of (f1 , . . . , fm ), we obtain r(x1 , . . . , xm ) · p1 (x1 , . . . , xm ) = q1 (x1 , . . . , xm )2 , hence p1 (x1 , . . . , xm ) | q1 (x1 , . . . , xm )2 . Since p1 , q1 are relatively prime, we then have p1 (x1 , . . . , xm ) | q1 (x1 , . . . , xm ), contradicting the choice of p and q. Hence f is almost surjective. ON FUNCTION COMPOSITIONS THAT ARE POLYNOMIALS 9 (2)⇒(1): From Theorem 3.3, we obtain khf i ⊆ k(f ) ∩ k[t1 , . . . , tn ]. Since f is almost surjective, Lemma 2.4 yields k(f ) ∩ k[t1 , . . . , tn ] = k[f ], and thus khf i ⊆ k[f ]. The other inclusion is obvious.  Theorem 3.5. Let k be an algebraically closed field of characteristic χ > 0, let m, n ∈ N, and let f = (f1 , . . . , fm ) be a sequence of algebraically independent polynomials in k[t1 , . . . , tn ]. Then the following are equivalent: (1) khf1 , . . . , fm i = radχ (k[f1 , . . . , fm ]). (2) f is almost surjective. Proof: (1)⇒(2): As in the proof of Theorem 3.4, we produce an f -determined polynomial b and relatively prime p1 , q1 ∈ k[x1 , . . . , xm ] with p1 ∤ q1 and b(t1 , . . . , tn ) = q1 (f1 , . . . , fm )2 . p1 (f1 , . . . , fm ) ν ν Now suppose that there is ν ∈ N0 with bχ ∈ k[f1 , . . . , fm ]. Then p1 (f1 , . . . , fm )χ divides ν ν q1 (f1 , . . . , fm )2χ in k[f1 , . . . , fm ], and thus p1 (x1 , . . . , xm ) divides q1 (x1 , . . . , xm )2χ in k[x1 , . . . , xm ]. Since p1 and q1 are relatively prime, we obtain p1 | q1 , contradicting the choice of p1 and q1 . (1)⇒(2): From Theorem 3.3, we obtain khf i ⊆ radχ (k(f )∩k[t1 , . . . , tn ]). Since f is almost surjective, Lemma 2.4 yields k(f ) ∩ k[t1 , . . . , tn ] = k[f ], and thus khf i ⊆ radχ (k[f ]). The other inclusion follows from the fact that the map ϕ : k → k, ϕ(y) := y χ is injective.  4. Function compositions that are polynomials For a field k, let f = (f1 , . . . , fm ) ∈ (k[t1 , . . . , tn ])m , and let h : k m → k be an arbitrary function. Then we write h ◦ f for the function defined by (h ◦ f ) (a) = h(f1 (a), . . . , fm (a)) for all a ∈ k n . For an algebraically closed field K ν of characteristic χ > 0, y ∈ K and ν ∈ N0 , we let s(χ ) (y) be the element in K ν ν ν with (s(χ ) (y))χ = y; so s(χ ) takes the χν -th root. Theorem 4.1. Let k be a field, let K be its algebraic closure, let m, n ∈ N, let g, f1 , . . . , fm ∈ k[t1 , . . . , tn ], and let h : K m → K be an arbitrary function. Let R := f (K n ) be the range of the function from K n to K m that f = (f1 , . . . , fm ) induces on K. We assume that dim(K m \ R) ≤ m − 2, and that h ◦ f = g on K, which means that h(f (a)) = g(a) for all a ∈ K n . Then we have: (1) If k is of characteristic 0, then there is p ∈ k[x1 , . . . , xm ] such that h(b) = p(b) for all b ∈ R. 10 ERHARD AICHINGER (2) If k is of characteristic χ > 0, then there is p ∈ k[x1 , . . . , xm ] and ν ∈ N0 ν such that h(b) = s(χ ) (p(b)) for all b ∈ R. Proof: Let us first assume that k is of characteristic 0. We observe that as a polynomial in K[t1 , . . . , tn ], g is f -determined. Hence by Theorem 3.4, there is q ∈ K[x1 , . . . , xm ] such that q(f1 , . . . , fm ) = g. Writing X αi1 ,...,im xi11 · · · ximm , q= P (i1 ,...,im )∈I im we obtain g = (i1 ,...,im )∈I αi1 ,...,im f1i1 · · · fm . Expanding the right hand side and comparing coefficients, we see that (αi1 ,...,im )(i1 ,...,im )∈I is a solution of a linear system with coefficients in k. Since this system has a solution over K, it also has a solution over k. The solution over k provides the coefficients of a polynomial p ∈ k[x1 , . . . , xm ] such that p(f1 , . . . , fm ) = g. From this, we obtain that p(f1 (a), . . . , fm (a)) = g(a) for all a ∈ K n , and thus p(b) = h(b) for all b ∈ R. This completes the proof of item (1). In the case that k is of characteristic χ > 0, Theorem 3.5 yields a polynomial ν q ∈ K[x1 , . . . , xm ] and ν ∈ N0 such that q(f1 , . . . , fm ) = g χ . As in the previous ν case, we obtain p ∈ k[x1 , . . . , xm ] such that p(f1 , . . . , fm ) = g χ . Let b ∈ R, ν ν and let a be such that f (a) = b. Then s(χ ) (p(b)) = s(χ ) (p(f (a))) = g(a) = h(f (a)) = h(b), which completes the proof of (2).  We will now state the special case that k is algebraically closed and f is surjective in the following corollary. By a polynomial function, we will simply mean a function induced by a polynomial with all its coefficients in k. Corollary 4.2. Let k be an algebraically closed field, let f = (f1 , . . . , fm ) ∈ (k[t1 , . . . , tn ])m , and let h : k m → k be an arbitrary function. We assume that f induces a surjective mapping from k n to k m and that h ◦ f is a polynomial function. Then we have: (1) If k is of characteristic 0, then h is a polynomial function. ν (2) If k is of characteristic χ > 0, then there is ν ∈ N0 such that hχ : ν (y1, . . . , ym ) 7→ h(y1 , . . . , ym )χ is a polynomial function. References 1. E. Aichinger and S. Steinerberger, A proof of a theorem by Fried and MacRae and applications to the composition of polynomial functions, Arch. Math. (Basel) 97 (2011), no. 2, 115–124. 2. D. Cox, J. Little, and D. O’Shea, Ideals, varieties, and algorithms, third ed., Undergraduate Texts in Mathematics, Springer, New York, 2007. 3. H. T. Engstrom, Polynomial substitutions, Amer. J. Math. 63 (1941), 249–255. 4. R. Hartshorne, Algebraic geometry, Graduate Texts in Mathematics, no. 52, Springer-Verlag, New York, 1977. ON FUNCTION COMPOSITIONS THAT ARE POLYNOMIALS 11 5. A. van den Essen, Polynomial automorphisms and the Jacobian conjecture, Progress in Mathematics, vol. 190, Birkhäuser Verlag, Basel, 2000. Erhard Aichinger, Institut für Algebra, Johannes Kepler Universität Linz, 4040 Linz, Austria E-mail address: [email protected] URL: http://www.algebra.uni-linz.ac.at
0math.AC
Minimum Throughput Maximization in UAV-Aided Wireless Powered Communication Networks Junhee Park, Hoon Lee, Subin Eom, and Inkyu Lee, Fellow, IEEE School of Electrical Eng., Korea University, Seoul, Korea arXiv:1801.02781v1 [cs.IT] 9 Jan 2018 Email: {pjh0585, ihun1, esb777, inkyu}@korea.ac.kr Abstract This paper investigates unmanned aerial vehicle (UAV)-aided wireless powered communication network (WPCN) systems where a mobile access point (AP) at the UAV serves multiple energyconstrained ground terminals (GTs). Specifically, the UAVs first charge the GTs by transmitting the wireless energy transfer (WET) signals in the downlink. Then, by utilizing the harvested wireless energy from the UAVs, the GTs send their uplink wireless information transmission (WIT) signals to the UAVs. In this paper, depending on the operations of the UAVs, we adopt two different scenarios, namely integrated UAV and separated UAV WPCNs. First, in the integrated UAV WPCN, a UAV acts as a hybrid AP in which both energy transfer and information reception are processed at a single UAV. In contrast, for the separated UAV WPCN, we consider two UAVs each of which behaves as an energy AP and an information AP independently, and thus the energy transfer and the information decoding are separately performed at two different UAVs. For both systems, we jointly optimize the trajectories of the UAVs, the uplink power control, and the time resource allocation for the WET and the WIT to maximize the minimum throughput of the GTs. Since the formulated problems are non-convex, we apply the concave-convex procedure by deriving appropriate convex bounds for non-convex constraints. As a result, we propose iterative algorithms which efficiently identify a local optimal solution for the minimum throughput maximization problems. Simulation results verify the efficiency of the proposed algorithms compared to conventional schemes. Index Terms UAV communication, energy harvesting, wireless powered communication networks (WPCNs), trajectory optimizations. 2 I. I NTRODUCTION Recently, unmanned aerial vehicles (UAVs) have been adopted in many applications such as weather monitoring and traffic control [1], and the usage of the UAV in wireless communication systems has drawn great attentions [2]–[11]. Compared to conventional networks where APs are fixed at given locations, wireless communication networks employing a UAV-mounted access point (AP) exhibit cost-efficiency and deployment flexibility. Moreover, the mobility of the UAV can provide an opportunity for the wireless networks to enhance the system capacity. In [2]–[4], UAV-enabled relaying channels were studied where UAVs act as mobile relays which forward the information of sources to destinations located on the ground. For the UAV relay networks, deployment and direction control problems were investigated in [2], and the work in [3] minimized the network outage probability when the UAV trajectory is given as a circular path. The authors in [4] solved the throughput maximization problem by optimizing the source and the relay transmit power allocation along with the UAV relay trajectory. In addition, UAVs have been employed as mobile base stations in various wireless networks [5]– [9]. The mobile base station placement problems were investigated in [5] and [6] in order to maximize the overall wireless coverage. In [7], analytical expressions for the optimal UAV height were derived to minimize the outage probability of air-to-ground links. The authors in [8] focused on the theoretical energy consumption modeling for UAVs, and proposed trajectory optimization methods for maximizing the energy efficiency of a UAV. Also, the trajectories of multiple UAVs were examined in [9] to maximize the minimum throughput performance of multiple ground terminals (GTs). Moreover, UAV-aided caching and mobile cloud computing systems were researched in [10] and [11], respectively. In the meantime, energy harvesting (EH) techniques based on radio frequency (RF) signals have been considered as promising solutions for extending the lifetime of battery-limited wireless devices [12]–[20]. By utilizing wireless energy transfer (WET) and wireless information transmission (WIT), the RF-based EH methods have been studied for traditional wireless communications, and wireless powered communication networks (WPCN) protocols have been widely investigated in recent literature [17]–[20]. Particularly, in the WPCN, a hybrid access point (H-AP) sends wireless energy via the RF signals to energy-constrained devices in the downlink WET phase. In the subsequent uplink WIT phase, the devices transmit their information signals to the H-AP by using the harvested energy. 3 In [17], throughput maximization problems were introduced for the WPCN by optimizing the time resource allocated to users under the harvest-then-transmit protocol. The authors in [18] proposed the multi-antenna energy beamforming and time allocation algorithms to maximize the minimum throughput performance. The sum-rate maximization problems with a full-duplex HAP were investigated in [19] for orthogonal frequency division multiplexing, and the precoding methods for the multiple-input multiple-output WPCN was provided in [20]. Note that these works were restricted to a static H-AP setup, and thus it would suffer from the ‘doubly near-far’ problem [17], which is induced by the doubly distance-dependent signal attenuation both in the downlink and the uplink. Recently, there have been several works combining mobile vehicle techniques and the WPCN [21]–[27]. For the magnetic resonant based WET, [21]–[24] considered wireless charging vehicles which travel the networks to supply power to wireless sensors. However, due to short charging coverage of the magnetic resonance technique, the vehicles should stay quite a while to transfer energy to nearby sensors. To overcome this limitation, the authors in [25] adopted the RF-based WET methods to UAV-aided WPCN where a UAV flies towards a GT to transmit the RF energy signal and receive uplink data. However, only a single GT case was considered in [25] under a fixed line trajectory setup without optimizing the traveling path of the UAV. The works in [26] and [27] also examined the UAV-enabled WET systems, but they did not take into account the communications of GTs. In this paper, we investigate the UAV-aided WPCN where multiple energy-constrained GTs are served by UAVs with arbitrary trajectories. Depending on the roles of the UAVs, we classify the UAV WPCN into two categories: integrated UAV and separated UAV WPCNs. First, in the integrated UAV WPCN, a single UAV behaves as an H-AP which broadcasts the RF energy signal to the GTs in the downlink WET phase and decodes the information from the GTs in the uplink WIT phase. In contrast, in the separated UAV WPCN, the WET and WIT operations are assigned to two different UAVs separately. In both systems, we adopt a time division multiple access (TDMA) based harvest-then-transmit protocol in [17] where the WET of the UAVs and the WIT at the GTs are performed over orthogonal time resources. In our proposed systems, we jointly optimize the trajectories of the UAVs, the uplink power control at the GTs, and the time resource allocation with the aim of maximizing the minimum throughput performance among the GTs. Since the location of the UAVs changes continuously, the time resource allocation in the UAV WPCN is totally different from that of the conventional 4 WPCN with static H-APs. Also, compared to [25] where the trajectory of the UAV is restricted to a straight line, our systems consider a general traveling path optimization problem without any constraints on the UAV trajectory. As the problem is non-convex, we propose iterative algorithms to obtain the local optimal solution by applying the alternating optimization method. To be specific, we first jointly optimize the trajectory of the UAVs and the uplink power of the GTs with given time allocation, and then update the time resource allocation solution by fixing other variables. First, to find the trajectory and the uplink power control solution, the concave-convex procedure (CCCP) framework [28] [29] is employed which successively solves approximated convex problems of the original problem. Next, the time allocation solution can be determined by applying linear programming (LP). The convergence and the local optimality of the proposed algorithms are then mathematically proved. From numerical results, we demonstrate that the proposed algorithms substantially improve the performance of the UAV WPCN compared to conventional schemes. The rest of this paper is organized as follows: Section II explains a system model for the UAV WPCN and formulates the minimum throughput maximization problems. In Sections III and IV, we propose efficient algorithms for the integrated UAV and the separated UAV systems, respectively. Section V presents simulation results for the proposed algorithms and compares the performance with conventional schemes. Finally, the paper is terminated in Section VI with conclusions. Throughout this paper, normal and boldface letters represent scalar quantities and column vectors, respectively. We denote the Euclidean space of dimension n as Rn , and (·)T indicates the transpose operation. Also, |·| and k·k stand for the absolute value and the 2-norm, respectively. II. S YSTEM M ODEL As shown in Figure 1, we consider a UAV-aided WPCN where K single antenna GTs are supported by single antenna UAVs which transmit and receive the RF signals. It is assumed that the GTs do not have any embedded power supplies, while the UAVs are equipped with stable and constant power sources. To communicate with the GTs, the UAVs travel through the area of interest while transferring energy to the GTs in the downlink. By utilizing the harvested energy from the UAV, the GTs send their information in the uplink. We assume that the UAVs fly at a constant altitude of H with the maximum speed vmax for the time period T , whereas all the GTs are fixed at given locations. 5 ‫ݖ‬ ‫ݖ‬ 8$9 Downlink WET 8$9 Downlink WET GT Uplink WIT GT Uplink WIT (࢞࢖ࡵ( (࢞࢖(࢚),࢟࢖(࢚),ࡴ) ࢚) ,࢟࢖ࡵ ( ࢚) ,ࡴ ) (࢞࢖ࡱ(࢚),࢟࢖ࡱ(࢚),ࡴ) ,'8$9 (78$9 ‫ݕ‬ ‫ݕ‬ ‫ݔ‬ GT ૚ ࢞૚, ࢟૚, ૙ GT ࡷ ࢞ࡷ, ࢟ࡷ, ૙ GT ૛ ࢞૛, ࢟૛, ૙ (a) Integrated UAV WPCN ‫ݔ‬ GT ૚ ࢞૚, ࢟૚, ૙ GT ૛ ࢞૛, ࢟૛, ૙ GT ࡷ ࢞ࡷ, ࢟ࡷ, ૙ (b) Separated UAV WPCN Fig. 1. Schematic diagrams of UAV-aided WPCNs. Depending on the operations of the UAVs, we classify the UAV-aided WPCN into two categories. First, in the integrated UAV WPCN illustrated in Figure 1(a), a single UAV transmits energy and collects data of the GTs. Thus, the UAV in the integrated UAV WPCN acts as an H-AP in the conventional WPCN [17]. Second, in the separated UAV WPCN in Figure 1(b), the WET and the WIT are independently performed at two different UAVs. Therefore, each UAV in the separated system is dedicated to the energy transferring (ET) or the information decoding (ID). In the following, we present the system model for both UAV WPCN systems. A. Integrated UAV WPCN Let us denote p(t) = [xp (t), yp (t)]T as the position of the UAV at time instant t ∈ [0, T ] and uk = [xk , yk ]T as the location of GT k ∈ K , {1, ..., K}, which is assumed to be known to the UAV in advance. For ease of analysis, the total time period T is equally divided into N time slots as in [9], where the number of time slots N is chosen as a sufficiently large number such that the distance between the UAV and the GTs within each time slot can be considered approximately static. Therefore, the trajectory of the UAV can be represented by a sequence of locations {p[n]} at each time slot n ∈ N , {1, ..., N} as p[n] , p(nδN ) = [xp (nδN ), yp (nδN )]T , 6 time slot ݊ time slot 1 ߜܰ = ܶ/ܰ time slot ܰ ߜܰ ߜܰ UAV Downlink WET GT ૚ Uplink WIT GT ૛ Uplink WIT GT ࡷ Uplink WIT ߬0[݊]ߜܰ ߬1[݊]ߜܰ ߬2[݊]ߜܰ ߬‫ܰߜ]݊[ܭ‬ Fig. 2. Protocol structure for UAV-aided WPCN. Wireless Communication Lab. Korea University where δN , T /N indicates the length of the time slot. Since we consider the discrete time trajectory p[n] for n ∈ N , the maximum speed constraint can be expressed as kp[n] − p[n − 1]k ≤ δN vmax , for n ∈ N̂ , {2, ..., N}. For the air-to-ground channel between the UAV and the GTs, the deterministic propagation model is adopted in this paper which assumes the line-of-sight links without the Doppler effect [4], [8], [11]. Then, the average channel power gain γk [n] between the UAV and GT k at time slot n is given by γk [n] = g0 , for n ∈ N and k ∈ K, kp[n] − uk k2 + H 2 where g0 denotes the reference channel gain at distance of 1 meter. Next, we explain the transmission protocol for the UAV-aided WPCN. As shown in Figure 2, we divide each time slot n into K + 1 subslots, where the 0-th subslot of duration τ0 [n]δN is allocated to the dedicated downlink WET and the k-th subslot of duration τk [n]δN for k ∈ K is assigned to the uplink WIT of GT k. Note that the variable τk [n] accounts for the time durations at the k-th subslot in time slot n. Thus we have the following constraints on the time resource allocation variable τk [n] as 0 ≤ τk [n] ≤ 1, for n ∈ N and k ∈ K̆, K X k=0 where K̆ , K ∪ {0}. τk [n] ≤ 1, for n ∈ N , 7 Now, we describe the WET and the WIT procedures of the integrated UAV WPCN. At the 0-th subslot of each time slot, the UAV broadcasts the wireless energy signals with the transmit power P DL . Then, the harvested energy Ek [n] of GT k at time slot n can be written as Ek [n] , τ0 [n]δN · ζk γk [n]P DL ζk g0 P DL , for n ∈ N and k ∈ K, = τ0 [n]δN kp[n] − uk k2 + H 2 where ζk ∈ (0, 1] stands for the energy harvesting efficiency of GT k. For simplicity, we assume that all the GTs have the same energy harvesting efficiency, i.e., ζk = ζ for k ∈ K. Due to the processing delay of EH circuits at the GTs, the harvested energy Ek [n] may not be available at time slot n. Hence, GT k only can utilize Ek [n] at the future time slots n + 1, n + 2, ..., N. Defining PkUL [n] as the uplink transmit power of GT k at time slot n, the available energy Ẽk [n] at time slot n of GT k can be expressed as Ẽk [n] = n−1 X Ek [i] − i=1 n−1 X τk [i]δN PkUL [i], i=1 where the first and the second terms represent the cumulative harvested energy and the consumed energy of GT k during the past time slots for i = 1, 2, ..., n − 1, respectively. As a result, the uplink power constraint for GT k at time slot n is given as τk [n]δN PkUL [n] ≤ Ẽk [n], for n ∈ N̂ and k ∈ K, (1) where we have PkUL [1] = 0 due to the EH circuit delay. Also, the instantaneous throughput Rk [n] of GT k at time slot n can be obtained as   ηk γk [n]PkUL [n] Rk [n] , log2 1 + σ2   g0 ηk PkUL [n] = log2 1 + 2 , for n ∈ N and k ∈ K, σ kp[n] − uk k2 + H 2 where ηk ∈ (0, 1] is a portion of the stored energy used for the uplink information transmission at GT k. For simplicity, we assume ηk = η for k ∈ K. Then, the average throughput Rk of GT k for the time period T can be written by N 1 X δN τk [n]Rk [n] T n=2   N 1 X g0 η PkUL [n] = τk [n] log2 1 + 2 , for k ∈ K. N n=2 σ kp[n] − uk k2 + H 2 Rk , (2) 8 In this paper, we aim to maximize the minimum average throughput of the GTs by jointly optimizing the UAV trajectory {p[n]}, the uplink power control {PkUL[n]} at the GTs, and the time resource allocation variables {τk [n]}. Denoting Rmin as the minimum throughput of the GTs, the optimization problem can be formulated as (P1) max Rmin ,{PkUL [n]},{p[n]},{τk [n]} Rmin   N g0 η PkUL [n] 1 X τk [n] log2 1 + 2 ≥ Rmin , for k ∈ K, s.t. N n=2 σ kp[n] − uk k2 + H 2 n X τk [i]PkUL [i] i=2 ≤ n−1 X i=1 τ0 [i]g0 ζk P DL , for n ∈ N̂ and k ∈ K, kp[i] − uk k2 + H 2 (3) (4) kp[n] − p[n − 1]k ≤ δN vmax , for n ∈ N̂ , (5) kp[N] − p[1]k ≤ δN vmax , (6) UL 0 ≤ PkUL [n] ≤ Pmax , for n ∈ N and k ∈ K, (7) 0 ≤ τk [n] ≤ 1, for n ∈ N and k ∈ K̆, (8) K X τk [n] = 1 for n ∈ N , (9) k=0 where the uplink energy constraint in (4) is derived from (1), (6) indicates the periodical constraint that the UAV needs to get back to the starting position after one time period T [9]1 , and (7) is the peak uplink power constraint. One can check that (P1) is non-convex due to the constraints in (3) and (4), and therefore it is not straightforward to obtain the globally optimal solution. B. Separated UAV WPCN In the separated UAV WPCN, we design the trajectories of two different UAVs, i.e., ID UAV and ET UAV. Let us define pI [n] ∈ R2 and pE [n] ∈ R2 as the position of the ET UAV and the ID UAV at time slot n, respectively. Similar to the integrated UAV WPCN, we adopt the TDMA 1 Depending on the application, one may want to determine the initial location and the final location of the UAV in advance. In this case, we can simply add constraints on p[0] and p[N ] and discard the constraint in (6). 9 protocol in Figure 2. Then, the uplink energy constraint of GT k at time slot n and the average throughput of GT k Rk,S can be respectively expressed as ! DL ζ g P k 0 − τk [i]δN PkUL [i] , τk [n]δN PkUL [n] ≤ τ0 [n]δN 2 2 kp E [i] − uk k + HE i=1   N g0 η PkUL [n] 1 X τk [n] log2 , Rk,S , N n=2 σ 2 kpI [n] − uk k2 + HI2 n−1 X where HI and HE stand for the flight altitude of the ID UAV and the ET UAV, respectively. Thus, the minimum throughput maximization problem for the separated UAV WPCN is given as (P2) max Rmin ,{PkUL [n]},{pI [n]}, {pE [n]},{τk [n]} Rmin   N 1 X g0 η PkUL [n] s.t. τk [n] log2 1 + 2 ≥ Rmin , for k ∈ K, N n=2 σ kpI [n] − uk k2 + HI2 n X τk [i]PkUL [i] ≤ i=2 n−1 X i=1 τ0 [i]g0 ζk P DL , for n ∈ N̂ and k ∈ K, kpE [i] − uk k2 + HE2 (10) (11) x kpx [n] − px [n − 1]k ≤ δN vmax , for x ∈ {I, E} and n ∈ N̂ , (12) x kpx [N] − px [1]k ≤ δN vmax , for x ∈ {I, E}, (13) UL 0 ≤ PkUL [n] ≤ Pmax , for n ∈ N and k ∈ K, (14) (8) - (9), I E where vmax and vmax represent the maximum speed of the ID UAV and the ET UAV, respectively. This problem is also non-convex due to the constraints (10) and (11). In the following sections, we present efficient approaches for solving (P1) and (P2). III. P ROPOSED S OLUTION FOR I NTEGRATED UAV WPCN In this section, we propose an iterative algorithm for (P1) which yields a local optimal solution. To this end, we employ the alternating optimization framework which first finds a solution for the trajectory {p[n]} and the uplink power {PkUL [n]} with given time resource allocation {τk [n]}, and then computes {τk [n]} by fixing {p[n]} and {PkUL [n]}. 10 A. Joint Trajectory and Uplink Power Optimization For a given time resource allocation {τk [n]}, (P1) can be simplified as max Rmin ,{PkUL [n]},{p[n]} s.t. Rmin (15) (3) - (7). Problem (15) is still non-convex due to the constraints in (3) and (4). To tackle this difficulty, let us first introduce auxiliary variables {zk [n]} such that kp[n] − uk k2 ≤ zk [n] for k ∈ K and n ∈ N . Then, the left hand side (LHS) of (3) and the right hand side (RHS) of (4) are respectively lower-bounded by     N N g0 η UL g0 η UL P [n] P [n] 1 X 1 X σ2 k σ2 k τk [n] log2 1 + τk [n] log2 1 + ≥ , N n=2 kp[n] − uk k2 + H 2 N n=2 zk [n] + H 2 n−1 X i=1 n−1 X g0 ζP DL g0 ζP DL τ0 [i] ≥ τ [i] . 0 kp[i] − uk k2 + H 2 zk [i] + H 2 i=1 For these bounds, we can construct an equivalent problem for (15) based on the following lemma. Lemma 1: The optimal solution for the problem (15) can be obtained by solving the following optimization problem: (P1.1) max Rmin ,{PkUL [n]},{p[n]},{zk [n]} Rmin   N g0 η PkUL [n] 1 X τk [n] log2 1 + 2 ≥ Rmin , for k ∈ K, s.t. N n=2 σ zk [n] + H 2 n X τk [i]PkUL [i] ≤ n−1 X i=1 i=2 2 τ0 [i] g0 ζk P DL , for n ∈ N̂ and k ∈ K, zk [i] + H 2 kp[n] − uk k ≤ zk [n], for n ∈ N and k ∈ K, (16) (17) (18) (5) - (7). ∗ Proof: First, let Rmin and R̃min denote the optimal value of problem (15) and (P1.1), ∗ respectively. Then it can easily be checked that Rmin ≥ R̃min , where the equality holds when zk [n] = kp[n] − uk k2 , ∀n and ∀k. Next, by contradiction, we will prove that the optimum of (P1.1) can be attained when zk [n] = kp[n] − uk k2 . Suppose that there exists at least one zk [n] satisfying zk [n] > kp[n]−uk k2 at the optimum of (P1.1) and denote a set of such k as K′ ⊂ K. If the equality holds in (16) for k ′ ∈ K′ , the minimum throughput R̃min can be increased by reducing zk′ [n] so that constraints (16) and (17) hold with equality. This contradicts the assumption. Even 11 if the equality does not hold in (16) for k ′ at the optimum, decreasing zk′ [n] does not affect the minimum throughput R̃min . Therefore, for all these cases, we can always find the optimal zk [n] for (P1.1) satisfying zk [n] = kp[n] − uk k2 . As a result, the optimal solution of (15) can be equivalently obtained by solving (P1.1). Still, (P1.1) is non-convex in general. Thus, we provide the CCCP [28] approach to address (P1.1). First, we consider the throughput constraint in (16). By using a first-order Taylor approximation at zk [n] = ẑk [n], we can derive a concave lower bound for the LHS of (16) as     zk [n] + H 2 + gσ02η PkUL [n] g0 η PkUL [n] zk [n] + H 2 log2 1 + 2 ≥ log − +1 2 σ zk [n] + H 2 ẑk [n] + H 2 ẑk [n] + H 2 , RkL [n](zk [n], PkUL [n] | ẑk [n]). (19) Note that RkL [n](zk [n], PkUL [n] | ẑk [n]) is a jointly concave function with respect to zk [n] and PkUL [n], and gives a tight lower bound in which equality holds at ẑk [n] = zk [n]. In a similar way, the RHS of constraint (17), which is convex with respect to zk [n], can be lower-bounded by   zk [n] + H 2 τ0 [n]δN ζg0P DL ζk g0 P DL 2− ≥ τ0 [n]δN zk [n] + H 2 ẑk [n] + H 2 ẑk [n] + H 2 , EkL [n](zk [n] | ẑk [n]). (20) With (19) and (20) at hand, an approximated convex problem for (P1.1) with given ẑk [n] can be formulated as (P1.1A) max Rmin ,{PkUL [n]},{p[n]},{zk [n]} Rmin N 1 X s.t. τk [n]RkL [n](zk [n], PkUL [n] | ẑk [n]) ≥ Rmin , for k ∈ K, N n=2 n X τk [i]PkUL [i] i=2 (5) - (7), (18). (21) n−1 1 X L ≤ E [i](zk [i] | ẑk [i]), for n ∈ N̂ and k ∈ K, δN i=1 k (22) (P1.1A) can be solved by existing convex solvers, e.g., CVX [30]. Since the feasible region of (P1.1A) is a subset of that of the original problem (P1.1), we can always obtain a lower bound solution for problem (P1.1) from its approximation (P1.1A). As a result, a solution for (P1.1) can be calculated by iteratively solving (P1.1A) based on (i) the CCCP. At the i-th iteration of the CCCP algorithm, we compute the solution zk [n] and UL(i) Pk (i−1) [n] of (P1.1A) by setting ẑk [n] = zk (i) UL(i) [n], where zk [n] and Pk determined at the i-th iteration. In this algorithm, we set (0) zk [n] to (0) zk [n] [n] are the solution = kp[n] − uk k2 for 12 all n ∈ N and k ∈ K. It has been proved that this CCCP method converges to at least a local optimal point [28]. Note that for solving (P1.1) with the CCCP, we need to carefully initialize {p[n]}. This will be clearly explained in Section III-C. B. Time Resource Allocation Now, we identify a solution for the time resource allocation {τk [n]} for given {p[n]} and {PkUL [n]}. The problem is written as (P1.2) max Rmin ,{τk [n]} Rmin N 1 X Ak [n]τk [n] ≥ Rmin , for k ∈ K, s.t. N n=2 n X PkUL [i]τk [i] ≤ i=2 Bk [i]τ0 [i], for n ∈ N̂ and k ∈ K, (24) i=1 (8) - (9), where Ak [n] , log2 1 + n−1 X (23)  PkUL [n] g0 η 2 2 2 σ kp[n]−uk k +H and Bk [n] , g0 ζk P DL . kp[n]−uk k2 +H 2 It can be shown that (P1.2) is a convex LP, which can be optimally solved by the standard LP optimization tools. Algorithm 1: Proposed Algorithm for (P1) (q) Initialize τk [n] and p(q) [n], ∀n and ∀k, and set q = 0. Repeat (q,i) Set q ← q + 1, i ← 0 and zk [n] = kp(q−1) [n] − uk k2 , ∀n and ∀k. Repeat (q,i) Set ẑk [n] = zk [n], ∀n and ∀k. (q−1) Solve (P1.1A) for given {τk [n]} by using the CVX. Update i ← i + 1. Until convergence. UL(q) Update p(q) [n] = p(q,i) [n] and Pk (q) (q) UL(q,i) [n] = Pk [n], ∀n and ∀k. UL(q) Compute Rmin and {τk [n]} from (P1.2) for given {p(q) [n]} and {Pk (q) Until Rmin converges. [n]}. 13 As a result, a solution of (P1) can be obtained by employing the alternating optimization framework and the overall process is given in Algorithm 1. In this algorithm, (P1.1) and (P1.2) are iteratively solved by fixing {τk [n]} and {p[n], PkUL [n]}, respectively. To be specific, at the (q−1) q-th iteration, Algorithm 1 first successively solves (P1.1A) for given {τk [n]} based on the CCCP until the objective value converges. Note that we denote the solution obtained at the i-th UL(q,i) iteration of the CCCP method as {p(q,i) [n], Pk computed for given UL(q) {p(q) [n], Pk [n]}, (q,i) [n], zk [n]}. Then, a solution of (P1.2) is and this procedure is repeated until convergence. (q) (q) Now, we verify the convergence of Algorithm 1. Let us define R̃min and Rmin as the objective value from the CCCP for (P1.1) and the optimal value of (P1.2) at the q-th iteration, respectively. (q) (q+1) Then, it is obvious that Rmin ≤ R̃min since the CCCP algorithm monotonically increases the objective value of (P1.1A) with respect to the iteration index i. Also, due to the fact that (q+1) Rmin (q+1) R̃min UL(q+1) is the global optimal value of (P1.2) for given {p(q+1) [n]} and {Pk ≤ [n]}, it follows (q+1) Rmin . As a result, we have (q) (q+1) Rmin ≤ R̃min (q+1) ≤ Rmin , (q) which implies that Rmin is non-decreasing with respect to the iteration index q. Because the minimum throughput Rmin is upper-bounded by a certain value, Algorithm 1 is guaranteed to converge. It is worth noting that the solutions at each iteration of Algorithm 1 are given by the local optimum and the global optimum for (P1.1) and (P1.2), respectively. For this reason, Algorithm 1 always yields at least a local optimal point for (P1). C. Trajectory Initialization In this subsection, we present a simple initialization method for Algorithm 1. Although the time resource allocation {τk [n]} satisfying (8) and (9) can be initialized without problems, it is not easy to determine the feasible initial trajectory {p[n]} due to the complicated constraints in (5) and (6). Thus, we apply the circular path scheme in [9] to our scenario whose center c = [xc yc ]T and radius r on xy-plane are respectively set to c , K 1 X uk , K k=1 r , max(r md, r max ), 14 where c represents the centroid of the GTs, and r md , 1 K PK k=1 kc − uk k and r max , vmax T 2π indicate the mean distance between c and the GTs and the maximum allowable radius of the path with given speed constraint vmax , respectively. Thereby, the initial UAV trajectory becomes 2πn 2πn T p[n] = [xc + r cos yc + r sin ] , for n ∈ N . (25) N N Note that for Algorithm 1, the time resource allocation {τk [n]} should also be initialized. The details will be discussed in Section V. IV. P ROPOSED S OLUTION FOR S EPARATED UAV WPCN In this section, we present an efficient algorithm for (P2) based on the alternating optimization. Similar to the integrated UAV WPCN, we first finds a solution for the trajectories {pI [n]} and {pE [n]} and the uplink power {PkUL [n]} for given {τk [n]}, and then computes {τk [n]} for fixed {pI [n]}, {pE [n]}, and {PkUL [n]}. The details are described in the following subsections. A. Joint Trajectories and Uplink Power Optimization In this subsection, we optimize {pI [n]}, {pE [n]}, and {PkUL [n]} with given {τk [n]}. In this case, (P2) can be simplified as max Rmin ,{PkUL [n]},{pI [n]},{pE [n]} s.t. Rmin (26) (10) - (14). To solve the non-convex problem (26), similar to (P1.1), we introduce new auxiliary variables {zkI [n]} and {zkE [n]} such that kpI [n] − uk k2 ≤ zkI [n] and kpE [n] − uk k2 ≤ zkE [n] for k ∈ K and n ∈ N. Then, problem (26) can be reformulated as (P2.1) max Rmin ,{PkUL [n]},{pI [n]}, {pE [n]},{zkI [n]},{zkE [n]} Rmin   N g0 η PkUL [n] 1 X τk [n] log2 1 + 2 I ≥ Rmin , for k ∈ K, s.t. N n=2 σ zk [n] + HI2 n X τk [i]PkUL [i] ≤ i=2 2 kpI [n] − uk k ≤ n−1 X τ0 [i] i=1 zkI [n], g0 ζk P DL , for n ∈ N̂ and k ∈ K, zkE [i] + HE2 (27) (28) for n ∈ N and k ∈ K, (29) kpE [n] − uk k2 ≤ zkE [n], for n ∈ N and k ∈ K, (30) (12) - (14). 15 The equivalence between problem (26) and (P2.1) can be easily verified by a similar approach in Lemma 1 since we have kpI [n] − uk k2 = zkI [n] and kpE [n] − uk k2 = zkE [n] at the optimal point of (P2.1). As in (P1.1), we can check that (P2.1) with the non-convex constraints (27) and (28) is the difference of convex problem which can be handled by the CCCP method [28]. Thus, at each iteration of the CCCP algorithm, we address the following approximated convex problem as (P2.1A) max Rmin ,{PkUL [n]},{pI [n]}, {pE [n]},{zkI [n]},{zkE [n]} Rmin N 1 X τk [n]RkL [n](zkI [n], PkUL [n] | ẑkI [n]) ≥ Rmin , for k ∈ K, s.t. N n=2 n X τk [i]PkUL [i] i=2 (31) n−1 1 X L E [i](zkE [i] | ẑkE [i]), for n ∈ N̂ and k ∈ K, ≤ δN i=1 k (32) (12) - (14), (29) - (30), where the approximations in (31) and (32) are obtained from (19) and (20), respectively. Therefore, we can compute a local optimal solution for (P2.1) by iteratively solving (P2.1A) with I(i) E(i) ẑkI [n] = zk [n] and ẑkE [n] = zk [n] for n ∈ N and k ∈ K, whose convergence has been shown in [28]. The overall procedure is similar to that for (P1.1) and thus omitted here for brevity. B. Time Resource Allocation With given {pI [n]}, {pE [n]}, and {PkUL [n]}, we now determine the time resource allocation solution {τk [n]}. The problem is written as (P2.2) max Rmin ,{τk [n]} Rmin N 1 X I A [n]τk [n] ≥ Rmin , for k ∈ K, s.t. N n=2 k n X PkUL [i]τk [i] ≤ i=2 BkE [i]τ0 [i], for n ∈ N̂ and k ∈ K, (34) i=1 (8) - (9), where AIk [n] , log2 1 + n−1 X (33)  PkUL [n] g0 η σ2 kpI [n]−uk k2 +H 2 and BkE [n] , g0 ζk P DL . kpE [n]−uk k2 +H 2 One can check that (P2.2) is a convex LP which can be optimally solved by the standard LP solver. Finally, we can obtain a local optimal solution of (P2) by applying the alternating optimization where we first identify a solution of (P2.1) via the CCCP algorithm, and then update {τk [n]} from 16 60 40 GTs Integrated Separated (ID UAV) Separated (ET UAV) y-axis [m] 20 0 -20 -40 -60 -60 -40 -20 0 20 40 60 x-axis [m] Fig. 3. Trajectories of UAVs optimized by the proposed algorithms for T = 30 sec. (P2.2). This procedure is repeated until the minimum throughput converges. The convergence and the local optimality of such a process can be directly verified by following the convergence proof of Algorithm 1, and thus are omitted. Also, for initializing the trajectories of two UAVs {pI [n]} and {pE [n]}, we can adopt the circular trajectory scheme presented in Section III-C. V. S IMULATION R ESULTS In this section, we evaluate the performance of the proposed algorithms by numerical results. Unless stated otherwise, the maximum uplink power constraint at the GTs and the downlink UL transmission power at the UAVs are equal to Pmax = −10 dBm and P DL = 30 dBm, respectively. Also, ζ and η are fixed as ζ = 0.6 and η = 0.9, respectively. We set the reference channel gain g0 to g0 = −30 dB and the noise variance is given by σ 2 = −90 dBm. The speed of the UAVs is limited to vmax = 5 m/s and the altitude of the UAVs is fixed to H = HI = HE = 8 m. For simulations, we adopt a system with seven GTs (K = 7), whose locations are marked by squares in Figure 3. The initial time resource allocation {τk [n]} for the proposed algorithms is determined as τk [n] = 1 , K+1 ∀n and ∀k. 17 60 40 GTs Integrated Separated (ID UAV) Separated (ET UAV) y-axis [m] 20 0 -20 -40 -60 -60 -40 -20 0 20 40 60 40 60 x-axis [m] Fig. 4. Trajectories of UAVs optimized by the proposed algorithms for T = 50 sec. 60 40 GTs Integrated Separated (ID UAV) Separated (ET UAV) y-axis [m] 20 0 -20 -40 -60 -60 -40 -20 0 20 x-axis [m] Fig. 5. Trajectories of UAVs optimized by the proposed algorithms for T = 100 sec. 18 Figures 3-5 illustrate the optimized trajectories of the UAVs in the integrated UAV and the separated UAV WPCNs for T = 30, 50, and 100 sec, respectively. The triangular and circular markers represent the positions of UAVs sampled at every 10 sec. First, in Figure 3, we can see that the UAV in the integrated UAV WPCN tries to cover all GTs by traveling a path whose center is close to the centroid of the GTs. In contrast, in the separated system, two UAVs mainly cover two different areas so that the ET UAV flies over the upper-right side of the area, while the ID UAV gets around the lower-left side. This is because when T = 30 sec, the time period is not enough for two UAVs to visit all the GTs. Therefore, by sectorizing the area, the separated UAV WPCN can transfer energy and receive information more efficiently compared to the integrated WPCN. This tendency also can be observed in Figure 4. Note that the minimum throughput performance of the separated UAV WPCN is 51% and 31% larger than that of the integrated UAV WPCN for T = 30 and 50 sec, respectively. In Figure 5, the optimized trajectory for the integrated UAV WPCN converges to a path consisting of line segments which connect the locations of the GTs for large T as in [9]. Nevertheless, the separated UAV WPCN still exhibits non-trivial trajectories due to the decoupled WET and WIT operations. When T = 100 sec, the minimum throughput performance of the separated UAV WPCN is about 15% larger than that of the integrated UAV WPCN. Figure 6 illustrates the minimum throughput performance of the proposed algorithms with respect to the time interval T . For comparison, we also plot the performance of the following baseline schemes. • Static AP: The conventional WPCN [17] with a static H-AP is adopted where the H-AP is fixed at the centroid of GTs with the altitude of H = 8 m. The time resource allocation solution is optimized from the algorithm presented in [17]. • Circular trajectory: The UAVs follow the circular path presented in Section III-C. Then, the uplink power and the time resource allocation are optimized from Algorithm 1 with fixed {p[n]} in (25). Note that with the circular trajectory, both the integrated UAV and the separated UAV WPCNs achieve the same minimum rate performance. • Equal time allocation (ETA): With equal time resource allocation τk [n] = 1 , K+1 ∀n and ∀k, the uplink power and the trajectory of the UAV are obtained from (P1.1) by applying the CCCP algorithm explained in Section III-A. • Naive power control (NPC): With the trajectory and the time resource allocation optimizations based on the proposed algorithms, each GT uses all of the energy harvested at 19 0.5 Proposed (separated) Proposed (integrated) NPC (separated) NPC (integrated) ETA (separated) ETA (integrated) Circular trajectory Static 0.45 Minimum throughput [bps/Hz] 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 20 30 40 50 60 70 80 90 100 110 120 Time period T [sec] Fig. 6. Minimum throughput with respect to time interval T for various systems. the previous time slot for WIT. If the stored energy at the GT exceeds the uplink power UL UL constraint, i.e., Ek [n − 1] > δN τk [n]Pmax , the GT transmits the information signal with Pmax at the n-th time slot. From Figure 6, we can check that even when the trajectory is simply set to the circular path, the minimum throughput can be improved compared to the conventional static WPCN. Also, the ETA case shows a performance enhancement by optimizing the trajectory of the UAV without the time resource allocation. These infer that the mobility of the UAV well compensates the doubly near-far problem of the static WPCN. Although the NPC scheme naively controls the uplink power, the minimum throughput is further improved in comparison with other baseline schemes by jointly optimizing the UAV trajectories and the time resource allocation. The minimum throughput performance of the proposed algorithms increases as the time period T grows, and the performance increment becomes smaller for a large T . In addition, the performance gap between the proposed schemes and the conventional methods grows with T . Note that this indicates that the optimization of the UAV trajectories and the time resource allocation can bring a huge gain on system performance, and thus these are critical design factors. Moreover, the separated UAV 20 0.5 T = 100 sec 0.45 Minimum throughput [bps/Hz] 0.4 0.35 0.3 Separated Integrated 0.25 T = 50 sec 0.2 0.15 T = 30 sec 0.1 0.05 0 1 2 3 4 5 6 Number of iterations 7 8 9 10 Fig. 7. Convergence of the proposed algorithms. WPCN always performs better than the integrated UAV WPCN in the proposed scheme, while the baseline schemes do not exhibit such advantages. This can be attributed to a fact that in the NPC and the ETA schemes, both the ID and the ET UAV trajectories in the separated system converge to the same trajectory, due to the limited energy causality and time resource allocation. Therefore, we can conclude that jointly optimization of trajectories, uplink power control and time resource allocation is important for the UAV WPCNs. In Figure 7, we show the convergence of the proposed algorithms for the UAV WPCNs. We observe that for all time periods, the proposed algorithms for the integrated UAV WPCN seem to converge within one iteration, while that for the separated UAV WPCN requires about three iterations for convergence. VI. C ONCLUSION This paper has investigated the UAV WPCN where mobile UAVs support the WET and the WIT of multiple GTs. For both the integrated UAV and the separated UAV WPCNs, we have jointly optimized the trajectories of the UAVs, the uplink power at the GTs, and the time 21 resource allocation strategies in order to maximize the minimum throughput among the GTs. To solve these non-convex problems, we have adopted the alternating optimization framework and the CCCP algorithm. As a result, a locally optimal solution of the original non-convex problems has been efficiently computed by the proposed algorithms whose convergence has been mathematically proved. From the simulation results, we have demonstrated the efficiency of the proposed algorithms over the conventional schemes. R EFERENCES [1] Y. Zeng, R. Zhang, and T. J. Lim, “Wireless communications with unmanned aerial vehicles: opportunities and challenges,” IEEE Communications Magazine, vol. 54, pp. 36–42, May 2016. [2] P. Zhan, K. Yu, and A. L. Swindlehurst, “Wireless Relay Communications with Unmanned Aerial Vehicles: Performance and Optimization,” IEEE Transactions on Aerospace and Electronic Systems, vol. 47, pp. 2068–2085, Jul. 2011. [3] F. Ono, H. Ochiai, and R. Miura, “A Wireless Relay Network Based on Unmanned Aircraft System With Rate Optimization,” IEEE Transactions on Wireless Communications, vol. 15, pp. 7699–7708, Nov. 2016. [4] Y. Zeng, R. Zhang, and T. J. Lim, “Throughput Maximization for UAV-Enabled Mobile Relaying Systems,” IEEE Transactions on Communications, vol. 64, pp. 4983–4995, Dec. 2016. [5] J. Lyu, Y. Zeng, R. Zhang, and T. J. Lim, “Placement Optimization of UAV-Mounted Mobile Base Stations,” IEEE Communications Letters, vol. 21, pp. 604–607, Mar. 2017. [6] M. Alzenad, A. El-Keyi, F. Lagum, and H. Yanikomeroglu, “3-D Placement of an Unmanned Aerial Vehicle Base Station (UAV-BS) for Energy-Efficient Maximal Coverage,” IEEE Wireless Communications Letters, vol. 6, pp. 434–437, Aug. 2017. [7] M. Azari, F. Rosas, K.-C. Chen, and S. Pollin, “Ultra Reliable UAV Communication Using Altitude and Cooperation Diversity,” IEEE Transactions on Communications, to be published. [Online]. Available: http://arxiv.org/abs/1705.02877. [8] Y. Zeng and R. Zhang, “Energy-Efficient UAV Communication With Trajectory Optimization,” IEEE Transactions on Wireless Communications, vol. 16, pp. 3747–3760, Jun. 2017. [9] Q. Wu, Y. Zeng, and R. Zhang, “Joint Trajectory and Communication Design for Multi-UAV Enabled Wireless Networks,” arXiv preprint arXiv:1705.02723v1, May 2017. [10] M. Chen, M. Mozaffari, W. Saad, C. Yin, M. Debbah, and C. S. Hong, “Caching in the Sky: Proactive Deployment of Cache-Enabled Unmanned Aerial Vehicles for Optimized Quality-of-Experience,” IEEE Journal on Selected Areas in Communications, vol. 35, pp. 1046–1061, May 2017. [11] S. Jeong, O. Simeone, and J. Kang, “Mobile Edge Computing via a UAV-Mounted Cloudlet: Optimization of Bit Allocation and Path Planning,” IEEE Transactions on Vehicular Technology, to be published. [Online]. Available: http://arxiv.org/abs/1609.05362. [12] R. Zhang and C. K. Ho, “MIMO Broadcasting for Simultaneous Wireless Information and Power Transfer,” IEEE Transactions on Wireless Communications, vol. 12, pp. 1989–2001, May 2013. [13] Q. Shi, L. Liu, W. Xu, and R. Zhang, “Joint Transmit Beamforming and Receive Power Splitting for MISO SWIPT Systems,” IEEE Transactions on Wireless Communications, vol. 13, pp. 3269–3280, Jun. 2014. [14] H. Lee, S.-R. Lee, K.-J. Lee, H.-B. Kong, and I. Lee, “Optimal Beamforming Designs for Wireless Information and Power Transfer in MISO Interference Channels,” IEEE Transactions on Wireless Communications, vol. 14, pp. 4810–4821, Sep. 2015. 22 [15] C. Song, J. Park, B. Clerckx, I. Lee, and K.-J. Lee, “Generalized Precoder Designs Based on Weighted MMSE Criterion for Energy Harvesting Constrained MIMO and Multi-User MIMO Channels,” IEEE Transactions on Wireless Communications, vol. 15, pp. 7941–7954, Dec. 2016. [16] J. Kim, H. Lee, C. Song, and I. Lee, “Sum Throughput Maximization for Multi-User MIMO Cognitive Wireless Powered Communication Networks,” IEEE Transactions on Wireless Communications, vol. 16, pp. 913–923, Feb. 2017. [17] H. Ju and R. Zhang, “Throughput Maximization in Wireless Powered Communication Networks,” IEEE Transactions on Wireless Communications, vol. 13, pp. 418–428, Jan. 2014. [18] L. Liu, R. Zhang, and K.-C. Chua, “Multi-Antenna Wireless Powered Communication With Energy Beamforming,” IEEE Transactions on Communications, vol. 62, pp. 4349–4361, Dec. 2014. [19] H. Kim, H. Lee, M. Ahn, H.-B. Kong, and I. Lee, “Joint Subcarrier and Power Allocation Methods in Full Duplex Wireless Powered Communication Networks for OFDM Systems,” IEEE Transactions on Wireless Communications, vol. 15, pp. 4745–4753, Jul. 2016. [20] H. Lee, K.-J. Lee, H.-B. Kong, and I. Lee, “Sum-Rate Maximization for Multiuser MIMO Wireless Powered Communication Networks,” IEEE Transactions on Vehicular Technology, vol. 65, pp. 9420–9424, Nov. 2016. [21] Y. Shi, L. Xie, Y. Hou, and H. D. Sherali, “On Renewable Sensor Networks with Wireless Energy Transfer,” In Proc. IEEE INFOCOM, pp. 1350–1358, Apr. 2011. [22] L. Xie, Y. Shi, Y. T. Hou, and H. D. Sherali, “Making Sensor Networks Immortal: An Energy-Renewal Approach With Wireless Power Transfer,” IEEE/ACM Transactions on Networking, vol. 20, pp. 1748–1761, Dec. 2012. [23] S. Guo, C. Wang, and Y. Yang, “Joint Mobile Data Gathering and Energy Provisioning in Wireless Rechargeable Sensor Networks,” IEEE Transactions on Mobile Computing, vol. 13, pp. 2836–2852, Dec. 2014. [24] M. Zhao, J. Li, and Y. Yang, “A Framework of Joint Mobile Energy Replenishment and Data Gathering in Wireless Rechargeable Sensor Networks,” IEEE Transactions on Mobile Computing, vol. 13, pp. 2689–2705, Dec. 2014. [25] T. Li, P. Fan, Z. Chen, and K. B. Letaief, “Optimum Transmission Policies for Energy Harvesting Sensor Networks Powered by a Mobile Control Center,” IEEE Transactions on Wireless Communications, vol. 15, pp. 6132–6145, Sep. 2016. [26] L. Fu, P. Cheng, Y. Gu, J. Chen, and T. He, “Optimal Charging in Wireless Rechargeable Sensor Networks,” IEEE Transactions on Vehicular Technology, vol. 65, pp. 278–291, Jan. 2016. [27] J. Xu, Y. Zeng, and R. Zhang, “UAV-Enabled Wireless Power Transfer: Trajectory Design and Energy Region Characterization,” to be presented in IEEE Globecom 2017, Dec. 2017. [28] L. T. H. An and P. D. Tao, “The DC (Difference of Convex Functions) Programming and DCA Revisited with DC Models of Real World Nonconvex Optimization Problems,” Annals of Operations Research, vol. 133, pp. 23–46, Jan. 2005. [29] Y. Sun, P. Babu, and D. P. Palomar, “Majorization-Minimization Algorithms in Signal Processing, Communications, and Machine Learning,” IEEE Transactions on Signal Processing, vol. 65, pp. 794–816, Feb. 2017. [30] M. Grant and S. Boyd, “CVX: Matlab software for disciplined convex programming, version 2.1.” http://cvxr.com/cvx, 2017.
7cs.IT
Predicting potential treatments for complex diseases based on miRNA and tissue specificity Liang Yu* School of Computer Science and Technology, Xidian University, Xi'an, 710071, P.R.China [email protected] *Corresponding author Jin Zhao School of Computer Science and Technology, Xidian University, Xi'an, 710071, P.R.China [email protected] Lin Gao School of Computer Science and Technology, Xidian University, Xi'an, 710071, P.R.China [email protected] Abstract Network-based computational method, with the emphasis on biomolecular interactions and biological data integration, has succeeded in drug development and created new directions, such as drug repositioning and drug combination. Drug repositioning, that is finding new uses for existing drugs to treat more patients, offers time, cost and efficiency benefits in drug development, especially when in silico techniques are used. microRNAs (miRNAs) play important roles in multiple biological processes and have attracted much scientific attention recently. Moreover, cumulative studies demonstrate that the mature miRNAs as well as their precursors can be targeted by small molecular drugs. At the same time, human diseases result from the disordered interplay of tissue- and cell lineage-specific processes. However, few computational researches predict drug-disease potential relationships based on miRNA data and tissue specificity. Therefore, based on miRNA data and the tissue specificity of diseases, we propose a new method named as miTS to predict the potential treatments for diseases. Firstly, based on miRNAs data, target genes and information of FDA (Food and Drug Administration) approved drugs, we evaluate the relationships between miRNAs and drugs in the tissue-specific PPI (protein-protein) network. Then, we construct a tripartite network: drug-miRNA-disease Finally, we obtain the potential drug-disease associations based on the tripartite network. In this paper, we take breast cancer as case study and focus on the top-30 predicted drugs. 25 of them (83.3%) are found having known connections with breast cancer in CTD (Comparative Toxicogenomics Database) benchmark and the other 5 drugs are potential drugs for breast cancer. We further evaluate the 5 newly predicted drugs from clinical records, literature mining, KEGG pathways enrichment analysis and overlapping genes between enriched pathways. For each of the 5 new drugs, strongly supported evidences can be found in three or more aspects. In particular, Regorafenib (DB08896) has 15 overlapping KEGG pathways with breast cancer and their p-values are all very small. In addition, whether in the literature curation or clinical validation, Regorafenib has a strong correlation with breast cancer. All the facts show that Regorafenib is likely to be a truly effective drug, worthy of our further study. It further follows that our method miTS is effective and practical for predicting new drug indications, which will provide potential values for treatments of complex diseases. Keywords: drug repositioning; miRNAs; tissue specificity; module distance Introduction The identification of therapeutic approaches for the treatment of cancer is an arduous, costly, and often inefficient process. By conservative estimates, it now takes over 15 years and $800 million to $1 billion to bring a new drug to market 1 . Drug repositioning, which is the discovery of new indications for existing drugs, is an increasingly attractive mode of therapeutic discovery. A repositioned drug does not need the initial six to nine years required for the development of new drugs, but instead goes directly to preclinical testing and clinical trials, thus reducing risk and costs 2 . Repositioning drugs has been implemented in several ways. One of the well-known examples is sildenafil citrate, which was repositioned from a hypertension drug to a therapy for erectile dysfunction3. Drugs treat diseases by targeting the proteins related to the phenotypes arising from the disease. However, drug development does not accurately follow the “one gene, one drug, one disease” principle, which has been challenged in many cases 4 and the traditional drug repositioning methods by accident makes it hard to satisfy medical needs by successfully repositioning a large number of existing drugs. Computational methods are able to solve this question by high-level integration of available biological data and elucidation of unknown mechanisms. In recent years, systems biology continues to make important progress to solve fundamental problems in biology and leading to practical applications in medicine and drug discovery5. Network-based computational systems biology emphasizes the interactions among biomolecules and highlights the network concept. Typically, a network comprises a set of nodes and edges, and is described by graph theory in a mathematical manner6. A node can be a biological molecule, for example, gene, RNA, protein, metabolite, and pathway. A node can also be at the phenotype level such as disease and drug. An edge can represent the complex interaction between two nodes such as protein-protein interaction, drug-disease therapeutic relationship, drug-protein target relationship, and so on. The accumulation of different high-throughput biology data, such as gene expression data, miRNA expression data and drug-target data, has made the reconstruction of biomolecular and cellular networks possible. Cheng et al. built a bipartite graph composed of the approved drugs and proteins linked by drug target binary associations, and relied on a supervised network-based inference method to predict drug-target interactions7. Chen et al. constructed a general heterogeneous network which comprised drugs and proteins linked by protein-protein sequence similarity, drug-drug chemical similarity, and the known drug-target interaction8. Yeh et al.9 developed a network flow approach for identifying potential target proteins, which have a strong influence on disease genes in the context of biomolecular networks. The biomolecular networks are weighted by degree of co-expression of interacting protein pair. More recently, many studies have demonstrated that drugs can regulate microRNA (miRNAs) expression and mature miRNAs as well as their precursors can be targeted by small molecular drugs10,11,12,13. For example, Miravirsen (SPC3649) is the first miRNA-targeted drug in clinical trials, which can successfully inhibit miR-122 expression that is required by hepatitis C virus replication14. The expression levels of 32 miRNAs (significant up-regulation of 22 miRNAs and down-regulation of 10 miRNAs) were changed after the treatment of trichostatin A in human breast cancer cell lines 15 . miRNAs are non-coding small RNAs (∼23 nucleotides) that downregulate gene expression at the post transcriptional level by inhibiting translation or initiating mRNA degradation and are dysregulated in most of human cancers16. Increasingly evidences have demonstrated that miRNAs play significant roles in many important biological processes, such as cell growth17 , cellular signaling18 , tissue development19 and disease process20. Although only approximately 2000 miRNAs exist in humans, they regulate 30% of all genes. miRNAs have been identified to play a crucial role in various human disease, especially in cancers. Therefore, targeting miRNAs with drugs will provide a new type of therapy for complex diseases21 and a new direction for drug repositioning. However, few computational researches predict drug-disease relationships based on miRNA data. Moreover, many genes with tissue-specific expression and function are expected to underlie many human diseases22,23. Therefore, in this study, we propose a new method based on miRNA data and tissue specificity of diseases, named as miTS, to predict potential drugs for diseases. The framework of miTS is shown in Figure 1. Firstly, we download miRNA expression data of diseases from TCGA24, miRNA-target gene relationship data from three experimentally validated databases: miRecords25, miRTarbase26 and TarBase27, and the drug-target gene data from Drugbank28 and KEGG29. Secondly, we select differentially expressed miRNAs of diseases based on a threshold and preprocess the target information of FDA approved drugs. Thirdly, we evaluate the relationships between miRNAs and drugs in the tissue-specific PPI network. And then, we construct a tripartite network: drug-miRNA-disease. Finally, we obtain the potential drug-disease associations based on the tripartite network. In this paper, we take breast cancer as case study and evaluate the results from CTD benchmark, clinical records, literature mining, KEGG pathways enrichment analysis and overlapping genes between enriched pathways. In the top-30 drugs, we find 5 new drugs for breast cancer. In particular, Regorafenib (DB08896) has 15 overlapping KEGG pathways with breast cancer and their p-values are all very small. In addition, whether in the literature curation or clinical validation, Regorafenib has a strong correlation with Figure 1. The framework of our method miTS. (A) Data preparation: miRNA expression data of breast cancer got from TCGA, miRNA-target gene data got from miRecords, miRTarbase and TarBase, and drug-target gene data got from Drugbank and KEGG. (B) Data preprocessing: we use Z-score to obtain the differentially expressed miRNAs for diseases and preprocess the target information of drugs. (C) In the tissue-specific PPI network, the targets of drug and miRNA are mapped to the PPI network. Orange nodes represent the target genes of miRNAs. Purple nodes represent the target genes of drugs. Green nodes represent the background genes. (D) Based on the module distance algorithm, we construct a drug-miRNA-disease tripartite network, and then based on the tripartite network, we get potential drugs for diseases. dA,B represents the association score between a drug and a disease. breast cancer. All the facts show that Regorafenib is likely to be a truly effective drug, worthy of our further study. Data and Method Data Drug-target data: FDA-approved drugs of human and their corresponding targets are downloaded from KEGG database and Drugbank. We merge the two datasets and get 1,732 drugs, 1,714 targets and 12,361 drug-target pairs. miRNA-target data: The target genes of miRNAs are downloaded from miRecords, miRTarbase, and TarBase databases. We merge the three datasets and get 340 miRNAs, 2,028 targets and 3,652 miRNA-target pairs. miRNA-disease data: The miRNA-disease curated relationships are downloaded from HMDD (the Human microRNA Disease Database)30. HMDD presents more detailed and comprehensive annotations to the human miRNA-disease association data, including miRNA-disease association data from the evidence of genetics, epigenetics, circulating miRNAs, and miRNA-target interactions. Finally, we get 578 miRNAs, 383 diseases and 6,448 miRNA-disease relationships. miRNA expression data: Taking breast cancer as case study, we download the miRNAs expression data related with breast cancer from TCGA and get a matrix of 503 rows and 1,189 columns, row representing miRNA, column representing cancer sample, and the values in the matrix representing the RPKM (Reads Per Kilobase per Million mapped reads) for the miRNAs. We take the mean value of the RPKM values for 1,189 samples as the final value. Disease-gene data: The genes related with breast cancer are downloaded from OMIM31 database. Tissue-specific PPI Interaction network: We download the mammary tissue-specific PPI network marked as “Top Edges” from GIANT (Genome-scale Integrated Analysis of gene Networks in Tissues) database32 (http://giant.princeton.edu/) (2017 version). GIANT proposes a tissue-specific benchmark to automatically up-weight datasets relevant to a tissue from a large data of different tissues and cell-types. Finally, we get 15,269 proteins and 883,071 protein-protein interactions. The weights on the edges are proportional to the relationships between nodes. In order to apply module distance algorithm33 to calculate the relationships between drugs and miRNAs, we use the Gaussian kernel e  w 2 to transfer protein-protein closeness w to protein-protein distance w , as shown in formula (1). 2 w '  ew (1) Method Screening differentially expressed miRNAs In order to obtain the differentially expressed miRNAs of breast cancer, we first filter the miRNAs expression data downloaded from TCGA. For a miRNA r , we use formula (2) to calculate its Z - score . Z - score = R - mean(r )  (r ) (2) Where R is the RPKM value of miRNA r ; mean (r ) and  (r ) represent mean value and standard deviation of r , respectively. Then we choose Z - score =1.645 (p-value = 0.05) as threshold to screen differentially expressed miRNAs. Finally, we get a total of 40 differentially expressed miRNAs of breast cancer (see Table 1). In Table 1, the miRNAs marked by “*” represent they have connections with breast cancer in HMDD. We find 34 of 40 (85%) differentially expressed miRNAs are related with breast cancer, which indicates that miRNAs associated with breast cancer tend to be highly expressed in breast cancer patients. Then, we choose the 34 miRNAs marked by “*” in Table 1 for further study. Table 1. Differentially expressed miRNAs of breast cancer miRNA name Z-score miRNA name Z-score hsa-mir-21* hsa-mir-22* miRNA name Z-score 3.32 hsa-mir-375* 2.94 hsa-mir-101-1* 2.32 hsa-mir-23a* 1.91 2.29 hsa-mir-199a-2* 1.90 hsa-mir-10b* 2.93 hsa-mir-200c* 2.28 hsa-mir-126* 1.90 hsa-mir-30a* 2.85 hsa-mir-25* 2.27 hsa-mir-100* 1.86 hsa-mir-148a* 2.77 hsa-let-7a-3* 2.21 hsa-let-7c* 1.79 hsa-mir-99b 2.73 hsa-let-7a-1* 2.21 hsa-mir-151 1.78 hsa-mir-143* 2.73 hsa-mir-30d* 2.19 hsa-mir-199a-1* 1.73 hsa-mir-182* 2.72 hsa-mir-92a-2* 2.18 hsa-mir-26a-2* 1.72 hsa-let-7b* 2.61 hsa-let-7f-2* 2.12 hsa-mir-142 1.72 hsa-mir-10a* 2.56 hsa-mir-93* 2.03 hsa-mir-29c* 1.70 hsa-mir-103-1 2.50 hsa-mir-29a* 2.03 hsa-mir-181a-1* 1.69 hsa-let-7a-2* 2.44 hsa-mir-28 2.00 hsa-mir-141* 1.66 hsa-mir-30e 2.38 hsa-mir-199b* 1.98 hsa-mir-183* 2.37 hsa-mir-203* 1.94 The miRNAs marked by “*” represent they have relationship with breast cancer in HMDD. Construct drug-miRNA-disease tripartite network The relationship between a miRNA and a drug is derived by measuring the correlation between their target sets. Because miRNA target genes, drug target genes and protein-protein interaction (PPI) networks remain largely incomplete, we calculate the distance between two modules based on the shortest path in incomplete networks33. Figure 2 gives an example to calculate the distance between miRNA A and drug B in a weighted tissue-specific PPI network. As shown in Figure 2, miRNA A has three target genes, marked as a, b, c and drug B has four targets, marked as c, d, e, f. For the node a, its distance to targets {c, d, e, f} of drug B are 0.8, 1.0, 1.1 and 1.9 respectively, so its shortest distance to drug B is 0.8. In this way, we can obtain the distances between each node in gene set {a, b, c} and drug B, and the distances between each node in target set {c, d, e, f} and miRNA A, shown in Figure 2. Finally, the distance between miRNA A and drug B, dA,B , is equals to the sum of all the distances divided by the total number of nodes related to miRNA A and drug B. Here, the total number is 7. Figure 2. An example for calculating the distance between target set of miRNA A and target set of drug B. Orange and purple nodes represent genes related to miRNA A and drug B, respectively. Node c is a shared node, so it is marked by two colors. Through the above calculation process, we get 1,017 drugs, 25 miRNAs and 25,425 drug-miRNA relationships. Combining the drug-miRNA relations with the miRNA-breast cancer information, we construct a drug-miRNA-breast cancer tripartite network. Predicting potential drugs for breast cancer Based on the drug-miRNA-breast cancer tripartite network, we predicting potential drugs for breast cancer. If a drug and breast cancer have common miRNA neighbors, there will be a connection between them. Finally, there are 25 common miRNAs between drugs and breast cancer. We use formula (3) to calculate the average distance between the 25 miRNAs related to breast cancer and drugs as the drug-breast cancer relationship distance score, d A, B . n d A, B  d i 1 Ai , B ' n (3) Where d Ai , B ' represents the distance between the i -th miRNA of disease A and the drug B ; n represents the number of miRNAs corresponding to disease A . Here, A = breast cancer and n = 25. In order to make the drug-disease distances be proportional to their direct correlations, we use formula (4) to normalize d A, B as S A, B : S A, B  Maxd  d A, B Maxd  Mind (4) Where Maxd and Mind represent the maximum and the minimum of all the drug-disease distances, respectively; d A, B represents the distance between disease A and drug B; S A, B represents the direct association between disease A and drug B. Results CTD benchmark verification In our study, we choose breast cancer as case, the drug-breast cancer associations are ranked in descending order according to their scores. In order to verify the accuracy of our results, we use the drug-breast cancer relationships data in Comparative Toxicogenomics Database (CTD)34 as benchmark. As shown in Figure 3, we give the precision curves of predicted drug-breast cancer relationship results. For each given threshold, the precision of our method is calculated by formula (5). precision= PCTD P (5) Where P represents the number of predicted drug-disease pairs; PCTD represents the number of drug-disease pairs, which can be found in CTD database. In Figure 3, we give the precision curves of predicted drug-breast cancer pairs at different top-x%. From the figure, we find the higher the associations ranking, the higher the accuracy. Hence, for the breast cancer, we choose top 30 drugs for further analysis. The top 30 drugs related to breast cancer are shown in Table 2. We validate the 30 drugs by CTD database and find 11 (36.7%) of them are marked as “therapeutic (T)”, which means that they have a highly correlation with breast cancer. In addition, we find 14 of the rest 19 drugs also have connections with breast cancer in CTD database with inference score over 0 and they are marked as “Ref” in Table 2. That is to say, there are 83.3% (25/30) drugs can be found in the CTD database and we predict five potential drugs for breast cancer (DB08871, DB00031, DB08813, DB08896, and DB06813, marked as boldface in Table 2). Figure 3. The precision of our predictions at different top-x% drug-breast cancer pairs. Clinical evaluation For the five predicted drugs, we further analyze them based on the ClinicalTrials.gov (https://clinicaltrials.gov/). ClinicalTrials.gov is a registry and results database of publicly and privately supported clinical studies of human participants conducted around the world. Currently, it lists 242,537 studies with locations in all 50 states and in 198 countries (April 25, 2017). From the ClinicalTrials.gov, we can find 84 records for drug Eribulin mesylate (DB08871) treat breast cancer. For example, “Eribulin Mesylate Phase IV Clinical Trial in Korean Patients with Metastatic or Locally Advanced Breast Cancer (ESKIMO) (NCT01961544)”, the purpose is assessing the safety of Eribulin which is approved for the treatment of the patients in Korea with locally advanced or metastatic breast cancer; “Eribulin with Trastuzumab as First-line Therapy for Locally Recurrent or Metastatic HER2 Positive Breast Cancer Table 2. The top 30 drugs related to breast cancer Rank Drugbank ID Drug name Marker Inference Score Similarity Score 1 DB08818 Hyaluronic acid Ref 61.1 1.00000 2 DB00570 Vinblastine T 40.6 0.97977 3 DB00642 Pemetrexed T 12.38 0.97666 4 DB01169 Arsenic trioxide T 212.32 0.96998 5 DB00242 Cladribine Ref 14.83 0.96343 6 DB04967 Lucanthone Ref 45.07 0.96120 7 DB09073 Palbociclib T 53.75 0.96083 8 DB02701 Nicotinamide Ref 63.26 0.96013 9 DB01005 Hydroxyurea Ref 32.57 0.95909 10 DB01204 Mitoxantrone T 25.1 0.95847 11 DB00309 Vindesine sulfate T 2.54 0.95388 12 DB00361 Vinorelbine T 4.36 0.95388 13 DB08871 Eribulin None None 0.95388 14 DB01394 Colchicine Ref 50.29 0.95213 15 DB01229 Paclitaxel T 111.41 0.95050 16 DB01248 Docetaxel T 72.35 0.95050 17 DB00440 Trimethoprim Ref 6.82 0.94971 18 DB01179 Podofilox Ref 2.87 0.94918 19 DB05260 Gallium nitrate Ref 19.88 0.94671 20 DB00441 Gemcitabine T 112.67 0.94582 21 DB00031 Tenecteplase None None 0.94357 22 DB08813 Nadroparin None None 0.94325 23 DB00432 Trifluridine Ref 12.49 0.94205 24 DB01073 Fludarabine Ref 59.43 0.94184 25 DB00694 Daunorubicin Ref 85.05 0.94044 26 DB00970 Dactinomycin Ref 98.94 0.93988 27 DB08896 Regorafenib None None 0.93853 28 DB06813 Pralatrexate None None 0.93853 29 DB00563 Methotrexate T 123.36 0.93799 30 DB00615 Rifabutin Ref 2.89 0.93433 Ranked by drug-breast cancer similarity score. Marker has three values: T(therapeutic), Ref (inferred by genes) and None (no record in CTD database). Inference Score represents the score for the inference based on the topology of the network consisting of the chemical, disease, and one or more genes used to make the inference. (NCT01269346)”, the purpose is evaluating the safety and efficacy of Eribulin mesylate in combination with trastuzumab as first line treatment in female subjects with locally recurrent or metastatic human epidermal growth factor receptor (HER2) positive breast cancer; “Eribulin Mesylate in Treating Patients with Previously Treated Metastatic Breast Cancer (NCT01908101)”, and so on. For drug Nadroparin (DB08813), we find one record: “Prevention of Venous and Arterial Thromboembolism, in Cancer Patients Undergoing Chemotherapy, With a Low Molecular Weight Heparin (Nadroparin Calcium) (NCT00951574)”, 1200 patients with lung, breast, gastrointestinal (stomach, colon-rectum, pancreas), ovarian or head and neck cancer undergoing chemotherapy will be randomly assigned in a 2:1 ratio and in double-blind conditions to a treatment with subcutaneous low molecular weight heparin (nadroparin calcium, one injection/day) or placebo for the overall duration of chemotherapy or up to a maximum of 4 months. For drug Regorafenib (DB08896), we find three records related with breast cancer, “Refametinib in Combination with Regorafenib in Patients with Advanced or Metastatic Cancer (NCT02168777)”, “Effect of Regorafenib on Digoxin and Rosuvastatin in Patients with Advanced Solid Malignant Tumors (NCT02106845)”, and so on. For drug Pralatrexate (DB06813), we find a clinical study of Pralatrexate in 22 female patients with previously-treated breast cancer (NCT01118624). Only one drug, Tenecteplase (DB00031) was not found in ClinicalTrials.gov. Literature curation In the above section, the top 30 drugs related with breast cancer are validated by CTD database and Clinical database. After our analysis, we obtain five potential drugs (Eribulin mesylate, Tenecteplase, Nadroparin, Regorafenib, Pralatrexate) for breast cancer. In ClinicalTrials.gov database, only one drug, Tenecteplase, cannot be found its corresponding record. In this section, we will analyze the five potential drugs for breast cancer by literature mining. Eribulin mesylate (DB08871) is an anticancer drug marketed by Eisai Co. under the trade name Halaven, which was approved by the U.S. Food and Drug Administration (FDA) on November 15, 2010, to treat patients with metastatic breast cancer35. In 2016, Kurebayashi J et al. investigated the combined effects of Eribulin and antiestrogens. They used a panel of eight breast cancer cell lines, including five estrogen receptors (ER)-positive and three ER-negative cell lines. The results of this study demonstrate that Eribulin had potent antitumor effects on estrogen-stimulated ER-positive breast cancer cells36. Nadroparin (DB08813) is an anticoagulant belonging to a class of drugs called low molecular weight heparins (LMWHs), which is used in general and orthopedic surgery to prevent thromboembolic disorders. In 2015, Sun Y et al.37 used the MTT test to observe the effect of different concentrations of nadroparin on the growth capacity of breast cancer cells MDA-MB-231. The purpose was to study the effect of nadroparin in the migration of breast cancer cells MDA-MB-231 and its action mechanism. The results show that nadroparin can inhibit the growth capacity of breast cancer cells MDA-MB-231 and the migration and invasion of breast cancer cells MDA-MB-231. Its mechanism is to down-regulate MMP-2 and MMP-9 expressions after combining with Integrin β3. Regorafenib (DB08896) is an oral multi-kinase inhibitor developed by Bayer which targets angiogenic, stromal and oncogenic receptor tyrosine kinase (RTK). Regorafenib has been demonstrated to increase the overall survival of patients with metastatic colorectal cancer38. Stalker L et al. using regorafenib in mammary tumor cell lines, the results show regorafenib may prove clinically useful in inhibiting breast cancer cell migration and metastasis39. Su J C et al. investigated the potential of regorafenib to suppress metastasis of triple-negative breast cancer (TNBC) cells through targeting SHP-1/p-STAT3/VEGF-A axis and found a significant correlation between cancer cell migration and SHP-1/p-STAT3/VEGF-A expression in human TNBC cells40. Pralatrexate (DB06813) is an anti-cancer drug. It is the first drug approved as a treatment for patients with relapsed T-cell lymphoma 41 . Pralatrexate results in increased activity of CASP3 protein, which has been found to be necessary for normal brain development as well as its typical role in apoptosis, where it is responsible for chromatin condensation and DNA fragmentation42. Tenecteplase (DB00031) is a tissue plasminogen activator (tPA) produced by recombinant DNA technology using an established mammalian cell line and used as a thrombolytic drug. Nielsen VG et al.43 to study whether tissue-type plasminogen activator (tPA) in plasma obtained from patients with breast cancer, lung cancer, pancreatic cancer and colon cancer is less than that obtained from normal individuals. The results show that tissue-type plasminogen activator-induced fibrinolysis in breast cancer, lung cancer, pancreatic cancer and colon cancer patients is enhanced. Sumiyoshi K et al.44 found that the increase in levels of plasminogen activator and type-1 plasminogen activator inhibitor in human breast cancer may play a role in tumor progression and metastasis. Although we have not found the relationship between tenecteplase (DB00031) and breast cancer through the literatures, the drug had the similar effects as nadroparin45. Therefore, we infer that tenecteplase is likely to have effect on breast cancer. KEGG pathway functional enrichment analysis In this section, we will further make KEGG pathway enrichment analysis on five potential drugs and their associated disease. KEGG (http://www.kegg.jp/ or http://www.genome.jp/kegg/) is an encyclopedia of genes and genomes46. Its primary goal is to assign functional meanings to genes and genomes both at the molecular and higher levels. Thus, drugs or diseases can be associated with certain pathways through their related genes. If a drug has overlapping KEGG pathways with a disease, the drug and the disease may have great relevance. That is, the drug may treat or cause the disease by acting on the overlapping pathways. We use DAVID 47 , 48 functional annotation tool for KEGG pathway enrichment analysis. DAVID provides a comprehensive set of functional annotation tools for investigators to understand biological significance of a large number of genes. For any given gene list, DAVID is able to visualize genes on BioCarta & KEGG pathway maps, identify enriched biological themes, especially GO terms, and so on. Therefore, we use DAVID to identify overlapping KEGG pathways between potential drugs and breast cancer. The p-value is set to be less than 0.05. We find Nadroparin and Regorafenib have 4 and 15 overlapping KEGG pathways with breast cancer, respectively. The details are shown in Table 3. From Table 3, we can find their corresponding p-values are very small. Although the drug Eribulin mesylate has not overlapping functional pathways with the breast cancer at present, it can be enriched to “hsa04540: Gap junction”. In fact, protein connexin 43 (Cx43), a part of intercellular gap junctions, is frequently down-regulated in tumors 49 . Studies have demonstrated that gap junctions (GJs) composed of connexin (Cx) proteins have the potential to modulate drug chemosensitivity in multiple tumor cells50. Table 3. Overlapping KEGG pathways between potential drugs and breast cancer Drug Name Nadroparin Regorafenib Overlapping enriched pathways p-value hsa05210: Colorectal cancer 0.00897 hsa05161: Hepatitis B 0.02098 hsa05166: HTLV-I infection 0.03704 hsa05200: Pathways in cancer 0.04687 hsa04015: Rap1 signaling pathway 3.41E-14 hsa04014: Ras signaling pathway 7.18E-14 hsa04151: PI3K-Akt signaling pathway 3.36E-10 hsa05230: Central carbon metabolism in cancer 4.38E-08 hsa05215: Prostate cancer 2.21E-07 hsa05200: Pathways in cancer 1.13E-06 hsa05218: Melanoma 4.76E-06 hsa05214: Glioma 1.65E-04 hsa05221: Acute myeloid leukemia 0.00404 hsa05205: Proteoglycans in cancer 0.00433 hsa05220: Chronic myeloid leukemia 0.00660 hsa04012: ErbB signaling pathway 0.00952 hsa05206: MicroRNAs in cancer 0.01157 hsa05231: Choline metabolism in cancer 0.01269 hsa04722: Neurotrophin signaling pathway 0.01761 For drug Tenecteplase, we find one function enrichment pathway: “hsa04610: Complement and coagulation cascades”. In 2016, based on the microarray data of GSE3467 from Gene Expression Omnibus(GEO) database, Yu J et al.51 identified the differentially expressed genes (DEGs) between 9 PTC samples and 9 normal controls. The purpose was predicted key genes and pathways in papillary thyroid carcinoma. Their results showed that the highly expressed genes in papillary thyroid carcinoma were mainly enriched on the “hsa04610: Complement and coagulation cascades” functional pathway. As for Pralatrexate, because it has only two targets: DHFR and TYMS, it has few related KEGG pathways. That is the main reason that Pralatrexate has no overlapping KEGG pathways with breast cancer at present. Overlapping genes between enriched KEGG pathways To further analyze our results, for Eribulin mesylate, Tenecteplase and Pralatrexate, we calculate the common genes between enriched pathways of each drug and those of breast cancer. The more common genes, the stronger relationship between the drug and disease. The results are shown in Figure 4A-C, respectively. The purple hexagon nodes represent the enriched pathways of a drug. The light green circular nodes represent breast cancer enriched pathways. The width of edges represents the number of common genes between two pathway sets. The wider the edge, the more the number of common genes. From Figure 4, we can find the three drugs Eribulin mesylate, Tenecteplase and Pralatrexate all have strong connection with breast cancer, which further imply the three drugs are likely to be the potential treatments of breast cancer. A B C Figure 4. The common genes between enriched pathway sets of drugs and breast cancer. The purple hexagon nodes represent the enriched pathways of a drug. The light green circular nodes represent breast cancer enriched pathways. The width of edges represents the number of common genes between two pathway sets. The wider the edge, the more the number of common genes. (A) The common genes between enriched pathway sets of Eribulin mesylate and breast cancer. (B) The common genes between enriched pathway sets of Tenecteplase and breast cancer. (C) The common genes between enriched pathway sets of Pralatrexate and breast cancer. Discussions and conclusions At present, “undruggable” proteins can be targeted via their miRNA gene regulators, enabling the treatment of diseases that seem impossible to cure. Human diseases result from the disordered interplay of tissue- and cell lineage–specific processes. Therefore, here we propose a new method miTS to predict new indications of drugs based on miRNA data and the tissue specificities of diseases. Taking breast cancer as case study, we predict five potential drugs and analyze them from five aspects: CTD benchmark, clinical records, literature curation, KEGG pathway functional enrichment analysis and overlapping genes between enriched KEGG pathways. We find for the five new drugs, they are supported at least in three ways. In particular, Regorafenib (DB08896) has 15 overlapping KEGG pathways with breast cancer and their p-values are all very small. In addition, whether in the literature curation or clinical validation, Regorafenib has a strong correlation with breast cancer. All the evidence shows Regorafenib is likely to be a truly effective drug, worthy of our further study. The results have demonstrated the performance of our model and the feasibility of drug repositioning based on miRNA data and tissue specificity. Due to the incompleteness of data, there may be some biases in our method. With the continuous improvement of data, our method miTS will find more effective drugs for disease treatment. All in all, our research reveals a promising perspective to predict drug-disease relationships and seeks new opportunities for drug repositioning. Acknowledgments This work was supported in part by the National Natural Science Foundation of China (Nos. 61672406, 61532014, 91530113,61502363 and 61402349), the Natural Science Basic Research Plan in Shaanxi Province of China (Nos. 2016JQ6057, 2015JM6283). Reference [1] Adams C P, Brantner V V. Estimating the cost of new drug development: is it really $802 million? [J]. Health affairs, 2006, 25(2): 420-428. [2] Ashburn T T, Thor K B. Drug repositioning: identifying and developing new uses for existing drugs[J]. Nature reviews Drug discovery, 2004, 3(8): 673-683. [3] Novac N. Challenges and opportunities of drug repositioning[J]. Trends in pharmacological sciences, 2013, 34(5): 267-272. [4] Hopkins A L. Network pharmacology: the next paradigm in drug discovery[J]. Nature chemical biology, 2008, 4(11): 682-690. [5] Wang Y, Zhang X S, Chen L. Modelling biological systems from molecules to dynamical networks[J]. BMC systems biology, 2012, 6(1): S1. [6] Barabasi A L, Oltvai Z N. Network biology: understanding the cell's functional organization[J]. Nature reviews genetics, 2004, 5(2): 101-113. [7] Cheng F, Liu C, Jiang J, et al. Prediction of drug-target interactions and drug repositioning via network-based inference[J]. PLoS Comput Biol, 2012, 8(5): e1002503. [8] Chen X, Liu M X, Yan G Y. Drug–target interaction prediction by random walk on the heterogeneous network[J]. Molecular BioSystems, 2012, 8(7): 1970-1978. [9] Yeh S H, Yeh H Y, Soo V W. A network flow approach to predict drug targets from microarray data, disease genes and interactome network-case study on prostate cancer[J]. Journal of clinical bioinformatics, 2012, 2(1): 1. [10] Bose D, Jayaraj G, Suryawanshi H, et al. The Tuberculosis Drug Streptomycin as a Potential Cancer Therapeutic: Inhibition of miR‐21 Function by Directly Targeting Its Precursor[J]. Angewandte Chemie International Edition, 2012, 51(4): 1019-1023. [11] Xu S. miRNAs as Novel Therapeutic Targets and Diagnostic Biomarkers for Parkinsons Disease: U.S. Patent Application 14/416,932[P]. 2013-7-24. [12] Liu Z, Sall A, Yang D. MicroRNA: an emerging therapeutic target and intervention tool[J]. International journal of molecular sciences, 2008, 9(6): 978-999. [13] Srinivasan S, Selvan S T, Archunan G, et al. MicroRNAs: the next generation therapeutic targets in human diseases[J]. 2013. [14] Lanford R E, Hildebrandt-Eriksen E S, Petri A, et al. Therapeutic silencing of microRNA-122 in primates with chronic hepatitis C virus infection[J]. Science, 2010, 327(5962): 198-201. [15] Rhodes L V, Nitschke A M, Segar H C, et al. The histone deacetylase inhibitor trichostatin A alters microRNA expression profiles in apoptosis-resistant breast cancer cells[J]. Oncology reports, 2012, 27(1): 10. [16] Bartel D P. MicroRNAs: genomics, biogenesis, mechanism, and function[J]. cell, 2004, 116(2): 281-297. [17] Esquela-Kerscher A, Slack F J. Oncomirs—microRNAs with a role in cancer[J]. Nature Reviews Cancer, 2006, 6(4): 259-269. [18] Cui Q, Yu Z, Purisima E O, et al. Principles of microRNA regulation of a human cellular signaling network[J]. Molecular systems biology, 2006, 2(1): 46. [19] Krichevsky A M, King K S, Donahue C P, et al. A microRNA array reveals extensive regulation of microRNAs during brain development[J]. Rna, 2003, 9(10): 1274-1281. [20] Calin G A, Croce C M. MicroRNA signatures in human cancers[J]. Nature reviews cancer, 2006, 6(11): 857-866. [21] Zhang S, Chen L, Jung E J, et al. Targeting microRNAs with small molecules: Between Dream and Reality[J]. Clinical pharmacology and therapeutics, 2010, 87(6): 754. [22] Cai, J.J. & Petrov, D.A. Relaxed purifying selection and possibly high rate of adaptation in primate lineage-specific genes. Genome Biol. Evol. 2, 393–409 (2010). [23] Winter, E.E., Goodstadt, L. & Ponting, C.P. Elevated rates of protein secretion, evolution, and disease among tissue-specific genes. Genome Res. 14, 54–61 (2004). [24] Weinstein J N, Collisson E A, Mills G B, et al. The cancer genome atlas pan-cancer analysis project[J]. Nature genetics, 2013, 45(10): 1113-1120. [25] Xiao F, Zuo Z, Cai G, et al. miRecords: an integrated resource for microRNA–target interactions[J]. Nucleic acids research, 2009, 37(suppl 1): D105-D110. [26] Chou C H, Chang N W, Shrestha S, et al. miRTarBase 2016: updates to the experimentally validated miRNA-target interactions database[J]. Nucleic acids research, 2016, 44(D1): D239-D247. [27] Vlachos I S, Paraskevopoulou M D, Karagkouni D, et al. DIANA-TarBase v7. 0: indexing more than half a million experimentally supported miRNA: mRNA interactions[J]. Nucleic acids research, 2015, 43(D1): D153-D159. [28] Wishart D S, Knox C, Guo A C, et al. DrugBank: a comprehensive resource for in silico drug discovery and exploration[J]. Nucleic acids research, 2006, 34(suppl 1): D668-D672. [29] Kanehisa M, Goto S. KEGG: kyoto encyclopedia of genes and genomes[J]. Nucleic acids research, 2000, 28(1): 27-30. [30] Li Y, Qiu C, Tu J, et al. HMDD v2. 0: a database for experimentally supported human microRNA and disease associations[J]. Nucleic acids research, 2013: gkt1023. [31] Hamosh A, Scott A F, Amberger J S, et al. Online Mendelian Inheritance in Man (OMIM), a knowledgebase of human genes and genetic disorders[J]. Nucleic acids research, 2005, 33(suppl 1): D514-D517. [32] Greene C S, Krishnan A, Wong A K, et al. Understanding multicellular function and disease with human tissue-specific networks[J]. Nature genetics, 2015, 47(6): 569-576. [33] Menche J, Sharma A, Kitsak M, Ghiassian S, Vidal M, Loscalzo J, et al.Uncovering disease?disease relationships through the incompleteinteractome. Science 2015;347(6224):1257601. [34] Davis A P, Grondin C J, Lennon-Hopkins K, et al. The Comparative Toxicogenomics Database's 10th year anniversary: update 2015[J]. Nucleic acids research, 2015, 43(D1): D914-D920. [35] US Food and Drug Administration. FDA approves new treatment option for late-stage breast cancer[J]. Press release, 2013. [36] Kurebayashi J, Kanomata N, Yamashita T, et al. Antitumor and anticancer stem cell activities of eribulin mesylate and antiestrogens in breast cancer cells[J]. Breast Cancer, 2016, 23(3): 425-436. [37] Sun Y, Gu J. Study on effect of naringenin in inhibiting migration and invasion of breast cancer cells and its molecular mechanism[J]. Zhongguo Zhong Yao Za Zhi. 2015, 40(6): 1144-1150. [38] Van Cutsem E, Sobrero A F, Siena S, et al. Phase III CORRECT trial of regorafenib in metastatic colorectal cancer (mCRC)[J]. 2012. [39] Stalker L, Pemberton J, Moorehead R A. Inhibition of proliferation and migration of luminal and claudin-low breast cancer cells by PDGFR inhibitors[J]. Cancer cell international, 2014, 14(1): 89. [40] Su J C, Mar A C, Wu S H, et al. Disrupting VEGF-A paracrine and autocrine loops by targeting SHP-1 suppresses triple negative breast cancer metastasis[J]. Scientific Reports, 2016, 6. [41] O'connor O A. Pralatrexate: an emerging new agent with activity in T-cell lymphomas[J]. Current opinion in oncology, 2006, 18(6): 591-597. [42] Porter A G, Jänicke R U. Emerging roles of caspase-3 in apoptosis[J]. Cell death and differentiation, 1999, 6(2): 99-104. [43] Nielsen V G, Matika R W, Ley M L B, et al. Tissue-type plasminogen activator-induced fibrinolysis is enhanced in patients with breast, lung, pancreas and colon cancer[J]. Blood Coagulation & Fibrinolysis, 2014, 25(3): 248-253. [44] Sumiyoshi K, Baba S, Sakaguchi S, et al. Increase in levels of plasminogen activator and type-1 plasminogen activator inhibitor in human breast cancer: possible roles in tumor progression and metastasis[J]. Thrombosis research, 1991, 63(1): 59-71. [45] De Luca G, Marino P. Adjunctive benefits from low-molecular-weight heparins as compared to unfractionated heparin among patients with ST-segment elevation myocardial infarction treated with thrombolysis. A meta-analysis of the randomized trials[J]. American heart journal, 2007, 154(6): 1085. e1-1085. e6. [46] Minoru Kanehisa1, Miho Furumichi1 Mao Tanabe, Yoko Sato and Kanae Morishima. KEGG: new perspectives on genomes, pathways, diseases and drugs. Nucl. Acids Res. (2016) doi: 10.1093/nar/gkw1092. [47] Huang DW, Sherman BT, Lempicki RA.Systematic and integrative analysis of large gene lists using DAVID bioinformatics resources.Nature Protocols2008, 4: 44. [48] Huang DW, Sherman BT, Lempicki RA. Bioinformatics enrichment tools: paths toward the comprehensive functional analysis of large gene lists. Nucleic Acids Research2009,37:1-13. [49] Radić J, Krušlin B, Šamija M, et al. Connexin 43 Expression in PrimaryColorectal Carcinomas in Patients with Stage III and IV Disease[J]. Anticancer research, 2016, 36(5): 2189-2196. [50] Yang Y, Zhu J, Zhang N, et al. Impaired gap junctions in human hepatocellular carcinoma limit intrinsic oxaliplatin chemosensitivity: A key role of connexin 26[J]. International journal of oncology, 2016, 48(2): 703-713. [51] Yu J, Mai W, Cui Y, et al. Key genes and pathways predicted in papillary thyroid carcinoma based on bioinformatics analysis[J]. Journal of endocrinological investigation, 2016, 39(11): 1285-1293.
5cs.CE
A Quadratic Assignment Formulation of the Graph Edit Distance Sébastien Bougleux1,4 , Luc Brun1,4 , Vincenzo Carletti1,2 , Pasquale Foggia2 , Benoit Gaüzère3,4 , and Mario Vento2 arXiv:1512.07494v1 [cs.DS] 23 Dec 2015 2 MVIA, 1 GREYC UMR 6072, CNRS - Université de Caen Normandie - ENSICAEN, France Dept. of Information, Electrical Engineering and Applied Mathematics, Univ. of Salerno, Italy 3 LITIS, INSA de Rouen, France 4 NormaSTIC FR CNRS 3638, France January 15, 2018 Abstract Computing efficiently a robust measure of similarity or dissimilarity between graphs is a major challenge in Pattern Recognition. The Graph Edit Distance (GED) is a flexible measure of dissimilarity between graphs which arises in error-tolerant graph matching. It is defined from an optimal sequence of edit operations (edit path) transforming one graph into an other. Unfortunately, the exact computation of this measure is NP-hard. In the last decade, several approaches have been proposed to approximate the GED in polynomial time, mainly by solving linear programming problems. Among them, the bipartite GED has received much attention. It is deduced from a linear sum assignment of the nodes of the two graphs, which can be efficiently computed by Hungarian-type algorithms. However, edit operations on nodes and edges are not handled simultaneously, which limits the accuracy of the approximation. To overcome this limitation, we propose to extend the linear assignment model to a quadratic one, for directed or undirected graphs having labelized nodes and edges. This is realized through the definition of a family of edit paths induced by assignments between nodes. We formally show that the GED, restricted to the paths in this family, is equivalent to a quadratic assignment problem. Since this problem is NP-hard, we propose to compute an approximate solution by an adaptation of the Integer Projected Fixed Point method. Experiments show that the proposed approach is generally able to reach a more accurate approximation of the optimal GED than the bipartite GED, with a computational cost that is still affordable for graphs of non trivial sizes. 1 Introduction The definition of efficient similarity or dissimilarity measures between graphs is a key problem in structural pattern recognition [6, 9, 36]. This problem is nicely addressed by the graph edit distance, which constitutes one of the most flexible graph dissimilarity measure [35, 3, 32, 2]. Given two graphs G1 and G2 , such a distance may be understood as a measure of the minimal amount of distortion required to transform G1 into G2 . The graph edit distance is defined from the notion of edit path which corresponds to a sequence of elementary transformations of a graph into another. An edit operation is a transformation performed on the structure of a graph, here restricted to be elementary: node or edge insertion, removal and substitution. This is illustrated in Fig. 1. Edit operations are penalized by a real non-negative cost function ce (.), and the cost of the edit path is defined as the sum of all its elementary operation’s costs. An optimal edit path, transforming a graph G1 = (V1 , E1 ) into a graph G2 = (V2 , E2 ), have a minimal cost among all edit paths from G1 to G2 . Its cost defines the GED from G1 to G2 : GED(G1 , G2 ) = min (e1 ,...,ek )∈P(G1 ,G2 ) k X ce (ei ). i=1 1 (1) a a G1 d d b b c c G1 G2 a e a add-edge(d,c) d b d c b c del-edge(b,c) a d a add-node(e) b c d e b c add-edge(b,e) a a G2 add-edge(c,e) d d b c b c e e Figure 1: A possible edit path to transform the graph G1 into the graph G2 . If we assume that all the edit operation have an unitary cost, the overall cost of the transformation is equal to 5. where P(G1 , G2 ) is the set of all edit paths from G1 to G2 , and ei is an edit operation. In this paper, graphs are assumed to be simple and labeled. Computing the GED is NP-hard, in fact NP-complete, and its approximation is APXhard [21]. A common approach consists in representing the problem into a state space where the optimal solution can be found using for example the A∗ algorithm, in exponential time complexity. This is thus restricted to small graphs composed of about 10 nodes. Such a complexity compromises the suitability of the GED in many practical applications where the graphs are usually one order of magnitude bigger. However, most of real world problems do not require the computation of the exact GED, and the use of an approximation is often sufficient. For this reason, the interest of the scientific community has been focused on methods providing efficient approximations of the GED, mainly linear and suboptimal ones. In [15], the GED is modeled as a binary linear programming problem for graphs with labeled nodes and unlabeled edges. The relaxation of the initial problem provides a lower bound of the GED which however cannot be readily associated to an edit path. An upper bound is also provided through an approximation of the binary program. The resulting problem corresponds to a square linear sum assignment problem (LSAP), i.e. a weighted 2 bipartite graph matching, such that the nodes of graph G1 can be removed, substituted to the nodes of graph G2 , as well as the nodes of G2 can be inserted. A node assignment incorporating possible removals and insertions is then defined as a bijective mapping, thus representing a set of edit operations on nodes. Each edit operation is penalized by a cost. The cost of an assignment is then defined as the sum of the costs of its corresponding edit operations on nodes. The LSAP consists in selecting an assignment having a minimal cost, which can be computed in polynomial time complexity, for instance with the Hungarian algorithm, see [34, 4] for more details on linear programming and LSAP. The resulting optimal node assignment allows to deduce, in a non ambiguous way, the edge operations that define an edit path, mostly not minimal but short. The cost of such a short path defines an approximate GED. The same line of research has been followed in [31, 26], but such that labels of edges are also taken into account in the assignment through the cost of edit operations on nodes, which is neglected in the upper bound proposed in [15]. The resulting distance, called the bipartite GED, has received much attention [37, 7, 33, 10, 29, 28, 27, 30, 8, 5]. In order to select a relevant assignment, a bag of patterns is attached to each node, and each possible substitution is penalized by a cost that measures the affinity between the bags, hence taking into account the edge information. Similarly, node removals and insertions are penalized by a cost measuring the importance of the bags. The definition of the bags of patterns is a key point, as well as the associated measure of affinity. Incident edges have been initially proposed in [31, 26], and the cost between two nodes (or bags) is itself defined as the cost of the linear sum assignment of the patterns within the bags, following the same framework as the one defined for the nodes. The cost of substituting, removing and inserting the patterns depends on the original edit cost function ce . The resulting optimal node assignment allows to deduce, in a non ambiguous way, the edge operations that define an edit path, mostly not minimal but short. The cost of such a short path defines the bipartite GED. Remark that this approach assumes that an edit path may be deduced from a sequence of edit operations applied on nodes only. As we will see in this paper, this is possible because there is an equivalence relation between assignments and edit paths. Intuitively, this is due to the strong relationship that exists between GED and morphism between graphs. Under special conditions on the cost of edit operations, computing the GED is equivalent to compute a maximum common subgraph of two graphs [1, 2]. More generally, any mapping between the nodes of two graphs induces an edit path which substitutes all mapped nodes together with all their incident edges, and inserts or removes the non-mapped nodes/edges. Conversely, given an edit path between two graphs, such that each node and each edge is substituted only once, one can define a mapping between the substituted nodes and edges of both graphs. While the bipartite GED provides a good approximation of the GED, it overestimates it. As shown by several works, this overestimation can only be marginally reduced, for instance by considering more global information than the one supported by incident edges [37, 10, 5], or by modifying the resulting edit path by genetic algorithms [29], see [27] for more details. Although these methods provide an interesting compromise between time complexity and approximation quality, they are inherently limited to compute linear approximations of the GED. To fully describe the GED, both node and edge assignments should be considered simultaneously. Indeed, operations on edges can only be deduced from operations performed on their two incident nodes. For instance, an edge can be substituted to another one only if its incident nodes are substituted. This pairwise constraint on nodes is closely related to the one involved in graph matching. It is known that graph matching problems, and more generally problems that incorporate pairwise constraints, can be cast as a quadratic assignment problem (QAP) [16, 18, 19, 23, 4]. QAPs are NP-hard and so different relaxation algorithms have been proposed to find an approximate solution, such as Integer Projected Fixed Point (IPFP) [20], or Graduated NonConvexity and Concavity Procedure [22]. Even if computing the GED is generally not equivalent to solving a graph matching problem, it should also be formalized as a QAP. To the best of our knowledge, this aspect has only been considered through the definition of fuzzy paths by [25]. Thus, the strong 3 relationships between the GED and the QAP have not yet been analyzed. In this paper, we extend the LSAP with insertions and removals [31, 26] to a quadratic one. First, preliminary results concerning edit paths are established (Section 2), allowing to formalize the relation between the LSAP (Section 3) or the QAP (Section 4), and such paths. In particular, we show that the GED is a QAP when graphs are simple. Then, we propose an improved IPFP algorithm adapted to the minimization of quadratic functionals to approximate the GED (Section 5). The approach, validated through experiments in Section 6, generally provides a more accurate approximation of the exact GED than the bipartite GED, with a computational cost still affordable for graphs of non trivial sizes. 2 Preliminaries This section introduces some basics about graphs, graph edit distance and edit paths. We futher introduce different familly of edit paths and show that one of this familly is in direct correspondence with a familly of mapping functions between the set of nodes of two graphs. 2.1 Graph Basics Definition 1 (Unlabeled graph) An unlabeled graph G is defined by the couple G = (V, E) where V is the set of nodes and E ⊆ V × V is the set of edges. Each edge is an orded couple of nodes (i, j) with i, j ∈ V . The direction of an edge is implicitly given by the order of its nodes, i.e. the direction of (i, j) is from i to j. Definition 2 (Nodes Adjacency) Given a graph G = (V, E) and two nodes i, j ∈ V . i and j are said to be adjacent iff ∃(i, j) ∈ E. Definition 3 (Unlabeled simple graph) An unlabeled graph is said to be simple iff: 1. It exists at most one edge between any pair of nodes, 2. The graph does not contain self loops ((i, i) 6∈ E, ∀i ∈ V ) Definition 4 (Labeled simple graph) Let L be a finite alphabet of node and edge labels. A labeled simple graph is a tuple G = (V, E, µ, ν) where • the couple (V, E) defines an unlabeled simple graph, • µ : V → L is a node labeling function, • ν : E → L is an edge labeling function. The unlabeled graph associated to a given labeled graph G = (V, E, µ, ν) is defined by the couple (V, E). In the following we will only consider simple graphs that we will simply denote by unlabeled (resp. labeled) graphs. The term graph will denote indifferently a labeled or an unlabeled graph. Definition 5 (Undirected graph) • A simple graph G = (V, E) is said to be undirected iff ∀(i, j) ∈ E ∃(j, i) ∈ E. • A labeled simple graph G = (V, E, µ, ν) is said to be undirected iff ∀(i, j) ∈ E ∃(j, i) ∈ E ∧ ν(i, j) = ν(j, i). Definition 6 (Bipartite graph) A graph G, labeled or not, is said to be bipartite iff ∃V1 , V2 ⊆ V : ∀(i, j) ∈ E, (i ∈ V1 ∧ j ∈ V2 ) ∨ (i ∈ V2 ∧ j ∈ V1 ). Definition 7 (Subgraph) 4 • An unlabeled graph G1 = (V1 , E1 ) is said to be an unlabeled subgraph of G2 = (V2 , E2 ) if V1 ⊆ V2 and E1 ⊆ E2 ∩ (V1 × V1 ). The unlabeled subgraph G1 is called an unlabeled proper subgraph if V1 6= V2 or E1 6= E2 . • If G1 = (V1 , E1 , µ1 , ν1 ) and G2 = (V2 , E2 , µ2 , ν2 ) are both labeled graphs then G1 is a (proper) subgraph of G2 if (V1 , E1 ) is an unlabeled (proper) subgraph of (V2 , E2 ) and if the following additional constraint is fulfilled: µ2 |V1 = µ1 and ν2 |E1 = ν1 , where f| denotes the restriction of function f to a particular domain. • A structural subgraph of a labeled graph G is an unlabeled subgraph of the unlabeled graph associated to G. 2.2 Edit operations, paths, and distance Definition 8 (Elementary edit operations) An elementary edit operation is one of the following operation applied on a graph: • Node/Edge removal. Such removals are defined as the removal of the considered element from sets V or E. • Node/Edge insertion. On labeled graphs, a vertex/edge insertion also associates a label to the inserted element. • Node/Edge substitution if the graph is a labeled one. Such an operation modifies the label of a node or an edge and thus transforms the node or edge labeling functions. Definition 9 (Cost of an elementary edit operation) Each elementary operation x is associated to a cost encoded by a specific function for each type of operation: • Node (cvd (x)) and edge removal (ced (x)) • Node (cvi (x)) and edge (cei (x)) insertion, • Node (cvs (x)) and edge (ces (x)) substitution on labeled graphs. By extension, we will consider that functions cvd and cvi (resp. ced and cei ) apply on the set of nodes (resp. the set of edges) of a graph. Hence, the cost cvd (v) denotes the cost of removing node v. We assume that a substitution transforming one label into the same label has zero cost: ∀l ∈ L, cvs (l → l) = ces (l → l) = 0 where l → l′ denotes the substitution of label l into l′ on some edge or node. Definition 10 (Edit path) An edit path of a graph G is a sequence of elementary operations applied on G, where node removal and edge insertion have to satisfy the following constraints: 1. A node removal implies a first removal of all its incident edges, 2. An edge insertion can be applied only between two existing or already inserted nodes. 3. Edge insertions should not create more than one edge between two vertices nor create self-loops. An edit path that transforms a graph G1 into a graph G2 is an edit path of G1 whose last graph is G2 . If G1 and G2 are unlabeled we assume that no node nor edge substitutions are performed. Definition 11 (Cost of an edit path) The cost of an edit path P , denoted γ(P ) is the sum of the costs of its elementary edit operations. 5 Definition 12 (Edit distance) The edit distance from a graph G1 to a graph G2 is defined as the minimal cost of all edit paths from G1 to G2 . d(G1 , G2 ) = min P ∈P(G1 ,G2 ) γ(P ) where P(G1 , G2 ) is the set of all edit paths transforming G1 into G2 . An edit path from G1 to G2 with a minimal cost is called an optimal path. Proposition 1 Given any graph G, and any edit path P of G, the transformation of G by P is still a simple graph. Proof: Let G = (V, E, µ, ν) and G′ = (V ′ , E ′ , µ′ , ν ′ ) denote the initial graph and its transformation by P . Since the insertion of nodes and edges induces the definition of their labels, function µ′ (resp. ν ′ ) defines a valid labeling function over V ′ (resp. E ′ ). Let us consider (u, v) ∈ E ′ . Vertices u and v should either be present in V or have been inserted before the insertion of edge (u, v) (Definition 10, condition 2). Moreover, none of these nodes can be removed after the last insertion of edge (u, v) since such a removal would imply the removal of (u, v) (Definition 10, condition 1). Both u and v thus belong to V ′ . Hence E ′ ⊆ V ′ × V ′ . Moreover, according to Definition 10, condition 3 the edge (u, v) can not be inserted if it already exists in G and u 6= v. It follows that G′ = (V ′ , E ′ , µ′ , ν ′ ) is a labeled simple graph according to Definition 4.  Definition 13 (Independent edit path) An independent edit path between two labeled graphs G1 and G2 is an edit path such that: 1. No node nor edge is both substituted and removed, 2. No node nor edge is simultaneously substituted and inserted, 3. Any inserted element is never removed, 4. Any node or edge is substituted at most once, Note that an independent edit path is not minimal in the number of operations. Indeed, Definition 13 still allows to replace one substitution by one removal followed by one insertion (but such an operation can be performed only once for each node or edge thanks to condition 3). We however forbid useless operations such as the substitution of one node followed by its removal (condition 1) or the insertion of a node with a wrong label followed by its substitution (condition 2). In the following we will only consider independent edit paths that we simply call edit paths. Proposition 2 The elementary operations of an independent edit path between two graphs G1 and G2 may be ordered into a sequence of removals, followed by a sequence of substitutions and terminated by a sequence of insertions. Proof: Let R, S and I denote the sub-sequences of Removals, Substitutions and Insertions of an edit path P , respectively. Since no removal may be performed on a substituted element (condition 1 of Definition 13) and no removal may be performed on an inserted element (condition 3), removals only apply on elements which are neither substituted nor inserted. Such removals operations may thus be grouped at the beginning of the edit path. Now, since an element cannot be substituted after its insertion, substitutions can only apply on the remaining elements after the removal step and can be grouped after the removal operations. The remaining operations only contain insertions. Let us consider the sequence of elementary operations (R, S, I) the order within sequences R, S and I being deduced from the one of P . Such a sequence may be defined since operations in R apply on elements not in S and I while operations in S do not apply on the same elements than operations in I. Such sets are independent, leading to the definition of independent edit paths. However, we still have to show that the sequence (R, S, I) defines a valid edit path. 6 1. Since R contains all the removal operations contained in P , if P satisfies condition 1 of Definition 10, so does the sequence R. 2. Let us suppose that an edge insertion is valid in sequence P while it violates Definition 10, condition 2 in sequence (R, S, I). Let us denote by (u, v) such an edge. Edge (u, v) violates condition 2 in sequence (R, S, I) only if either the removal of u or v belongs to R. In such a case the insertion of (u, v) in P should be made before the removal of u or v. But such a removal would imply the removal of all the incident edges of u or v (Definition 10, condition 1) including the newly inserted edge (u, v). Such an operation would violate the independence of P (Definition 13, condition 3). The sequence (R, S, I) is thus a valid edit path which transforms a graph G1 into G2 if P do so. Furthermore, it is readily seen that all the conditions of Definition 13 are satisfied by the sequence (R, S, I) as soon as they are satisfied by P . The sequence (R, S, I) is thus an independent edit path.  Proposition 3 Let P be an edit path between two graphs G1 and G2 . Let us further denote by R, S and I the sequence of node and edge Removals, Substitutions and Insertions performed by P , the order in each sequence being deduced from the one of P . Then: • the graph Ĝ1 obtained from G1 by applying removal operations R is a subgraph of G1 , • the graph Ĝ2 obtained from G1 by applying the sequence of operations (R, S) is a subgraph of G2 , • Both Ĝ1 and Ĝ2 correspond to a same common structural subgraph of G1 and G2 . Proof: 1. Since the sequence R is an edit path, Ĝ1 is a graph by Proposition 1. Moreover, since R is only composed of removal operations, we trivially have V̂1 ⊂ V1 and Ê1 ⊂ E1 . The fact that Ê1 ⊂ E1 ∩ V̂1 × V̂1 is induced by the fact that Ĝ1 is a graph. Moreover, if G1 is a labeled graph, since removal operations do not modify labels, labels on Ĝ1 are only the restriction of the ones on G1 to V̂1 and Ê1 . 2. The graph Ĝ2 is deduced from G1 by the edit path (R, S), it is thus a graph. Moreover, G2 is deduced from Ĝ2 by the sequence of insertions I. We thus trivially have: V̂2 ⊂ V2 and Ê2 ⊂ E2 ∩ V̂2 × V̂2 . Moreover, since insertion operations do not modify the label of existing elements, the restriction of the label functions of G2 to V̂2 and Ê2 corresponds to the label functions of Ĝ2 . 3. Sub graph Ĝ2 is deduced from Ĝ1 by the sequence of substitution operations S. Since substitution operations only modify label functions, the structure of both graphs is the same and there exists a structural isomorphism between both graphs.  One should note that it may exist several structural isomorphisms between Ĝ1 and Ĝ2 . The set of substitutions S fixes one of them, say f such that the image of any element of Ĝ1 by f have the same label than the one defined by the substitution. More precisely, let us suppose that we enlarge the set of substitution S by 0 cost substitutions so that all the nodes and edges of Ĝ1 = (V̂1 , Ê1 , µ1 , ν1 ) are substituted. In this case, we have:  ∀v ∈ V̂1 , µ2 (f (v)) = lv ∀e ∈ Ê1 , ν2 (f (e)) = le where lv and le correspond to the labels defined by the substitutions of v and e and µ2 and ν2 define respectively the node and edge labeling functions of G2 . Corollary 1 Using the same notations than in Proposition 3, the cost γ(P ) of an edit path is defined by: X γ(P ) = cvd (v) + X v∈V1 \V̂1 e∈E1 \Ê1 X X + v∈V2 \V̂2 cvi (v) + ced (e) + X v∈V̂1 cei (e) e∈E2 \Ê2 7 cvs (v) + X e∈Ê1 ces (e) Proof: The edit path P and its rewriting in (R, S, I) have the same set of operations and thus a same cost. From G1 to Ĝ1 : Operations in R remove nodes in V1 \ V̂1 and edges in E1 \ Ê1 . From Ĝ1 to Ĝ2 : Substitutions of S apply between the two graphs Ĝ1 and Ĝ2 . Let us consider the set of substitutions S ′ which corresponds to the completion of S by 0 cost substitutions so that all nodes and edges of Ĝ1 are substituted. Both S and S ′ have a same cost. The cost of S ′ is defined as the sum of costs of the substituted nodes and edges of Ĝ1 . From Ĝ2 to G2 : Operations in I insert nodes of V2 \ V̂2 and edges of E2 \ Ê2 in order to obtain G2 from Ĝ2 .  Remark 1 Using the same notations than Proposition 3 if both G1 and G2 are undirected we have: γ(P ) = γv (P ) + γe (P ) with γv (P ) = γe (P ) = X cvd (i) + i∈V 1 \V̂1 1 2 X X cvs (i) + cvi (k) k∈V2 \V̂2 i∈V̂1 X ces ((i, j)) + (i,j)∈Ê1 X ced ((i, j)) + (i,j)∈E1 \Ê1 X (k,l)∈E2 \Ê2  cei ((k, l)) Indeed, if both graphs G1 and G2 are undirected both (i, j) and (j, i) belong to E1 while encoding a single edge e. The removal or the substitution of the edge e is thus counted twice in γe (P ). In the same way (k, l) and (l, k) represent the same edge e of E2 \ Ê2 which is thus inserted twice in γe (P ). The factor 12 of γe (P ) removes this double couting of edge operations. Corollary 2 If all costs do not depend on the node/edge involved in the operations, i.e. edit cost functions cvd , ced , cvs , ces , cvi , and cei are constant, the cost of an edit path P is equal to: γ(P ) = (|V1 | − |V̂1 |)cvd + (|E1 | − |Ê1 |)ced + Vf cvs + Ef ces + (|V2 | − |V̂2 |)cvi + (|E2 | − |Ê2 |)cei where Vf (resp. Ef ) denotes the number of nodes (resp. edges) substituted with a non-zero cost. Moreover, minimizing the cost of such an edit path is equivalent to maximizing the following formula: def. M (P ) = |V̂1 |(cvd + cvi ) + |Ê1 |(ced + cei ) − Vf cvs − Ef ces Proof: We deduce immediately from Corollary 1 the following formula: γ(P ) = (|V1 | − |V̂1 |)cvd + (|E1 | − |Ê1 |)ced + Vf cvs + Ef ces + (|V2 | − |V̂2 |)cvi + (|E2 | − |Ê2 |)cei We obtain by grouping constant terms: γ(P ) = |V1 |cvd + |E1 |ced + |V2 |cvi + |E2 |cei i h − |V̂1 |cvd + |Ê1 |ced + |V̂2 |cvi + |Ê2 |cei − Vf cvs − Ef ces 8 Since there is a structural isomorphism between Ĝ1 and Ĝ2 , we have V̂1 = V̂2 and Ê1 = Ê2 . So: γ(P ) = |V1 |cvd + |E1 |ced + |V2 |cvi + |E2 |cei h i − |V̂1 |(cvd + cvi ) + |Ê1 |(ced + cei ) − Vf cvs − Ef ces The first part of the above equation being constant, the minimization of γ(P ) is equivalent to the maximization of the last part of the equation.  Definition 14 (Restricted edit path) A restricted edit path is an independent edit path in which any node or any edge cannot be removed and then inserted. The term restricted should be understood as minimal number of operations. The cost of a restricted edit path may not be minimal (among all edit paths) if the cost of a removal operation followed by an insertion is lower than the cost of the associated substitution. However, such a drawback may be easily solved by setting a new substitution cost equal to the minimum between the old substitution cost and the sum of the costs of a removal and an insertion. In this case all non-zero cost substitutions, for nodes and edges, may be equivalently replaced by a removal followed by an insertion. Proposition 4 If G1 and G2 are simple graphs, there is a one-to-one mapping between the set of restricted edit paths between G1 and G2 and the set of injective functions from a subset of V1 to V2 . We denote by ϕ0 , the special function from the empty set onto the empty set. Proof: Let P denote an edit path. If no node substitution occurs, all node of G1 are first removed and then all nodes of G2 are inserted. We associate this edit path to ϕ0 . If substitutions occur. We associate to P the function previously mentioned which maps each substituted node of V1 onto the corresponding node of G2 . Let ψ denotes this mapping. Let us consider an injective function f 6= ϕ0 from a set Vˆ1 ⊂ V1 onto V2 . We associate to f the sets of node • removals: cvd (v → ǫ), v ∈ V1 − Vˆ1 , • insertions: cvi (ǫ → v), v ∈ V2 − f (Vˆ1 ), and • substitutions: cvs (v → f (v)), v ∈ Vˆ1 . Moreover, since G1 and G2 are simple graphs it exists at most one edge between any pair of nodes. We thus define the following set of edge operations: • removals: ced ((i, j) → ǫ) such that i or j does not belong to Vˆ1 or (f (i), f (j)) do not belongs to E2 , • insertions cei (ǫ → (k, l)) such that k or l does not belong to f (Vˆ1 ) or (f −1 (k), f −1 (l)) do not belongs to E1 , • substitutions ces ((i, j) → (f (i), f (j))), (i, j) ∈ (Vˆ1 × Vˆ1 ) ∩ E1 and (f (i), f (j))) ∈ E2 . Let us denote respectively by R, S and I the set of removals/substitutions/insertions defined both on node and edges. The sequence (R, S, I) defines a valid restricted edit path whose image by ψ is by construction equal to f . The function ψ is thus surjective. Let us consider two different edit paths P = (R, S, I) and P ′ = (R′ , S ′ , I ′ ). Then: • If R 6= R′ . If node removals are not equal, ψ(P ) and ψ(P ′ ) are not defined on the same set and are consequently not equal. Otherwize, let us suppose that an edge (i, j) is removed in P and not in P ′ . Let us further suppose that ψ(P )(i) = ψ(P ′ )(i) and ψ(P )(j) = ψ(P ′ )(j). Since (i, j) is not removed in P ′ we have (ψ(P )(i), ψ(P )(j)) = (ψ(P ′ )(i), ψ(P ′ )(j)) ∈ E2 . The edge (i, j) should thus be first removed and then inserted in P which contradicts the definition of a restricted edit path. Therefore, one of the two following conditions should holds: 9 1. ψ(P )(i) 6= ψ(P ′ )(i) or ψ(P )(j) 6= ψ(P ′ )(j), 2. the set of edge removal operations is the same in P and P ′ . If the first condition holds ψ(P ) 6= ψ(P ′ ). If the second condition holds, since R 6= R′ , the set of node removals is different in P and P ′ . In this case we get also ψ(P ) 6= ψ(P ′ ). • If S 6= S ′ . Node substitutions are different if they are either defined on different sets or do not correspond to the same node mapping. In both cases, ψ(P ) 6= ψ(P ′ ). If node substitutions are identical but if S and S ′ differ by the edge substitutions, an edge of G1 is substituted by P and P ′ to an edge of G2 with two different labels. Since an edge may be substituted at most once in an independent edit path, either P or P ′ is not a valid edit path between G1 and G2 . Hence S and S ′ differ only if their node substitutions differ, in which case we have ψ(P ) 6= ψ(P ′ ). • If I 6= I ′ (with R = R′ and S = S ′ ). If a node k ∈ V2 is inserted by I but not by I ′ , this means that k is substituted by S ′ . Hence we contradict S = S ′ . In the same way, if an edge (k, l) ∈ E2 is inserted by I and not by I ′ , (k, l) is substituted by S ′ but not by S. We again contradict S = S ′ . Note that the last item of the previous decomposition shows (as a side demonstration) that given the initial and final graphs, a restricted edit path is fully defined by its set of removals and substitutions. Moreover, if the set of removals or substitutions of two restricted edit paths differ, then the associated mapping is different. The function ψ is thus injective and hence bijective.  Proposition 5 Let P be a restricted edit path not associated with ϕ0 (hence with some substitutions). Let us denote by ϕ : Vˆ1 → V2 the injective function associated to P and let us denote ϕ(Vˆ1 ) by Vˆ2 . We further introduce the following two sets:  R12 I21 = = {(i, j) ∈ E1 ∩ (Vˆ1 × Vˆ1 ) | (ϕ(i), ϕ(j)) 6∈ E2 } {(k, l) ∈ E2 ∩ (Vˆ2 × Vˆ2 ) | (ϕ−1 (k), ϕ−1 (k)) 6∈ E1 } • The set of substituted/removed/inserted nodes by P are respectively equal to: Vˆ1 , V1 \ Vˆ1 and V2 \ Vˆ2 . • The set of edges substituted/removed/inserted by P are respectively equal to:   – Substituted: Ê1 = E1 ∩ (Vˆ1 × Vˆ1 ) \ R12   with Ê2 = ϕ(Eˆ1 ) = E2 ∩ (Vˆ2 × Vˆ2 ) \ I21    – Removed: E1 \ Ê1 = E1 ∩ ((V1 \ Vˆ1 ) × V1 ) ∪ (V1 × (V1 \ Vˆ1 )) ∪ R12    – Inserted: E2 \ Ê2 = E2 ∩ ((V2 \ Vˆ2 ) × V2 ) ∪ (V2 × (V2 \ Vˆ2 )) ∪ I21 Proof: Node substitions/removal/insertions are direct consequences of the proof of Proposition 4 and the bijective mapping between injective functions from a subset Vˆ1 ⊂ V1 onto V2 and restricted edit paths. • If (i, j) ∈ Eˆ1 , {ϕ(i), ϕ(j)} ⊂ Vˆ2 and (ϕ(i), ϕ(j)) ∈ E2 . Since (i, j) cannot be removed and then inserted it must be substituted. Conversely, if (i, j) ∈ E1 is substituted, i an j must be substituted ({i, j} ⊂ Vˆ1 ). Moreover, the edge (ϕ(i), ϕ(j)) should exists in E2 . Hence (i, j) 6∈ R12 and (i, j) ∈ Ê1 . If (k, l) ∈ Eˆ2 = ϕ(Eˆ1 ), it exits (i, j) ∈ E1 such that k = ϕ(i) and l = ϕ(j). Hence (k, l) 6∈ I21 . Since (i, j) 6∈ R12 , (k, l) ∈ E2 and {k, l} ⊂ Vˆ2 . Hence (k, l) ∈ ϕ(Eˆ1 ) = E2 ∩ (Vˆ2 × Vˆ2 ) \ I21 . Conversely, if (k, l) ∈ E2 ∩ (Vˆ2 × Vˆ2 ) \ I21 , it exits (i, j) such that k = ϕ(i) and l = ϕ(j) ({k, l} ∈ Vˆ2 ). Since (k, l) ∈ E2 \ I21 we have (i, j) ∈ E1 \ R12 . Finally, {k, l} ⊂ Vˆ2 implies that {i, j} ⊂ Vˆ1 hence (i, j) ∈ Eˆ1 and (k, l) ∈ Ê2 = ϕ(Eˆ1 ). 10 • Any non substited edge of G1 must be removed. Hence, the set of removed edges is equal to E1 \ Ê1 . The remaining equation, is deduced by a negation of the conditions defining Ê1 . • In the same way, any edge of G2 which is not produced by a substitution of an edge of G1 must be inserted. Hence, the set of inserted edges is equal to E2 \ Eˆ2 . The negation of the condition defining Eˆ2 provides the remaining equation.  2.3 Linear and quadratic assignment problems Within this report, an assignment corresponds to a bijective mapping ϕ : X →Y between two finite sets X and Y having the same size |X | = |Y| = n. When these sets are reduced to the same set of integers, i.e. X = Y = {1, . . . , n}, the bijection ϕ reduces to the permutation (ϕ(1), . . . , ϕ(n)). Any permutation ϕ can be represented by a n × n permutation matrix X = (xi,j )i,j=1,...,n with ( 1 if j = ϕ(i) xi,j = (2) 0 else More generally, recall that a permutation matrix is defined as follows. Definition 15 (Permutation Matrix) A n × n matrix X is a permutation matrix iff it satisfies the following contraints:  n X    xi,j = 1 ∀j = 1, . . . , n,     i=1  n X (3)  xi,j = 1 ∀i = 1, . . . , n,     j=1    ∀i, j = 1, . . . , n, xi,j ∈ {0, 1} These constraints ensure X to be binary and doubly stochastic (sum of rows and sum of columns equal to 1). The selection of a relevant assignment, among all possible ones from X to Y, depends on the problem. Nevertheless, each assignment is commonly penalized by a cost, and a relevant assignment becomes one having a minimal or a maximal cost. In this report, we consider minimal costs only. The cost of an assignment is usually defined as a sum of elementary costs. An elementary cost may penalize the assignment of an element of X to an element of Y, or the simultaneaous assignment of two elements i and j of X to two elements k and l of Y, respectively. Definition 16 (Linear Sum Assignment Problem (LSAP)) Let C ∈ [0, +∞)n×n be a matrix such that ci,j corresponds to the cost of assigning the element i ∈ X to the element j ∈ Y. The Linear Sum Assignment Problem (LSAP) consists in finding an optimal permutation ) ( n X (4) ci,ϕ(i) | ϕ ∈ Sn ϕ̂ ∈ argmin i=1 where Sn is the set of all permutations of {1, . . . , n}. Equivalently, the LSAP consists in finding an optimal n × n permutation matrix   n n X  X ci,j xi,j | X satisfies Eq. 3 . (5) X̂ ∈ argmin   i=1 j=1 2 Let c = vec(C) ∈ [0, +∞)n be the vectorization of the cost matrix C, obtained by con2 catenating its rows. Similarly, let x = vec(X) ∈ {0, 1}n be the vectorization of X. Then, the LSAP consists in finding an optimal vector n o 2 x̂ ∈ argmin cT x | Lx = 12n , x ∈ {0, 1}n , (6) 11 where the linear system Lx = 1 is the matrix version of the constraints defined by Eq. 3. 2 The matrix L ∈ {0, 1}2n×n represents the node-edge incidence matrix of the complete bipartite graph Kn,n with node sets X and Y: ( 1 if (j = i) ∨ (k = i) li,(j,k) = (7) 0 else The system Lx = 1, together with the binary constraint on x, selects exactly one edge of Kn,n for each element of X ∪ Y. In other terms, these constraints represent a subgraph of Kn,n , with node sets X and Y, such that each node has degree one. Indeed, the LSAP is a weighted bipartite graph matching problem. More details on the LSAP can be found in [34, 4]. In particular, Eq. 6 is a binary linear programming problem, efficiently solvable in polynomial time complexity, for instance with the Hungarian algorithm [17, 24, 19] combined with pre-processing steps [14]. In our experiments, we have used the O(n3 ) (time complexity) version of the Hungarian algorithm proposed in [19, 4]. Problems that incorporate pairwise constraints, i.e. simultaneously assigning two elements of X to two elements of Y, can be cast as a quadratic assignment problem [16, 18, 19, 23, 4]. This is the case for the graph matching problem, and for the GED as demonstrated in Section 4. In this paper, we consider the general expression of quadratic assignment problems [18]. 2 2 Definition 17 (Quadratic Assignment Problem (QAP)) Let D ∈ [0, +∞)n ×n be a matrix such that dik,jl corresponds to the cost of simultaneously assigning the elements i and j of X to the elements k and l of Y, respectively. The quadratic assignment problem (QAP) consists in finding an optimal permutation   n X n  X diϕ(i),jϕ(j) | ϕ ∈ Sn . (8) ϕ̂ ∈ argmin   i=1 j=1 Equivalently, the QAP consists in finding an optimal n × n permutation matrix   n X n X n X n X  X̂ ∈ argmin dik,jl xi,k xj,l | X satisfies Eq. 3 .   i=1 k=1 j=1 l=1 Note that i ∈ X is assigned to k ∈ Y, and j ∈ X is assigned to l ∈ Y, simultaneously iff xi,k = xj,l = 1. The QAP can be rewritten as a quadratic program: o n 2 argmin xT Dx | Lx = 12n , x ∈ {0, 1}n where x is the vectorization of X, and the right-hand side is the matrix version of the constraints defined by Eq. 3. The quadratic term is able to incorporate a linear one. Indeed, any simultenous assignment of the same element i ∈ X to the same element k ∈ Y is penalized by the cost dik,ik , i.e. a diagonal element of D. Since xi,k ∈ {0, 1}, we have dik,ik xi,k xi,k = dik,ik xi,k . Then the total contribution of diagonal elements to the quadratic cost is given by n X n X dik,ik xi,k = diag(D)T x i=1 k=1 where diag denotes the diagonal vector. So, if diag(D) 6= 0, the quadratic functional incorporates a linear term which decribes the linear sum assignment between the elements of X and Y. When these constraints are also part of the underlying problem, it is sometimes more convenient to rewritte the QAP as n o 2 argmin xT Dx + cT x | Lx = 12n , x ∈ {0, 1}n (9) 12 where diag(D) = 0, and c is the cost of assigning each element of X to each element of Y. As the GED, the QAP is in general NP-hard, and exact algorithms can only be used with sets of small cardinality [4]. Indeed, the cost functional is generally not convex, and methods based on relaxation and linearization are usually considered to find an approximate solution. See Section 5 for more details. 3 Bipartite Graph Edit Distance As already mentionned, the GED can be challenging to compute, even on small graphs. In order to deal with such a complexity, several methods approximate the GED by computing an optimal linear sum assignment between the nodes of the two graphs to be compared. This is formalized through the definition of a specific LSAP [31, 26] that takes into account edit operations, as described in this section. In particular, we show in Section 3.1 that there is a one-to-one relation between restricted edit paths and assignment matrices. 3.1 Edit operations, assignments and restricted edit paths Let X and Y be two finite sets, with |X | = n and |Y| = m. Without loss of generality, we assume that X = {1, . . . , n} and Y = {1, . . . , m}. Each element of X can be assigned to an element of Y. Such a mapping represents a possible substitution. Also each element of X can be removed, and each element of Y can be inserted into X . In order to represent insertions, X is augmented by m dummy elements EX = {ǫ1 , . . . , ǫm }, such that j ∈ Y can only be inserted into Y by assiging ǫj to j. Similarly, the set Y is augmented by n dummy elements EY = {ǫ1 , . . . , ǫn }, such that i ∈ X is removed by assigning it to ǫi . In other terms, it is not possible to assign an element i ∈ X to an element ǫk ∈ EY with k 6= i, and similarly any assignment from ǫj ∈ EX to k ∈ Y with k 6= j is forbidden. Let X ǫ = X ∪ EX and Y ǫ = Y ∪ EY be the two augmented sets, which thus have the same size n + m. We assume without loss of generality that symbols ǫi and ǫj represent integers, i.e. EX = {n + 1, . . . , n + m} and EY = {m + 1, . . . , m + n}. It is now possible to define assignments that take into account removal, substitution, and insertion of elements. Definition 18 (ǫ-assignment) An ǫ-assignment from X to Y is a bijective mapping ψ : X ǫ → Y ǫ , here a permutation, such that for each element of X ǫ one of the four following cases occurs: 1. Substitutions: ψ(i) = j with (i, j) ∈ X × Y. 2. Removals: ψ(i) = ǫi with i ∈ X . 3. Insertions: ψ(ǫj ) = j with j ∈ Y. 4. Finally ψ(ǫj ) = ǫi allow to complete the bijective property of ψ, and thus should be ignored. This occurs when i ∈ X and j ∈ Y are both substituted. Let Ψǫ (X , Y) be the set of all ǫ-assignments from X to Y. In other terms, an ǫ-assignment is a bijection (or permutation) with additional constraints. The corresponding (n + m) × (m + n) permutation matrix can be decomposed as follows: 1···m   Xsub  X =    ins X ǫ1 · · · ǫn Xrem Xǫ  1 .  ..  n   ǫ1  .  . . ǫm (10) where matrix Xsub ∈ {0, 1}n×m encodes node substitutions, Xrem ∈ {0, 1}n×n encodes node removals, and Xins ∈ {0, 1}m×m encodes node insertions. Matrix Xǫ ∈ {0, 1}m×n is an 13 auxiliary matrix (case 4 above), it ensures that X is a permutation matrix. Due to the constraints on dummy nodes (cases 2 and 3 above) matrices Xrem and Xins always satisfy: ∀(i, j) ∈ {1, . . . , n}2 , i 6= j, xrem i,j = 0 (11) ∀(i, j) ∈ {1, . . . , m}2 , i 6= j, xins i,j = 0. Definition 19 (ǫ-assignment matrix) A (n + m) × (m + n) matrix satisfying equations 3, 10 and 11 is called an ǫ-assignment matrix. The set of all (n + m) × (m + n) ǫ-assignment matrices is denoted by An,m . The auxiliary matrix Xǫ in Eq. 10 suggests the definition of an equivalence relation between ǫ-assignment matrices. Definition 20 Two ǫ-assignment matrices X1 and X2 , defined by the two sequences of rem ins ǫ sub rem ins ǫ block matrices (Xsub 1 , X1 , X1 , X1 ) and (X2 , X2 , X2 , X2 ), are equivalent iff rem ins ins = Xrem (Xsub = Xsub 2 ) ∧ (X1 2 ) ∧ (X1 = X2 ). 1 The set of ǫ-assignment matrices up to this equivalence relation is denoted by A∼ n,m . Proposition 6 There is a one-to-one relation between A∼ n,m and the set of injective functions from a subset of X to Y. Proof: Recall that X = {1, . . . , n} and Y = {1, . . . , m}. Let X = (Xsub , Xrem , Xins , Xǫ ) = (Q, R, S, T) denote an ǫ-assignment matrix. If Q = 0 we associate to X the application ϕ0 from the empty set onto itself (Proposition 4). Otherwise, let us introduce the set: X̂ = {i ∈ X | ∃j ∈ Y, qi,j = 1} Since X is a permutation matrix, for any i ∈ Xˆ there is exactly one j ∈ Y such that qi,j = 1. We can thus define the mapping:   X̂ → Y ϕX i 7→ j Moreover if ϕX (i1 ) = ϕX (i2 ) then we have qi1 ,j = qi2 ,j = 1. Since X is a permutation matrix, such a case is possible only if i1 = i2 , and ϕX is thus injective. We can thus associate to each assignement matrix an injective function ϕX from a subset of X to Y. We denote by χ this mapping. We have to show that χ is bijective. Consider an injective mapping ϕ from a subset X̂ onto Y. If ϕ = ϕ0 , we have χ(X) = ϕ0 with X = (0n×m , In×n , Im×m , 0m×n ). Otherwise, the sub-blocks of X are defined as follows: ( 1 iff ∃i ∈ X̂ , with ϕ(i) = j, qi,j = 0 else ( 1 iff i ∈ X \ Xˆ ri,i = 0 else ( 1 iff j ∈ Y \ ϕ[Xˆ ] sj,j = 0 else Note that off-diagonal elements of R and S are equal to 0 by definition of ǫ-assignement matrices (Eq. 11). By using the above definition, qi,j = 1 ⇒ ri,i = sj,j = 0. Hence, if T was filled with 0, the line corresponding to ǫi ∈ Y ǫ (column m + i) and ǫj ∈ X ǫ (row n + j) would be filled by 0 in X, which would thus not be an ǫ-assignment matrix. Moreover, since ϕ is injective, we have |Xˆ| = |ϕ[Xˆ ]|. Hence the set of indices: A = {(j, i) ∈ {1, . . . , m} × {1, . . . , n} | qi,j = 1} defines a square submatrix of T, which can be defined as a permutation matrix on A and 0 elsewhere. Now we check that each row and column of X = (Q, R, S, T) contains exactly one value equal to 1. 14 For the rows: • If i ∈ X̂ , then ϕ(i) = j, qi,j = 1 and ri,i = 0. Moreover, since ϕ is an application, we have qi,j ′ = 0 for any j ′ ∈ Y \ {j}. • If i ∈ X \ X̂ , by definition qi,j = 0 for all j ∈ Y and ri,i = 1. There is thus a single 1 in row i. • For j ∈ Y with sj,j = 1, by definition of S we have j ∈ Y \ ϕ[Xˆ ], and thus ∀i ∈ X , qi,j = 0. Hence there is no i such that (j, i) ∈ A. By definition of T, its row j is filled with 0. • For j ∈ Y with sj,j = 0, then j ∈ ϕ[X ] and it exists a unique i ∈ X such that qi,j = 1. Hence (j, i) ∈ A. Since T defines a permutation matrix on A, it should exists a unique k satisfying (j, k) ∈ A such that tj,k = 1. This value is unique on the row j of T by definition of T. Hence for each element of X ǫ , there is a unique 1 on the corresponding row of X. The proof for columns is similar. So there is a unique 1 value on each row and each column of X. Matrix X is thus a permutation matrix. Moreover, since elements of the blocks R and S are equal to 0 on off-diagonal indices, X is an ǫ-assignement matrix with χ(X) = ϕ, by construction. The application χ is thus surjective. Let us show that it is also injective. To this end, we consider two non-equivalent assignement matrices X = (Q, R, S, T) and X′ = (Q′ , R′ , S′ , T′ ). • If Q 6= Q′ , then we may suppose without loss of generality that there exists (i, j) ∈ ′ X × Y such that qi,j = 1 and qi,j = 0. Since qi,j = 1, i ∈ X̂X , where XˆX denotes the subset of X on which χ(X) is defined. ′ ′ – If qi,j ∈ Y then i ∈ X \ X̂X′ . Hence χ(X) and χ(X′ ) are not ′ = 0 for all j defined on the same set and are consequently not equal. ′ ′ ′ – If it exists j ′ ∈ Y such that qi,j ′ = 1 we have χ(X)(i) = j and χ(X )(i) = j . ′ Applications χ(X) and χ(X ) are consequently not equal. ′ • If R 6= R′ we may suppose that it exists i ∈ X such that ri,i = 1 and ri,i = 0. Hence ′ i 6∈ XˆX and i ∈ XˆX′ . Applications χ(X) and χ(X ) are not defined on the same set and are consequently not equal. • If S 6= S′ , let us consider j ∈ Y such that sj,j = 1 and s′j,j = 0. We have j 6∈ χ(X)[XˆX ] and j ∈ χ(X′ )[XˆX′ ]. Applications χ(X) and χ(X′ ) have different set of mappings and are consequently not equal. Note that we do need to consider matrix T since this matrix is not implied in the equivalence relationship. In all cases application χ maps two non-equivalent ǫ-assignement matrices to different injective functions. The application χ is thus injective. Application χ being both surjective and injective, it is bijective.  So, ǫ-assignment matrices on X ǫ and Y ǫ , and injective functions defined on a subset of X onto Y, are in one-to-one correspondence. It is now possible to link ǫ-assignments to edit paths. Consider two simple graphs G1 and G2 , with node sets V1 and V2 respectively. An ǫ-assignment from V1 to V2 can be defined by constructing the sets V1ǫ and V2ǫ . According to the above proposition, there is a one-to-one correspondence between ǫ-assignment matrices on V1ǫ and V2ǫ , and injective functions defined on a subset of V1 onto V2 . By using Proposition 4, we can connect such a mapping to a restricted edit path between G1 and G2 (Definition 10). Up to the equivalence relation (Definition 20), there is thus a one-to-one correspondence between ǫ-assignment matrices and restricted edit paths. This shows that restricted edit paths can be deduced from ǫ-assignments. 15 3.2 LSAP for ǫ-assignments Let X = {1, . . . , n} and Y = {1, . . . , m} be two sets. These two sets are augmented by dummy elements as described in the previous section, i.e. X ǫ = X ∪ EX and Y ǫ = Y ∪ EY . An ǫ-assignment from X to Y, i.e. a bijective mapping from X ǫ onto Y ǫ , represents a set of edit operations. The selection of a relevant ǫ-assignment is realized through the design of a pairwise cost function adapted to edit operations. To this, each possible mapping of an element i ∈ X ǫ to an element j ∈ Y ǫ is penalized by a non-negative cost ci,j . All costs can be encoded by a (n + m) × (m + n) matrix (having the same structure as ǫ-assignment matrices) [31, 26] 1···m  ǫ1 · · · ǫn Crem  Csub  C =    ins C 0m,n  1 .  ..  n   ǫ1  .  . . ǫm (12) where the matrix Csub ∈ [0, +∞)n×m encodes substitution costs, Crem ∈ [0, +∞)n×n encodes removal costs, and Cins ∈ [0, +∞)m×m encodes insertion costs. According to cases 2 and 3 in Definition 18, off-diagonal values of Crem and Cins are typically set to a large value ω, such that max{ci,ψ(i) | ∀i ∈ X ǫ , ∀ψ ∈ Ψǫ (X , Y)} ≪ ω < +∞, in order to avoid forbidden mappings. According to case 4 in Definition 18, the mapping of any ǫi to an ǫj should not induce any cost, so the last block of C is set to the null matrix 0m,n . The cost of an ǫ-assignment ψ can then be measured by the sum (see Definition 18 for the decomposition) n+m X i=1 ci,ψ(i) = X ci,ψ(i) + ci,ǫi + i∈X \X̂ i∈X̂ | X {z } | substitutions {z removals X cǫj ,j . (13) j∈Y−ψ[X̂ ] } | {z insertions } where Xˆ = {i ∈ X | ∃j ∈ Y, ψ(i) = j}. An optimal ǫ-assignment is then defined as one having a minimal cost (several optimal ǫ-assignment may exist) among all ǫ-assignments: ) (n+m X ci,ψ(i) | ψ ∈ Ψǫ (X , Y) (14) ψ̂ ∈ argmin i=1 which is a LSAP (Section 2.3). It can thus be rewritten as a binary programming problem (Eq. 6)  x̂ ∈ argmin cT x | x ∈ vec[A∼ (15) n,m ] , 2 where x = vec(X) ∈ {0, 1}(n+m) is the vectorization of the ǫ-assignment matrix X associ2 ated with ψ (Eq. 10), c = vec(C) ∈ [0, +∞)(n+m) is the vectorization of the cost matrix C, 2 (n+m) and vec[A∼ is the set of all vectorized ǫ-assignment matrices. Note that, n,m ] ⊂ {0, 1} using equation 13, two equivalent ǫ-assignment matrices have a same cost. The optimal solution of the LSAP defined by Eq. 15 can be computed by any algorithm that solves LSAPs, such as Hungarian-type algorithms. Note that mappings in Ψǫ , or matrices in An,m , are much more constrained than bijective mappings or permutation matrices. These constraints, i.e. forbidden assignments, are satisfied in [31, 26] through the large ω values in the cost matrix. This is a classical trick used in LSAPs to avoid some specific assignments of elements [4]. While these assignments are avoided, the corresponding large ω values are still treated by the algorithms. A better way to take into account the additionnal constraints would be to modify the algorithms such that forbidden assignments are not treated at all. This is the choice we made in our experimentations. This improves the time complexity. 16 3.3 Bipartite GED It is now possible to define a framework to approximate the GED, based on ǫ-assignments and the corresponding LSAP [31, 37, 26, 10, 27]. Within this framework, a resulting approximate GED is called a bipartite GED. Let G1 and G2 be two graphs, with node sets V1 and V2 respectively. The computation of a bipartite GED from G1 to G2 is performed in four main steps detailed below. Step 1 - construction of the bags of patterns. For each node of each graph a bag of patterns is constructed. This bag represents a part of the graph connected to a specific node by some structured subgraphs, such as incident edges [31, 26], subtrees [37] or walks [10]. A set of bags of patterns is then obtained for each graph. Let B1 and B2 be the ones associated to G1 and to G2 respectively. We have thus |B1 | = |V1 | and |B2 | = |V2 |. The idea is then to find an optimal ǫ-assignment from B1 to B2 , according to a given pairwise cost matrix. Step 2 - construction of the cost matrix. Each possible mapping of a bag bi ∈ B1 to a bag bj ∈ B2 is penalized by a cost measuring the affinity between the two bags. This cost is initially defined as the cost of editing bi such that it is transformed into bj , i.e. the cost of an optimal ǫ-assignment of the elements of the two bags [31, 26, 10, 27]. Also the bags of B1 can be removed, and the bags of B2 can be inserted into B1 , which is penalized by a cost measuring the relevance of the bag. In order to approximate the GED, all theses costs depend on the original edit cost functions defined in Section 2.2. They are encoded by a cost matrix C (Eq. 12). Note that in this step |V1 | × |V2 | LSAP are solved for computing the costs of assigning bags of B1 to bags of B2 . Step 3 - construction of an ǫ-assignment between the nodes. Given the cost matrix C computed in the previous step, an optimal ǫ-assignment from B1 to B2 is then computed by solving again a LSAP. The computed optimal assignment hence provides an optimal mapping ψ ∈ Ψǫ (V1 , V2 ). Step 4 - construction of a restricted edit path. The ǫ-assignment ψ can be interpreted as a partial edit path between the graphs G1 and G2 . Indeed, it is only composed of edit operations involving nodes. Therefore this partial edit path has to be completed with edit operations applied on edges. This set of edit operations is directly induced by the set of edit operations operating on nodes, defined by the mapping computed in the previous step. The substitution, removal or insertion of any edge depends thus on the edit operations performed on its incident nodes. The cost of the complete edit path is finally defined by the sum of edit operations on nodes and edges. This cost only corresponds to an approximation of the GED between G1 and G2 since the mapping computed during Step 3 may not be optimal. Therefore, this cost corresponds to an overestimation of the exact GED, known as bipartite GED. The definition of the cost matrix C in Step 2 is a keypoint of the framework. The initial approach proposed in [31, 26] defines bag of patterns as the corresponding node itself and its direct neighborhood, i.e. the set of incident edges and adjacent nodes. The cost of assigning a bag bi ∈ B1 to a bag bj ∈ B2 is then defined as the substitution cost of the associated node i ∈ V1 and j ∈ V2 , plus the cost associated to an optimal ǫ-assignment between the two sets composed of their incident edges and their adjacent nodes. Using such bags of patterns can be discriminant enough, in which case the bipartite GED provides a good approximation of the GED. But this approach lacks of accuracy in some cases, in particular when the direct neighbourhood of the nodes is homogeneous in the graph. When considering such graphs, the cost associated to each pair of bags do not differ sufficiently, and the optimal ǫ-assignment depends more on the traversal of the nodes by the LSAP solver than on the graph’s structure. In order to improve the accuracy of the bipartite GED, the information attached to each node needs to be more global, for instance by considering bags of walks up to a length 17 k [10], instead of the direct neighbourhood. This approach follows the same scheme as the one used in [31, 26], except that patterns associated to a node are defined as walks of length k starting at this node. Considering bags of such patterns allow to extend the amount of information associated to the nodes, which leads to a better approximation of the GED. However, the use of bags of walks induces some drawbacks. First, the set of computed walks suffers from the tottering phenomenon which leads to consider irrelevant patterns, especially when considering high values of k. These irrelevant patterns affect the cost of the ǫ-assignment, and thus the quality of the approximation of the GED. In addition, the mapping cost between two bags of walks can only be approximated, which induces another loss of accuracy. These drawbacks can be avoided by using bags of subgraphs rather than bags of walks, such as all subgraphs centered on a given node and up to a radius k [5]. The cost associated to the mapping of two bags of such patterns is defined as the edit distance between the two k-subgraphs centered on the respective nodes. Despite the fact that we can control the size of these subgraphs thanks to the parameter k, this approach requires significantly more computational time than the previous ones. However, the use of accurate sub-structures allows to obtain a better approximation of the GED. 4 GED as a Quadratic Assignment Problem The bipartite GED is a good candidate approximation of the GED, but it is based on the construction of a restricted edit path which generally does not have a minimal cost. Costs on edges can only be deduced from operations performed on their two incident nodes. This cannot be taken into account by the approach based on the LSAP, which considers information about edges separately in each node. To fully describe the GED, the model must take into account simultaneous node and edge assignments. This can be formalized as a quadratic assignment problem [31, 26]. In this section, we propose to extend the linear model to a quadratic one based on ǫ-assignments, and we show that this model corresponds to the cost of a restricted edit path. 4.1 Simultaneous node assignment and quadratic cost Let G1 = (V1 , E1 ) and G2 = (V2 , E2 ) be two graphs, and let ψ ∈ Ψ(V1ǫ , V2ǫ ) be an ǫassignment (Definition 18). When a pair (i, j) ∈ V1ǫ × V1ǫ is assigned by ψ to a pair (ψ(i), ψ(j)) ∈ V2ǫ × V2ǫ , one of the following cases occurs: 1. Edge substitution: (ψ(i), ψ(j)) ∈ E2 with (i, j) ∈ E1 . 2. Edge removal: (ψ(i), ψ(j)) 6∈ E2 with (i, j) ∈ E1 . 3. Edge insertion: (ψ(i), ψ(j)) ∈ E2 with (i, j) 6∈ E1 . 4. Finally (ψ(i), ψ(j)) 6∈ E2 with (i, j) 6∈ E1 allows to complete the bijection property. Each possible simultaneous mapping of nodes i, j ∈ V1ǫ onto respectively nodes k and l in V2ǫ , is penalized by a non-negative cost dik,jl which depends on the underlying edit operation described by one of the cases above. The overall edge’s cost associated to a simultaneous node assignment is then measured by: d(ψ) = n+m X n+m X diψ(i),jψ(j) , (16) i=1 j=1 where cost values are defined as follows. Recall that all mappings from a node of V1ǫ to a node of V2ǫ are not allowed. Indeed (Section 3.1), i → ǫj with i ∈ V1 and j 6= i, and reciprocally ǫk → l with l ∈ V2 and k 6= l are forbidden. Then, a simultaneous node mapping involving at least one of these two cases is also forbidden. We denote by 6→ a forbidden mapping. As in Section 3.2, the cost is set to a (large) value ω in this case. For any other simultaneous node mapping (i → k, j → l), with i, j ∈ V1ǫ and k, l ∈ V2ǫ , its cost depends on the presence or the absence of edges (i, j) ∈ E1 and (k, l) ∈ E2 : 18 • If (i, j) ∈ E1 and (k, l) ∈ E2 then dik,jl is the cost of the edge assignment (i, j) → (k, l), i.e. edge substitution. • If (i, j) ∈ E1 and (k, l) 6∈ E2 then dik,jl is the cost of removing the edge (i, j). • If (i, j) 6∈ E1 and (k, l) ∈ E2 then dik,jl is the cost of inserting the edge (k, l). • Else, the simultaneous mapping must not influence the overall cost and so its cost is always set to 0. By using the edit cost functions defined in Section 2.2, the cost of an allowed simultaneous node mapping is then defined by ce (i → k, j → l) = ces ((i, j) → (k, l)) δ(i,j)∈E1 δ(k,l)∈E2 + ced (i, j) δ(i,j)∈E1 (1 − δ(k,l)∈E2 ) (17) + cei (k, l) (1 − δ(i,j)∈E1 )δ(k,l)∈E2 where δe ∈ E = 1 if e ∈ E and 0 else, (i, j) → ǫ denotes edge removal and ǫ → (k, l) denotes edge insertion. Since graphs do not have self-loops, we have dik,ik = 0 for all i ∈ V1ǫ and k ∈ V2ǫ . Remark also that the symmetry of ce (i → k, j → l) depends on the one of edit operations and the one of directed edges when the two graphs are directed. Finally, the cost of a simultaneous node mapping is given by ( ω if (i 6→ k) ∨ (j 9 l) dik,jl = (18) ce (i → k, j → l) else 2 (n+m) Let x ∈ vec[A∼ be the vectorization of the ǫ-assignment matrix asson,m ] ⊂ {0, 1} ciated to ψ. All costs can be represented by a (n + m)2 × (n + m)2 matrix D = (dik,jl )i,k,j,l such that dik,jl xik xjl = diψ(i),jψ(j) if xik = xjl = 1, and 0 else. So each row and each column of D, and x, have the same organization of pairwise indices, and then the total cost of the simultaneous node assignment can be written in quadratic form as: d(ψ) = n+m X m+n X n+m X m+n X dik,jl xik xjl = xT Dx, i=1 k=1 j=1 l=1 The cost matrix D can be  D1,1 · · ·  .. ..  . .   Dn,1 · · · D=  Dǫ1 ,1 · · ·   .. ..  . . Dǫm ,1 ··· decomposed as follows into blocks:  D1,ǫ1 · · · D1,ǫm D1,n  .. .. .. ..  . . . .  n,ǫm  n,ǫ1 n,n ··· D D D  Dǫ1 ,n Dǫ1 ,ǫ1 · · · Dǫ1 ,ǫm    .. .. .. ..  . . . . Dǫm ,n Dǫm ,ǫ1 ··· (19) Dǫm ,ǫm where each block Di,j ∈ [0, +∞)(m+n)×(m+n) defines the cost of assigning i and j of V1ǫ to respectively k and l for all k, l ∈ V2ǫ , i.e. [Di,j ]k,l = dik,jl . Remark that blocks Di,j are organized in four main blocks corresponding to the nature of nodes i and j (dummy nodes or not). Each block Di,j is itself decomposed into four blocks as follows: i,j D    =    j1 · · · jm jǫ1 · · · jǫn Di,j 1,1 Di,j 1,2 Di,j 2,1 Di,j 2,2  i1 .  ..  im   iǫ1  .  . . iǫn (20) m×m m×n n×m n×n where Di,j , Di,j , Di,j and Di,j . 1,1 ∈ [0, +∞) 1,2 ∈ [0, +∞) 2,1 ∈ [0, +∞) 2,2 ∈ [0, +∞) The different values taken by the elements of D, depending on the values of the indices, are reported in Table 1. 19 nodes in V2ǫ case block 1 Di,j 1,1 k, l 2 Di,j 1,2 3 Di,j 2,1 4 Di,j 2,2 5 l Di,ǫ 1,1 6 l Di,ǫ 1,2 7 l Di,ǫ 2,1 8 l Di,ǫ 2,2 9 k ,j Dǫ1,1 10 k ,j Dǫ1,2 11 k ,j Dǫ2,1 12 k ,j Dǫ2,2 13 k ,ǫl Dǫ1,1 14 k ,ǫl Dǫ1,2 15 k ,ǫl Dǫ2,1 16 k ,ǫl Dǫ2,2 k, ǫj else ǫi , l else ǫi , ǫj else k, l else k, ǫ ǫi , l else ǫi , ǫ else k, l else k, ǫj else ǫ, l ǫ, ǫj else k, l else k, ǫ else ǫ, l else ǫ, ǫ d(i,j),(k,l) ces ((i, j) → (k, l))δ(i,j)∈E1 δ(k,l)∈E2 + ced (i, j)δ(i,j)∈E1 (1 − δ(k,l)∈E2 ) + cei (k, l)(1 − δ(i,j)∈E1 )δ(k,l)∈E2 ced (i, j)δ(i,j)∈E1 ω ced (i, j)δ(i,j)∈E1 ω ced (i, j)δ(i,j)∈E1 ω cei (k, l)δ(k,l)∈E2 ω 0 0 ω 0 ω cei (k, l) δ(k,l)∈E2 ω 0 ω 0 0 ω cei (k, l) δ(k,l)∈E2 ω 0 ω 0 ω 0 Table 1: Elements of matrix D according to the configuration of its indices. We consider that i, j ∈ V1 , k, l ∈ V2 , ǫk , ǫl ∈ E1 , and ǫi , ǫj ∈ E2 . Epsilon values without indices mean any ǫ-value. Proposition 7 If both G1 and G2 are undirected, then: ∀(i, k, j, l) ∈ V1ǫ × V2ǫ × V1ǫ × V2ǫ , dik,jl = djl,ik . Proof: If both G1 and G2 and :   ces ((i, j) → (k, l)) ced (i, j)  cei (k, l) are undirected, then δ(i,j)∈E1 = δ(j,i)∈E1 , δ(k,l)∈E2 = δ(l,k)∈E2 = ces ((j, i) → (l, k)) = ced (j, i) = cei (l, k) Hence if none of i, j, k or l are equal to ǫ, the first line of Table 1 remains unchanged. Moreover, if ǫ ∈ {i, j, k, l}, then permuting indices (i, k) and (j, l) leads to the following permutations of the lines of Table 1 (after the appropriate renaming of variables): (2, 3)(4)(5, 9)(6, 11)(7, 10)(8, 12)(13)(14, 15)(16) One can check that in each case dik,jl = djl,ik .  Remark 2 If the rows of matrix D correspond to (i, k) and the columns to (j, l), then under the hypothesis of Proposition 7, D is symmetric and we get DT = D. 20 To fully represent edit operations we also need to consider the ones performed on nodes. This can be measured by the linear sum cT x defined in Section 3.2, where c = vec(C) ∈ 2 [0, +∞)(n+m) represents the cost of edit operations on nodes (Eq. 12): csub i,k = cvs (i → k) ( cvd (i) if k = i rem ci,k = ω else ( cvi (k) if i = k cins i,k = ω else 4.2 (21) QAP for ǫ-assignments, restricted edit paths and GED According to the following result, summing the quadratic and the linear costs defined above leads to the cost of a restricted edit path. Proposition 8 Let ∆ = D if both G1 and G2 are undirected and ∆ = D + DT else. Note that using Proposition 7, ∆ is symmetric. Any non-infinite value of 12 xT ∆x + cT x corresponds to the cost of a minimal edit path. Conversely the cost of any minimal edit path may be written as 12 xT ∆x + cT x with the appropriate x. Proof: If 12 xT ∆x + cT x is not infinite, x corresponds to a matrix of assignment (Definition 10). Hence by propositions 6 and 4, there is a unique restricted edit path P such that P and x correspond to the same injective function ϕ from a subset V̂1 of V1 onto V2 . The edit path P substitutes each node v, belonging to V̂1 onto ϕ(v), removes all nodes belonging to V1 \ V̂1 and insert all nodes belonging to V2 \ ϕ[V̂1 ] (Proposition 6). Consider the notations of the proof of Proposition 6, i.e. the matrix X = (Q, R, S, T) defining x. The three first blocks are defined as: qi,ϕ(i) = 1 for any i ∈ V̂1 , ri,i = 1 for any i ∈ V1 \ V̂1 and sj,j = 1 for any j ∈ V2 \ ϕ[V̂1 ]. These blocks are filled with 0 outside these indices (Proposition 4). Let us decompose the cost γ(P ) of P into a cost γv (P ) related to operations on nodes and a cost γe (P ) related on operation on edges: γ(P ) = γv (P ) + γe (P ) We have according to corollary 1: X X γv (P ) = cvd (v) + cvs (v) + v∈V1 \V̂1 v∈V̂1 X cvi (v) v∈V2 \V̂2 On the other hand, let us denote by Csub , Crem and Cins the blocks corresponding to (Q, R, S) in the cost matrix C defining c (Section 3.2). The term cT x is equal to: T c x= n X m X csub i,j qi,j i=1 j=1 = X i∈V̂1 = X i∈V̂1 csub i,ϕ(i) + + n X n X crem i,j ri,j + crem i,i + i∈V1 \V̂1 cvs (i → ϕ(i)) + cins i,j si,j i=1 j=1 i=1 j=1 X m X m X X cins j,j j∈V2 \ϕ[V̂1 ] X cvd (i) + i∈V1 \V̂1 X cvi (j) j∈V2 \ϕ[V̂1 ] The first line takes into account that the block corresponding to T in matrix C is equal to 0. Thus, this block does not play any role in the computation of cT x. The last line is due to the definition of the remaining blocks of C (equation 21). 21 We have thus γv (P ) = cT x. Let us show that γe (P ) = 21 xT ∆x. We have: n X m n X m m X n X X X X  T  dik,jl si,k x D jl = dik,jl xik = dik,jl qi,k + dik,jl ri,k + i,k = n X m X dik,jl qi,k + i=1 k=1 = X i=1 k=1 n X i=1 k=1 diǫ,jl ri,i + i=1 diϕ(i),jl + X k=1 i=1 dǫk,jl sk,k k=1 X diǫ,jl + dǫk,jl k∈V2 \V̂2 i∈V1 \V̂1 i∈V̂1 m X where Vˆ2 = ϕ[V̂1 ] (Proposition 5). In the same way we have: X X X  X      xT Dx = xT D jl xjl = xT D jϕ(j) + xT D jǫ + xT D ǫl j,l j∈V1 \V̂1 j∈V̂1 l∈V2 \V̂2 We have:  X X X X   xT D jϕ(j) = diϕ(i),jϕ(j) + diǫ,jϕ(j) + j∈V̂1 j∈V̂1 = i∈V1 \V̂1 i∈V̂1 X diϕ(i),jϕ(j) + (i,j)∈V̂12 X   xT D jǫ = j∈V1 \V̂1 X X j∈V1 \V̂1 k∈V2 \V̂2 ced (i, j) + (i,j)∈E1 ∩(V1 \V̂1 )×V̂1   X diϕ(i),jǫ + X  dǫk,jϕ(j)  X cei (k, l) (k,l)∈E2 ∩(V2 \V̂2 )×V̂2 X diǫ,jǫ + i∈V1 \V̂1 i∈V̂1 X = X k∈V2 \V̂2 ced (i, j)  dǫk,jǫ  (i,j)∈E1 ∩V1 ×(V1 \V̂1 ) X  l∈V2 \V̂2  xT D ǫl = X l∈V2 \V̂2 =   X diϕ(i),ǫl + diǫ,ǫl + X k∈V2 \V̂2 i∈V1 \V̂1 i∈V̂1 X X cei (k, l)  dǫk,ǫl  (k,l)∈E2 ∩V2 ×(V2 \V̂2 ) where all substitutions of dij,kl by the corresponding removal or insertion costs are deduced from Table 1. Moreover, we have, using the notations of Proposition 5: 2 = {(i, j) ∈ Vˆ1 | δ(i,j)∈E1 = δ(ϕ(i),ϕ(j))∈E2 = 1} 2 ˆ = {(i, j) ∈ V1 | δ(i,j)∈E1 = 1, δ(ϕ(i),ϕ(j))∈E2 = 0} 2 {(k, l) ∈ Vˆ2 | δ(ϕ−1 (k),ϕ−1 (l))∈E1 = 0, δ(k,l)∈E2 = 1} = Hence: X X diϕ(i),jϕ(j) = j∈V̂1 i∈V̂1 X ces ((i, j) → (ϕ(i), ϕ(j)))+ X Ê1 R12 I21 ced (i, j)+ (i,j)∈R12 (i,j)∈Ê1 X cei (k, l) (k,l)∈I21 Moreover we have: (V1 \ Vˆ1 ) × Vˆ1 ∪ V1 × (V1 \ Vˆ1 ) = (V1 \ Vˆ1 ) × V1 ∪ V1 × (V1 \ Vˆ1 ) Indeed: (V1 \ Vˆ1 ) × V1 ∪ V1 × (V1 \ Vˆ1 ) = = (V1 \ Vˆ1 ) × Vˆ1 ∪ (V1 \ Vˆ1 ) × (V1 \ Vˆ1 ) ∪ V1 × (V1 \ Vˆ1 ) (V1 \ Vˆ1 ) × Vˆ1 ∪ V1 × (V1 \ Vˆ1 ) 22 Hence by grouping appropriate terms we get: X xT Dx = ces ((i, j) → (ϕ(i), ϕ(j))) (i,j)∈Ê1 + X ced (i, j) (i,j)∈E1 ∩((V1 \Vˆ1 )×V1 ∪V1 ×(V1 \Vˆ1 ))∪R12 Using Proposition 5 we finally get: X ces ((i, j) → (ϕ(i), ϕ(j))) + xT Dx = (i,j)∈Ê1 X + cei (k, l) (k,l)∈E2 ∩((V2 \Vˆ2 )×V2 ∪V2 ×(V2 \Vˆ2 ))∪I21 X ced (i, j) + (i,j)∈E1 \Eˆ1 X cei (k, l) (k,l)∈E2 \Eˆ2 Using Corollary 1 if both G1 and G2 are directed we get γe (P ) = xT Dx. However in this case:   1 T  1 T 1 T 1 x Dx + xT DT x = x Dx + xT Dx = xT Dx x ∆x = xT D + DT x = 2 2 2 2 Hence γe (P ) = 12 xT ∆x. Using Remark 1 we get γe (P ) = 12 xT Dx = 21 xT ∆x if both G1 and G2 are undirected. Thus γ(P ) = 21 xT ∆x + cT x with ∆ = D if both G1 and G2 are undirected and ∆ = D + DT else.  Hence, the determination of a restricted edit path with a minimal cost is equivalent to searching for an optimal ǫ-assignment   1 T T ∼ x̂ ∈ argmin x ∆x + c x | x ∈ vec[An,m ] (22) 2 In other terms, for the class of graphs under consideration, i.e. simple graphs, we have   1 T x ∆x + cT x | x ∈ vec[A∼ ] (23) GED(G1 , G2 ) = min n,m 2 This is a QAP, see [18, 4] for more details on QAPs. In particular, QAPs are NP-hard and exact algorithms can solve QAPs of small size only. So, many heuristics able to find suboptimal solutions in short computing time have been explored. Remark 3 Note that the functional involved in the QAP defined by Eq. 22 can be rewritten as a general quadratic term:   1 T 1 1 x ∆x + cT x = xT ∆x + xT diag(c)x = xT ∆ + diag(c) x (24) 2 2 2 where diag(c) is the diagonal matrix with c as diagonal. So the GED can be equivalently defined by  (25) GED(G1 , G2 ) = min xT ∆x | x ∈ vec[A∼ n,m ] where ∆ = 21 ∆ + diag(c) represents the cost of both node and edge edit operations. As graphs are simple, they have no self-loops and then the diagonal elements of ∆ are all equal to 0. So the diagonal of ∆ is always equal to c. 5 Solving QAPs with the Integer Projected Fixed Point Algorithm We propose to compute an approximate GED by finding a solution of the QAP defined by Eq. 22, and rewritten here as the following binary quadratic programming problem:   def. 1 T T n (26) argmin S(x) = x ∆x + c x | Ax = 1n , x ∈ {0, 1} 2 23 where Ax = 1n , with x ∈ {0, 1}n and A ∈ {0, 1}n×n, is the matrix version of the bijectivity constraints given by Eq. 3, see [4, 34] for more details. Also, we suppose that c ∈ [0, +∞)n , and ∆ ∈ [0, +∞)n×n is assumed to be symmetric. Note that Eq. 22 is equivalent to Eq. 26, with additional constraints on x (Eq. 11) imposed by ω values in the expression of ∆ (Eq. 18 and Proposition 8) and c (Eq. 21). QAPs are generally NP-hard, which depends on the structure of the cost matrix ∆ = 12 ∆ + diag(c) (see previous section), and so most algorithms find approximate local or global optimal solutions by relaxing the bijectivity constraints on the solution, which leads to find a continuous solution instead of a discrete one: argmin {S(x) | Ax = 1, x ∈ [0, +∞)n } . (27) While this relaxed problem is also NP-hard, several polynomial-time algorithms have been designed to converge close to a local or global solution in a short computing time. The ones based on linearization of the cost function S are known to be particularly efficient. They transform the relaxed problem into a sequence of convex problems, such that a given initial solution is improved iteratively by decreasing the cost function up to a fixed point. Then, the final continuous solution is binarized and used as a solution of the QAP. But as shown experimentally in [20] in the context of graph matching, the continuous optimum is not necessarily close to the global discrete optimum. To try to overcome this problem, it seems to be more efficient to try to find a discrete solution as close as possible to a continuous one, at each iteration, as done by Sof-Assign [11, 12, 13] or Integer Projected Fixed Point (IPFP) [20]. We present here an adaptation of the IPFP algorithm, originally proposed for maximization of a quadratic term [20], to minimization. We also improve the computational complexity of several steps of the algorithm. Given an initial continuous (or discrete) candidate solution x0 , The idea of [20] is to iteratively improve (here reduce) the corresponding quadratic cost in two steps at each iteration: 1. Compute a discrete linear approximation bk+1 of the quadratic cost S around the current solution xk by solving a LSAP. 2. Compute the next candidate solution xk+1 by solving the relaxed problem, reduced to compute the extremum of S between xk and bk+1 included. The iteration of these steps converges to an optimum of the relaxed problem, which is either continuous or discrete but generally not the global one. This last point depends on the initialization. The whole process is detailed in Algorithm 5. At each iteration, in the first step, the cost S is linearly approximated. The differential of S in xk in the direction h is given by: DS(xk ) · h = xTk ∆h + cT h (since ∆ is symmetric). Hence the first-order Taylor expansion of S around the current solution xk is given by:  S(b) ≈ S(xk ) + xTk ∆ + cT (b − xk ) (28) ≈ S(xk ) + R(b) − R(xk ) where R(x) = (xTk ∆ + cT )x and b ≥ 0. Keeping xk fixed, S(xk ) and R(xk ) are constant, and so the minimization of S(b) is approximatively equivalent to the minimization of R(b):   bk+1 ∈ argmin xTk ∆ + cT b | Ab = 1, b ≥ 0n . (29) This is a linear programming problem with totally unimodular constraint matrix A and the right-hand side vector of the linear system Ab = 1 is integer valued. So, by standard tools in linear programming, there is an integer optimal solution, here binary and equal to the solution of the LSAP [34, 4]   (30) bk+1 ∈ argmin xTk ∆ + cT b | Ab = 1, b ∈ {0, 1}n×n . 24 Algorithm 1 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: IPFPmin(x0 , c, ∆, kmax ) k ← 0, L ← cT x0 , Sk ← 12 xT0 ∆x0 + L repeat // Projection of the cost by solving a LSAP bk+1 ← argmin{(xTk ∆ + cT )b | b ∈ A∼ n,m } // Minimize the quadratic cost along the direction bk+1 L′ ← cT bk+1 Sbk+1 ← 12 bTk+1 ∆bk+1 + L′ α ← R(bk+1 ) − 2Sk + L β ← Sbk+1 + Sk − R(bk+1 ) − L t0 ← −α/(2β) if (β ≤ 0) ∨ (t0 ≥ 1) then xk+1 ← bk+1 , Sk+1 ← Sbk+1 , L ← L′ else xk+1 ← xk + t0 (bk+1 − xk ) Sk+1 ← Sk − α2 /(4β) L ← cT xk+1 end if k ←k+1 until (xk+1 = xk ) ∨ (k ≥ kmax ) if xk+1 = bk+1 then return (xk+1 , Sk+1 ) xk+1 ← argmin{xTk+1 b | b ∈ A∼ n,m } return (xk+1 , Sk+1 ) In our experiments, this problem is solved by the O(n3 ) version of the Hungarian algorithm [19, 4], modified such that forbidden assignments represented by ω values in ∆ and c are not treated. The resulting assignment bk+1 determines a direction of largest possible decrease of S in the first-order approximation. Let us additionally note that the first order approximation of S(b) is lower than S(xk ) since R(bk+1 ) ≤ R(xk ). However we cannot yet conclude since this is only an approximation. The second step of each iteration of Algorithm 5 consists in minimizing the quadratic function S in the continuous domain along the direction given by bk+1 . This can be done analytically. Let xt = xk + t(bk+1 − xk ), with t ∈ [0, 1], be a parameterization of the segment between xk and bk+1 . The evolution of S on this segment is provided by: S(xt ) = S(xk + t(bk+1 − xk )) = 21 [xk + t(bk+1 − xk )]T ∆[xk + t(bk+1 − xk )] + cT [xk + t(bk+1 − xk )] = 21 xTk ∆xk + cT xk + txTk ∆(bk+1 − xk ) + 21 t2 (bk+1 − xk )T ∆(bk+1 − xk ) + tcT (bk+1 − xk ) = S(xk ) + t[xTk ∆(bk+1 − xk ) + cT (bk+1 − xk )] + 21 t2 (bk+1 − xk )T ∆(bk+1 − xk ) = S(xk ) + tR(bk+1 − xk ) + 21 t2 (bk+1 − xk )T ∆(bk+1 − xk ) = S(xk ) + αt + βt2 where α = R(bk+1 − xk ) = R(bk+1 ) − R(xk ) ≤ 0 = R(bk+1 ) − xTk ∆xk − cT xk = R(bk+1 ) − 2( 21 xTk ∆xk + cT xk ) + cT xk = R(bk+1 ) − 2S(xk ) + cT xk β = 12 (bk+1 − xk )T ∆(bk+1 − xk ) = 21 bTk+1 ∆bk+1 − xTk ∆bk+1 + 21 xTk ∆xk = 12 bTk+1 ∆bk+1 + cT bk+1 − R(bk+1 ) + 12 xTk ∆xk = S(bk+1 ) + S(xk ) − R(bk+1 ) − cT xk 25 1 1 S(xt ) 1 S(xt ) S(xt ) S(xt0 ) t 1 (a) β ≥ 0, t0 ≤ 1 t t 1 (b) β ≥ 0, t0 ≥ 1 1 (c) β < 0 Figure 2: Illustration of the 3 cases relating β and t0 . The main advantage of the above expression for the calculation of α, and not used in the original algorithm [20], is that R(bk+1 ) is already computed by the LSAP algorithm that computes bk+1 . Moreover S(xk ) and cT xk may be stored from the previous iteration of the algorithm. Note that since α = R(bk+1 ) − R(xk ) we have α ≤ 0. For β, the improvement is a bit more tedious. We have indeed to compute S(bk+1 ). Hence the gain is not obvious compared to the direct computation of (bk+1 − xk )T ∆(bk+1 − xk ) as done in the original algorithm [20]. Note however that S(bk+1 ) will also be used in a following step, so computations are factorized. The problem is thus transformed into finding the optimal value  t0 = argmin S(xt ) = S(xk ) + αt + βt2 | t ∈ [0, 1] . (31) The derivative of S(xt ) cancels at t0 = −α/(2β). Then as shown in Fig. 2, we have: • If β > 0 – If t0 ≤ 1, S(xt0 ) is the minimum of S(xt ), in particular it is lower than S(xk ) and S(bk+1 ). Moreover: S(xt0 ) = S(xk ) − α2 α2 α2 + = S(xk ) − 2β 4β 4β – If t0 ≥ 1, then S ′ (xt ) < 0 ∀t ∈ [0, 1], and the minimal value of S(xt ) is S(x1 ) = S(bk+1 ). • If β ≤ 0, since α ≤ 0, S(xt ) decreases between t = 0 and t = 1. Its minimal value is thus S(x1 ) = S(bk+1 ). So, if either β < 0 or β > 0, but t0 ≥ 1, the minima of S(xt ) within the range t ∈ [0, 1] is obtained for t0 = 1, i.e. xt0 = bk+1 (lines 11-12). Note that in this case the new solution is discrete. In the remaining case (lines 13-16), S(xt ) passes by a minimal value lower than S(xk ) and S(bk+1 ). In both cases xt0 is taken as the solution xk+1 for the next iteration. Hence, as in the original algorithm [20], S(xk ) decreases at each iteration, and since ∆ and c are positive, S is bounded bellow 0 and the algorithm converges. The whole process is iterated until a fixed point is reached, in which case xk+1 is ensured to be a minimum of the relaxed problem defined by Eq. 27. When a minimum of the original problem defined by Eq. 26 is requested as for the GED, the discrete vector closest to the minimum of the relaxed problem is selected. Note that the method [15] does not guarantee the solution to be binary. The minimum of the relaxed problem is not guaranteed to be global. This depends on the initial vector x0 , which influences both the value of the resulting cost and the number of iterations required to reach the convergence. For the approximation of the GED, we have tested several initializations based on the LSAP, as described in the following section. We have observed that the exact GED is often obtained, meaning that the optimal solution of the original problem can be reached by the algorithm. 26 Table 2: Characteristics of the four GREYC’s chemistry datasets. Dataset Alkane Acyclic M AO P AH Number of graphs 150 183 68 94 Avg Size 8.9 8.2 18.4 20.7 Avg Degree 1.8 1.8 2.1 2.4 Table 3: Accuracy and complexity scores. d is the average edit distance, e the average error and t the average computational time. Algorithm A∗ [26] [10] [5] IP F PRandom init IP F Pinit [26] IP F PInit [10] 6 d Alkane e t 15 35 33 26 22.6 22.4 20.5 18 18 11 7.1 7.0 5 1.29 ≃ 10−3 ≃ 10−3 2.27 0.007 0.007 0.006 d Acyclic e t 17 35 31 28 23.4 22.6 20.7 18 14 9 6.1 5.3 3.4 6.02 ≃ 10−3 ≃ 10−2 0.73 0.006 0.006 0.005 d 105 49 44 65.2 59 33.6 MAO t ≃ 10−3 ≃ 10−2 6.16 0.031 0.031 0.016 d 138 120 129 63 62.2 52.5 PAH t ≃ 10−3 ≃ 10−2 2.01 0.04 0.04 0.037 Experiments In this section, we present some experimentation results to show the effectiveness of our quadratic assignment approach with respect to the ones based on LSAPs. To this purpose, we compare our approach to three methods based on the LSAP and one method to compute the exact graph edit distance based on A∗ algorithm. The latter method is used as a baseline to measure the error induced by approximations. However, A∗ is restricted to very simple graphs and it wasn’t possible to compute exact graph edit distances for two over the four used datasets. The three LSAP methods, i.e. bipartite GEDs, are the ones proposed in [26, 10, 5]. They differ on the definition of the cost between elements, as already discussed. The experiments have been performed on four chemoinformatics datasets1 (see Table 2 for their characteristics) plus one synthetic dataset to test larger graphs. The variety of these datasets allows to see the behavior of different approaches on four kind of graphs: acyclic labeled (Acyclic), acyclic not labeled (Alkane), cyclic labeled (MAO), cyclic not labeled (PAH). Finally, the synthetic dataset is composed of graphs having same characteristics as the ones in MAO dataset but extended up to 100 nodes (details bellow). Table 3 shows the results of our experiments on the four GREYC’s datasets. Note that, in order to avoid some bias, these results have been computed using random permutations of the adjacency matrices before computing graph edit distances. Moreover, all experiments have been computed on the same machine, hence providing comparable computational times. In order to show the relevancy of our proposal, we compute the average edit distance (d), the average approximation error (e) with respect to the exact graph edit distance and the average computational time (t) required to get the graph edit distance for a pair of graphs. For these three measures, lower values correspond to better results. Indeed, since approximation approaches overestimate graph edit distance, a lower average edit distance can be considered as better than an higher one. Due to the computational complexity required by A* algorithm, the exact graph edit distance has not been computed on PAH and MAO datasets which are composed of larger graphs than the ones in Acyclic and Alkane datasets. IPFP approach allows to drastically improve the accuracy of the approximation with respect to LSAP approaches while keeping a reasonable computational time. This observation can be made on the four datasets, hence showing the consistency of this QAP approach. Results shown in Table 3 also highlight the importance of the initialization step. Since 1 Available at https://brunl01.users.greyc.fr/CHEMISTRY/ 27 4 100 Percentage of perfect approximation time (s) mean error 3.5 2.5 50 2 percentage time, average error 3 1.5 1 0.5 0 10 20 30 40 50 60 70 80 90 100 Figure 3: Analysis of complexity on a synthetic dataset. the functional of QAP formulation is not convex, different initializations can lead to different local minima. Obviously, initializations close to the global minimum have an higher probability to reach it than initializations far from it. This behavior is observed in the results where better approximations are obtained by using the approach giving the best approximation considering LSAP framework. Moreover, less iterations are required to reach convergence since the algorithm is initialized close to the minima. This phenomenon explains the low differences of computational time between the different approaches. Note that we didn’t test the method presented in [5] due to its high computational time. In conclusion, these results show that the QAP approach is a relevant approach to approximate graph edit distance and outperforms methods based on LSAP formulation while keeping an interesting computational time with respect to the one required to compute an exact graph edit distance. Figure 3 shows how our IPFP approach scales with the size of graphs. This results have been computed on a synthetic dataset having same node’s and edge’s labels distribution and same ratio between the number of edges and the number of nodes as MAO dataset but generalized to different graph sizes. For a given number of nodes, a synthetic dataset is composed of 100 pairs of source and target graphs. Each target graph has been generated by removing one node and substituting another one from the associated source graph. The overall edit distance between source and target graphs is then defined by the cost associated to this two node operations together with the induced edit operations on edges. The graph edit distance between each pair of graphs is around 10. Given this protocol, we generated a synthetic dataset composed of 100 couples of graphs for different graph’s sizes, hence obtaining 10 datasets from 10 to 100 nodes. In Figure 3, the dashed green line corresponds to the computational time required to compute an approximation of the graph edit distance, the plain blue line to the average approximation error and the dotted red line corresponds to the percentage of pairs for which the exact graph edit distance is computed using IPFP. The x axis corresponds to the size of the graphs. The y axis on the left of Figure 3 represents simultaneously the mean execution times and the average error using a same scaling. Hence, for example, 0.5 should be read as 0.5 seconds on the dashed green line and as an average error of 0.5 28 on the plain blue curve. The y axis on the right corresponds to the percentage of exact graph edit distances computed by our algorithm and should be used for the analysis of the dotted red curve. As we can see, the accuracy of the approximation using IPFP is stable for all tested sizes. The average error for each dataset remains about 5 to 10 % of the exact graph edit distance which corresponds to a good approximation. Moreover, the percentage of perfect approximation shows that we are able to compute the exact graph edit distance for 75% to 91% pairs of graphs. From a computational point of view, the curve seems to describe a polynomial function with respect to the size of graphs. Considering a bounded number of iterations, this observation is conform with the cubic complexity associated to the algorithm used to resolve LSAP problems, which is used in each iteration of the IPFP algorithm. 7 Conclusion We have in this paper characterized the solutions of some LSAP and QAP as edit paths belonging to a certain family. This characterization has allowed us to solve the graph edit distance problem through a QAP with a clear definition of the family of edit paths implied in the minimization process. The proposed algorithm used to solve the QAP usually provides a permutation matrix, and hence a value which can be directly interpreted as an approximation of the GED. If the final matrix is only stochastic, we simply project it on the set of permutation matrices in order to obtain the desired value. Our experiments show that the proposed algorithm usually find values quite close from the optimal solutions within computational times which allow to apply it on graphs of non trivial sizes. These experiments also show the importance of the initialization step since a good initialization both improves the final result and reduces the number of iterations. Our further works should investigate different directions: the initialization step, the removal within our algorithm of the different instances of ǫ values and finally the definition of alternative QAP solvers. Such improvements should allow in a near future to compute efficiently close approximations of the graph edit distance on graphs composed of a thousand of nodes. References [1] H. Bunke. On a relation between graph edit distance and maximum common subgraph. Pattern Recognition Letters, 18:689–694, 1997. [2] H Bunke. Error correcting graph matching: on the influence of the underlying cost function. IEEE Transactions on Pattern Analysis and Machine Intelligence, 21(9):917–922, 1999. [3] H. Bunke and G. Allermann. Inexact graph matching for structural pattern recognition. Pattern Recognition Letters, 1(4):245–253, 1983. [4] R. Burkard, M. Dell’Amico, and S. Martello. Assignment Problems. SIAM, 2009. [5] V. Carletti, B. Gaüzère, L. Brun, and M. Vento. Approximate graph edit distance computation combining bipartite matching and exact neighborhood substructure distance. In Graph-Based Representations in Pattern Recognition, volume 9069 of LNCS, pages 168–177. 2015. [6] D. Conte, P. Foggia, C. Sansone, and M. Vento. Thirty years of graph matching in Pattern Recognition. International Journal of Pattern Recognition and Artificial Intelligence, 18(3):265–298, 2004. [7] S. Fankhauser, K. Riesen, and H. Bunke. Speeding up graph edit distance computation through fast bipartite matching. In Graph-based Representations in Pattern Recognition, volume 6658 of LNCS, pages 102–111. 2011. [8] M. Ferrer, F. Serratosa, and K. Riesen. A First Step Towards Exact Graph Edit Distance Using Bipartite Graph Matching. In Graph Based Representations in Pattern Recognition, volume 9069 of LNCS, pages 77–86. 2015. [9] P. Foggia, G. Percannella, and M. Vento. Graph matching and learning in pattern recognition on the last ten years. Journal of Pattern Recognition and Artificial Intelligence, 28(1), 2014. [10] B. Gaüzère, S. Bougleux, K. Riesen, and L. Brun. Approximate Graph Edit Distance Guided by Bipartite Matching of Bags of Walks. In Structural, Syntactic and Statistical Pattern Recognition, volume 8621 of LNCS, pages 73–82. Springer, 2014. [11] S. Gold, E. Mjolsness, and A. Rangarajan. Clustering with a domain-specific distance measure. Advances in Neural Information Processing Systems, 6:96–103, 1994. 29 [12] S. Gold and A. Rangarajan. A graduated assignment algorithm for graph matching. IEEE Transactions on Pattern Analysis and Machine Intelligence, 18(4):377–388, 1996. [13] S. Gold and A. Rangarajan. Softmax to softassign: Neural network algorithms for combinatorial optimization. Journal of Artificial Neural Networks, 2(4):381–399, 1996. [14] R. Jonker and A. Volgenant. A shortest augmenting path algorithm for dense and sparse linear assignment problems. Computing, 38(4):325–340, 1987. [15] D. Justice and A. Hero. A binary linear programming formulation of the graph edit distance. IEEE Trans. Pattern Anal. Mach. Intell., 28(8):1200–1214, 2006. [16] T.C. Koopmans and M. Beckmann. Assignment Problems and the Location of Economic Activities. Econometrica, 25(1):53–76, 1957. [17] H. W. Kuhn. The hungarian method for the assignment problem. Naval Research Logistics Quarterly, 2(1-2):83–97, 1955. [18] E. L. Lawler. The quadratic assignment problem. Management Science, 9(4):586–599, 1963. [19] E. L. Lawler. Combinatorial Optimization: Networks and Matroids. Holt, Rinehart and Winston, New York, 1976. [20] M. Leordeanu, M. Hebert, and R. Sukthankar. An integer projected fixed point method for graph matching and map inference. In Advances in Neural Information Processing Systems, volume 22, pages 1114–1122. 2009. [21] C. Lin. Hardness of approximating graph transformation problem. In 5th Annual International Symposium on Algorithms and Computation, volume 834 of LNCS, pages 74–82. Springer-Verlag, Berlin, 1994. [22] Z. Y. Liu and H. Qiao. GNCCP - Graduated Nonconvexity and concavity procedure. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(6):1258–1267, 2014. [23] E. M. Loiola, N. M. M. de Abreu, P. O. Boaventura-Netto, P. Hahn, and T. Querido. A survey for the quadratic assignment problem. European Journal of Operational Research, 176:657–690, 2007. [24] J. Munkres. Algorithms gor the assignment and trasportation problems. Journal of the Society for Industrial and Applied Mathematics, 5:32–38, 1957. [25] M. Neuhaus and H. Bunke. A quadratic programming approach to the graph edit distance problem. In Graph-Based Representations in Pattern Recognition, volume 4538 of LNCS, pages 92–102. 2007. [26] K. Riesen and H. Bunke. Approximate graph edit distance computation by means of bipartite graph matching. Image and Vision Computing, 27:950–959, 2009. [27] K. Riesen and H. Bunke. Improving bipartite graph edit distance approximation using various search strategies. Pattern Recognition, 28(4):1349–1363, 2015. [28] K. Riesen, A. Fischer, and H. Bunke. Combining Bipartite Graph Matching and Beam Search for Graph Edit Distance Approximation. In Artificial Neural Networks in Pattern Recognition, volume 8774 of LNCS, pages 117–128, 2014. [29] K. Riesen, A. Fischer, and H. Bunke. Improving approximate graph edit distance using genetic algorithms. In Structural, Syntactic and Statistical Pattern Recognition, volume 8621 of LNCS, pages 63–72. Springer, 2014. [30] K. Riesen, A. Fischer, and H. Bunke. Estimating graph edit distance using lower and upper bounds of bipartite approximations. Int. J. Patt. Recogn. Artif. Intell., 29(2), 2015. [31] K. Riesen, M. Neuhaus, and H. Bunke. Bipartite graph matching for computing the edit distance of graphs. In Graph-Based Representations in Pattern Recognition, volume 4538 of LNCS, pages 1–12. 2007. [32] A. Sanfeliu and K.-S. Fu. A distance measure between attributed relational graphs for pattern recognition. IEEE Transactions on Systems, Man and Cybernetics, 13(3):353–362, 1983. [33] F. Serratosa. Fast computation of Bipartite graph matching. Pattern Recognition Letters, 45:244–250, 2014. [34] G. Sierksma. Linear and Integer Programming: Theory and Practice. Advances in Applied Mathematics. CRC Press, 2nd edition, 2001. [35] W.-H. Tsai and K.-S. Fu. Error-correcting isomorphisms of attributed relational graphs for pattern analysis. IEEE Trans. on Systems, Man and Cybernetics, 9(12):757–768, 1979. [36] M. Vento. A long trip in the charming world of graphs for pattern recognition. Pattern Recognition, 48(2):1–11, 2015. [37] Z. Zeng, A. K. H. Tung, J. Wang, J. Feng, and L. Zhou. Comparing stars: On approximating graph edit distance. Proceedings of the VLDB Endowment, 2(1):25–36, 2009. 30
8cs.DS
An Algebra of Synchronous Scheduling Interfaces Michael Mendler Faculty of Information Systems and Applied Computer Sciences Bamberg University [email protected] In this paper we propose an algebra of synchronous scheduling interfaces which combines the expressiveness of Boolean algebra for logical and functional behaviour with the min-max-plus arithmetic for quantifying the non-functional aspects of synchronous interfaces. The interface theory arises from a realisability interpretation of intuitionistic modal logic (also known as Curry-Howard-Isomorphism or propositions-as-types principle). The resulting algebra of interface types aims to provide a general setting for specifying type-directed and compositional analyses of worst-case scheduling bounds. It covers synchronous control flow under concurrent, multi-processing or multi-threading execution and permits precise statements about exactness and coverage of the analyses supporting a variety of abstractions. The paper illustrates the expressiveness of the algebra by way of some examples taken from network flow problems, shortest-path, task scheduling and worst-case reaction times in synchronous programming. 1 Introduction The algebra discussed in this paper aims at the specification of behavioural interfaces under the execution model of synchronous programming. Such interfaces abstract externally observable Boolean controls for components activated under the regime of a global synchronous scheduler familiar from data-flow oriented languages such as Lustre [11], Signal [8], Lucid Synchrone [24], or imperative control-flow oriented languages such as Statecharts [12, 23], Esterel [5] and Quartz [25]. In this model computations are coordinated under one or more global system clocks, which may be physical or logical. They divide physical time into a sequence of discrete ticks, or instants. During each instant the synchronous components interact using broadcast signals, which can have one of two statuses, present or absent. These signal statuses evolve monotonically as they are propagated through the system, generating the emission or inhibition of further signals and computations. Under the synchrony hypothesis [10] it is assumed that at each instant, outputs are synchronous with the inputs. In other words, computations take place instantaneously and appear to happen at each tick “all at once.” The synchrony hypothesis conveniently abstracts internal, possibly distributed computations into atomic reactions, making signals appear almost like Boolean variables and (stateful) interfaces almost like Mealy automata with Boolean labels. Unfortunately, this abstraction is not perfect, so that Boolean algebra is insufficient. First, it is well-known [14, 20] that classical two-valued Boolean analysis is inadequate to handle the causality and compositionality problems associated with the synchrony hypothesis adequately. E.g., Boolean algebra by itself cannot guarantee there are no races between signal presence and absence, thus guaranteeing unique convergence after a finite number of signal propagation steps. Some form of causality information needs to be preserved. Secondly, quite practically, in many applications we want to compute non-Boolean information about otherwise “instantaneous” control signals, such as latency or worst-case reaction times, maximal throughput, earliest deadlines, or other quantitative information about the scheduling process. This provides one way to motivate the work reported Benoı̂t Caillaud and Axel Legay (Eds.): Foundations of Interface Technologies (FIT’10) EPTCS 46, 2011, pp. 28–48, doi:10.4204/EPTCS.46.3 c Michael Mendler This work is licensed under the Creative Commons Attribution License. Michael Mendler 29 here, viz. the search for a fully abstract synchronisation algebra as an economic refinement of classical Boolean algebra in situations where Booleans are subject to synchronous schedules and quantitative resource consumption. Another motivation may be drawn from the arithmetical point of view. One of the challenges in quantitative resource analysis is the clever interchange (distribution) of max, min and +. For instance, consider the analysis of worst-case reaction times (WCRT). In its simplest form, given a weighted dependency graph, the WCRT is the maximum of all sums of paths delays, an expression of the form max(∑i∈p1 di1 , ∑i∈p2 di2 , . . . , ∑i∈pn din ) where p j are execution paths of the system and di j the delay of path segment i in path p j . As it happens, the number n of paths is exponential in the number of elementary nodes of a system. Practicable WCRT analyses therefore reduce the max-of-sums to the polynomial complexity of sum-of-maxes (dynamic programming on dependency graphs) employing various forms of dependency abstraction. For illustration, imagine two alternative path segments of length d1 , e1 sequentially followed by two alternative path segments of length d2 , e2 , respectively. The distribution max(d1 + d2 , d1 + e2 , e1 + d2 , e1 + e2 ) = max(d1 , e1 ) + max(d2 , e2 ) for efficiently calculating the longest possible path, is exact only if we have a full set of path combinations. In general, there will be dependencies ruling out certain paths, in which case sum-of-maxes obtains but conservative over-approximations. E.g., assume the combination of d1 with e2 is infeasible. Then, the sum-of-maxes is not exact since max(d1 , e1 ) + max(d2 , e2 ) ≥ max(d1 + d2 , e1 + d2 , e1 + e2 ). On the other hand, knowing the infeasibility of d1 + e2 we would rather compute max(d1 + d2 , e1 + max(d2 , e2 )) = max(d1 + d2 , e1 + d2 , e1 + e2 ) which eliminates one addition and thus is both exact and more efficient than the full conservative maxof-sums. The same applies to min-plus problems such as shortest path or network flow. In the former, the efficient sum-of-mins is an under-approximation of the exact min-of-sums on all feasible paths. For network flow the arithmetic is complicated further by the fact that min/max do not distribute over +, i.e., min(d, e1 + e2 ) 6= min(d, e1 ) + min(d, e2 ) which obstructs simple linear programming techniques. The art of scheduling analysis consists in finding a judicious trade-off between merging paths early in order to aggregate data on the one hand, and refining dependency paths by case analysis for the sake of exactness, on the other hand. A scheduling algebra for practicable algorithms must be able to express and control this trade-off. In this paper we present an interface theory which achieves this by coupling resource weights d with logic formulas φ . A pair d : φ specifies the semantic meaning of d within the control-flow of a program module. Logical operations on the formulas then go hand-in-hand with arithmetic operations on resources. E.g., suppose a schedule activates control points X and Y with a cost of d1 and d2 , respectively, expressed d1 : ◦X ∧ d2 : ◦Y . If the threads are resource concurrent then both controls are jointly active within the maximum, i.e., max(d1 , d2 ) : ◦(X ∧ Y ). If we are only concerned whether one of the controls is reached, then we take the minimum min(d1 , d2 ) : ◦(X ⊕Y ). If activations of X and Y requires interleaving of resources, then we must use addition d1 + d2 : ◦(X ⊗Y ). Our interface theory combines min-max-plus algebra (N∞ , min, max, +, 0, −∞, +∞), see e.g. [4], with a refinement of Boolean algebra to reason about logical control-flow. It features two conjunctions ∧, ⊗ to distinguish concurrent from multi-threading parallelism, two disjunctions ∨, ⊕ to separate external from internal scheduling choices, respectively. A consequence of its constructive nature, our algebra replaces classical negation by a weaker and more expressive pseudo-complement for which x = x and x + x = 1 are no longer tautologies. This turns Boolean into a so-called Heyting algebra. The work presented here is an extension and adaptation of our earlier work on propositional stabilisation theory [21] which has been developed to provide a semantic foundation for combinational timing analyses. The plan for the paper is as follows: To start with, Sec. 2 lays out the syntactic and semantical groundwork for our interface type theory which is then studied in some more detail in Sec. 3. For compactness we keep these theoretical Sections 2 and 3 fairly condensed, postponing examples to Secs. 4 and 5. In 30 An Algebra of Synchronous Scheduling Interfaces the former, Sec. 4, we sketch applications to network flow, shortest path and task scheduling, while in Sec. 5 we discuss the problem of WCRT analysis for Esterel-style synchronous processing. The paper concludes in Sec. 6 with a discussion of related work. 2 Syntax and Semantics of Synchronous Scheduling Interfaces Synchronous scheduling assumes that all dependencies in the control flow of a single instant are acyclic and the propagation of control, for all threads, is a monotonic process in which each atomic control point is only ever activated at most once. Let V be a set of signals, or control variables, which specify the atomic control points in the interface of a synchronous module. An event is a subset E ⊆ V of control variables. A synchronous activation sequence, or simply an activation, is a monotonically increasing function σ ∈ n → 2V from n = {0, 1, . . . , n−1} into the set of events, i.e., σ (i) ⊆ σ ( j) for all 0 ≤ i ≤ j < n. The length |σ | of σ is the number of events it contains, i.e., |σ | = n. The unique activation of length 0 = 0/ is called the empty activation, also denoted 0. / Activations model the monotonic process of signal propagation during one synchronous instant, i.e., between two ticks of the logical clock. They induce a Boolean valuation on the control variables in the sense that A ∈ V may be considered “present” for the instant if A ∈ σ (i) for some 0 ≤ i < |σ | and “absent” otherwise. In the former case, index i is the activation level for the presence of control A. In general, the domain n over which an activation is defined acts as a discrete domain of quantifiable resources which are consumed by control variables becoming active at different resource levels. In this way, activation sequences give an operational understanding of truth values that is faithful to causality and resource consumption. A canonical interpretation is the temporal reading: The length |σ | is the duration of the synchronous instant, i.e., the overall reaction time, and A ∈ σ (i) means that A is activated, or is present from micro-step i. Definition 2.1 Let σ ∈ n → 2V be an activation. • A sub-activation σ 0 ⊆ σ of σ is an activation σ 0 ∈ m → 2V such that there exists a strictly monotonic function f ∈ m → n with σ 0 (i) = σ ( f (i)) for all i ∈ m. • We write σ = σ1 ∪ σ2 to express that sub-activations σ1 , σ2 ⊆ σ form an activation cover of σ , or an interleaving decomposition in the sense that each event is contained in σ1 or in σ2 , i.e., ∀i ∈ |σ |. ∃ j = 1, 2. ∃k ∈ |σ j |. i = f j (k) where f j are the index embeddings of σ j , j = 1, 2. • For every i ∈ N we define the shifted activation σ [i, :] : m → 2V , where m =d f { j | 0 ≤ j + i < n} and σ [i, :]( j) =d f σ ( j + i). A shifted activation is also a sub-activation, σ [i, :] ⊆ σ . We have σ [i, :] = 0/ if σ = 0/ or if i ≥ |σ |. The shift operator is monotonic wrt sub-activations and antitonic wrt resource level, i.e., if σ 0 ⊆ σ and 0 ≤ i ≤ j then σ 0 [ j, :] ⊆ σ [i, :]. This depends on strict monotonicity of the index embedding in σ 0 ⊆ σ . In order to model non-determinism (abstracting from internal parameters or external environment) our interfaces are interpreted over subsets Σ of activation sequences, called (synchronous) schedules. These schedules (of a program, a module, or any other program fragment) will be specified by a scheduling type φ generated by the logical operators φ ::= A | true | false | φ ∧ φ | ¬φ | φ ⊃ φ | φ ∨ φ | φ ⊕ φ | φ ⊗ φ | ◦φ generated from control variables A ∈ V. We will write Σ |= φ (σ |= φ ) to say that schedule Σ (activation σ ) satisfies the type φ . The semantics of types is formally defined below in Def. 2.2. As a type specification, Michael Mendler 31 each control variable A ∈ V represents the guarantee that “A is active (the signal is present, the program label has been traversed, the state is activated) in all activations of Σ”. The constant true is satisfied by all schedules and false only by the empty schedule or the schedule which contains only the empty activation. The type operators ¬, ⊃ are negation and implication. The operators ∨ and ⊕ are two forms of logical disjunction to encode internal and external non-determinism and ∧, ⊗ are two forms of logical conjunction related to true concurrency and interleaving concurrency, respectively. Finally, ◦ is the operator to express resource consumption. The usual bracketing conventions apply: The unary operators ¬, ◦ have highest binding power, implication ⊃ binds most weakly and the multiplicatives ∧, ⊗ are stronger than the summations ∨, ⊕. Occasionally, bi-implication φ ≡ ψ is useful as an abbreviation for (φ ⊃ ψ) ∧ (ψ ⊃ φ ). Also, we note that ¬φ is equivalent to φ ⊃ false. A scheduling type φ by itself only captures the functional aspect of an interface. To get a full interface we need to enrich types by resource information. To this end, we associate with every scheduling type φ a set of scheduling bounds Bnd(φ ) recursively as follows: Bnd(false) = 1 Bnd(true) = 1 Bnd(A) = 1 Bnd(¬φ ) = 1 Bnd(φ ∧ ψ) = Bnd(φ ) × Bnd(ψ) Bnd(φ ⊕ ψ) = Bnd(φ ) × Bnd(ψ) Bnd(◦φ ) = N∞ × Bnd(φ ) Bnd(φ ∨ ψ) = Bnd(φ ) + Bnd(ψ) Bnd(φ ⊃ ψ) = Bnd(φ ) → Bnd(ψ) Bnd(φ ⊗ ψ) = Bnd(φ ) × Bnd(ψ), where 1 = {0} is a distinguished singleton set. Elements of the disjoint sum Bnd(φ ) + Bnd(ψ) are presented as pairs (0, f ) where f ∈ Bnd(φ ) or (1, g) where g ∈ Bnd(ψ). The set Bnd(φ ) × Bnd(ψ) is the Cartesian product of the sets Bnd(φ ) and Bnd(ψ) and Bnd(φ ) → Bnd(ψ) the set of total functions from Bnd(φ ) to Bnd(ψ). Intuitively, an element f ∈ Bnd(φ ) may be seen as a form of generalised higher-order resource matrix for schedules of shape φ . Definition 2.2 A scheduling interface is a pair f : φ consisting of a scheduling type φ and a scheduling bound f ∈ Bnd(φ ). An activation σ satisfies an interface f : φ , or satisfies the scheduling type φ with bound f , written σ |= f : φ , according to the following inductive rules: σ |= 0 : false iff |σ | = 0, i.e., σ = 0/ σ |= 0 : true iff always σ |= 0 : A iff ∀0 ≤ i < |σ | ⇒ A ∈ σ (i) σ |= ( f , g) : φ ∧ ψ iff σ |= f : φ and σ |= g : ψ σ |= (0, f ) : φ ∨ ψ iff σ |= f : φ σ |= (1, g) : φ ∨ ψ iff σ |= g : ψ σ |= ( f , g) : φ ⊕ ψ iff σ |= f : φ or σ |= g : ψ σ |= f : φ ⊃ ψ iff ∀σ 0 ⊆ σ . ∀g ∈ Bnd(φ ). (σ 0 |= g : φ ⇒ σ 0 |= f g : ψ) σ |= (d, f ) : ◦φ iff |σ | = 0 or ∃i ∈ N. 0 ≤ i ≤ d and σ [i, :] |= f : φ σ |= ( f , g) : φ ⊗ ψ iff ∃σ1 , σ2 ⊆ σ . σ = σ1 ∪ σ2 and σ1 |= f : φ and σ2 |= g : ψ. A schedule Σ satisfies φ with bound f , written Σ |= f : φ , if for all σ ∈ Σ, σ |= f : φ . A schedule satisfies φ or is bounded for φ if there exists f ∈ Bnd(φ ) such that Σ |= f : φ . The semantics Σ |= f : φ as formalised in Def. 2.2 is a ternary relation: It links schedules, types and bounds. The symbol |= separates the behavioural model Σ from the formal interface f : φ . The latter, in turn, combines a qualitative and a quantitative aspect. The type φ captures the causal relationships between the control points and the bound f ∈ Bnd(φ ) refines this quantitatively by weaving in concrete activation levels. The colon : is a binary connective which separates these concerns. 32 An Algebra of Synchronous Scheduling Interfaces Proposition 2.3 σ |= f : φ and σ 0 ⊆ σ implies σ 0 |= f : φ . Moreover, |σ | = 0 implies σ |= f : φ . Prop. 2.3 says that interfaces are inherited by sub-activations. This is natural since a sub-activation selects a subset of events and thus (in general) contains more control variables with lower activation distances. The degenerated case is the empty activation which is inconsistent and thus satisfies all interfaces, including the strongest specification 0 : false, viz. “everything is true with zero resource consumption”. The most general way to use the semantic relation of Def. 2.2 is to consider the set of (typically abstracted) activations for a given module P as a schedule ΣP , and then determine a suitable interface for it. Any such f : φ with ΣP |= f : φ may be taken as a valid interface specification of P giving a quantified behavioural guarantee for all activations σ ∈ ΣP under the given scheduling assumptions. Ideally, we are interested in the best fitting or tightest interface, if such exists. To measure the relative strength of an interface we employ Def. 2.2 to associate with every pair f : φ the schedule [[ f : φ ]] = { σ | σ |= f : φ } which is the semantic meaning of the interface. Interfaces may then be compared naturally. The smaller the set of associated activations [[ f : φ ]] the tighter is the interface f : φ . Formally, we write f :φ g:ψ if [[ f : φ ]] ⊆ [[g : ψ]] ∼ g : ψ in case [[ f : φ ]] = [[g : ψ]]. We call an interface f : φ tight for ΣP if it is minimal wrt and f : φ = , i.e., whenever g : ψ  f : φ and ΣP |= g : ψ then f : φ ∼ = g : ψ. A tight interface provides exact information about ΣP in both the functional and the resource dimensions within the expressiveness of our typing language. Typically, however, we are given some schedule ΣP together with a fixed type φ and ask for a minimal bound f such that ΣP |= f : φ . If such a tight bound exists and is unique we call it worst-case for φ . We generalise equivalence to arbitrary types, taking φ ∼ = ψ to mean that for every f ∈ Bnd(φ ) there is g ∈ Bnd(ψ) such that f : φ ∼ = g : ψ and vice versa, for each g ∈ Bnd(ψ) we can find f ∈ Bnd(φ ) with g : ψ ∼ = f : φ . The main purpose of the relations  and ∼ = is to justify strengthening, weakening or semantics-preserving, transformations to handle interfaces as tightly as sensible. They are the basis of the interface algebra, some of whose laws will be studied next. 3 The Algebra of Scheduling Types The set of scheduling bounds Bnd(φ ) captures the amount of resource information associated with a type φ . In this respect the most simple class of types is that for which Bnd(φ ) is (order) isomorphic to 1. Such types are called pure since they do not carry resource information and thus specify only functional behaviour. It will be convenient to exploit the isomorphisms Bnd(ζ ) ∼ = 1 and identify all bounds f ∈ Bnd(ζ ) of a pure type canonically with the unique 0 ∈ 1. Further, since it is unique, we may as well drop the (non-informative) bound and simply write ζ instead of 0 : ζ . This means, e.g., that ζ1 ∧ ζ2 , (0, 0) : ζ1 ∧ ζ2 and 0 : ζ1 ∧ ζ2 are all identified. Second, with this simplification on pure types in place, we may mix bounds and types and apply the type operators to full interfaces. Since f : φ specifies individual activations it formally behaves like an atomic statement. Hence, it is possible to use interfaces f : φ themselves as generalised “control variables” in types such as ( f : φ ) ∧ ψ or ◦( f : φ ). We simply define Bnd( f : φ ) =d f 1 σ |= 0 : ( f : φ ) iff σ |= f : φ which turns an interface f : φ into a pure type. Then, e.g., [[ f : φ ∧ g : ψ]] = [[(0, 0) : ( f : φ ∧ g : ψ)]] = [[0 : ( f : φ )]] ∩ [[0 : (g : ψ)]] = [[ f : φ ]] ∩ [[g : ψ]]. Michael Mendler 33 A few basic facts about the interface algebra arising from Def. 2.2 are readily derived. Not really surprisingly, true and false are complements, ¬true ∼ = false, ¬false ∼ = true as well as neutral false ⊗ φ ∼ = ∼ ∼ ∼ ∼ ∼ ∼ false ⊕ φ = true ∧ φ = φ and dominant elements false ∧ φ = false, true ⊕ φ = true ∨ φ = true ⊗ φ = true. Shifting a type by −∞ and +∞ produces the strongest and weakest statements false and true, respectively: Proposition 3.1 For arbitrary types φ , −∞ : ◦φ ∼ = false and +∞ : ◦φ ∼ = true. All operators ∨, ∧, ⊕ and ⊗ are commutative. The pairs ∨ ↔ ∧ and ⊕ ↔ ∧ fully distribute over each other, while ⊗ distributes over both ⊕ and ∨, but not the other way round. Between ⊗ and ∧ no distribution is possible, in general. One can show that the fragment ∨, ∧, false, ¬, ⊃ satisfies the laws of Heyting algebras seen in Prop. 3.2. Proposition 3.2 For arbitrary types φ1 , φ2 , ψ: ψ ⊃ψ ∼ = true (φ1 ∧ φ2 ) ⊃ ψ ∼ = φ1 ⊃ (φ2 ⊃ ψ) (φ1 ∨ φ2 ) ⊃ ψ ∼ = (φ1 ⊃ ψ) ∧ (φ2 ⊃ ψ) false ⊃ ψ ∼ = true ∼ ψ ⊃ false = ¬ψ φ1 ⊃ (φ2 ⊃ φ1 ) ∼ = true (φ1 ⊃ φ2 ) ∧ φ1 ∼ = φ1 ∧ φ2 ψ ⊃ (φ1 ∧ φ2 ) ∼ = (ψ ⊃ φ1 ) ∧ (ψ ⊃ φ2 ) ∼ ψ ⊃ true = true true ⊃ ψ ∼ = ψ. It is worthwhile to observe that the classical principles of the Excluded Middle A ⊕ ¬A and A ∨ ¬A are both different and not universally valid in WCRT algebra. The latter says A is static, i.e., A is present in all activations or absent in all activations, the former that signal A is stable, i.e., in each activation individually, A is either present from the start or never becomes active. Clearly, not every signal is static or stable. The absence of the axioms A ⊕ ¬A, A ∨ ¬A, which arises naturally from the activation semantics, is a definitive characteristics of intuitionistic logic or Heyting algebra. This feature is crucial to handle the semantics of synchronous languages in a compositional and fully abstract way [20]. Boolean Types. An important sub–class of pure types are negated types ¬φ . They express universal statements about each singleton event of each activation sequence in a schedule. For instance, Σ |= ¬(A ⊗ B) says that no event σ (i) ⊆ V (0 ≤ i < |σ |) in any σ ∈ Σ contains A or B. Similarly, ¬(A ⊃ B) states that A is present and B is absent in every event of every activation sequence, which is the same as ¬¬(A ∧ ¬B). Negated types are expressively equivalent to, and can be transformed into, Boolean types obtained from the following grammar, where φ is an arbitrary type: β ::= true | false | A | ¬β | β ∧ β | β ⊗ β | φ ⊃ β . Proposition 3.3 The Boolean types form a Boolean algebra with ¬, ∧, ⊗ as classical complement, conjunction and disjunction, respectively. Moreover, Σ |= β iff for every σ ∈ Σ and i ∈ |σ | the event σ (i) ⊆ V satisfies β as a classical Boolean formula in control variables V. A consequence of Prop. 3.3 is that the interface algebra contains ordinary classical Boolean algebra as the fragment of Boolean types. In particular, for Boolean types the Double Negation principle ¬¬β ∼ =β and Excluded Middle ¬β ⊗ β ∼ = true hold as well as the De-Morgan Laws ¬(β1 ∧ β2 ) ∼ = ¬β1 ⊗ ¬β2 and ¬(β1 ⊗ β2 ) ∼ = ¬β1 ∧ ¬β2 . Boolean types, like all types satisfying ¬¬φ ∼ = φ or ¬φ ⊗ φ ∼ = true, behave exactly like expressions of Boolean algebra, encapsulating a Boolean condition to be satisfied by each event in a sequence. 34 An Algebra of Synchronous Scheduling Interfaces Pure Types. The sum operator ⊕ takes us outside the sub-language of Boolean types. The reason is that the truth of ⊕, e.g., in stability A ⊕ ¬A, depends on the global behaviour of an activation and cannot be reduced to a single Boolean condition. This is highlighted by the difference between σ |= A ⊕ B which is the condition ∀i ∈ |σ |, A ∈ σ (i) or ∀i ∈ |σ |, B ∈ σ (i) and σ |= A ⊗ B which says ∀i ∈ |σ |, A ∈ σ (i) or B ∈ σ (i). The larger class of pure types, which includes ⊕, give us the possibility to express “Boolean” conditions across activations, as opposed to Boolean types which act within activations. The pure types, denoted by meta-variable ζ , are characterised syntactically as follows: ζ ::= β | ζ ∧ ζ | ζ ⊕ ζ | ζ ⊗ ζ | φ ⊃ ζ , where β is Boolean and φ is an arbitrary type. Notice that not only every Boolean type, but also every negation ¬φ = φ ⊃ false, is pure according to this syntactic criterion. L Proposition 3.4 Every pure type ζ has a representation ζ ∼ = i βi over Boolean types βi . Elementary Types. Pure types have the special property that schedules Σ are bounded for them iff each individual activation σ ∈ Σ is bounded, i.e., they express properties of individual activations. Formally, if Σ1 |= ζ and Σ2 |= ζ then Σ1 ∪ Σ2 |= ζ . Disjunctions ζ1 ∨ ζ2 and resource types ◦ζ , in contrast, do not share this locality property: Although each activation σ may satisfy ζ1 or ζ2 , the schedule Σ as a whole need not be resource-bounded for ζ1 ∨ ζ2 as this would mean all activations satisfy ζ1 or all satisfy ζ2 . Similarly, each individual activation σ ∈ Σ may validate ζ with some resource bound, without necessarily there being a single common bound for all activations in Σ. A useful class of types containing ∨ and ◦ are those for which Bnd(φ ) is canonically order-isomorn for some n ≥ 0. These scheduling types φ with phic to a Cartesian product of numbers, i.e., to N∞ Bnd(φ ) ∼ = Nn∞ are called elementary. They are generated by the grammar θ ::= ζ | θ ∧ θ | θ ⊕ θ | θ ⊗ θ | ◦ζ | ψ ⊃ θ , where ζ is pure and ψ is ◦-free. Elementary scheduling types are of special interest since their elements are first-order objects, i.e., vectors and matrices of natural numbers. Elementary interfaces specify the resource consumption of logical controls. For instance, σ |= (d, 0) : ◦ζ , given ζ = ⊕i βi (see Prop. 3.4), says that σ enters and remains inside a region of events described by one of the Boolean conditions βi and consumes at most d resource units to do that. The special case σ |= d : ◦false says that σ consumes no more than d units during any instant. Similarly, σ |= ζ ⊃ (d, 0) : ◦ξ with ζ = ⊕i βi and ξ = ⊕ j γ j says that every sub-activation σ 0 ⊆ σ that runs fully inside one of the regions βi must reach one of the regions γ j with resources bounded by d. Then, σ |= ζ ⊃ (d, 0) : ◦false means that σ consumes no more than d units while staying in any of the regions βi . To compactify the notation we will write tuples (d1 , d2 ) for the bounds ((d1 , 0), (d2 , 0)) ∈ (N∞ × 1) × (N∞ × 1) ∼ = N∞ × N∞ of types such as ◦ζ1 ⊕ ◦ζ2 , ◦ζ1 ∧ ◦ζ2 , ◦ζ1 ⊗ ◦ζ2 . We apply this simplification also to bounds f ∈ 1 → N∞ × 1 ∼ = N∞ for types such as ζ1 ⊃ ◦ζ2 : We write [d] : ζ1 ⊃ ◦ζ2 , treating the bracketed value [d] like a function λ x. (d, 0). In fact, [d] : ζ1 ⊃ ◦ζ2 is the special case of a 1 × 1 matrix. We will systematically write column vectors [d1 ; d2 ] instead of λ x.((d1 , 0), (d2 , 0)) for the bounds of types such as ζ ⊃ ◦ζ1 ⊕ ◦ζ2 , ζ ⊃ ◦ζ1 ∧ ◦ζ2 or ζ ⊃ ◦ζ1 ⊗ ◦ζ2 , and row-vectors [d1 , d2 ] in place of λ x. case x of [(0, 0) → (d1 , 0), (1, 0) → (d2 , 0)] for types ζ1 ∨ ζ2 ⊃ ◦ζ . Our linearised matrix notation uses semicolon for row-wise and ordinary colon for columns-wise composition of sub-matrices. Specifically, [d11 ; d21 , d12 ; d22 ] and [d11 , d12 ; d21 , d22 ] denote the same 2 × 2 matrix. Michael Mendler 35 In the following Secs. 4 and 5 we are going illustrate different sub-algebras of specialised elementary types to manipulate combined functional and quantitative information and to facilitate interface abstractions. These generalise the algebra of dioids [4, 17] to full max-min-plus, obtaining an equally tight as uniform combination of scheduling algebra and logical reasoning. 4 Examples I: Network Flow, Shortest Path, Task Scheduling The logical operations on types control the arithmetical operations on resource bounds. The next two Props. 4.1 and 4.2 sum up some important basic facts. Proposition 4.1 The arithmetic operations min, max and + compute worst-case bounds such that [d1 ] : ζ1 ⊃ ◦ζ2 ∧ [d2 ] : ζ2 ⊃ ◦ζ3  [d1 + d2 ] : ζ1 ⊃ ◦ζ3 (1) [d1 ] : ζ ⊃ ◦ζ1 ∧ [d2 ] : ζ ⊃ ◦ζ2  [min(d1 , d2 )] : ζ ⊃ ◦(ζ1 ⊕ ζ2 ) (3) [d1 ] : ζ1 ⊃ ◦ζ ∧ [d2 ] : ζ2 ⊃ ◦ζ (5) [d1 ] : ζ ⊃ ◦ζ1 ∧ [d2 ] : ζ ⊃ ◦ζ2  [max(d1 , d2 )] : ζ ⊃ ◦(ζ1 ∧ ζ2 ) (2) [d1 ] : ζ1 ⊃ ◦ζ ∧ [d2 ] : ζ2 ⊃ ◦ζ (4)  [max(d1 , d2 )] : (ζ1 ⊕ ζ2 ) ⊃ ◦ζ  [min(d1 , d2 )] : (ζ1 ∧ ζ2 ) ⊃ ◦ζ . The law (1) expresses a sequential composition of an offset by d1 from control point ζ1 to ζ2 with a further shift of d2 from ζ2 to ζ3 . The best guarantee we can give for the cost between ζ1 and ζ3 is the addition d1 + d2 . The bounds [d1 ] and [d2 ] act like typed functions with [d1 + d2 ] being function composition, [d2 ] · [d1 ] = [d1 + d2 ]. This is nothing but the multiplication of 1 × 1 matrices in max-plus or min-plus algebra. The law (2) is conjunctive forking: If it takes at most d1 units from ζ to some control point ζ1 and at most d2 to ζ2 , then we know that within max(d1 , d2 ) we have activated both together, ζ1 ∧ ζ2 . A special case of this occurs when ζ ∼ = true, i.e., d1 : ◦ζ1 ∧ d2 : ◦ζ2 ∼ = max(d1 , d2 ) : ◦(ζ1 ∧ ζ2 ). Now suppose conjunction is replaced by sum ζ1 ⊕ ζ2 , i.e., we are only interested in activating one of ζ1 or ζ2 , but do not care which. The worst-case bound for this disjunctive forking is the minimum, as seen in (3). Again, there is the special case d1 : ◦ζ1 ∧ d2 : ◦ζ2 ∼ = min(d1 , d2 ) : ◦(ζ1 ⊕ ζ2 ). Dually, disjunctive joins (4) are governed by the maximum: Suppose that starting in ζ1 activates ζ with at most d1 cost and starting in ζ2 takes at most d2 resource units. Then, if we only know the activation starts from ζ1 or ζ2 but not which, we can obtain ζ if we are prepared to expend the maximum of both costs. If, however, we assume the schedule activates both ζ1 and ζ2 , which amounts to conjunctive join, then the destination ζ is obtained with the minimum of both shifts, see (5). Proposition 4.2 Let ζ1 , ζ2 be pure types which are persistent in the sense that whenever σ (k) |= ζi for 0 ≤ k < |σ |, then σ [k, :] |= ζi , too. Then, d1 : ◦ζ1 ⊗ d2 : ◦ζ2  d1 + d2 : ◦(ζ1 ⊕ ζ2 ) (d1 : ◦ζ1 ∧ (ζ1 ⊃ ζ2 )) ⊗ (d2 : ◦ζ2 ∧ (ζ2 ⊃ ζ1 ))  d1 + d2 : ◦(ζ1 ∧ ζ2 ). (6) (7) Consider (6) of Prop. 4.2. Suppose a schedule σ splits into two (sub-)threads σ = σ1 ∪ σ2 each switching control ζ1 and ζ2 consuming at most d1 and d2 units, respectively. Since they can be arbitrarily interleaved and we do not know which one completes first, all we can claim is σ (k) |= ζi for some k ≤ d1 + d2 and i = 1, 2. By persistence, this suffices to maintain ζi from level k onwards, so that σ |= d1 + d2 : ◦(ζ1 ⊕ ζ2 ). Without imposing further assumptions, a sub-thread may be allocated an unknown number of resource units, thereby stalling the progress of the other, unboundedly. The situation 36 Michael Mendler An Algebra of Synchronous Scheduling Interfaces 9 changes, however, however, if if the the ζζii are are synchronisation synchronisation points points where where the the threads threads must must give give up up control control unless unless the the changes, other thread has passed its own synchronisation point ζ (i = 6 j), too. This is the content of (7) and other thread has passed its own synchronisation point ζ jj (i 6= j), too. This is the content of (7) and specified formally formally by by the the additional additional constraints constraints ζζii ⊃ ⊃ ζζ jj.. specified Prop. 4.1 and 4.2 highlight how the arithmetic of min-max-plus min-max-plus algebra algebra are are guided guided by by the the logical logical Prop. 4.1 and 4.2 highlight how the arithmetic of semantics of of interface interface types. types. From From this this vantage vantage point, point, resource resource analysis analysis is is nothing nothing but but aa semanticssemanticssemantics consistent manipulation of a collection of numbers: Whether [d ] : φ , [d ] : φ are to be added, maximised 1 1 2 2 consistent manipulation of a collection of numbers: Whether [d1 ] : φ1 , [d2 ] : φ2 are to be added, maximised or minimised minimised depends depends on on their their types types φφ11 and and φφ22.. In In particular, particular, keeping keeping track track of of the the types types will will make make the the or difference between between aa max-of-sums max-of-sums (sum-of-mins) (sum-of-mins) as as opposed opposed to to aa sum-of-maxes sum-of-maxes (min-of-sums). (min-of-sums). difference 4.1 Network Network Flow Flow 4.1 Consider the the dependency dependency graph graph in in Fig. Fig. 11 with with conconConsider trol nodes V = {A, B,C, D, E, F} and dependency 2 trol nodes V = {A, B,C, D, E, F} and dependency E B edges labelled by positive integers. Let us asedges labelled by positive integers. Let us as5 1 5 sume the the graph graph models models aa communication communication network network sume 2 D in which which control control nodes nodes represent represent packet packet routers routers A in 4 4 and edges edges are are directed directed point-to-point point-to-point connections connections and 3 F 8 of limited limited bandwidth. bandwidth. For For instance, instance, the the router router at at of C node D D receives receives packets packets from from routers routers B B and and C C node through channels of bandwidth 1 and 4, respecFigure through channels of bandwidth 1 and 4, respecFigure 1: 1: Scheduling Scheduling Dependency Dependency Graph Graph N N tively. It It forwards forwards the the incoming incoming traffic traffic to to routers routers tively. E or or F F of of bandwidth bandwidth 55 and and 4, 4, respectively. respectively. The The bandwidth bandwidth measures measures the the maximal maximal amount amount of of information information E that can travel across the channel per synchronisation instant. The analysis of the maximum throughput that can travel across the channel per synchronisation instant. The analysis of the maximum throughput is aa synchronous synchronous scheduling scheduling problem problem which which can can be be modelled modelled using using interface interface types. types. is We associate with the network N a scheduling type φ , such that the amount of packets packets that that can can We associate with the network N a scheduling type φNN, such that the amount of be pushed into a node X is given by the minimal d such that φ  X ⊃ d : ◦false, i.e., the maximal be pushed into a node X is given by the minimal d such that φNN  X ⊃ d : ◦false, i.e., the maximal number of of scheduling scheduling cycles cycles that that node node X X may may be be kept kept alive alive within within any any activation activation specified specified by by φφNN .. The The number idea is that if σ ∈ [[φ ]] is a valid activation of N then each cycle i ∈ |σ | such that X ∈ σ (i) represents idea is that if σ ∈ [[φNN ]] is a valid activation of N then each cycle i ∈ |σ | such that X ∈ σ (i) represents packet unit unit ii sent sent through through X X.. The The event event σ σ (i) (i) ⊆ ⊆V V encodes encodes the the packet’s packet’s path, path, i.e., i.e., the the set set of of all all routers routers aa packet that payload unit i is passing on its journey through the network. The statement σ |= X ⊃ d : ◦false then that payload unit i is passing on its journey through the network. The statement σ |= X ⊃ d : ◦false then says that whenever X becomes alive in activation σ it handles no more d packets. This number may vary says that whenever X becomes alive in activation σ it handles no more d packets. This number may vary between activations. activations. The The minimal minimal d, d, bounding bounding all all activations activations in in this this way, way, is is the the maximal maximal throughput throughput between at X permitted by specification φ . Observe that both capacity values 0 and −∞ are equivalent, at X permitted by specification φNN . Observe that both capacity values 0 and −∞ are equivalent, 00 :: ∼ ∼ ◦false ∼ −∞ :: ◦false ◦false ∼ false. In In fact, fact, the the type type X X⊃ ⊃ 00 :: ◦false ◦false paraphrased paraphrased “X “X forwards forwards 00 packets” packets” and and = −∞ = false. ◦false = = X ⊃ −∞ : ◦false saying “X does not forward any packets”, are the same statements and equivalent to ¬X. X ⊃ −∞ : ◦false saying “X does not forward any packets”, are the same statements and equivalent to ¬X . Now consider consider node node D D again. again. Within Within the the synchronous synchronous measurement measurement instant, instant, all all packets packets arriving arriving at at D D Now must be be scheduled scheduled to to leave leave through through channels channels D D→ →E E or or D D→ → F. F. Consider Consider an an activation activation σ σ |= |= D, D, i.e., i.e., all all must ii ∈ ∈ ||σ | are packets dispatched through D. Some of these will go to E, others to F and all go to one of σ | are packets dispatched through D. Some of these will go to E, others to F and all go to one of the two. two. Hence Hence there there are are sub-activations sub-activations σ σ= =σ σ11 ∪ ∪σ σ22 such such that that σ σ11 |= |= E E and and σ σ22 |= |= F. F. Also, Also, because because of of the the channel limitations, there can be at most 5 packet units of the former and 4 of the latter type. Thus, the channel limitations, there can be at most 5 packet units of the former and 4 of the latter type. Thus, σ11 |= |= E E∧ ∧ 55 :: ◦false ◦false and and σ σ22 |= |= F F∧ ∧ 44 :: ◦false. ◦false. All All in in all, all, we we have have found found the the type type specifying specifying D D and and its its σ connections in in N N to to be be D D⊃ ⊃ (E (E ∧ ∧ 55 :: ◦false) ◦false) ⊗ ⊗ (F (F ∧ ∧ 44 :: ◦false). ◦false). connections The tensor ⊗ is used to model the output branching at aa node. node. Observe Observe that that if if we we increase increase one one of of The tensor ⊗ is used to model the output branching at the channel channel capacities capacities to to +∞, +∞, say say the the one one giving giving access access to to E, E, we we get get D D⊃ ⊃ (E (E ∧ ∧ +∞ +∞ :: ◦false) ◦false) ⊗ ⊗ (F (F ∧ ∧ 44 :: the ∼ ∼ ∼ ◦false) D ⊃ E ⊗ (F ∧ 4 : ◦false) because E ∧ +∞ : ◦false E ∧ true E. This means the channel ∼ ∼ ∼ = = = ◦false) = D ⊃ E ⊗ (F ∧ 4 : ◦false) because E ∧ +∞ : ◦false = E ∧ true = E. This means the channel D→ →E E does does not not impose impose any any further further constraints constraints on on the the throughput throughput besides besides what what E E prescribes. prescribes. If If we we D Michael Mendler 37 decrease the capacity to 0, the type reduces to D ⊃ (E ∧ 0 : ◦false) ⊗ (F ∧ 4 : ◦false) ∼ = D ⊃ F ∧ 4 : ◦false since E ∧ 0 : ◦false ∼ = E ∧ false ∼ = false and false ⊗ φ ∼ = φ . Hence, a capacity of 0 behaves as if the channel was cut off completely. Consequently, the degenerated case of a node X without any exits would be specified by X ⊃ false or ¬X. If we conjoin the types for all nodes of N as seen in Fig. 1, we get φN =d f true ⊃ (A ∧ +∞ : ◦false) ∧ A ⊃ ((B ∧ 5 : ◦false) ⊗ (C ∧ 3 : ◦false)) (8) (9) ∧ B ⊃ ((E ∧ 2 : ◦false) ⊗ (D ∧ 1 : ◦false)) (10) ∧ D ⊃ ((E ∧ 5 : ◦false) ⊗ (F ∧ 4 : ◦false)) (12) ∧ F ⊃ (true ∧ +∞ : ◦false). (14) ∧C ⊃ ((D ∧ 4 : ◦false) ⊗ (F ∧ 8 : ◦false)) ∧ E ⊃ (F ∧ 2 : ◦false) (11) (13) Type (8) designates A as the source node of the network. It formalises a source channel of infinite capacity permitting the global environment, represented by the logical control true, to push as many packets as possible into A. Analogously, destination node F (14) returns packets back to the external environment. Again, this sink channel has infinite capacity, since all packets arriving at F will delivered. The throughput dN of N is the smallest d such that φN  d : ◦false. To get the “exact” or “optimal” bound we must explore the network in breadth and depth. The analysis strategy involves non-linear global optimisation such as the Ford-Fulkerson or Goldberg’s Preflow-Push algorithms. This is not the place to review these algorithm. We shall merely indicate how their logical content can be coded in type theory. Consider that each of the network implications (8)–(14) of the form X ⊃ ⊗Y (Y ∧ dY : ◦false) can be used as an equation X ∼ = X ∧ ⊗Y (Y ∧ dY : ◦false) for transformations by substitution. For example, proceeding forwards from the source A, breadth-first, we can derive true ∼ =A ∼ = A ∧ ((B ∧ 5 : ◦false) ⊗ (C ∧ 3 : ◦false)) ∼ = A ∧ ((B ∧ ((E ∧ 2 : ◦false) ⊗ (D ∧ 1 : ◦false)) ∧ 5 : ◦false) ⊗ (C ∧ ((D ∧ 4 : ◦false) ⊗ (F ∧ 8 : ◦false)) ∧ 3 : ◦false)) ∼ = ((A ∧ B ∧ E ∧ 2 : ◦false) ⊗ (A ∧ B ∧ D ∧ 1 : ◦false)) ⊗ (((A ∧C ∧ D ∧ 3 : ◦false) ⊗ (A ∧C ∧ F ∧ 3 : ◦false)) ∧ 3 : ◦false), (15) (16) (17) (18) using the special ∧/⊗ distribution X ∧ (φ1 ⊗ φ2 ) ∼ = (X ∧ φ1 ) ⊗ (X ∧ φ2 ) for atoms X ∈ V, and the derivable laws ((φ1 ∧ d1 : ◦false) ⊗ (φ2 ∧ d2 : ◦false)) ∧ e : ◦false ∼ = (φ1 ∧ d1 : ◦false) ⊗ (φ2 ∧ d2 : ◦false) for e ≥ d1 + d2 and ((φ1 ∧ d1 : ◦false) ⊗ (φ2 ∧ d2 : ◦false)) ∧ e : ◦false ∼ = (φ1 ∧ e : ◦false) ⊗ (φ2 ∧ e : ◦false) ∧ e : ◦false for e ≤ min(d1 , d2 ). The type (15)–(18) describes the resource usage of packets entering the network up to a depth of 3 nodes, classifying them into 4 separate flows: The packets from (15) pass through A → B → E and can occupy at most 2 bandwidth units, those from (16) follow the path A → B → D and have a volume of at most 1 unit. Furthermore, the packets (17) travelling along A → C → D or (18) on path A → C → F each have at most volume 3, as specified by A ∧C ∧ D ∧ 3 : ◦false and A ∧C ∧ F ∧ 3 : ◦false. Moreover, their sum must not exceed the limit 3 either, as enforced by the extra outer conjunct 3 : ◦false. The maximal 38 An Algebra of Synchronous Scheduling Interfaces flow through the network can be obtained by applying the (in-)equations (15)–(18) in this fashion until saturation is achieved, when all logical controls may be dropped, turning equation ∼ = into inequation : true ∼ = A ∼ = ··· ∼ = ((A ∧ B ∧ E ∧ F ∧ 2 : ◦false) ⊗ (A ∧ B ∧ D ∧ F ∧ 1 : ◦false)) ⊗ (((((A ∧C ∧ D ∧ F ∧ 3 : ◦false) ⊗ (A ∧C ∧ D ∧ E ∧ F ∧ 2 : ◦false)) ∧ 3 : ◦false) ⊗ (A ∧C ∧ F ∧ 3 : ◦false)) ∧ 3 : ◦false)  (2 : ◦false ⊗ 1 : ◦false) ⊗ ((((3 : ◦false ⊗ 2 : ◦false) ∧ 3 : ◦false) ⊗ 3 : ◦false) ∧ 3 : ◦false) ∼ = 6 : ◦false, using the laws d : ◦false ∧ e : ◦false ∼ = min(d, e) : ◦false and d : ◦false ⊗ e : ◦false ∼ = d + e : ◦false, derived from (3) and (6), respectively. This saturation process is a fixed-point construction which may be implemented using a standard “max-flow” algorithm. Specifically, the graph algorithms of Ford-Fulkerson or Goldberg are efficient decision procedures for deciding the algebra induced by the fragment of types appearing in (8)–(18). This sub-algebra of “logical numbers” provides a purely algebraic interpretation for these standard algorithms. It should be clear that the graph-theoretic information is coded in the syntactic structure of the types. However, in contrast to plain graphs, types are equipped with behavioural meaning in the form of scheduling sequences. They generate a plus-min algebra of scheduling sequences which is not a linear algebra, as it does not satisfy distribution. Specifically, e : ◦false ∧ (d1 : ◦false ⊗ d2 : ◦false) ∼ = min(e, d1 + d2 ) : ◦false  min(e, d1 ) + min(e, d2 ) : ◦false ∼ = (e : ◦false ∧ d1 : ◦false) ⊗ (e : ◦false ∧ d2 : ◦false). This approximation offset, of course, is why max-flow problems are not linear matrix problems but require global search and relaxation methods. 4.2 Shortest Path A different interpretation of the scheduling graph Fig. 1 reads the edge labels as distances and asks for the length of the shortest path through the network. This leads to an “inverted” network algebra: The sequential composition of edges is addition and the branching of edges at a node is associated with the minimum operation, whereas in the network flow situation of Sec. 4.1, sequential composition corresponds to minimum and branching is addition. Not surprisingly, the shortest path interpretation invokes a different fragment of the type theory. Again, each node is a control variable V = {A, B,C, D, E, F}. An activation σ models a journey through the network activating control nodes as it passes them. If σ activates X at time i, then X ∈ σ (i), and if it traverses an edge X → Y with distance label d, then for some 0 ≤ k ≤ d, Y ∈ σ (i + k). Hence σ satisfies the type X ⊃ d : ◦Y . If there are several outgoing edges X → Y1 and X → Y2 and σ reaches X, then, because we are interested in the shortest path, we permit σ to explore both branches “in parallel”. Hence, σ fulfils both implications X ⊃ d1 : ◦Y1 and X ⊃ d2 : ◦Y2 . Following this idea, the network N as given in Fig. 1 comes out as the type specification φN =d f A ⊃ 5 : ◦B ∧ A ⊃ 3 : ◦C ∧ B ⊃ 1 : ◦D ∧ B ⊃ 2 : ◦E ∧ C ⊃ 4 : ◦D ∧ C ⊃ 8 : ◦F ∧ D ⊃ 5 : ◦E ∧ D ⊃ 4 : ◦F ∧ E ⊃ 2 : ◦F. (19) The length of the shortest path between X and Y is the minimal d such that φN  X ⊃ d : ◦Y . By (1), sequentially connecting edges X ⊃ d1 : ◦Y and Y ⊃ d2 : ◦Z yields X ⊃ d1 + d2 : ◦Z, and a choice of two Michael Mendler 39 paths X ⊃ d1 : ◦Z and X ⊃ d2 : ◦Z between the same start and end node, by (3) implies X ⊃ min(d1 , d2 ) : ◦Z as desired. Now the values of 0 and −∞ have different meaning: X ⊃ 0 : ◦Y is equivalent to X ⊃ Y modelling an edge without cost. In contrast, X ⊃ −∞ : ◦Y is semantically the same as X ⊃ false which says that no activation reaches control node X. A distance +∞ expresses absence of a connection since X ⊃ +∞ : ◦Y ∼ = X ⊃ true ∼ = true which does not give any information about how to reach Y from X. It is well-known how to compute shortest paths by linear programming. This exploits the distribution law min(e + d1 , e + d2 ) = e + min(d1 , d2 ), which permits us to organise the scheduling bounds in the network theory (19) in form of matrices and to manipulate them using typed matrix multiplications. For instance, we can combine the two outgoing edges of A into a single type (A ⊃ 5 : ◦B) ∧ (A ⊃ 3 : ◦C) ∼ = A ⊃ (5, 3) : ◦B ∧ ◦C ∼ = [5; 3] : A ⊃ ◦B ∧ ◦C, (20) where [5; 3] abbreviates the function λ x. ((5, 0), (3, 0)) interpreted as a column vector of numbers. Dually, the two incoming edges into node D can be combined into a single type (B ⊃ 1 : ◦D) ∧ (C ⊃ 4 : ◦D) ∼ = [1, 4] : B ∨C ⊃ ◦D, (21) where [1, 4] is the function λ x. case x of [0 → (1, 0), 1 → (4, 0)] thought of as a row vector. The type algebra, essentially (1) and (3), proves that the conjunction of both (20) and (21) implies the matrix multiplication ([5; 3] : A ⊃ ◦B ∧ ◦C) ∧ ([1, 4] : B ∨C ⊃ ◦D)  min(5 + 1, 3 + 4) : A ⊃ ◦D = [1, 4] · [5; 3] : A ⊃ ◦D in min-plus algebra. More generally, for every sub-network with source nodes X1 , X2 , . . . , Xm and sink n nodes Y1 ,Y2 , . . . ,Yn we have an elementary type D : ∨m i=1 Xi ⊃ ∧ j=1 ◦Y j describing the shortest path ben tween any source to any target, in which the scheduling bound D ∈ Bnd((∨m i=1 Xi ) ⊃ ⊗ j=1 ◦Y j ) behaves like a n × m matrix in min-plus algebra. For instance, take the decomposition of N into the edge sets N1 =d f {A → B, A → C}, N2 =d f {B → E, B → D,C → D,C → F} and N3 =d f {D → E, D → F, E → F}: D(N1 ) = [5; 3] : A ⊃ (◦B ∧ ◦C) D(N2 ) = [1; 2; +∞, 4; +∞; 8] : (B ∨C) ⊃ (◦D ∧ ◦E ∧ ◦F) D(N3 ) = [4, 2, 0] : (D ∨ E ∨ F) ⊃ ◦F. The shortest path from A to F is then obtained by multiplying these matrices [4, 2, 0] · [1; 2; +∞, 4; +∞; 8] · [5; 3] = [4, 2, 0] · [6; 7; 11] = 9 : A ⊃ ◦F in min-plus-algebra. The type-theoretic approach facilitates a compositional on-the-fly construction of the shortest path matrix. The pure algebraic technique would combine all the information in a global 6 × 6 network matrix N : (∨X∈V X) ⊃ (∧X∈V ◦X) where (N)XY = d < +∞ if there exists an edge X ⊃ d : Y in φN . Then, the shortest path matrix is N ∗ = Id ∧ N ∧ N 2 ∧ · · · , where Id is the identity matrix with 0s in the diagonal and +∞ everywhere else and ∧ is the operation of forming element-wise minimum, lifting the logical operation d1 : ◦X ∧ d2 : ◦X ∼ = min(d1 , d2 ) : ◦X to matrices. The entries in N ∗ are the shortest distances between any two nodes in the network. This way of solving shortest paths is well-known, of course. But now the behavioural typing permits us safely to play over- and under-approximation games which are difficult to control in pure algebra or graph theory without model-theoretic semantics. Just to give a simple example, suppose we wanted to derive a lower bound on the shortest path. Such can be obtained by identifying some of the control 40 An Algebra of Synchronous Scheduling Interfaces nodes, i.e., pretending we could jump between them on our path to reach the destination. For instance, assuming C ≡ B, we find that φN ∧ C ≡ B  A ⊃ 7 : ◦F is the shortest distance. Since the conjunction φN ∧C ≡ B specifies a subset of activations, the shortest distance between A and F relative to φN ∧C ≡ B is a lower bound on the shortest distance relative to φN . It may be more efficient to compute since the network φN ∧C ≡ B only has 5 different nodes rather than 6 as with φN . 4.3 Task Scheduling In yet another interpretation of network N the nodes are tasks and edges scheduling dependencies associated with upper bounds for task completion. Computing the worst-case completion time for the overall schedule, sequential composition of edges corresponds to addition as in the shortest path scenario Sec. 4.2 but branching now involves maximum rather than the minimum. Again, this is induced by the logical nature of the problem, the fact that the input join now is conjunctive rather than disjunctive as before. For instance, task D in Fig. 1 cannot start before both tasks C and B have started with a set-up delay of 4 time units from the start of C and 1 unit from B. Let us assume the task activation times are included in these set-up delays. To model this type-theoretically we take the edges as the atomic control variables, i.e., V = {AC, AB,CD,CF, BD, BE, DE, DF, F}. Whenever XY ∈ σ (i), for i ∈ |σ |, this says that the edge XY is ready, i.e., the source task X is completed and the start token has arrived at the corresponding control input of target task Y . The node D establishes a logical-arithmetical relationship between its input edges CD, BD and its output edges DF, DE, given by CD ∧ BD ⊃ (4 : ◦DF) ∧ (5 : ◦DE). Overall, φN =d f (true ⊃ 3 : ◦AC ∧ 5 : ◦AB) ∧ (AC ⊃ 4 : ◦CD ∧ 8 : ◦CF) ∧ (AB ⊃ 1 : ◦BD ∧ 2 : ◦BE) ∧ ((CD ∧ BD) ⊃ 4 : ◦DF ∧ 5 : ◦DE) ∧ (DE ∧ BE ⊃ 2 : ◦EF) ∧ (CF ∧ DF ∧ EF ⊃ 0 : ◦F). The critical path is the minimal d such that φN  d : ◦F. It can be computed by linear programming involving matrix multiplication in max-plus algebra using essentially the laws (1) and (2). 5 Examples II: Esterel-style Synchronous Multi-threading Like task scheduling in Sec. 4.3, the timing analysis of Esterel programs [6, 22] involves max-plus algebra, yet takes place in an entirely different fragment of the type theory. Instead of implications ζ1 ∧ ζ2 ⊃ ◦ξ1 ∧ ◦ξ2 as in Sec. 4.3 we employ dependencies of the form ζ1 ∨ ζ2 ⊃ ◦ξ1 ⊕ ◦ξ2 , which are handled by (1) and (4) rather than (1) and (2). In addition, we use the tensor ⊗ for capturing multithreaded parallelism. Here we provide some further theoretical background for the work reported in [22]. Esterel programs communicate via signals, which are either present or absent during one instant. Signals are set present by the emit statement and tested with the present test. They are reset at the start of each instant. Esterel statements can be either combined in sequence (;) or in parallel (||). The loop statement simply restarts its body when it terminates. All Esterel statements are considered instantaneous, except for the pause statement, which pauses for one instant, and derived statements like halt (= loop pause end), which stops forever. Esterel supports multiple forms of preemption, e. g., via the abort statement, which simply terminates its body when some trigger signal is present. Abortion can be either weak or strong. Weak abortion permits the activation of its body in the instant the trigger signal becomes active, strong abortion does not. Both kinds of abortions can be either immediate or delayed. The immediate version already senses for the trigger signal in the instant its body is entered, while the delayed version ignores it during the first instant in which the abort body is started. Michael Mendler 14 41 An Algebra of Synchronous Scheduling Interfaces Consider the Esterel fragment in Figure 2b. It consists of two threads. The first thread G emits signals Consider the Esterel fragment in Figure 2b. It consists of two threads. The first thread G emits signals R, S, T depending on some input signal I. In any case, it emits signal U and terminates instantaneously. R, S, T depending on some input signal I. In any case, it emits signal U and terminates instantaneously. The thread H continuously emits signal R, until signal I occurs. Thereafter, it either halts, when E is The thread H continuously emits signal R, until signal I occurs. Thereafter, it either halts, when E is present, or emits S and terminates otherwise, after having executed the skip statement nothing. present, or emits S and terminates otherwise, after having executed the skip statement nothing. 1 21 32 T0 43 54 v0 fork G0 65 76 G H v1 present I _ + 109 11 10 v8 wabort I L5 12 11 13 12 L12 G1 v2 emit R 14 13 15 14 v9 pause L6 15 L13 v3 present I + 87 98 H0 H3 v10 emit R v12 present E v5 emit S v4 goto _ + L14 v11 goto L16 v13 halt L9 H2 v14 emit S L18 G2 v6 emit T v15 nothing L10 v7 emit U L19 L11 v16 join L20 (a) CKAG (a) CKAG R end present; S; emitpresent; T end present; R end S; emit T end present; end present; end present; (b) Esterel module T (b) Esterel module T H1 I _ L7 G3 % module T [ % threadTG % module [ present % threadI Gthen emit present I then else emit emit U; I else emit present || emit U; || % thread H weak abort % thread H loopabort weak pause;emit R loop endpause;emit loop R when I; end immediate loop present E then halt when immediate I; emit S; nothing; present E then halt ] emit S; nothing; ] L01: L02: L01: L03: L02: L03: L04: L05: L04: L06: L05: L07: L06: L08: L07: L09: L08: L10: L09: L10: L11: L12: L11: L13: L12: L14: L13: L15: L14: L16: L15: L17: L16: L18: L17: L18: L19: L19: T0: PAR 1,G0,1 T0: PAR PAR 1,H0,2 1,G0,1 PARE A1 PAR 1,H0,2 PARE A1 G0: PRESENT I,G1 R I,G1 G0: EMIT PRESENT G1: PRESENT EMIT R I,G3 G2 I,G3 G1: GOTO PRESENT G3: EMIT GOTOSG2 G3: EMIT EMIT T S G2: EMIT EMIT U T G2: EMIT U H0: WABORT I,H1 H3: H0: PAUSE WABORT I,H1 H3: EMIT PAUSER GOTO EMIT RH3 H1: PRESENT GOTO H3 E,H2 H1: HALT PRESENT E,H2 H2: EMIT HALT S H2: NOTHING EMIT S NOTHING A1: JOIN A1: JOIN (c) KEP Assembler (c) KEP Assembler Figure 2: Esterel module T (b) with control-flow graph (a) and resulting KEP Assembler (c). Figure 2: Esterel module T (b) with control-flow graph (a) and resulting KEP Assembler (c). The concurrent KEP assembler graph [18] (CKAG, see Fig. 2a) captures the control flow, both The concurrent assembler graph program. [18] (CKAG, see Fig.is 2a) captures the Esterel controlprogram flow, both standard control and KEP abortions, of an Esterel The CKAG derived from the by standard control and abortions, of an Esterel program. The CKAG is derived from the Esterel program by structural translation. For a given CKAG, the generation of assembly code for the Kiel Esterel Processor structural translation. For a given CKAG, the generation of assembly code for the Kiel Esterel Processor (KEP) [18, 19], executing synchronous parallelism by multi-threading, is straight-forward (see Fig. 2c). (KEP) 19], executing synchronous parallelism multi-threading, is straight-forward (see synchroFig. 2c). Let[18, S, L and M be disjoint sets of (input orby output) signals, control flow labels and Let S, L and M be disjoint (inputmodule or output) signals, synchronisation states, respectively. Forsets the of Esterel in Fig. 2 we control have S flow = {I,labels E, R, S,and T,U}, L= nisation states, respectively. For the Esterel module in Fig. 2 we have S = {I, E, R, S, T,U }, Lde= {L0, . . . , L20, G0, . . . , G3, H0, . . . , H3}. As synchronisation states we use the names of the atomic {L0, . . . , L20, G0, . . . , G3, H0, . . . , H3}. As synchronisation states we use the names of the atomic de- 42 An Algebra of Synchronous Scheduling Interfaces lay nodes, i.e., the pause, halt and join nodes, M = {v9 , v13 , v16 }. These describe the different state bits of the synchronous automaton coded by the program block T . To distinguish the cases of a thread starting from or ending in a given state s ∈ M during an instant we use the modifiers out(s) and in(s). The former expresses that the thread is leaving from s at the beginning of the instant and the latter that it enters and terminates the instant in s. The set M+ =d f {out(s), in(s) | s ∈ M} collects these atomic statements. The set of control variables, specifying the atomic control points of a program module, is the union V = S ∪ L ∪ M+ . All the controls out(s) are stable, i.e., we may assume out(s) ⊕ ¬out(s). This is not true for controls in(s) which are switched on dynamically as the schedule enters a delay node. One possible activation of the Esterel module T in Fig. 2a would be as follows. Initially, control variable T 0 is set, so σ (0) = {T 0}. Then the PAR and PARE instructions making up the fork node v0 are executed in line numbers L01, L02, L03 of Fig. 2c, each taking one instruction cycle (ic). The two PAR instructions set up internal counters for thread control, which does not change the set of events in the variables of Fig. 2a. Hence, σ (1) = σ (2) = {T 0}. After the PARE both control variable G0, H0 become present bringing threads G and H to life. This means σ (3) = {T 0, G0, H0}. The next instruction could be any of the two first instructions of G or H. As it happens, the KEP Assembler Fig. 2c assigns higher priority to H so that our activation continues with wabort (node v8 ), i.e., σ (4) = {T 0, G0, H0, L12}. This brings up the pause instruction v9 . Now, depending on whether signal I is present or not the activation of pause either moves to v12 (weak immediate abort) or terminates. Let us assume the latter, i.e., σ (5) = {T 0, G0, H0, L12, in(v9 )}, where thread H is finished up for the instant and has entered a wait state in node v9 . The activation continues with the first instruction of G, the present node v1 at label G0. Since I is assumed absent, its activation effects a jump to label G1, i.e., σ (6) = {T 0, G0, H0, L12, in(v9 ), G1}. Thereafter, we run sequentially through nodes v3 , v5 , v6 , v7 giving σ (7) = σ (6) ∪ {G3}, σ (8) = σ (7) ∪ {L9} and σ (9) = σ (8) ∪ {L10}. Executing the final emit instruction v7 hits the join at entry L11, so that σ (10) = {T 0, G0, H0, L12, in(v9 ), G1, G3, L9, L10, L11}. Now both threads G and H are finished. While G is terminated and hands over to the main thread T for good, H is still pausing in v9 . It takes one activation step of the join node v16 to detect this and to terminate the synchronous instant of T with the final event σ (11) = {T 0, G0, H0, L12, in(v9 ), G1, G3, L9, L10, L11, in(v16 )}. Overall, we get an activation of the outer-most main thread of T , σ = σ (0), . . . , σ (11), starting from program label T 0 consisting of 12 ics in total. In the next logical instant when T is resumed in v16 and v9 , with initial event σ (0) = {out(v9 ), out(v16 )}, and thread H eventually comes out at control point L19 (if signal I is present and E absent), then executing the join v16 will bring us to control point L20 and out of T instantaneously. Activation sequences starting in control label T 0 and ending in L20 are called through paths, those starting in T 0 and pausing in a synchronisation state in(s), s ∈ {v9 , v13 , v16 }, are sink paths; source paths begin in a state out(s) and end in L20, while internal paths begin in a state and end in a state. Esterel IO-Interface Types. Our normal form interfaces to describe Esterel-KEP modules are of the W Ln form θ = φ ⊃ ψ, with input control φ = m i=1 ζi and output control ψ = k=1 ◦ξk where the ζi and ξk are pure types. The former φ captures all the possible ways in which a program module (or any other fragment) of type θ can be started within an instant and the latter ψ sums up the ways in which it can be exited during the instant. Intuitively, Σ |= θ says that whenever the schedule Σ enters the fragment through one of the input controls ζi then within some bounded number of ics it is guaranteed to exit through one of the output controls ξk . The disjunction ∨ in the input control φ models the external non-determinism resolved by the environment which determines how a program block is started. On the output side ψ, the selection of which exit ξk is taken is expressed by ⊕ since it is an internal choice which Michael Mendler 43 is dynamically resolved during each activation. Each delay operator ◦ stands for a possibly different delay L depending on which output ξk is taken. Contrast this with an output control such as ψ = ◦( nk=1 ξk ) which only specifies one bound for all exits ξk . An interface bound T ∈ Bnd(φ ⊃ ψ) can be understood as a n × m shaped timing matrix relative to the Boolean controls ζi and ξk serving as “base” vectors. The logical conjunction of these interfaces in a fixed set of such base controls corresponds to matrix multiplications in max-plus algebra. Furthermore, using logical reasoning on base controls ζi , ξ j we can massage the semantics of timing matrices very much like we do with base transformations in ordinary linear algebra. Two important operations on IO-interfaces are matrix multiplication and the Kronecker product which in our scheduling algebra are now strongly typed and thus receive semantic meaning in logical spaces. Transient and Sequential Submodules G and H. A full and exact WCRT specification encapsulating the synchronous block G as a component would require mention of program labels G1, G3, G2 which are accessible from outside for jump statements. Therefore, the interface type for single-threaded scheduling of G would be [6, 4, 3, 1] : G0 ∨ G1 ∨ G3 ∨ G2 ⊃ ◦L11. This is still not the exact description of G since it neither expresses the dependency of the WCRT on signal I, nor the emissions of R, S, T , U. For instance, if I is present then all threads must take control edges L5 and L7 rather than G1 or G3 which are blocked. If I is absent then both G1 and G3 must be taken instead. As a result the longest path v1 + v2 + v3 + v5 + v6 + v7 with delay 6 is not executable. To capture this, we consider signal I as another control input and refine the WCRT interface type of G: [5, 5, 3, 4, 3, 1] : (G0 ∧ I) ∨ (G0 ∧ ¬I) ∨ (G1 ∧ I) ∨ (G1 ∧ ¬I) ∨ G3 ∨ G2 ⊃ ◦L11. (22) The inclusion of signal I in the interface has now resulted in the distinction of two different delay values 3 and 4 for G1 ⊃ ◦L11 depending on whether I is present or absent. On the other hand, G0, split into controls G0 ∧ I and G0 ∧ ¬I, produces the same delay of 5 ics in both cases, which is a decrease of WCRT compared to [6] : G0 ⊃ ◦L11 from above. Assuming that input signal I is causally stable, i.e., I ⊕ ¬I ∼ = true, it is possible to optimise the interface without losing precision: since (G0 ∧ I) ⊕ (G0 ∧ ¬I) ∼ G0 ∧ (I ⊕ ¬I) ∼ = = G0 ∧ true ∼ = G0 the column vector [0; 0] : G0 ⊃ ◦(G0 ∧ I) ⊕ ◦(G0 ∧ ¬I) is sound and can be used to compress the two entries of value 5 in (22) into a single value 5 = max(5, 5) giving [5, 3, 4, 3, 1] : G0 ∨ (G1 ∧ I) ∨ (G1 ∧ ¬I) ∨ G3 ∨ G2 ⊃ ◦L11. In the same vein, but this time without referring to stability, we could further bundle G1 ∧ I and G3 into a single control with the single delay [3] : (G1 ∧ I) ⊕ G3 ⊃ ◦L11 at the same level of precision. This finally yields [5, 3, 4, 1] : G0 ∨ ((G1 ∧ I) ⊕ G3) ∨ (G1 ∧ ¬I) ∨ G2 ⊃ ◦L11. Still, if we only ever intend to use G as an encapsulated block with entry G0 and exit L11 the following typing is sufficient: [5] : G0 ⊃ ◦L11. (23) Now we take a look at the sequential control flow which starts and terminates in pause and halt nodes. Consider the sub-module H from Fig. 2a consisting of nodes v8 –v15 . Nodes wabort, emit, goto, present, nothing are transient and specified as before for G. But now the instantaneous paths are broken by the delay nodes v9 and v13 . First, consider the pause node v9 . It can be entered by two controls, line number L12 and program label H3, and left via two exits, a non-instantaneous edge L13 and an instantaneous exit H1 (weak abortion). When a control thread enters v9 then either it terminates the current instant inside the node or leaves through the weak abort H1 (data-dependent, if signal I is present) continuing the current reaction, instantaneously. A thread entering v9 never exits through L13 in the same instant. On the other hand, if 44 An Algebra of Synchronous Scheduling Interfaces a thread is started (resumed) from inside the pause node v9 then control can only exit through L13. This suggests to specify the pause node as follows: [1; 1, 1; 1] : H3 ∨ L12 ⊃ ◦H1 ⊕ ◦in(v9 ) [1] : out(v9 ) ⊃ ◦L13. (24) (25) The interface (24) says that if pause is entered through H3 or L12 it can be left through H1 or terminate (in) inside the pause. In all cases activation takes 1 instruction cycle. Since there are no differences in the delays we could bundle the controls H3, L12 and compress the matrix (24) as [1] : H3 ⊕ L12 ⊃ ◦(H1 ⊕ in(v9 )) without losing information. We could also record the dependency of control on signal I, with the more precise interface [1; −∞, −∞, 1] : ((H3 ⊕ L12) ∧ I) ∨ ((H3 ⊕ L12) ∧ ¬I) ⊃ ◦H1 ⊕ ◦in(v9 ). This separates the threads which must stop inside the pause from those which must leave via H1 due to a weak immediate abort on signal I. The specification (25) accounts for threads starting in the pause which must necessarily pass control to L13 within one instruction cycle. The halt node v13 in Fig. 2a is not only a sink for control threads entering through L16 but it also has an internal path of length 1 (which is repeated at every instant). It is specified by the interface [1, 1] : (out(v13 ) ∨ L16) ⊃ ◦in(v13 ). By composition from the WCRT interfaces of nodes v12 –v15 using matrix multiplications in max-plus algebra we get H = [5; 4, 7; 6] : H0 ∨ out(H) ⊃ ◦L19 ⊕ ◦in(H) (26) recording the lengths of the longest through path v8 + v9 + v12 + v14 + v15 , sink path v8 + v9 + v12 + v13 , source path v9 + v10 + v11 + v9 + v12 + v14 + v15 and internal path v9 + v10 + v11 + v9 + v12 + v13 . Multi-threading Composition: Fork and Join. Finally, consider the two blocks G and H as they are combined inside the Esterel module T (Fig. 2a) and synchronised by fork and join nodes v0 and v16 . The main thread starts G and H in their initial controls, i.e., by activating G0 ∧ H0. Then, the executions of G and H are interleaved, depending on the priorities assigned by the compiler about which we shall make no assumptions. Child thread G can only run through its instantaneous path until it reaches L11 where it is stopped by the join. The sequential block H has two options: It can take its instantaneous through path stopping at L19 or it pauses in one of its delay nodes. In the former case we have reached L11 ∧ L19, where the synchronising join takes over letting the main thread continue by instantaneously activating L20 within the same instant. In the latter case we have activated L11 ∧ in(H) where the synchronous instant is finished and the combined system pauses. Activation is resumed in the next instant from L11 ∧ out(H), while G is still inactive and waiting at L11. Child thread H may either leave instantaneously through L19, giving L11 ∧ L19 overall, or once more pause internally, leading again to L11 ∧ in(H). This synchronous composition is obtained by the Kronecker product GH =d f G0 ⊗ H 0 where G0 and H 0 are the stand-alone interfaces of G (23) and H (26) instrumented for the synchronisation: G0 = Sync1 ∧ [5, 0] : G0 ∨ L11 ⊃ ◦L11 H 0 = Sync2 ∧ [5; 4, 7; 6] : H0 ∨ out(H) ⊃ ◦L19 ⊕ ◦in(H). G is extended by the additional input control L11 and trivial path [0] : L11 ⊃ ◦L11 to let G start an instant from L11 when H is pausing. The conjunct Sync1 =d f ¬L11 expresses the synchronisation whereby G finishes once it reaches L11. Similarly, the conjunct Sync2 =d f ¬(L19⊕in(H)) added to the interface (26) Michael Mendler 45 stops H from continuing its activation instant past L11 or in(H). The Kronecker product G0 ⊗ H 0 now generates all possible interleaving of activations specified by type G0 with those from type H 0 : G0 ⊗ H 0  [5, 0] ⊗ [5; 4, 7; 6] = [5 · [5; 4, 7; 6], 0 · [5; 4, 7; 6]] = [10; 9, 12; 11, 5; 4, 7; 6] : (G0 ∧ H0) ∨ (G0 ∧ out(H)) ∨ (L11 ∧ H0) ∨ (L11 ∧ out(H)) ⊃ ◦(L11 ∧ L19) ⊕ ◦(L11 ∧ in(H)). In the synchronised composition GH we are only interested in the (surface) paths initiated by G0 ∧ H0 and the (depth) paths activated by the combination L11 ∧ out(H). All other paths cannot be activated inside the fork and join context. Thus, we drop these column vectors and only continue with GH = [10; 9, 12; 11, 5; 4, 7; 6] · [0; −∞; −∞; −∞, −∞; −∞; −∞, 0] = [10; 9, 7; 6] : (G0 ∧ H0) ∨ (L11 ∧ out(H)) ⊃ ◦(L11 ∧ L19) ⊕ ◦(L11 ∧ in(H)). This models the concurrent composition of G and H but not yet the interface of the composite block T with fork and join as depicted in Fig. 2a. These are additional components specified as join =[1; −∞, −∞; 1] : (L11 ∧ L19) ∨ (L11 ∧ in(H)) ⊃ ◦L20 ⊕ ◦in(T ) fork =[3; −∞, −∞; 0] : T 0 ∨ out(T ) ⊃ ◦(G0 ∧ H0) ⊕ ◦(L11 ∧ out(H)) with new state controls in(T ) and out(T ) for module T . The JOIN instruction in line 19 of Fig. 2c is always executed upon termination of both threads from G and H inside T and the associated activation time of one ic is accounted for in the join interface above. Specifically, this is a through path [1] : (L11 ∧ L19) ⊃ ◦L20 and source path [1] : L11 ∧ in(H) ⊃ ◦in(T ). The entry [3] : T 0 ⊃ ◦(G0 ∧ H0) of fork includes the ics for two PAR, one PARE from lines 1-3 of Fig. 2c. Adding fork and join on the input and output side then obtains T = [1; −∞, −∞; 1] · [10; 9, 7; 6] · [3; −∞, −∞; 0] = [14; 13, 8; 7] : T 0 ∨ out(T ) ⊃ ◦L20 ⊕ ◦in(T ) for the composite module T . Indeed, the longest through path is exemplified by the sequence of nodes v0 (3) + {v1 + v2 + v3 + v4 + v7 }G (5) + {v8 + v9 + v12 + v14 + v15 }H (5) + v16 (1) = 14. A longest sink path is v0 (3) + {v1 + v2 + v3 + v4 + v7 }G (5) + {v8 + v9 + v12 + v13 }H (4) + v16 (1) = 13. As a maximal source path we could take {}G (0) + {v9 + v10 + v11 + v9 + v12 + v14 + v15 }H (7) + v16 (1) = 8 and as a possible longest internal path {}G (0) + {v9 + v10 + v11 + v9 + v12 + v13 }H (6) + v16 (1) = 7. In specific WCRT algorithms such as the one of [6] many of the matrix multiplications shown above are executed efficiently in the combinatorics of traversing the program’s control flow graph forming maximum and additions as we go along. This is possible only so far as control flow dependencies are represented explicitly in the graph. In general, with data-dependencies, this may be an exponential problem so that symbolic techniques for modular analyses are needed. Our logical interface algebra can be used to keep track of the semantic meaning of WCRT data. Even without data-dependencies, the WCRT interfaces presented here give rise to a depth-first search algorithm [22] which is already more precise than the one presented in [6]. 6 Related Work Most interface models in synchronous programming are restricted to causality issues, i. e., dependency analysis without considering quantitative time. Moreover, the granularity of dependency is limited. E.g., the modules of André et al. [3] do not permit instantaneous interaction. Such a model is not suitable 46 An Algebra of Synchronous Scheduling Interfaces for compositional, intra-instant, scheduling analysis. Hainque et al. [9] use a topological abstraction of the underlying circuit graphs (or syntactic structure of Boolean equations) to derive a fairly rigid component dependency model. A component is assumed executable iff all of its inputs are available; after component execution all of its outputs become defined. This is fine for concurrent execution but too restricted to model single- or multi-threaded execution compositionally. The interface model also does not cover data dependencies and thus cannot deal with dynamic schedules. It also does not support quantitative resource information, either. The causality interfaces of Lee et al. [17] are much more flexible. These are functions associating with every pair of input and output ports an element of a dependency domain D, which expresses if and how an output depends on some input. Causality analysis is then performed by multiplication on the global system matrix. Using an appropriate dioid structure D, one can perform the analyses of Hainque et. al. [9] as well as restricted forms of WCRT. Lee’s interfaces presuppose a fixed static distinction between inputs and outputs and cannot express the difference between an output depending on the joint presence of several values as opposed to depending with each input individually. Similarly, there is no coupling of outputs, e. g., that two outputs always occur together at “the same time.” Thus, they do not support full AND- and OR-type synchronisation dependencies for representing multi-threading and multi-processing. Also, the model does not include data dependency. The work reported here can be seen as an extension of [17] to include such features. In particular, note that our scheduling interfaces can also be used in situations where linear algebra is not applicable, as in the case of network flow problems. Recent works [27, 13] combining network calculus [4, 7] with real-time interfaces are concerned with the compositional modelling of regular execution patterns. Existing interface theories [17, 27, 13], which aim at the verification of resource constraints for real-time scheduling, handle timing properties such as task execution latency, arrival rates, resource utilisation, throughput, accumulated cost of context switches, and so on. The dependency on data and control flow is largely abstracted. For instance, since the task sequences of Henzinger and Matic [13] are independent of each other, their interfaces do not model concurrent forking and joining of threads. The causality expressible there is even more restricted than that by Lee et al. [17] in that it permits only one-to-one associations of inputs with outputs. The interfaces of Wandeler and Thiele [27] for modular performance analysis in real-time calculus are like those of Henzinger and Matic [13] but without sequential composition of tasks and thus do not model control flow. On the other hand, the approaches [27, 13] can describe continuous and higher-level stochastic properties which our interface types cannot. AND- and OR-type synchronisation dependencies are important for synchronous programming since reachability of control nodes in general depends both conjunctively and disjunctively on the presence of data. Also, control branching may be conjunctive (as in multi-threading or concurrent execution) or disjunctive (as in single-threaded code). Moreover, execution may depend on the absence of data (negative triggering conditions), which makes compositional modelling rather a delicate matter in the presence of logical feedback loops. This severely limits the applicability of existing interface models. The assume-guarantee style specification [27, 13] does not address causality issues arising from feedback and negative triggering conditions. The interface automata of Alfaro, Henzinger, Lee, Xiong [1, 15] model synchronous macro-states and assume that all stabilisation processes (sequences of micro-states) can be abstracted into atomic interaction labels. The introduction of transient states [16] alleviates this, but the focus is still on regular (scheduling) behaviour. The situation is different, however, for cyclic systems, in which causality information is needed. Our interface algebra is semantically sound with respect to feedback and indeed supports causality analysis as a special case: A signal A is causal if ◦A ⊕ ¬A can be derived in the type theory of a module. Because of the complications arising from causality issues, there is currently no robust component model for synchronous programming. We believe Michael Mendler 47 that the interface types introduced in this paper, cover new ground towards such a theory. Finally, note that our algebra is not intended as a general purpose interface model such as, e.g., the relational interfaces of Tripakis et al. [26]. While these relational interfaces permit contracts in firstorder logic between inputs and outputs, our interfaces only describe propositional relations. Therefore, our algebra cannot describe the full functional behaviour of data processing (other than by coding it into finite Booleans). Our interfaces are logically restricted to express monotonic scheduling processes and the resource consumption inside synchronous instants. Because we use an intuitionistic realisability semantics (Curry-Howard) we obtain enough expressiveness to deal with causality problems and upperbound scheduling costs. The interface algebra does not aim to cover behavioural aspects of sequences of instants such as in approaches based on temporal logics or the timed interfaces of Alfaro, Henzinger and Stoelinga [2], which build on timed automata. The scheduling problem addressed here is a simpler problem in the sense that it arises afresh within each synchronous step and does not need to carry (e.g., timing) constraints across steps. However, note that our algebra can fully capture finite-state sequential transition functions in the standard way by duplicating propositional state variables s using out(s) and in(s) as seen in Sec. 5. An inter-instant transition (instantaneous, no clock tick) between s1 and s2 is given by the implication out(s1 ) ⊃ ◦in(s2 ) while the intra-instant transition (sequential, upon clock tick) is the weak implication ¬in(s1 ) ⊕ out(s2 ). In this way, we can derive exact state-dependent worst-case bounds across all reachable states of a finite state behaviour. The scheduling algebra in this paper extends [21] in that it not only captures concurrent execution (as in combinational circuits) but also includes the tensor ⊗ for multi-threading. More subtly, while [21] is restricted to properties of activation sequences stable under the suffix preordering, here we consider the much richer lattice of arbitrary sub-sequences. This paper introduces the theory behind [22] which reported on the application to WCRT analysis for Esterel and also provides more detailed information on the modelling in Sec. 5. Acknowledgements. The author would like to thank the anonymous reviewers for their suggestions to improve the presentation. References [1] L. de Alfaro & T. Henzinger (2001): Interface automata. In: Proc. Foundations of Software Engineering, ACM Press, pp. 109–120. [2] L. de Alfaro, Th. Henzinger & Marielle Stoelinga (2002): Timed interfaces. In: Proc. EMSOFT’02. [3] C. André, F. Boulanger, M.-A. Péraldi, J. P. Rigault & G. Vidal-Naquet (1997): Objects and synchronous programming. European Journal on Automated Systems 31(3), pp. 417–432. [4] F. L. Baccelli, G. Cohen, G. J. Olsder & J.-P. Quadrat (1992): Synchronisation and Linearity. John Wiley & Sons. [5] Gérard Berry & Georges Gonthier (1992): The Esterel synchronous programming language: Design, semantics, implementation. Science of Computer Programming 19(2), pp. 87–152. [6] Marian Boldt, Claus Traulsen & Reinhard von Hanxleden (2008): Worst case reaction time analysis of concurrent reactive programs. ENTCS 203(4), pp. 65–79. Proc. SLA++P’07, March 2007, Braga, Portugal. [7] J. Le Boudec & P. Thiran (2001): Network Calculus - A theory of deterministic queuing systems for the internet, Lecture Notes in Computer Science 2050. Springer. [8] Paul Le Guernic, Thierry Goutier, Michel Le Borgne & Claude Le Maire (1991): Programming real time applications with SIGNAL. Proceedings of the IEEE 79(9). 48 An Algebra of Synchronous Scheduling Interfaces [9] Olivier Hainque, Laurent Pautet, Yann Le Biannic & Eric Nassor (1999): Cronos: A separate compilation toolset for modular Esterel applications. In: Jeannette M. Wing, Jim Woodcock & Jim Davies, editors: World Congress on Formal Methods, Lecture Notes in Computer Science 1709, Springer, pp. 1836–1853. [10] Nicolas Halbwachs (1998): Synchronous programming of reactive systems, a tutorial and commented bibliography. In: Tenth International Conference on Computer-Aided Verification, CAV ’98, LNCS 1427, Springer Verlag, Vancouver (B.C.). [11] Nicolas Halbwachs (2005): A synchronous language at work: The story of Lustre. In: Third ACM-IEEE International Conference on Formal Methods and Models for Codesign, MEMOCODE’05, Verona, Italy. [12] D. Harel, A. Pnueli, J. Pruzan-Schmidt & R. Sherman (1987): On the formal semantics of Statecharts. In: LICS ’87, IEEE Computer Society Press, pp. 54–64. [13] Th. Henzinger & S. Matic (2006): An interface algebra for real-time components. In: Proceedings of the 12th Annual Real-Time and Embedded Technology and Applications Symposium (RTAS), IEEE Computer Society, Los Alamitos, CA, USA, pp. 253–266. [14] C. Huizing (1991): Semantics of Reactive Systems: Comparison and Full Abstraction. Ph.D. thesis, Eindhoven Univ. of Technology. [15] E. A. Lee & Y. Xiong (2001): System-level types for component-based design. In: Workshop on Embedded Software EMSOFT 2001, Lake Tahoe, CA, USA. [16] E. A. Lee & Y. Xiong (2004): A behavioral type system and its application in Ptolemy II. Formal Aspects of Computing 13(3), pp. 210–237. [17] E. A. Lee, H. Zheng & Y. Zhou (2005): Causality interfaces and compositional causality analysis. In: Foundations of Interface Technologies (FIT’05), ENTCS, Elsevier. [18] Xin Li, Marian Boldt & Reinhard von Hanxleden (2006): Mapping Esterel onto a multi-threaded embedded processor. In: Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS’06), San Jose, CA. [19] Xin Li & Reinhard von Hanxleden (2010): Multi-threaded reactive programming—The Kiel Esterel processor. IEEE Transactions on Computers . [20] G. Luettgen & M. Mendler (2002): The intuitionism behind Statecharts steps. ACM Transactions on Computational Logic 3(1), pp. 1–41. [21] M. Mendler (2000): Characterising combinational timing analyses in intuitionistic modal logic. The Logic Journal of the IGPL 8(6), pp. 821–853. [22] Michael Mendler, Reinhard von Hanxleden & Claus Traulsen (2009): WCRT algebra and interfaces for Esterel-style synchronous processing. In: Proceedings of the Design, Automation and Test in Europe (DATE’09), Nice, France. [23] Amir Pnueli & M. Shalev (1991): What is in a step: On the semantics of Statecharts. In: TACS ’91: Proceedings of the International Conference on Theoretical Aspects of Computer Software, Springer-Verlag, London, UK, pp. 244–264. [24] Marc Pouzet (2006): Lucid Synchrone, version 3. Tutorial and reference manual. Université Paris-Sud, LRI. Distribution available at: www.lri.fr/∼pouzet/lucid-synchrone. [25] Klaus Schneider (2002): Proving the equivalence of microstep and macrostep semantics. In: TPHOLs ’02: Proceedings of the 15th International Conference on Theorem Proving in Higher Order Logics, SpringerVerlag, London, UK, pp. 314–331. [26] S. Tripakis, B. Lickly, Th. A. Henzinger & E. A. Lee (2009): On relational interfaces. Technical Report UCB/EECS-2009-60, Electrical Enginering and Computer Sciences, Univ. of California at Berkely. [27] E. Wandeler & L. Thiele (2005): Real-time interfaces for interface-based design of real-time systems with fixed priority scheduling. In: Proceedings of the ACM International Conference on Embedded Software (EMSOFT’05).
6cs.PL
arXiv:0912.4877v1 [cs.PL] 24 Dec 2009 Electronic Notes in Theoretical Computer Science 86 No. 2 (2003) 14 pages Typing rule-based transformations over topological collections Julien Cohen 1 LaMI, U.M.R. 8042 CNRS – Université d’Évry Val d’Essonne 523 place des Terrasses de l’Agora 91000 Évry, France Abstract Pattern-matching programming is an example of a rule-based programming style developed in functional languages. This programming style is intensively used in dialects of ML but is restricted to algebraic data-types. This restriction limits the field of application. However, as shown by [9] at RULE’02, case-based function definitions can be extended to more general data structures called topological collections. We show in this paper that this extension retains the benefits of the typed discipline of the functional languages. More precisely, we show that topological collections and the rule-based definition of functions associated with them fit in a polytypic extension of mini-ML where type inference is still possible. 1 Introduction Pattern-matching on algebraic data-types (ADT) allows the definition of functions by cases, a restricted form of rule based programming that is both relevant and powerful to specify function acting on ADTs. ML adopted a restricted form of pattern matching, where only the top-level structure of an ADT is matched against the pattern [15]. Examples of more expressive patterns are given, e.g., by the Mathematica language. However, both ML-like language or Mathematica are restricted to the handling of terms, that is, tree-shaped data structures (sets or multisets handled in Mathematica are represented by terms modulo associativity and commutativity). In [9] and [8] a framework where pattern matching can be expressed uniformly on many different data structures is exhibited. They rely on the notion of topological collection which embeds a neighborhood relation over its elements. The neighborhood relation enables the definition of a general notion of path (a sequential specification of a sub-structure); a pattern is used to specify a path that selects 1 The author is grateful to Olivier Michel and Jean-Louis Giavitto of the MGS Project for their valuable support. Cohen an arbitrary sub-collection to be substituted. This leads to a general functional language where the pattern matching is not limited to ADTs. We show in this paper that the topological collections bring a smooth extension of the Hindley-Milner type system [10][14] with some polytypism [12] and we suggest an extension of the Damas-Milner type inference algorithm that allows to find a type to programs expressed in an extension of mini-ML with topological collections and rule based transformations over them. Section 2 gives a brief description of the topological collections and their transformation; section 3 gives an overview of types in this framework; the types are investigated in section 4 where the typing rules and the inference algorithm are given; several direct extensions of the language are discussed in section 5 and section 6 concludes this paper. 2 Topological Collections and Transformations Topological collections are data structures corresponding conceptually to a mapping from a set of positions into a set of values such that there is a neighborhood relation over the positions. Two values of a collection are said to be neighbors if their positions are neighbors. The sequence is an example of topological collection where the elements have at most a left neighbor and a right neighbor. The NEWS grid which is a generalization of arrays of dimension 2 is another example where each element has at most four neighbors, considering a Von Neumann neighborhood [13]. The notion of neighborhood is a means to embed in the programming language the spatial locality of computations of programs. Many other data structures can be seen from the topological point of view. For example the set and the multi-set (or bag) are topological collections where each element is neighbor of each other element (the set of positions of a set, is the set of the elements itself). See [7] for other examples of topological collections. These data structures come with a rule based style of programming: a rule defines a local transformation by specifying some elements to be matched and the corresponding action. The topological disposition of the matched elements is expressed directly within the pattern of the rule. Thus a collection can be transformed by the simultaneous application of local transformations to non-intersecting matching sub-sets of the collection. The MGS programming language described in [7] and [8] supplies the topological collections as first-class values and transformations as a means to describe rule based functions over collections. The language we work on in our paper is largely inspired by MGS although some features such as the possibility for a collection to contain elements of different types have been left out. In the rest of this section we describe the handling of collections via rules in our restriction of MGS. A rule is written p=>e where p is the pattern and e is the expression that will replace the instances of p. A transformation is a list of rules introduced by the keyword trans. The application of a transformation trans[p1 =>e1 ; p2 =>e2 ] to a 2 Cohen collection c consists in selecting a number of non-intersecting occurrences of p1 in c such that there is no further possible occurrence; then replacing the selected parts by the appropriate elements calculated from e1 ; then selecting a number of nonintersecting occurrences of p2 and replacing them with the appropriate values. The pattern can be a single element x or a single element satisfying a condition x/e where e is a boolean expression; it can also be a two elements pattern x, y such that y is a neighbor of x. Here the comma expresses the neighborhood relation and is not intended to express a tuple. The pattern x/(x = 0), y/(y = 1), z/(z = 2) matches three values such that the first is a 0, the second is a 1, the third is a 2, the second is in the neighborhood of the first and the third is in the neighborhood of the second. The right hand side of the rule is composed of an expression denoting the elements replacing the selected elements. In order to allow the replacement of parts by parts of different size, the value expressed in the right hand side of a rule must be a sequence. The elements of this sequence will substitute the matched elements. Thus we can consider rules replacing sub-parts constituted of a single element with several element, or sub-parts constituted of several elements with one element or even with no element, and so on. A way of building a sequence is using the empty sequence empty seq and the constructor ::. The syntactic shortcut [e] can be used to express e::empty seq. 2.1 Two examples The following two examples show two programs acting respectively on sequences and sets. Sorting a Sequence. A kind of bubble-sort is immediate: trans[ x, y/(y<x) => y :: x :: empty seq ; x => [x] ] This two rules transformation has to be applied on the sequence until a fixpoint is reached. The fixpoint is a sorted sequence. This is not really the bubble-sort because the swapping of elements can happen at arbitrary places; hence an out-of-order element does not necessarily bubble to the top in the characteristic way. We will see in section 4 that the rule x => [x] is required. Eratosthene’s Sieve on a Set. The idea is to apply the transformation on the set of the integers between 2 and n. The transformation replaces an x and an y such that x divides y by x. The iteration until a fixpoint of this transformation results in the set of the prime integers less than n. trans [ x, y/(y mod x = 0) => [x] ; x => [x] ] 3 Cohen 3 Typing the Collections and the Transformations The type of a topological collection is described by two pieces of information: the type of the elements inside the collection and its organization. The former is called its content type and the latter its topology (see [11] for an example of separation between the shape and the data). For example, a set of integers and a set of strings do not have the same content type but have the same topology. Collection types will be denoted by [τ ]ρ where τ is the content type and ρ is the topology. Thus a set of strings will have the type [string]set. The usual notion of polymorphism of ML languages is provided on the content type. For example the cardinal function that returns the number of elements of a set would have the type [α]set → int where α is a free type variable since it can be applied to a set irrespectively of the type of its elements. The nature of the content type does not affect the behavior of the cardinal function, therefore the polymorphism is said to be uniform on the content type. Instead of providing different functions that count the number of elements for each topology, the language provides the function size with the type [α]θ → int where θ is a free topology variable. Functions that accept any kind of topology are said to be polytypic [12]. A way of handling collections is using polytypic operators and constant collections: the constructor operator :: has the type α → [α]θ → [α]θ; the destructors oneof and rest have the type [α]θ → α and [α]θ → [α]θ and are such that for any collection c, oneof(c) and rest(c) make a partition of c (see [3]). The constant collections are empty set, empty seq and so on. Collections can also be handled with transformations. As seen in the previous section, transformations are functions on collections described by rewriting rules. This kind of function is introduced by the keyword trans. For example the function trans [ x=>[x] ] implements the identity over collections and has the type [α]θ → [α]θ. It is the identity because it maps the identity to all the elements of the collection. As we said, the right hand side of a rule must be a sequence because the pattern matched can be replaced by a different number of elements. On some topologies such as the grid, the pattern and the replacement sequence must have the same size. If the sizes are not compatible a structural error will be raised at execution time. These structural errors are not captured by our type system. See [7] for more details on the substitution process in the collections. The map function can be expressed as follows: fun f -> trans [ x => [f x] ] and has the type (α → β) → [α]θ → [β]θ. Unlike in the original MGS language, a collection cannot contain elements of different types. We have chosen to set this restriction to allow to build an inference 4 Cohen e l ::= id | cte | (e, e) | fun x-> e | e e | let id = e in e | trans [ l ] ::= | id => e p ::= id | id/e | id,p | id/e,p p => e ; l Fig. 1. Syntax of the language algorithm in the Damas-Milner style [5]. Allowing such heterogeneous collections would lead to a system with subsumption and union types that would need complex techniques to determine the types of a program. 4 The Language In this section we first describe the syntax of the studied language. Then we describe the type verification rules and finally we give the type inference algorithm that computes the principal type of a program. 4.1 Syntax Topological collections are values manipulated with constants, operators, functions and transformations, no new syntactic construction is needed. For the transformation we have to enrich the syntax of mini-ML [4] as shown in figure 1. The construction p => e is called a rule and a transformation is a syntactic list of rules. In the construction id/e occurring in a pattern, e is called a guard. The last rule of a transformation must be a variable for exhaustiveness purpose. Putting the rule x => [x] in last position of a transformation expresses that all unmatched values are left unmodified. It is not possible to infer a relevant default case for a transformation. For example the rule x => [x] cannot be the default case for a transformation of the type [string]θ → [int]θ. Therefore the default case must be specified explicitly by the programmer. This explains the grammar for the list of rules l which enforces the presence of a last rule of the form id => e matching every remaining element. The expression e in the right hand side provides the appropriate default value. We will use some operators such as :: in an infix position but this syntax can be easily transformed into the one of figure 1. Operators are functional constants of the language. 5 Cohen 4.2 The Type System Types Algebra We enrich the polymorphic type system of mini-ML with the topological collections. The collection type introduces a new kind of construction in types: the topology. From a type point of view, transformations are just functions that act on topological collections without changing their topology, so no new construct is needed for them in the type algebra. Types : Topologies : τ ::= T base type (int, float, bool, string) | α type variables | τ →τ functions | τ ×τ tuples | [τ ]ρ collections ρ ::= R base topology (bag, set, seq, grid, ...) | θ topology variables We give in appendix A the definitions of Lt and Lr which calculate the type variables and the topology variables occurring in a type. Type Schemes A type scheme is a type quantified over some type variables and some topology variables: σ ::= ∀[α1 , . . . , αn ][θ1 , . . . , θm ].τ A type τ is an instance of a type scheme σ = ∀[α1 , . . . , αn ][θ1 , . . . , θm ].τ ′ and we write σ ≤ τ if and only if there are some types τ1 , . . . , τn and some topologies ρ1 , . . . , ρm such that τ = τ ′ [α1 τ1 , . . . , αn τn , θ1 ρ1 , . . . , θm ρm ] . In the following, an environment is a function from identifiers to type schemes. T C is the function that gives the type scheme of the constants of the language. For example T C(::) is ∀[α][θ].α → [α]θ → [α]θ. Lt and Lr are extended to type schemes and calculate the free variables of a type scheme, that is the variables occurring in the type scheme which are not bound by the quantifier. For example if σ is ∀[α1 ][θ1 ].[α1 ]θ1 → [α2 ]θ2 then Lt (σ) is α2 and Lr (σ) is θ2 . Typing Rules The typing rules are nearly the same as the Hindley-Milner rules [10][14]. The differences are that a rule has been added for the transformations and that the notions of instance and the Gen function have been adapted to the type algebra. The Gen function transforms a type into a type scheme by quantifying the variables that are free in the type and that are not bound in the current environment. 6 Cohen The definition of Gen is the following: Gen(τ, Γ) = ∀[α1 , . . . , αn ][θ1 , . . . , θm ].τ with {α1 , . . . , αn } = Lt (τ )\Lt (Γ) and {θ1 , . . . , θm } = Lr (τ )\Lr (Γ). The typing rules are: Γ(x) ≤ τ (var − inst) Γ⊢x:τ T C(c) ≤ τ (const − inst) Γ⊢c:τ Γ ⊢ e1 : τ ′ → τ Γ ⊢ e2 : τ ′ (app) Γ ⊢ e1 e2 : τ Γ ∪ {x : τ1 } ⊢ e : τ2 (f un) Γ ⊢ (fun x → e) : τ1 → τ2 Γ ⊢ e1 : τ1 Γ ∪ {x : Gen(τ1 , Γ)} ⊢ e2 : τ2 (let) Γ ⊢ (let x = e1 in e2 ) : τ2 ˘ ¯ Γ ∪ {xji : τ }(j≤mi ) ∪ {self : [τ ]ρ} ⊢ ei : [τ ′ ]seq (i≤n) ˘ ¯ Γ ∪ {xji : τ }(j≤k) ∪ {self : [τ ]ρ} ⊢ eki : bool (i≤n),(k≤m ) i (trans) m1 mn mn 1 1 1 ′ Γ ⊢ trans [x11 /e11 ,...,xm 1 /e1 =>e1 ;...;xn /en ,...,xn /en =>en ] : [τ ]ρ → [τ ]ρ In the (trans) rule, kn is always equal to 1 and e1n is always equal to true. Inside a rule the self identifier refers to the collection the transformation is applied on. The (trans) rule expresses that a transformation has the type [τ ]ρ → [τ ′ ]ρ if when you suppose that all the xji have the same type τ and that self has the type [τ ]ρ it can be proven that the eji are boolean values and that the ei have the type [τ ′ ]seq. We can see that if self is not used in a transformation, this one will be polytypic since ρ will not be bound to any topology. The following examples show a type verification on a polytypic transformation and on a non-polytypic one. Polytypic Example The following transformation can be proven to be an [int]θ → [int]θ function for any topology θ. trans [ x, y/x>y => x :: y :: (x-y) :: empty seq ; x => [x] ] The proof is given in figure 2a where Γ0 = {x : int; y : int; self : [int]θ}, Γ1 = {x : int; self : [int]θ} and with the following lemmas: Γ ⊢ e1 : int Γ ⊢ e2 : [int]seq Γ ⊢ e1 ::e2 : [int]seq Γ⊢e:τ Γ ⊢ [e] : [τ ]seq Non-Polytypic Example The operator is left acts as a predicate that returns true if the element is at the left extremity of the sequence. Thus it returns false is the element has a left 7 ... ... Γ2 (x) ≤ int T C(not) ≤ bool → bool Γ2 ⊢ not : bool → bool Γ2 ⊢ not(is left x self) : bool Γ2 ⊢ x+(left x self) : int Γ2 ⊢ x : int Γ2 ⊢ not(is left x self) : bool Γ2 ⊢ [x+(left x self)] : [int]seq Γ2 ⊢ [x] : [int]seq ⊢ trans [ x/(not(is left x self))=>[x+(left x self)] ; x=>[x] ] : [int]seq → [int]seq (b) Cohen 8 Fig. 2. Two examples of type verification Γ0 (x) ≤ int ... Γ1 (x) ≤ int ... Γ0 ⊢ x : int Γ0 ⊢ y::(x-y)::empty seq : [int]seq Γ1 ⊢ x : int Γ0 ⊢ x>y : bool Γ0 ⊢ x::y::(x-y)::empty seq : [int]seq Γ1 ⊢ [x] : [int]seq ⊢ trans [ x,y/x>y => x::y::(x-y)::empty seq ; x=>[x] ] : [int]θ → [int]θ Cohen neighbor. It can be used only within a transformation 2 and takes two arguments: the first is a pattern variable and the second is a collection. Similarly, the operator left takes a pattern variable x and a sequence s and returns the left neighbor of x in s. Let us consider the following transformation: trans [ x/(not (is left x self)) => [x+(left x self)] ; x=>[x] ] This transformation does not have the same effect as the following one: trans [ l, x => (l :: l+x :: empty seq) ; x=>[x] ] because in the former, every element x of the sequence except the leftmost one will be replaced by the sum of itself and its left neighbor whereas in the latter, the l element will be replaced by itself and thus will not be increased. For example the former transformation applied to the sequence (1::2::3::4::empty seq) results in (1::3::5::7::empty seq) whereas the application of the latter transformation to the same sequence would result in (1::4::3::7::emty seq). The figure 2b where Γ2 = {x : int; self : [int]seq} proves that the first transformation has the type [int]seq → [int]seq. This transformation cannot be proven to have the type [int]ρ → [int]ρ if ρ 6= seq because left and is left act exclusively on sequences. 4.3 Type Inference The typing rules given in section 4.2 are a means to verify that a program has a given type but this type is a parameter of the verification procedure. We now give the equivalent of the Damas-Milner type inference that enables the full automated type verification since it computes the principal type of a program. The resulting type is said to be principal because every type that can fit the program is an instance of this type. The type inference algorithm is given after the unification procedure. Unification Unifying two types τ1 and τ2 consists in finding a substitution ϕ over the free variables of τ1 and τ2 called the unifier such that ϕ(τ1 ) = ϕ(τ2 ). A substitution is a most general unifier (mgu) for two types τ1 and τ2 if for any unifier ϕ1 of τ1 and τ2 , there is a substitution ϕ2 such that ϕ = ϕ2 ◦ ϕ1 . We give the mgu function that computes the most general unifier of a set of pairs of types denoted by τ1 = τ2 . This function is necessary to the type inference procedure. If mgu fails then there is no unifier for the given types. The difference between our mgu and Damas and Milner’s original mgu is the addition of the case for the collection types. Two collection types are unified by unifying their content types and their topologies. The substitution doing this unifi2 The is left operator is only available in transformations, where the identifiers introduced by the pattern are bound to a position in the collection. Allowing only such identifiers to be arguments of is left allows to remove any ambiguity on the position denoted in the sequence, even if the position contains a value occurring several times. 9 Cohen cation is found as ϕ1 ◦ ϕ2 where ϕ2 unifies the topologies and ϕ1 unifies the content types. The computation of ϕ2 is made by the dedicated mgur function. This function fails when the two topologies are different base topologies since they cannot be unified. The substitution ϕ2 is applied to the content types before computing ϕ1 with mgu. The standard cases of the definition of mgu are:  mgu ∅ = [] mgu {τ = τ } ∪ C) = mgu(C) mgu {α = τ } ∪ C) (if α is not free in τ ) = let ϕ = [α mgu {τ = α} ∪ C) (if α is not free in τ )  mgu {τ1 → τ2 = τ1′ → τ2′ } ∪ C  mgu {τ1 × τ2 = τ1′ × τ2′ } ∪ C = τ ] in mgu(ϕ(C)) ◦ ϕ  mgu {τ1 = τ ′ 1 ; τ2 = τ ′ 2} ∪ C  mgu {τ1 = τ ′ 1 ; τ2 = τ ′ 2} ∪ C = = τ ] in mgu(ϕ(C)) ◦ ϕ let ϕ = [α The new case for the collections is:   mgu {[τ ]ρ = [τ ′ ]ρ′ } ∪ C = let ϕ = mgur (ρ = ρ′ ) in mgu ϕ {τ = τ ′ } ∪ C ◦ ϕ The unification of topologies is defined by: mgur (ρ = ρ) = [] mgur (θ = ρ) = [θ ρ] mgur (ρ = θ) = [θ ρ] Type Inference The type reconstruction algorithm is nearly the same as the Damas-Milner one. The differences are that it uses specialized versions of mgu and Gen functions and that there is a new case for the transformations. It is described here in an imperative way: ϕ is the current substitution and Vt and Vr are sets of free type variables and topology variables. The algorithm is given in figure 3. The case for the transformations consists in unifying the types of all the pattern variables and unifying the types of the right hand side rules together and with a sequence collection type. These unifications have to be made with respect to the guards that are boolean values. If W succeeds it computes the most general type of the program analyzed and this one can be run without type error. If it fails because of an mgu or an mgur failure then the program is ill-typed and might lead to a type error at execution time. 10 Cohen fresh t = fresh r = let α ∈ Vt do Vt Vt \{α} return α let θ ∈ Vr do Vr Vr \{θ} return θ W (Γ ⊢ e) = (* original cases *) If e = x let ∀[α1 , . . . , αn ][θ1 , ..., θm ].τ = Γ(x) let α′1 , . . . , α′n = fresh t, . . . , fresh t ′ = fresh r, . . . , fresh r let θ1′ , . . . , θm return τ [α1 α′1 , . . . , αn α′n , θ1 θ1′ , . . . , θm If e = fun x → e let α = fresh t let τ = W (Γ ∪ x : ∀[ ][ ].α ⊢ e) return α → τ If e = e1 e2 let τ1 = W (Γ ⊢ e1 ) let τ2 = W (Γ ⊢ e2 ) let α = fresh t do ϕ mgu(ϕ(τ1 ) = ϕ(τ2 → α)) ◦ ϕ If e = let x = e1 in e2 let τ1 = W (Γ ⊢ e1 ) let σ = Gen(ϕ(τ1 ), ϕ(Γ)) return W (Γ ∪ {x : σ} ⊢ e2 ) ′ ] θm (* new case for the transformations *) If e = trans [p1 =>e1 ; ...; pn =>en ] let α, β = fresh t, fresh t let θ = fresh r for i = 1..n mi i let id1i /e1i , . . . , idm = pi i /ei for j = 1..mi` let τij = W Γ ∪ {self : [α]θ} ∪ {idki : α}k≤j ⊢ eji ) ` do ϕ mgu {ϕ(τij ) = bool}) ◦ ϕ ´ ` let τi = W Γ ∪ {self : [α]θ} ∪ {idki : α}k≤mi ⊢ ei ` ´ do ϕ mgu {ϕ(τi ) = ϕ([β]seq)} ◦ ϕ return [α]θ → [β]θ Fig. 3. Type inference algorithm 5 Extensions 5.1 Repetition in a Pattern The star * expressing an arbitrary repetition of a sub-pattern during the matching process has been introduced in [9]. The pattern x/(x=0), * as y, z/(z=0) for example can match an arbitrary subcollection such that it contains two 0 and that there is a path between these 0. This means that one can reach the second 0 from the first one only by going from an element to one of its neighbors repetitively. To take the star into account we modify the syntax of the patterns as follows: p ::= q | q, p q ::= id | ∗ as id where q stands for elementary patterns. We have not kept the guards in the elementary patterns in order to keep the 11 Cohen formulas readable but their addition does not lead to new problems. The elements matched by the star are named and can be referred to as a sequence. The star could have been considered as a repetition of a subpattern as in (x,y/x=y)* but we have chosen to restrict the star to the repetition of single elements for the sake of simplicity. Before giving the new typing rule, we introduce a function which gives the type binding corresponding to an elementary pattern: b(q, τ ) is such that b(x, τ ) = (x : τ ) and b(* as x, τ ) = (x : [τ ]seq). This function is used in the trans typing rule which is modified as follows:  Γ ∪ {b(qij , τ )}j≤mi ∪ {self : [τ ]ρ} ⊢ ei : [τ ′ ]seq i≤n Γ ⊢ trans [q11 ,...,q1m1 =>e1 ;...;qn1 ,...,qnmn =>en ] : [τ ]ρ → [τ ′ ]ρ 5.2 (trans′ ) Directions in Patterns In section 4.2 we saw the operator left that returns the left neighbor of an element in a sequence. In the framework of topological collections, a topology can supply several neighborhood operators. For example left and right are the neighborhood operators of the sequence and north and east are neighborhood operators of the grid. Neighborhood operators are also called directions. A direction can be used to refine the patterns: the commas of the pattern can be substituted by a direction to restrict the accepted neighbors for the rest of the pattern. The substituting direction is surrounded with the symbols | and > to sketch a kind of arrow. For example if d is a direction we can use the pattern x |d> y which is a shortcut 3 for x,y/y=(d x self). However, the pattern x |d> y allows faster research of the instances of the pattern in the collection than x,y/y=(d x self). The pattern x |d> y can be typed as x,y/y=(d x self). The Bead-Sort Example The bead-sort is an original way of sorting positive integers presented by [2]. The sorting algorithm considers a column of numbers written in unary basis. Figure 4a shows the numbers 3, 2, 4 and 2 where the beads stand for the digits. The sorting is done by letting the beads fall down as shown on figure 4b. The problem can be represented on a grid of booleans where true stands for a digit and false for the absence of digit as shown on figure 4c. The bead-sort is achieved by iterating the application of the following transformation until a fixpoint is reached: trans [ x/x=false |north> y/y=true => y::x::empty seq ; x=>[x] ] The first rule of this transformation is expressed as 3 The expression y=(d x self) in a guard where y is a pattern variable and d is a direction tests that the values denoted are the same and that their positions in the collection are the same. See the MGS manual [6] for more details. 12 Cohen (3) (2) (2) (2) (4) (3) (2) (4) (a) (b) t t t f f t t t f t t f t f t t t t t f t f t t t t t t (c) f f f t (d) Fig. 4. The Bead-Sort x/x=false , y/(y=true && y=north x self) => y::x::empty seq in order to fit the type system. The result of W on this transformation is [bool]grid → [bool]grid. 5.3 Strategies As far as the rules application strategy guarantees that every element of the collection is matched (this is always possible since the last rule always matches) the type system is not affected. For instance, the MGS language provides several strategies such as higher priority given to the first rules or random application of the rules. 6 Conclusion Including the topological collections and pattern matching programming on these structures in the ML framework allows to bring together a powerful programming language with a rule programming framework common to several other languages. Our algorithm has been tested on MGS programs and has been included in a prototype MGS compiler in order to achieve type-oriented optimizations on the produced code. We believe that the best pattern matching algorithms would be wasted on a dynamically typed language and thus a type inference algorithm is an important step in the development of an efficient compiler for rule based transformations. However some restrictions on the MGS language had to be done in order to keep the simplicity of the Damas-Milner algorithm. We are currently working on a type inference system with union types [1] to account for heterogeneous collections supplied by the MGS language. Finally, we said that an error could occur when a transformation tries to replace a subpart by a part of different shape on topologies as the grid which cannot get out of shape. Such errors are not type errors but some of them could be detected statically with a specific type based analysis. Some research such as [11] manage with this kind of error but the concerned languages do not provide the flexibility of the rule based transformations proposed here. A Free Variables The free variables of a type are the variables occurring in that type. Lt computes the free type variables whereas Lr computes the free topology variables. 13 Cohen Lt (T ) = ∅ Lt (α) = {α} Lt (τ1 → τ2 ) = Lt (τ1 ) ∪ Lt (τ2 ) Lt (τ1 × τ2 ) = Lt (τ1 ) ∪ Lt (τ2 ) Lt ([τ ]ρ) = Lt (τ ) Lr (T ) = ∅ Lr (α) = ∅ Lr (τ1 → τ2 ) = Lr (τ1 ) ∪ Lr (τ2 ) Lr (τ1 × τ2 ) = Lr (τ1 ) ∪ Lr (τ2 ) Lr ([τ ]θ) = {θ} ∪ Lr (τ ) Lr ([τ ]R) = Lr (τ ) The free variables of a type scheme are the non-quantified variables occurring in it: Lt (∀[α1 , . . . , αn ], [θ1 , . . . , θm ].τ ) = Lt (τ )\{α1 , . . . , αn } Lr (∀[α1 , . . . , αn ], [θ1 , . . . , θm ].τ ) = Lr (τ )\{θ1 , . . . , θm } References [1] Aiken, A. and E. Wimmers, Type inclusion constraints and type inference, in: Proceedings of the Seventh ACM Conference on Functional Programming and Computer Architecture, 1993, pp. 31–41. [2] Arulanandham, J. J., C. S. Calude and M. J. Dinneen, Bead-Sort: A natural sorting algorithm, EATCS Bull 76 (2002), pp. 153–162. [3] Buneman, P., S. Naqvi, V. Tannen and L. Wong, Principles of programming with complex objects and collection types, Theoretical Computer Science 149 (1995), pp. 3–48. [4] Clement, D., J. Despeyroux, T. Despeyroux and G. Kahn, A simple applicative language: Mini-ML, in: Proceedings of the ACM conference on LISP and Functional Programming, 1986, pp. 13–27. [5] Damas, L. and R. Milner, Principal type-schemes for functionnal programs, in: Proceedings of the 15’th Annual Symposium on Principles of Programming Languages (1982), pp. 207–212. [6] Giavitto, J.-L. and O. Michel, MGS: a programming language for the transformations of topological collections, Technical Report lami-61-2001, LaMI Université d’Évry Val d’Essonne (2001). [7] Giavitto, J.-L. and O. Michel, MGS: a rule-based programming language for complex objects and collections, in: M. van den Brand and R. Verma, editors, Electronic Notes in Theoretical Computer Science, 59 (2001). [8] Giavitto, J.-L. and O. Michel, Data structure as topological spaces, in: Proceedings of the 3nd International Conference on Unconventional Models of Computation UMC02, 2509, Himeji, Japan, 2002, pp. 137–150, Lecture Notes in Computer Science. [9] Giavitto, J.-L. and O. Michel, Pattern-matching and rewriting rules for group indexed data structures, in: RULE’02 (2002), pp. 55–66. [10] Hindley, J., The principal type scheme of an object in combinatory logic, Transactions of the American Mathematical Society 146 (1969), pp. 29–60. [11] Jay, C. B., A semantics for shape, Science of Computer Programming 25 (1995), pp. 251–283. [12] Jeuring, J. and P. Jansson, Polytypic programming, in: J. Launchbury, E. Meijer and T. Sheard, editors, Advanced Functional Programming, Second International School (1996), pp. 68–114, LNCS 1129. [13] Lisper, B. and P. Hammarlund, On the relation between functional and data-parallel programming languages, in: Proc. of the 6th. Int. Conf. on Functional Languages and Computer Architectures, ACM, 1993, pp. 210–222. [14] Milner, R., A theory of type polymorphism in programming, Journal of Computer and System Sciences 17 (1978), pp. 348–375. [15] Wadler, P., “Efficient compilation of pattern matching,” Prentice-Hall, 1987 Ch. 6 of ”The Implementation of Functionnal Programming Language”, S. L. Peyton Jones. 14
6cs.PL
New efficient algorithms for multiple change-point detection with kernels A. Célissec,e , G. Marota,c , M. Pierre-Jeana,b , G.J. Rigaillb,d a Univ. Lille Droit et Santé EA 2694 - CERIM, F-59000 Lille, France 8071 CNRS - Université d’Evry - INRA Laboratoire Statistique et Génome Evry c Inria Lille Nord Europe Équipe-projet Inria MODAL d Institute of Plant Sciences Paris-Saclay, UMR 9213/UMR1403, CNRS, INRA, Université Paris-Sud, Université d’Evry, Université Paris-Diderot, Sorbonne Paris-Cité e Univ. Lille Sciences et Technologies, CNRS, UMR 8524 - Laboratoire Paul Painlevé, F-59000 Lille, France arXiv:1710.04556v1 [math.ST] 12 Oct 2017 b UMR Abstract Several statistical approaches based on reproducing kernels have been proposed to detect abrupt changes arising in the full distribution of the observations and not only in the mean or variance. Some of these approaches enjoy good statistical properties (oracle inequality, . . . ). Nonetheless, they have a high computational cost both in terms of time and memory. This makes their application difficult even for small and medium sample sizes (n < 104 ). This computational issue is addressed by first describing a new efficient and exact algorithm for kernel multiple change-point detection with an improved worst-case complexity that is quadratic in time and linear in space. It allows dealing with medium size signals (up to n ≈ 105 ). Second, a faster but approximation algorithm is described. It is based on a low-rank approximation to the Gram matrix. It is linear in time and space. This approximation algorithm can be applied to large-scale signals (n ≥ 106 ). These exact and approximation algorithms have been implemented in R and C for various kernels. The computational and statistical performances of these new algorithms have been assessed through empirical experiments. The runtime of the new algorithms is observed to be faster than that of other considered procedures. Finally, simulations confirmed the higher statistical accuracy of kernel-based approaches to detect changes that are not only in the mean. These simulations also illustrate the flexibility of kernel-based approaches to analyze complex biological profiles made of DNA copy number and allele B frequencies. An R package implementing the approach will be made available on github. Keywords: Kernel method, Gram matrix, nonparametric change-point detection, model selection, algorithms, dynamic programming, DNA copy number, allele B fraction 1. Introduction In this paper we consider the multiple change-point detection problem [13] where the goal is to recover abrupt changes arising in the distribution of a sequence of n independent random variables X1 , . . . , Xn observed at respective time t1 < t2 < . . . < tn . Preprint submitted to Elsevier October 13, 2017 State-of-the-art. Many parametric models (Normal, Poisson,. . . ) have been proposed [29, 47, 17]. These models allow detecting different types of changes: in the mean, in the variance and in both the mean and variance (see also [29, 33, 44]). Efficient algorithms and heuristics have been proposed for these models. Some of them scale in O(n log(n)) or even in O(n). In practice, these parametric approaches have proven to be successful for various application fields (see for example [31, 15]). However one of their main drawbacks is their lack of flexibility. For instance, any change of distributional assumption requires the development of a new dedicated inference scheme. By contrast, the recently proposed kernel change-point detection approach [28, 3] is more generic. It has the potential to detect any change arising in the distribution, which is not easily captured by standard parametric models. More precisely in this approach, the observations are first mapped into a Reproducing Kernel Hilbert Space (RKHS) through a kernel function [4]. The difficult problem of detecting changes in the distribution is then recast as simply detecting changes in the mean element of observations in the RKHS, which is made possible using the well-known kernel trick. One practical limitation of this kernel-based approach is its considerable computational cost owing to the use of a n × n Gram matrix combined with a dynamic programming algorithm [6]. More precisely [28] described a dynamic programming algorithm to recover the best segmentation from 1 to Dmax segments. They claim that their algorithm has a O(Dmax n2 ) time complexity. However, the latter is not described in full details and its straightforward implementation is not efficient. First, it requires the storage of a n × n cost matrix (personal communication with the first author of [28] who was kind enough to send us his code). Thus the algorithm has a O(n2 ) space complexity, which is a severe limitation with nowadays sample sizes. For instance analyzing a signal of length n = 105 requires storing a 105 × 105 matrix of doubles, which takes 80 GB. Second, computing the cost matrix is not straightforward. In fact simply using formula (8) of [28] to compute each term of this cost matrix leads to an O(n4 ) time complexity. Contributions. The present paper contains several contributions to the computational aspects and the statistical performance of the kernel change-point procedure introduced by [3]. The first one is to describe a new algorithm to simultaneously perform the dynamic programming step of [28] and also compute the required elements of the cost matrix on the fly. On the one hand, this algorithm has a complexity of order O(Dmax n2 ) in time and O(Dmax n) in space (including both the dynamic programming and the cost matrix computation). We also emphasize that this improved space complexity comes without an increased time complexity. This is a great algorithmic improvement upon the change-point detection approach described by [3] since it allows the efficient analysis of signals with up to n = 105 data-points in a matter of a few minutes on a standard laptop. On the other hand, our approach is generic in the sense that it works for any positive semidefinite kernels. Importantly one cannot expect to exactly recover the best segmentations from 1 to Dmax segments in less than O(Dmax n2 ) without additional specific assumptions on the kernel. Indeed, 2 computing the cost of a given segmentation has already a time complexity of order O(n2 ). It is also noticeable that our algorithm can be applied to other existing strategies such as the so-called ECP [40]. To be specific, we show that the divisive clustering algorithm it is based on and that provides an approximate solution with a complexity of order O(n2 ) in time and space can be replaced by our algorithm that provides the exact solution with the same time complexity and reduced memory complexity. Our second contribution is a new algorithm dealing with larger signals (n > 105 ) based on a low-rank approximation to the Gram matrix. This computational improvement is possible at the price of an approximation. It returns approximate best segmentations from 1 to Dmax segments with a complexity of order O(Dmax p2 n) in time and O((Dmax + p)n) in space, where p is the rank of the approximation. The last contribution of the paper is the empirical assessment of the statistical performance of the KCP procedure introduced by [3]. This empirical analysis is carried out in the biological context of detecting abrupt changes from a two-dimensional signal made of DNA copy numbers and allele B fractions [35]. The assessment is done by comparing our approach to state-of-the-art alternatives on resampled real DNA copy number data [45, 40]. This illustrates the versatility of the kernel-based approach. To be specific this approach allows the detection of changes in the distribution of such complex signals without explicitly modeling the type of change we are looking for. The remainder of the paper is organized as follows. In Section 2, we describe our kernel-based framework and detail the connection between detecting abrupt changes in the distribution and model selection as described in [3]. A slight generalization of the KCP procedure [3] is also derived in Section 2.5 by introducing a new parameter ` encoding an additional constraint on the minimal length of any candidate segment. This turns out to be particularly useful in low signal-to-noise ratio settings. The versatility of this kernel-based framework is emphasized in Section 2.6 where it is shown how the ECP approach [40] can be rephrased in terms of kernels. Our main algorithmic improvements are detailed and justified in Section 3. We empirically illustrate the improved runtime of our algorithm and compare it to the ones of ECP and RBS in Section 3.1.3. In Section 3.2 we detail our faster (but approximate) algorithm used to analyze larger profiles (n > 105 ). It is based on the combination of a low-rank approximation to the Gram matrix and the binary segmentation heuristic [53]. An empirical comparison of the runtimes of the exact and approximate algorithms is provided in Section 3.2.3. Finally, Section 4 illustrates the statistical performance of our kernel-based change-point procedure in comparison with state-of-the-art alternatives in the context of biological signals such as DNA copy numbers and allele B fractions [35]. 2. Kernel framework In this section we recall the framework of [28] where detecting changes in the distribution of a complex signal is rephrased as detecting changes of the mean element of a sequence of points in a 3 Hilbert space. Then we detail the so-called KCP (Kernel Change-point Procedure) [3], which has been proved to be optimal in terms of an oracle inequality. 2.1. Notation Let X1 , X2 , . . . , Xn ∈ X be a time-series of n independent random variables, where X denotes any set assumed to be separable [19] throughout the paper. Let k : X ×X → R denote a symmetric positive semi-definite kernel [4], and H be the associated reproducing kernel Hilbert space (RKHS). We refer to [11] for an extensive presentation about kernels and RKHS. Let us also introduce the canonical feature map Φ : X → H defined by Φ(x) = k(x, ·) ∈ H, for every x ∈ X . This canonical feature map allows to define the inner product on H from the kernel k, by ∀x, y ∈ X , hΦ(x), Φ(y)iH = k(x, y). (1) The asset of kernels. One main advantage of kernels is to enable dealing with complex data of any type provided a kernel can be defined. In particular no vector space structure is required on X . For instance X can be a set of DNA sequences, a set of graphs or a set of distributions to name but a few examples (see [24] for various instances of X and related kernels). Therefore, as long as a kernel k can be defined on X , any element x ∈ X is mapped, through the canonical feature map Φ, to an element of the Hilbert space H. This provides a unified way to deal with different types of (simple or complex) data. Then for every index 1 ≤ t ≤ n, let us note Yt = Φ(Xt ) ∈ H. (2) From now on, we will only consider the following sequence Y1 , . . . , Yn ∈ H of independent Hilbertvalued random vectors. The kernel trick. As a space of functions from X to R, the RKHS H can be infinite dimensional. From a computational perspective one could be worried that manipulating such objects is computationally prohibitive. However this is not the case and our algorithm relies on the so-called kernel trick, which consists in translating any inner product in H in terms of the kernel k by use of Eq. (1). For every 1 ≤ i, j ≤ n, it results hYi , Yj iH = k(Xi , Xj ) = Ki,j , where Ki,j denotes the (i, j)-th coefficient of the n × n Gram matrix K = [ k(Xi , Xj ) ]1≤i,j≤n . 2.2. Detecting changes in the distribution using kernels Let us consider the model introduced by [3], which connects every Yt to its “mean” µ?t ∈ H by ∀ 1 ≤ t ≤ n, Yt = Φ(Xt ) = µ?t + t ∈ H, (3) where µ?t denotes the mean element associated with the distribution PXt of Xt , and t = Yt − µ?t . Let us also recall [38] that if X is separable and E [ k(Xt , Xt ) ] < +∞, then µ?t exists and is defined as the unique element in H such that ∀ f ∈ H, hµ?t , f iH = E hΦ(Xt ), f iH . 4 (4) For characteristic kernels [50], a change in the distribution of Xt implies a change in the mean element µ?t , that is ∀ 1 ≤ i 6= j ≤ n, PXi 6= PXj ⇒ µ?i 6= µ?j , (5) the converse implication being true by definition of µ?t in Eq. (4). The idea behind kernel changepoint detection [3] is to translate the problem of detecting changes in the distribution into detecting changes in the mean of Hilbert-valued vectors. Remark 1. When considering X ⊂ Rq for some integer q > 0, several classical kernels are characteristic. For instance, • The Gaussian kernel: k(x, y) = e−kx−yk 2 /δ , with x, y ∈ Rq and δ > 0, • The Laplace kernel: k(x, y) = e−kx−yk/δ , with x, y ∈ Rq and δ > 0, • The exponential kernel: k(x, y) = e−hx,yiq /δ , with x, y ∈ Rq and δ > 0, where k·k and h·, ·iq respectively denote the usual Euclidean norm and inner product in Rq . The energy-based kernel discussed in Section 2.6 is also a characteristic kernel (see Lemma 1 in [41]). However, with more general sets X , building a characteristic kernel is challenging as illustrated by [50] and [14]. Let us also notice that the procedure developed by [3] can be seen as a “kernelized version” of the procedure proposed by [37], which was originally designed to detect changes in the mean of real-valued variables. 2.3. Statistical framework From Eq. (5) it results that any sequence of abrupt changes in the distribution along the ∗ time corresponds to a sequence of D∗ true change-points 1 = τ1∗ < τ2∗ < . . . < τD ∗ ≤ n (with ∗ τD ∗ +1 = n + 1 by convention) such that µ∗1 = . . . = µ∗τ1∗ −1 6= µ∗τ1∗ = . . . = µ∗τ2∗ −1 6= . . . 6= µ∗τ ∗ ∗ = . . . = µ∗n . D ∗ In other words we get that µ = (µ∗1 , . . . , µ∗n )0 n ∈ H is piecewise constant. From a set of D candidate change-points 1 = τ1 < . . . < τD ≤ n, let τ be defined by τ = (τ1 , τ2 , . . . , τD−1 , τD ) , with the convention τ1 = 1 and τD+1 = n + 1. With a slight abuse of notation, we also call τ the segmentation of {1, . . . , n} associated with the change-points 1 = τ1 < . . . < τD ≤ n. The 0 0 estimator µ̂τ = (µ̂τ1 , . . . , µ̂τn ) ∈ Hn of µ∗ = (µ∗1 , . . . , µ∗n ) proposed by [3] is defined by ∀ 1 ≤ i ≤ D, ∀ t ∈ {τi , . . . , τi+1 − 1} , µ̂τt = τi+1 −1 X 1 Yt0 . τi+1 − τi 0 t =τi τ The performance of µ̂ is measured by the quadratic risk: " n # h i X τ ∗ τ 2 ∗ τ 2 R(µ̂ ) = E kµ − µ̂ kH,n = E kµi − µ̂i kH , i=1 where k·kH denotes the norm in the Hilbert space H. 5 2.4. Model selection If the signal-to-noise ratio is small, [3] emphasized that all true change-points cannot be recovered without including false change-points. This leads them to define the best segmentation τ ∗ (for a finite sample size) as τ ∗ = arg min kµ∗ − µ̂τ kH,n , τ ∈Tn where Tn denotes the collection of all possible segmentations τ of {1, . . . , n} with at most Dmax segments. When the signal-to-noise ratio is large enough, τ ∗ coincides with the true segmentation. As a surrogate to the previous unknown criterion, [3] optimize the following penalized criterion   n o n−1 τ 2 τ̂ = arg min kY − µ̂ kH,n + pen(τ ) , with pen(τ ) = c1 Dτ + c2 log , (6) D−1 τ ∈Tn where Y = (Y1 , . . . , Yn )> ∈ Rn , c1 , c2 > 0 are constants to be fixed, and Dτ denotes the number of segments of the segmentation τ . Since this penalty only depends on τ through Dτ , optimizing (6) can be formulated as a two-step procedure. The first step consists in solving: ∀ 1 ≤ D ≤ Dmax , 2 τ̂D = arg min kY − µ̂τ kH,n , (7) τ ∈TD where TD denotes the set of segmentations with D segments. This optimization problem, which is usually solved by dynamic programming [6, 47], is computationally hard since the cardinality of  n−1 TD is D−1 . The second step is to straightforwardly optimize: D̂ = arg min 1≤D≤Dmax n o 2 kY − µ̂τ̂D kH,n + pen(τ̂D ) and τ̂ = τ̂D̂ . (8) The right-most term in the penalty (6) accounts for the number of candidate segmentations with D segments (see the comments of Theorem 2 in [3]). Intuitively this term balances the trend of the estimator (7) to overfit because of the large number of candidate segmentations. Remark 2. It is important to notice that the above two-step procedure depends on the hyperparameter Dmax , which is the maximum number of segments of the candidate segmentations. In fact choosing an appropriate Dmax is related to the calibration of constants c1 and c2 in the penalty term of (6). Since the optimal values of c1 and c2 depend (at least) on the variance of the signal at hand, they have to be calibrated in a data-driven way. Here they have been calibrated by using the so-called slope heuristic technique described in [3] (see also the numerical experiments in Section 4 for more details). In particular Dmax has to be chosen large enough to make the slope heuristic work well. Given some prior knowledge of an adequate range of values for D taking Dmax to be 10 to 20 times larger than that seems to work well in practice. Typically for copy number data (see Section 4.1.1) one rarely expect more than 10 change-points per chromosome and taking Dmax ≈ 100 or 200 often make sense. From a theoretical point of view, this model selection procedure has been proved to be optimal in terms of an oracle inequality by [3]. This is the usual non-asymptotic optimality result for model 6 selection procedures [12]. This procedure has also been proved to provide consistent estimates of the change-points [23]. However, from a computational point of view, the first step (i.e. solving Eq. (7)) remains challenging. Indeed existing dynamic programming algorithms are time and space consuming when used in the kernel framework as it will be clarified in Section 3.1.1. The main purpose of the present paper is to provide a new computationally efficient algorithm to solve Eq. (7). Our new algorithm has a reduced space and time complexity and allows the analysis of signals larger than n = 104 . 2.5. Low signal-to-noise and minimal length of a segment In settings where the signal-to-noise ratio is weak (see for instance Figure 4 where the tumor percentage is low) change-point detection procedures are more likely to put changes in noisy regions. This results in overfitting and meaningless small segments [1]. A common solution is to include a constraint on the minimum length ` of segments. For instance by default ECP enforces that the estimated segmentation has segments with at least ` = 30 points [32]. One important side effect of this constraint on ` is that the total number of candidate segmentations with D segments quickly decreases with `. Therefore the penalty in (6) has to be modified. The following lemma gives the cardinality of this set of segmentations. Lemme 1. Let Tn` (D) denote the set of segmentations of (1, . . . , n) in exactly D ≥ 1 segments such that the length of each segment is at least ` ≥ 1. Then the cardinality of Tn` (D) satisfies    n − D(` − 1) − 1 Card Tn` (D) = . D−1 Let us notice that if ` = 1, one recovers the usual cardinality that is used in the penalty (see Eq. (6)). As an illustration of the influence of the constraint on `, let us consider the set-up where n = 100, D = 10, and ` = 10. Then the size of the unconstrained set of segmentations with 10 1 10 segments T100 (10) = T100 (10) is Card (T100 (10)) ≈ 1.7 · 1012 , whereas the constrained set T100 (10) is smaller since its cardinality is equal to 1. Proof of Lemma 1. The proof consists in showing that there is a one-to-one mapping between the set Tn` (D) of segmentations of (1, . . . , n) with D segments of length at least ` ≥ 1, and the set Sn` (D) of segmentations of (1, . . . , n − D(` − 1)) with D (non-empty) segments. Let us consider one segmentation τ ∈ Tn` (D). Since each segment of τ is of length at least `, let us remove ` − 1 points from the left edge of each of the D segments. Then the resulting segmentation belongs to Sn` (D). Conversely, take one segmentation τ ∈ Sn` (D). Then each segment of τ contains at least one point. Adding ` − 1 points to each segment (from the left edge) clearly provides a segmentation with D segments of length at least `. This allows to conclude. This leads to the following generalized change-points detection procedure involving a constraint on the minimum length ` ≥ 1 of each segment. 7 Step 1: Solve 2 ` τ̂D = arg min kY − µ̂τ kH,n , ∀ 1 ≤ D ≤ Dmax , (9) τ ∈Tn` (D) where Tn` (D) denotes the set of segmentations with D segments of length at least ` ≥ 1. Step 2: Find  ` D̂ = arg min ` τ̂D Y − µ̂ D where pen` (τ ) = c1 Dτ + c2 log  2 H,n n−Dτ (`−1)−1 Dτ −1 +  ` pen` (τ̂D ) ` and τ̂ ` = τ̂D̂ `, (10) . Let us emphasize that this generalized procedure, including this additional parameter ` ≥ 1, is very similar the previous one. The optimization step of Eq. (9) is performed by dynamic programming up to a minor change of implementation. The optimization of the second step (10) remains unchanged except it involves a slightly different penalty shape. The tuning of the constant c1 and c2 is still made by the slope heuristic (see Section 4). 2.6. A link between kernels and energy-based distances Note that the kernel-based framework developed in Sections 2.1–2.3 is very general. Various existing procedures can be rephrased in this framework by use of a particular kernel. For example the procedure of [37], which is devoted to the detection of changes in the mean of a one-dimensional real-valued signal, reduces to ours by use of the linear kernel. More interestingly the procedure called ECP developed by [40] and that relies on an energy-based distance to detect changes in multivariate distributions, can also be integrated into our framework using a particular kernel as explained in what follows. α For every α ∈ (0, 2), let us define ρα (x, y) = kx − yk , where x, y ∈ Rq and k·k denotes the Euclidean norm on Rq . Then ρα is a semimetric of negative type [10], and for any independent random variables X, X 0 , Y, Y 0 ∈ Rd with respective probability distributions satisfying PX = PX 0 and PY = PY 0 , [40] introduce the energy-based distance: E(X, Y ; α) = 2E [ ρα (X, Y ) ] − E [ ρα (X, X 0 ) ] − E [ ρα (Y, Y 0 ) ] , (11) with the assumption that max (E [ ρα (X, X 0 ) ] , E [ ρα (X, Y ) ] , E [ ρα (Y, Y 0 ) ]) < +∞. Then following [48] and for every x0 ∈ Rd , we define kαx0 (x, y) = 1 [ ρα (x, x0 ) + ρα (y, x0 ) − ρα (x, y) ] , 2 (12) 0 which is a positive semi-definite kernel leading to an RKHS Hα . Plugging this in Eq. (11), one 8 can easily check that E(X, Y ; α) = 2E [ ρα (X, x0 ) + ρα (Y, x0 ) − 2kαx0 (X, Y ) ] − E [ ρα (X, x0 ) + ρα (X 0 , x0 ) − 2kαx0 (X, X 0 ) ] − E [ ρα (Y, x0 ) + ρα (Y 0 , x0 ) − 2kαx0 (Y, Y 0 ) ] = 2E [ kαx0 (X, X 0 ) + kαx0 (Y, Y 0 ) − 2kαx0 (X, Y ) ] α = 2 µα PX − µPY 2 H0α , α 0 where µα PX , µPY ∈ Hα respectively denote the mean elements of the distributions PX and PY , and 0 k·kH0α is the norm in Hα . An important consequence of this derivation is that the exact and approximation algorithms described in Section 3 immediately apply to procedures relying on the optimization of the energybased distance E(X, Y ; α). This is all the more noticeable as our exact algorithm has a lower memory complexity than the approximate optimization algorithm of ECP (with a similar time complexity). Therefore, for the same computational time, our exact optimization algorithm could replace the approximate algorithm used in ECP. One can also emphasize that our approximate algorithm which is even faster could also be used (see its description in Section 3.2). This particular energy-based kernel, which is a characteristic kernel, has been involved in our simulation experiments as well (Section 4.2.1). 3. New algorithms In this section we first show how to avoid the preliminary calculation of the cost matrix required by [28] to apply dynamic programming. The key idea is to compute the elements of the cost matrix on the fly when they are required by the dynamic programming algorithm. Roughly, this can be efficiently done by reordering the loops involved in Algorithm 1 proposed in [28]. This leads to the new exact Algorithm 3. It has a reduced space complexity of order O(n) compared to O(n2 ) for the one used in [28]. Note that including the constraint (introduced in Section 2.5) on the segment sizes mostly change the index of the for loops in Algorithm 3. We choose to describe the algorithm in the unconstrained version (7) to ease the understanding. Second, we provide a faster but approximation algorithm (Section 3.2), which enjoys a smaller complexity of order O(Dmax n) in time. It combines a low-rank approximation to the Gram matrix and the use of the binary segmentation heuristic (Section 3.2.2). This approximation algorithm allows the analysis of very large signals (n ≥ 106 ). 3.1. New efficient algorithm to recover the best segmentation from the Gram matrix As exposed in Section 2.4, the main computational cost of the change-point detection procedure results from Eq. (7), that is recovering the best segmentation with 1 ≤ D ≤ Dmax segments and 9 solving 2 LD,n+1 = min kY − µ̂τ kH,n (best fit to the data) τ ∈TD 2 m̂D = arg min kY − µ̂τ kH,n (best segmentation) (13) τ ∈TD for every 1 ≤ D ≤ Dmax , where TD denotes the collection of segmentations of {1, . . . , n} with D segments. This challenging step involves the use of dynamic programming [9, 7], which provides the exact solution to the optimization problem (13). Let us first provide some details on the usual way dynamic programming is implemented. 3.1.1. Limitations of the standard dynamic programming algorithm for kernels Let τ denote a segmentation in D segments (with the convention that τ1 = 1 and τD+1 = n+1). For any 1 ≤ d ≤ D, the segment {τd , . . . , τd+1 − 1} of the segmentation τ has a cost that is equal to τd+1 −1 Cτd ,τd+1 = X k(Xi , Xi ) − i=τd τd+1 −1 X 1 τd+1 − τd i=τ d τd+1 −1 X k(Xi , Xj ). (14) j=τd Then the cost of the segmentation τ is given by kY − µ̂τ k2H,n = D X Cτd ,τd+1 , d=1 which is clearly segment additive [28, 3]. Dynamic programming solves (13) for all 1 ≤ D ≤ Dmax by applying the following update rules ∀ 2 ≤ D ≤ Dmax , LD,n+1 = min{ LD−1,τ + Cτ,n+1 }, τ ≤n (15) which exploits the property that the optimal segmentation in D segments over {1, . . . , n} can be computed from optimal ones with D − 1 segments over {1, . . . , τ } (τ ≤ n). Making the key assumption that the cost matrix {Ci,j }1≤i,j≤n+1 has been stored, we can compute LD,n+1 with Algorithm 1. Algorithm 1 Basic use of Dynamic Programming 1: for D = 2 to Dmax do 2: 3: 4: 5: for τ 0 = D to n do LD,τ 0 +1 = minτ ≤τ 0 { LD−1,τ + Cτ,τ 0 +1 } end for end for This algorithm is used by [28] and suffers two main limitations. First it assumes that the Cτ,τ 0 have been already computed, and does not take into account the computational cost of its calculation. Second, it stores all Cτ,τ 0 in a O(n2 ) matrix, which is memory expensive. A quick inspection of the algorithm reveals that the main step at Line 3 requires O(τ 0 ) operations (assuming the Ci,j s have been already computed). Therefore, with the two for loops we get 10 a complexity of O(Dmax n2 ) in time. Note that without any particular assumption on the kernel 2 k(·, ·), computing kY − µ̂τ kH,n for a given segmentation τ is already of order O(n2 ) in time since it involves summing over a quadratic number of terms of the Gram matrix (see Eq. (14)). Therefore, there is no hope to solve (13) exactly in less than quadratic time without additional assumptions on the kernel. From Eq. (14) let us also remark that computing each Ci,j (1 ≤ i < j ≤ n) naively requires itself a quadratic number of operations. Computing the whole cost matrix would require a complexity O(n4 ) in time. Taking this into account, the dynamic programming step (Line 3 of Algorithm 1) is not the limiting factor and the overall time complexity of Agorithm 1 is O(n4 ). Finally, let us emphasize that this high computational burden is not specific of detecting changepoints with kernels. It is rather representative of most learning procedures based on reproducing kernels and the associated Gram matrix [8]. 3.1.2. Improved use of dynamic programming for kernel methods Reducing space complexity. From Algorithm 1, let us first remark that each Cτ,τ 0 is used several times along the algorithm. A simple idea to avoid that is to swap the two for loops in Algorithm 1. This leads to the following modified Algorithm 2, where each column C·,τ 0 +1 of the cost matrix is only used once unlike in Algorithm 1. Algorithm 2 Improved space complexity 1: for τ 0 = 2 to n do 2: 3: 4: 5: for D = 2 to min(τ 0 , Dmax ) do LD,τ 0 +1 = minτ ≤τ 0 { LD−1,τ + Cτ,τ 0 +1 } end for end for Importantly swapping the two for loop does not change the output of the algorithm and does not induce any additional calculations. Furthermore, at step τ 0 of the first for loop we do not need the whole n × n cost matrix to be stored, but only the column C·,τ 0 +1 of the cost matrix. This column is of size at most O(n). Algorithm 2 finally requires storing coefficients {Ld,τ }1≤d≤D, 2≤τ ≤n that are computed along the algorithm as well as successive column vectors {C·,τ }2≤τ ≤n (of size at most n) of the cost matrix. This leads to an overall complexity of O(Dmax n) in space. The only remaining problem is to compute these successive column vectors efficiently. Let us recall that a naive implementation is prohibitive: each coefficient of the column vector can be computed in O(n2 ), which would lead to O(n3 ) to get the entire column. Iterative computation of the columns of the cost matrix. The last ingredient of our final exact algorithm is the efficient computation of each column vector {C·,τ }2≤τ ≤n . Let us explain how to iteratively compute each vector in linear time. 11 First it can be easily observed that Eq. (14) can be rephrased as follows Cτ,τ 0 = 0 τX −1  i=τ where Dτ,τ 0 = Pτ 0 −1 i=τ 0 Ai,τ 0 k (Xi , Xi ) − 0 τ −τ  = Dτ,τ 0 τ −1 1 X − 0 Ai,τ 0 , τ − τ i=τ k (Xi , Xi ) and Ai,τ 0 = −k(Xi , Xi ) + 2 0 τX −1 k(Xi , Xj ). j=i Second, both Dτ,τ 0 and {Ai,τ 0 }i≤τ 0 can be iteratively computed from τ 0 to τ 0 + 1 by use of the two following equations: Dτ,τ 0 +1 = Dτ,τ 0 + k(Xτ 0 , Xτ 0 ), Ai,τ 0 +1 = Ai,τ 0 + 2k(Xτ 0 , Xτ 0 ), ∀i ≤ τ 0 , and with Aτ 0 +1,τ 0 +1 = −k(Xτ 0 +1 , Xτ 0 +1 ). Therefore, as long as computing k(xi , xj ) requires O(1) operations, updating from τ 0 to τ 0 + 1 requires O (τ 0 ) operations. Remark 3. Note that for many classical kernels, computing k(xi , xj ) is indeed O(1) in time. If xi ∈ Rq with q a positive integer being negligible with respect to other influential quantities such as Dmax and n, several kernels such as the Gaussian, Laplace, or χ2 ones lead to a O(q) = O(1) time complexity for evaluating k(xi , xj ). By contrast in case where q is no longer negligible, the resulting time complexity is multiplied by a factor q, which corroborates the intuition that the computational complexity increases with the “complexity” of the objects in X . This update rule leads us to the following Algorithm 3, where each column C·,τ 0 +1 in the first for loop is computed only once: Algorithm 3 Improved space and time complexity (Kernseg) 1: for τ 0 = 2 to n do 2: Compute the (τ 0 + 1)-th column C·,τ 0 +1 from C·,τ 0 3: for D = 2 to min(τ 0 , Dmax ) do LD,τ 0 +1 = minτ ≤τ 0 {LD−1,τ + Cτ,τ 0 +1 } 4: end for 5: 6: end for From a computational point of view, each step of the first for loop in Algorithm 3 requires O(τ 0 ) operations to compute C·,τ 0 +1 and at most O(Dmax τ 0 ) additional operations to perform the dynamic programming step at Line 4. Then the overall complexity is O(Dmax n2 ) in time and O(Dmax n) in space. This should be compared to the O(Dmax n4 ) time complexity of the naive calculation of the cost matrix and to the O(n2 ) space complexity of the standard Algorithm 1 from [28]. 12 3.1.3. Runtimes comparison to other implementations The purpose of the present section is to perform the comparison between Algorithm 3 and other competitors to illustrate their performances as the sample size increases with Dmax = 100. The first comparison has been carried out between Algorithm 3 and the naive quartic computation of the cost matrix (Algorithm 1). These two algorithms have been implemented in C and packaged in R. Results for these algorithms are reported in Figure 1 (Left). Unsurprisingly, our quadratic algorithm (called Kernseg) is faster than a quartic computation of the cost matrix (called KCP) even for very small sample sizes (n < 320). Second, we also compared the runtime of Kernseg (Algorithm 3) with that of ECP discussed in Section 2.6 implemented in the R-package [32] (see the middle panel of Figure 1). Since ECP is based on the binary segmentation heuristic applied to an energy-based distance, its worst-case complexity is at most O(Dmax n2 ) in time, which is the same as that of Kernseg. Note also that the native implementation of ECP involves an additional procedure relying on permutations to choose the number of change-points. If B denotes the number of permutations, the induced complexity is then O(BDmax n2 ) in time. To be fair, we compared our approach and ECP with and without the permutation layer. Finally it is also necessary to emphasize that unlike Kernseg, ECP does not provide the exact but only an approximate solution to the optimization problem (13). Results are summarized in Figure 1 (Middle). It illustrates that our exact algorithm (Kernseg) has a quadratic complexity similar to that of ECP with and without permutations. Our algorithm is the overall fastest one even for small sample size (n < 1 000). Although this probably results from implementation differences, it is still noteworthy since Kernseg is exact unlike ECP. Finally, Figure 1 (Right) illustrates the worse memory use of ECP (with and without any permutations) as compared to that of the exact KS.Gau (Kernseg used with the Gaussian kernel). ECP has an O(n2 ) space complexity, while KS.Gau is O(n). For n larger than 104 the quadratic space complexity of ECP is a clear limitation since several Gb of RAM are required. 3.2. Approximating the Gram matrix to speed up the algorithm In Section 3.1.2, we described an improved algorithm called Kernseg, which carefully combines dynamic programming with the computation of the cost matrix elements. This new algorithm (Algorithm 3) provides the exact solution to the optimization problem given by Eq. (13). However without any further assumption on the underlying reproducing kernel, this algorithm only achieves the complexity O(n2 ) in time, which is a clear limitation with large scale signals (n ≥ 105 ). Note also that this limitation results from the use of general positive semi-definite kernels (and related Gram matrices) and cannot be improved by existing algorithms to the best of our knowledge. For instance, the binary segmentation heuristic [22], which is known to be computationally efficient for parametric models, suffers the same O(n2 ) time complexity when used in the reproducing kernel framework (see Section 3.2.2). Let us remark however that for some particular kernels it is possible to reduce this time complexity. For example for the linear one k(x, y) = hx, yiRd , x, y ∈ Rd , one can use the following 13 1 2 ECP ECPnoPerm KS.Gau 2 400 6 3 1 2 2 1 40 2 200 4 time in seconds 80 60 2 Memory in Mo 2 300 100 8 120 10 ECP ECPnoPerm KS.Gau 3 1 2 2 2 2 20 3 1 2 2 150 1 200 250 1 1 1 300 350 2 3 11 22 21 21 1 21 0 1000 2 2 1 2 1 3 32 2 31 2 31 2 31 2 1 3 1 21 0 1 0 2 1 2 1 100 2 0 time in seconds KernSeg and ECP (Memory) 600 KernSeg and ECP (Time) 2 500 KernSeg and KCP KS.Gau quarticKCP 2000 3000 n 4000 5000 6000 7000 0 1000 2 1 2 1 1 1 1 1 1 2000 3000 4000 5000 6000 7000 n n Figure 1: (Left) Runtime in seconds of Algorithm 3 as a function of the length of the signal (n) for Dmax = 100. (1-red) and a quartic computation of the cost matrix (2-violet). (Middle) Runtime in seconds of Algorithm 3 as a function of the length of the signal (1-red) and of ECP without permutation (2-blue) and ECP with the default number of permutations (3-green). (Right) Memory in mega-octet of Algorithm 3 as a function of the length of the signal (1-red) and of ECP without permutation (2-blue) and ECP with the default number of permutations (3-green). The performances of ECP with or without permutation are exactly the same. trick * X 1≤i6=j≤n k(Xi , Xj ) = X 1≤i≤n Xi , n X + Xj − Xi j=1 = n X 2 Xi − i=1 n X 2 kXi k , (16) i=1 where k·k denotes the Euclidean norm in Rd . The purpose of the present section is to describe a versatile strategy (i.e applicable to any kernel) relying on a low-rank approximation to the Gram matrix [52, 49, 21]. This approximation allows to considerably reduce the computation time by exploiting (16). Note however that the resulting procedure achieves this lower time complexity at the price of only providing an approximation to the exact solution to (13) (unlike the algorithm described in Section 3.1.2). 3.2.1. Low-rank approximation to the Gram matrix The main idea is to follow the same strategy as the one described by [20] to derive a low-rank approximation to the Gram matrix K = {Ki,j }1≤i,j≤n , where Ki,j = k(Xi , Xj ). Assuming K has rank rk(K)  n, we could be tempted to compute the best rank approximation to K by computing the rk(K) largest eigenvalues (and corresponding eigenvectors) of K. However such computations induce a O(n3 ) time complexity which is prohibitive. Instead, [20] suggest applying this idea on a square sub-matrix of K with size p  n. For any subsets I, J ⊂ {1, . . . , n}, let KI,J denote the sub-Gram matrix with respectively row and column indices in I and J. Let Jp ⊂ {1, . . . , n} denote such a subset with cardinality p, and consider the sub-Gram matrix KJp ,Jp which is of rank r ≤ p. Further assuming r = p, the best rank p approximation to KJp ,Jp is KJp ,Jp itself. This leads to the final approximation to the Gram Matrix 14 K [20, 8] by e = KI ,J K+ K n p Jp ,Jp KJp ,In , where In = {1, . . . , n}, and K+ Jp ,Jp denotes the pseudo-inverse of KJp ,Jp . Further considering the SVD decomposition of KJp ,Jp = U0 ΛU, for an orthonormal matrix U, we can rewrite e = Z0 Z, K with Z = Λ−1/2 U KJp ,In ∈ Mp,n (R). Note that the resulting time complexity is O(p2 n), which is smaller than the former O(n3 ) as long √ as p = o( n). This way, columns {Zi }1≤i≤n of Z act as new p-dimensional observations, and each e i,j can be seen as the inner product between two vectors of Rp , that is K e i,j = Z 0 Zj . K i (17) The main interest of this approximation is that, using Eq. (16), computing the cost of a segment of length t has a complexity O(t) in time unlike the usual O(t2 ) that holds with general kernels. Interestingly such an approximation to the Gram matrix can be also built from a set of deterministic points in X . This remark has been exploited to compute our low-rank approximation for instance in the simulation experiments as explained in Section 4.4.5. e is of great Note that choosing the set Jp of columns/rows leading to the approximation K interest in itself for at least two reasons. First from a computational point of view, the p columns have to be selected following a process that does not require to compute the n possible columns e to beforehand (which would induce an O(n2 ) time complexity otherwise). Second, the quality of K e that has to be as close as possible to that of K, approximate K crucially depends on the rank of K which remains unknown for computational reasons. However such questions are out of scope of the present paper, and we refer interested readers to [52, 20, 8] where this point has been extensively discussed. 3.2.2. Binary segmentation heuristic Since the low-rank approximation to the Gram matrix detailed in Section 3.2.1 leads to finite dimensional vectors in Rp (17), the change-point detection problem described in Section 2.3 amounts to recover abrupt changes of the mean of a p-dimensional time-series. Therefore any existing algorithm usually used to solve this problem in the p-dimensional framework can be applied. An exhaustive review of such algorithms is out of the scope of the present paper. However we will mention only a few of them to highlight their drawbacks and motivate our choice. Let us also recall that our purpose is to provide an efficient algorithm allowing: (i) to (approximately) solve Eq. (13) for each 1 ≤ D ≤ Dmax and (ii) to deal with large sample sizes (n ≥ 106 ). The first algorithm is the usual version of constrained dynamic programming [7]. Although it has been recently revisited with p = 1 by [46, 16, 39], it has a O(n2 ) time complexity with p > 1 , which excludes dealing with large sample sizes. Another version of regularized dynamic 15 programming has been explored by [34] who designed the PELT procedure. It provides the best segmentation over all segmentations with a penalty of λ per change-point with an O(n) complexity in time if the number of change-points is linear in n. Importantly, the complexity of the pruning inside PELT depends on the true number of change-points. For only a few change-points, the PELT complexity remains quadratic in time. With PELT, it is not straightforward to efficiently solve Eq. (13) for each 1 ≤ D ≤ Dmax , which is precisely the goal we pursue. Note however that it would still be possible to recover some of those segmentations by exploring a range of λ values like in CROPS [30]. A second possible algorithm is the so-called binary segmentation [43, 53, 22] that is a standard heuristic for approximately solving Eq. (13) for each 1 ≤ D ≤ Dmax . This iterative algorithm computes the new segmentation τe (D + 1) with D +1 segments from τe (D) by splitting one segment of τe (D) into two new ones without modifying other segments. More precisely considering the set of change-points τe (D) = {τ1 , . . . , τD+1 }, binary segmentation provides τe (D + 1) = arg min τ ∈TD+1 |τ ∩e τ (D)=e τ (D)  kY − µ̂τ k2H,n . Since only one segment of the previous segmentation is divided into two new segments at each step, the binary segmentation algorithm provides a simple (but only approximate) solution to Eq. (13) for each 1 ≤ D ≤ Dmax . We provide some pseudo-code for binary segmentation in Algorithm 5. It uses a sub-routine described by Algorithm 4 to compute the best split of any segment [τ, τ 0 [ of the data. To be specific, this BestSplit routine outputs four things: (1) the reduction in cost of spliting the segment [τ, τ 0 [, (2) the best change to split (3) the resulting left segment and (4) the resulting right segment. In the binary segmentation algorithm candidate splits are stored and handled using a binary heap data structure [18] using the reduction in cost as a key. This data structure allows to efficiently insert new splits and extract the best split in O(log(Dmax )) at every time step. Without such a structure inserting splits and extracting the best split would typically be in O(Dmax ) and for large Dmax the binary segmentation heuristic is at best O(n2 ). Note that the RBS procedure [45], which is involved in our simulation experiments (Section 4.2.3), also uses this heuristic. Algorithm 4 BestSplit of segment [τ, τ 0 [ 1: m̂ = min 0 {Cτ,t + Ct,τ 0 } and t̂ = arg min{Cτ,t + Ct,τ 0 } 2: Output four things (1) Cτ,t − m̂, (2) t̂ , (3) [τ, t̂[ and (4) [t̂, τ 0 [ τ <t<τ τ <t<τ 0 16 Algorithm 5 Binary Segmentation 1: Segs = {[1, n + 1[} 2: Changes = ∅ 3: CandidateSplit = ∅ [a binary heap] 4: for Dmax iteration do 5: for aseg ∈ Segs do 6: Insert BestSplit(aseg) in CandidateSplit 7: end for 8: Extract the best split of CandidateSplit and recover: t̂, [τ, t̂[ and = [t̂, τ 0 [ 9: Add t̂ in Changes 10: 11: Set Segs to { [τ, t̂[, [t̂, τ 0 [ } end for Assuming the best split of any segment is linear in its length the overall time complexity of binary segmentation for recovering approximate solutions to (13) for all 1 ≤ D ≤ Dmax is around O (log(Dmax )n) in practice. The worst case time complexity is O (Dmax n). A typical setting where it is achieved is with the linear kernel when i 7→ Xi = exp(i) for instance. At the i-th iteration of the binary segmentation algorithm, the best split of a segment of length n − i + 1 corresponds to one segment of length 1 and another one of length n − i. An important remark is that binary segmentation only achieves this reduced O (log(Dmax )n) time complexity provided that recovering the best split of any segment is linear in its length. This is precisely what has been allowed by the low-rank matrix approximation summarized by Eq. (17). Indeed with the low-rank approximation, computing the best split of any segment is linear in n and p. The resulting time complexity of binary segmentation is thus O (p log(Dmax )n), which reduces to O (log(Dmax )n) as long as p is small compared to n. By contrast without the approximation recovering the best split is typically quadratic in the length of the segment and binary segmentation would suffer an overall time complexity of order O(log(Dmax )n2 ) or O(Dmax n2 ). 3.2.3. Implementation and runtimes of the approximate solution The approximation algorithm we recommend is the combination of the low-rank approximation step detailed in Section 3.2.1 and of the binary segmentation discussed in Section 3.2.2. The resulting time complexity is then O(p2 n + p log(Dmax )n), which allows dealing with large sample sizes (n ≥ 106 ). From this time complexity it arises that an influential parameter is the number p of columns of the matrix used to build the low-rank approximation. In particular this low-rank approximation √ remains computationally attractive as long as p = o( n). Figure 2 illustrates the actual time complexity of this fast algorithm (implemented in C) with respect to n for various values of p: (i) √ a constant value of p and (ii) p = n. To ease the comparison, we also plotted the runtime of the exact algorithm (Algorithm 3) detailed in Section 3.1.2 and RBS that uses binary segmentation 17 KernSeg Exact and Heuristic 4 4 1e+02 1e+03 Heuristic (p=10) Heuristic (p=sqrt(n)) RBS KS.Gau 4 1e+01 3 1 2 4 3 4 3 3 1 3 1 2 3 1 2 4 3 1e−01 2 4 1e+00 time in seconds 4 3 1 2 3 3 2 3 3 1 1 1 2 2 1 1e+03 1 1 1 5e+03 5e+04 5e+05 n Figure 2: Runtime as a function of n (length of the signal) for Dmax = 100. Runtime of our approximation algorithm √ with p = 100 (1-black) and p = n (2-orange), RBS (3-cyan), exact Algorithm 3 (4-red) (see Section 4.2.3). Our fast approximation algorithm (ApKS ) recovers a quadratic complexity if p = √ n. However its overhead is much smaller than that of the exact algorithm, which makes it more applicable than the latter with large signals in practice. Note also that Figure 2 illustrates that ApKS returns the solution in a matter of seconds with a sample size of n = 105 , which is much faster than Kernseg (based on dynamic programming) that requires a few minutes. The RBS implementation involves preliminary calculations which make it slower than ApKS with n ≤ 2 · 103 . However for larger values (n ≥ 104 ) RBS is as fast as ApKS with p = 10. 4. Segmentation assessment From a statistical point of view Kernseg provides the same performance as that of [3]. However it greatly improves on the latter in terms of computational complexity as proved in Section 3.1. In their simulation experiments [3] mainly focus on detecting change-points in the distribution of R-valued data as well as of more structured objects such as histograms. Here we rather investigate the performance of the kernel change-point procedure on specific two-dimensional biological data: the DNA copy number and the BAF profiles (see Section 4.1.1). More precisely our experiments highlight two main assets of applying reproducing kernels to these biological data: (i) reasonable kernels avoid the need for modeling the type of change-points we are interested in and improve upon state-of-the-art approaches in this biological context, and (ii) the high flexibility of kernels facilitates data fusion, that is allows to combine different data-types and get more power to detect true change-points. In the following we first briefly introduce the type of data we are looking at, and describe our 18 simulation experiments obtained by resampling from a set of real annotated DNA profiles. Second, we provide details about the change-point procedures involved in our comparison. We also define the criteria used to assess the performance of the estimated segmentations. Finally, we report and discuss the results of these experiments. 4.1. Data description 4.1.1. DNA copy number data DNA copy number alterations are a hallmark of cancer cells [27]. The accurate detection and interpretation of such changes are two important steps toward improved diagnosis and treatment. Normal cells have two copies of DNA, inherited from each biological parent of the individual. In tumor cells, parts of a chromosome of various sizes (from kilobases to a chromosome arm) can be deleted, or copied several times. As a result, DNA copy numbers in tumor cells are piecewise constant along the genome. Copy numbers can be measured using microarray or sequencing experiments. Figure 3 displays an example of copy number profiles that can be obtained from SNP-array data [42]. The left panel (denoted by TCN) represents estimates of the total copy number (TCN). The right panel (denoted by BAF) represents estimates of allele B fractions (BAF) using only homozygous position. We refer to [42] for an explanation of how these estimates are obtained. In the normal region [0-2200], TCN is centered around two copies and BAF has three modes at 0, 1/2 and 1. On top of Figure 3, numbers (a, b) represent each parental copy number in the corresponding segment. For instance (0, 2) means that the total number of copies in the segment is 2. But a copy from one of the two parents is missing while the other copy has been duplicated. Importantly any (1,2) (0,2) (1,1) (1,2) (0,2) 0.5 BAF 2 0 0.0 1 TCN 3 1.0 4 (1,1) 0 2000 4000 6000 8000 10000 0 2000 4000 6000 8000 Figure 3: SNP array data. Total copy numbers (TCN), allelic ratios (BAF) along 10,000 genomic loci. Red vertical lines represent change-points, and red horizontal lines represent estimated mean signal levels between two change-points. change in only one of the parental copy numbers is reflected in both TCN and BAF. Therefore it makes sense to jointly analyze both dimensions to ease the identification of change-points. 19 10000 Importantly in the following, allelic ratios (BAF) are always symmetrized (or folded)– that is we consider |BAF − 0.5|–to facilitate the segmentation task. This is common practice in the field [51]. 4.1.2. Generated data Realistic DNA profiles with known truth (similar to that of Figure 3) have been generated using the acnr package [45]. The constituted benchmark consists of profiles with 5, 000 positions of heterozygous SNPs and exactly K = 10 change-points. As in [45] we only consider four biological states for the segments. The acnr package allows to vary the difficulty level by adding normal cell contamination, thus degrading tumor percentage. Three levels of difficulty have been considered by varying tumor percentage: 100% (easy case), 70%, and 50% (difficult case). Figure 4 displays three examples of simulated profiles (one for each tumor purity level). 100% tumor 1.00 3 BAF TCN 0.75 2 0.50 0.25 1 0.00 0 1000 2000 3000 4000 5000 0 1000 2000 position 3000 4000 5000 3000 4000 5000 position 70% tumor 0.8 4 3 BAF TCN 0.6 2 0.4 1 0 1000 2000 3000 4000 5000 0 1000 2000 position position 50% tumor 4 0.6 BAF TCN 3 0.4 2 0.2 1 0 1000 2000 3000 4000 5000 0 1000 2000 position 3000 4000 5000 position Figure 4: Benchmark 1: Profiles simulated with the acnr package. Each line corresponds to a tumor percentage (100%, 70% and 50%). The first column correspond to copy number (TCN) and the second to the allele B fraction (BAF). For each level, N = 50 profiles (with the same segment states and change-points) are generated making a total of 150 simulated profiles both for BAF and TCN. 20 4.2. Competing procedures 4.2.1. Kernseg and ApKS The implemented exact algorithm Kernseg (corresponding to Algorithm 3) and its fast approximation ApKS (based on binary segmentation) are applicable with any kernel (Gaussian, exponential, polynomial, . . . ). In our simulation experiments we consider three kernels. • The first one is the so-called linear kernel defined by k(x, y) = hx, yi, where x, y ∈ R. It is used as a benchmark since Kernseg with this kernel reduces to the procedure of [37]. The corresponding procedure is denoted by KS.Lin. • The second one is the Gaussian kernel defined for every x, y ∈ R by # " 2 − |x − y| , ∀δ > 0. kδ (x, y) = exp δ Since it belongs to the class of characteristic kernels [50], it is a natural choice to detect any abrupt changes arising in the full distribution [3]. We call this procedure KS.Gau. • The third one is the kernel associated with the energy-based distance introduced in Eq. (12) with α = 1 and x0 = 0. This particular choice is the prescribed value in the ECP package [32]. We call this procedure KS.ECP. These three kernels allow to (i) illustrate the interest of characteristic kernels compared to non characteristic ones, and (ii) assess the performances of change-point detection with kernels (Kernseg) compared to other approaches (ECP, RBS). However other characteristic kernels such as the Laplace or exponential ones (see Section 2.2) could have been considered as well. For all kernels we considered Dmax = 100. Note also that for all approaches and for both TCN and BAF profiles we first scaled the data using a difference based estimator of the variance. To √ be specific we get an estimator of the variances by dividing by 2 the median absolute deviation of disjoint successive differences. This is common practice in the change-point literature (see for example [22]). Such estimators are less sensitive to any shift in the mean than the classical ones. For the Gaussian kernel we then used δ = 1. As mentioned earlier, one main asset of kernels is that they allow to easily perform data fusion, which consists here in combining several data profiles to increase the power of detecting small changes arising at the same location in several of them. Here the joint segmentation of the two-dimensional signal (TCN, BAF) is carried out by defining a new kernel as the sum of two coordinate-wise kernels [5], that is k(x1 , x2 ) = k(c1 , c2 ) + k(b1 , b2 ) (18) with x1 = (c1 , b1 ) and x2 = (c2 , b2 ) where the first coordinates of x1 and x2 refer to TCN and the second ones to BAF. 21 Remark 4. Let us point out that many alternative ways exist to build such a “joint kernel”, using the standard machinery of reproducing kernels exposed in [5, 24]. For instance replacing the sum in Eq. (18) by a product of kernels is possible. With the Gaussian kernel, this amounts to consider one Gaussian kernel applied to a mixture of squared norms where each coordinate receives a different weight depending on its influence. Another promising direction is to exploit some available side information about the importance of each coordinate in detecting change-points. This can be done by considering a convex sum of kernels where the weights reflect this a priori knowledge. Finally let us mention that designing the optimal kernel for a learning task is a widely open problem in the literature even if some attempts exist (see Section 7.2 in [2] for a thorough discussion, and [26] for a first partial answer with two-sample tests). 4.2.2. ECP The ECP procedure [40] (earlier discussed in Section 2.6) has been also introduced in our comparison since it allows us to detect changes in the distribution of multivariate observations. We used the implementation provided by the authors in the R-package [32]. We used the default parameters α = 1 and ` = 30 (minimum length of any segment). Let us notice that, unlike our kernel-based procedures relying on efficiently minimizing a prescribed penalized criterion, ECP chooses the number of segments by iteratively testing each new candidate change-point by means of a permutation test, which makes it highly time-consuming on large profiles (around 15 minutes per profiles for n = 5000 compared to 5 seconds for KS.Gau). 4.2.3. Recursive Binary Segmentation (RBS) In the recent paper by [45], it has been shown that for a known number of change-points the Recursive Binary Segmentation (RBS) [25] is a state-of-the-art change-point procedure for analyzing (TCN, BAF) profiles. RBS is a two-step procedure. In a first step it uses the binary segmentation heuristic (described in Section 3.2.2) on the (TCN) or (TCN,BAF) profile. In a second step it uses dynamic programming on the set of changes identified by the binary segmentation heuristic. We refer interested readers to [45] for a discussion as to why RBS can outperform a pure dynamic programming strategy despite the fact that it provides only an approximation to the targeted optimization problem. Since the present biological context is the same as that of [45], we therefore decided to carry out the comparison between our kernel-based procedures and RBS. From a computational perspective RBS relies on the binary segmentation algorithm described in Algorithm 5. The final segmentation output by RBS is then an approximate solution to the optimization problem (in the same way as ApKS ), while being efficiently computed as illustrated by Figure 2. 22 4.3. Performance assessment The quality of the resulting segmentations is quantified in two ways. First we infer the ability of the procedure to provide a reliable estimate of the regression function by computing the quadratic risk of the estimator based on the TCN profile (Section 4.3.1). Second, we also assess the quality of the estimated segmentations by measuring the discrepancy between the true and estimated change-points using the Frobenius distance (Section 4.3.2). 4.3.1. Risk of a segmentation From a practical point of view, there is no hope to recover true change-points in regions where the signal-to-noise ratio is too low without including false positives, which we would like to avoid. In such non-asymptotic settings, the quality of the estimated segmentation τ can be measured by the risk R(fˆτ ) which measures the gap between the regression function f = (f1 , . . . , fn ) ∈ Rn and   its piecewise-constant estimator based on τ , that is fˆτ = fˆ1τ , . . . , fˆnτ ∈ Rn . This risk is defined by  n 2  1X τ τ ˆ ˆ E fi − fi . R(f ) = n i=1 In the following simulation results, the risks of all segmentations are always computed with respect to the regression function of the corresponding TCN profile. 4.3.2. Frobenius distance We also quantify the gap between a segmentation τ and the true segmentation τ ∗ by using the Frobenius distance [36] between matrices as follows. First, for any segmentation τ =  τ (τ1 , τ2 , . . . , τD ), let us introduce a matrix M τ = Mi,j such that 1≤i,j≤n τ Mi,j = D X 1(τk ≤i,j<τk+1 ) k=1 τk+1 − τk , (with τ1 = 1 and τD+1 = n + 1 by convention) τ where 1(τk ≤i,j<τk+1 ) = 1, if i, j ∈ [τk , τk+1 [∩N, and 0 otherwise. Note that Mi,j 6= 0 if and only if i, j are in the same segment of τ , which leads to a block-diagonal matrix with D blocks (whose squared Frobenius norm is equal to D). The idea behind the value in each block of this matrix is to define a one-to-one mapping between the set of segmentations in D segments and matrices whose squared Frobenius norm is D. ? Let us now consider the matrix M τ defined from the true segmentation τ ∗ in the same way. Then, the Frobenius distance between segmentations τ and τ ∗ is given, through the distance ? between matrices M τ and M τ , by dF (τ, τ ? ) = M τ − M τ ? F 23 v uX u n  τ − M τ ? 2. =t Mi,j i,j i,j=1 4.4. Results In our experiments, we successively considered two types of signals: (i) the total copy number profiles (TCN) and (ii) the joint profiles in R2 made of (TCN,BAF). 4.4.1. Comparison with KS.Lin and ECP for a high tumor percentage (easy case) First we compare all approaches in the simple case where the tumor percentage is equal to 100%. The performances, using only the TCN or the (TCN,BAF) profiles, are reported in Figure 5 and measured in terms of accuracy (Left) and risk (Right). Accuracy (100) LossInCn (100) TCN TCN + BAF TCN TCN + BAF 2.0 2.0 ● ● 1.0 ● ● ● ● ● ● ● ● Risk in TCN Accuracy (Frobenius distance) 1.8 1.5 1.6 1.4 1.2 ● 0.5 1.0 ● ● ● ● ● ● 0.0 RBS KS.Lin KS.Gau KS.ECP ECP ● ● ● ● ● RBS KS.Lin KS.Gau KS.ECP ECP ● 0.8 ● RBS KS.Lin KS.Gau KS.ECP ECP RBS KS.Lin KS.Gau KS.ECP ECP Figure 5: Accuracy (left) and Risk (right) on TCN and (TCN,BAF) profiles with a tumor percentage of 100%. Boxplots of RBS, ECP, KS.Lin, KS.Gau and KS.ECP for their selected number of change-points (D̂) are shown. In all these experiments RBS clearly performs badly. We believe this is mostly due to the poor estimation of the number of segments made by RBS. Indeed the performances of RBS are closer to the ones of other approaches when considering the true number of segments (results not shown here). We then compare KS.Lin to KS.Gau, KS.ECP, and ECP. With TCN data, KS.Lin has a small advantage over KS.Gau (with an average accuracy difference of 0.03 and a p-value of 0.012) and ECP (with an average accuracy difference of 0.1 and p-values of 0.007). This is also true when considering the risk. KS.ECP has a slightly better empirical average accuracy than KS.Lin but this difference is not significant. Let us also mention that none of the differences are found significant with the (TCN, BAF) profiles. It is our opinion that in this simple scenario all true changepoints arise mostly in the mean of the distribution. Thus it is noticeable that the performances of approaches also looking for changes in the whole distribution (like ECP, KS.Gau, KS.ECP) are (almost) on par with those specifically looking for change-points in the mean (like KS.Lin and RBS for the true number of change-points D? ). We also compared ECP to KS.Gau and KS.ECP. We found no differences except between ECP and KS.ECP for TCN profiles. In that case KS.ECP has significantly better accuracy and risk than ECP. But this difference remains small as can be seen on Figure 5. Note that for all approaches, performances on (TCN,BAF) profiles are slightly better than those with TCN profiles (p-values smaller than 10−4 ). 24 TCN: Accuracy ( 50 ) 1.8 min.size=0 RBS/ECP min.size=30 Accuracy (Frobenius distance) 1.6 1.4 ● ● 1.2 1.0 RBS ECP KS.Lin. KS.Gau KS.ECP KS.Lin KS.Gauss KS.ECP Figure 6: Performances of KS.Lin, KS.Gau and KS.ECP for the true number of changepoints D? = 10 with or without a constraint on the minimal size of segments (left: ` ≥ 1, right: ` ≥ 30). The results for RBS and ECP for D? = 10 are also reported. RBS does not include a constraint while ECP has a default minimal size of 30. . 4.4.2. Constraint on the segment sizes for a low tumor percentage (difficult case) We then turn to the more difficult case where the tumor percentage is equal to 50%. In this scenario excluding segments with less than 30 points (as is done by default in ECP) is beneficial. Figure 6 illustrates this strong improvement when adding this constraint to KS.Lin, KS.Gau and KS.ECP and when considering the true number of change-points D? = 10 (p-values of respectively (8.10−9 , 9.10−3 and 10−4 ). More generally it is our experience that such a constraint can greatly improve performances when the signal-to-noise ratio is low. For this reason, in the remainder of our experiments and for a tumor percentage of 50%, we will report results including the constraint on the segment sizes (` = 30). Let us also mention that for higher tumor percentages adding the constraint does not change the segmentation in D? segments recovered by KS.Lin, KS.Gau and KS.ECP. 4.4.3. Comparison with KS.Lin and ECP for a low tumor percentage (difficult case) We compared KS.Lin to KS.Gau, KS.ECP, and ECP for a tumor percentage of 50%. The accuracy of all these approaches is reported in Figure 7. The minimum length of any segment is fixed at ` = 30 for all approaches (except RBS as it is not possible) and the number of segments is estimated. In all these experiments RBS performs badly. We believe this is because it poorly selects the number of segments and also because it does not include a constraint on segment sizes. We compared KS.Lin to KS.Gau, KS.ECP, and ECP. For both TCN and (TCN,BAF) profiles KS.Lin performs worse than KS.Gau, KS.ECP, and ECP in terms of accuracy and risk (all p25 Accuracy (50) 2.5 LossInCn (50) TCN TCN + BAF TCN TCN + BAF ● 2.5 ● Risk in TCN Accuracy (Frobenius distance) ● 2.0 1.5 2.0 ● ● 1.5 ● 1.0 ● ● ● RBS KS.Lin KS.Gau KS.ECP ECP RBS KS.Lin KS.Gau KS.ECP ECP RBS KS.Lin KS.Gau KS.ECP ECP RBS KS.Lin KS.Gau KS.ECP ECP Figure 7: Accuracy (left) and Risk (right) on TCN and (TCN,BAF) profiles with a tumor percentage of 50%. Boxplots of RBS, ECP, KS.Lin, KS.Gau and KS.ECP for their selected number of changepoints (D̂) are shown. values are smaller than 2.10−4 ). In this more difficult scenario, changes do not arise only in the mean of the distribution, which gives an advantage to approaches looking for changes in the whole distribution and not only in the mean as KS.Lin does. We then compare ECP to KS.Gau and KS.ECP. First, KS.Gau seems to have a slightly better accuracy and risk than ECP for both TCN and (TCN,BAF) profiles. Two of these differences are found significant with a cut-off of 5% and none with a cut-off of 1%. This leads us to conclude that ECP and KS.Gau have similar performances in the present experiments. Second, KS.ECP has a slightly better accuracy and risk than ECP in TCN for both TCN and (TCN,BAF) profiles. All of these differences are found significant (for the accuracy in (TCN,BAF) p = 0.0076, in TCN p = 0.015, for the risk in (TCN,BAF) p = 0.0081 and in TCN p = 0.00016). Although significant these differences remain small (about three times smaller than the differences between KS.Lin and ECP). Finally it should be noted that KS.ECP is faster than ECP for a profile of n = 5000 (5 seconds against 15 minutes). All of this leads to conclude that, in our simulation experiments, KS.Gau and KS.ECP are the best change-point detection procedures among the considered ones since they perform as well as ECP while being by far less memory and time consuming. 4.4.4. Estimation of the number of segments including the minimum length constraint Let us now assess the behaviour of the model selection procedure derived in Section 2.5 by taking into account the new constraint on the minimal length of the candidate segments. From Figure 8 it can be seen that whatever the kernel the performances of the Kernseg procedure at the estimated number of segments are worse than those at D? . But this difference remains very small. This empirically validates the use of our modified penalty taking into account a constraint on the size of the segments. We recall that adding this constraint is important in low-signal-to-noise settings, which are common in practice. 26 TCN: Accuracy (50) D* ● ^ D Accuracy (Frobenius distance) 2.0 1.8 ● 1.6 1.4 1.2 1.0 ● KS.Lin KS.Gau KS.ECP KS.Lin KS.Gau KS.ECP Figure 8: Accuracy of KS.Lin, KS.Gau and KS.ECP on (TCN,BAF) for a tumor percentage of 50% for D∗ (left) and D̂ (right). 4.4.5. Quality of the approximation The purpose of the present section is to illustrate the behaviour of ApKS (in terms of statistical precision) as an alternative to Kernseg (which is more time consuming). Since we do not provide any theoretical warranty on the model selection performances of ApKS , we only show its results for several values of p ∈ {4, 10, 40, 80, 160} at the true number of segments D? . For each value of p and each of the TCN and BAF profiles, we compute the approximation by: (i) evaluating the smallest and largest observed value (respectively denoted by m and M ), (ii) using an equally spaced grid of p deterministic values between m and M and (iii) use those p values to perform the approximation of the Gram matrix. From Figure 9 it clearly appears that the number of points used to build the low-rank approximation to the Gram matrix is an influential parameter that has to be carefully fixed. However as long as p is chosen large enough, the approximation seems to provide very similar results. This suggests that one should find a trade-off between the statistical performances and the computation cost. Indeed from a statistical point of view increasing p is beneficial (or at least not detrimental). In contrast from a computationnal point of view increasing p is detrimental and increases the complexity in time (O(p2 n)). Let us finally emphasize that for large enough p the performances of ApKS are very close to those of KS.Gau. Given the low time complexity of ApKS compared to KS.Gau we argue that for large profiles (n  105 ) ApKS could be an interesting alternative to KS.Gau. Nevertheless several questions related to the use of ApKS remain open. For instance, the optimal way to build the low-rank approximation of the Gram matrix is a challenging question which can be embedded in the more general problem of choosing the optimal kernel. Designing a theoretically grounded penalized criterion to perform model selection with ApKS is also a crucial problem which remains to be addressed. 27 TCN+BAF: Accuracy ( 100 ) Accuracy (Frobenius distance) 1.5 1.0 ● ● ● ● ● ● ● ● ● ● 0.5 0.0 ● Ap4KS.Gau Figure 9: Ap10KS.Gau Ap40KS.Gau Ap80KS.Gau Ap160KS.Gau KS.Gau Accuracy of ApKS with the Gaussian Kernel and for various p and of KS.Gau on (TCN,BAF) for a tumor percentage of 50% for D∗. 5. Conclusion Existing nonparametric change-point detection procedures such as that of [3] exhibit promising statistical performances. Yet their high computational costs (time and memory) are severe limitations that often make it difficult to use for practitioners. Therefore an important task is to develop computationally efficient algorithms (leading to exact or approximate solutions) reducing the time and memory costs of these statistically effective procedures. In this paper we focus on the multiple change-points detection framework with reproducing kernels. We have detailed a versatile (i.e. applicable to any kernel) exact algorithm which is quadratic in time and linear in space. We also provided a versatile approximation algorithm which is linear both in time and space and allows to deal with very large signals (n ≥ 106 ) on a standard laptop. The computational efficiency in time and space of these two new algorithms has been illustrated on empirical simulation experiments showing that the new algorithms is more efficient than its direct competitor ECP. The statistical accuracy of our kernel-based procedures has been empirically assessed in the setting of DNA copy numbers and allele B fraction profiles. In particular, results illustrate that characteristic kernels (enabling the detection of changes in any moment of the distribution) can lead to better performances than procedures dedicated to detecting changes arising only in the mean. Acknowledgements This work has been funded by the French Agence Nationale de la Recherche (ANR) under reference ANR-11-BS01-0010, by the CNRS under the PEPS BeFast, by the CPER Nord-Pas de Calais/FEDER DATA Advanced data science and technologies 2015-2020, and by Chaire d’excellence 2011-2015 Inria/Lille 2. 28 References References [1] Arlot, S., Celisse, A., 2011. Segmentation of the mean of heteroscedastic data via cross-validation. Stat. Comput. 21 (4), 613–632. [2] Arlot, S., Celisse, A., Harchaoui, Z., Feb. 2012. Kernel change-point detection. ArXiv:1202.3878v1. [3] Arlot, S., Celisse, A., Harchaoui, Z., 2012. A kernel multiple change-point algorithm via model selection. arXiv preprint arXiv:1202.3878. [4] Aronszajn, N., 1950. Theory of reproducing kernels. Transactions of the American mathematical society 68 (3), 337–404. [5] Aronszajn, N., May 1950. Theory of reproducing kernels. Transactions of the American Mathematical Society 68 (3), 337–404. [6] Auger, I. E., Lawrence, C. E., 1989. Algorithms for the optimal identification of segment neighborhoods. Bulletin of mathematical biology 51 (1), 39–54. [7] Auger, I. E., Lawrence, C. E., 1989. Algorithms for the optimal identification of segment neighborhoods. Bulletin of mathematical biology 51 (1), 39–54. [8] Bach, F., 2013. Sharp analysis of low-rank kernel matrix approximations. In: In Proc. COLT, 2013. pp. 185–209. [9] Bellman, R., 1961. On the approximation of curves by line segments using dynamic programming. Communications of the ACM 4 (6), 284. [10] Berg, C., Christensen, J. P. R., Ressel, P., 1984. Harmonic Analysis on Semigroups. Springer, New-York. [11] Berlinet, A., Thomas-Agnan, C., 2004. Reproducing kernel Hilbert spaces in probability and statistics. Kluwer Academic Publishers, Boston, MA, with a preface by Persi Diaconis. URL http://dx.doi.org/10.1007/978-1-4419-9096-9 [12] Birgé, L., Massart, P., 2007. Minimal penalties for Gaussian model selection. Probab. Theory Related Fields 138 (1-2), 33–73. [13] Brodsky, E., Darkhovsky, B. S., 2013. Nonparametric methods in change point problems. Vol. 243. Springer Science & Business Media. [14] Christmann, A., Steinwart, I., 2010. Universal kernels on non-standard input spaces. In: Advances in neural information processing systems. pp. 406–414. [15] Cleynen, A., Dudoit, S., Robin, S., 2014. Comparing segmentation methods for genome annotation based on rna-seq data. Journal of Agricultural, Biological, and Environmental Statistics 19 (1), 101–118. [16] Cleynen, A., Koskas, M., Lebarbier, E., Rigaill, G., Robin, S., 2014. Segmentor3isback: an r package for the fast and exact segmentation of seq-data. Algorithms for Molecular Biology 9, 6. [17] Cleynen, A., Lebarbier, E., 2014. Segmentation of the poisson and negative binomial rate models: a penalized estimator. ESAIM: Probability and Statistics 18, 750–769. [18] Cormen, T. H., 2009. Introduction to algorithms. MIT press. [19] Dieuleveut, A., Bach, F., 2016. Nonparametric stochastic approximation with large step-sizes. The Annals of Statistics 44 (4), 1363–1399. [20] Drineas, P., Mahoney, M. W., 2005. On the nyström method for approximating a gram matrix for improved kernel-based learning. Journal of Machine Learning Research 6, 2153–2175. [21] Fine, S., Scheinberg, K., Cristianini, N., Shawe-Taylor, J., Williamson, B., 2001. Efficient svm training using low-rank kernel representations. Journal of Machine Learning Research 2, 243–264. [22] Fryzlewicz, P., 2014. Wild binary segmentation for multiple change-point detection. The Annals of Statistics 42 (6), 2243–2281. [23] Garreau, D., Arlot, S., 2016. Consistent change-point detection with kernels. arXiv preprint arXiv:1612.04740. [24] Gartner, T., 2008. Kernels for structured data. Vol. 72. World Scientific. [25] Gey, S., Lebarbier, E., 2008. Using cart to detect multiple change points in the mean for large sample. Tech. 29 rep., HAL. URL https://hal.inria.fr/file/index/docid/327146/filename/article_CART.pdf [26] Gretton, A., Sejdinovic, D., Strathmann, H., Balakrishnan, S., Pontil, M., Fukumizu, K., Sriperumbudur, B. K., 2012. Optimal kernel choice for large-scale two-sample tests. In: Advances in neural information processing systems. pp. 1205–1213. [27] Hanahan, D., Weinberg, R. A., 2011. Hallmarks of cancer: the next generation. Cell 144 (5), 646–674. [28] Harchaoui, Z., Cappé, O., 2007. Retrospective mutiple change-point estimation with kernels. In: Statistical Signal Processing, 2007. SSP’07. IEEE/SP 14th Workshop on. IEEE, pp. 768–772. [29] Hautaniemi, A. R., Kauraniemi, S., Yli-Harja, P., Astola, O., Wolf, J., Kallioniemi, M., 2003. A cgh-plotter: Matlab toolbox for cgh-data analysis. Bioinformatics 13 (1714–1715). [30] Haynes, K., Eckley, I. A., Fearnhead, P., 2017. Computationally efficient changepoint detection for a range of penalties. Journal of Computational and Graphical Statistics 26 (1), 134–143. [31] Hocking, T., Schleiermacher, G., Janoueix-Lerosey, I., Boeva, V., Cappo, J., Delattre, O., Bach, F., Vert, J.-P., 2013. Learning smoothing models of copy number profiles using breakpoint annotations. BMC Bioinformatics 14 (1), 164. [32] James, N. A., Matteson, D. S., 2013. ecp: An r package for nonparametric multiple change point analysis of multivariate data. arXiv preprint arXiv:1309.3295. URL http://cran.r-project.org/web/packages/ecp/index.html [33] Jong, K., Marchiori, E., van der Vaart, A., Ylstra, B., Weiss, M., Meijer, G., 2003. Applications of evolutionary computing. In: EvoWorkshops 2003: Proceedings. Vol. 2611 of chap. chromosomal breakpoint detection in human cancer. Springer-Verlag Heidelberg, pp. 54–65. [34] Killick, R., Fearnhead, P., Eckley, I., 2012. Optimal detection of changepoints with a linear computational cost. Journal of the American Statistical Association 107 (500), 1590–1598. [35] Lai, Y., Jun. 2012. Change-Point analysis of paired Allele-Specific copy number variation data. Journal of Computational Biology 19 (6), 679–693. [36] Lajugie, R., Bach, F., Arlot, S., 2014. Large-margin metric learning for constrained partitioning problems. In: International Conference on Machine Learning. pp. 297–305. [37] Lebarbier, E., Apr. 2005. Detecting multiple change-points in the mean of gaussian process by model selection. Signal Process. 85 (4), 717–736. URL http://dx.doi.org/10.1016/j.sigpro.2004.11.012 [38] Ledoux, M., Talagrand, M., 1991. Probability in Banach spaces. Vol. 23 of Ergebnisse der Mathematik und ihrer Grenzgebiete (3) [Results in Mathematics and Related Areas (3)]. Springer-Verlag, Berlin, isoperimetry and processes. [39] Maidstone, R., Hocking, T., Rigaill, G., Fearnhead, P., 2017. On optimal multiple changepoint algorithms for large data. Statistics and Computing 27 (2), 519–533. [40] Matteson, D. S., James, N. A., 2014. A nonparametric approach for multiple change point analysis of multivariate data. Journal of the American Statistical Association 109 (505), 334–345. [41] Matteson, D. S., James, N. A., 2014. A nonparametric approach for multiple change point analysis of multivariate data. Journal of the American Statistical Association 109 (505), 334–345. [42] Neuvial, P., Bengtsson, H., Speed, T. P., Mar. 2011. Statistical analysis of single nucleotide polymorphism microarrays in cancer studies. In: Handbook of Statistical Bioinformatics, 1st Edition. Springer Handbooks of Computational Statistics. Springer, pp. 225–255. [43] Olshen, A. B., Venkatraman, E. S., Lucito, R., Wigler, M., 2004. Circular binary segmentation for the analysis of array-based DNA copy number data. Biostatistics 5 (4), 557–572. [44] Picard, F., Robin, S., Lavielle, M., Vaisse, C., Daudin, J.-J., Jan. 2005. A statistical approach for array-CGH data analysis. BMC bioinformatics 6, 27. URL http://www.ncbi.nlm.nih.gov/pubmed/15705208 [45] Pierre-Jean, M., Rigaill, G., Neuvial, P., 2014. Performance evaluation of DNA copy number segmentation 30 methods. Briefings in Bioinformatics. URL http://bib.oxfordjournals.org/content/early/2014/09/08/bib.bbu026.abstract [46] Rigaill, G., 2015. A pruned dynamic programming algorithm to recover the best segmentations with 1 to k max change-points. Journal de la Société Française de Statistique 156 (4), 180–205. [47] Rigaill, G., Lebarbier, É., Robin, S., 2012. Exact posterior distributions and model selection criteria for multiple change-point detection problems. Statistics and Computing 22 (4), 917–929. [48] Sejdinovic, D., Sriperumbudur, B., Gretton, A., Fukumizu, K., 2013. Equivalence of distance-based and RKHSbased statistics in hypothesis testing. The Annals of Statistics 41 (5), 2263–2291. [49] Smola, A. J., Schölkopf, B., 2000. Sparse greedy matrix approximation for machine learning. In: Proceedings of the Seventeenth International Conference on Machine Learning. ICML ’00. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, pp. 911–918. URL http://dl.acm.org/citation.cfm?id=645529.657980 [50] Sriperumbudur, B. K., Fukumizu, K., Lanckriet, G. R., 2010. On the relation between universality, characteristic kernels and rkhs embedding of measures. In: Proc. of 13th International Conference on Artificial Intelligence and Statistics. pp. 773–780. [51] Staaf, J., Lindgren, D., Vallon-Christersson, J., Isaksson, A., et al., Oct. 2008. Segmentation-based detection of allelic imbalance and loss-of-heterozygosity in cancer cells using whole genome SNP arrays. Genome Biol 9 (9), R136. [52] Williams, C., Seeger, M., 2001. Using the Nyström method to speed up kernel machines. In: Advances in Neural Information Processing Systems 13. MIT Press, pp. 682–688. [53] Yang, T., 2012. Simple binary segmentation frameworks for identifying variation in DNA copy number. BMC bioinformatics 13 (1), 277. 31
10math.ST
EXISTENCE OF ALMOST COHEN-MACAULAY ALGEBRAS IMPLIES THE EXISTENCE OF BIG COHEN-MACAULAY ALGEBRAS arXiv:1601.03335v2 [math.AC] 29 Mar 2016 RAJSEKHAR BHATTACHARYYA Abstract. In [1], the dagger closure is extended over finitely generated modules over Noetherian local domain (R, m) and it is proved to be a Dietz closure. In this short note we show that it also satisfies the ‘Algebra axiom’ of [9] and this leads to the following result of this paper: For a complete Noetherian local domain, if it is contained in an almost Cohen-Macaulay domain, then there exists a balanced big Cohen-Macaulay algebra over it. 1. introduction A big Cohen-Macaulay algebra over a local ring (R, m) is an R-algebra B such that some system of parameters of R is a regular sequence on B. It is balanced if every system of parameters of R is a regular sequence on B. Big Cohen-Macaulay algebras exist in equal characteristic [7], [6] and also in mixed characteristic when dim R ≤ 3 [8]. The existence of big Cohen-Macaulay algebras is extremely important as for example, it gives new proofs for many of the homological conjectures, such as the direct summand conjecture, monomial conjecture, and vanishing conjecture for maps of Tor. In equal characteristic, the tight closure operation has been used to present proofs of the existence of balanced big Cohen-Macaulay modules and algebras. In [2], a list of seven axioms for a closure operation is defined for finitely generated modules over a complete local domain R. Any closure operation which satisfies these seven axioms is called Dietz closure. A Dietz closure is powerful enough to produce big Cohen-Macaulay modules. It is to be noted that, in a recent work of Dietz [3], axioms are extended beyond finitely generated modules. In this context, it is worth it to recall the definition of an almost Cohen-Macaulay algebra ([10]): Let A be an algebra over a Noetherian local domain (R, m), equipped with a normalized value map v : A → R ∪ {∞}. A is called almost Cohen-Macaulay if each element of ((x1 , . . . , xi−1 )A :A xi )/(x1 , . . . , xi−1 )A is annihilated by elements of sufficiently small order with respect to v for all system of parameters x1 , . . . , xd of A. In [1], using the algebra with normalized value map, we extend the definition of dagger closure to the finitely generated modules over local domain and we showed that dagger closure is a Dietz closure ([1], Proposition 4.5) when A is almost Cohen-Macaulay. As a consequence we showed that for a complete Noetherian local domain, if it is contained 2010 Mathematics Subject Classification. 13C14. Key words and phrases. Almost Cohen-Macaulay, Big Cohen-Macaulay, Closure operation. 1 2 RAJSEKHAR BHATTACHARYYA in an almost Cohen-Macaulay domain, then there exists a balanced big Cohen-Macaulay module over it ([1], Corollary 4.6). Recently, in [9], an additional axiom is introduced, which is known as the ‘Algebra Axiom’, and it is shown there that many closure operations satisfy this axiom. It is also proved that a local domain R has a Dietz closure that satisfies the Algebra Axiom if and only if R has a big Cohen-Macaulay algebra. In this short note we show that dagger closure as in [1] also satisfies the ‘Algebra axiom’ of [9]. This leads us to the following result of this paper. Theorem 1 (Theorem 3.2). For a complete Noetherian local domain, if it is contained in an almost Cohen-Macaulay domain, then there exists a balanced big Cohen-Macaulay algebra over it. In [8], Hochster proves the existence of weakly functorial big Cohen-Macaulay algebras from the existence of almost Cohen-Macaulay algebras when dim R ≤ 3. Our result provides a partial extension that is not tied to the Krull dimension of the ring. 2. preliminary results Hochster and Huneke defined dagger closure for ideals in a local domain via elements of small order. See [4]. We previously extended that notion as follows: Definition 2.1. ([1]) Let A be a local algebra with a normalized valuation v : A → R∪{∞} v if and M be an A-module. Consider a submodule N ⊂ M . Given x ∈ M , we say x ∈ NM for every ǫ > 0, there exists a ∈ A such that v(a) < ǫ and ax ∈ N . Now we extend the definition of dagger closure to finitely generated modules ([1]) and we call this new closure as dagger closure to local domains contained in such an A as above. Definition 2.2. Let (R, m) be a Noetherian local domain and let A be a local domain containing R with a normalized valuation v : A → R ∪ {∞}. For any finitely generated v if 1 ⊗ x ∈ R-module M and for its submodule N , given x ∈ M we say that x ∈ NM v the dagger closure of N inside M . im(A ⊗ N → A ⊗ M )vA⊗M . We call NM We recall the definition of Dietz closure. Definition 2.3. For a Noetherian local domain, if a closure operation satisfies all the axioms of Axiom 1.1 of [2], then it is defined as Dietz closure. We restate the results of Proposition 4.5 and Corollary 4.6 of [1] in a single theorem. Theorem 2.4. Let R be a complete Noetherian local domain and let A be a local domain containing R, equipped with a normalized valuation v : A → R ∪ {∞}. Consider the dagger closure operation as defined in Definition 2.2. If A is an almost Cohen-Macaulay algebra, then dagger closure becomes a Dietz closure. Moreover in this case, there exists a balanced big Cohen-Macaulay module over R. EXISTENCE OF ALMOST COHEN-MACAULAY ALGEBRAS IMPLIES THE EXISTENCE OF BIG COHEN-MACAULAY ALGEBRA As mentioned earlier, in [3], axioms are extended beyond finitely generated modules. These new axioms should imply that dagger closure (as defined in Definition 2.2) is a Dietz closure even without assuming that the module is finitely generated. The new work also extends the definition of phantom extensions for non finitely generated modules. We recall the definition of phanton extension for a closure operation (see [5] and [2]). Let R be a ring with a closure operation cl, M a finitely generated R-module, and α : R → M an injective map with cokernel Q. We have a short exact sequence α 0 −−−−→ R −−−−→ M −−−−→ Q −−−−→ 0. Let P• be a projective resolution (equivalently, free resolution since R is local) for Q over R. Then, this yields the following commutative diagram 0 −−−−→ x   α R −−−−→ x φ  M −−−−→ x   Q −−−−→ 0 x  id d P2 −−−−→ P1 −−−−→ P0 −−−−→ Q −−−−→ 0. Let ǫ ∈ Ext1R (Q, R) be the element corresponding to this short exact sequence via the Yoneda correspondence. We say that α is a cl-phantom extension, if for above projective resolution P• of Q, a cocycle representing ǫ in HomR (P1 , R) is in im(HomR (P0 , R) → HomR (P1 , R))cl HomR (P1 ,R) . When closure operation is dagger closure as defined above, we call cl-phantom extension as ‘dag-phantom’ extension. α The Algebra Axiom of [9] states that: For any closure operation cl, if R → M, is clα′ phantom, then the map R → Sym2 (M ), sending 1 7→ α(1) ⊗ α(1) is also cl-phantom. The author proves (Theorem 3.3) that if a local domain R has a Dietz closure cl that satisfies the Algebra axiom, then R has a balanced big Cohen-Macaulay algebra. 3. main result In this section we prove the main theorem. We begin with the following lemma. Lemma 3.1. Let R be a complete Noetherian local domain and let A be an almost CohenMacaulay local domain containing R, possessing a normalized valuation map v : A → R ∪ {∞}. For a finitely generated R-module M , an injection α : R → M is dag-phantom if and only if for every ǫ > 0, there exist an element a ∈ A with v(a) < ǫ and an Amodule homomorphism idA ⊗R γǫ : A ⊗R M → A, such that (idA ⊗R γǫ ) ◦ (idA ⊗R α) = a(idA ⊗R idR ). Proof. Since A is a torsion free R-module ([9], Lemma 3.9), A idA ⊗R α → A ⊗R M is injective. Observe the short exact sequence α 0 −−−−→ R −−−−→ M −−−−→ Q −−−−→ 0, and let P• projective resolution of Q. This implies the following commutative diagram where A ⊗R P• is a projective resolution (equivalently, free resolution) of A ⊗R Q over A. 4 RAJSEKHAR BHATTACHARYYA 0 x   −−−−→ id ⊗ α R A −−A−−− → A ⊗R M −−−−→ A ⊗R Q −−−−→ 0 x x x   id ⊗ φ id   A R id ⊗ d R A ⊗R P2 −−−−→ A ⊗R P1 −−A−−− → A ⊗R P0 −−−−→ A ⊗R Q −−−−→ 0. Now consider the following statement: For every ǫ > 0, there exist an element a ∈ A with v(a) < ǫ and an A-module homomorphism idA ⊗R γǫ : A ⊗R M → A, such that (idA ⊗R γǫ ) ◦ (idA ⊗R α) = a(idA ⊗R idR ). Clearly, this is true if and only if, a(idA ⊗R φ) ∈ im(A ⊗R HomR (P0 , R) → A ⊗R HomR (P1 , R)), by Lemma 5.6 of [5]. This is equivalent to a(idA ⊗R φ) ∈ im(A ⊗R B → A ⊗R HomR (P1 , R)), where B is the module of coboundaries in HomR (P1 , R). Further from definition of dagger v closure, this is equivalent to φ ∈ BHom . Finally, from Lemma 5.6 of [5] again, the R (P1 ,R) α last statement is equivalent to the fact that the map R → M is dag-phantom.  Now we state our main result. Theorem 3.2. Let R be a complete Noetherian local domain and let A be an almost CohenMacaulay local domain containing R, possessing a normalized valuation v : A → R ∪ {∞}. Then there exists a balanced big Cohen-Macaulay algebra over R. Proof. Consider the dagger closure operation as defined in Definition 2.2 of the previous section and from Theorem 2.4, we know that it is a Dietz closure. Now, if we can show that this dagger closure also satisfies ‘Algebra axiom’ as stated in [9], then using Theorem 3.3 of [9], we can conclude. To see that dagger closure satisfies the ‘Algebra axiom’ of [9], we assume that injective α map R → M is dag-phantom, where M is a finitely generated R-module. From Lemma 3.1, this is equivalent to the fact that for every ǫ > 0, there exist an element a ∈ A with v(a) < ǫ and an A-module homomorphism idA ⊗R γǫ : A ⊗R M → A, such that (idA ⊗R γǫ ) ◦ (idA ⊗R α) = a(idA ⊗R idR ). We need to show that α′ : R → Sym2 (M ) is also dag-phantom, where α′ (1) = α(1) ⊗ α(1). For ǫ > 0, take a ∈ A with v(a) < ǫ/2 such that (idA ⊗R γǫ/2 ) ◦ (idA ⊗R α) = a(idA ⊗R idR ). Set b = a2 and from properties of valuation, v(b) < ǫ. Since symmetric algebra commutes with base change, we define idA ⊗R γǫ′ : A ⊗R Sym2 (M ) → A by (idA ⊗R γǫ′ )(a ⊗ (m ⊗ m′ )) = aγǫ/2 (m)γǫ/2 (m′ ). Then (idA ⊗R γǫ′ )((idA ⊗R α′ )(1)) = (idA ⊗R γǫ′ )(1 ⊗ (α(1) ⊗ α(1))) = (γǫ/2 (α(1)))2 = a2 = b, since γǫ/2 (α(1)) = 1 ⊗ γǫ/2 (α(1)) = (idA ⊗R γǫ/2 α)(1 ⊗ 1) = (idA ⊗R γǫ/2 ) ◦ (idA ⊗R α)(1 ⊗ 1) = EXISTENCE OF ALMOST COHEN-MACAULAY ALGEBRAS IMPLIES THE EXISTENCE OF BIG COHEN-MACAULAY ALGEBRA a(idA ⊗R idR )(1 ⊗ 1) = a. Again, using Lemma 3.1, we get that α′ is also dag-phantom and thus we conclude.  Acknowledgement . I would like thank the referee for careful reading of the paper and for all the valuable comments and suggestions for the improvement of the paper. References [1] M. Asgharzadeh and R. Bhattacharyya, Applications of closure operations on big Cohen-Macaulay algebras, J. Algebra Appl. 11 (2012), no. 4. [2] G. Dietz, Characterization of closure operation that induced big Cohen-Macaulay algebra, Proc. AMS 138 (2010), 3849-3862. [3] G. Dietz, Axiomatic closure operations, Phantom extensions, and Solidity, arXiv:1511.04286. [4] M. Hochster and C. Huneke, Tight closure and elements of small order in integral extensions, Journal of Pure and Applied Algebra 71 (1991), 233-247. [5] M. Hochster and C. Huneke, Tight closure of parameter ideals and splitting in module finite extensions, J. Algebraic Geom. 3 (1994), no. 4, 599-670 [6] M. Hochster and C. Huneke, Applications of the existence of big Cohen-Macaulay algebras, Adv. Math. 113 (1995), no. 1, 45-117. [7] M. Hochster, Topics in the homological theory of modules over commutative rings, CBMS Regional Conference Series 24, Amer. Math. Soc., 1975. [8] M. Hochster, Big Cohen-Macaulay algebras in dimension three via Heitmann’s theorem, J. Algebra 254 (2002), no. 2, 395-408. [9] Rebecca R.G, Closure operations that induce big Cohen-Macaulay algebras, arXiv: 1512.07862v1. [10] P. Roberts, A. Singh and V. Srinivas, The annihilator of local cohomology in characteristic zero, Illinois J. Math. 51 (2007), 237-254. Dinabandhu Andrews College, Kolkata 700084, India E-mail address: [email protected]
0math.AC
Isogeometric shape optimisation of shell structures using multiresolution subdivision surfaces Kosala Bandara, Fehmi Cirak∗ Department of Engineering, University of Cambridge, Trumpington Street, Cambridge CB2 1PZ, U.K. arXiv:1605.06288v1 [math.NA] 20 May 2016 Abstract We introduce the isogeometric shape optimisation of thin shell structures using subdivision surfaces. Both triangular Loop and quadrilateral Catmull-Clark subdivision schemes are considered for geometry modelling and finite element analysis. A gradientbased shape optimisation technique is implemented to minimise compliance, i.e. to maximise stiffness. Different control meshes describing the same surface are used for geometry representation, optimisation and finite element analysis. The finite element analysis is performed with subdivision basis functions corresponding to a sufficiently fine control mesh. During iterative shape optimisation the geometry is updated starting from the coarsest control mesh and proceeding to increasingly finer control meshes. The proposed approach is applied to three optimisation examples, namely a catenary, roof over a rectangular domain and freeform architectural shell roof. The influence of the geometry description and the used subdivision scheme on the obtained optimised curved geometries are investigated in detail. Keywords: shape optimisation, thin shells, isogeometric analysis, subdivision surfaces, finite elements 1. Introduction Shell structures are curved solids with one dimension significantly smaller than the other two. They are prevalent in many engineering applications, most prominently in aerospace, automotive and structural engineering. The load carrying capacity of shells can be greatly increased by systematically optimising their curved shape. Due to their small thickness the mechanics of shells can be efficiently described with surface models. The mechanical response of a thin shell depends, according to the Kirchhoff-Love model, on the first and second fundamental forms of the surface. In shape optimisation of shells the efficient and flexible description of freeform surfaces and the finite element discretisation of the governing equations defined on them are intrinsically linked. In this paper we use the subdivision surfaces as a common representation for geometric modelling and finite element discretisation of Kirchhoff-Love shell equations. Isogeometric analysis aims to unify geometric modelling and finite element analysis by using for the latter usual computeraided design (CAD) basis functions, like NURBS. Since its inception by Hughes et al. [1, 2] isogeometric analysis has become immensely popular and has been applied to a wide range of engineering problems, too many to list here. Prior to the advent of isogeometric analysis, the integrated geometric modelling and finite element analysis of shells using subdivision surfaces was proposed in [3]. Specifically, Loop subdivision surfaces were used for discretising the Kirchhoff-Love shells and representing their geometry. As an extension of this approach, the treatment of industrially prevalent non-manifold shell ∗ Corresponding author Preprint submitted to Elsevier geometries and the inclusion of out-of-plane shear deformations relevant for thicker shells were proposed in [4] and [5], respectively. More recently the isogeometric analysis of shells and beams using NURBS basis functions were introduced in [6, 7]. The use of smooth subdivision and NURBS basis functions has also the advantage that they have square-integrable curvatures, which is necessary for discretising the Kirchhoff-Love shell equations depending on curvatures. In the present work, we investigate the gradient-based shape optimisation of shell structures using subdivision surfaces for geometric modelling and finite element analysis. The minimised cost function is the compliance so that (qualitatively) displacements, strains and stresses are minimised. In a typical industrial design setting both the input to and output from structural optimisation is a geometry, i.e. a CAD model. During optimisation the cost function and its derivatives with respect to some geometric design parameters need to be computed with finite element analysis. Hence, as a matter of fact, the interoperability of geometry and finite element models is crucial. Equally important are techniques for choosing suitable geometric design variables that can parameterise a sufficiently large set of geometries. Over the years, a wide variety of shape parameterisation techniques have been proposed that are based either on the CAD, finite element or an intermediary model [8, 9]. In one group of techniques the geometric design variables are the parameters of the CAD model or a reconstructed CAD-like spline model [10–14]. In the second group of techniques the design variables are the vertex positions of the finite element mesh [15–17]. Yet in another group of parameterisation techniques, like the ones based on radial basis functions [18] or free-form deformations [19, 20], the design variables are only May 23, 2016 (a) Coarse control mesh. (b) Finite element mesh. (c) Vertical displacement isocontours. Figure 1: Shape optimised thin shell roof structure emanating from a flat plate with stiffeners. The structure is loaded with a uniformly distributed vertical load and is supported at its four corners. The vertex positions of the coarse control mesh (a) represent the optimisation design variables. The compliance cost function and its derivatives are evaluated with finite element analysis using the twice subdivided control mesh (b) and the corresponding smooth subdivision basis functions. The limit surface and the isocontours of the vertical displacement are shown in (c). in this paper was introduced in [26]. In that exploratory work Loop subdivision and non-gradient based optimisation algorithms were used. More recently the proposed multiresolution approach has been applied to other types of optimisation problems, namely electrostatic shape optimisation of high-voltage devices [27] and shape optimisation of volumetric solids [28]. The electrostatic simulations are performed with the boundary element method and the solid simulations with a the voxelbased immersed finite element method. This paper is organised as follows. In Section 2 we begin with reviewing the Kirchhoff-Love model for thin shells and its discretisation with subdivision basis functions. We then introduce the compliance optimisation problem and compute with an adjoint approach the cost function derivatives with respect to the vertex positions of the subdivision control mesh. Section 3 provides a very brief introduction to subdivision surfaces. Subsequently, in Section 4 the multiresolution algorithm is introduced. Finally, in Section 5 we introduce three examples of increasing complexity, namely the shape optimisation of a thinstrip, roof over a rectangular domain and freeform architectural shell roof. indirectly linked to the CAD or FEA model. This list of parameterisation techniques is not intended to be complete. The abundance of shape parameterisation techniques is partly due to the inherent limitations and incompatibilities of conventional CAD and FEA models in the context of shape optimisation. With isogeometric analysis using subdivision surfaces most of the incompatibilities between the CAD and FEA representations can be elegantly circumvented. To this end, the increasing availability of subdivision surfaces in CAD systems, including PTC Creo, CATIA, Siemens NX or Autodesk Fusion 360, is noteworthy. In isogeometric shape optimisation with subdivision surfaces different resolutions, i.e. control meshes, of a surface are employed for optimisation and performing the finite element analysis, see Figure 1. In computer graphics subdivision surfaces are usually viewed as a process for generating increasingly finer meshes that converge in the limit to a surface [21]. Alternatively, they can be viewed as the generalisation of splines to arbitrary connectivity meshes [22]. In the proposed optimisation approach, both viewpoints are simultaneously exploited. Subdivision surfaces are best considered as generalised splines when used as finite element basis functions. On the other hand, the discrete computer graphics viewpoint with the associated data structures and algorithms is best suited for simultaneously operating on different resolutions in a memory and time efficient manner. Our present implementation is based on the triangular Loop [23] and quadrilateral Catmull-Clark schemes [24], or more specifically on their extended versions introduced in [25]. The finite element analysis is performed with basis functions corresponding to a sufficiently fine control mesh. Within the optimisation loop, starting with the coarsest, the vertex positions of increasingly finer control meshes are used as design variables. The resolution of the control mesh determines the extent of applied geometry changes, because each vertex has control over the surface within a two-ring of adjacent elements. An earlier two-level version of the multiresolution optimisation approach proposed 2. Thin-shells 2.1. Governing equations and discretisation We consider a thin-shell with the undeformed mid-surface Ω and the thickness t. The surface Ω is parameterised with the curvilinear coordinates (θ1 , θ2 ) ∈ ’2 providing each material point on the surface with a unique parametric coordinate. The position of the material points is denoted with the coordinates x(θ1 , θ2 ) ∈ ’3 . The standard covariant basis vectors of the mid-surface aα and the unit normal a3 are given by aα = ∂x = x,α , ∂θα a3 = a1 × a2 . |a1 × a2 | (1) The corresponding contravariant base vectors aα are defined through the relation aα · aβ = δαβ , where δαβ is the Kronecker 2 Figure 2: Solid thin-shell and its mid-surface (right) with the position vector x(θ1 , θ2 ). Parameter space with the coordinates (θ1 , θ2 ) is shown on the left. The covariant base vectors a1 and a2 with the normal a3 where E is the Young’s modulus, ν is the Poisson’s ratio and H = H αβγδ aα ⊗ aβ ⊗ aγ ⊗ aδ is an auxiliary fourth order tensor with the contravariant components delta. Here and in the following the Greek indices take the values {1, 2}, Latin indices the values {1, 2, 3} and the summation convention is used. Displacing each material point on the mid-surface with a displacement vector u(θ1 , θ2 ) ∈ ’3 yields a deformed (or, displaced) mid-surface. Subject to few mechanical assumptions, it can be shown that the differences in the first and second fundamental forms of the original and displaced surface provide suitable strain measures. The difference in the first fundamental form is referred to as the membrane strain α and the difference in the second fundamental form as the bending strain β. In case of small displacements the linearised membrane strain tensor is ααβ =  1 aα · u,β + u,α · aβ aα ⊗ aβ 2 1 H αβγδ = ν aαβ aγδ + (1 − ν) (aαγ aβδ + aαδ aβγ ) 2 and the contravariant metric aαβ = aα · aβ . The equilibrium configurations of the shell with prescribed loading are obtained from minimising (4). Note that for a well posed problem also the displacements on some parts of the boundary have to be prescribed in addition to the loading. In a finite element approximation, the mid-surface position and the displacement vectors in (4) are approximated with basis functions and their coefficients X X Ni (θ1 , θ2 )ui . (7) Ni (θ1 , θ2 )xi , u(θ1 , θ2 ) ≈ x(θ1 , θ2 ) ≈ (2) and the linearised bending strain tensor is In our implementation, the basis functions Ni (θ1 , θ2 ) are obtained either from triangular Loop subdivision or quadrilateral Catmull-Clark subdivision. In both schemes there is one basis function associated with each each vertex of the control mesh. Hence, the coefficients xi and ui are simply the position and displacements of a (control) vertex with the index i. Introducing the approximations (7) into the potential (4) yields a discrete minimisation problem for computing the vertex displacements ui . Next, we consider the potential energy of the displaced shell Z   Π(u) = W m (α) + W b (β) |a1 × a2 | d Ω ZΩ Z (4) − p· udΩ − r · u d Γ, Γ ui = arg min Π(ui ) ⇒ ui where the first integral is the internal potential energy consisting of the sum of the internal membrane and bending energy densities W m and W b , respectively. The remaining two integrals represent the external potential energy resulting from the prescribed surface load vector p and the edge load vector r. For an elastic material the two internal energy densities are defined with 1 Et α:H:α 2 1 − ν2 1 Et3 W b (β) = β : H : β, 2 12(1 − ν2 ) i i 1 β = −u,αβ · a3 + √ [u,1 ·(aα,β × a2 ) + u,2 ·(a1 × aα,β )] a (3) ! a3 · aα,β + [u,1 ·(a2 × a3 ) + u,2 ·(a3 × a1 )] aα ⊗ aβ . |a1 × a2 | Ω (6) ∂Π(ui ) =0 ∂ui (8) In order to compute the stationary points of Π(ui ) domain integrals are numerically evaluated in a usual finite element fashion by iterating over the elements/faces in the control mesh. To this end, we use Gauss integration with 3 points for Loop and 4 points for Catmull-Clark subdivision. The basis function values at the Gauss points are evaluated with the simplified version of the algorithm proposed by Stam [29, 30], see [3, 4]. Specifically, since the Gauss points are relatively far from extraordinary vertices there are no efficiency gains from the eigendecomposition considered in [29, 30]. After numerical integration the W m (α) = (5) 3 stationarity condition for the minimisation problem (8) yields a discrete system of equations ∂Π(ui ) = 0 ⇒ Ku = f, ∂ui Hence, in gradient-based shape optimisation the vertex coordinates have to be perturbed in the direction v = −2uT (9) 2.2. Shape gradients In shape optimisation we consider a shell structure with prescribed loading and displacement boundary conditions and aim to find its mid-surface such that a user chosen cost function (10) x is minimised. As a constraint the array of the vertex displacements u has to satisfy the equilibrium equations (9). In practice, there are additional constraints, for instance pertaining to the surface area of the shell or the position of selected vertices, which will be omitted in this section. Moreover, in all examples presented in this paper the cost function is the compliance of the structure J(x, u) = uT f = uT Ku . 3. Subdivision surfaces In the isogeometric analysis context it is expedient to consider subdivision surfaces as the generalisation splines to arbitrary connectivity meshes. As known, refinable basis functions allow to represent the same spline surface with control meshes of different resolutions. Loop subdivision [23] is the generalisation of quartic box-splines to arbitrary connectivity triangular meshes and Catmull-Clark [24] subdivision is the generalisation of tensor-product cubic b-splines to arbitrary connectivity quadrilateral meshes. Both schemes lead to basis functions that are refinable. The control meshes are refined by quadrisection of elements. In triangular Loop subdivision this is achieved by introducing a new vertex on each edge. In Catmull-Clark in addition to new vertices on the edges a new vertex at the centre of each element is created. The control vertex coordinates of a refined mesh at level `+1 are obtained from the vertex coordinates of the coarse mesh at level ` according to (11) Informally, minimising the compliance leads to stiffer shell structures with smaller displacements u. The subsequent derivations carry over to other cost functions, see e.g. [31]. In order to use a gradient-based optimisation algorithm for minimising J(x, u) the derivatives of the cost function with respect to the vertex coordinates, also refereed to as shape gradients or design sensitivities, are needed. To this end, we consider the adjoint formulation with L(x, u, λ) = uT Ku + λT [f − Ku], (12) where λ is an array of Lagrange parameters. The stationarity condition for L(x, u, λ) with respect to the vertex displacements leads to the adjoint problem ∂L(x, u, λ) =0 ∂u ⇒ Kλ = 2Ku ⇒ (16) to achieve a decrease in the cost function. In order to compute v the derivatives of the load vector and stiffness matrix with respect to the vertex coordinates are needed. For the considered Kirchhoff-Love shell formulation it is straightforward to compute these derivatives by systematic element-by-element differentiation of the discrete equilibrium equations (9). Note that other shell formulations, especially ones available in commercial software, contain as degrees of freedom in addition to vertex positions also the rotations of vertex director vectors. This usually makes the computation of the related the shape gradients more complex. where K is the symmetric, positive-definite stiffness matrix, u is the array of vertex displacements containing all ui and f is the array of vertex forces. min J(x, u) ∂f ∂K + uT u . ∂x ∂x x`+1 = Sx` . (17) For vertices located in the regular regions of a mesh the subdivision matrix S contains the standard knot insertion weights. The matrix components associated to the vertices in the irregular regions are given by the specific subdivision scheme. The successive subdivision refinement of a control mesh can be interpreted as the chain of linear mappings λ = 2u . (13) Here, we made use of the symmetry of the stiffness matrix K. The equality between the Lagrange parameters λ and displacements u (up to the constant 2) is only valid when the compliance cost functions is considered. The stationarity condition for L(x, u, λ) with respect to the vertex coordinates leads to the discrete shape gradients " # ∂L(x, u, λ) ∂K T ∂K T ∂f =u u + 2u − u (14) ∂x ∂x ∂x ∂x ∂f ∂K = 2uT − uT u . (15) ∂x ∂x x0 S x1 S x2 S ··· S x`−1 S x` . (18) The size of the vertex coordinate x` increases with increasing ` and the size of the subdivision matrix S increases accordingly. All control meshes converge irrespective of their level ` to the same surface. The algorithm proposed by Stam [29, 30] provides a spline based parameterisation of subdivision surfaces so that the properties of arbitrary surface points can be evaluated, cf (7). There are also alternative parameterisations available, see [32, 33]. At equilibrium, that is when Ku − f = 0 is exactly satisfied, the gradients of the Lagrangian L(x, u, λ) and the cost function J(x, u) with respect to the vertex coordinates are identical. 4 Algorithm 1 Multiresolution shape optimisation In shape optimisation the coarsening of the refined subdivision control meshes is also needed, that is, x` = Rx`+1 with R = (ST S)−1 ST , // read maximum optimisation level `o,max // read finite element analysis level `c // read input coarse control mesh x0 // initialise optimisation level (19) where the coarsening matrix R is defined as the pseudo-inverse of the subdivision matrix S. The span of geometries that can be represented with x`+1 are larger than the one with x` , hence the specific form of R is a choice. Similar to subdivision refinement the coarsening matrix can be successively applied in order to obtain coarser representations of the geometry, i.e., x0 R x1 R x2 R ··· R x`−1 R x` 1: `o = 0 // initialise cost function 2: J=∞ // iterate over optimisation levels 3: while `o ≤ `o,max do // update vertex coordinates x`o while cost function decreases 4: repeat // subdivide optimisation level `o up to analysis level `c . (20) 5: 6: Note that, by definition (19), one step of subdivision refinement followed by one step of coarsening does not change the vertex coordinates, or RS = I. for ` ← `o to `c do x` ← Sx` // compute cost function J = J(x`c , u`c ) and its gradient v`c // project gradient to optimisation level 7: 8: for ` ← `c to `o do v` ← Rv` // update vertex coordinates of the optimisation level 4. Shape optimisation 9: 10: The subdivision surfaces enable us to use different resolutions of the same geometry for optimisation and analysis. Crucially, in the spirit of isogeometric analysis the control meshes for analysis and optimisation represent the same surface. A simplified two-level version of the proposed iterative gradientbased optimisation algorithm is shown Algorithm 1. The optimisation and analysis meshes correspond to different refinement levels in a subdivision hierarchy. The optimisation level is `o = 0 and the analysis level is `c = n, where n is user prescribed. The gradient of the compliance cost function v`c is computed with a finite element analysis using basis functions of the control mesh at level `c , see Section 2. Subsequently, through successive multiplication of the gradient with the coarsening matrix R the optimisation level gradient v`o is obtained. As indicated in Algorithm 1 the updated coordinates x`o of the optimisation level can be, for instance, obtained with a simple steepest descent method. Instead of this simple update algorithm, we use in the presented examples the MMA optimisation algorithm in the NLopt library [34]. The MMA algorithm usually requires fewer iterations to converge and is able to consider both equality and inequality side constraints. Moreover, in the presented examples the optimisation level is successively increased every time a stationary point is reached until a user prescribed maximum optimisation level is reached. It is evident that `o ≤ `c . x`o ← (x`o − αv`o ) with α ≥ 0 until (Jprevious − J) < tolerance // increment optimisation level 11: `o ← (`o + 1) 5. Examples Three examples are presented to demonstrate the functioning of the proposed isogeometric shape optimisation of thinshell structures using subdivision. In all examples the objective is to minimise the compliance. As subdivision schemes triangular Loop and quadrilateral Catmull-Clark scheme are used. In order to preserve corners and edges of the original geometry, at vertices and edges on the boundary modified subdivision stencils are applied [4, 25]. 5.1. Thin strip In this verification example, a thin strip pinned at both ends and subjected to a vertical distributed load is optimised, see Figure 3. Initially, the strip is a narrow flat plate with length 1 equal to the distance between the supports. The magnitude of the vertical uniformly distributed load is 1000. The width of the strip is 0.05; the thickness is 0.02; the Young’s modulus is E = 2 × 108 ; and the Poisson’s ratio is ν = 0.3. The Catmull-Clark subdivision scheme is used for representing the geometry and finite element analysis. The initial coarse mesh used for optimisation contains only 3 elements along the length and 1 element across the width of the strip. This increases to 48 in the twice subdivided analysis fine mesh, i.e. `c ≡ 2. During compliance optimisation the mesh resolution is increased starting from `o = 0 up to `o = 2. Only the out-of-plane position of the control points in the direction of the load vector are optimised. The length of the optimised strip is prescribed to be either 1.1, 1.2 or 1.3. 5 (a) Initial geometry. (a) Prescribed length = 1.1. (b) Optimised geometry. Figure 3: Optimisation of an uniformly loaded thin strip. As known from classical mechanics, the shape of the curve assumed by a loose string pinned at both ends is a catenary curve [35], which is for the considered geometry of the form y = c1 · cosh (x/c1 ) + c2 , (b) Prescribed length = 1.2. (21) where the y-axis is parallel to the applied load vector and the left and right supports have the coordinates (−0.5, 0) and (0.5, 0), respectively. The constants c1 and c2 depend on the chosen length of the optimised strip. The comparison of the optimisation results with the corresponding catenary curves is shown in Figure 4. The reduction of the cost compliance function is more than 99.9% and the optimisation results show good visual agreement with the catenary curve. The slight deviation from the catenary is possibly due to the finite width of the strip, which leads during optimisation to some curvature generation across the width of the shell (visible in Figure 3b). (c) Prescribed length = 1.3. Figure 4: Optimisation of a thin strip with different prescribed lengths. The blue lines show the centre line of the strip before and after optimisation and the dotted black line is the catenary curve. 5.2. Shell roof over a rectangular domain Our second example is adapted from Bletzinger and Ramm [11] and considers the compliance optimisation of a roof over a rectangular domain, see Figure 5. The roof has the plan of 6×12 and is pinned along its two long edges. The applied loading consists of a uniformly distributed vertical load of 5000. The shell thickness is t = 0.05; the Young’s modulus is E = 3 × 1010 ; and the Poisson’s ratio is ν = 0.2. As indicated in Figure 5, Bletzinger and Ramm used only the two height parameters s1 and s2 to optimise the roof geometry while maintaining a bi-parabolic shape. Moreover, they chose a cylindrical shell as their initial shape prior to optimisation. 6 Figure 6: Roof over a rectangular domain with four different coarse control meshes. Each column shows the coarse control mesh, the obtained optimised geometry and the corresponding cost function value. In the performed computations a flat rectangle with four different control mesh layouts is used as the initial geometry, see Figure 6. The aim of choosing the different initial meshes is to highlight the mesh dependence of the optimised shape. With a gradient-based algorithm a certain mesh dependence of the optimisation results is unavoidable because most structural optimisation problems are non-convex. In the computed four different cases, during optimisation only the out-of-plane position of vertices are modified with an prescribed upper bound of 6 in order to reproduce the effect of limiting the maximum height s1 ≤ 6 in [11]. In all cases the analysis level is chosen with `c ≡ 2. The optimisation level starts with `o = 0 and is incremented each time the cost function reaches a steady state as long as `o ≤ `c ≡ 2. In Figure 6 the optimised geometries and the corresponding cost function values are shown. The given cost function values are obtained using a fine computational mesh, which has a comparable resolution in all four cases. For comparison, the cost function of the initial flat rectangular plate is ≈ 46 × 104 . In all four cases a large reduction in the cost function is achieved and there are significant differences in the final geometries. Only starting off with very few optimisation variables in the initial coarse mesh, like in A and B, appears to give the lowest minima. Note also the resemblance of the optimised geometries for meshes A and B to the result given in [11] shown in Figure 5b. The results for meshes A and B have lower cost function values possibly due to the presence of the fine scale ripples on the optimised geometries that can be seen Figure 6, first and second columns. The choice of the optimisation and computational levels `o and `c is studied next, see Figure 7. In one set of computations, referred to as single resolution optimisation, the two levels are chosen to be the same `o ≡ `c . This means the optimisation variables are simply the out-of-plane positions of the vertices of the computational mesh. In a second set of computations, referred to as multiresolution optimisation, the optimisation level always starts with `o = 0 and is successively incremented as long as `o ≤ `c , as discussed in the preceding paragraph. The (a) Initial geometry (J(x, u) = 2108). (b) Optimised geometry (J(x, u) = 149.68) Figure 5: Roof over a rectangular domain. Initial and optimised geometries from Bletzinger and Ramm [11]. The given compliance cost functions values are computed with the introduced thin-shell solver. 7 obtained cost functions for the two different optimisation strategies and for `c ∈ {0, 1, 2, 3, 4} are plotted in Figure 7. In the cost function plot each point represents one independent optimisation problem. For all problems the initial control mesh is the quadrilateral mesh A shown in Figure 6. Note that as expected the result for the multiresolution optimisation for large `c ≥ 2 is the same as in Figure 6, first column. In contrast, for single level optimisation the obtained geometries become highly oscillatory when the level `o ≡ `c is increased. In Figure 7 all the given cost functions are obtained using a fine control mesh with the same resolution for all data points. Design A Design B Design C Labels of the fixed vertices square, filled diamond square, filled diamond, empty diamond square Table 1: Three design scenarios for the architectural shell roof. The labels refer to the vertices in Figure 9 whose coordinates are fixed during optimisation. where A0 is the area of the original surface. The initial value of the compliance cost function is 31.36. Design C results in the most efficient optimised shape with a 79.13% reduction in cost, followed by Design A with a reduction of 38.88%. The total reduction in the most constrained Design B is only 23.97%. The corresponding optimised shapes for each design scenario are shown in Figures 10, 11 and 12. As can be seen in these figures the optimised Design C has more variation in the surface curvature, which usually leads to stiffer and less compliant structures. This variation of the curvature is especially pronounced in the large overhanging front part of the shell structure. Note also that on all surfaces the characteristic ridge feature and the sharp corners at both ends of the shell are preserved due to the use of extended subdivision schemes. 5.3. Freeform architectural shell roof In design practice, such as in architectural engineering, in addition to structural efficiency there are a number of equally important, often not explicitly quantifiable, design objectives. Although there is a dearth of research on the use of optimisation in a professional design setting, a recent study shows that designers usually use optimisation for generating ideas, that is to discover new and unexpected geometries, and do not see it as a means for generating the ultimate design [36]. Within this context, isogeometric shape optimisation can aid the systematic search for structurally efficient geometries. To illustrate the use of multiresolution optimisation in a more realistic design setting we consider the roof structure shown in Figure 8. The approximate dimensions of the shell structure are 2.31 × 6.27 × 0.75. It is supported only at three points and contains at the top an opening for lighting purposes and a crease (G0 -continuous feature line). The applied loading consists of a uniformly distributed load of −1000 (downwards). The shell thickness is t = 0.02; the Young’s modulus is E = 1010 ; and the Poisson’s ratio is ν = 0.2. The triangular control mesh with 26 vertices is depicted in Figure 9. On the control mesh some of the vertices are tagged as corner vertices (empty squares) and some of the edges as crease edges (thick lines). At tagged vertices and edges locally modified stencils are applied during subdivision refinement, see [4, 25] for details. These stencils ensure that sharp corners and G0 -continuous feature lines are preserved. The visual effect of the tagging on the limit surface in Figure 8 is evident. Moreover, the tags have an influence on the entries in the subdivision matrix S and the coarsening matrix R defined in Section 3 and the basis functions Ni (θ1 , θ2 ) defined in Section 2.1. For shape optimisation three different design scenarios, referred to as Design A, Design B and Design C, are considered, see Table 1. Depending on the design scenario the positions of some of the highlighted vertices in Figure 9 are fixed during the optimisation iterations. The coarsest control mesh shown in Figure 9 for optimisation contains 26 vertices and the twice subdivided finite element mesh with `c = 2 contains 272 vertices. The design variables in optimisation are the out-of-plane plane positions of the vertices. This choice ensures that the planform of the roof shell is preserved. Only the positions of vertices in levels `o = 0 and `o = 1 are optimised, in turn. The optimisation of the vertex positions in the second level results in surfaces with fine-scale oscillations and has been omitted. It is also necessary to restrict the surface area of the shell to A ≤ 1.2A0 , 5.4. Conclusions We introduced the isogeometric shape optimisation of shell structures using triangular Loop and quadrilateral Catmull-Clark subdivision surfaces as a common representation for geometric modelling and finite element analysis. The presented examples demonstrate that efficient and flexible representation of freeform shell geometries is essential for shape optimisation. In the implemented gradient-based shape optimisation approach more optimal geometries are obtained when, starting from the coarsest control mesh, the vertices of increasingly finer control meshes are chosen as geometric design variables. Irrespective of the control mesh resolution for optimisation a sufficiently fine control mesh can always be used for finite element discretisation. In general the finite element control meshes have to be finer than the optimisation control meshes for accuracy reasons. The introduced approach effectively allows the designer to choose an optimal geometry with a visually pleasing and technically feasible smallest feature size. With the increasing availability of subdivision surfaces in CAD systems it is expected that it will become feasible to import the optimised geometries back into a CAD environment for continuing with the design process. The presented isogeometric shape optimisation approach can be extended and improved in several ways. First, we considered only the structural compliance as a cost function and that for only one loading case. In practice, there are many more load cases and competing cost functions which have to be taken into account. For instance, the structural stability, i.e. buckling, of optimised thin shells is often critical and has to be taken into account [37]. Moreover, the geometric fidelity of the surfaces in the presented approach can be improved using more 8 Figure 7: Comparison of single and multiresolution optimisation for a roof over a rectangular domain. The coarse control mesh in all cases is the quadrilateral mesh A shown in Figure 6. The dashed red line indicates single resolution optimisation with `o ≡ `c . The dotted blue line indicates multiresolution optimisation, which starts with optimisation level `o = 0 and increments it while `o ≤ `c . Each data point in the plot denotes the final cost on an independent optimisation study. Inset pictures are the optimised shapes at the indicated data points. (b) Front view. (a) Perspective view. (c) Back view. Figure 8: Freeform architectural roof supported at three points and containing a central opening and a creased ridge (with G0 continuity). The corresponding coarse resolution control mesh is shown in Figure 9. 9 (b) Front view. (a) Top view. (c) Back view. Figure 9: Triangular coarse control mesh with vertex and edge tags. The black square vertices indicate corner tags and the thick black edges indicate crease tags. The effect of the tagging on the limit surface can be observed in Figure 8. During the considered three optimisation design case studies (Design A, Design B and Design C) some of the vertex coordinates are fixed as specified in Table 1. (b) Front view (a) Perspective view. (c) Back view Figure 10: Limit surface of the optimised architectural roof Design A. The final value of the compliance is 19.17 representing a 38.88% reduction. (b) Front view. (a) Perspective view. (c) Back view. Figure 11: Limit surface of the optimised roof Design B. The final value of the compliance is 23.84 representing a 23.97% reduction. 10 (b) Front view. (c) Back view. (a) Perspective view. Figure 12: Limit surface of the optimised roof Design C. The final value of the objective function is 6.55 representing a 79.13% reduction. recent higher-degree subdivision surfaces, such as the NURBScompatible subdivision surfaces [38], or adaptively refined subdivision surfaces [39, 40]. Finally, the multiresolution editing techniques from computer graphics based on wavelet-like decomposition of surfaces can be employed for interlacing geometry generation by the user with automated structural optimisation [28]. [14] [15] [16] References [17] [1] T. J. R. Hughes, J. A. Cottrell, Y. Bazilevs, Isogeometric analysis: CAD, finite elements, NURBS, exact geometry and mesh refinement, Computer Methods in Applied Mechanics and Engineering 194 (2005) 4135–4195. [2] J. A. Cottrell, T. J. R. Hughes, Y. Bazilevs, Isogeometric Analysis: Toward Integration of CAD and FEA, John Wiley & Sons Ltd., 2009. [3] F. Cirak, M. Ortiz, P. Schröder, Subdivision surfaces: A new paradigm for thin-shell finite-element analysis, International Journal for Numerical Methods in Engineering 47 (2000) 2039–2072. [4] F. Cirak, Q. Long, Subdivision shells with exact boundary control and non-manifold geometry, International Journal for Numerical Methods in Engineering 88 (2011) 897–923. [5] Q. Long, P. B. Bornemann, F. Cirak, Shear-flexible subdivision shells, International Journal for Numerical Methods in Engineering 90 (2012) 1549–1577. [6] J. Kiendl, K.-U. Bletzinger, J. Linhard, W. R., Isogeometric shell analysis with Kirchhoff-Love elements, Computer Methods in Applied Mechanics and Engineering 198 (2009) 3902–3914. [7] A. P. Nagy, M. M. Abdalla, Z. Gürdal, Isogeometric sizing and shape optimisation of beam structures, Computer Methods in Applied Mechanics and Engineering 199 (2010) 1216–1230. [8] R. T. Haftka, R. V. Grandhi, Structural shape optimization — a survey, Computer Methods in Applied Mechanics and Engineering 57 (1986) 91– 106. [9] J. A. Samareh, Survey of shape parameterization techniques for highfidelity multidisciplinary shape optimization, AIAA journal 39 (2001) 877–884. [10] V. Braibant, C. Fleury, Shape optimal design using b-splines, Computer Methods in Applied Mechanics and Engineering 44 (1984) 247–267. [11] K.-U. Bletzinger, E. Ramm, Form finding of shells by structural optimization, Engineering with Computers 9 (1993) 27–35. [12] E. Cervera, J. Trevelyan, Evolutionary structural optimisation based on boundary representation of NURBS. Part I: 2D algorithms, Computers & Structures 83 (2005) 1902–1916. [13] T. T. Robinson, C. G. Armstrong, H. S. Chua, C. Othmer, T. Grahs, Optimizing parameterized CAD geometries using sensitivities based on ad- [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] 11 joint functions, Computer-Aided Design and Applications 9 (2012) 253– 268. X. Han, D. W. Zingg, An adaptive geometry parametrization for aerodynamic shape optimization, Optimization and Engineering 15 (2014) 69– 91. C. Le, T. Bruns, D. Tortorelli, A gradient-based, parameter-free approach to shape optimization, Computer Methods in Applied Mechanics and Engineering 200 (2011) 985–996. M. Firl, R. Wüchner, K.-U. Bletzinger, Regularization of shape optimization problems using FE-based parametrization, Structural and Multidisciplinary Optimization 47 (2013) 507–521. K.-U. Bletzinger, A consistent frame for sensitivity filtering and the vertex assigned morphing of optimal shape, Structural and Multidisciplinary Optimization 49 (2014) 873–895. S. Jakobsson, O. Amoignon, Mesh deformation using radial basis functions for gradient-based aerodynamic shape optimization, Computers & Fluids 36 (2007) 1119–1136. M. H. Imam, Three-dimensional shape optimization, International Journal for Numerical Methods in Engineering 18 (1982) 661–673. T. W. Sederberg, S. R. Parry, Free-form deformation of solid geometric models, SIGGRAPH 1986 Conference Proceedings 20 (1986) 151–160. D. Zorin, P. Schröder, Subdivision for Modeling and Animation, SIGGRAPH 2000 Course Notes, 2000. J. Peters, U. Reif, Subdivision Surfaces, Springer Series in Geometry and Computing, Springer, 2008. C. T. Loop, Smooth Subdivision Surfaces Based on Triangles, Master’s thesis, Department of Mathematics, University of Utah, 1987. E. Catmull, J. Clark, Recursively generated B-spline surfaces on arbitrary topological meshes, Computer-Aided Design 10 (1978) 350–355. H. Biermann, A. Levin, D. Zorin, Piecewise Smooth Subdivision Surfaces with Normal Control, in: SIGGRAPH 2000 Conference Proceedings, New Orleans, LA, 113–120, 2000. F. Cirak, M. J. Scott, E. K. Antonsson, M. Ortiz, P. Schröder, Integrated modeling, finite-element analysis, and engineering design for thin-shell structures using subdivision, Computer-Aided Design 34 (2002) 137– 148. K. Bandara, F. Cirak, G. Of, O. Steinbach, J. Zapletal, Boundary element based multiresolution shape optimisation in electrostatics, Journal of Computational Physics 297 (2015) 584–598. K. Bandara, T. Rüberg, F. Cirak, Shape optimisation with multiresolution subdivision surfaces and immersed finite elements, Computer Methods in Applied Mechanics and Engineering 300 (2016) 510–539. J. Stam, Exact evaluation of Catmull-Clark subdivision surfaces at arbitrary parameter values, in: SIGGRAPH 1998 Conference Proceedings, Orlando, FL, 395–404, 1998. J. Stam, Evaluation of Loop subdivision surfaces, in: SIGGRAPH 1999 Course Notes, Los Angeles, CA, 1999. E. J. Haug, K. K. Choi, V. Komkov, Design Sensitivity Analysis of Struc- tural Systems, Academic Press, 1986. [32] I. Boier-Martin, D. Zorin, Differentiable parameterization of CatmullClark subdivision surfaces, in: Eurographics 2004 Conference Proceedings, ACM, 155–164, 2004. [33] M. Antonelli, C. V. Beccari, G. Casciola, R. Ciarloni, S. Morigi, Subdivision surfaces integrated in a CAD system, Computer-Aided Design 45 (2013) 1294–1305. [34] S. G. Johnson, The NLopt nonlinear-optimization package, http://abinitio.mit.edu/nlopt. [35] E. H. Lockwood, A book of curves, Cambridge University Press, 1961. [36] E. Bradner, F. Iorio, M. Davis, Parameters tell the design story: ideation and abstraction in design optimization, in: Proceedings of the Symposium on Simulation for Architecture & Urban Design, 26, Society for Computer Simulation International, 2014. [37] R. Reitinger, E. Ramm, Buckling and imperfection sensitivity in the optimization of shell structures, Thin-walled structures 23 (1995) 159–177. [38] T. J. Cashman, U. H. Augsdörfer, N. A. Dodgson, M. A. Sabin, NURBS with extraordinary points: high-degree, non-uniform, rational subdivision schemes, in: SIGGRAPH 2009 Conference Proceedings, New Orleans, LA, 46:1–46:9, 2009. [39] X. Wei, Y. Zhang, T. J. R. Hughes, M. A. Scott, Truncated hierarchical Catmull–Clark subdivision with local refinement, Computer Methods in Applied Mechanics and Engineering 291 (2015) 1–20. [40] P. B. Bornemann, F. Cirak, A subdivision-based implementation of the hierarchical b-spline finite element method, Computer Methods in Applied Mechanics and Engineering 253 (2013) 584–598. 12
5cs.CE
AN ALGORITHM FOR CANONICAL FORMS OF FINITE SUBSETS OF Zd UP TO AFFINITIES arXiv:1408.3310v3 [cs.DS] 8 Feb 2016 GIOVANNI PAOLINI Abstract. In this paper we describe an algorithm for the computation of canonical forms of finite subsets of Zd , up to affinities over Z. For fixed dimension d, this algorithm has worst-case asymptotic complexity O(n log2 n s µ(s)), where n is the number of points in the given subset, s is an upper bound to the size of the binary representation of any of the n points, and µ(s) is an upper bound to the number of operations required to multiply two s-bit numbers. This problem arises e.g. in the context of computation of invariants of finitely presented groups with abelianized group isomorphic to Zd . In that context one needs to decide whether two Laurent polynomials in d indeterminates, considered as elements of the group ring over the abelianized group, are equivalent with respect to a change of base. 1. Introduction The problem we are going to study is that of algorithmically determining whether two configurations of points in the d-dimensional integral lattice can be obtained, one from the other, through an affine automorphism of Zd . Such affine automorphism need not preserve the order in which the elements of the two sets are specified. If we required instead the order to be preserved, the problem could be more easily solved using the Hermite normal form (see Section 3). For instance, the second set of points in Figure 1 can be obtained from the first one by applying the affinity     −1 −1 13 x 7→ x+ . 0 1 0 x2 x2 x1 x1 Figure 1. Example of two equivalent sets for d = 2. 1 2 GIOVANNI PAOLINI Instead of trying to directly find if two given sets of points are equivalent (i.e. if there is an affinity that maps one onto the other), we will describe a procedure to compute a “canonical form” of a set. Then, to check the equivalence of two sets, it will suffice to check the equality of their canonical forms. Different possible approaches to this problem were tried by the author, before coming to the one described in this paper. For instance one can exploit geometric and/or combinatorial constructions, such as the convex hull, which is equivariant under the action of the affine group. In dimension d ≤ 3, a fast algorithm (linear up to a logarithmic factor) based on the computation of the convex hull was indeed found, but was not published. Another approach could be to define the canonical form of a set as an element of the orbit which minimizes some quantity (such as the k · k1 norm or the k · k∞ norm), but we couldn’t find a reasonably fast algorithm to do this. The approach presented here is completely different, and is based on arithmetic properties of the integral lattice. Its advantages are the almost linear asymptotic complexity (in terms of the size of the set), the generality (it works for any dimension d, despite the running time strongly depends on it) and a simple implementation. One situation in which this problem arises is in the context of isomorphism between finitely presented torsion-free groups, and particularly in the case of fundamental groups of topological spaces. Let G be a finitely presented group with abelianized group H isomorphic to Zd , and let ψ : H → Zd be an isomorphism. In [3] it is shown how to construct, from G and ψ, a Laurent polynomial ∆(t1 , . . . , td ), called Alexander polynomial, which is defined up to a factor ±tλ1 1 · · · tλd d (λi ∈ Z). This polynomial depends on the chosen isomorphism ψ between the abelianized group and Zd (in other words, it depends on the choice of a base for H). In order to obtain an invariant of G (up to group isomorphisms), one should determine a canonical form for the Alexander polynomial up to change of base for H. It turns out (see [1]) that a change of base, given by a linear automorphism A of Zd , affects every md 1 monomial αtm by transforming the exponents vector (m1 , . . . , md )t with A. 1 · · · td Since the Alexander polynomial is itself determined up to a factor ±tλ1 1 · · · tλd d , an invariant of G is given by the Alexander polynomial up to the action of the group of affine automorphisms of Zd (and a possible change of sign). The determination of a canonical form for such action is therefore related to the problem we are going to discuss. In Section 2, we will formally state the problem we are going to solve, and we will introduce some notation. Throughout Sections 3-5 we will describe the algorithm, prove its correctness and analyze its complexity. In Section 6, we illustrate how to modify the algorithm in order to compute a canonical form of the Alexander polynomial. Section 7 provides a final discussion with some concluding remarks. 2. Preliminaries and notations Let d be a fixed positive integer. Let GL(d, Z) be the group of linear automorphisms of Zd over Z, i.e. the group of d × d matrices with entries in Z and determinant ±1. Moreover, let Aff(d, Z) be the group of affinities of Zd . The group Aff(d, Z) can be regarded as a subgroup of GL(d + 1, Z): the affinity x 7→ Ax + b, with A ∈ GL(d, Z) and b ∈ Zd , is represented by the block matrix   A b . 0 1 CANONICAL FORM OF FINITE SUBSETS OF Zd 3 Let Xd be the set of all finite subsets Λ of Zd . The natural action of Aff(d, Z) on Zd induces an action of Aff(d, Z) on Xd : explicitly, if ϕ ∈ Aff(d, Z) and Λ = {p1 , p2 , . . . , pn } ⊆ Zd , the action is given by ϕ({p1 , p2 , . . . pn }) = {ϕ(p1 ), ϕ(p2 ), . . . ϕ(pn )}. Our purpose is to describe a canonical form for elements of Xd up to the action of Aff(d, Z), and an algorithm for the computation of such a canonical form. For any fixed dimension d, our algorithm will have worst-case asymptotic complexity O(n log2 n s µ(s)). Here, n is the size of the given subset Λ of Zd (as above) and s is an upper bound on the size of the binary representation of any coordinate of any point of Λ. Since d is fixed, s is also (up to a constant) an upper bound to the size of the binary representation of any point of Λ. With µ(s) we indicate an upper bound to the cost of multiplying two s-bit integers; for instance, using the Schönhage-Strassen algorithm [7] we would have µ(s) = s log s log log s. Since the concept of “canonical form” plays a key role in this work, we will give the following formal definition. Definition 2.1. Let S be a set, and G be a group acting on S. A canonical form for S with respect to the action of G is a function f : S → S satisfying the following two conditions: (1) f (x) ∈ Orb(x) for all x ∈ S (here we denote by Orb(x) the orbit of x); (2) f (gx) = f (x) for all x ∈ S and g ∈ G. We also say that f : S → S is a weak canonical form if it satisfies condition (2) but doesn’t necessarily satisfy condition (1). The second condition simply says that f is constant over any orbit, so f picks a “canonical representative” from each orbit. Having a computable canonical form allows to test whether two elements x, y ∈ S belong to the same orbit: this happens if and only if f (x) = f (y). We now give a few more definitions which will be useful later. Definition 2.2. A frame is an ordered set of affinely independent points of Qd . Given a set Λ ⊆ Zd , a Λ-frame is a frame included in Λ. A frame Q is Λ-covering if Λ ⊆ Span(Q). A Λ-frame which is also Λ-covering is shortly called a complete Λ-frame. By “Span”, we always mean the affinely generated subspace over the field of the rational numbers (not over Z). Also the expression “affinely independent” is always to be intended over Q, not over Z. Notice that a Λ-covering frame is not necessarily a Λ-frame. We denote by F (Λ) the set of all the Λ-frames, and by Fc (Λ) ⊆ F(Λ) the set of all the complete Λ-frames. Let Yd be the set of the pairs (Λ, Q), with Λ ∈ Xd and Q a Λ-covering frame. Roughly speaking, an element of Yd is a finite subset of Zd together with an affine coordinate system. In order to find a canonical form for elements Λ ∈ Xd , we will first do it for elements (Λ, Q) ∈ Yd , and then we will describe a canonical way to choose a frame Q for each set Λ. 3. Canonical form, given a frame In this section, we want to describe an algorithm that, given a pair (Λ, Q) ∈ Yd , returns a pair (Ω, U ) = f (Λ, Q) which has the following properties: 4 GIOVANNI PAOLINI (1) Ω is a finite subset of Zd in the same orbit of Λ with respect to the action of Aff(d, Z); (2) U is a complete Ω-frame; (3) f is a weak canonical form for Yd in the sense of Definition 2.1, i.e.  f ϕ(Λ), ϕ(Q) = f (Λ, Q) ∀ ϕ ∈ Aff(d, Z). Notice that f is not required to be a canonical form (the frame U is not necessarily the image of the frame Q under some affinity; in general, they don’t even have the same size). In what follows we are going to use the Hermite normal form (see for instance [2] and [6]), shortened “HNF”. Briefly, the Hermite normal form of an integer d × n matrix is a canonical form up to left-multiplication by elements of GL(d, Z) (but this is not the only property of the HNF we will use). The following is the pseudocode of the algorithm, which will be subsequently described in words. Algorithm 3.1 (Canonical form, given a frame). This algorithm takes in input a pair (Λ, Q) ∈ Yd and outputs a pair (Ω, U ) with the properties described above. 1: function CanonicalFormWithFrame(Λ, Q) 2: T ← Q ∩ Λ as a list, with the ordering induced by Q 3: k ← dim Span(Λ) 4: while |T | < k + 1 do 5: p ← the point of Λ \ Span(T ) such that its coordinates with respect to 6: the frame Q are lexicographically minimal 7: T ← T ∪ {p} 8: end while 9: {p0 , . . . , pk } ← T 10: M ← d × k matrix with columns p1 − p0 , . . . , pk − p0 11: A ← any element of GL(d, Z) such that AM = HNF(M ) 12: ψ ← affinity definedby x 7→ A(x − p0 ) 13: return ψ(Λ), ψ(T ) 14: end function Let us describe briefly the steps of Algorithm 3.1. On line 2, we initialize a new frame T (which is actually a Λ-frame), extracting from Q the elements that also belong to Λ. T is given the ordering induced as a subset of Q. Then, on lines 4-8, we complete T to a Λ-covering frame using points of Λ (thus T becomes a complete Λ-frame). This is done adding a point of Λ at a time, each time choosing the point that minimizes the coordinates vector with respect to the frame Q (the coordinates vectors are compared lexicographically). Then, if p0 , . . . , pk are the elements of T , on line 10 we define the matrix M as   M = p1 − p0 . . . pk − p0 . On line 11, we define A as any d × d matrix such that the left multiplication by A sends M to its Hermite normal form (the standard algorithms to compute the HNF also compute such an A). Finally, we define ψ as the affinity x 7→ A(x − p0 ), which is the affinity that maps p0 to the origin and each pi (i = 1, . . . , k) to the i-th column of HNF(M ). The affinity ψ is used to transform the pair (Λ, T ) into the pair which is then returned. Properties (1) and (2) at the beginning of this section CANONICAL FORM OF FINITE SUBSETS OF Zd 5 are automatically verified by Algorithm 3.1. Property (3) is given by the following theorem. Theorem 3.2. The function defined by Algorithm 3.1 is a weak canonical form. Proof. Suppose the function CanonicalFormWithFrame is given in input the pair (Λ̃, Q̃) instead of (Λ, Q), where Λ̃ = ϕ(Λ) and Q̃ = ϕ(Q) for some ϕ ∈ Aff(d, Z). Let’s analyze how this change affects the output. We denote all the variables of the execution of the call CanonicalFormWithFrame(Λ̃, Q̃) by adding a tilde over them, in order to distinguish them from those of the call CanonicalFormWithFrame(Λ, Q). First (line 2), we have T̃ = Q̃ ∩ Λ̃ = ϕ(Q) ∩ ϕ(Λ) = ϕ(T ). Then we turn to lines 4-8: inductively it is easy to show that, at each step of the cycle, T̃ = ϕ(T ) (this is true because the coordinates of a point p ∈ Λ with respect to the frame Q are the same as the coordinates of the point ϕ(p) ∈ ϕ(Λ) with respect to the frame ϕ(Q)). So, after the execution of the cycle, we still have T̃ = ϕ(T ) as ordered sets. Let p̃0 , . . . p̃k be the elements of T̃ , so that p̃i = ϕ(pi ) for all i. Let B be the linear part of the affinity ϕ (so ϕ has the form x 7→ Bx + v, for some v ∈ Zd ). The i-th column of the matrix M̃ (line 10) is then p̃i − p̃0 = ϕ(pi ) − ϕ(p0 ) = B(pi − p0 ). Thus we have the relation M̃ = BM , which means that the matrices M̃ and M are equivalent to each other, up to left multiplication. In particular, they have the same Hermite normal form. This means that ÃM̃ = AM (line 11). In other words (reading this equality column by column), for each i we have that  (1) Ã B(pi − p0 ) = A(pi − p0 ). Relation (1) can be interpreted as follows: the linear transformations ÃB and A coincide on the vectors pi − p0 , and so they coincide on the linear span of these vectors, which is the tangent space of Span(Λ) in the point p0 . The affinity ψ̃ defined on line 12 maps x to Ã(x − p̃0 ) = Ã(x − ϕ(p0 )). Now, let p̃ = ϕ(p) be a point of Λ̃, with p ∈ Λ. Then,   ψ̃(p̃) = Ã p̃ − ϕ(p0 ) = Ã ϕ(p) − ϕ(p0 )  (∗) = Ã B(p − p0 ) = A(p − p0 ) = ψ(p), where the equality marked with a (∗) follows by the fact that p − p0 belongs to the tangent space of Span(Λ) in the point p0 . So we have finally proved that ψ̃(Λ̃) = ψ(Λ). Similarly, we also have that ψ̃(p̃i ) = ψ(pi ) for all i, and thus ψ̃(T̃ ) = ψ(T ) as ordered sets.  Remark 3.3. Line 2 of Algorithm 3.1 could be replaced by the simpler initialization “T ← ∅”, and Theorem 3.2 would still hold. But the slightly more complicated initialization of line 2 will be required in the proof of Lemma 4.8. Theorem 3.4. If d is fixed, then the worst-case asymptotic complexity of Algorithm 3.1 is O(n µ(s)), where n = |Λ| and s is an upper bound on the size of the binary representation of any element of Λ or Q. Moreover, the size of the binary representation of any element of the returned set Ω is O(s). Proof. Lines 2-10 require O(n µ(s)) operations. Since the size of M is O(s) the computation of the Hermite normal form of M can be done in O(µ(s)) time, for instance combining the triangularization algorithm in [4] and the HNF computation in [8]. In [8] it is also shown that log kHNF(M )k = O(s), where k · k denotes the 6 GIOVANNI PAOLINI maximum absolute value of an entry of the matrix. In O(µ(s)) time, A and ψ can be computed too (and they share the same bound on the coefficients as HNF(M )). Finally, the computation of ψ(Λ) requires O(n µ(s)) operations, and that of ψ(T ) requires O(µ(s)) operations. The fact that the binary representation of the elements of Ω is O(s) follows easily from the previous arguments.  4. Getting an Aff(d, Z)-equivariant set of complete Λ-frames We will now describe an algorithm which, given an input set Λ ⊆ Zd , equivariantly returns a nonempty set of complete Λ-frames. Here by “equivariantly” we mean Aff(d, Z)-equivariantly: if Λ̃ = ϕ(Λ) for some ϕ ∈ Aff(d, Z), and the output of the algorithm applied to Λ is a set of frames {R1 , . . . , Rm }, then the output of the algorithm applied to Λ̃ is {ϕ(R1 ), . . . , ϕ(Rm )}. Notice that the output set of frames is unordered, whereas each of the frames is itself an ordered set of points. Remark 4.1. The set of all complete Λ-frames satisfies the equivariance condition, but this set is too large for any practical purpose (its size is Ω(nd ) in the worst case). For this reason we need to equivariantly select a “small” subset of it. Recall from Section 2 that we denote by F (Λ) the set of all the Λ-frames, and by Fc (Λ) the set of all complete Λ-frames. The pseudocode for the above-mentioned algorithm is the following. Algorithm 4.2 (Equivariant set of complete Λ-frames). This algorithm takes in input a finite set Λ ⊆ Zd and equivariantly returns a nonempty set of complete Λ-frames. 1: function EquivariantFrames(Λ) 2: if |Λ| = 1 then ⊲ Λ has size 1 (base step of the recursion) 3: return {Λ} 4: end if 5: if all the points of Λ are congruent modulo 2 then 6: p ← any point of Λ 7: Λ′ ← (Λ − p)/2 ⊲ translate point p to origin and divide by 2 8: S ← EquivariantFrames(Λ′ ) 9: return 2S + p ⊲ perform the inverse transformation 10: else 11: {Λ1 , . . . , Λh } ← partition of Λ in congruence classes modulo 2 12: for i ∈ {1, . . . h} do 13: Si ← EquivariantFrames(Λi ) 14: end for Sh S 15: Λ′ ← i=1 R∈Si R 16: F ← { T ∈ Fc (Λ′ ) | CanonicalFormWithFrame(Λ, T ) is 17: lexicographically minimal } 18: return F 19: end if 20: end function We will now prove the correctness of Algorithm 4.2. CANONICAL FORM OF FINITE SUBSETS OF Zd 7 Lemma 4.3. Let p, q ∈ Zd , and let ϕ be an element of Aff(d, Z). Then, p ≡ q (mod 2) if and only if ϕ(p) ≡ ϕ(q) (mod 2). In other words, being congruent modulo 2 is an affine invariant. Proof. The affinity ϕ will be of the form x 7→ Ax + b, for some A ∈ GL(d, Z) and b ∈ Zd . The condition p ≡ q (mod 2) is equivalent to p = q + 2v for some v ∈ Zd . Applying ϕ to both sides we obtain ϕ(p) = ϕ(q + 2v) = ϕ(q) + 2Av, so ϕ(p) ≡ ϕ(q) (mod 2). The same argument applied to ϕ−1 proves the converse implication.  Theorem 4.4. Algorithm 4.2 terminates, and it equivariantly returns a set of complete Λ-frames. Proof. In each recursive call of EquivariantFrames, either the diameter of Λ is halved or the size of Λ decreases: the former case occurs if the condition of line 5 holds; the latter occurs in the other case (if not all the points of Λ are congruent modulo 2, then the partition of line 11 is made of at least two subsets). As long as the size of Λ remains greater than 1, the diameter of Λ is ≥ 1. So neither of the two above possibilities can happen infinitely many times, and the algorithm eventually terminates. We prove the rest of the statements by induction on the size n of Λ and its diameter. The base step is n = 1, for which the claim is obvious. We may now assume n > 1. We will distinguish two cases. • First case: the condition of line 5 holds. Clearly, by induction, the frames returned on line 9 are complete Λ-frames. Suppose now that Λ is replaced by Λ̃ = ϕ(Λ), where ϕ is the affinity given by x 7→ Ax + b. In line 6, a point p̃ = ϕ(q) is chosen, for some q ∈ Λ. The set Λ̃′ calculated in line 7 is given by ϕ(Λ) − ϕ(q) A(Λ) − A(q) Λ̃ − p̃ = = 2 2 2       p−q p−q Λ−p ′ +A = A(Λ ) + A . =A 2 2 2 Λ̃′ = Then the sets Λ′ and Λ̃′ can be obtained one from the other by applying the affinity x 7→ Ax+ A p−q . By induction, the set of frames S̃ calculated 2 in line 8 is equivariant. Consequently,   p−q S̃ = A(S) + A . 2 Finally, the return value of the call EquivariantFrames(Λ̃) is   p−q + ϕ(q) 2S̃ + p̃ = 2A(S) + 2A 2 = 2A(S) + A(p) − A(q) + A(q) + b = A(2S + p) + b = ϕ(2S + p), which is what we wanted. • Second case: the condition of line 5 is not verified. The sets in F are complete Λ′ -frames. By construction, Λ′ is a subset of Λ and Span(Λ′ ) = Span(Λ). So the sets in F are also complete Λ-frames. By Lemma 4.3, the partition computed on line 11 is Aff(d, Z)-equivariant (notice that such 8 GIOVANNI PAOLINI partition is an unordered set). Thus the unordered set {S1 , . . . , Sh } is also equivariant, and so is the union Λ′ . Finally minimizing CanonicalFormWithFrame(Λ, T ) is an equivariant condition since CanonicalFormWithFrame(Λ, T ) is Aff(d, Z)-invariant (by Theorem 3.2), so F is itself equivariant.  Unfortunately, when the partition found on line 11 of Algorithm 4.2 is very unbalanced (for instance, if |Λ1 | = 1 and |Λ2 | = n − 1), then the depth of the tree of the recursive calls can grow linearly with n. For this reason, we now present a variant to Algorithm 4.2, which will turn out to have the worst-case asymptotic complexity we claimed in Section 2. The idea is to change what is done in lines 16-17, which is a quite rough way to find an equivariant set of frames. To do this, the new recursive function EquivariantFrames2(Λ, Q) takes one more argument, a frame Q, and equivariantly returns a nonempty set S of Λ-frames such that, for each R ∈ S, Q ∪ R is a Λ-covering frame. Similarly to Algorithm 4.2, here by “equivariantly” we mean that, for any ϕ ∈ Aff(d, Z), we have  EquivariantFrames2(ϕ(Λ), ϕ(Q)) = ϕ EquivariantFrames2(Λ, Q) . In what follows, we say that a partition {Λ1 , . . . , Λh } of Λ is balanced if |Λi | ≤ n/2 for all i, where n is the size of Λ. Otherwise, we say that the partition is unbalanced. Algorithm 4.5 (Equivariant set of Λ-frames). This algorithm takes in input a finite set Λ ⊆ Zd and a frame Q ⊆ Qd , and equivariantly returns a nonempty set S of Λ-frames, with the property that Q ∩ R = ∅ and Q ∪ R is a Λ-covering frame for each R ∈ S. 1: function EquivariantFrames2(Λ, Q) 2: Λ ← Λ \ Span(Q) 3: if |Λ| ≤ 1 then 4: return {Λ} 5: end if 6: if all the points of Λ are congruent modulo 2 then 7: p ← any point of Λ 8: Λ′ ← (Λ − p)/2 9: Q′ ← (Q − p)/2 10: S ′ ← EquivariantFrames2(Λ′ , Q′ ) 11: S ← 2S ′ + p 12: return S 13: else 14: {Λ1 , . . . , Λh } ← partition of Λ in congruence classes modulo 2 15: sort {Λ1 , . . . , Λh } by size ⊲ after this, we have |Λ1 | ≤ · · · ≤ |Λh | 16: if |Λh | ≤ n/2 then ⊲ the partition is balanced 17: for i ∈ {1, . . . h} do 18: Si ← EquivariantFrames2(Λi , Q) 19: end for Sh S 20: Λ′ ← i=1 V ∈Si V 21: F ← { R ∈ F(Λ′ ) | Q ∩ R = ∅, Q ∪ R is a Λ-covering frame, and 22: CanonicalFormWithFrame(Λ, Q ∪ R) is lexicographically 23: minimal } 24: else ⊲ the partition is unbalanced 25: for i ∈ {1, . . . h − 1} do CANONICAL FORM OF FINITE SUBSETS OF Zd 9 Si ← EquivariantFrames2(Λi , Q) end for S S Λ′ ← h−1 i=1 V ∈Si V E ← { R ∈ F(Λ′ ) | Q ∩ R = ∅ and Q ∪ R is a (Λ \ Λh )-covering 26: 27: 28: 29: frame } 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: for all R ∈ E do SR ← EquivariantFrames2(Λh , Q ∪ R) end for F ← {R ∪ T | R ∈ E, T ∈ SR , and CanonicalFormWithFrame(Λ, Q ∪ R ∪ T ) is lexicographically minimal } end if return F end if end function Let’s describe briefly the steps of Algorithm 4.5. As in Algorithm 4.2, the main distinction is given by the condition on line 6 (whether all the points of Λ are congruent modulo 2, or not). If the condition on line 6 holds (lines 7-12), all the points of Λ and Q are translated and their coordinates are then divided by 2. The recursive call on line 10 gives an unordered set S ′ of Λ′ -frames, which is then transformed to a set S of Λ-frames. Lines 14-37 are executed if the condition on line 6 is not verified. If the partition of line 14 is balanced (lines 17-23), the behaviour is similar to that of Algorithm 4.2: the function EquivariantFrames2 is called recursively for each subset of the partition (line 18), and then the results are put together on lines 20-23. If the partition is unbalanced (lines 25-35), the largest subset (Λh ) is treated separately (notice that the cycle on line 25 goes from 1 to h − 1, not from 1 to h): as we will see, the reason for this is to increase the asymptotic efficiency. Remark 4.6. If Q = ∅, then Algorithm 4.5 equivariantly returns a set of complete Λ-frames, exactly as Algorithm 4.2 does. However, the two outputs may differ: Algorithms 4.2 and 4.5 calculate different “equivariant forms”. In the rest of this section, we will prove the correctness of Algorithm 4.5 and we will analyze its asymptotic complexity. Theorem 4.7. Algorithm 4.5 terminates, and the set of frames it returns is equivariant. Proof. The arguments are similar to those of Theorem 4.4. The only main difference is given by how the set Λh is treated separately in lines 25-35: however, since there can only be one subset of size greater than n/2, if such a subset exists then it is equivariant (because the partition itself is equivariant, as we already pointed out in the proof of Theorem 4.4). So, treating Λh differently from the other subsets of the partition doesn’t violate the equivariance of the procedure.  Lemma 4.8. For each dimension d > 0 there exists hd > 0 such that, for any Λ′ ⊆ Λ ⊆ Zd and frame Q such that Λ ⊆ Span(Q∪Λ′ ), and for any pair (Ω, U ) ∈ Yd , the set S = {R Λ′ -frame | Q ∩ R = ∅, Q ∪ R is a Λ-covering frame, and 10 GIOVANNI PAOLINI CanonicalFormWithFrame(Λ, Q ∪ R) = (Ω, U )} has size ≤ hd . Proof. Let n = |Λ| and k = dim Span(Λ). First of all, we reduce to the case Span Λ = Qk (where Qk is the affine subspace of Qd consisting of the points with the last d − k coordinates equal to zero). Notice that, if we change both Λ and Q by an affinity ϕ ∈ Aff(d, Z), then S changes also by ϕ, and so its size remains the same. Let’s choose the affinity ϕ (of the form x 7→ Ax + b) as follows. • b = −q, where q is any fixed point of Λ. • Let M be the d × n matrix with columns given by the vectors p − q, for p ∈ Λ (the columns can be arranged in any order). Then, let A ∈ GL(d, Z) be such that AM = HNF(M ). Since the rank of M is k, the Hermite normal form of M has the last d − k rows equal to zero. So the image of Λ through the affinity ϕ is included in Qk , as we wished. We can thus assume, from now on, that Span(Λ) = Qk . Let G be the subgroup of Aff(k, Z) given by the affinities ϑ of Zk ⊆ Qk such that ϑ(Λ) = Λ. Since Λ generates Qk (as an affine space over Q), an affinity ϑ ∈ G is completely determined by its restriction to Λ. Such a restriction is a permutation of Λ, by definition of G. So the order of G is at most n!, and in particular G is finite. We are now going to define an injective map χ : S → G. Fix a frame R0 ∈ S. Let R be any frame in S. By definition of S, we have CFWF(Λ, Q ∪ R) = CFWF(Λ, Q ∪ R0 ) = (Ω, U ), where we have shortened “CanonicalFormWithFrame” with “CFWF”. Let T and T0 be the complete Λ-frames constructed throughout the execution of the function CFWF applied to (Λ, Q ∪ R) and (Λ, Q ∪ R0 ), respectively. Recall that, as an immediate consequence of how the function CFWF is defined, there exist (not necessarily unique) affinities ψ, ψ0 ∈ Aff(d, Z) such that ψ(Λ) = Ω, ψ(T ) = U, ψ0 (Λ) = Ω, ψ0 (T0 ) = U. Let ξ = ψ −1 ◦ ψ0 . The situation is well explained by the following diagram. (Λ, T0 ) ξ ψ0 (Λ, T ) ψ (Ω, U ) So, ξ(Λ) = Λ and ξ(T0 ) = T . The affinity ξ will be of the form x 7→ Bx + c, for some B ∈ GL(d, Z) and c ∈ Zd . Since ξ(Λ) = Λ, the submodule Zk ⊆ Zd is mapped into itself by ξ. So c belongs to Zk (because it is the image of 0, which belongs to Zk ) and B can be written as a block matrix in the following way:   B1 B2 , B= 0 B3 where the block B1 is k × k and the block B3 is (d − k) × (d − k). Notice that, since B is in GL(d, Z), both B1 and B3 must have determinant equal to 1 or −1. In particular, B1 is in GL(k, Z). Consequently, the affinity ϑ defined by x 7→ B1 x + c CANONICAL FORM OF FINITE SUBSETS OF Zd 11 belongs to Aff(k, Z). By construction, we also have that ϑ(Λ) = Λ and ϑ(T0 ) = T . Finally, we define χ(R) = ϑ. As anticipated, we will now show that χ is injective. Suppose that we have χ(R1 ) = χ(R2 ) = ϑ, for some R1 , R2 ∈ S. Let T1 and T2 be the complete Λ-frames constructed throughout the execution of the function CFWF applied to (Λ, Q ∪R1 ) and (Λ, Q∪R2 ), respectively. As a consequence of what we proved above, ϑ(T0 ) = T1 and ϑ(T0 ) = T2 . Thus, T1 = T2 . Assume now by contradiction that R1 6= R2 . Since R1 and R2 are both subsets of Λ, we have that (Q ∪ R1 ) ∩ Λ 6= (Q ∪ R2 ) ∩ Λ. Then the values of T1 and T2 , as they are initialized on line 2 of Algorithm 3.1, are different. Therefore, T1 and T2 are different at the end of the execution too. This is a contradiction, because we proved that T1 = T2 . So χ is injective. Define now π : G → GL(k, Z) as the map that sends an affinity ϑ ∈ G, of the form x 7→ Ex + c, to its linear part E ∈ GL(k, Z). The map π is a group homomorphism, and ker π is the subgroup of G consisting of the translations. Since G is finite, it doesn’t contain any nontrivial translation (because nontrivial translations have infinite order). This means that ker π is trivial, so π is injective. It is shown in [5] that, for any fixed d, there exists a constant hd > 0 such that every finite subgroup of GL(d, Z) has order ≤ hd . The group G can be regarded (through the injective homomorphism π) as a subgroup of GL(d, Z), so G has order ≤ hd . Since we have built an injection χ : S → G, the size of S is also ≤ hd .  Lemma 4.9. If the dimension d is fixed, then the number of frames returned by any call to EquivariantFrames2 is O(1). In other words, there exists a constant hd > 0 (depending on d) such that |EquivariantFrames2(Λ, Q)| ≤ hd ∀ Λ, Q. Proof. The constant hd will be the same as that of Lemma 4.8. Let us analyze the possible return values of a call to EquivariantFrames2. The size of the set returned on line 12 is that of EquivariantFrames2(Λ′ , Q′ ); working by induction on the diameter of Λ, we can assume that such size is ≤ hd . The other possible return values are those assigned on lines 21 and 33; in both cases, Lemma 4.8 assures that the size is ≤ hd .  Theorem 4.10. If the dimension d is fixed, then the asymptotic complexity of Algorithm 4.5 is O(n log2 n s µ(s)), where n and s are as in the statement of Theorem 3.4. Proof. We prove by induction that the execution of EquivariantFrames2(Λ, Q) requires at most γf (w) n log2 n log δ µ(s) + β operations, where γ and β are some constants (depending on d), w = d − dim Span(Q), δ is the diameter of Λ (which we will denote by diam(Λ)), and the function f is defined later in the proof (and depends on d). Once we prove this, we are done since w ≤ d = O(1) and log δ = O(s). The induction is made on the triple (|Λ|, diam(Λ), |Q|). The ordering on such triples is the lexiographic one. Base case: |Λ| = 1. Only lines 2-4 are executed, and the total number of operations is O(1). Thus, it is sufficient to choose the constant β large enough. 12 GIOVANNI PAOLINI Inductive step. Lines 2-5 require O(ns) operations. Let us now analyze lines 6-12: their cost is O(ns) plus the cost of the recursive call on line 10, which is (by induction) γf (w) n log2 n (log δ − 1) µ(s), since the diameter of Λ is halved. Lines 14-15 require O(ns) operations, since h ≤ 2d = O(1). Now we turn to lines 17-23. Let ni = |Λi |. The cost of the recursive calls alone (line 18) is then, by induction, h X γf (w) ni log2 ni log δ µ(s) + β i=1  n log δ µ(s) + hβ 2 = γf (w) n (log n − 1)2 log δ µ(s) + O(1). ≤ γf (w) (n1 + · · · + nh ) log2 By Lemma 4.9, the size of Λ′ on line 20 is O(1), so the number of operations required for lines 21-23 is O(n µ(s)) (by Theorem 3.4) plus the cost of sets comparison, which is O(ns log n). We finally turn to lines 25-35. The cost of the recursive calls on line 26 is h−1 X γf (w) ni log2 ni log δ µ(s) + β i=1  n ≤ γf (w) (n1 + · · · + nh−1 ) log2 log δ µ(s) + (h − 1)β 2 n ≤ γf (w) (log n − 1)2 log δ µ(s) + O(1). 2 By Lemma 4.9, the sets Λ′ and E have size O(1), so lines 28-29 require O(µ(s)) operations to be executed. As another consequence, there is a bound η on the number of recursive calls on line 31. Notice that |Q ∪ R| > |Q|, because Λ′ is nonempty (since h ≥ 2) and contains only points that don’t belong to Span(Q) (thanks to line 2). So, each of the calls of line 31 requires a number of operations bounded by γf (w − 1) n log2 n log δ µ(s) + β. Finally, O(n µ(s) + ns log n) operations are required for lines 33-35 (as for lines 21-23). We now define the function f in the following way: f (w) = (2η)w , where η is the bound we introduced in the previous paragraph. Let us put everything together. We obtain the following results, depending on which lines are executed. • Lines 2-5 and 6-12 (all points of Λ are congruent modulo 2): O(ns) + γf (w) n log2 n (log δ − 1) µ(s) + β ≤ α1 ns + γf (w) n log2 n log δ µ(s) − γf (w) n log2 n µ(s)  = γf (w) n log2 n log δ µ(s) + n α1 s − γf (w) log2 n µ(s) ≤ γf (w) n log2 n log δ µ(s). The first inequality holds for any constant α1 such that α1 ns is greater than the term O(ns) + β. The last inequality holds for a sufficiently large value of γ, since µ(s) = Ω(s). • Lines 2-5, 14-15 and 17-23 (balanced partition): O(n µ(s) + ns log n) + γf (w) n (log n − 1)2 log δ µ(s) CANONICAL FORM OF FINITE SUBSETS OF Zd 13 ≤ α2 n log n µ(s) + γf (w) n log2 n log δ µ(s) − γf (w) n log n log δ µ(s)  ≤ γf (w) n log2 n log δ µ(s) + n log n µ(s) α2 − γf (w) log δ ≤ γf (w) n log2 n log δ µ(s). The first inequality holds for any constant α2 such that α2 n log n µ(s) is greater than the term O(n µ(s) + ns log n). The last inequality holds for a sufficiently large value of γ. • Lines 2-5, 14-15 and 25-35 (unbalanced partition): n O(n µ(s) + ns log n) + γf (w) (log n − 1)2 log δ µ(s) + 2 + η γf (w − 1) n log2 n log δ µ(s) + ηβ 1 ≤ α3 n log n µ(s) + γf (w) n log n (log n − 1) log δ µ(s) + 2 + η γf (w − 1) n log2 n log δ µ(s) 1 = α3 n log n µ(s) + γf (w) n (log2 n − log n) log δ µ(s) + 2 1 + γf (w) n log2 n log δ µ(s) 2 1 = α3 n log n µ(s) + γf (w) n log2 n log δ µ(s) − γf (w) n log n log δ µ(s) 2   1 2 ≤ γf (w) n log n log δ µ(s) + n log n µ(s) α3 − γf (w) log δ 2 2 ≤ γf (w) n log n log δ µ(s). The first inequality holds for any constant α3 such that α3 n log n µ(s) is greater than the term O(n µ(s) + ns log n) + ηβ. The second step follows from the identity 2ηf (w − 1) = f (w), which is an immediate consequence of the definition of f . The last inequality is true for a sufficiently large value of γ.  5. Canonical form for Xd Using the results of Sections 3 and 4, we are now able to easily describe an algorithm to compute a canonical form for Xd . Algorithm 5.1 (Canonical form for Xd ). This algorithm takes in input a finite set Λ ⊆ Zd , and returns a canonical form for Λ in the sense of Definition 2.1. 1: function CanonicalForm(Λ) 2: S ← EquivariantFrames2(Λ, ∅) 3: for all R ∈ S do 4: (ΩR , UR ) ← CanonicalFormWithFrame(Λ, R) 5: end for 6: return min { ΩR | R ∈ S } 7: end function In words, Algorithm 5.1 first equivariantly computes a set S of complete Λframes, using Algorithm 4.5. Then, for each Λ-frame R ∈ S, it finds a corresponding canonical set ΩR . Finally, it returns the set which is lexicographically minimal among the computed ones. 14 GIOVANNI PAOLINI Theorem 5.2. The output of Algorithm 5.1 is a canonical form for Xd with respect to the action of Aff(d, Z). Moreover its worst-case asymptotic complexity is O(n log2 n s µ(s)), where n and s are defined as in Section 2. Proof. The first property of Definition 2.1 is verified since Algorithm 3.1 satisfies property (1) at the beginning of Section 3. The second property of Definition 2.1 is an immediate consequence of Theorems 3.2 and 4.7. By Theorem 4.10, the execution of line 2 requires O(n log2 n s µ(s)) operations. By Lemma 4.9, the size of S is O(1). Thus, by Theorem 3.4, the execution of lines 3-5 requires O(n µ(s)) operations. The overall asymptotic complexity is therefore O(n log2 n s µ(s)).  6. Canonical form of Alexander polynomials In Section 1 we briefly presented the problem of computing a group invariant from the Alexander polynomial ∆(t1 , . . . , td ), which is not an invariant itself since it is not uniquely defined. In this section we are going to describe in more detail how the group of integer affinities acts on the Alexander polynomial, and we are going to illustrate how to adjust Algorithm 5.1 in order to compute a canonical form of the Alexander polynomial. Such a canonical form gives rise to an invariant of the group (actually there is still the possibility of changing the sign of the entire polynomial, but this problem is easily solved e.g. choosing the sign so that the leading term has positive coefficient). −1 The Alexander polynomial belongs to the ring R = Z[t1 , t−1 1 , . . . , td , td ] of the Laurent polynomials with integer coefficients. Hence it has the form X md 1 ∆(t1 , . . . , td ) = αm1 ,...,md tm 1 · · · td , m1 ,...,md ∈Z where only a finite number of coefficients αm1 ,...,md is nonzero. The action of Aff(d, Z) on R is by means of Z-linear automorphism, so it can be described on a md 1 single monomial tm 1 · · · td . An integer affinity ϕ ∈ Aff(d, Z) maps the monomial md m1 t1 · · · td to the monomial tp11 · · · tpdd , where     m1 p1  ..   ..   .  = ϕ . . pd md A polynomial ∆(t1 , . . . , td ) ∈ R can be viewed as a finite set of points in Zd (the set of vectors (m1 , . . . , md )t for which the coefficient αm1 ,...,md is nonzero) with an integer coefficient αm1 ,...,md associated to each point. Under this identification, the action of Aff(d, Z) is precisely the natural action on the subsets of Zd , with the subtlety that these subsets are weighted. In analogy with the notation of the previous sections, we will call Xdw the set of finite weighted subsets of Zd (the weights are given by nonzero integers). Algorithms 3.1, 4.5 and 5.1, without any change, work as well for the case of Xdw . What changes is that every operation involving elements of Xd must now involve elements of Xdw . For instance CanonicalFormWithFrame must output, as first element of the pair, a weighted set. Therefore, on lines 33-35 of Algorithm 4.5, the minimality check must take into account the weights as well, so that two sets with the same elements but with different weight are not treated as equal. CANONICAL FORM OF FINITE SUBSETS OF Zd 15 We omit the proof of correctness and the proof of the complexity bound since they are entirely analogous to the case of Xd , which was thoroughly described in the previous sections. 7. Conclusions The algorithm we have presented in Sections 3-5 computes a canonical form of subsets of Zd up to affinity, and has asymptotic complexity O(n log2 n s µ(s)) for any fixed dimension d. We chose to omit explicit analysis on how the multiplicative constant grows in terms of d. There are many possible improvements that can lower such constant. For instance, in Algorithm 4.5, one can further exploit the canonical partition {Λ1 , . . . , Λh } to significantly reduce the number of frames R considered on lines 21-23 and 33-35. However, since such improvements affect only the constant, we have preferred to ignore them in order to keep the pseudocode as essential as possible. The described algorithms were implemented in Python by the author, using the NZMATH library [9]. Several improvements were made, making the implemented version slightly different from the pseudocode of the previous sections, in order to achieve a higher efficiency. It is finally worth noticing that the presented algorithms can be easily modified to also output an affinity which sends the input set Λ to its canonical form. Therefore, when deciding whether two given sets Λ and Λ′ are in the same orbit with respect to the action of Aff(d, Z), in case of affirmative answer it is possible to explicitly obtain an affinity that sends Λ to Λ′ . Acknowledgments I would like to thank my father Maurizio Paolini for having introduced me to the problem and for his valuable suggestions. I would also like to thank Luca Ghidelli for the useful discussions and for his careful reading of this paper. Finally, I would like to thank professors Patrizia Gianni, Carlo Traverso and Giovanni Gaiffi for their advice. References [1] Giovanni Bellettini, Valentina Beorchia, Maurizio Paolini, and Franco Pasquarelli, Shape reconstruction from apparent contours: Theory and algorithms, vol. 44, Springer, 2015. [2] Henri Cohen, A course in computational algebraic number theory, vol. 138, Springer, 1993. [3] Ralph H. Fox, Free differential calculus II. The isomorphism problem of groups, Annals of Mathematics 59 (1954), 196–210. [4] James L. Hafner and Kevin S. McCurley, Asymptotically fast triangularization of matrices over rings, SIAM Journal on Computing 20 (1991), no. 6, 1068–1083. [5] Hermann Minkowski, Zur Theorie der positiven quadratischen Formen, Journal für die reine und angewandte Mathematik 101 (1887), 196–202 (ger). [6] Morris Newman, Integral matrices, vol. 45, Academic Press, 1972. [7] Arnold Schönhage and Volker Strassen, Schnelle multiplikation grosser zahlen, Computing 7 (1971), no. 3-4, 281–292. [8] Arne Storjohann, Computing Hermite and Smith normal forms of triangular integer matrices, Linear Algebra and its Applications 282 (1998), no. 1, 25–45. [9] Satoru Tanaka, Naoki Ogura, Ken Nakamula, Tetsushi Matsui, and Shigenori Uchiyama, Nzmath 1.0, Mathematical Software–ICMS 2010 (2010), 260–269.
4math.GR
arXiv:1704.06942v1 [cs.AI] 23 Apr 2017 Population Seeding Techniques for Rolling Horizon Evolution in General Video Game Playing Raluca D. Gaina Simon M. Lucas Diego Pérez-Liébana University of Essex Colchester, UK Email: [email protected] University of Essex Colchester, UK Email: [email protected] University of Essex Colchester, UK Email: [email protected] Abstract—While Monte Carlo Tree Search and closely related methods have dominated General Video Game Playing, recent research has demonstrated the promise of Rolling Horizon Evolutionary Algorithms as an interesting alternative. However, there is little attention paid to population initialization techniques in the setting of general real-time video games. Therefore, this paper proposes the use of population seeding to improve the performance of Rolling Horizon Evolution and presents the results of two methods, One Step Look Ahead and Monte Carlo Tree Search, tested on 20 games of the General Video Game AI corpus with multiple evolution parameter values (population size and individual length). An in-depth analysis is carried out between the results of the seeding methods and the vanilla Rolling Horizon Evolution. In addition, the paper presents a comparison to a Monte Carlo Tree Search algorithm. The results are promising, with seeding able to boost performance significantly over baseline evolution and even match the high level of play obtained by the Monte Carlo Tree Search. I. I NTRODUCTION Recent literature features General Video Game Playing (GVGP) more and more, with various researchers using different Game AI frameworks for benchmarking general AI agents [1][2][3]. The authors all seem to be in agreement that, although this is a great challenge, its importance is undeniable, exceeding video games. GVGP is an area focused on developing Artificial Intelligence agents able to achieve a high performance in any previously unknown environment, therefore striving towards General Artificial Intelligence through video games. Games make an excellent domain for testing AI techniques, due to their varying complexity and wide range of problems presented. Additionally, experiments can easily be run multiple times in a constrained scenario, with minimal costs in case of errors and fast feedback, a stark contrast to other areas such as robotics. This study is carried out using the General Video Game AI [4] corpus of games, which provides a large collection of interesting and diverse real-time challenges. The GVGAI competition1 has been running for 3 years now and it has increased its coverage in 2016 through a Two Player Planning Track [5] and a Level Generation Track [6]. There are several other types of problems in development, such as a Learning 1 www.gvgai.net 978-1-5090-4601-0/17/$31.00 c 2017 IEEE Track (which strips the agents of the Forward Model), ScreenCapture Learning or Rule Generation. As AI achieves super-human performance in even the most complex of individual games, the more general approach of GVGAI will become increasingly attractive. In 2016, AI became super-human at Go [7], and this is speculation on our part, but we believe StarCraft is likely to be dominated by AI within the next few years. The experiment described in this paper attempts to improve upon a basic Rolling Horizon Evolutionary Algorithm (RHEA) and obtain better performance when tested on a subset of 20 games of the GVGAI corpus. The proposed technique is focused on generating a better than random initial population from which to start the evolution process i.e. by seeding the population. Two different methods are used to this end, a One Step Look Ahead algorithm and Monte Carlo Tree Search, their performance analyzed on multiple RHEA parameter configurations (varying population sizes and individual lengths). The rest of this document follows a typical structure. Section II gives an overview of literature in this domain. Section III covers the basic background information necessary on the framework and algorithms used in this study. Section IV reviews the experimental approach and setup. Section V reports the results obtained and offers a detailed analysis. Finally, Section VI wraps up the paper by drawing conclusions and identifying future work. II. R ELEVANT R ESEARCH Evolutionary Algorithms (EAs) provide a simple, robust and generally applicable approach for searching a wide variety of spaces, and have been the subject of intensive research for more than five decades. In terms of their application to Game AI, much of the effort has been focused on evolving AI agents, or on evolving game content (such as level design) [8] [9], game rules or game parameters. Recently, it was shown that Evolutionary Algorithms could be applied as any-time and real-time decision making algorithms for use in Game AI, adopting a similar simulation-driven approach to Monte Carlo Tree Search, while being simpler to implement and offering competitive performance [10]. This was initially done for oneplayer games, but was extended to 2-player games in the form of Rolling Horizon Co-Evolution [11]. Various enhancements of EAs have been considered, including hybridization. One example is the usage of evolution integrated into the Monte Carlo Tree Search simulation step [12] or in the roll-out phase to evolve a better policy [13]. Recently, work has moved to incorporate tree structures or Upper Confidence Bounds (UCB) into the evolution instead for a guided and more informed process [14]. One thing that all Evolutionary Algorithms have in common, regardless of any additional features or the actual evolutionary techniques used, is the initialization of the population. There have been several attempts at exploring this particular improvement. Kazimipour et al. [15] review all the various methods present in literature and categorize them according to various factors: randomness, compositionality and generality. They identified several techniques which would work in a general environment; however, they suggest that these methods are computationally expensive, therefore not translating well to real time games, for example, which is the domain this paper focuses on. In addition, Kim et al. [16] analyze the effects of initializing an EA population using an optimal solution determined by a Temporal Difference Learning algorithm in the game Othello. This addition appears to lead to a significant improvement in performance and future work in the area is encouraged. The issue with initializing the population with pseudorandom numbers is raised by Maaranen et al. [17], who instead propose a quasi-random sequence method meant to obtain more evenly distributed points in a multi-individual population, in order to better explore the search space. This technique is applied to a genetic algorithm and it is tested on 52 global optimization problems. Their results are promising, suggesting a higher level of performance over the traditional initialization method. When it comes to General Video Game Playing, Monte Carlo Tree Search (MCTS) methods have dominated so far and their variations have been explored in various works, as depicted in a survey by Browne et al. [18]. In the General Video Game AI competition, Open-Loop MCTS emerged as the most powerful method out of the sample controllers provided, standing at the base of multiple participant algorithms and even the winner of the first edition of the competition (ran in 2014), Adrien Couëtoux [4]. However, the Arcade Learning Environment (ALE) [19], still in use by companies such as Google DeepMind [20], was one of the first frameworks to allow testing of general agents on video games, presenting the agents with the game through screen capture and requiring an in-game action at every step. Unlike GVGAI, there are limitations to ALE games definition. While the performance achieved by Mnih et al [20] using Deep Q-Networks (DQN) applied to the ALE environment was impressive, their main goal was to show what could be achieved just be learning to act given the screen capture of the game and a reward function, a process that involves a lengthy training period. Our interest in the current paper is in methods which can exploit the Forward Model (FM) of the game to achieve intelligent behaviour instantly. Rolling Horizon Evolutionary Algorithms (RHEA) show great promise in this respect. The Forward Model is a game simulator which can be used to rapidly test the consequences of taking a series of actions, given the current game state. As mentioned above, Perez et al. [10] tested RHEA techniques on the Physical Salesman Traveling Problem and their results were competitive with MCTS, encouraging research in the area. III. BACKGROUND A. General Video Game AI GVGAI aims to provide a framework for benchmarking general Artificial Intelligent agents. It currently offers 140 games in total, 100 of which are single player and 40 twoplayer, some of which stochastic and all real-time. The study in this paper is focused on the single player framework. The games are played by the agents in black box mode, without any knowledge of the rules (e.g. different scoring systems, conditions for ending the game or types of objects in the game - NPCs, portals, resources), but being able to query the current game state for information on game objects. In addition, future possible states may be simulated using a Forward Model (FM), which requires an action the agent would wish to perform and returns the game state resulting from that action. However, it is worth noting that any states returned by the FM may not be an accurate representation of the real game due to stochasticity. The agents have only 40ms to make decisions regarding which action to play in the next game tick, except for the initialization step at the start of a game, where they receive 1s thinking time. A legal action must be provided at the end of the allocated budget, which may vary in the games between movement or special actions (such as shooting). B. Evolutionary Algorithms The algorithms used in this study are based on the Rolling Horizon Evolutionary Algorithm (RHEA) [10], which encode individuals as sequences of actions. The term “Rolling Horizon” refers to the fact that the first action of the plan evolved is executed in one game step, then the plan is reevaluated and adjusted, looking one step further into the future, thus slowly expanding the “horizon”. Each individual in the EA is evaluated in a similar manner: the actions are simulated with the use of a Forward Model (FM) following the sequence; the value associated with the state reached at the end (approximated by a heuristic function) is used as the fitness value of the individual. RHEA’s evolution process consists of several iterations (dictated by a fixed number, or a time or memory budget, for example) beginning with population initialization. Subsequently, mutation, tournaments, crossover and other evolutionary methods are used to change individuals and produce new ones. The offspring are evaluated through the steps described above and assigned a fitness value, which leads to the decision of keeping or discarding it in order to move to the next generation with the best individuals found so far. At the end of the process, the algorithm returns the first gene of the best individual in the final population as the action to be played in the game. The evolution is then repeated in the next game tick in the new game state received. C. Monte Carlo Tree Search Monte Carlo Tree Search (MCTS) is a search-based technique which consists of four steps, iterated over repeatedly until a pre-defined budget is reached (a number of iterations, memory or time, for example). The action returned at the end of the process is the child of the root node considered the best by a recommendation policy (e.g. the most visited child). In the first step in the process, MCTS selects a non-terminal and not yet fully expanded leaf of the tree via a tree policy. Secondly, a child of the selected node is added to the tree. Thirdly, it simulates ahead, using the new child as the root of a Monte Carlo simulation, with the help of the FM provided by the system. And finally, a heuristic is used to evaluate the state reached at the end of the simulation step and all of the parents of the selected node, up to the root of the tree, are updated with this value. The algorithm used in this paper implements an Open Loop variant of this technique, concretely the sample controller from the GVGAI competition. Open Loop means that only statistics and not the actual game states are stored in the nodes of the tree, the FM being used when traversing the tree to simulate the game states. More details of Monte Carlo Tree Search, together with its variations and applications can be found in [18]. IV. A PPROACH AND E XPERIMENTAL S ETUP The aim of this paper is to explore whether initializing the population of an Evolutionary Algorithm with individuals better than random produces an improvement in performance when applied to General Video Game Playing. This hypothesis was tested by using 2 different initialization techniques to design variants of the vanilla RHEA, the baseline algorithm in this study, A-Vanilla. Algorithm B-1SLA-S is a seeding variant which employs a One Step Look Ahead technique to select a better starting point in the search space. Algorithm C-MCTS-S uses Monte Carlo Tree Search to seed the RHEA for better analysis of the search space. A fourth algorithm’s performance was compared against the RHEA variants, an Open Loop Monte Carlo Tree Search (algorithm D-MCTS), in the simple implementation of the GVGAI competition sample controller. The effect of the initialization techniques was tested on different configurations of the RHEA algorithm, with population sizes (P ) and individual lengths (L) in the subsequent ranges: P = {1, 2, 5, 10, 15, 20}, L = {6, 8, 10, 14, 16, 20}, following the diagonal of the matrix these values would form. In the case of algorithm D-MCTS, its roll-out depth was kept the same as RHEA individual length in order to make the approaches comparable. The largest value tested was 20 due to the fact that, by allowing half of the budget for MCTS computation in algorithm C-MCTS-S, higher values for population size and TABLE I NAMES , INDEXES AND TYPES OF THE 20 GAMES FROM THE SUBSET SELECTED . L EGEND : S - S TOCHASTIC , D - D ETERMINISTIC . Idx 0 13 18 25 36 49 58 61 75 84 Name Aliens Butterflies Chase Crossfire Escape Infection Lemmings Modality Roguelike Survive Zombies Type S S D S D S D D S S Idx 4 15 22 29 46 50 60 67 77 91 Name Bait Camel Race Chopper Dig Dug Hungry Birds Intersection Missile Command Plaque Attack Sea Quest Wait for Breakfast Type D D S S D S D D S D individual length would result in the algorithm not being able to evaluate even 1 whole population in the initialization step. A. Games All of the algorithms were tested on the same subset of 20 single-player games of the current GVGAI corpus. As the aim was to observe performance in different game types, two classifications were used in order to determine a set of games fit for this experiment. Mark Nelson presented a large scale analysis of a basic Monte Carlo Tree Search algorithm in 62 games, which were sorted based on the performance of this algorithm [21]. Bontrager et al. used clustering techniques on 49 GVGAI games [22] based on various features to obtain rough groups of similar games. The 20 games selected for this experiment were uniformly sampled from both works for a balanced set of 10 stochastic and 10 deterministic games (see Table I for indices, names and types of these games, as used in the rest of this paper). In order to account for the stochastic aspect of the algorithms used in this study, as well as half of the games included in the set, each algorithm was run 100 times on each game (20 times on each of the 5 levels available). The budget offered for decision-making in each game tick was 900 FM calls, which is the average number of FM calls that A-Vanilla achieves in the 40ms of computational time in the complete 100 games in the GVGAI-1P corpus. The choice of using FM calls instead of CPU time was made in order to ensure that variations on the machine used for running the experiments would not impact the results, together with the fact that simulating the game ticks is the most expensive part of each algorithm under test. B. Vanilla RHEA (Algorithm A-Vanilla) The algorithm described in this subsection is the baseline used in the study and follows the same technique described in [23]. It employs a pseudo-random initialization of the population, each gene in the individuals taking on an integer value returned by an RNG (Random Number Generator). Each value is between 0 and N − 1 inclusive, where N is the maximum number of legal actions which can be performed from the current game state, therefore the integers mapping to an in-game action. The evolutionary process continues slightly differently depending on the size of the population. When there is only 1 individual considered, a new one is mutated at each generation and the individual with the highest fitness value is carried forward to the next iteration. Uniform crossover is introduced for population sizes of 2 or more and a tournament with size 2 is used to select the parents of the resulting offspring in the cases where populations contain 3 or more individuals. The mutation operator is random, the 1 gene of the individual selected being changed to a different possible value, chosen uniformly at random. The fitness function consists of a simple heuristic, returning the current game score of the state reached after advancing the Forward Model through all the actions in the individual (or until the end of the game). If an end-game state was reached and it resulted in a loss or a win for the player, the value returned is instead either a large penalty or a large reward, respectively. C. One Step Look Ahead Seeding (Algorithm B-1SLA-S) The One Step Look Ahead (1SLA) algorithm is a simple technique which exhaustively searches through the actions available from the current state and associates each a Q value, corresponding to the approximated value of the game state reached after performing each action (the value is defined by the same heuristic employed by RHEA). It then selects for execution the action with the highest Q value. Algorithm B-1SLA-S uses the same evolutionary process as A-Vanilla described above, but the first individual in the initial population is the solution recommended by the 1SLA technique. L iterations of the algorithm are performed, one for each gene in the individual: an exhaustive search is carried out through all of the actions available from the current state, the game state is advanced using the Forward Model, through the best action found and the process is repeated until either the end of the individual or the end of the game is reached. In the second case, the rest of the individual is padded with randomly selected actions. If the population size is bigger than 1, the rest of the individuals are obtained by mutating the first individual obtained from the 1SLA algorithm. This method was thought to reduce random bias (the vanilla algorithm potentially not being able to find the current best action because of the random seeding) and to provide a better starting point for evolution. D. Monte Carlo Tree Search Seeding (Algorithm C-MCTS-S) Algorithm C-MCTS-S splits the budget received and uses half of it to first run a Monte Carlo tree search on the current game state, following the steps described in Section III-C. The roll-out depth is set to the same value as the individual length in A-Vanilla √ and the UCB1 formula (with constant C taking the value 2) is applied as tree policy (see Equation 1). ( ∗ a = arg max Q(s, a) + C a∈A(s) s ln N (s) N (s, a) ) (1) The first individual in the initial RHEA population is then seeded using the solution recommended by MCTS. Only the first K relevant nodes are selected, by traversing the tree through the most visited actions (the same method used by algorithm D-MCTS when selecting its final action to play). A node is relevant if it has been visited at least M = 3 times. The rest of the individual (if any genes have not received a value) is padded with randomly chosen legal actions. V. R ESULTS AND D ISCUSSION The analysis in this section uses a two-tailed Mann-Whitney non-parametric U test to measure the statistical significance of the results for each game (p-value = 0.05), applied to two performance indicators: win rate and game score achieved. In general, both seeding techniques improve the performance of the vanilla algorithm much more when the population size and individual length are small than when they increase. This is in line with the findings in the study performed by Gaina et. al [23], where Random Search (RS) emerged as the best algorithm in the limited budget offered. Therefore, the more the parameter values increase towards RS, the less the impact of the seeding can be observed. Table V presents an overall win rate comparison between the two seeding variants and vanilla RHEA, across all games and configurations. The bottom of the table sums up the number of games in which one algorithm was significantly better than the other two, leading to a total of unique games where a significant improvement was noticed, in all configurations tested. Table IV is a complete results example for the configuration P = 1, L = 6 (see Figure 1 for visualization), the rest of the tables being omitted due to space limitations. A. Overall Seeding Comparison The general trend observed in this study is that the MCTS seeding variant performs significantly better than both algorithms A-Vanilla and B-1SLA-S in 8 unique games for win rate and 13 unique games for scores across all configurations, while being significantly worse than either of the other two in only 4 games for both win rate and score. It is worth noting that there were a reduced number of games in which A-Vanilla or B-1SLA-S turned out to consistently be significantly better than C-MCTS-S: games with indices 36 and 91 (Escape and Wait for Breakfast, respectively) for both win rate and score and game with index 50 (Intersection) for score only. This is due to the poor performance of MCTS in these games, which is improved in the seeded algorithm over D-MCTS. In addition, the MCTS seeding shows a steady improvement in several games. The win rates in the games with indices 0, 13 and 22 (Aliens, Butterflies and Chopper, respectively) see an increase to very close to 100% in all configurations. The biggest improvement is observed in game 22, where the AVanilla win rate for the smallest configuration (P = 1, L = 6) is only 26% to begin with (p  0.0001). This leads to the conclusion that identifying the type of game being played and applying the correct algorithm seeding Fig. 1. Win rate of algorithms A-Vanilla, B-1SLA-S and C-MCTS-S with configuration P = 1, L = 6 in all 20 games. TABLE II PAIR - WISE SIGNIFICANCE COMPARISON BETWEEN VANILLA RHEA, O NE S TEP L OOK A HEAD SEEDED RHEA AND MCTS SEEDED RHEA. Algorithm A-Vanilla B-1SLA-S 1-6 1 (1) 6 (7) A-Vanilla C-MCTS-S 2 (1) 10 (16) B-1SLA-S C-MCTS-S 2 (3) 6 (11) 2-8 0 (0) 1 (5) 2 (3) 6 (11) 2 (4) 8 (11) 5-10 0 (1) 0 (4) 10-14 3 (5) 0 (1) 4 (3) 1 (5) 2 (3) 4 (7) 2 (3) 4 (9) 3 (4) 6 (12) 15-16 5 (8) 0 (2) 20-20 5 (10) 0 (2) Total 8 (11) 6 (8) 2 (4) 2 (5) 2 (4) 0 (5) 4 (5) 12 (16) 2 (4) 6 (11) 2 (4) 6 (11) 3 (5) 10 (13) and parameters through a meta-heuristic would be highly beneficial to a general AI agent. However, there are also games such as 29 (Dig Dug), 58 (Lemmings) and 77 (Sea Quest) in which the win rate for all algorithms remains at 0%, these being particularly difficult games which require greater exploration that neither technique can provide. B. Pair-wise Seeding Comparison Pair-wise significance comparison between algorithms AVanilla, B-1SLA-S and C-MCTS-S on all the configurations tested can be observed in Table II. The values represent the number of games (out of 20 total) in which one algorithm was significantly better than the other regarding victories, as well as scores, in brackets. The totals sum up the unique games in which one algorithm was significantly better than the other across all configurations (maximum of 20). 1) A-Vanilla vs B-1SLA-S: The One Step Look Ahead seeding appears to produce the best results where the RHEA parameter values are very small (improvements in 6 games for win rate and 7 games for score), a change being, however, noticed halfway through the table where the seeding variant actually becomes significantly worse than the vanilla version in up to 5 games for win rate and 10 games for score. Overall, across all configurations tested, the 1SLA seeding appears to be worse than the baseline algorithm. A study of the complete matrix of small parameter values (P = {1, 2, 5}, L = {6, 8, 10}), where the difference in performance is most observed, reveals that the variance in individual length and population size have different effects. On the one hand, increasing the size of the population results in a decrease in the number of games it is significantly better in when compared to A-Vanilla, which is due to the fact that the seeding variant explores the search space much less, with only one optimal solution mutated for all of its individuals. On the other hand, the performance is proportional to the individual length, suggesting that the directed search provided by 1SLA is more effective in cases with big L values compared to AVanilla’s random sampling. 2) A-Vanilla vs C-MCTS-S: With parameter values smaller than P = 10, L = 14, the MCTS seeding is significantly better than the vanilla version, the difference being most noticed, again, when the parameter values are small. The decrease in performance is thought to be caused by the roll-out depth of MCTS exceeding the optimal range (10 − 12). Across all configurations, MCTS seeding improves the baseline algorithm in 60% of the games for win rate and 80% for score. Comparing the complete matrix of small parameter values shows that the population size has a much greater negative effect on the performance than the individual length. The lack of impact of the individual length can be explained by the proportional increase in the roll-out length of MCTS, therefore keeping results comparable. However, the decrease observed with population size increase suggests that the algorithm fails to explore the search space as well as RHEA, therefore balancing of other parameters should be considered. For configuration P = 5, L = 10, there are two interesting games to look in depth at. In the game with index 77 (Sea Quest), C-MCTS-S increases the win rate of the baseline algorithm from 31% to 68% (p  0.0001) and the score from 1225.68 average points to 2485.43 (p  0.0001). Another big effect size is perceived in game 15 (Camel Race), in which, although the win rates remain small, there is an increase from 2% to 8% (p = 0.026). Both games benefit from the balanced exploration and exploitation provided by the MCTS solution which stands at the base of the evolutionary process. TABLE III S IGNIFICANCE COMPARISON OF ALGORITHMS A-VANILLA , C-MCTS-S AND D-MCTS IN ALL 20 GAMES AND ALL CONFIGURATIONS . Algorithm A-Vanilla C-MCTS-S D-MCTS Improved Seeding 1-6 2 (1) 0 (2) 2 (3) 2-8 2 (3) 1 (1) 0 (0) 5-10 2 (3) 0 (3) 0 (1) 10-14 2 (3) 0 (0) 1 (3) 15-16 2 (4) 0 (1) 0 (3) 20-20 2 (4) 0 (1) 0 (3) Total 3 (4) 1 (7) 3 (7) 10 (15) 4 (10) 2 (4) 0 (5) 2 (5) 0 (4) 10 (15) 3) B-1SLA-S vs C-MCTS-S: When the two seeding techniques are compared, C-MCTS-S achieves a consistently better performance in 50% of the games for win rate and 65% for scores, whereas being consistently significantly worse in games with indices 36 and 91 (Escape and Wait for Breakfast, respectively) for both win rate and scores and game 50 (Intersection) for score. In game 22 (Chopper), B-1SLA-S with configuration P = 2, L = 8 achieves a 76% win rate, while C-MCTS-S increases it to 100% (p  0.0001). In addition, significant improvements with large effect sizes can also be noticed in games 60 (Missile Command, p = 0.016) and 84 (Survive Zombies, p = 0.033). However, in the game with index 36 (Escape), in which the MCTS algorithm cannot find a solution, the win rate drops from 30% for B-1SLA-S to 0% for C-MCTS-S (p  0.0001). C. MCTS Comparison Although the results indicate algorithm C-MCTS-S to be the best in this setting, an analysis against a pure Monte Carlo Tree Search technique was carried out to validate the findings. This comparison can be seen in Table III, in which the values show the number of games in which one algorithm was significantly better than both the others in win rate (and scores, in brackets), adding up to a total of unique games across all configurations. The bottom line of Table III signifies the amount of games in which, although C-MCTS-S was not the best algorithm, the addition of MCTS seeding to RHEA made it in turn better than the baseline algorithm. This takes into account the cases where C-MCTS-S and D-MCTS were not significantly better than each other, but they still achieved a higher performance than A-Vanilla. While A-Vanilla consistently obtains significantly more victories and higher scores in its best games (indices 36, 91 and 50), it must be highlighted that the apparent low performance of C-MCTS-S is due to it not being significantly better than D-MCTS. For the direct comparison between C-MCTS-S and A-Vanilla, the reader is referred to Table II. In this case, the MCTS seeding variant shows improvement over a wider range of games, adding up to 50% games in which a larger win rate was observed and 75% games in which the score increased. The conclusion emerging is that MCTS seeding has a highly beneficial effect, especially in low RHEA parameter values, and further exploration of its advantages is encouraged. VI. C ONCLUSION This paper presented an experiment focused on observing how a better than random population initialization technique affects the performance of Rolling Horizon Evolutionary Algorithms (RHEA) in General Video Game Playing. Two different seeding techniques were used for testing. First, a One Step Look ahead method, which simply carries out an exhaustive search through all actions available and chooses the best one at each game step. Second, a Monte Carlo Tree Search (MCTS), which took half the budget to process the game from the current state and recommend a solution to serve as a starting point for the evolutionary process. Experiments were carried out in a balanced set of 20 games of the General Video Game AI framework and using various configurations of RHEA parameters (population size (P ) and individual length (L)). The results suggest that both seeding variants offer a significant improvement in performance, considering both win rate and in-game score, in particular when the P and L values are small. However, as the parameter values increase, the benefit of seeding decreases, indicating that the unique solution offered by the initialization methods, which the evolution searches around, loses value compared to the wider search space at the disposal of Vanilla RHEA. A conclusion drawn from this is that the seeding directed evolution should be combined with better exploration of the game space in order to achieve optimal results. Nevertheless, as the aim of these algorithms is to attain a high level of play on all games, a positive result on a relatively small sample of games negates the null hypothesis and recommends deeper investigation. An in-depth comparison between vanilla RHEA, the MCTS seeding algorithm and Open Loop Monte Carlo Tree Search was also performed. The findings of this study pinpoint the fact that, as the evolution parameters increase towards Random Search, so does the performance of RHEA compared to the tree search based methods in several games where the search space is too large for MCTS to traverse efficiently enough. Furthermore, the MCTS seeding does not produce worse results than simply MCTS. Therefore, this seeding technique is shown to have great promise in this environment. The next steps will be focused on developing the algorithm’s exploration of the game space, through further use of tree structures for hybridization, additional roll-outs and circular buffers. Moreover, a wider range of games will be used to ascertain that the difference in performance would indeed be significant in an even more general setting. ACKNOWLEDGMENT This work was funded by the EPSRC Centre for Doctoral Training in Intelligent Games and Game Intelligence (IGGI) EP/L015846/1. R EFERENCES [1] A. Babadi, B. Omoomi, and G. Kendall, “EnHiC: An Enforced Hill Climbing Based System for General Game Playing,” in IEEE Conference on Computational Intelligence and Games, vol. 1, 2015, pp. 193–199. [2] C. Chu, H. Hashizume, Z. Guo, T. Harada, and R. Thawonmas, “Combining Pathfinding Algorithm with Knowledge-based Monte-Carlo Tree Search in General Video Game Playing,” in IEEE Conference on Computational Intelligence and Games, vol. 1, 2015, pp. 523–529. [3] H. Park and K.-J. Kim, “MCTS with Influence Map for General Video Game Playing,” in IEEE Conference on Computational Intelligence and Games (CIG), vol. 1, 2015, pp. 534–535. Algorithm A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S Game 0 4 13 15 18 22 25 29 36 46 Victories (%) 87.00 (3.36) 97.00 (1.71) 100.00 (0.00) 4.00 (1.96) 4.00 (1.96) 6.00 (2.37) 78.00 (4.14) 90.00 (3.00) 95.00 (2.18) 4.00 (1.96) 3.00 (1.71) 5.00 (2.18) 1.00 (0.99) 2.00 (1.40) 9.00 (2.86) 26.00 (4.39) 48.00 (5.00) 100.00 (0.00) 0.00 (0.00) 2.00 (1.40) 4.00 (1.96) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 15.00 (3.57) 36.00 (4.80) 0.00 (0.00) 2.00 (1.40) 2.00 (1.40) 3.00 (1.71) Significantly better than ... Ø A A, B Ø Ø Ø Ø A A Ø Ø Ø Ø Ø A, B Ø A A, B Ø Ø A Ø Ø Ø C A, C Ø Ø Ø Ø Scores 59.33 (1.62) 61.95 (1.29) 68.87 (1.52) 2.10 (0.29) 3.28 (0.51) 3.41 (0.41) 33.12 (1.60) 32.48 (1.65) 30.48 (1.46) −0.76 (0.05) −0.77 (0.05) −0.75 (0.05) 2.16 (0.20) 2.14 (0.22) 3.20 (0.24) 2.39 (0.62) 4.63 (0.78) 16.99 (0.28) −1.01 (0.01) −0.89 (0.08) 0.18 (0.10) 5.66 (0.76) 9.15 (0.77) 14.93 (1.17) −0.64 (0.07) 0.34 (0.05) 0.00 (0.00) 2.00 (1.40) 2.00 (1.40) 4.60 (1.85) Significantly better than ... Ø Ø A, B Ø Ø A Ø Ø Ø Ø Ø Ø Ø Ø A, B Ø A A, B Ø Ø A, B Ø A A, B Ø A, C A Ø Ø A, B Game 49 50 58 60 61 67 75 77 84 91 Victories (%) 98.00 (1.40) 96.00 (1.96) 97.00 (1.71) 79.00 (4.07) 100.00 (0.00) 100.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 35.00 (4.77) 36.00 (4.80) 63.00 (4.83) 23.00 (4.21) 28.00 (4.49) 30.00 (4.58) 75.00 (4.33) 70.00 (4.58) 91.00 (2.86) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 33.00 (4.70) 37.00 (4.83) 58.00 (4.94) 23.00 (4.21) 29.00 (4.54) 40.00 (4.90) 35.00 (4.77) 65.00 (4.77) 9.00 (2.86) Significantly better than ... Ø Ø Ø Ø A A Ø Ø Ø Ø Ø A, B Ø Ø Ø Ø Ø A, B Ø Ø Ø Ø Ø A, B Ø Ø A C A, C Ø Scores 11.09 (0.61) 11.84 (0.71) 15.25 (0.86) −3.03 (1.16) 4.25 (0.69) 1.00 (0.00) −9.11 (0.37) −0.11 (0.05) −0.03 (0.02) 1.47 (0.41) 1.72 (0.43) 4.65 (0.48) 0.23 (0.04) 0.28 (0.04) 0.30 (0.05) 35.37 (1.60) 33.05 (1.75) 47.17 (1.87) 1.60 (0.37) 3.54 (0.52) 5.44 (0.62) 903.56 (127.82) 1130.36 (137.78) 1807.79 (177.44) 0.92 (0.38) 0.92 (0.39) 2.27 (0.41) 0.35 (0.05) 0.65 (0.05) 0.09 (0.03) Significantly better than ... Ø Ø A, B Ø A, C A Ø A A Ø Ø A, B Ø Ø Ø Ø Ø A, B Ø A A Ø Ø A, B Ø Ø A, B C A, C Ø TABLE IV P ERCENTAGE OF VICTORIES AND AVERAGE OF SCORE ACHIEVED ( PLUS STANDARD ERROR ) IN 20 DIFFERENT GAMES WITH CONFIGURATION P = 1 AND L = 6. F OURTH , SIXTH , NINTH AND ELEVENTH COLUMNS INDICATE THE APPROACHES THAT ARE SIGNIFICANTLY WORSE THAN THAT OF THE ROW, USING THE NON - PARAMETRIC W ILCOXON SIGNED - RANK TEST WITH P - VALUE < 0.05. B OLD FONT FOR THE ALGORITHM THAT IS SIGNIFICANTLY BETTER THAN ALL THE OTHER 2 IN EITHER VICTORIES OR SCORE . [4] D. Perez-Liebana, S. Samothrakis, J. Togelius, T. Schaul, S. Lucas, A. Couetoux, J. Lee, C.-U. Lim, and T. Thompson, “The 2014 General Video Game Playing Competition,” in IEEE Transactions on Computational Intelligence and AI in Games, vol. PP, no. 99, 2015, p. 1. [5] R. D. Gaina, D. Perez-Liebana, and S. M. Lucas, “General Video Game for 2 Players: Framework and Competition,” in Proceedings of the IEEE Computer Science and Electronic Engineering Conf., 2016. [6] A. Khalifa, D. Perez-Liebana, S. Lucas, and J. T. and, “General Video Game Level Generation,” in Proceedings of the Genetic and Evolutionary Computation Conference (GECCO), 2016, p. to appear. [7] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. van den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, S. Dieleman, D. Grewe, J. Nham, N. Kalchbrenner, I. Sutskever, T. Lillicrap, M. Leach, K. Kavukcuoglu, T. Graepel, and D. Hassabis, “Mastering the Game of Go with Deep Neural Networks and Tree Search,” Nature, vol. 529, no. 7587, pp. 484–489, 2016. [8] K. O. S. Julian Togelius, Georgios N. Yannakakis and C. Browne, “Search-based Procedural Content Generation: A Taxonomy and Survey,” in IEEE Trans. on Computational Intelligence and AI in Games (TCIAIG), vol. 3, no. 3, 2011, pp. 172–186. [9] D. Perez, J. Togelius, S. Samothrakis, P. Rohlfshagen, and S. M. Lucas, “Automated Map Generation for the Physical Traveling Salesman Problem,” IEEE Transactions on Evolutionary Computation, vol. 18, no. 5, pp. 708–720, Oct 2014. [10] D. Perez-Liebana, S. Samothrakis, S. M. Lucas, and P. Rolfshagen, “Rolling Horizon Evolution versus Tree Search for Navigation in Single-Player Real-Time Games,” in Proceedings of the Genetic and Evolutionary Computation Conference (GECCO), 2013, pp. 351–358. [11] J. Liu, D. Perez-Liebana, and S. M. Lucas, “Rolling Horizon Coevolutionary Planning for Two-Player Video Games,” in Proceedings of the IEEE Conf. on Computational intelligence and Games, 2016. [12] D. Perez, S. Samothrakis, and S. M. Lucas, “Knowledge-based Fast Evolutionary MCTS for General Video Game Playing,” in IEEE Conference on Computational Intelligence and Games, 2014, pp. 1–8. [13] S. M. Lucas, S. Samothrakis, and D. Perez, “Fast Evolutionary Adaptation for Monte Carlo Tree Search,” in EvoGames, 2014. [14] J. Liu, D. Perez-Liebana, and S. M. Lucas, “Bandit-Based Random Mutation Hill-Climbing,” CoRR, vol. abs/1606.06041, 2016. [Online]. Available: http://arxiv.org/abs/1606.06041 [15] B. Kazimipour, X. Li, and A. K. Qin, “A Review of Population Initialization Techniques for Evolutionary Algorithms,” in IEEE Congress on Evolutionary Computation (CEC), 2014. [16] K. J. Kim, H. Choi, and S. B. Cho, “Hybrid of Evolution and Reinforcement Learning for Othello Players,” in 2007 IEEE Symposium on Computational Intelligence and Games, April 2007, pp. 203–209. [17] H. Maaranen, K. Miettinen, and M. Mäkelä, “Quasi-Random Initial Population for Genetic Algorithms,” Computers and Mathematics with Applications, vol. 47, no. 12, pp. 1885–1895, 2004. [18] C. Browne, E. Powley, D. Whitehouse, S. Lucas, P. Cowling, P. Rohlfshagen, S. Tavener, D. Perez, S. Samothrakis, and S. Colton, “A Survey of Monte Carlo Tree Search Methods,” in IEEE Trans. on Computational Intelligence and AI in Games, vol. 4, no. 1, 2014, pp. 1–43. [19] M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling, “The Arcade Learning Environment: An Evaluation Platform for General Agents,” Journal of Artificial Intelligence Research, vol. 47, pp. 253–279, 2013. [20] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra, S. Legg, and D. Hassabis, “Human-level Control Through Deep Reinforcement Learning,” Nature, vol. 518, no. 7540, pp. 529–533, 2015. [21] M. J. Nelson, “Investigating Vanilla MCTS Scaling on the GVGAI Game Corpus,” in Proceedings of the 2016 IEEE Conference on Computational Intelligence and Games, 2016. [22] P. Bontrager, A. Khalifa, A. Mendes, and J. Togelius, “Matching Games and Algorithms for General Video Game Playing,” in 12 Artificial Intelligence and Interactive Digital Entertainment Conference, 2016, pp. 122–128. [23] R. D. Gaina, J. Liu, S. M. Lucas, and D. P. Liébana, “Analysis of Vanilla Rolling Horizon Evolution Parameters in General Video Game Playing,” in Springer Lecture Notes in Computer Science, EvoApplications, 2017. Game 0 4 13 15 18 22 25 29 36 46 49 50 58 60 61 67 75 77 84 91 Total Algorithm A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S A-Vanilla B-1SLA-S C-MCTS-S P = 1, L = 6 87.00 (3.36) 97.00 (1.71) 100.00 (0.00) 4.00 (1.96) 4.00 (1.96) 6.00 (2.37) 78.00 (4.14) 90.00 (3.00) 95.00 (2.18) 4.00 (1.96) 3.00 (1.71) 5.00 (2.18) 1.00 (0.99) 2.00 (1.40) 9.00 (2.86) 26.00 (4.39) 48.00 (5.00) 100.00 (0.00) 0.00 (0.00) 2.00 (1.40) 4.00 (1.96)* 0.00 (0.00) 0.00 (0.00) 0.00 (0.00)* 15.00 (3.57) 36.00 (4.80) 0.00 (0.00) 2.00 (1.40) 2.00 (1.40) 3.00 (1.71)* 98.00 (1.40) 96.00 (1.96) 97.00 (1.71)* 79.00 (4.07) 100.00 (0.00)* 100.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 35.00 (4.77) 36.00 (4.80) 63.00 (4.83) 23.00 (4.21) 28.00 (4.49) 30.00 (4.58) 75.00 (4.33) 70.00 (4.58) 91.00 (2.86) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 33.00 (4.70) 37.00 (4.83) 58.00 (4.94) 23.00 (4.21) 29.00 (4.54) 40.00 (4.90)* 35.00 (4.77) 65.00 (4.77) 9.00 (2.86) 0 (0) 2 (3) 6 (11) P = 2, L = 8 100.00 (0.00) 100.00 (0.00) 100.00 (0.00)* 5.00 (2.18) 5.00 (2.18) 6.00 (2.37) 83.00 (3.76) 90.00 (3.00) 99.00 (0.99) 7.00 (2.55) 3.00 (1.71) 5.00 (2.18) 2.00 (1.40) 4.00 (1.96) 12.00 (3.25) 74.00 (4.39) 76.00 (4.27) 100.00 (0.00) 2.00 (1.40) 3.00 (1.71) 1.00 (0.99)* 0.00 (0.00) 0.00 (0.00) 0.00 (0.00)* 32.00 (4.66) 30.00 (4.58)* 0.00 (0.00) 4.00 (1.96) 0.00 (0.00) 5.00 (2.18) 98.00 (1.40) 97.00 (1.71) 100.00 (0.00)* 100.00 (0.00) 100.00 (0.00)* 100.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 46.00 (4.98) 47.00 (4.99) 62.00 (4.85) 26.00 (4.39) 22.00 (4.14) 25.00 (4.33) 79.00 (4.07) 72.00 (4.49) 89.00 (3.13) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00)* 42.00 (4.94) 44.00 (4.96) 51.00 (5.00) 39.00 (4.88) 39.00 (4.88) 52.00 (5.00) 65.00 (4.77) 65.00 (4.77) 11.00 (3.13) 0 (0) 0 (2) 6 (10) P = 5, L = 10 P = 10, L = 14 100.00 (0.00) 100.00 (0.00) 100.00 (0.00) 100.00 (0.00) 100.00 (0.00)* 100.00 (0.00)* 9.00 (2.86) 8.00 (2.71) 4.00 (1.96) 5.00 (2.18) 7.00 (2.55) 7.00 (2.55) 94.00 (2.37) 96.00 (1.96) 90.00 (3.00) 87.00 (3.36) 100.00 (0.00) 99.00 (0.99) 2.00 (1.40) 7.00 (2.55) 3.00 (1.71) 7.00 (2.55) 8.00 (2.71) 5.00 (2.18) 7.00 (2.55) 6.00 (2.37) 4.00 (1.96) 1.00 (0.99) 8.00 (2.71)* 11.00 (3.13) 95.00 (2.18) 99.00 (0.99) 72.00 (4.49) 33.00 (4.70) 100.00 (0.00) 99.00 (0.99)* 2.00 (1.40) 7.00 (2.55) 4.00 (1.96) 4.00 (1.96) 2.00 (1.40)* 0.00 (0.00)* 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 33.00 (4.70) 44.00 (4.96) 33.00 (4.70) 31.00 (4.62) 0.00 (0.00) 0.00 (0.00) 3.00 (1.71) 1.00 (0.99) 4.00 (1.96) 2.00 (1.40) 4.00 (1.96) 6.00 (2.37) 96.00 (1.96) 98.00 (1.40) 97.00 (1.71) 98.00 (1.40) 94.00 (2.37)* 100.00 (0.00) 100.00 (0.00) 100.00 (0.00) 100.00 (0.00)* 100.00 (0.00)* 100.00 (0.00) 100.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00)* 0.00 (0.00)* 0.00 (0.00) 51.00 (5.00) 57.00 (4.95) 49.00 (5.00) 39.00 (4.88) 59.00 (4.92) 67.00 (4.70) 28.00 (4.49) 26.00 (4.39) 23.00 (4.21) 25.00 (4.33) 26.00 (4.39) 28.00 (4.49) 89.00 (3.13) 96.00 (1.96) 85.00 (3.57) 89.00 (3.13) 83.00 (3.76) 85.00 (3.57) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 31.00 (4.62) 44.00 (4.96) 48.00 (5.00) 34.00 (4.74) 68.00 (4.66) 50.00 (5.00) 43.00 (4.95) 40.00 (4.90) 32.00 (4.66) 29.00 (4.54) 49.00 (5.00) 41.00 (4.92)* 68.00 (4.66) 76.00 (4.27) 59.00 (4.92) 72.00 (4.49) 29.00 (4.54) 21.00 (4.07) 0 (0) 2 (0) 0 (1) 0 (2) 3 (7) 0 (5) TABLE V P = 15, L = 16 100.00 (0.00) 100.00 (0.00) 100.00 (0.00)* 11.00 (3.13) 10.00 (3.00) 5.00 (2.18) 91.00 (2.86) 84.00 (3.67) 98.00 (1.40) 5.00 (2.18) 7.00 (2.55) 4.00 (1.96) 8.00 (2.71) 4.00 (1.96) 11.00 (3.13)* 97.00 (1.71) 24.00 (4.27) 100.00 (0.00) 9.00 (2.86) 3.00 (1.71) 5.00 (2.18)* 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 42.00 (4.94) 33.00 (4.70) 0.00 (0.00) 3.00 (1.71) 1.00 (0.99) 7.00 (2.55) 96.00 (1.96) 97.00 (1.71) 97.00 (1.71) 100.00 (0.00) 100.00 (0.00)* 100.00 (0.00) 0.00 (0.00) 0.00 (0.00)* 0.00 (0.00) 58.00 (4.94) 43.00 (4.95) 69.00 (4.62) 29.00 (4.54) 21.00 (4.07) 24.00 (4.27) 92.00 (2.71) 83.00 (3.76) 91.00 (2.86) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 58.00 (4.94) 52.00 (5.00) 56.00 (4.96) 45.00 (4.97) 33.00 (4.70) 43.00 (4.95) 71.00 (4.54) 65.00 (4.77) 24.00 (4.27) 0 (0) 0 (2) 2 (4) P = 20, L = 20 100.00 (0.00) 100.00 (0.00) 100.00 (0.00)* 5.00 (2.18) 5.00 (2.18) 6.00 (2.37) 92.00 (2.71) 87.00 (3.36) 97.00 (1.71) 7.00 (2.55) 2.00 (1.40) 5.00 (2.18) 6.00 (2.37) 3.00 (1.71) 11.00 (3.13) 98.00 (1.40) 13.00 (3.36) 99.00 (0.99)* 8.00 (2.71) 6.00 (2.37) 3.00 (1.71)* 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 39.00 (4.88) 37.00 (4.83) 1.00 (0.99) 3.00 (1.71) 1.00 (0.99) 4.00 (1.96) 98.00 (1.40) 99.00 (0.99) 100.00 (0.00) 100.00 (0.00) 100.00 (0.00)* 100.00 (0.00) 0.00 (0.00) 0.00 (0.00)* 0.00 (0.00) 59.00 (4.92) 43.00 (4.95) 64.00 (4.80) 31.00 (4.62) 32.00 (4.66) 26.00 (4.39) 96.00 (1.96)* 82.00 (3.84) 97.00 (1.71) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00)* 59.00 (4.92) 43.00 (4.95) 63.00 (4.83) 49.00 (5.00) 39.00 (4.88) 45.00 (4.97) 72.00 (4.49) 69.00 (4.62) 11.00 (3.13) 0 (1) 0 (2) 0 (4) Total 97.83 (2.16) 99.50 (0.50) 100.00 (0.00) 7.00 (1.12) 5.5 (1.88) 6.16 (0.33) 89.00 (2.94) 88.00 (1.04) 98.00 (0.76) 5.33 (0.77) 4.16 (0.83) 5.33 (0.68) 5.00 (1.33) 3.00 (0.61) 10.33 (1.28) 81.5 (11.74) 44.33 (8.43) 99.67 (0.16) 4.67 (1.39) 3.67 (0.33) 2.50 (0.76) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 34.16 (4.56) 33.33 (1.11) 0.16 (0.16) 2.67 (0.42) 1.67 (0.53) 4.83 (0.57) 97.33 (0.57) 97.33 (0.33) 98.00 (1.00) 96.50 (3.50) 100.00 (0.00) 100.00 (0.00) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 51.16 (3.51) 42.83 (2.02) 64.00 (1.60) 27.16 (0.87) 25.16 (1.02) 26.50 (0.88) 87.83 (3.24) 80.16 (3.27) 89.33 (1.32) 0.00 (0.00) 0.00 (0.00) 0.00 (0.00) 44.50 (4.16) 43.00 (2.90) 57.67 (2.69) 39.83 (4.15) 33.50 (1.68) 45.00 (1.92) 64.50 (6.05) 65.83 (2.12) 17.50 (3.13) 2 (1) 2 (4) 8 (13) AVERAGE OF VICTORIES IN ALL 20 GAMES . B OLD STYLE INDICATES THAT THE ALGORITHM IS SIGNIFICANTLY BETTER IN THAT GAME THAN THE OTHER TWO SEEDING VARIANTS , REGARDING AVERAGE VICTORIES . * SYMBOL INDICATES THAT THE ALGORITHM IS SIGNIFICANTLY BETTER IN THAT GAME THAN THE OTHER TWO SEEDING VARIANTS , REGARDING AVERAGE GAME SCORE . T HE BOTTOM OF THE TABLE ADDS UP THE NUMBER OF GAMES IN WHICH THE ALGORITHM WAS SIGNIFICANTLY BETTER THAN THE OTHER TWO VARIANTS IN AVERAGE VICTORIES AND AVERAGE SCORES IN BRACKETS . T HE NON - PARAMETRIC W ILCOXON SIGNED - RANK TEST WITH P - VALUE < 0.05 WAS USED TO DETERMINE SIGNIFICANCE .
9cs.NE
Which Distribution Distances are Sublinearly Testable? arXiv:1708.00002v2 [cs.DS] 31 Oct 2017 Constantinos Daskalakis∗ EECS & CSAIL, MIT [email protected] Gautam Kamath† EECS & CSAIL, MIT [email protected] John Wright‡ Physics, MIT [email protected] November 1, 2017 Abstract Given samples from an unknown distribution p and a description of a distribution q, are p and q close or far? This question of “identity testing” has received significant attention in the case of testing whether p and q are equal or far in total variation distance. However, in recent work [VV11a, ADK15, DP17], the following questions have been been critical to solving problems at the frontiers of distribution testing: • Alternative Distances: Can we test whether p and q are far in other distances, say Hellinger? • Tolerance: Can we test when p and q are close, rather than equal? And if so, close in which distances? Motivated by these questions, we characterize the complexity of distribution testing under a variety of distances, including total variation, ℓ2 , Hellinger, Kullback-Leibler, and χ2 . For each pair of distances d1 and d2 , we study the complexity of testing if p and q are close in d1 versus far in d2 , with a focus on identifying which problems allow strongly sublinear testers (i.e., those with complexity O(n1−γ ) for some γ > 0 where n is the size of the support of the distributions p and q). We provide matching upper and lower bounds for each case. We also study these questions in the case where we only have samples from q (equivalence testing), showing qualitative differences from identity testing in terms of when tolerance can be achieved. Our algorithms fall into the classical paradigm of χ2 -statistics, but require crucial changes to handle the challenges introduced by each distance we consider. Finally, we survey other recent results in an attempt to serve as a reference for the complexity of various distribution testing problems. 1 Introduction The arch problem in science is determining whether observations of some phenomenon conform to a conjectured model. Often, phenomena of interest are probabilistic in nature, and so are our models of these phenomena; hence, testing their validity becomes a statistical hypothesis testing problem. In mathematical notation, suppose that we have access to samples from some unknown distribution p over some set Σ of size n. We also have a hypothesis distribution q, and our goal is to distinguish whether p = q or p 6= q. For instance, we may want to test whether the sizes of some population of insects are normally distributed around their mean by sampling insects and measuring their sizes. Of course, our models are usually imperfect. In our insect example, perhaps our estimation of the mean and variance of the insect sizes is a bit off. Furthermore, the sizes will clearly always be positive numbers. Yet a Normal distribution could still be a good fit. To get a meaningful testing problem some slack may be introduced, turning the problem into that of distinguishing whether d1 (p, q) ≤ ε1 versus d2 (p, q) ≥ ε2 , for some distance measures d1 (·, ·) and d2 (·, ·) between distributions over Σ and some choice of ε1 and ε2 which may potentially depend on Σ or even q. Regardless, for the problem to be well-defined, the sets of distributions C = {p | d1 (p, q) ≤ ε1 } and F = {p | d2 (p, q) ≥ ε2 } should be disjoint. In fact, as our goal is to distinguish between p ∈ C and p ∈ F from samples, we cannot possibly draw the right conclusion with ∗ Supported by NSF CCF-1617730, CCF-1650733, and ONR N00014-12-1-0999. by NSF CCF-1617730, CCF-1650733, and ONR N00014-12-1-0999. Part of this work was done while the author was an intern at Microsoft Research New England. ‡ Supported by NSF grant CCF-6931885. † Supported 1 probability 1 or detect the most minute deviations of p from C or F . So our guarantee should be probabilistic, and there should be some “gap” between the sets C and F . In sum, the problem is the following: (d1 , d2 )-Identity Testing: Given an explicit description of a distribution q over Σ, sample access to a distribution p over Σ, and bounds ε1 ≥ 0, and ε2 , δ > 0, distinguish with probability at least 1 − δ between d1 (p, q) ≤ ε1 and d2 (p, q) ≥ ε2 , whenever p satisfies one of these two inequalities. A related problem is when we have sample access to both p and q. For example, we might be interested in whether two populations of insects have distributions that are close or far. The resulting problem is the following: (d1 , d2 )-Equivalence (or Closeness) Testing: Given sample access to distributions p and q over Σ, and bounds ε1 ≥ 0, and ε2 , δ > 0, distinguish with probability at least 1 − δ between d1 (p, q) ≤ ε1 and d2 (p, q) ≥ ε2 , whenever p, q satisfy one of these two inequalities. The above questions are of course fundamental, and widely studied since the beginning of statistics. However, most tests only detect certain types of deviations of p from q, or are designed for distributions in parametric families. Moreover, most of the emphasis has been on the asymptotic sample regime. To address these challenges, there has been a surge of recent interest in information theory, property testing, and sublinear-time algorithms aiming at finite sample and d1 -close vs. d2 -far distinguishers, as in the formulations above; see e.g. [BFF+ 01, BKR04, Pan08, VV17, ADK15, CDGR16, DK16]. This line of work has culminated in computationally efficient and sample optimal testers for several choices of distances d1 and d2 , as well as error parameters ε1 and ε2 , for example: • for identity testing, when: – d2 is taken to be the total variation distance, and ε1 = 0 [BFF+ 01, Pan08, VV17]; – d1 is taken to be the χ2 -divergence, d2 is taken to be the total variation distance, and ε1 = (ε2 )2 /4 [ADK15, DK16]; • for equivalence testing, when d2 is taken to be the total variation distance, and ε1 = 0 [BFR+ 13, Val11, CDVV14]. There are also several other sub-optimal results known for other combinations of d1 , d2 , ε1 and ε2 , and for many combinations there are no known testers. A more extensive discussion of the literature is provided in Section 1.2. The goal of this paper is to provide a complete mapping of the optimal sample complexity required to obtain computationally efficient testers for identity testing and equivalence testing under the most commonly used notions of distances d1 and d2 . Our results are summarized in Tables 1, 2, and 3 and discussed in detail in Section 1.1. In particular, we obtain computationally efficient and sample optimal testers for distances d1 and d2 ranging in the set {ℓ2 -distance, total variation distance, Hellinger distance, Kullback-Leibler divergence, χ2 -divergence},1 and for combinations of these distances and choice of errors ε1 and ε2 which give rise to meaningful testing problems as discussed above. The sample complexities stated in the tables are for probability of error 1/3. Throwing in extra factors of O(log 1/δ) boosts the probability of error to 1 − δ, as usual.2 Our motivation for this work is primarily the fundamental nature of identity and equivalence testing, as well as of the distances under which we study these problems. It is also the fact that, even though distribution testing is by now a mature subfield of information theory, property testing, and sublinear-time algorithms, several of the testing questions that we consider have had unknown statuses prior to our work. This gap is accentuated by the fact that, as we establish, closely related distances may have radically different behavior. To give a quick example, it is easy to see that χ2 -divergence is the second-order Taylor expansion of KL-divergence. Yet, as we show, the sample complexity for identity testing changes radically when d2 is taken to be total variation or Hellinger distance, and d1 transitions from χ2 to KL or weaker distances; 1 These distances are nicely nested, as discussed in Section 2, from the weaker ℓ2 to the stronger χ2 -divergence. one can repeat the test O(log 1/δ) times and output the majority result. One can analyze the resulting probability of success by the Chernoff bound. 2 Namely, 2 see Table 1. Prior to this work we knew about a transition somewhere between χ2 -divergence and total variation distance, but our work identifies a more refined understanding of the point of transition. Similar fragility phenomena are identified by our work for equivalence testing, when we switch from total variation to Hellinger distance, as seen in Tables 2 and 3. Adding to the fundamental nature of the problems we consider here, we should also emphasize that a clear understanding of the different tradeoffs mapped out by our work is critical at this point for the further development of the distribution testing field, as recent experience has established. Let us provide a couple of recent examples, drawing from our prior work. Acharya, Daskalakis, and Kamath [ADK15] study whether properties of distributions, such as unimodality or log-concavity, can be tested in total variation distance. Namely, given sample access to a distribution p, how many samples are needed to test whether it has some property (modeled by a set P of distributions) or whether it is far from having the property, i.e. dTV (p, P) > ε, for some error ε? Their approach is to first learn a proxy distribution p̂ ∈ P that satisfies d′ (p, p̂) ≤ ε′ for some distance d′ , whenever p ∈ P, then reduce the property testing problem to (d′ , dTV )-identity testing of p to p̂. Interestingly, rather than picking d′ to be total variation distance, they √ take it to be χ2 -divergence, which leads to optimal testers of sample complexity O( n/ε2 ) for several P’s such as monotone, unimodal, and log-concave distributions over [n]. Had they picked d′ to be total variation distance, they would be stuck with a Ω(n/ log n) sample complexity in the resulting identity testing problem, as Table 1 illustrates, which would lead to a suboptimal overall tester. The choice of χ2 -divergence in the work of Acharya et al. was somewhat ad hoc. By providing a full mapping of the sample complexity tradeoffs in the use of different distances, we expect to help future work in identifying better where the bottlenecks and opportunities lie. Another example supporting our expectation can be found in recent work of Daskalakis and Pan [DP17]. They study equivalence testing of Bayesian networks under total variation distance. Bayesian networks are flexible models expressing combinatorial structure in high-dimensional distributions in terms of a directed acyclic graph (DAG) specifying their conditional dependence structure. The challenge in testing Bayes nets is that their support scales exponentially in the number of nodes, and hence naive applications of known equivalence tests lead to sample complexities that are exponential in the number of nodes, even when the in-degree δ of the underlying DAGs is bounded. To address this challenge, Daskalakis and Pan establish “localization-of-distance” results of the following form, for various choices of distance d: “If two Bayes nets P and Q are ε-far in total variation distance, then there exists a small set of nodes S (whose size is ∆ + 1, where ∆ is again the maximum in-degree of the underlying DAG where P and Q are defined) such that the marginal distributions of P and Q over the nodes of set S are ε′ -far under distance d.” When they take d to be total variation distance, they can show ε′ = Ω(ε/m), where m is the number of nodes in the underlying DAG (i.e. the dimension). Given this localization of distance, to test whether two Bayes nets P and Q satisfy P = Q vs. dTV (P, Q) ≥ ε, it suffices to test, for all relevant marginals PS and QS whether PS = QS vs. dTV (PS , QS ) = Ω(ε/m). From Table 2 it follows that this requires sample size superlinear in m, which is suboptimal. Interestingly, when they take d to be the square Hellinger distance, they can establish a localization-of-distance result with ε′ = ε2 /2m. By Table 2, to test each S they need sample complexity that is linear in m, leading to an overall dependence of the sample complexity on m that is Õ(m),3 which is optimal up to log factors. Again, switching to a different distance results in near-optimal overall sample complexity, and our table is guidance as to where the bottlenecks and opportunities lie. Finally, we comment that tolerant testing (i.e., when ε1 > 0) is perhaps one of the most interesting questions in the design of practically useful testers. Indeed, as mentioned before, in many statistical settings there may be model misspecification. For example, why should one expect to be receiving samples from precisely the uniform distribution? As such, one may desire that a tester is robust to small errors, and accepts all distributions which are close to uniform. Unfortunately, Valiant and Valiant [VV11a] ruled out the possibility  ofa strongly sublinear tester which has total variation tolerance, showing that such a problem requires Θ logn n samples. However, as shown by Acharya, Daskalakis, and Kamath [ADK15], χ2 -tolerance √  is possible with only O ε2n samples. This raises the following question: Which distances can a tester be tolerant to, while maintaining a strongly sublinear sample complexity? We outline what is possible. 3 The extra log factors are to guarantee that the tests performed on all sets S of size δ + 1 succeed. 3 dTV (p, q) ≥ ε √  Ω ε2n [Pan08] p=q dχ2 (p, q) ≤ ε2 /4 dKL (p, q) ≤ ε2 /4 √ dH (p, q) ≤ ε/2 2 Ω  n log n  √ dH (p, q) ≥ ε/ 2 O [Theorem 8] dTV (p, q) ≤ ε/2 or ε2 /45 O √   n ε2 n log n dKL (p, q) ≥ ε2 Untestable [Theorem 7] dχ2 (p, q) ≥ ε2 [Theorem 1]  [Corollary 3] Table 1: Identity Testing. Rows correspond to completeness of the tester, and columns correspond to soundness. p=q dχ2 (p, q) ≤ ε2 /4 dKL (p, q) ≤ ε2 /4 √ dH (p, q) ≤ ε/2 2 dTV (p, q) ≤ ε/2 or ε2 /45 d (p, q) ≥ ε o  n TV 1/2 2/3 O max nε2 , nε4/3 [CDVV14]  n 1/2 2/3 o Ω max nε2 , nε4/3 [CDVV14]   Ω logn n [Theorem 9] √ d (p, q) ≥ ε/ 2 n H3/4 2/3 o O min nε2 , nε8/3 [Theorem 5]  n 3/4 2/3 o [DK16] Ω min nε2 , nε8/3  O  n log n  dKL (p, q) ≥ ε2 Untestable [Theorem 7] dχ2 (p, q) ≥ ε2 [Corollary 3] Table 2: Equivalence Testing. Rows correspond to completeness of the tester, and columns correspond to soundness. 1.1 Results Our results are pictorially presented in Tables 1, 2, and 3. We note that these tables are intended to provide only references to the sample complexity of each testing problem, rather than exhaustively cover all prior work. As such, several references are deferred to Section 1.2. In Tables 1 and 2, each cell contains the complexity of testing whether two distributions are close in the distance for that row, versus far in the distance for that column.4 These distances and their relationships are covered in detail in Section 2, but we note that the distances are scaled and transformed such that problems become harder as we traverse the table down or to the right. In other words, lower bounds hold for cells which are down or to the right in the table, and upper bounds hold for cells which are up or to the left; problems with the same complexity are shaded with the same color. The dark grey boxes indicate problems which are not well-defined, i.e. two distributions could simultaneously be close in KL and far in χ2 -divergence. We highlight some of our results: √ √ 1. We give an O( n/ε2 ) sample algorithm for identity testing whether dχ2 (p, q) ≤ ε2 /4 or dH (p, q) ≥ ε/ 2 (Theorem 1). This is the first algorithm which achieves the optimal dependence on both n and √ ε for identity testing with respect to Hellinger distance (even non-tolerantly). We note that a O( n/ε4 ) algorithm was known, due to optimal identity testers for total variation distance and the quadratic relationship between total variation and Hellinger distance. 2. In the case of identity testing, a stronger form of tolerance (i.e., KL divergence instead of χ2 ) causes the sample complexity to jump to Ω (n/ log n) (Theorem 8). We find this a bit surprising, as χ2 -divergence is the second-order Taylor expansion of KL divergence, so one might expect that the testing problems have comparable complexities. 3. In the case of equivalence testing, even χ2 -tolerance comes at the cost of an Ω (n/ log n) sample complexity (Theorem 9). This is a qualitative difference from identity testing, where χ2 -tolerance came at no cost. 4 Note that we chose constants in our theorem statements for simplicity of presentation, and they may not match the constants presented in the table. This can be remedied by appropriate changing of constants in the algorithms and constant factor increases in the sample complexity. 5 We note that we must use ε/2 or ε2 /4 depending on whether we are testing with respect to TV or Hellinger. For more details and other discussion of the n/ log n region of this chart, see Section 1.1.2. 4 d(p, q) ≤ fd (n, ε) vs. dℓ2 (p, q) ≥ ε dℓ2 (p, q) ≤ dℓ2 (p, q) ≤ √ε n 2 ε √ n vs. dTV (p, q) ≥ ε vs. dH (p, q) ≥ ε Identity Testing  Θ ε12 [Corollary 2] √  Θ ε2n [Theorem 2] √  Θ ε2n [Theorem 3] Equivalence Testing  Θ ε12 [Corollary 2]  n 1/2 2/3 o Θ max nε2 , nε4/3 [Theorem 4]  n 3/4 2/3 o Θ min nε2 , nε8/3 [Theorem 5] Table 3: ℓ2 Testing. fd (n, ε) is a quantity such that d(p, q) ≤ fd (n, ε) and dℓ2 (p, q) ≥ ε are disjoint. 4. However, in both identity and equivalence testing, ℓ2 tolerance comes at no additional cost (Theorems 2, 3, 4, and 5). Thus, in many cases, ℓ2 tolerance is the best one can do if one wishes to maintain a strongly sublinear sample complexity. From a technical standpoint, our algorithms are χ2 -statistical tests, and most closely resemble those of [ADK15] and [CDVV14] (similar χ2 -tests were employed in [VV17, DKN15, CDGR16]). However, crucial changes are required to satisfy the more stringent requirements of testing with respect to Hellinger distance. In our identity tester for Hellinger, we deal with this different distance measure by pruning light domain elements of q less aggressively than [ADK15], in combination with a preliminary test to reject early if the difference between p and q is contained exclusively within the set of light elements – this is a new issue that cannot arise when testing with respect to total variation distance. In our equivalence tester for Hellinger, we follow an approach, similar to [CDVV14] and [DK16], of analyzing the light and heavy domain elements separately, with the challenge that the algorithm does not know which elements are which. Finally, to achieve ℓ2 tolerance in these cases, we use a “mixing” strategy in which instead of testing based solely on samples from p and q, we mix in some number (depending on our application) of samples from the uniform distribution. At a high level, the purpose of mixing is to make our distributions well-conditioned, i.e. to ensure that all probability values are sufficiently large. Such a strategy was recently employed by Goldreich in [Gol16] for uniformity testing. 1.1.1 Comments on ℓ2 -tolerance ℓ2 tolerance has been indirectly considered in [GR00, BFF+ 01, BFR+ 13] through their weak tolerance for total variation distance and the relationship with ℓ2 distance, though these results have suboptimal sample complexity. Our equivalence testing results improve upon [CDVV14] by adding ℓ2 -tolerance. We note that [DK16] also provides ℓ2 -tolerant testers (as well as [DKN15] for the case of uniformity), comparable to those obtained in Theorems 2, 3, and 5, though this tolerance is not explicitly analyzed in their paper. This can be seen by noting that the underlying tester from [CDVV14] is tolerant, and the “flattening” operation they apply reduces the ℓ2 -distance between the distributions. The testers in [DK16] are those of Propositions 2.7, 2.10, and 2.15, combined with the observation of Remark 2.8. We rederive these results for completeness, and to show a direct way of proving ℓ2 -tolerance. Note that Theorem 5 also improves upon Proposition 2.15 of [DK16] by removing log factors in the sample complexity. 1.1.2 Comments on the Θ(n/ log n) Results Our upper bounds in the bottom-left portion of the table are based off the total variation distance estimation algorithm of Jiao, Han, and Weissman [JHW16], where an Θ(n/ log n) complexity is only derived for ε ≥ 1/ poly(n). Similarly, in [VV10a], the lower bounds are only valid for constant ε. We believe that the precise characterization is a very interesting open problem. In the present work, we focus on the case of constant ε for these testing problems. We wish to draw attention to the bottom row of the table, and note that the√two testing problems are dTV (p, q) ≤ ε/2 versus dTV (p, q) ≥ ε, and dTV (p, q) ≤ ε2 /4 versus dH (p, q) ≥ ε/ 2. This difference in parameterization is required to make the two cases in the testing problem disjoint. With this parameterization, we conjecture that the latter problem has a greater dependence on ε as it goes to 0 (namely, ε−4 versus ε−2 ), so we colour the box a slightly darker shade of orange. 5 1.2 Related Work The most classic distribution testing question is uniformity testing, which is identity testing when ε1 = 0, d2 is total variation distance, and q is the uniform distribution. This was first studied in theoretical computer science √ in [GR00]. Paninski gave an optimal algorithm (for when ε2 is not too small) with a complexity of O( n/ε2 ) and a matching lower bound [Pan08]. More generally, letting q be an arbitrary distribution, exact total variation identity testing was studied [BFF+ 01], and √ an (instance) optimal algorithm was given by Valiant and Valiant [VV17], with the same complexity of O( n/ε2 ). Optimal algorithms for this problem were rediscovered several times, see i.e. [DKN15, ADK15, DK16, DGPP16]. Equivalence (or closeness) testing was studied in [BFR+ 13], in the same setting (ε1 = 0, d2 is total variation distance). A lower bound of Ω(n2/3 ) was given by [Val11]. Tight upper and lower bounds were given in [CDVV14], which shows interesting behavior of the sample complexity as the parameter ε goes from large to small. This problem was also studied in the setting where one has unequal sample sizes from the two distributions [BV15, DK16]. When the distance d1 is Hellinger, the complexity is qualitatively different, as shown by [DK16]. They prove a nearly-optimal upper bound and a tight lower bound for this problem. [Wag15, DBNNR11] also consider testing problems with other distances, namely ℓp distances and earth mover’s distance (also known as Wasserstein distance), respectively. Tolerant identity testing (where ε1 = O(ε) and d1 is total variation distance) was studied in [VV10a, VV10b, VV11a, VV11b], through the (equivalent) lens of estimating total variation distance between distributions. In these works, Θ (n/ log n) bounds were proven for the sample complexity. Several other related problems (i.e., support size and entropy estimation) share the same sample complexity, and have enjoyed significant study [AOST17, WY16, ADOS17]. The closest related results to our work are those on estimating distances between distributions [JHW16, JVHW17, HJW16]. χ2 -tolerance (when d1 is χ2 -divergence and ε1 = O(ε2 )) was introduced and applied by [ADK15] for testing families of distributions, i.e., testing if a distribution is monotone or far from being monotone. It was shown that this tolerance comes at no additional cost over vanilla identity testing; that is, the sample √ complexity is still O( n/ε2 ). Testing such families of distributions was also studied by [CDGR16]. Testing with respect to Hellinger distance was applied in [DP17] for testing Bayes networks. Since lower bounds of [ADK15] show that distribution testing suffers from the curse of dimensionality, further structural assumptions must be made if one wishes to test multivariate distributions. This “high-dimensional frontier” has also been studied on graphical models by [DDK18] and [CDKS17] (for Ising models and Bayesian networks, respectively). Our work focuses on characterizing the complexity of identity and equivalence testing in the worst case over pairs p and q. Related works attempt to nail down the sample complexity of identity testing on an instance-by-instance basis [VV17, JHW16, DK16, BCG17] – that is, reducing the sample complexity depending on which distribution q is given as input (and sometimes depending on p as well). We consider this to be an interesting open question for different distances d1 and d2 . For example, Theorem 7 states that identity testing is impossible √ when d2 is the KL divergence. However, if q is the uniform distribution, then the complexity becomes Θ( n). An instance-by-instance analysis would allow one to bypass some of these strong lower bounds. This is only a fraction of recent results; we direct the reader to [Can15] for an excellent recent survey of distribution testing. 1.3 Organization The organization of this paper is as follows. In Section 2, we state preliminaries and notation used in this paper. In Sections 3 and 4, we prove upper bounds for identity testing and equivalence testing (respectively) based on χ2 -style statistics. In Section 5, we prove upper bounds for distribution testing based on distance estimation. Finally, in Section 6, we prove testing lower bounds. 2 Preliminaries In this paper, we will focus on discrete probability distributions over [n]. For a distribution p, we will use the notation pi to denote the mass p places on symbol i. For a set S ⊆ [n] and a distribution p over [n], pS 6 is the vector p restricted to the coordinates in S. We will call this a restriction of distribution p. The following probability distances and divergences are of interest to us: Definition 1. The total variation distance between p and q is defined as dTV (p, q) = max p(S) − q(S) = S⊆[n] 1 X |pi − qi | = kp − qk1 ∈ [0, 1]. 2 i∈[n] Definition 2. The KL divergence between p and q is defined as   X pi pi log dKL (p, q) = ∈ [0, ∞). qi i∈[n] This definition uses the convention that 0 log 0 = 0. Definition 3. The Hellinger distance between p and q is defined as sX 1 √ √ 2 dH (p, q) = √ ( pi − qi ) ∈ [0, 1]. 2 i∈[n] Definition 4. The χ2 -divergence (or chi-squared divergence) between p and q is defined as dχ2 (p, q) = X (pi − qi )2 ∈ [0, ∞). qi i∈[n] Definition 5. The ℓ2 distance between p and q is defined as sX (pi − qi )2 = kp − qk2 ∈ [0, 1]. dℓ2 (p, q) = i∈[n] We also define these distances for restrictions of distributions pS and qS by replacing the summations over i ∈ [n] with summations over i ∈ S. We have the following relationships between these distances. These are well-known for distributions, i.e., see [GS02], but we prove them more generally for restrictions of distributions in Section A. Proposition 1. Letting pS and qS be restrictions of distributions p and q to S ⊆ [n], sX q √ (qi − pi ) + dKL (pS , qS ) ≤ dχ2 (pS , qS ). d2H (pS , qS ) ≤ dTV (pS , qS ) ≤ 2dH (pS , qS ) ≤ i∈S We recall that dℓ2 fits into the picture by its relationship with total variation distance: Proposition 2. Letting p and q be distributions over [n], dℓ2 (p, q) ≤ 2dTV (p, q) ≤ √ ndℓ2 (p, q). The second inequality follows from Cauchy-Schwarz. We will also need to following bound for Hellinger distance: Proposition 3. 2d2H (p, q) ≤ n X (pi − qi )2 i=1 pi + qi ≤ 4d2H (p, q). Proof. Expanding the Hellinger-squared distance, n d2H (p, q) = n 1X √ √ 1 X (pi − qi )2 ( pi − qi )2 = . √ √ 2 i=1 2 i=1 ( pi + qi )2 √ √ The fact now follows because (pi + qi ) ≤ ( pi + qi )2 ≤ 2(pi + qi ). 7 Pn The quantity i=1 (pi − qi )2 /(pi + qi ) is sometimes called the triangle distance. However, we see here that it is essentially the Hellinger distance (up to constant factors). Proposition 4. Given a number δ ∈ [0, 1] and a discrete distribution r = (r1 , . . . , rn ), define r+δ := (1 − δ) · r + δ · ( n1 , . . . , n1 ). Then given two discrete distributions p = (p1 , . . . , pn ) and q = (q1 , . . . , qn ), dℓ2 (p+δ , q +δ ) = (1 − δ)dℓ2 (p, q). dTV (p+δ , q +δ ) = (1 − δ)dTV (p, q), √ In addition, dH (p+δ , q +δ ) ≥ dH (p, q) − 2 δ. Proof. The statements for total variation and ℓ2 distance are immediate. As for the Hellinger distance, we have by the triangle inequality that dH (p, q) ≤ dH (p, p+δ ) + dH (p+δ , q +δ ) + dH (q +δ , q). We can bound the first term by d2H (p, p+δ ) ≤ dTV (p, p+δ ) = 1 2 · kδ · p − δ · ( n1 , . . . , n1 )k1 ≤ δ, where the last step is by the triangle inequality, and a similar argument bounds the third term by √ well. Thus, dH (p+δ , q +δ ) ≥ dH (p, q) − 2 δ. √ δ as A similar technique was employed in [Gol16]. At times, our algorithms will employ Poisson sampling. Instead of taking m samples from a distribution p, we instead take Poisson(m) samples. As a result, letting Ni be the number of occurences of symbol i, all Ni will be independent and distributed as Poisson(m · pi ). We note that this method of sampling is for purposes of analysis – concentration bounds imply that Poi(m) = O(m) with high probability, so such an algorithm can be converted to one with a fixed budget of samples at a constant-factor increase in the sample complexity. 3 Upper Bounds for Identity Testing In this section, we prove the following theorems for identity testing. Theorem 1. There exists an algorithm for identity testing between p and q distinguishing the cases: • dχ2 (p, q) ≤ ε2 ; • dH (p, q) ≥ ε. The algorithm uses O  n1/2 ε2  n1/2 ε2  n1/2 ε2  samples.  samples.  samples. Theorem 2. There exists an algorithm for identity testing between p and q distinguishing the cases: • dℓ2 (p, q) ≤ √ε ; n • dTV (p, q) ≥ ε. The algorithm uses O Theorem 3. There exists an algorithm for identity testing between p and q distinguishing the cases: • dℓ2 (p, q) ≤ ε2 √ ; n • dH (p, q) ≥ ε. The algorithm uses O We prove Theorem 1 in Section 3.1, and Theorems 2 and 3 in Section 3.2. 8 3.1 Identity Testing with Hellinger Distance and χ2 -Tolerance We prove Theorem 1 by analyzing Algorithm 1. We will set c1 = large constant. 1 100 , c2 = 6 25 , and let C be a sufficiently Algorithm 1 χ2 -close versus Hellinger-far testing algorithm 1: Input: ε; an explicit distribution q; sample access to a distribution p 2: Implicitly define A ← {i : qi ≥ c1 ε2 /n}, Ā ← [n] \ A 3: Let p̂ be the empirical distribution6 from drawing m1 = Θ(1/ε2) samples from p 4: if p̂(Ā) ≥ 34 c2 ε2 then 5: return Reject 6: end if √ 7: Draw a multiset S of Poisson(m2 ) samples from p, where m2 = C n/ε2 8: Let Ni be the number of occurrences of the ith domain element in S 9: Let S ′ be the set of domain elements observed in S P (Ni −m2 qi )2 −Ni + m2 (1 − q(S ′ ∩ A)) 10: Z ← i∈S ′ ∩A m2 qi 3 2 11: if Z ≤ 2 m2 ε then 12: return Accept 13: else 14: return Reject 15: end if √ √ We note that the sample and time complexity are both O( n/ε2 ). We draw m1 + m2 = Θ( n/ε2 ) samples total. All steps of the algorithm only involve inspecting domain elements where a sample falls, and it runs linearly in the number of such elements. Indeed, Step 10 of the algorithm is written in an unusual way in order to ensure the running time of the algorithm is linear. We first analyze the test in Step 4 of the algorithm. Folklore results state that with probability at least 99/100, this preliminary test will reject any p with p(Ā) ≥ c2 ε2 , it will not reject any p with p(Ā) ≤ c22 ε2 , and behavior for any other p is arbitrary. Condition on the event the test does not reject for the remainder of the proof. Note that since both thresholds here are Θ(ε2 ), it only requires m1 = Θ(1/ε2 ) samples, rather than the “non-extreme” regime, where we would require Θ(1/ε4 ) samples. Remark 1. We informally refer to this “extreme” versus “non-extreme” regime in distribution testing. To give an example of what we mean in these two cases, consider distinguishing Ber(1/2) from Ber(1/2 + ε). The complexity of this problem is Θ(1/ε2), and we consider this to be in the non-extreme regime. On the other hand, distinguishing Ber(ε) from Ber(2ε) has a sample complexity of Θ(1/ε), and we consider this to be in the extreme regime. We justify that any p which may be rejected in Step 5 (i.e., any p such that p(Ā) > c22 ε2 ) has the property that dχ2 (p, q) > ε2 (in other words, we do not wrongfully reject any p). Consider a p such that p(Ā) ≥ c22 ε2 . Note that dχ2 (p, q) ≥ dχ2 (pĀ , qĀ ), which we lower bound as follows: X (pi − qi )2 qi i∈Ā X n ≥ (pi − qi )2 c1 ε 2 i∈Ā 2  1 X n (pi − qi ) · ≥ c1 ε 2 n dχ2 (pĀ , qĀ ) = i∈Ā 4 c2 2 − c1 c1 2 n ε ≥ c1 ε 2 = c2 2 9 − c1 n ε2 2 The first inequality is by the definition of Ā, the second is by Cauchy-Schwarz, and the third is since p(Ā) ≥ c22 ε2 and q(Ā) ≤ c1 ε2 . By our setting of c1 and c2 , this implies that dχ2 (p, q) > ε2 , and we are not rejecting any p which should be accepted. For the remainder of the proof, we will implicitly assume that p(Ā) ≤ c2 ε2 . Let X (Ni − m2 qi )2 − Ni Z′ = . m2 qi i∈A Note that the statistic Z can be rewritten as follows: Z= X (Ni − m2 qi )2 − Ni + m2 (1 − q(S ′ ∩ A)) m q 2 i ′ i∈S ∩A = X (Ni − m2 qi )2 − Ni X + m2 qi + m2 q(Ā) m2 qi ′ ′ i∈S ∩A i∈A\S i∈S ∩A i∈A\S X (Ni − m2 qi )2 − Ni X (Ni − m2 qi )2 − Ni + + m2 q(Ā) = m2 qi m2 qi ′ ′ ′ = Z + m2 q(Ā) We proceed by analyzing Z ′ . First, note that it has the following expectation and variance: X (pi − qi )2 = m2 · dχ2 (pA , qA ) qi i∈A  X  p2 pi · (pi − qi )2 Var[Z ′ ] = 2 2i + 4m2 · qi qi2 E[Z ′ ] = m2 · (1) (2) i∈A These properties are proven in Section A of [ADK15]. We require the following two lemmas, which state that the mean of the statistic is separated in the two cases, and that the variance is bounded. The proofs largely follow the proofs of two similar lemmas in [ADK15]. Lemma 1. If dχ2 (p, q) ≤ ε2 , then E[Z ′ ] ≤ m2 ε2 . If dH (p, q) ≥ ε, then E[Z ′ ] ≥ (2 − c1 − c2 )m2 ε2 . Proof. The former case is immediate from (1). For the latter case, note that d2H (p, q) = d2H (pA , qA ) + d2H (pĀ , qĀ ). We upper bound the latter term as follows: d2H (pĀ , qĀ ) ≤ dTV (pĀ , qĀ ) 1X = |pi − qi | 2 i∈Ā  1 p(Ā) + q(Ā) ≤ 2   c1 + c2 ε2 ≤ 2 The first inequality is from Proposition 1, and the third inequality is from our prior condition that p(Ā) ≤ c2 ε 2 .  2 2 ε . Proposition 1 further implies that Since d2H (p, q) ≥ ε2 , this implies d2H (pA , qA ) ≥ 1 − c1 +c 2 dχ2 (pA , qA ) ≥ (2 − c1 − c2 ) ε2 . The lemma follows from (1). 10 Lemma 2. If dχ2 (p, q) ≤ ε2 , then Var[Z ′ ] = O(m22 ε4 ). If dH (p, q) ≥ ε, then Var[Z ′ ] ≤ O(E[Z ′ ]2 ). The constant in both expressions can be made arbitrarily small with the choice of the constant C. Proof. We bound the terms of (2) separately, starting with the first. X p2 i 2 qi2 i∈A =2 X  (pi − qi )2 qi2 i∈A 2pi qi − qi2 + qi2   2qi (pi − qi ) + qi2 (pi − qi )2 + =2 qi2 qi2 i∈A   X (pi − qi )2 (pi − qi ) +2 ≤ 2n + 2 qi2 qi X i∈A ≤ 4n + 4 ≤ 4n + X (pi − qi )2 qi2 i∈A 4n X (pi − qi )2 c1 ε 2 qi i∈A 4n E[Z ′ ] = 4n + c1 ε 2 m2 4 √ nE[Z ′ ] ≤ 4n + c1 C (3) 2 The second inequality is the AM-GM inequality, the third inequality uses that qi ≥ c1nε for all i ∈ A, the √ last equality uses (1), and the final inequality substitutes a value m2 ≥ C ε2n . The second term can be similarly bounded: !1/2 !1/2 X p2 X (pi − qi )4 X pi (pi − qi )2 i ≤ 4m2 4m2 qi2 q2 qi2 i∈A i i∈A i∈A !1/2  1/2 X 4 4 √ (p − q ) i i ≤ 4m2 4n + nE[Z ′ ] c1 C qi2 i∈A !  X  √ 2 (pi − qi )2 1/4 ′ 1/2 n E[Z ] ≤ 4m2 2 n + √ qi c1 C i∈A   √ 8 n1/4 E[Z ′ ]1/2 E[Z ′ ]. = 8 n+ √ c1 C The first inequality is Cauchy-Schwarz, the second inequality uses (3), the third inequality uses the monotonicity of the ℓp norms, and the equality uses (1). Combining the two terms, we get   √ 8 4 nE[Z ′ ] + √ n1/4 E[Z ′ ]3/2 . Var[Z ′ ] ≤ 4n + 8 + c1 C c1 C We now consider the two cases in the statement of our lemma. • When dχ2 (p, q) ≤ ε2 , we know from Lemma 1 that E[Z ′ ] ≤ m2 ε2 . Combined with a choice of m2 ≥ C and the above expression for the variance, this gives:   8 4 8 4 m22 ε4 + √ m22 ε4 + Var[Z ′ ] ≤ 2 m22 ε4 + 2 C C c1 C C c1   4 4 8 8 m22 ε4 = O(m22 ε4 ). = + √ + 2+ C C c1 C c1 C 2 11 √ n ε2 • When dH (p, q) ≥ ε, Lemma 1 and m2 ≥ C √ n ε2 give: √ E[Z ′ ] ≥ (2 − c1 − c2 )m2 ε2 ≥ C(2 − c1 − c2 ) n. Similar to before, combining this with our expression for the variance we get: ′ Var[Z ] ≤ 8 4 8 4 + 2 + p + C(2 − c1 − c2 ) C c1 (2 − c1 − c2 ) C 2 (2 − c1 − c2 )2 C c1 (2 − c1 − c2 ) ! E[Z ′ ]2 = O(E[Z ′ ]2 ). To conclude the proof, we consider the two cases. • Suppose dχ2 (p, q) ≤ ε2 . By Lemma 1 and the definition of A, we have that E[Z] ≤ (1 + c1 )m2 ε2 . By Lemma 2, Var[Z] = O(m22 ε4 ). Therefore, for constant C sufficiently large, Chebyshev’s inequality implies Pr(Z > 32 m2 ε2 ) ≤ 1/10. • Suppose dH (p, q) ≥ ε. By Lemma 1, we have that E[Z ′ ] ≥ (2 − c1 − c2 )m2 ε2 . By Lemma 2, Var[Z ′ ] = O(E[Z ′ ]2 ). Therefore, for constant C sufficiently large, Chebyshev’s inequality implies Pr(Z ′ < 32 m2 ε2 ) ≤ 1/10. Since Z ≥ Z ′ , Pr(Z < 23 m2 ε2 ) ≤ 1/10 as well. 3.2 Identity Testing with ℓ2 Tolerance In this section, we sketch the algorithms required to achieve ℓ2 tolerance for identity testing. Since the algorithms and analysis are very similar to those of Algorithm 1 of [ADK15] and Algorithm 1, the full details are omitted. First, we prove Theorem 2. The algorithm is Algorithm 1 of [ADK15], but instead of testing on p and q, 1 1 we instead test on p+ 2 and q + 2 , as defined in Proposition 4. By this proposition, this operation preserves total variation and ℓ2 distance, up to a factor of 2, and also makes it so that the minimum probability 1 element of q + 2 is at least 1/2n. In the case where dℓ2 (p, q) ≤ √εn , we have the following upper bound on E[Z]: X (pi − qi )2  E[Z ′ ] = m ≤ O m · n · d2ℓ2 (p, q) ≤ O(m2 ε2 ). qi i∈Ā This is the same bound as in Lemma 2 of [ADK15]. The rest of the analysis follows identically to that of Algorithm 1 of [ADK15], giving us Theorem 2. Next, we prove Theorem 3. We observe that Algorithm 1 as stated can be considered as ℓ2 -tolerant 2 instead of χ2 -tolerant, if desired. First, we do not wrongfully reject any p (i.e., those with dℓ2 (p, q) ≤ √ε n ) in Step 5. This is because we reject in this step if there is ≥ Ω(ε2 ) total variation distance between p and q (witnessed by the set Ā), which implies that p and q are far in ℓ2 -distance by Proposition 2. It remains to 2 prove an upper bound on E[Z ′ ] in the case where dℓ2 (p, q) ≤ √ε n . E[Z ′ ] = m2 dχ2 (p, q) = m2   n X (pi − qi )2 ≤ O m2 · 2 · d2ℓ2 (p, q) ≤ O(m2 ε2 ). qi ε i∈Ā We note that this is the same bound as in Lemma 1. With this bound on the mean, the rest of the analysis is identical to that of Theorem 1, giving us Theorem 3. 4 Upper Bounds for Equivalence Testing In this section, we prove the following theorems for equivalence testing. Theorem 4. There exists an algorithm for equivalence testing between p and q distinguishing the cases: • dℓ2 (p, q) ≤ ε √ 2 n 12 • dTV (p, q) ≥ ε  n 2/3 1/2 o samples. The algorithm uses O max nε4/3 , nε2 Theorem 5. There exists an algorithm for equivalence testing between p and q distinguishing the cases: • dℓ2 (p, q) ≤ 2 ε√ 32 n • dH (p, q) ≥ ε  n 2/3 3/4 o samples. The algorithm uses O min nε8/3 , nε2 Consider drawing Poisson(m) samples from two unknown distributions p = (p1 , . . . , pn ) and q = (q1 , . . . , qn ). Given the resulting histograms X and Y , [CDVV14] define the following statistic: Z= n X (Xi − Yi )2 − Xi − Yi i=1 X i + Yi . (4) This can be viewed as a modification to the empirical triangle distance applied to X and Y . Both of our equivalence testing upper bounds will be obtained by appropriate thresholding of the statistic Z. The organization of this section is as follows. In Section 4.1, we prove some basic properties of Z. In Section 4.2, we prove Theorem 4. In Section 4.3, we prove Theorem 5. 4.1 Some facts about Z Chan et al. [CDVV14] give the following expressions for the mean and variance of Z. Proposition 5 ([CDVV14]). Consider the function   1 − e−x . f (x) = 1 − x Then for any subset A ⊆ [n], E[ZA ] = X (pi − qi )2 i∈A pi + qi m · f (m(pi + qi )). (5) As a result, Z is mean-zero when p = q. Furthermore, Var[Z] ≤ 2 min{m, n} + n X i=1 5m (pi − qi )2 . pi + qi Applying Proposition 3, we immediately have the following corollary. Corollary 1. Var[Z] ≤ 2 min{m, n} + 20mdH (p, q)2 . Without the corrective factor of f (m(pi + qi )), Equation (5) would just be m times the triangle distance between p and q. Our goal then is to understand the function f (x) and how it affects this quantity. Aside from the removable discontinuity at x = 0, f is a monotonically increasing function, and for x > 0, it is strictly bounded between 0 and 1. Furthermore, for x > 0 there are roughly two “regimes” that f (x) exhibits: when x < 1, where f (x) is well-approximated by x/2, and when x ≥ 1, where f (x) is “morally the constant one,” slowly increasing from e−1 to 1. In fact, we have the following explicit bound on f (x). Fact 1. For all x > 0, f (x) ≤ min{1, x}. 1 . Hence, In terms of f (m(pi + qi )), these regimes correspond to whether pi + qi is less than or greater than m the expression for the mean of Z (i.e. Equation (5) for A = [n]) splits in two: those terms for “large” pi + qi look roughly like the triangle distance (times m), and those terms for “small” pi + qi look roughly like the ℓ22 distance (times m2 ). This is why we have given ourselves the flexibility to consider subsets A of the domain. We will now prove several upper and lower bounds on E[ZA ], based in part on whether we will apply them in the large or small pi + qi regime. Let us begin with a pair of upper bounds. 13 Proposition 6. Suppose for every i ∈ A, pi + qi ≥ δ. Then E[ZA ] ≤ m 2 d (pA , qA ). δ ℓ2 Proof. Because f (x) ≤ 1 for all x > 0, E[ZA ] = X (pi − qi )2 i∈A pi + qi m · f (m(pi + qi )) ≤ X (pi − qi )2 i∈A pi + qi m≤ mX m (pi − qi )2 = d2ℓ2 (pA , qA ). δ δ i∈A Proposition 7. E[Z] ≤ m2 d2ℓ2 (p, q). Proof. Let L be the set of i such that m(pi + qi ) ≥ 1. Then E[Z] = E[ZL ] + E[ZL ], and by Proposition 6, E[ZL ] ≤ m2 d2ℓ2 (pL , qL ). On the other hand, by Fact 1, f (x) ≤ x, and therefore E[ZL ] = X (pi − qi )2 pi + qi i∈L m · f (m(pi + qi )) ≤ X i∈L (pi − qi )2 m2 = m2 d2ℓ2 (pL , qL ). The proof is completed by noting that d2ℓ2 (pL , qL ) + d2ℓ2 (pL , qL ) = d2ℓ2 (p, q). Now we give a pair of lower bounds. Proposition 8. Suppose for every i ∈ A, m(pi + qi ) ≥ 1. Then E[ZA ] ≥ 2m 2 d (pA , qA ). 3 H Proof. Because f (x) is monotonically increasing and f (1) = 1/e, E[ZA ] = m X (pi − qi )2 i∈A pi + qi f (m(pi + qi )) ≥ m X (pi − qi )2 i∈A pi + qi f (1) ≥ 2m 2 d (pA , qA ), e H where the first step is by Proposition 5 and the last is by Proposition 3. The result follows from e ≤ 3. The next proposition is essentially the second half of the proof of Lemma 4 from [CDVV14]. Proposition 9. For any subset A, E[ZA ] ≥ where we write p(A) = P i∈A  4m2 2|A| + m · (p(A) + q(A))  · d2TV (pA , qA ), p(i) and likewise for q(A). Proof. Consider the function g(x) = xf (x)−1 . Then g(x) ≤ 2 + x for nonnegative x. Furthermore, (pi − qi )2 (pi − qi )2 = g(m(pi + qi )) m(pi + qi ) which, from Proposition 5, is d2TV (pA , qA ) 1 = 4 ≤ 1 4 X i∈A X i∈A 1 m2 |pi − qi |  1− 1 − e−m(pi +qi ) m(pi + qi )  , · E[Z{i} ]. As a result, !2 1 = 4 ! (pi − qi )2 g(m(pi + qi )) · !2 p g(m(pi + qi )) |pi − qi | · p g(m(pi + qi )) i∈A ! X 1 · E[ZA ] · (2|A| + m · (p(A) + q(A))), g(m(pi + qi )) ≤ 4m2 X i∈A where the first inequality is Cauchy-Schwarz. Rearranging finishes the proof. 14 4.2 Equivalence Testing with Total Variation Distance In this section, we prove Theorem 4. We will take the number of samples to be   n1/2 n2/3 m = max C · 4/3 , C 3/2 · 2 , ε ε (6) where C is some constant which can be taken to be 1010 . Rather than drawing samples from p or q, our algorithm draws samples from p+1/2 and q +1/2 . By Proposition 4, we have the following guarantees in the two cases: ε (Case 1): dℓ2 (p+1/2 , q +1/2 ) ≤ √ , 4 n (Case 2): dTV (p+1/2 , q +1/2 ) ≥ ε . 2 Furthermore, for any i ∈ [n], we know the i-th coordinates of p+1/2 and q +1/2 are both at least forth, we will write p′ and q ′ for p+1/2 and q +1/2 , respectively. In Case 1, if we apply Proposition 6 with A = [n] and δ = n1 and Proposition 7, E[Z] ≤ min{m2 , mn} · d2ℓ2 (p′ , q ′ ) ≤ min{m2 , mn} · 1 2n . Hence- m2 ε2 ≤ · ε2 . 16n 4(2m + 2n) On the other hand, in Case 2, applying Proposition 9 with A = [n], E[Z] ≥ 4m2 m2 · dTV (p′ , q ′ )2 ≥ · ε2 . 2m + 2n 2m + 2n 2 5m ε2 , outputting “close” if it’s below this value Our algorithm therefore thresholds Z on the value 8(2m+2n) and “far” otherwise. The two bounds in (6) meet when C 3 ε−4 = n, which is exactly when m = n. When m ≤ n, the first bound applies, and when m > n the second bound applies. As a result, we will split our analysis into the two cases. Lemma 3. The tester succeeds in the m ≤ n case of Theorem 4. Proof. By Corollary 1 Var[Z] ≤ 2 min{m, n} + 20mdH (p′ , q ′ )2 ≤ 22m, where we used the fact that dH (p′ , q ′ ) ≤ 1. In Case 1, by Chebyshev’s inequality, !  2    n Var[Z] m 5m2 2 . ε ≤ Pr Z ≥ 2 = O m4 4 = O 3 ε4 2 8(2m + 2n) m 3m n2 ε ε2 8(2m+2n) In Case 2,  5m2 64Var[Z] Pr Z ≤ =O ε2 ≤ 8(2m + 2n) 9E[Z]2  m m4 4 n2 ε ! =O  n2 m3 ε 4  . Both of these bounds can be made arbitrarily small constants by setting C sufficiently large. Lemma 4. The tester succeeds in the m ≥ n case of Theorem 4. Proof. We first consider Case 1. By Proposition 5, Var[Z] ≤ 2 min{m, n} + Then, we have that   5m2 Pr Z ≥ ε2 ≤  8(2m + 2n) n X i=1 5m (p′i − qi′ )2 ≤ 2n + 5mnd2ℓ2 (p′ , q ′ ) ≤ 2n + p′i + qi′ Var[Z] 3m2 2 8(2m+2n) ε 2 = O 15  mε2 n + m2 ε 4 m2 ε 4  =O  2 5 16 mε . n 1 + 2 4 m ε mε2  . ′ ′ Next, we focus on Case 2. Write L for the set of i ∈ [n] such that m(p′i + qi′ ) ≥ 1. Then d2H (pL , qL ) ≤ P 1 ′ ′ (p + q ) ≤ n/2m. As a result, by Corollary 1 i i∈L i 2 ′ Var[Z] ≤ 2 min{m, n} + 20md2H (p′ , q ′ ) ≤ 12n + 20md2H (p′L , qL ). 2 ′ ′ By Proposition 8, E[Z] ≥ 2m 3 dH (pL , qL ). Hence,     ′ 64Var[Z] md2H (p′L , qL ) n 5m2 = O + ε2 ≤ Pr Z ≤ 8(2m + 2n) 9E[Z]2 E[Z]2 E[Z]2     n n 1 1 =O = O . + + E[Z]2 E[Z] m2 ε 4 mε2 Both of these bounds can be made arbitrarily small constants by setting C sufficiently large. 4.3 Equivalence Testing with Hellinger Distance In this section, we prove Theorem 5. We will take the number of samples to be   n3/4 n2/3 , m = min C · 8/3 , C 3/4 · 2 ε ε where C is some constant which can be taken to be 1010 . Rather than drawing samples from p or q, our algorithm draws samples from p+δ and q +δ for δ = ε2 /32. By Proposition 4, we have the following guarantees in the two cases: (Case 1): dℓ2 (p, q) ≤ ε2 √ , 32 n (Case 2): dH (p, q) ≥ 1 ε. 2 2 ε . Henceforth, Furthermore, for any i ∈ [n], we know the i-th coordinates of p+δ and q +δ are both at least 32n ′ ′ +δ +δ we will write p and q for p and q , respectively. The two bounds meet when C 3/4 ε−2 = n1/4 , which is exactly when m = n. When m ≤ n, the first bound applies, and when m > n the second bound applies. As a result, we will split our analysis into the two cases. Lemma 5. The tester succeeds in the m ≤ n case of Theorem 5. Proof. In Case 1, if we apply Proposition 7, E[Z] ≤ m2 · d2ℓ2 (p′ , q ′ ) ≤ m2 ε 4 . 322 n On the other hand, in Case 2, applying Proposition 9 with A = [n],     4m2 m2 ε 4 4m2 ′ ′ 2 E[Z] ≥ · dTV (p , q ) ≥ · dH (p′ , q ′ )4 ≥ . 2n + 2m 2n + 2m 16n 2 4 ε Our algorithm therefore thresholds Z on the value m 128n , outputting “close” if it’s below this value and “far” otherwise. By Corollary 1 Var[Z] ≤ 2 min{m, n} + 20mdH (p′ , q ′ )2 ≤ 22m, where we used the fact that dH (p′ , q ′ ) ≤ 1. In Case 1,   Var[Z] m2 ε 4 ≤ Pr Z ≥  =O m2 ε4 2 128n 256n m m4 8 n2 ε ! =O  n2 m3 ε 8  . In Case 2,  m2 ε 4 64Var[Z] Pr Z ≤ =O ≤ 128n 49E[Z]2  m m4 8 n2 ε ! =O  n2 m3 ε 8  . Both of these bounds can be made arbitrarily small constants by setting C sufficiently large. 16 Lemma 6. The tester succeeds in the m > n case of Theorem 5. 2 ε Proof. In Case 1, if we apply Proposition 6 with A = [n] and δ = 16n and Proposition 7,   2 4 n n mn o ε4 m ε mε2 mn o 2 ′ ′ 2 2 . , E[Z] ≤ min m , 16 2 · dℓ2 (p , q ) ≤ min m , 16 2 · 2 = min ε ε 32 n 322 n 64 Case 2 is more complicated. We will need to define the set of “large” coordinates L = {i : m(p′i + qi′ ) ≥ 1} and the set of “small” coordinates S = [n] \ L. Applying Proposition 9 to S, we have   4m2 2 4m2 2 ′ ′ E[ZS ] ≥ · d (p , q ) ≥ d (p′ , q ′ ), TV S S 2|S| + m · (p′ (S) + q ′ (S)) 3n TV S S where m · (p′ (S) + q ′ (S)) ≤ n by the definition of S. If we also apply Proposition 8 to L, we get   2 4 4m2 2 2m 2 ′ ′ m ε mε2 ′ ′ E[Z] = E[ZS ] + E[ZL ] ≥ , d (p , q ) + d (p , q ) ≥ min , 3n TV S S 3 H L L 48n 12 ′ where the last step follows because d2H (p′S , qS′ ) + d2H (p′L , qL ) = d2H (p′ , q ′ ) and d2TV (p′S , qS′ ) ≥ d4H (p′S , qS′ ). As a result, we threshold Z on the value   2 4 1 m ε mε2 , · min , 2 48n 12 outputting “close” if it’s below this value and “far” otherwise. In Case 1, by Proposition 5, Var[Z] ≤ 2 min{m, n} + m X i=1 5m (p′i − qi′ )2 80mn ′ 5 ≤ 2n + kp − q ′ k22 ≤ 2n + mε2 . ′ ′ 2 pi + qi ε 64 Hence, by Chebyshev’s inequality,   2 4  Var[Z] 1 m ε mε2  2 4 ≤ 1 Pr Z ≥ · min , 2 2 2 48n 12 ( 8 · min m48nε , mε 12 ) ≤O ! n mε2 mε2 + + m2 ε4 + 2 4 (mε2 )2 (mε2 )2 ( mnε )2 ( n )2  3  n n n2 1 + + + =O . m4 ε 8 m2 ε 4 m3 ε 6 mε2 n This can be made an arbitrarily small constant by setting C sufficiently large. In Case 2, by Corollary 1,   4Var[Z] 8n + 80mdH (p′ , q ′ )2 E[Z] ≤ ≤ . Pr Z ≤ 2 E[Z]2 E[Z]2 (7) ′ ′ Because dH (p′ , q ′ )2 = d2H (p′S , qS′ ) + d2H (p′L , qL ), either d2H (p′S , qS′ ) or d2H (p′L , qL ) is at least 21 d2H (p′ , q ′ ). Suppose 1 2 ′ ′ ′ ′ 2 that dH (pS , qS ) ≥ 2 dH (p , q ). We note that mX ′ n mX p ′ p ′ 2 ( pi − qi ) ≤ |pi + qi′ | ≤ , md2H (p′S , qS′ ) = 2 2 2 i∈S i∈S by the definition of S. Thus, (7) ≤ 8n + 160md2H (p′S , qS′ ) 88n ≤ 4m2 2 =O 2 2 (p′ , q ′ ))2 ′ ′ 2 ( 4m ( d d 3n TV S S 3n TV (pS , qS ))  n3 4 4 m dTV (p′S , qS′ )  ≤O  n3 m4 ε 8  , where the last step used the fact that dTV (p′S , qS′ ) ≥ d2H (p′S , qS′ ) ≥ 12 d2H (p′ , q ′ ) ≥ 21 ε2 . ′ In the case when d2H (p′L , qL ) ≥ 12 d2H (p′ , q ′ ),     ′ n 1 1 n 8n + 160md2H (p′L , qL ) ≤ O . + + = O (7) ≤ ′ ) ′ ) 2 ′ ′ 2 m2 d4H (p′L , qL md2H (p′L , qL m2 ε 4 mε2 ( 2m 3 dH (pL , qL )) This can be made an arbitrarily small constant by setting C sufficiently large. 17 5 Upper Bounds Based on Estimation We start by showing a simple meta-algorithm – in short, it says that if a testing problem is well-defined (i.e., has appropriate separation between the cases) and we can estimate one of the distances, it can be converted to a testing algorithm. Theorem 6. Suppose there exists an m(n, ε)-sample algorithm which, given sample access to distributions p and q over [n] and parameter ε, estimates some distance d(p, q) up to an additive ε with probability at least 2/3. Consider distances dX (·, ·), dY (·, ·) and ε1 , ε2 > 0 such that dY (p, q) ≥ ε2 → dX (p, q) > 3ε1 /2 and dX (p, q) ≤ ε1 → dY (p, q) < 2ε2 /3, and d(·, ·) is either dX (·, ·) or dY (·, ·). Then there exists an algorithm for equivalence testing between p and q distinguishing the cases: • dX (p, q) ≤ ε1 ; • dY (p, q) ≥ ε2 . The algorithm uses either m(n, O(ε1 )) or m(n, O(ε2 )) samples, depending on whether d = dX or dY . Proof. Suppose that d = dX , the other case follows similarly. Using the m(n, ε1 /4) samples, obtain an estimate τ̂ of dX (p, q), accurate up to an additive ε1 /4. If τ̂ ≤ 5ε1 /4, output that dX (p, q) ≤ ε1 , else output that dY (p, q) ≥ ε2 . Conditioning on the correctness of the estimation algorithm, correctness for the case when dX (p, q) ≤ ε1 is immediate, and correctness for the case when dY (p, q) ≥ ε2 follows from the separation between the cases. It is folklore that a distribution over [n] can be ε-learned in ℓ2 -distance with O(1/ε2 ) samples (see, i.e., [CDVV14, Wag15] for a reference). By triangle inequality, this implies that we can estimate the ℓ2 distance between p and q up to an additive O(ε) with O(1/ε2 ) samples, leading to the following corollary. Corollary 2. There exists an algorithm for equivalence testing between p and q distinguishing the cases: • d(p, q) ≤ f (n, ε); • dℓ2 (p, q) ≥ ε, where d(·, ·) is a distance and f (n, ε) is such that dℓ2 (p, q) ≥ ε → d(p, q) ≥ 3f (n, ε)/2 and d(p, q) ≤ f (n, ε) → dℓ2 (p, q) ≤ 2ε/3. The algorithm uses O(1/ε2 ) samples. Finally, we note that total variation distance between p and q can be additively estimated up to a constant using O(n/ log n) samples [LC06, VV11b, JHW16], leading to the following corollary: Corollary 3. For constant ε > 0, there exists an algorithm for equivalence testing between p and q distinguishing the cases: • dTV (p, q) ≤ ε2 /4; √ • dH (p, q) ≥ ε/ 2. The algorithm uses O(n/ log n) samples. 6 Lower Bounds We start with a simple lower bound, showing that identity testing with respect to KL divergence is impossible. A similar observation was made in [BFR+ 00]. Theorem 7. No finite sample test can perform identity testing between p and q distinguishing the cases: • p = q; • dKL (p, q) ≥ ε2 . 18 Proof. Simply take q = (1, 0) and let p be either (1, 0) or (1 − δ, δ), for δ > 0 tending to zero. Then p = q in the first case and dKL (p, q) = ∞ in the second, but distinguishing between these two possibilities for p takes Ω(δ −1 ) → ∞ samples. Next, we prove our lower bound for KL tolerant identity testing. Theorem 8. There exist constants 0 < s < c, such that any algorithm for identity testing between p and q distinguishing the cases: • dKL (p, q) ≤ s; • dTV (p, q) ≥ c; requires Ω(n/ log n) samples. Proof. Let q = ( n1 , . . . , n1 ) be the uniform distribution. Let R(·, ·) denote the relative earthmover distance (see [VV10a] for the definition). By Theorem 1 of [VV10a], for any δ < 41 there exist sets of distributions C and F (for close and far ) such that: • For every p ∈ C, R(p, q) = O(δ| log δ|). • For every p ∈ F there exists a distribution r which is uniform over n/2 elements such that R(p, r) = O(δ| log δ|). δn ) samples. • Distinguishing between p ∈ C and p ∈ F requires Ω( log(n) Now, if p ∈ C then dKL (p, q) = n X i=1 pi log  pi 1/n  = log(n) − H(p) ≤ O(δ| log(δ)|), where H(p) is the Shannon entropy of p, and here we used the fact that |H(p) − H(q)| ≤ R(p, q), which follows from Fact 5 of [VV10a]. On the other hand, if q ∈ F , let r be the corresponding distribution which is uniform over n/2 elements. Then 1 = dTV (p, q) ≤ dTV (q, p) + dTV (p, r) ≤ dTV (q, p) + O(δ| log δ|), 2 where we used the triangle inequality and the fact that dTV (p, r) ≤ R(p, r) (see [VV10a] page 4). As a result, if we set δ to be some small constant, s = O(δ| log(δ)|), and c = 21 − O(δ| log δ|), then this argument shows that distinguish dKL (p, q) ≤ s versus dTV (p, q) ≥ c requires Ω(n/ log n) samples. Finally, we conclude with our lower bound for χ2 -tolerant equivalence testing. Theorem 9. There exists a constant ε > 0 such that any algorithm for equivalence testing between p and q distinguishing the cases: • dχ2 (p, q) ≤ ε2 /4; • dTV (p, q) ≥ ε; requires Ω(n/ log n) samples. Proof. We reduce the problem of distinguishing dH (p, q) ≤ √148 ε from dTV (p, q) ≥ 3ε to this. Define the distributions 1 1 2 2 q ′ = p + q. p′ = p + q, 3 3 3 3 Then m samples from p′ and q ′ can be simulated by m samples from p and q. Furthermore, 1 dH (p′ , q ′ ) ≤ √ ε, 48 dTV (p′ , q ′ ) = 19 1 dTV (p, q) ≥ ε, 3 where we used the fact that Hellinger distance satisfies the data processing inequality. But then, in the “close” case, n n X X (p′i − qi′ )2 (p′i − qi′ )2 1 dχ2 (p′ , q ′ ) = ≤ 12d2H (p′ , q ′ ) ≤ ε2 , ≤ 3 ′ ′ ′ qi pi + qi 4 i=1 i=1 where we used the fact that p′i ≤ 2qi′ and Proposition 3. Hence, this problem, which requires Ω(n/ log n) samples (by the relationship between total variation and Hellinger distance, and the lower bound for testing total variation-close versus -far of [VV10a]), reduces to the problem in the proposition, and so that requires Ω(n/ log n) samples as well. References [ADK15] Jayadev Acharya, Constantinos Daskalakis, and Gautam Kamath. Optimal testing for properties of distributions. In Advances in Neural Information Processing Systems 28, NIPS ’15, pages 3577–3598. Curran Associates, Inc., 2015. [ADOS17] Jayadev Acharya, Hirakendu Das, Alon Orlitsky, and Ananda Theertha Suresh. A unified maximum likelihood approach for estimating symmetric properties of discrete distributions. In Proceedings of the 34th International Conference on Machine Learning, ICML ’17, pages 11–21. JMLR, Inc., 2017. [AOST17] Jayadev Acharya, Alon Orlitsky, Ananda Theertha Suresh, and Himanshu Tyagi. Estimating rényi entropy of discrete distributions. IEEE Transactions on Information Theory, 63(1):38–56, 2017. [BCG17] Eric Blais, Clément L. Canonne, and Tom Gur. Distribution testing lower bounds via reductions from communication complexity. In Proceedings of the 32nd Computational Complexity Conference, CCC ’17, pages 28:1–28:40, Dagstuhl, Germany, 2017. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik. [BFF+ 01] Tuğkan Batu, Eldar Fischer, Lance Fortnow, Ravi Kumar, Ronitt Rubinfeld, and Patrick White. Testing random variables for independence and identity. In Proceedings of the 42nd Annual IEEE Symposium on Foundations of Computer Science, FOCS ’01, pages 442–451, Washington, DC, USA, 2001. IEEE Computer Society. [BFR+ 00] Tuğkan Batu, Lance Fortnow, Ronitt Rubinfeld, Warren D. Smith, and Patrick White. Testing that distributions are close. In Proceedings of the 41st Annual IEEE Symposium on Foundations of Computer Science, FOCS ’00, pages 259–269, Washington, DC, USA, 2000. IEEE Computer Society. [BFR+ 13] Tuğkan Batu, Lance Fortnow, Ronitt Rubinfeld, Warren D. Smith, and Patrick White. Testing closeness of discrete distributions. Journal of the ACM, 60(1):4:1–4:25, 2013. [BKR04] Tuğkan Batu, Ravi Kumar, and Ronitt Rubinfeld. Sublinear algorithms for testing monotone and unimodal distributions. In Proceedings of the 36th Annual ACM Symposium on the Theory of Computing, STOC ’04, New York, NY, USA, 2004. ACM. [BV15] Bhaswar Bhattacharya and Gregory Valiant. Testing closeness with unequal sized samples. In Advances in Neural Information Processing Systems 28, NIPS ’15, pages 2611–2619. Curran Associates, Inc., 2015. [Can15] Clément L. Canonne. A survey on distribution testing: Your data is big. but is it blue? Electronic Colloquium on Computational Complexity (ECCC), 22(63), 2015. [CDGR16] Clément L. Canonne, Ilias Diakonikolas, Themis Gouleakis, and Ronitt Rubinfeld. Testing shape restrictions of discrete distributions. In Proceedings of the 33rd Symposium on Theoretical Aspects of Computer Science, STACS ’16, pages 25:1–25:14, Dagstuhl, Germany, 2016. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik. 20 [CDKS17] Clément L. Canonne, Ilias Diakonikolas, Daniel M. Kane, and Alistair Stewart. Testing Bayesian networks. In Proceedings of the 30th Annual Conference on Learning Theory, COLT ’17, pages 370–448, 2017. [CDVV14] Siu-On Chan, Ilias Diakonikolas, Gregory Valiant, and Paul Valiant. Optimal algorithms for testing closeness of discrete distributions. In Proceedings of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’14, pages 1193–1203, Philadelphia, PA, USA, 2014. SIAM. [DBNNR11] Khanh Do Ba, Huy L. Nguyen, Huy N. Nguyen, and Ronitt Rubinfeld. Sublinear time algorithms for earth movers distance. Theory of Computing Systems, 48(2):428–442, 2011. [DDK18] Constantinos Daskalakis, Nishanth Dikkala, and Gautam Kamath. Testing Ising models. In Proceedings of the 29th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’18, Philadelphia, PA, USA, 2018. SIAM. [DGPP16] Ilias Diakonikolas, Themis Gouleakis, John Peebles, and Eric Price. Collision-based testers are optimal for uniformity and closeness. arXiv preprint arXiv:1611.03579, 2016. [DK16] Ilias Diakonikolas and Daniel M. Kane. A new approach for testing properties of discrete distributions. In Proceedings of the 57th Annual IEEE Symposium on Foundations of Computer Science, FOCS ’16, pages 685–694, Washington, DC, USA, 2016. IEEE Computer Society. [DKN15] Ilias Diakonikolas, Daniel M. Kane, and Vladimir Nikishkin. Testing identity of structured distributions. In Proceedings of the 26th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’15, pages 1841–1854, Philadelphia, PA, USA, 2015. SIAM. [DP17] Constantinos Daskalakis and Qinxuan Pan. Square Hellinger subadditivity for Bayesian networks and its applications to identity testing. In Proceedings of the 30th Annual Conference on Learning Theory, COLT ’17, pages 697–703, 2017. [Gol16] Oded Goldreich. The uniform distribution is complete with respect to testing identity to a fixed distribution. Electronic Colloquium on Computational Complexity (ECCC), 23(15), 2016. [GR00] Oded Goldreich and Dana Ron. On testing expansion in bounded-degree graphs. Electronic Colloquium on Computational Complexity (ECCC), 7(20), 2000. [GS02] Alison L. Gibbs and Francis E. Su. On choosing and bounding probability metrics. International Statistical Review, 70(3):419–435, dec 2002. [HJW16] Yanjun Han, Jiao Jiantao, and Tsachy Weissman. Minimax rate-optimal estimation of divergences between discrete distributions. arXiv preprint arXiv:1605.09124, 2016. [JHW16] Jiantao Jiao, Yanjun Han, and Tsachy Weissman. Minimax estimation of the ℓ1 distance. In Proceedings of the 2016 IEEE International Symposium on Information Theory, ISIT ’16, pages 750–754, Washington, DC, USA, 2016. IEEE Computer Society. [JVHW17] Jiantao Jiao, Kartik Venkat, Yanjun Han, and Tsachy Weissman. Minimax estimation of functionals of discrete distributions. IEEE Transactions on Information Theory, 61(5):2835– 2885, 2017. [LC06] Erich Leo Lehmann and George Casella. Theory of Point Estimation. Springer, 2006. [Pan08] Liam Paninski. A coincidence-based test for uniformity given very sparsely sampled discrete data. IEEE Transactions on Information Theory, 54(10):4750–4755, 2008. [Val11] Paul Valiant. Testing symmetric properties of distributions. SIAM Journal on Computing, 40(6):1927–1968, 2011. 21 [VV10a] Gregory Valiant and Paul Valiant. A CLT and tight lower bounds for estimating entropy. Electronic Colloquium on Computational Complexity (ECCC), 17(179), 2010. [VV10b] Gregory Valiant and Paul Valiant. Estimating the unseen: A sublinear-sample canonical estimator of distributions. Electronic Colloquium on Computational Complexity (ECCC), 17(180), 2010. [VV11a] Gregory Valiant and Paul Valiant. Estimating the unseen: An n/ log n-sample estimator for entropy and support size, shown optimal via new CLTs. In Proceedings of the 43rd Annual ACM Symposium on the Theory of Computing, STOC ’11, pages 685–694, New York, NY, USA, 2011. ACM. [VV11b] Gregory Valiant and Paul Valiant. The power of linear estimators. In Proceedings of the 52nd Annual IEEE Symposium on Foundations of Computer Science, FOCS ’11, pages 403–412, Washington, DC, USA, 2011. IEEE Computer Society. [VV17] Gregory Valiant and Paul Valiant. An automatic inequality prover and instance optimal identity testing. SIAM Journal on Computing, 46(1):429–455, 2017. [Wag15] Bo Waggoner. lp testing and learning of discrete distributions. In Proceedings of the 6th Conference on Innovations in Theoretical Computer Science, ITCS ’15, pages 347–356, New York, NY, USA, 2015. ACM. [WY16] Yihong Wu and Pengkun Yang. Minimax rates of entropy estimation on large alphabets via best polynomial approximation. IEEE Transactions on Information Theory, 62(6):3702–3720, 2016. A Proof of Proposition 1 Recall that we will prove this of probability distributionsP to subsets of theP support – in other P P for restrictions words, we do not assume i∈S pi = i∈S qi = 1, we only assume that i∈S pi ≤ 1 and i∈S qi ≤ 1. d2H (pS , qS ) ≤ dTV (pS , qS ) : 1X √ √ ( pi − qi )2 2 i∈S √ √ √ 1X √ ≤ | pi − qi |( pi + qi ) 2 i∈S 1X = |pi − qi | 2 d2H (pS , qS ) = i∈S = dTV (pS , qS ). 22 dTV (pS , qS ) ≤ √ 2dH (pS , qS ) : d2TV (pS , qS ) 1 = 4 1 = 4 1 ≤ 4 ≤ X i∈S |pi − qi | !2 !2 X √ √ √ √ | pi − qi | ( pi + qi ) i∈S X √ √ 2 | pi − qi | i∈S d2H (pS , qS ) 1 · 2 X√ √ ( pi + qi )2 i∈S X√ √ ( pi + qi )2 i∈S X = d2H (pS , qS ) · ! pi + i∈S X i∈S ! ! ! qi − d2H (pS , qS )  ≤ d2H (pS , qS ) · 2 − d2H (pS , qS ) ≤ 2d2H (pS , qS ). Taking the square root of both sides gives the result. The second inequality is Cauchy-Schwarz. 2d2H (pS , qS ) ≤ P i∈S (qi − pi ) + dKL (pS , qS ) : 2d2H (pS , qS ) = X i∈S = X i∈S (qi + pi ) − 2 X√ pi qi i∈S  (qi + pi ) − 2  X j∈S  pj  X i∈S pi P j∈S pj r  qi  pi ! X p q 1 i i  P log ≤ (qi + pi ) − 2  pj  exp 2 pi pj j∈S i∈S i∈S j∈S   ! X X X 1 p q i i  P ≤ (qi + pi ) − 2  pj  1 + log 2 pi pj j∈S i∈S j∈S i∈S ! X X qi = (qi − pi ) − pi log pi i∈S i∈S X = (qi − pi ) + dKL (pS , qS ). X  X  i∈S The first inequality is Jensen’s, and the second is 1 + x ≤ exp(x). 23 dKL (pS , qS ) ≤ P i∈S (pi − qi ) + dχ2 (pS , qS ) :   X X p P i dKL (pS , qS ) =  pj  j∈S  ≤ X = X = X ≤ X    = j∈S j∈S j∈S j∈S X i∈S i∈S  pj  log P  pj  log  pi log p qi j∈S j ! X p2 ! 1 i j∈S pj 1 P j∈S pj pj  log 2 + P  pj  1 + P i∈S dχ2 (pS , qS ) + 2 j∈S pj pj dχ2 (pS , qS ) − dχ2 (pS , qS ) − (pi − qi ) + dχ2 (pS , qS ). The first inequality is Jensen’s, and the second is 1 + x ≤ exp(x). 24 X i∈S 1 1 j∈S qi X i∈S pi − X qi i∈S qi !! X qi i∈S !!! !!!
8cs.DS
Least squares estimator for non-ergodic Ornstein-Uhlenbeck processes driven by Gaussian processes arXiv:1507.00802v2 [math.PR] 26 Sep 2016 Mohamed El Machkouri1 , Khalifa Es-Sebaiy2 and Youssef Ouknine3 Abstract: The statistical analysis for equations driven by fractional Gaussian process (fGp) is relatively recent. The development of stochastic calculus with respect to the fGp allowed to study such models. In the present paper we consider the drift parameter estimation problem for the non-ergodic Ornstein-Uhlenbeck process defined as dXt = θXt dt + dGt , t ≥ 0 with an unknown parameter θ > 0, where G is a Gaussian process. We provide sufficient conditions, based on the properties of G, ensuring the strong consistency and the asymptotic distribution of our estimator θet of θ based on the observation {Xs , s ∈ [0, t]} as t → ∞. Our approach offers an elementary, unifying proof of [4], and it allows to extend the result of [4] to the case when G is a fractional Brownian motion with Hurst parameter H ∈ (0, 1). We also discuss the cases of subfractional Brownian motion and bifractional Brownian motion. Key words: Parameter estimation, Non-ergodic Gaussian Ornstein-Uhlenbeck process. 1 Introduction While the statistical inference of Ito’s type diffusions has a long history, the statistical analysis for equations driven by fractional Gaussian process is relatively recent. The development of stochastic calculus with respect to the fGp has allowed to study such models. We will recall several approaches to estimate the parameters in fractional models but we mention that the list below is not exhaustive: - The MLE approach in [12], [16]: In general the techniques used to construct maximum likelihood estimators (MLE) for the drift parameter are based on Girsanov’s transforms for fBm and depend on the properties of the deterministic fractional operators (determined by the Hurst parameter) related to the fBm. In this case, the MLE is not easily computable. - A least squares approach has been proposed in [10]: The study of the asymptotic properties of the estimator is based on certain criteria formulated in terms of the Malliavin calculus. In the ergodic case, the statistical inference for several fractional Ornstein-Uhlenbeck (fOU) models has been recently developed in the papers [10], [1], [2], [11], [6], [5]. The case of non-ergodic fOU process of the first kind and of the second kind can be found in [4] and [7] respectively. 1 Laboratoire de Mathématiques Raphaël Salem UMR CNRS 6085, Université de Rouen, France. Email: [email protected] 2 National School of Applied Sciences-Marrakesh, Cadi Ayyad University Av. Abdelkrim Khattabi, 40000, Guéliz-Marrakech, Morocco. Email: [email protected] 3 National School of Applied Sciences-Marrakesh, Cadi Ayyad University Av. Abdelkrim Khattabi, 40000, Guéliz-Marrakech, Morocco. Email: [email protected] 1 - Method of moments: A new idea has been provided in [9], to develop the statistical inference for stochastic differential equations related to stationary Gaussian processes by proposing a suitable criteria. This approach is based on the Malliavin calculus, and it makes in principle the estimators easier to be simulated. Moreover, as an application, the models discussed in [10], [1], [2], [6] have been studied in [9] by using this approach. In this paper, we consider the non-ergodic Ornstein-Uhlenbeck process X = {Xt , t ≥ 0} given by the following linear stochastic differential equation X0 = 0; dXt = θXt dt + dGt , t ≥ 0, (1.1) where G is a Gaussian process and θ > 0 is an unknown parameter. A problem here is to estimate the parameter θ when one observes the whole trajectory of X. In the case when the process X has Hölder continuous paths of order δ ∈ ( 12 , 1] we can consider the following least squares estimator (LSE) Rt Xs dXs b θt = R0 t , 2 0 Xs ds t ≥ 0, (1.2) as estimator of θ, where the integral with respect to X is a Young integral (see Appendix). The estimator θbt is obtained by the least squares technique, that is, θbt (formally) minimizes θ 7−→ Z t 0 2 Ẋs − θXs ds. Moreover, using the formula (A-1) we can rewrite θbt as follows, θbt = X2 , Rt t 2 0 Xs2 ds θet = X2 , Rt t 2 0 Xs2 ds t ≥ 0. (1.3) Motivated by (1.3) we propose to use, in the general case, the right hand of (1.3) as a statistic to estimate the drift coefficient θ of the equation (1.1). More precisely, we define t ≥ 0. (1.4) This estimator θet may exist even if X does not have Hölder continuous paths of order δ ∈ ( 12 , 1]. We shall provide sufficient conditions, based on the properties of G, under which the estimator θet is consistent (see Theorem 2.1), and the limit distribution of θet is a standard Cauchy distribution (see Theorem 2.2). Examples of the Gaussian process G. Fractional Brownian motion: Suppose that the process G given in (1.1) is a fractional Brownian motion with Hurst parameter H ∈ (0, 1). By assuming that H > 12 , [4] studied the LSE θbt which coincides, in this case, with θet by Remark 2.1. In this paper, we extend the result of [4] to the case H ∈ (0, 1). Moreover, we offer an elementary proof (see Section 3.1). 2 Sub-fractional Brownian motion: Assume that the process G given in (1.1) is a subfractional Brownian motion with parameter H ∈ (0, 1). For H > 21 , using an idea of [4], [14] studied the LSE θbt which also coincides with θet . But the proof of Lemma 4.3 in [14] relies on a possibly awed technique because the passage   R t θs H 2 −θt from line -7 to -6 on page 671 does not allow to obtain the convergence of E e 0 e dSs as t → ∞. In the present paper, we give a solution of this problem and we extend the result to H ∈ (0, 1) (see Section 3.2). Bifractional Brownian motion: To the best of our knowledge there is no study of the problem of estimating the drift of (1.1) in the case when G is a bifractional Brownian motion with parameters (H, K) ∈ (0, 1)2 . Section 3.3 is devoted to this question. 2 Asymptotic behavior of the estimator Let G = (Gt , t ≥ 0) be a continuous centered Gaussian process defined on some probability space (Ω, F, P ) (Here, and throughout the text, we assume that F is the sigma-field generated by G). The following assumptions are required. (H1) The process G has Hölder continuous paths of order δ ∈ (0, 1].  (H2) For every t ≥ 0, E G2t ≤ ct2γ for some positive constants c and γ. 2.1 Strong consistency We will prove that the estimator θet given by (1.4) is strongly consistent. It is clear that the linear equation (1.1) has the following explicit solution Z t θt Xt = e e−θs dGs , t ≥ 0, (2.5) 0 where the integral is interpreted in the Young sense (see Appendix). Suppose (H1) holds. Applying the formula (A-1) we can write Xt = Gt + θeθt Zt , t ≥ 0, (2.6) where Zt := Z t e−θs Gs ds, 0 t ≥ 0. (2.7) Let us introduce the following process ξt := Z t e−θs dGs , 0 t ≥ 0. Thus, we can also write ξt = e−θt Gt + θZt , 3 t ≥ 0. (2.8) Remark 2.1. Suppose that G has Hölder continuous paths of order δ ∈ ( 21 , 1]. Then the process X has δ-Hölder continuous paths which implies that the estimator θet coincides with the LSE θbt by using (A-1). This property is satisfied in the cases of fractional Brownian motion with Hurst parameter H > 21 , sub-fractional Brownian motion with parameter H > 12 and bifractional Brownian motion with parameters (H, K) ∈ (0, 1)2 such that HK > 21 (see Section 3). Indeed, let us prove that X has δ-Hölder continuous paths. From (2.6), it suffices to prove that the process Z given in (2.7) has δ-Hölder continuous paths. Furthermore, Mean Value Theorem and the continuity of G entail that Z has Hölder continuous paths of order 1. Thus, the result is obtained. The following theorem gives the strong consistency of the estimator θet . Theorem 2.1. Assume that (H1) and (H2) hold and let θet be given by (1.4). Then θet → θ almost surely as t → ∞. (2.9) In order to prove this theorem we make use of the following technical lemmas. We will analyze separately the numerator and the denominator in the right hand side of the estimator (1.4). The proofs of the following lemmas are given in Appendix. Lemma R ∞2.1. Assume that (H1) and (H2) hold. Let Z be the process defined in (2.7). Then, Z∞ = 0 e−θs Gs ds is well-defined, and as t → ∞ Zt −→ Z∞ almost surely and in L2 (Ω). (2.10) Thus, as t → ∞ ξt −→ ξ∞ := θZ∞ almost surely and in L2 (Ω). (2.11) Lemma 2.2. Assume that (H1) and (H2) hold. Then, as t → ∞, Z t Z t θ 2 ξ2 −2θt 2 −2θt almost surely. e Xs ds = e e2θs ξs2 ds −→ ∞ = Z∞ 2θ 2 0 0 Proof of Theorem 2.1. By (2.6), we can write 2 Gt + θeθt Zt ξ2 e θt = = . Rt R tt 2 0 e2θs ξs2 ds 2e−2θt 0 e2θs ξs2 ds (2.12) The convergence (2.9) follows from Lemmas 2.1 and 2.2. 2.2 Asymptotic distribution This section is devoted to the investigation of asymptotic distribution of the estimator θet of θ. Then, the following assumptions are required. Rt (H3) The limiting variance of e−θt 0 eθs dGs exists as t → ∞, i.e., there exists a constant σG > 0 such that " 2 # Z lim E t→∞ t e−θt 0 4 eθs dGs 2 −→ σG . (H4) For all fixed s ≥ 0  −θt lim E Gs e t→∞ Z t θr e dGr 0  = 0. The next theorem proves that θet is asymptotically Cauchy. Theorem 2.2. Assume that (H1)-(H4) hold. Then, as t → ∞,   2σG law C(1), eθt θet − θ −→ p 2 ) E (Z∞ with C(1) is the standard Cauchy distribution with the probability density function (2.13) 1 ; π(1+x2 ) x ∈ R. In order to prove this theorem we need the following lemmas. The proofs of these lemmas are given in Appendix. Lemma 2.3. Assume that (H1) holds. Then, for every t ≥ 0, we have Z t Z t 1 2 eθs dGs + Rt , Xs2 ds + θZt Xt = θ 2 0 0 where 1 Rt := G2t − θ 2 Z t 0 G2s ds +θ 2 Z t ds 0 Z s drGs Gr e−θ(s−r) . 0 Lemma 2.4. Assume that (H1), (H3) and (H4) hold. Let F be any σ{G}-measurable random variable such that P (F < ∞) = 1. Then, as t → ∞,   Z t law −θt θs F, e e dGs −→ (F, σG N ) , 0 where N ∼ N (0, 1) is independent of G. Proof of Theorem 2.2. Using Lemma 2.3 we can write Rt   e−θt 0 eθs dGs θZtZ∞ e−θt Rt θt e × + e θt − θ = Rt Rt Z∞ e−2θt 0 Xs2 ds e−2θt 0 Xs2 ds := at × bt + ct . Lemma 2.4 yields, as t → ∞, law at −→ σG N , Z∞ where N ∼ N (0, 1) is independent of G, whereas Lemmas 2.1 and 2.2 imply that bt −→ 2 almost surely as t → ∞. On the other hand , e−θt Rt −→ 0 in L1 (Ω) as t → ∞ because, as t → ∞,  e−θt E G2t ≤ ct2γ e−θt −→ 0, Z t  t2γ+1 −θt e−θt E G2s ds ≤ c e −→ 0, 2γ + 1 0 5 and e−θt Z t ds Z 0 0 s drE |Gs Gr | e−θ(s−r) ≤ ce−θt Z t ds 0 Z s dr(sr)γ = 0 ct2γ+2 e−θt −→ 0. (γ + 1)(2γ + 2) Combining this with Lemma 2.2, we obtain that ct −→ 0 in probability as t → ∞. By plugging all these convergences together, we get that, as t → ∞,   N law . eθt θet − θ −→ 2σG Z∞  2  Moreover, Z∞ ∼ N 0, E Z∞ , which completes the proof. 3 Applications to fractional Gaussian processes This section is devoted to some examples of the Gaussian process G given in (1.1). We will need the following technical lemmas. Lemma 3.1. Let g : [0, ∞) × [0, ∞) −→ R be a symmetric function such that ∂g ∂s (s, r) and ∂2g ∂s∂r (s, r) exist on (0, ∞) × [0, ∞). Then, for every t ≥ 0, Z t Z tZ t −θt θs 2 −2θt ∆g (t) := g(t, t) − 2θe g(s, t)e ds + θ e g(s, r)eθ(s+r) drds 0 0 0 Z t Z s Z t ∂2g −2θt θs −2θt θs ∂g (s, 0)ds + 2e (s, r)eθr . (3.14) dse dr = 2e e ∂s ∂s∂r 0 0 0 Rs Proof. Set h(s) := 0 g(s, r)eθr dr. Combining the integration by parts formula together with Z s ∂g ∂h θs (s) = e g(s, s) + (s, r)eθr dr, ∂s 0 ∂s we obtain Z t Z t Z s ∂g ∆g (t) = g(t, t) − 2θe−2θt g(s, s)e2θs ds − 2θe−2θt dseθs dr (s, r)eθr ∂s 0 0 0 Z t Z s Z t ∂g(s, s) ∂g (s)e2θs ds − 2θe−2θt dseθs = e−2θt dr (s, r)eθr . ∂s ∂s 0 0 0 ∂g(s,s) ∂g(s,s) Since g is symmetric, 2 ∂g is the derivative of the function ∂s (s, r)1{r=s} = ∂s (s) where ∂s s −→ g(s, s). Thus by using again the integration by parts formula, the claim (3.14) is obtained. Lemma 3.2. Let λ > −1. Define Z tZ t −2θt Jλ (t) := e eθs eθr |s − r|λ drds; 0 0 Then lim Jλ (t) = lim t→∞ t→∞  −θt Iλ (t) := e Z  1 Γ(λ + 1) Iλ (t) = . θ θ λ+2 6 0 t eθr (t − r)λ dr. (3.15) Proof. Let t ≥ 0. We have Jλ (t) = −2θt 2e Z t θs dse 0 2e−2θt Z Z 0 t dse2θs Z s dreθr (s − r)λ s dre−θu uλ 0 0 Z t Z t −2θt −θu λ = 2e due u dse2θs 0 u  Z t Z t 1 λ −θu −2θt λ θu u e du − e u e du = θ 0 0 Γ(λ + 1) → as t → ∞, θ λ+2 = which proves (3.15). 3.1 Fractional Brownian motion  The fractional Brownian motion (fBm) B H = BtH , t ≥ 0 with Hurst parameter H ∈ (0, 1) is defined as a centered Gaussian process starting from zero with covariance  1 2H  E BtH BsH = t + s2H − |t − s|2H . 2 1 Note that, when H = 21 , B 2 is a standard Brownian motion. Proposition 3.1. Suppose that, in (1.1), the process G is the fBm B H . Then for all fixed H ∈ (0, 1) the convergences (2.9) and (2.13) hold. Proof. By Kolmogorov’s continuity criterion and the fact 2 E BtH − BsH = |s − t|2H ; s, t ≥ 0, we deduce that B H has Hölder continuous paths of order H − ε for all ε ∈ (0, H). So, the process B H satisfies the assumptions (H1) and (H2). Thus the strong consistence (2.9) is obtained in the case when G = B H . For the convergence it suffices to check (H3) and (H4). Let us first compute the limiting R t θs(2.13), −θt H variance of e 0 e dBs as t → ∞. We have " " 2 # 2 #  Z Z E t e−θt 0 eθs dBsH e−θt eθt BtH − θ =E t 0 eθs BsH ds Z t Z tZ t = t2H − 2θe−θt eθs E(BsH BtH )ds + θ 2 e−2θt eθs eθr E(BsH Br )dsdr 0 0 0 Z t  = t2H − θe−θt eθs s2H + t2H − (t − s)2H ds 0 Z tZ t  1 eθs eθr s2H + r 2H − |r − s|2H dsdr + θ 2 e−2θt 2 0 0 θ2 = ∆gBH (t) + θI2H (t) − J2H (t), 2 7 (3.16)  where gB H (s, r) = 21 s2H + t2H . On the other hand, (3.14) implies that ∆gBH (t) = 2He−2θt Z t 0 s2H−1 eθs ds → 0 as t → ∞. Combining (3.15)-(3.17), we get for every H ∈ (0, 1) " 2 # Z t HΓ(2H) −θt θs H E −→ e e dBs θ 2H 0 (3.17) as t → ∞. Hence, to finish the proof it remains to check that, for all fixed s ≥ 0   Z t H −θt θr H lim E Bs e e dBr = 0. t→∞ 0 Let us consider s < t. Setting fB H (s, r) = E(BsH BrH ), it follows from (A-1) that   Z t Z t E BsH e−θt eθr dBrH = fB H (s, t) − θe−θt eθr fB H (s, r)dr 0 0 Z t Z s −θt −θt θr = fB H (s, t) − θe e fB H (s, r)dr − θe eθr fB H (s, r)dr s 0 Z s Z t ∂f H B −θt −θt −θ(t−s) θr (s, r)dr − θe eθr fB H (s, r)dr. = e fB H (s, s) + e e ∂r 0 s Rs It is clear that e−θ(t−s) fB H (s, s) − θe−θt 0 eθr fB H (s, r)dr −→ 0 as t → ∞. Furthermore, if H = 12 , ∂fBH ∂r (s, r) = 0 for every r > s. Then, for H = Z t ∂f H −θt e eθr B (s, r)dr = 0. ∂r s Now, suppose that H ∈ (0, 12 ) ∪ ( 21 , 1). Since Z t eθr r 2H−1 − (r − s)2H−1 dr s ≥ ≥ Z 1 2 t eθr r 2H−2 dr s Z t 2H−2 |2H − 1|st eθr dr |2H − 1|s s → ∞ as t → ∞, we can apply L’Hôspital’s rule to obtain Z t ∂f H −θt eθr B (s, r)dr = lim e t→∞ ∂r s Z t  eθr r 2H−1 − (r − s)2H−1 dr lim He t→∞ s   Z t ≤ lim He−θt eθr r 2H−1 − (r − s)2H−1 dr t→∞ s   H 2H−1 2H−1 t − (t − s) = lim t→∞ θ   sH|2H − 1| 2H−2 (t − s) ≤ lim t→∞ θ → 0 as t → ∞, (3.18) −θt which finishes the proof of Proposition 3.1. 8 3.2 Sub-fractional Brownian motion The sub-fractional Brownian motion (sfBm) S H with parameter H ∈ (0, 1) is a centred Gaussian process with covariance function   1 (t + s)2H + |t − s|2H . E StH SsH = t2H + s2H − 2 1 Note that, when H = 21 , S 2 is a standard Brownian motion. Proposition 3.2. Suppose that, in (1.1), the process G is the sfBm S H . Then for all fixed H ∈ (0, 1) the convergences (2.9) and (2.13) hold. Proof. By Kolmogorov’s continuity criterion and the fact E StH − SsH 2 ≤ (2 − 22H−1 )|s − t|2H ; s, t ≥ 0, we deduce that S H has Hölder continuous paths of order H − ε for all ε ∈ (0, H). So, the process S H satisfies the assumptions (H1) and (H2). Thus, by Theorem 2.1 the convergence (2.9) is obtained. To prove (2.13), it suffices to check (H3) and (H4). The case H = 21 has already been established above. Suppose now that H ∈ (0, 21 ) ∪ ( 21 , 1). Using the same argument as in (3.16), we get " 2 # Z t θ2 −θt θs H E = ∆gS H (t) + θI2H (t) − J2H (t), e e dSs (3.19) 2 0 where gS H (s, r) = s2H + t2H − 21 (s + t)2H . Moreover, we have Z t Z t Z ∆gS H (t) = 2He−2θt s2H−1 eθs ds − 2H(2H − 1)e−2θt dseθs 0 0 s dreθr (s + r)2H−2 . 0 Rt It is easy to see that 2He−2θt 0 s2H−1 eθs ds → 0 as t → ∞. Furthermore, using the fact that Z t Z s Z t Z dseθs dreθr (s + r)2H−2 ≥ (2t)2H−2 dseθs 0 0 0 = (2t)2H−2 Z 2 0 → ∞ as t → ∞, L’Hôspital’s rule entails  Z t Z lim e−2θt dseθs t→∞ 0 0 s θr 2H−2 dre (s + r)  9  t s 0 e2θs ds dreθr 2  Z 1 −θt t θr 2H−2 = lim e e (t + r) dr t→∞ 2θ 0   2H−2 Z t t −θt θr e e dr ≤ lim t→∞ 2θ 0 → 0 as t → ∞. Thus, we deduce that ∆gS H (t) → 0 as t → ∞. Combining (3.19), (3.20) and (3.15) we get " 2 # Z t −θt θs H E e e dSs −→ 0 HΓ(2H) θ 2H (3.20) as t → ∞. Hence, to finish the proof it remains to check that, for all fixed s ≥ 0   Z t H −θt θr H lim E Ss e e dSr = 0. t→∞ 0 Let us consider s < t and let fS H (s, r) = E(SsH SrH ). Then, as in the fBm case, we can write   Z s Z t Z t −θt H −θt θr H −θ(t−s) −θt θr ∂fS H (s, r)dr − θe eθr fS H (s, r)dr. E Ss e e dSr = e f (s, s) + e e ∂r 0 0 s R s It is clear that e−θ(t−s) fS H (s, s) − θe−θt 0 eθr fS H (s, r)dr −→ 0 as t → ∞. On the other hand, since Z Z t  H −θt t θr −θt θr ∂fS H (s, r)dr = e e 2r 2H−1 − (r + s)2H−1 − (r − s)2H−1 dr, e e ∂r 2 s s the same argument as in (3.18) leads to Z t ∂f H −θt e eθr S (s, r)dr −→ 0 ∂r s as t → ∞, which finishes the proof. 3.3 Bifractional Browian motion   Let B H,K = BtH,K , t ≥ 0 be a bifractional Brownian motion (bifBm) with parameters H ∈ (0, 1) and K ∈ (0, 1]. This means that B H,K is a centered Gaussian process with the covariance function  K 1  E(BsH,K BtH,K ) = K t2H + s2H − |t − s|2HK . 2 The case K = 1 corresponds to the fBm with Hurst parameter H. The process B H,K verifies   2 H,K H,K − Bs E Bt ≤ 21−K |t − s|2HK , so B H,K has (HK − ε)−Hölder continuous paths for any ε ∈ (0, HK) thanks to Kolmogorov’s continuity criterion. The bifBm B H,K can be extended for 1 < K < 2 with H ∈ (0, 1) and HK ∈ (0, 1) (see [3] and [13]). Proposition 3.3. Suppose that, in (1.1), the process G is the bifBm B H,K . Then the convergences (2.9) and (2.13) hold true for all fixed (H, K) ∈ (0, 1)2 . 10 Proof. Since B H,K has Hölder continuous paths of order HK − ε for all ε ∈ (0, HK), it satisfies the assumptions (H1) and (H2). Thus the convergence (2.9) is satisfied. To prove (2.13), it suffices to check (H3) and (H4). Using the same argument as in (3.16), we have " 2 # Z t −θt θs H,K E e = ∆gBH,K (t) + 21−K θI2HK (t) − 2−K θ 2 J2HK (t), (3.21) e dBs 0 where gB H,K (s, r) = On the other hand, 1 2K s2H + r 2H 2−K K −2θt Z . t s2HK−1 eθs ds 0 Z t Z 3−K 2 −2θt θs −2 H K(K − 1)e dse ∆gBH,K (t) = 2 HKe 0 s dreθr (sr)2H−1 s2H + r 2H 0 K−2 . Rt The convergence 22−K HKe−2θt 0 s2HK−1 eθs ds → 0 as t → ∞ is immediate. Also, it is straightforward to check that there exists a constant CH,K depending on H, K such that Z t Z s Z s Z t  θs θs θr 2H−1 2H 2H K−2 2HK−2 dse dreθr dse dre (sr) s +r ≥ CH,K t 0 s 2 t 2 0 ≥ →∞ CH,K 2HK−2 t 2 as t → ∞. Z t 3θ se 2 s ds t 2 So, we can apply L’Hôspital’s rule to obtain   Z t Z s  −2θt θs θr 2H−1 2H 2H K−2 lim e dse dre (sr) s +r t→∞ 0 0   −θt Z t K−2 e eθr (tr)2H−1 t2H + r 2H dr = lim t→∞ 2θ 0  K−3 −θt Z t  2 e θr HK−1 ≤ lim e (tr) dr t→∞ θ 0   K−3 2HK−2 Z t 2 t −θt θr e e dr ≤ lim t→∞ θ 0 → 0 as t → ∞. Hence, for every (H, K) ∈ (0, 1)2 ∆gBH,K (t) → 0 as t → ∞. Consequently, (3.21), (3.22) and (3.15) imply " 2 # Z t −θt θs H,K E e −→ e dBs 0 11 HKΓ(2HK) θ 2HK (3.22) as t → ∞. Hence, to finish the proof it remains to check that, for all fixed s ≥ 0   Z t H,K −θt θr H,K lim E Bs e e dBr = 0. t→∞ 0 Let us consider s < t and let fB H,K (s, r) = E(BsH,K BrH,K ). Then, as in the fBm case, we can write   Z t H,K −θt θr H,K E Bs e e dBr 0 Z s Z t −θt −θt −θ(t−s) θr ∂fB H,K (s, r)dr − θe eθr fB H,K (s, r)dr. = e fB H,K (s, s) + e e ∂r 0 s R s We have e−θ(t−s) fB H,K (s, s) − θe−θt 0 eθr fB H,K (s, r)dr −→ 0 as t → ∞. Also, Z t Z t   K−1 1−K −θt −θt θr ∂fB H,K (s, r)dr = 2 HKe − (r − s)2HK−1 dr. eθr r 2H−1 s2H + r 2H e e ∂r s s Hence, if HK < 12 , L’Hôspital’s rule leads to Z t Z t  1−K −θt −θt θr ∂fB H,K (s, r)dr ≤ 2 HKe eθr r 2HK−1 + (r − s)2HK−1 dr e e ∂r s s Z t ≤ 22−K HKe−θt eθr (r − s)2HK−1 dr s   2−K 2 HK 2HK−1 (t − s) = 0 as t → ∞. −→ lim t→∞ θ If HK = 12 , e−θt Z t s ∂f H,K eθr B (s, r)dr ∂r = 2−K e−θt Z t eθr s −→ 0 as t → ∞.  1− 1+  s 2H K−1 r The last convergence comes from the fact that for r large,    s 2H K−1 s K−1 s ≤1− 1+ ∼ (1 − K) , 1− 1+ r r r ! dr and L’Hôspital’s rule. Similarly, if HK > 21 , Z t ∂f H,K e−θt eθr B (s, r)dr ∂r s  Z t  s 2H K−1  s 2HK−1 1−K −θt θr 2HK−1 − 1− dr ≤ 2 HKe e r 1+ r r s −→ 0 as t → ∞, which completes the proof. 12 Acknowledgement : The authors would like to thank the editor and two anonymous referees for their careful reading of the manuscript and for their valuable suggestions and remarks. The second author would also like to acknowledge the financial support of the University of Rouen. The third author was supported by Hassan II Academy of Science and Technology. Appendix In this section we present some calculations used in the paper. For any α ∈ (0, 1], we denote by H α ([0, T ]) the set of α-Hölder continuous functions, that is, the set of functions f : [0, T ] → R such that |f |α := sup 0≤s<t≤T |f (t) − f (s)| < ∞. (t − s)α We also set |f |∞ = supt∈[0,T ] |f (t)|, and we equip H α ([0, T ]) with the norm kf kα := |f |α + |f |∞ . Let f ∈ H α ([0, T ]), and consider the operator Tf : C 1 ([0, T ]) → C 0 ([0, T ]) defined as Z t Tf (g)(t) = f (u)g ′ (u)du, t ∈ [0, T ]. 0 It can be shown (see, e.g., [15, Section 3.1]) that, for any β ∈ (1 − α, 1), there exists a constant Cα,β,T > 0 depending only on α, β and T such that, for any g ∈ H β ([0, T ]), Z · f (u)g′ (u)du ≤ Cα,β,T kf kα kgkβ . 0 β We deduce that, for any α ∈ (0, 1), any f ∈ H α ([0, T ]) and anyRβ ∈ (1− α, 1), the linear operator · Tf : C 1 ([0, T ]) ⊂ H β ([0, T ]) → H β ([0, T ]), defined as Tf (g) = 0 f (u)g′ (u)du, is continuous with respect to the norm k · kβ . By density, it extends (in an unique way) to an operator defined on H β . As consequence, if f ∈ H α ([0, T ]), if g ∈ H β ([0, T ]) and if α + β > 1, then the (so-called) R· Young integral 0 f (u)dg(u) is well-defined as being Tf (g). The Young integral obeys the followingR formula. Let f ∈ H α ([0, T ]) with α ∈ (0, 1) and R . . g ∈ H β ([0, T ]) for all β ∈ (0, 1). Then 0 gu dfu and 0 fu dgu are well-defined as the Young integrals. Moreover, for all t ∈ [0, T ], Z t Z t fu dgu . (A-1) gu dfu + ft gt = f0 g0 + 0 0 R∞ Proof of Lemma 2.1. We first notice that the integral Z∞ = 0 e−θs Gs ds is well-defined because Z ∞ Z ∞ √ −θs sγ e−θs ds < ∞. e E(|Gs |)ds ≤ c 0 0 Now, we prove (2.10). By using Borel-Cantelli’s lemma, it is sufficient to prove that, for any ε > 0,  Z ∞ X  −θs P sup e Gs ds > ε < ∞. n≥0 n≤t≤n+1 t 13 Notice that for every ε > 0,  E sup Z n≤t≤n+1 ∞ e−θs Gs ds t  ≤ E √ Z Z ∞ n ∞ e−θs |Gs | ds  e−θs sγ ds n Z √ −θn ∞ −θs γ ≤ e 2 s ds ce 2 0  1+γ √ θ 2 cΓ (1 + γ) = e− 2 n . θ ≤ Consequently, X  P sup n≥0 n≤t≤n+1 Z ∞ −θs e t dGs c  X  −1 E sup >ε ≤ ε n≤t≤n+1 n≥0 Z ∞ −θs e t dGs   1+γ X θ 2 cΓ (1 + γ) e− 2 n < ∞, θ −1 √ ≤ ε n≥0 which implies that Zt −→ Z∞ almost surely as t → ∞. Moreover, since Z ∞Z ∞ i h = e−θr e−θs E (Gr Gs ) drds E (Zt − Z∞ )2 t Z ∞ tZ ∞ ≤ c e−θr e−θs (rs)γ drds t t 2 Z ∞ e−θs sγ ds = c t → 0 as t → ∞, the proof of the claim (2.10) is finished. The convergence (2.11) is a direct consequence of (2.10) and (2.8). Thus the proof of Lemma 2.1 is done.  2  Proof of Lemma 2.2. It follows from (2.11) that ξ∞ ∽ N 0, E ξ∞ , where Z ∞Z ∞  2  2 E ξ∞ = θ 2 E Z∞ = θ2 e−θr e−θs E (Gr Gs ) drds 0 0 Z ∞Z ∞ 2 ≤ cθ e−θr e−θs (rs)γ drds 0 0   Γ(γ + 1) 2 < ∞. = c θγ This implies that P (ξ∞ = 0) = 0. The continuity of ξ entails that, for every t ≥ 0 Z t Z t t e2θs ξs2 ds ≥ e2θs ξs2 ds ≥ eθt t 2 0 2 14 inf t ≤s≤t 2 (A-2) ξs2 ! almost surely. (A-3) Furthermore, the continuity of ξ and (2.11) yield ! inf ξs2 lim t→∞ t ≤s≤t 2 2 = ξ∞ almost surely. Combining this last convergence with (A-2) and (A-3), we deduce that Z t lim e2θs ξs2 ds = ∞ almost surely. t→∞ 0 Hence, we can use L’Hôspital’s rule to obtain R t 2θs 2 e ξ ds ξ2 ξ2 lim 0 2θt s = lim t = ∞ almost surely, t→∞ t→∞ 2θ e 2θ which completes the proof of Lemma 2.2. Rt Proof of Lemma 2.3. Let t ≥ 0. Setting ηt = 0 Xs ds, the equation (1.1) leads to 1 2 1 2 2 1 2 X = θ ηt + Gt + θηt Gt . 2 t 2 2 Moreover, (A-1) and (1.1) entail  Z t Z t Z t Z t 1 2 −1 2 Gs Xs ds . ηs Xs ds = θ Xs ds − ηs dηs = η = 2 t 0 0 0 0 Rt Define Yt := 0 eθs Gs ds. Then, by (2.6) and (A-1) Z t Z t   Gs Gs + θeθs Zs ds Gs Xs ds = 0 0 Z t Z t eθs Gs Zs ds G2s ds + θ = 0 0 Z t Z t Zs dYs G2s ds + θ = 0 0 Z t Z t Ys dZs G2s ds + θZt Yt − θ = 0 0 Z t Z s Z t 2 drGs Gr e−θ(s−r) . ds Gs ds + θZt Yt − θ = 0 0 0 Thus, we deduce that 1 2 X =θ 2 t Z 0 t Xs2 ds − θ 2 Zt Yt + θηt Gt + Rt . (A-4) On the other hand, by (1.1) and (2.6) we get θηt Gt = Gt (Xt − Gt ) = −θeθt Gt Zt . This implies that 2 θt −θ Zt Yt + θηt Gt = −θZt(θYt − e Gt ) = θZt Combining this with (A-4) the proof of Lemma 2.3 is done. 15 Z 0 t eθs dGs . Proof of Lemma 2.4. For any d ≥ 1, s1 . . . sd ∈ [0, ∞), we shall prove that, as t → ∞,   Z t law −θt θs Bs 1 , . . . , Bs d , e e dGs −→ (Bs1 , . . . , Bsd , σG N ) , (A-5) 0 which is enough to lead to the desired conclusion. Because the left-hand side in the previous convergence is a Gaussian vector (see proof of Lemma 7 in [8]), to get (A-5) it is sufficient to check the convergence of its covariance matrix. Thus, the assumptions (H3) and (H4) complete the proof. References [1] Azmoodeh, E. and Morlanes, I. (2013). Drift parameter estimation for fractional OrnsteinUhlenbeck process of the Second Kind. Statistics: A Journal of Theoretical and Applied Statistics. DOI: 10.1080/02331888.2013.863888. [2] Azmoodeh, E. and Viitasaari, L. (2015). Parameter estimation based on discrete observations of fractional Ornstein-Uhlenbeck process of the second kind. Statistical Inference for Stochastic Processes, Volume 18, Issue 3, pp 205-227. [3] Bardina, X. and Es-Sebaiy, K. (2011). An extension of bifractional Brownian motion. Communications on Stochastic Analysis, 5, pp. 333-340. [4] Belfadli, R., Es-Sebaiy, K. and Ouknine, Y. (2011). Parameter estimation for fractional Ornstein-Uhlenbeck Processes: Non-ergodic case. Frontiers in Science and Engineering (An International Journal Edited by Hassan II Academy of Science and Technology). 1, no. 1, 1-16. [5] Cénac, P. and Es-Sebaiy, K. (2015). Almost sure central limit theorems for random ratios and applications to LSE for fractional Ornstein-Uhlenbeck processes. Probability and Mathematical Statistics, to appear. [6] El Onsy, B., Es-Sebaiy, K. and Viens, F. (2014). Parameter estimation for a partially observed Ornstein-Uhlenbeck process with long-memory noise. Preprint. [7] El Onsy, B., Es-Sebaiy, K. and Tudor, C. (2014). Statistical analysis of the non-ergodic fractional Ornstein-Uhlenbeck process of the second kind. Preprint. [8] Es-Sebaiy, K. and Nourdin, I. (2013). Parameter estimation for α-fractional bridges. Springer Proceedings in Mathematics and Statistics Volume 34, pp 385-412. [9] Es-Sebaiy, K. and Viens, F. (2015). Parameter estimation for SDEs related to stationary Gaussian processes. Preprint. [10] Hu, Y. and Nualart, D. (2010). Parameter estimation for fractional Ornstein-Uhlenbeck processes. Statistics and Probability Letters 80, 1030-1038. 16 [11] Hu, Y. and Song, J. (2013). Parameter estimation for fractional Ornstein- Uhlenbeck processes with discrete observations. F. Viens et al (eds), Malliavin Calculus and Stochastic Analysis: A Festschrift in Honor of David Nualart, Springer Proceedings in Mathematics and Statistics 34, 427-442. [12] Kleptsyna, M. and Le Breton, A. (2002). Statistical analysis of the fractional OrnsteinUhlenbeck type process. Statistical Inference for Stochastic Processes 5, 229-241. [13] Lifshits, M. and Volkova, K. (2015). Bifractional Brownian Motion: Existence and Border Cases. Preprint, http://arxiv.org/pdf/1502.02217.pdf. [14] Mendy, I. (2013). Parametric estimation for sub-fractional Ornstein-Uhlenbeck process. Journal of Statistical Planning and Inference 143, 663-674. [15] Nourdin, I. (2012). Selected aspects of fractional Brownian motion. Bocconi & Springer Series 4. Springer, Milan; Bocconi University Press, Milan. [16] Tudor, C. and Viens, F. (2007). Statistical aspects of the fractional stochastic calculus. Ann. Statist. 35, no. 3, 1183-1212. [17] Young, L. C. (1936). An inequality of the Hölder type connected with Stieltjes integration. Acta Math. 67, 251-282. 17
10math.ST
Exploratory Data Analysis of The KelvinHelmholtz instability in Jets arXiv:1503.06331v1 [cs.CE] 21 Mar 2015 Santosh Tirunagari Department of Computing & CVSSP University of Surrey Guildford, Surrey GU2 7XH Email: [email protected] Abstract The KelvinHelmholtz (KH) instability is a fundamental wave instability that is frequently observed in all kinds of shear layer (jets, wakes, atmospheric air currents etc). The study of KH-instability, coherent flow structures has a major impact in understanding the fundamentals of fluid dynamics. Therefore there is a need for methods that can identify and analyse these structures. In this Final assignment, we use machine-learning methods such as Proper Orthogonal Decomposition (POD) and Dynamic Mode Decomposition (DMD) to analyse the coherent flow structures. We used a 2D co-axial jet as our data, with Reynolds number corresponding to Re: 10,000. Results for POD modes and DMD modes are discussed and compared. I. I NTRODUCTION The KelvinHelmholtz (KH) instability can occur when there is passive scalar shear in a single continuous fluid, or where there is a passive scalar difference across the interface between two fluids [1]. To gain deeper understanding on KH coherent flow strcutures, machine-learning methods can be utilised. This field allows computers to adopt behaviors based on training data. These methods recognize complex patterns and makes intelligent decisions based on data [2]. These techniques include: reduced order models or dimensionality reduction methods [3], statistical, and machine vision methods. Dimensionality reduction is a technique used to find a reduced order model on a given data. Such a technique includes feature selection and feature extraction methods. Feature selection is based on selecting a subset of variables which best define the data, whereas feature extraction transforms the data from high-dimensional space to a space of fewer dimensions [2]. The data transformation may be linear, as in Proper Orthogonal Decomposition (POD) [4] [5] [6] and may be non-linear such as in Dynamic Mode Decomposition (DMD) [7] [8] [6]. From the literature, it is expected that POD and DMD would be good methods for analyzing the flow structures. For example, Perrin et. al [4] used POD to obtain phase averaged turbulence properties for flow past a cylinder. In highly turbulent flows, the coherent flow structures are difficult to identify due to the combination of organized and chaotic fluctuating motions. Using POD analysis it is shown in [9], that von Karman vortices can be reproduced within the first few modes. POD has been used as a tool for the comparison of Particle Image Velocimetry1 (PIV) and Light Eddy Simulation(LES) data in [10] and it is also shown that POD modes have a good qualitative agreement between PIV and LES. A paper by Schmidt et. al [11], used DMD to a sequence of flow images of a slow jet entering quiescent fluid showcased the detection of dynamically relevant coherent structures that play an important role in characterizing the fluid behaviour over processed time interval. To identify the KH coherent flow structures, we study 2 cases of co-axial jet: • 1 When both the jets are close to each other (CASE = http://en.wikipedia.org/wiki/Particle image velocimetry L ). 10 • When both the jets are independent, far a part from each other (CASE = L ). 5 where L is the domain side length i.e 2π or 256 pixels, as the grid resolution N is 28 pixels. Both the cases of co-axial jet are studied at Reynolds number corresponding to Re: 10,000. The inverse momentum L thickness or the steepness parameter B = 10.5, the jet diameter ro is kept constant at 20 . The U ,V and P S for a co-axial jet are defined as follows: Umax = 0.1; Vmax=Umax/30; ro = L/20; y1= L/2 - CASE; y2= L/2 + CASE; U = Umax*0.5*(1-tanh(B*(abs(Y-y1)./ro - ro./abs(Y-y1)))); U = U+Umax*0.5*(1-tanh(B*(abs(Y-y2)./ro - ro./abs(Y-y2)))); U = Umax*U/max(max(U)); V = Vmax*(rand(N,N)-0.5); PS = U/max(max(U)); Figure 1 shows the mean profile for the two cases investigated in this report. The interactions between the jets in case 1 starts at step 40, whereas in case 2 it is at time step 100. Fig. 1. Mean Profiles of case 1 (left) and case 2 ( right) passive scalar fields The objectives of the paper is as follows: • POD and DMD is implemented with Matlab and used to analyse LES of subsonic jet. • The potential of POD and DMD in the ICE applications is pointed out. • Results for POD and DMD are discussed and compared. The organisation of this report is as follows: In section 2 we study the computational methods for POD and DMD. Section 3 deals with the experiments and implemention details. Finally, conclusions are drawn and further research directions are discussed in section 4. II. C OMPUTATIONAL M ETHODS In this section, the POD and DMD methods are discussed. A. POD (Method of Snapshots) POD was first introduced in the field of Computational Fluid Dynamics (CFD) by Lumley [12]. POD is known by various names like KLD, Principle Componant Analysis (PCA) and Singular Value Decompostion (SVD). This method aims at representing a 2D or 3D flow field in terms of orthogonal modes which correspond to the energitic, coherent flow motions. Hence, POD may be used to extract certain derterministic features from turbulent data. POD theory is best described in [9]. The present day analysis uses method of snapshots introduced by Sirovich [13]. Here LES data at a particular interval of time, interpolated on a uniform grid is considered to be one snapshot. This method was introduced to reduce the POD computations. To compute the POD using the original method requires solving n×n eigenvalue problem. The main problem is the calculation of auto-covariance matrix R. Method of snapshots proposes that auto-covariance matrix can be approximated by a summation of ’snapshots’. Here x is snapshot matrix. M 1 X n n x x Rij = M n=1 i j (1) The snapshots are assumed to be distanced of spatial distance greater than the correlation distance. Nowadays this method has become extremely popular [14] [9] [15]. Its use in certain flows are questionable however, due to its assumption of the snapshots being uncorrelated. This discussion is briefly explained in [9]. B. Dynamic Mode Decomposition (DMD) The mathematics underlying the extraction of dynamic information from time-resolved snapshots of LES data is closely related to the idea underlying the Arnoldi algorithm. Let vj denote each instantaneous flow field. A sequence of N is writen as : V1N = [v1 v2 v3 v4 · · · vN ] (2) A linear mapping from one snapshot to another is assummed. V1N = [v1 Av1 A2 v1 A3 v1 · · · AN −1 v1 ] (3) This can further more assumed to be a constant, so that the mapping A can be represented as: vj+1 = Avj (4) By the linear combination of available data fields, we have a standard Arlondi iteration problem [8]. AviN −1 ≈ viN −1 S (5) where S is a companion matrix that simply shifts the snapshots 1 through N − 1 and approximates the last snapshot N by a linear combination of previous N − 1 snapshots. Hence this procedure will result in the low dimensional system matrix S. We solve the S matrix problem using eigenvalue analysis and obtain the eigenvalues. It is known that eigenvalues of S, approximate some of the eigenvalues of the full system A. The associated eigenvectors of S provide the coefficients of the linear combination that is necessary to express the modal structure in the snapshot basis. S matrix is calculated as follows: S = R−1 Q∗ vN (6) where Q∗ is the complex conjugate transpose of Q from the QR-decomposition of V1N −1 . III. E XPERIMENTS AND I MPLEMENTATION Here we discuss the Experimental and implementation details of POD and DMD on 2D co-axial jet data. Fig. 2. case 1 (left) and case 2 (right). A. Pre-Processing Figure 2 shows 2D co-axial jet for both the cases. A total of 30 snapshots were considered with a time interval of 5 steps. Consider an example of a smoke in the wind flow, the concentration of the smoke C at a particluar time ~ = C(P, ~ t, is given by C t). As part of experiments, snapshot matrix X is constructed at first. Let P be the scalar concentration component:   1 P1 P12 ... P1N .. .. ..  (7) C = [P 1 P 2 P 3 · · · P N ] =  ... . . . N 2 1 PM PM ... PM B. Implementation of POD The fluctuating passive scalar matrix U is calculated by substracting the mean from individual snapshots. Then the autocovariance matrix is computed as: C = UT U (8) The eigenvalue problem for the matrix reads as follows: CAi = λi Ai (9) The eigenvectors are arranged according to the decreasing order of eigenvalues reflecting the energies in different POD modes. λ1 > λ2 > λ3 > λ4 > · · · λN = 0. (10) Using the ordered eigenvectors the POD modes are constructed. PN i φ = k Pn=1 N n=1 Ain U n Ain U n k , i = 1, 2, · · · , N. (11) C. Implementation of DMD Calculation of fluctuating passive scalar matrix is not needed. But the snapshot matrix is divided into two parts. (12) V1n−1 = [v1 v2 v3 · · · vn−1 ] V2n = [v2 v3 v4 · · · vn ] (13) QR decomposition in economy mode is performed as : [Q, R] = qr(V1n−1 , 0). (14) S = R−1 Q∗ V2n . (15) Companion matrix S is calculated as : The eigenvalue analysis is computed on S matrix [X, D] = eig(S) (16) The dynamic mode spectrum is computed as : λj = log(Djj )/δt. (17) δt, is the time interval between the snapshots. The Dynamic modes can be computed as follows: DMj = ViN −1 X(:, j) (18) where X is the original snapshot matrix. Dynamic mode decomposition contains not only information about coherent structures, but also about their temporal evolution. Since at no stage of the algorithm the system matrix A is needed, various extensions and attractive features of the algorithm should be noted. No specific spatial arrangement of the sampled data is assumed, and the processing of subdomain data, i.e., data extracted only in a small region of the complete flow domain, as well as the processing of unstructured data is possible. This feature allows to probe a subregion of the flow as to the presence of a specific mechanism. IV. R ESULTS AND D ISCUSSION The POD modes are the optimal decomposition for the flow and capture large scale structures thereby providing information on the large scale behaviour. Total kinetic energy is contained within the first few POD modes. Generally 95% of the total intensity fluctuations is used and the average flow field is described in the first n POD modes. Dynamic modes represent the perturbation dynamics and capture the characteristic pattern located near the shear layer. DMD spectrum quantatively describes the jet behaviour. Higher the dynamic modes higher the is the frequency. From the Figure 3, it is observed from POD modes, that there is a formation of symmetric structures of inverse Kelvin Helmholz instability due to interactions of both the jets. But from Dynamic modes, the inverse Kelvin Helmholz instability is clearly visible. The second dynamic mode shows a characteristic pattern located near the shear layer, which represents the roll-up of the symmetric vortex sheet in Figure 3. The first and third mode depict small scale structures near the nozzle exit region. From the Figure 4, it is observed that there is the formation of the Kelvin Helmoltz instability in both the jets. From Figure 5, the time coefficients of POD modes 3,4 show a phase difference of 5 time steps. In the other words, the POD modes 3,4 are strongly correlated to each other, This phenomena would further give rise to study helical and columnar features of instabilities. POD and DMD methods can be utilised for analysing the LES data. The power of PODs fast convergence allows for the large scale structures to be isolated from the small scale structures in the turbulence. This Fig. 3. Comparison of first 5 DMD modes (top) and POD modes (bottom) for case 1 passive scalar field. Fig. 4. Comparison of first 5 DMD modes (top) and POD modes (bottom) for case 2 passive scalar field. Fig. 5. Time coefficients of case 1(left) and case 2( right) passive scalar fields would help in analysing the flow field in different ways. From the Figure 3 and Figure 4, POD and DMD methods are shown as a powerful numerical tools, for use in jet flows. The ability to maximize the intensity fluctuations of the flow with a miminal number of modes shows PODs strength in the analysis of the coherent flow structures and reduced order modelling. The DMD method has clear advantages over POD, as it strives for a representation of the dominant flow features with in a temporal orthogonal framework, while POD is based on a spatial orthogonal framework. From the Figure 6 the eigenvalues of S represent the mapping between subsequent snapshots: unstable eigenvalues are given by a modulus greater than one (i.e. |λ| > 1, are located outside the unit disk); stable Fig. 6. Eigenvalues of DMD for case 1 passive scalar field. eigenvalues have a modulus equal to one (i.e. |λ| = 1, can be found on the unit disk); unstable eigenvalues have a modulus less than one (i.e. |λ| < 1, can be found inside the unit disk);. For applications in fluid dynamics, it is common to transform the eigenvalues of S using a logarithmic mapping, after which the unstable (stable) eigenvalues have a positive (negative) real part. The procedural steps for computing the dynamic mode decomposition are given in section 3. V. C ONCLUSIONS POD and DMD methods can be utilised for analysing the LES data. The power of PODs fast convergence allows for the large scale structures to be isolated from the small scale structures in the turbulence. The DMD method has clear advantages over POD, as it strives for a representation of the dominant flow features with in a temporal orthogonal framework, while POD is based on a spatial orthogonal framework. This paper summerizes that POD and DMD methods will provide the experimentalist with solid tools, in quantifying important mechanisms in time resolved measurements of fluid dynamics. It is hoped that DMD and POD methods help in further understanding of fundamental fluid processes. In the future, effect of the time window between two frames of time resolved data on DMD method would be studied. Furthermore, the sensitivity analysis of the POD modes would be studied to show that the POD modes are independent of the number of snapshots. ACKNOWLEDGEMENT I thank Ville Vuorinen, D.Sc.(Tech.) for motivating me and helping me with solid ideas on how to proceed with this course work on ’Direct Numerical Simulations’ 2012 at Aalto University, Finland. It would have been very difficult for me to understand the basics of the course work with out Ville’s guidence. R EFERENCES [1] [2] [3] [4] [5] [6] J. Miles, “On the generation of surface waves by shear flows part 3. kelvin-helmholtz instability,” Journal of Fluid Mechanics, vol. 6, no. 04, pp. 583–598, 1959. C. Bishop and SpringerLink, Pattern recognition and machine learning. Springer New York, 2006, vol. 4. M.-S. Paukkeri, I. Kivimäki, S. Tirunagari, E. Oja, and T. Honkela, “Effect of dimensionality reduction on different distance measures in document clustering,” in Neural Information Processing. Springer, 2011, pp. 167–176. R. Perrin, M. Braza, E. Cid, S. Cazin, A. Barthet, A. Sevrain, C. Mockett, and F. Thiele, “Obtaining phase averaged turbulence properties in the near wake of a circular cylinder at high reynolds number using pod,” Experiments in Fluids, vol. 43, pp. 341–355, 2007, 10.1007/s00348-007-0347-6. [Online]. Available: http://dx.doi.org/10.1007/s00348-007-0347-6 V. Vuorinen, J. Yu, S. Tirunagari, O. Kaario, M. Larmi, C. Duwig, and B. Boersma, “Large-eddy simulation of highly underexpanded transient gas jets,” Physics of Fluids (1994-present), vol. 25, no. 1, p. 016101, 2013. S. Tirunagari, V. Vuorinen, O. Kaario, and M. Larmi, “Analysis of proper orthogonal decomposition and dynamic mode decomposition on les of subsonic jets,” CSI Journal of Computing, vol. 1, no. 3, pp. 20–26, 2012. [7] [8] [9] [10] [11] [12] [13] [14] [15] P. Schmid, K. Meyer, and O. Pust, “Dynamic mode decomposition and proper orthogonal decomposition of flow in a lid-driven cylindrical cavity,” in Proc. of the 8th Intl. Symp. on Particle Image Velocimetry, 2009. P. Schmid, “Dynamic mode decomposition of numerical and experimental data,” Journal of Fluid Mechanics, vol. 656, no. 1, pp. 5–28, 2010. R. Gorder, “Use of proper orthogonal decomposition in the analysis of turbulent flows.” 2010. K. Meyer, D. Cavar, and J. Pedersen, “Pod as tool for comparison of piv and les data,” in 7th International Symposium on Particle Image Velocimetry, 2007. P. Schmid, L. Li, M. Juniper, and O. Pust, “Applications of the dynamic mode decomposition,” Theoretical and Computational Fluid Dynamics, vol. 25, no. 1-4, pp. 249–259, 2011. G. Berkooz, P. Holmes, and J. Lumley, “The proper orthogonal decomposition in the analysis of turbulent flows,” Annual review of fluid mechanics, vol. 25, no. 1, pp. 539–575, 1993. L. Sirovich, “Turbulence and the dynamics of coherent structures. part i: Coherent structures,” Quarterly of applied mathematics, vol. 45, no. 3, pp. 561–571, 1987. C. Duwig and P. Iudiciani, “Extended proper orthogonal decomposition for analysis of unsteady flames,” Flow, turbulence and combustion, vol. 84, no. 1, pp. 25–47, 2010. K. Meyer, J. Pedersen, and O. Ozcan, “A turbulent jet in crossflow analysed with proper orthogonal decomposition,” Journal of Fluid Mechanics, vol. 583, pp. 199–228, 2007.
5cs.CE
arXiv:1412.4646v3 [cs.DM] 23 Dec 2015 On the density of Lyndon roots in factors Maxime Crochemore∗ Robert Mercaş† February 15, 2018 1 Introduction The concept of a run coined by Iliopoulos et al. [11] when analysing repetitions in Fibonacci words, has been introduced to represent in a succinct manner all occurrences of repetitions in a word. It is known that there are only O(n) many of them in a word of length n from Kolpakov and Kucherov [12] who proved it in a non-constructive manner. The first explicit bound was later on provided by Rytter [15]. Several improvements on the upper bound can be found in [16, 4, 14, 5, 8]. Kolpakov and Kucherov conjectured that this number is in fact smaller than n, which has been proved by Bannai et al. [1, 2]. Recently, Holub [10] and Fischer et al. [9] gave a tighter upper bound reaching 22n/23. In this note we provide a proof of the result, slightly different than the short and elegant proof in [2]. Then we provide a relation between the border-free root conjugates of a square and the critical positions [13, Chapter 8] occurring in it. Finally, counting runs extends naturally to the question of their highest density, that is, to the question of the type of factors in which there is a large accumulation of runs. This is treated in the last section. 0 1 2 3 4 5 6 7 8 9 10 11 12 a b a a b a b b a b a b b Figure 1: Dotted lines show the 8 runs in abaababbababb. For example, [7 . . 11] is the run of period 2 and length 5 associated with factor babab. Formally, a run in a word w is an interval [i . . j] of positions, 0 ≤ i < j < |w|, for which both the associated factor w[i . . j] is periodic (i.e. its smallest period p satisfies p ≤ (j − i + 1)/2), and the periodicity cannot be extended to the right nor to the left: w[i − 1 . . j] and w[i . . j + 1] have larger periods when these words are defined (see Figure 1). ∗ King’s † Kiel College London and Université Paris-Est. [email protected] University and King’s College London. [email protected] 1 2 Fewer runs than length We consider an ordering < on the word alphabet and the corresponding lexicographic ordering denoted < as well. We also consider the lexicographic ordering e called the reverse ordering, inferred by the inverse alphabet ordering <−1 . <, The main element in the proof of the theorem is to assign to each run its greatest suffix according to one of the two orderings. 0 1 2 3 4 5 6 7 8 9 10 11 12 a b a a b a b b a b a b b Figure 2: Plain lines show the 8 greatest proper suffixes assigned to runs of abaababbababb from Figure 1 in the proof of the theorem. Note that no two suffixes start at the same position. Theorem 1 The number of runs in a word of length n is less than n. Proof. Let w be a word of length n. Let [i . . j] (0 ≤ i < j < n) be a run of smallest period p in w. If j + 1 < n and w[j + 1] > w[j − p + 1] we assign to the run the position k for which w[k . . j] is the greatest proper suffix of w[i . . j]. e Else, k is the position of the greatest proper suffix of w[i . . j] according to <. Note that if k > i then k > 0, and that w[k . . j] contains a full period of the run factor, i.e. j − k + 1 ≥ p. Also note that w[k . . k + p − 1] is a greatest conjugate of the period root w[i . . i+p−1] according to one of the two orderings. Therefore, it is border-free, known property of Lyndon words. We claim that each position k > 0 on w is the starting position of at most one greatest proper suffix of a run factor. Let us consider two distinct runs [i . . j] and [ī . . j̄] of respective periods p and q, and which are called respectively the p-run and the q-run. Assume p 6= q since the runs cannot be distinct and have the same period. For the sake of contradiction, we assume that their greatest suffixes share the same starting position k. First case, j = j̄, which implies w[k . . j] = w[k . . j̄]. Assume for example that p < q. Then, w[k . . k + q − 1] has period p and thus is not border-free, which is a contradiction. Second case, assume without loss of generality that j < j̄ and that both suffixes are the greatest in their runs according to the same ordering, say <. Let d = w[j +1], the letter following the p-run. By definition we have w[j −p+1] < d and then w[i . . j − p + 1] < w[i . . j − p]d. But since w[i + p . . j]d is a factor of the q-run this contradicts the maximality of w[k . . j̄ − 1]. Third case, j 6= j̄ and the suffixes are greatest according to different orderings. Assume without loss of generality that p < q and the suffix of the p-run e factor is greatest according to <. Since q > 1 we have both w[k + q − 1]>w[k] and w[k + q − 1] = w[k − 1], then w[k − 1] < w[k]. We cannot have p > 1 because this implies w[k − 1] > w[k]. And we cannot have either p = 1 because this implies w[k − 1] = w[k]. Therefore we get again a contradiction. 2 This ends the proof of the claim and shows that the number of runs is no more than the number n − 1 of potential values for k, as stated. 3 Lyndon roots The proof of Theorem 1 by Bannai et al. [2] relies on the notion of a Lyndon root. Recall that, for a fixed ordering on the alphabet, a Lyndon word is a primitive word that is not larger than any of its conjugates (rotations). Equivalently, it is smaller than all its proper suffixes. The root of a run [i . . j] of period p in w is the factor w[i . . i + p − 1]. Henceforth, the Lyndon root of a run is the Lyndon conjugate of its root. Therefore, since a run has length at least twice as long as its root, the first occurrence of its Lyndon root is followed by its first letter. This notion of Lyndon root is the basis of the proof of the 0.5n upper bound on the number of cubic runs given in [6]. Recall that a run is said to be cubic if its length is at least three times larger than its period. Lyndon roots considered in [2] are defined according to the two orderings e However, these Lyndon roots can be defined as smallest or greatest < and <. conjugates of the run root according to only one ordering. The proof of Theorem 1 is inspired by the proof in [2] but does not use explicitly the notion of Lyndon roots. The link between the two proofs is as follows: when the suffix w[k . . j] is greatest according to < in the run factor, then its prefix of period length, w[k . . k + p − 1], is a Lyndon word according e As a consequence, the assignment of positions to runs is almost the same to <. whatever greatest suffixes or Lyndon roots are considered. The use of Lyndon roots leaves more flexibility to assign positions to runs. Indeed, a run factor may contain several occurrences of the run Lyndon root. Furthermore, any two consecutive occurrences of this root do not overlap and are adjacent. The multiplicity of these occurrences can be transposed to greatest suffixes by considering their borders. Doing so, what is essential in the proof of Theorem 1 is that the suffixes and borders so defined are at least as long as the period of the run. Consequently, consecutive such marked positions can be assigned to the same run. As a consequence, since every cubic run is associated to at least two positions, this yields the following corollaries. Corollary 2 If a word of length n contains c cubic runs, it contains less than n − c runs. Corollary 3 A word of length n contains less than 0.5n cubic runs. The last statement is proved in [6] employing the notion of Critical position, which is discussed in the next section. 4 Critical positions The consideration of the two above orderings appears in the simple proof of the Critical Factorisation Theorem [7] (for another proof see [13, Chapter 8]). 3 Let us recall that the local period at position |u| in uv is the length of the shortest non-empty word z for which z 2 is a repetition centred at position |u|. Equivalently, in simpler words, z is the shortest non-empty word that satisfies both conditions: either z is a suffix of u or u is a suffix of z, and either z is a prefix of v or v is a prefix of z. Note that vu satisfies the conditions but is not necessarily the shortest word to do it. The Critical Factorisation Theorem states that a word x of period p admits a factorisation x = uv whose local period at position |u| is p. Such a factorisation uv of x is called a critical factorisation and the position |u| on x a critical position. When considering the starting positions of greatest suffixes defined above e the shorter of the two is known to provide a critical according to < and to <, position following [7]. Thus, it does not come as a surprise to us that the simple proof of Theorem 1 relies on alphabet orderings. Nevertheless, as the initial question does not involve any ordering on the alphabet, we could expect a proof using, for example, only the notion of critical positions. The next lemma may be a step on this way. v u y v y p v u q u z z Figure 3: If uv is a border-free factor of (vu)2 , then at least one of its local period words y or z have length |uv|. Otherwise, the common part in the dash-box has length equal to the sum of its periods p and q generating a contradiction. Lemma 4 Let x2 = (vu)2 be a square whose root conjugate uv is border-free. Then, at least |v| or |vuv| are critical positions on x2 . Proof. Let y be the local period word at position |v| on x2 . Since uv is borderfree, v is a proper suffix of y. Similarly, for the local period word z at position |vuv|, the border-freeness of uv implies that u is a proper prefix of z. The situation is displayed in Figure 3. For the sake of contradiction we assume the conclusion does not hold, i.e., both y and z are shorter than uv (note that they cannot be longer than uv). Let |p| be the induced period of pu and |q| the induced period of vq. The overlap between the two words p and q admits period lengths |p| and |q| and has length |pu| − (|uv| − |vq|) = |p| + |q|. Thus, by the Periodicity Lemma, p and q are powers of the same word r. But then r is a nonempty prefix of u and a suffix of v contradicting the border-freeness of uv. Example. Consider the square baba of period 2. The occurrence of its borderfree factor ab induces the two critical positions 1 and 3. On the contrary, the first occurrence of its border-free factor ba induces only one critical position, namely 2, while the local period at 0 has length 1 < 2. 4 In the square abaaba of period 3, the occurrence of the border-free factor aab produces the critical position 2. However, its position 5 is not critical since the local period 2 is smaller than the whole period of the square. 5 Lyndon roots density In this section we consider a generalisation of the problem of counting the maximal number of runs in a word. In particular, we are interested in the following problem concerning first occurrences of Lyndon roots within a run factor. Let us call the interval corresponding to the first such occurrence the Lroot associated with the run. Then, we are dealing with the following conjecture: Conjecture 1 ([3]) For any two positions i and j on a word x, 0 ≤ i ≤ j < |x|, the maximal number of run Lroots included in the interval [i . . j] is not more than the interval length j − i + 1. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 a b a b a a b a b b a b a b b Figure 4: Lines show the 6 run Lroots inside the interval [4 . . 9] corresponding to the factor aababb. Let us consider the word x = (ab)k a(ab)k b(ab)k b and the interval of positions [2k . . 4k + 1] corresponding to the factor a(ab)k b. The number of Lroots corresponding to this interval is exactly the length 2(k + 1) of the interval. Figure 4 shows the situation when k = 2. This example gives a lower bound on the maximal number of Lroots contained in an interval of positions. Proposition 5 The number of Lroots contained in an interval of positions on a word, can be as large as the length of the interval. In addition to the conjecture, we believe that factors associated with intervals of length at least 4 containing the maximal number of Lroots are of the form a(ab)+ b for two different letters a and b. It can be checked that the maximal number of Lroots is respectively 1 and 3 for intervals of lengths 1 and 3 with factors a and aab, but is only 1 for intervals of length 2. All these factors are Lyndon words for the ordering a < b. This is due to the fact that such factors contain overlapping Lyndon roots making the whole factor a Lyndon word itself. Remark 6 In order to obtain an upper bound on the number of Lroots inside an interval of positions, it is enough to restrict ourselves to counting the maximal number of Lroots within an interval corresponding to some Lyndon word. Indeed, each Lroot corresponds to a Lyndon word. Since we want an interval that contains the maximal such number, all the positions of this interval are covered by some Lyndon word. However, since the overlap between every two 5 Lyndon words produces a Lyndon word, and since every word can be expressed as a concatenation of Lyndon words, our claim follows. We show that the number of Lroots inside an interval corresponding to a Lyndon word is bounded by 1.5 times the length of the interval. For this we make use of the result from [2] stating that each position of a word is the starting position of at most one specific root associated with the run. The root is chosen according to some order defined by the letter following the run. We denote such a root relative to the order as the Oroot of the run. Formally: Definition 1 Let r be a run of period pr of the word w and let rL be the Lroot associated with r. If r ends at the last position of w, or if the letter at the position following r is smaller than the letter pr positions before it, then the Oroot is the interval corresponding to the first occurrence of a Lyndon root that is not a prefix of r. Otherwise, the Oroot is the interval corresponding to the length pr prefix of the greatest proper suffix of the run factor r. Observe that since a run is at least as long as twice its minimal period, this ensures the existence of both its Lroot as well as its Oroot. To see that the Oroot is never a prefix of the run factor it is associated with, observe from its above definition that in the second case this is actually the interval corresponding to the length pr prefix of the maximal proper suffix of the run, which is different from the run itself (being proper). Henceforth we fix an interval [i . . j] with its corresponding Lyndon word w of length ℓ. Furthermore, we denote by rL = [iL . . jL ] the Lroot of the run r = [ir . . jr ] and by rO = [iO . . jO ] its Oroot. For r, we denote by pr the (smallest) period of the run. Please note that |rL | = |rO | = pr , while both must start and end within the run r. We make the following remarks based on the already known properties of Lroots and Oroots. Remark 7 The Lroot and the Oroot associated with a run r start within the first pr and pr + 1, respectively, positions of the run, and both have length pr . As a direct consequence of the definition of the Oroot we have the following: Remark 8 If the Oroot of a run r is a Lyndon word, then the Oroot and the corresponding Lroot represent the same factor and, either iO = iL , or the run r starts at position iL and iL + pr = iO . In conclusion we have the following: Remark 9 To bound the number of Lroots inside the interval [i . . j] corresponding to the word w, it is enough to consider all runs starting within the interval corresponding to a factor wp w, where |wp | < |w|. For the rest of this work let us fix the factor preceding a Lyndon word w as wp , while the one following it by ws , such that the interval corresponding to wp wws is the shortest interval that contains all runs with their Lroots in [i . . j]. 6 Now we start looking at the relative positions of the Oroot and Lroot corresponding to the same run. i+ℓ iO i iL wp ws w rO rL Figure 5: rO starts before the Lyndon word w Lemma 10 Fix an Lroot occurring within an interval w = [i . . i + ℓ − 1] of a word. If the Oroot corresponding to the same run starts outside w, then either: 1. the Lroot ends at position i+ℓ−1, and the Oroot starts at position i+ℓ, or 2. the Lroot starts at position i, and the Oroot starts before position i. Proof. Following Remark 6, without loss of generality assume that wp starts at position 0 and has length i, while w = [i . . i + ℓ − 1] is a Lyndon word. As stated in the hypothesis, i ≤ iL and |rL | ≤ ℓ. First let us assume that iO ≥ i + ℓ, hence the Oroot starts after the end of the Lyndon word w. The result follows immediately from Remark 8. For the second statement, consider Figure 5 where iO < i ≤ iL . Assume towards a contradiction that i < iL . Since iO < i and rL corresponds to an interval on w, it must be that the corresponding run starts before or on position iO and it ends after or on position i + ℓ − 1. However, since w is a Lyndon word, it must be that for any word x such that yx is a suffix of w, where y is the factor corresponding to rL , we have w < yx. But in this case, unless y is a prefix of w, we get a contradiction with the fact that rL is a Lyndon root. In the former case, however, we get a contradiction with the definition of rL since i < iL (rL is the interval corresponding to the first occurrence of a Lyndon root of the run), and the conclusion follows in this case as well. As a consequence of the above lemma, the number of Lroots is bounded by 2ℓ. This is because the Oroots all start inside an interval of length |wp |+|w|+1 ≤ 2ℓ, and no two share the same starting position [2]. In the following we reduce this bound to 1.5ℓ. The next lemma shows that the situation in Lemma 10.1 is met by at most one Oroot. Lemma 11 For any word and any interval [i . . j] on it, there exists at most one run that has its Oroot starting after position j while its Lroot corresponds to an interval inside [i . . j]. Proof. According to Lemma 10.1, it must be the case that iO = j + 1, while iL = j − pr + 1, for any appropriate run r. However, having more than one Oroot starting at position j + 1 with the factor corresponding to its Lroot as a suffix of the Lyndon word, would then imply that the larger of Lroots that corresponds to a Lyndon word is bordered, which is a contradiction. Now we are dealing with Oroots corresponding to Lemma 10.2. 7 Proposition 12 For a given word, any interval of length ℓ of positions on the word contains at most 3ℓ/2 Lroots. Proof. Let us denote once more our interval by w = [i . . i + ℓ − 1] and the interval preceding it by wp . We know from the definition that an Lroot is the first Lyndon root of a run, and therefore the letter ending every Lroot must be greater than its first letter, while the one on the position right after the end of the Lroot must be the same as the first letter of the Lroot. Since for any Oroot starting in the interval associated with wp , the Lroot corresponding to it in w starts at position i, we note that these can be bounded by the number of length two factors in w that have the letter on the first position larger than the letter on position i, while the second one identical. If the second letter of such a factor is smaller than the letter on position i, than this situation would make it impossible for a Lroot to start on position i and end before this position (this is because an Lroot is the first Lyndon root occurrence of a run). Since this number is obviously bounded by 2ℓ , while the whole length of wp is bounded by ℓ − 1, (by considering the symmetric situation) we conclude that there are less than ℓ−1 2 runs that start in wp such that their corresponding Oroots start before position i, while their Lroots start at position i (the Lroots correspond to prefixes of w). Hence, combining this with the fact that within w we have at most ℓ Oroots starting there, see [2], and since according to Lemma 11 there is at most one Oroot starting after position j that has the Lroot in w, we get an upper bound for our problem. The bound given in the above proposition is not really tight. On this point let us complete the conjecture: Conjecture 2 For a given word, any interval of length ℓ > 0 of positions on the word contains at most ℓ Lroots, and the maximum number is obtained only ℓ−2 when the factor corresponding to the interval is of the form a(ab) 2 b, where ℓ > 3, and the letters a and b satisfy a < b. We end this article with a few more observations regarding the results from [2], when we restrict ourselves to binary words. First we recall a property of Oroots: Lemma 13 (Bannai et al. [2]) If two different Oroots obtained considering the same order overlap, then their overlap is the shortest of the Oroots. We observe that we can consider Oroots to be obtained according to a certain order based on the letter that these Oroots start with (thus all Oroots starting with a are obtained according to the lexicographical order, while the ones starting with b are obtained according to the inverse lexicographical one). Proposition 14 For a given binary word, any interval of length ℓ of positions on the word contains at most ℓ−1 2 Oroots obtained according to the same order. 8 Proof. Without loss of generality we fix an order; let us say lexicographical. Observe first, that for a word to correspond to an Oroot, whenever they are not binary, they must start with a letter a and end with a b (as previously mentioned). Furthermore, it must be the case that this interval is preceded by a b and followed by an a, as otherwise it does not correspond to a Lyndon root (there exists another rotation that has an extra a in its longest unary prefix). Finally, observe that considering their relative position, following Lemma 13, two such Oroots are either included one in the other, or they are disjoint. Now, considering two words corresponding to two Oroots, let us say u and v with u a factor of v, we note that, since their lengths are different, following the initial conditions, they must differ by a length of at least 2, whenever u is not unary (each starts between a b and an a, and ends between an a and a b). For the unary case, note that every block of consecutive a’s must be in-between two occurrences of b. Furthermore, we cannot have two unary words corresponding to Oroots overlapping each other. Thus if the position of the second a is an Oroot in the word baℓ b, for ℓ > 0, it is impossible to have a length less than 3 for any word starting with the first a whose interval corresponds to an Oroot. Given that for any two distinct adjoining Oroots both their lengths and the number of Oroots they contain add up, the result follows in this case as well. In order to get the −1, we observe that for any word of length at least 3, for the interval it determines to have the maximum number of Oroots of the same order, according to the previous facts, would imply the word to have the form (ab)+ . However, now, the Oroots would correspond to words that are just powers of one another, contradicting their property of being Lyndon words. Furthermore, denoting by |w|u the number of all (possibly overlapping) occurrences of u in w, as consequence of the above we have the following: Corollary 15 Every length ℓ interval associated with a factor w of a binary word completely contains at most min{|w|ab , |w|ba } Oroots that correspond to non-unary factors and are obtained according to the same order. Corollary 16 The number of Oroots associated with unary runs within every factor of a binary word is at most one extra than the number of unary maximal blocks within the factor (by a maximal block we refer to a unary factor that cannot be extended either to the left or to the right without losing its periodicity). 6 Acknowledgement We would like to warmly thank Gregory Kucherov, Hideo Bannai, and Bill Smyth for helpful discussions on the subject. The work of Robert Mercaş was supported by the P.R.I.M.E. programme of DAAD with funds provided by the Federal Ministry of Education and Research (BMBF) and the European Union’s Seventh Framework Programme for research, technological development and demonstration (grant agreement no. 605728). 9 References [1] H. Bannai, T. I, S. Inenaga, Y. Nakashima, M. Takeda, and K. Tsuruta. A new characterization of maximal repetitions by Lyndon trees. In 26th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA, pages 562– 571, 2015. [2] H. Bannai, T. I, S. Inenaga, Y. Nakashima, M. Takeda, and K. Tsuruta. The “runs” theorem. CoRR, abs/1406.0263v7, 2015. [3] M. Crochemore. Repeats in strings. Keynote talk at the 25th Annual Symposium on Combinatorial Pattern Matching, Moscow, June 2014. Personal communication. [4] M. Crochemore and L. Ilie. Maximal repetitions in strings. Journal of Computer and System Sciences, 74(5):796 – 807, 2008. [5] M. Crochemore, L. Ilie, and L. Tinta. The “runs” conjecture. Theoretical Computer Science, 412(27):2931–2941, 2011. [6] M. Crochemore, C. S. Iliopoulos, M. Kubica, J. Radoszewski, W. Rytter, and T. Waleń. The maximal number of cubic runs in a word. Journal of Computer and System Sciences, 78(6):1828–1836, 2012. [7] M. Crochemore and D. Perrin. Two-way string-matching. Journal of the ACM, 38(3):651–675, 1991. [8] A. Deza and F. Franek. A d-step approach to the maximum number of distinct squares and runs in strings. Discrete Applied Mathematics, 163(3):268–274, 2014. [9] J. Fischer, Š. Holub, T. I, and M. Lewenstein. Beyond the runs theorem. In Proceedings of the 22nd International Symposium on String Processing and Information Retrieval, SPIRE, volume 9309 of LNCS, pages 272–281, 2015. [10] Š. Holub. Beyond the runs theorem. CoRR, abs/1502.04644v1, 2015. [11] C. S. Iliopoulos, D. Moore, and W. F. Smyth. A characterization of the squares in a Fibonacci string. Theoretical Computer Science, 172(1–2):281– 291, 1997. [12] R. Kolpakov and G. Kucherov. Finding maximal repetitions in a word in linear time. In 40th IEEE Annual Symposium on Foundations of Computer Science, FOCS, pages 596–604, New York, 1999. [13] M. Lothaire. Combinatorics on Words. Cambridge University Press, second edition, 1997. [14] S. J. Puglisi, J. Simpson, and W. F. Smyth. How many runs can a string contain? Theoretical Computer Science, 401(1-3):165–171, 2008. 10 [15] W. Rytter. The number of runs in a string: Improved analysis of the linear upper bound. In 23rd Annual Symposium on Theoretical Aspects of Computer Science, STACS, volume 3884 of LNCS, pages 184–195, 2006. [16] W. Rytter. The number of runs in a string. Information and Computation, 205(9):1459–1469, 2007. 11
8cs.DS
arXiv:1304.4257v3 [math.AC] 8 Oct 2015 Markov bases and generalized Lawrence liftings Hara Charalambous, Apostolos Thoma and Marius Vladoiu Abstract. Minimal Markov bases of configurations of integer vectors correspond to minimal binomial generating sets of the assocciated lattice ideal. We give necessary and sufficient conditions for the elements of a minimal Markov basis to be (a) inside the universal Gröbner basis and (b) inside the Graver basis. We study properties of Markov bases of generalized Lawrence liftings for arbitrary matrices A ∈ Mm×n (Z) and B ∈ Mp×n (Z) and show that in cases of interest the complexity of any two Markov bases is the same. Mathematics Subject Classification (2010). Primary 14M25; Secondary 14L32,13P10,62H17. Keywords. Toric ideals, Markov basis, Graver basis, Lawrence liftings. 1. Introduction Let A be an element of Mm×n (Z), for some positive integers m, n. The object of interest is the lattice L(A) := KerZ (A). A Markov basis M of A is a finite subset of L(A) such that whenever w, u ∈ Nn and w − u ∈ L(A) (i.e. Aw = Au), there exists a subset {vi : iP = 1, . . . , s} of M that connects w to Ps p u. This means that for 1 ≤ p ≤ s, w + i=1 vi ∈ Nn and w + i=1 vi = u. A Markov basis M of A gives rise to a generating set of the lattice ideal IL(A) := hxu − xv : Au = Avi . Each u ∈ Zn can be uniquely written as u = u+ −u− where u+ , u− ∈ Nn are vectors with non-overlapping support. In the seminal work of Diaconis and Sturmfels in [4], it was shown that M is a Markov basis of A if and only if + − the set {xu − xu : u ∈ M } is a generating set of IL(A) . A Markov basis M of A is minimal if no subset of M is a Markov basis of A. We say that L(A) is positive if L(A) ∩ Nn = {0} and non positive if L(A) ∩ Nn 6= {0}. When L(A) is positive then the graded Nakayama Lemma applies and all minimal . 2 Charalambous, Thoma and Vladoiu Markov bases have the same cardinality. When L(A) is non positive, it is possible to have minimal Markov bases of A of different cardinalities, see [3]. It is important to note that the study of non positive lattices has important implications in the study of positive ones, see for example the proof of [10, Theorem 3], [7, Lemma 5] and [8, Theorem 3.5]. The universal Markov basis of A will be denoted by M(A) and is defined as the union of all minimal Markov bases of A of minimal cardinality, where we identify a vector u with −u, see [3, 10]. The sublattice of L(A) generated by all elements of L(A) ∩ Nn is called the pure sublattice of L(A) and is important when considering minimal Markov bases of A, see [3]. The pure sublattice of L(A) is zero exactly when L(A) is positive. Let u, v, w be non zero vectors in Zn . If u = v+w we write u = v+c w to denote that this sum gives a conformal decomposition of u i.e. u+ = v+ + w+ and u− = v− +w− . The set consisting of all non zero elements of L(A) which have no conformal decomposition is denoted by G(A) and is called the Graver + − basis of A. When u ∈ G(A) the binomial xu − xu is called primitive. G(A) is always a finite set, see [6, 11]. In this paper we examine in detail when an element of a minimal Markov basis belongs to G(A). We show in Theorem 2.3 that M(A) ⊂ G(A) holds in just two cases: when L(A) is positive and when L(A) is pure of rank 1. We point out that even though the inclusion for positive lattices is well known, we could not locate its proof in the literature, so we provide it here for completeness of the exposition. By U(A) we denote the universal Gröbner basis of A, i.e. the set which + − consists of all vectors u ∈ L(A) such that xu − xu is part of a reduced n Gröbner basis of IL(A) for some term order on N . The inclusion U(A) ⊂ G(A) always hold (see [11, Lemma 4.6]). In this paper we examine the relation between M(A) and U(A). In general M(A) is not a subset of U(A) even when L(A) is positive as Example 2.8 shows. In Theorem 2.7 we give a necessary and sufficient condition for M(A) to be contained in U(A) when L(A) is positive. In Section 3, for r ≥ 2, B ∈ Mp×n (Z), we study the generalized Lawrence lifting Λ(A, B, r): r−times  A  0 Λ(A, B, r) =      0 B z 0 A }| { .. 0 B . ···  0 0   .    A  B When B = In one gets the usual r–th Lawrence lifting A(r) , see [10]. Such liftings were used to prove for example the finiteness of the Graver basis of A and are connected to hierarchical models in Algebraic Statistics, see [10, 8]. We denote the columns of A by a1 , . . . , an and the columns of B by Markov bases and generalized Lawrence liftings 3 b1 , . . . , bn . The (rm + p) × rn matrix Λ(A, B, r) has columns the vectors {ai ⊗ ej ⊕ bi : 1 ≤ i ≤ n, 1 ≤ j ≤ r}, where e1 , . . . , en represents the canonical basis of Zn . Note that L(Λ(A, B, r)) is a sublattice of Zrn . Let C ∈ L(Λ(A, B, r)). We can assign to C an r × n matrix C such that Ci,j = C(i−1)n+j . Each row of C corresponds to an element of L(A) and the sum of the rows of C corresponds to an element in L(B). The number of nonzero rows of C is the type of C. The complexity of any subset of Λ(A, B, r) is the largest type of any vector in that set. For r ≥ 2 we consider the Graver basis of Λ(A, B, r), G(Λ(A, B, r)). We let the Graver complexity of (A, B) be the supremum over r of the complexities of G(Λ(A, B, r)) and denote it by g(A, B). By [8, Theorem 3.5], g(A, B) is finite and equals the maximum 1-norm of the elements in the Graver basis of the matrix B · Gr(A), where Gr(A) is the matrix whose columns are the elements of G(A). In the literature there are two definitions of Markov complexity of (A, B). The first introduced in [10] defines the Markov complexity of (A, B) as the smallest integer m such that there exists a Markov basis of Λ(A, B, r) of type less than or equal to m for any r ≥ 2. It is always finite and bounded by g(A, B). The second definition given in [8] defines the Markov complexity of (A, B) as the largest type of any element in the universal Markov basis of Λ(A, B, r) as r varies. The main result of Section 3 is Theorem 3.3. It states that when L(Λ(A, B, r)) is positive, all minimal Markov bases of Λ(A, B, r) have the same complexity. This is computationally essential, since to compute the complexity of any minimal Markov basis of Λ(A, B, r) one can start with any monomial order in Nn , compute the reduced Gröbner basis of Λ(A, B, r), eliminate extraneous elements to obtain a minimal Markov basisof Λ(A, B, r) and then read the largest type of the remaining elements. We note that in general L(Λ(A, B, r)) is positive for some r ≥ 2 if and only if L(Λ(A, B, r)) is positive for all r ≥ 2 and to decide whether this holds it suffices to check whether the lattice KerZ (A) ∩ KerZ (B) is positive (see Lemma 3.2). When KerZ (A) ∩ KerZ (B) is non positive then Theorem 3.5 shows that the Markov complexities of Λ(A, B, r) cannot be bounded as r varies. In Example 3.7 we give matrices A, B such that for all r ≥ 2, L(Λ(A, B, r)) has a minimal Markov basis of complexity k for every 2 ≤ k ≤ r. Finally, in Remark 3.8 we discuss implications of our work to the two notions of Markov complexity. 2. Universal Markov and Gröbner bases For simplicity of notation we write L for L(A), M for M(A), G for G(A), U for U(A) and Lpure for the pure sublattice of L generated by the elements in L ∩ Nn . Theorem 2.1. [3, Theorem 4.18] If i) rank(Lpure ) > 1 or ii) rank(Lpure ) = 1 and L 6= Lpure then M is infinite. 4 Charalambous, Thoma and Vladoiu Next we consider the fibers Fu of IL for any u ∈ L. We let Fu := {t ∈ Nn : u+ − t ∈ L}. We note that if L is positive then Fu is a finite set. We construct a graph Gu with vertices the elements of Fu . Two vertices w1 , w2 are joined by an edge if there is an index i such that i-th component of w1 and w2 are nonzero. Thus w1 , w2 are joined by an edge if and only if (w1 − w2 )+ is componentwise smaller than w1 , meaning that at least one component of their difference is strictly positive. The following necessary condition for u ∈ L to be in M was observed in [2, Theorem 2.7] and [5, Theorem 1.3.2] when L is positive. Theorem 2.2. If L is positive then u is in the universal Markov basis of A if and only if u+ and u− belong to different connected components of Gu . Fu is called a Markov fiber when there exists an element v in the universal Markov basis of A such that v+ ∈ Fu . The Markov polyhedra of Fu are the convex hulls of the elements of the connected components of Gu . When L is positive, the Markov polyhedra of Fu are actually polytopes. For u ∈ L we let P [u] be the convex hull of all elements of Gu . When u ∈ M the vertices of P [u] are vertices of the Markov polyhedra of Fu and we will see that the vertices of the Markov polyhedra are decisive in determining whether u belongs to the universal Gröbner basis of A. The criterion of Theorem 2.2 is used in the proof of the next theorem. Theorem 2.3. The universal Markov basis of A is a subset of the Graver basis of A if and only if one of the following two conditions hold: i) L is positive or ii) L = Lpure and rank L = 1. Proof. Assume first that M ⊂ G. Theorem 2.1 says that if rank(Lpure ) > 1 or rank(Lpure ) = 1 and L 6= Lpure then the universal Markov basis M of A is infinite. Since the Graver basis of A is finite the desired conclusion follows. For the converse, assume first that L is non positive. By Theorem 2.1 we are in the case where rank(Lpure ) = 1 and L = Lpure . We let 0 6= w ∈ Nn be such that L = hwi. It is immediate that w ∈ G and thus M = G. Next we examine the case where L is positive. We will show that if u ∈ L, u ∈ / G then u ∈ / M. Since u ∈ / G there exist nonzero vectors v, w ∈ L such that u = v +c w. Thus u+ = v+ + w+ and u− = v− + w− . It follows that u+ , u− and u+ − v = w+ + v− are all in Fu . Next we show that v+ is nonzero. Indeed suppose not. Since v− = v − v+ = v ∈ L ∩ Nn = {0}, it follows that v = 0, a contradiction. Similarly w+ , v− , w− are nonzero. Thus in the fiber Fu , the elements u+ , w+ + v− are connected by an edge because (u+ − (w+ + v− ))+ = v+ , which is smaller than u+ . Similarly u− , w+ + v− are connected by an edge because ((w+ + v− ) − u− )+ = w+ , which is smaller than w+ +v− . It follows that u+ , u− belong to the same connected component of Gu and thus u ∈ / M.  Remark 2.4. Let E be the union of all minimal Markov bases of A, not necessarily of minimal cardinality, where we identify a vector u with −u. Note that M ⊂ E. Next we show that E is a subset of G if and only if L is Markov bases and generalized Lawrence liftings 5 a positive lattice. Indeed when L is a positive lattice then E = M ⊂ G as pointed out in the introduction (see also [3]). Suppose now that L is a non positive lattice and consider the only case left unanswered by Theorem 2.3: namely consider the case where L = Lpure of rank 1. This means that L = hwi for some 0 6= w ∈ Nn . It is easy to see that if k, l ≥ 2 are any two relatively prime integers then {kw, lw} is a minimal Markov basis of A. Thus kw ∈ E for every k and therefore E is infinite and cannot be a subset of the Graver basis of A, which is equal to {w}. Next we examine the relation between the universal Markov basis of A and the universal Gröbner basis of A. We recall the following characterization given in [11]. Theorem 2.5. [11, Theorem 7.8] If L is positive and u ∈ L then u is in the universal Gröbner basis of A if and only if the greatest common divisor of the coordinates of u is one and the line segment [u+ , u− ] is an edge of the polytope P [u]. For u ∈ Rn , we let supp(u) := {i : ui 6= 0}. For X ⊂ Rn , we let [ supp(X) := supp(u) . u∈X We note that if u ∈ M and L is positive then it is not hard to prove that the supports of different connected components of Gu are disjoint. Hence the Markov polytopes of Fu are disjoint. Lemma 2.6. Let L be positive. An element u of the universal Markov basis of A belongs to the universal Gröbner basis of A if and only if u+ and u− are vertices of two different Markov polytopes. Proof. Suppose that u ∈ U. Since u ∈ M, it follows by Theorem 2.2 that u+ and u− are elements of two different Markov polytopes of Fu . Since [u+ , u− ] is an edge of P [u] it follows that u+ , u− are vertices of P [u] and thus of their Markov polytopes as well. For the converse assume u+ , u− are vertices of the disjoint Markov polytopes P1 , P2 respectively. Since u+ , u− are vertices of P1 , P2 we can find vectors c1 , c2 such that supp(ci ) ⊂ supp(Pi ) for i = 1, 2 with the property that c1 · u+ = 0, c1 · v > 0 for all v ∈ P1 \ {u+ } and c2 · u− = 0, c2 · v > 0 for all v ∈ P2 \ {u− }. We define c as follows   (c1 )i , if i ∈ supp(c1 ), (c2 )i , if i ∈ supp(c2 ), ci =  1, otherwise. From the definition of c it follows that c · v = 0 for all v ∈ [u+ , u− ] and c · v > 0 for all v ∈ conv(P1 ∪ P2 ) \ {[u+ , u− ]}. On the other hand c · v > 0 for all v ∈ / conv(P1 ∪ P2 ), since P [u] ⊂ Rn+ . Therefore [u+ , u− ] is an edge of P [u] and by Theorem 2.5 we have u ∈ U, as desired.  6 Charalambous, Thoma and Vladoiu Note that if L is non positive and rank Lpure > 1, then M is infinite by Theorem 2.1 and thus M 6⊂ U. On the other hand if L = Lpure and rank L = 1 then M = U = {w} where w is the generator of L. The proof of the next theorem follows immediately by these remarks and Lemma 2.6. Theorem 2.7. Let A be an arbitrary integer matrix. The universal Markov basis of A is a subset of the universal Gröbner basis of A if and only if one of the following two conditions holds 1. L is positive and every element of a Markov fiber is a vertex of a Markov polytope, 2. L = Lpure and rank L = 1. We finish this section with an example which shows specific elements of M not in U. Example 2.8. Let    A=   2 4 4 2 2 2 0 0 2 2 2 4 0 2 2 2 0 4 2 2 3 3 3 6 6 3 3 3 0 0 3 3 3 6 0 3 3 3 0 6    .   Then L is a positive lattice. One can prove that {u, v, w} is a minimal Markov basis of A where u = (1, 1, −1, −1, 0, 0, 0, 0), v = (0, 0, 0, 0, 1, 1, −1, −1) and w = (2, 2, 1, 1, −1, −1, −1, −1). The corresponding Markov fibers are Fu = {u+ , u− } , Fv = {v+ , v− } and Fw = {3u+ , w+ , u+ + 2u− , 3u− , 2v+ , w− , 2v− }. The Markov polytopes of Fu and Fv are zero dimensional, they consist of points. The Markov polytopes of Fw are one dimensional: they are the line segments conv(3u+ , 3u− ) and conv(2v+ , 2v− ). We note that w+ = 2u+ + u− is in conv(3u+ , 3u− ), w− = v+ + v− is in conv(2v+ , 2v− ) but they are not vertices. Thus w is not in the universal Gröbner basis of A. Note that A has 12 different minimal Markov bases. Of those bases, exactly 4 are subsets of U. Moreover |M| = 14 and |M ∩ U| = 6. Moreover, computing with 4ti2[1], we get that G = M and |U| = 6. 3. Generalized Lawrence liftings Let L ⊂ Zn be a lattice. We say that 0 6= u is L–primitive if Qu ∩ L = Zu. Suppose that L is non positive. In [3] it was shown that there exists an L– primitive element u ∈ L∩Nn such that supp(u) = supp Lpure , [3, Proposition 2.7, Proposition 2.10]. If L = L(A) then this element can be extended to a minimal basis of Lpure and then to a minimal Markov basis of A of minimal cardinality by [3, Theorem 2.12, Theorem 4.1, Theorem 4.11]. This is the point of the next lemma. Lemma 3.1. If L is non positive, there exists an L–primitive element v ∈ Nn such that v is in the universal Markov basis of A and supp(v) = supp Lpure . Markov bases and generalized Lawrence liftings 7 Let A ∈ Mm×n (Z), B ∈ Mp×n (Z) and an integer r ≥ 2. We let Lr := L(Λ(A, B, r)), LA,B := KerZ (A) ∩ KerZ (B) . We note that Lr ⊂ Zrn while LA,B ⊂ Zn . Proposition 3.2. LA,B is positive if and only if Lr is positive for any r ≥ 2. Proof. Let C ∈ LA,B ∩Nn . We think of the elements of Lr as r×n matrices, as explained in the introduction. We have that [C · · · C]T ∈ Lr ∩Nrn . Conversely, if [C1 · · · Cr ]T ∈ Lr ∩ Nrn then C1 + · · · + Cr ∈ LA,B ∩ Nn .  Suppose that Lr is positive. Let W ∈ Lr and let W the corresponding r × n matrix with wi as its i-th row. We define σ(W) = {i : wi 6= 0, 1 ≤ i ≤ r}. Thus the type of W is the cardinality of σ(W). The Λ(A, B, r)–degree of W is the vector Λ(A, B, r)W + . Thus the Λ(A, B, r)–degree of W is in the span N(ai ⊗ ej ⊕ bi : 1 ≤ i ≤ n, j ∈ σ(W)). It is well known that the Λ(A, B, r)–degrees of any minimal Markov basis of Λ(A, B, r) are invariants of Λ(A, B, r), see [11]. Theorem 3.3. When Lr is positive the complexity of a minimal Markov basis of Λ(A, B, r) is an invariant of Λ(A, B, r). Proof. Let M1 , M2 be two minimal Markov bases of ILr . It is enough to show that the complexity of M1 is less than or equal to the complexity of M2 . Let W = [w1 · · · wr ]T ∈ M1 be such that the type of W is equal to the complexity of M1 . We let V = [v1 · · · vr ]T ∈ M2 be such that the Λ(A, B, r)-degree of V is the same as the Λ(A, B, r)-degree of W . Thus the Λ(A, B, r)–degree of V is in N(ai ⊗ ej ⊕ bi : 1 ≤ i ≤ n, j ∈ σ(W)). This implies that vi+ = 0 for every i 6∈ σ(W). Since every nonzero element in KerZ (A) has a nonzero positive part (and a nonzero negative part) it follows that vi = 0 for every i 6∈ σ(W). Thus σ(V) ⊂ σ(W). Reversing the argument we get that σ(W) = σ(V). Therefore the complexity of M1 is less than or equal to the complexity of M2 .  As in [8, Theorem 3.5] one can prove the following statement for arbitrary integer matrices A ∈ Mm×n (Z), B ∈ Mp×n (Z). We denote by Gr(A) the matrix whose columns are the vectors of the Graver basis of A. Theorem 3.4. The Graver complexity g(A, B) is the maximum 1–norm of any element in the Graver basis G(B·Gr(A)). In particular, we have g(A, B) < ∞. Suppose that Lr is non positive. Next we show that Λ(A, B, r) has a minimal Markov basis (of minimal cardinality) whose complexity is r. Theorem 3.5. Suppose that Lr is non positive. There exists a minimal Markov basis of Λ(A, B, r) of minimal cardinality, that contains an element of type r. Proof. We first show that Lr ∩ Nrn has an element of type r. By Lemma 3.2, LA,B is non positive. We let w ∈ LA,B ∩ Nn be such that supp(w) = 8 Charalambous, Thoma and Vladoiu supp((LA,B )pure ). It follows that   w  ..  rn  .  ∈ Lr ∩ N w has type r. Since (Lr )pure = hLr ∩ Nrn i, we are done by Lemma 3.1.  Remark 3.6. Suppose that r ≥ 2 and Lr is non positive. Let v be the Lr primitive element of Lemma 3.1. By adding positive multiples of v to the other elements of the Markov basis of Lemma 3.1 the new set is still a minimal Markov basis of Λ(A, B, r) with the property that all of its elements are of type r (see [3]). In the next example we give matrices A, B so that for any r ≥ 2 L(Λ(A, B, r)) is non positive and has the following interesting property: it possesses minimal Markov bases of complexity ranging from 2 to r. Example 3.7. We let A1 ∈ M2 (Z), A2 ∈ M2 (Z), B2 ∈ M2 (Z) and A, B ∈ M2×4 (Z) be the following matrices:       1 1 0 0 1 −1 A1 = , A2 = , A = (A1 |A2 ) , B2 = , 0 0 1 −1 0 0 B = (I2 |B2 ) . We consider the matrix Λ(A, B, r). After column permutations it follows that Λ(A, B, r) =     A2 0 0 A 0 0 A1 0 0  0 A  0 A1 0 0 A2 0  0          . . . .. .. .. .  →      0 0   0 0 A1 0 0 A2  A B2 B2 · · · B2 I2 I2 · · · I2 B B ··· B We note that the lattice L (Λ(A1 , I2 , r)|Λ(A2 , B2 , r)) is isomorphic to the direct sum of the lattices L(Λ(A1 , I2 , r)) and L(Λ(A2 , B2 , r)). The matrix Λ(A1 , I2 , r) is the defining matrix of the toric ideal of the complete bipartite graph K2,r and has a unique minimal Markov basis corresponding to cycles of length 4: all its elements have type 2, see [9] and [12]. We denote by Ci the columns of Λ(A2 , B2 , r), for i = 1, . . . , 2r. We note that C1 , C3 , . . . , C2r−1 are linearly independent while C2l−1 = −C2l for 1 ≤ l ≤ r. It follows that the lattice L(Λ(A2 , B2 , r)) has rank r and is pure. Thus it has infinitely many Markov bases ( see [3]). We consider the following minimal Markov basis of Λ(A2 , B2 , r) consisting of elements of type 1:       1 1 0 0 0 0  0 0   1 1   0 0        {  . .  ,  . .  , . . . ,  . .  }.  .. ..   .. ..   .. ..  0 0 0 0 1 1 Markov bases and generalized Lawrence liftings 9 For fixed 1 ≤ a ≤ r and 1 ≤ b ≤ 4 we let Ea,b be the matrix of Mr×4 (Z) which has 1 on the (a, b)-th entry and 0 everywhere else. Moreover for 1 ≤ i < j ≤ r and 1 ≤ s ≤ r, we let Pi,j ∈ Mr×4 (Z) and Ts ∈ Mr×4 (Z) be the matrices Pi,j = Ei,1 − Ei,2 − Ej,1 + Ej,2 , Ts = Es,3 + Es,4 . It follows that the set M = {T1 , . . . , Tr } ∪ {Pi,j : 1 ≤ i < j ≤ r} is a minimal Markov basis of Λ(A, B, r) of cardinality r + r2 . The elements of M have type 1 and 2, therefore the complexity of this Markov basis is 2. Note that the set {T1 , T1 + T2 , . . . , T1 + · · · + Tk , Tk+1 , · · · , Tr } ∪ {Pi,j : 1 ≤ i < j ≤ r} is a minimal Markov basis of Λ(A, B, r) and the type of its elements range from 1 to k, where 2 ≤ k ≤ r. Therefore for any integer k between 2 and r there are minimalPMarkov bases of Λ(A, B, r) of complexity k. r Moreover if T = s=1 Ts , then the set {T, T + T2 , . . . , T + Tr } ∪ {T + Pi,j : 1 ≤ i < j ≤ r} is a minimal Markov basis of Λ(A, B, r) such that all its elements are of type r (see [3]). We remark that if S is any integer linear combination of the elements Ts , 1 ≤ s ≤ r and 1 ≤ i < j ≤ r then the element S + Pi,j belongs to the infinite universal Markov basis of Λ(A, B, r). Remark 3.8. As pointed out in the introduction, in the literature there are two definitions of Markov complexity. The one introduced in [10], namely the smallest integer m such that there exists a Markov basis of Λ(A, B, r) of type less than or equal to m for any r ≥ 2, is always finite: there exists a minimal Markov basis inside the Graver basis and thus (this) Markov complexity is always smaller than the Graver complexity. When LA,B is a positive lattice then Theorem 3.3 becomes essential in the computation of this Markov complexity: it guarantees that all minimal Markov bases have the same complexity. Even when LA,B is a non positive lattice this Markov complexity is finite. For example, the Markov complexity of (A, B) of Example 3.7 is equal to 2. The second definition was given in [8] where the Markov complexity of (A, B) is the largest type of any element in the universal Markov basis of Λ(A, B, r) as r varies. It is clear form Theorem 3.5 that this Markov complexity is infinite if LA,B is a non positive lattice. We point out that when LA,B is a positive lattice which is the main case of interest in Algebraic Statistics, by Theorem 3.3, all minimal Markov bases of Λ(A, B, r) have the same complexity for r ≥ 2 and thus the definition of [8] agrees computationally with the definition of [10]. Acknowledgment. This paper was partially written during the visit of the first and third author at the University of Ioannina. The third author was supported by a Romanian grant awarded by UEFISCDI, project number 83/2010, PNII-RU code TE 46/2010, program Human Resources, “Algebraic modeling of some combinatorial objects and computational applications”. 10 Charalambous, Thoma and Vladoiu References [1] 4ti2 team, 4ti2 - a software package for algebraic, geometric and combinatorial problems on linear spaces, available at www.4ti2.de, 2007. [2] H. Charalambous, A. Katsabekis, A. Thoma, Minimal systems of binomial generators and the indispensable complex of a toric ideal, Proc. Amer. Math. Soc. 135, 3443–3451 (2007). [3] H. Charalambous, A. Thoma, M. Vladoiu, Markov bases of lattice ideals, arXiv:1303.2303v2. [4] P. Diaconis, B. Sturmfels, Algebraic algorithms for sampling from conditional distributions, Ann. Statist. 26, 363–397 (1998). [5] M. Drton, B. Sturmfels, S. Sullivant, Lectures on algebraic statistics, Oberwolfach Seminars, 39. Birkhäuser Verlag, Basel, viii+171 pp (2009). [6] J. E. Graver, On the foundations of linear and integer linear programming I, Math. Program. 9, 207–226 (1975). [7] R. Hemmecke, K. Nairn, On the Gröbner complexity of matrices, J. Pure Appl. Alg. 213, 1558–1563 (2009). [8] S. Hoşten, S. Sullivant, A finiteness theorem for Markov bases of hierarchical models, J. Combin. Theory Ser. A 114, 311–321 (2007). [9] H. Ohsugi, T. Hibi, Indispensable binomials of finite graphs, J. Algebra Appl. 4, 421–434 (2005). [10] F. Santos, B. Sturmfels, Higher Lawrence configurations, J. Combin. Theory Ser. A 103, 151–164 (2003). [11] B. Sturmfels, Gröbner Bases and Convex Polytopes, University Lecture Series, No 8, AMS, R.I. (1995). [12] R. Villarreal, Rees algebras of edge ideals, Comm. Algebra 23, 3513–3524 (1995). Hara Charalambous Department of Mathematics Aristotle University of Thessaloniki Thessaloniki 54124 Greece e-mail: [email protected] Apostolos Thoma Department of Mathematics University of Ioannina Ioannina 45110 Greece e-mail: [email protected] Marius Vladoiu Faculty of Mathematics and Computer Science University of Bucharest Str. Academiei 14 Bucharest, RO-010014 Romania e-mail: [email protected]
0math.AC
Protofold II: Enhanced Model and Implementation for Kinetostatic Protein Folding∗ Pouya Tavousi1 , Morad Behandish2 , Horea T. Ilieş1,2 , and Kazem Kazerounian1 1 Kinematics Design Laboratory and 2 Computational Design Laboratory, Department of Mechanical Engineering, University of Connecticut, USA arXiv:1712.05012v1 [cs.CE] 14 Nov 2017 Technical Report No. CDL-TR-16-03, March 22, 2016 form of enzymes, antibodies, motor proteins, transport proteins, etc. [3]. The function of a protein strongly depends on its 3D structure (i.e., ‘conformation’) which in turn can be directly determined from the linear sequence of amino acids (AAs) linked together to form the protein chain (i.e., ‘configuration’) [4].1 Therefore, the computer-aided prediction of the folded structure of a protein from the knowledge of its sequence (referred to as ‘protein folding’) is the key to understanding many biological processes in the cell. This knowledge is crucial toward the ultimate goal of modeling proper function or malfunction at molecular and cellular level (e.g., deadly diseases such as cancer, Alzheimer’s, Parkinson’s, etc.) and is central to a variety of bioengineering applications including ‘protein engineering’ [5, 6]. A reliable prediction of 3D protein structures from sequence data remains a big challenge due to both theoretical and computational difficulties. We have previously shown that our kinetostatic compliance method (KCM) implemented into the Protofold package can overcome some of the key difficulties faced by other de novo structure prediction methods, such as the very small time steps required by the molecular dynamics (MD) approaches or the very large number of samples needed by the Monte Carlo (MC) sampling techniques. In this article, we improve the free energy formulation used in Protofold by including the typically underrated entropic effects, imparted due to differences in hydrophobicity of the chemical groups, which dominate the folding of most water-soluble proteins. In addition to the model enhancement, we revisit the numerical implementation by redesigning the algorithms and introducing efficient data structures that reduce the expected complexity from quadratic to linear. Moreover, we develop and optimize parallel implementations of the algorithms on both central and graphics processing units (CPU/GPU) achieving speed-ups up to two orders of magnitude on the GPU. Our simulations are consistent with the general behavior observed in the folding process in aqueous solvent, confirming the effectiveness of model improvements. We report on the folding process at multiple levels; namely, the formation of secondary structural elements and tertiary interactions between secondary elements or across larger domains. We also observe significant enhancements in running times that make the folding simulation tractable for large molecules. 1 1.1 Related Work There are several different computational approaches for protein folding prediction, ranging from knowledge-based techniques to methods starting from physical principles [7]. Knowledge-Based Methods. The knowledge-based approaches predict the structure of a given protein using the information extracted from previously determined structures and known types of folds. They are generally more reliable than physics-based methods, but have limited applicability in predicting new types of folds. Examples of knowledge-based techniques are homology or comparative modeling [8–10] and fold recognition or threading [11–13]. We refer the reader to [7] for a comprehensive review of such methods. Introduction Physics-Based Methods. On the other hand, methods that utilize models formulated empirically or obtained from physical principles are less reliable and more time-consuming, ∗ This article was submitted on 09/08/2015 and published on but apply to a wider range of folding simulations [7]. These 03/22/2016 in the ASME JNEM. For citation, please use: methods range from de novo [14, 15] to ab initio [16, 17] prediction techniques. Here we briefly review some of the comTavousi, Pouya and Behandish, Morad and Ilieş, Horea T. and Kazerounian, Kazem, 2016. “Protofold II: Enhanced Model and mon ab initio approaches, namely sampling methods and MD Implementation for Kinetostatic Protein Folding.” Journal of Nan- simulations [7]. Proteins are large biomolecules that are responsible for a vast array of biological functions inside the cell, and appear in the otechnology in Engineering and Medicine, 6(3), p.034601. 1 In the robotics literature, the term configuration is typically used to describe the complete set of kinematic variables. However, the term conformation is typically used for that purpose in molecular biology. This article is based on two shorter conference papers presented at the ASME IDETC/CIE’2013 [1, 2]. 1 Sampling methods generate numerous samples in the conformation space, followed by an evaluation of their free energies. Different search algorithms are used to find the unchallenged global minimum of the free energy, assumed to be associated with the native structure according to the ‘thermodynamic hypothesis’ [4]. These search methods include simulated annealing [18, 19], basin hopping [20–23], evolutionary algorithms [24–26] and MC simulation with biased moves [27–29]. A review of conformation sampling methods for protein folding can be found in [30]. Sampling methods have two major limitations, namely 1) they do not provide any information about the biological pathway; and 2) finding the global minimum is not guaranteed because of the finite number of samples. On the other hand, MD approaches simulate the biological pathway using a model built upon physical principles. Standard MD techniques include Newtonian dynamics [31–34], Langevin dynamics [35–38] and Brownian dynamics [39–42]. A review of MD simulation methods for protein folding is provided in [43]. In order to keep the numerical algorithms stable, very small time steps (in the order of femtoseconds) along the simulation trajectory are required, which does not support folding simulation of typical proteins that span milliseconds except for small molecules [43]. protein—e.g., Coulombic and van der Waals forces exchanged between atoms of the protein itself, ignoring the interactions with solvent molecules. However, an important class of biologically significant proteins are water-soluble, whose folding process is predominantly driven by the interactions with the solvent, particularly the so-called ‘hydrophobic effect’2 which was missing from Protofold I [48]. Computing Solvation Effects. From a computational perspective, the solvation effects can be modeled in a number of different ways, broadly classified into ‘explicit’ and ‘implicit’ techniques. The explicit methods use all-atom force field models such as SPC, SPC/E, TIP3P, TIP5P [55, 56], or coarse-grained (CG) models [57,58] which are less structured representations of the solvent obtained by mapping two or more particles onto a single interaction site [55]. A prohibitive computational cost is associated with the large number of solvent molecules required to model a bulk solution. Alternatively, approximate schemes that include the solvent effects implicitly can provide useful quantitative estimates, yet remain computationally inexpensive [59]. The implicit models estimate the contribution of each solventexposed atom to the solvation free energy using empirical formulae, most commonly expressed as a linear function of the solvent accessible surface area (SASA) [60]. An exact computation of SASA requires obtaining the surface area of the envelope of overlapping spheres [61], which is computationally expensive. Alternatively, approximate formulations have been developed to efficiently predict the expected (i.e., probabilistic average) SASA based on simplifying assumptions on the distribution of the coordinates of atoms (or groups of atoms) in the 3D space. For instance, CHARMM [62] uses the probabilistic approach from [63], which estimates the SASA as a function of the distances between pairs of atoms or residues. A similar model with similar parametrization [64] was used in GROMOS [65], a recent improvement of which was given in [66]. AMBER [67, 68] uses a fast linear combination of pairwise overlaps (LCPO) algorithm [69], which improves the method in [63] by adding more terms to the approximation. Although being widely popular in well-known MD packages, these methods rely on simplifying assumptions that compromise accuracy. For example, the method in [63] assumes a uniform random spatial distribution of atoms or residues, which introduces bias into the simulation results. The inclusion of the solvation free energy computed using an adequately accurate evaluation of the SASA [1, 2] results in a more realistic energy- and force-model for simulating the natural behavior of water-soluble proteins. Kinetostatic Compliance Method. The KCM was introduced in [44, 45] to overcome some of the key challenges in the aforementioned approaches. In this method, implemented in the software package Protofold [46–48], the protein chain is modeled as a kinematic linkage which complies under the kinetostatic effect of the force-field obtained form intramolecular interactions between the atoms. The key contributions of KCM were 1. modeling the constrained kinematics of the protein chain with significantly fewer degrees of freedom (DOF) than, for example, those of the ‘beads and springs’ model used in many MD methods; and 2. converging faster to the minimum energy state by using kinetostatic (i.e., 1st-order) variations rather than dynamic (i.e., 2nd-order) response. In KCM, each rotatable joint, used to model the constrained motion of the chemical bonds, changes by an amount proportional to the effective torque on that joint. It was shown that KCM is a faster and more stable alternative to the traditional dynamic simulation techniques [48]. The Protofold platform has since provided a kinematic testbed for subsequent research activities. Examples are predicting hydrogen bond connectivity sub-graphs [49], its application to the design of stable peptide nano-particles [50], the analysis of protein mobility (using the ‘pebble game’ algorithm) [51], the development of mechanical models for secondary structural elements [52], and nano-machanism synthesis from a ‘link soup’ of pre-specified structural elements [53, 54]. In the earlier stages of the development, the energetics were limited to intramolecular interactions in the gas-phase of the 2 The hydrophobic effect is explained as the strong tendency of nonpolar sidechains to pack together to form a hydrophobic core protected from the solvent by a hydrophilic surface [3]. This effect is formulated in terms of entropic changes in the solvent molecules surrounding the protein surface. 2 1.2 Outline & Contributions the modern graphics hardware—onto which our data-parallel SASA enumeration algorithm maps perfectly—we present a In Section 2, we introduce an improved free energy model GPU-parallel implementation and its optimization. The immaking use of the linear implicit model given in [60] to complementation takes advantage of the device memory hierarchy pute the solvation free energy- and force-field from a knowland hiding memory access latencies, in turn leading to larger edge of the SASA and its gradient for individual atoms at a speed-ups (up to two orders of magnitude). given 3D conformation. We develop a simple offset surface enumeration technique that can approximate the SASA and its gradient up to any desired accuracy. Our method is sig2 Formulation nificantly more accurate than the probabilistic methods such as those given in [63, 69] yet noteably faster than the exact Section 2.1 starts with an overview of the underlying kinemethod given in [61], while the trade-off between speed and matic principles of the KCM simulation first introduced in accuracy can be adjusted by a proper choice of the enumer- [44–48]. The protein chain is modeled as an open kinematic ation (i.e., surface sampling) density. linkage with reduced DOF in terms of dihedral and rotamer A second major contribution of this work is to develop angles, which complies under the effect of interatomic and solsignificantly more efficient algorithms and data structures in vation forces. Next, the energy- and force-field formulation Section 3 to speed up the computations, and to implement used in Protofold II is described in Section 2.2, with special them into Protofold II: emphasis on the newly introduced solvation effects. Lastly, 1. We use a 3D hash table data structure based on a uni- the KCM optimization process is presented in Section 2.3. form spatial grid that supports fast queries to identify pairs of proximal atoms. This helps speeding up the 2.1 Kinematic Model computations by eliminating negligibly small interactions associated with pairs of atoms that are farther than Proteins are long polymeric chains made of AAs, which exist in only 20 different types (except for few rare exceptions), a so-called ‘cut-off distance’. joined together as a linear polypeptide chain [3], structural 2. We use a tree-based data structure to span the protein details of which are summarized in Appendix A. Here we rechain efficiently for the purpose of characterizing inter- strict ourselves to the kinematic representation of the chain’s action types between pairs of atoms based on their dis- conformation within the scope of KCM. tances along the topological structure of the chain. Linkage Parameterization. Figure 1 schematically illustrates the repetitive sequence of −N−Cα −C− atoms,4 called the ‘backbone’ or the ‘main chain’, with ‘side chains’ resembling branches that extend out of it. As explained in Appendix A, the backbone conformation can be specified to an adequate accuracy by two sets of dihedral angles; namely, 3. We develop sequential and parallel surface enumeration algorithms to compute the SASA and its gradient for individual atoms needed for the solvation energy and force computations, respectively, up to desired accuracy. 4. We employ prefix sums [70] to compute the joint torques on the kinematic linkage of the protein chain, given the resultant forces on the individual atoms. • −180◦ ≤ φi < +180◦ (around N−Cα in AAi ); and • −180◦ ≤ ψi < +180◦ (around Cα −C in AAi ); As a result, the numerical complexity for each KCM cycle, including the computation of resultant forces on the atoms and the links (except those resulting from solvation effects) and their conversion to joint torques, is reduced from O(n2 ) in Protofold I [48] to O(n) in Protofold II, where n is the number of atoms in the protein molecule.3 The SASA evaluations for solvation force computations in our model turns out to be the bottleneck to the entire simulation—up to several orders of magnitude slower than the electrostatic and van der Waals force computations. Fortunately, the surface enumeration algorithm lends itself well to high-throughput data parallelism. In Section 4 we first present the CPU-parallel implementation using OpenMP, leading to moderate speed-up factors (up to one order of magnitude). To leverage the massive processing power offered by the single-instruction multiple-thread (SIMT) architecture of for 1 ≤ i ≤ m, where m is the number of AA residues along the chain. The conformation of each side chain, on the other hand, can be specified by up to 4 extra angles −180◦ ≤ χi,k < +180◦ for 1 ≤ k ≤ li where 0 ≤ li ≤ 4 is the number of side chain links of AAi , and the subscript k corresponds to the bonds numbered in the obvious order along the side chain C and N atoms. To set a reference for the angle measurements, the zeroreference position description (ZRPD) method [71] is used. The zero-position (ZP) for the protein chain is defined as the conformation of the serial linkage in which all peptide planes are coplanar (i.e., φ0i = ψi0 = −180◦ ) and side chain dihedrals are set to default low energy values identified as ‘rotamers’ [45]. 3 This is only the case under certain assumptions given in the Section 3.2, which are relatively reasonable for practical cases. 4 Hereon, the notations C α and C correspond to the alpha-carbon and carboxyl-carbon, respectively. 3 Figure 1: The polypeptide chain is modeled as a kinematic linkage, in which the peptide planes are assumed to be rigid. • b2i,0 (1 ≤ i ≤ m) is the base vector that connects the Cα of AAi to the N of AAi+1 ; and To unify the notations, all angular variables are denoted by θj,k (1 ≤ j ≤ 2m, 0 ≤ k ≤ 4) where θ2i−1,0 = φi + 180◦ , 1 ≤ i ≤ m, (1) = ψi + 180◦ , 1 ≤ i ≤ m, (2) θ2i,0 • b2i−1,k (1 ≤ i ≤ m, 1 ≤ k ≤ 4) are the base vectors along the successive side chain C and N atoms. The first two sets of vectors listed above are called the ‘main chain body vectors’. Every vector in the peptide plane that ◦ ◦ where 0 ≤ θj,k < 360 . The shifts in (1) and (2) by the in- describes the relative positions of any two atoms can be tercept values of φ0i = ψi0 = −180◦ and in (3) by the favorable obtained as a linear combination of these base vectors as rotamer angles χ0i,k ensure θj,k = 0◦ at the ZP conformation. C1 b2i,0 + C2 b2i+1,0 . The coefficients C1 and C2 , referred A similar indexing scheme is used to identify the unit vec- to as ‘peptide plane constants’, are invariant with respect to tors along the rotation axes of revolute joints associated with the rotations in the chain, thus can be precomputed prior to the KCM simulation. Different pairs of coefficients are used these angles denoted by uj,k (1 ≤ j ≤ 2m, 0 ≤ k ≤ 4), i.e., for vectors describing the relative positions of different pairs • u2i−1,0 (1 ≤ i ≤ m) is the unit vector along the bond of atoms. Based on experimental evidence, it is a reasonable assumption that these coefficients are the same across between N of AAi and Cα of AAi ; all AAs [72], and the average values are given in Table 1.5 • u2i,0 (1 ≤ i ≤ m) is the unit vector along the bond In addition to the main chain body vectors, the ‘side chain between Cα of AAi to the C of AAi ; and body vectors’ (the third group listed above) are defined for the relative positions of the C and N atoms along the side • u2i−1,k (1 ≤ i ≤ m, 1 ≤ k ≤ 4) are the unit vectors along chains. We refer the reader to [72] for more details about the the successive side chain C and N atoms. molecular model of the peptide unit. For a protein chain with m AA residues, the number of Thus the kinematics of the linkage—which abstracts the prolinks can be obtained as tein conformation—can be completely specified in terms of ! m X the rigid body rotation transformations obtained from these l = 2m + li ≤ 6m = O(m), (4) rotation angles and rotation axes. θ2i−1,k = χi,k − χ0i,k , 1 ≤ i ≤ m, 1 ≤ k ≤ li ≤ 4, (3) i=1 The spatial orientation of the rigid peptide planes can be described conveniently with a pair of base vectors whose lin- noting that li ≤ 4. The term 2m counts two rigid links per ear combination spans the peptide plane. The so-called ‘body each AA’s backbone—one for −CO−NH− and one for −Cα − vectors’ are denoted by bj,k (1 ≤ j ≤ 2m, 0 ≤ k ≤ 4), i.e., 5 Nevertheless, in Protofold II the user has the option to choose whether to use the values provided in Table 1 for all AAs, or to maintain • b2i−1,0 (1 ≤ i ≤ m) is the base vector that connects the the refined values when available—e.g., when the protein is imported from the protein data-bank (PDB). N of AAi to the Cα of AAi ; 4 Table 1: Peptide plane constants for bond vectors [72]. BV −−→ Cα C −→ CN C1 −0.2761 +1.2761 C2 +1.4488 −1.4488 BV −→ CO −→ NH C1 −1.3324 +1.4103 where [Rr,s ] is the 3 × 3 matrix representation of the joint rotation transformation Rr,s ∈ SO(3) around the ZP unit vector u0r,s with an angle θr,s (1 ≤ r ≤ i, 0 ≤ s ≤ k) [45], using the right-hand rule to choose the direction. Once the body vectors are obtained using (6) for a given conformation, the moved atom center positions can be computed for the individual atoms. Assuming that the N atom at the amino-terminus is fixed at the origin, the coordinates of the main chain N and Cα atoms are obtained as C2 +2.3401 −2.5111 Table 2: Kinematic variables of the polypeptide linkage. Symbol θ2i−1,0 u2i−1,0 b2i−1,0 θ2i,0 u2i,0 b2i,0 θ2i−1,k u2i−1,k b2i−1,k † Description Torsion angle φi around main chain N−Cα in AAi Unit vector along main chain N−Cα in AAi Body vector from N to Cα in AAi Torsion angle ψi around main chain Cα −C in AAi Unit vector along main chain Cα −C in AAi Body vector from Cα in AAi to N in AAi+1 † Torsion angle χi,k of side chain C/Ns in AAi Unit vector along side chain C/Ns in AAi Body vector connecting side chain Cs in AAi [rj,0 ] = j X [br,0 ], 1 ≤ j ≤ 2m − 1, (9) r=1 where the index j = 2i − 1 corresponds to the Cα atom of residue AAi while the index j = 2i corresponds to the N atom of the residue AAi+1 for 1 ≤ i ≤ m. The coordinates for the other atoms in the peptide group, namely H, C and O, are obtained from those for Cα and N, and a linear combination C1 b2i,0 + C2 b2i+1,0 of main chain body vectors using the coefficients C1 and C2 given in Table 1. For the side chain C and N atoms, the coordinates are similarly obtained as The exception is b2m,0 which connects Cα to the carboxyl H in AA2m . in the peptide unit—in order to have each rigid link connected k 2i−1 X X to the next with a single revolute joint along either N−Cα or [b2i−1,s ], 1 ≤ i ≤ m, 1 ≤ k ≤ 4, [b ] + [r ] = r,0 2i−1,k Cα −C, as depicted in Fig. 1. The second term accounts for s=1 r=1 the number of additional side chain links. As a result, the (10) total DOF of the kinematic linkage is equal to the number of where k = 1, 2, 3, and 4 corresponds to the successive side links. Table 2 gives a complete description of dihedral angles, chain C and N atoms in the residue AAi . The coordinates unit vectors, and body vectors for the entire protein chain. for all other side chain atoms are obtained similarly from vectors along the side chain bonds subjected to the same set Kinematic Equations. The instantaneous conformation of motions [44]. of the protein chain is related to the ZP conformation with The atom position vectors obtained from (9) and (10) at a set of rigid body transformations. Given a particular con- each iteration are used in Section 2.2 to compute the energies, formation in terms of θj,k (1 ≤ j ≤ 2m, 0 ≤ k ≤ 4), the unit forces, and torques that will determine the motion for the vectors and body vectors are transformed as follows: subsequent iteration. [uj,k ] = [Mj,k ][u0j,k ], 1 ≤ j ≤ 2m, 0 ≤ k ≤ 4, (5) [bj,k ] = [Mj,k ][b0j,k ], 1 ≤ j ≤ 2m, 0 ≤ k ≤ 4, 2.2 (6) Force Model The interatomic effects can be classified into covalent and noncovalent interactions. The covalent interactions need not be considered explicitly in the force-field, since they are implicitly introduced in terms of the kinematic constraints innate to the kinematic chain model adopted in Section 2.1. The noncovalent forces, which are responsible for conformational changes in the protein chain, can be derived from the free energy formulation that follows. For a protein chain made of n atoms, we assign each atom with a unique index 1 ≤ i ≤ n, and its center coordinates ri ∈ R3 obtained from dihedral angles using kinematic equar=1 tions (9) and (10).6 Each atom is identified by a unique while the transformation matrix for the side chain vectors tuple ai = (i, ri , Ri , qi , i , γi , · · · ) (1 ≤ i ≤ n), containing its (k ≥ 1) is defined as a product of rotations around joints in index, position, radius, charge, well depth parameter, solvathe main chain, and those around the side chain: tion parameter, and other atomic constants, to be introduced shortly. The set of all the atoms in the molecule is denoted 2i−1 k Y Y 6 Note the slight change of notations from Section 2.1, where the [M2i−1,k ] = [Rr,0 ] [R2i−1,s ], 1 ≤ i ≤ m, 1 ≤ k ≤ 4, where the superscript 0 indicates the reference ZP conformation. [Mj,k ] is the 3 × 3 matrix representation of the rigid body transformation Mj,k ∈ SO(3) that maps the ZP unit and body vectors u0j,k and b0j,k to their transformed orientations uj,k and bj,k , respectively. These vectors are expressed using 3 × 1 column matrices. The transformation matrix for the main chain vectors (k = 0) can be calculated as a product of successive rotations around individual joints in the main chain: j Y [Mj,0 ] = [Rr,0 ], 1 ≤ j ≤ 2m, (7) r=1 subscript j = 2i − 1 or 2i referred to the AA index 1 ≤ i ≤ m, while in s=1 (8) Section 2.2 the single subscript 1 ≤ i ≤ n refers to the atom index. 5 by A = {a1 , a2 , · · · , an }. The aggregated free energy of all electrostatic interactions between atoms that are farther than the atoms in A can be decomposed into the following terms: a so-called cut-off distance delec cut := 9.0 Å are usually deemed 7 negligible in the literature [3]. Therefore (13) is approxiGtot (A) = Gelec (A) + Gvdw (A) + Gcav (A), (11) mated as follows to reduce the number of pairwise computawhere Gelec (A) is the electrostatic energy, including in- tions between all the atoms: X 1 qi qj tramolecular charge interactions, hydrogen bonding effects, ei,j , (14) Felec (Aelec )≈ i i 4πεi,j d2i,j and the induced polarization in the solvent when the molecule elec a ∈A j i is dissolved. Gvdw (A) is the sum of intramolecular van der elec Waals energies, also called ‘steric effects’, resulted from in- where Ai = {aj ∈ A − {ai } | di,j ≤ delec cut } is referred to as duced dipoles in the molecule. The sum of the first two terms the neighborhood of atom ai associated with the electrostatic has been accounted for in Protofold I [46–48] using the AM- force-field, and consists of all the atoms whose distance to ai BER force-field model [67]. Gcav (A) is the nonpolar solva- are bounded by the cut-off distance delec cut . tion free energy, the free energy change resulting from transfering a molecule from vacuum to solvent, i.e., the entropic Van der Waals Interactions. The van der Waals interacchange due to the formation of the cavity occupied by the tions are formulated using the empirical Lennard-Jones 6-12 instantaneous 3D shape of the protein [73]. Experimental potential function formula [67]: "  12 6 # results have shown that many water-soluble protein folding X X D D i,j i,j vdw reactions are predominantly driven by a favorable reduction −2 , G (A) = i,j di,j di,j in ∆Gcav (A) [3], hence we incorporated this term into the ai ∈A aj ∈A−{ai } improved energy formulation for Protofold II. (15) where di,j = kri − rj k2 is the interatomic center distance, Electrostatic Interactions. The charge interactions are Di,j = Ri + Rj is the ‘van der Waals distance’ in which formulated using the modified form of Coulomb’s law [67]: Ri , Rj are the van der Waals radii of the atoms ai , aj ∈ A, √ respectively. i,j = i j is the ‘depth of potential well’ for X X 1 qi qj elec , (12) the particular pair of atoms. It is worthwhile noting that G (A) = 4πεi,j di,j the van der Waals effects have the same origin as the electroai ∈A aj ∈A−{ai } static forces, and reflect the induced dipoles due to transient where di,j = kri − rj k2 is the interatomic center distance, fluctuations in electron clouds of the interacting atoms [3]. qi and qj are the electrostatic charges, and ri and rj are The resultant van der Waals force Fvdw = −∇ GvdW on the ri i the position vectors of the pair of atoms ai , aj ∈ A, respec- atom a by other atoms is then obtained as i tively. εi,j = κi,j ε0 is the ‘dielectric constant’ and is gen! 12 6 X Di,j Di,j erally larger than vacuum permittivity ε0 ≈ 8.854 × 10−12 vdw Fi (A) = 12i,j ei,j , (16) − 7 Farads (i.e., κi,j > 1). Thus (12) can be used to calculate d13 di,j i,j aj ∈A−{ai } the interactions between charges in the solvent, if a continuum dielectric model is used [3]. The dielectric constant where ei,j = (ri − rj )/di,j is the unit vector along the line reflects the ability of the environment to attenuate electro- of centers of the pair of atoms ai , aj ∈ A. The van der static interactions, e.g., κi,j ∼ 80 for aqueous solvent and Waals forces have a much smaller effect radius and are signifκi,j ∼ 2–4 for the interior of the protein [3], where the larger icant only when the atoms approach each other very closely. value for the former is due to the induced polarization of The repulsive component becomes very large when the two water molecules. It is worthwhile noting that because of atoms penetrate into each other, an effect widely known as the nonuniformity of the dielectric medium, the most accu- the ‘steric clash’. The attractive component known as the rate computation of the electrostatic energy requires solving ‘London dispersion’ force, on the other hand, is dominant Poisson-Boltzman (PB) differential equations [74]. However, when the atoms are farther than the van der Waals distance solving PB for every cycle of the KCM simulation is com- Di,j [3]. These interactions decay much faster than Coulomputationally expensive, and approximate alternatives such as bic forces, hence a smaller cut-off distance of dvdw cut := 5.0 Å generalized Born (GB) model can be used [75, 76]. A simple is sufficient [3] resulting in the following approximation: ! distance-dependent dielectric constant is used here (following 12 6 X Di,j Di,j vdw vdw the convention in [48]) to mimic the polarization effect, with Fi (Ai ) ≈ 12i,j − 7 ei,j , (17) d13 di,j i,j closer interactions weighted more heavily [67]. The resultant aj ∈Avdw i Coulombic force Felec = −∇ri Gelec applied on the atom ai i vdw where Ai = {aj ∈ A − {ai } | di,j ≤ dvdw cut } is referred to as by other atoms is then obtained as the neighborhood of the atom ai associated with the van der X 1 qi qj whose distance ei,j , (13) Waals force-field, and consists of all the atoms Felec (A) = i vdw 4πεi,j d2i,j to a are bounded by the cut-off distance d . i cut a ∈A−{a } j i 7 Our experiments with larger molecules show that 9.0 Å is not al- where ei,j = (ri − rj )/di,j is the unit vector along the line of ways a proper cut-off distance and larger values need to be used, as centers of the pair of atoms ai , aj ∈ A. Since Felec ∝ 1/d2i,j , demonstrated in Section 5.3. i 6 Table 3: Atomic solvation parameters adopted from [78] for different adjustments by [79, 80]. Units are in −2 kcal mol−1 Å . Atom type C O/N S O− N+ Adjustment in [79] +0.004 ± 0.003 −0.113 ± 0.014 −0.017 ± 0.022 −0.166 ± 0.038 −0.169 ± 0.031 Adjustment in [80] +0.012 ± 0.003 −0.116 ± 0.013 −0.018 ± 0.021 −0.175 ± 0.036 −0.186 ± 0.022 tain the atomic SASA at a given snapshot, a probe radius of RH2 O = 1.2 − 1.4 Å is used to offset the van der Waals surfaces of the individual atoms as illustrated in Fig. 2. These offset spheres are overlapped to obtain the contributions of different atoms to the total SASA. The atomic solvation parameter γj is an estimate of the free energy per unit area required to transfer the atom from vacuum to water, and depends on the atom type [78]. Table 3 shows the values of this parameter for different atom types (namely, C, uncharged O or N, S, O− , and N+ ) obtained in [78] based on the experimental results in [82] adjusted by [79, 80]. The hydrophobic interaction forces Fcav = −∇ri Gcav on the atom ai by other i atoms is then obtained as X Fcav γj ∇ri Aexp (21) i (A) = − j , Figure 2: The solvent-accessible and -excluded surfaces. Interaction Classification. The interactions discussed so far are between the pairs of atoms that are not covalently bonded, thus (14) and (17) have to be modified to eliminate the terms corresponding to the pairs of bonded atoms (i.e., ‘1-2 interactions’). Furthermore, it is a common convention in molecular mechanics to modify the electrostatic and van der Waals interactions between the pairs of atoms bonded to a common atom, i.e., atoms that are 2 bonds apart along the chain (i.e., ‘1-3 interactions’), as well as the atoms that are 3 bonds apart along the chain (i.e., ‘1-4 interactions’) [77]. Consequently, the empirical forms of (14) and (17) are modified as elec X wi,j qi qj elec Felec (A ) ≈ ei,j , (18) i i 4πε d2i,j i,j elec aj ∈Ai ! 6 12 X D D i,j i,j vdw Fvdw (Avdw )≈ − 7 ei,j , (19) 12wi,j i,j i i d13 di,j i,j vdW aj ∈A where ∇ri Aexp is the gradient of the exposed area of the atom j aj due to an infinitesimal displacement of ai . It is important to note that, unlike the force formulae presented earlier for the electrostatic and van der Waals effects in (13) and (16), the summation in (21) for the solvation free energy gradient iterates over all aj ∈ A including ai itself. aj ∈Ai Considering the case when i = j, one realizes that displacing the atom ai in any direction has the same effect on the elec vdw where wi,j and wi,j are the weight factors for the electrogeometry of the protein surface as displacing all the other static and van der Waals forces, respectively, for the pair atoms in the opposite direction. Therefore of atoms ai , aj ∈ A depending on their interaction type. X The weights are set to wi,j = 0 for 1-2 interactions, and ∇ri Aexp =− ∇rj Aexp (22) i i . 0 ≤ wi,j ≤ 1 for 1-3 and 1-4 interactions, whose values vary aj ∈A−{ai } across different force models [62, 65, 67, 68]. wi,j = 1 for all other situations. In other words, the atoms that have at least Substituting for this term in (21) leads to the following sym4 bonds in between them along the graph of covalent bonds metric form, whose range of summation excludes ai itself, are far enough to be considered unaffected by the covalent similar to (13) and (16): electron clouds, as originally formulated in (14) and (17). X exp Fcav − γj ∇ri Aexp i (A) = −γi ∇ri Ai j Nonpolar Solvation Effects. The hydrophobic free enaj ∈A−{ai } X  ergy of solvation, which reflects the entropy changes in the = γi ∇rj Aexp − γj ∇ri Aexp . (23) i j solvent molecules due to cavity creation, is formulated using aj ∈A−{ai } the linear empirical formulation in [78]: X We show in Section 4 that (23) is computationally preferable Gcav (A) = γj Aexp (20) j , over (21). To further simplify (23), note that for a pair of aj ∈A atoms ai and aj the infinitesimal displacement of one does not where γj is the atomic solvation parameter and Aexp is the affect the overlapped solvent exposed area of the other if their j Lee and Richards SASA for the atom aj ∈ A [81]. To ob- offset spheres (i.e., the spheres with radii Rioff = Ri + RH2 O 7 and Rjoff = Rj + RH2 O , respectively) do not intersect, i.e., ∇ri Aexp = ∇rj Aexp = 0 if di,j > Ri +Rj +2RH2 O . Therefore, j i the number of terms that contribute a nonzero value to the summation of (23) is significantly reduced: X  cav − γj ∇rj Aexp , (24) γi ∇ri Aexp Fcav i (Ai ) = i j aj ∈Acav i where Acav = {aj ∈ A − {ai } | di,j ≤ Ri + Rj + 2RH2 O } i is referred to as the neighborhood of the atom ai associated with the nonpolar solvent effects. For practical reasons that will be explained in Section 3.2, we use a larger neighborhood = {aj ∈ A − {ai } | di,j ≤ dcav redefined as Acav cut } using the i more conservative (but constant across all pairs of atoms) cut-off distance of dcav cut := 2(Rmax + RH2 O ), where Rmax = maxai ∈A {Ri }. A value of dcav cut := 8.0 Å is typically safe. Note that unlike the case with (13) and (16), eliminating pairwise interactions with di,j > 8.0 Å from (24) does not impart an approximation error. Figure 3: The forces on each link are converted into an equivalent set of joint torques on the preceding joints in the chain. denoted as ηk,h (1 ≤ k ≤ h, 1 ≤ h ≤ l), can be computed using the conventional manipulator Jacobian matrix [J] [48]:  link  Th T [ηh ] = [J] , (27) Flink h where [ηh ] = [η1,h , η2,h , · · · , ηh,h ]T represents an h × 1 array of joint torques that the end-effector force and torque will We use the KCM (presented in [44–48] for protein folding) to induce on the different joints preceding the end-effector along T explicitly integrate the conformational changes of the linkage the serial chain. [J] is the transpose of the 6 × h Jacobian model under the kinetostatic effect of the force-field com- matrix [J] = [J1 , J2 , · · · , Jh ] for a given configuration of the chain [48]. The k th column of the Jacobian associated with puted in Section 2.2. the k th revolute joint is given by   Link Forces and Torques. For a protein chain with a uk [J ] = , (28) k total of l = O(m) links, where m is the number of AA uk × (ph − pk ) th residues, the resultant force and torque applied to the j where uk is the unit vector along the k th joint and (ph − pk ) link (1 ≤ j ≤ l) are computed as is a vector connecting a point pk along the k th joint’s axis X  link elec vdw cav Fj = Fi + Fi + Fi , (25) to the point ph where the end-effector force Fh applies—i.e., the atom positions obtained from (9) and (10). This process ai ∈Lj X  is repeated for all links to calculate the contribution of each Tlink = ri × Felec + Fvdw + Fcav , (26) j i i i link on the joints preceding that link in the serial chain. The ai ∈Lj total torque for each joint is obtained from a summation of where ri is the absolute center position vector of the atom these contributions [48]: 2.3 Kinetostatic Simulation ai ∈ A obtained from (9) and (10) in Section 2.1 (with dif l  X Tlink T h ferent index notation), and Lj ⊂ A is the subset of atoms τk = [Jk ] , (29) Flink that belong to the j th link along the chain. Note that the h h=k origin of the absolute coordinate system (arbitrarily picked the same as the N-terminus anchor of the chain) is selected where the indexing h = k, k + 1, · · · , l of the links is ordered along the main chain from amino-terminus to carboxylas the torque center for all links. terminus, and can branch along the side chains. The range of the summation in (29) implies that each joint torque Equivalent Joint Torques. Since the revolute joints are τ (1 ≤ k ≤ l) depends on the forces Flink and torques Tlink h h assumed to be frictionless, the action of the link forces and k on the succeeding links (k ≤ h ≤ l). torques can be replaced by an equivalent set of torques acting on the joints [48], as shown in Fig. 3. For a given rigid link, one can trace a unique serial chain of h successive links Kinetostatic Simulation. Making use of the assumption (1 ≤ h ≤ l) starting from the N-terminus and ending at the in [48] that the inertia forces at the atomic scale have neglink under consideration, which is equivalent to a path along ligible effects on the dynamics of folding compared to inthe graph of the open linkage. The contribution of the force teratomic forces, the successive kinetostatic fold compliance Flink and the torque Tlink applied to the end-effector link relates the joint torques to the changes in the dihedral angles h h th (i.e., the h link along the serial chain) to the joint torque as follows: τj , (30) ∆θj = κ at the k th joint along the chain preceding the end-effector, |τmax | 8 0 ≤ li ≤ 4 is the number of side chain links of the residue t−1 t−1 t AAi ), the angles are obtained as θj,k = θj,k + ∆θj,k , t−1 where the increment ∆θj,k is computed using (30) from the previous step’s configuration and joint torques. where ∆θj and τj are the angular change and the joint torque of the j th revolute joint (1 ≤ j ≤ l), respectively. |τmax | is the maximum joint torque throughout the entire chain, used to normalize the torques to the interval [0, 1], and the coefficient κ is chosen small enough to avoid large changes in the angles, and to achieve numerical stability. One can notice that the conformational change computed in (30) is analogous to taking a step along the steepest-descent direction of the free energy gradient in the conformation landscape. The computed changes in the joint angles are applied to the kinematic chain, and the entire process is repeated on the updated conformation until a convergence criteria is reached, as described in more detail is Section 4. It is worthwhile noting that once the chain conformation (i.e., optimization variables) is modeled as in Section 2.1 and the energy-field (i.e., objective function) is formulated as in Section 2.2, the search for local or global minima of the free energy in (11) can be undertaken using a variety of classical (e.g., conjugate-gradients) and stochastic (e.g., genetic algorithm) optimization methods. Since the focus of this article is mainly on force-field modeling and computing, we skip a detailed treatment of the search phase. Once the dihedral angles are known, the transformation mat trices [Mj,k ] are obtained from (7) and (8) using sequential matrix multiplication traversing the linkage tree from the anchored amino-terminus to the open carboxyl-terminus. Next, the unit vectors utj,k and the body vectors btj,k are computed from (5) and (6). Since the number of links is clearly less than the number of atoms, these computations take O(n) time. The Cartesian coordinates of the individual atom center positions ri ∈ R3 (1 ≤ i ≤ n) are obtained from the body vectors using (9) and (10), which also takes O(n). Hereon, we assume that both dihedral angles and atom center positions are known for the purpose of computing the next snapshot’s energies, forces, and torques. 3.2 Proximity Queries The brute-force approach for obtaining the proximity information at each snapshot is to check center distances against the cut-off distance for all possible pairs of atoms, which takes O(n2 ) time. Using this method, the approximate truncated 3 Algorithms formulae given in (12), (15), and (20) would take the same This section presents efficient algorithms and data structures asymptotic time as the exact all-pairs formulae given in (13), to speed up the force field computation during kinetostatic (16), and (23), respectively, which is O(n2 ). Geometric hashiterations. To leverage the proximity information between ing provides a simple solution to speed up proximity queries. the atoms, we use a 3D hash table data structure based on a uniform spatial grid in Section 3.2. To classify the inter- 3D Hash Table. We use a 3D hash table data structure atomic interaction types based on chain topology to compute based on a uniform Cartesian grid, which bounds the current the electrostatic and van der Waals effects, we use a tree- 3D structure of the protein and arranges the atom indices into based data structure in Section 3.3 that replaces the adja- groups based on their center positions. Each 3D grid cell is cency matrix used in Protofold I [46–48]. To compute the sol- associated with a so-called ‘bucket’ that stores the indices of vation effects, we develop an approximate (yet adequately ac- the atoms whose centers are located inside the cell in a linkedcurate) surface enumeration technique in 3.4, efficient CPU- list. The grid dimensions are set dynamically to adapt to the and GPU-parallel implementations of which will be detailed shape of the protein’s bounding box at the current snapshot. in Section 4. Finally, we compute joint torques by aggregatThe grid cells are chosen to be cubic, i.e., with equal edge ing contributions of different links (traversed along different length s along all 3 Cartesian axes. Given the min/max c paths in the linkage graph) on the joints along the chain, us- corner coordinates of the bounding box of the atom centers 3 ing the well-known ‘prefix computation’ in Section 3.5 which r , r min max ∈ R —which can be obtained in O(n) by scancan also be implemented efficiently in parallel [70]. We show ning through the n atom center coordinates—we choose s in c that the computational complexity of all steps is decreased such a way that it results in dαne grid cells/buckets, where 2 from O(n ) in Protofold I [46–48] to expected O(n) in Proto- α > 0 is an arbitrary constant. More precisely, we choose 1 fold II for a protein chain with a total of n atoms. s = [v (A)/(αn)] 3 where v (A) is the protein bounding c BB BB box volume. The dimensions of the grid bounding box are then chosen as d(rmax − rmin )/sc esc (slightly larger than the 3.1 Rigid Transformations dimensions of the protein bounding box rmax − rmin ), where At every snapshot t ≥ 0 of the KCM, the protein conformathe operator d·e is applied componentwise along the 3 Cartet tion is described by a set of dihedral angles θj,k defined in (1) sian axes. Before we proceed with presenting the complexity through (3). analysis, we make the following assumptions: • At the first iteration (t = 0), all angles are initialized as Assumption 1 Due to the extremely strong repulsive van 0 θj,k = 0 (ZP conformation). der Waals forces, the atoms that are not covalently bonded • At subsequent iterations (t ≥ 1), for 1 ≤ j ≤ 2m (where cannot penetrate into each other, and those covalently m is the number of AA residues) and 0 ≤ k ≤ li (where bonded intersect over a small volume. Given any arbitrary 9 into the corresponding 3D array of buckets. The 3D index k ∈ Z3 ∩ [0, +∞]3 of the bucket to which a given atom ai ∈ A belongs is determined in O(1) time as k = b(ri − rmin )/sc c, where the operator b·c is applied componentwise along the 3 Cartesian axes. Therefore, scanning through the atoms and constructing the 3D grid data structure is expected to O(n) time and to requires O(n) space. Neighbor Queries. Once the atoms are arranged into the buckets, the algorithm iterates through the grid cells and scans through the linked-lists within the buckets. For each atom ai in a given bucket associated with the grid cell index k, the set of ‘neighbor atoms’ defined as vdw cav dcut ∈ {delec cut , dcut , dcut } (31) can be identified rapidly for a given cut-off distance dcut associated with any of the energetic interactions explained in Section 2.2. As illustrated in Fig. 4, a spherical region √ of radius rc = dcut + 3sc is considered around the (center point of) each grid cell to look for the (center point of) ‘neighbor cells’, defined as the collection of cells which completely lie inside this spherical region. The cut-off√distance dcut is offset by the diagonal size of the cells 3sc which takes into account the worst-case difference of the distance between cell centers and the distance between atom centers. This guarantees that the set of all the atoms inside this collection of covered cells (denoted as A0i ) contains the set of all neighbor atoms, i.e., A0i ⊇ Ai , where Ai is one of the neighbor sets Aelec , Avdw , or Acav i i i . Letting A0 := A0i in Assumption 1, the volume occupied by this set 0 3 0 0 of atoms is v(A0i ) = 4π 3 |Ai |R̄ (Ai ). Noting that Ai is con3 tained inside the spherical region of radius rc , v(A0i ) ≤ 4π 3 rc √ 0 3 3 hence |Ai | ≤ (rc /R̄) = [(dcut + 3sc )/R̄] = O(1), since R̄, sc ∼ 1 Å and dcut ∼ 10 Å. As a result, it is expected to take O(1) time to scan through the atoms inside the collection of neighbor cells, and O(n) total time to traverse all pairs of atoms using the 3D hash table. For parallel implementation purposes, we construct (and dynamically maintain) a ‘neighborhood matrix’ composed of an array of n O(1)−sized linked-lists (one list per atom), where the ith list (1 ≤ i ≤ n) contains the indices of the neighbor atoms P A0i . Constructing Pn this data structure is exn 0 pected to take |A | = i i=1 i=1 O(1) = O(n) time and space, and accessing each atom’s neighbors is expected to take |A0i | = O(1) time. Ai = {aj ∈ A | kri − rj k2 ≤ dcut }, Figure 4: Atom centers are hashed into a 3D grid and the neighbors are selected within a cut-off distance. subset of atoms A0 ⊆ A with Rmin = minai ∈A0 Ri and Rmax = maxai ∈A0 Ri , let the maximum penetration volume between any pair of covalently bonded atoms ai , aj ∈ A0 be 3 upper-bounded by  min{vi , vj } where vi = 4π 3 Ri is the vol1 ume of the atom ai , and 0 ≤  < 4 is a small number. Since each atom makes at most 4 covalent bonds, the unpenetrated volume for the atom ai is lower-bounded by (1−4)vi , hence it is safe to assume that (1 − 4) > 0. Then the volume v(A0 ) occupied by the union of all the atoms in A0 is 4π 0 3 0 3 0 bounded as 4π 3 (1 − 4)|A |Rmin ≤ v(A ) ≤ 3 |A |Rmax . Con0 sequently, there exists an ‘average’ radius R̄(A ) bounded 1 as (1 − 4) 3 Rmin ≤ R̄(A0 ) ≤ Rmax , such that v(A0 ) = 4π 0 3 0 3 |A |R̄ (A ), where typically R̄ ∼ 1 Å. Assumption 2 It is also reasonable to assume that if the protein is either in an extended conformation aligned with one of the Cartesian axes (which is the case near the ZP conformation) or in a globular conformation (which is the case for most water-soluble proteins at their folded conformation), the empty space inside the bounding box is not extremely larger than the space occupied by the protein atoms, i.e., vBB (A)/v(A) = O(1). Supported by experimentation, we assume this to be the case in the intermediate conformations as well, to simplify the analysis. However, there are possible conformations (e.g., extended along a diagonal direction in the axis-aligned bounding box) that would violate this assumption and result in slightly larger running times than predicted here, in spite of the low probability. Letting A0 := A (hence |A0 | = n) in Assumption 1, and noting from the definition that vBB (A) = (αn)s3c , from As3 sumption 2 it follows that 3α 4π (sc /R̄) = O(1). Therefore, if we choose the grid cell size sc ∼ 1 Å then α = O(1) and the number of buckets will be dαne = O(n). Energy and Force Computations. Once the pairs of neighbors are identified, computing their electrostatic and van der Waals forces can be done in O(1) time per pair, using the analytical truncated equations given in (18) and (19), respectively. It is important to note that such interactions are Table Construction. At each snapshot of the simulation, strictly pairwise, i.e., they depend on the relative positions the algorithm scans through all the atoms with updated po- of pairs of atoms ai ∈ A and aj ∈ Aelec or Avdw , and the i i sitions, and the deterministic hash function simply maps the presence of any third atom ak ∈ A (k 6= i, j) does not affect atom center positions ri ∈ R3 that lie inside a grid cell the force exchanged between ai and aj . Therefore, the com10 putation algorithm is straightforward: it iterates over all the atoms for 1 ≤ i ≤ n (sequentially or in parallel) and for each atom, it computes Felec (A0i ) and Fvdw (A0i ), by sequentially i i aggregating the contributions of the hashed neighbor atoms aj ∈ A0i , using (18) and (19), respectively. Unfortunately, this is not the case for solvation force computation using (23) or (24), which requires computing the gradients of the atomic SASA with respect to the coordinates of the set of neighbor atoms. The SASA variations in one atom ai ∈ A with respect to an infinitesimal change in the position of another atom aj ∈ Acav i , can be affected by the presence of a third atom ak ∈ Acav (k 6= i, j), thus i cannot be obtained in a pairwise fashion. This is because the overlaps of the pairs of offset spheres are not mutually disjoint. A segment of the offset surface can be overlapped with more than one neighbor sphere simultaneously, thus displacing one of the overlapping spheres may or may not affect the SASA. We return to this subject in Section 3.4 where a surface sampling algorithm is proposed as a simple solution. 3.3 Bonds Tree/Graph elec vdw To decide the weight factors wi,j in (18) and wi,j in (19), one needs to quickly identify the types of interactions based on the number of bonds between pairs of atoms as described in Section 2.2. An n × n look-up table was used in Protofold I [46–48] for all pairs of n atoms which required a preprocessing step with O(n2 ) time and space. This can be improved by constructing a tree/graph data structure that stores the combinatorial structure of the chain, in which the vertices are atoms and edges are the covalent bonds between them. By excluding a single edge from the loops associated with the rare aromatic groups in certain side chains (e.g., imidazole in His and indole in Trp), this graph can be converted to a tree whose root is arbitrarily chosen as the N atom of the amino-terminus. The interaction types are then identified by the shortest path lengths between atoms. The algorithm starts from the root and visits all vertices using a standard tree traversal routine. For each vertex, it stores a pointer to its parent and the index of the corresponding atom’s AA residue. During the force computation in each KCM iteration, the residue indices for a pair of atoms of interest are checked. If the atoms are farther than a residue apart (i.e., if AA indices are neither identical nor consecutive), the weights in (18) and (19) are simply set to 1 (i.e., 1-4 interactions or beyond). Otherwise, the algorithm checks 1) if one atom is the parent of the other (i.e., 1-2 interaction); 2) if one atom is the grand parent or sibling of the other (i.e., 1-3 interaction); or 3) if one atom is the great-grand parent or sibling of parent of the other (1-4 interactions). This requires O(n) time and space for preprocessing and O(1) query time during the KCM iterations. 3.4 Surface Enumeration As mentioned in Section 1.1, several attempts have been made to approximate the SASA and its derivative by a pair- wise treatment of the overlaps, including the probabilistic methods [63, 64, 66, 69], popular in many molecular simulation software such as CHARMM [62], GROMOS [65], and AMBER [67,68]. In an early attempt to add solvation effects to Protofold II, we used these pairwise approximate formulae, which made it possible to compute the solvation forces with running times comparable to those of the electrostatic and van der Waals force computations. However, a comparison with the exact method [61] showed that when the distribution of the atoms deviates from that assumed in the the probabilistic methods, prohibitively large errors can be introduced into the resultant effects. The exact method [61] takes O(|A0i |) operations for computing the SASA and its gradient for ai ∈ A by using the coordinates of all neighbor atoms ⊆ A0i . This is asymptotically O(1) time per atom (since Acav i we reasoned earlier that |A0i | = O(1) under Assumption 1), but in practice it is not nearly as fast as using the pairwise formulae. Alternatively, we use an approximate method that relies on an enumeration of the surface area, in which the deviations from the exact results can be controlled to a desired precision in a trade-off with computation time. Offset Sphere Sampling. For a given atom ai ∈ A of van der Waals radius Ri , an offset sphere of radius Rioff = Ri + RH2 O concentric with the atom sphere is considered. The atom’s SASA is obtained by measuring the area Aexp i of the portion of the offset surface that is not overlapped by the offset sphere of any neighbor atom aj ∈ Acav (hence i exposed to the solvent). To approximate the SASA, one can generate a large but finite ‘quasi-uniform’ set of sample points denoted as Qi (1 ≤ i ≤ n) on the surface of the offset sphere of the atom ai ∈ A, by which we mean a sampling that allows approximating the exposed fraction of the surface by the ratio of the number of exposed sample points to the total number of sample points. In other words, if we let Qexp = {q ∈ Qi | @aj ∈ A0i : kq − rj k2 ≤ Rjoff } i (32) be the subset of the solvent-exposed sample points, i.e., the points that are outside the offset spheres of all neighbors, exp off then lim|Qi |→∞ |Qexp i |/|Qi | = Ai /Ai . If we define the exp exp ‘exposure ratio’ as fi = |Qi |/|Qi |, the SASA can be apoff off 2 proximated as Aexp ≈ fiexp Aoff i where Ai = 4π(Ri ) , using i 8 a large enough sample size |Qi |  1. There are different ways to obtain a quasi-uniform deterministic sampling on a sphere with consistent incremental quality [84]. For example, one could use a triangular spherical meshing algorithm, which starts from an icosahedron approximation of the sphere and recursively creates successive triangular subdivisions projected back on the sphere. Alternatively, one could use a polar geodesic sampling algorithm, 8 An alternative approach is uniform random sampling, e.g., using the simple method in [83]. Random sampling is easier to implement in parallel since every sample point in Qi would be independent from others, and results in Aexp = [fiexp ]Aoff where [fiexp ] is the expected i i ratio of the exposed sample points in probabilistic terms. However, it requires much larger sample sizes to approach the expectation and to achieve adequate accuracy in practice. 11 which starts from a set of orbits with uniform angular distribution and samples a number of points uniformly on each orbit proportional to the orbit’s circumference. We take the latter approach whose details are presented in [2]. To improve the efficiency, one could always precompute the coordinates for a single sampling Q on a unit sphere centered at the origin, and map it into individual atoms with different offset sphere center positions ri and radii Rioff using the mapping Qi = Ti (Q) where Ti (q) = ri + Rioff q for 1 ≤ i ≤ n and q ∈ Q. This implies an equal number of sample points off 2 N = |Q| for all the atoms, selected as N = 4π(Rmax ) /δA off where Rmax = Rmax + RH2 O is the maximum offset sphere radius, and δA is the desired characteristic area element carried by each sample point. Hence the sampling takes O(nN ) operations for all the atoms regardless of the sampling technique. For implementation purposes, we assign an arbitrary ordering to the sample points, letting Q = {q1 , q2 , · · · , qN } and denoting transformed sample points as qi,k = Ti (qk ). fjexp with respect to the positions of the atoms ai and aj , respectively: ∇rj fiexp ≈ exp X fi,j,s − fiexp es , δr s=1,2,3 (35) where δr > 0 is the finite difference, es (s = 1, 2, 3) are exp the unit vectors along the 3 Cartesian axes, and fi,j,s are the exposure ratio of the atom ai ∈ A after changing the position of the neighbor atom aj ∈ A0i from the current value rj to a hypothetical variant rj + δres . Enumeration Algorithm. In order to compute the exposure ratio and its finite-difference gradient, we use a binary enumeration function B : A × Q → {0, 1} (1 ≤ i ≤ n) such that B(ai , qk ) = 1 if the sample point qi,k ∈ Ti (Q) on the offset sphere of the atom ai ∈ A is overlapped by at least one neighbor offset sphere (i.e., if ∃aj ∈ A0i such that off Energy and Force Approximations. Substituting for kTi (qk ) − rj k2 ≤ Rj ) and B(ai , qk ) = 0 if the sample point exp exp off exp off 2 Ai ≈ fi Ai = 4πfi (Ri ) into (20), the total sol- is exposed to the solvent. The algorithm iterates over all the atoms for 1 ≤ i ≤ n and all the sample points for 1 ≤ k ≤ N vation free energy can be computed directly from (sequentially or in parallel). For each sample point, the inX Gcav (A) ≈ 4πγj fjexp (Rjoff )2 . (33) dicator Bi,k := B(ai , qk ) is initialized to 0, and each point is tested against the set of neighbors A0i , scanned sequentially. aj ∈A As soon as one overlapping neighbor is found, bi,k is set to 1 To obtain the solvation force on any atom ai ∈ A, the energy and there is no need to test the rest of the neighbors. The must be differentiated with respect to the atom’s center co- exposure ratio is then computed as ordinates ri ∈ R3 , giving rise to (23). It is very important to note that an infinitesimal displacement of the atom ai can N X X B(ai , qk ) Bi,k change the SASA of ai itself, as well as that of the neighbor =1− . (36) fiexp = 1 − |Q| N 0 atoms aj ∈ Acav ⊆ A . However, we showed in Section 2.2 q ∈Q k=1 k i i that the two effects are geometrically dependent, yielding the symmetric form in (24). From a computational perspective, In the worst case, this takes |A0i |N tests and N binary sums per atom where N = |Q| is the sample size, which adds to (24) is preferred over (24), because O(N ) basic operations per atom (since we reasoned earlier 1. it eliminates the need for computing the gradient that |A0 | = O(1) under Assumption 1), and a total of O(nN ) i exp ∇rj Ai for the cases when i = j, hence decreasing the time for all the atoms. number of such computations from n2 to n(n − 1); and For every sample point, the sequential inner loop of the alrepeated 3|A0i | times for computing the varia2. its symmetric form lends itself to a data-parallel imple- gorithmexpcan be exp exp mentation that is balanced between computation and tions fi,j,1 , fi,j,2 , and fi,j,3 used in (35), after introducing the finite difference to the 3 Cartesian coordinates (one at a time) data sharing tasks, as we show in Section 4. of each neighbor atom aj ∈ A0i . This takes 3|A0i |2 N more tests This follows from the fact that for a given pair of indices per atom, still asymptotically O(N ) but not fast enough in i 6= j, the first term in the formula for Fcav is identical to practice. There is a notably more efficient way to do the latter i the second term in the formula for Fcav (both given by (24)), computation by ruling out the subset of sample points that j exp cutting the number of required SASA gradient computations cannot possibly contribute to fi,j,s − fiexp (s = 1, 2, 3) in (35) exp to n(n − 1)/2. Substituting for Aexp and A in (24), the during the first iteration when computing Bi,k indicators. In i j solvation forces can be approximated as particular, if a sample point is overlapped by more than one X neighbor, displacing any neighbor does not affect its expo0 off 2 Fcav ∇rj fiexp i (Ai ) ≈ 4πγi (Ri ) sure state (from overlapped to exposed or vice versa), hence exp aj ∈A0i it does not contribute to fi,j,s − fiexp . To leverage this propX − 4π γj (Rjoff )2 ∇ri fjexp , (34) erty, we expand the binary definition of the state function to C : A × Q → Z ∩ [0, ∞) such that C(ai , qk ) counts the actual aj ∈A0i number of neighbors aj ∈ A0i that overlap the sample point exp exp where ∇rj fi and ∇ri fj can be approximated using the qi,k ∈ Ti (Q). Three different states for a sample point are forward-difference method from finite variations of fiexp and observed in terms of the changes in Ci,k := C(ai , qk ): 12 1. ‘Not overlapped’ or ‘exposed’ (Ci,k = 0). In this case, displacing any neighbor either keeps the state at Ci,k = 0 or changes it to Ci,k = 1, where the latter case affects the contribution to SASA. Hence the inner loop needs to be repeated for all neighbors (i.e., for 3|A0i | times). Algorithm 1: SASA enumeration algorithm for solvation free energy and force computation. Input: ri , Rioff , γi , Qi , and A0i for all ai ∈ A (1 ≤ i ≤ n); Output: Gcav and Fcav for all ai ∈ A (1 ≤ i ≤ n); i i for 1 ≤ i ≤ n (seq. or in k) do Step 1: Energy Computation: initialize fiexp ← 1; off 2 initialize Gcav ← Gcav i i,0 ← 4πγi (Ri ) ; for 1 ≤ k ≤ |Qi | (seq. or in k) do over initialize Ci,k ← 0; ji,k ← −1; for j = indices of atoms in A0i (seq.) do if kqi,k − rj k2 ≤ Rjoff then increment Ci,k ← Ci,k + 1; if Ci,k = 1 then //Save critical neighbor index: over write ji,k ← j; atomic read+modify+write fiexp ← fiexp − 1/|Qi |; Gcav ← Gcav − Gcav i i i,0 /|Qi |; else if Ci,k ≥ 2 then over ← −1; write ji,k break; Step 2: Force Computation: exp exp exp initialize fi,1 ← fi,2 ← fi,3 ← fiexp ; cav cav cav initialize Fi,1 ← Fi,2 ← Fi,3 ← 0; Synchronize for all 1 ≤ i ≤ n; for 1 ≤ k ≤ |Qi | (seq. or in k) do for 1 ≤ s ≤ 3 (seq. or in k) do if Ci,k = 0 then for j = indices of atoms in A0i (seq.) do if kqi,k − (rj + δres )k2 ≤ Rjoff then atomic read+modify+write exp exp fi,j,s ← fi,j,s − 1/|Qi |; cav cav Fi,s ← Fi,s − Gcav i,0 /(|Qi |δr); cav cav † Fj,s ← Fi,s + Gcav i,0 /(|Qi |δr); break; else if Ci,k = 1 then over over write j ← ji,k ; //note: ji,k 6= −1 if kqi,k − (rj + δres )k2 > Rjoff then atomic read+modify+write exp exp fi,j,s ← fi,j,s + 1/|Qi |; cav cav Fi,s ← Fi,s + Gcav i,0 /(|Qi |δr); cav cav † Fj,s ← Fi,s − Gcav i,0 /(|Qi |δr); break; cav cav cav write Fcav ← (Fi,1 , Fi,2 , Fi,3 ); i //† The instructions that require architecture-specific mutex. 2. ‘Critically overlapped’ (Ci,k = 1). In this case, the only neighbor whose displacement may change the sample point’s state to Ci,k = 0 is the one that originally overlapped it, and displacing any other neighbor either keeps the state at Ci,k = 1 or changes it to Ci,k = 2, both of which correspond to overlapped states that does not affect the contribution to SASA. Hence the inner loop is repeated only 3 times after displacing that critical neighbor along the 3 Cartesian axes. 3. ‘Multiply overlapped’ (Ci,k ≥ 2). In this case, displacing any neighbor either keeps the state at Ci,k ≥ 2 or changes it to Ci,k = 1, both of which correspond to overlapped states that does not affect the contribution to SASA. Hence the inner loop need not be repeated at all. Therefore, the only changes that contribute a nonzero value exp to fi,j,s − fiexp (s = 1, 2, 3) are those from exposed (Ci,k = 0) to critically overlapped (Ci,k = 1) and vice versa, thus a significant amount of computation time can be saved by early detection of the rest. An atom aj ∈ A0i is called a ‘critical neighbor’ of the atom ai ∈ A with respect to a sample point qi,k ∈ Qi along a particular direction es (s = 1, 2, 3), if a finite displacement δres results in such a change. As a direct consequence of geometry, if aj is a critical neighbor of ai along +es , then ai is also a critical neighbor of aj along −es , both with respect to the same sample point. Therefore, a pair of neighbor atoms ai , aj ∈ A exchange a solvation force ±δFcav = ±4πγi (Rioff )2 /(N δr)es due to their overlap at the sample point qi,k if and only if they are critical neighbors with respect to es . The improved algorithm (based on the integer-valued Ci,k ) is different from the original (based on the binary-valued Bi,k ) in that the first iteration of the sequential inner loop for computing Ci,k terminates after the second (rather than the first) overlap is encountered, because all Ci,k ≥ 2 have equivalent implications according to the above rules.9 During this step, the value of fiexp is initialized to 1 for each atom, and every time a sample point with Ci,k = 1 or 2 is discovered, fiexp is decremented by 1/N . The next 3 repetitions of the inner loop per neighbor atom displacement depend on the aforementioned rules based on the value of Ci,k . The 3 variants of the exposure exp ratio fi,j,s (s = 1, 2, 3) are initialized to fiexp for each atom with respect to displacements in all of its neighbors. Every time a sample point with Ci,k = 0 or 1 is encountered, the inner loop is repeated with displaced neighbor coordinates to exp discover the critical neighbors, each adding ±1/N to fi,j,s . Significant speed-ups are achieved in terms of the average time, a rigorous analysis of which is not possible without 9 Hence one could redefine to C : A × Q → {0, 1, “2 or more”} to implement the same trick with only 3 distinct flags, as in Algorithm 1. 13 assumptions on the spatial distribution of atoms. However, the worst case time complexity is still O(nN ) for the sequential algorithm. One could easily parallelize the algorithm at the outer loops over the atoms and sample points, while the inner loops over the neighbor atoms is best implemented sequentially. On a simple concurrent-read concurrent-write (CRCW) parallel random-access machine (PRAM) with common conflict resolution (briefly introduced in Appendix C.1), the parallel running time of O(nN/P ) can be achieved in theory using P processors (i.e., linear speed-up), which leads to O(n) if we have P = O(N ) processors at our disposal—not far from reality when using GPUs. However, there are more complications to the machine architecture in practice, as will be addressed in Section 4. The complete process is described in pseudo-code in Algorithm 1. The instructions marked by a dagger († ) modify variables that belong to different atoms iterated in parallel by the outer-most loop, hence require a mutex with nuances that depend on the architecture as described in Section 4. 3.5 Prefix Sum Calls Figure 5: The main process flowchart of Protofold II There are multiple references in Protofold II to the generic prefix sum routine—explained in Appendix B, which can be where [η] is an l × l upper-triangular matrix made of the performed using optimal sequential and parallel algorithms torque contributions ηk,h , whose hth column’s upper nonzero in linear number of steps—that emerge naturally as a conseelements form the h × 1 column matrix [ηh ] introduced in quence of the linear topology of the polypeptide backbone: (27). Note that each link only affects the preceding joints 1. Computing the link transformations from the successive in the chain, hence ηk,h = 0 for all h ≤ k − 1. The total matrix multiplications in (7) and (8), in which the do- torque joints τk (1 ≤ k ≤ l) can be obtained as a summation main is Σ := SO(3) (represented by 3 × 3 rotation ma- over the rows of the above matrix via (29). In Protofold I trices) and the operator ⊕ is the matrix multiplication. [46–48] this was accomplished by scanning through the terms along the columns in (37), which took l(l + 1)/2 = O(l2 ) 2. Computing the atom center coordinates from the suc- operations. In Protofold II we perform row scanning of the cessive vector summations in (9) and (10), in which the matrix, starting from the bottom row and moving upwards. domain is Σ := R3 (represented by 3 × 1 column matri- More specifically, by factoring out the Jacobian terms [JT ] in k ces) and the operator ⊕ is the vector summation. each row of (37) and aggregating the generalized forces into Pl agg yields τk = [Jk ]T [Pagg k ] as the sum 3. Computing the joint torques from the successive super- [Pk ] = h=k [Ph ], (29) agg of each row. Then [P ] can be obtained in O(1) time from k position of the contributions of each link on the precedagg agg agg [P ] as [P ] = [P ] + [P ], which leads to a total of k k+1 k k+1 ing joints in the chain using (27) and (29), in which the 6 O(l) prefix computation steps. domain is Σ := R (represented by 6 × 1 column matrices) and the operator ⊕ is the inner product. The first item clearly takes O(n) steps, while the latter two take O(l) = O(m) steps (which is also O(n)). To explain the last item further, let [Jk ] be the k th column of the Jacobian T matrix [J] and [Ph ] := [Tlink Flink be the so-called genh h ] eralized force on the right-hand side of (27) on the hth link along the chain, both of which are 6 × 1 column matrices. The contribution of Ph on the k th joint is obtained as the inner product of the two matrices ηk,h = [Jk ]T [Ph ] arranged into the following matrix:   T J1 P 1 JT JT 1 P2 · · · 1 Pl  0  JT JT 2 P2 · · · 2 Pl   [η] =  (37) , .. .. . . .. ..   . . 0 0 · · · JT l Pl 14 4 Implementation Figure 5 is a schematic of the Protofold II architecture elaborated in Section 4.1. The remainder of this section is dedicated to the parallel implementation of Algorithm 1 on the CPU in Section 4.2 and on the GPU in Section 4.3, which are identified by the alternative shaded modules in Fig. 5. 4.1 Protofold II Architecture Unlike Protofold I [46–48] that was programmed in Matlabr , Protofold II is reprogrammed with a new architecture in C++. The CPU- and GPU-parallel algorithms are implemented as external modules and linked to the main application thread as dynamic link libraries (DLL), which can be integrated into other folding packages. As depicted in Fig. 5, a typical KCM simulation in Protofold II can be summarized into the following steps: 1. 2. 3. 4. 5. with experimental observations except in the case of relatively short chains; e.g., folding simulation of α−helix coiling described in section 5.1. This is due to a variety of reasons ranging from the sensitivity of the folding pathway to the physical parameters (e.g., adjusted coefficients in the emInput: The user specifies a primary structure (i.e., AA pirical force-field equations) to the sensitivity of the spatial sequence information) to the interface. structure of long chains to simplifying geometric assumptions Preprocessing: The program constructs the AA chain (e.g., the exact planarity of the peptide planes). using the structural assumptions given in Section 2.1 to arrange the atoms into the consecutive peptide planes. Additional Functionalities. In order to enable addressThe double-bond angles are all set to the fixed values of ing certain computer-aided structural studies on real proteins ωi = 0◦ (cis) or −180◦ (trans) and the body vectors are effectively in spite of the aforementioned difficulties, we found it imperative to include the following additional functionaliassigned with the values given in Table 1. ties in Protofold II: Initialization: The main chain dihedral angles are ini• The user has the option to 1) specify only sequence data, tialized as φ0i = ψi0 = −180◦ and the side chain dihedral from which the ‘canonical’ peptide plane geometry (i.e., angles are initialized to rotameric default values χ0i,k [45] 0 ◦ assuming exact planarity ωi = 0◦ (cis) or −180◦ (trans) for 1 ≤ i ≤ n, 1 ≤ k ≤ li ≤ 4—i.e., set all θj,k = 0 in and average lengths in Table 2); or 2) import the protein (1) through (3) referred to as ZP initial conditions. structure as a PDB file and retain the peptide group Forward Kinematics: The conformation variables geometry as-read when constructing the rigid links. summarized in Table 2 are converted to the Cartesian co• The user has the option to limit the mobility of the linkordinates of the individual atoms by using the sequence age by fixing as many dihedral angles as desired. This of rigid body transformations described in Section 2.1. enables folding studies at multiple levels and different Coordinate Hashing: Using the 3D grid data strucscales. For example, it is possible to group collections ture presented in Section 3.2, the atom coordinates of AAs (e.g., secondary elements, motifs, domains, etc.) are arranged into buckets for fast neighborhood queries into presumed rigid bodies and limit the DOF to deforbased on the cut-off distances. mations at the loops connecting them. 6. Force Computations: The free energy- and forcefields are computed from the atom coordinates using the equations given in Section 2.2. This is where the CPUor GPU-parallel modules are called for computing the solvation effects. 7. Torque Computations: The forces on the atoms are converted to joint torques using the Jacobian transformation described in Section 2.2. 8. KCM Stepping: The kinetostatic effect of the joint torques are computed using the simple steepest-descent stepping explained in Section 2.3. • In addition to the ZP initial conditions, the user may choose to use other initial conditions, including but not limited to completely random initial conditions or the native conformation perturbed by arbitrary (deterministic or randomized) changes to certain dihedral angles. • When importing PDB files, the program eliminates water molecules—since their effect is implicitly incorporated by the solvation energies—but retains other heteroatoms (e.g., metal ions, co-factors, substrates, etc.) and includes them among chain atoms when computing the force-field. This is crucial since the proper folding of many proteins is dependent on these agents. 9. Termination: If the convergence criteria is met, the program terminates; otherwise it repeats the steps 4 In addition to the above features, the following need to be included in future versions: through 8 above. 10. Output: The intermediate (every several frames) and final conformations in PDB format, the variations of the dihedral angles and free energy terms, and the performance measures (e.g., running times of different steps) are exported by the program. These steps characterize the process of arriving from sequence configuration (i.e., primary structure) to stable 3D conformation (i.e., tertiary structure) without any additional assumptions. Although this is the ultimate goal of protein folding, it is rather ambitious to obtain results that are consistent 15 • The program currently supports monomeric protein folding in its simplest topology. It is desirable to enable multimeric protein folding by maintaining multiple chains bound together (i.e., quaternary structure) and more complex topologies induced by other effects (e.g., disulfide bonds, hydrogen bonds, lipidation, etc.) • the simplistic steepest-descent search process presented in Section 2.3 has not evolved much since Protofold I [46–48]. Our numerical experiments suggest that better optimization algorithms such as a hybrid Monte Carlo Figure 6: Thread execution model on the CPU. sampling combined with steepest-descent or conjugategradients KCM10 could be more effective in avoiding local minima and enable faster convergence to the global minimum. The neighborhood information (i.e., the list of indices of all aj ∈ Ai defined in (31) for each atom ai ∈ A) is constructed and saved in the global memory shared among all processors, hence can be accessed concurrently from different threads. Each thread stores the sample point coordinates, the SASA and its gradient, and the resulting solvation energy and force components in the local memory of the processor. The thread iterates sequentially over the sample points on the offset sphere, and a counter variable that keeps track of the number of overlapped sample points is initialized within the scope of the thread. For each sample point, the coordinates are computed and tested sequentially against all neighbors to obtain Ci,k (1 ≤ i ≤ n, 1 ≤ k ≤ |Qi |). Once the exposure states are obtained for the original configuration of the neighbors, the thread loops over all neighbors one more time to examine the effects of their displacement along the 3 coordinate axes one at a time. If the criteria given in Section 3.4 are met, the pair of force components ±δF cav = ±4πγi (Rioff )2 /(N δr) need to be added to the total solvation forces of two neighbor atoms ai and aj along the proper coordinate axis, and in opposite directions. This results in two write operations per incidence, the first of which modifies Fcav of ai , which is safely assigned to the current i thread and occurs in the local memory without any concern related to communication between the threads. The second write operation, on the other hand, modifies Fcav of aj , a j variable assigned to a different thread. This requires communication between the two threads, and has to be implemented using atomic write operations into the global memory to guarantee mutual exclusion. Figure 6 shows the multithreading scheme for the CPU-parallel algorithm. The algorithm is implemented using the OpenMP library. Although linear speed-up is expected in theory on an abstract CRCW PRAM, the actual speed-up is sublinear (as depicted in Section 5.2) in practice due to bus traffic, network contention, cache invalidations, and serialized operations. Parallel Implementations. As demonstrated in Section 3.4, the solvation energy and force computations using (24) and Algorithm 1 are the most time-consuming steps of each KCM iteration, mainly due to the large number of sample points |Q| = N  1 required to enumerate the offset sphere of each atom for an adequate approximation of SASA and its gradient. To benefit from the single-instruction multiple-data (SIMD) characteristic of Algorithm 1, the variables pertaining to different atoms are assigned to different processors. The two terms on the right-hand side of (24) are computed concurrently by different processors assigned to ai , aj ∈ A and broadcasted to each other to minimize the computational work. An immediate consequence is an additional communication overhead and possible network contention due to concurrent write attempts. Such a trade-off between computation and communication intensities is a common characteristic of parallel algorithms [85], and will be considered here for code optimization. CPU Optimization. The number of CPU cores is generHere we focus on the implementation of the SIMD Algo- ally much smaller that the number of atoms (p  n). Neverrithm 1 using two parallel computing models; namely, theless, it is good practice to generate more threads than the number of cores to maximize the performance by keeping the • one that is designed for coarse-grained multiprocesser processors saturated at all times with computational work. machines such as multi-core CPUs (Section 4.2); and Accessing global memory incurs latency at the incidence of • another that is designed for fine-grained multiprocesser a cache miss and multithreading is a standard technique for hiding such latencies. The computation instructions are inmachines such as many-core GPUs (Section 4.3). terleaved with memory access instructions, hence every time one thread is accessing the global memory the processor can switch the context to a different thread. Other optimization 4.2 CPU-Parallel Implementation attempts include using local memories instead of global memThe first parallel implementation targets a coarse-grained ories whenever possible, and avoiding multiple computations shared-memory multiprocessor machine, i.e., one with a of constant parameters or variables that are used repeatedly. multi-core multi-thread CPU. Given n atoms n threads are generated, assigning one thread per atom ai (1 ≤ i ≤ n). 4.3 10 This module is already implemented into Protofold II but not tested yet, as the focus of this article is on the improved model and implementation of the force-field. GPU-Parallel Implementation The second parallel implementation targets a fine-grained machine with a hierarchical memory architecture, i.e., one 16 control optimization. • Memory optimization is the most effective of all, as demonstrated by the results in the Section 5.2. In contrast to the CPU-parallel algorithm that makes most references through the cached global memory, the GPUparallel algorithm transfers the coordinates, radii, solvation parameters, and neighbor index lists for each atom into the shared memory to minimize the number of global memory references. The variables that are exclusive to the threads, on the other hand, such as the exposure states or sample coordinates are allocated in the registers. However, the limited amount of shared memory and register resources on the streaming multiprocessor (SM) imposes a restriction on the number of resident blocks on the SM and can adversely affect thread occupancy at any time during the simulation. Therefore, one needs to avoid excessive variable definitions within the scope of the GPU kernels. Figure 7: Thread execution model on the GPU. with a many-core many-thread GPU. Given n atoms, a linear grid of n blocks is generated, assigning one block per atom ai (1 ≤ i ≤ n). Each block is further divided into N = |Q| threads, assigning one thread per sample point qk ∈ Q (1 ≤ q ≤ n) on the unit offset sphere. Prior to GPU kernel execution, the neighborhood information (i.e., the list of indices of all aj ∈ Ai defined in (31) for each atom ai ∈ A) is transferred from the CPU (i.e., host) memory to the GPU (i.e., device) memory. For each thread, the iteration over different neighbors is performed sequentially, similar to the CPU-parallel code presented in 4.2. The solvation energy and force components, a counter that keeps track of the number of overlapped sample points, and exposure states are initialized in the shared memory of the blocks, which require atomic operations for access safety by multiple threads, while sample point coordinates are stored in the registers that are local to each thread. Each sample point is tested sequentially against all neighbors to obtain Ci,k (1 ≤ i ≤ n, 1 ≤ k ≤ |Qi |). Once the exposure states are obtained for the original configuration of the neighbors, the thread loops over all neighbors one more time to examine the effect of their displacement along the 3 coordinate axes one at a time. Similar to the CPU-based implementation, whenever the pair of force components ±δF cav = ±4πγi (Rioff )2 /(N δr) need to be added to the total solvation forces of two neighbor atoms ai and aj along the proper coordinate axis, the write operation that modifies Fcav of ai happens atomically in the shared memory. i This ensures mutual exclusion between threads of the same block. On the other hand, the write operation that modifies Fcav of aj happens atomically in the global memory to enj sure mutual exclusion between blocks of the same grid. Figure 7 shows the multi-threading scheme for the GPU-parallel algorithm. The algorithm is implemented using NVIDIA’s compute-unified device architecture (CUDA). Kernel invocation is carried out synchronously within the default CUDA stream, hence synchronization between blocks is automatically guaranteed, while barrier synchronization is needed between threads of the same block. • For execution level optimization, the kernels should be executed with proper granularity to maximize SM thread occupancy. Specifying a larger number of threads per block generally contributes to latency hiding, but is limited by the architecture as well as the on-chip memory resources. The number of threads is the same as the sample size N = |Q| a proper choice of which is a trade-off between accuracy and performance. • For instruction level optimization, the transcendental math functions are converted to their intrinsic alternatives that are executed on the special function units (SFU) of the CUDA cores. • Flow-control optimization is realized by avoiding multiple execution paths within the same block, which might lead to thread divergence and serialization within the same warp. In particular, when checking for overlaps between neighbor atoms and sample points, the conditional (e.g., if/else/then) statements are set in such a way that one of the two execution paths is always null. The near-optimal conditions are reached by successive experimentation and modification of the code. For more information regarding the GPU architecture and terminology, see Appendix C.2. 5 Results & Discussion This section presents a preliminary assessment of the model and implementation enhancements from Protofold I [46–48] to Protofold II. The folding process is simulated and assessed at multiple levels, ranging from the formation of secondary structural elements (e.g., α−helix coiling or β−strands formation) from an open chain to tertiary interactions between GPU Optimization. The optimization attempts can be secondary elements or across larger domains that can be ascategorized as memory, execution, instruction, and flow- sumed to be rigid in real protein examples. 17 Figure 8: Left-handed α−helix formation for a 15-residue polyalanine chain in vacuum (left) and in water (right) starting from φ0i = ψi0 = +10◦ using Protofold II. Initial conditions and solvation effects dramatically affect the folding pathway. Figure 9: Right-handed α−helix formation for a 15-residue polyalanine chain in vacuum (left) and in water (right) starting from φ0i = ψi0 = −10◦ using Protofold II. Initial conditions and solvation effects dramatically affect the folding pathway. In Section 5.1 we discuss the impact of introducing solvation effects on the folding process of secondary structural elements starting from different initial conditions. We present some performance measures in Section 5.2 to validate the practical benefits of algorithmic improvements (e.g., coordinate hashing) as well as implementation improvements (i.e., CPU- and GPU-parallel computing). Finally, we look at a few real protein molecules in Section 5.3 and examine the energy variations in the neighborhood of the native structures. 5.1 The Folding Process The simplest structural elements that are ubiquitous across many protein domains are α−helices and β−strands. Here we start by considering simple test runs on relatively short (e.g., 10-20 residues long) peptide chains made of Ala residues (typically used as the benchmark AA type in its most common L-stereoisomeric form) to visualize their compliance into secondary structural elements. Alpha Helix Formation. First, we run four tests on a 15residue chain starting from two different initial conditions, for both of which we simulate the folding process without and with solvation effects taken into account: 2. Starting from the (slightly pre-coiled) initial conditions φ0i = ψi0 = −10◦ for all 1 ≤ i ≤ 15 the chain folds into a right-handed α−helix as depicted in Fig. 9. The energy variation during KCM iterations is given in Fig. 11. The folding process in vacuum, i.e., without considering the solvation effects, emulates the behavior in the absence of the polar solvent, e.g., in membrane proteins extended along the nonpolar lipid bilayer or in secondary structural elements wrapped inside the hydrophobic core of globular proteins [3]. On the other hand, the folding process in water, i.e., with the presence of the solvation effects in addition to the intramolecular interactions, emulates the formation of elements that reside at the hydrophilic surface of globular proteins [3]. In the case of α−helix formations in Figs. 8 and 9, the hand of the initial coil determines the hand of the final helix.11 This is due to the gradient descent nature of the KCM search algorithm that tends to converge to different local minima depending on the initial state. The effects of the solvation are hard to observe in these examples with the energetically unchallenged helical structures due to proper stacking of the atoms favored by all considered effects. In both cases the van der Waals and solvation effects work in the same direction until the steric clash prevents the helix to coil further. Figures 10 and 11 are plots of the free energy variations ver- 1. Starting from the (slightly pre-coiled) initial conditions φ0i = ψi0 = +10◦ for all 1 ≤ i ≤ 15 the chain folds into 11 The surface visualizations can be deceiving where the right-handed a left-handed α−helix as depicted in Fig. 8. The energy helix appears to have a left-handed twist and vice versa. This is due to variation during KCM iterations is given in Fig. 10. the transversal ridges and grooves formed in between the side chains [3]. 18 Figure 10: Free energy variations during folding of a 15- Figure 11: Free energy variations during folding of a 15residue polyalanine chain into a left-handed α−helix in vac- residue polyalanine chain into a right-handed α−helix in vacuum (top) and in water (bottom) using Protofold II. uum (top) and in water (bottom) using Protofold II. sus KCM iteration number for the four runs described above. Note that in all four cases (top and bottom plots) the solvation energy is evaluated and plotted, but only in two of them (bottom plots) its effects are applied to deform the chain. For both left and right-handed helix formation, the inclusion of solvation effects clearly changes the folding pathway and increases the number of iterations before convergence from around 150 to 300. However, in either case the solvation free energy changes are not as significant as those of intramolecular (particularly van der Waals) effects. Another important observation is that the right-handed α−helix exhibits a notably more stable conformation than the left-handed α−helix with about ∼ 40−50 kcal per mol lower total free energy state—to be accurate, 43.8 and 45.9 kcal per mol for the entire chain, i.e., 2.9 and 3.1 kcal per mol per AA residue, without and with solvation effects, respectively. Although this is qualitatively consistent with the expectation of righthanded coiling being favored by L-alanine chains, the energy differences are higher than the ones reported in earlier studies (e.g., MD results in [86]). However, a meaningful comparison would require using identical simulation parameters, which is beyond the scope of this paper. The final dihedral angles for all 15 Ala residues corresponding to the folded (i.e., stable) conformations, obtained after a large enough number of iterations, are given in Table 4. ometric relations between consecutive peptide planes that, when repeated for a segment of multiple residues along the chain, create secondary structural elements such as coiled α−helices and flat β−strands. Although the solvation effects do not significantly alter the shape of the energy profile, there is a certain amount of noise added due to the discrete nature of the enumeration algorithm presented in Section 3.4. To observe the effects of solvation, one needs to carry out more extensive simulations on larger data sets with different chain lengths and various initial conditions. We carried out KCM runs on 2,000 independent polyalanine chains of random lengths in the range 10 ≤ m ≤ 20 starting from random initial angles in the range −90◦ ≤ φ0i , ψi0 ≤ +90◦ . The tests were run separately without and with considering the solvation effects using the same random seed. The resulting dihedral angles for all 27,717 Ala residues of all chains12 are plotted in Fig. 13. One can observe multiple concentration areas that clearly correspond to left- and right-handed α−helices and flat β−strands, the former two helical folds being more populated on the plots. Zooming further on the two α−regions reveals multiple local minima where the points are concentrated more, which correspond to different subtypes of α−helices. Comparing the two plots in Fig. 13 reveals that the solvation effects do not significantly change the locations of the local minima. However, the energy profile is relaxed Ramachandran Plots. To examine the local effects of en- around the local minima where it has sharp cracks traced by ergetics, Ramachandran plots (for a pair of Ala residues in the concentrated points along the valleys of the intramolectandem) are generated by Protofold II using the energy-field ular energy landscape. presented in Section 2.2. The plots in Fig. 12 show the energy variations across different pairs (φ, ψ) of dihedral angles, without and with considering the solvation effects. The vertical high-energy regions in the middle corresponds to pro12 The angles for the first AA residue of all chains are eliminated hibitive steric clashes between the atoms. The low-energy as outliers since they differ dramatically from those of the subsequent regions around it, on the other hand, correspond to the ge- residues due to the anchoring at the N-terminus (see Table 4). 19 Figure 12: The Ramachandran plots for the energy variations of a pair of Ala residues in vacuum (i.e., without solvation effects) (left) and in water (i.e., with solvation effects) (right) using Protofold II. Figure 13: The Ramachandran plots for the folded backbone conformation of 2,000 10- to 20-residue polyalanine chains in vacuum (i.e., without solvation effects) (top) and in water (i.e., with solvation effects) (bottom) starting from random initial conditions −90◦ ≤ φ0i , ψi0 ≤ +90◦ using Protofold II. 20 Table 4: Final conformations of a 15-residue polyalanine chain folded in vacuum using Protofold II. i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Ave. 5.2 Left-handed coil In vacuum φi (◦ ) ψi (◦ ) +10.0 +118 +60.2 +53.9 +58.9 +36.8 +56.8 +45.4 +57.9 +42.2 +56.7 +43.7 +57.3 +42.7 +56.8 +44.0 +56.8 +42.3 +56.5 +45.5 +56.2 +42.4 +55.1 +48.4 +53.5 +45.5 +49.2 +59.4 +53.2 +69.8 +53.0 +52.0 φ0i = ψi0 = +10◦ In water φi (◦ ) ψi (◦ ) −7.20 +21.5 +59.9 +47.6 +58.6 +40.0 +57.9 +45.1 +58.8 +40.3 +57.8 +43.6 +57.9 +43.6 +58.1 +41.6 +58.3 +42.1 +58.4 +43.3 +57.9 +41.7 +56.3 +46.0 +55.6 +45.0 +52.3 +52.6 +53.2 +72.7 +52.9 +44.4 Right-handed coil φ0i = ψi0 = −10◦ In vacuum In water φi ( ◦ ) ψi (◦ ) φi (◦ ) ψi (◦ ) −10.0 −59.1 +15.1 +54.4 −82.4 −41.1 −107 −47.1 −76.9 −24.8 −91.9 +11.3 −75.7 −34.4 −81.1 −34.4 −75.8 −28.4 −83.1 −23.8 −75.3 −31.3 −76.7 −32.1 −76.1 −29.3 −79.4 −28.9 −75.6 −30.5 −77.1 −28.9 −76.3 −29.2 −79.8 −29.2 −76.5 −29.7 −78.4 −28.3 −77.5 −29.5 −79.4 −28.6 −75.6 −33.5 −78.9 −28.7 −72.1 −39.0 −75.0 −33.4 −63.1 −44.4 −72.6 −40.0 −64.3 −53.5 −65.4 −48.0 −70.2 −35.9 −74.1 −24.4 Figure 14: The effect of 3D hashing on the force computation times of a 60-residue polyalanine chain with and without solvation effects (on C-1). Computation Times Next, we demonstrate the substantial performance improvements in Protofold II as a result of introducing the algorithms and data structures presented in Section 3. The running times are reported and compared on two computer systems, namely: • C-1: Dell Precision T7500 workstation with an Intelr Xeonr E5645 CPU (12 cores, clock rate 2.40 GHz, and Figure 15: Sequential running times for electrostatic, van der host memory 24 GB). The system is equipped with one Waals, and solvation forces, and CPU-parallel running times NVIDIA Quadror 4000 GPU (256 CUDA cores with of the latter for a 1,200-residue polypeptide chain (on C-1). compute capability (CC) 2.0 and device memory 2 GB). • C-2: Dell Precision T7600 workstation with an Intelr Xeonr E5-2687W CPU (32 cores, clock rate 3.10 GHz, and host memory 64 GB). The system is equipped with two graphics cards: a NVIDIA Quadror K5000 GPU (1,536 CUDA cores with CC 3.0 and device memory 4 GB) and a NVIDIA Teslar K20C GPU (2,496 CUDA cores with CC 3.5 and device memory 5 GB). Effect of Hashing. Figure 14 shows the running times of the force computation step (on C-1) in a single KCM iteration for folding polyalanine chains of different lengths with and without 3D hashing presented in Seciton 3.2 both in vacuum (i.e., without considering solvation effects) and in water (i.e., with considering solvation effects). In both cases, the results show a significant reduction in the running times with hashing (e.g., up to 4.6× in vacuum and 1.5× in water for m = 60 Ala residues), and the difference scales with the size of the molecule. Nevertheless, the solvation force computations remain the bottleneck of the simulation (using sequential CPU implementation) and adversely affect the speed-up gained from hashing. Parallel Computing. The first 3 columns on the left in Fig. 15 show the sequential CPU running times (on C-1) for the electrostatic, van der Waals, and nonpolar solvation forces in a single KCM iteration. The results were obtained for a polypeptide chain composed of 1, 200 residues that are randomly selected from Ala, Cys, and Ser AAs—the latter two being equivalent to replacing the H in the nonpolar Ala side chain with SH and OH, respectively, resulting in polar side chains. It is clearly observed that with a single CPU core, the first two terms take a very small fraction of the total time (around 5−6% of the total force computation time per iteration) and the solvent effects are clearly the bottleneck. The same column chart in Fig. 15 also shows the running times and corresponding speed-ups (on C-1) for the CPU-parallel computation of the solvation force using up to 12 CPU cores. An almost linear speed-up is achieved by increasing the number of processors (e.g., ∼ 10× with 12 cores). However, the solvation force calculation is still about an order of magnitude slower than that of the other two force types. Figure 16 compares the running times and corresponding speed-ups (on C-1) of the CPU- and GPU-parallel implementations for polypeptides of different lengths, ranging from m = 200 (i.e., ∼ 2K atoms) to 1, 200 AAs (i.e., ∼ 13K atoms). To depict the importance of memory optimization presented in Section 4.3, the running times are shown for two different cases; namely, one that uses global memory for communications between all threads of all blocks, and the optimized code making extensive use of shared memories for communications 21 Figure 16: CPU- and GPU-parallel running times (top) and Figure 17: CPU- and GPU-parallel running times (top) and speed-ups (bottom) with and without memory optimization speed-ups (bottom) with memory optimization on two GPUs for polypeptide chains of various lengths (on C-1). for polypeptide chains of various lengths (on C-2). between threads within the same block. It is interesting to note that when the GPU shared memory is not utilized, the results do not show an improvement over the 12-core CPU implementation due to large global memory access latencies. However, proper shared memory usage results in a huge performance improvement that scales by protein size, e.g., from 20× for m = 200 AAs to 70× for m = 1, 200 AAs with respect to the sequential run on a single CPU. The computations are repeated for even larger molecules in Fig. 17, ranging from m = 1, 000 AAs (i.e., ∼ 10K atoms) to 6, 000 AAs (i.e., ∼ 64K atoms), enabled by leveraging a more powerful machine (i.e., C-2). For the case of m = 1, 000 AAs, C-2 yields a two-fold speed-up on the CPU and a three-fold speed-up on the GPU compared to C-1. As depicted in Fig. 17, significantly higher and more consistent CPU speed-ups of 16-18× and GPU speed-ups of 90-100× (for Quadror K5000) and 270-290× (for Teslar K20C) are observed. These observations imply proper scalability of the data-parallel implementation with molecular size. Even for molecules with tens of thousands of atoms, each force-field computation takes only a fraction of a second per iteration. This enables fast KCM simulation of folding for large proteins over extended periods of time via Protofold II, which wouldn’t be tractable via Protofold I [46–48]. Table 5: The size of the analyzed protein examples. Protein Name Myoglobin Troponin-C Gamma-B Crystallin PDB Code 1TES 2JNF 1GCS m 154 158 174 n0 1,231 1,232 1,474 n 2,478 2,401 2,844 • The interactions between multiple rigid α−helices that rotate around flexible loops within the containing motifs/domains are considered. Two examples from the PDB are used for this purpose: Myoglobin (PDB: 1TES) and Troponin-C (PDB: 2JNF). • The interactions between multiple rigid domains that are connected via flexible loops within the containing monomeric unit are examined. The example of GammaB Crystallin (PDB: 1GCS) is used for this purpose. These PDB structures that are obtained from X-ray crystallography (e.g., 1TES and 1GCS) do not contain the H atoms, hence are first preprocessed using Duke University’s MolProbity server [87,88] which predicts and adds the H atoms to the coordinates information before importing the structure into Protofold II. The PDB structures that are obtained from nuclear magnetic resonance (NMR) spectrometry (e.g., 2JNF), on the other hand, already contain the H atoms positions. 5.3 Real Examples The size of the molecules, i.e., the number of AA residues m 0 Having considered the folding of secondary structural ele- and the number of atoms n and n with and without the H ments with complete flexibility (i.e., each peptide plane being atoms included, respectively, are given in Table 5. treated as a separate rigid body), we proceed to study the tertiary interaction between larger rigid units in real proteins. Secondary Structural Interactions. Let us first conWe report on the following case studies: sider the energy variations when an α−helix of an α−domain 22 Figure 18: Myoglobin (PDB: 1TES) hinged at Asp-21 and Gly-125 for variations in φ21 , φ125 (left) and ψ21 , ψ125 (right). Figure 19: Intramolecular versus total (i.e., solvation included) free energy landscape for Myoglobin (PDB: 1TES) in the vicinity of the native conformation versus variations in (φ21 , ψ21 ) (left) and (φ125 , ψ125 ) (right). Figure 20: Troponin-C (PDB: 2JNF) hinged at Thr-24 and Asp-145 for variations in φ24 , φ145 (left) and ψ24 , ψ145 (right). Figure 21: Intramolecular versus total (i.e., solvation included) free energy landscape for Troponin-C (PDB: 2JNF) in the vicinity of the native conformation versus variations in (φ24 , ψ24 ) (left) and (φ145 , ψ145 ) (right). 23 is reoriented from its stable conformation with respect to the rest of the bundle, as illustrated in Figs. 18 and 20. Myoglobin (PDB: 1TES) is an oxygen binding muscle protein that is composed of a single ‘globin fold’ domain, which is an α−domain motif consisting of a bag of 8 α−helices per domain (denoted A through H) arranged at ∼ +90◦ and +50◦ angles with respect to each other, as shown in Fig. 18. This arrangement creates a hydrophobic pocket in the interior that wraps the stabilizer co-factor known as ‘heme group’ [89]. Assuming that the helices are rigid, we examine the energy variations due to dihedral rotations at the loops that connect the two end α−helices; namely, local changes in (φi , ψi ) for i = 21 and i = 125 where the A and H helices are hinged, respectively. Troponin-C (PDB: 2JNF) is a calcium binding muscle protein that is composed of two ‘EF-hand’ domains, which are α−domain motifs consisting of a bundle of 4 α−helices per domain (denoted A through H) arranged in an up-and-down anti-parallel conformation [89], as shown in Fig. 20. There is a long pseudo-helical segment that connects the two globular domains. Assuming that the helices are rigid, we examine the energy variations due to dihedral rotations at the loops that connect the two end α−helices; namely, local changes in (φi , ψi ) for i = 24 and i = 145 where the A and H helices are hinged, respectively. Figures 19 and 21 show the free energy variations in vacuum (i.e., without considering solvation effects) and in water (i.e., with considering solvation effects) for the two protein domains as the end α−helices A and H of each are rotated within a range of ±10◦ of the native (φi , ψi ) at the hinged loops.13 In all four cases the energy model of Protofold II exhibits a local minima within ±1◦ of the native conformation. We also observe that the solvation effects contribute a significant amount to the total free energy; however, the SASA variations are so small in the considered neighborhood that the location of the local minima is almost unchanged. The van der Waals effects appear to be dominant in this neighborhood, manifested as the shape complementarity between the ridges and grooves of the mobile α−helix and those of the other helices in the bundle [90]. However, when variations across larger angular ranges are considered, the solvation effects are expected to play a more determining role. Figure 22: Gamma-B Crystallin (PDB: 1GCS) hinged at Ile81 for variations in φ81 and ψ81 , one at a time. residues that belong to the connecting loop (e.g., i = 81). To observe the global effects of solvation, we allow both dihedral angles (φ81 , ψ81 ) to vary over the entire range of ±180◦ from the native values. To facilitate visualization, this time we consider only one angle’s variation at a time. Figures 23 and 24 show the variations of the different energy terms.14 It appears that the van der Waals effects are dominant in determining the profile of the energy well near the native conformation, which can be attributed to the extensive contact interface between the two domains in Fig. 22. The electrostatic and solvation effects substantially change the energy landscape thus can dramatically affect the folding pathway. However, they do not cause a significant change in the location of the energy minimum. Once again, the solvation energy is noisier due to the discrete nature of the enumeration algorithm in Section 3.4. Another interesting observation is that the electrostatic energy has discontinuities due to the cut-off approximation when pairs of atoms are farther than 9.0 Å. Although it does not seem to affect the minimum location in this example, larger cut-off distances might be necessary for analyzing large proteins, since the accumulation of the pairwise errors grows quadratically with the number of atoms. 6 Conclusion The KCM approach to protein folding [44, 45] originally implemented into Protofold I [46–48] provides a promising fast alternative to the popular MD simulation and MC sampling methods by Tertiary Structural Interactions. Lastly, we consider 1. modeling the protein chain as a kinematic linkage with the energy variations when a rigid domains of a protein is restricted DOF to which the well-studied principles from reoriented with respect to another domain against which it mechanism synthesis and robotics can be readily applied; is packed into a stable structure. and Gamma-B Crystallin (PDB: 1GCS) is an eye-lens protein 2. replacing the 2nd-order dynamic response with 1st-order that is made of two similar domains that are 40% identical in kinetostatic integration of the equations of motion to sequence [89]. Each domain is composed of two anti-parallel facilitate convergence to the free energy minima. β−sheets each made of 4 β−strands with the same arrangement topology [89], as shown in Fig. 22. Assuming that these In the present work, we introduced major model and impledomains are rigid, we analyze the energy variations due to mentation improvements in Protofold II by rotating one domain with respect to the other at one of the 13 The colormaps are generated using a nonlinear but consistent contouring scheme. 14 To enabel logarithmic plots, each energy ordinate is offset by a constant value to shift its minimum to (the arbitrary positive value of) 100 kcal per mol. 24 Figure 23: Energy variations for Gamma-B Crystallin (PDB: 1GCS) versus changes in φ81 for fixed native ψ81 . Figure 24: Energy variations for Gamma-B Crystallin (PDB: 1GCS) versus changes in ψ81 for fixed native φ81 . 25 1. incorporating the solvation effects that characterize the A Peptide Chains hydrophobic effect, i.e., the entropic changes due to cavity formation in the aqueous solvent; This appendix overviews the structural biochemistry of peptide chains. Amino acids (AAs) are composed of a cen2. taking advantage from efficient auxiliary algorithms and tral carbon atom (denoted Cα ) attached to 4 chemical comdata structures to improve the computational complex- ponents; namely a carboxylate group (−COO− ), an amino ity from O(n2 ) to expected O(n); and group (−NH+ 3 ), and a hydrogen atom (−H), common among all types, and a variable side chain (denoted −R) [3]. The 3. implementing fast and relatively accurate evaluation of amino group of one AA reacts with the carboxyl group of anthe SASA and its gradient for solvation energy- and other to form a ‘peptide bond,’ eliminating a water molecule. force-field computation, respectively, in parallel on both This so-called ‘condensation reaction’ repeats over and over again to form a ‘peptide chain’ [3]. CPU and GPU. As depicted in Fig. 1, the 3D structure of the peptide The presented enumeration algorithm for the latter pro- chain can be uniquely represented by a set of bond lengths, vides a fast approximate method, in which the degree of ac- and two sets of angles, namely the angles between adjacent curacy is traded off with the performance by a proper choice bonds that share one atom (referred to as ‘bond angles’), of the sample size. We argued that the inclusion of the sol- and those describing rotation around the bonds (referred to vation free energy into the mix can significantly affect the as ‘torsion angles’ or ‘dihedral angles’). It is reasonable to folding pathway for water-soluble proteins whose folding in assume that the bond lengths and bond angles are constant vivo is dominated by such effects. We also demonstrated that [45], thus the dihedral angles exclusively specify the protein the performance gain of the GPU-accelerated implementation conformation. For a protein with m AA residues denoted by scales properly with the number of atoms, achieving up to two AAi (1 ≤ i ≤ m) numbered in order from N-terminus to Corders of magnitude in speed-ups after memory optimization. terminus, the 3 set of dihedral angles in the main chain are Protofold II has been completely rearchitectured and is defined for 1 ≤ i ≤ m as evolving into a versatile analysis toolbox for studying the kinematic and structural behavior of molecular chains in • the rotation angle ωi around the backbone C−N bond protein engineering applications such as the design of nanothat connects the residues AAi and AAi+1 ; manipulators [53, 54] among the ongoing projects. A hybrid force-field model was used, composed of • the rotation angle φi around the backbone N−Cα bond in the residue AAi ; and 1. the AMBER model [67] (for noncovalent interactions); and • the rotation angle ψi around the backbone Cα −C bond in the residue AAi . 2. supplemental terms similar to the CHARMM model [78] and the GROMOS model [64] (for solvation effects) except for the probabilistic SASA estimation [63] replaced Based on high resolution X-ray crystallographic studies, with our own surface sampling algorithm. the angle ω is very close to either 0◦ (the ‘cis’ conformai This model is by no means versatile enough to enable addressing the ultimate goal of arriving from sequence to 3D structure at a click of a button. Even though predicting folding of real 3D structures requires further developments, this study represents a major step toward this goal. 7 Acknowledgements The authors are thankful to Sanguthevar Rajasekaran from the Department of Computer Science and Engineering and to Andrei Alexandrescu and Victoria Robinson from the Department of Molecular and Cellular Biology at UConn for providing instructive insight in this interdisciplinary project. This work was supported in part by the National Science Foundation grants CMMI-1200089, CNS-0927105, and CMMI-1462759. The responsibility for any errors and omissions lies solely with the authors. tion) or 180◦ (the ‘trans’ conformation) [3], and the 6 atoms in the peptide group Cα −CO−NH−Cα are approximately coplanar, forming the so-called ‘peptide plane’ [45]. Due to the partial double-bond characteristic of the peptide bond C−N, the peptide groups are almost rigid, hence modeled as rigid links hinged to the preceding and following peptide groups along the main chain [45]. These planes rotate about the N−Cα and Cα −C bonds, which can be thought of as revolute joints. Hence the ‘main chain dihedral angles’ φi and ψi completely specify the conformation of the backbone. In addition, each side chain can be treated as a shorter linkage which can add up to 4 extra links with their associated joint angles, called ‘side chain dihedral angles’ (χi,1 to χi,4 ). Therefore, the whole protein chain can be modeled as an open kinematic linkage, conformation of which is fully specified by a set of main chain and side chain dihedral angles. The Pm resulted model has a reduced number of DOF of 2m + i=1 DOF(Ri ), where the DOF of the side chain Ri is determined by the number of its side chain dihedral angles. 26 B Prefix Computation cluding global and local memories; and 2) on-chip memory including shared memory, cache, and registers. The access The prefix sum problem is fundamental to numerous impor- latencies to the on-chip are much less (around 100× faster) tant algorithms, and is defined as follows. Given a finite or- than those of the off-chip memory. dered sequence of elements X = (x1 , x2 , · · · , xn ) ∈ Σn and an arbitrary binary operator ⊕ : Σ × Σ → Σ that is O(1)−time References computable and associative (i.e., (x ⊕ y) ⊕ z = x ⊕ (y ⊕ z)), compute another sequence Y = (y1 , y2 , · · · , yn ) ∈ Σn where [1] Tavousi, P., Behandish, M., Kazerounian, K., and Ilies, H. T., 2013. “An improved free energy formulation and implementation for kinetoy1 = x1 , y2 = x1 ⊕ x2 , · · · , yn = x1 ⊕ x2 ⊕ · · · ⊕ xn ; in static protein folding simulation”. In Proccedings of the 2013 ASME International Design and Engineering Technical Conferences and Comother words yi = yi−1 ⊕ xn for 1 ≤ i ≤ n where y0 is the puter and Information in Engineering Conference (IDETC/CIE’2013), left-identity element (i.e., y0 ⊕ x = x for all x ∈ Σ). no. DETC2013-12671, American Society of Mechanical Engineers (ASME), pp. V06AT07A006:1–13. It is trivial to show that the prefix sums can be computed sequentially in O(n), which is optimal. In addition, [2] Behandish, M., Tavousi, P., Ilies, H. T., and Kazerounian, K., 2013. “GPU-accelerated parallel computation of free energy for kinetostatic there are work-optimal parallel algorithms with a total comprotein folding simulation”. In Proccedings of the 2013 ASME Inputational work of T P = O(n) that carry out the prefix ternational Design and Engineering Technical Conferences and Computer and Information in Engineering Conference (IDETC/CIE’2013), computation in T = O(log n) time using P = O(n/ log n) no. DETC2013-12675, American Society of Mechanical Engineers CREW PRAM or in T = O(log n/ log log n) time using (ASME), pp. V02AT02A009:1–12. P = O(n log log n/ log n) CRCW PRAM processors with [3] Kuriyan, J., Konforti, B., and Wemmer, D., 2012. The Molecules of common conflict resolution [70]—see Appendix C.1 for deLife: Physical and Chemical Principles. Garland Science, Taylor & Francis Group. tails regarding PRAM. [4] Anfinsen, C. B., 1973. “Studies on the principles that govern the folding of protein chains”. Science, 181(4096). C C.1 Parallel Computing [5] van Gunsteren, W. F., 1988. “The role of computer simulation techniques in protein engineering”. Protein Engineering, 2(1), pp. 5–13. Abstract Machines The parallel random-access machine (PRAM) is a sharedmemory abstract parallel computation model, typically assigned with the exclusive/concurrent-read (ER/CR) and exclusive/concurrent-write (EW/CW) attributes [85]. The most common attributes are CREW and CRCW, noting that multiple processors can concurrently read a memory cell but only one can write at a time to prevent race conditions. To enable concurrent writing, one needs to resolve possible conflicts with typical mechanisms such as 1) ‘common’ meaning that all processors attempt to write the same value); 2) ‘arbitrary’ meaning that one processor’s attempt succeeds at random; and 3) ‘priority’ meaning that the processors are prioritized by a prespecified order. Note that a CREW algorithm can always run in the same (if not fewer) number of steps on a CRCW machine. C.2 [6] Chirikjian, G. S., Kazerounian, K., and Mavroidis, C., 2005. “Analysis and design of protein based nanodevices: Challenges and opportunities in mechanical design”. Journal of Mechanical Design, 127(4), pp. 695– 698. [7] Echenique, P., 2007. “Introduction to protein folding for physicists”. Contemporary Physics, 48(2), pp. 81–108. [8] Chothia, C., and Lesk, A. M., 1986. “The relation between the divergence of sequence and structure in proteins”. The EMBO journal, 5(4), p. 823. [9] Martı́-Renom, M. A., Stuart, A. C., Fiser, A., Sánchez, R., Melo, F., and Šali, A., 2000. “Comparative protein structure modeling of genes and genomes”. Annual Review of Biophysics and Biomolecular Structure, 29(1), pp. 291–325. [10] Krieger, E., Nabuurs, S., and Vriend, G., 2003. “Homology modeling”. Methods of Biochemical Analysis, 44, pp. 509–524. [11] Bowie, J., Luthy, R., and Eisenberg, D., 1991. “A method to identify protein sequences that fold into a known three-dimensional structure”. Science, 253(5016), pp. 164–170. [12] Ginalski, K., Grishin, N. V., Godzik, A., and Rychlewski, L., 2005. “Practical lessons from protein structure prediction”. Nucleic Acids Research, 33(6), pp. 1874–1891. GPU SIMT Model A typical CUDA GPU program proceeds as follows. The data is first transferred from the CPU (i.e., host) memory to the GPU (i.e., device) memory. The host application invokes the so-called kernels on the GPU with specified granularity, i.e., issuing a 1D, 2D, or 3D grid of blocks, each block being a 1D, 2D, or 3D array of threads that are sent in groups of 16 or 32 (called ‘warps’) to one of the streaming multiprocessors (SM). The threads within the same block can access the fast shared memory banks on the SM, and communication across blocks is done using the global memory. The computed results are transferred from the device memory back to the host memory. There are different types of GPU memory locations, classified into two groups: 1) device (i.e., off-chip) memory in- [13] Moult, J., Fidelis, K., Rost, B., Hubbard, T., and Tramontano, A., 2005. “Critical Assessment of methods of protein Structure Prediction (CASP)–round 6”. Proteins: Structure, Function, and Bioinformatics, 61(S7), pp. 3–7. [14] Bradley, P., Misura, K. M. S., and Baker, D., 2005. “Toward highresolution de novo structure prediction for small proteins”. Science, 309(5742), pp. 1868–1871. [15] Schueler-Furman, O., Wang, C., Bradley, P., Misura, K., and Baker, D., 2005. “Progress in modeling of protein structures and interactions”. Science, 310(5748), pp. 638–642. [16] Osguthorpe, D. J., 2000. “Ab Initio protein folding”. Current Opinion in Structural Biology, 10(2), pp. 146–152. [17] Bonneau, R., and Baker, D., 2001. “Ab Initio protein structure prediction: Progress and prospects”. Annual Review of Biophysics and Biomolecular Structure, 30(1), pp. 173–189. 27 [18] Hansmann, U. H. E., and Okamoto, Y., 1994. “Comparative study of multicanonical and simulated annealing algorithms in the protein folding problem”. Physica A: Statistical Mechanics and its Applications, 212(3), pp. 415–437. [38] Ciccotti, G., and Kalibaeva, G., 2004. “Deterministic and stochastic algorithms for mechanical systems under constraints”. Philosophical Transactions-Royal Society Of London Series A Mathematical Physical And Engineering Sciences, 362, pp. 1583–1594. [19] Simons, K., Kooperberg, C., Huang, E., and Baker, D., 1997. “Assembly of protein tertiary structures from fragments with similar local sequences using simulated annealing and bayesian scoring functions”. Journal of Molecular Biology, 268(1), pp. 209–225. [39] Rojnuckarin, A., Kim, S., and Subramaniam, S., 1998. “Brownian dynamics simulations of protein folding: Access to milliseconds time scale and beyond”. Proceedings of the National Academy of Sciences, 95(8), pp. 4288–4292. [20] Li, Z., and Scheraga, H., 1987. “Monte Carlo-minimization approach to the multiple-minima problem in protein folding”. Proceedings of the National Academy of Sciences, 84(19), pp. 6611–6615. [40] Gabdoulline, R. R., and Wade, R. C., 2001. “Protein-protein association: Investigation of factors influencing association rates by Brownian dynamics simulations”. Journal of Molecular Biology, 306(5), pp. 1139–1155. [21] David, J., and Doye, J. P. K., 1997. “Global optimization by basinhopping and the lowest energy structures of Lennard-Jones clusters containing up to 110 atoms”. The Journal of Physical Chemistry A, 101(28), pp. 5111–5116. [22] Nayeem, A., Vila, J., and Scheraga, H. A., 2004. “A comparative study of the simulated-annealing and Monte Carlo-with-minimization approaches to the minimum-energy structures of polypeptides:[met]enkephalin”. Journal of Computational Chemistry, 12(5), pp. 594– 605. [23] Prentiss, M., Wales, D. J., and Wolynes, P. G., 2008. “Protein structure prediction using basin-hopping”. Journal of Chemical Physics, 128(22), p. 225106. [24] Schug, A., and Wenzel, W., 2004. “Predictive in silico all-atom folding of a four-helix protein with a free-energy model”. Journal of the American Chemical Society, 126(51), pp. 16736–16737. [25] Schug, A., and Wenzel, W., 2006. “An evolutionary strategy for allatom folding of the 60-amino-acid bacterial ribosomal protein l20”. Biophysical Journal, 90(12), pp. 4273–4280. [26] Verma, A., Gopal, S. M., Oh, J. S., Lee, K. H., and Wenzel, W., 2007. “All-atom De Novo protein folding with a scalable evolutionary algorithm”. Journal of Computational Chemistry, 28(16), pp. 2552–2558. [27] Abagyan, R. A., and Totrov, M., 1994. “Biased probability Monte Carlo conformational searches and electrostatic calculations for peptides and proteins”. Journal of Molecular Biology, 235(3), pp. 983–1002. [28] Abagyan, R. A., and Totrov, M., 1999. “Ab Initio folding of peptides by the optimal-bias Monte Carlo minimization procedure”. Journal of Computational Physics, 151, pp. 402–421. [29] Carr, J. M., and Wales, D. J., 2005. “Global optimization and folding pathways of selected α-helical proteins”. Journal of Chemical Physics, 123(23), p. 234901. [30] Klenin, K., Strodel, B., Wales, D., and Wenzel, W., 2011. “Modelling proteins: Conformational sampling and reconstruction of folding kinetics”. Biochimica et Biophysica Acta (BBA)-Proteins and Proteomics, 1814(8), pp. 977–1000. [31] Gear, C. W., 1971. Numerical Initial Value Problems in Ordinary Differential Equations. Prentice Hall. [41] Ando, T., and Yamato, I., 2005. “Free energy landscapes of two model peptides: α-helical and β-hairpin peptides explored with Brownian dynamics simulation”. Molecular Simulation, 31(10), pp. 683–693. [42] Frembgen-Kesner, T., and Elcock, A. H., 2009. “Striking effects of hydrodynamic interactions on the simulated diffusion and folding of proteins”. Journal of Chemical Theory and Computation, 5(2), pp. 242– 256. [43] Scheraga, H., Khalili, M., and Liwo, A., 2007. “Protein-folding dynamics: Overview of molecular simulation techniques”. Annual Reveiw of Physical Chemistry, 58, pp. 57–83. [44] Kazerounian, K., 2004. “From mechanisms and robotics to protein conformation and drug design”. Journal of Mechanical Design (JMD), 126(1), pp. 40–45. [45] Kazerounian, K., Latif, K., Rodriguez, K., and Alvarado, C., 2005. “Nano-kinematics for analysis of protein molecules: Analysis and design of protein based nanodevices”. Journal of Mechanical Design (JMD), 127(4), pp. 699–711. [46] Kazerounian, K., Latif, K., Rodriguez, K., and Alvarado, C., 2004. “ProtoFold: Part I–nanokinematics for analysis of protein molecules”. In Proceedings of the 2004 ASME International Design Engineering Technical Conferences and Computers and Information in Engineering Conference (IDETC/CIE’2004), no. DETC2004-57243, American Society of Mechanical Engineers (ASME), pp. 645–658. [47] Kazerounian, K., Latif, K., and Alvarado, C., 2004. “ProtoFold: Part II–a successive kineto-static compliance method for protein conformation prediction”. In Proceedings of the 2004 ASME International Design Engineering Technical Conferences and Computers and Information in Engineering Conference (IDETC/CIE’2004), no. DETC200457247, American Society of Mechanical Engineers (ASME), pp. 669– 677. [48] Kazerounian, K., Latif, K., and Alvarado, C., 2005. “Protofold: A successive kinetostatic compliance method for protein conformation prediction”. Journal of Mechanical Design (JMD), 127, pp. 712–717. [49] Shahbazi, Z., Ilieş, H. T., and Kazerounian, K., 2010. “Hydrogen bonds and kinematic mobility of protein molecules”. Journal of Mechanisms and Robotics (M&R), 2(2), pp. 021009:1–9. [32] Beeman, D., 1976. “Some multistep methods for use in molecular dynamics calculations”. Journal of Computational Physics, 20(2), pp. 130–139. [50] Shahbazi, Z., Pimentel, T. A. P. F., Ilieş, H., Kazerounian, K., and Burkhard, P., 2010. “A kinematic observation and conjecture for creating stable constructs of a peptide nanoparticle”. In Advances in Robot Kinematics: Motion in Man and Machine, J. Lenarcic and M. M. Stanisic, eds. Springer Netherlands, pp. 203–210. [33] Swope, W. C., Andersen, H. C., Berens, P. H., and Wilson, K. R., 1982. “A computer simulation method for the calculation of equilibrium constants for the formation of physical clusters of molecules: Application to small water clusters”. Journal of Chemical Physics, 76(1), pp. 637– 649. [51] Shahbazi, Z., and Demirtaş, A., 2015. “Rigidity analysis of protein molecules”. Journal of Computing and Information Science in Engineering (JCISE), 15(3), pp. 031009:1–6. [52] Shahbazi, Z., 2015. “Mechanical model of hydrogen bonds in protein molecules”. American Journal of Mechanical Engineering, 3(2), pp. 47–54. [34] Hockney, R. W., and Eastwood, J. W., 1988. Computer Simulation Using Particles. Taylor & Francis. [35] van Gunsteren, W., and Berendsen, H., 1988. “A leap-frog algorithm for stochastic dynamics”. Molecular Simulation, 1(3), pp. 173–185. [36] Ricci, A., and Ciccotti, G., 2003. “Algorithms for Brownian dynamics”. Molecular Physics, 101(12), pp. 1927–1931. [37] Guarnieri, F., and Still, W., 2004. “A rapidly convergent simulation method: Mixed Monte Carlo/stochastic dynamics”. Journal of Computational Chemistry, 15(11), pp. 1302–1310. 28 [53] Tavousi, P., and Ilieş, H. T., 2015. “Synthesizing functional mechanisms from a link soup”. In Proccedings of the 2015 ASME International Design and Engineering Technical Conferences and Computer and Information in Engineering Conference (IDETC/CIE’2015), no. DETC2015-47311, American Society of Mechanical Engineers (ASME), pp. V05CT08A044:1–14. [54] Tavousi, P., and Ilieş, H. T., 2016. “Synthesizing functional mechanisms from a link soup”. Journal of Mechanical Design (JMD), (to appear). [55] Mashayak, S. Y., and Tanner, D. E., 2011. Comparing solvent models for molecular dynamics of protein. Technical report, University of Illinois at Urbana-Champaign. [56] Jorgensen, W. L., and Tirado-Rives, J., 2005. “Potential energy functions for atomic-level simulations of water and organic and biomolecular systems”. Proceedings of the National Academy of Sciences of the United States of America, 102(19), pp. 6665–6670. [57] Wang, H., Junghans, C., and Kremer, K., 2009. “Comparative atomistic and coarse-grained study of water: What do we lose by coarsegraining?”. The European Physical Journal E: Soft Matter and Biological Physics, 28(2), pp. 221–229. [58] Izvekov, S., and Voth, G. A., 2005. “Multiscale coarse graining of liquid-state systems”. Journal of Chemical Physics, 123, p. 134105. [75] Still, W. C., Tempczyk, A., Hawley, R. C., and Hendrickson, T., 1990. “Semianalytical treatment of solvation for molecular mechanics and dynamics”. Journal of the American Chemical Society, 112(16), pp. 6127–6129. [76] Onufriev, A., Case, D., and Bashford, D., 2002. “Effective Born radii in the generalized Born approximation: the importance of being perfect”. Journal of Computational Chemistry, 23(14), pp. 1297–1304. [77] Rappe, A., and Casewit, C., 1997. Molecular Mechanics Across Chemistry. University Science Books. [78] Wesson, L., and Eisenberg, D., 1992. “Atomic solvation parameters applied to molecular dynamics of proteins in solution”. Protein Science, 1(2), pp. 227–235. [79] Kyte, J., and Doolittle, R. F., 1982. “A simple method for displaying the hydropathic character of a protein”. Journal of Molecular Biology, 157(1), pp. 105–132. [59] Roux, B., and Simonson, T., 1999. “Implicit solvent models”. Biophysical Chemistry, 78(1), pp. 1–20. [60] Eisenberg, D., and McLachlan, A., 1986. “Solvation energy in protein folding and binding”. Nature, 319, pp. 199–203. [61] Richmond, T. J., 1984. “Solvent accessible surface area and excluded volume in proteins: Analytical equations for overlapping spheres and implications for the hydrophobic effect”. Journal of Molecular Biology, 178(1), pp. 63–89. [62] Brooks, B. R., Bruccoleri, R. E., Olafson, B. D., Swaminathan, S., and Karplus, M., 2004. “CHARMM: A program for macromolecular energy, minimization, and dynamics calculations”. Journal of Computational Chemistry, 4(2), pp. 187–217. [80] Sharp, K. A., Nicholls, A., Friedman, R., and Honig, B., 1991. “Extracting hydrophobic free energies from experimental data: Relationship to protein folding and theoretical models”. Biochemistry, 30(40), pp. 9686–9697. [81] Lee, B., and Richards, F., 1971. “The interpretation of protein structures: Estimation of static accessibility”. Journal of Molecular Biology, 55(3), pp. 379–400, IN3–IN4. [82] Wolfenden, R., Andersson, L., Cullis, P. M., and Southgate, C. C. B., 1981. “Affinities of amino acid side chains for solvent water”. Biochemistry, 20(4), pp. 849–855. [83] Muller, M. E., 1959. “A note on a method for generating points uniformly on n−dimensional spheres”. Communications of the ACM (CACM), 2(4), pp. 19–20. [63] Wodak, S. J., and Janin, J., 1980. “Analytical approximation to the accessible surface area of proteins”. Proceedings of the National Academy of Sciences, 77(4), pp. 1736–1740. [64] Fraternali, F., and van Gunsteren, W. F., 1996. “An efficient mean solvation force model for use in molecular dynamics simulations of proteins in aqueous solution”. Journal of Molecular Biology, 256(5), pp. 939– 948. [65] van Gunsteren, W. F., Daura, X., and Mark, A. E., 2002. “GROMOS force field”. Encyclopedia of Computational Chemistry. [66] Allison, J. R., Boguslawski, K., Fraternali, F., and van Gunsteren, W. F., 2011. “A refined, efficient mean solvation force model that includes the interior volume contribution”. The Journal of Physical Chemistry B, 115(15), pp. 4547–4557. [67] Weiner, S. J., Kollman, P. A., Case, D. A., Singh, U. C., Ghio, C., Alagona, G., Profeta, S., and Weiner, P., 1984. “A new force field for molecular mechanical simulation of nucleic acids and proteins”. Journal of the American Chemical Society, 106(3), pp. 765–784. [68] Cornell, W., Cieplak, P., Bayly, C., Gould, I., Merz, K., Ferguson, D., Spellmeyer, D., Fox, T., Caldwell, J., and Kollman, P., 1995. “A second generation force field for the simulation of proteins, nucleic acids, and organic molecules”. Journal of the American Chemical Society, 117(19), pp. 5179–5197. [84] Yershova, A., and LaValle, S. M., 2004. “Deterministic sampling methods for spheres and so(3)”. In Proceedings of the 2004 IEEE International Conference on Robotics and Automation (ICRA’2014), Vol. 4, Institute of Electrical and Electronics Engineers (IEEE), pp. 3974–3980. [85] Maggs, B. M., Matheson, L. R., and Tarjan, R. E., 1995. “Models of parallel computation: A survey and synthesis”. In Proceedings of the 28th Hawaii International Conference on System Sciences, Vol. 2, Institute of Electrical and Electronics Engineers (IEEE), pp. 61–70. [86] Lins, R. D., and Ferreira, R., 2006. “The stability of right- and lefthanded alpha-helices as a function of monomer chirality”. Quı́mica Nova, 29(5), pp. 997–998. [87] Davis, I. W., Leaver-Fay, A., Chen, V. B., Block, J. N., Kapral, G. J., Wang, X., Murray, L. W., Arendall, W. B., Snoeyink, J., Richardson, J. S., and Richardson, D. C., 2007. “MolProbity: All-atom contacts and structure validation for proteins and nucleic acids”. Nucleic Acids Research, 35, pp. W375–W383. [88] Chen, V. B., Arendall, W. B., Headd, J. J., Keedy, D. A., Immormino, R. M., Kapral, G. J., Murray, L. W., Richardson, J. S., and Richardson, D. C., 2009. “MolProbity: All-atom structure validation for macromolecular crystallography”. Acta Crystallographica Section D: Biological Crystallography, 66(1), pp. 12–21. [69] Weiser, J., Shenkin, P. S., and Still, W. C., 1999. “Approximate atomic surfaces from linear combinations of pairwise overlaps (LCPO)”. Journal of Computational Chemistry, 20(2), pp. 217–230. [89] Petsko, G. A., and Ringe, D., 2004. Protein Structure and Function. New Science Press. [70] Cole, R., and Vishkin, U., 1989. “Faster optimal parallel prefix sums and list ranking”. Information and Computation, 81(3), pp. 334–352. [90] Eilers, M., Patel, A. B., Liu, W., and Smith, S. O., 2002. “Comparison of helix interactions in membrane and soluble α−bundle proteins”. Biophysical Journal, 82(5), pp. 2720–2736. [71] Gupta, K. C., 1986. “Kinematic analysis of manipulators using the zero reference position description”. The International Journal of Robotics Research, 5(2), pp. 5–13. [72] Subramanian, R., and Kazerounian, K., 2007. “Improved molecular model of a peptide unit for proteins”. Journal of Mechanical Design (JMD), 129(11), pp. 1130–1136. [73] Bajaj, C., and Zhao, W., 2010. “Fast molecular solvation energetics and forces computation”. SIAM Journal on Scientific Computing, 31(6), pp. 4524–4552. [74] Fogolari, F., Brigo, A., and Molinari, H., 2002. “The Poisson– Boltzmann equation for biomolecular electrostatics: A tool for structural biology”. Journal of Molecular Recognition, 15(6), pp. 377–392. 29
5cs.CE
1 Elements of nonlinear analysis of information streams A.M. Hraivoronska, D.V. Lande Institute for Information Recording of the NAS of Ukraine [email protected] Abstract This review considers methods of nonlinear dynamics to apply for analysis of time series corresponding to information streams on the Internet. In the main, these methods are based on correlation, fractal, multifractal, wavelet, and Fourier analysis. The article is dedicated to a detailed description of these approaches and interconnections among them. The methods and corresponding algorithms presented can be used for detecting key points in the dynamic of information processes; identifying periodicity, anomaly, self-similarity, and correlations; forecasting various information processes. The methods discussed can form the basis for detecting information attacks, campaigns, operations, and wars. Key words: Information streams, time series, nonlinear dynamics, correlation analysis, fractal analysis, forecasting Introduction To study information streams on the Internet, i.e., the streams of messages published on websites, social networks, blogs, etc., up-to-date techniques should be applied, because known methods of generalizing information arrays (classification, phase integration, cluster analysis, etc.) are not always suitable for an adequate quantitative reflection of processes occurring in the information space [Lande, 2007]. Quantitative analysis of the dynamics of information streams generated on the Internet has become one of the most informative methods for investigating topicality of various themes in the information space. Diverse qualitative factors influence the dynamics, with many of them cannot be described accurately. However, the general nature of the time-dependent number of thematic publications on the Internet allows constructing mathematical models, studying, and forecasting. The observed time-dependent volume of information streams convincingly shows that the mechanisms of their generation and dissemination are associated with complex nonlinear processes. This article is dedicated to this particular subject. A formal description of the information stream For information streams to be described formally, we introduce some general assumptions. First let us define an information stream [Dodonov, 2009]. This definition corresponds to the classical definition used in the information theory. Consider a segment of the time axis such that . Assume that the number of documents published during this period equals to , which occurs according to some patterns. Suppose documents are published at times . The process is called the information stream if the realization of this process consists of the numbers of points (documents) appeared from to . Further, we are going to consider discrete time series corresponding to the function . Note that the values of the function belong to and do not decrease; therefore, this function is a nondecreasing step function. The values of the time series are the step sizes. Further, we deal with discrete time series, with the values fixed at equidistant time intervals. Denote such time series by or for short { } , assuming that the observations are made at time interval : . The problem under consideration requires the time series to be described only in terms of the probability distribution, i.e., we consider statistical time series. In the article, we analyze a time series as a realization of some stochastic process. 2 As examples, we will use three time series obtained from the network service Google Trends. These time series reflect the level of interest to Donald Trump, Hilary Clinton and the information attacks of "Russian hackers" from August 2016 to April 2017. Time series obtained from Google Trends show the dynamics of the popularity for the search query. The maximum of the graph is 100, which corresponds to the date when the query was most popular, and all other points are determined as a percentage of the maximum. All the time series are shown in Figure 1. For referring conveniently, we denote these time series by T (D. Tramp), C (H. Clinton), and H ("Russian hackers") Figure 1. Time series obtained from Google Trends. These time series reflect the level of interest to D. Trump, H. Clinton and "Russian hackers" from August 2016 to April 2017. Correlation Many methods of studying time series are based on some assumption about statistical equilibrium or stability. One of such useful assumptions is stationarity [Box, 2015]. A time series is called strictly stationary if its statistical properties are not affected by a change of time origin. Formally, if the joint probability distribution of random variables is exactly the same as the joint probability distribution of for all integer k, then the time series { } is said to be strictly stationary. A stationary time series has a constant mean and a constant variance with the values series and can be estimated as the sample mean and the sample variance of the time ̂ ̅ ∑ ̂ ∑ ̅ (1) The stationarity assumption is also of great importance for comparing time series. A measure of linear dependence between random variables is covariance. Defined for time series is the covariance function. By definition, cross-covariance at lag between random processes { } and { } is equal to [ ( )] It follows from the assumption of strict stationarity that the joint probability distribution of is the same for any . It implies that the covariance between and do not depend on , depending only on . In other words, for all . The collection of values { } is called the cross-covariance function. To get a cross-correlation coefficient, we normalize a cross-covariance coefficient Note that the cross-correlation function is a measure of similarity between time series. The cross-correlation and cross-covariance coefficients have following wide-used estimates [Montgomery, 2008] 3 ̂ ∑ ̅ ̅ ̂ ̂ ̂ Figure 2 is provided to illustrate the definition of correlation. We consider two time series with zero means. To get the correlation coefficient between these time series we should multiply corresponding values and calculate their average. The result of the multiplication is shown as the line without markers in Figure 2. The area of the darkened region is equal to the covariance coefficient between the time series, taking into account the sign. Figure 2. The darkened region shows the contribution to the correlation between time series. Consider the estimation of the cross-correlation function for time series T and C (Figure 3). The function has maximum (approximately 0.8) at lag 0. It means that two time series which correspond to the interest level to Donald Trump and Hilary Clinton are strongly correlated. Figure 3. The cross-correlation function for the T and C time series versus lag. Autocorrelation One can calculate the covariance not only using two different time series but also using just one time series. The covariance between two values of one time series is called the autocovariance at lag k [ ] The collection of the values collection of the normalized values [ is called the autocovariance function and the is called autocorrelation function ] √ The autocorrelation function describes the correlation between values of a random process at different times [Chatfield, 2004]. In many cases the autocovariance and autocorrelation coefficients are estimated as follows 4 ̂ ∑ ̅ ̅ ̂ ̂ ̂ Shown in Figure 4 is the autocorrelation function of time series T. Figure 4. The autocovariance function of the T time series versus lag. Fourier analysis The classical Fourier analysis is applied to study a function in the time and frequency domains. The idea behind the mapping to the frequency domain is that a function is decomposed into components that are harmonic oscillations at different frequencies. Each frequency corresponds to a coefficient that reflects the amplitude of the oscillation at a given frequency. If we represent the function graphically in the time domain, we get information about how the function changes over the time. If we represent the function in the frequency domain, we obtain information about the frequencies of the oscillations it contains. Mathematically speaking, to map a function from one domain to another the direct and inverse Fourier transform are used ̂ ∫ ∫ ̂ Shown in Figure 5a is an example of the function defined as a sum of three sins with different periods. If we look at the graphical representation of the function in the time domain, it is quite difficult to understand that the function consists of three harmonic oscillations and determine their periods. Shown in Figure 5a is the Fourier transform for the function. From the graph in the frequency domain, it is clear that the function contains oscillations at three different frequencies. a b Figure 5. (a) The sum of three sins with different periods. (b) The estimated Fourier spectrum for the function shown in (a). 5 The Fourier transform has various modern applications in machine learning systems. In many investigations, the Fourier spectra are used as train data. For example, proposed in [Rodrigues 2014] is a time series predictive model in which the Fourier spectrum with some other parameters is the input for a neural network. The Fourier transform can be thought of as a correlation between the signal and different oscillating functions. Figure 6 illustrates this idea similarly to Figure 2. Despite its advantages and numerous applications, the Fourier transform is a quite meaningless method for investigating functions that evolve over time. For such functions, we need some approach of estimating the spectrum not over the entire length of the time series, but over its various parts. An example of such an approach is Gabor transform ∫ The window function gives higher weight to the part of a time series around the time , with the parameter determining a width of the window. Figure 6. An illustration to the definition of the Fourier transform as the correlation between the function in question and a harmonic function. When using the Gabor transform, there is a problem to choose the width of the window. The next type of transforms allows making the window function frequency-dependent in such a way that the window becomes wider for low frequencies and narrower for high ones. This type is called the wavelet transform. The main advantage of the wavelet transform is that a part of the time series is analyzed with the degree of detail that corresponds to its size. Wavelet analysis The wavelet transform has a correlation nature. In this case, we consider a correlation of the function with a wavelet. For this procedure to be always possible to perform and the correlation coefficients to be informative, the wavelet must satisfy certain mathematical criteria. Literally, the word wavelet means a "small wave" and, as the name implies, the wavelet is well localized in time. Mathematically speaking, the wavelet is a function which satisfies the following properties: 1. The function energy is square integrable ( ∫| 2. By ̂ ) or, in other words, has finite | denote the Fourier transform of , then 6 ∫ |̂ | Shown in Figure 7 are examples of wavelets which are widely used in applications Figure 7. Examples of wavelets to be applied in practice. The Gaussian wave, the Mexican hat wavelet, the Haar wavelet, and the Morlet wavelet (real part). Continuous wavelet transform The wavelet described above is called the mother wavelet or analyzing wavelet. Based on the mother wavelet, a family of wavelets is constructed by stretching/squeezing and moving along the time axis. These transformations are necessary for exploring different parts of the original signal with various degrees of detail. Let and be a scale parameter and a location parameter. Then the shifted and dialed version of the mother wavelet is as follows √| | ( ) The wavelet transform has been called a ‘mathematical microscope,’ where is the location of the time series being ‘viewed’ and is associated with the magnification at location b. [Addison, 2017] The continuous wavelet transform of the function √| | ∫ ( ) is ∫ } where is complex conjugate of , the values { is called the coefficients of the wavelet transform. From the formula in the definition of the continuous wavelet transform, one can see that the essence of this transform is the calculation of correlation coefficients. Let us visualize the wavelet coefficients for T, C, and H time series. Shown in Figure 8 are so called wavelet transform plots (plots of versus and ). The results of the wavelet transform for T are shown in Figure 8 (a, b) where the Mexican hat wavelet (a) and the Gaussian wave wavelet (b) have been used. The results of the wavelet transform for C and H are shown in Figure 8 (c, d). a b c d Figure 8. (a, b) The wavelet transform coefficients for the time series T obtained using the Mexican hat wavelet and the Morlet wavelet; (c, d) The wavelet transform coefficients for the time series C and H obtained using the Mexican hat wavelet. 7 Note once again that both the continuous Wavelet transform and the Fourier transform can be considered in terms of correlation. The Fourier transform is the correlation between the time series and the wave function . The wave covers the entire time axis and has the only one parameter , therefore the Fourier transform depends only on the frequency. The wavelet transform is the correlation between the time series and the wavelet . Thus, the wavelet transform depends on the location of the wavelet on the time axis and its scale parameter . Comparing time series using the wavelet transform Let us consider some approaches to comparing time series in wavelet space. These approaches can be applied to determine some kind of relationship between time series. Numerous metrics for comparing the coefficients of wavelet transforms as well as examples of their application to practical problems are described in detail in [Addison, 2017]. Consider two time series and . By and denote their coefficients of the wavelet transform. We begin with the simplest way to compare two collections of values, namely, we substitute the absolute values of the coefficients | | | | Shown in Figure 9 are for pairs of time series: T and C, T and H. In this simple way, it is possible to highlight regions in which the wavelet coefficients are similar, and consequently, the time series have similar parts. Figure 9. The values of for the pair T and C (left) and the pair T and H (right). Additional information can be obtained by using a complex wavelet (for example, the Morlet wavelet). Then, in addition to the absolute value of the wavelet coefficients, one can use a phase. Recall that the complex coefficient can always be represented in the form | | Therefore, we can compare the phases of the coefficients The cross-wavelet transform is used to determine regions of the coincidental energy between time series in the transform domain, as well as to get the relative phase The absolute values | | are often plotted to visualize this metric. In this case, the plot is similar to a scalogram, and if time series and are identical, we get exactly the scalogram. Appling the cross-wavelet transform is of particular interest in the case when a complex wavelet is used. It follows | | || | | ( | | ) Thus, by calculating the cross-wavelet transform, it is possible to find the phase difference between the wavelet coefficients for two time series. Shown in Figure 10 are for the T and C time series where the Mexican hat wavelet has been used. Highlighted for T and C (the left part of Figure 10) is the region corresponding to the peak of interest during the election. In this region both time series have high energy. 8 Figure 10. The cross-wavelet transform for the pair T and C (left) and the pair T and H (right). The methods of cross-wavelet analysis are useful for studying properties of several time series with non-trivial dependence among themselves. For example, [Aguiar-Conraria, 2008] applies the cross-wavelet analysis tools to show that the relationship between monetary policy variables and macroeconomic variables has changed over time, and these changes are not homogeneous at different frequencies. Data obtained with the help of the cross-wavelet transform can also be used as input data for classification algorithms. In [Dey, 2010], the coefficients of the cross-wavelet transform are used as the input to an artificial neural network and a Fuzzy classifier. -method Scalograms obtained by the continuous wavelet transform are used to visualize special features of time series. In [Lande, 2009] another method of visualization is proposed. The method helps to identify trends, periodicity and local features of the time series. Moreover, the proposed approach is much easier to implement than the wavelet analysis. The Δ-method is based on the DFA (Detrended Fluctuation Analysis) method, which will also be considered in the article. The essence of the approach is to determine and visualize the absolute deviation of the accumulated time series from the corresponding values of linear approximation. Now we describe -method in more detail. First, let us fix a length for a segment. We split up the time series into overlapping segments. For the point we choose the segment with length s and the center at the point (or at the point if s is even). For each segment fit the points in it with a linear function. Denote the value of local approximation at the point by . Next, calculate the absolute deviation of from the approximation line, as follows | |. According to the method we calculate values Firstly, we calculate standard deviation with given √ ∑| for all | and [ ]. √ ∑ Secondly, we take the average value of ∑ Further, the values obtained are demonstrated on a diagram similar to the scaling diagram. An example of such diagram is shown in Figure 12. Figure 12. The coefficients obtained with the -method for T. 9 The proposed method of visualizing absolute deviations allows to identify single and irregular peaks, sharp changes in the values of quantitative indicators at different times, as well as harmonic components in time series. Fractal analysis Many objects in the world are statistically self-similar (a classic example is coastlines). Selfsimilarity means that parts of such objects have the same statistical characteristics at different scales. When studying the dynamic of information streams, the structure of document arrays on the Internet, and processes in the information space, self-similar structures often arise, and in particular, self-similar time series. Let us define the self-similar process. } is called the self-similar process with the Hurst The real-valued process { } are identical to the finiteexponent if the finite-dimensional distributions of { } for all dimensional distributions of { . This requirement may be written economically as { } { } By definition, changing the time scale for a self-similar process is equivalent to changing the scale of the process values. This means that realizations of such processes are similar at different scales. However, it is natural that the process is not an exact copy of itself at different scales, only statistical properties are the same. The Hurst exponent is known to be a measure of persistence - the tendency of the process to trends. The value H = 0.5 means that behavior of time series is uncorrelated, as in Brownian motion. Values in the range 0.5 <H <1 mean that the directed dynamics of the process in the past is likely to lead to proceeding the movement in the same direction. If H< 0.5 then the process is likely to change the direction [Braichevsky, 2010]. Let us describe some properties of self-similar processes that are of particular importance for applications. First, the autocovariance function of a self-similar process decays to zero hyperbolically, and the following estimate takes place where is a slowly-varying-at-infinity function. Consequently, the series of covariance coefficients is divergent ∑ This divergent series indicates a long-term dependence in the time series. Second, let us split the time series { } into non-overlapping segments with elements in each one. Denote by { } the means for each segment. Then the variance of the mean decays ( slower than the inverse to the size of the sample ) . Estimating the Hurst exponent The best-known method for estimating the Hurst exponent is rescaled range (R/S) method. Let us recall the standard deviation for a time series { } √ ∑ and the range ̅ ̅ ∑ 10 ∑ ̅ Dividing R by S we get the rescaled range. For many time series observed the rescaled range is well-fitted by the following power law ( ) The estimate of the Hurst exponent can be obtained by calculating statistic as a function of , plotting versus , and fitting a straight line. The slope of the line gives the estimate of the Hurst exponent. We will apply method to get the Hurst exponent for the T, C and H time series. Shown in Figure 12 are the results of assessing for T series. The obtained values of the Hurst exponent are 0.62 for T and 0.68 for C, which points out that these processes appear to follow a trend, although not very strictly. a b Figure 12. (a) The dependence of the R / S statistics on time for the T series on a log-log plot. (b) The dependence of the Hurst exponent on time for the T series. As for the H time series, the dependence of on is poorly fitted by a straight line, because the line shown in Figure 13a has a strong fracture. If we plot the dependence of the Hurst exponent on time (Figure 13b), we can determine the time from which begins to decrease. Marking this time on the plot of H time series (Figure 13c), it becomes clear that the process before this time has much smaller variance than after. The behavior of the H time series since the beginning of December 2016 (the beginning of the largest peak in the values of the time series) can be analyzed separately from the first part. The estimate of the Hurst exponent for the second part of the time series equals to 0.7. It should be taken into account that this time series becomes too short for analysis. Time series must have at least 200 elements and better more than 300 elements to achieve correct results. Nevertheless, the sharp change in the dependence of the Hurst exponent on time indicates that the process under investigation is made up of various processes. In such cases, it may be useful to analyze these processes separately. 11 a b c Figure 13. (a) The dependence of the R / S statistics on time for the H series on a log-log plot. (b) The dependence of the Hurst exponent on time for the H series. (c) The H time series with the time of a rapid change marked. Multifractals The only one fractal dimension turns out to be not enough to describe many self-similar objects found. In many cases, real objects are not homogeneous. The multifractal theory provides a more general description of the essential characteristics of complex self-similar objects. According to this theory, an object is characterized by a continuous spectrum of dimensions, which makes possible to distinguish homogeneous objects from heterogeneous ones. Multifractal set (signal) can be understood as a union of homogeneous fractal subsets (signals) with different fractal dimensions. The fractal dimensions are represented in a multifractal spectrum to be defined later. It is worth noticing that the multifractal spectrum can be used as a measure of similarity between objects. We can use such approach, for example, to form representative samples from document arrays, as an addition to traditional methods based on the identification of content similarity of documents. This approach has following practical applications: presenting to the user adequate number of search results that reflect the full range of the documentary array; selecting subsets of documents for further research [Lande, 2009a]. The exponent and multifractal analysis To define the multifractal spectrum, the H lder exponent will be required. The H lder exponent characterizes the smoothness of a function and contains information on the regularity of a function in a neighborhood of a point. The smaller the H lder exponent is, the less regular the function is. Let be a locally bounded function on and . The H lder exponent of at { | | } In other words, the H lder exponent characterizes local behavior of the function in the following way | | It is mentioned above that multifractal objects are not homogeneous; hence, their pointwise H lder regularity changes from point to point. Therefore, it is useful to obtain information about sets in which the exponent takes a given value { } 12 To make some meaningful conclusions about one should determine and compare the sizes of such sets. It follows from practical cases that the fractal dimension is a reasonable formalization of size to be used in such analysis [Aldroubi, 2016]. This reasoning leads to the definition of the multifractal spectrum. The multifractal spectrum of a locally bounded function is the mapping Thus, the multifractal spectrum reveals the values of the H lder exponent contained in the heterogeneous object (set, signal, measure) and proportionality among them. Each value of the H lder exponent corresponds to the fractal dimension of the set in which the value of the Holder exponent is equal to a given one. An approach to estimating the multifractal spectrum The theoretical approach to the determination of the multifractal spectrum is described above. For practical purposes, a calculation of the H lder exponent at each point and determination of the fractal dimensions are numerically unstable and often meaningless. Therefore, a numerical approach is different. It based on the following lemma which follows from the definition of the H lder exponent. Lemma. Let [ be a locally bounded function and ( [ ( ( ))) ], then ] where denoted by is the range of the function on the set . It follows from the lemma that the multifractal formalism for functions can be based on the structure function ∑ ( ( )) (2) ) (3) and the corresponding scale function ( ( ) that leads to defining the multifractal spectrum as follows The expression for the multifractal spectrum through the scale function can be applied to the numerical analysis of time series. First, the structure function and the scale function are determined, and then through the Legendre transform, we come up with the multifractal spectrum [Mallat, 2009]. The DFA method and its application to estimating the multifractal spectrum [Peng, 1994] proposes the Detrended Fluctuation Analysis (DFA) method to determine long-term correlations in noisy and non-stationary time series. The key feature of the DFA method is that it is based on the theory of random walks. The time series is not analyzed in the original form. Instead, the series is transformed to accumulated sums ∑ 13 In this case, the point appears to be the location of the random walk after steps. Further, the DFA method involves an analysis of the mean square deviation from the trend in various regions of the series. For the DFA method, many modifications have been proposed, as well as applications to numerous practical tasks. An overview of such methods is given, for example, in [Kantelhardt, 2009]. In particular, -method introduced above is based on the DFA method. An important step is the development of an approach to the numerical estimation of the multifractal spectrum based on the DFA method. This method is called Multifractal Detrended Fluctuation Analysis (MF-DFA) and is proposed in [Kantelhardt, 2002]. The effectiveness of the MF-DFA method was analyzed for various model time series (Brownian motion, fractional Brownian motion, binomial cascades) [Oswiecimka, 2012]. The method is also actively used for the analysis of real time series, for example, economic ones [Suarez-Garcia, 2013]. A step-by-step description and explanation of the MF-DFA algorithm can be found in [Thompson, 2016]. The use of wavelets for estimating the multifractal spectrum Wavelets are a natural tool to investigate the fractal characteristics of an object [Jaffard, 2004] [Aldroubi, 2016]. The reason for this is the fact that the pointwise H lder exponent can be estimated through the wavelet coefficients. The following proposition connects the wavelet transform with the H lder exponent. Proposition. Let the function has the Hölder exponent at the point . Assume that the function at has not an oscillating singularity. If the first moments of the wavelet are equal 0 and , then [ ] (4) Otherwise, if we choose the wavelet with , then [ ] (5) From the proposition it follows that the behavior of the function in a neighborhood of [ ] can be characterized as follows: the smoother the function is, the more quickly decays as s tends to zero. For instance, if the function is continuously differentiable at the point (this means that ), then the wavelet transform approximately has the form (5). It means that [ ] the values depend on the form of the wavelet. In practice, we often meet a fundamentally different case in which the function at the point has a H lder exponent in the range from 0 to 1. In this case, the formula (4) is valid. This connection between the approximate behavior of wavelet coefficients and the H lder exponent is of essential importance for the waveletbased estimation of the multifractal spectrum. The use of maxima lines for estimating the spectrum. WTMM The approach to estimating the multifractal spectrum using the maximum lines has been actively developed since [Mallat, 1992]. The expressions (4) and (5) turns out to be valid if we [ ] [ ] consider the curve of local modulus maxima of instead of the sequence for a constant and decreasing scale . First, we introduce the necessary definitions. [ ] [ ] A modulus maximum is a point such that , where [ ] denoted by is either left or right neighbor of , with the strict inequality [ ] hold for at least one neighbor of (left or right). A maxima line is a connected curve in the scale space along which all points are modulus maxima. The set of maxima lines obtained from the wavelet transform of the function is called the skeleton. The skeleton for the series T is shown in Figure 15 (on the left, the skeleton is plotted over the wavelet coefficients). Such plots may be useful for visualization purposes. 14 Figure 15. The skeleton (the maxima lines) for the T series. The structure function depended on the maxima lines is as follows ∑ ( | [ ] |) Knowing the structure function, we can use formula (2) and (3) to determine the scaling function and the multifractal spectrum. Shown in Figure 16 are the scaling functions and the multifractal spectra for the T, C and H series. For comparing, Figure 16a shows the theoretic scaling function for Brownian motion . Figure 16. The scaling function for the T (a circle), C (a triangular), and H (an asterisk) time series; and the corresponding multifractal spectra estimated with the WTMM method. The multifractal spectrum can be used to compare time series. The same shape of multifractal spectra indicate the similarity of the series, otherwise, the different shapes of the spectra mean that there are fundamental differences in the nature of the series. This property is used in various studies. For example, [Sun, 2001] analyzes statistically how varying certain parameters affects the multifractal spectrum for the Hang Seng index in the Hong Kong stock market. [Zhou, 2009] presents an overview of the scientific results in the field of economics based on a comparison of multifractal spectra. Using the Dow Jones Industrial Average as an example, the author identifies economic factors that affect the shape of the spectrum. Conclusion Modern methods based on nonlinear analysis are to be applied for efficient analysis of modern information processes based on the monitoring of information streams from global computer networks, with many methods are of successful application in natural sciences. Up-to-date approaches to the analysis and modeling of public and information systems can be based on methods approved in natural sciences. Analyzing information streams is the foundation for modeling, design, and forecasting. The approaches discussed in this article allow describing information processes, information influence, general trends in the dynamics of information processes. At the same time, progress in mastering the modern information space is impossible without forming general ideas about the structure and properties of the dynamics of network information processes. This process requires identifying and taking into account stable patterns of the dynamics. Note that approaches based on the accurate methods, mathematical theory, and computer simulating can provide one-up qualitative results. This is conditioned by the multiparametericity of real models. Nevertheless, even such results can explain reality in many cases better than traditional qualitative methods. 15 The methods, algorithms, analytical tools discussed in this article are not only a demonstration basis for explaining real events and processes but also necessary components for planning and forecasting. References [Addison, 2017] Addison, Paul S. The illustrated wavelet transform handbook: introductory theory and applications in science, engineering, medicine and finance, Second edition / Addison, Paul S. – Boca Raton, FL : CRC Press, Taylor & Francis Group, 2016. – 446 p. [Aguiar-Conraria, 2008] Aguiar-Conraria, L. Using Wavelets to Decompose the Time– Frequency Effects of Monetary Policy / Luıs Aguiar-Conrariaa, Nuno Azevedob, Maria Joana Soares // Physica A: Statistical Mechanics and its Applications. – 2008. – Vol. 387. – Issue 12. – P. 2863–2878. [Aldroubi, 2016] Aldroubi, A. New Trends in Applied Harmonic Analysis: Sparse Representations, Compressed Sensing, and Multifractal Analysis / Akram Aldroubi, Carlos Cabrelli, Stephane Jaffard, Ursula Molter (eds.). – Birkhäuser Basel, 2016. – 334 p. – (Applied and Numerical Harmonic Analysis) [Box, 2015] Box, G. E. P. Time Series Analysis, Forecasting and Control / George E. P. Box, Gwilym M. Jenkins, Gregory C. Reinsel, Greta M. Ljung. – New Jersey: John Wiley & Sons, 2015. – 712 p. [Braichevsky, 2007] Braichevsky S., Lande D., Snarskii A. On the fractal nature of mutual relevance sequences in the Internet news message streams // arXiv preprint arXiv: 0710.0228, 2007. [Chatfield, 2004] Chatfield, C. The analysis of time series: an introduction 6th ed. / Chris Chatfield. – CHAPMAN & HALL/CRC, 2004. – 333 p. [Dey, 2010] Dey, D. Cross-wavelet Transform as a New Paradigm for Feature Extraction from Noisy Partial Discharge Pulses / D. Dey, B. Chatterjee, S. Chakravorti, S. Munshi // IEEE Transactions on Dielectrics and Electrical Insulation. – 2010. – Vol. 17. – No. 1. – P. 157–166. [Dodonov, 2009] Dodonov O.G. Information streams in global computer / Dodonov O.G., Lande D.V., Putiatin V.G. – К: Naukova dumka, 2009. – 295 p. [Feder, 1991] Feder J. Fractals. – Springer Science + Business Media, LLC, 1988. — 305 p. [Harte, 2001] Harte D. Multifractals. Theory and applications / David Harte. – Chapman and Hall/CRC , 2001. – 264 p. [Jaffard, 2004] Jaffard, S. Wavelet Techniques in Multifractal Analysis / Jaffard, S // Fractal Geometry and Applications: a Jubilee of Benoit Mandelbrot – Multifractals, Probability and Statistical Mechanincs, Applications. – San Diego: 2004. – Vol. 72. – Part 2. – P. 91-151. [Kantelhardt, 2002] Kantelhardt, Jan W., Zschiegner Stephan A., Koscielny-Bunde Eva et al. Multifractal detrended fluctuation analysis of nonstationary time series /– Physica A: Statistical Mechanics and its Applications. V.316, 2002. – P. 87-114. [Kantelhardt, 2009] Kantelhardt, Jan W. Fractal and multifractal time teries / Kantelhardt, Jan W. // Encyclopedia of Complexity and Systems Science. – Springer, 2009. – P. 3754–3779. [Lande, 2007] Dimitri Lande, Sergei Braichevski und Dimitri Busch.Informationsfluesse im Internet // IWP - Information Wissenschaft & Praxis, 59(2007), Heft 5, Seiten 277-284. [Lande, 2009] Lande D.V., Snarskii A.A. Diagram of measurement series elements deviation from local linear approximations // arXiv preprint arXiv:0903.3328, 2009. [Mallat, 1992] Mallat, S. Singularity Detection and Processing with Wavelets / Stephane Mallat, Wen Liang Hwang // IEEE Transactions on Information Theory. – 1992. – Vol. 38. – No. 2. – P. 617–643. 16 [Mallat, 2009] Mallat, S. A Wavelet Tour of Signal Processing The Sparse Way / Stephane Mallat. – Academic Press, 2009. – 805 p. [Mandelbrot, 1982] Mandelbrot, B. B. The fractal geometry of nature / Benoit B. Mandelbrot. – W. H. Freeman and Company, 1982. – 468 p. [Montgomery, 2008] Montgomery, Douglas C. Introduction to time series analysis and forecasting / Douglas C. Montgomery, Cheryl L. Jennings, Murat. – New Jersey: John Wiley & Sons, 2008. – 441 p. – (Wiley series in probability and statistics) [Oswiecimka, 2012] Effect of detrending on multifractal characteristics / Oswiecimka P., Drozd S., Kwapien J., Gorski A.Z. – eprint arXiv:1212.0354, 2012. [Peng, 1994] Mosaic organosation of DNA nucleotides / [Peng C.-K., Buldyrev S. V., Havlin S. et al.] – Physical Review E, V. 49 E. 2, 1994. [Rodriguez, 2014] Rodriguez N., Bravo G., Rodriguez N., Barba L. Haar Wavelet Neural Network for Multi-step-ahead Anchovy Catches Forecasting // Polibits. - 2014. - Issue 50. - P. 4953. [Snarskii, 2007] Snarskii А.А., Lande D.V., Braichevskii S.M., Darmokhval А. Distribution of documents according to the degree of relevance based on multifractal properties // Internetmatematika 2007: Proceedings of the contest participants. – Ekaterinburg, Publishing house of the Ural University, 2007. – 224 p. [Suarez-Garcia, 2013] Suarez-Garcia P. Multifractality and long memory of a financial index / Suarez-Garcia P., Gomez-Ullate D. – eprint arXiv:1306.0490, 2013. [Sun, 2001] Sun, X. Multifractal analysis of Hang Seng index in Hong Kong stock market / X. Sun, H. P. Chen, Z. Q. Wu, Y. Z. Yuan // Physica A-Statistical Mechanics and its Applications.– 2001. – Vol. 291. – Issue 1–4. – P. 553–562. [Thompson, 2016] Thompson, James. R. Multifractal Detrended Fluctuation Analysis: Practical Applications to Financial Time Series / Thompson, James. R., Wilson, James R. // Mathematics and Computers in Simulation. – 2016. – Vol. 126. – Issue C. – P. 63–88. [Zhou, 2009] Zhou, W.-X. The components of empirical multifractality in financial returns / Wei-Xing Zhou // EPL. – 2009. – Vol. 88. – Issue 2. – Article Number 28004.
8cs.DS
Intercell Interference-Aware Scheduling for Delay Sensitive Applications in C-RAN arXiv:1708.00852v1 [cs.IT] 2 Aug 2017 Yi Li, M. Cenk Gursoy and Senem Velipasalar Department of Electrical Engineering and Computer Science, Syracuse University, Syracuse, NY 13244 Email: [email protected], [email protected], [email protected] Abstract— Cloud radio access network (C-RAN) architecture is a new mobile network architecture that enables cooperative baseband processing and information sharing among multiple cells and achieves high adaptability to nonuniform traffic by centralizing the baseband processing resources in a virtualized baseband unit (BBU) pool. In this work, we formulate the utility of each user using a convex delay cost function, and design a twostep scheduling algorithm with good delay performance for the CRAN architecture. In the first step, all users in multiple cells are grouped into small user groups, according to their interference levels and estimated utilities. In the second step, channels are matched to the user groups to maximize the system utility. The performance of our algorithm is further studied via simulations, and the advantages of C-RAN architecture is verified. I. I NTRODUCTION Recently, the traffic load of wireless cellular networks has grown dramatically due to increasing number of smart mobile devices. In order to satisfy the growing demands and provide the required quality of service (QoS) guarantees and high reliability in next-generation 5G wireless systems, several advanced techniques have been proposed, and cloud radio access network (C-RAN) is one novel mobile network architecture that improves the performance of cellular networks. By centralizing the baseband processing resources of multiple cells in a virtualized baseband unit (BBU) pool, C-RAN can achieve cooperative processing among different cells and utilize the BBUs more efficiently [1] [2]. As shown in Figure 1, remote radio heads (RRHs) and BBU are separated geographically and connected via optical fibers in the C-RAN architecture. BBU pool is shared between cells as a virtualized cluster. Compared with the conventional architectures in which BBUs of different cells are not shared, C-RAN can achieve information exchange and cooperative processing between cells more easily with low latency, and it has high adaptability to nonuniform traffic. A comprehensive survey on C-RAN and its implementation is provided in [3]. For most orthogonal frequency division multiple access (OFDMA)-based cellular networks, intercell interference (ICI) is a significant interference source because of the frequency reuse among multiple neighbouring cells. Many advanced methods have been studied to control ICI. For instance, the soft frequency reuse (SFR) scheme is proposed in [4] and [5], in which cell edge users transmit with high power in nonoverlapping cell edge bands allocated to adjacent cells, and This work was supported in part by National Science Foundation grants CCF-1618615, ECCS-1443994, CNS-1443966, CNS-1302559, and CNS1206291. center users use the cell center bands with limited transmission power. The authors in [6] further compared the performance of SFR with partial frequency reuse scheme. In these conventional ICI control schemes, cooperation between neighbouring cells are not considered, which limits their performances. In C-RAN, cooperative processing among the cells sharing the same BBU pool becomes easier and more efficient, which helps to improve ICI control. In [7], a resource allocation and RRH association algorithm was proposed for ICI coordination in a long term evolution (LTE) heterogeneous network setting with C-RAN architecture. However, optimization over multiple cells greatly increases the complexity, which causes problems in delay sensitive applications. In this work, we propose, for C-RAN, an ICI-aware scheduling algorithm that controls the ICI with relatively low complexity. In addition, packet delay is an important performance criterion for delay sensitive applications such as live video streaming and online gaming. In most of the related studies considering ICI control, the objectives are interference minimization, SINR maximization and throughput maximization, and hence delay minimization is not addressed. In this work, our scheduling algorithm performs user grouping and resource allocation with the goal of minimizing the delay violation probability. The utility formulation used in this paper has also been employed in our previous work [8]. The main contributions in this paper are listed as follows: 1) We propose a two-step ICI-aware scheduling algorithm for C-RAN that minimizes the delay violation probability of the system. 2) We design a novel user grouping algorithm for the user grouping step, which controls the interference among the users in the same group. 3) We formulate the channel assignment problem in the second step as a maximum-weight matching problem, which can be solved using standard algorithms in graph theory. 4) We verify the performance of our algorithm via simulations, and compare our algorithm with a conventional soft frequency reuse (SFR) algorithm. Also, the influence of the system parameters is investigated with the help of numerical results. II. S YSTEM M ODEL AND P RELIMINARIES In this section, we introduce our system model in the first subsection, and subsequently describe the utility formulation used in this work in the second subsection. Fig. 1. System model of C-RAN with ICI A. System Model In this work, the uplink transmission in a C-RAN within an OFDMA setting is considered as shown in Fig. 1. There are Nc cells in this network, and each cell is served by a base station with one RRH. RRHs are connected to a centralized BBU pool with multiple BBUs working cooperatively. All cells reuse Nch frequency bands/channels, and each channel has a bandwidth of B. The total number of mobile users in this network is fixed at Nu , and users are assumed to be associated with their nearest RRHs. Each user is equipped with a buffer storing the arriving packets before sending them through the wireless uplink channels, and the size of each packet is assumed to be Ip bits. All buffers are assumed to operate in a first-in firstout (FIFO) manner. The system is assumed to operate under delay constraints, and target delay of packets sent by the ith user is denoted by Di (time frames). Block fading is assumed in this work, in which the fading coefficients stay constant within one time frame with a duration of T , and change across frames. Also it is assumed that the distributions of the fading coefficients are identical in different channels. At the beginning of each time frame, BBU pool allocates channel resources to the users using a scheduling algorithm. It is assumed that users keep silent until they get channel resources from the BBU pool, and the channel resources are returned back at the end of each time frame. There are 4 assumptions for the channel assignment: 1) The number of users is much greater than the number of available channels, Nu ≫ Nch . In such a case, each user transmits using one channel at most. 2) Only the users that can satisfy the pair-wise interference constraints given in (9) can reuse the same channel resource. 3) Users associated with the same RRH cannot reuse the same channel resource. 4) The BBU pool is assumed to have perfect channel side information (CSI), and it is also assumed to keep track of the buffer status (including the queue length and packet delay information) of each user. The first assumption addresses a heavy load scenario, in which all channels are reused by multiple users and ICI becomes a significant problem. In such a case, the assumption that each user transmits using one channel at most helps to reduce ICI caused by excessive frequency reuse. The second assumption limits the interference, and the third assumption guarantees that all interference comes from neighbouring cells. The last assumption guarantees that the BBU pool has enough information to conduct our scheduling algorithm. CSI is estimated at RRHs and sent to the BBU pool via optical fiber links. Information of the arrival rates at all users is also sent to the BBU pool via special feedback channels2 , and the BBU pool can track the queue status at each user. Define Ψj (t) as the set of users that use the j th channel in the tth time frame, and ξi,j (t) as the indicator function that indicates whether the j th channel is assigned to the ith user in the tth time frame. In other words, ξi,j (t) = 1 if i ∈ Ψj (t), otherwise ξi,j (t) = 0. According to our first channel PNch assignment assumption, we have j=1 ξi,j (t) ≤ 1. Then for the tth time frame, the received signal corresponding to user i at its associated base station can be expressed as yi = hji xi + X hjk,i xk + nji (1) k∈Ψj (t),k6=i if ξi,j (t) = 1. Above, xi represents the transmitted signal of user i, hji denotes the fading coefficient of the channel between user i and its corresponding RRH, hjk,i denotes the fading coefficient of the interference channel between user k and the RRH associated with user i, and nji is the background noise at the base station associated with user i which is assumed to follow an independent complex Gaussian distribution with zero mean and variance σ 2 , i.e., nji ∼ CN (0, σ 2 ). The transmission rate of user i in the tth time frame is given by ri (t) = T B log2 1+ Pi zij Bσ 2 + P k∈Ψj (t),k6=i j Pk zk,i ! bits/frame (2) where j is the index of the channel that is assigned to user i, Pi represents the transmission power of user i, T is the duration of each time frame, B is the bandwidth of each j channel, zij = |hji |2 , and zk,i = |hjk,i |2 . B. Convex Delay Cost and Utility In the convex delay cost approach, the cost function of a packet is formulated as an increasing convex function of its delay [9]. The high performance of this approach was shown in [10] for a single cell model without any interference. In our previous work [8], we designed a scheduling algorithm using the convex cost function provided in [10] for a D2D communication setting, and verified via simulations that this approach has very good delay performance. Here, we define the cost of the j th packet in the buffer at user i as Cj,i = dj,i , Di (3) where dj,i is the current delay of this packet, and Di is the target delay of user i. At user i, the number of packets that can be transmitted in the current time frame is µi = min {li , ⌊ri /Ip ⌋} , 2 We assume ideal feedback without delay and error. (4) where li is the number of packets waiting in the buffer at user i, Ip is the size of each packet, and ⌊·⌋ represents the floor function. The utility of user i is defined as Ui = µi X Cj,i , (5) j=1 and the utility of the system is defined as U= Nu X Ui = µi Nu X X Cj,i . (6) i=1 j=1 i=1 The utility given in (6) represents the total cost of the packets that can be transmitted to the base station in the current time frame. At the beginning of each time frame, the BBU pool runs a scheduling algorithm for channel assignment to maximize the utility. In the next section, a detailed discussion on our scheduling algorithm is provided. III. ICI-AWARE S CHEDULING A LGORITHM FOR A. User Grouping In the first step of our algorithm, we divide all users into small groups, and each group will be assigned a channel resource in the next step. Before channel assignment, we cannot compute the instantaneous transmission rates because the sets Ψ1 , Ψ2 , · · · , ΨNch have not been determined yet. Therefore, we use a rate estimator r̂i = 1 ri (τ ) m τ =t−m (7) instead. This rate estimator is essentially the average rate over the most recent m time frames. Plugging (7) into (4) and (5), we obtain the utility estimator of user i as Ûi = µ̂i X min{li ,⌊r̂i /Ip ⌋} Cj,i = j=1 X Cj,i . (8) j=1 In order to control ICI, we assume that any two users (i1 and i2 ) reusing the same channel resource have to satisfy the pairwise interference/SINR constraints given by  n o nP z o Pi1 zi1 i1 i1 E ≥ γE 2 Bσ 2 i2 zi2 ,i1 o n n Bσ +P o Pi2 zi2 Pi2 zi2 E ≥ γE 2 2 Bσ +P z Bσ , Input: γ, transmission power and utility estimator of each user, the fading coefficients. Output: User groups GP1 , GP2 , · · · , GPNg . Collect the utility estimators Ûi into a vector V = [Û1 , Û2 , · · · , ÛNu ]. Set k = 1 While max(V) ≥ 0 Set V∗ = V and GPk = ∅ While max(V∗ ) ≥ 0 i = arg max(V∗ ) Add user i into GPk . Set V(i) = −1 and V∗ (i) = −1. For j from 1 to Nu Set V∗ (j) = −1 if user i and j cannot satisfy the interference constraints given in (9) or they are associated to the same RRH. End End k = k+1 End C-RAN In this section, we introduce our scheduling algorithm. In each time frame, our scheduling algorithm assigns channels to the users in a way that maximizes the utility given in (6). Since we consider a C-RAN architecture, the BBU pool has the knowledge of all fading distributions and cost functions of each packets, and it can allocate channel resources to all users in different cells together. Our scheduling algorithm can be divided into two steps, namely the user grouping step and channel matching step. In the first step, we divide all users into small groups such that the users in the same group reuse the same channel. In the second step, we match the channels to the user groups to maximize the utility. t−1 X TABLE I U SER G ROUPING A LGORITHM (9) i1 i1 ,i2 where the parameter γ is between 0 and 1. Since the distributions of the fading coefficients are identical in different channels, the expected values of the SINRs and SNRs in (9) do not depend on the channel assignment result. The details of our user grouping algorithm is given in Table I, and we denote the number of the output user groups as Ng . At the beginning, we set group GPk as an empty set. Each time, we select the user with the maximum utility estimator and include it into GPk . After adding a user into a group, we kick out the users that cannot reuse the same channel resource with this selected user by setting V∗ (j) = −1, which can be processed in parallel at the BBU pool. Our grouping algorithm aims to collect the users with high utility estimators together, which helps to serve these users with less channel resources. Note that the number of groups Ng might be smaller than the number of channels Nch . In such cases, some of the channels cannot be assigned to users, and we need to break those groups with large sizes into several small groups so that Ng = Nch . To divide a big group into two small groups, we select half of the users with smaller utility estimator values within the large group, and let them form a new small group. B. Channel Matching In the second step, we assign channels to the user groups via the maximum-weight matching approach. In this step, we find a matching between user groups and channels that maximizes the system utility given in (6). Let us define ηi,j as the indicator of the channel assignment result, i.e., ηi,j = 1 if channel j is assigned to GPi , and ηi,j = 0 if channel j is not matched to GPi . Then the matching problem can be formulated as Maximize Subject to ηi,j U ηi,j ∈ {0, 1} Nch X ηi,j ≤ 1 j=1 Ng X ηi,j = 1. i=1 In graph theory, the maximum-weight matching problem can be solved by the Hungarian algorithm (Kuhn-Munkres algorithm) [11]. To use the Hungarian algorithm, we have to first construct the utility matrix U, in which each row In summary, we propose a two-step scheduling algorithm with good delay performance for a multi-cell C-RAN model. In the first step, we group the users to control the ICI and aim to collect the users with high utility estimator values into smaller number of groups. In the second step, we formulate the channel allocation problem as a maximum-weight matching problem, and assign the channel resources to the user groups using the Hungarian algorithm. Although our algorithm only considers an uplink scenario, it can also be easily adapted to a downlink scenario. Since we consider a C-RAN model, our algorithm is performed considering users in multiple cells, and parallel processing can be performed in some parts of our algorithm at the BBU pool to reduce time consumption. Compared with conventional resource allocation algorithms, in which cooperative processing among multiple cells is not considered, our algorithm has a significant potential to achieve better performance. Assume that the number of processers at BBU pool is Θ(Nc ), then the time complexity of the user grouping step is O(Nu2 /Nc ). In the matching step, the time consumption for constructing the utility matrix is O(Ng Nch /Nc ), and the time consumption of the Hungarian algorithm is O(max{Ng , Nch }3 ). To further accelerate this process, we can replace the Hungarian algorithm with some heuristic algorithms with time complexity of O(min{Ng , Nch }). As an example, in each iteration, we can select the maximum element in the utility matrix, and match its corresponding group and channel together. The overall time consumption of this algorithm depends on the relationship among Nu , Nc , Ng and Nch . IV. N UMERICAL R ESULTS In this section, we further study the performance of our algorithm and the influence of parameters via simulations. In our simulations, we consider a C-RAN with 3 adjacent cells, each with a radius of 2. The coordinates of the RRHs of these three cells are (−2, 0), (0, 2) and (2, 0), respectively. In each cell, there are 5 randomly placed users, and each one has the max maximum transmission power PBσ 2 = 13 dB. The number of available channels is Nch = 5. We assume Rayleigh fading with path loss E{z} = s−4 , where s represents the distance between the transmitter and the receiver. Each point on the curves is determined by taking the average over the results of 500 systems with randomly placed users, and the performance result of each system is evaluated over 5 × 104 time frames. In Figs. 2 and 3, we study the influence of the interference control parameter γ, which is used in the pairwise interference constraints expressed in (9). The arrival rate at user i is set ρ=0.6 0.7 Delay violation probability C. Summary and Complexity Analysis 0.8 ρ=0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 γ Fig. 2. Delay violation probability vs. interference control parameter γ 18 Average throughput (packets/user/frame) corresponds to a user group and each column corresponds to a channel. The element of this matrix Ui,j is the sum utility of the users in GPi if the j th channel is assigned to that group. The elements of the utility matrix can be computed in parallel at the BBU pool. After constructing the utility matrix, the Hungarian algorithm is applied, and channels are assigned to the users. ρ=0.6 ρ=0.7 17 16 15 14 13 12 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 γ Fig. 3. Throughput vs. interference control parameter γ as λi = ρE{T B log2 (1 + Pi zi /Bσ 2 )}, where the parameter ρ is the arrival intensity. The target delay is 25 time frames for all users, and all users transmit at their maximum power level. When γ is small, the ICI is not well controlled and the average transmission rate is not maximized. As γ increases, the system achieves lower delay violation probability and higher throughput due to better ICI management. However, when γ is too large, the interference constraints become too strict, which leads to less frequency reuse. In such cases, the throughput becomes smaller and the delay violation probability increases. In Figs. 4 and 5, we analyze the influence of power control on our algorithm. In several conventional ICI control algorithms such as SFR, cell center users transmit with small power to reduce the interference they cause to the cell edge users. We adopt this strategy and apply it in our algorithm. In these two figures, the transmission power of user i is selected as Pi = Pmax (si /Rcell )α , where si is the distance between the user and its corresponding RRH, and Rcell is the radius of the cell. As α increases, cell center users are restricted to transmit with smaller power. Also, all arrival rates are set as λ = 1.5E{T B log2 (1 + Pmax zedge /Bσ 2 )}, where E{T B log2 (1+Pmax zedge /Bσ 2 )} is the average transmission rate of a user at the edge of its associated cell. In Figs. 4 and 5, we notice that as α increases, both delay and throughput performances become worse. Our algorithm control the inter- the users in that cell. The results are provided in Table II. As the arrival intensity increases, the advantage of our algorithm becomes obvious in terms of the average delay. With the CRAN architecture, cooperative processing over multiple cells enhances the delay performance significantly. 0.8 Delay violation probability 0.7 0.6 0.5 V. C ONCLUSION 0.4 0.3 0.2 0.1 0 0 0.5 1 1.5 2 2.5 3 3.5 4 α Fig. 4. Delay violation probability vs. power control parameter α Average throughput (packets/user/frame) 16 14 12 10 8 6 4 0 0.5 1 1.5 2 2.5 3 3.5 4 α Fig. 5. Throughput vs. power control parameter α ference in the user grouping step. Users that cannot satisfy the pairwise interference constraints are not allowed to reuse the same channel resource. Further decrease in the transmission power of the cell center users reduces their transmission rates, making it more difficult to stabilize the system. Finally, we compare our algorithm with the conventional SFR scheme introduced in [6]. The arrival rates are set in the same way as in Figs. 2 and 3, and the target delay is 40 for all users. In our algorithm, all users transmit with maximum power. In the SFR scheme, users transmit with full power in the edge bands and they use 70% of their maximum power in the center bands. Channel assignment is conducted at the BBU of each cell individually to maximize the sum utility of TABLE II C OMPARISON BETWEEN OUR ALGORITHM AND SFR In this work, we have proposed an ICI-aware scheduling algorithm for the C-RAN architecture that minimizes the sum delay cost of the system. The procedure is divided into two steps, namely the user grouping step and the channel matching step. In the user grouping step, we have designed a grouping algorithm that partitions all users in the network into small groups by checking their pairwise interference levels. In order to serve those users with high utility values with less channel resources, our grouping algorithm aims to collect users with high utility estimator values into small number of groups. In the channel matching step, we have formulated the channel assignment problem as a maximum-weight matching problem, which can be solved using the Hungarian algorithm. In the second step, user groups are matched to the available channel resources with goal of maximizing the system utility. Finally, we have studied the impact of the interference threshold and power control parameter via simulations, and compared our algorithm to the conventional SFR scheme. With the advantages of cooperative processing and information sharing over multiple cells, it has been verified that our algorithm designed for C-RAN can achieve higher throughput and lower delay. R EFERENCES [1] Y. Lin, L. Shao, Z. Zhu, Q. Wang, and R. K. Sabhikhi, “Wireless network cloud: Architecture and system requirements,” IBM Journal of Research and Development, vol. 54, pp. 4:1–4:12, Jan. 2010. [2] C. Mobile, “C-RAN: The road towards green RAN,” White Paper, ver, vol. 2, Oct. 2011. [3] A. Checko, H. L. Christiansen, Y. Yan, L. Scolari, G. Kardaras, M. S. Berger, and L. Dittmann, “Cloud RAN for mobile networks - A technology overview,” IEEE Communications Surveys Tutorials, vol. 17, pp. 405–426, Firstquarter 2015. [4] A. Simonsson, “Frequency reuse and intercell interference co-ordination in E-UTRA,” in IEEE 65th Vehicular Technology Conference (VTC) Spring, pp. 3091–3095, Apr. 2007. [5] M. C. Necker, “Local interference coordination in cellular OFDMA networks,” in IEEE 66th Vehicular Technology Conference (VTC) Fall, pp. 1741–1746, Sep. 2007. [6] Y. Xiang, J. Luo, and C. Hartmann, “Inter-cell interference mitigation through flexible resource reuse in OFDMA based communication networks,” in European wireless, vol. 2007, pp. 1–7, Apr. 2007. [7] S. Deb, P. Monogioudis, J. Miernik, and J. P. Seymour, “Algorithms for enhanced inter-cell interference coordination (eICIC) in LTE HetNets,” IEEE/ACM Trans. Networking, vol. 22, pp. 137–150, Feb. 2014. [8] Y. Li, M. C. Gursoy, and S. Velipasalar, “Scheduling in D2D underlaid cellular networks with deadline constraints,” in IEEE Vehicular Technology Conference (VTC) Fall, Sep. 2016. [9] J. A. Van Mieghem, “Dynamic scheduling with convex delay costs: The generalized cµ rule,” The Annals of Applied Probability, pp. 809–833, Aug. 1995. [10] J. A. Van Mieghem, “Due-date scheduling: Asymptotic optimality of generalized longest queue and generalized largest delay rules,” Operations Research, vol. 51, pp. 113–122, Feb. 2003. [11] H. W. Kuhn, “The hungarian method for the assignment problem,” Naval Research Logistics Quarterly, vol. 2, pp. 83–97, Mar. 1955.
7cs.IT
arXiv:1612.01464v2 [quant-ph] 5 Mar 2017 Finite blocklength and moderate deviation analysis of hypothesis testing of correlated quantum states and application to classical-quantum channels with memory Cambyse Rouzéa and Nilanjana Dattaa a Statistical Laboratory, Centre for Mathematical Sciences, University of Cambridge, Cambridge CB30WB, UK March 13, 2018 Abstract Martingale concentration inequalities constitute a powerful mathematical tool in the analysis of problems in a wide variety of fields ranging from probability and statistics to information theory and machine learning. Here we apply techniques borrowed from this field to quantum hypothesis testing, which is the problem of discriminating quantum states belonging to two different sequences {ρn }n and {σn }n . We obtain upper bounds on the finite blocklength type II Stein- and Hoeffding errors, which, for i.i.d. states, are in general tighter than the corresponding bounds obtained by Audenaert, Mosonyi and Verstraete in [5]. We also derive finite blocklength bounds and moderate deviation results for pairs of sequences of correlated states satisfying a (non-homogeneous) factorization property. Examples of such sequences include Gibbs states of spin chains with translationinvariant finite range interaction, as well as finitely correlated quantum states. We apply our results to find bounds on the capacity of a certain class of classical-quantum channels with memory, which satisfy a so-called channel factorization property - both in the finite blocklength and moderate deviation regimes. 1 Introduction Quantum Hypothesis Testing The goal of binary quantum hypothesis testing is to determine the state of a quantum system, given the knowledge that it is one of two specific states (ρ or σ, say), by making suitable measurements on the state. In the language of hypothesis testing, one considers two hypotheses – the null hypothesis H0 : ρ and the alternative hypothesis H1 : σ. The measurement done to determine the state is given most generally by a POVM {T, I − T } where 0 ≤ T ≤ I, and I denotes the identity operator acting on the Hilbert space of the quantum system. Adopting the nomenclature from classical hypothesis testing, we refer to T as a test. There are two associated error probabilities: Type I error: α(T ) := Tr ((I − T )ρ) , and 1 Type II error: β(T ) := Tr (T σ) , which are, respectively, the probabilities of erroneously inferring the state to be σ when it is actually ρ and vice versa. There is a trade-off between the two error probabilities, and there are various ways to optimize them, depending on whether or not the two types of errors are treated on an equal footing. In the case of symmetric hypothesis testing, one minimizes the total probability of error α(T ) + β(T ), whereas in asymmetric hypothesis testing one minimizes the type II error under a suitable constraint on the type I error. Quantum hypothesis testing was originally studied in the asymptotic i.i.d. setting, in which, instead of a single copy, multiple (say n) identical copies of the state were assumed to be available, and a joint measurement on all of them was allowed. The optimal error probabilities were evaluated in the asymptotic setting (n → ∞) and shown to decay exponentially in n. The decay rates were quantified by different statistical distance measures in the different cases: in symmetric hypothesis testing it is given by the so-called quantum Chernoff distance [4, 35]; in asymmetric hypothesis testing, the optimal decay rate of the type II error probability, when evaluated under the constraint that the type I error is less than a given threshold value, is given by the quantum relative entropy [21, 37], whereas, when evaluated under the constraint that the type I error decays with a given exponential speed, it is given by the so-called Hoeffding distance [18, 34, 36]. The type II errors in these two cases of asymmetric hypothesis testing, are often referred to as the Stein error and the Hoeffding error, respectively. The consideration of the asymptotic i.i.d. setting in quantum hypothesis testing is, however, of little practical relevance, since in a realistic scenario only finitely many copies (n) of a state are available. More generally, one can even consider the hypothesis testing problem involving a finite sequence of states {ωn }n , where for each n, ωn is one of two states ρn or σn , which need not be of the i.i.d. form: ρn = ρ⊗n and σn = σ ⊗n . We refer to the hypothesis testing problem in these non-asymptotic scenarios as finite blocklength quantum hypothesis testing, the name “finite blocklength” referring to the finite value of n. Finding bounds on the error probabilities in these scenarios is an important problem in quantum statistics and quantum information theory. To our knowledge, this problem has been studied thus far only by Audenaert, Mosonyi and Verstraete [5]. They obtained bounds for both the symmetric and asymmetric cases mentioned above, in the non-asymptotic but i.i.d. scenario. In this paper we focus on asymmetric, finite blocklength quantum hypothesis testing, and find improved upper bounds on the Stein- and Hoeffding errors, in comparison to those obtained in [5] in the i.i.d. setting. We also find upper bounds on the same quantities in the case of non i.i.d. states satisfying a factorization property. Our framework can also be applied to the analysis of the case where the error of type I converges sub-exponentially with a rate given by means of a moderate sequence, extending the results recently found in [10, 11]. Finally, we apply our results to the problem of finding bounds on capacities of a certain type of classical-quantum channels with memory, both in the finite blocklength case and in the asymptotic framework of moderate deviations. In the case of uncorrelated states, we obtain our results by use of martingale concentration inequalities. Concentration inequalities deal with deviations of functions of independent random variables from their expectation, and provide upper bounds on tail probabilities of the type P(|X − E[X]| ≥ t) which are exponential in t; here X denotes a random variable which is a function of independent random variables. These simple and yet powerful inequalities have turned out to be very useful in the analysis of various problems in different branches of math2 ematics, such as pure and applied probability theory (random matrices, Markov processes, random graphs, percolation), information theory, statistics, convex geometry, functional analysis and machine learning. Concentration inequalities have been established using a host of different methods. These include martingale methods, information-theoretic methods, the socalled “entropy method” based on logarithmic Sobolev inequalities, the decoupling method, Talagrand’s induction method etc. (see e.g. [42, 8] and references therein). In this paper, we apply two inequalities, namely the Azuma-Hoeffding inequality [22, 6] and the Kearns-Saul inequality [28] (which have been established using martingale methods and hence fall in the class of so-called martingale concentration inequalities) to quantum hypothesis testing in the i.i.d. setting. Moreover, the proofs of the results we obtain in the case of quantum hypothesis testing for correlated states are reminiscent of this framework. We include a brief review of martingales and these inequalities in Section 2. To our knowledge, martingale concentration inequalities have had rather limited applications in quantum information theory thus far (see e.g. [15, 23]). We hope that our use of these inequalities in finite blocklength and moderate deviation analyses of quantum hypothesis testing will lead to further applications of them in studying quantum information theoretic problems. Quantum Stein’s lemma and its refinements Consider the quantum hypothesis testing problem in which the state ωn which is received is either ρn or σn , the latter being states on a finite-dimensional Hilbert space Hn . The type I and type II errors for a given test Tn (where 0 ≤ Tn ≤ In and In is the identity operator on Hn ), are given by α(Tn ) = Tr[(In − Tn )ρn ] and β(Tn ) = Tr[Tn σn ]. (1.1) As mentioned in the Introduction, in the asymmetric setting, one usually optimizes the type II error β(Tn ) under one of the following constraints on the type I error α(Tn ): (i) α(Tn ) is less than or equal to a fixed threshold value ε ∈ (0, 1) or (ii) α(Tn ) satisfies an exponential constraint α(Tn ) ≤ e−nr , for some fixed parameter r > 0. The optimal type II errors are then given by the following expressions, respectively: βn (ε) := β̃n (r) := inf {β(Tn )|α(Tn ) ≤ ε} (1.2) inf {β(Tn )|α(Tn ) ≤ e−nr }. (1.3) 0≤Tn ≤In 0≤Tn ≤In We refer to βn (ε) as the type II error of the Stein type (or simply the Stein error), and we refer to β̃n (r) as the type II error of the Hoeffding type (or simply the Hoeffding error). In the i.i.d. setting, ρn := ρ⊗n and σn := σ ⊗n , with ρ and σ being states on a finitedimensional Hilbert space H, and Hn ' H⊗n . Explicit expressions of the type II errors defined in Equation (1.2) and Equation (1.3) are not known even in this simple setting. However, their behaviour in the asymptotic limit (n → ∞) is known. The asymptotic behaviour of βn (ε) is given by the well-known quantum Stein lemma [21, 37]: 1 lim − log βn (ε) = D(ρ||σ) n→∞ n 3 ∀ ε ∈ (0, 1), where D(ρ||σ) denotes the quantum relative entropy defined in Equation (2.6). The asymptotic behaviour of β̃n (r) is given in terms of the so-called Hoeffding distance: For any r > 0, ( ) tr + log Tr(ρt σ 1−t ) 1 lim − log β̃n (r) = Hr (ρ||σ) := − inf . n→∞ n 0≤t<1 1−t The problem of finding error exponents can be mapped (in the i.i.d. case) to the problem of characterizing the probability that a sum of n i.i.d. random variables makes an order-n deviation from its mean, which is the subject of large deviations and Cramér’s theorem. In fact, it is known that in the context of Stein’s lemma, allowing the error of type II to decay exponentially, with a rate smaller than Stein’s exponent, D(ρkσ), the error of type I decays exponentially, with a rate given by α−1 [r − Dα (ρkσ)], α 0<α<1 sup where Dα (ρkσ) is the so-called α-Rényi divergence: Dα (ρkσ) = 1 log Tr(ρα σ 1−α ). α−1 If instead the error of type II is restricted to decay exponentially with a rate greater than Stein’s exponent, the error of type I converge exponentially to 1, with a rate given by α−1 [r − Dα∗ (ρkσ)], α 1<α sup where Dα∗ (ρkσ) is the so-called Sandwiched α-Rényi divergence: Dα∗ (ρkσ) = 1−α 1 log Tr(ρ1/2 σ α ρ1/2 )α . α−1 These phenomena are the manifestation of a coarse-grained analysis. A more refined analysis of the type II error exponent, (− log βn (ε)), is given by its second order asymptotic expansion, which was derived independently by Li [30], and Tomamichel and Hayashi [47]. It can be expressed as follows:   1 s1 (ε) log n log βn (ε) = − D(ρ||σ) + √ + O , (1.4) n n n where the second-order coefficient s1 (ε) displays a Gaussian behaviour given by p s1 (ε) := −Φ−1 (ε) V (ρkσ). (1.5) Here Φ denotes the cumulative distribution function (c.d.f.) of a standard normal distribution, and V (ρ||σ) is called the quantum information variance and is defined in Equation (2.8). Both first order and second order asymptotics of the type II error exponent have been generalized to contexts beyond the i.i.d. setting under different conditions on the states ρn and σn 4 (see e.g. [12] and references therein). The problem of finding second order asymptotic expansions can actually be mapped (in the i.i.d. case) to the one of characterizing the probability √ that a sum of i.i.d. random variables makes an order- n deviation from its mean, which is the subject of small deviations and the Central Limit- and Berry Esseen Theorems. Quantum Stein’s lemma and second order asymptotics both deal with the convergence of the type II error when the type I error is assumed to be smaller than a pre-fixed constant threshold value ε. However, as mentioned above, imposing the error of type II to decay exponentially with a rate smaller than Stein’s rate implies that the error of type I itself decays exponentially. In this paper we carry out a ‘hybrid analysis’ in which we allow the error of type I to decay sub-exponentially with n, the error exponent taking the form εn := exp(na2n ), with {an }n∈N being a so-called moderate sequence1 . As shown in [10, 11], this problem can be mapped (in the i.i.d. case) into the problem of characterizing the probability that a sum of i.i.d. random variables makes an order-an deviation from its mean. This is the subject ot moderate deviations, hence justifying the name ‘hybrid analysis’. Note that even the classical counterpart of this analysis was done relatively recently, see e.g. [1, 41, 45]. Large, moderate and small deviations belong to the asymptotic setting. On the other hand, relatively little is known, about the behaviour of the type II errors βn (ε) and β̃n (r) (for some r > 0) in the case of finite blocklength, i.e. for a fixed, finite value of n. As mentioned earlier, Audenaert, Mosonyi and Verstraete [5] considered the i.i.d. case and derived bounds on the quantities βn (ε) and β̃n (r) in the asymmetric setting, as well as bounds on the corresponding quantity in the symmetric setting. For example, their bounds on βn (ε) (see Theorem 3.3 and Equation (35) of [5]) can be expressed as follows: −f (ε) ≤ Q(n, ε) ≤ g(ε) (1.6) 1 Q(n, ε) := √ (log βn (ε) + nD(ρkσ)) , n (1.7) where and √ f (ε) = 4 2 log η log(1 − ε)−1 , √ g(ε) = 4 2 log η log ε−1 , (1.8) with η := 1 + e1/2D3/2 (ρkσ) + e−1/2D1/2 (ρkσ) . Our contribution Quantum hypothesis testing for uncorrelated and correlated states In this paper, we obtain upper bounds on the optimal type II errors (namely, the Stein and Hoeffding errors) for finite blocklength quantum hypothesis testing, in the case in which the received state ωn is one of two states ρn and σn , where ρn and σn are each given by tensor 1 Such a sequence has the property an → 0, but √ nan → ∞, as n → ∞. 5 products of n (not necessarily identical) states, and hence also for i.i.d. states. We also derive similar bounds when ρn and σn satisfy the following upper-factorization property: ρn ≤ R ρn−1 ⊗ ρ1 , σn ≤ S σn−1 ⊗ σ1 , for some R, S ≥ 1. This is for example the case of Gibbs states of spin chains with translation-invariant finiterange interactions, or finitely correlated states (see [16, 19]). This class of states was studied in [20] in the asymptotic framework of Stein’s lemma (see also [33]). We also consider the case of states satisfying a so-called lower-factorization property: ρn ≥ R−1 ρn−1 ⊗ ρ1 , σn ≥ S −1 σn−1 ⊗ σ1 , for some R, S > 1. Gibbs states mentioned above, i.i.d. states and certain classes of finitely correlated states, satisfy both these factorization properties. In the i.i.d. case, the upper bounds that we derive for the finite blocklength regime are tighter than the ones derived in [5], for all values of the parameter ε up to a threshold value (which depends on ρ and σ). We also extend the recent results of [10, 11], in the moderate deviation regime, to the case of such correlated states. Application to classical-quantum channels Quantum hypothesis testing is one of the fundamental building blocks of quantum information theory since it underlies various other informetion-theoretic tasks. An important example of such a task is the transmission of classical information through a quantum channel. In particular, it is well-known that the analysis of information transmission through a so-called classical-quantum (c-q) channel2 can be reduced to a hypothesis testing problem. Hence our above results on quantum hypothesis testing can be applied to find bounds on the optimal rates of transmission of information through c-q channels, both in the finite blocklength- and the moderate deviations regime. Most notably, our results on hypothesis testing of correlated quantum states (satisfying the factorization properties mentioned above) allow us to analyze the problem of information transmission through a class of c-q channels with memory. The latter are channels whose output states satisfy a non-homogeneous factorization property (see Section 7 below for details). We say that such channels satisfy a channel factorization property. Layout of the paper In Section 2, we introduce the necessary notations and definitions, including the two key tools that we use, namely, relative modular operators and martingale concentration inequalities. The finite blocklength analysis of hypothesis testing for uncorrelated quantum states is done in Section 3 (see Theorems 5 and 6). The bounds that we obtain are compared with previously known finite blocklength- [5] and second order asymptotic [30, 47] bounds (see Figure 1). Our finite blocklength results on correlated states, introduced in Section 5, are given by Theorem 7 2 This amounts to the transmission of classical information through a quantum channel, under the restriction of the encodings being product states. 6 and Corollary 1 of Section 5. Moderate deviation analysis of such states is done in Section 6 (see Theorem 9 and Corollary 2). Our results are applied to classical-quantum channels with memory in Section 7 (see Propositions 5 and 6). 2 Notations and Definitions Operators, states and relative modular operators Given a finite-dimensional Hilbert space H, let B(H) denote the algebra of linear operators acting on H and Bsa (H) ⊂ B(H) denote the set of self-adjoint operators. Let P(H) be the set of positive semi-definite operators on H and P+ (H) ⊂ P(H) the set of (strictly) positive operators. Further, let D(H) := {ρ ∈ P(H) | Tr ρ = 1} denote the set of density matrices (or states) on H. We denote the support of an operator A by supp(A) and the range of a projection operator P as ran(P ). Let I ∈ P(H) denote the identity operator on H, and id : B(H) 7→ B(H) the identity map on P operators on H. Any element A of Bsa (H) has a spectral decomposition of the form A = λ∈sp(A) λ Pλ (A), where sp(A) denotes the spectrum of A, and Pλ (A) is the projection operator corresponding to the eigenvalue λ. For two superoperators Φ1 and Φ2 , we denote their composition Φ1 ◦ Φ2 by Φ1 Φ2 . We recall that given two C ∗ algebras of operators A and B, an operator concave function f : R → R is such that for any two self-adjoint operators A1 , A2 ∈ A and any λ ∈ [0, 1]: f (λA1 + (1 − λ)A2 ) ≥ λf (A1 ) + (1 − λ)f (A2 ). A function f : R → R is operator convex if −f is operator concave. The following operator generalization of Jensen’s inequality will turn out very useful: Theorem 1 (Operator Jensen inequality, see [13, 17]). Let A and B be two C ∗ -algebras, and v : B → A a contraction. Then for any operator concave function f on (0, ∞), and any positive element a ∈ A, f (v ∗ av) ≥ v ∗ (f (a))v, ∀a ≥ 0. We use the framework of relative modular operators in our proofs and intermediate results. Relative modular operators were introduced originally by Araki. He used them to extend the notion of relative entropy to pairs of arbitrary states on a C*-algebra (see [2, 3, 38]). The relation between relative modular operators and Rényi divergences was studied by Petz (see [39] and [40]). Below we briefly recall the definition and basic properties of relative modular operators in the finite-dimensional setting. For more details see e.g. [12, 24]. Relative Modular Operators To define relative modular operators on a finite-dimensional operator algebra B(H), we start by equipping A ≡ B(H) with a Hilbert space structure through the Hilbert-Schmidt scalar product, which for A, B ∈ A is given by hA, Bi := Tr(A∗ B). We define a map π : B(H) → B(A) by π(A) : X 7→ AX, i.e. π(A) is the map acting on A by left multiplication by A. The map π is linear, one-to-one and has in addition the properties π(AB) = π(A)π(B), 7 and π(A∗ ) = π(A)∗ , where π(A)∗ denotes the adjoint of the map π(A) defined through the relation hX, π(A)(Y )i = hπ(A)∗ X, Y i. The following identity between operator norms holds: kπ(A)kB(A) = kAkB(H) . Due to this identity, and the fact that π(A)X = AX, we identify A with π(A) and simply write A for π(A) (even though π(A) is a linear map on A, and A is not!). For any ρ ∈ D(H), we denote Ωρ := ρ1/2 ∈ Bsa (H). We then have the identity Tr(ρA) = hΩρ , AΩρ i for all A ∈ A, (2.1) where the right-hand side of the above identity should be understood as hΩρ , π(A)Ωρ i. Equation (2.1) is nothing but a simple case of the so-called GNS representation (see e.g. Section 2.3.3 of [9]). For simplicity of exposition, in this paper, we only consider faithful states, i.e. states ρ for which supp(ρ) = H. Hence, for any pairs of states ρ, σ, we have supp(ρ) = supp(σ). We then define the relative modular operator ∆σ|ρ to be the map ∆σ|ρ : A → A A 7→ σAρ−1 (2.2) Note that (2.2) defines ∆σ|ρ not only for ρ, σ ∈ D(H), but for any ρ, σ ∈ P+ (H). As a linear operator on B(H), ∆σ|ρ is positive and its spectrum sp(∆σ|ρ ) consists of the ratios of eigenvalues µ/λ, λ ∈ sp(ρ), µ ∈ sp(σ). For any x ∈ sp(∆σ|ρ ), the corresponding spectral projection is the map Px (∆σ|ρ ) : A → A 7→ A P Pµ (σ)APλ (ρ). (2.3) λ∈sp(ρ), µ∈sp(σ): µ/λ=x By von Neumann’s Spectral Theorem (see e.g. Sections VII and VIII of [43]) one can associate a classical random variable X to any pair (Λ, Ω), where Λ is a map Λ : A → A and Ω ∈ Bsa (H), such that for any bounded measurable function f , Z hΩ, f (Λ)Ωi = E[f (X)] ≡ f (x) dµ(x). Here µ denotes the law of X and is referred to as the spectral measure of Λ with respect to Ω. For the choice Λ = log ∆σ|ρ and Ω = Ωρ ≡ ρ1/2 , this yields Z hΩρ , f (log ∆σ|ρ )Ωρ i = f (x) dµσ|ρ (x) ≡ E[f (X)], (2.4) where X is a random variable of law µ ≡ µσ|ρ . The relation (2.4) plays a key role in our proofs since it allows us to express the error probabilities of asymmetric hypothesis testing in terms of probability distributions of a classical random variable, and therefore allows us to employ the tools of classical probability theory in our analysis. Taking f to be the identity function, we get: E[X] = hΩρ , log ∆σ|ρ Ωρ i = −D(ρkσ), 8 (2.5) where D(ρkσ) := Tr ρ(log ρ − log σ) (2.6) is the quantum relative entropy of ρ with respect to σ. The last identity in Equation (2.5) can be verified easily by direct computation. Similarly, by taking f to be the square function, one can verify that E[X 2 ] − E[X]2 = hΩρ , (log ∆σ|ρ )2 Ωρ i − D(ρkσ)2 ≡ V (ρkσ), (2.7) where V (ρkσ) is called the quantum information variance and is defined as follows: V (ρkσ) := Tr ρ(log ρ − log σ)2 − D(ρkσ)2 . (2.8) Conditional expectations and discrete-time martingales A discrete-time martingale is a sequence of random variables for which, at a particular time in the realized sequence, the expectation of the next value in the sequence is equal to the present observed value, given the knowledge of all prior observed values. More precisely, it is defined as follows. Let (E, F, P) be a probability space, where E is a set, F is a σ-algebra on E (which is a set of subsets of E containing the empty set, and closed under the operations of taking the complement and discrete unions), and P is a probability measure on F. In the case of a finite set E, F is usually the set 2E of all the subsets of Ω. Given a measurable space (E, F), a filtration {Fn }n∈N∪{0} is a sequence of σ-algebras such that F0 ⊆ F1 ⊆ · · · ⊆ Fn · · · ⊆ F. Given a sequence of random variables {Xn }n∈N∪{0} , we denote by σ(X1 , . . . , Xn ) the smallest σ-algebra on which the random variables X1 , . . . , Xn are measurable, and call {σ(X1 , . . . , Xn )}n∈N∪{0} the natural filtration of {Xn }n∈N∪{0} . More generally a filtration {Fn }n∈N∪{0} is said to be adapted to a sequence of random variables {Xn }n∈N∪{0} if for each n, Xn is Fn -measurable. For a given σ-algebra G on a discrete space, a random variable X is G-measurable if it can be written as X X(ω) = xk 1Bk (ω), ω ∈ Ω, k∈I where I is an index set, and {Bk }k∈I is a family of disjoint subsets of G. Consider a sub-σ-algebra G of F and an F-measurable integrable real-valued random variable X : Ω → R, i.e. Z E[|X|] := |X(ω)| dP(ω) < ∞. E 9 Then the conditional expectation of X with respect to G is defined as the almost surely unique (i.e. up to a set of measure zero) integrable G-measurable real random variable Y := E[X|G] : E → R such that for any other bounded G-measurable random variable Z: E[ZY ] = E[ZX]. In the case of a discrete probability space, the conditional expectation can be expressed as follows: pick any generating family {Ak }k∈J of disjoint subsets of G, with J denoting an index set. Then E[X|G](ω) = X E[X1A ] k 1Ak (ω), P(Ak ) ω ∈ E. (2.9) k∈J The conditional expectation is a linear operation. Moreover, it is easy to verify from Equation (2.9) that for any integrable random variable X and sub-σ-algebra G, ( X if X is G-measurable E[X|G] = (2.10) E[X] if X is independent of G. Let {Fn }n∈N∪{0} be a filtration of F and suppose we are given a sequence of real-valued random variables {Xn }n∈N∪{0} such that for each n, Xn is integrable and Fn -measurable. Then {Xn , Fn }n∈N∪{0} is said to be a martingale if for each n ∈ N ∪ {0},3 E[Xn+1 |Fn ] = Xn a.s. Similarly, {Xn , Fn }n∈N∪{0} is said to be a super-martingale if for each n ∈ N ∪ {0}, E[Xn+1 |Fn ] ≤ Xn a.s. and a sub-martingale if for each n ∈ N ∪ {0}, E[Xn+1 |Fn ] ≥ Xn a.s. Example 1. Perhaps the simplest example of a martingale is the sum of independent integrable centered random variables. Indeed, let {Xn }P n∈N be such a sequence, {Fn := σ(X1 , . . . , Xn )}n∈N its natural filtration and define Yn = nk=1 Xk . Then E[Yn+1 |Fn ] = = n+1 X k=1 n X E[Xk |Fn ] = n X E[Xk |Fn ] + E[Xn+1 |Fn ] k=1 Xk + E[Xn+1 ] = Yn + 0 = Yn , k=1 where in the first line we used the linearity of the conditional expectation, and in line two we used both identities of Equation (2.10). Therefore {Yn , Fn }n∈N∪{0} is a martingale, where Y0 = 0. 3 a.s.= almost surely 10 Martingale concentration inequalities Roughly speaking, the concentration of measure phenomenon can be stated in the following way [46]: “A random variable that depends in a smooth way on many independent random variables (but not too much on any of them) is essentially constant”. This means that such a random variable, X, concentrates around its mean (or median) in a way that the probability of the event {|X − E[X]| > t} decays exponentially in t ≥ 0. For more details on the theory of concentration of measure see [29]. Several techniques have been developed so far to prove concentration inequalities. The method that we focus on here is the martingale approach (see e.g. [8], [42] Chapter 2 and references therein). The Azuma-Hoeffding inequality has been often used to prove concentration phenomena for discrete-time martingales whose jumps are almost surely bounded. Hoeffding [22] proved this inequality for a sum of independent and bounded random variables, and Azuma [6] later extended it to martingales with bounded differences. Theorem 2 (Azuma-Hoeffding inequality). Let {Xk , Fk }k∈N∪{0} be a discrete-parameter realvalued super-martingale. Suppose that for every k ∈ {1, . . . , n} the condition |Xk −Xk−1 | ≤ dk holds a.s. for a real-valued sequence {dk }nk=1 of non-negative numbers. Then for every α ≥ 0,   α2 P(Xn − X0 ≥ α) ≤ exp − Pn . (2.11) 2 k=1 d2k The next result from [31] (see also [42] Corollary 2.3.2) provides an improvement over the Azuma-Hoeffding inequality in the limit of large n, in the case in which dk = d for any k, by making use of the variance. Theorem 3. Let {Xk , Fk }k∈N∪{0} be a discrete-parameter real-valued super-martingale. Assume that, for some constants 0 < ν < d the following two inequalities are satisfied almost surely: Xk − E[Xk |Fk−1 ] ≤ d E[(Xk − E[Xk |Fk−1 ])2 |Fk−1 ] ≤ ν 2 for every k ∈ {1, . . . , n}. Then for every κ ≥ 0,    δ+γ γ P(Xn − X0 ≥ κn) ≤ exp −nDbin , 1+γ 1+γ where γ := ν2 < 1, d2 δ := κ d and Dbin (.k.) here denotes the binary classical relative entropy:     p 1−p Dbin (pkq) := p log + (1 − p) log , q 1−q If δ > 1 then these probabilities are equal to zero. 11 p, q ∈ [0, 1]. (2.12) To see why (2.12) is indeed an improvement over the Azuma-Hoeffding inequality (2.11) in the limit of large n (in the case in which dk = d for any k), use the following identity, which is obtained by a Taylor expansion of log(1 + u): (1 + u) log(1 + u) = u + X (−u)k , k(k − 1) − 1 < u ≤ 1. k≥2 Then it follows that   n X δ+γ γ 1 = nDbin δk 1+γ 1+γ 1+γ k(k − 1)  1 1− − γ k≥2 = δ2n 2γ k−1 !  + O δ3n . The first term leads to an improvement by a factor of (2.11). (2.13) 1 γ over the Azuma-Hoeffding bound In the special case of a martingale of the form given in Example 1, the following concentration inequality was proved by Kearns and Saul [28]. It is a refinement of the well-known Hoeffding inequality [22] and its proof is analogous to the proof of the latter. We employ it in our analysis of quantum hypothesis testing for the case of uncorrelated states (see Section 3.3). Note that for Example 1, the Hoeffding inequality, and hence also the Kearn-Saul inequality, provide an improvement over the Azuma-Hoeffding inequality. Theorem 4. [Kearns-Saul inequality] Let {Xk }k∈N∪{0} be independent real-valued bounded random variables, such Pthat for every k ∈ {1, . . . , n}, Xk ∈ [ak , bk ] holds a.s. for constants ak , bk ∈ R. Let µn := nk=1 E[Xk ]. Then for every α ≥ 0 !   n X √ α2 n P P Xk − µn ≤ −α n ≤ exp − , 4 nk=1 ck k=1 where  (1 − 2pk )(bk − ak )2       k 4 log 1−p pk ck :=  2    (bk − ak ) 8 if pk 6= 1 2 1 if pk = , 2 where pk is defined as pk := E[Xk ] − ak , bk − ak k ∈ {1, . . . , n}. This indeed improves Hoeffding’s inequality unless pk = 12 1 2 for all k ∈ {1, . . . , n}. 3 3.1 Hypothesis testing via martingale methods Finite blocklength analysis of the Type II error exponent Let us fix a sequence of finite dimensional Hilbert spaces {Hn }n∈N , and let {ρn }n∈N and {σn }n∈N denote two sequences of states, where for each n ∈ N, ρn , σn ∈ D(Hn ). For a test 0 ≤ Tn ≤ In , the Type I and Type II errors for the corresponding binary quantum hypothesis testing problem are given by α(Tn ) = Tr[(In − Tn )ρn ] and β(Tn ) = Tr[Tn σn ]. As mentioned in the introduction, in the context of asymmetric hypothesis testing, the two quantities of interest are the Stein error and the Hoeffding error, defined through Equation (1.2) and Equation (1.3), respectively. In this section we obtain bounds on these errors for finite blocklength, i.e. for finite values of n, for uncorrelated states, that is when ρn and σn are each given by a tensor product of n (not necessarily identical) states. Remark 1. We restrict our consideration to the case of faithful states ρn , σn only to make our exposition more transparent. Simple limiting arguments show that all our results remain valid in the case in which supp(ρn ) ⊆ supp(σn ). In fact, our upper bounds on the Stein- and Hoeffding errors, as given in Lemma 1, are valid when the sequences {ρn }n∈N and {σn }n∈N satisfy Condition 1 given below. Condition 1. The states ρn , σn ∈ D(Hn ) of the sequences {ρn }n∈N and {σn }n∈N are such that the random variables Y0 = 0 and Yn := Xn +D(ρn kσn ), where Xn is the random variable associated to the pair (log ∆σn |ρn , Ωρn ) through Equation (2.4), form a super-martingale with respect to their natural filtration. Moreover, there exists a sequence {dk }k∈N of non-negative numbers such that for any k ≥ 1, |Yk − Yk−1 | ≤ dk almost surely i.e. with probability 1. Remark 2. One can readily verify that E[Xn ] = −D(ρn kσn ), so that Yn is a centered random variable, for each n ∈ N. As shown below, uncorrelated states satisfy the above condition. Later in the paper, we show how a refined analysis allows us to recover similar results for certain classes of correlated states, i.e. those satisfying a so-called factorization property (see Sections 4 and 5). Our upper bounds on the finite blocklength Stein- and Hoeffding errors are stated in the following lemma: Lemma 1 (Upper bounds on finite blocklength optimal asymmetric error exponent). Let {ρn }n∈N and {σn }n∈N be two sequences of states that satisfy Condition 1. Then for any ε > 0 there exists a sequence of tests {Tnε }n∈N such that for any n ∈ N, v   u n X u α(Tnε ) ≤ ε, β(Tnε ) ≤ exp −D(ρn kσn ) + t2 log(1/ε) d2k  . k=1 Moreover, for any r > 0, there exists a sequence of tests {T̃nr }n∈N such that for each n ∈ N, v   u n X u α(T̃nr ) ≤ e−nr , β(T̃nr ) ≤ exp −D(ρn kσn ) + t2nr d2k  . k=1 13 Hence, for each n ∈ N, v  u n u X βn (ε) ≤ exp −D(ρn ||σn ) + t2 d2k log(1/ε)  (3.1) k=1 v  u n X u β̃n (r) ≤ exp −D(ρn ||σn ) + t2nr d2k  .  (3.2) k=1 In order to prove Lemma 1, we use the Azuma-Hoeffding martingale concentration inequality (Theorem 2) as well as the following result, which allows us to relate the error probabilities arising in asymmetric quantum hypothesis testing to laws of classical supermartingales. The latter result was stated as Proposition 1 in [12] but its proof is essentially due to Li [30]. Proposition 1. [12] Let ρ, σ be two states in D(H). For any L > 0 there exists a test T such that Tr ρ(1 − T ) ≤ Ωρ , P[− log L,∞) (log ∆σ|ρ ) Ωρ and Tr σT ≤ L−1 , (3.3) P where P[− log L,∞) (log ∆σ|ρ ) := x∈[− log L,∞) Px (log ∆σ|ρ ), with Px (log ∆σ|ρ ) being the spectral projection operator of log ∆σ|ρ of associated eigenvalue x. For the proof of this proposition, see [12]. The proof actually provides a construction of the tests {Tnε }n∈N and {T̃nr }n∈N appearing in Lemma 1. Proof of Lemma 1 For n ∈ N, fix 0 < Ln ≤ eD(ρn kσn ) . Then by (3.3), there exists a test Tn such that α(Tn ) ≤ hΩρn , P[− log Ln ,∞) (log ∆σn |ρn )(Ωρn )i and β(Tn ) ≤ L−1 n . Now hΩρn , P[− log Ln ,∞) (log ∆σn |ρn )(Ωρn )i = hΩρn , 1[− log Ln ,∞) (log ∆σn |ρn )(Ωρn )i  = E 1[− log Ln ,∞) (Xn ) = P(Xn ≥ − log Ln ) = P(Yn ≥ − log Ln + D(ρn kσn )). where Xn is the random variable associated to the pair (log ∆σn |σn , Ωρn ), and Yn := Xn + D(ρn kσn ). Assuming that Condition 1 is satisfied, an application of Theorem 2 to the supermartingale {Yk , Fk }k∈N∪{0} with Y0 = 0, where {Fk }k∈N is the natural filtration associated with the random variables Xk , yields the following:   α(Tn ) ≤ P Yn − Y0 ≥ D(ρn kσn ) − log Ln   (D(ρn kσn ) − log Ln )2 P ≤ exp − . (3.4) 2 nk=1 d2k 14 Setting the quantity on the right hand side of the above inequality to be equal to ε, and using the fact that log Ln ≤ D(ρn kσn ), we find that v u n X u t log Ln = D(ρn kσn ) − 2 log(1/ε) d2k . k=1 This implies that v  u n X u = exp −D(ρn kσn ) + t2 log(1/ε) d2k  ,  β(Tn ) ≤ L−1 n k=1 from which (3.1) follows since βn (ε) ≤ β(Tn ). The inequality (3.2) can be derived analogously by following the same steps as above but replacing ε by e−nr . 3.2 A lower bound on the second order asymptotics of the Type II error exponent As yet another application of a martingale concentration inequality in quantum hypothesis testing, we obtain a lower bound on the second order asymptotics of the type II error exponent, − log βn (ε), for the case in which the states ρn , σn occurring in the sequence satisfy the more constrained Condition 2. The lower bound is given in Proposition 2. In particular, Condition 2 can be readily verified to be satisfied when ρn and σn are of the tensor product form. Condition 2. The states ρn and σn of states on each Hn are such that the random variables Y0 = 0 and Yn := Xn + D(ρn kσn ), where Xn is the random variable associated to the pair (log ∆σn |ρn , Ωρn ), form a super-martingale with respect to their natural filtration. Moreover, assume that for some constants d and ν the following two requirements are satisfied almost surely: Yk − E[Yk |Fk−1 ] ≤ d E[(Yk − E[Yk |Fk−1 ])2 |Fk−1 ] ≤ ν 2 . Proposition 2. Suppose that the sequences of states {ρn }n∈N and {σn }n∈N satisfy Condition 2. Then for any sequence {Ln }n∈N of positive numbers such that for any n ∈ N, D(ρn kσn ) ≥ log Ln , there exists a sequence of tests {Tn }n∈N such that for any n ∈ N the type I and type II errors satisfy the following inequalities:    δn + γ γ α(Tn ) ≤ exp −nDbin , 1+γ 1+γ β(Tn ) ≤ L−1 n , (3.5) where γ = ν 2 /d2 and for each n, δn = (D(ρn kσn ) − log Ln ) /nd. This implies that for any 0 < ε < 1: p − log βn (ε) ≥ D(ρn kσn ) − 2n log(ε−1 )ν + O(1). (3.6) 15 Proof. The first part of the proof of this proposition is similar to the proof of Lemma 1 and follows from a simple use of Theorem 3 as well as Proposition 1. Using (2.13), one derives the following asymptotic upper bound for α(Tn ):    (D(ρn kσn ) − log Ln )3 (D(ρn kσn ) − log Ln )2 1 +O . α(Tn ) ≤ exp − n 2ν 2 n2 p Fix 0 < ε < 1. Choosing log Ln = D(ρn kσn ) − 2n log ε−1 ν, the last inequality can be simplified:      1 1 α(Tn ) ≤ exp log ε + O √ =ε+O √ . n n This implies, by a suitable use of Taylor expansion, that p − log βn (ε) ≥ D(ρn kσn ) − 2n log(ε)−1 ν + O(1). 3.3 Example: the case of uncorrelated quantum states In this section we consider the case in which {ρn }n∈N and {σn }n∈N are sequences of independent (i.e. uncorrelated) states. We show that in this case Condition 1 holds, and hence Lemma 1 can be applied. We also show that in this case, a tighter concentration inequality than the Azuma-Hoeffding inequality of Theorem 2 provides better upper bounds on the Stein- and Hoeffding errors. Suppose that the sequences {ρn }n∈N and {σn }n∈N are such that for each n, ρn and σn are of the following tensor product form: ρn = ρ̃1 ⊗ · · · ⊗ ρ̃n vs σn = σ̃1 ⊗ · · · ⊗ σ̃n , where for each k ∈ {1, 2, . . . , n}, ρ̃k , σ̃k ∈ D(H̃k ), where H̃k is a finite-dimensional Hilbert space. In this case, log ∆σn |ρn = n X id⊗k−1 ⊗ log ∆σ̃k |ρ̃k ⊗ id⊗n−k . k=1 As all the terms in the sum in the above identity commute, one finds by functional calculus that for any u ∈ R, e iu log ∆σn |ρn = n Y   exp iu id⊗k−1 ⊗ log ∆σ̃k |ρ̃k ⊗ id⊗n−k . k=1 This in turn implies that the random variable Xn has characteristic function n n h i Y Y  iuXn  iu log ∆ρ̃k |σ̃k iu log ∆σn |ρn = hΩρn , e (Ωρn )i = hΩρ̃k , e (Ωρ̃k )i = E eiuX̃k , E e k=1 16 k=1 where for each 1 ≤ k ≤ n, X̃k is a random variable associated to the pair (log ∆σ̃k |ρ̃k , Ωρ̃k ). P The random variable Xn has the same distribution as the sum Xn = nk=1 X̃k of independent random variables X̃k , which in turn implies that the random variable Xn − E[Xn ] = Xn + D(ρn kσn ) has the same distribution as n X X̃k − E[X̃k ] = k=1 n X X̃k + D(ρ̃k kσ̃k ). k=1 Hence, P without loss of generality, the random variable Yn appearing in Condition 1 is equal to nk=1 X̃k + D(ρ̃k kσ̃k ). Now {Yn , Fn }n∈N∪{0} is a martingale of the form of Example 1, where Fn = σ(X̃k , k ≤ n). Moreover the random variables Yk − Yk−1 := X̃k + D(ρ̃k kσ̃k ) are bounded by dk := k log ∆σ̃k |ρ̃k + D(ρ̃k kσ̃k )k∞ . (3.7) This analysis leads to the following corollary of Lemma 1: Theorem 5 (Upper bounds for uncorrelated states). States of the form ρn = ρ̃1 ⊗ · · · ⊗ ρ̃n and σn = σ̃1 ⊗ · · · ⊗ σ̃n (3.8) on a Hilbert space H̃1 ⊗· · ·⊗H̃n satisfy Condition 1. Therefore, they satisfy the bounds given in (3.1) and (3.2) on the error exponents of type II with coefficients dk given by Equation (3.7). More precisely, for any ε > 0 there exists a sequence of tests {Tnε }n∈N such that for any n ∈ N v   u n X u α(Tnε ) ≤ ε, β(Tnε ) ≤ exp −D(ρn kσn ) + t2 log(1/ε) d2k  . k=1 Similarly, for any r > 0, there exists a sequence of tests {T̃nr }n∈N such that for each n ∈ N: v   u n X u d2k  , α(T̃nr ) ≤ e−nr , β(T̃nr ) ≤ exp −D(ρn kσn ) + t2nr k=1 This implies that for each n ∈ N: v  u n u X βn (ε) ≤ exp −D(ρn ||σn ) + t2 d2k log(1/ε)  (3.9) k=1 v  u n X u β̃n (r) ≤ exp −D(ρn ||σn ) + t2nr d2k  .  (3.10) k=1 In this special case of a sum of independent random variables, we can use the tighter concentration inequality, namely the Kearns-Saul inequality (Theorem 4) to get better bounds than the ones given in Theorem 5. This yields: 17 Theorem 6 (Improved upper bounds for uncorrelated states). Let {ρn }n∈N and {σn }n∈N two sequences of states of the form given in Equation (3.8). Then for any ε > 0 there exists a sequence of tests {Tnε }n∈N such that, for any n ∈ N, v   u n X u α(Tnε ) ≤ ε, β(Tnε ) ≤ exp −D(ρn kσn ) + t4 log(1/ε) ck  , k=1 where the constants ck are given by  (1 − 2pk )(bk − ak )2       k 4 log 1−p pk ck :=  2    (bk − ak ) 8 with ak , bk and pk defined as   λmax (σ̃k ) ak := log , λmin (ρ̃k )  bk := log λmin (σ̃k ) λmax (ρ̃k ) if pk 6= 1 2 (3.11) 1 if pk = , 2  , pk := −D(ρ̃k kσ̃k ) − ak . bk − ak Similarly, for any r > 0, there exists a sequence of tests {T̃nr }n∈N such that for each n ∈ N: √ Pn α(T̃nr ) ≤ e−nr , β(T̃nr ) ≤ e−D(ρn kσn )+ 4nr k=1 ck , This implies that for each n ∈ N: v  u n X u ck  βn (ε) ≤ exp −D(ρn ||σn ) + t4 log(ε−1 )  (3.12) k=1 v  u n X u β̃n (r) ≤ exp −D(ρn ||σn ) + t4nr ck  .  (3.13) k=1 3.3.1 Reduction to the i.i.d. case Theorem 5 gives upper bounds on the Stein- and Hoeffding errors for uncorrelated states. In the case of i.i.d. states (ρ⊗n vs. σ ⊗n ), the bound corresponding to the Stein error (3.9) reduces to 1 1 log βn (ε) ≤ −D(ρkσ) + √ h(ε), n n (3.14) where h(ε) := p 2 log ε−1 k log ∆σ|ρ + D(ρkσ)k∞ (3.15) Taking the limit on both sides, the result is in accordance with quantum Stein’s lemma: 1 lim − βn (ε) = D(ρkσ). n n→∞ 18 As mentioned in the introduction, in the i.i.d. case, the authors of [30, 47] moreover showed that p − log βn (ε) = nD(ρkσ) + nV (ρkσ)Φ−1 (ε) + O(log n) (3.16) where V (ρkσ) is the quantum information variance defined in Equation (2.8), and Φ is the cumulative distribution function of a standard Gaussian random variable. In fact, Li’s proof is very similar to our proof of Lemma 1, as he was the first to prove an i.i.d. version of Proposition 1 which was later on adapted to fit non i.i.d. settings in [12]. This result coupled to a Central limit theorem (or more precisely a refinement of it called the Berry Esseen theorem) were the two main ingredients of the proof of (3.16). This equation shows that the correct order of the deviation of n1 log βn (ε) from −D(ρkσ) is indeed √1n (at least for ε 6= 1/2). More precisely, (3.16) implies that   p √ 1 lim sup n log βn (ε) + D(ρkσ) = − V (ρkσ)Φ−1 (ε) (3.17) n n→∞ This implies that for all ε ∈ [0, 1] and all 1 ≥ ε0 > ε there exist infinitely many n ∈ N for which   p √ 1 n log βn (ε) + D(ρkσ) ≥ − V (ρkσ)Φ−1 (ε0 ) n Using (3.14) this imposes that for all ε0 > ε p p 2 log ε−1 k log ∆σ|ρ + D(ρkσ)k∞ ≥ − V (ρkσ)Φ−1 (ε0 ). (3.18) As pointed out in [5], the negative sign on the right hand side of (3.18) is justified by the fact that, for ε < 1/2, the right hand side is itself negative. Moreover, to prove (3.18) it suffices to show that for any 0 < ε < 1/2, k log ∆σ|ρ + D(ρkσ)k∞ Φ−1 (ε) p ≥ −p . V (ρkσ) 2 log ε−1 Let us focus on the right hand side of the above equation. By the Gaussian concentration inequality (see e.g. [8] Theorem 5.6), Φ(x) ≤ e−x 2 /2 , setting x = Φ−1 (ε), we hence infer that for any 0 < ε < 1/2,  ε ≤ exp −(Φ−1 (ε))2 /2 , which in turn implies that −Φ−1 (ε) ≤ p 2 log ε−1 . Hence, the inequality (3.18) holds provided p V (ρkσ) ≤ k log ∆σ|ρ + D(ρkσ)k∞ , 19 (3.19) which can easily be verified as follows: V (ρkσ) = hΩρ , (log ∆σ|ρ + D(ρkσ)id)2 (Ωρ )i ≤ k log ∆σ|ρ + D(ρkσ)idk2∞ Our theorems should finally be compared with the results of [5] where similar bounds have been derived in the i.i.d. setting using different techniques. For example, as already mentioned in the introduction, for the Stein error, it was shown in [5] that (see Theorem 3.3 and Equation (35) of [5]): f (ε) 1 g(ε) −D(ρkσ) − √ ≤ log βn (ε) ≤ −D(ρkσ) + √ , n n n (3.20) where √ f (ε) = 4 2 log η log(1 − ε)−1 , √ g(ε) = 4 2 log η log ε−1 (3.21) and η := 1 + e1/2D3/2 (ρkσ) + e−1/2D1/2 (ρkσ) . The upper bound in (3.20) was found via semidefinite programming, the use of a bound on the optimal error probability in symmetric hypothesis testing in terms of the α-Rényi divergence (originally derived in [4]), and an inequality relating the α-Rényi divergence of the states ρ and σ to their relative entropy. The lower bound was derived using the monotonicity of the α-Rényi divergence under completely positive trace-preserving (CPTP) maps, the CPTP map here being the measurement channel associated to any given test. Our bound, given in (3.14), is tighter than the corresponding upper bound obtained in [5] (given by (3.20) and (3.21)) for ε ≤ ε0 , where ! k log ∆σ|ρ + D(ρkσ)k2∞ , ε0 := exp − 16(log η)2 as the dependence of h on ε is given by the square root of log ε−1 , whereas g behaves as log ε−1 . In fact, Theorem 6 yields a bound which is tighter than (3.14) and is given by 1 h̃(ε) log βn (ε) ≤ −D(ρkσ) + √ , n n where h̃(ε) := p 4c log(ε−1 ), (3.22) and c is defined as follows:  (1 − 2p)(b − a)2       4 log 1−p p c :=  2    (b − a) 8 20 if p 6= 1 2 (3.23) 1 if p = , 2 with  a := log λmax (σ) λmin (ρ)   , b := log λmin (σ) λmax (ρ)  , p := −D(ρkσ) − a . b−a The above bound is tighter than (3.20) for all ε ≤ ε̃0 , where   c2 , ε̃0 := exp − 8(log η)2 where η is given below (3.21). Finally, one can also compare the asymptotic bound of (3.6) for the i.i.d. case to (3.16). In this case, with the notations of Condition 2, E[(Yk − E[Yk |Fk−1 ])2 |Fk−1 ] = E[(Yk − Yk−1 )2 |Fk−1 ] = E[(X̃k + D(ρkσ))2 |Fk−1 ] = E[(X̃ + D(ρkσ))2 ] = E[X̃ 2 ] − D(ρkσ)2 = V (ρkσ). where X̃ and the X̃k ’s are independent, identically distributed random variables of law µσ|ρ , p the last identity arising from Equation (2.7). Hence, (3.6) holds with ν = V (ρkσ) and can be expressed as follows: p   2 log(ε−1 )V (ρkσ) 1 1 √ log βn (ε) ≤ −D(ρkσ) + . (3.24) +O n n n From (3.19), s2 (ε) := p p 2 log(ε−1 )V (ρkσ) ≥ −Φ−1 (ε) V (ρkσ) ≡ s1 (ε), (3.25) which implies that for n large enough, the asymptotic bound (3.24) is looser than the one given by (1.4). Figure 1 shows an example for which our bounds are significantly closer to the second-order asymptotic behaviour (given by s1 (ε)) than the original upper bound of [5] for ε < ε̃0 , ε0 . 21 Rates 2 g(ϵ) h(ϵ) ˜ h(ϵ) 1 0.2 0.4 0.6 0.8 1.0 ϵ -1 s2 (ϵ) s1 (ϵ) -f(ϵ) -2 Figure 1: Bounds on the function Q(n, ε) (given by Equation (1.7)) for a pair of randomly generated qubit states ρ and σ; here ρ has Bloch vector (−0.177483, 0.365807, 0.291007) whereas σ has Bloch vector (−0.452239, −0.141906, −0.159193). The functions g and f (defined in (3.21)) correspond to the finite blocklength bounds found in [5]; h (defined in (3.15)) corresponds to the bound given in Theorem 5, and h̃ (defined in (3.22)) corresponds to the tighter bound given in Theorem 6. The functions s1 and s2 (cf. (3.25)) correspond to the second-order asymptotic behaviours stated in Equation (3.16) and in (3.24), respectively. 4 Correlated states and factorization properties In the last section, we derived bounds on the optimal type II errors in asymmetric hypothesis testing for uncorrelated states. In the reminder of this paper, we extend these results to a particular class of correlated states, which satisfy a so-called factorization property described below. As an application of this, we obtain bounds on the capacities of certain classes of classical-quantum channels with memory. Let H be a finite dimensional Hilbert space, and define a family {ρn }n∈N of states such that for each n, ρn ∈ D(H⊗n ). We say that the family {ρn }n∈N satisfies a (non-homogeneous) upper (lower) factorization property if there exists an auxiliary family {ρ̃k }k∈N of states on D(H) and a constant R > 0 such that for each n ≥ 1, ρn ≤ R ρn−1 ⊗ ρ̃n ρn ≥ R −1 ρn−1 ⊗ ρ̃n upper factorization (4.1) lower factorization. (4.2) The homogeneous case, where for each n, ρ̃n = ρ, for some fixed state ρ ∈ D(H) was first studied in [19, 20], where asymptotic results in the context of symmetric and asymmetric quantum hypothesis testing were derived for such families of states. Obviously, uncorrelated states satisfy lower and upper factorization, with R = 1. Gibbs states of translation-invariant finite-range interactions were shown to satisfy both lower and upper homogeneous factorization properties for R > 1 (see [19] Lemma 4.2). Similarly, finitely correlated states, as defined 22 in [16], were shown to satisfy a homogeneous upper factorization property as well, as a homogeneous lower factorization in some cases (see [19] Proposition 4.4 and Example 4.6). The reason for introducing the non-homogeneous extension will become clear in Section 7. An example of a family of states satisfying non-homogeneous upper factorization is provided by extending the definition in [16] of finitely correlated states as follows: suppose given a spin chain with one-site algebra A ⊂ B(H), and let B be a C ∗ -subalgebra of B(K), for some finite dimensional Hilbert spaces H and K, {En }n∈N a family of completely positive, unital (CPU) maps En : A ⊗ B → B, and ρ a faithful state on B. Assume further that for any n ∈ N, TrA En∗ (ρ) = ρ, where En∗ : B → A ⊗ B stands for the pre-adjoint map of E. Construct then the family {τn }n∈N of states on A⊗n ⊗ B as follows: τ1 := E1∗ (ρ), ⊗ En∗ ) ◦ ... ◦ (idA ⊗ E2∗ ) ◦ E1∗ (ρ), τn := (id⊗n−1 A n = 2, 3, ... To obtain a family of reduced states on the spin chain, we then trace out the auxiliary system B: ρn := TrB τn . In this case, we say that (B, {En }n∈N , ρ) is a generating triple for the family ρn . In the special case in which En := E for each n, where E : A ⊗ B → B is a given CPU map, the states ρn are the so-called finitely correlated states and provide a non-commutative generalization of the notion of (homogeneous) Markov chains. For the same reason, the above construction can be viewed as an extension of non-homogeneous Markov chains to the quantum setting. Proposition 3. Non-homogeneous finitely correlated states satisfy the upper factorization property (4.1), with ρ̃n := TrB En∗ (ρ) and R > 1. The proof of Proposition 3 follows very closely the one for homogeneous finitely correlated states as given in Proposition 4.4 of [19]. For sake of completeness, we give a proof of it in Appendix B. In a similar fashion as [19], one can provide an example of non-homogeneous finitely correlated states satisfying the lower factorization property. To do so, assume that B is a commutative algebra. Therefore it is isomorphic to the algebra F(X ) : {f : X → C} of complex-valued functions on some finite set X . F(X ) is generated by the Dirac densities δx , x ∈ X . Then, any CPTP map E∗ : B → A ⊗ B can be specified by its values on the functions δx , and E∗ (δx ) can be uniquely decomposed in the form X E∗ (δx ) = Txy ρxy ⊗ δy , (4.3) y where {Txy : y ∈ X } forms a probability distribution on X and ρxy are states on A. The following lemma was proved in [19] (see Example 4.6). 23 Lemma 2. Let E∗ : B → A ⊗ B of the form given by Equation (4.3), and Φ : B → B, Φ(b) = Tr(ρb)IB . There exists R > 0 such that E∗ − R(E∗ ◦ Φ∗ ) is completely positive if and only if T >0 and supp ρxy = supp ρzy ∀x, y, z ∈ X . (4.4) The following result is hence a direct consequence of Lemma 2: Proposition 4. Let B a commutative algebra with associated set X , and let {ρn }n∈N be a family ofPnon-homogeneous finitely correlated states with generating triple (B, {E}n∈N , ρ), where ρ ≡ x∈X ρx δx . If for each n, En∗ satisfies the conditions (4.4), then P {ρn }n∈N satisfies the non-homogeneous lower factorization property (4.2), with ρ̃n := x∈X ρx En∗ (δx ) and R > 0. The proof of this proposition follows exactly the same lines as the proof of Proposition 3, given in Appendix B, where the inequality comes from the fact that, by Lemma 2, there exists R > 0 such that En∗ − R(En∗ ◦ Φ∗ ) is completely positive for each n. 5 Finite blocklength hypothesis testing for correlated states In this section we derive finite blocklength bounds on the optimal type II errors in the case of sequences of correlated states. In order to do so, we use a variant of the proof of the Azuma-Hoeffding inequality, as well as the framework developed by Petz in [40] where the monotonicity of the relative entropy is derived using the operator Jensen inequality [13, 17]. Again we fix a sequence of finite dimensional Hilbert spaces {H⊗n }n∈N and let {ρn }n∈N and {σn }n∈N denote two sequences of states, where for each n ∈ N, ρn , σn ∈ D(H⊗n ). Assume, moreover, that these sequences satisfy the (homogeneous) upper-factorization property: there exists R > 0 such that ρn ≤ R ρn−1 ⊗ ρ1 , σn ≤ R σn−1 ⊗ σ1 , n > 1. (5.1) Theorem 7. Given two sequences of states {ρn }n∈N and {σn }n∈N satisfying the upper factorization property (5.1), with R ≥ 1, the following bounds hold for any 0 ≤ ε ≤ 1, √ ( 2 n −1 e−nD(ρ1 kσ1 )+c 2n log(R ε ) if ε ≥ Rn e−nc /2 , βn (ε) ≤ 2 n −1 e−nD(ρ1 kσ1 )+nc /2+log(R ε ) else, where c := k log ∆σ1 kρ1 + D(ρ1 kσ1 )idk. Similarly, √ ( e−nD(ρ1 kσ1 )+nc 2(r+log R) β̃n (r) ≤ 2 e−n(D(ρ1 kσ1 )−c /2−r−log R) if r ≤ c2 /2 − log R, else. 1/2 Proof. As before, Ωn := ρn , n ∈ N. Now for each n ∈ N, define the map Vn−1 : B(H⊗n )(Ωρn−1 ⊗ Ωρ1 ) → B(H⊗n )Ωρn by Vn−1 (Xn (Ωρn−1 ⊗ Ωρ1 )) = R−1/2 Xn Ωρn , 24 ∀Xn ∈ B(H⊗n ). (5.2) In particular, for Xn := In , we have Vn−1 (Ωn−1 ⊗ Ωρ1 ) = R−1/2 Ωρn . (5.3) One can verify that Vn−1 is a contraction: for any Xn ∈ B(H⊗n ), hVn−1 (Xn (Ωρn−1 ⊗ Ωρ1 )), Vn−1 (Xn (Ωρn−1 ⊗ Ωρ1 ))i = R−1 hXn Ωρn , Xn Ωρn i = R−1 Tr(Xn ρn Xn∗ ) ≤ Tr(Xn (ρn−1 ⊗ ρ1 )Xn∗ ) (5.4) = hXn (Ωρn−1 ⊗ Ωρ1 ), Xn (Ωρn−1 ⊗ Ωρ1 )i, where the inequality (5.4) follows from the upper factorization property (5.1). Moreover, for any Xn ∈ B(H⊗n ), hVn−1 (Xn (Ωρn−1 ⊗ Ωρ1 ), ∆σn |ρn Vn−1 (Ωρn−1 ⊗ Ωρ1 )i = R−1 hXn Ωρn , ∆σn |ρn Xn Ωρn i = R−1 Tr(σn Xn Xn∗ ) ≤ Tr((σn−1 ⊗ σ1 )Xn Xn∗ ) (5.5) = hXn (Ωρn−1 ⊗ Ωρ1 ), ∆σn−1 ⊗σ1 |ρn−1 ⊗ρ1 (Xn (Ωρn−1 ⊗ Ωρ1 ))i, where again, the inequality (5.5) follows from the upper factorization property (5.1). Hence, on B(H⊗n )(Ωρn−1 ⊗ Ωρ1 ), ∗ Vn−1 ∆σn |ρn Vn−1 ≤ ∆σn−1 ⊗σ1 |ρn−1 ⊗ρ1 = ∆σn−1 |ρn−1 ⊗ ∆σ1 |ρ1 . (5.6) Fix 0 ≤ t ≤ 1 and λ ∈ R. By functional calculus, we obtain the following Markov-like inequality: P[λ,∞) (log(∆σn |ρn )) = P[eλt ,∞) (∆tσn |ρn ) ≤ e−λt ∆tσn |ρn . (5.7) Further, using (5.1), hΩρn , ∆tσn |ρn (Ωρn )i = R hVn−1 (Ωρn−1 ⊗ Ωρ1 ), ∆tσn |ρn Vn−1 (Ωρn−1 ⊗ Ωρ1 )i ∗ = R h(Ωρn−1 ⊗ Ωρ1 ), Vn−1 ∆tσn |ρn Vn−1 (Ωρn−1 ⊗ Ωρ1 )i ∗ ≤ R h(Ωρn−1 ⊗ Ωρ1 ), (Vn−1 ∆σn |ρn Vn−1 )t (Ωρn−1 ⊗ Ωρ1 )i ≤ R h(Ωρn−1 ⊗ Ωρ1 ), (∆σn−1 |ρn−1 ⊗ ∆σ1 |ρ1 )t (Ωρn−1 ⊗ Ωρ1 )i = R hΩρn−1 , ∆tσn−1 |ρn−1 (Ωσn−1 )ihΩρ1 , ∆tσ1 |ρ1 (Ωρ1 )i, (5.8) where the third line follows from Theorem 1 and the operator concavity of x 7→ xt , and the fourth line follows from the operator monotonicity of x 7→ xt for t ∈ [0, 1] as well as (5.6). By iterating (5.8) n − 1 times, we obtain: hΩρn , ∆tσn |ρn (Ωρn )i ≤ Rn hΩρ1 , ∆tσ1 |ρ1 (Ωρ1 )in = Rn hΩρ1 , et(log(∆σ1 |ρ1 )) (Ωρ1 )in = Rn e−ntD(ρ1 kσ1 ) hΩρ1 , et(log(∆σ1 |ρ1 )+D(ρ1 kσ1 )) (Ωρ1 )in . Now due to the convexity of the exponential function, we directly get that: ets ≤   1 tc 1 tc e − e−tc s + e + e−tc 2c 2 25 − c ≤ s ≤ c. (5.9) Hence, we obtain the following by functional calculus: for −c id ≤ log ∆σ1 |ρ1 + D(ρ1 kσ1 ) id ≤ c id, where c ≡ k log ∆σ1 |ρ1 + D(ρ1 kσ1 ) idk, (5.10) hΩρ1 , ∆tσ1 |ρ1 (Ωρ1 )i    1 tc 1 tc ≤e e − e−tc (hΩρ1 , log ∆σ1 |ρ1 (Ωρ1 )i + D(ρ1 kσ1 )) + e + e−tc 2c 2  1 2 2 = e−tD(ρ1 kσ1 ) etc + e−tc ≤ e−tD(ρ1 kσ1 )+t c /2 , 2 −tD(ρ1 kσ1 )  where, in the last line, we used the fact that hΩρ1 , log ∆σ1 |ρ1 (Ωρ1 )i = −D(ρ1 kσ1 ), and the inequality 1 u 2 (e + e−u ) ≤ eu /2 2 which can be verified by Taylor expansion. The above bound, together with (5.7) and (5.9), yields, hΩρn , P[λ,∞) (log ∆σn |ρn )(Ωρn )i ≤ Rn e−(λ+nD(ρ1 kσ1 ))t ent where c is given in (5.10). Optimizing over t, we get ( n −(λ+nD(ρ kσ ))2 /(2nc2 ) 1 1 R e hΩρn , P[λ,∞) (log ∆σn |ρn )(Ωρn )i ≤ 2 Rn e−(λ+nD(ρ1 kσ1 ))+nc /2 2 c2 /2 , if λ ≤ n(c2 − D(ρ1 kσ1 )) (i) else (ii). (5.11) The reason for this separation of cases comes from the fact that the optimization procedure can only be carried out for 0 ≤ t ≤ 1. The condition in (i) is found so that the global optimizer t satisfies this condition. On the contrary, (ii) corresponds to the case in which the global minimizer found is greater than 1: in this case we take the best minimizer within the interval [0, 1], which is t = 1. Now given a sequence {Ln }n∈N of positive numbers, and any n ∈ N, choose λ = − log Ln . We recall that by Proposition 1, there exists a sequence of tests {Tn }n∈N such that β(Tn ) ≤ L−1 n and α(Tn ) ≤ hΩρn , P(− log Ln ,∞) (log ∆σn |ρn )(Ωρn )i. Setting ε to be the right hand side of (5.11)(i), we end up with p log βn (ε) ≤ − log Ln = −nD(ρ1 kσ1 ) + c 2n log(Rn ε−1 ), 2 which satisfies the condition − log Ln ≤ n(c2 − D(ρ1 kσ1 )) for ε ≥ Rn e−nc /2 . We here implicitly used that R ≥ 1 so that the quantity inside of the square root is indeed positive. If instead we set ε to be the right hand side of (5.11)(ii), we end up with log βn (ε) ≤ − log Ln = −n(D(ρ1 kσ1 ) − log R) + nc2 /2 + log(ε−1 ), 2 this bound being achieved for − log Ln ≥ n(c2 − D(ρ1 kσ1 )), i.e. for ε ≤ Rn e−nc /2 . The Hoeffding-type bounds of parameter r are derived similarly by setting the upper bounds in (5.11) equal to e−nr . 26 The proof of Theorem 7 can be readily extended to the case of sequences {ρn }n∈N and {σn }n∈N of states satisfying the non-homogeneous upper factorization property: Corollary 1. Consider two sequences of states {ρn }n∈N and {σn }n∈N satisfying the nonhomogeneous upper factorization property (4.1) with auxiliary families of states {ρ̃n }n∈N and {σ̃n }n∈N , and R ≥ 1. Then, for any 0 ≤ ε ≤ 1 the following bounds hold for the Stein error: √ ( 2 n −1 e−Dn ({ρn }k{σn })+Cn 2 log(R ε ) if ε ≥ Rn e−Cn /2 , βn (ε) ≤ (5.12) 2 n −1 e−Dn ({ρn }k{σn })+Cn /2+log(R ε ) else, where Cn2 := Pn 2 k=1 ck , with ck := k log ∆σ̃k kρ̃k + D(ρ̃k kσ̃k )idk, and Dn ({ρn }k{σn }) := n X D(ρ̃k kσ̃k ). k=1 Similarly, for any r > 0 the following bounds hold for the Hoeffding error: √ ( if r ≤ Cn2 /(2n) − log R, e−Dn ({ρn }k{σn })+Cn 2n(r+log R) β̃n (r) ≤ 2 e−Dn ({ρn }k{σn })+Cn /2+nr+n log R else. 6 Moderate deviation hypothesis testing for correlated states In this section, we derive bounds on the asymptotic behavior of the optimal type II error in the moderate deviation regime, which interpolates between the regime of large deviations (Stein’s lemma) and the one of the Central Limit Theorem (second order asymptotics). A moderate sequence of real numbers {an }n∈N has as a defining property that an → 0 and √ nan → ∞, as n → ∞. A typical example of such a sequence is given by the choice an = n−t for some t ∈ (0, 1/2). Recently the moderate deviation analysis of quantum hypothesis testing for uncorrelated states was studied by Cheng et al. [10], and Chubb et al. [11]. Our results extend theirs to families of correlated (i.e. non i.i.d.) states satisfying the upper and/or lower factorization property. We first restate the result of [11] for sake of completeness. For two states ρ, σ ∈ D(H), consider the ε-hypothesis testing relative entropy 4 , introduced by Wang and Renner in [49]: ε DH (ρkσ) := − log β(ε), (6.1) where β(ε) is the one-shot optimal type II error in the hypothesis testing problem with null hypothesis ρ and alternative hypothesis σ: β(ε) := min {β(T )| α(T ) ≤ ε}. 0≤T ≤I 4 This quantity is also referred to as ε-hypothesis testing divergence, e.g. in [11]. 27 2 Theorem 8 ([11] Theorem 1). For ρ, σ > 0, a moderate sequence {an }n∈N and εn = e−nan , the εn -hypothesis testing divergences scales as p 1 εn ⊗n ⊗n DH (ρ kσ ) = D(ρkσ) − 2V (ρkσ)an + ◦(an ), n where D(ρkσ) is the quantum relative entropy defined in Equation (2.6), and V (ρkσ) is the quantum information variance defined in Equation (2.8). The proof of Theorem 8 relies on a reduction of the problem to the one of bounding the law of a sum of independent random variables (which is a typical example of a martingale) from above and below. Such a reduction does not directly carry over to the case of correlated states, and hence a finer analysis of the error probabilities in the moderate deviation regime is needed. We recall that a sequence {ρn }n∈N of states ρn ∈ D(H⊗n ) satisfies the (homogeneous) upper (lower)-factorization property if there exists R > 0 such that for each n > 1: ρn ≤ R ρn−1 ⊗ ρ1 (upper factorization), (6.2) ρn ≥ R−1 ρn−1 ⊗ ρ1 (lower factorization). (6.3) Theorem 9. Let {ρn }n∈N and {σn }n∈N be two sequences of states ρn , σn ∈ D(H⊗n ), and, for 2 each n, define εn := e−nan , where an is a given moderate sequence. If {ρn }n∈N and {σn }n∈N satisfy the upper factorization property (6.2), with 0 ≤ log R < (4 − ec )(ec − 1)2 V (ρ1 kσ1 )/(6c2 ), where c := k log ∆σ1 kρ1 + D(ρ1 kσ1 )idk∞ < log 4. Then, for all n large enough: p 1 εn DH (ρn kσn ) ≥ D(ρ1 kσ1 ) − 2V (ρ1 kσ1 ) n  3 (log R + a2n ) 4 − ec 1/2 (6.4) If {ρn }n∈N and {σn }n∈N satisfy the lower factorization property (6.3) with R > 1, then p 1 εn DH (ρn kσn ) ≤ D(ρ1 kσ1 ) − 2V (ρ1 kσ1 )an + ◦(an ). n (6.5) Remark 3. As mentioned previously, Gibbs states satisfy both the upper and lower factorization property with R > 1. Hence for these states, both the upper and lower bounds of Theorem 9 hold (see Section 4). Finitely correlated state are known to satisfy the upper factorization property for R > 1. Proof. The proof of Equation (6.4) closely follows the one of Theorem 7. We start by recalling (5.9): let n ∈ N, then for any 0 ≤ t ≤ 1, hΩρn , ∆tσn |ρn (Ωρn )i ≤ Rn e−ntD(ρ1 kσ1 ) hΩρ1 , et(log ∆σ1 |ρ1 +D(ρ1 kσ1 )) (Ωρ1 )in . (6.6) Define X to be the classical centered random variable associated with log ∆σ1 |ρ1 + D(ρ1 kσ1 ) and Ωρ1 as given through Equation (2.4). Then (6.6) can be rewritten as hΩρn , ∆tσn |ρn (Ωρn )i ≤ Rn e−ntD(ρ1 kσ1 ) eΨn (t) , 28 (6.7) where Ψn (t) := n log E[etX ] is the cumulant generating function of the sum of n i.i.d. random variables Xi of law identical to the one of X. Now, by Proposition 1, for any sequence {Ln }n∈N of positive numbers such that, for each n, log Ln ≤ nD(ρ1 kσ1 ), there exists a sequence {Tn }n∈N of tests such that for each n, β(Tn ) ≤ L−1 n and α(Tn ) ≤ hΩρn , P(− log Ln ,∞) (log ∆σn |ρn )(Ωρn )i (∆tσn |ρn )(Ωρn )i = hΩρn , P(L−t n ,∞) ≤ Ltn hΩρn , ∆tσn |ρn (Ωρn )i ≤ Rn e−[t(nD(ρ1 kσ1 )−log Ln )−Ψn (t)] . (6.8) where the inequality in the third line comes from the Markov-type inequality P(− log Ln ,∞) (log ∆σn |ρn ) ≤ Ltn ∆tσn |ρn , and the last inequality in (6.8) comes from (6.7). Following a similar Cramér-Chernoff method as the one used in the proof of Bennett’s inequality (see e.g. Theorem 2.9 of [8]), one can optimize the bound in (6.8) over t to obtain the following upper bound on α(Tn ):     nD(ρ1 kσ1 ) − log Ln n /c2 , (6.9) α(Tn ) ≤ R exp −nV (ρ1 kσ1 )h c nV (ρ1 kσ1 ) with h(u) := (1 + u) log(1 + u) − u, for u > 0, and where c := k log ∆σ1 kρ1 + D(ρ1 kσ1 )idk∞ . Note that the argument of the function h in (6.9) is indeed positive since we chose log Ln ≤ nD(ρ1 kσ1 ). The optimizer, t0 , is given by   1 nD(ρ1 kσ1 ) − log Ln t0 := log 1 + c . c nV (ρ1 kσ1 ) Imposing t0 ≤ 1, we find that Ln has to satisfy 0 ≤ nD(ρ1 kσ1 ) − log Ln ≤ (ec − 1)nV (ρ1 kσ1 )/c. (6.10) Using now h(u) ≥ u2 /2 − u3 /6 for u ≥ 0 (see [45] Lemma 1), (6.9) yields "     # nV (ρ1 kσ1 ) 1 nD(ρ1 kσ1 ) − log Ln 2 1 nD(ρ1 kσ1 ) − log Ln 3 log α(Tn ) ≤ n log R − c − c c2 2 nV (ρ1 kσ1 ) 6 nV (ρ1 kσ1 ) (nD(ρ1 kσ1 ) − log Ln )2 [(4 − ec )/3] 2nV (ρ1 kσ1 ) ≡ log εn = −na2n , ≤ n log R − As in the proof of Theorem 7, the assumption that R ≥ 1 is crucial in order for the last equation to have a solution. From the above we obtain the following expression for log Ln in terms of an : p log Ln = nD(ρ1 kσ1 ) − n 2V (ρ1 kσ1 ) 29  3 (log R + a2n ) 4 − ec 1/2 , provided that (6.10) is satisfied for large n. This condition imposes R to be smaller than exp((4 − ec )(ec − 1)2 V (ρ1 kσ1 )/(6c2 )). From the above expression and the inequality β(Tn ) ≤ L−1 n we get: p 1 εn DH (ρn kσn ) ≥ D(ρ1 kσ1 ) − 2V (ρ1 kσ1 ) n  3 (log R + a2n ) 4 − ec 1/2 Next we prove (6.5). We first recall the following result from [24] which we already used in [12] in the context of second order asymptotic analysis, Lemma 3. For any θn , vn ∈ R: e−θn hΩρn , P[−vn ,∞) (log ∆σn |ρn )(Ωρn )i ≤ e*sym (σn , e−θn ρn ), 1 + evn −θn (6.11) where e*sym (A, B) := inf 0≤T ≤I {Tr(A(I − T )) + Tr(BT )} is the minimum total probability of error in symmetric hypothesis testing, the definition here being extended to unnormalized operators A, B > 0. Fix θn , vn ∈ R to be specified later, then (6.11) implies that, for any test 0 ≤ Tn ≤ In for which α(Tn ) ≤ εn , we have   hΩρn , P[−vn ,∞) (log ∆σn |ρn )(Ωρn )i −θn β(Tn ) ≥ e − εn (6.12) 1 + evn −θn Now for 0 ≤ λ ≤ 1, hΩρn , P[−vn ,∞) (log ∆σn |ρn )(Ωρn )i = hΩρn , P[e−λvn ,∞) (∆λσn |ρn )(Ωρn )i ≥ 1 − e−λvn hΩρn , ∆−λ σn |ρn (Ωρn )i, (6.13) where the last line above follows from the reverse Markov inequality (see Appendix A). We now obtain a bound on hΩρn , ∆−λ σn |ρn (Ωρn )i: consider the map Wn : B(H⊗n )Ωρn → B(H⊗n )(Ωρn−1 ⊗ Ωρ1 ), where Wn−1 (Xn Ωρn ) = R−1/2 Xn (Ωρn−1 ⊗ Ωρ1 ). Similarly to the map Vn−1 defined in Equation (5.2), one can show that the map Wn−1 is a contraction, by the lower factorization property: for any Xn ∈ B(H⊗n ), hWn−1 (Xn Ωρn ), Wn−1 (Xn Ωρn )i = R−1 hXn (Ωρn−1 ⊗ Ωρ1 ), Xn (Ωρn−1 ⊗ Ωρ1 )i = R−1 Tr(Xn (ρn−1 ⊗ ρ1 )Xn∗ ) ≤ Tr(Xn ρn Xn∗ ) = hXn Ωρn , Xn Ωρn )i. 30 Moreover, hWn−1 (Xn Ωρn ), ∆σn−1 ⊗σ1 |ρn−1 ⊗ρ1 Wn−1 (Xn Ωρn )i = R−1 hXn (Ωρn−1 ⊗ Ωρ1 ), ∆σn−1 ⊗σ1 |ρn−1 ⊗ρ1 Xn (Ωρn−1 ⊗ Ωρ1 )i = R−1 Tr((σn−1 ⊗ σ1 )Xn Xn∗ ) ≤ Tr(σn Xn Xn∗ ) = hXn Ωρn , ∆σn |ρn (Xn Ωρn )i, so that ∗ Wn−1 ∆σn−1 ⊗σ1 |ρn−1 ⊗ρ1 Wn−1 ≤ ∆σn |ρn . (6.14) This implies that for 0 ≤ λ ≤ 1, ∗ −λ hΩρn , ∆−λ (Ωρn )i σn |ρn (Ωρn )i ≤ hΩρn , (Wn−1 (∆σn−1 ⊗σ1 |ρn−1 ⊗ρ1 )Wn−1 ) ∗ ≤ hΩρn , Wn−1 (∆σn−1 ⊗σ1 |ρn−1 ⊗ρ1 )−λ Wn−1 Ωρn i −λ = R−1 hΩρn−1 , ∆−λ σn−1 |ρn−1 (Ωρn−1 )ihΩρ1 , ∆σ1 |ρ1 (Ωρ1 )i n ≤ R−n hΩρ1 , ∆−λ σ1 |ρ1 (Ωρ1 )i , (6.15) where the first inequality follows from operator monotonicity of x 7→ −x−λ as well as (6.14), the second one from operator convexity of x 7→ x−λ , and the last one by iterating the process n − 1 times. Now by using inequalities (6.13) and (6.15), inequality (6.12) implies ! n 1 − e−λvn R−n hΩρ1 , ∆−λ σ1 |ρ1 (Ωρ1 )i −θn β(Tn ) ≥ e − εn . (6.16) 1 + evn −θn Defining ξ ≡ log ∆σ1 |ρ1 + D(ρ1 kσ1 )id, ⊗n  n −λξ hΩρ1 , ∆−λ (Ω )i = hΩ , e (Ωρ⊗n )ienλD(ρ1 kσ1 ) ⊗n ρ 1 ρ σ1 |ρ1 1 1 which, by functional calculus, can be interpreted as the moment generating function of a sum of centered i.i.d. random variables. Following the steps of the proof of the Berry-Esseen theorem [14], one can find how quickly its associated cumulant generating function gets close to the one of a Gaussian random variable. More precisely, hΩρ1 , e−λξ (Ωρ1 )i = hΩρ1 , (id − λξ + =1+ =e  (λξ)2 + O λ3 ξ 3 )(Ωρ1 )i 2 λ2 V (ρ1 kσ1 ) + O(λ3 hΩρ1 , ξ 3 (Ωρ1 )i) 2 λ2 V 2 (ρ1 kσ1 )+O(λ3 hΩρ1 ,ξ 3 (Ωρ1 )i) , √ where we used the fact that hΩρ1 , ξ(Ωρ1 )i = 0 in the second line. Taking λ = 1/ n, (6.16) reduces to ! √ √ √ −vn / n e nD(ρ1 kσ1 ) R−n e 12 V (ρ1 kσ1 )+O(hΩρ1 ,ξ 3 (Ωρ1 )i/ n) 1 − e − εn . β(Tn ) ≥ e−θn 1 + evn −θn 31 Choosing then, for any η > 0, θn := nD(ρ1 kσ1 ) − n p 2V (ρ1 kσ1 )an + ηnan /2, and vn := θn − ηnan /2, the term between parentheses is bounded, so that, for n large enough, p 1 εn 1 DH (ρ1 kσ1 ) ≤ θn + ηan /2 = D(ρ1 kσ1 ) − 2V (ρ1 kσ1 )an + ηan . n n Remark 4. (6.4) is found similarly to the bounds derived in Theorem 7, and the proof is inspired by the proof of Bernstein’s concentration inequality (see [25, 42]). As in the case of the Azuma-Hoeffding-type bound (5.12), the difference with the derivation of Bernstein’s inequality for tracial noncommutative probability spaces (see [25, 26, 44]) comes from the fact that in the non-tracial case, the Golden-Thompson inequality (see e.g. [7]) does not hold any longer, and its application is replaced by the use of operator Jensen’s inequality. The above proof can be simply extended to take into account the non-homogeneous case. We state the result in this case in the following corollary: Corollary 2. Let {ρn }n∈N and {σn }n∈N two sequences of states on ρn , σn ∈ D(H⊗n ). If {ρn }n∈N and {σn }n∈N satisfy the non-homogeneous upper factorization property (4.1), with 0 ≤ log R < (4 − ec )(ec − 1)2 lim inf Vn ({ρ̃n }k{σ̃n })/(6nc2 ), n and associated auxiliary sequences {ρ̃n }n∈N and {σ̃n }n∈N such that c := sup k log ∆σ̃n |ρ̃n − D(ρ̃n kσ̃n )k∞ < log 4, n∈N then for all n large enough: 1 εn 1 DH (ρn kσn ) ≥ Dn ({ρ̃n }k{σ̃n }) − n n r 2Vn ({ρ̃n }k{σ̃n }) n  1/2 3 2 (log R + an ) , 4 − ec where Dn ({ρ̃n }k{σ̃n }) := n X D(ρ̃k kσ̃k ), Vn ({ρ̃n }k{σ̃n }) := k=1 n X V (ρ̃k kσ̃k ). k=1 If {ρn }n∈N and {σn }n∈N satisfy the non-homogeneous lower factorization property (4.2) with R > 1, then, r 2Vn ({ρ̃n }k{σ̃n }) 1 εn 1 D (ρn kσn ) ≤ Dn ({ρ̃n }k{σ̃n }) − an + ◦(an ). (6.17) n H n n Remark 5. Theorem 1 of [11] (stated as Theorem 8 above) can be proved using the framework of relative modular operators by following similar steps as in the proof of Theorem 9. The proof would only differ from the one above in that in the case of sequences of uncorrelated states, quantities of the form (log ∆σn |ρn + D(ρn kσn ) id) together with Ωρn can be directly associated to sums of independent, centered random variables. Therefore Proposition 1 and Lemma 3 suffice to reduce our problem to the one of finding asymptotic upper and lower bounds on tail probabilities of classical martingales. The lower bound on the εn -hypothesis testing relative entropy therefore arises from a direct application of Bennett’s inequality, whereas the lower bound arises from a direct application of the Berry-Esseen theorem. 32 7 Application to classical-quantum channels with memory In [11], the moderate deviation analysis of binary quantum hypothesis testing of pairs of sequences of uncorrelated states served as a tool to find asymptotic rates for transmission of information over a memoryless classical-quantum (c-q) channel5 , subject to a sequence of 2 tolerated error probabilities {εn }n∈N vanishing sub-exponentially, with εn := e−nan , for any moderate sequence {an }n∈N of real numbers. Here, we extend their results to a class of c-q channels with memory, described below. Let H be a finite-dimensional Hilbert space and X be a (possibly uncountable) set of letters, called an alphabet. In what follows we assume that X is finite. By a classical-quantum channel, we mean a map W : X → D(H), and we denote its image by Im(W). Suppose that Alice (the sender) wants to communicate with Bob (the receiver) using the channel W. To do this, they agree on a finite number of possible messages, labelled by the index set M := {1, ..., M }. To send the message labelled by k ∈ M, Alice encodes her message into a codeword φ(k) ≡ xk ∈ X . The c-q channel W maps the codeword xk to a quantum state W(xk ) ∈ D(H), which Bob receives. To decode Alice’s message, Bob performs a measurement, given by a POVM T = {T1 , ..., TM } on H, where, for i = 1, 2, ..., M , if the outcome corresponding to Ti is obtained, he infers that the ith message was sent. If the message k is sent, the probability of obtaining the outcome l is given by P(l|k) = Tr(W(xk )Tl ), and the average success probability of the encoding-decoding process is hence given by P(success |W, T ) = M 1 X Tr(W(xk )Tk ). M k=1 For any fixed ε ∈ (0, 1), the one-shot ε-error capacity of W is defined as follows: C(W, ε) := log M ∗ (W, ε), where, M ∗ (W, ε) := max {M ∈ N| ∃ POVM T ≡ {T1 , ..., TM } : P(sucess|W, T ) ≥ 1 − ε}. (7.1) Capacities of c-q channels were originally evaluated in the asymptotic limit in which the channel is assumed to be available for arbitrary many uses. In the case of n successive uses of a memoryless channel, the set of messages {1, ..., Mn } is encoded into n letters, each belonging to a common alphabet X . The encoding map is written as follows: φn : k ∈ {1, ..., Mn } 7→ φn (k) = (xk,1 , ..., xk,n ) ∈ X n . 5 A channel is said to be memoryless if there is no correlation in the noise acting on successive inputs to the channel. 33 Then each letter x ∈ X is mapped to a state W(x). Then n successive uses of the channel W map the sequence (xk,1 , ..., xk,n ) to W ⊗n (xk,1 , ..., xk,n ) ≡ W(xk,1 ) ⊗ ... ⊗ W(xk,n ). A natural extension of this framework is obtained by dropping the assumption of independence of successive uses of a single channel W, thus allowing the channel to have memory. In this section we consider a particular class of channels with memory defined as follows: let Wn : X n → D(H⊗n ) be a c-q channel where, for each (x1 , ..., xn ) ∈ X n , Wn (x1 , ..., xn ) satisfies the non-homogeneous upper-factorization property Wn (x1 , ..., xn ) ≤ R Wn−1 (x1 , ..., xn−1 ) ⊗ W1 (xn ). (7.2) for some positive number R. We call this property of the maps Wn channel upper factorization property. Similarly, the assumption of independence of uses of a channel can be relaxed to incorporate another class of c-q channels with memory, whose outputs satisfy the nonhomogeneous lower-factorization property: R−1 Wn−1 (x1 , ..., xn−1 ) ⊗ W1 (xn ) ≤ Wn (x1 , ..., xn ), (7.3) and we call this property of the maps Wn channel lower factorization property. We obtain bounds on the capacity of the above mentioned channels (i) for the case of finite blocklength (i.e. finite n), as well as (ii) in the moderate deviation regime. Our result (ii) extends the analysis of [11], where asymptotic rates were found in the case of memoryless c-q channels, to these new classes of channels with memory. As in [11], the proofs of our results rely on bounds on the one-shot capacity of c-q channels obtained by Wang and Renner [49] (stated as Theorem 10 below) as well as the ones derived in Proposition 5 of [48]. Here we make use of the notations of [32]: For every c-q channel W : X → D(H), the following map W : X → D(HX ⊗ H), W(x) := |xihx| ⊗ W(x) is called the lifted channel of W, where HX is an auxiliary Hilbert space, and {|xi : x ∈ X } is an orthonormal basis in it. The map W admits a natural linear extension to the set of probability mass functions pX on X given by: X W(pX ) := pX (x)W(x). x∈X This extension can also be used at the level of the lifted channels as follows: X W(pX ) := pX (x)|xihx| ⊗ W(x). x∈X Theorem 10 ([49] Theorem 1). The ε-error one-shot capacity of a c-q channel W : X → D(H) satisfies: 0 ε C(W, ε) ≥ sup DH (ρX kσX ) − log pX 34 4ε , (ε − ε0 ) for every ε0 ∈ (0, ε), where for any finitely supported probability mass function pX on X , X ρX := W(pX ), σX := pX (x)|xihx| ⊗ W(pX ). x∈X In our proofs, we also use the following results that one can for example find in [48]. Given a c-q channel W, the Holevo capacity of W is given by χ∗ (W) := min sup D(W(x)kσ). σ∈D(H) x∈X The minimization over σ ∈ D(H) is achieved for a unique state called the divergence centre and denoted by σ ∗ (W). The Holevo capacity has the following alternative representation X χ∗ (W) ≡ sup pX (x)D (W(x)kW(pX )) , pX x∈X and we denote the set of probability mass functions for which the above supremum is achieved by Π(W). Now there exists a probability mass function pX ∈ Π(W) such that [48] D(ρpX kσpX ) = χ∗ (W), V (ρpX kσpX ) = Vmin (W), (7.4) for states ρpX = W(pX ), X σpX = pX (x)|xihx| ⊗ W(pX ), (7.5) x∈X where Vmin (W) := inf qX ∈Π(W) X qX (x)V (W(x)kσ ∗ (W)), x∈X where V (·k·) is defined in Equation (2.8). We are interested in the finite blocklength behavior of the one-shot ε-error capacity of the sequence of channels Wn that is the dependence of C(Wn , ε) on n. More precisely, we obtain lower bounds on C(Wn , ε) in the following cases: (i) Wn := W ⊗n (memoryless case), and (ii) Wn satisfies the channel upper factorization property (7.2). The following result is a consequence of Theorem 5, Corollary 1 and Theorem 10 (for (i) one could alternatively use Theorem 6 to get stronger bounds, but we omit this analysis for simplicity): Proposition 5. (i) Let W : X → D(H) be a memoryless c-q channel. Then, for any ε ∈ (0, 1), any pX ∈ Π(W), and any ε0 ∈ (0, ε): C(W ⊗n , ε) ≥ nχ∗ (W) − p 2n log ε0−1 cpX − log 4ε , ε − ε0 where cpX := k log ∆σpX |ρpX + D(ρpX kσpX )idk∞ , and ρpX and σpX are defined as in Equation (7.5). 35 (ii) Let {Wn }n∈N be a family of c-q channels Wn : X ⊗n → D(H⊗n ) satisfying the channel upper factorization property (7.2) with parameter R ≥ 1. Then for any ε ∈ (0, 1), any pX ∈ Π(W1 ) and any ε0 ∈ (0, ε):  p 2 4ε   nχ∗ (W1 ) − cpX 2n log(Rn ε0−1 ) − log for Rn e−ncpX /2 ≤ ε0 < ε,  0 ε−ε C(Wn , ε) ≥ 2 nc  4ε   nχ∗ (W1 ) − pX − log Rn ε0−1 − log else. 2 ε − ε0 Proof. We first prove (i): by a direct application of Theorem 10, for any ε0 ∈ (0, ε), 4ε ε − ε0 pX n 4ε ε0 ≥ sup DH (ρq⊗n kσq⊗n ) − log X X ε − ε0 qX 4ε ε0 , ≥ DH (ρp⊗n kσp⊗n ) − log X X ε − ε0 0 ε C(W ⊗n , ε) ≥ sup DH (ρpX n kσpX n ) − log (7.6) ε was defined in Equation (6.1). for any probability mass function pX ∈ Π(W), where DH Therefore, the problem reduces to the one of finding an upper bound to the optimal error of . From (3.14), we ≡ σp⊗n type II for the two i.i.d. sequences of states ρp⊗n ≡ ρ⊗n pX and σp⊗n X X X directly get p ε0 DH (ρp⊗n kσp⊗n ) ≥ nD(ρpX kσpX ) − 2n log ε0−1 cpX , X X and (i) follows from the fact that pX ∈ Π(W), so that D(ρpX kσpX ) ≡ χ∗ (W). Case (ii) can be proved in a very similar way by noticing that in the case when Wn satisfies the channel upper factorization property (7.2), the following states satisfy the upper factorization property: X pX (x1 ) ... pX (xn )|x1 ... xn ihx1 ... xn | Wn (x1 , ..., xn ) ρp⊗n := Wn (p⊗n X )= X (x1 ,...,xn )∈X n ≤ R ρp⊗n−1 ⊗ ρpX , X and σp⊗n := X X pX (x1 ) ... pX (xn )|x1 ... xn ihx1 ... xn | ⊗ Wn (p⊗n X ) ≤ R σp⊗n−1 ⊗ σpX , X (x1 ,...,xn )∈X n where we took pX to be the distribution such that ρpX and σpX satisfy Equation (7.4) for W ≡ W1 . We then obtain the statement of the theorem using (7.6), Theorem 7, and (7.4). The moderate deviation analysis of the sequences of channels with memory defined above is given by the following proposition. Proposition 6. (i) Let {Wn }n∈N be a family of c-q channels Wn : X ⊗n → D(H⊗n ) satisfying the channel upper factorization property (7.2) with parameter R such that 1 ≤ R < exp[(4 − ecpX )(1 − ecpX )2 Vmin (W1 )/(6c2pX )], 36 where cpX := k log ∆σpX |ρpX + D(ρpX kσpX )idk∞ < log 4, for some probability mass function pX satisfying Equation (7.4), and ρpX and σpX are defined as in Equation (7.5). Moreover, 2 let {an }n∈N be a moderate sequence and εn = e−nan . Then, ∗ p C(Wn , εn ) ≥ nχ (W1 ) − n 2Vmin (W1 )  1/2 3 2 (log R + an ) + ◦(nan ). 4 − ecpX (7.7) (ii) Let {Wn }n∈N be a family of c-q channels Wn : X ⊗n → D(H⊗n ) satisfying the channel lower factorization property (7.3) with parameter R > 1. Then: p (7.8) C(Wn , εn ) ≤ nχ∗ (W1 ) − 2Vmin (W1 )nan + ◦(nan ) The proof of Proposition 6 closely follows that of Propositions 12 and 18 of [11]. The extra ingredient here is the fact that, if Wn satisfies a channel factorization property, the states in Im(Wn ) satisfy a non-homogeneous factorization property, so that one can use Corollary 2, together with the one-shot bounds on the classical-quantum capacity to get the result. We included a proof in Appendix C for sake of completeness. 8 Summary and discussion In this paper we proved upper bounds on type II Stein- and Hoeffding errors, in the context of finite blocklength binary quantum hypothesis testing, using the framework of martingale concentration inequalities. These inequalities constitute a powerful mathematical tool which has found important applications in various branches of mathematics. We prove that our bounds are tighter than those obtained by Audenaert, Mosonyi and Verstraete in [5], for a wide range of threshold values of the type I error, which is of practical relevance. We then derived finite blocklength bounds, as well as moderate deviation results, for pairs of sequences of correlated states satisfying a certain factorization property. We applied our results to find bounds on the capacity of an associated class of classical-quantum channels with memory, in the finite blocklength, and moderate deviation regimes, This extends the recent results of Chubb, Tan and Tomamichel [11], and Cheng and Hsieh [10] to the non-i.i.d. setting. We believe that such extensions can be of practical relevance, for the following reasons: In the usual framework of quantum hypothesis testing, the systems that are being tested are demolished by the measurement process. However, in a practical experiment, the experimentalist might want to get some information about the physical system being analyzed without disturbing its state so that it can be used for some other information theoretic task. Although finitely correlated states were originally introduced in [16] in the context of quantum states on spin chains, they also seem to provide the right setup for what we call quantum non-demolition hypothesis testing (QNDHT): In this framework, the goal is to determine the state of a quantum system, given the knowledge that it is one of two specific states ρ, σ ∈ B(K), for a given finite-dimensional Hilbert space K, without demolishing the system. A seemingly natural way to proceed is to prepare two sequences of finitely correlated states ρ̄n , σ̄n ∈ D(H⊗n ), where H is the Hilbert space of another system that can be interpreted as 37 a probe, as follows: ρ̄n := TrK (idn−1 A ⊗ E∗ ) ◦ · · · ◦ (idA ⊗ E∗ ) ◦ E∗ (ρ), (8.1) σ̄n := TrK (idn−1 A ⊗ E∗ ) ◦ · · · ◦ (idA ⊗ E∗ ) ◦ E∗ (σ), (8.2) where E∗ is the adjoint of a CPU map E : B(H)⊗B(K) → B(K), to be specified later, encoding the interaction of the original system with the probes, such that TrH (E∗ (ρ)) = ρ and TrH (E∗ (σ)) = σ. This last condition precisely means that the original system (with Hilbert space K) should remain intact no matter what local operation (measurement) is done on the probes (whose Hilbert space is H⊗n ). Note, however, that from Theorem 9, we infer that the optimal Stein exponent in the quantum hypothesis problem with null hypotheses {ρ̄n }n∈N and alternative hypotheses {σ̄n }n∈N is given by D(ρ̄1 kσ̄1 ) ≤ D(ρkσ), where the last inequality follows from the data processing inequality. Intuitively, this means that the optimal error of type II made by measuring the probes is asymptotically larger than the error that one would make by performing a direct measurement on n copies of the original system. A similar explanation holds for any fixed n, as the ε-hypothesis testing ε also satisfies a data processing inequality. An example of a map E relative entropy DH ∗ implementing the conditions described above can be described as follows: suppose without loss of generality that the system with Hilbert space K is in the state ρ. Then, at each step, make it interact with a probe H, which is initially in the state ω ∈ D(H): ρ 7→ U (ρ ⊗ ω)U ∗ , where U is a unitary operator on K ⊗ H. In order to optimize the Stein exponent, we then consider the following optimization problem: maximize D(ρ̄1 kσ̄1 ), subject to ρ̄1 = TrK (U (ρ ⊗ ω)U ∗ ), σ̄1 = TrK (U (σ ⊗ ω)U ∗ ), the optimization being carried over all states ω on H and unitaries U over H ⊗ K satisfying ρ = TrH (U (ρ ⊗ ω)U ∗ ), σ = TrH (U (σ ⊗ ω)U ∗ ). Secondly, c-q channels satisfying the channel factorization properties could potentially lead to new ways of efficiently implementing quantum communication channels. Indeed, Kastoryano and Brandao [27] recently showed that, under some technical assumptions, Gibbs states of spin systems can be efficiently prepared by means of a dissipative process. Moreover, as discussed in Section 4, Gibbs states of translation-invariant finite-range interactions on quantum spin chains were shown to satisfy both lower and upper homogeneous factorization properties 38 for R > 1 [19]. We conjecture that by lifting the assumption of translation-invariance, one should obtain Gibbs states which satisfy both upper and lower non-homogeneous factorization properties. If this is indeed the case, the result of [27] would provide an efficient way of implementing a c-q channel satisfying both lower and upper channel factorization properties whose capacity would be comparable (at least to leading order) to the one of memoryless c-q- channels (cf. Section 7). The advantage of such a physical implementation comes from the robustness of such a dissipative preparation, in comparison with the difficulty of ensuring states to remain uncorrelated over a long period of time. Acknowledgements The authors would like to thank Eric Hanson, Milan Mosonyi and Yan Pautrat for useful discussions. C.R. is also grateful to Federico Pasqualotto for helpful exchanges. References [1] Y. Altug and A. B. Wagner. Moderate deviations in channel coding. IEEE Transactions on Information Theory, 60(8):4417–4426, 2014. [2] H. Araki. Relative entropy of states of von Neumann algebras. Publ. Res. Inst. Math. Sci., 11(3):809–833, 1975/76. [3] H. Araki. Relative entropy for states of von Neumann algebras. II. Publ. Res. Inst. Math. Sci., 13(1):173–192, 1977/78. [4] K. M. R. Audenaert, J. Calsamiglia, R. Muñoz Tapia, E. Bagan, L. Masanes, A. Acin, and F. Verstraete. Discriminating states: The quantum Chernoff bound. Phys. Rev. Lett., 98:160501, 2007. [5] K. M. R. Audenaert, M. Mosonyi, and F. Verstraete. Quantum state discrimination bounds for finite sample size. Journal of Mathematical Physics, 53(12), 2012. [6] K. Azuma. Weighted sums of certain dependent random variables. Tohoku Math. J. (2), 19(3):357–367, 1967. [7] R. Bhatia. Matrix analysis, volume 169 of Graduate Texts in Mathematics. SpringerVerlag, New York, 1997. [8] S. Boucheron, G. Lugosi, and P. Massart. Concentration inequalities: A nonasymptotic theory of independence. Oxford university press, 2013. [9] O. Bratteli and D. W. Robinson. Operator algebras and quantum statistical mechanics. 1. Texts and Monographs in Physics. Springer-Verlag, New York, second edition, 1987. [10] H.-C. Cheng and M.-H. Hsieh. Moderate deviation analysis for classical-quantum channels and quantum hypothesis testing. arXiv preprint arXiv:1701.03195, 2017. [11] C. T. Chubb, V. Y. Tan, and M. Tomamichel. Moderate deviation analysis for classical communication over quantum channels. arXiv preprint arXiv:1701.03114, 2017. 39 [12] N. Datta, Y. Pautrat, and C. Rouzé. Second-order asymptotics for quantum hypothesis testing in settings beyond i.i.d. - quantum lattice systems and more. Journal of Mathematical Physics, 57(6), 2016. [13] C. Davis. A schwarz inequality for convex operator functions. Proceedings of the American Mathematical Society, 8(1):42–44, 1957. [14] R. Durrett. Probability: theory and examples. Cambridge university press, 2010. [15] D. Elkouss and S. Wehner. (Nearly) optimal P values for all Bell inequalities. Npj Quantum Information, 2:16026, 2016. [16] M. Fannes, B. Nachtergaele, and R. F. Werner. Finitely correlated states on quantum spin chains. Comm. Math. Phys., 144(3):443–490, 1992. [17] F. Hansen and G. K. Pedersen. Jensen’s inequality for operators and Löwner ’s theorem. Mathematische Annalen, 258:229–242, 1981. [18] M. Hayashi. Error exponent in asymmetric quantum hypothesis testing and its application to classical-quantum channel coding. Phys. Rev. A, 76:062301, 2007. [19] F. Hiai, M. Mosonyi, and T. Ogawa. Large deviations and Chernoff bound for certain correlated states on a spin chain. Journal of Mathematical Physics, 48(12):123301, 2007. [20] F. Hiai, M. Mosonyi, and T. Ogawa. Error exponents in hypothesis testing for correlated states on a spin chain. Journal of Mathematical Physics, 49(3):032112, 2008. [21] F. Hiai and D. Petz. The proper formula for relative entropy and its asymptotics in quantum probability. Comm. Math. Phys., 143(1):99–114, 1991. [22] W. Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association, 58(301):13–30, 1963. [23] R. Impagliazzo and V. Kabanets. Constructive proofs of concentration bounds. In Approximation, randomization, and combinatorial optimization, volume 6302 of Lecture Notes in Comput. Sci., pages 617–631. Springer, Berlin, 2010. [24] V. Jakšić, Y. Ogata, C.-A. Pillet, and R. Seiringer. Quantum hypothesis testing and non-equilibrium statistical mechanics. Rev. Math. Phys., 24(6):1230002, 67, 2012. [25] M. Junge and Q. Zeng. Noncommutative Bennett and Rosenthal inequalities. Ann. Probab., 41(6):4287–4316, 11 2013. [26] M. Junge and Q. Zeng. Noncommutative martingale deviation and Poincaré type inequalities with applications. Probability Theory and Related Fields, pages 1–59, 2014. [27] M. J. Kastoryano and F. G. S. L. Brandão. Quantum gibbs samplers: The commuting case. Communications in Mathematical Physics, 344(3):915–957, 2016. [28] M. Kearns and L. Saul. Large deviation methods for approximate probabilistic inference. In Proceedings of the Fourteenth conference on Uncertainty in artificial intelligence, pages 311–319. Morgan Kaufmann Publishers Inc., 1998. 40 [29] M. Ledoux. The concentration of measure phenomenon. Number 89. American Mathematical Soc., 2005. [30] K. Li. Second-order asymptotics for quantum hypothesis testing. 42(1):171–189, 2014. Ann. Statist., [31] C. McDiarmid. On the method of bounded differences. Surveys in combinatorics, 141(1):148–188, 1989. [32] M. Mosonyi and T. Ogawa. Strong converse exponent for classical-quantum channel coding. arXiv preprint arXiv:1409.3562, 2014. [33] M. Mosonyi and T. Ogawa. Two approaches to obtain the strong converse exponent of quantum hypothesis testing for general sequences of quantum states. IEEE Transactions on Information Theory, 61(12):6975–6994, 2015. [34] H. Nagaoka. The converse part of the theorem for quantum Hoeffding bound. arXiv preprint arXiv:0611289, 2006. [35] M. Nussbaum and A. Szkola. The Chernoff lower bound for symmetric quantum hypothesis testing. Ann. Statist., 37(2):1040–1057, 2009. [36] T. Ogawa and M. Hayashi. On error exponents in quantum hypothesis testing. IEEE Trans. Inform. Theory, 50(6):1368–1372, 2004. [37] T. Ogawa and H. Nagaoka. Strong converse and Stein’s lemma in quantum hypothesis testing. IEEE Trans. Inform. Theory, 46(7):2428–2433, 2000. [38] M. Ohya and D. Petz. Quantum entropy and its use. Texts and Monographs in Physics. Springer-Verlag, Berlin, 1993. [39] D. Petz. Quasientropies for states of a von Neumann algebra. Publications of the Research Institute for Mathematical Sciences, 21(4):787–800, 1985. [40] D. Petz. Quasi-entropies for finite quantum systems. Reports on Mathematical Physics, 23(1):57–65, 1986. [41] Y. Polyanskiy and S. Verdú. Channel dispersion and moderate deviations limits for memoryless channels. In Communication, Control, and Computing (Allerton), 2010 48th Annual Allerton Conference on, pages 1334–1339. IEEE, 2010. [42] M. Raginsky and I. Sason. Concentration of measure inequalities in information theory, communications, and coding. Foundations and Trends in Communications and Information Theory, 10(1-2):1–246, 2013. [43] M. Reed and B. Simon. Methods of Modern Mathematical Physics. I. Academic Press, Inc. [Harcourt Brace Jovanovich, Publishers], New York, second edition, 1980. [44] G. Sadeghi and M. S. Moslehian. Noncommutative martingale concentration inequalities. Illinois J. Math., 58(2):561–575, 2014. 41 [45] I. Sason. Moderate deviations analysis of binary hypothesis testing. In 2012 IEEE International Symposium on Information Theory Proceedings, pages 821–825, 2012. [46] M. Talagrand. A new look at independence. Ann. Probab., 24(1):1–34, 01 1996. [47] M. Tomamichel and M. Hayashi. A hierarchy of information quantities for finite block length analysis of quantum tasks. IEEE Trans. Inform. Theory, 59(11):7693–7710, 2013. [48] M. Tomamichel and V. Y. F. Tan. Second-order asymptotics for the classical capacity of image-additive quantum channels. Communications in Mathematical Physics, 338(1):103–137, 2015. [49] L. Wang and R. Renner. One-shot classical-quantum capacity and hypothesis testing. Phys. Rev. Lett., 108:200501, 2012. A A reverse Markov inequality Lemma 4 (Reverse Markov inequality). Let X be a strictly positive random variable, such that 1/X is integrable. Then, for any x > 0,   X −x P(X > x) ≥ E . X Proof. For any decreasing bounded positive function u such that u−1 is also bounded, P(X > x) = 1 − P(X ≤ x) = 1 − P(u(X) ≥ u(x)) E[u(X)] , ≥1− u(x) where we used Markov’s inequality in the last line. Taking u(x) = (1 + tx)−1 for any given t > 0,       t(X − x) X −x X −x −1 P(X > x) ≥ 1 − E[(1 + tX) ](1 + tx) = E = tE =E . 1 + tX 1 + tX 1/t + X The result follows by monotone convergence theorem, taking the limit t → ∞. B Proof of Proposition 3 The following lemma, originally proved in [19], plays the key role in the proof of the factorization property of non-homogeneous finitely correlated states. Lemma 5 (see Lemma 4.3 of [19]). Let B ⊂ B(K) be a finite-dimensional C ∗ -subalgebra of B(K) for some finite-dimensional Hilbert space K. Let ρ be a faithful state on B and Φ : B → B be the completely positive unital map b 7→ Tr(ρb)IB . Then there exists a constant R > 1 such that RΦ − idB is completely positive. 42 Proof.[Proposition 3] Using the notations of Section 4, let {ρn }n∈N be a family of nonhomogeneous finitely correlated states with generating triple (B, {En }n∈N , ρ). By Lemma 5, ⊗n there exists R > 1 such that R id⊗n A ⊗ (En∗ ◦ Φ∗ ) − idA ⊗ En∗ is positive for any n ∈ N, where Φ∗ : a 7→ ρ Tr(a). Hence ρn := TrB τn ≤ R TrB [id⊗n−1 ⊗ (En∗ ◦ Φ∗ )(τn−1 )] A = R TrB [(id⊗n−1 ⊗ En∗ )(TrB (τn−1 ) ⊗ ρ)] A = R ρn−1 ⊗ TrB (En∗ (ρ)) = R ρn−1 ⊗ ρ̃n , where ρ̃n is defined as TrB En∗ (ρ). C Proof of Proposition 6 For classical-quantum channels satisfying a channel factorization property, the expressions found in Corollary 2 can be used to get asymptotic behaviors for the capacity in the moderate deviation regime. The proof of (7.8) is more technical and follows the idea of [11] (see also [48]). In order to prove it, we introduce the following geometric quantities: following [48], for some subset of states S ⊆ D(H), the divergence radius χ(S) and divergence centre σ ∗ (S) are defined as χ(S) := inf σ ∗ (S) := arg min sup D(ρkσ). sup D(ρkσ), σ∈D(H) ρ∈S σ∈D(H) ρ∈S Similarly, the ε-hypothesis testing divergence radius χεH (S) is defined as χεH (S) := inf ε sup DH (ρkσ), σ∈D(H) ρ∈S The ε-hypothesis testing divergence radius provides an upper bound to the one-shot capacity: Theorem 11 (see Proposition 5 of [48]). The ε-error one shot capacity, for 0 < ε < 1/2, is upper bounded as follows: C(W, ε) ≤ χ2ε H (Im(W)) + log 2 . (1 − 2ε)(1 − ε) (C.1) We will also need the following lemma from [48]: Lemma 6 (Lemma 18 of [48]). For every δ ∈ (0, 1), there exists a finite set S δ ⊂ D(H) of cardinality   2 90d 2d δ , |S | ≤ δ2 where d ≡ dim(H), such that for every ρ ∈ D(H), there exists a state τ ∈ S δ such that D(ρkτ ) ≤ δ, λmin (τ ) ≥ δ , 25d2 where λmin (τ ) stands for the minimum eigenvalue of the state τ . 43 Proof.[Proposition 6] The proof of (i) follows very closely the one of Proposition 5 (ii), the only difference being the application of (6.4) instead of (5.12) to bound the optimal error of type II. We now prove (ii): by (C.1), n C(Wn , εn ) ≤ χ2ε H (Im(Wn )) + log 2 (1 − 2εn )(1 − εn ) (C.2) Im(Wn ) consists of states satisfying a non-homogeneous lower factorization property with parameter R > 1. Let ρn ∈ Im(Wn ), with associated auxiliary sequence {ρ̃k }nk=1 . Define n 1X ρ̃k . ρ̄n := n k=1 For γ a constant to be chosen later, define ( ) n 1X H(γ) := n : D(ρ̃i kρ̄n ) ≥ χ∗ (W1 ) − γ , n i=1 ( ) n 1X ∗ L(γ) := n : D(ρ̃i kρ̄n ) < χ (W1 ) − γ , n i=1 such that H(γ) and L(γ) bipartition N for all γ. Let us define X 1 1 σn (γ) := [σ ∗ (Im(W1 ))]⊗n + τ ⊗n , 2 2|S γ/4 | γ/4 (C.3) τ ∈S where S γ/4 is defined through Lemma 6, with δ ≡ γ/4. The idea of the proof is then to bound the divergences with respect to σn (γ) by those with respect to either σ ∗ (Im(W1 )) or any element of S γ/4 , using the following inequality: ε ε DH (ρkµσ + (1 − µ)σ 0 ) ≤ DH (ρkσ) − log µ. (C.4) Let us first assume that n ∈ L(γ), and define τn to be the closest element in S γ/4 to ρn , so that D(ρ̄n kτn ) ≤ γ/4. Using Equation (C.3) we extract the term involving τn⊗n to obtain εn εn DH (ρn kσn (γ)) ≤ DH (ρn kτn⊗n ) − log 1 . 2|S γ/4 | Hence, for n large enough, 1 εn 1 εn DH (ρn kσn (γ)) ≤ DH (ρn kτn⊗n ) + γ/4. n n Now applying (6.17) we get that, for n large enough, r Pn n X 2 i=1 V (ρ̃i kτn ) 1 εn 1 DH (ρn kτn⊗n ) ≤ D(ρ̃i kτn ) − an + γ/4. n n n i=1 44 (C.5) (C.6) Now the following holds: n X D(ρ̃i kτn ) = i=1 = n X i=1 n X Tr ρ̃i (log ρ̃i − log ρ̄n ) + n X Tr ρ˜i (log ρ̄n − log τn ) i=1 D(ρ̃i kρ̄n ) + nD(ρ̄n kτn ) i=1 ≤ n X D(ρ̃i kρ̄n ) + nγ/4, (C.7) i=1 where the last inequality above comes from the fact that we picked τn specifically so that D(ρ̄n kτn ) ≤ γ/4. Hence, combining (C.5), (C.6) and (C.7), we have shown that for n large enough: r Pn n 2 i=1 V (ρ̃i kτn ) 1X 1 εn DH (ρn kσn (γ)) ≤ an + 3γ/4. D(ρ̃i kρ̄n ) − n n n i=1 Finally, since n ∈ L(γ), r Pn 2 i=1 V (ρ̃i kτn ) 1 εn DH (ρn kσn (γ)) ≤ χ∗ (W1 ) − an − γ/4. (C.8) n n We now take care of the case when n ∈ H(γ). Let η > 0. We use Equation (C.3) to extract the term involving σ ∗ (Im(W1 )): εn εn (ρn k[σ ∗ (Im(W1 ))]⊗n ) + log 2. (ρn kσn (γ)) ≤ DH DH This implies that for any η > 0 there exists N > 0 such that for any n > N , 1 εn 1 εn (ρn k[σ ∗ (Im(W1 ))]⊗n ) + ηan /3. DH (ρn kσn (γ)) ≤ DH n n Assume first that Vmin (W1 ) ≤ η 2 /18. Applying (6.17) for large enough n, (C.9) 1 εn 1 εn (ρn k[σ ∗ (Im(W1 ))]⊗n ) + ηan /3 DH (ρn kσn (γ)) ≤ DH n n n 1X D(ρ̃i kσ ∗ (Im(W1 ))) + 2ηan /3 ≤ n ≤ 1 n i=1 n X D(ρ̃i kσ ∗ (Im(W1 ))) − p 2Vmin (W1 )an + ηan i=1 ≤ χ∗ (W1 ) − p 2Vmin (W1 )an + ηan , where the last inequality follows from the definition of σ ∗ (Im(W1 )), and the fact that ρ̃i ∈ Im(W1 ). For Vmin (W1 ) > η 2 /18, consider the following quantity: Ṽmin (γ) ( := inf pX X x∈X   pX (x)V W1 (x)kσ ∗ (Im(W1 )) ) X x∈X 45 pX (x)D (W1 (x)kW1 (pX )) ≥ χ∗ (W1 ) − γ , where the infimum is taken over any probability mass function pX on X . By definition Ṽmin (0) = Vmin (W1 ), and using Lemma 22 of [48], we know that limγ→0+ Ṽmin (γ) = Vmin (W1 ). Hence, for any η > 0 there exists a positive constant γ0 such that q p 2Ṽmin (γ0 ) ≥ 2Vmin (W1 ) − η/3. (C.10) As Vmin (W1 ) > η 2 /18, this implies that Ṽmin (γ0 ) > 0. P Next, define the empirical probability mass function pn (x) := n1 ni=1 δ(W1 (x) − ρ̃i ). For all n ∈ H(γ0 ),   n X X 1X pn (x)D W1 (x) pn (y)W1 (y) = D(ρ̃i kρ̄n ) ≥ χ∗ (W1 ) − γ0 , n x∈X i=1 y∈X and so we can lower bound the average quantum information variance with respect to the divergence centre n X 1X V (ρ̃i kσ ∗ (Im(W1 ))) = pn (x)V (W1 (x)kσ ∗ (Im(W1 ))) ≥ Ṽmin (γ0 ) > 0. n i=1 x∈X Using this lower bound, we can once again apply (6.17) to (C.9) so that for n ∈ H(γ0 ) large enough, 1 εn 1 εn (ρn k[σ ∗ (Im(W1 ))]⊗n ) + ηan /3 DH (ρn kσn (γ0 )) ≤ DH n n s P n 2 ni=1 V (ρ̃i kσ ∗ (Im(W1 ))) 1X ∗ ≤ D(ρ̃i kσ (Im(W1 ))) − an + 2ηan /3 n n i=1 q n X 1 ≤ D(ρ̃i kσ ∗ (Im(W1 ))) − 2Ṽmin (γ0 )an + 2ηan /3 n i=1 p ∗ ≤ χ (W1 ) − 2Vmin (W1 )an + ηan , where we used (C.10) in the last line. We showed that for any η > 0 there exists γ0 such that for n large enough ( ∗ χ (W1 ) − γ0 /4 n ∈ L(γ0 ), 1 εn p DH (ρn kσn (γ0 )) ≤ ∗ n χ (W1 ) − 2Vmin (W1 )an + ηan n ∈ H(Γ). This implies that for any n large enough: p 1 εn DH (ρn kσn (γ0 )) ≤ χ∗ (W1 ) − 2Vmin (W1 )an + ηan n Using the definition of χH and substituting the above inequality on the right hand side of (C.2), for n large enough, we get C(Wn , εn ) ≤ inf σn ∈D(H⊗n ) sup 2εn DH (ρn kσn ) + log ρn ∈Im(Wn ) ≤ nχ∗ (W1 ) − 2 (1 − εn )(1 − 2εn ) p 2Vmin (W1 )nan + ηnan + log 46 2 (1 − εn )(1 − 2εn ) Taking the limit η → 0, we end up with, C(Wn , εn ) ≤ nχ∗ (W1 ) − p 2Vmin (W1 )nan + ◦(nan ) 47
10math.ST
LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS arXiv:1604.00424v4 [cs.IT] 21 Feb 2018 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI Abstract. The problem of recovering signals of high complexity from low quality sensing devices is analyzed via a combination of tools from signal processing and harmonic analysis. By using the rich structure offered by the recent development in fusion frames, we introduce a compressed sensing framework in which we split the dense information into sub-channel or local pieces and then fuse the local estimations. Each piece of information is measured by potentially low quality sensors, modeled by linear matrices and recovered via compressed sensing – when necessary. Finally, by a fusion process within the fusion frames, we are able to recover accurately the original signal. Using our new method, we show, and illustrate on simple numerical examples, that it is possible, and sometimes necessary, to split a signal via local projections and / or filtering for accurate, stable, and robust estimation. In particular, we show that by increasing the size of the fusion frame, a certain robustness to noise can also be achieved. While the computational complexity remains relatively low, we achieve stronger recovery performance compared to usual single-device compressed sensing systems. 1. Problem statement In a traditional sampling and reconstruction system, the sensors are designed so that the recovery of the signal(s) of interest is possible. For instance, when considering the sparse recovery problem, one tries to find the sparsest solution x̂ ∈ KN from the noisy measurements y = Ax + e ∈ Km and m  N . Here K denotes the field R or C. This is done by solving the mathematical program x̂ := argmin kzk0 , subject to kAz − yk2 ≤ η. (`0 -min) This problem is NP-Hard and usually only approximately solved, for instance by solving its convex relaxation, known as the Basis Pursuit denoising x̂ := argmin kzk1 , subject to kAz − yk2 ≤ η. (BPDN) It is known that for a given complexity (usually measured as the sparsity) s of the signal x, the number b to be a good enough of random subgaussian linear measurements needs to grow as m & s log(N/s) for x approximation to x. Said differently, if the design of a sensor can be made at will, then knowing the complexity of the signal, here characterized by the sparsity, is sufficient for a stable and robust recovery. This paper looks at the problem of sampling potentially highly non-sparse signals when the quality of the sensors is constrained. We emphasize in passing that throughout this paper, the sought after signal will always be considered of high-complexity. We use the sparsity or density as a measure of complexity, but one could consider other models. We investigate problems where the number of measurements m cannot be chosen based on the complexity of the signals to recover. In the context described above, one would have a limit on the sparsity of the vectors that can be recovered by s . m/ log(N/m). These constraints can be due to many reasons such as cost – e.g. using 10 sensors at a coarser resolution is cheaper than one at the finest –, frequency rate – sensors at 2000 THz might not exists for a while –, legal regulation – e.g. in nuclear medicine where one should not expose a patient to too high radiations at once. Problems arise when the signals being sampled are too dense for the usual mathematical theories. When one thinks about compressed sensing, the size of the sensor required is driven by a certain measure of complexity of the signals considered. Allowing for the recovery of signals with higher level of complexity entails the use of better sensors. Here we look at the problem differently: first, we assume constraints on the sensor design which are fixed due to some outside reasons. Under these assumptions, we take on the following challenge: split the information carried by the signal in a clever way so that a mathematical recovery is possible. This paper revisits the theory of fusion frames and applies it to the dense signal recovery problem. We show that by using advanced mathematical techniques stemming from applied harmonic analysis, it is possible to handle very high complexity signals in an efficient and stable manner. Before we dig into Date: February 23, 2018. 1 2 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI the more technical details, we present some real-world scenarios where our framework appears useful, if not essential. 1.1. Examples. 1.1.1. Unavailability of high quality observation devices. A typical time-invariant bounded linear operator is always represented by a circulant matrix A. So suppose A represents a sensing device whose number of rows m is physically limited by the sampling rate (or resolution) of the device. Suppose also that the sparsity of the sampled signal x is substantially larger than what a single observation by A could handle/recover by various compressed sensing techniques. In this context, the limitations on the sensing devices combined with the (potentially) high number of non-zeros in the signals makes it impossible for a state-of-the-art algorithm to recover the unknown signal x. As illustrated in Figure 1, we suggest to apply n such devices in parallel after prefiltering. The fused compressed sensing technique introduced later allows to resolve the problem that otherwise a single device can not! Such scenarios actually exist and show the necessity of the fused compressed sensing technique presented below. For example, suppose an application requires a sensing device of capacity X, described by a sensing matrix Ã. In case such a device is either very expensive, or not available, we may choose to combine n parallel projections {Pj }nj=1 prior to measuring, and use n low-quality sensing devices of capacity 1 n X, each described by the sensing matrix A. The (sparse) signal x is then subsequently recovered by various techniques via each channel and, through the theory of fusion frames [13, 14, 11], merged into a single P vector. As long as {Pj }nj=1 are projections - or any filtering operations - with the property that CI ≤ i Pj∗ Pj ≤ DI for some 0 < C ≤ D < ∞, such a fusion operation is always possible. x P1 A y1 = AP1 x P2 A y2 = AP2 x Pn A yn = APn x Figure 1. Sparse linear array geometry In order for the fusion operator to be bounded away from 0, in our work we assume that the prefiltering/projections Pi are complete in the sense that there won’t be “holes” in the signal coverage for a whole class of signals; more precisely, we require that the collection of projections satisfy the fusion frame inequality (6). Evidently, if we design such a fused compressed sensing technique, by enabling the subdivision of sparsity of x into individual subspaces, the sparse recovery problem becomes a feasible one and can be resolved by multiple sensing devices with low quality or resolution, which are not only widely available but also economical. The value of fused compressed sensing techniques presented in this paper is clearly reflected in this situation where an otherwise too expensive or impossible problem can now be resolved by using a number of lower resolution/sampling rate devices and by making a reasonable number of observations, and processed by the fusion frame theory. 1.1.2. SAR imaging and spatial filtering. In the Synthetic Aperture Radar (SAR) imaging process, a flying carrier (an airplane or a satellite) emits a sequence of radio waves to the field of observation (and then detects the reflections by the objects in the field). Each radio wave is sent through an antenna with a fixed aperture/size which physically presents an antenna beam (magnetic field) pattern, say {Fi }. Consequently, as seen in Figure 2, during the ith data collection, the antenna beam pattern Fi physically implements a spatial filtering operator. And, naturally, between adjacent i’s (even among several adjacent i’s), the spatial antenna beams Fi ’s have intentional overlaps. The actual data observation, for each i, is modeled by y(i) = AFi x, where x is the field image refection coefficients that eventually form the SAR image of the field, and A is a fixed observation matrix determined by the SAR imaging mechanism, which is typically chirping (linearly changing frequencies in time) functions in two different LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 3 Flight path/direction Synthetic Aperture Fi+4 Fi+3 Fi+2 Fi+1 Fi Ground Range Figure 2. Synthetic Aperture Imaging beam and data collection mechanism dimensions [19, 25, 18]. This formulation has a natural “distributed sparsity” due to the spatial filtering operations inherent to the physical beams. Here, to consider the spatial filtering effect, and to avoid the conventional ad-hoc “alignment” in the flight direction, the fused SAR imaging process needs to be considered [35]. The new fused SAR imaging formulation is not only the should-be rigorous mathematical formulation of the SAR imaging process, but also potentially beneficial to image resolution and to the robustness of the (often) turbulent data collection process. 1.2. Contributions. In this paper we combine mathematical tools from compressed sensing and fusion frame theory to break the limitations on the signal complexity induced by traditional recovery methods. Our general approach can be described as the two following steps, or summarized in Algorithm 1. d (i) , for 1 ≤ i ≤ n by any sparse recovery method, and 1) Estimate the local information x P  n d (i) , either directly or by virtue of the frame b = S −1 2) Approximate the fused solution x x i=1 algorithm. P Data: (Pi )1≤i≤n , n such that CI ≤ |Pi k22→2 ≤ DI, an estimation of the measurement noise η Result: An estimation x̂ of the vector x k ← 1; b = 0; x while k ≤ n do Measure k th vector y ← APk x + e(k) ; b←x b + argmin kzk1 s.t. kAPk z − y(k) k2 ≤ η; Add local information x k ←k+1 end b ← S −1 x b Fusion: x Algorithm 1: Fused distributed sensing recovery framework Note that the fusion operation either requires the inverse frame operator S −1 or can be approximated using the (fusion-) frame algorithm, described at the end of Subsection 2.2. An important aspect of the framework is that it can either be used sequentially or in a parallel manner. In the sequential approach, we get the local pieces of information one after the other. In this case, as described in Algorithm 1, we have no need to save the local measurements and can update our guess in an online fashion. In the parallel approach, the local measurements are processed independently of each other, and the fusion is done by a central unit, once all the local information have been collected. In particular, Proposition 4 later in the manuscript shows that the robustness is preserved independently from the number of subspaces considered, which can be phrased in simple terms as: Proposition 1. Let A ∈ Km×N , and let W = (Wi , Pi )ni=1 , n ≥ 1 be a fusion frame. Assume the measurement vectors y(i) = APi x+e(i) are corrupted by some (adversarial) independent noise uniformly b satisfies bounded ke(i) k2 ≤ η. Then our solution x bk22 ≤ Kη 2 . kx − x (1) 4 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI In the more precise statement (Proposition 4), we specify precisely the value of the constant K = 1/C where C denotes the lower frame bound. As a special case of Theorem 9, we proved the following Theorem 1. Let W = (Wi , Pi )ni=1 be a fusion frame system for KN with frame operator S and frame bounds 0 < C ≤ D < ∞. Let A ∈ Km×N be a matrix satisfying some Partial RIP condition (see Definition 6) . Any s distributed-sparse vector x whose sparsity is uniformly distributed among the n subspaces (i.e. si = s/n is the sparsity of Pi x) can be recovered as ! n X −1 d (i) b=S x x , i=1 d (i) are obtained as solutions to the n local sparse recovery problems where the x d (i) := argmin kzk , x subject to kAPi z − y(i) k2 ≤ ηi . 0 Moreover, assuming the errors to be uniformly bounded by η, and that the RIP constants δ1 = δ2 = · · · = √ δn = δ < 4/ 41 are the same in all the subspaces, the solution approximate the true vector x in the following sense: n kb x − xk2 ≤ Cη C √ 960 2 where η := maxi ηi and C ≤ (16−41δ 2 )2 is a constant depending only on δ. Note that under the usual compressed sensing assumptions, this allows to have a number of measurements per sampled vector that decay linearly with the number of sensors. The paper is articulated as follows. We review basics from compressed sensing and fusion frames in Section 2. In Section 3 we explore several theoretical examples to motivate our research, and to emphasize the importance of our findings. Our claims are empirically verified by numerical results. In the flair of traditional compressed sensing, we extend the standard compressed sensing results to the case of recovery where we make explicit use of local redundancy in the fusion frame decomposition in Section 5. Finally, Section 4 derives a mathematical theory allowing to work with fusion frames where sparsity is exploited along a subspace decomposition. These findings extend the traditional compressed sensing problem [24] and show some similarities with recent developments in parallel acquisition [17] and structured sensing [10]. 2. General tools and models 2.1. (Traditional) Compressed sensing. Compressed sensing (CS) relies (see [24, 22] and references therein) on the inherent sparsity of natural signals x for their recovery from seemingly few measurements y = Ax + e for some linear measurement matrix A ∈ Km×N , with m  N . Here the vector e ∈ Km contains the noise and is usually assumed to be bounded, kek2 ≤ η. With the sparsity assumption, CS aims at finding (approximate) solutions to the (`0 -min) problem. General recovery guarantees ensure that the recovery is stable and robust, that is, the solution satisfies the following Lebesgue-type inequalities C kb x − xk2 ≤ √ σs (x)1 + Dη, (2) s √ kb x − xk1 ≤ Cσs (x)1 + D sη, (3) where σs (x)1 := argminz:kzk0 ≤s kx − zk1 defines the best s-term approximation of x in the `1 norm. Plethora of conditions (some of which we look closer in Section 4) on A have been derived to ensure that √ the previous (or similar) √ estimates hold. These are based on restricted isometry constants (δ2s < 2 − 1 [12] or δ2s < 4/ 41 [24], δs < 1/3), null space properties (A fulfills the robust and stable NSP(s, ρ, τ ) if kvS k1 ≤ ρkvS k1 + τ kAvk2 for any vector v ∈ KN , and S any index set with |S| ≤ s), coherence (µ1 (s) + µ1 (s − 1) < 1), quotient property, and so on. Similar conditions and bounds can be found when greedy and thresholding algorithms are used to approximate (`0 -min) (see [6, 23, 8, 7, 36, 31] for some relatively recent results in this direction). However, to ensure such recovery bounds, there is still a need for building adequate sensing matrices A. So far, no deterministic matrices A can be built with reasonable numbers of rows (i.e. with decent, small enough, number of measurements) and we have to rely on randomness to build measurement matrices. It has been shown, for instance, that matrices with independent random subgaussian entries fulfill the RIP(s, δ) provided that the number of measurements scales as m  δ −2 s log(N/s) [5]. Similar results have been obtained (with different log factors) for structured random matrices or matrices from bounded orthonormal systems, see [32] for instance. LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 5 2.2. Frames, fusion frames, and distributed signal processing. By definition, a sequence F = {fi }i∈I in a Hilbert space H is a frame [16] for H if there exist 0 < A ≤ B < ∞ (lower and upper frame bounds) such that X Akf k2 ≤ |hf, fi i|2 ≤ Bkf k2 for all f ∈ H. (4) i∈I The representation space associated with F is `2 (I) and its analysis and synthesis operators are respectively given by X T (f ) = {hf, fi i}i∈I and T ∗ ({ci }i∈I ) = ci fi , i∈I 2 for all f ∈ H and {ci }i∈I ∈ ` (I). It shows that the frame operator S := T ∗ T is a positive, self-adjoint and invertible operator; this means that recovery of any f ∈ H is possible, if Sf is known; however, computing S −1 can be computationally challenging. Luckily, each frame F is accompanied by at least one so-called dual frame G = {gi }i∈I , which satisfies X X f= hf, fi igi = hf, gi ifi for all f ∈ H, (5) i∈I i∈I and ensures recovery of the function f . Whenever a frame is A-tight (A = B), the problem of function reconstruction is simplified, since the frame operator S in this case is a scalar multiple of the identity operator. Fusion frames (FF) have been initially created [13] to model the setting of a wireless sensor network. Sensor networks are composed of wireless sensors with constraints in their processing power and transmission bandwidth, which reduces the costs but also affects the precision of the system. The sensors are distributed over a significantly large area of interest, to measure, for instance, pollution, temperature, sound, pressure, motion etc. The network is redundant, i.e., there is no orthogonality among sensors, so each sensor can be interpreted as a frame element. In addition, a large sensor network is split into redundant sub-networks; the local measurements within each sub-network are sent to a local sub-station, which submits the gathered information further to a central processing station for final reconstruction. Every (local) sensor is represented by a single frame vector; that is, each sub-network is related to a frame for a subspace in a Hilbert space. The subspaces have to satisfy a certain overlapping property, which ensures that the overlaps are not too large. The reconstruction in such a system is done in two steps: first, within each subspace the conventional frame reconstruction is employed; then, the local pieces of information serve as the inputs for the fusion frame reconstruction, which reconstructs the initial signal completely. Definition 1 (Fusion frames). Given an index set I, let W := {Wi | i ∈ I} be a family of closed subspaces in H. We denote the orthogonal projections1 onto Wi by Pi . Then W is a fusion frame, if there exist C, D > 0 such that X Ckf k2 ≤ kPi (f )k2 ≤ Dkf k2 for all f ∈ H. (6) i∈I Remark 1. Fusion framesP are often accompanied by respective weights. In the weighted case, the frame condition reads Ckf k2 ≤ i∈I vi2 kPi (f )k2 ≤ Dkf k2 for all f ∈ H and some positive weights (vi )i∈I . All (unweighted) results derived below apply mutatis mutandis to the weighted case. Given a fusion frame W for a Hilbert space H, let Fi := {fij | j ∈ Ji } be a frame for Wi , i ∈ I. Then {(Wi , Fi ) |i ∈ I} is a FF system for H. The following theorem [13] illustrates the relationship between the local and global properties of a FF: Theorem 2. For each i ∈ I, let Wi be a closed subspace of H, and let Fi = {fij | j ∈ Ji } be a frame for Wi , with frame bounds Ai , Bi . If 0 < A = inf i∈I Ai ≤ supi∈I Bi = B < ∞, then the following conditions are equivalent: • ∪i∈I {fij | j ∈ Ji } is a frame for H. • {Wi }i∈I is a fusion frame for H. In particular, if {(Wi , Fi )}i∈I is a fusion frame system for H with frame bounds C and D, then ∪i∈I {fij | j ∈ Ji } is a frame for H with frame bounds AC and BD. 1 an operator P is an orthogonal projection if P 2 = P and P ∗ = P 6 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI In the fusion frame theory, an input signal is represented by a collection of vector coefficients that represent the projection onto each subspace. The representation space used in this setting is ! X ⊕Wi = {{fi }i∈I | fi ∈ Wi } i∈I `2 2 with {kfi k}i∈I ∈ ` (I). The analysis operator T is then defined by T (f ) := {Pi (f )}i∈I for all f ∈ H,  P while its adjoint operator is the synthesis operator T ∗ : i∈I ⊕Wi `2 → H, defined by ! X X T ∗ (f ) = fi , where f = {fi }i∈I ∈ ⊕Wi . i i∈I `2 The fusion frame operator S = T ∗ T is given by S(f ) = X Pi (f ). i∈I It is easy to verify that S is a positive and invertible operator on H. In particular, it holds CI ≤ S ≤ DI, with I denoting the identity. If the dual frames Gi , i ∈ I, for each local frames are known then the fusion frame operator can be expressed in terms of the local (dual) frames [14]: X X S= TG∗i TFi = TF∗i TGi . i∈I i∈I For computational needs, we may only consider the fusion frame operator in finite frame settings, where the fusion frame operator becomes a sum of matrices of each subspace frame operator. The evaluation of the fusion frame operator S and its inverse S −1 in finite frame settings are conveniently straightforward. By Fi we denote the frame matrices formed by the frame vectors from Fi , in a columnby-column format. Let Gi be defined in the same way from the dual frame {gij }j∈Ji . Then the fusion frame operator is X X S(f ) = Fi GTi f = Gi FiT f. i∈I i∈I Hence a distributed fusion processing is feasible in an elegant way, since the reconstruction formula for all f ∈ H is X f= S −1 Pi (f ). i∈I The standard distributed fusion procedure uses the local projections of each subspace. In this procedure, the local reconstruction takes place first in each subspace Wi , and the inverse fusion frame is applied to each local reconstruction and combined together:   X X X f= S −1 Pi (f ) = S −1  hf, fij igij  for all f ∈ H. (7) i∈I i∈I j∈Ji Alternatively, one may use a global-like reconstruction procedure, which is possible if the coefficients of signal/function decompositions are available: XX f= hf, fij i(S −1 gij ) for all f ∈ H. (8) i∈I j∈Ji The difference in procedure (8), compared with a global frame reconstruction lies in the fact that the (global) dual frame {S −1 gij } is first calculated at the local level, and then fused into the global dual frame by applying the inverse fusion frame operator. This potentially makes the evaluation of (global) duals much more efficient. As stated above, computing the inverse (fusion) frame operator is often a challenging task. Instead, b by employing the so-called frame algorithm. All we need to start the one can approximate the solution x iterative algorithm is Sb x, which we already have. We recall the relevant result below for completeness. Proposition 2. [14] Let (Wi )i∈I be a fusion frame in KN , with fusion frame operator S = SW , and fusion frame bounds C, D. Further, let x ∈ KN , and define the sequence (xk ) by x0 = 0 and xk = xk−1 +  k D−C 2 S(x−x ), k ≥ 1. Then we have x = lim x , with the error estimate kx−x k ≤ kxk. k−1 k→∞ k k C+D D+C LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 7 Concretely, using the fusion frame reconstruction, the updates read n n 2 Xd 2 X xk = xk−1 + x(i) + Pi xk−1 . C + D i=1 C + D i=1 The middle term is computed once and for all. The following updates then only require some basic 2 b0 = 0 yields x b1 = C+D Sb x. matrix-vector multiplications. Note that starting the algorithm with x P  d −1 (j) b =S b via the iterative Similarly, in Section 5, we have x , and fb = Db x. We can find x jx P d 2 2 (j) c0 = 0, x c1 = C+D approach of Proposition 2, by starting the algorithm with x S(b x) = C+D j S x , and so on. The n−th term approximation of fb is then estimated with fbn = Db xn . 2.3. Signal recovery in fusion frames. This work describes an approach for sensing and reconstructing signals in a fusion frame structure. As presented above, given some local information x(i) := Pi (x), for 1 ≤ i ≤ n, a vector can easily be reconstructed by applying the inverse fusion frame operator ! n n X X x := S −1 S(x) = S −1 Pi (x) = S −1 x(i) , where x(i) := Pi (x), for 1 ≤ i ≤ n. (9) i=1 i=1 Throughout the work, we assume that the projected vectors are sampled independently from one another, with n devices modeled by the same sensing matrix A. Formally, the problem is as follows From the d (i) of the local information to compute the measurements y(i) = Ax(i) + e(i) , reconstruct an estimation x b of the signal x. approximation x From this point on, there are two ways of thinking about the problem. In a first scenario, the signals are measured in the subspace and the recovery of the x(i) are done locally. In other words, it accounts for solving n (`0 -min) problems (or their approximations via (BPDN) for instance) in the subspaces, and then transmitting the estimated local signals to a central unit taking care of the fusion via Equation (9). The other approach consists of transmitting the local observations y(i) = APi x to a central processing station which takes care of the whole reconstruction process. In this case, the vector x can be recovered by solving a unique (`0 -min) problem directly with, letting In denote the n dimensional identity matrix,  (1)    y P1     y =  ...  = In ⊗ A  ...  x (10) y(n) Pn While the latter case is interesting on its own (see for instance [17]), we investigate here some results for the first case. Our results can be investigated and generalized further, integrating ideas where the measurements matrix (here, the sensors) vary locally, as is the case in [17] or driven with some structured acquisition (see for instance [10]). We would like to put our work in context. This paper is not the first one to describe the use of fusion frames in sparse signal recovery. However, it is inherently different from previous works in [9, 3]. In [9] the authors provide a framework for recovering sparse fusion frame coefficients. In other words, given a fusion frame system {(Wi , Pi )}ni=1 a vector is represented on this fusion frame as a set of n vectors (x(i) )ni=1 where each of the x(i) corresponds to the coefficient vector in subspace Wi . The main idea of the authors is that the original signal may only lie in few of the n subspaces, implying that most of the x(i) should be 0. To rephrase the problem, we can say that the vector has to lie in a sparse subset of the original fusion frame. While [9] is concerned with some recovery guarantees under (fusion-) RIP and average case analysis, the paper [3] gives uniform results for subgaussian measurements and derive results on the minimum number of vector measurements required for robust and stable recovery. We, on the other hand, exploit structures (or sparsity) locally2. We do not ask that only a few of the subspaces be active for a given signal, but that the signal only has a few active components per subspace. This justifies the use of the local properties of fusion frame systems. 3. Examples and applications This section introduces some theoretical examples where the application of our fusion frame-based recovery shows increased performance over traditional recovery techniques. In particular, we justify in Proposition 4 that the fusion frame recovery may provide better robustness against noise. 2This sparsity assumption is needed only when a given frame component has a large dimension. We hope that in most of the cases we can control this dimension to be small enough avoiding the necessity of sparse assumptions. See the following section for more details. 8 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI 3.1. Orthogonal canonical projections. Consider the problem of recovering x ∈ KN from the measurements: y(i) = Ai x + e(i) , 1 ≤ i ≤ n, where Ai ’s are defined as Ai = APi and Pi is the orthogonal projection onto Ωi , with Ωi ⊆ {1, · · · , N }. We assume that the noise vectors e(i) are uncorrelated and independent, with ke(i) k2 ≤ ηi . A corresponds to a matrix of linear measurements in Km×N . Note that this framework is an example of recovery from Multiple Measurement Vectors (MMV ) (see [20, 28, 33] and references therein) where the signal is the same in every measurements, and the matrices are different for each set of measurements. We consider the problem of recovering local vectors x(i) , for 1 ≤ i ≤ n, where the x(i) are defined as x(i) := Pi x. In this case, we have that the sparsity of each local signal is at most Ni := rank(Pi ) = |Ωi |. Once the local d (i) are recovered, the original signal x can be estimated from a fusion frame like pieces of information x reconstruction: ! n n X X −1 d d (i) , b=S x x(i) = S −1 x (11) i=1 i=1 Pn where the fusion frame operator S is defined in the usual way as S : KN → KN , S(x) = i=1 Pi (x). The problem is to recover the unknown vector x from the measurements {yS(i) }ni=1 by solving local n problems. Clearly, a necessary condition for uniform recovery is that we have i=1 Ωi = {1, · · · , N } in a deterministic setting, or with high probability in a probabilistic setting. The main idea of our approach is to solve the (very) high-dimensional, high-complexity, and demanding problem y = Ax + e by combining results obtained from n problems that are much easier to solve. We investigate first the case where the Sn orthogonal projections do not overlap, i.e. Ωi ∩ Ωj = ∅, for any i, j ∈ {1, · · · , n} with i 6= j and i=1 Ωi = {1, · · · , N }. The results developed are reminiscent of some work on partial sparse recovery, when part of the support is already known [4]. In a second step we analyze the use of random and deterministic projections that may overlap for the recovery of the signal x. Remark 2. It is important to pause here and understand the problem above. Knowing the support of the projections, one could work on the local vectors x(i) of smaller sizes Ni < N . Doing this would allow faster computations of the solutions but also has the implication that the sparsity (per subspace) has to remain small. On the other hand, considering large vectors with many zero components allows to keep a sparsity rather large (compared to the subspace dimension). We choose to investigate mainly the latter case as we try to break the limitation on the complexity for a given sensing matrix. 3.1.1. Decomposition via direct sums. It is clear that the dimension N of the ambient space will play an important role. Indeed, if we consider no overlap between the projections, we have two drastically different extreme cases. These scenarios are important as they shed light on the main ideas behind our recovery results. Case n = N This case is characterized by (up to a permutation of the indices) Ωi = {i} for all 1 ≤ i ≤ N . In other words, each (set of) measurements y(i) = APi x + e(i) gives information about a single entry xi of the input vector x via an overdetermined linear system. In this case, assuming A has full rank, we can compute an estimate xbi of the entry xi as the solution to the `2 minimization problem: xbi := argminx∈R ky(i) − xai k22 = aTi y(i) aTi ai (12) where ai denotes the ith column of the matrix A. The N independent `2 minimizations ensure that the b satisfies the bound final solution x v v uN uN N uX |hai , e(i) i|2 uX ke(i) k2 X ke(i) k2 2 t t bk2 = ≤ ≤ . (13) kx − x 4 2 kai k2 kai k2 kai k2 i=1 i=1 i=1 In particular, in the noiseless scenario (e(i) = 0, for all i), the recovery is exact. In terms of (normalized) matrices from Gaussian measurements, which ensures that A has full rank – even numerically – with P (i) bk2 ≤ N high-probability [15, 34], it holds Ekai k2 = 1 and it follows Ekx − x i=1 ke k2 . m×N Notice that even though we have only one fixed matrix A ∈ K , (obviously) we are no longer limited to the recovery of sparse vectors, which is the motivation for using fusion frames as described below. However, this has a price as the (actual) number of measurements drastically increased to m · N . This is clearly too many measurements in any practical scenarios, but with similar ideas, we can reach practical applications such as using multiple lower sampling rate devices in order to resolve a harder LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 9 problem, typically required for much higher rate of sampling devices (see Section 1.1.1). Note also that all the results here should be put in the context of MMV problems, and not with the usual CS setup. Case n = 2 We consider now two sets Ω1 and Ω2 such that Ω1 ∪ Ω2 = {1, · · · , N } and Ω1 ∩ Ω2 = ∅. Without loss of generality we can assume that Ω1 = {1, · · · , N1 } and Ω2 = {N1 + 1, · · · , N1 + N2 } with N1 + N2 = N . We measure twice the unknown vector x as y(1) = A1 x + e(1) = AP1 x + e(1) and y(2) = A2 x + e(2) = AP2 x + e(2) . If both N1 and N2 are smaller than m, then two `2 minimizations d d (1) and x (2) independently and it follows that the solution x (1) + x (2) obeys the following b = xd recover xd error bound: (1) 2 (2) 2 kb x − xk22 ≤ kA+ k2 + kA+ k2 . (14) Ω1 e Ω2 e The reconstruction is again perfect in the noiseless case. Moreover, as in the previous case, there is no need for a sparsity assumption on the original vector x. The oversampling ratio is not very large as we only have a total of 2m measurements. If however one at least of N1 or N2 (say N1 ) is larger than m then we need to use other tools as we are now solving an underdetermined linear system. Driven by ideas from CS, we can assume the vector to be sparse on Ω1 . The recovery problem becomes (1) that minimizes kzk , Find xd subject to kA z − y(1) k ≤ η (15) 1 1 2 1 1 The ` minimization problem is introduced as a convex relaxation of the NP-hard `0 minimization. Note that the constraints apply only on the support Ω1 of the unknown vector. Hence the usual sparsity requirements encountered in the CS literature need not to apply to the whole vector. Unfortunately, the sparsity assumption being applied independently on Ω1 and/or Ω2 restricts ourselves to non-uniform recovery guarantees only, at least when considering the full set of sparse signals. The following definition will become handy in the analysis. Definition 2 (Partial null space property). A matrix A ∈ Km×N is said to satisfy a partial robust and stable null space property of order s with respect to a subset Ω ⊂ {1, · · · , N } with N ≥ |Ω| > m, P the orthogonal projection onto Ω, and constants 0 < ρ < 1, 0 < τ if k(P v)S k1 ≤ ρk(P v)S̄ k1 + τ kAvk2 (16) holds for any vector v and any set S ⊂ Ω such that |S| ≤ s. Remark 3. The previous definition is a weakening of the usual robust null space property, where what happens in the complement of the set Ω is irrelevant. It is worth noticing that it also coincides with the usual definition when Ω = {1, · · · , N }. The partial robust null space property of the measurement matrix A on Ω1 ensures that the recovered (1) obeys the following error bound [24, Theorem 4.19]: local vector xd 4τ 2(1 + ρ) σs (x(1) )1 + ke(1) k2 . (17) 1−ρ 1−ρ Equation (17) is obtained by modifying the proofs of [24, Theorem 4.19, Lemma 4.15] and adapting them to the presence of the projection P1 . A formal proof of a more general statement is given in the proof of the later Theorem 6. This yields the following direct consequence (1) − P xk ≤ kxd 1 1 Proposition 3. Let N and m be positive integers with N > m and A ∈ Km×N . There exist two integers N1 and N2 such that, up to a permutation, Ω1 = {1, · · · , N1 } and Ω2 = {N1 + 1, · · · N1 + N2 }. Assume that N2 ≤ m and N1 > m. Assume that the matrix A satisfies the partial robust null space property of order s with respect to Ω1 with constants 0 < ρ < 1 and τ > 0 and that AΩ2 has full rank. For d d d (1) + x (2) with x (1) solution to Problem (15) and x (2) solution to the overdetermined b := xd x ∈ KN , let x 2 ` minimization problem on Ω2 . Then the solution obeys: 4τ 2(1 + ρ) (2) bk2 ≤ kA+ σs (x(1) )1 + ke(1) k2 . (18) kx − x k2 + Ω2 e 1−ρ 1−ρ Moreover, the total number of measurements amounts to 2m for the recovery of an N2 + s sparse vector. Recovering the vector x(2) does not create any problem, as long as the pseudo-inverse has a reasonable ` norm, i.e. as soon as the rank of the projection is reasonably small (see discussion below and Theorem 3 in particular). The recovery of the vector x(1) ∈ KN is ensured provided the number of subgaussian measurements m scales as [24, Corollary 9.34] 2 m & 2s ln(eN/s) 1 + ρ−1 . (19) 2 Proposition 3 slightly reformulated yields the following result: 10 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI Corollary 1. Let A := AP1 + AP2 ∈ Km×N with Ω1 ∩ Ω2 = ∅ and Ω1 ∪ Ω2 = {1, · · · , N } and N1 = |Ω1 |, N2 = |Ω2 |. If A is a subgaussian matrix and AΩ2 has full rank, then provided that 2 m & 2s ln(eN/s) 1 + ρ−1 , N2 1 any vector x ∈ Θ := ΣN ⊂ ΣN s +K s+N2 can be recovered with the bound (18). 1 Here, ΣN denotes the set of s sparse vectors in KN1 . The previous Corollary provides a uniform s recovery result, on the proviso on the model for the vector x. 3.1.2. Controlled deterministic projections. We look here at a scenario where the sets Ωi (and hence the projections Pi ) are completely and deterministically controlled. We consider an integer n > 0 and subsets Ωi ⊂ {1, · · · , N } with |Ωi | = Ni , ∪ni=1 Ωi = {1, · · · , N } and Ni ≤ m, and assume again that A has full rank. In this case, we can always enforce the disjointness of the support Ωi ∩ Ωj = ∅, for any i 6= j. This yields the trivial recovery of the input signal from its local information vectors: b := x n X d (i) . x (20) i=1 Here, all the local vectors are recovered via generalized Moore-Penrose pseudo inverses of the sub-matrices AΩi composed of only the columns supported on Ωi : d (i) = A+ y(i) = x(i) + A+ e(i) . x Ωi Ωi (21) The error estimate follows directly: bk22 ≤ kx − x n X (i) 2 kA+ Ωi e k2 (22) i=1 Note that it holds kA+ ek2 ≤ kA+ k2→2 kek2 and that kA+ k2→2 = 1/ min1≤i≤r (σi ), with r the rank of A and {σi }ri=1 its singular values. As a consequence, when dealing with “nice” matrices, the bound (22) is reasonable. In a CS setup, normalized sensing matrices generated at random from a Gaussian distribution have the property of being well-behaved, as suggested by [24, Theorem 9.26]: e be its variance-normalized e be an m × s Gaussian matrix with m > s and A := √1 A Theorem 3. Let A m counterpart. Then for t > 0,   p mt2 P σmax (A) ≥ 1 + s/m + t ≤ e− 2   p mt2 P σmin (A) ≤ 1 − s/m − t ≤ e− 2 , where σmax (Θ) and σmin (Θ) are the maximum and the minimum singular values of Θ, respectively. For small projection ranks, and A as in Theorem 3, it holds s ≤ r < m, and therefore P(kA+ Ωi k2→2 ≥ 2 √1 r ) ≤ e−mt /2 which justifies that the bound (22) is small. 1− m −t 3.1.3. Rank-controlled projections. This scenario differs from the previous one by the fact that we may control only the ranks Ni ’s of the projections but let the support of projections be random. This example is motivated by the SAR applications where the rank of the projections is controlled by the aperture and resolution of the sensing device. In this case, for uniform recovery of any vector x we need to ensure that, with high probability, the whole support {1, · · · , N } is covered by the random projections. We assume that all the projections have the same rank r for simplicity of calculations, but similar ideas apply if variations in the rank of the projections were needed. We pick uniformly at random n sets Ωi of size r in {1, · · · , N }. It holds n    N −r n . (23) P ∃i ∈ {1, · · · , N } : i ∈ / Ω := ∪nj=1 Ωj = N P [1 ∈ / Ω] = N (P [1 ∈ / Ω1 ]) = N N   This gives that P ∃i ∈ {1, · · · , N } : i ∈ / Ω := ∪nj=1 Ωj ≤ ε whenever n≥ This direct consequence follows. log(N/ε) . log(N/(N − r)) (24) LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 11 Proposition 4. Let A ∈ Km×N with m < N , r ≤ m, ε > 0, and n be such that Equation (24) holds. In addition, assume that every submatrix with r columns extracted from A has full rank. Let Ω1 , Ω2 , · · · , Ωn be n subsets in {1, · · · , N } of size r chosen independently and uniformly at random. P d (i) from the measurements b := S −1 ni=1 x Any vector x recovered from the fusion of local recovery as x (i) (i) y = APi x + e , 1 ≤ i ≤ n satisfies, with probability at least 1 − ε n 1 X (i) 2 bk22 ≤ kA+ kx − x (25) Ωi e k2 C i=1 Pn d (i) := A+ y(i) and C denotes the lower frame bound of S. where S(x) := i=1 Pi x and x Ωi The lower frame bound is defined for general fusion frame operators as in Definition 1. The error bound above is applicable in case of any fusion/filtering scenario. In our particular set-up, we calculate exactly this bound. Lemma 1. Given n projections Pi of rank r, the lower frame bound of the fusion frame operator S := P Pi is given by C := min M(k) =: M, (26) 1≤k≤N where M(k) is the multiplicity of index k. Formally, let Γk := {j : 1 ≤ j ≤ n : k ∈ Ωj }, then M(k) := |Γk |. Proof. That C ≤ M is clear. Indeed, let x = ek0 where kP 0 is one of the indices achieving the minimum ek0 denotes the canonical vector. Then it holds S(ek0 ) = j∈Γk ek0 and it follows that kS(x)k22 ≤ M2 . 0 PN On the other hand, for any x ∈ KN , the fusion frame operator can be rewritten as S(x) = i=1 M(i)xi . PN Consequently it holds that for any x ∈ KN , kS(x)k22 ≥ M2 i=1 |xi |2 and hence C 2 ≥ M2 .  As a consequence, it is trivial to see that for any 1 ≤ k ≤ N , M(k) is a non-decreasing function of the number of projections n. Hence, the greater the number of projections (the redundancy, in fusion frame terms) the greater the bound C and therefore the smaller the error in the recovery according to Equation (25). This however can only hold true, as long as the noise per measurement vectors remains small. Note that in the case of subsets selected independently uniformly at random, we can have a precise statement. The lower frame bound is defined as the minimum number of occurrences of any index k ∈ {1, · · · , N }. Let us consider M(k) and Γk as in the previous lemma. Let k ∈ {1, · · · , N } be any index and Ωj denote a draw of a random set. It holds P[k ∈ Ωj ] = r/N . The subsets being independent of each other, M(k) is a binomial random variable with probability of success P = r/N for each of the n trials. It follows that P[M(k) = l] = nl P l (1 − P )n−l for all 1 ≤ k ≤ N and 1 ≤ l ≤ n. Putting everything together, we get that C := min M(k) is a random variable such that k∈{1,··· ,N } P[C ≥ l] = P[∀1 ≤ k ≤ N, M(k) ≥ l] N  l−1 X N N = (P[M(k) ≥ l]) = 1 − P[M(k) = j] = (1 − F (l − 1, n, P )) . (27) (28) j=1 These expressions resemble the calculations involved in Equations (23) and (24), however with a much more complicated probability distribution. To avoid unnecessarily tedious calculations that would infer the readability of the paper, we choose to leave the following result as a conjecture. Conjecture 1. Let Ω1 , Ω2 , · · · , Ωn be n subsets of r elements taken uniformly at random in {1, · · · , N }. Let Γk := {j : 1 ≤ j ≤ n : k ∈ Ωj }, and M(k) := |Γk |. Then C := min1≤k≤N M(k) =: M grows at least linearly with n, i.e., there exists constants c > 0 and b ≥ 0, independent of n, such that E[C] ≥ cn − b. (29) 0 A direct consequence of this is that one can always find a multiplicative constant c ≤ c such that for a number of projections n ≥ b/(c − c0 ), E[C] ≥ c0 n (the case c = c0 can only be true for b = 0, in which case, there is no need for this remark). Though the proof is not given, the result is backed up with numerical results shown in Figure 3.3 The graphs always show the expected linear growth, independently of the parameters of the problem. 3It is also backed up with particular cases, when the ranks are exactly half http://math.stackexchange.com/questions/1135253/mean-value-of-minimum-of-binomial-variables the dimension, see 12 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI 35 35 N = 10000 N = 1000 25 20 15 10 5 0 N = 10000 N = 1000 30 Average lower frame bound Average lower frame bound 30 25 20 15 10 5 0 5 10 15 20 25 30 35 40 45 50 0 0 Oversampling ratio 5 10 15 20 25 30 35 40 45 50 Oversampling ratio (a) Large projections (b) Small projections Figure 3. Linear growth of the expectation of the lower frame bound for various use cases. The averages are calculated from 300 random experiments. The left graphs show the average lower frame bound when dealing with rather large projections (with rank r = N/2) while the right graphs are in the case of much smaller projections (r = N/5). The oversampling ratio is calculated as a linear function of the number of projections and is independent of the ambient dimension N ; ζ = rn/N . Assuming the conjecture to be true, Equation (25) then simplifies to n δν 1 X (i) 2 kA+ Ekb x − xk22 ≤ 0 Ωi e k2 ≤ 0 , c n i=1 c (30) where the expectation is taken over the draw of the projections, for a certain constant c0 > 0, where we (i) 2 let δ = maxi kA+ Ωi k2→2 and ν := maxi ke k2 . It shows that at least in expectation, the error should not grow as the number of measurements increases. Moreover, numerical results illustrated in Figure 5 suggest that the expected reconstruction error decreases. An intuition for this behavior is provided in a simple example in Equations (34) and (35). From a compressed sensing perspective, it has been shown that the least favorable case appears as the case when the vectors are repeated again and again. This translates in our scenario to the case where the increase of the measurements consist solely in repeating the same projections. Considering the example of a SAR imaging process developed in Section 1.1.2, this would correspond to a plane flying over a given region multiple times, with the spatial filtering being exactly the same. Remark 4. It is important to note here that there is no sparsity assumption. It is possible to recover any vector x with high probability, as long as the number of measurement vector scales reasonably with the dimension of the input space. 3.1.4. Constrained number of measurements and ranks of projections. In certain scenarios, the physical measurement devices limit our freedom in choosing the ranks and size of the measurements. We hence deal here with fixed ranks Ni ’s for the projections Pi . Assume, without loss of generality, that the first 0 ≤ k ≤ n projections have ranked lower than the number of measurements m. For these subspaces, the usual `2 minimization procedure yields perfect (or optimal in the noisy case) recovery of the local information x(i) , for 1 ≤ i ≤ k. For the remaining n − k subspaces, the pseudo-inverse is not sufficient, and we use tools from CS. We here again use the partial robust null space property from Definition 2 on every subspace Ωj , for k + 1 ≤ j ≤ n. Combining results from Propositions 4 and 3 yields the following direct corollary as a consequence: Corollary 2. Let m < N and A ∈ Km×N . Assume that we are given a set of n sets {Ωi }ni=1 in {1, · · · , N } of respective sizes {Ni }ni=1 with N1 ≤ N2 ≤ · · · Nn . Assume in addition that ∪i Ωi = {1, · · · , N }. Moreover, there exists a unique 0 ≤ k ≤ n such that Nk ≤ m and Nk+1 > m (with the convention that N0 = 0 and Nn+1 > m). Assume that the submatrices AΩi , for 1 ≤ i ≤ k, have full rank. If in addition the measurement matrix satisfies a partial robust null space property of order s P d (i) with b defined as x b := S −1 ni=1 x with respect to every subset Ωi , i ≥ k + 1, then, the approximation x d d (i) := A+ y(i) , for 1 ≤ i ≤ k and x (i) solutions to the `2 constrained `1 minimization problems (BPDN), x Ωi for k + 1 ≤ i ≤ n fulfills the following estimate: 1 bk2 ≤ kx − x M k X i=1 (i) kA+ Ωi e k2 n n 2(1 + ρ) X 4τ X + σs (x(i) )1 + ke(i) k2 1−ρ 1−ρ i=k+1 i=k+1 ! (31) LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 13 Note that for simplicity we have assumed that the NSP is valid on every subspaces for the same set of parameters. To avoid notational encumbrance we do not write results where the ρ, τ , and s may depend on the subspace considered. Remark 5. This is a direct application of the previous results. It is obtained by recovering every local pieces of information independently from one another. It is possible to improve these estimates by a sequential procedure where we first estimate the xj for j ∈ Ωi , for some 1 ≤ i ≤ k, and then using this reliable estimate to improve the accuracy of the `1 minimization program. A final remark considers the case where the rank of the projection is also random. We can think of the sets Ωi , for 1 ≤ i ≤ n as Binomial random variables with probability of success p. In this case, the rank of the projection Pi if controlled by the expectation of this random variable. An analysis similar to the previous one can be carried over to ensure recovery of any vector with high probability. 3.2. Numerical examples. This Section describes numerical recovery results on the case described above. We first show some particular examples of recovery, when dealing with dense signals and show that we can break the traditional sparsity limit by adding a few sensors. The next example shows the behavior of the quality of the reconstruction when slowly adding sensors. Finally, the last subsection validates our Conjecture and show that the noise tends to decrease while adding projections, and that the overall quality of recovery scales linearly with the noise level. In another contribution, we have also verified that we can recover a very dense Fourier spectrum, by using our approach with Fourier measurement matrices, see [1]. (a) Large ranks (b) Small ranks, small sparsity (c) Small ranks large sparsity Figure 4. Examples of fusion reconstruction. 3.2.1. Examples of recovery. The examples of reconstruction depicted on Figures 4 were created by generating at random s sparse Gaussian vectors with s = 200 for Figures 4(a) and 4(b), and s = 500 for Figure 4(c). For each cases, the 250 × 600 matrix was generated at random with entries i.i.d. from a Gaussian distribution. In the first example, the rank is set to r = 300 > m and hence, `1 minimization (traditional basis pursuit) is used on every subspaces. This yields a total of 13 projections generated at random. For the two last examples, the ranks of the projections are set to r = 200 < m. In this case, only a classical `2 inversion is needed on every subspace. Here, since the ranks are smaller, the number of projections has to be increased to 22 in order to ensure that the whole set {1, · · · , N } is covered with high probability. By looking carefully at the last example, one can see that an index with non-zero magnitude has not been selected (around index 520). These cases, however, are rare. In every figure, the red ’+’ crosses represent the true signal, the blue circles represent the reconstructed signal from our fusion approach, and the green ’x’ correspond to the reconstruction with traditional basis pursuit. While the very last set-up (very high number of non-zero components) is clearly not suitable for usual compressed sensing, the advantage of projections and fusions can be seen even in the fist two (where the number of non-zeros remains relatively small). Another aspect to look at is that when dealing with small ranks, the solutions to the `2 minimization problems are computed efficiently. As a consequence, even b is still orders of magnitude when the number of projections increases, the calculation of the recovered x faster. 3.2.2. Recovery and number of projections. Given any scenario introduced above, it is expected from Conjecture 1 that increasing the number of projections (of a given rank) will increase the lower frame bound (26) at least linearly. This linear increase of the lower frame bound compensates for the potential increase in the reconstruction error. One could however hope for better results according to the numerical 14 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI evidence illustrated in Figure 5, where the average case error seems to be reduced as the number of projections increases. Given a set of n projections generating a fusion frame, the least favorable case, studied in [21] for the case of a single filtering operation, when adding an extra n projections, is when the exact same Ωi are repeated. The exact behavior of the reconstruction error with respect to the number of projections is still under research. Figure 5. `2 error of recovery for various number of projections. For a total of 10 generations of random Gaussian matrices of size 300 × 1000, and 10 random Gaussian 200 sparse vectors (note: that is a setting where usual compressed sensing has no recovery guarantees), we let the number of random projections of rank r = 500 go from 60% up to 5 times the minimum given by Equation (24) (17 in our setting, for a success of covering the whole input set of ε = 99%). As can be seen from the figure, the recovery is unlikely to be correct as long as the number of projections remains small. The trend is generally towards the perfect recovery - though this can only be guarantee with high accuracy, which explains the little spikes. Moreover, while the maximum might be somewhat bigger, it appears 1) that it remains within reasonable bounds (depending on the application) and 2) the average of the error among the 100 tests per number of projections is very small, suggesting that only a few of the recoveries are off. A way to understand this is to consider the case, where we have two projections that are slightly overlapping. Given the global set Ω = {1, · · · , N }, assume we split it into Ω1 and Ω2 with some overlap, i.e. Ω = Ω1 ∪ Ω2 and Ω12 := Ω1 ∩ Ω2 6= ∅. We independently solve d (i) := argmin kxk x 1 (i) s.t. kAPi x − y k2 ≤ ηi (32) (33) for 1 ≤ i ≤ 2. For now we consider only the noiseless case, i.e. ε1 = ε2 = 0 which is equivalent to d (i) = solving two basis pursuit optimization problems. We can decompose the solutions recovered as x d d (i) | (i) x Ωi \Ω12 + x |Ω12 . If we assume, for simplicity of understanding, that the first component is recovered (1) = x(1) . If however the second component is not recovered accurately, we exactly, we have that xd d d (2) (2) (i) = x(i) + e(i) , for can write x = x + e(2) (for further generalizations, we can always write x (i) 1 ≤ i ≤ n with 0 in case of successful recovery on the set Ωi ). In this very simple example, we Pne = have S(x) = i=1 x(i) = x(1) + x(2) . Similarly, the inverse fusion frame operator can be seen as the point wise empirical average of the evidences (i.e. the local recoveries): x(1) |Ω12 + x(2) |Ω12 . (34) 2 Note that the 2 in the denominator denotes the number of times that the indices in Ω12 are picked in the creation of the (random) projections. In other words, increasing the number of projections increases potentially the denominator under a given index and hence reduces the error.   e(2) |Ω12 d (1) + x (2) − x(1) − x(2) = e(2) | b − x = S −1 xd x (35) Ω2 \Ω12 + 2 As a consequence, the error (on the set Ω12 ) is bounded by the maximum of the error from every recovery problem divided by the number of times a particular index appears. S −1 (x) := x(1) |Ω1 \Ω12 + x(2) |Ω2 \Ω12 + LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS (a) Minimum number of projections (b) Double number of projections 15 (c) Basis pursuit denoising Figure 6. Behavior facing noise 3.2.3. Robustness to noise. In the set of experiments illustrated in Figures 6, we have compared the robustness of our algorithm compared to traditional basis pursuit denoising when dealing with noise. We have set the parameters in a regime where (BPDN) works for fair comparison. For a 500 dimensional ambient space and 300 dimensional measurement space, we generated 5 random 80 sparse Gaussian vectors for each of the 10 randomly generated Gaussian matrices. For every single test, some additive Gaussian noise with a given `2 norm θ has been added. This means that for the case of the distributed approach, n independent noise components of norm θ have been added in total; one for each channel. The figures depict the evolution of the error of the `2 norm when the energy of the noise component increases. The black line represents the maximum of the error, the blue one the minimum, and the red one the average over every samples. The left graph shows the result when the number of projections is exactly set as in Equation (24) while the second one doubles this number. The third figure shows the result when using the usual Basis Pursuit Denoising. It is important to notice that the higher peak appearing on the first figure is due to an index with non zero component from the support of the original vector x not being selected at all during the random projections. This however does not contradict the high probability of recovery. The improvement in the noise behavior from the first figure to the second shows how the fusion frame operator tends to average out the local errors to yield a better estimate (as described in the previous section). Finally, all of the algorithms scale linearly with the norm of the noise per measurements (as suggested by Equation (25)) and even if the total noise is increased as the number of projections is increased, the recovery tends to be improved by considering more projections. 4. An extension of traditional compressed sensing Our results so far ensure that robust and stable recovery of dense signals is possible, by smartly combining local information. In this section we show that the ideas developed in Section 5 can also be considered as an extension of the traditional CS. In particular, it gives solid mathematical foundations to our work. It is important to note that similar ideas have been developed in parallel in [17]. There, the authors introduced a model similar to (10), albeit asking that the fusion frame be tight with C = D = 1, but reconstruct the whole signal globally, without the use of the fusion process. Other authors [10] looked at CS with structured acquisition and structure sparsity. In simple words, they prove that adapting the sampling matrices to some prior knowledge of the sparsity pattern allowed for larger applicability of the CS framework. In this section we describe the recovery of a signal x by means of CS in the local subspaces and fusion processing. The local pieces of information are computed as solutions to the problems minx∈KN s.t. kzk1 kAPi z − y(i) k2 ≤ ηi . (P1,η ) In the noiseless case, the problem is solved by the basis pursuit minx∈KN s.t. kzk1 APi z = y(i) . (P1,0 ) (i) be a solution to the noisy (P Lemma 2. Let zd 1,η ) or noiseless (P1,0 ) basis pursuit problem. Then d (i) z ∈W. i d d d be a solution and let z̃ = Pi zd (i) . Then kz̃k ≤ kz (i) k + k(I − P )(z (i) ))k . z̃ being also Proof. Let z(i) 1 1 i 1 d d d (i) (i) (i) admissible, it follows that kz̃k1 = kz k1 and z = Pi (z )).  16 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI 4.1. Signal models and recovery conditions. 4.1.1. Extension of the sparsity model. The traditional sparsity model is not appropriate in this setting. As an example, let us consider that all the s nonzero components of a vector x fall within a certain subspace (say W1 ), there is, a priori, no hope to improve the recovery performance compared to a single sensor/subspace problem. Indeed, in this case, the recovery is ensured (locally) by CS methods if the number of observations m scales as m  s log(N/s). Since we are dealing here only with an identical sensing model, this yields a total number of observations mT scaling as mT  ns log(N/s). This may be acceptable if we consider only very few subspaces but may explode in certain cases. Therefore the model of distributed sparsity may be more appropriate. Definition 3. A signal x ∈ KN is said to be s = (s1 , · · · sn )-distributed sparse with respect to a fusion frame W = (Wi , Pi )1≤i≤n , if kPi (x)k0 ≤ si , for every 1 ≤ i ≤ n. s is called the sparsity pattern of x with respect to W. (W) We denote by Σs the set of all s-distributed sparse vectors with respect to the family of subspaces (Wi )i . We let s = ksk1 denote the global sparsity of the vector, with respect to W. In the case that the sparsity of the signal is uniformly distributed among the subspaces (si = s/n), the usual CS recovery guarantees ensure us that m  si log(N/si ) observations per subspace are required for a stable and robust recovery of the signal. This accounts for a total number of measurements scaling as mT  nsi log(N/si ) = s log(N/si ). In other words, we are able to recover similar sparsities as in the classical CS framework. But in opposition to the classical theory most of the computations can be easily carried in a distributed setting, where only pieces of the information are available. Only the fusion process requires all the local information to compute the final estimation of a signal. Locally, it only requires solving some very small CS system, which can be done faster than solving the original one. This is also the findings found in parallel in [17], where it is concluded that the number of measurements per sensor decreases linearly with the number of sensor. We describe a similar problem, while looking at it from a different perspective. In particular, we try to find the sparsity patterns that may be recovered for a given sensor design. The motivation for this problem comes from the applications in SAR imaging where the sensor is given and the same everywhere, and where we may not have any control on the number of observations per subspace. As it will become useful later, we also need to introduce the local best approximations. Definition 4. Let W = (Wi , Pi )ni=1 be a fusion frame, and let x ∈ KN . For p > 0 and a sparsity pattern s = (s1 , · · · , sn ) with si ∈ N for all 1 ≤ i ≤ n, the `p errors of best s-term approximations are defined as the vector T σsW (x)p := (σs1 (P1 x), σs2 (P2 x), · · · , σsn (Pn x)) 4.1.2. Partial properties. The null space property (NSP) has been used throughout the past decade in the CS literature as a necessary and sufficient condition for the sparse recovery problem via (`0 -min). A matrix A is said to satisfy the (robust) null space property with parameters ρ ∈ (0, 1) and τ > 0 relative to a set S ⊂ {1, · · · , N } if kvS k1 ≤ ρkvS k1 + τ kAvk2 , for all v ∈ KN . More generally, we say that the matrix A satisfies the NSP of order s if it satisfies the NSP relative to all sets S such that |S| ≤ s. We extend here this idea to the context of distributed sparsity with respect to fusion frames, as already mentioned in Definition 2. Here we talk about a sparsity pattern and ask that the NSP property be valid for all local subspaces up to a certain (local) sparsity level. Definition 5 (Robust and stable partial null space property (RP-NSP)). Let n be an integer and W = (Wi , Pi )ni=1 be a frame for KN . Let s = (s1 , · · · , sn ) be a sequence of non negative numbers representing the sparsity pattern with respect to W. For a number q ≥ 1, a sensing matrix A ∈ Km×N is said to satisfy the `q -RP-NSP with pattern s with respect to W and with constants ρ1 , · · · , ρn ∈ (0, 1) and τ1 , · · · , τn > 0 if ρi k(Pi v)Si kq ≤ 1−1/q k(Pi v)overlineSi k1 + τi kAvk2 , for all v ∈ KN , 1 ≤ i ≤ n, Si ⊂ Wi , and |Si | ≤ si . s LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 17 This definition is reminiscent of the work on sparse recovery with partially known support [4]. The difference here being that there is no need to enforce a condition on the vector v to lie in the range of the other subspaces. In a sense, this is taken care of by the fusion process and the fact that we have multiple measurement vectors. Remark 6. Note that we could simplify the definition by asking that the parameters be uniform and independent of the local subspace. Namely, introducing τ := max1≤i≤n τi and ρ := max1≤i≤n ρi , the above definition becomes ρ (PWi v)Si q ≤ 1−1/q (PWi v)Si 1 + τ kAvk2 , for all v ∈ KN , 1 ≤ i ≤ n, Si ⊂ Wi , and |Si | ≤ si . s A stronger, but easier to verify, condition often used as a sufficient recovery condition is the bynow well known Restricted Isometry Property (RIP). Informally speaking a matrix is said to satisfy the RIP (s, δ) if it behaves like an isometry (up to a constant δ) on every s-sparse vector v ∈ Σs . Formally speaking, A ∈ Km×N satisfies RIP (s, δ), for some s ≥ 2 and δ ∈ (0, 1) if (1 − δ)kvk22 ≤ kAvk22 ≤ (1 + δ)kvk22 , for every v ∈ Σs . (36) The lowest δ satisfying the inequalities is called the restricted isometry constant. Once again, we want to derive similar properties on our sensing matrix for the distributed sparse signal model. Definition 6 (Partial-RIP (P-RIP)). Let W = (Wi , Pi )ni=1 be a fusion frame, and let A ∈ Km×N . Assume that A satisfies the RIP (si , δi ) on Wi , with δi ∈ (0, 1), i ∈ I = {1, · · · , n}. Then, we say that A ∈ Km×N satisfies the partial RIP with respect to W, with bounds δ1 , · · · , δn and sparsity pattern s = (s1 , · · · , sn ). In other words, A satisfies a P-RIP conditions, if it satisfies RIP-like conditions on every subset of vectors in range(Pi ). Remark 7. This definition is consistent with the definition of the classical RIP in the sense that the case n = 1 (only one projection, one subspace) recovers the usual RIP. The P-RIP can be written in a form similar to the traditional RIP, Equation (36). Proposition 5. Let W = (Wi )i∈I be a fusion frame (with frame bounds 0 < C ≤ D < ∞). Let A ∈ Km×N satisfy the P-RIP with respect to W, with bounds δ1 , · · · , δn and sparsity pattern s = (s1 , · · · , sn ), and let Co = C mini {1 − δi }, Do = D maxi {1 + δi }. Then, for any v ∈ KN , X Co kvk22 ≤ kAvi k22 ≤ Do kvk22 . i Proof. Using the fusion frame inequality, and inequalities (36) for all i ∈ I, we obtain X X X C min{1 − δi }kvk22 ≤ min{1 − δi } kvi k22 ≤ (1 − δi )kvi k22 ≤ kAvi k22 i i ≤ X i i (1 + δi )kvi k22 ≤ max{1 + δi } i i X i i kvi k22 ≤ D max{1 + δi }kvk22 . i  Theorem 4. Let ε > 0. Let W = (Wi , Pi )ni=1 be a fusion frame for KN , N ≥ 1. Let A ∈ Km×N be a subgaussian matrix with parameters β, k. Then, there exists a constant C = Cβ,k such that the P-RIP constants of √1m A satisfy δsi ≤ δi , for 1 ≤ i ≤ n with probability at least 1 − ε, provided m ≥ C min(δ)−2 (max(si ) ln(eN/ max(si )) + ln(2εn)) Before we prove this result, we recall a standard RIP result for subgaussian matrices (Theorem 9.2 in [24]): Theorem 5. Let A be an m × N subgaussian random matrix. Then there exists a constant C > 0 (depending only on subgaussian parameters β, k) such that the RIP constant of √1m A satisfies δs ≤ δ with probability at least 1 − ε, if  m ≥ Cδ −2 s ln(eN/s) + ln(2−1 ) . 18 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI Proof. (of Theorem 4) For some constants δi ∈ (0, 1), let E be the event “ √1m A does not satisfy P-RIP with respect to W with constants δ1 , · · · , δn ”. Applying a union bound it follows that n n X X P(E) = P(∃i ∈ {1, · · · , n} : δsi > δi ) ≤ P(δsi > δi ) = εi i=1 i=1 For some εi such that ε1 + · · · + εn = ε ∈ (0, 1), since the sensing matrix is the same for every sensors, there exists a unique C > 0 (depending on β, k) such that √1m A satisfies the RIP locally within the subset Wi and for a sparsity si with constant δsi ≤ δi , provided that m ≥ max1≤i≤n mi , with mi ≥ Cδi−2 (si ln(eN/si ) + ln(2−1 i )). Additionally, since the function s → s ln(eN/s) is monotonically increasing on (0, N ) and s  N , max1≤i≤n mi ≥ C max1≤i≤n δi−2 max1≤i≤n si ln(eN/ max1≤i≤n si ) + ln(2ε−1 i ) . Considering ε1 = · · · = εn = ε/n concludes the proof.  Note: all Gaussian and Bernoulli random matrices are subgaussian random matrices, so Theorem 4 holds true for Gaussian and Bernoulli random matrices. 4.2. Recovery in general fusion frames settings. With the tools introduced above, we show that any signals with sparsity pattern s can be recovered in a stable and robust manner via the fusion frame approach described in the previous sections. 4.2.1. RP-NSP based results. We give a first recovery guarantee based on the robust partial NSP, introduced in Definition 5. n Theorem 6. Let A ∈ Km×N and W = (Wi , Pi )i=1 a fusion frame with frame bounds 0 < C ≤ D < ∞ n and frame operator S. Let y(i) i=1 be the linear measurements y(i) = APi x + e(i) , 1 ≤ i ≤ n for d (i) the solution to the local Basis Pursuit some noise vectors e(i) such that ke(i) k2 ≤ ηi . Denote by x P d (i) . If the matrix A satisfies the `1 -RP-NSP with sparsity pattern b = S −1 problems (P ) and let x x 1,η i s = (s1 , · · · , sn ) with constants 0 < ρ1 , · · · , ρn < 1 and τ1 , · · · , τn > 0 with respect to W, then the b approximates x in the following sense: estimation x  2 h~ ρ, σsW (x)1 i + h~τ , ~η i , (37) kb x − xk2 ≤ C  n  n n 1+ρi 2τi where ρ ~ = 1−ρ , ~τ = 1−ρ , and ~η = (ηi )i=1 . i i i=1 i=1 P  n d d (i) with x (i) the solutions to the b = S −1 Proof. The solution is given by the fusion process x i=1 x local problems (P1,η ). It holds bk2 = S −1 kx − x n X Pi x − i=1 n X ! ≤ C −1 d (i) x i=1 n X d (i) Pi x − x i=1 2 ≤ C −1 2 n X d (i) Pi x − x i=1 . 1 For a particular i ∈ {1, · · · , n}, we estimate the error on the subspace Wi in the `1 sense. We follow the d (i) and S ⊂ W proof techniques from [24, Section 4.3] with the adequate changes. With v := Pi x − x i i 1 the set of best si components of x supported on Wi , the ` -RP-NSP yields k(Pi v)Si k1 ≤ ρi (Pi v)Si 1 + τi kAvk2 . Combining with [24, Lemma 4.15] stating (Pi v)Si 1 d (i) ≤ Pi x 1 − kPi xk1 + (Pi v)Si 1 + 2 (Pi x)Si 1 . we arrive at (1 − ρi ) (Pi v)Si 1 d (i) k − kP xk + 2 (P x) ≤ kPi x 1 i 1 i Si 1 + τi kAvk2 . Applying once again the `1 -RP-NSP, it holds kPi vk1 = k(Pi v)Si k1 + (Pi v)Si 1 ≤ ρi (Pi v)Si ≤ (1 + ρi ) (Pi v)Si 1 + τi kAvk2 1 + ρi  d (i) k − kP xk + 2 (P x) ≤ kPi x 1 i 1 i Si 1 − ρi 1 + τi kAvk2 + (Pi v)Si  1 + 4τi kAvk2 . 1 − ρi 1 LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 19 d d d (i) = x (i) . x (i) being the optimal solution to (P We now remember Lemma 2 and notice that Pi x 1,η ), it is clear that kb xk1 ≤ kPi xk1 from what we can conclude that 1 + ρi W 4τi d (i) = kPi vk1 ≤ 2 Pi x − x σ (x)1,i + kAvk2 . 1 − ρi s 1 − ρi 1 Summing up the contributions for all i in {1, · · · , n} and applying the inverse frame operator finishes the proof.  Similarly, assuming `q -RP-NSP, one can adapt the proof techniques from [24, Theorems 4.22, 4.25] to the local problems. This yields the following result n Theorem 7. Let A ∈ Km×N and W = (Wi , Pi )i=1 a fusion frame with frame bounds 0 < C ≤ D < ∞ n and frame operator S. Let y(i) i=1 be the linear measurements y(i) = APi x + e(i) , 1 ≤ i ≤ n for d (i) the solution to the local Basis Pursuit some noise vectors e(i) such that ke(i) k2 ≤ ηi . Denote by x P d (i) . If the matrix A satisfies the `2 -RP-NSP with sparsity pattern b = S −1 problems (P ) and let x x 1,η i s = (s1 , · · · , sn ) with constants 0 < ρ1 , · · · , ρn < 1 and τ1 , · · · , τn > 0 with respect to W, then the b approximates x in the following sense: estimation x   h~τ , ~η i ρ, σsW (x)1 i 1 h~ + , 1 ≤ p ≤ 2, (38) kb x − xkp ≤ C s1−1/p s1/2−1/p   n n 2 n 3−ρ1 i) where ρ ~ = 2(1+ρ , ~ τ = τ , and ~η = (ηi )i=1 . i 1−ρi 1−ρi i=1 i=1 4.2.2. P-RIP based recovery. One can show that the P-RIP is sufficient for stable and robust recovery by combining Theorem 6 with the following result, showing the existence of random matrices satisfying the RP-NSP, from an RIP argument. m×N Theorem 8. Let A ∈ K√ be a matrix satisfying the P-RIP(2s,δ), with s = (s1 , · · · , sn ) and δ = (δ1 , · · · , δn ) and δi < 4/ 41, for all 1 ≤ i ≤ n. Then, A satisfies the `2 -RP-NSP with constants (ρi , τi )ni=1 where <1 ρi := √ δ2i 1−δi −δi /4 √ (39) i . τi := √ 1+δ 2 1−δi −δi /4 Proof. The proof of this results consists in simply applying [24, Theorem 6.13] to every subspaces independently.  From this result and Theorem 7, it follows. Theorem 9. Let W = (Wi , Pi )ni=1 be a fusion frame for KN with frame operator S and frame bounds 0 < C ≤ D < ∞. Let A ∈ Km×N be a matrix satisfying the P-RIP(2s, δ) where s = (s1 , · · · , sn ) and √ (W) can be δ = (δ1 , · · · , δn ) with δi < 4/ 41, for all 1 ≤ i ≤ n. Then any distributed-sparse vector x ∈ Σs recovered by solving n (BPDN) problems. Assuming the noise in each (BPDN) problem is controlled by ke(i) k2 ≤ ηi , 1 ≤ i ≤ n, and set Pd n (i) . Then b = S −1 x vecη = (ηi )i=1 . Let x kb x − xk2 ≤ n 1 X σsW (x)1,i αi √ + βi η i C i=1 si where αi and βi depend only on the RIP constants δi . 5. Local sparsity in general dictionaries and frames The redundancy inherent to frame structures (and their generalization to frames of subspaces) makes them appealing to signal analysis task. So far, we have used the redundancy of the fusion frame process in order to increase the global sparsity of the original vector x as well as increase the robustness to noise. We investigate now the use of local dictionaries in order to use the redundancy within subspaces, using the local frames for the representation of the partial information. A common scenario in applications is when f ∈ H has a sparse frame representation f = Dx, i.e. x is sparse, and the multiple measurements are given by y(i) = APi f + e(i) = APi Dx + e(i) , 1 ≤ i ≤ n. Here Pi can be any projection onto a subspace of H. In practical applications such as in SAR radar imaging, Pi can just be a projection or spatial filter onto Wi ≡ span{dk }k∈Ωi , where dk is the k th 20 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI column of D. Such an operation can potentially reduce the number of nonzero entries of x in the ith observation, when the respective column vectors dk are in ker Pi . In particular, let us denote by Γi ≡ {k | k 6∈ Ωi , dk ∈ Wi }, and Λi ≡ {l | dl ∈ ker Pi }. Pi f = Pi Dx = Pi ({dk }k∈Ωi , {dj }j∈Γi , {dl }l∈Λi ) x   xΩi = ({dk }k∈Ωi , {yj = Pi dj }j∈Γi , {00 s}l∈Λi )  xΓi  xΛi   xΩi = ({dk }k∈Ωi , {yl = Pi dl }l∈Γi ) xΓi = Di x(i) , where Di ≡ ({dk }k∈Ωi , {yk = Pi dk }k∈Γi ), and  x(i) ≡ xΩi xΓi  . As a result, the ith measurement becomes y(i) = ADi x(i) + e(i) , 1 ≤ i ≤ n, or y(i) = Af (i) + e(i) , f (i) = Di x(i) , 1 ≤ i ≤ n. 1 Note that the first version suggests the use of ` synthesis methods, while the second one looks at `1 analysis tools. `1 synthesis corresponds to the usual sparse recovery, via a dictionary D: min kzk0 , subject to kADz − yk2 ≤ η. z The solution fb is later computed as fb = Db x. In the `1 analysis approach, we do not care for a particular (sparse) representation of f . We just ask for this representation to have high fidelity with the data: min kD∗ gk0 , g subject to kAg − yk2 ≤ η (40) Here, D∗ denotes the canonical dual frame. Both approaches are further detailed in the next sections. We comment that if the choice of Pi is allowed, one strategy is again to use random projections by randomly selecting the index set Ωi to set the subspaces Wi = span{dj }j∈Ωi . 5.1. Recovery via general `1 -analysis method. As introduced above, we try to recover f that has a sparse representation by solving Problem (40). While the problem is written in terms of the canonical dual frame, there is no obligation in using this particular dual frame. One may instead optimize the dual frame considered and use the sparsity-inducing dual frame [30], computed as part of the optimization problem: (i) = argmin fd kD̃∗ gk s.t. kAg − y(i) k ≤ η , 1 ≤ i ≤ n. (41) ∗ g, D D̃i =I i 1 2 i The sparsity-inducing frame D̃i can be uniform across all i but not necessarily. The following result is known to hold for any dual frame [30]. Theorem 10. Let D be a general frame of RN with frame bounds 0 < A ≤ B < ∞. Let D̃ be an alternative dual frame of D with frame bounds 0 < Ã ≤ B̃ < ∞, and let ρ = s/b. Suppose that the matrix A satisfies the following D-RIP condition 2  q q (42) 1 − ρB B̃ · δs+a + ρB B̃ · δb < 1 − 2 ρB B̃ for some positive integers a and b satisfying 0 < b−a ≤ 3a. Let fb be the solution to the typical `1 -analysis problem fb = argming kD̃∗ gk1 s.t. kAg − yk2 ≤ η. Then kfb − f k2 ≤ αη + β kD̃∗ f − (D̃∗ f )si k1 √ , s (43) where α and β are some constants and (D̃∗ f )s denotes the vector consisting the s largest entries in magnitude of D̃∗ f . LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 21 (i) analyzed with the local In particular, the bound (43) applied to the local pieces of information fd ∗ frames D̃i , for 1 ≤ i ≤ n, obtained as solution to Problem (41) yields the following error bound for the Pn (i) : reconstruct signal fb = S −1 i=1 fd ! n n ∗ (i) ∗ (i) X X f ) k f − ( D̃ k D̃ s 1 i i (i) − f (i) k ≤ αη + β kfb − f k2 ≤ kS −1 k2→2 , kfd √ i 2 si i=1 i=1 P where α ≡ supi αi kS −1 k2→2 , η ≡ i ηi , and β ≡ supi βi kS −1 k2→2 √ This bound is reminiscent of the traditional bounds in CS where the (local) error decays as σs (x)1 / s except that the contributions of each subspace are added together and normalized by the norm of the inverse frame operator. 5.2. Recovery via `1 synthesis method. The gap between recovery via `1 synthesis and `1 analysis has long been studied. Interestingly, it can be shown [29] that, when using the sparsity-inducing frames described above (41), both approaches are equivalent. Denote by D̃i,o the resultant optimal dual frame and suppose that A satisfies a D-RIP property (42). Then it follows from [29] (i) − f (i) k ≤ α η + β kfd 2 i i i ∗ ∗ kD̃i,o f (i) − (D̃i,o f (i) )si k1 √ si  P n d (i) , for some positive constants αi and βi . Considering the fusion of the local information fb = S −1 i=1 f the following result holds true: Proposition 6. Let S be the invertible fusion frame operator. Suppose A satisfies condition (42). Then the fused solution fb has an error bound given by ! n ∗ ∗ X kD̃i,o f (i) − (D̃i,o f (i) )si k1 kfb − f k2 ≤ αη + β , √ si i=1 P where α ≡ supi αi kS −1 k2→2 , η ≡ i ηi , and β ≡ supi βi kS −1 k2→2 . Pn Pn Proof. Write f = S −1 Sf = S −1 i=1 Pi f = S −1 i=1 f (i) . Direct computation shows kfb − f k2 = kS −1 n X (i) − f (i) )k (fd 2 i=1 ≤ kS −1 k2→2 n X (i) − f (i) )k k(fd 2 i=1 ≤ kS −1 k2→2 n X i=1 ∗ ∗ kD̃i,o f (i) − (D̃i,o f (i) )si k1 αi ηi + βi √ si ≤ supi αi kS −1 k2→2 n X ηi i=1 n X ! + ! ∗ ∗ kD̃i,o f (i) − (D̃i,o f (i) )si k1 supi βj kS k2→2 . √ si i=1 P The result follows directly by setting α ≡ supi αi kS −1 k2→2 , η ≡ i ηi , and β ≡ supi βj kS −1 k2→2 . −1  We comment that this result is not surprising due to the equivalence between the two problems described in this section when dealing with the sparsity-inducing dual frames. 5.3. Wavelet frames and recovery of Doppler signals. This section is intended as an illustrative example and proof-of-concept of the tools developed so far. In particular, we want to show that using a fairly poor quality device, we are capable to recover a signal of fairly high complexity. For the sake of reproducible research, all the experiments presented in this section can be obtained and reproduced from of the named authors’ Github page4. In this experiment, we try to recover a noisy Doppler signal (see Fig. 7(a)) using sensors with very few measurements. To produce the Figures, we have considered a 1024 dimensional noisy Doppler signal (obtained directly via Matlab’s Wavelet toolbox). We compare a traditional `1 analysis approach, where the sparsifying 4See https://github.com/jlbouchot/FFCS for all the self implemented files. These files require, as described in the README file, to have the access to a Haar matrix function and to have CVX [26, 27] installed. 22 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI (a) Original noisy Doppler signal (b) Recovery from a distributed sensing approach – L2 error: 37.18 (c) Reconstruction with an `1 analysis method – L2 error: 82.72 Figure 7. A noisy Doppler signal ( 7(a)) and its reconstructions via a Haar wavelet frame approach 7(b) and a direct `1 analysis on the Haar system 7(c) basis is chosen as the Haar system. Similarly, we consider the Haar wavelet systems as subspaces for our fusion frame approach. Given that a signal s(t) can be decomposed as X s(t) = al (t) + dj (t) j≥l where al corresponds to the approximation coefficients at level l and dj corresponds to the details at level j. We therefore consider our projections Pj to be onto the subspaces of details Wj at each level (using the usual definition from multiresolution analysis), and a remaining low frequency approximation part. This gives us (in our setting) a grand total of n = 9 projections, 8 of which (P1 , · · · , P8 ) correspond to detail coefficients, and the last one (P0 ) corresponds to the low-frequency approximation. This system being orthogonal, it gives us the easy reconstruction formula b= x 8 X i=0 d (i) . x LOCAL SPARSITY AND RECOVERY OF FUSION FRAME STRUCTURED SIGNALS 23 All the local information are recovered with an `1 analysis procedure, where the sparsifying basis are precisely chosen to be the Haar wavelets at the appropriate levels. Finally, the sparsity is set uniformly to 25 on each subspace and a random Gaussian matrix with m = 174 rows is created and some normal noise with variance 0.05 is added to the measurement vectors, all drawn independently from one another. Fig. 7(b) shows the reconstructed signal using our `1 -analysis fusion frame approach described in the previous section, while Fig. 7(c) is the reconstructed signal obtained from a traditional `1 -analysis approach. Both of them have been reconstructed using measurements obtained from the exact same matrix. It is important to note however, that we have note tried to optimize our parameters in this example. In particular, bearing in mind that the subspaces of higher-frequency details have higher dimensions (in fact, rank(Pj ) = O(2j ), for 1 ≤ j ≤ 8), a better choice would be to set the local sparsity to be higher in these subspaces to improve our results. This level dependent-sampling is nothing new in the community and our results corroborate those from other approaches [2]. The Figures clearly show the reconstruction capabilities of our approach even with a sub-optimal setting and not making use of any kind of redundancy. Note that mostly the high frequency components of the signal are missing, which can be overcome by a better setting of the sparsity per subspace. 6. Conclusion In applications, it may be the case the the sensors limit the complexity of the signals to be recovered. However, it cannot always be guaranteed that the signals fulfill this complexity requirements. We have here proposed a novel approach combining fusion frames with local recovery for highly-complex signal recovery from cheap, low-quality sensors. Motivated by such problems, we are able to prove stable and robust recovery in a uniform setting in the set of sparsely-distributed signals. This has some interesting implications. In particular, we verify that the number of measurements required locally is inversely proportional to the number of sensors. Moreover it is empirically verified that adding more sensors can add robustness to noise; this is a consequence of the redundancy in the (fusion) frame representation. By splitting the main high-complexity, dense problems into many subproblems, we recover the local information stably, robustly, and efficiently by solving a few low-dimensional problems. Section 5 investigates redundant representations locally, by means of coherent frames. We gave results on signal recovery via the `1 synthesis and `1 analysis method, in two cases, varying in the use of the filter projection. As a last Section, we extend the traditional single-sensor compressed sensing theory to embed this novel multi-sensor framework. It gives strong mathematical foundations to the approaches presented in this paper, and reduces to the usual compressed sensing approach when dealing with a single sensor. Our work differs from that of others as we do not have a requirement on our fusion frame to be tight, albeit solving the local problems independently. This work can be further developed by integrating various sensors instead of a single one, repeated n times. Further real-world applications, for instance in SAR systems, can also be implemented. Acknowledgment R. A. is partially supported by the BSU Aspire Research Grant “Frame Theory and Modern Sampling Strategies” . J.-L. B. thanks the support of the European Research Council through the grant StG 258926 and the organizors as well as the Hausdorff Center for Mathematics for his participation in the Hausdorff Trimester Program on Mathematics of Signal Processing. S. L. is partially supported by US NSF grants USA (DMS-1313490, DMS-1010058). References [1] R. Aceska, J.-L. Bouchot, and S. Li. Fusion frames and distributed sparsity. Submitted to contemporary Mathematics, 2017. [2] Ben Adcock, Anders C. Hansen, Clarice Poon, and Bogdan Roman. Breaking the coherence barrier: A new theory for compressed sensing. In Forum of Mathematics, Sigma, vol. 5. Cambridge University Press, 2017. [3] U. Ayaz, S. Dirksen, and H. Rauhut. Uniform recovery of fusion frame structured sparse signals. Applied and Computational Harmonic Analysis, 41(2):341–361, 2016. [4] A. S. Bandeira, K. Scheinberg, and L. N. Vicente. On partial sparse recovery. arXiv preprint arXiv:1304.2809, 2013. [5] R. Baraniuk, M. Davenport, R. DeVore, and M. Wakin. A simple proof of the restricted isometry property for random matrices. Constructive Approximation, 28(3):253–263, 2008. [6] T. Blumensath and M. E. Davies. Iterative hard thresholding for compressed sensing. Applied and Computational Harmonic Analysis, 27(3):265–274, 2009. [7] J.-L. Bouchot. A generalized class of hard thresholding algorithms for sparse signal recovery. In Approximation Theory XIV: San Antonio 2013, pages 45–63. Springer, 2014. 24 ROZA ACESKA, JEAN-LUC BOUCHOT, AND SHIDONG LI [8] J.-L. Bouchot, S. Foucart, and P. Hitczenko. Hard thresholding pursuit algorithms: number of iterations. Applied and Computational Harmonic Analysis, page pp in press, 2016. [9] P. Boufounos, G. Kutyniok, and H. Rauhut. Sparse recovery from combined fusion frame measurements. Information Theory, IEEE Transactions on, 57(6):3864–3876, 2011. [10] C. Boyer, J. Bigot, and P. Weiss. Compressed sensing with structured sparsity and structured acquisition. arXiv preprint arXiv:1505.01619, 2015. [11] J. Cahill, P. Casazza, and S. Li. Non-orthogonal fusion frames and the sparsity of fusion frame operators. Journal of Fourier Analysis and Applications, 18, no. 2: 287 – 308, 2012. [12] E. J. Candès. The restricted isometry property and its implications for compressed sensing. Comptes Rendus Mathematique, 346(9):589–592, 2008. [13] P. G. Casazza and G. Kutyniok. Frames of subspaces. Contemporary Mathematics, 345:87–113, 2004. [14] P. G. Casazza, G. Kutyniok, and S. Li. Fusion frames and distributed processing. Applied and Computational Harmonic Analysis, 25:114–132, 2008. [15] Z. Chen and J. J. Dongarra. Condition numbers of Gaussian random matrices. SIAM Journal on Matrix Analysis and Applications, 27(3):603–620, 2005. [16] O. Christensen. An introduction to frames and Riesz bases. Springer Science & Business Media, 2003. [17] I. Y. Chun and B. Adcock. Compressed sensing and parallel acquisition. IEEE Transactions on Information Theory, PP(99):1–1, 2017. [18] I. G. Cumming and F. H.-c. Wong. Digital processing of Synthetic Aperture Radar Data. Artech House, 2005. [19] J. Curlander and R. McDonough. Synthetic Aperture Radar. Wiley Interscience, New York, 1991. [20] M. F. Duarte, S. Sarvotham, D. Baron, M. B. Wakin, and R. G. Baraniuk. Distributed compressed sensing of jointly sparse signals. In Asilomar Conf. Signals, Sys., Comput, pages 1537–1541, 2005. [21] Y. C. Eldar and H. Rauhut. Average case analysis of multichannel sparse recovery using convex relaxation. IEEE Transactions on Information Theory, 56(1):505–519, 2010. [22] M. Fornasier and H. Rauhut. Compressive sensing. Handbook of Mathematical Methods in Imaging, pages 187–228, 2011. [23] S. Foucart. Hard thresholding pursuit: an algorithm for compressive sensing. SIAM Journal on Numerical Analysis, 49(6):2543–2563, 2011. [24] S. Foucart and H. Rauhut. A mathematical introduction to compressive sensing. Springer, 2013. [25] G. Franceschetti and R. Lanari. Synthetic Aperture Radar Processing. CRC Press, 1999. [26] M. Grant and S. Boyd. CVX: Matlab Software for Disciplined Convex Programming, version 2.1. http://cvxr.com/cvx, 2014. [27] M. Grant and S. Boyd. Graph implementations for nonsmooth convex programs, Recent Advances in Learning and Control, Lecture Notes in Control and Information Sciences, pp 95–110, 2008. [28] R. Gribonval, H. Rauhut, K. Schnass, and P. Vandergheynst. Atoms of all channels, unite! Average case analysis of multi-channel sparse recovery using greedy algorithms. Journal of Fourier analysis and Applications, 14(5-6):655–687, 2008. [29] Y. Liu, S. Li, T. Mi, H. Lei, and W. Yu. Performance analysis of `1 -synthesis with coherent frames. In Information Theory Proceedings (ISIT), 2012 IEEE International Symposium on, pages 2042–2046. IEEE, 2012. [30] Y. Liu, T. Mi, and S. Li. Compressed sensing with general frames via optimal-dual-based-analysis. Information Theory, IEEE Transactions on, 58(7):4201–4214, 2012. [31] D. Needell and J. A. Tropp. Cosamp: Iterative signal recovery from incomplete and inaccurate samples. Applied and Computational Harmonic Analysis, 26(3):301–321, 2009. [32] H. Rauhut. Compressive sensing and structured random matrices. Theoretical foundations and numerical methods for sparse recovery, 9:1–92, 2010. [33] H. Rauhut, K. Schnass, and P. Vandergheynst. Compressed sensing and redundant dictionaries. Information Theory, IEEE Transactions on, 54(5):2210–2219, 2008. [34] M. Rudelson and R. Vershynin. Smallest singular value of a random rectangular matrix. Communications on Pure and Applied Mathematics, 62(12):1707–1739, 2009. [35] C. Zeng and S. Li. Sparse measurements and fused sar imaging. in preparation, 2015. [36] T. Zhang. Sparse recovery with orthogonal matching pursuit under rip. Information Theory, IEEE Transactions on, 57(9):6215–6221, 2011. Department of Mathematical Sciences, Ball State University E-mail address: [email protected] Chair for Mathematics C (Analysis), RWTH Aachen University E-mail address: [email protected] Department of Mathematics, San Francisco State University E-mail address: [email protected]
7cs.IT
arXiv:1312.0327v1 [math.AC] 2 Dec 2013 Monomial ideals under ideal operations∗ Jin Guo† and Tongsuo Wu‡ Department of Mathematics, Shanghai Jiaotong University Abstract. In this paper, we show for a monomial ideal I of K[x1 , x2 , . . . , xn ] that the integral closure I is a monomial ideal of Borel type (Borel-fixed, strongly stable, lexsegment, or universal lexsegment respectively), if I has the same property. We also show that the k th symbolic power I (k) of I preserves the properties of Borel type, Borel-fixed and strongly stable, and I (k) is lexsegment if I is stably lexsegment. For a monomial ideal I and a monomial prime ideal P , a new ideal J(I, P ) is studied, which also gives a clear description of the primary decomposition of I (k) . Then a new simplicial complex J △ of a √ monomial ideal J is defined, and it is shown that IJ △∨ = J. Finally, we show under an additional weak assumption that a monomial ideal is universal lexsegment if and only if its polarization is a squarefree strongly stable ideal. Key Words: Borel type monomial ideal; kth symbolic power; integral closure; polarization; universal lexsegment monomial ideal 1 Introduction Throughout the paper, K is an infinite field and let S = K[x1 , x2 , . . . , xn ] be the polynomial ring with n indeterminants over K. If an ideal I is generated by u1 , . . . , us , then we denote it by I = hu1, . . . , us i. For a monomial ideal I of S, recall that I is called strongly stable if for any monomial u in I and any i < j ≤ n, xj | u implies xi (u/xj ) ∈ I. Recall ∗ This research is supported by the National Natural Science Foundation of China (Grant No. 11271250). † [email protected] ‡ Corresponding author. [email protected] that I is called Borel-fixed, if α(u) ∈ I holds for any invertible upper n × n matrix α over K. Recall that I is called of Borel type if ∞ I : x∞ i = I : hx1 , x2 , . . . , xi i (∗) holds for every i = 1, . . . , n. It is known that each strongly stable monomial ideal is Borelfixed, and the converse holds under the additional assumption char(K) = 0. Bayer and Stillman in [3] noted that Borel-fixed ideals satisfy condition (∗). Herzog et al. in [7] gave the definition of a Borel type monomial ideal, and they proved among other things that a Borel type monomial ideal is sequentially Cohen-Macaulay, see also [10]. Furthermore, there are other two classes of strongly stable monomial ideals, namely, monomial ideals which are lexsegment or universal lexsegment, see [2] or [6]. We have the following relations for conditions on a monomial ideal: universal lexsegment=⇒lexsegment=⇒strongly stable=⇒ Borel-fixed=⇒ of Borel type. The following is the fundamental characterization of Borel type monomial ideals: Proposition 1.1. ([6, Proposition 4.2.9]) For a monomial ideal I of S, the following conditions are equivalent: (1) I is of Borel type. (2) For each monomial u ∈ I and all positive integers i, j, s with i < j ≤ n such that s xj | u, there exists an integer t ≥ 0 such that xti (u/xsj ) ∈ I. (3) Each associated prime ideal P of I has the form hx1 , x2 , . . . , xr i for some r ≤ n. In [4, Proposition 1], Mircea Cimpoeas observed that the afore mentioned property is preserved under several operations, such as sum, intersection, product, colon. For a monomial ideal I of Borel type, note that I : m∞ = I : mr holds for√r >> 0, thus the saturation I : m∞ is a monomial ideal of Borel type. The root ideal I is a prime ideal of the form hx1 , x2 , . . . , xr i, and is thus universal lexsegment. Some parts of the following proposition are well known, the others are direct to check, so we omit the verification. Proposition 1.2. Let I, J, L be monomial ideals of S. (1) If further I, J are of Borel type (strongly stable, respectively), then each of the following is a monomial ideal of Borel type ( strongly stable, respectively): I ∩ J, I + J, I : L, IJ. In particular, the saturation I : m∞ of I is of Borel type (strongly stable, respectively) if I has the same property. (2) If further I, J are Borel-fixed ideals, then each of I ∩ J, I + J, I : J, IJ is again Borel-fixed. In particular, the saturation I : m∞ of I is Borel-fixed. (3) If further I, J are lexsegment (universal lexsegment, respectively) ideals, then each of I ∩ J, I + J, I : L is again lexsegment (universal lexsegment, respectively). Let I be a Borel-fixed monomial ideal, and L a monomial ideal which need not to be Borel-fixed. The following example shows that the colon I : L may be not Borel-fixed. Example 1.3. Let K be a field with char(K) = 2, and let S = K[x1 , . . . , xn ]. If I = hx31 , x1 x22 i. It is direct to check that I is Borel-fixed. Set L = hx2 i. It is easy to see that I : L = hx31 , x1 x2 i, which is not Borel-fixed. The following example shows that IJ may be not lexsegment, even though I, J are lexsegment. Example 1.4. Let S = K[x1 , x2 , x3 ], and let I = hx31 , x21 x2 , x21 x3 , x1 x22 , x1 x2 x3 i. It is easy to see that I is lexsegment, and u = x21 x22 x23 ∈ I 2 . Note that v = x31 x33 6∈ I 2 and v >lex u, so I 2 is not lexsegment. As an application of Proposition 1.2, we now give an alternative proof to the following: Corollary 1.5. ([6, Proposition 4.3.3]) Let I ⊆ S be a monomial ideal of Borel type. Then xn , . . . , x1 is an almost regular sequence on S/I. P roof. In the proof of [6, Lemma 4.3.1], let M = S/I. Then the corresponding N (i.e., 0 :M m∞ ) is identical with (I : m∞ )/I. Note that M/N ∼ = S/(I : m∞ ) holds. If M = N, then each element of S1 is almost regular on M since M has finite length. Now assume M 6= N. Since I : m∞ is monomial of Borel type and m 6∈ Ass(M/N), as is shown in the proof of the Lemma 4.3.1, it follows by [6, Proposition 4.2.9(d)] that xn 6∈ ∪Ass(M/N), i.e., xn is in the constructed open set U and thus is almost regular on S/I. The result then follows by mathematical induction.  2 Integral Closure I Let I be any ideal of a commutative ring R. Recall from [11] that the integral closure I of an ideal I consists of all elements of R which are integral over I. Note that I is an ideal of R. For a monomial ideal I of S, I is generated by all monomials u such that uk ∈ I k holds for some k > 0. Thus the exponent set of all monomials in I is identical with the integer lattice points in the convex hull of the exponent set of all monomials in I, see [11, Proposition 1.4.6]. In this section, we will show that I is a monomial ideal of Borel type (strongly stable, Borel-fixed, lexsegment, or universal lexsegment respectively), whenever I has the same property. Theorem 2.1. Let I be a monomial ideal of S and let I be its integral closure. If I is of Borel type (strongly stable, Borel-fixed, lexsegment, or universal lexsegment respectively), then I is also monomial of Borel type (strongly stable, Borel-fixed, lexsegment, or universal lexsegment respectively). P roof. (1) Assume that I is monomial of Borel type. Then I is also monomial by [11, Proposition 1.4.2] (see also [6, Theorem 1.4.2]). In order to prove that I is of Borel type, we need only to verify that each associated prime ideal of I has the form hx1 , x2 , . . . , xj i for some 1 ≤ j ≤ n. In fact, let P ∈ Ass(I) and by [6, Corollary 1.3.10], there exists a monomial v ∈ Mon(S) \ P such that P = I : v. By [6, Theorem 1.4.2], v 6∈ I implies that v r 6∈ I r holds for all integer r. For any xm ∈ P , clearly vxm ∈ I holds, thus there exists a positive integer k such that xkm v k ∈ I k . Since I k is also monomial of Borel type and xkm | xkm v k ∈ I k holds, thus for any 1 ≤ j < m, by [6, Proposition 4.2.9(2)], there exists an integer t ≥ 0 such that xtj v k ∈ I k . t > 0 holds since v k 6∈ I k . Then xtj v k−1 ∈ I k : v ⊆ I : v = P . By the choice of v, we have v 6∈ P thus v k−1 6∈ P . Then xj ∈ P and it shows that I is of Borel type. (2) Now assume that I is strongly stable. Then for any monomial u ∈ I, there exists a positive integer k such that uk ∈ I k . If xj | u, then xkj | uk . Assume uk = w1 w2 · · · wk , P in which wi ∈ Mon(S) ∩ I. Assume further that xaj i | wi , where ki=1 ai = k and ai ≥ 0. Then for any i < j, we have xai i (w1 /xaj i ) ∈ I. Then k [xi (u/xj )] = k Y i=1 xai i (wi /xaj i ) ∈ I k , thus by [6, Theorem 1.4.2], xi (u/xj ) ∈ I holds. This shows that I is strongly stable. (3) Assume that I is Borel-fixed. Just as in (2), we assume uk = w1 w2 · · · wk ∈ I k , where wi ∈ I. Note that (α(u))k = α(uk ), it will suffice to show that α(uk ) ∈ I k for every α ∈ B, where B is the set of upper invertible n × n matrices over K. By Proposition 1.2(2), it is clear since I is Borel-fixed. (4) Assume that I is lexsegment. For each u ∈ I, there exists a positive integer Qk Q aj Qn at k k, such that uk = Let u = xai i ( i−1 l=1 ul ∈ I . j=1 xj )( t=i+1 xt ), and let v = P P Q Q aj n n n bt xbi i ( i−1 t=i at . Assume that ul = t=i bt = j=1 xj )( t=i+1 xt ) such that bi > ai and P Q Q k n i−1 alj alt ali xi ( j=1 xj )( t=i+1 xt ) for 1 ≤ l ≤ k. It is easy to see l=1 alj = kaj for 1 ≤ l ≤ n. Q In the following, we will show that there exist v1 , . . . , vk ∈ I such that v k = kl=1 vl , which Q implies v ∈ I. In fact, we can choose vl under the following rule: If nt=i+1 xat lt = 1, then Q Q alj ′ set vl = ul and vl′ = 1; If nt=i+1 xat lt 6= 1, then set vl = xai li +1 ( i−1 j=1 xj ) · vl , such that P Q Q ′ degree(vl′ ) = degree(ul ) − ij=1 alj − 1 and vl′ | nt=i xbi i / l−1 t=1 vt with the exponent of xi as small as possible. Note that ai < bi and degree(v) = degree(u), there exist a group of Q v1 , . . . , vk such that v k = kl=1 vl . (5) Assume that I is universal lexsegment. If the minimal generating set of I is Gmin (I) = {u1 , . . . , um } with u1 > u2 > · · · > um by pure lexicographic order, then Q aj −1 there exists a group of positive integers a1 , . . . , am , such that ui = xai i i−1 for each j=1 xj α 1 ≤ i ≤ m. Let C(I) be the convex hull of the set of lattice points {α | x ∈ I}. By Corollary 1.4.3 [6], I = hxα | α ∈ C(I)i. Note that the structure of ui for 1 ≤ i ≤ m, it is not hard to see that I = I. Hence I is universal lexsegment.  We remark that Theorem 2.1 (1) can also be proved in a similar way as is used in proving (2) and (3). √ It is known that I ⊆ I ⊆ I holds for every ideal of a (noetherian) ring R. Thus √ √ I = I holds. By the primary decomposition theorem (see [1, 5]), we record Proposition 2.2. For any ideal I of a noetherian ring R, Min(I) = Min(I) holds, where Min(I) is the set of all prime ideals minimal over I. In particular, a squarefree monomial ideal I of S is integrally closed. k Proposition 2.3. For a monomial ideal I of S and any integer k ≥ 1, I ⊆ I k holds. P roof. First, note that I k = h{u ∈ S | ∃ l such that ul ∈ I kl }i and k I = h{ k Y i=1 wi | ∃li , such that wili ∈ I li }i. Q k For every v = ki=1 wi ∈ I with wili ∈ I li (∀i = 1, . . . , k), let l = lcm(l1 , . . . , lk ). Then Q wil ∈ I l holds for each i = 1, . . . , k. Thus v l = ki=1 wil ∈ I kl , which implies v ∈ I k .  The converse inclusion does not hold even for squarefree monomial ideals. We include a counterexample below: Q Example 2.4. Let u = 6i=1 xi , and let I = hx1 x2 x3 , x1 x4 x5 , x2 x4 x6 , x3 x5 x6 i be a squarefree monomial ideal of S = K[x1 , x2 , x3 , x4 , x5 , x6 ], thus I = I. It is easy to 2 check u ∈ / I 2 , but u2 ∈ (I 2 )2 holds and hence u ∈ I 2 . Thus I 2 6⊆ I . 3 The k th symbolic power I (k) of an ideal I Let I be any ideal of a noetherian ring R. It follows from [5, Corllary 2.19] that Min(I) = Min(I k ) holds for all positive integer k, thus ∪ Min(I k ) = Min(I). Recall that for each k≥1 P ∈ Min(I), ker(R 7→ (R/I)P ) is the P -primary component of I, and it depends only on I and P in an irredundant primary decomposition of I. If Ik = ∩ Q(P ) P ∈Ass(I k ) is an irredundant primary decomposition of I k , then Q(P ) = ker(R → (R/I k )P ) holds for each P ∈ Min(I k ), and ∩ Q(P ) is independent of the primary decomposition P ∈M in(I k ) k of I . Recall that I (k) = ∩ ker(R → (R/I k )P ) P ∈M in(I) th is called the k symbolic power of I. By [8, Section 3], I (k) = I k : (∩P ∈Ass∗ (I)\M in(I) P )∞ , where Ass∗ (I) = ∪ Ass(I k ). Thus it follows from Proposition 1.2 that if I is monomial k≥0 of Borel type, then so is I (k) . In the following, we will give a direct and alternative proof to the fact. We need some preparations. Definition 3.1. Let B be a nonempty subset of [n]. For any monomial u = xa11 xa22 · · · xann , P aj is called the B-degree of the monomial u. An ideal I is called B-graded if fi ∈ I j∈B holds for the B-graded decomposition f = f0 + f1 + · · · + fk of each f ∈ I, where fi is the B-degree i component of f . It is easy to check the following property. Lemma 3.2. If I is a monomial ideal, then for every subset B of [n], I is B-graded. Let A be a subset of [n]. For a monomial u = xα ∈ S with α = (a1 , . . . , an ), denote α(A) = (b1 , · · · , bn ), where  b = a if i ∈ A, i i (1) bi = 0 if i ∈ [n] \ A. Denote u(A) = xα(A) . We also denote M(A) = {u(A) | u ∈ M} for any nonempty subset M of Mon(S). For a prime ideal P and an ideal I of S, denote J(I, P ) = {f ∈ S | ∃ g ∈ S \ P, such that f g ∈ I}. Note that J(I, P ) = ker(S → (S/I)P ). For a monomial ideal I, let G(I) (Gmin (I)) be its (minimal) generating set of monomials, and denote I(A) = Gmin (I)(A) for a subset A of [n]. Proposition 3.3. Let I and P be monomial ideals of S. If P is a prime ideal, then J(I, P ) is a monomial ideal. Furthermore, I(XP ) = {u(XP ) | u ∈ Gmin (I)} is a monomial generating set of J(I, P ), where XP = {i ∈ [n] | xi ∈ P }. In particular, |Gmin (J(I, P ))| ≤ |Gmin (I)|. P roof. Assume P = hxi1 , · · · , xit i and let XP = {i1 , . . . , it }. First, we will show that J(I, P ) is a monomial ideal. For any f ∈ J(I, P ) and any g ∈ S \ P such that f g ∈ I, let f = f0 + f1 + · · · + fm and g = g0 + g1 + · · · + gl be their XP -graded decompositions. Then X (f g)r = fi gj . i+j=r It follows that f0 g0 = (f g)0 ∈ I since I is a XP -graded ideal by Lemma 3.2. We will prove that Supp(f ) ⊆ J(I, P ) holds by induction on the graded component number m of f . Since Supp(f0 ) ⊆ Supp(f ), it will suffice to show that supp(f0 ) ⊆ J(I, P ) holds. For this purpose, let f0 = u1 + · · · + us and g0 = v1 + · · · + vc , where Supp(f0) = {ui | 1 ≤ i ≤ s}, Supp(g0 ) = {vj | 1 ≤ j ≤ c}, u1 < u2 < · · · < us and vj < vj+1 under a suitable monomial order. Then it follows that u1 v1 ∈ I holds since I is a monomial ideal. Note that v1 has degree 0 under the XP -grading, thus v1 6∈ P and hence u1 v1 ∈ I implies u1 ∈ J(I, P ). Since u1 v1 g0 + (u2 + · · · + us )v1 g0 = f0 g0 v1 ∈ I, it follows that (u2 + · · · + us )v1 g0 ∈ I. Note that both v1 and g0 have degree 0 under the XP -grading, so does v1 g0 . It follows by induction that Supp(f0 ) ⊆ J(I, P ) holds. This proves that J(I, P ) is a monomial ideal. For the second statement, for a monomial u ∈ I(XP ), there exists a v ∈ Gmin (I), such that u = v(XP ). Note that v(XP )v([n] \ XP ) = v ∈ I, and v([n] \ XP ) ∈ S \ P , so u = v(XP ) ∈ J(I, P ). On the other hand, if a monomial u ∈ J(I, P ), then there exists a monomial w ∈ S \ P , such that uw ∈ I. Note that u(XP ) = (uw)(XP ), there exits a monomial v ∈ Gmin (I), such that v|uw, and hence v(XP )|u(XP ). Thus J(I, P ) is generated by I(XP ). The last statement is clear.  Corollary 3.4. Let P = hxi1 , · · · , xik i with xj ∈ / P and xt ∈ P for every t < j. If a monomial ideal I is of Borel type, then for every monomial u ∈ Gmin (J(I, P )), xl ∤ u for each l ≥ j. In particular, if x1 6∈ P , then J(I, P ) = S. P roof. Let B = {1, · · · , j − 1}. It will suffice to show that for every u ∈ I, there exists a t ≥ 0, such that u(B)xtj ∈ I. But this is easy to check whenever I is of Borel type.  Note that the above conclusion is still true when I is Borel-fixed, strongly stable, lexsegment, or universal lexsegment. By Proposition 3.3 and Corollary 3.4, the following proposition can be checked directly, so we omit part of the proof. Proposition 3.5. Let P be a monomial prime ideal. If I is of Borel type (strongly stable, Borel-fixed, lexsegment, or universal lexsegment respectively), then J(I, P ) is of Borel type (strongly stable, Borel-fixed, lexsegment, or universal lexsegment respectively). P roof. We only prove the case when I is of Borel type. Let P = hxi1 , · · · , xik i with xj ∈ / P and xt ∈ P for every t < j. Denote XP = {t | xt ∈ P } and B = {1, · · · , j − 1}. Clearly, B ⊆ XP . For a monomial u ∈ Gmin (J(I, P )), by Corollary 3.4 and the definition of J(I, P ), there exists a monomial w ∈ S \ P , such that uw ∈ I and (uw)(B) = u. For every pair of m < l, if xl |u, then there exists a ≥ 0 such that xam (uw/xl ) ∈ I, since I is of Borel type. Let y = xam (uw/xl ) and note that y(XP ) = y(B) = xam (u/xl ), hence xam (u/xl ) ∈ J(I, P ).  Note that for a universal lexsegment ideal I, depth(S/I) = n − |Gmin (I)|, see [9]. By Proposition 3.5, J(I, P ) is also universal lexsegment. In order to consider the depth of S/J(I, P ), we need J(I, P ) to be a proper ideal of S. Lemma 3.6. For a monomial ideal I and a monomial prime ideal P of S, I ⊆ P holds if and only if I(XP ) generates a proper ideal of S, i.e., J(I, P ) is a proper ideal of S. P roof. If P = hxi1 , · · · , xik i and is prime over I, then for each monomial u ∈ I ⊆ P , u(XP ) 6= 1, hence hI(XP )i = 6 S. On the other hand, if a prime ideal Q does not contain I, then there exists a monomial v ∈ I \ Q, such that xj ∤ v for every j ∈ XQ . Thus v(XQ ) = 1, and hence hI(XQ )i = S. This completes the proof.  By Proposition 3.3, Proposition 3.5 and Lemma 3.6, the following corollary is direct to check, so we omit the proof. Corollary 3.7. Let I be a monomial ideal, and P a monomial prime ideal containing I. If further I is universal lexsegment, then depth(S/I) ≤ depth(S/J(I, P )) holds. Furthermore, the identity holds true if and only if {x1 , . . . , x|Gmin (I)| } ⊆ P . Now we are ready to prove the afore mentioned result: Theorem 3.8. Let I be a monomial ideal of S. If I is strongly stable (Borel-fixed, or of Borel type, respectively), then the k th symbolic power I (k) is also a monomial ideal which is strongly stable (Borel-fixed, or of Borel type, respectively). P roof. First we claim that I (k) is a monomial ideal. This can follow from the primary decomposition theorem (see e.g., [5, Theorem 3.10]), together with [6, Theorem 1.3.1 and Proposition 1.3.7]. For any P ∈ Min(I), note also that ker(R → (R/I k )P ) = J(I k , P ), thus gives a direct proof to the fact. Note that I k is strongly stable (Borel-fixed, or of Borel type, respectively), if I is strongly stable (Borel-fixed, or of Borel type, respectively). Hence for every P ∈ Min(I), ker(R → (R/I k )P ) = J(I k , P ) implies that it is strongly stable (Borel-fixed, or of Borel type, respectively) by Proposition 3.5. Thus I (k) = ∩P ∈M in(I) ker(R → (R/I k )P ) is strongly stable (Borel-fixed, or of Borel type, respectively) by Proposition 1.2.  We remark that for a lexsegment ideal I, I (k) may be not lexsegment. Example 3.9. Let S = K[x1 , x2 , x3 ], and let I = hx1 , x2 i. Clearly, I is universal lexsegment. But I (2) = I 2 = hx21 , x1 x2 , x22 i is not lexsegment. In the following, we will show that there exists a class of ideals whose symbolic powers are lexsegment. Definition 3.10. A monomial ideal I is called stably lexsegment ideal, if I k is lexsegment for each k > 0. Example 3.9 also shows that a universal lexsegment ideal may be not stably lexsegment. The following proposition shows that a stably lexsegment ideal may be not universal lexsegment. We omit the proof. Proposition 3.11. Let S = K[x1 , x2 ]. If I is a lexsegment ideal of S, then I is stably lexsegment. Even though I being lexsegment does not imply I (k) being lexsegment, we have the following conclusion. Proposition 3.12. If I is a stably lexsegment ideal of S, then I (k) is lexsegment for each positive integer k. P roof. If I is stably lexsegment, then I k is lexsegment for each positive integer k. By Proposition 3.5, for each monomial prime ideal P , J(I k , P ) is lexsegment. By Proposition 1.2, I (k) = ∩P ∈M in(I) J(I k , P ) is lexsegment.  We end this section with a general result on I (k) for an ideal I in a Noetherian ring, and will improve the result for monomial ideals in section 4. Proposition 3.13. Let I be any ideal of a noetherian ring R. For each P ∈ Min(I), let Q(P ) be the primary component of the isolated prime ideal P of I. Then (1) ∩ Q(P )k ⊆ I (k) ⊆ ∩ Q(P )(k) holds true. P ∈M in(I) k P ∈M in(I) (2) If Q(P ) is primary for each P ∈ Min(I), then I (k) = ∩ Q(P )k . P ∈M in(I) k (3) For any positive integer k, I (k) = I k if and only if Ass(I ) ⊆ Ass(I) holds. P roof. (1) Let I = ∩ Q(P ) be any irredundant primary decomposition of I. For P ∈Ass(I) any P ∈ Min(I) and any P1 ∈ Ass(I) \ {P }, there exists an element u ∈ P1 \ P . Thus um ∈ Q(P1 ) \ P holds for some m ≥ 1. Thus Q(P1 )SP = SP and hence ISP = Q(P )SP . Then I k SP = Q(P )k SP and hence Q(P )k ⊆ Ker(R → (R/I k )P ). This shows Q(P )k ⊆ I (k) . ∩ P ∈M in(I) On the other hand, for any r ∈ Ker(R → (R/I k )P ), there exists an element s 6∈ P such that sr ∈ I k . Then sr ∈ Q(P )k ⊆ Q(P )(k) . Since Q(P )(k) is P -primary, it follows that r ∈ Q(P )(k) . This shows I (k) ⊆ ∩ Q(P )(k) . P ∈M in(I) (2) This follows from (1). (3) Consider an irredundant primary decomposition Ik = ∩ Q(P ) P ∈Ass(I k ) of I k . Since Min(I) = Min(I k ) ⊆ Ass(I k ) always holds and I (k) = ∩ P ∈M in(I k ) Q(P ), it follows that I k = I (k) holds if and only if Min(I k ) = Ass(I k ), and the latter holds if and only if Ass(I k ) ⊆ Ass(I).  We remark that Min(Q(P )k ) = {P } and in fact Q(P )(k) = ker[R → (R/Q(P )k )P ], see [13, Theorem 23, page 232]. Corollary 3.14. ([6, Proposition 1.4.4]) Let I be a squarefree monomial ideal of a polynomial ring K[x1 , . . . , xn ] over a field K. Then for any k, I (k) = ∩ P k. P ∈M in(I) P roof. For a squarefree monomials ideal I, Ass(I) = Min(I) and for each P ∈ Min(I), we have Q(P ) = P = hxi1 , . . . , xir i. Then it is easy to verify that hxi1 , . . . , xir ik is P primary, and the result follows from Proposition 3.13(2).  4 A simplicial complex and a decomposition of I (k) for a monomial ideal I In this section, we will use notations established before to improve Proposition 3.13 (1) for monomial ideals. In doing so, we will define and study a new simplicial complex. For a subset A of [n], hI(A)i = S if and only if 1 ∈ Gmin (I)(A), and the latter holds if and only if there exists a monomial xα = xa11 · · · xann ∈ Gmin (I) in which ai 6= 0 implies i∈ / A. Thus if B ⊆ A and hI(A)i = S, then clearly hI(B)i = S also holds. Definition 4.1. For any monomial ideal I of S, there is the following simplicial complex I△ = {A ⊆ [n] | hI(A)i = S}. It will be called the eliminating simplicial complex of I. We remark that a simplicial complex on [n] usually contains all the singletons, but we do not assume this condition. By Lemma 3.6, it is easy to prove the following proposition. Proposition 4.2. If I is a monomial ideal of S, then Min(I) = {PB | B ∈ N (I △)}, where N (I △) consists of the minimal nonfaces of I △ and PB = h{xi | i ∈ B}i. √ In the following, we will consider about the radical ideal I of I. Note that for a √ monomial ideal u and a subset B of [n], u(B) = 1 if and only if u(B) = 1. So Lemma 3.6 implies the following well known property. √ Corollary 4.3. If I is a monomial ideal of S, then √I △ =I △. In particular, Min( I) = Min(I). Let J be a monomial ideal of S. Recall from [12, 6] that the Stanley-Reisner ideal of the simplicial complex J △ is the ideal IJ △ of S, which is generated by the squarefree Q monomials xB = i∈B xi with B ∈ / J △. The Alexander dual of J △, denoted by J △∨ , is defined by J △∨ = {[n] \ B | B ∈ / J △}. It is easy to see that for a subset B of [n], B ∈ N (J △) if and only if [n] \ B ∈ F (J △∨ ). We have the following observation. √ Proposition 4.4. If J is a monomial ideal of S, then IJ △∨ = J. In particular, if J is a squarefree monomial ideal, then IJ △∨ = J. √ √ P roof. Note that J is squarefree, so J = ∩P ∈M in(√J) P = ∩P ∈M in(J) P by Corollary 4.3. By Proposition 4.2, Min(J) = {PB | B ∈ N (J △)}. Hence the standard primary decomposition of IJ △∨ is √ ∩ ∨ P[n]\B = ∩ PA = ∩ P = J. IJ △ ∨ = B∈F (J △ ) A∈N (J △) P ∈M in(J) Note that √ J = J while J is squarefree, so the second part is clear.  For a monomial u = xα with α = (a1 , · · · , an ), denote A(u) = {i | ai 6= 0}. In the following, we will show that the inclusions appeared in Proposition 3.13(1) are actually equalities for a monomial ideal I of S. For this purpose, we need the following Lemmas. Lemma 4.5. Let I be a monomial ideal of S, and B a subset of [n]. If A(u) ⊆ B ⊆ [n] holds for each u ∈ Gmin (I), then J(I, PB ) = I. P roof. By Proposition 3.3, J(I, PB ) = hI(B)i holds. Note also that for each u ∈ Gmin (I), A(u) ⊆ B holds by assumption, hence u(B) = u holds for every u ∈ Gmin (I). This is equivalent to saying that J(I, PB ) = I.  Q In the following lemma, let Gk = { ki=1 ui | ui ∈ G} and set Gk (B) = (Gk )(B). Lemma 4.6. Let G be a set of monomials of S, and Let B be a subset of [n]. Then for any positive integer k, the identity hG(B)ik = hGk (B)i holds. In particular, hGk (B)i = S holds if and only if hG(B)i = S. P roof. Clearly, we only need to prove the first statement. By definition, both hG(B)ik and hGk (B)i are monomial ideals of S. On the one hand, for every monomial u ∈ hG(B)ik , Q there exists u1 , · · · , uk ∈ G, such that ki=1 ui (B) | u. Note that k Y ui (B) = ( i=1 k Y ui )(B), i=1 k Y i=1 u i ∈ Gk , hold, hence u ∈ hGk (B)i. This shows hG(B)ik ⊆ hGk (B)i. The other inclusion follows from a similar argument.  The following result improved Proposition 3.13 (1) for a monomial ideal I of S. It also follows from [8, Lemma 3.1]. Below we include a direct and detailed proof. Theorem 4.7. If I is a monomial ideal of S, then for any positive integer k, the k th symbolic power is I (k) = ∩ J(I k , PB ). B∈N (I △) Furthermore, J(I, PB )k = J(I, PB )(k) holds for each B ∈ N (I △) and thus I (k) = ∩ B∈N (I △) J(I, PB )k = ∩ [ker(S → (S/I)P )]k P ∈M in(I) holds. P roof. The first equality follows from Proposition 4.2 and the definition of I (k) . For the remaining equalities, use Proposition 4.2 again to have Min(I) = {PB | B ∈ N (I △)}. So, the k th symbolic power of I is nothing but I (k) = ∩ B∈N (I △) J(I k , PB ). Note that both I = hG(I)i and I k = h{G(I)}k i clearly holds, so that J(I k , PB ) = h{G(I)}k (B)i = h{G(I)(B)}k i = J(I, PB )k also holds by Lemma 4.6. This shows I (k) = ∩ B∈N (I △) J(I, PB )k . For the remaining statement, note that J(I, PB ) is PB -primary with Min(J(I, PB )) = {PB }. Hence J(I, PB )(k) = ∩ J(J(I, PB )k , Q) = J(J(I, PB )k , PB ) Q∈M in(J(I,PB )) holds. Finally, note that A(u) ⊆ B holds for every u ∈ Gmin J(I, PB ), it follows that J(J(I, PB )k , PB ) = J(I, PB )k , and hence J(I, PB )(k) = J(I, PB )k holds. This completes the proof.  In the end, we include an example to illustrate Theorem 4.7: Example 4.8. Let I = hx21 x23 , x1 x2 x23 i. The irredundant primary decomposition of I is I = hx21 , x2 i∩hx1 i∩hx23 i. Hence Ass(I) = {hx1 i, hx1 , x2 i, hx3 i} and Min(I) = {hx1 i, hx3 i}. It is easy to check that for each k ≥ 1, k 2k k k+i k−i+1 I k = h{x1k+i x2k−i x2k i). 3 | i = 0, 1, . . . , k}i = hx1 i ∩ hx3 i ∩ (∩i=1 hx1 , x2 Hence k 2 k I (k) = hxk1 i ∩ hx2k 3 i = hx1 i ∩ hx3 i = ∩ J(I, P )k . P ∈M in(I) It is also clear that ∩ J(I, P )(k) = hx1 i(k) ∩ hx23 i(k) = hx1 ik ∩ hx23 ik = I (k) . P ∈M in(I) 5 Polarization of universal lexsegment monomial ideal Let I be a monomial ideal of S, and let < be a monomial order on S = K[x1 , . . . , xn ], such that xn < xn−1 < · · · < x1 . Let Gmin (I) = {u1, . . . , um } be the minimal generating Q a set of I, where ui = nj=1 xj ij for i = 1, . . . , m. Let ai = max{a1i , . . . , ami }. Recall that the polarization of I is a squarefree monomial ideal T (I) = hv1 , . . . , vm i, where vi = aij n Y Y j=1 k=1 xjk for i = 1, . . . , m. Let ≺ be a monomial order on T = K[x11 , . . . , x1a1 , . . . , . . . , xn1 , . . . , xnan ] such that xij ≺ xkl if i > k or if i = k, j > l. If choose < and ≺ to be the same kind of monomial order(e.g., lexicographic order, pure lexicographic order or reverse lexicographic order), which satisfies the above convention, then the polarizing process is order-preserving, i.e., for each pair of u, v ∈ I, u < v if and only if T (u) ≺ T (v). Polarization is a powerful tool for studying quite a few important homological and combinatorial invariants, see, e.g., [6, Corollary 1.6.3]. But unfortunately, the property of being Borel type can not be kept in almost all cases after the process of polarization, as the following example shows: Example 5.1. Consider the strongly stable monomial ideal I = hx31 , x21 x2 , x1 x22 i. After polarization, it becomes J = hx11 x12 x13 , x11 x12 x21 , x11 x21 x22 i. Since J is monomial and homogeneous, it is clear that J is not a Borel type monomial ideal under any monomial order. Theorem 5.2. Let I be a monomial ideal with Gmin (I) = {u1 , . . . , um }, where ui = Qn aij and u1 > u2 > · · · > um by pure lexicographic order. Let j=1 xj aj = max{a1j , . . . , amj } for j = 1, . . . , n. Then the following statement are equivalent. (1) I is universal lexsegment; Q aj −1 for i = 1, . . . , m; (2) ui = xai i i−1 j=1 xj Q bm(u) b (3) xi (u/xm(u) ) ∈ I holds for each u = nj=1 xjj ∈ I and each i < m(u); Q b b (4) For any monomial u = nj=1 xjj ∈ I, xi (u/xjj ) ∈ I holds for each pair 0 ≤ i < j ≤ n with bj > 0. P roof. (1) ⇔ (2) is well known (see [9]), and (2) ⇒ (3) is clear. Q (3) ⇒ (4): For any monomial u = nk=1 xbkk ∈ I and each pair 0 ≤ i < j ≤ n with Qm(u)−1 Q bm(u) bj > 0, xm(u)−1 k=1 xbkk = xm(u)−1 (u/xm(u) ) ∈ I by (3). By induction, xj jk=1 xbkk ∈ I. Qj−1 bk Qj−1 bk b b xk | xi (u/xjj ), xi (u/xjj ) ∈ I. xk ∈ I. Note that xi k=1 By (3) again, xi k=1 Qk−1 aj −1 xj and (4) ⇒ (2): It will suffice to show that for each 1 ≤ k ≤ m, uk = xakk j=1 aik = ak −1 for each k +1 ≤ i ≤ m. We will prove it by induction. It is clear that u1 = xa11 under the condition (4), and it is easy to see that ai = 0 implies that aj = 0 for each j > i. Note that u1 > u2 > · · · > um by pure lexicographic order. Hence we can assume u2 = xa121 xa222 with a21 < a1 and a22 > 0. Note that x1a21 +1 ∈ I, so a21 = a1 −1. In a similar way, we get ai1 = a1 − 1 for every i = 2, . . . , m. Now assume that the conclusion holds Qk−1 aj −1 true for all the integers less than k, and we are going to show that uk = xakk j=1 xj and aik = ak − 1 holds for each k + 1 ≤ i ≤ m. By inductive assumption, ui = ( k−1 Y a −1 xj j )( j=1 m Y a xj ij ) j=k holds for each k ≤ i ≤ m. If assume to the contrary that aik < ak − 1 holds for some i, Qk−1 aj −1 xj ) ∈ I. By the definition of ak , there exists an integer t ≥ k then w = xkaik +1 ( j=1 ak such that xk | ut holds. Hence w properly divides ut , contradicting ut ∈ Gmin (I). Hence either aik = ak − 1 or aik = ak holds for each k ≤ i ≤ m. Note that uk > uk+1 > · · · > um , Qk−1 aj −1 it is easy to check uk = xakk j=1 xj , and that aik = ak −1 holds for each k + 1 ≤ i ≤ m. This completes the verification.  Remark 5.3. Note that (3), as an equivalent description of universal lexsegment ideal, explores the difference between universal lexsegment ideal, strongly stable ideal and the monomial ideal of Borel type. Actually, a universal lexsegment monomial ideal is a kind of super-stable monomial ideal. If I is a universal lexsegment ideal of S = K[x1 , . . . , xn ] with the minimal generating set Gmin (I), it is clear that |Gmin (I)| ≤ n. We call a universal lexsegment ideal to be full, if |Gmin (I)| = n. In the following, we will consider about the polarization of some class of monomial ideals with respect to <, and characterize the monomial ideals which become squarefree strongly stable with respect to ≺ after polarization. Recall that a squarefree monomial ideal I is called squarefree strongly stable, if for each squarefree monomial u ∈ I and each pair j < i such that xi | u but xj ∤ u, one has xj (u/xi ) ∈ I (see [2] or [6, page 124]). Theorem 5.4. Let I be a monomial ideal with Gmin (I) = {u1 , . . . , um }, where ui = Qn aij and u1 > u2 > · · · > um by pure lexicographic order. Let j=1 xj aj = max{a1j , . . . , amj } for j = 1, . . . , n. Then T (I) is squarefree strongly stable, if I is universal lexsegment. Further more, if aj 6= 1 holds for each j = 1, . . . , n, and for each 1 ≤ j < m, there exists an integer i such that 0 < aij < aj , then T (I) is squarefree strongly stable if and only if I is universal lexsegment. P roof. If I is universal lexsegment, then uk = xakk T (uk ) = ( j −1 k−1 Y aY i=1 j=1 Qk−1 xij )( j=1 ak Y j=1 a −1 xj j xkj ). for k = 1, . . . , m. Hence In the case, it is direct to check that T (I) is squarefree strongly stable. This complete the proof of the first statement. For the second statement, we only need to prove the necessity part. It is easy to see that u1 = xa11 . We claim that ai1 = a1 − 1 for every i = 2, . . . , m. In fact, if there exists some ut such that at1 < a1 − 1, then consider ati at1 n Y Y Y T (ut ) = ( x1j )( xij ) ∈ T (I). j=1 i=2 j=1 Since T (I) is squarefree strongly stable, it follows that v = x1,at1 +1 (T (ut )/x21 ) ∈ T (I) holds. Note that for each generating element u of T (I), if xij |u, then xi,j−1 |u, . . . , xi,1 |u Q t2 hold. Hence v ∈ T (I) implies v1 = x1,at1 +1 (T (ut)/ aj=1 x2j ) ∈ T (I). Note that for any j, x2j ∤ v1 , thus x2,a2 (v1 /x31 ) ∈ T (I) whenever x31 | v1. Repeat the discussion above, it Q t3 Q t3 follows that x2,a2 (v1 / aj=1 x3j ) ∈ T (I), and hence v1 / aj=1 x3j ∈ T (I) holds since a2 > 1. Qat1 +1 By induction, we have j=1 x1j ∈ T (I), contradicting T (u1 ) ∈ Gmin (T (I)). Hence at1 = a1 − 1 holds for each t = 2, . . . , m. Finally, repeat a discussion used in proving (4) ⇒ (2) of theorem 5.2, the result follows by induction.  Now assume that aj 6= 1 holds for each j = 1, . . . , n. If there exists some j with aj > 1, such that either aij = 0 or aij = aj for each i = 1, . . . , m, then the situation will be a little more complicated than the case in Theorem 5.4. In this case, let WI = {j | aj 6= 0}, and let AI = {j ∈ WI | either aij = aj or aij = 0 for each i = 1, . . . , m}, and let BI = WI \ AI . Note that if T (I) is squarefree strongly stable, then WI = [r] holds for some r ≤ n. In this case, we can decompose AI into several mutually disjoint subsets consisting of successive integers, and denote AI = ∪kt=1 At where At = {j ∈ Z+ | mt−1 + 1 ≤ j ≤ lt }. Similarly, let BI = ∪kt=1 Bt , where Bt = {j ∈ Z+ | lt + 1 ≤ j ≤ mt }. For each j ∈ AI , either aij = 0 or aij = aj holds for any i = 1, . . . , m. Consider the following two cases: If aij = 0, we claim that it implies ai,j+1 = ai,j+2 = · · · = ain = 0. In fact, if ait > 0 for some t > j, then T (ui ) ∈ T (I) holds with xt1 | T (ui ). Since T (I) is squarefree strongly stable, xj,aj (T (ui )/xt1 ) ∈ T (I) holds. Note also that aj > 0 holds, thus it implies T (ui )/xt1 ∈ T (I), contradicting ui ∈ Gmin (I). On the other hand, if aij = aj Qaj holds, then the polarization of ui contains t=1 xjt as its factor, which contains all the indeterminants related to xj . Note that in each case, essentially there is little change in the problem we are working with. Due to this reason, the following proposition is routine to check, and we omit the detailed proof. Proposition 5.5. If aj 6= 1 for each j = 1, . . . , n, then T (I) is squarefree strongly stable Q P ′ if and only if I = ki=1 (Li Mi i−1 j=1 (Lj Mj )), where Lj = h lj Y t=mj−1 +1 xat t i, ′ Mj = h mj Y t=lj +1 xat t −1 i, for every j = 1, . . . , k, and Mj is a monomial ideal of S generated by a full universal lexsegment ideal in the polynomial ring K[xlj +1 , xlj +2 , . . . , xmj ], where 0 = m0 < l1 ≤ m1 < l2 ≤ m2 < · · · < lk ≤ mk ≤ n. Remark 5.6. In Proposition 5.5, the equality I= k X i=1 (Li Mi i−1 Y ′ (Lj Mj )) j=1 can be interpreted in the following: A universal lexsegment ideal on BI is cut into several parts by some principal ideals with respect to AI . Note also that the equivalence description would be rather complicated without the assumption aj 6= 1 for each j = 1, . . . , n, because it will be some universal lexsegment ideals, squarefree strongly stable ideals being cut into several parts by some principal ideals. Example 5.7. Let I = hx31 , x21 x2 x3 , x21 x2 x4 , x21 x2 x35 x36 , x21 x2 x35 x26 x27 , x21 x2 x35 x26 x7 x28 i. It is easy to see that T (I) is squarefree strongly stable. By computation, a1 = 3, a2 = 1, a3 = 1, a4 = 1, a5 = 3, a6 = 3, a7 = 2, a8 = 2. An explanation is that T (I) is going to be divided approximately into several parts: for x1 , it is universal lexsegment; for x2 , x3 , x4 , it is squarefree strongly stable; for x5 , it is a principal ideal; for x6 , x7 , x8 , again it is universal lexsegment. Definition 5.8. Let I be a monomial ideal, and let Gmin (I) = {u1 , . . . , um } with ui = Qn aij for i = 1, . . . , m. The vector (a1 , a2 , . . . , an ) is called the exponent vector of I, j=1 xj where ai = max{a1i , . . . , ami }. For a squarefree monomial ideal J ⊆ K[x11 , . . . , x1τ1 , . . . , . . . , xn1 , . . . , xnτn ], the vector (b1 , b2 , . . . , bn ) is called the extension vector of J, where bi = max{j | ∃ u ∈ Gmin (J) such that xij | u}. By definition, the following Proposition is clear. Proposition 5.9. For any monomial ideal I, The exponent vector of I is equal to the extension vector of T (I). Proposition 5.10. Let J be a polarization of some monomial ideal of S, with the extension vector (b1 , . . . , bn ). If J is squarefree strongly stable and bi 6= 1 for each i = 1, . . . , n, then the number of monomial I such that T (I) = J is 2t , where t = |WI |. P roof. By Proposition 5.5, I is uniquely determined by the exponent vector (a1 , . . . , an ) and the set AI . By Proposition 5.9, (a1 , . . . , an ) = (b1 , . . . , bn ) is a constant vector. Hence I is completely determined by the set AI . Note that AI could be any subset of WI , so the number of I such that T (I) = J is 2t , where t = |WI |.  References [1] M.F. Atiyah and I.G. MacDonald, Introduction to Commutative Algebra, AddisonWesley, Reading, MA, 1969. [2] A. Aramova, J. Herzog and T. Hibi, Squarefree lexsegment ideals, Math. Z. 228(1998), 353 − 378. [3] D. Bayer and M.A. Stillman, A criterion for detecting m-regularity. Invent. Math 87(1987), 1 − 11. [4] Mircea Cimpoeas, Some remarks on Borel type ideals, Commu. Algebra 37 : 2(2009), 724 − 727. [5] D. Eisenbud, Commutative Algebra with a View Toward Algebraic Geometry. Springer Science + Business Media, Inc, 2004. [6] J. Herzog and T. Hibi, Monomial Ideals. Springer-Verlag London Limited, 2011. [7] J. Herzog, D. Popescu and M. Vladoiu, On the Ext-Modules of ideals of Borel type, Contemporary Math. 331(2003), 171 − 186. [8] J. Herzog, T. Hibi and N. V. Trung, Symbolic powers of monomial ideals and vertex cover algebras, Advances in Mathematics 210(2007), 304C322. [9] S. Murai and T. Hibi, The depth of an ideal with a given Hilbert function, Proc. of AMS, 136 : 5(2008), 1533 − 1538. [10] D. Popescu, Extremal Betti Numbers and regularity of Borel type ideals, Bull. Math. Soc. Sc. Math. Roumanie, 48(96) : 1(2005), 65 − 72. [11] I. Swanson and C. Huneke, Integral Closures of Ideals, Rings and Modules. Cambridge University Press, 2006. [12] R. H. Villarreal, Monomial Algebra. Marcel Dekker, Inc, New York, 2001. [13] O. Zariski and P. Samuel, Commutative Algebra. Vol.1 Reprints of the 1958 − 60 edition. Springer-Verlag New York, 1979.
0math.AC
arXiv:1606.01402v2 [math.GR] 12 Jun 2016 FINITE ALMOST SIMPLE GROUPS WHOSE GRUENBERG–KEGEL GRAPHS COINCIDE WITH GRUENBERG–KEGEL GRAPHS OF SOLVABLE GROUPS (in Russian, English abstract) I. B. Gorshkov1, N. V. Maslova1,2 1 Krasovskii Institute of Mathematics and Mechanics UB RAS, 2 Ural Federal University [email protected], [email protected] Abstract. Let G be a finite group. Denote by π(G) the set of all prime divisors of the order of G and by ω(G) the spectrum of G, i.e. the set of all its element orders. The set ω(G) defines the Gruenberg–Kegel graph (or the prime graph) Γ(G) of G; in this graph the vertex set is π(G) and different vertices p and q are adjacent if and only if pq ∈ ω(G). In [J. Group Theory. Vol. 2, no. 2 (1999). P. 157–172] Lucido proved that if G is a finite solvable group then Γ(G) does not contain a 3-coclique. In [J. Algebra. Vol. 442 (2015). P. 397–422] Gruber et. al. proved that a graph is isomorphic to the Gruenberg–Kegel graph of a finite solvable group if and only if its complement is 3-colorable and triangle free. In [Proc. Steklov Inst. Math. Vol. 283, suppl. 1 (2013). P. 139–145] Zinov’eva and Mazurov described finite simple groups whose Gruenberg–Kegel graphs coincide with Gruenberg–Kegel graphs of Frobenius groups or 2-Frobenius groups. It is not difficult to prove these simple groups are exactly all finite simple groups whose Gruenberg–Kegel graphs coincide with Gruenberg–Kegel graphs of finite solvable groups. Our aim is to obtain similar results for finite almost simple groups. In this paper, we prove the following theorem. Theorem 1. Let G be a finite almost simple group. Then the following conditions are equivalent: (1) Γ(G) does not contain a 3-coclique; (2) Γ(G) is isomorphic to the Gruenberg–Kegel graph of a finite solvable group; (3) Γ(G) is equal to the Gruenberg–Kegel graph of an appropriate finite solvable group. The following question naturally arises: is there a graph Γ without 3-cocliques such that the complement of Γ is not 3-colorable and Γ is isomorphic to the Gruenberg–Kegel graph of an appropriate finite non-solvable group? Moreover, we obtain an explicit description of finite almost simple groups whose Gruenberg–Kegel graphs coincide with Gruenberg–Kegel graphs of finite solvable groups. We prove the following theorem. Theorem 2. Let G be a finite almost simple group such that S = Soc(G) is isomorphic to one of the following simple groups: An , where n ≥ 5; P SLn (q), where n ≥ 2 and (n, q) 6= (2, 2), (2, 3); P SUn (q), where n ≥ 3 and (n, q) 6= (3, 2); P Spn (q), where n ≥ 4 is even; P Ωn (q), where n ≥ 7 is odd; P Ω± n (q), where n ≥ 8 is even; an exceptional group of Lie type over the field of order q; a sporadic simple group. Let f be the standard field automorphism of S and g be the standard graph automorphism of S. Then Γ(G) does not contain a 3-coclique if and only if π(G) = π(S) and one of the following conditions holds: 3 (1) S is isomorphic to one of the following groups: A9 , A10 , A12 , P SU3 (9), P SU4 (2), P Sp6 (2), P Ω+ 8 (2), D4 (2); (2) G is isomorphic to one of the following groups: S5 , S6 , P GL2 (9), M10 , Aut(A6 ), S8 , Aut(P SL2 (8)), Aut(P SL3 (2)), P GL3 (4)hf i, P GL3 (4)hgi, Aut(P SL3 (4)), P SL4 (4)hf i, P SL4 (4)hgi, Aut(P SL4 (4)), Aut(P SU5 (2)); (3) G ∼ = P GL2 (p), where p is either a Fermat prime or a Mersenne prime; (4) S ∼ = P SL2 (2m ), where m ≥ 4 is even and {2} ⊆ π(G/S); (5) S ∼ = P SL3 (p), where p is a Mersenne prime and (p − 1)3 6= 3; (6) S ∼ = P SL3 (p), where p is either a Fermat prime or a Mersenne prime, (p − 1)3 = 3 and Inndiag(S) ≤ G ≤ Aut(S); (7) S ∼ = P SL3 (2m ), where m ≥ 3, (2m − 1)3 = 3 and Inndiag(S)hgi ≤ G ≤ Aut(P SL3 (2m )); (8) S ∼ = P SL3 (2m ), where m ≥ 3, (2m − 1)3 6= 3 and Shgi ≤ G ≤ Aut(P SL3 (2m )); (9) S ∼ = P SL4 (2m ), where m ≥ 3 and Shgi ≤ G ≤ Aut(P SL4 (2m )); (10) S ∼ = P SU3 (p), where p is a Fermat prime and (p + 1)3 6= 3; (11) S ∼ = P SU3 (p), where p is a Fermat prime, (p + 1)3 = 3 and Inndiag(S) ≤ G ≤ Aut(S); (12) S ∼ = P SU3 (2m ), where m ≥ 2, (2m − 1)3 = 3, {2} ⊆ π(G/S) and Inndiag(S) ≤ G ≤ Aut(S); (13) S ∼ = P SU3 (2m ), where m ≥ 2, (2m − 1)3 6= 3 and {2} ⊆ π(G/S); (14) S ∼ = P SU4 (2m ), where m ≥ 2 and {2} ⊆ π(G/S); ∼ (15) S = P Sp4 (q). Keywords: finite group, solvable group, almost simple group, Gruenberg–Kegel graph (prime graph). The work is supported by the grant of the President of the Russian Federation for young scientists (grant no. MK-6118.2016.1), by the Integrated Program for Fundamental Research of the Ural Branch of the Russian Academy of Sciences (project no. 15-16-1-5), by the Program for State Support of Leading Universities of the Russian Federation (agreement no. 02.A03.21.0006 of August 27, 2013). The first author is supported by the grant FAPESP-2014/08964-1. The second author is a winner of the competition of young mathematicians of the Dmitry Zimin Foundation “Dynasty” (in 2013 year). 1 Введение Мы будем употреблять термин «группа» в значении «конечная группа» и термин «граф» в значении «конечный граф без петель и кратных ребер». Спектром группы G называется множество ω(G) порядков всех ее элементов. Множество всех простых чисел, входящих в спектр группы G, называется простым спектром группы G и обозначается через π(G). Спектр ω(G) определяет граф Грюнберга–Кегеля (или граф простых чисел) Γ(G) группы G, вершинами которого являются простые числа из π(G), и две различные вершины r и s смежны тогда и только тогда, когда число rs принадлежит множеству ω(G). Обозначим через t(G) наибольшее число простых чисел в π(G), попарно не смежных в Γ(G). Напомним, что под равенством графов Грюнберга–Кегеля групп мы понимаем совпадение их множеств вершин (то есть простых спектров групп) и множеств ребер. Под изоморфизмом графов Грюнберга–Кегеля групп мы понимаем их изоморфизм как абстрактных графов. В [1, теорема 1]* было замечено, что графы Грюнберга–Кегеля разрешимых групп не содержат 3-коклик, иными словами t(H) ≤ 2 для любой разрешимой группы H. В [2] было показано, что граф изоморфен графу Грюнберга–Кегеля разрешимой группы тогда и только тогда, когда он не содержит 3-коклик и его дополнение 3-раскрашиваемо. В [3, теоремы 1, 3] описаны простые группы, графы Грюнберга–Кегеля которых равны графам Грюнберга–Кегеля разрешимых групп Фробениуса и двойных групп Фробениуса. Из [4, таблицы 2,3] и [5, таблицы 2, 3, 4] следует, что группами из [3, теоремы 1, 3] исчерпываются все простые группы, графы Грюнберга–Кегеля которых равны графам Грюнберга–Кегеля разрешимых групп. Цель настоящей работы — получить подобное описание для почти простых групп. Нами доказана следующая ТЕОРЕМА 1. Пусть G — почти простая группа. Тогда следующие условия эквивалентны: (1) Γ(G) не содержит 3-коклик; (2) Γ(G) изоморфен графу Грюнберга–Кегеля некоторой разрешимой группы; (3) Γ(G) равен графу Грюнберга–Кегеля некоторой разрешимой группы. Естественным образом возникает следующий ВОПРОС. Существует ли граф без 3-коклик, который изоморфен графу Грюнберга–Кегеля некоторой неразрешимой группы, и не изоморфен графу Грюнберга–Кегеля никакой разрешимой группы? Напомним, что через Soc(G) обозначается цоколь группы G (подгруппа, порожденная всеми ее минимальными неединичными нормальными подгруппами). Пусть q = pm и G — почти простая группа такая, что подгруппа S = Soc(G) изоморфна одной из простых групп: An , где n ≥ 5; P SLn (q), где n ≥ 2 и (n, q) 6= (2, 2), (2, 3); P SUn (q), где n ≥ 3 и (n, q) 6= (3, 2); P Spn (q), где n ≥ 4 четно; P Ωn (q), где n ≥ 7 нечетно; P Ω± n (q), где n ≥ 8 четно; простой исключительной группе лиева типа над полем порядка q или одной из конечных простых спорадических групп. Необходимые сведения о строении групп автоморфизмов конечных простых линейных и унитарных групп приведены далее в леммах 5 и 6. Ключевым для доказательства теоремы 1 является следующий полученный нами результат, имеющий независимый интерес. ТЕОРЕМА 2. Пусть G — почти простая группа и S = Soc(G). Тогда Γ(G) не содержит 3коклик тогда и только тогда, когда выполняется одно из следующих утверждений: (1) группа S изоморфна одной из следующих групп: A9 , A10 , A12 , P SU3 (9), P SU4 (2), P Sp6 (2), 3 P Ω+ 8 (2), D4 (2); (2) группа G изоморфна одной из следующих групп: S5 , S6 , P GL2 (9), M10 , Aut(A6 ), S8 , Aut(P SL2 (8)), Aut(P SL3 (2)), P GL3 (4)hf i, P GL3 (4)hgi, Aut(P SL3 (4)), P SL4 (4)hf i, P SL4 (4)hgi, Aut(P SL4 (4)), Aut(P SU5 (2)); (3) G ∼ = P GL2 (p), p — простое число Ферма или Мерсена; (4) S ∼ = P SL2 (2m ), m ≥ 4 четно и {2} ⊆ π(G/S) ⊆ π(S); (5) S ∼ = P SL3 (p), p — простое число Мерсена и (p − 1)3 6= 3; (6) S ∼ = P SL3 (p), p — простое число Мерсена, (p − 1)3 = 3 и Inndiag(S) ≤ G ≤ Aut(S); (7) S ∼ = P SL3 (2m ), m ≥ 3, (2m − 1)3 = 3, π(G) = π(S) и Inndiag(S)hgi ≤ G ≤ Aut(S); ∼ (8) S = P SL3 (2m ), m ≥ 3, (2m − 1)3 6= 3, π(G) = π(S) и Shgi ≤ G ≤ Aut(S); *Настоящий результат был получен М.С. Лучидо в 1999 г., однако он напрямую следует из более ранних результатов Г. Хигмана [6, теорема 1] и Ф. Холла [7, теорема 6.4.1]. 2 (9) S ∼ = P SL4 (2m ), m ≥ 3, π(G) = π(S) и Shgi ≤ G ≤ Aut(S); (10) S ∼ = P SU3 (p), p — простое число Ферма и (p + 1)3 6= 3; (11) S ∼ = P SU3 (p), p — простое число Ферма, (p + 1)3 = 3 и Inndiag(S) ≤ G ≤ Aut(S); (12) S ∼ = P SU3 (2m ), m ≥ 2, (2m − 1)3 = 3, {2} ⊆ π(G/S) ⊆ π(S) и Inndiag(S) ≤ G ≤ Aut(S); (13) S ∼ = P SU3 (2m ), m ≥ 2, (2m − 1)3 6= 3 и {2} ⊆ π(G/S) ⊆ π(S); ∼ (14) S = P SU4 (2m ), m ≥ 2 и {2} ⊆ π(G/S) ⊆ π(S); (15) S ∼ = P Sp4 (q) и π(G) = π(S). ЗАМЕЧАНИЕ. Если G — почти простая группа такая, что Γ(G) не сдержит 3-коклик, то π(G) = π(Soc(G)). Вспомогательные результаты Наши обозначения и терминология в основном стандартны, их можно найти в [7, 8, 9, 10]. Если q — натуральное число, r — нечётное простое число и (q, r) = 1, то e(r, q) обозначает мультипликативный порядок числа q по модулю r, равный минимальному натуральному числу m, удовлетворяющему условию q m ≡ 1 (mod r). Для нечётного q положим e(2, q) = 1, если q ≡ 1 (mod 4), и e(2, q) = 2 в противном случае. ЛЕММА 1. (следствие теоремы Жигмонди, [11]) Пусть q — натуральное число, большее 1. Для любого натурального числа m существует простое число r, удовлетворяющее равенству e(r, q) = m, за исключением следующих случаев: q = 2 и m = 1; q = 3 и m = 1; q = 2 и m = 6. Простое число r, удовлетворяющее условию e(r, q) = m, называется примитивным простым делителем числа q m − 1. По лемме 1 такое число существует, за исключением случаев, упомянутых в лемме. Для данного q обозначим через Rm (q) множество всех примитивных простых делителей числа q m − 1. Легко понять, что Ri (q) ∩ Rj (q) = ∅ при любых различных i и j, и если q — степень простого числа, то Ri (q) ∩ π(q) = ∅ для любого i. ЛЕММА 2 (лемма Героно [12]). Пусть p, q — простые числа такие, что pa − q b = 1 для некоторых натуральных чисел a, b. Тогда пара (pa , q b ) равна (32 , 23 ), (p, 2b ) или (2a , q). ЛЕММА 3. Пусть π — конечное множество простых чисел и Γ — граф, вершинами которого являются простые числа из π. Если π = π1 ∪ π2 , причем π1 и π2 — непересекающиеся клики в Γ, то существует разрешимая группа H такая, что Γ = Γ(H). Доказательство. Пусть π1 = {p1 , . . . , pm }, π2 = {q1 , . . . , qn } и C = Cq1 × . . . × Cqn — циклическая группа. Пусть, без ограничения общности, число p1 не смежно в Γ с числами из множества {q1 , . . . qk } и смежно с числами из множества {qk+1 , . . . , qn }. Ввиду малой теоремы Ферма существует нату1 ральное число m1 такое, что pm 1 − 1 делится на произведение q1 · . . . · qk . Тогда мультипликативная m1 ∗ группа F1 поля F1 порядка p1 содержит элемент x1 порядка q1 ·. . .·qk . Определим действие группы C на аддитивной группе F1+ поля F1 , полагая, что действие порождающего элемента подгруппы Cq1 × . . . × Cqk на F1+ — это умножение в поле F1 на элемент x1 , а действие порождающего элемента подгруппы Cqk+1 × . . .× Cqn на F1+ тривиально. Аналогичным образом определим поле Fi и действие группы C на аддитивной группе Fi+ поля Fi для каждого pi ∈ π1 . Пусть группа H — естественное + полупрямое произведение группы F = F1+ × . . . Fm на группу C. Тогда группа H разрешима и граф Грюнберга–Кегеля Γ(H) в точности равен графу Γ. Лемма доказана. Также нам понадобится следующая легко доказываемая ЛЕММА 4. (см., например, [13, лемма 2]) Пусть L — группа, K ✁ L, r, s ∈ π(K) \ π(|L : K|). Тогда если простые числа r и s не смежны в Γ(K), то они не смежны в Γ(L). ЛЕММА 5. [10, теорема 4.5.1, предложения 2.5.12, 4.9.1, 4.9.2] Пусть S = P SLn (q), где n ≥ 2, q = ′ pm и (n, q) 6= (2, 2), (2, 3), x — элемент простого порядка r в Aut(S) \ Inndiag(S) и Sx = Op (CS (x)). Тогда справедливы следующие утверждения: (1) Aut(S) = Inndiag(S) ⋋ (Φ × hgi), где Outdiag(S) ∼ = Z(n, q−1) , Φ = hf i ∼ = Aut(GF (q)) ∼ = Zm — группа полевых автоморфизмов группы S, g = 1 для n = 2 и g — графовый автоморфизм порядка 2 группы S для n ≥ 3, Φ действует на Outdiag(S) так же, как Aut(GF (q)) действует на мультипликативную подгруппу из GF (q) того же порядка, что и Outdiag(S), и g инвертирует группу Outdiag(S); 3 1 (2) Если x ∈ Inndiag(S)Φ, то r делит m, Sx ∼ = P SLn (q r ) и CInndiag(S) (x) ∼ = Inndiag(Sx ); m 1 2 (3) Если n ≥ 3, 2 делит m и x ∈ Inndiag(S)f 2 g, то r = 2, Sx ∼ P SU (q ), и CInndiag(S) (x) ∼ = = n Inndiag(Sx ); (4) Если x ∈ Inndiag(S)g и n нечетно, то Sx ∼ = P Spn−1 (q); (5) Если x ∈ Inndiag(S)g, n ≥ 4 четно и p = 2, то подгруппа CS (x) изоморфна либо P Spn (q), либо централизатору некоторой инволюции в P Spn (q); (6) Если x ∈ Inndiag(S)g, n ≥ 4 четно и p > 2, то подгруппа Sx изоморфна одной из следующих − групп: P Spn (q), P Ω+ n (q), P Ωn (q). ЛЕММА 6. [10, теорема 4.5.1, предложения 2.5.12, 4.9.1, 4.9.2] Пусть S = P SUn (q), где n ≥ 3, ′ q = pm и (n, q) 6= (3, 2), x — элемент простого порядка r в Aut(S) \ Inndiag(S) и Sx = Op (CS (x)). Тогда справедливы следующие утверждения: (1) Aut(S) = Inndiag(S) ⋋ Φ, где Outdiag(S) ∼ = Z(n,q+1) , Φ = hf i ∼ = Aut(GF (q 2 )) ∼ = Z2m — группа полевых автоморфизмов группы S, Φ действует на Outdiag(S) так же, как Aut(GF (q 2 )) действует на мультипликативную подгруппу из GF (q 2 ) того же порядка, что и Outdiag(S); 1 (2) Если r > 2, то Sx ∼ = Inndiag(Sx ); = P SUn (q p ) и CInndiag(S) (x) ∼ (3) Если r = 2 и n нечетно, то Sx ∼ = P Spn−1 (q); (4) Если r = p = 2 и n четно, то подгруппа CS (x) изоморфна либо P Spn (q), либо централизатору некоторой инволюции в P Spn (q); (5) Если r = 2, n четно и p > 2, то подгруппа Sx изоморфна одной из следующих групп: − P Spn (q), P Ω+ n (q), P Ωn (q). Конечные почти простые группы, графы Грюнберга–Кегеля которых не содержат 3-коклик В настоящем разделе для каждой почти простой группы G мы покажем, что либо Γ(G) содержит 3-коклику, либо существует разрешимая группа H такая, что Γ(G) = Γ(H). Таким образом, мы докажем теорему 2 и импликацию (1) ⇒ (3) в теореме 1. Импликация (3) ⇒ (2) в теореме 1 очевидна, а импликация (2) ⇒ (1) следует из [1, теорема 1]. Зафиксируем обозначение, которое будет действовать до конца настоящей работы. Пусть G — почти простая группа и S = Soc(G). ЛЕММА 7. Пусть S — спорадическая группа. Тогда (1) Γ(G) не содержит 3-коклик, если, и только если S ∼ = J2 ; (2) если S ∼ = J2 , то существует разрешимая группа H такая, что Γ(G) = Γ(H). Доказательство. Ввиду [9] имеем |G : S| ≤ 2. Если S ∼ 6 J2 , то ввиду [5, табл. 1] граф Γ(S) содержит = 3-коклику, состоящую из нечетных чисел. Применение леммы 4 завершает доказательство пункта (1). Если S ∼ = J2 , то ввиду [9] имеем π(S) = π(Aut(S)) = {2, 3, 5} ∪ {7}, и множества {2, 3, 5} и {7} являются кликами в Γ(S). Таким образом, ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Лемма доказана. ∼ An , где n ≥ 5. Тогда ЛЕММА 8. Пусть S = (1) Γ(G) не содержит 3-коклик, если, и только если либо A6 < G ≤ Aut(A6 ), либо G ∈ {S5 , S8 }, либо S ∈ {A9 , A10 , A12 }; (2) если Γ(G) не содержит 3-коклик, то существует разрешимая группа H такая, что Γ(G) = Γ(H). Доказательство. Ввиду [9] если группа G изоморфна одной из групп: A5 , A6 , A7 , S7 , A8 , A11 , S11 , то Γ(G) содержит 3-колику; если группа G изоморфная одной из групп: S5 , S6 , M10 , P GL2 (9), Aut(A6 ), S8 , A9 , S9 , A10 , S10 , A12 , S12 , то Γ(G) не содержат 3-коклик, и легко проверить, что ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Если 13 ≤ n ≤ 17, то множество {7, 11, 13} образует 3-коклику в Γ(S) ввиду [4, предложение 1.1]. Если n ≥ 18, то по [14, лемма 1] в интервале ((n + 1)/2, n) лежат по крайней мере три различных нечетных простых числа, которые также образуют 3-коклику в Γ(S) ввиду [4, предложение 1.1]. Применение леммы 4 завершает доказательство леммы. 4 ЛЕММА 9. Пусть S ∼ = P SLn (q), где n ≥ 2, q = pm ≥ 4 и (n, q) 6= (2, 2), (2, 3). Тогда (1) Γ(G) не содержит 3-коклик, если, и только если выполняется одно из следующих утверждений: (i) группа G изоморфна одной из следующих групп: S5 , S6 , P GL2 (9), M10 , Aut(A6 ), S8 , Aut(P SL2 (8)), Aut(P SL3 (2)), P GL3 (4)hf i, P GL3 (4)hgi, Aut(P SL3 (4)), P SL4 (4)hf i, P SL4 (4)hgi, Aut(P SL4 (4)); (ii) G — группа из пунктов (3) − (9) теоремы 2; (2) для каждой группы G из пункта (1) леммы граф Γ(G) равен графу Грюнберга–Кегеля подходящей разрешимой группы. Доказательство. Пусть n = 2. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = (q − 1, 2)m и π(S) = {p} ∪ R1 (q) ∪ R2 (q). Пусть q нечетно и не является числом вида 2w ± 1. Пусть r1 ∈ Rm (p) и r2 ∈ R2m (p) нечетны. Ввиду малой теоремы Ферма числа r1 и r2 не делят |Out(S)|. Если p не делит индекс |G : S|, то ввиду леммы 4 числа {p, r1 , r2 } образуют 3-коклику в Γ(G). Пусть p делит индекс |G : S|, тогда p делит m. Пусть x — любой элемент порядка p, y — любой элемент порядка r1 и z — любой элемент порядка r2 из G. Тогда y и z лежат в Inndiag(S). Заметим, что в Inndiag(S) нет элементов порядков pr1 и pr2 . Если x ∈ G \ Inndiag(S), то ввиду леммы 5 имеем CInndiag(S) (x) ∼ = P GL2 (pm/p ), и числа r1 и r2 не делят |CInndiag(S) (x)|. Таким образом, числа {p, r1 , r2 } образуют 3-коклику в Γ(G) ввиду леммы 4. Пусть q нечетно и q = 2w + ε1, где ε ∈ {+, −}. Тогда ввиду леммы 2 либо q = 9 и случай S = P SL2 (9) ∼ = A6 рассмотрен в лемме 8, либо q = p, Aut(S) ∼ = P GL2 (p) и π(S) = π(Aut(S)). Заметим, что t(S) = 3 ввиду [5, табл. 2]. Если G — группа из пункта (3) теоремы 2, то ввиду [4, предложения 2.1, 3.1, 4.1] и [16, следствие 2] множества {p} и R1 (p) ∪ R2 (p) являются кликами в Γ(G). Таким образом, ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть q = 2m . Cлучай S = P SL2 (4) ∼ = A5 рассмотрен в лемме 8. Ввиду [9] граф Γ(P SL2 (8)) содержит 3-коклику, а граф Γ(Aut(P SL2 (8))) не содержит 3-колик. Кроме того, ввиду [9] имеем π(Aut(P SL2 (8))) = {2, 3} ∪ {7}, и числа 2 и 3 смежны в Γ(Aut(P SL2 (8))). Таким образом, ввиду леммы 3 существует разрешимая группа H такая, что Γ(Aut(P SL2 (8))) = Γ(H). Пусть q > 8, положим r1 = 7 и r2 = 13, если q = 64, и r1 ∈ Rm (2) и r2 ∈ R2m (2) в противном случае. Заметим, что числа r1 и r2 не делят m ввиду малой теоремы Ферма. Если индекс |G : S| нечетен, то ввиду [5, табл. 2] и леммы 4 числа {2, r1 , r2 } образуют коклику в Γ(G). Пусть r ∈ π(|G : S|) \ π(S). Тогда r 6∈ {2, 3} и r делит m. Пусть x — любой элемент порядка r, y — любой элемент порядка r1 и z — любой элемент порядка r2 из G. Тогда y и z лежат в Inndiag(S) и x ∈ G\Inndiag(S). Ввиду леммы 5 имеем CInndiag(S) (x) ∼ = P SL2 (pm/r ) и числа r1 и r2 не делят |CInndiag(S) (x)|. Таким образом, числа {r, r1 , r2 } образуют 3-коклику в Γ(G). Пусть {2} ⊆ π(|G : S|) ⊂ π(S). Ввиду [4, предложения 2.1, 3.1, 4.1] и леммы 5 множества {2} ∪R1 (q) и R2 (q) являются кликами в Γ(G). Таким образом, если G — группа из пункта (4) теоремы 2, то ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть n = 3. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2(q − 1, 3)m и π(S) = {p} ∪ R1 (q) ∪ R2 (q) ∪ R3 (q). Пусть p нечетно и q + 1 не является числом вида 2w . Ввиду [5, табл. 2] в графе Γ(S) есть коклика {p, r2 , r3 }, где 2 6= r2 ∈ R2m (p) и r3 ∈ R3m (p). Ввиду малой теоремы Ферма числа r2 и r3 не делят |Out(S)|. Если p не делит индекс |G : S|, то числа {p, r2 , r3 } образуют 3-коклику в Γ(G) ввиду леммы 4. Пусть p делит индекс |G : S|. Тогда p делит m. Пусть x — любой элемент порядка p, y — любой элемент порядка r2 и z — любой элемент порядка r3 из G. Тогда y и z лежат в Inndiag(S). Заметим, что в Inndiag(S) нет элементов порядков pr2 и pr3 . Если x ∈ G \ Inndiag(S), то ввиду леммы 5 имеем CInndiag(S) (x) = P GL3 (pm/p ), и числа r2 и r3 не делят |CInndiag(S) (x)|. Таким образом, числа {p, r2 , r3 } образуют 3-коклику в Γ(G). Предположим, что q = 2w − 1. Тогда ввиду леммы 2 имеем q = p, Aut(S) ∼ = P GL3 (q)hgi и π(S) = π(Aut(S)). Если (q − 1)3 6= 3, то ввиду [4, предложения 2.1, 3.1, 4.1] множества {p} ∪ R1 (q) ∪ R2 (q) и R3 (q) являются кликами в Γ(G). Таким образом, если G — группа из пункта (5) теоремы 2, то ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть (q − 1)3 = 3. Тогда ввиду [5, табл. 2] множество {3, p, r3 }, где r3 ∈ R3 (p), является 3-кокликой в Γ(S). Если Γ(G) не содержит 3-коклик, то ввиду леммы 4 имеем Inndiag(S) ≤ G. Обратно, если Inndiag(S) ≤ G, ввиду [4, предложения 2.1, 3.1, 4.1] и [16, следствие 2] множества {p} ∪ R1 (q) ∪ R2 (q) и R3 (q) являются 5 кликами в Γ(G). Таким образом, если G — группа из пункта (6) теоремы 2, то ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть p = 2. Заметим, что P SL3 (2) ∼ = P SL2 (7), и если q = 4, то ввиду [4, предложения 2.1, 3.1, 4.1] и леммы 5 граф Γ(G) не содержит 3-коклик тогда и только тогда, когда G ∈ {P GL3 (4)hf i, P GL3 (4)hgi, Aut(P SL3 (4))}. Кроме того, |π(Aut(P SL3 (4)))| = 4, следовательно, если Γ(G) не содержит 3-коклик, то ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Поэтому можно считать, что m > 2. Если r ∈ π(|G : S|) \ π(S), то r 6∈ {2, 3} и r делит m. Пусть x — любой элемент порядка r, y — любой элемент порядка r2 ∈ R2m (2) и z — любой элемент порядка r3 ∈ R3m (2) из G. Тогда y и z лежат в Inndiag(S) и x ∈ G \ Inndiag(S). Ввиду леммы 5 имеем CInndiag(S) (x) = P GL3 (2m/r ) и числа r2 и r3 не делят |CInndiag(S) (x)|. Таким образом, числа {r, r2 , r3 } образуют 3-коклику в Γ(G). Пусть π(G) = π(S) и Γ(G) не содержит 3-коклик. Если (q − 1)3 = 3, то m ≡ 2, 4 (mod 6) и из [5, табл. 2] следует, что в графе Γ(S) есть 3-коклика {3, r2 , r3 }, где r2 ∈ R2m (2) и r3 ∈ R3m (2). Ввиду малой теоремы Ферма числа r2 и r3 не делят |Out(S)|. Поскольку 3 не делит m, то ввиду леммы 4 имеем Inndiag(S) ≤ G. Пусть m нечетно. Тогда (q − 1)3 = 1 и S = Inndiag(S). Ввиду [5, табл. 2] в графе Γ(S) есть 3-коклика {2, r2 , r3 }, где r3 ∈ R3m (2), r2 ∈ R2m (2), если m 6= 3, и r2 = 3, если m = 3. Ввиду леммы 4 имеем Inndiag(S)hgi ≤ G . Пусть m четно и q 6= 16. Рассмотрим 3-коклику {2, r2 , r3 } в Γ(S), где r2 ∈ R2m (2) и r3 ∈ R3m (2). Γ(G) не содержит 3-коклик, поэтому числа 2 и r2 смежны в Γ(G) или числа 2 и r3 смежны в Γ(G). В первом случае в G \ Inndiag(S) найдется инволюция t, порядок централизатора которой в Inndiag(S) делится на r2 . Ввиду леммы 5 имеем t ∈ Inndiag(S)hgi \ Inndiag(S), откуда Shti ≤ G. Предположим, что числа 2 и r2 не смежны в Γ(G), тогда в G \ Inndiag(S) найдется инволюция t1 , порядок централизатора которой в Inndiag(S) делится на r3 . Ввиду леммы 5 имеем m (2). Поскольку числа 2 t1 ∈ Inndiag(S)f 2 g. Рассмотрим 3-коклику {2, r2 , r3′ } в Γ(S), где r3′ ∈ R 3m 2 и r2 не смежны в Γ(G), тогда в G \ Inndiag(S) найдется инволюция t2 , порядок централизатора m которой в Inndiag(S) делится на r3′ . Ввиду леммы 5 имеем t2 ∈ Inndiag(S)hf 2 i\Inndiag(S), откуда t1 t2 ∈ Inndiag(S)hgi \ Inndiag(S) и Sht1 t2 i ≤ G. Кроме того, ввиду [10, предложение 4.9.2] любой элемент порядка 2 из Inndiag(S)hgi \ Inndiag(S) сопряжен с g посредством элемента из S, откуда Shgi ≤ G. Для группы S = P SL3 (16) аналогичный результат можно получить, положив r2 = 17, r3 = 13 и r3′ = 7. Пусть G — группа из пункта (7) или (8) теоремы 2. Из [4, предложения 2.1, 3.1, 4.1], [16, следствие 2] и [10, предложение 4.9.2] следует, что множества {2} ∪ R1 (q) ∪ R2 (q) и R3 (q) являются кликами в Γ(G). Таким образом, ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть n = 4. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2(q − 1, 4)m и π(S) = {p} ∪ R1 (q) ∪ R2 (q) ∪ R3 (q) ∪ R4 (q). Пусть p нечетно. Ввиду [5, табл. 2] в графе Γ(S) есть коклика {p, r3 , r4 }, где r3 ∈ R3m (p) и r4 ∈ R4m (p). Ввиду малой теоремы Ферма числа r3 и r4 не делят |Out(S)|. Если p не делит индекс |G : S|, то числа {p, r3 , r4 } образуют 3-коклику в Γ(G) ввиду леммы 4. Пусть p делит индекс |G : S|. Тогда p делит m. Пусть x — любой элемент порядка p, y — любой элемент порядка r3 и z — любой элемент порядка r4 из G. Тогда y и z лежат в Inndiag(S). Заметим, что в Inndiag(S) нет элементов порядков pr3 и pr4 . Если x ∈ G\Inndiag(S), то ввиду леммы 5 имеем CInndiag(S) (x) = P GL4 (pm/p ) и числа r3 и r4 не делят |CInndiag(S) (x)|. Таким образом, числа {p, r3 , r4 } образуют 3-коклику в Γ(G). Пусть p = 2. Тогда S = Inndiag(S). Если q = 2, то, поскольку P SL4 (2) ∼ = A8 , этот случай рассмотрен в лемме 8. Если q = 4, то ввиду [4, предложения 2.1, 3.1, 4.1] и леммы 5 граф Γ(G) не содержит 3-коклик тогда и только тогда, когда G ∈ {P SL4(4)hf i, P GL4 (4)hgi, Aut(P SL4 (4))}. Кроме того, |π(Aut(P SL4 (4)))| = 5 и Γ(P SL4 (4)) содержит треугольник, следовательно, Γ(G) не является 5-циклом, откуда если Γ(G) не содержит 3-коклик, то ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Поэтому можно считать, что m > 2. Пусть Γ(G) не содержит 3-коклик. Из [5, табл. 2] следует, что в графе Γ(S) есть 3-коклика {2, r3 , r4 }, где r3 ∈ R3m (2) и rm ∈ R4m (2). Пусть r ∈ π(|G : S|) \ π(S). Тогда r 6∈ {2, 3} и r делит m. Пусть x — любой элемент порядка r, y — любой элемент порядка r3 и z — любой элемент порядка r4 из G. Тогда y и z лежат в Inndiag(S) и x ∈ G \ Inndiag(S). Ввиду леммы 5 имеем CInndiag(S) (x) = P GL4 (2m/r ) и числа r3 и r4 не делят |CInndiag(S) (x)|. Таким образом, числа {r, r3 , r4 } образуют 3-коклику в Γ(G), противоречие. Пусть π(G) = π(S). Если m нечетно, то Inndiag(S)hgi ≤ G ввиду леммы 4. Пусть m четно и q 6= 16. Так как Γ(G) не содержит 3-коклик, то числа 2 и 6 r4 смежны в Γ(G) или числа 2 и r3 смежны в Γ(G). В первом случае в G \ Inndiag(S) найдется инволюция t, порядок централизатора которой в Inndiag(S) делится на r4 . Ввиду леммы 5 имеем t ∈ Inndiag(S)hgi \ Inndiag(S), откуда Shti ≤ G. Предположим, что числа 2 и r4 не смежны в Γ(G), тогда в G \ Inndiag(S) найдется инволюция t1 , порядок централизатора которой в Inndiag(S) m делится на r3 . Ввиду леммы 5 имеем t1 ∈ Inndiag(S)f 2 g. Из [5, табл. 2] следует, что в графе Γ(S) есть 3-коклика {2, r3′ , r4 }, где r3′ ∈ R 3m (2). Поскольку числа 2 и r4 не смежны в Γ(G), в G\Inndiag(S) 2 найдется инволюция t2 , порядок централизатора которой в Inndiag(S) делится на r3′ . Ввиду леммы m 5 имеем t2 ∈ Inndiag(S)hf 2 i \ Inndiag(S), откуда t1 t2 ∈ Inndiag(S)hgi \ Inndiag(S) и Sht1 t2 i ≤ G, поэтому Inndiag(S)hgi ≤ G. Для группы S = P SL4 (16) аналогичный результат можно получить, положив r4 = 257, r3 = 13 и r3′ = 7. Пусть G — группа из пункта (9) теоремы 2. Из [4, предложения 2.1, 3.1, 4.1] и [10, предложение 4.9.2] следует, что множества {2} ∪ R2 (q) ∪ R4 (q) и R1 (q) ∪ R3 (q) являются кликами в Γ(G). Таким образом, ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть n ≥ 5. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2(q − 1, n)m. Рассмотрим множество {a, b, c}, где a ∈ Rmn (p) ⊆ Rn (q), b ∈ Rm(n−1) (p) ⊆ Rn−1 (q) и c ∈ Rm(n−2) (p) ⊆ Rn−2 (q), если (m, n, p) 6= (2, 5, 2), (1, 6, 2), (1, 7, 2), (1, 8, 2); {a, b, c} = {7, 17, 31}, если (m, n, p) = (2, 5, 2); {a, b, c} = {5, 7, 31}, если (m, n, p) = (1, 6, 2); {a, b, c} = {5, 31, 127}, если (m, n, p) = (1, 7, 2), (1, 8, 2). Ввиду малой теоремы Ферма числа a, b и c не делят |Out(S)|. Из [5, табл. 2] следует, что числа {a, b, c} образуют коклику в Γ(S), поэтому они образуют 3-коклику в Γ(G) ввиду леммы 4. Лемма доказана. ЛЕММА 10. Пусть S ∼ = P SUn (q), где n ≥ 3, q = pm ≥ 2 и (n, q) 6= (3, 2). Тогда (1) Γ(G) не содержит 3-коклик, если, и только если выполняется одно из следующих утверждений: (i) S изоморфна одной из групп P SU3 (9) или P SU4 (2); (ii) G ∼ = Aut(P SU5 (2)); (iii) G — группа из пунктов (10) − (14) теоремы 2; (2) для каждой группы G из пункта (1) леммы граф Γ(G) равен графу Грюнберга–Кегеля подходящей разрешимой группы. Доказательство. Пусть n = 3. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2m(q + 1, 3) и π(S) = {p} ∪ R1 (q) ∪ R2 (q) ∪ R6 (q). Пусть p нечетно и q − 1 не является числом вида 2w . Ввиду [5, табл. 2] в графе Γ(S) есть коклика {p, 3, r1 , r6 }, где 2 6= r1 ∈ Rm (p) и r6 ∈ R6m (p). Ввиду малой теоремы Ферма числа r1 и r6 не делят |Out(S)|. Если p не делит индекс |G : S|, то числа {p, r1 , r6 } образуют 3-коклику в Γ(G) ввиду леммы 4. Пусть p делит индекс |G : S|. Тогда p делит m. Пусть x — любой элемент порядка p, y — любой элемент порядка r1 и z — любой элемент порядка r6 из G. Тогда y и z лежат в Inndiag(S). Заметим, что в Inndiag(S) нет элементов порядков pr1 и pr6 . Если x ∈ G \ Inndiag(S), то ввиду леммы 5 имеем CInndiag(S) (x) = P GU3 (pm/p ), и числа r1 и r6 не делят |CInndiag(S) (x)|. Таким образом, числа {p, r1 , r6 } образуют 3-коклику в Γ(G). Предположим, что q = 2w + 1. Тогда ввиду леммы 2 имеем либо q = 9, либо q = p. В обоих случаях π(S) = π(Aut(S)). Если (q + 1)3 6= 3, то ввиду [4, предложения 2.2, 3.1, 4.2] множества {p} ∪ R1 (q) ∪ R2 (q) и R6 (q) являются кликами в Γ(G). Таким образом, если S ∼ = P SU3 (9) или G — группа из пункта (10) теоремы 2, то ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть (q+1)3 = 3. Тогда ввиду [5, табл. 2] множество {3, p, r6 }, где r6 ∈ R6 (p), является кокликой в Γ(S). Если Γ(G) не содержит 3-коклик, то ввиду леммы 4 имеем 3 делит |G/S|, откуда следует, что Inndiag(S) ≤ G. Обратно, если Inndiag(S) ≤ G, ввиду [4, предложения 2.1, 3.1, 4.1] и [16, следствие 2] множества {p} ∪ R1 (q) ∪ R2 (q) и R6 (q) являются кликами в Γ(G). Таким образом, если G — группа из пункта (11) теоремы 2, то ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть p = 2. Если (q + 1)3 = 3, то m ≡ ±1 (mod 6). Из [5, табл. 2] следует, что в графе Γ(S) есть 3-коклика {3, r1 , r6 }, где r1 ∈ Rm (2) и r6 ∈ R6m (2). Ввиду малой теоремы Ферма числа r1 и r6 не делят |Out(S)|. Поскольку 3 не делит m, то если Γ(G) не содержит 3-коклик, ввиду леммы 4 имеем Inndiag(S) ≤ G. Пусть Γ(G) не содержит 3-коклик. Положим r6 ∈ R6m (2) и r1 ∈ Rm (2). Ввиду малой теоремы Ферма числа r6 и r1 не делят |Out(S)|. Предположим, что r ∈ π(|G : S|) \ π(S), тогда r 6∈ {2, 3} и r делит m. Пусть x — любой элемент порядка r, y — любой элемент порядка r1 и z — любой элемент порядка r6 из G. Тогда y и z лежат в Inndiag(S) и x ∈ G \ Inndiag(S). Ввиду леммы 5 имеем CInndiag(S) (x) = P GU3 (2m/r ) и числа r1 и r6 не делят |CInndiag(S) (x)|. Таким образом, числа 7 {r, r1 , r6 } образуют 3-коклику в Γ(G), противоречие. Пусть π(G) = π(S) и индекс |G : S| нечетен. Тогда числа {2, r1 , r6 } образуют 3-коклику в Γ(G) ввиду [5, табл. 2] и леммы 4. Пусть G — группа из пункта (12) или (13) теоремы 2. Ввиду [4, предложения 2.2, 3.1, 4.2] и [16, следствие 2] множества {2} ∪ R1 (q) ∪ R2 (q) и R6 (q) являются кликами в Γ(G). Таким образом, ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть n = 4. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2(q + 1, 4)m и π(S) = {p} ∪ R1 (q) ∪ R2 (q) ∪ R4 (q) ∪ R6 (q). Пусть p нечетно. Ввиду [5, табл. 2] в графе Γ(S) есть коклика {p, r4 , r6 }, где r4 ∈ R4m (p) и r6 ∈ R6m (p). Ввиду малой теоремы Ферма числа r4 и r6 не делят |Out(S)|. Если p не делит индекс |G : S|, то числа {p, r4 , r6 } образуют 3-коклику в Γ(G) ввиду леммы 4. Пусть p делит индекс |G : S|, тогда p делит m. Пусть x — любой элемент порядка p, y — любой элемент порядка r4 и z — любой элемент порядка r6 из G. Тогда y и z лежат в Inndiag(S). Заметим, что в Inndiag(S) нет элементов порядков pr4 и pr6 . Если x ∈ G\Inndiag(S), то ввиду леммы 5 имеем CInndiag(S) (x) = P GU4 (pm/p ) и числа r4 и r6 не делят |CInndiag(S) (x)|. Таким образом, числа {p, r4 , r6 } образуют 3-коклику в Γ(G). Пусть p = 2. Тогда S = Inndiag(S). Ввиду [9] имеем π(P SU4 (2)) = π(Aut(P SU4 (2))) и π(P SU4 (2)) = {2, 3} ∪ {5}, причем числа 2 и 3 смежны в Γ(P SU4 (2)). Таким образом, ввиду леммы 3 если S = P SU4 (2), то существует разрешимая группа H такая, что Γ(S) = Γ(H). Поэтому можем считать, что q ≥ 4. Из [5, табл. 2] следует, что в графе Γ(S) есть 3-коклика {2, r4 , r6 }, где r4 ∈ R4m (2) и r6 ∈ R6m (2). Ввиду малой теоремы Ферма числа r4 и r6 не делят |Out(S)|. Пусть r ∈ π(|G : S|) \ π(S). Тогда r 6∈ {2, 3} и r делит m. Пусть x — любой элемент порядка r, y — любой элемент порядка r4 и z — любой элемент порядка r6 из G. Тогда y и z лежат в Inndiag(S) и x ∈ G \ Inndiag(S). Ввиду леммы 6 имеем CInndiag(S) (x) = P GU4 (2m/r ) и числа r4 и r6 не делят |CInndiag(S) (x)|. Таким образом, числа {r, r4 , r6 } образуют 3-коклику в Γ(G). Пусть π(G) = π(S) и индекс |G : S| нечетен. Тогда числа {2, r4 , r6 } образуют 3-коклику в Γ(G) ввиду [5, табл. 2] и леммы 4. Пусть π(G) = π(S) и индекс |G : S| четен, тогда m четно и G содержит инволюцию m t ∈ G \ Inndiag(S), следовательно, Shti ≤ G, откуда в G есть инволюция f 2 . Если G — группа из пункта (14) теоремы 2, то ввиду [4, предложения 2.2, 3.1, 4.2] и [10, 2.5.13, 4.9.2] множества {2} ∪ R1 (q) ∪ R4 (q) и R2 (q) ∪ R6 (q) являются кликами в Γ(G), поэтому ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть n = 5. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2(q + 1, 5)m. Если q = 2, то ввиду [4, предложения 2.2, 3.1, 4.2] и [10, 2.5.13, 4.9.2] граф Γ(P SU5 (2)) содержит 3-коклику {2, 5, 11}, и π(Aut(P SU5 (2))) = {2, 3, 5} ∪ {11}, где {2, 3, 5} — клика в Γ(Aut(P SU5 (2))). Следовательно, если G∼ = Aut(P SU5 (2)), то ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Поэтому можно считать, что m > 1. Рассмотрим множество {r4 , r6 , r10 }, где r4 ∈ R4m (p) ⊆ R4 (q), r6 ∈ R6m (p) ⊆ R6 (q) и r10 ∈ R10m (p) ⊆ R10 (q). Ввиду малой теоремы Ферма числа r4 , r6 и r10 не делят |Out(S)|. Из [5, табл. 2] следует, что числа {r4 , r6 , r10 } образуют 3-коклику в Γ(S), поэтому они образуют 3-коклику в Γ(G) ввиду леммы 4. Пусть n = 6. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2(q + 1, 6)m. Рассмотрим множество {r3 , r4 , r10 }, где r3 ∈ R3m (p), r4 ∈ R4m (p) и r10 ∈ R10m (p), если (m, p) 6= (2, 2), и r3 = 13, r4 = 17 и r10 = 41, если (m, p) = (2, 2). Ввиду малой теоремы Ферма числа r3 , r4 и r10 не делят |Out(S)|. Из [5, табл. 2] следует, что числа {r3 , r4 , r10 } образуют 3-коклику в Γ(S), поэтому они образуют 3-коклику в Γ(G) ввиду леммы 4. Пусть n ≥ 7. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2(q + 1, n)m. Рассмотрим множество {a, b, c}, где a ∈ R2mn (p), b ∈ R2m(n−2) (p) и c ∈ Rm(n−2+ε1) (p), если ε ∈ {+, −} и n ≡ ε1 (mod 4); a ∈ R2m(n−1) (p), b ∈ R2m(n−3) (p) и c ∈ Rmn (p), если n ≡ 0 (mod 4); a ∈ R2m(n−1) (p), b ∈ R2m(n−3) (p) и c ∈ Rm(n−2) (p), если n ≡ 2 (mod 4). Ввиду малой теоремы Ферма числа a, b и c не делят |Out(S)|. Из [5, табл. 2] следует, что числа {a, b, c} образуют 3-коклику в Γ(S), поэтому они образуют 3коклику в Γ(G) ввиду леммы 4. Лемма доказана. ЛЕММА 11. Пусть S ∼ = P Spn (q), где n ≥ 4 четно, q = pm ≥ 2 и (n, q) 6= (4, 2). Тогда (1) Γ(G) не содержит 3-коклик, если, и только если выполняется одно из следующих утверждений: (i) S ∼ = P Sp6 (2); (ii) G — группа из пункта (15) теоремы 2; (2) для каждой группы G из пункта (1) леммы граф Γ(G) равен графу Грюнберга–Кегеля подходящей разрешимой группы. Доказательство. Рассмотрим случай n = 4. Пусть r ∈ π(|G : S|) \ π(S), тогда r 6∈ {2, 3} и r делит 8 m. Пусть x — любой элемент порядка r, y — любой элемент порядка r2 ∈ R2m (p) и z — любой элемент порядка r4 ∈ R4m (p) из G. Тогда y и z лежат в Inndiag(S) и x ∈ G \ Inndiag(S). Ввиду [10, предложения 4.9.1] имеем CInndiag(S) (x) = P Sp4 (pm/r ) и числа r2 и r4 не делят |CInndiag(S) (x)|. Таким образом, числа {r, r2 , r4 } образуют 3-коклику в Γ(G). Пусть π(G) = π(S). Ввиду [3, теорема 1] Γ(S) состоит из двух непересекающихся клик, следовательно ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть n ≥ 6. Тогда ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2(q − 1, 2)m. Если (n, q) = (6, 2), то π(S) = π(Aut(S)) и Γ(S) состоит из двух непересекающихся клик ввиду [3, теорема 1], следовательно ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Если n = 6 и q > 2, то рассмотрим множество {r3 , r4 , r6 }, где r3 ∈ R3m (p), r4 ∈ R4m (p) и r6 ∈ R6m (p), если (m, p) 6= (2, 2), и r3 = 7, r4 = 17 и r6 = 13, если (m, p) = (2, 2). Заметим, что числа r3 , r4 и r6 нечетны и отличны от 3. Ввиду малой теоремы Ферма числа r3 , r4 и r6 не делят |Out(S)|. Из [5, табл. 3] следует, что числа {r3 , r4 , r6 } образуют 3-коклику в Γ(S), поэтому они образуют 3-коклику в Γ(G) ввиду леммы 4. Пусть n ≥ 8. Рассмотрим множество {a, b, c}, где a ∈ Rmn (p), b ∈ Rm(n−2) (p) и c ∈ Rm(n−4) (p), если (m, n, p) 6= (1, 8, 2), (1, 10, 2); {a, b, c} = {5, 7, 17}, если (m, n, p) = (1, 8, 2); {a, b, c} = {7, 17, 31}, если (m, n, p) = (1, 10, 2). Ввиду малой теоремы Ферма числа a, b и c не делят |Out(S)|. Из [5, табл. 2] следует, что числа {a, b, c} образуют 3-коклику в Γ(S), поэтому они образуют 3-коклику в Γ(G) ввиду леммы 4. Лемма доказана. ЛЕММА 12. Пусть S ∼ = P Ωn+1 (q), где n ≥ 6 четно и q = pm нечетно. Тогда Γ(G) содержит 3-коклику. Доказательство. Ввиду [4, предложения 3.1, 4.3] и [5, предложение 2.4] имеем Γ(P Spn (q)) = Γ(P Ωn+1 (q)). Ввиду [9] имеем |Out(P Spn (q))| = |Out(P Ωn+1 (q))|. Из доказательства леммы 11 следует, что Γ(P Spn (q)) при n ≥ 6 и нечетном q содержит 3-коклику {a, b, c} такую, что числа a, b и c не делят |Out(P Spn (q))|. Применение леммы 4 завершает доказательство. ЛЕММА 13. Пусть S ∼ = P Ωεn (q), где n ≥ 8 четно, ε ∈ {+, −} и q = pm ≥ 2. Тогда (1) Γ(G) не содержит 3-коклик тогда и только тогда, когда S ∼ = P Ω+ 8 (2); + ∼ (2) если S = P Ω8 (2), то существует разрешимая группа H такая, что Γ(G) = Γ(H). Доказательство. Ввиду [15, табл. 5.1.A] имеем |Out(S)| = 2λ(q n/2 − ε1, 4)m, где λ = 3, если (n, ε) = (8, +) и λ = 1 иначе. Если (n, q, ε) = (8, 2, +), то ввиду [3, теорема 1] Γ(S) состоит из двух непересекающихся клик, следовательно ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Пусть (n, q, ε) 6= (8, 2, +). Ввиду [15, табл. 3.5.E, 3.5.F] в S существует максимальная подгруппа T , изоморфная P Ωn−1 (q). Ввиду [9] имеем |Out(S)| = |Out(T )|, если (n, ε) 6= (8, +), и π(Out(S)) ⊆ π(T ) ∪ {3}, если (n, ε) = (8, +). Кроме того, если q четно, то ввиду [9] имеем P Spn (q) ∼ = P Ωn+1 (q). Из доказательств лемм 11 и 12 следует, что Γ(T ) содержит 3-коклику {a, b, c} такую, что числа a, b и c не делят |Out(T )|. Кроме того, в случае T ∼ = P Sp6 (q), где q 6= 2, числа a, b и c отличны от 3. Применение леммы 4 завершает доказательство. ЛЕММА 14. Пусть S — простая исключительная группа лиева типа над полем порядка q = pm . Тогда (1) Γ(G) не содержит 3-коклик тогда и только тогда, когда S ∼ = 3 D4 (2); 3 ∼ (2) если S = D4 (2), то существует разрешимая группа H такая, что Γ(G) = Γ(H). Доказательство. Пусть S ∼ = E8 (q). Ввиду [15, табл. 5.1.B] имеем |Out(S)| = m. Из [5, табл. 4] следует, что числа r30 ∈ R30m (p), r24 ∈ R24m (p) и r20 ∈ R20m (p) образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа r30 , r24 и r20 не делят |Out(S)|, ввиду леммы 4 они образуют 3-коклику в Γ(G). Пусть S ∼ = E7 (q). Ввиду [15, табл. 5.1.B] имеем |Out(S)| = (2, q − 1)m. Из [5, табл. 4] следует, что числа r18 ∈ R18m (p), r14 ∈ R14m (p) и r12 ∈ R12m (p) образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа r18 , r14 и r12 не делят |Out(S)|, ввиду леммы 4 они образуют 3-коклику в Γ(G). Пусть S ∼ = E6 (q). Ввиду [15, табл. 5.1.B] имеем |Out(S)| = 2(3, q − 1)m. Из [5, табл. 4] следует, что числа r9 ∈ R9m (p), r8 ∈ R8m (p) и r5 ∈ R5m (p) образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа r9 , r8 и r5 не делят |Out(S)|, поэтому ввиду леммы 4 они образуют 3-коклику в Γ(G). 9 Пусть S ∼ = 2 E6 (q). Ввиду [15, табл. 5.1.B] имеем |Out(S)| = 2(3, q + 1)m. Из [5, табл. 4] следует, что числа из r18 ∈ R18m (p), r12 ∈ R12m (p) и r10 ∈ R10m (p) образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа r18 , r12 и r10 не делят |Out(S)|, поэтому ввиду леммы 4 они образуют 3-коклику в Γ(G). Пусть S ∼ = 3 D4 (q). Ввиду [15, табл. 5.1.B] имеем |Out(S)| = 3m. Если q = 2, то то ввиду [9] имеем π(S) = π(Aut(S)) = {2, 3, 7} ∪ {13} и множества {2, 3, 7} и {13} являются кликами в Γ(S). Таким образом, ввиду леммы 3 существует разрешимая группа H такая, что Γ(G) = Γ(H). Если q = 4, то числа 7 ∈ R3 (4), 13 ∈ R6 (4) и 241 ∈ R12 (4) образуют 3-коклику в Γ(S) и не делят |Out(S)| = 6, поэтому ввиду леммы 4 они образуют 3-коклику в Γ(G). Предположим, что q > 2 и q 6= 4. Тогда из [5, табл. 4] следует, что числа из r3 ∈ R3m (p), r6 ∈ R6m (p) и r12 ∈ R12m (p) образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа r3 , r6 и r12 не делят |Out(S)|, поэтому ввиду леммы 4 они образуют 3-коклику в Γ(G). Пусть S ∼ = F4 (q). Ввиду [15, табл. 5.1.B] имеем |Out(S)| = (2, p)m. Из [5, табл. 4] следует, что числа r12 ∈ R12m (p), r8 ∈ R8m (p) и r4 ∈ R4m (p) образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа r12 , r8 и r4 не делят |Out(S)|, ввиду леммы 4 они образуют 3-коклику в Γ(G). Пусть S ∼ = 2 F4 (22n+1 ), где n ≥ 1. Ввиду [15, табл. 5.1.B] имеем |Out(S)| = 2n + 1. Пусть n ≥ 2. Из [5, табл. 4] следует, что любые числа s2 ∈ R4n+2 (2) ⊂ π(22n+1 + 1) \ {3}, s3 ∈ R8n+4 (2) ⊂ π(24n+2 + 1) \ {3} и s4 ∈ R12n+6 (2) ⊂ π(24n+2 − 22n+1 + 1) \ {3} образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа s2 , s3 и s4 не делят 2n+1, теперь из леммы 4 следует, что они образуют 3-коклику в Γ(G). Пусть n = 1. Из [5, табл. 4] следует, что числа 2, 19 и 37 образуют 3-коклику в Γ(S). Поскольку эти числа не делят |Out(S)|, из леммы 4 следует, что они образуют 3-коклику в Γ(G). Пусть S ∼ = 2 F4 (2)′ . Ввиду [9] имеем |Out(S)| = 2. Из [5, табл. 4] следует, что числа 3, 5 и 13 образуют 3-коклику в Γ(S). Поскольку эти числа не делят |Out(S)|, из леммы 4 следует, что они образуют 3-коклику в Γ(G). (3,p)−1 Пусть S ∼ = G2 (q). Ввиду [15, табл. 5.1.B] имеем |Out(S)| = 2 2 m. Пусть r6 ∈ R6m (p), r3 ∈ R3m (p) и r2 ∈ R2m (p), если (m, p) 6= (2, 2), (3, 2), r6 = 13, r3 = 7 и r2 = 5, если (m, p) = (2, 2), r6 = 19, r3 = 73 и r2 = 7, если (m, p) = (3, 2). Из [5, табл. 4] следует, что числа {r6 , r3 , r2 } образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа r6 , r3 и r2 не делят |Out(S)|, поэтому ввиду леммы 4 они образуют 3-коклику в Γ(G). Пусть S ∼ = 2 G2 (32n+1 ), где n ≥ 1. Ввиду [15, табл. 5.1.B] имеем |Out(S)| = 2n + 1. Из [5, табл. 4] следует, что любые числа s1 ∈ R2n+1 (3) ⊂ π(32n+1 − 1), s2 ∈ R4n+2 (3) ⊂ π(32n+1 + 1) и s3 ∈ R12n+6 (3) ⊂ π(34n+2 − 32n+1 + 1) образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа s1 , s2 и s3 не делят 2n + 1, теперь из леммы 4 следует, что они образуют 3-коклику в Γ(G). Пусть S ∼ = 2 B2 (22n+1 ), где n ≥ 1. Ввиду [15, табл. 5.1.B] имеем |Out(S)| = 2n + 1. Из [5, табл. 4] следует, что числа 2, s1 ∈ R2n+1 (2) ⊂ π(22n+1 −1) и s2 ∈ R8n+4 (2) ⊂ π(24n+2 +1) образуют 3-коклику в Γ(S). Ввиду малой теоремы Ферма числа s1 и s2 не делят 2n + 1, теперь из леммы 4 следует, что числа {2, s1 , s2 } образуют 3-коклику в Γ(G). Лемма доказана. Доказательство теорем 1 и 2 следует из лемм 7–14. Список литературы [1] Lucido M. C. The diameter of the prime graph of finite groups// J. Group Theory, Vol. 2, no. 2 (1999). P. 157–172. [2] Gruber A., et. al., A characterization of the prime graphs of solvable groups// J. Algebra. Vol. 442 (2015). P. 397–422. [3] Зиновьева М. Р., Мазуров В. Д. О конечных группах с несвязным графом простых чисел // Труды ИММ УрО РАН. Т. 18, № 3 (2012). С. 99–105. [4] Васильев А. В., Вдовин Е. П. Критерий смежности в графе простых чисел конечной простой группы// Алгебра и логика. Т. 44, № 6 (2005). С. 682—725. [5] Васильев А. В., Вдовин Е. П. Коклики максимального размера в графе простых чисел конечной простой группы// Алгебра и логика. Т. 50, № 4 (2011). С. 425—470. 10 [6] Higman G. Finite groups in which every element has prime power order// J. London Math. Soc. (2). Vol. 32 (1957). P. 335–342. [7] Gorenstein D. Finite groups. N. Y.: Harper and Row, 1968. [8] Harrary F. Graph theory. Massachussets: Addison-Wesley, 1969. [9] Atlas of finite groups/ J.H. Conway, R.T. Curtis, S.P. Norton, R.A. Parker, R.A. Wilson. Oxford: Clarendon Press, 1985. [10] Gorenstein D., Lyons R., Solomon R. The classification of the finite simple groups, Number 3// Mathematical Surveys and Monographs. 1994. Vol. 40, № 3. [11] Zsigmondy K. Zur Theorie der Potenzreste // Monatsh. Math. Phys. V. 3, no. 1 (1892). P. 265–284. [12] Gerono G.C. Note sur la résolution en nombres entiers et positifs de l’équation xm = y n + 1 // Nouv. Ann. Math. (2). Vol. 9 (1870). P. 469–471. [13] Маслова Н. В. О совпадении графов Грюнберга–Кегеля конечной простой группы и ее собственной подгруппы // Труды ИММ УрО РАН. Т. 20, № 1 (2014). С. 156–168. [14] Кондратьев А.С., Мазуров В.Д. Распознавание знакопеременных групп простой степени по порядкам их элементов. // Сиб. мат. журн. Т. 41, № 2 (2000). С. 359–369. [15] Kleidman P., Liebeck M. The subgroup structure of the finite classical groups. Cambridge: Cambridge University Press, 1990. 303 p. [16] Бутурлакин А. А. Спектры конечных линейных и унитарных групп// Алгебра и логика. Т. 47, № 2 (2008). С. 157–173. Сведения об авторах: ГОРШКОВ Илья Борисович, РОССИЯ, г. Екатеринбург, ул. С.Ковалевской, 16, 620990, Институт математики и механики им. Н.Н. Красовского УрО РАН, е-mail: [email protected] МАСЛОВА Наталья Владимировна, РОССИЯ, г. Екатеринбург, ул. С.Ковалевской, 16, 620990, Институт математики и механики им. Н.Н. Красовского УрО РАН, РОССИЯ, г. Екатеринбург, ул. Мира, 19, 620002, Уральский федеральный университет, е-mail: [email protected] 11
4math.GR
A General Pipeline for 3D Detection of Vehicles arXiv:1803.00387v1 [cs.CV] 12 Feb 2018 Xinxin Du1 , Marcelo H. Ang Jr.2 , Sertac Karaman3 and Daniela Rus3 Abstract— Autonomous driving requires 3D perception of vehicles and other objects in the in environment. Much of the current methods support 2D vehicle detection. This paper proposes a flexible pipeline to adopt any 2D detection network and fuse it with a 3D point cloud to generate 3D information with minimum changes of the 2D detection networks. To identify the 3D box, an effective model fitting algorithm is developed based on generalised car models and score maps. A two-stage convolutional neural network (CNN) is proposed to refine the detected 3D box. This pipeline is tested on the KITTI dataset using two different 2D detection networks. The 3D detection results based on these two networks are similar, demonstrating the flexibility of the proposed pipeline. The results rank second among the 3D detection algorithms, indicating its competencies in 3D detection. I. INTRODUCTION Vision-based car detection has been well developed and widely implemented using deep learning technologies. The KITTI [1] benchmark site reports that the state of the art algorithms are able to achieve ∼ 90% average precision (AP). However, for autonomous vehicles, car detection in 2D images is not sufficient to provide enough information for the vehicle to perform planning and decision making due to the lack of depth data. For a robust and comprehensive perception system in autonomous vehicle, 3D car detection, including car dimensions, locations and orientations in the 3D world, is essential. However the state of the art for 3D car detection algorithms only achieve 62% AP. Gaps still exist as compared to the 2D detection performance and the problem remains as challenging. According to the types of input sources, the current algorithms for 3D vehicle detection can be categorised into four major groups, including (1) mono image based, (2) stereo image, (3) LiDAR (Light Detection and Ranging), and (4) fusion between mono image and Lidar. Mono images lack the depth information to recover the 3D location of detected obstacles, therefore assumptions and approximations have to be made. Stereo image based approaches normally involve the construction of depth maps from stereo correspondence matching. The performance of this type of approach depends heavily on the depth map reconstruction and the accuracy drops as distance from the vehicle increases. 1 Xinxin Du is with the Singapore-MIT Alliance for Research and Technology (SMART) Centre, Singapore [email protected] 2 Marcelo H. Ang Jr. is with the National University of Singapore, Singapore [email protected] 3 Sertac Karaman and Daniela Rus are with the Massachusetts Institute of Technology, Cambridge, MA, USA [email protected] [email protected] LiDAR, despite its high cost, is able to provide the most direct measurement of object location. But it lacks color information and it is always sparse which poses difficulties in classification. In order to make use of the full capabilities of LiDAR and camera, fusion approaches have been proposed in the literature. To make use of the deep CNN architecture, the point cloud needs to be transformed into other formats. In the process of transformation, information is lost. The prior approaches for 3D vehicle detection are not as effective as those for 2D detection. Little attention has been paid to how to transfer the advantages and lessons learnt from 2D detection approaches to 3D detection approaches. Moreover, the field is lacking effective 3D detection approaches that enable the existing 2D approaches to provide 3D information. The state of the art 2D approaches can not be applied to autonomous vehicles which require 3D information. In this paper, we propose a flexible 3D vehicle detection pipeline which can make use of any 2D detection network and provide accurate 3D detection results by fusing the 2D network with a 3D point cloud. The general framework structure is illustrated in Fig. 1. The raw image is passed to a 2D detection network which provides 2D boxes around the vehicles in the image plane. Subsequently, a set of 3D points which fall into the 2D bounding box after projection is selected. With this set, a model fitting algorithm detects the 3D location and 3D bounding box of the vehicle. And then another CNN network, which takes the points that fit into the 3D bounding box as input, carries out the final 3D box regression and classification. It requires minimum efforts to modify the existing 2D networks to fit into the pipeline, adding just one additional regression term at the output layer to estimate the vehicle dimensions. The main contributions of the paper are: 1) A general pipeline that enables any 2D detection network to provide accurate 3D detection information. 2) Three generalised car models with score maps, which achieve a more efficient model fitting process. 3) A two-stage CNN that can further improve the detection accuracy. This pipeline has been tested using two outstanding 2D networks, PC-CNN [20] and MS-CNN [21]. The 3D detection performances based on both networks were evaluated using the KITTI dataset [1]. We significantly lead the majority of the algorithms in both bird eye detection and 3D detection tasks. We also achieved comparable results to the current state of the art algorithm MV3D [19] in both tasks. 20 15 Car dimensions Generalized models 20 15 10 2D box 2D detection CNN Final 3D box Score 10 Score maps Projected LiDAR points LiDAR point subset Model fitting 3D car points Refinement CNN Final detection Fig. 1: General fusion pipeline. All of the point clouds shown are in 3D, but viewed from the top (bird’s eye view). The height is encoded by color, with red being the ground. A subset of points is selected based on the 2D detection. Then, a model fitting algorithm based on the generalised car models and score maps is applied to find the car points in the subset and a two-stage refinement CNN is designed to fine tune the detected 3D box and re-assign an objectiveness score to it. II. R ELATED WORKS This section reviews the works that are related to the proposed pipeline in details. It also highlights the differences between our proposal and the prior works. Mono Image Approaches: In [2], a new network was designed to estimate the car dimensions, orientations and probabilities given a detected 2D box from an existing network. Using the criterion the perspective projection of a 3D box should fit tightly with the 2D box in the image, 3D box was recovered by using the estimated information. Similarly in DeepMANTA [3], the vehicle orientation and size were estimated from a deep CNN. Additionally, the network also estimated 36 locations of key points on the car in the image coordinates. A 2D/3D shape matching algorithm [4] was applied to estimate vehicle 3D poses based on these 36 2D part locations. Another set of algorithms, e.g. [5], [6], [7] and [8], defined 3D car models with occlusion patterns, carried out detection of the patterns in the 2D image and recovered the 3D occluded structure by reasoning through a MAP (maximum a posteriori) framework. These approaches are sensitive to the assumptions made and the parameter estimation accuracy. As shown in the result section, our method outperforms them significantly. Stereo Image Approaches: The depth map from stereo correspondence is normally appended to the RGB image as the fourth channel. The RGB-D image is passed to one or more CNNs in order to carry out the detection. In [9], Pham et al. proposed a two-stream CNN where the depth channel and RGB channel went through two separate CNN branches and were fused before the fully connected layers. Lidar Approaches: The common framework involves three steps: pre-processing (e.g. voxelization), segmentation and classification. A detailed review of LiDAR approaches can be found in [10]. Wang et al. [11] proposed a different approach where the point cloud was converted into 3D feature grids and a 3D detection window was slid through the feature grids to identify vehicles. In [12], the point cloud was converted into a 2D point map and a CNN was designed to identify the vehicle bounding boxes in the 2D point map. In [13], the authors extended the approach of [12] and applied 3D deep CNN directly on the point cloud. However, this approach is very time consuming and memory intensive due to the 3D convolutions involved. To improve, [14] proposed a voting mechanism able to perform sparse 3D convolution. Fusion Approaches: In [17], the sparse point cloud is converted to a dense depth image, which is similar to a stereo one. The RGB-D image was passed through a CNN for detection. In [18], the point cloud was converted into a three-channel map HHA which contains horizontal disparity, height above ground and angle in each channel. The resulting six-channel image RGB-HHA was processed by a CNN for detection of vehicles. However these two methods will not be able to output the 3D information directly from the network. In oder to address this, MV3D (multi-view 3D) detection network proposed by Chen et al. [19] included one more type of input generated from the point cloud, the bird’s eye view feature input. This input has no projective loss as compared to the depth map, thus 3D proposal boxes can be generated directly. This approach has achieved the current state of the art in 3D vehicle detection. It generates 2D boxes from 3D boxes while ours generate 3D boxes from 2D boxes. And MV3D explores the entire point cloud while ours only focus on a few subsets of the point cloud, which is more efficient and saves computation power. 2D Detection: The proposed pipeline is flexible in regards to the choice of 2D detection networks. Only a slight change is required on the last fully connected layer of the network so that it is able to estimate the dimensions of the cars. Both [2] and [3] proposed ways to encode the car dimensions to the network. For better accuracy, the 2D detection networks proposed in [22], [3] and [23] can be incorporated since they are the leading networks for 2D detection. For faster computation, the approaches presented in [24] and [25] can be implemented. In this paper, we implement PC-CNN [20] and MS-CNN [21] to demonstrate the flexibility of the pipeline. Model Fitting: In [5], Xiang et al. proposed 3D voxel patterns (3DVPs) as the 3D car model. 3DVPs encode the occlusion, self-occlusion and truncation information. A boosting detector was designed to identify the 3DVPs in the image, while [6] implemented a sub-category awareness CNN for 3DVP detection. Deformable part-based models (DPM) can be found in [26], [27], [28] and [29]. Different classifiers were trained to detect DPM. Fidler et al. extended the DPM to a 3D cuboid model in [30] in order to allow reasoning in 3D. In [8], [31], [7] and [3], 3D wireframe models were used. Similarly, each wire vertex is encoded with its visibility. Due to the various vehicle types, sizes, and occlusion patterns, these prior approaches require a substantial number of models in order to cover all possible cases. In our approach, only three models are used and the occlusion pattern is assigned online when doing model fitting. III. T ECHNICAL A PPROACH The input is an image. The first step is to generate 2D bounding boxes for the candidate vehicles. Secondly, these bounding boxes are used to select subsets of the point clouds, using the transformation between the camera and LiDAR. Due to the perspective nature of the camera, the 3D point subset may spread across a much larger area than the vehicle itself as shown in Fig.1. This subset also contains a substantial number of non-vehicle points and points on neighbouring vehicles. All these artefacts add challenges to the 3D box detection. The 3D box proposals are generated following the principle of RANSAC algorithm (random sample consensus). In each iteration, one point is selected randomly. A second point is randomly selected from points within the cube centred at the first point and with the side length of 1.5l, where l is the car length from the 2D CNN dimension estimation and 1.5 compensates the estimation error. A vertical plane is derived from these two points. Any points with a distance to the plane less than a threshold are considered as inliers to the plane. A maximum 20 points are then randomly selected from the inliers. At each point, a second vertical plane, passing through that point and perpendicular to the first vertical plane, is derived. Along the intersection line between these two vertical planes, eight 3D boxes can be generated based on the estimated car width and length. Since the first vertical plane is visible, based on the view direction, four boxes are eliminated. At each of the remaining box locations, a new range is defined by expanding the box by 1.5 times along both w and l directions. The lowest point within the new range can be found and it determines the ground of the 3D box while the roof of the 3D box is set based on the height estimation. In summary, at each iteration, maximum 80 3D box proposals can be generated. A. Car dimension estimation One additional regression layer is needed at the end of the given 2D detection network. This regression method was inspired by [3] and [2]. First the average dimensions for all ¯ w̄] the cars and vans in KITTI dataset is obtained. Let [h̄, l, denote height, length and width of the vehicle. The ground truth regression vector ∆∗i = (δh , δl , δw ) is defined as: δh = log(h∗ /h̄) ¯ δl = log(l ∗ /l) δw = log(w∗ /w̄) (1) The dimension regression loss is shown as: Ld (i) = λd Ci R(∆i − ∆∗i ) (2) where λd is the weighting factor to balance the losses defined in the original network, e.g. classification loss, 2D box regression loss; Ci is 1 if the 2D box is a car and 0 otherwise; R is the smooth L1 loss function defined in [32] and ∆i is the regression vector from the network. To train the modified network, we can reuse the pre-trained weights from the original network for initialisation. Only a small part of the network needs to be re-trained while the rest can be kept as fixed during training. For example, in MS-CNN, we only re-trained the convolution layer and the fully connected layers after ROI pooling in the detection subnetwork and in PC-CNN, we re-trained the GoogleNet layer, convolution layer and the fully connected layers after the Deconvolution layer in the detection sub-network. B. Vehicle model fitting We first generate a set of 3D box proposals. For each proposal, the points within the 3D box are compared to the three generalised car models. The proposal with the highest score is selected for the two-stage CNN refinement. (a) SUV (b) Sedan (c) Van Fig. 2: Generalised car models Only three generalised car models are used for model fitting. They represent three categories of cars, SUVs, Sedans and Vans. Hatchback cars are considered to be SUVs. We observe that the relative distances/positions between different parts of a car do not vary significantly for different cars from the same category even with different sizes. This invariance indicates that if the cars under the same category are normalised to the same dimension [h, l, w], their shapes and contours will be similar. We verified this and generalised the car models by normalising the cars in the 3D CAD dataset used in [3], [30] and [33]. Figure 2 illustrates the side view of the point cloud plots for the three categories. Each plot is an aggregation of the points that are generated from the 3D CAD models, aligned to the same direction and normalised to the same dimension. The SUV/hatchback plot consists of points from 58 CAD models, the sedan plot consists of 65 point sets, and the van plot consists of points from 10 models. Each aggregation is then voxelized to a 8 × 18 × 10 matrix along the [h l w] direction. Each element in the matrix is assigned different scores based on its position. The elements representing the car shell/surface are assigned a score of 1, indicating that 3D points in the model fitting process fall on the car surface will be counted towards the overall score. The elements inside or outside the car shell are assigned negative scores, and the further away they get from the car shell (either inwards or outwards), the smaller the assigned values. This indicates that no points should be detected from outside or inside the car by LiDAR and the overall score will be penalised for such detections. The elements at the bottom layer of the matrix are assigned a score of 0. Points detected at the bottom layer could be the ground or car’s tires, which are difficult to distinguish from each other. They will not be penalised or counted. Fig. 3: Score map (scores are indicated at bottom.) Self-occlusion can be easily determined from the view direction. This is encoded online when doing the model fitting since view direction changes for different 3D box proposals. Negative scores are assigned to the car surface elements if they are self-occluded. Furthermore, for simplicity, only the four vertical facets are considered for self-occlusion analysis while car roof and bottom are not considered. Two slices of the score assignment from the SUV category are shown in Fig. 3, with the left image depicting the side facet and the right image illustrating the center slice. The car exterior and interior are indicated by orange and blue while the bottom is indicated white. Yellow and green refer to the shell/surface of the car, while green further indicates that those areas might be self-occluded. Points within the 3D box proposals will be voxelised into 8 × 18 × 10 grids and compared to the three potential vehicle models. Due to the orientation ambiguity, the grids are rotated around their vertical center axis by 180 degree and are then compared to the three models. Out of all the bounding box proposals, the one with the highest score is selected for the next step. C. Two-stage refinement CNN To further align the detected 3D box to the point cloud, we designed a two-stage CNN. In the literature, 3D CNNs are commonly used to process 3D point clouds, e.g. [12]. However, these CNNs are extremely slow and memory intensive. In this paper, we found that 2D CNNs are sufficient. With the points in a given 3D box, the first CNN outputs a new 3D box. A new set of points can be found within the new 3D box. The second CNN outputs a probability score based on the new set of points to indicate how likely these points represent an actual car. However, point sets cannot be input to the CNN directly. We apply normalization and voxelization strategies in order to formalize the points in matrix form in order to fit to the CNN. Furthermore, consistent with 2D image detection cases [34], [21], a bounding box context is able to provide additional information to improve the detection accuracy. We also include the context of the 3D bounding box as input to the CNN. Given a 3D box from the model fitting process, our pipeline expands it along its h, l, w directions by 1.5, 1.5, and 1.6 times respectively to include its context. The points inside this expanded box are normalised and voxelised into a 24 × 54 × 32 matrix. The matrix is sparse with ∼ 0.6% occupied elements on average. As compared to the generalised model, we doubled the resolution of the voxelisation in order to reserve more spatial details and patterns of the distribution of the points. Note that the normalisation is anisometric, it has different scale ratios along different directions. The backbones of the CNNs in both stages are based on the VGG-net with configuration D as described in [35]. After each convolution, an ELU (exponential linear units) layer [36], instead of Re(ctified)LU layer, is adopted for a more stable training process. The first stage CNN has two parallel outputs, one for 3D box regression and the other for classification, while the second stage CNN only has one output, classification. δx∗c = (Xc∗ − Xc )/L δy∗c = (Yc∗ −Yc )/H δz∗c = (Zc∗ − Zc )/W δx∗l = (Xl∗ − Xl )/L δy∗l = (Yl∗ −Yl )/H δz∗l = (Zl∗ − Zl )/W δw∗ ∗ = log(W /W ) (3) The classification loss for both CNNs is So f tMax loss and the 3D box regression loss is SmoothL1 loss. The ground truth regression vector ∆∗3d defined in (3) has seven elements, three for the center of the box, three for the left bottom corner and one for the width. It is just sufficient to recover the 3D bounding box from these seven elements. Due to the anisometric normalisation, a quartic polynomial needs to be solved. Note that across all the inputs, Xc/l , Yc/l , Zc/l , L, H, W are all constant as all the 3D boxes are aligned and normalised to the same size. Classification has two classes, car and background. A 3D box is classified as positive when the IOU (intersection of union) between its bird’s eye view box and the ground truth bird’s eye view box is greater than a specific threshold. This threshold is 0.5 for the first stage CNN and 0.7 for the second. 0.7 is consistent with the criteria set by KITTI benchmark. The reason to set a lower threshold for the first stage is to train the network so that it is able to refine the boxes with IoU between 0.5 to 0.7 to a better position where the IoU may be greater than 0.7; otherwise the network will take those boxes as negative and will not be trained to refine them. The training of the two networks is carried out independently as they do not share layers. The training batch size is 128, with 50% being positive. Both CNNs are trained for 10K iterations with a constant learning rate of 0.0005. IV. EXPERIMENT RESULTS AND DISCUSSION To verify the flexibility of our approach, the pipeline is tested using PC-CNN [20] and MS-CNN [21]. The performance based on both networks is evaluated using the challenging KITTI dataset [1], which contains 7481 images for training/validation and 7518 images for testing. The training/validation set has annotated ground truth for 2D TABLE I: Average Precision benchmark for bird’s eye view and 3D box based on KITTI validation set. Bird’s Eye View Algorithm ∗ Mono3D [38] ∗ 3DOP [5] ∗∗ Deep3DBox [2] ∗ VeloFCN [12] ∗ MV3D [19] Ours (MS-CNN [21]) Ours (PC-CNN [20]) ∗ Easy 30.50 55.04 29.96 79.68 96.34 90.36 88.31 IoU = 0.5 Moderate 22.39 41.25 24.91 63.82 89.39 88.46 83.74 Hard 19.16 34.55 19.46 62.80 88.67 84.75 79.62 Easy 5.22 12.63 9.01 40.14 86.55 82.17 83.61 3D Box IoU = 0.7 Moderate 5.19 9.49 7.94 32.08 78.10 77.15 77.36 Hard 4.13 7.59 6.57 30.47 76.67 74.42 69.61 Easy 25.19 46.04 24.76 67.92 96.02 87.16 87.69 IoU = 0.5 Moderate 18.20 34.63 21.95 57.57 89.05 87.38 79.92 Hard 15.52 30.09 16.87 52.56 88.38 79.40 78.65 Easy 2.53 6.55 5.40 15.20 71.29 55.82 57.63 IoU = 0.7 Moderate 2.31 5.07 5.66 13.66 62.68 55.26 51.74 Hard 2.31 4.10 3.97 15.98 56.56 51.89 51.39 sources from [19] sources from [2], which uses different validation set, so its APs are calculated from the 1848 common images with our validation set. ∗∗ bounding box in the image plane and 3D bounding box in real world. Following [37], we split the training/validation set into training and validation sub-sets. The training sub-set is purely used to train the car dimension regression and twostage CNN while the validation sub-set is for evaluation only. KITTI divides the cars into easy, moderate and hard groups based on their visibilities. We follow this same convention for our evaluation. To further verify the performance of the proposed pipeline, we also tested it using our own autonomous vehicles. Metrics: The primary focus of this paper is on 3D detection, we do not evaluate the performance of the pipeline for 2D detection tasks. Following the evaluation metrics proposed in [19], we evaluate our proposal based on the Average Precession (AP) for bird’s eye view boxes and for 3D boxes. The bird’s eye view boxes are generated by projecting the 3D boxes on the same ground plane. The AP is calculated based on the IoU between the output boxes and the ground truth boxes, while in [5] and [3], the distance between two boxes are used. We feel that IoU is a more comprehensive index than distance, as it implicitly accounts for not only distance but also alignment and size. Bird’s Eye View & 3D Box AP: We compare the outputs from our pipeline with other algorithms which can output 3D box information, including Mono3D [38], 3DOP [5] and Deep3DBox [2] which use image data only, VeloFCN [12] which uses LiDAR data only and MV3D [19] which uses fusion. The IoU threshold for true positive detection is set at 0.5 and 0.7. The left part of TABLE I shows the results from bird’s eye view. In general, the point cloud based approaches all significantly lead the image-based approaches for both IoUs. Within the point cloud based approaches, our pipeline outperforms VeloFCN significantly but underperforms MV3D marginally. When IoU = 0.5, our performance with PC-CNN is about 7% worse on average than MV3D and 5% worse for MS-CNN. When IoU = 0.7, the performances with PC-CNN and MS-CNN are both very close to MV3D except for the performance with PC-CNN for the hard group (7% worse than MV3D). The 3D box detection comparisons are listed in the right part of TABLE I. Similarly for both IoU thresholds, our method significantly outperforms all the approaches with the single exception of MV3D. On average, the overall performance is about 10% worse than MV3D for both IoU = 0.5 and 0.7 except that the performance with MS-CNN for moderate group at IoU = 0.5 is only 1.6% less than MV3D. We only use point clouds to generate the 3D box and do not take any color information from the image into account. Comparing it to VeloFCN, which also only takes point clouds as inputs, shows the effectiveness of our approach, processing the point cloud as subsets instead of as a whole. Comparing to MV3D, image color information is necessary to further boost the performance of our pipeline. One possible solution is to extract the feature layer which is right before the ROI pooling layer in the 2D detection CNN. Based on the 3D box from the model fitting process, we could find its corresponding 2D box in the image plane and carry out ROI pooling on the extracted feature layer in order to extract the feature vector. Then fuse the feature vector with the one from the refinement CNN to output the final 3D box and its probability. Flexibility Anlysis: The comparison between the two approaches using the proposed pipeline verifies the flexibility of our pipeline. PC-CNN and MS-CNN have different network structures. But both approaches achieve comparable AP for the two tasks and IoU thresholds. Furthermore, the two-stage refinement CNN was trained based on the pipeline with PCCNN and re-used in the pipeline with MS-CNN without any further tuning on the network. This further confirms the flexibility and adaptability of our proposed pipeline. Car Dimension Regression Impact: We show the impact from the car dimension regression on the original 2D detection CNN in TABLE II. Similarly, AP is populated for the 2D detection task in image plane. Following KITTI, the IoU threshold is set at 0.7. The left part shows the performance of the original 2D detection CNN while the right part indicates the results after appending the car dimension regression term. The impact is not very significant for both networks, and it even improves the performance marginally for some groups. TABLE II: Impact on the original 2D detection CNN from appending the car dimension regression term. 2D Detection MS-CNN PC-CNN Easy 91.64 94.62 Original Moderate 89.95 89.60 Hard 79.55 79.97 With Dimension Regression Easy Moderate Hard 93.98 89.92 79.69 90.22 89.03 81.64 Fig. 4: Qualitative result illustration on KITTI data (top row) and Boston data (bottom row). Blue boxes are the 3D detection results. Ablation Study: To analyse the effectiveness of the steps involved in the 3D box generation, the AP is calculated after each step (model fitting, first stage CNN and second stage CNN) for both bird’s eye view and 3D box tasks. For this study, the IoU threshold is set to 0.5. Since the results based on MS-CNN and PC-CNN are quite comparable, only PCCNN results are presented in TABLE III. The results from the model fitting are not as good as the final oens, but they are better than all the image based algorithms in TABLE I and comparable to VeloFCN. This indicates that the model fitting algorithm can work properly. TABLE III: Ablation study based on KITTI validation set. Numbers indicate AP with IoU threshold at 0.5. Step Model fitting First CNN Second CNN Bird’s Eye View Easy Moderate Hard 77.71 73.27 70.06 88.16 83.60 79.65 88.31 83.74 79.62 Easy 56.32 87.51 87.69 3D Box Moderate 51.33 79.76 79.92 Hard 47.40 78.81 78.65 With the first CNN, the detection performance is improved significantly in both bird’s eye view and 3D box tasks. The improvement is ∼ 10% and ∼ 30% respectively. This shows that although only 2D convolution is used and the input 3D matrix is very sparse, the network is still very powerful and effective to locate the 3D box. The improvement from the second CNN is insignificant since it is not designed to regress the 3D box. It is designed to reshuffle the probability of the 3D box from the first CNN. Qualitative Results: The first row in Fig. 4 shows some of the 3D detection results by applying our pipeline with PCCNN on KITTI validation dataset. We also tested it using our own dataset collected at Boston USA. The setup of the data collection vehicle is similar to KITTI, with differences in the relative positions between the LiDAR, camera and the car. We applied the pipeline, which is trained based on KITTI training dataset, directly on the Boston data without any fine-tuning of the network weights. The system still works as shown in the second row of Fig. 4. It shows the generalisation capability of the proposed pipeline and indicates its potentials in executing 3D vehicle detection in real situations beyond a pre-designed dataset. Interested readers may refer to the link for video illustrations (https://www.dropbox.com/ s/5hzjvw911xa5mye/kitti_3d.avi?dl=0). V. CONCLUSIONS In this paper we propose a flexible 3D vehicle detection pipeline which is able to adopt the advantages of any 2D detection networks in order to provide 3D information. The effort to adapt the 2D networks to the pipeline is minimal. One additional regression term is needed at the network output to estimate vehicle dimensions. The pipeline also takes advantage of point clouds in 3D measurements. An effective model fitting algorithm based on generalised car models and score maps is proposed to fit the 3D bounding boxes from the point cloud. Finally a two-stage CNN is developed to fine tune the 3D box. The outstanding results based on two different 2D networks indicate the flexibility of the pipeline and its capability in 3D vehicle detection. ACKNOWLEDGMENT This research was supported by the National Research Foundation, Prime Minister’s Office, Singapore, under its CREATE programme, Singapore-MIT Alliance for Research and Technology (SMART) Future Urban Mobility (FM) IRG. We are grateful for their support. R EFERENCES [1] A. Geiger, P. Lenz, and R. Urtasun, “Are we ready for autonomous driving? the kitti vision benchmark suite,” in Conference on Computer Vision and Pattern Recognition (CVPR), 2012. [2] A. Mousavian, D. Anguelov, J. Flynn, and J. Kosecka, “3d bounding box estimation using deep learning and geometry,” arXiv preprint arXiv:1612.00496, 2016. [3] F. Chabot, M. Chaouch, J. Rabarisoa, C. Teulière, and T. Chateau, “Deep manta: A coarse-to-fine many-task network for joint 2d and 3d vehicle analysis from monocular image,” in CVPR, 2017. [4] V. Lepetit, F. Moreno-Noguer, and P. Fua, “Epnp: An accurate o (n) solution to the pnp problem,” International journal of computer vision, vol. 81, no. 2, pp. 155–166, 2009. [5] Y. Xiang, W. Choi, Y. Lin, and S. Savarese, “Data-driven 3d voxel patterns for object category recognition,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1903– 1911, 2015. [6] Y. Xiang, W. Choi, Y. Lin, and S. Savarese, “Subcategory-aware convolutional neural networks for object proposals and detection,” in Applications of Computer Vision (WACV), 2017 IEEE Winter Conference on, pp. 924–933, IEEE, 2017. [7] M. Zeeshan Zia, M. Stark, and K. Schindler, “Are cars just 3d boxes?jointly estimating the 3d shape of multiple objects,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3678–3685, 2014. [8] M. Zeeshan Zia, M. Stark, and K. Schindler, “Explicit occlusion modeling for 3d object class representations,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3326–3333, 2013. [9] C. C. Pham and J. W. Jeon, “Robust object proposals re-ranking for object detection in autonomous driving using convolutional neural networks,” Signal Processing: Image Communication, pp. –, 2017. [10] S. D. Pendleton, H. Andersen, X. Du, X. Shen, M. Meghjani, Y. H. Eng, D. Rus, and M. H. Ang, “Perception, planning, control, and coordination for autonomous vehicles,” Machines, vol. 5, no. 1, p. 6, 2017. [11] D. Z. Wang and I. Posner, “Voting for voting in online point cloud object detection.,” in Robotics: Science and Systems, 2015. [12] B. Li, T. Zhang, and T. Xia, “Vehicle detection from 3d lidar using fully convolutional network,” arXiv preprint arXiv:1608.07916, 2016. [13] B. Li, “3d fully convolutional network for vehicle detection in point cloud,” arXiv preprint arXiv:1611.08069, 2016. [14] M. Engelcke, D. Rao, D. Z. Wang, C. H. Tong, and I. Posner, “Vote3deep: Fast object detection in 3d point clouds using efficient convolutional neural networks,” in Robotics and Automation (ICRA), 2017 IEEE International Conference on, pp. 1355–1361, IEEE, 2017. [15] J. R. Schoenberg, A. Nathan, and M. Campbell, “Segmentation of dense range information in complex urban scenes,” in Intelligent Robots and Systems (IROS), 2010 IEEE/RSJ International Conference on, pp. 2033–2038, IEEE, 2010. [16] L. Xiao, B. Dai, D. Liu, T. Hu, and T. Wu, “Crf based road detection with multi-sensor fusion,” in Intelligent Vehicles Symposium (IV), 2015 IEEE, pp. 192–198, IEEE, 2015. [17] A. Eitel, J. T. Springenberg, L. Spinello, M. Riedmiller, and W. Burgard, “Multimodal deep learning for robust rgb-d object recognition,” in Intelligent Robots and Systems (IROS), 2015 IEEE/RSJ International Conference on, pp. 681–687, IEEE, 2015. [18] J. Schlosser, C. K. Chow, and Z. Kira, “Fusing lidar and images for pedestrian detection using convolutional neural networks,” in Robotics and Automation (ICRA), 2016 IEEE International Conference on, pp. 2198–2205, IEEE, 2016. [19] X. Chen, H. Ma, J. Wan, B. Li, and T. Xia, “Multi-view 3d object detection network for autonomous driving,” in CVPR, 2017. [20] X. Du, M. H. A. Jr., and D. Rus, “Car detection for autonomous vehicle: Lidar and vision fusion approach through deep learning framework,” in Intelligent Robots and Systems (IROS), 2017 IEEE/RSJ International Conference on, IEEE, 2017. [21] Z. Cai, Q. Fan, R. S. Feris, and N. Vasconcelos, “A unified multiscale deep convolutional neural network for fast object detection,” in European Conference on Computer Vision, pp. 354–370, Springer, 2016. [22] J. Ren, X. Chen, J. Liu, W. Sun, J. Pang, Q. Yan, Y.-W. Tai, and L. Xu, “Accurate single stage detector using recurrent rolling convolution,” in CVPR, 2017. [23] F. Yang, W. Choi, and Y. Lin, “Exploit all the layers: Fast and accurate cnn object detector with scale dependent pooling and cascaded rejection classifiers,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2129–2137, 2016. [24] J. Redmon and A. Farhadi, “Yolo9000: Better, faster, stronger,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. [25] W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. Reed, C.-Y. Fu, and A. C. Berg, “Ssd: Single shot multibox detector,” in European Conference on Computer Vision, pp. 21–37, Springer, 2016. [26] B. Pepik, M. Stark, P. Gehler, and B. Schiele, “Teaching 3d geometry to deformable part models,” in Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pp. 3362–3369, IEEE, 2012. [27] D. Forsyth, “Object detection with discriminatively trained part-based models,” Computer, vol. 47, no. 2, pp. 6–7, 2014. [28] J. J. Yebes, L. M. Bergasa, R. Arroyo, and A. Lázaro, “Supervised learning and evaluation of kitti’s cars detector with dpm,” in Intelligent Vehicles Symposium Proceedings, 2014 IEEE, pp. 768–773, IEEE, 2014. [29] B. Pepik, M. Stark, P. Gehler, and B. Schiele, “Multi-view and 3d deformable part models,” IEEE transactions on pattern analysis and machine intelligence, vol. 37, no. 11, pp. 2232–2245, 2015. [30] S. Fidler, S. Dickinson, and R. Urtasun, “3d object detection and viewpoint estimation with a deformable 3d cuboid model,” in Advances in neural information processing systems, pp. 611–619, 2012. [31] M. Z. Zia, M. Stark, B. Schiele, and K. Schindler, “Detailed 3d representations for object recognition and modeling,” IEEE transactions on pattern analysis and machine intelligence, vol. 35, no. 11, pp. 2608– 2623, 2013. [32] R. Girshick, “Fast r-cnn,” in Proceedings of the IEEE International Conference on Computer Vision, pp. 1440–1448, 2015. [33] L.-C. Chen, S. Fidler, A. L. Yuille, and R. Urtasun, “Beat the mturkers: Automatic image labeling from weak 3d supervision,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3198–3205, 2014. [34] S. Bell, C. Lawrence Zitnick, K. Bala, and R. Girshick, “Inside-outside net: Detecting objects in context with skip pooling and recurrent neural networks,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2874–2883, 2016. [35] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” arXiv preprint arXiv:1409.1556, 2014. [36] D.-A. Clevert, T. Unterthiner, and S. Hochreiter, “Fast and accurate deep network learning by exponential linear units (elus),” arXiv preprint arXiv:1511.07289, 2015. [37] X. Chen, K. Kundu, Y. Zhu, A. G. Berneshawi, H. Ma, S. Fidler, and R. Urtasun, “3d object proposals for accurate object class detection,” in Advances in Neural Information Processing Systems, pp. 424–432, 2015. [38] X. Chen, K. Kundu, Z. Zhang, H. Ma, S. Fidler, and R. Urtasun, “Monocular 3d object detection for autonomous driving,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2147–2156, 2016.
1cs.CV
On the Information Dimension of Multivariate Gaussian Processes Bernhard C. Geiger∗ , Tobias Koch†‡ ∗ Signal arXiv:1712.07863v1 [cs.IT] 21 Dec 2017 † Signal Processing and Speech Communication Laboratory, Graz University of Technology, Graz, Austria Theory and Communications Department, Universidad Carlos III de Madrid, 28911, Leganés, Spain ‡ Gregorio Marañón Health Research Institute, 28007, Madrid, Spain. Emails: [email protected], [email protected] Abstract—The authors have recently defined the Rényi information dimension rate d({Xt }) of a stationary stochastic process {Xt , t ∈ Z} as the entropy rate of the uniformly-quantized process divided by minus the logarithm of the quantizer step size 1/m in the limit as m → ∞ (B. Geiger and T. Koch, “On the information dimension rate of stochastic processes,” in Proc. IEEE Int. Symp. Inf. Theory (ISIT), Aachen, Germany, June 2017). For Gaussian processes with a given spectral distribution function FX , they showed that the information dimension rate equals the Lebesgue measure of the set of harmonics where the derivative of FX is positive. This paper extends this result to multivariate Gaussian processes with a given matrix-valued spectral distribution function FX . It is demonstrated that the information dimension rate equals the average rank of the derivative of FX . As a side result, it is shown that the scale and translation invariance of information dimension carries over from random variables to stochastic processes. I. I NTRODUCTION In 1959, Rényi [1] proposed the information dimension and the d-dimensional entropy to measure the information content of general random variables (RVs). In recent years, it was shown that the information dimension is of relevance in various areas of information theory, including rate-distortion theory, almost lossless analog compression, or the analysis of interference channels. For example, Kawabata and Dembo [2] showed that the information dimension of a RV is equal to its rate-distortion dimension, defined as twice the rate-distortion function R(D) divided by − log(D) in the limit as D ↓ 0. Koch [3] demonstrated that the rate-distortion function of a source with infinite information dimension is infinite, and that for any source with finite information dimension and finite differential entropy the Shannon lower bound on the rate-distortion function is asymptotically tight. Wu and Verdú [4] analyzed both linear encoding and Lipschitz decoding of discrete-time, independent and identically distributed (i.i.d.), stochastic processes and showed that the information dimension plays a fundamental role in achievability and converse The work of Bernhard C. Geiger has been funded by the Erwin Schrödinger Fellowship J 3765 of the Austrian Science Fund. The work of Tobias Koch has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement number 714161), from the Spanish Ministerio de Economı́a y Competitividad under Grants TEC2013-41718-R, RYC-2014-16332 and TEC2016-78434-C3-3-R (AEI/FEDER, EU), and from the Comunidad de Madrid under Grant S2103/ICE-2845. results. Wu et al. [5] showed that the degrees of freedom of the K-user Gaussian interference channel can be characterized through the sum of information dimensions. Stotz and Bölcskei [6] later generalized this result to vector interference channels. In [7], [8], we proposed the information dimension rate as a generalization of information dimension from RVs to univariate (real-valued) stochastic processes. Specifically, consider the stationary process {Xt , t ∈ Z}, and let {[Xt ]m , t ∈ Z} be the process obtained by uniformly quantizing {Xt } with step size 1/m. We defined the information dimension rate d({Xt }) of {Xt } as the entropy rate of {[Xt ]m } divided by log m in the limit as m → ∞ [8, Def. 2]. We then showed that, for any stochastic process, d({Xt }) coincides with the ratedistortion dimension of {Xt } [8, Th. 5]. We further showed that for stationary Gaussian processes with spectral distribution function FX , the information dimension rate d({Xt }) equals the Lebesgue measure of the set of harmonics on [−1/2, 1/2] where the derivative of FX is positive [8, Th. 7]. This implies an intuitively appealing connection between the information dimension rate of a stochastic process and its bandwidth. In this work, we generalize our definition of d({Xt }) to multivariate processes. Consider the L-variate (real-valued) stationary process {X t }, and let {[X t ]m } be the process obtained by quantizing every component process of {X t } uniformly with step size 1/m. As in the univariate case, the information dimension rate d({X t }) of {X t } is defined as the entropy rate of {[X t ]m } divided by log m in the limit as m → ∞. Our main result is an evaluation of d({X t }) for L-variate Gaussian processes with (matrix-valued) spectral distribution function FX . We demonstrate that in this case d({X t }) equals the Lebesgue integral of the rank of the derivative of FX . As a corollary, we show that the information dimension rate of univariate complex-valued Gaussian processes is maximized if the process is proper, in which case it is equal to twice the Lebesue measure of the set of harmonics where the derivative of its spectral distribution function FX is positive. As side results, we show that d({X t }) is scale and translation invariant. These properties are known for the information dimension of RVs (cf. [9, Lemma 3]), but they do not directly carry over to our definition of d({X t }), which is why we state them explicitly in this paper. II. N OTATION AND P RELIMINARIES A. Notation We denote by R, C, and Z the set of real numbers, the set of complex numbers, and the set of integers, respectively. We use a calligraphic font, such as F , to denote other sets, and we denote complements as F c . The real and imaginary part of a complex number z are denoted as Re(z) and√Im(z), respectively, i.e., z = Re(z) + ıIm(z) where ı = −1. The complex conjugate of z is denoted as z ∗ . We use upper case letters to denote deterministic matrices and boldface lower case letters to denote deterministic vectors. The transpose of a vector or matrix is denoted by (·)T ; the Hermitian transpose by (·)H . The determinant of a matrix A is detA. We denote RVs by upper case letters, e.g., X. For a finite or countably infinite collection of RVs we abbreviate Xℓk , (Xℓ , . . . , Xk−1 , Xk ), Xℓ∞ , (Xℓ , Xℓ+1 , . . . ), k and X−∞ , (. . . , Xk−1 , Xk ). Random vectors are denoted by boldface upper case letters, e.g., X , (X1 , . . . , XL )T . Univariate discete-time stochastic processes are denoted as {Xt , t ∈ Z} or, in short, as {Xt }. For L-variate stochastic processes we use the same notation but with Xt replaced by X t , (X1,t , . . . , XL,t ). We call {Xi,t , t ∈ Z} a component process. We define the quantization of X with precision m as [X]m , ⌊mX⌋ m (1) where ⌊a⌋ is the largest integer less than or equal to a. Likewise, ⌈a⌉ denotes the smallest integer greater than or equal to a. We denote by [Xℓk ]m = ([Xℓ ]m , . . . , [Xk ]m ) the component-wise quantization of Xℓk (and similarly for other finite or countably infinite collections of RVs and random vectors). Likewise, for complex RVs Z with real part R and imaginary part I, the quantization [Z]m is equal to [R]m + ı[I]m . We define C(z1k , a) , [z1 , z1 + a) × · · · × [zk , zk + a). Thus, C(z1k , a) is a k-dimensional hypercube in Rk , with its bottom-left corner at z1k and with side length a. For example, we have that [X1k ]m = z1k if and only if X1k ∈ C(z1k , 1/m). Let H(·), h(·), and D(·k·) denote entropy, differential entropy, and relative entropy, respectively, and let I(·; ·) denote the mutual information [10]. We take logarithms to base e ≈ 2.718, so mutual informations and entropies have dimension nats. The entropy rate of a discrete-valued, stationary L-variate stochastic process {X t } is [10, Th. 4.2.1] H(X k1 ) . H ′ ({X t }) , lim k→∞ k (2) B. Information Dimension of RVs Rényi defined the information dimension of a collection of RVs Xℓk as [1]  H [Xℓk ]m k d(Xℓ ) , lim (3) m→∞ log m provided the limit exists. If the limit does not exist, one can define the upper and lower information dimension d(Xℓk ) and d(Xℓk ) by replacing the limit with the limit superior and limit inferior, respectively. If a result holds for both the limit superior and the limit inferior but it is unclear whether the limit exists, then we shall write d(Xℓk ). We shall follow this notation throughout this document: an overline (·) indicates that the quantity in the brackets has been computed using the limit superior over m, an underline (·) indicates that it has been computed using the limit inferior, both an overline and an underline (·) indicates that a result holds irrespective of whether the limit  superior or limit inferior over m is taken. If H [Xℓk ]1 < ∞, then [1, Eq. 7], [4, Prop. 1] 0 ≤ d(Xℓk ) ≤ d(Xℓk ) ≤ k − ℓ + 1. (4)  If H [Xℓk ]1 = ∞, then d(Xℓk ) = ∞. As shown in [9, Lemma 3], information dimension is invariant under scaling and translation, i.e., d(a · Xℓk ) = d(Xℓk ) and d(Xℓk + c) = d(Xℓk ) for every a 6= 0 and c ∈ Rk−ℓ+1 . III. I NFORMATION D IMENSION OF U NIVARIATE P ROCESSES In [7], [8], we generalized (3) by defining the information dimension rate of a univariate stationary process {Xt } as  H [X1k ]m H ′ ({[Xt ]m }) = lim lim d({Xt }) , lim m→∞ k→∞ m→∞ log m k log m (5) provided the limit exists. (The limit over k exists by stationarity.) If H ([X1 ]1 ) < ∞, then [8, Lemma 4] 0 ≤ d({Xt }) ≤ d({Xt }) ≤ 1; (6) if H ([X1 ]1 ) = ∞, then d({Xt }) = ∞. Moreover, the information dimension rate of the process cannot exceed the information dimension of the marginal RV, i.e., d({Xt }) ≤ d(X1 ). (7) Kawabata and Dembo [2, Lemma 3.2] showed that the information dimension of a RV equals its rate-distortion dimension. By emulating the proof of [2, Lemma 3.2], we generalized this result to stationary processes by demonstrating that the information dimension rate is equal to the ratedistortion dimension. Specifically, let R(X1k , D) denote the rate-distortion function of the k-dimensional source X1k , i.e., R(X1k , D) , inf E[kX̂1k −X1k k2 ]≤D I(X1k ; X̂1k ) (8) where the infimum is over all conditional distributions of X̂1k given X1k such that E[kX̂1k − X1k k2 ] ≤ D (where k · k denotes the Euclidean norm). The rate-distortion dimension of the stationary process {Xt } is defined as R(X1k , kD) D↓0 k→∞ −k log D dimR ({Xt }) , 2 lim lim (9) provided the limit as D ↓ 0 exists. By stationarity, the limit over k always exists [11, Th. 9.8.1]. We showed that [8, Th. 5] dimR ({Xt }) = d({Xt }). (10) This result directly generalizes to non-stationary process (possibly with the limit over k replaced by the limit superior or limit inferior). IV. I NFORMATION D IMENSION OF M ULTIVARIATE P ROCESSES Now let z1k ∈ Zk . We have In this section, we generalize the definition of the information dimension rate (5) to multivariate (real-valued) processes and study its properties. Definition 1 (Information Dimension Rate): The information dimension rate of the L-variate, stationary process {X t } is H ′ ({[X t ]m }) m→∞ log m  k k H [X1,1 ]m , . . . , [XL,1 ]m = lim lim m→∞ k→∞ k log m H k [a1 X1,1 ]m k [X1,1 ]m zk = 1 m !   zk 1 k k ) = H [a1 X1,1 ]m X1,1 ∈ C( m1 , m   k k = H ⌊a1 mX1,1 ⌋ a1 mX1,1 ∈ C(a1 z1k , a1 ) ≤ k log (⌈a1 ⌉ + 1) . d({X t }) , lim (11) provided the limit over m exists. We next summarize some basic properties of the information dimension rate. Lemma 1 (Finiteness and Bounds): Let {X t } be a stationary, L-variate process. If H ([X 1 ]1 ) < ∞, then 0 ≤ d({X t }) ≤ d(X 1 ) ≤ L. the chain rule, and the fact that conditioning reduced entropy, we have  k k H [a1 X1,1 ]m , [a2 X2,1 ]m  k k k k ≤ H [a1 X1,1 ]m , [a2 X2,1 ]m , [X1,1 ]m , [X2,1 ]m  k k = H [X1,1 ]m , [X2,1 ]m  k k k k + H [a1 X1,1 ]m , [a2 X2,1 ]m [X1,1 ]m , [X2,1 ]m   k k k k ]m ]m [X1,1 ≤ H [X1,1 ]m , [X2,1 ]m + H [a1 X1,1  k k (14) + H [a2 X2,1 ]m [X2,1 ]m (12) If H ([X 1 ]1 ) = ∞, then d({X t }) = ∞. Proof: Suppose first that H ([X 1 ]1 ) < ∞. Then, the rightmost inequality in (12) follows from (4). The leftmost inequality follows from the nonnegativity of entropy. Finally, the center inequality follows since conditioning reduces entropy, hence H ′ ({[X t ]m }) ≤ H ([X 1 ]m ). Now suppose that H ([X 1 ]1 ) = ∞. By stationarity and since [X 1 ]1 is a function of [X k1 ]m for every m and every k, we have   (13) H ([X 1 ]1 ) ≤ H [X k1 ]m . This implies that H ′ ({[X t ]m }) = ∞ and the claim d({X t }) = ∞ follows from Definition 1. It was shown in [9, Lemma 3] that information dimension is invariant under scaling and translation. The same properties hold for the information dimension rate. Lemma 2 (Scale Invariance): Let {X t } be a stationary, Lvariate process and let ai > 0, i = 1, . . . , L. Further let Yi,t , ai Xi,t , i = 1, . . . , L, t ∈ Z. Then, d({Y t }) = d({X t }). Proof: We show the proof for L = 2 by adapting the proof of [4, Lemma 16]. The proof for higher-dimensional processes follows along the same lines. By the data processing inequality, (15) where the last inequality follows because flooring numbers from an interval of length a1 yields at most ⌈a1 ⌉ + 1 different integers. Combining (15) with (14), dividing by k, and letting k tend to infinity yields H ′ ({[a1 X1,t ]m }, {[a2 X2,t ]m }) ≤ H ′ ({[X1,t ]m }, {[X2,t ]m }) + log(⌈a1 ⌉ + 1) + log(⌈a2 ⌉ + 1). (16) Dividing by log m and letting m tend to infinity yields d({Y t }) ≤ d({X t }). The reverse inequality is obtained by noting that a11 a1 X1,t = X1,t , so the above steps with (a1 , a2 ) replaced by (1/a1 , 1/a2 ) yield H ′ ({[a1 X1,t ]m }, {[a2 X2,t ]m }) ≥ H ′ ({[X1,t ]m }, {[X2,t ]m }) − log(⌈1/a1 ⌉ + 1) − log(⌈1/a2 ⌉ + 1). Thus, we obtain d({Y t }) ≥ d({X t }) by dividing by log m and by letting m tend to infinity. Lemma 3 (Translation Invariance): Let {X t } be a stationary, L-variate process and let {ct }, t ∈ Z be a sequence of L-dimensional vectors. Then, d({X t + ct }) = d({X t }). Proof: The lemma follows from [9, Lemma 30], which states that kL X   log(1 + Ai + Bi ) |H U1kL − H V1kL | ≤ (17) i=1 for any collection of integer-valued RVs U1kL and V1kL satisfying almost surely −Bi ≤ Ui − Vi ≤ Ai , i = 1, . . . , kL. Applying this result with UℓL+j = ⌊mXℓ,j + mcℓ,j ⌋ and VℓL+j = ⌊mXℓ,j ⌋ + ⌊mcℓ,j ⌋ gives the desired result. Indeed, we have that −1 ≤ UℓL+j − VℓL+j ≤ 2, so (17) yields     (18) H [X k1 ]m − H [X k1 + ck1 ]m ≤ kL log(4). We thus obtain |d({X t }) − d({X t + ct })| = 0 by dividing (18) by k log m and by letting k and m tend to infinity. We finally observe that the information dimension rate of a stationary stochastic process equals its rate-distortion dimension. This generalizes [8, Th. 5] to multivariate processes. Theorem 1: Let {X t } be an L-variate stationary process. Then, d({X t }) = dimR {X t } (19) where dimR {X t } is defined as in (9) but with {Xt } replaced by {X t }. Proof: The proof is analog to that of [2, Lemma 3.2] and [8, Th. 5]. √ We thus only provide a short sketch. We have with m = 1/ D and from [8, Eq. (71) & (81)] that ! ∞   X 2 e−i H [X k1 ]m − 2k 1 + i=0   ≤ R(X k1 , kLD) ≤ H [X k1 ]m . (20) Dividing by k and taking the limit inferior and limit superior as k → ∞, we get ! ∞ X −i2 ′ e H ({[X t ]m }) − 2 1 + i=0 R(X k1 , kLD) ≤ lim k→∞ k ≤ H ′ ({[X t ]m }) (21) (22) and proves (19). V. I NFORMATION D IMENSION OF G AUSSIAN P ROCESSES Let {X t } be a stationary, L-variate, real-valued Gaussian process with mean vector µ and (matrix-valued) spectral distribution function (SDF) θ 7→ FX (θ). Thus, FX is bounded, non-decreasing, and right-continuous on [−1/2, 1/2], and it satisfies [12, (7.3), p. 141] Z 1/2 KX (τ ) = e−ı2πτ θ dFX (θ), τ ∈ Z (23) −1/2 where KX (τ ) , E [(X t+τ − µ)(X t − µ)T ] denotes the autocovariance function. It can be shown that θ 7→ FX (θ) has a derivative almost everywhere, which has positive semidefinite, Hermitian values [12, (7.4), p. 141]. We shall denote ′ the derivative of FX by FX . Further note that the (i, j)-th element of FX is the cross SDF θ 7→ FXi Xj of the component processes {Xi,t } and {Xj,t }, i.e., Z 1/2 (24) e−ı2πτ θ dFXi Xj (θ), τ ∈ Z KXi Xj (τ ) = −1/2 ′ d({Xt }) = λ({θ: FX (θ) > 0}). (25) This result can be directly generalized to the multivariate case where the component processes are independent. Indeed, suppose that {X t } is a collection of L independent Gaussian processes {Xi,t , t ∈ Z} with SDFs FXi . This corresponds to the case where the (matrix-valued) SDF is a diagonal matrix with the SDFs of the individual processes on the main diagonal. For independent processes, the joint entropy rate can be written as the sum of the entropy rates of the component processes. It follows that d({X t }) = L X i=1 d({Xi,t }) = L X ′ (θ) > 0}). (26) λ({θ : FX i i=1 The expression on the right-hand side (RHS) of (26) can alternatively be written as Z 1/2 Z 1/2 X L ′ ′ (θ) > 0}dθ = rank(FX (θ))dθ (27) 1{FX i −1/2 −1/2 i=1 where the limit exists because {X t } is stationary. We now divide the outer terms of this inequality by log m and the inner term by − 21 log D, and take the limits as m → ∞ and D ↓ 0, respectively. This yields d({X t }) ≤ dimR {X t } ≤ d({X t }) where KXi Xj (τ ) , E [(Xi,t+τ − µi )(Xj,t − µj )] denotes the cross-covariance function. For univariate stationary Gaussian processes with SDF FX , we have shown that the information dimension rate is equal to the Lebesgue measure of the set of harmonics on [−1/2, 1/2] where the derivative of FX is is positive [8, Th. 7], i.e., where 1{·} is the indicator function. Observe that it is immaterial at which frequencies the component processes contain signal power. For example, the information dimension rate of two independent Gaussian processes with bandwidth 1/4 equals 1 regardless of where the derivatives of their SDFs have their support. The following theorem shows that this result continuous to hold for general L-variate Gaussian processes. Theorem 2: Let {X t } be a stationary, L-variate Gaussian process with mean vector µ and SDF FX . Then, Z 1/2 ′ rank(FX (θ))dθ. (28) d({X t }) = −1/2 Proof: See Appendix A. An important ingredient in the proof is the following generalization of [8, Lemma 6]. Lemma 4: Let {X t } be an L-variate, stationary Gaussian process with mean vector µ and SDF FX (θ). Then, the (i, j)th entry of the SDF θ 7→ F[X]m (θ) of {[X t ]m }, i.e., the satisfies for i, j = 1, . . . , L, F[Xi ]m [Xj ]m (θ) = (ai + aj − 1)FXi Xj (θ) + FNi Nj (θ) (29) where Ni,t , Xi,t − [Xi,t ]m and where ai , 1 E [(Xj,t − µj )([Xi,t ]m − E [[Xi,t ]m ])] . σi2 (30) For every i = 1, . . . , L, we have 1 |1 − ai | ≤ m s 2 πσi2 (31) and Z 1/2 1 dFNi (θ) ≤ 2 . m −1/2 (32) Moreover, if all component processes have unit variance, then a1 = . . . = aL and hence F[X]m (θ) = (2a1 − 1)FX (θ) + FN (θ). (33) Proof: Let Zi,t , [Xi,t ]m . For every pair i, j = 1, . . . , L, we have with [8, (83)] KNi Nj (τ ) =KXi Xj (τ ) + KZi Zj (τ ) − KXi Zj (τ ) − KZi Xj (τ ). (34) From Bussgang’s theorem [13, eq. (19)] we have that KXi Zj (τ ) = KZj Xi (−τ ) = aj KXi Xj (τ ). This implies that KNi Nj (τ ) = KXi Xj (τ ) + KZi Zj (τ ) − aj KXi Xj (τ ) − ai KXj Xi (−τ ) = (1 − aj − ai )KXi Xj (τ ) + KZi Zj (τ ). (35) Since the SDM is fully determined by the covariance structure of a process, we obtain (29). Equations (31) and (32) follow immediately from equations (35) and (36) in [8, Lemma 6]. VI. I NFORMATION D IMENSION OF C OMPLEX G AUSSIAN P ROCESSES Theorem 2 allows us to study the information dimension of stationary, univariate, complex-valued Gaussian processes by treating them as bivariate, real-valued processes. Let {Zt } be a stationary, univariate, complex-valued, Gaussian process with mean µ and SDF FZ , i.e., Z 1/2 KZ (τ ) = e−ı2πτ θ dFZ (θ), τ ∈ Z (36) −1/2 where KZ (τ ) , E [(Zt+τ − µ)(Zt − µ)∗ ] is the autocovariance function. Alternatively, {Zt } can be expressed in terms of its real and imaginary part. Indeed, let Zt = Rt + ıIt , t ∈ Z. The stationary, bivariate, real-valued process {(Rt , It ), t ∈ Z} is jointly Gaussian and has SDF   FR (θ) FRI (θ) F(R,I) (θ) = , −1/2 ≤ θ ≤ 1/2 FIR (θ) FI (θ) (37) where FR and FI are the SDFs of {Rt } and {It }, respectively, and FRI and FIR are the cross SDFs between {Rt } and {It }. The derivatives of FZ and F(R,I) are connected as follows:  ′ ′ FZ′ (θ) = FR′ (θ) + FI′ (θ) + ı FIR (θ) − FRI (θ)  ′ = FR′ (θ) + FI′ (θ) + 2Im FRI (θ) (38) ′ where the last equality follows because F(R,I) is Hermitian. ′ It can be further shown that θ 7→ FR (θ) and θ 7→ FI′ (θ) are ′ real-valued and symmetric, and that θ 7→ Im FRI (θ) is antisymmetric. A stationary, complex-valued process {Zt } is said to be proper if its mean µ and its pseudo-autocovariance function KZ (τ ) , E [(Zt+τ − µ)(Zt − µ)] , τ ∈Z are both zero [14, Def. 17.5.4]. Since, by Lemma 3, the information dimension rate is independent of µ, we shall slightly abuse notation and say that a stationary, complexvalued process is proper if its pseudo-autocovariance function is identically zero, irrespective of its mean. Properness implies that, for all θ, FR (θ) = FI (θ) and FRI (θ) = −FIR (θ). ′ Since θ 7→ F(R,I) (θ) is Hermitian, this implies that for a proper process the derivative of the cross SDF FRI is purely imaginary. The following corollary to Theorem 2 shows that proper Gaussian processes maximize information dimension. This parallels the result that proper Gaussian vectors maximize differential entropy [15, Th. 2]. Corollary 1: Let {Zt } be a stationary, complex-valued Gaussian process with mean µ and SDF FZ . Then d({Zt }) ≤ 2 · λ({θ: FZ′ (θ) > 0}) with equality if {Zt } is proper. Proof: We know from Theorem 2 that Z 1/2 ′ (θ))dθ. d({Zt }) = rank(F(R,I) (39) (40) −1/2 ′ For a given θ, the eigenvalues of F(R,I) (θ) are given by r (FR′ (θ) − FI′ (θ))2 FR′ (θ) + FI′ (θ) ′ (θ)|2 . (41) ± + |FRI 2 4 ′ Since F(R,I) (θ) is positive semi-definite, these eigenvalues are nonnegative and ′ FR′ (θ)FI′ (θ) ≥ |FRI (θ)|2 . (42) In particular, the larger of these eigenvalues, say µ1 (θ), is zero on F1 , {θ : FR′ (θ) = FI′ (θ) = 0}. (43) The smaller eigenvalue, µ2 (θ), is zero on  ′ F2 , θ : FR′ (θ)FI′ (θ) = |FRI (θ)|2 . (44) Clearly, F1 ⊆ F2 . By (40), we have that d({Zt }) = λ({θ: µ1 (θ) > 0}) + λ({θ: µ2 (θ) > 0}) = 1 − λ(F1 ) + 1 − λ(F1 ) − λ(F1c ∩ F2 ). (45) We next note that, by (38) and (42), the derivative FZ′ (θ) is zero if either FR′ (θ) = FI′ (θ) = 0 or if FR′ (θ) + FI′ (θ) > 0 ′ and FR′ (θ) + FI′ (θ) = −2Im(FRI (θ)). Since θ 7→ FR′ (θ) ′ ′ and θ 7→ FI (θ) are symmetric and θ 7→ Im(FRI ) is antic symmetric, it follows that for any θ ∈ F1 satisfying FR′ (θ) + ′ FI′ (θ) = −2Im(FRI (θ)) we have that FR′ (−θ) + FI′ (−θ) = ′ 2Im(FRI (−θ)). Thus, defining  ′ F3 , θ : FR′ (θ) + FI′ (θ) = 2|Im(FRI (θ))| (46) we can express the Lebesgue measure of the set of harmonics where FZ′ (θ) = 0 as 1 λ({θ: FZ′ (θ) = 0}) = λ(F1 ) + λ(F1c ∩ F3 ). 2 (47) Combining (45) and (47), we obtain d({Zt }) = 2λ({θ : FZ′ (θ) > 0}) + λ(F1c ∩ F3 ) − λ(F1c ∩ F2 ). (48) Since the arithmetic mean is greater than or equal to the geometric mean, and using (42), we have that (FR′ (θ) + FI′ (θ))2 ≥ 4FR′ (θ)FI′ (θ) ′ ′ ≥ 4|FRI (θ)|2 ≥ 4Im(FRI (θ))2 . (49) Hence, F3 ⊆ F2 which implies that the difference of the last two Lebesgue measures on the RHS of (48) is less than or equal to zero. This proves (39). If {Zt } is proper, then we have FR′ (θ) = FI′ (θ) ′ ′ and |FRI (θ)| = |Im(FRI (θ))| for almost all θ. In this ′ ′ ′ case, FR (θ)FI (θ) = |FRI (θ)|2 implies FR′ (θ) + FI′ (θ) = ′ 2|Im(FRI (θ))|, so F2 ⊆ F3 . It follows that F2 = F3 and the difference of the last two Lebesgue measures on the RHS of (48) is zero. Hence, (39) holds with equality. Remark 1: There are also non-proper processes for which (39) holds with equality. For example, this is the case for any stationary Gaussian process for which real and imaginary ′ parts are independent, i.e., FRI (θ) = 0, and FR′ and FI′ have matching support but are different otherwise. VII. C ONCLUSION We proposed a generalization of information dimension to multivariate, stationary processes. Specifically, if {X t } is an L-variate, stationary process, then we defined its information dimension rate d({X t }) as the entropy rate H ′ ([X t ]m ) divided by log m in the limit as m → ∞. We demonstrated that the information dimension rate is bounded if [X 1 ]1 has finite entropy and that it is invariant under scaling and translation. We furthermore showed that d({X t }) coincides with the ratedistortion dimension, thus generalizing our result for univariate processes [8, Th. 5]. Our main result concerns the information dimension rate of L-variate, stationary, Gaussian processes with (matrix-valued) spectral distribution function FX . We showed that in this case d({X t }) equals the Lebesgue integral of the rank of the derivative of FX , i.e., Z 1/2 ′ rank(FX (θ))dθ. (50) d({X t }) = −1/2 As a corollary, we showed that the information dimension rate of a univariate complex-valued Gaussian process {Xt } is upper-bounded by twice the Lebesgue measure of the support of the derivative of its spectral distribution function FX . This upper bound is achieved if, but not only if, the Gaussian process is proper. P ROOF A PPENDIX A OF THE M AIN R ESULT The proof follows along the lines of [8, Th. 7]. We adopt the following notation. For every i, we define Ni,t , Xi,t − [Xi,t ]m . Let Ui,t be i.i.d. (over all i and t) and uniformly distributed on [0, 1/m), and let Wi,t , [Xi,t ]m + Ui,t . We define {[X t ]m }, {N t }, and {U t } as corresponding multivariate processes. Since {Ui,t } is independent of {[Xj,t ]m } for every i, j, the (matrix-valued) SDFs of {W t }, {[X t ]m }, and {U t } satisfy FW (θ) = F[X]m (θ) + FU (θ), −1/2 ≤ θ ≤ 1/2. (51) Moreover, the (matrix-valued) power spectral density (PSD) of 1 {U t } exists and equals SU (θ) = 12m 2 IL , where IL denotes the L × L identity matrix. We next note that since the information dimension rate is translation invariant (Lemma 3) and since the SDF FX does not depend on the mean vector µ, we can assume without loss of generality that {X t } has zero mean. We moreover show in Lemma 5 in Appendix B that we can assume, without loss of generality, that every component process of {X t } has unit variance. Indeed, if all component processes have positive variance, then this follows immediately from Lemma 2. Lemma 5 expands upon Lemma 2 in that it shows that 1) normalizing component processes to unit variance does not affect the rank of FX and 2) component processes with zero variance need not be considered in computing d({X t }) or the rank of FX . With this assumption and the notation introduced above, we write the entropy of [X k1 ]m in terms of a differential entropy, i.e.,     (52) H [X k1 ]m = h W k1 + kL log m. Denoting by (W k1 )G a Gaussian vector with the same mean and covariance matrix as W k1 , and denoting by fW k1 and gW k1 the probability density functions (pdfs) of W k1 and (W k1 )G , respectively, this can be expressed as   H([X k1 ]m ) = h (W k1 )G + D(fW k1 kgW k1 ) + kL log m. (53) Dividing by k log m and letting first k and then m tend to infinity yields the information dimension rate d({X t }). Lemma 6 in Appendix B shows that D(fW k1 kgW k1 ) ≤ kK (54) for some constant K that is independent of (k, m). Moreover, the differential entropy rate of the stationary, L-variate Gaussian process {W t } is given by [12, Th. 7.10]   h (W k1 )G lim k→∞ k Z 1 1/2 L ′ = log(2πe) + log detFW (θ)dθ. (55) 2 2 −1/2 It thus follows that the information dimension rate of {X t } equals Z 1/2 1 ′ d({X t }) = L + lim log detFW (θ)dθ. (56) m→∞ 2 log m −1/2 where the last step is due to (32) in Lemma 4. Since, by (31) in the same lemma, a1 → 1 with m → ∞, we have Z ′ log detFW (θ)dθ ≤ −Lλ(FΥ ) log (λ(FΥ )) (63) lim It remains to show that the RHS of (56) is equal to the RHS of (28). To do so, we first show that the integral on the RHS c of (56) can be restricted to a subset FΥ ⊆ [−1/2, 1/2] on ′ which the entries of FN (θ) are bounded from above by Υ/m2 ′ for some Υ > 0. We then show that, on this set, detFW (θ) can be bounded from above and from below by products of ′ affine transforms of the eigenvalues of FX (θ). These bounds are asymptotically tight, i.e., they are equal in the limit as m tends to infinity. We complete the proof by showing that the order of limit and integration can be exchanged. where lim denotes the limit superior. As a consequence, we have R ′ log detFW (θ)dθ 2L2 ≤ lim FΥ − Υ log m m→∞ R ′ log detFW (θ)dθ ≤ 0 (64) ≤ lim FΥ m→∞ log m c A. Restriction on FΥ ⊆ [−1/2, 1/2] Choose Υ > 0 and let FΥ , {θ : max FN′ i (θ) > Υ/m2 }. i=1,...,L We have from [8, (106)-(108)] that, for every i,   1 Υ ≤ . λ θ: FN′ i (θ) > 2 m Υ (57) (58) (59) and since derivatives of matrix-valued SDFs are positive semidefinite, we have ′ detFW (θ) ≥ detSU (θ) = 1/(12m2)L . (60) Hence, R FΥ lim m→∞ ′ log detFW (θ)dθ log m ≥ −λ(FΥ ) lim m→∞ FΥ for every Υ. It follows that this integral does not contribute to the information dimension rate if we let Υ tend to infinity. It thus suffices to evaluate the limit of Z 1 ′ log detFW (θ)dθ. (65) L+ 2 log m FΥc ′ ′ B. Bounding detFW (θ) by the Eigenvalues of FX (θ) Lemma 4 and (59) yield The set FΥ is the union of L such events, from which L λ(FΥ ) ≤ Υ follows from the union bound. Since ′ ′ (θ) + SU (θ) FW (θ) = F[X] m m→∞ 2L log(12m) log m 2L2 (61) Υ where lim denotes the limit inferior. Here, the last step follows L because λ(FΥ ) ≤ Υ . Applying Hadamard’s and Jensen’s inequality we further get Z ′ log detFW (θ)dθ ≥− 1 IL . (66) 12m2 ′ Let µi (θ), i = 1, . . . , L, denote the eigenvalues of FX (θ). ′ Sine FN (θ) is positive semidefinite, we obtain   1 ′ ′ detFW (θ) ≥ det (2a1 − 1)FX (θ) + I 12m2  L  Y 1 (2a1 − 1)µi (θ) + = . (67) 12m2 i=1 P Now let A be an n × n matrix and let kAk , ni,j=1 |ai,j | ′ denote the ℓ1 -matrix norm of A. Since FN (θ) is positive semidefinite, the element with the maximum modulus is on the main diagonal; cf. [16, Problem 7.1.P1]. Furthermore, by c assumption, on FΥ the diagonal elements are bounded from Υ ′ (θ)k ≤ L2 Υ/m2 , above by m2 . We hence obtain kFN ηmax (θ). It is known that all matrix norms1 bound the largest eigenvalue of the matrix from above [16, Th. 5.6.9]. Thus, ηmax (θ) is also an upper bound on the largest eigenvalue ′ (θ). Let ωi (θ), i = 1 . . . , L, denote the eigenvalues of FN ′ of FW (θ). Then we have for m sufficiently large such that 2a1 − 1 ≥ 0 [16, Cor. 4.3.15] ′ ′ ′ FW (θ) = (2a1 − 1)FX (θ) + FN (θ) + FΥ ≤ ≤ L Z X i=1 L X i=1 L X FΥ ′ detFW (θ) = ′ (θ)dθ log FW i R F ′ (θ)dθ FΥ Wi λ(FΥ ) log λ(FΥ ) !  1 (2a1 − 1) + 12m 2 + KNi (0) λ(FΥ ) log = λ(FΥ ) i=1  1 1  (2a1 − 1) + 12m 2 + m2 = Lλ(FΥ ) log (62) λ(FΥ )  ≤ ≤ L Y ωi (θ) i=1 L  Y i=1 L  Y i=1  1 12m2  + L2 Υ . (68) m2 (2a1 − 1)µi (θ) + ηmax (θ) + (2a1 − 1)µi (θ) + 1 12 1 This bound holds without a multiplicative constant, since the spectral radius of a matrix is the infimum of all matrix norms [16, Lemma 5.6.10]. Combining (67) and (68) with (65), we obtain R  1 L dθ X c log (2a1 − 1)µi (θ) + 12m2 FΥ lim m→∞ log m i=1 R ′ c log detFW (θ)dθ FΥ ≤ lim log m m→∞ R ′ log detFW (θ)dθ c FΥ ≤ lim m→∞ log m   1 R +L2 Υ L (2a1 − 1)µi (θ) + 12 m2 dθ X c log FΥ ≤ lim . m→∞ log m i=1 (69) It thus remains to evaluate Z L X log (2a1 − 1)µi (θ) + lim L− m→∞ F c log(1/m2 ) Υ i=1 K m2  dθ (70) where K is either 1/12 or 1/12 + L2 Υ. result we also have 2a1 − 1 ≤ 2, m2 > 8/π, it follows that, for m ≥ m0 ,    log 2 µiK(θ) + m12 log Am (θ) + m12 ≤ ≤ 0. (74) log(1/m2 ) log(1/m2 ) The LHS of (74) is nonpositive and monotonically increases to zero as m → ∞. We can thus apply the monotone convergence theorem to get  Z log Am (θ) + m12 0 ≥ lim dθ m→∞ F log(1/m2 ) II  Z log Am (θ) + m12 ≥ lim dθ log(1/m2 ) m→∞ FII   Z log 2 µiK(θ) + m12 ≥ lim dθ m→∞ F log(1/m2 ) II   Z log 2 µiK(θ) + m12 lim = dθ log(1/m2 ) FII m→∞ = 0. (75) C. Exchanging Limit and Integration To evaluate (70), we continue along the lines of [17, Sec. VIII]. Specifically, for each i, we split the integral on the RHS of (70) into three parts: c FI , {θ ∈ FΥ : µi (θ) = 0} FII , {θ ∈ FIII , {θ ∈ c FΥ : c FΥ : µi (θ) ≥ K/(1 − ε)} 0 < µi (θ) < K/(1 − ε)} where 0 < ε ≪ 1 is arbitrary. For the first part, we obtain  Z log (2a1 − 1)µi (θ) + mK2 dθ log(1/m2 ) FI Z log K + log(1/m2 ) dθ = log(1/m2 ) FI   log K = λ(FI ) 1 + log(1/m2 ) (71a) (71b) (71c) (72) which evaluates to λ(FI ) in the limit as m → ∞. We next show that the integrals over FII and FIII do not contribute to (70). To this end, it suffices to consider the integral of the function    log (2a1 − 1) µiK(θ) + m12 log Am (θ) + m12 , . (73) log(1/m2 ) log(1/m2 ) In the remainder of the proof, we shall assume without loss of generality that m2 > 8/π, in which case Am (θ) > 0 on θ ∈ FII ∪FIII . Clearly, whenever Am (θ) > 0, the function in (73) converges to zero as m → ∞. Moreover, for Am (θ) ≥ 1, this function is nonpositive. For all θ ∈ FII we have Am (θ) ≥ (2a1 − 1)/(1 − ε), hence we can find a sufficiently large m0 such that, by (31) in Lemma 4, we have Am (θ) ≥ 1, m ≥ m0 . Since by the same We next turn to the case θ ∈ FIII . It was shown in [17, p. 443] that if Am (θ) < 1, then the function in (73) is bounded from above by 1. Furthermore, if Am (θ) < 1 − m12 then it is nonnegative, and if Am (θ) ≥ 1 − m12 then it is nonpositive and monotonically increasing in m. Restricting ourselves to the case m2 > 8/π, we thus obtain for θ ∈ FIII  ( log( 2 + π ) 1−ε 8 π log Am (θ) + m12 log(π/8) , Am (θ) ≥ 1 − 8 ≥ log(1/m2 ) 0, otherwise (76) where we made use of the fact that Am (θ) < (2a1 −1)/(1−ε), θ ∈ FIII and, by (31) in Lemma 4, 2a1 − 1 ≤ 2, m2 > 8/π. Hence, on FIII the magnitude of the function in (73) is bounded by     π  2  1 + log log Am (θ) + m2 1−ε 8 ≤ max 1, . (77) 2  log(1/m ) log(8/π)  We can thus apply the dominated convergence theorem to get  Z log (2a1 − 1)µi (θ) + mK2 lim dθ m→∞ F log(1/m2 ) III   Z log (2a1 − 1) µiK(θ) + m12 lim = dθ = 0. (78) log(1/m2 ) FIII m→∞ Combining (72), (75), and (78), we have that Z 1 ′ log detFW (θ)dθ L + lim m→∞ 2 log m F c Υ = L X i=1 = L X i=1 c (1 − λ({θ ∈ FΥ : µi (θ) = 0})) c λ({θ ∈ FΥ : µi (θ) > 0}). (79) By PL the continuity of the Lebesgue measure, this tends to i=1 λ({θ: µi (θ) > 0}) as Υ tends to infinity. But since the rank of a matrix is exactly the number of non-zero eigenvalues we obtain Z 1/2 L X ′ λ({θ: µi (θ) > 0}) = rank(FX (θ))dθ. (80) −1/2 i=1 To summarize, combining (56), (64), (78), and (79), we obtain that Z 1/2 1 ′ d({X t }) = L + lim lim log detFW (θ)dθ Υ→∞ m→∞ 2 log m −1/2 Z 1/2 ′ = rank(FX (θ))dθ. (81) −1/2 This completes the proof. A PPENDIX B AUXILIARY R ESULTS + i=L′ +1 | H k k k [Xi,1 ]m |[X1,1 ]m , . . . , [Xi−1,1 ]m {z =0 Proof: By [14, Th. 23.6.14], the vector X (X1 , . . . , Xℓ )T can be written as X = AN + µ = (85) ′ where N is a ℓ -dimensional, zero-mean, Gaussian vector (ℓ′ ≤ ℓ) with independent components whose variances are the nonzero eigenvalues of CX and where A is a ℓ × ℓ′ matrix satisfying AT A = I (with I denoting the identity matrix). We use the data processing inequality, the chain rule for relative entropy, and the fact that N is Gaussian to obtain D(fW kgW ) ≤ D(fW ,N kgW ,N ) In this section, we show that in the statement and proof of Theorem 2 we may assume without loss of generality that every component process has zero mean and unit variance. Moreover, we present the multivariate counterpart of [8, Lemma 6]. Lemma 5: Suppose that {X t } is a stationary, L-variate Gaussian process with mean vector µ and SDF FX . Suppose that the component processes are ordered by their variances, 2 2 2 ′ i.e., ∞ > σ12 ≥ σ22 ≥ · · · σL ′ ≥ σL′ +1 = · · · σL = 0 (L ≤ L). Then, d({X t }) = d({ σ11 X1,t , . . . , σ1 ′ XL′ ,t }) and, for almost L ′ ′ every θ, rank(FX (θ)) = rank(F(X (θ)). 1 /σ1 ,...,XL′ /σL′ ) Proof: Normalizing component processes with positive variance to unit variance does not affect the information dimension rate, as follows from Lemma 2. If σi2 = 0, then the component process {Xi,t } is almost surely constant. It k follows that H [Xi,1 ]m = 0 for every m and every k, and hence, by the chain rule,    k H [X k1 ]m = H [X1,1 ]m , . . . , [XLk ′ ,1 ]m L X where U is a ℓ-variate vector, independent of X, with components independently and uniformly distributed on [0, 1/m). Then,    D(fW kgW ) 75 24 1 1 + ≤ log 2π 1 + + . (84) ℓ 2 12 2 π  . (82) } Dividing by k log m and letting m and k tend to zero shows that d({X t }) = d({ σ11 X1,t , . . . , σ1 ′ XL′ ,t }). L Let Π be an L′ × L′ diagonal matrix with values σi on the main diagonal. For component processes with zero variance, ′ the corresponding row and column of FX (θ) is zero almost everywhere. Hence, we have for almost every θ that   ′ ΠF(X (θ)Π 0 ′ 1 /σ1 ,...,XL′ /σL′ ) FX (θ) = (83) 0 0 where 0 denotes an all-zero matrix of appropriate size. We ′ ′ thus have rank(FX (θ)) = rank(F(X (θ)) for 1 /σ1 ,...,XL′ /σL′ ) almost every θ. Lemma 6: Let X be an ℓ-variate Gaussian vector with mean vector µ and covariance matrix CX . Let W , [X]m + U , ≤ D(fN kgN ) Z + D(fW |N =n kgW |N =n )fN (n)dn Z = D(fW |N =n kgW |N =n )fN (n)dn (86) where gW ,N denotes the PDF of a Gaussian vector with the same mean vector and covariance matrix as (W , N ), and fW ,N (w, n) gN (n) gW ,N (w, n) gW |N =n (w) , . gN (n) fW |N =n (w) , (87a) (87b) To evaluate the relative entropy on the RHS of (86), we first note that, given X, the random vector W is uniformly 1 . Since X distributed on an ℓ-dimensional cube of length m can be obtained from N via (85), the conditional PDF of W given N = n is fW |N =n (w) = mℓ 1{[w]m = [An + µ]m }, w ∈ Rℓ . (88) Consequently, denoting z = [An + µ]m ,   q D(fW |N =n kgW |N =n ) = log mℓ (2π)ℓ detCW |N Z mℓ −1 + (w − µW |N =n )T CW |N (w − µW |N =n )dw 2 C(z,1/m) (89) where µW |N =n and CW |N denote the conditional mean and the conditional covariance matrix of W given N = n. These can be computed as [14, Th. 23.7.4] −1 µW |N =n = E [W ] + CW N CN n CW |N = CW − −1 T CW N CN CW N (90a) (90b) where CW N denotes the cross-covariance matrix of W and N , and CW and CN denote the covariance matrices of W and N , respectively. Letting Z = [X]m , we have W = Z + U . Since U is independent of X, the cross-covariance matrix of W and X (denoted by CW X ) is equal to the cross-covariance matrix of Z and X (denoted by CZX ). Bussgang’s theorem [13, eq. (19)] yields KZj Xi (τ ) = aj KXj Xi (τ ) where aj is as in Lemma 4. Hence, if Λa is a diagonal matrix with the elements of a = (a1 , . . . , aℓ ) on the main diagonal, then CZX = Λa CX . From (85) we get CX = ACN AT and CW N = CW X A, hence CW N = CW X A = CZX A = Λa CX A = Λa ACN . (91) Together with (90), this yields µW |N =n = E [W ] + Λa An CW |N = CW − Λa CX Λa . (92a) (92b) Combining (92a) with (85), and using the triangle inequality, we upper-bound each component of w − µW |N =n as |wj − E [Wj ] − aj (xj − µj )| ≤ |zj − xj | + |uj − E [Uj ]| + |E [Zj ] − µj | + |1 − aj ||xj − µj |. (93) The first and the third term on the RHS of (93) are both upper1 1 bounded by m , and the second term is upper-bounded by 2m . From (31) in Lemma 4 we get that the term |1 − a | is upper j q bounded by 1/m 2/πσj2 , where σj2 is the variance of Xj . We thus obtain   ℓ 2 X (xj − µj )  4 25k 1 + . kw − µW |N =n k2 ≤ 2  m 2 π j=1 σj2 (94) We next note that, since W = Z + U and since U is independent from Z and i.i.d. on [0, 1/m), CW |N = CZ − Λa CX Λa + 1 I. 12m2 (95) It can be shown that CZ − Λa CX Λa is the conditional covariance matrix of Z given N , hence it is positive semidefinite.2 It follows that the smallest eigenvalue of CW |N is lower1 bounded by 12m 2 . Together with (94), this yields for the second term on the RHS of (89) mℓ 2 Z −1 (w − µW |N =n )T CW |N (w − µW |N =n )dw   ℓ 2 X (x − µ ) 1 25ℓ 4 1 j j  + ≤ 6mℓ+2 ℓ 2  m m 2 π j=1 σj2 C(z,1/m) ℓ = 75ℓ 24 X (xj − µj )2 . + 2 π j=1 σj2 (96) 2 Indeed, we have C ZX = CW X and, by (85), CZN = CZX A. Replacing in (90b) W by Z, and repeating the steps leading to (92b), we obtain the desired result. To upper-bound the first term on the RHS of (89), we use that (95) combined with Lemma 4 implies that every diagonal element of CW |N is given by   1 E (Zj − E [Zj ])2 − a2j σj2 + = −(1 − aj )2 σj2 12m2   1 . (97) + E (Xj − µj − Zj + E [Zj ])2 + 12m2 The first term on the RHS of (97)  is negative  and the second term is upper-bounded by E (Xj − Zj )2 ≤ 1/m2 . Hence, every element on the main diagonal of CW |N is upper-bounded by 1+1/12 m2 . It thus follows from Hadamard’s inequality that     q  ℓ 1 ℓ ℓ . log m (2π) detCW |N ≤ log 2π 1 + 2 12 (98) Combining (96) and (98) with (89) and (86) yields D(fW ℓ1 kgW ℓ1 )      ℓ 75ℓ 24 X E (Xj − µj )2 1 ℓ + + ≤ log 2π 1 + 2 12 2 π j=1 σj2      1 75 24 1 =ℓ + . (99) log 2π 1 + + 2 12 2 π This completes the proof. R EFERENCES [1] A. Rényi, “On the dimension and entropy of probability distributions,” Acta Mathematica Hungarica, vol. 10, no. 1-2, pp. 193–215, Mar. 1959. [2] T. Kawabata and A. Dembo, “The rate-distortion dimension of sets and measures,” IEEE Trans. Inf. Theory, vol. 40, no. 5, pp. 1564–1572, Sep. 1994. [3] T. Koch, “The Shannon lower bound is asymptotically tight,” IEEE Trans. Inf. Theory, vol. 62, no. 11, pp. 6155–6161, Nov. 2016. [4] Y. Wu and S. Verdú, “Rényi information dimension: Fundamental limits of almost lossless analog compression,” IEEE Trans. Inf. Theory, vol. 56, no. 8, pp. 3721–3748, Aug. 2010. [5] Y. Wu, S. Shamai (Shitz), and S. Verdú, “Information dimension and the degrees of freedom of the interference channel,” IEEE Trans. Inf. Theory, vol. 61, no. 1, pp. 256–279, Jan. 2015. [6] D. Stotz and H. Bölcskei, “Degrees of freedom in vector interference channels,” IEEE Trans. Inf. Theory, vol. 62, no. 7, pp. 4172–4197, Jul. 2016. [7] B. C. Geiger and T. Koch, “On the information dimension rate of stochastic processes,” in Proc. IEEE Int. Symp. Inf. Theory (ISIT), Aachen, Germany, Jun. 2017, pp. 888–892. [8] ——, “On the information dimension of stochastic processes,” arXiv:1702.00645v2 [cs.IT], Feb. 2017. [9] Y. Wu, “Shannon theory for compressed sensing,” Ph.D. dissertation, Princeton University, 2011. [10] T. M. Cover and J. A. Thomas, Elements of Information Theory, 1st ed. Wiley Interscience, 1991. [11] R. G. Gallager, Information Theory and Reliable Communication. John Wiley & Sons, 1968. [12] N. Wiener and P. Masani, “The prediction theory of multivariate stochastic processes,” Acta Mathematica, vol. 98, no. 1, pp. 111–150, 1957. [13] J. J. Bussgang, “Crosscorrelation functions of amplitude-distorted Gaussian signals,” Res. Lab. of Electronics, M.I.T., Cambridge, Mass., Tech. Rep. 216, Mar. 1952. [14] A. Lapidoth, A Foundation in Digital Communication. Cambridge: Cambridge University Press, 2009. [15] F. D. Neeser and J. L. Massey, “Proper complex random processes with applications to information theory,” IEEE Trans. Inf. Theory, vol. 39, no. 4, pp. 1293–1302, Jul. 1993. [16] R. A. Horn and C. R. Johnson, Matrix Analysis, 2nd ed. Cambridge: Cambridge University Press, 2013. [17] A. Lapidoth, “On the asymptotic capacity of stationary Gaussian fading channels,” IEEE Trans. Inf. Theory, vol. 51, no. 2, pp. 437–446, Feb. 2005.
7cs.IT
arXiv:1501.00954v2 [math.AG] 14 Jan 2017 ON THE FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP JOSEPH LIPMAN AND AMNON NEEMAN Abstract. Let f : X → Z be a separated essentially-finite-type flat map of noetherian schemes, and δ : X → X ×Z X the diagonal map. The fundamental class Cf (globalizing residues) is a map from the relative Hochschild functor Lδ ∗δ∗ f ∗ to the relative dualizing functor f !. A compatibility between this Cf and derived tensor product is shown. The main result is that, in a suitable sense, Cf generalizes Verdier’s classical isomorphism for smooth f with fibers of dimension d, an isomorphism that binds f ! to relative d-forms. Introduction 1.1. (Underlying duality theory.) For a scheme X, D(X) is the derived category of the abelian category of OX -modules; and Dqc (X) ⊂ D(X) (resp. D+qc (X) ⊂ D(X)) is the full subcategory spanned by the complexes C such that the cohomology modules H i (C) are all quasi-coherent (resp. are all quasi-coherent, and vanish for all but finitely many i < 0). Grothendieck duality is concerned with a pseudofunctor (−)! over the category E of essentially-finite-type separated maps of noetherian schemes, taking values in D+qc (−). This pseudofunctor is uniquely determined up to isomorphism by the following three properties: (i) For formally étale E-maps f , f ! is the usual restriction functor f ∗. (ii) (Duality) If f is a proper map of noetherian schemes then f ! is rightadjoint to Rf∗ . (iii) Suppose there is given a fiber square in E v (1.1.1) X ′ −−−−→   gy ♣ X  f y Z ′ −−−−→ Z u 2010 Mathematics Subject Classification. Primary: 14F05, 14F10. Secondary: 13D03. Key words and phrases. Grothendieck duality, relative dualizing complex, fundamental class. This article is based on work supported by the National Science Foundation under Grant No. 0932078000, while the authors were in residence, during the Spring semester of 2013, at the Mathematical Sciences Research Institute in Berkeley, California. 1 2 J. LIPMAN AND A. NEEMAN with f (hence g) proper and u (hence v) formally étale. Then the functorial base-change map  (1.1.2) β♣ (F ) : : v ∗f !F → g!u∗F F ∈ D+qc (Z) , defined to be adjoint to the natural composition ∼ Rg∗ v ∗f !F −→ u∗ Rf∗ f !F −→ u∗F (see (2.6.7) below), is identical with the natural composite isomorphism (1.1.3) ∼ ∼ v ∗f !F = v !f !F −→ (f v)!F = (ug)!F −→ g!u!F = g !u∗ F. (N.B. The composite isomorphism (1.1.3) exists for any E-maps f, g, u, v with u and v étale and f v = ug.) The case of finite-type maps is treated in [L09, Theorem 4.8.1], from the category-theoretic viewpoint of Verdier and Deligne.1 An extension to essentially-finite-type maps is given in [Nk09, §5.2]. The pseudofunctor (−)! expands so as to take values in Dqc (−) if one restricts to proper maps or to E-maps of finite flat dimension [AJL11, §§5.7–5.9]—and even without such restrictions if one changes ‘pseudofunctor’ to ‘oplax functor,’ i.e., one allows g f that for an E-diagram W −→ X −→ Z the associated map (f g)! → g! f ! need not be an isomorphism, see [Nm14]. For flat E-maps—the maps with which we shall be mainly concerned—the agreement of the oplax (−)! with the preceding pseudofunctor results from [Nm14, Proposition 13.11]. 1.2. (Verdier’s isomorphism, fundamental class and the “Ideal Theorem.”) In the original working out ([H66], amended in [C00], [C01]) of the duality theory conceived by Grothendieck and Verdier, the main result, Corollary 3.4 on p. 383, is roughly that in the presence of residual complexes,2 when confined to finite-type scheme-maps and complexes with coherent homology the pseudofunctor (−)! is obtained by pasting together concrete realizations of its restriction to smooth maps and to finite maps. This is a special case of the “Ideal Theorem” in [H66, p. 6]. For finite f : X → Z, the canonical concrete realization is induced by the usual sheafified duality isomorphism (see (2.6.5)): (1.2.1) ∼ Rf∗ f !F = Rf∗ RHom(OX , f !F ) −→ RHom(f∗ OX , F ) (F ∈ D+qc (Z)). For formally smooth f : X → Z in E, of relative dimension d (section 2.3), a canonical concrete realization is given by an isomorphism (1.2.2) ∼ f !F −→ Ωfd [d] ⊗X f ∗F (F ∈ D+qc (Z)), where Ωfd is the sheaf of relative d-forms and “[d]” denotes d-fold translation (shift) in D(X). 1The frequent references in this paper to [L09] are due much more to the approach and convenience of that source than to its originality. 2The theory of residual complexes presented in [H66, Chapters 6 and 7] is considerably generalized in [?]. FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 3 The initial avatar of such an isomorphism uses a trace map for residual complexes (that are assumed to exist). In particular, when f is proper there results an explicit (but somewhat complicated) description of SerreGrothendieck duality. (See e.g., [C00, §3.4].) A definition of an isomorphism with the same source and target as (1.2.2), but not requiring residual complexes, was given by Verdier in [V68, proof of Theorem 3]. We review and expand upon this classical isomorphism in §3. In particular, Proposition 3.4.4 explicates compatibility of the isomorphism with derived tensor product. For any flat E-map f : X → Z, let δ = δf : X → X ×Z X be the diagonal of f . There is a D+qc -map Cf : δ∗δ∗ f ∗ → f !, the fundamental class of f, from the relative Hochschild functor to the relative dualizing functor, see Definition 4.2. The fundamental class is compatible with derived tensor product, see Proposition 4.3. When the flat map f is equidimensional of relative dimension d, applying the homology functor H −d to Cf leads to a map cf from the target of the map (1.2.2) to the source (Section 4.4 below.) Propositon 2.4.2 in [AJL14] asserts that if, moreover, f is formally smooth, then cf is an isomorphism. The proof uses Verdier’s isomorphism, and of course begs the question of whether that isomorphism is inverse to cf . That this does hold is our main result, Theorem 4.5. Thus, the map cf extends the inverse of Verdier’s isomorphism, from the class of formally smooth E-maps to the class of arbitrary flat equidimensional E-maps. Remarks 1.2.3. (a) The above discussion has been limited, for simplicity, to D+qc ; but the results will be established for Dqc . (b) The isomorphisms in play are not quite canonical: there are choices involved that affect the resulting homology maps up to sign. For example, for a scheme Y and an OY -ideal I, there are two natural identifications Y of I/I 2 with Tor O 1 (OY /I, OY /I ), one the negative of the other; and we will have to choose one of them (see (3.2.1) ff.) We will also have to assign different roles to the two projections of X ×Z X to X, necessitating another arbitrary choice. See also [S04, §7.1]. Our choices minimize sign considerations, under the constraint of respect for the usual triangulated structure on the derived sheaf-hom functor (see the remarks following equations (3.1.5) and (3.2.5)). Other choices might have done as well. (c) In the present vein, we propose it as a nontrivial exercise (that, as far as we know, no one has carried out) to specify the relation between the above “initial avatar” of the fundamental class and Verdier’s isomorphism. (Both isomorphisms have been known for fifty years or so.) 4 J. LIPMAN AND A. NEEMAN We believe that the fundamental class is important enough, historically and technically, to merit the kind of scrutiny it gets in this paper. For instance, familiarity with various of its aspects could well prove useful in establishing that the pseudofunctor (−)! together with the isomorphisms in (1.2.1) and (1.2.2) satisfy VAR 1–6 (mutatis mutandis) in [H66, p. 186]—a version over all of E of the “Ideal Theorem.” It is hoped that a full treatment of this application will materialize in the not-too-distant future. 1.3. (Additional background: fundamental class and residues.) More history and motivation behind the fundamental class can be found in [AJL14, §0.6]. A preliminary version of the fundamental class, with roots in the dualizing properties of differentials on normal varieties, appears in [G60, p. 114], followed by some brief hints about connections with residues. In [L84], there is a concrete treatment of the case when S = Spec(k) with k a perfect field and f : X → Spec k an integral algebraic k-scheme. The principal result (“Residue Theorem”) reifies cf as a globalization of the local residue maps at the points of X, leading to explicit versions of local and global duality and the relation between them. This is generalized to certain maps of noetherian schemes in [HS93]. The close relation between the fundamental class and residues becomes clearer, and more general, over formal schemes, where local and global duality merge into a single theory with fundamental classes and residues conjoined. (See [L01, §5.5]; a complete exposition has yet to appear.) 2. Preliminaries In this section we describe those parts of the duality machinery, along with a few of their basic properties, that we will subsequently use. The reader is advised initially to skip to the next section, referring back to this one as needed. 2.1. Unless otherwise specified, we will be working exclusively with functors between full subcategories of categories of the form D(X) (see beginning of §1.1); so to reduce clutter we will write: • f∗ instead of Rf∗ (f a scheme-map), • f ∗ instead of Lf ∗ (f a scheme-map), • ⊗ instead of ⊗L . • Hom instead of RHom. (This is the derived sheaf-hom functor.) 2.2. For any scheme-map f : X → Z, the functor f∗ : D(X) → D(Z) is symmetric monoidal; this entails, in particular, a functorial map (2.2.1) f∗ E1 ⊗Z f∗ E2 → f∗ (E1 ⊗X E2 ) (Ei ∈ D(X)), see e.g., [L09, 3.4.4(b)]. The functor f ∗ : D(Z) → D(X) is pseudofunctorially left-adjoint to f∗ f g [L09, 3.6.7(d)]. This means that for scheme-maps X −→ Z −→ W , the ∼ g f and f ∗ g ∗ −→ ∼ (gf )∗ are conjugate, canonical isomorphisms (gf )∗ −→ ∗ ∗ see [L09, 3.3.7(a)]. FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 5 For fixed B ∈ D(X), the functor − ⊗X B is left-adjoint to HomX (B, −) (see e.g., [L09, (2.6.1)′ ]). The resulting counit map (2.2.2) ev(X, B, C) : HomX (B, C) ⊗X B → C (C ∈ D(X)) is referred to as “evaluation.” 2.3. A scheme-map f : X → Z is essentially of finite type if every z ∈ Z has an affine open neighborhood Spec A whose inverse image is a union of finitely many affine open subschemes Spec Bi such that each Bi is a localization of a finitely generated A-algebra. Throughout, E will be the category of essentially-finite-type separated maps of noetherian schemes. The category E is closed under scheme-theoretic fiber product. An E-map f : X → Z is essentially smooth if it is flat and it has geometrically regular fibers; or equivalently, if f is formally smooth, that is, for each x ∈ X and z := f (x), the local ring OX,x is formally smooth over OZ,z for the discrete topologies, see [EGA4, 17.1.2, 17.1.6] and [EGA4, Chapter 0, 19.3.3, 19.3.5(iv) and 22.6.4 a)⇔ c)]. (For this equivalence, which involves only local properties, it can be assumed that X = Spec A and Z = Spec BS where B is a finite-type A-algebra and S ⊂ B is a multiplicatively closed subset; then the relevant local rings are the same for f or for the finite-type map g : Spec B → Spec A, so that one only needs the equivalence for g, as given by [EGA4, 6.8.6].) For essentially smooth f : X → Z, the diagonal map X → X ×Z X is a regular immersion, see [EGA4, 16.9.2], [EGA4, 16.10.2] and [EGA4, 16.10.5]—whose proof is valid for E-maps. Arguing as in [EGA4, 17.10.2], one gets that for essentially smooth f the relative differential sheaf Ωf is locally free over OX ; moreover, when f is of finite type the rank of Ωf at x ∈ X is the dimension at x of the fiber f −1f (x). For any essentially smooth f , the (locally constant) rank of Ωf will be referred to as the relative dimension of f . An E-map is essentially étale if it is essentially smooth and has relative dimension 0 (cf. [EGA4, 17.6.1]). 2.4. An OX -complex E (X a scheme) is perfect if each x ∈ X has an open neighborhood U = Ux such that the restriction E|U is D(U )-isomorphic to a bounded complex of finite-rank free OU -modules. When applied to E-maps, the term “perfect” means “having finite tordimension” (or “finite flat dimension”). Perfection of maps is preserved under composition and under flat base change, see e.g., [I71, p. 243, 3.4 and p. 245, 3.5.1 ]. 2.5. Let D+qc (X) ⊂ Dqc (X) ⊂ D(X) be as at the beginning of §1.1. For any E-map f : X → Z, there exists a functor f × : D(Z) → Dqc (X) that is bounded below and right-adjoint to Rf∗ . (See e.g., [L09, §4.1].) In × , the derived particular, with idX the identity map of X one has a functor idX quasi-coherator, right-adjoint to the inclusion Dqc (X) ֒→ D(X). 6 J. LIPMAN AND A. NEEMAN For any complexes A and B in Dqc (X), and with notation as in §2.1, set (2.5.1) qc × HomX (A, B) ∈ Dqc (X). HomX (A, B) := idX Dqc (X) is a (symmetric monoidal) closed category, with multiplication qc (derived) ⊗X and internal hom HomX (cf. e.g., [L09, 3.5.2(d)]). × ∼ C. C −→ For C ∈ Dqc (X), the counit map is a D(X)-isomorphism idX qc So for A, B ∈ D(X), the counit map HomX (A, B) → HomX (A, B) is an isomorphism when HomX (A, B) ∈ Dqc (X)—for example, when B ∈ D+qc (X) and the cohomology sheaves H i A are coherent for all i, vanishing for i ≫ 0, see [H66, p. 92, 3.3]. 2.6. We will use some standard functorial maps, gathered together here, that are associated to an E-map f : X → Z and objects E• ∈ Dqc (X), F• ∈ Dqc (Z), G• ∈ Dqc (Z). For the most part, the definitions of these maps emerge category-theoretically from Section 2.2, cf. [L09, §3.5.4]. (a) The map (2.6.1) f ∗ (F ⊗Z G) −→ f ∗F ⊗X f ∗ G that is adjoint to the natural composite (2.2.1) F ⊗Z G −→ f∗ f ∗F ⊗Z f∗ f ∗G −−−−→ f∗ (f ∗F ⊗X f ∗G). The map (2.6.1) is an isomorphism [L09, 3.2.4]. (b) The sheafified adjunction isomorphism: (2.6.2) ∼ f∗ HomX (f ∗ G, E) −→ HomZ (G, f∗ E), right-conjugate [ILN14, §1.6], for each fixed G, to the isomorphism (2.6.1). (c) The projection isomorphisms, see, e.g., [L09, 3.9.4]: ∼ (2.6.3) f∗ E ⊗Z G −→ f∗ (E ⊗X f ∗G) ∼ and G ⊗LZ f∗ E −→ f∗ (f ∗G ⊗LX E). These are, respectively, the natural composites (2.2.1) f∗ E ⊗Z G −→ f∗ E ⊗Z f∗ f ∗G −−−−→ f∗ (E ⊗X f ∗G), (2.2.1) G ⊗Z f∗ E −→ f∗ f ∗G ⊗Z f∗ E −−−−→ f∗ (f ∗G ⊗X E). (The definitions make sense for arbitrary scheme-maps, though in that generality the composites are not always isomorphisms.) (d) The map (2.6.4) f ∗ HomZ (G, F ) −→ HomX (f ∗G, f ∗F ) that is f ∗ -f∗ adjoint to the natural composite map ∼ f∗ HomX (f ∗G, f ∗F ). HomZ (G, F ) −→ HomZ (G, f∗ f ∗F ) −→ (2.6.2) This is an isomorphism if the map f is perfect, G is homologically boundedabove, with coherent homology sheaves, and F ∈ D+qc (Z), see [L09, Proposition 4.6.6]. FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 7 The map (2.6.4) is Hom-⊗ adjoint to the natural composite map ∼ f ∗ HomZ (G, F ) ⊗X f ∗ G −→ f ∗ (HomZ (G, F ) ⊗Z G) −→ f ∗ F, (2.6.1) see [L09, Exercise 3.5.6(a)]. (e) The duality isomorphism: (2.6.5) qc ∼ ζ(E, F ) : f∗ HomX (E, f ×F ) −→ Homqc Z (f∗ E, F ), right-conjugate, for each fixed E to the projection isomorphism L ∼ f∗ (f ∗ G ⊗X E) ←− G ⊗LZ f∗ E . (f ) The bifunctorial map (2.6.6) χf (F, G) : f !F ⊗X f ∗G → f !(F ⊗Z G), defined in [Nm14, 13.1, 13.2 and 13.3] (with ‘σ’ instead of ‘χ’), and shown in [Nm14, 13.11] to be an isomorphism whenever the map f is perfect. When f is proper, f ! is right-adjoint to f∗ and the map χf is adjoint to the natural composite map ∼ f∗ (f !F ⊗X f ∗ G) −→ f∗ f !F ⊗Z G −→ F ⊗Z G. (2.6.3) In particular, χf (OZ , G) identifies with a map of triangulated functors f # G := f ! OZ ⊗X f ∗G → f ! G. ∼ Note however that whereas the isomorphism f ! (G[1]) −→ (f ! G)[1] associated with ! the triangulated structure on f is the identity map, the same is not true of f # . (See [L09, just before 1.5.5].) (g) The base change map (2.6.7) β♣ (F ) : v ∗f !F −→ g ! u∗F associated to a fiber square in E: v X ′ −−−−→   gy ♣ X  f y Z ′ −−−−→ Z u with f any E-map and u (hence v) flat. This map is defined in [Nm14, 11.6 and 11.7], and denoted θ : R −→ S, where R, S are (repectively) the maps taking the cartesian square to v ∗ f ! and g! u∗ . In general, this is not an isomorphism. But if F ∈ D+qc (Z) then this is the isomorphism of [L09, Thm. 4.8.3] and [Nk09, Theorem 5.3]; and for any F ∈ Dqc (Z), if f is perfect then this is the isomorphism of [AJL11, §5.8.4]. (It actually suffices for g to be perfect, see [Nm14, 11.13(i)].) 8 J. LIPMAN AND A. NEEMAN (h) The bifunctorial map (2.6.8) κX (E1 , E2 , E3 ) : HomX (E1 , E2 ) ⊗X E3 → HomX (E1 , E2 ⊗X E3 ) adjoint to the natural composite—with ev the evaluation map (2.2.2)— via ev ∼ HomX (E1 , E2 )⊗X E3 ⊗X E1 −→ HomX (E1 , E2 )⊗X E1 ⊗X E3 −−−→ E2 ⊗X E3 . The map (2.6.8) is an isomorphism if the complex E1 is perfect. Indeed, the question is local on X, so one can assume that E1 is a bounded complex of finite-rank free OX -modules, and conclude via a simple induction (like that in the second-last paragraph in the proof of [L09, 4.6.7]) on the number of degrees in which E1 doesn’t vanish. Similarly, (2.6.8) is an isomorphism if E3 is perfect. The projection map (2.6.3) is compatible with derived tensor product, in the following sense: Lemma 2.7. Let f : X → Z be a scheme map, E ∈ D(X), F, G ∈ D(Z). The following natural diagram, where ⊗ stands for ⊗X or ⊗Z , commutes. (2.6.3) (f∗ E ⊗ F ) ⊗ G f∗ (E ⊗ f ∗F ) ⊗ G (2.6.3)  f∗ (E ⊗ f ∗F ) ⊗ f ∗ G ≃ f∗ E ⊗ (F ⊗ G) ≃ (2.6.3)  f∗ E ⊗ f ∗ (F ⊗ G) (2.6.1)  f∗ E ⊗ (f ∗ F ⊗ f ∗ G) Proof. After substituting for each instance of (2.6.3) its definition, and recalling (2.2.1), one comes down to proving commutativity of the border of the following diagram—whose maps are the obvious ones: (f∗ E ⊗ f∗ f ∗F ) ⊗ G (f∗ E ⊗ F ) ⊗ G f∗ (E ⊗ f ∗F ) ⊗ G (f∗ E ⊗ f∗ f ∗F ) ⊗ f∗ f ∗ G f∗ E ⊗ (F ⊗ G) f∗ E ⊗ (f∗ f ∗F ⊗ G) 6 f∗ E ⊗ f∗ f ∗(F ⊗ G)  f∗ E ⊗ f ∗ (F ⊗ G) f∗ E ⊗ (f∗ f ∗F ⊗ f∗ f ∗ G) f∗ E ⊗ f∗ (f ∗F ⊗ f ∗ G) f∗ (E ⊗ f ∗F ) ⊗ f∗ f ∗ G  f∗ (E ⊗ f ∗F ) ⊗ f ∗ G 7  f∗ E ⊗ (f ∗F ⊗ f ∗ G) The commutativity of subdiagram 6 follows directly from the definition of (2.6.1). Commutativity of 7 is given by symmetric monoidality of f∗ , see §2.2. Commutativity of the other subdiagrams is pretty well obvious, whence the conclusion.  FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 9 For the map (2.6.8) we’ll need a “transitivity” property—an instance of the Kelly-Mac Lane coherence theorem [KM71, p. 107, Theorem 2.4]: Lemma 2.8. With κ := κX as in (2.6.8), κ(E1 , E2 , E3 ⊗ E4 ) factors as κ(E1 ,E2 ,E3 )⊗id HomX (E1 , E2 ) ⊗ E3 ⊗ E4 −−−−−−−−−−→ HomX (E1 , E2 ⊗ E3 ) ⊗ E4 κ(E1 ,E2 ⊗E3 ,E4 ) −−−−−−−−−−→ HomX (E1 , E2 ⊗ E3 ⊗ E4 ). Proof. The assertion results from commutativity of the following natural diagram—where [−, −] := HomX (−, −), ⊗ := ⊗X , and various associativity isomorphisms are omitted: [E1 , E2 ] ⊗ E3 ⊗ E4 ⊗ E1 f [E1 , E2 ] ⊗ E3 ⊗ E1 ⊗ E4 f [E1 , E2 ] ⊗ E1 ⊗ E3 ⊗ E4 via κ 1 2 [E1 , E2 ⊗ E3 ] ⊗ E1 ⊗ E4 via κ ≃ via ev via ev 3 [E1 , E2 ⊗ E3 ] ⊗ E4 ⊗ E1 via κ [E1 , E2 ⊗ E3 ⊗ E4 ] ⊗ E1 ev E2 ⊗ E3 ⊗ E4 Commutativity of subdiagram 1 is clear; and that of 2 and 3 follow from the definitions of κ(E1 , E2 , E3 ) and κ(E1 , E2 ⊗ E3 , E4 ), respectively.  2.9. Let δ : X → Y be an E-map, and p : Y → X a scheme-map such that pδ = idX . We will be using the bifunctorial isomorphism ∼ ψ = ψ(δ, p, E, F ) : δ∗δ∗ E ⊗X F −→ δ∗δ∗ (E ⊗X F ) (E, F ∈ Dqc (X)) that is defined to be the natural composite δ∗δ∗ (E ⊗X F ) δ∗δ∗ E ⊗X F (2.9.1) ≃ ≃ δ∗δ∗ E ⊗X δ∗p∗F f (2.6.1) δ∗ (δ∗ E ⊗Y p∗F ) f (2.6.3) δ∗δ∗ (E ⊗X δ∗p∗F ) (Cf. [AJL14, (2.2.6)].) The rest of this subsection brings out properties of ψ needed later on. Lemma 2.9.2. With preceding notation, the isomorphism ψ(δ, p, E, δ∗ p∗F ) factors as ∼ ∼ δ∗δ∗ E ⊗X δ∗p∗F −→ δ∗ (δ∗ E ⊗Y p∗F ) −→ δ∗ δ∗ (E ⊗X δ∗p∗F ). (2.6.1) (2.6.3) Proof. This results from the fact that the natural composites ψ(δ, p,E,δ∗p∗F ) ∼ ∼ δ∗δ∗ E ⊗ F −→ δ∗δ∗ E ⊗ δ∗p∗F −−−−−−−−−→ δ∗δ∗ (E ⊗ δ∗p∗F ) −→ δ∗δ∗ (E ⊗ F ) and (2.6.3) ◦ (2.6.1) ∼ ∼ δ∗δ∗ (E ⊗ F ) δ∗δ∗ E ⊗ F −→ δ∗δ∗ E ⊗ δ∗p∗F −−−−−−−−−→ δ∗δ∗ (E ⊗ δ∗p∗F ) −→ are both equal to ψ(δ, p, E, F ) (the first by functoriality of ψ, and the second by definition).  10 J. LIPMAN AND A. NEEMAN Corollary 2.9.3. The following natural diagram commutes. ψ δ∗δ∗ E ⊗ F δ∗δ∗ (E ⊗ F ) E ⊗F Proof. One can replace F by the isomorphic complex δ∗p∗F, whereupon the  assertion follows from Lemma 2.9.2 via [L09, 3.4.6.2]. Lemma 2.9.4. For E, F1 , F2 ∈ Dqc (X), with ψ(−, −) := ψ(δ, p, −, −) and ⊗ := ⊗X , the isomorphism ψ(E, F1 ⊗ F2 ) factors (modulo associativity isomorphisms) as δ∗δ∗ E ⊗ F1 ⊗ F2 −−−−f −−−−→ δ∗δ∗ (E ⊗ F1 ) ⊗ F2 ψ(E, F1 ) ⊗ id −−−−f −−−−→ δ∗δ∗ (E ⊗ F1 ⊗ F2 ) ψ(E ⊗F1 , F2 ) Proof. The Lemma asserts commutativity the border of the next diagram, in which ⊗ stands for ⊗X or ⊗Y , and the maps are the obvious ones: δ∗ (δ∗ E ⊗ p∗F1 ) ⊗ F2 δ∗δ∗ E ⊗ F1 ⊗ F2 δ∗ (δ∗ E ⊗ p∗F1 ) ⊗ δ∗p∗F2 1 δ∗ (δ∗ E ⊗ p∗F1 ⊗ p∗F2 )  δ∗ δ∗ E ⊗ p∗ (F1 ⊗ F2 ) δ∗δ∗ (E ⊗ δ∗p∗F1 ) ⊗ F2 δ∗δ∗ (E ⊗ δ∗p∗F1 ) ⊗ δ∗p∗F2 δ∗δ∗ (E ⊗ F1 ) ⊗ F2 2  δ∗δ∗ E ⊗ δ∗ (p∗F1 ⊗ p∗F2 )  δ∗δ∗ E ⊗ δ∗p∗ (F1 ⊗ F2 ) δ∗δ∗ (E ⊗ F1 ) ⊗ δ∗p∗F2 δ∗ (δ∗ (E ⊗ δ∗p∗F1 ) ⊗ p∗F2 ) δ∗δ∗ (E ⊗ δ∗p∗F1 ⊗ δ∗p∗F2 ) 3 δ∗δ∗ (E ⊗ F1 ⊗ F2 ) δ∗δ∗ (E ⊗ F1 ⊗ δ∗p∗F2 ) δ∗ (δ∗ (E ⊗ F1 ) ⊗ p∗F2 ) Commutativity of the unlabeled subdiagrams is easy to verify. FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP Subdiagram 1 11 expands naturally as δ∗ (δ∗ E ⊗ p∗F1 ) ⊗ F2 δ∗δ∗ E ⊗ δ∗p∗F1 ⊗ F2 δ∗δ∗ E ⊗ F1 ⊗ F2 4 δ∗δ∗ E ⊗ δ∗p∗ (F1 ⊗ F2 ) δ∗δ∗ E ⊗ δ∗p∗F1 ⊗ δ∗p∗F2 δ∗δ∗ E ⊗ δ∗ (p∗F1 ⊗ p∗F2 )  δ∗ δ∗ E ⊗ p∗ (F1 ⊗ F2 ) 5 δ∗ (δ∗ E ⊗ p∗F1 ⊗ p∗F2 ) δ∗ (δ∗ E ⊗ p∗F1 ) ⊗ δ∗p∗F2 For commutativity of 4 , see the proof of [L09, 3.6.10]. For that of 5 , see [L09, Example 3.4.4(b)]. Commutativity of the other two subdiagrams is clear, and so 1 commutes. Commutativity of 2 is given by Lemma 2.7. Finally, for commutativity of 3 , see again the proof of [L09, 3.6.10].  Corollary 2.9.5. Upon identifying—as one may—G ⊗ OX with G for all G ∈ D(X), one has that ψ := ψ(E, OX ) is the identity map of δ∗ δ∗ E. Proof. The case F1 = F2 = OX of Lemma 2.9.4 implies that ψ 2 = ψ, whence ψ = ψ 2 ψ −1 = ψψ −1 = id.  3. Verdier’s isomorphism Recall from Section 2.1 that, unless otherwise specified, all the functors that appear are functors between derived categories. i f 3.1. Let U − →X − → Z be E-maps, with i essentially étale, and let p Y := U ×Z X −−−2−→  p1  ♠ y U X  f y −−−−→ Z fi be the resulting fiber square, where p1 and p2 are the canonical projections. With δU the diagonal map and idU the identity map of U, the composite (3.1.1) δ id ×i g : U −−U→ U ×Z U −−U−−→ U ×Z X is the graph of i, i.e., p1 g = idU and p2 g = i. In Theorem 3 of [V68], f i is essentially smooth, of relative dimension, say, d (see Section 2.3 above); and that theorem says there is a D(U )isomorphism  V ∼ (f i)! OZ −→ Ωfdi [d] := d Ωf i [d]. 12 J. LIPMAN AND A. NEEMAN A slight elaboration of Verdier’s approach produces, as follows, a functorial isomorphism  ∼ (3.1.2) vf,i (F ) : (f i)!F −→ Ωfdi [d] ⊗U (f i)∗F F ∈ D+qc (Z) . In particular, making the allowable identifications Ωfdi [d] ⊗X (f i)∗ OZ = Ωfdi [d] ⊗X OX = Ωfdi [d], we consider vf,i (OZ ) to be a map from (f i)! OZ to Ωfdi [d]. (In §3.4, the definition of vf,i (F ) will be extended to all F ∈ Dqc (Z).) The construction of vf,i (F ) uses two maps. The first is the following natural composite map ϑ—whose definition needs only that f i be flat—with χg as in (2.6.6), and β♠ as in (2.6.7) (an isomorphism since F ∈ D+qc (Y )): ∼ ϑ : g! OY ⊗U (f i)!F −→ g ! OY ⊗U i∗f !F ∼ −→ g ! OY ⊗U g∗p∗2 f !F (3.1.3) χg −→ g!p∗2 f !F β♠ −→ g! p!1 (f i)∗F ∼ −→ (f i)∗F. If f i is essentially smooth, then in (3.1.1), both idU × i and the regular immersion δU are perfect, whence so is g (see §2.4), so that χg is an isomorphism.3 Thus, in this case, ϑ is an isomorphism. The second is an isomorphism that holds when f i is essentially smooth of relative dimension d, (3.1.4) ∼ g! OY −→ HomU (Ωfdi , OU )[−d], described in [H66, p. 180, Corollary 7.3] or [C00, §2.5] via the “fundamental local isomorphism” and Cartan-Eilenberg resolutions. An avatar (3.2.8) of (3.1.4) is reviewed in §3.2 below. The OU -module Ωfdi is invertible, so the complexes HomU (Ωfdi , OU )[−d] and HomU (Ωfdi [d], OU ) are naturally isomorphic in D(U ) to the complex G which is (Ωfdi )−1 in degree d and 0 elsewhere. Modulo these isomorphisms, the isomorphism (3.1.5) ∼ HomU (Ωfdi [d], OU ), HomU (Ωfdi , OU )[−d] −→ resulting from the usual triangulated structure on the functor Hom(−, OU ) 2 is given by scalar multiplication in G by (−1)d +d(d−1)/2 = (−1)d(d+1))/2 (cf. [C00, p. 11, (1.3.8)].) 3 As δ is finite and id × i is essentially étale, one can see this more concretely by U U showing that δU∗ (χ) is isomorphic to the natural map Hom(δU∗ OU , OU×Z U ) ⊗ G −→ Hom(δU∗ OU , G) (G := (idU × i)∗p∗2 f !F ). FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 13 Let (3.1.6) ∼ γ : g ! OY −→ HomU (Ωfdi [d], OU ) be the isomorphism obtained by composition from (3.1.4) and (3.1.5). Thus when f i is essentially smooth, so that Ωfdi is an invertible OU module, one has a chain of natural functorial isomorphisms, the first being inverse to the evaluation map 2.2.2: ∼ (f i)!F −→ HomU (Ωfdi [d], (f i)!F ) ⊗U Ωfdi [d] ∼ −→ HomU (Ωfdi [d], OU ) ⊗U (f i)!F ⊗U Ωfdi [d] (3.1.7) (2.6.8) ∼ g ! OY ⊗U (f i)!F ⊗U Ωfdi [d] −→ (3.1.6) ∼ ∼ Ωfdi [d] ⊗U (f i)∗F. −→ (f i)∗F ⊗U Ωfdi [d] −→ (3.1.3) The map vf,i (F ) is defined to be the composition of this chain. 3.2. Expanding a bit on [LS81, §2, II], we review the relation (3.2.7) between the normal bundle of a regular immersion δ : U → W and the relative dualizing complex δ! OW ; and from that deduce the isomorphism (3.1.4). Let δ : U → W be any closed immersion of schemes, and I the kernel of the associated surjective map s : OW ։ δ∗ OU . Then 0 ∗ H δ s OU ∼ = H 0 δ∗OW −−−−→ H 0 δ∗δ∗ OU ∼ = OU , is an isomorphism. The natural triangle δ∗s + δ∗I −→ δ∗ OW −−→ δ∗δ∗ OU −→ gives rise to an exact sequence of OU -modules t H −1 δ∗ OW −−−−→ H −1 δ∗δ∗ OU −−−−→ H 0 δ∗I −−−−→ ker(H 0 δ∗s) 0 I/I 2 0 Clearly, t is an isomorphism, and so one has the natural OU -isomorphism (3.2.1) ∼ t−1 : I/I 2 −→ H −1 δ∗δ∗ OU . (The isomorphism t is induced by the projection C[−1] ։ P , where K → I is a flat resolution of I and C is the mapping cone of the composite map K → I ֒→ OW . It is the negative of the connecting homomorphism OW W Tor O 1 (δ∗ OU , δ∗ OU ) → Tor 0 (δ∗ OU , I) usually attached to the natural exact sequence 0 → I → OW → δ∗ OU → 0, see [L09, end of §1.4].) 14 J. LIPMAN AND A. NEEMAN There is an alternating graded OU -algebra structure on ⊕n≥0 H −n δ∗δ∗ OU , induced by the natural product map ∼ ∼ δ∗δ∗ OU ⊗U δ∗δ∗ OU −→ δ∗ (δ∗ OU ⊗W δ∗ OU ) −→ δ∗δ∗ (OU ⊗U OU ) −→ δ∗δ∗ OU . (Cf. e.g., [B07, p. 201, Exercise 9(c)].) Hence (3.2.1) extends uniquely to a homomorphism of graded OU -algebras (3.2.2) ⊕n≥0 Vn (I/I 2 ) −→ ⊕n≥0 H −n δ∗δ∗ OU . For example, over an affine open subset of W, if I is generated by a regular sequence of global sections t := (t1 , t2 , . . . , td ) then a finite free resolution of δ∗ OU is provided by the Koszul complex K(t) := ⊗di=1 Ki where Ki is the ti complex which is OW − → OW in degrees -1 and 0 and vanishes elsewhere; and there results a D(U )-map, Vn ∼ ∼ δ∗K(t) −→ (I/I 2 )[n] = δ∗δ∗ OU . (3.2.3) ⊕d n=0 δ∗K(t) (Note that is just the exterior algebra—with vanishing differentials— on OUn , which is isomorphic to I/I 2 via the natural map n OW = K −1 (t) ֒→ I ⊂ OW .) One verifies that applying the functor H −n to (3.2.3) produces the degree n component of (3.2.2) (a map that does not depend on the choice of the generating family t). Next, for any OU -complex E with H eE = 0 for all e < 0, the natural map 0 H E → E induces a map (3.2.4) H 0 HomU (E, OU ) −→ H 0 Hom(H 0E, OU ) =: Hom0 (H 0E, OU ). Hence for any integer n and any OU -complex F such that H eF = 0 for all e < −n, one has the natural composite (3.2.5) ∼ H n HomU (F, OU ) −→ H 0 HomU (F, OU )[n] ∼ −→ H 0 HomU (F [−n], OU ) ∼ −→ Hom0 (H 0 (F [−n]), OU ) −→ Hom0 (H −n F, OU ). (3.2.4) (The second map—whose source and target are equal—is multiplication by (−1)n(n+1)/2 : replace OU by a quasi-isomorphic injective complex, and take p = 0, m = −n in the expression (−1)pm+m(m−1)/2 after [C00, p. 11, (1.3.8)].) Now if the closed immersion δ is regular, of codimension d, i.e., I is generated locally by regular sequences t of length d, so that δ∗ OU is locally resolved by free complexes of the form K(t), then there results the sequence FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 15 of isomorphisms ∼ H d δ∗δ∗ δ! OW −→ H d δ∗ HomW (δ∗ OU , OW ) (1.2.1) ∼ −→ H d HomU (δ∗δ∗ OU , OU ) (2.6.4) (3.2.6) ∼ Hom0U (H −d δ∗δ∗ OU , OU ) −→ (3.2.5) ∼ V −→ Hom0U ( d(I/I 2 ), OU ). (3.2.2) In particular, there is a canonical OU -isomorphism  V ∼ H d δ∗δ∗ δ! OW −→ Hom0U d (I/I 2 ), OU =: νδ . Moreover, since δ∗ δ! OW ∼ = HomW (δ∗ OU , OW ) has nonvanishing homology only in degree d, therefore the same holds for δ! OW , whence the natural maps are isomorphisms ∼ ∼ δ! OW [d] −→ H d δ! OW ←− H d δ∗δ∗ δ! OW . Thus, when δ is a regular immersion there is a canonical isomorphism ∼ δ! OW −→ νδ [−d]. (3.2.7) It is left to the interested reader to work out the precise relationship of (3.2.7) to the similar isomorphisms in [H66, p. 180, Corollary 7.3] and [C00, §2.5]. Now in (3.1.1), if f i is essentially smooth of relative dimension d then δU : U → W := U ×Z U is a regular immersion and Ωfdi is locally free of rank ∼ Hom (Ω d , O ) is one (see §2.3), so the natural map Hom0U (Ωfdi , OU ) −→ U U fi an isomorphism. Thus, there are natural isomorphisms, with Y := U ×Z X, (3.2.8) ∼ g! OY −→ δU! (idU × i)! OY = δU! (idU × i)∗ OY = δU! OW V ∼ −→ Hom0U ( d(I/I 2 ), OU )[−d] = HomU (Ωfdi , OU )[−d]. (3.2.7) The isomorphism (3.1.4) is defined to be the resulting composition. 3.3. Though it is not a priori clear, vf,i depends only on the map f i and not on its factorization into f and i. (In [V68], f is assumed proper.) Indeed: i f Proposition 3.3.1. For U − →X− → Z as in §3.1, if f i is essentially smooth then vf,i = vf i, idU . Proof. There is a commutative E-diagram, with i, f , p1 , p2 and g as in §3.1, δ the diagonal map, q1 , q2 the canonical projections, and ♠, ♣ and ♥ labeling the front, top and rear faces of the cube, respectively. (These three faces are fiber squares; and since f i is flat therefore so are p2 and q2 .) 16 J. LIPMAN AND A. NEEMAN δ U q2 W := U ×Z U g j := id × i ♣ p2 Y := U ×Z X U i X fi ♥ q1 f ♠ p1 U U Z fi Z fi Note that since i is essentially étale therefore i! = i∗ and j ! = j ∗. There is, as in (3.2.8), a natural composite isomorphism ∼ ∼ ξ : g! OY −→ δ! j ! OY = δ! j ∗ OY −→ δ! OW . A detailed examination of the definition of vf,i in (3.1.7), taking into account the definition (3.2.8) of (3.1.4), shows that it will suffice to prove commutativity of the border of the following natural functorial diagram. via ξ g! OY ⊗ (f i)! δ! OW ⊗ (f i)! ≃ g! OY ⊗ i∗f ! δ! j ! OY ⊗ i∗f ! ≃ g ! (OY ⊗ g ∗ p∗2 f ! ) ≃ 1 g! OY ⊗ g∗ p∗2 f ! χg δ! j ∗ OY ⊗ i∗f ! δ! j ! OY ⊗ δ∗j ∗ p∗2 f ! χδ δ! (j ! OY ⊗ j ∗ p∗2 f ! ) δ! OW ⊗ δ∗q2∗ (f i)! δ! OW ⊗ δ∗q2∗ i∗f ! χδ 2 ≃ χδ δ! (OW ⊗ q2∗ (f i)! ) δ! (OW ⊗ q2∗ i∗f ! ) 3 δ! χj g! p∗2 f ! δ! (OW ⊗ j ∗ p∗2 f ! ) δ! j ! p∗2 f ! = δ! j ∗ p∗2 f ! g!β♠ via β♠ g! p!1 (f i)∗ δ! j ! p!1 (f i)∗ ≃ δ! q2∗ i∗f ! δ !β ♥ 4 δ! (p1 j)! (f i)∗ 5 (f i)∗ δ! q2∗ (f i)! ≃ δ! q1! (f i)∗ FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 17 Commutativity of subdiagram 1 (resp. 5 ) results from the pseudofunctoriality of (−)∗ (resp. (−)! ). Commutativity of 2 is given by transitivity of χ with respect to composition of maps, see [Nm14, 13.4] (or [L09, Exercises 4.7.3.4(d) and 4.9.3(d)]). Commutativity of 3 follows from the fact that for any F ∈ D+qc (Y ), the following natural diagram commutes: j ∗OY ⊗ j ∗F j ! OY ⊗ j ∗F χj ≃ 31 j ! (OY ⊗ F ) f OW ⊗ j ∗F 3 2 j ∗ (OY ⊗ F ) j ∗F For a sketch of the proof that 3 1 commutes see [L09, 4.9.2.3]. As for commutativity of 3 2 , replacement of F by a quasi-isomorphic flat complex reduces the problem to the context of ordinary (nonderived) functors, at which point the justification is left to the reader. Commutativity of 4 is given by transitivity of β with respect to juxtaposition of fiber squares (see [Nm14, Theorem 11.9] or [L09, Theorem 4.8.3]), as applied to the following decomposition of the fiber square ♥: q • −−−2−→   jy ♣ p • −−−2−→  p1  ♠ y •   yi •  f y • −−−−→ • fi ∼ j ∗ p∗ Here one needs to use that β♣ is the canonical isomorphism q2∗ i∗ −→ 2 ′ (see [Nm14, 11.4 and 11.5] with p = p = identity map in the diagram of [Nm14, 11.4(i)], or [L09, 4.8.8(i)].) Commutativity of the remaining subdiagrams is easy to check, whence the assertion.  Accordingly, we restrict henceforth to the case U = X and i = idX . The map g : X → X ⊗Z X is then the diagonal. 3.4. Again, let f : X → Z be an essentially smooth E-map of relative dimension d. With χf as in (2.6.6), define vf (F ) for F ∈ Dqc (Z) to be the composite isomorphism (3.4.1) −−−−→ Ωfd [d] ⊗X f ∗F. f !F −f − → f ! OZ ⊗X f ∗F −−−−f −1 χf vf,id (OZ)⊗ id X As before (just after (3.1.2)), the identifications Ωfd [d] ⊗X f ∗ OZ = Ωfd [d] ⊗X OX = Ωfd [d], 18 J. LIPMAN AND A. NEEMAN allow us to consider vf (OZ ) to be a map from f ! OZ to Ωfd [d]. Proposition 3.4.2. If F ∈ D+qc (Z) then vf (F ) = vf, idX (F ). Proof. Let g : X → Y := X ×Z X be the diagonal map. Set ω := Ωfd [d] (a perfect complex), and set [A, B] := HomX (A, B) (A, B ∈ D(X)). Let κ = κX (ω, −, −) be as in (2.6.8), ϑ as in (3.1.3) and γ as in (3.1.6) (the last two with i := idX ). Since f is essentially smooth, all of these maps are isomorphisms. By definition (see (3.1.7)), Proposition 3.4 says that the border of the following diagram (in which ⊗ := ⊗X ) commutes: f ! OZ ⊗ f ∗F f ! OZ ⊗ f ∗F χf f !F g! OY ⊗ f ! OZ ⊗ ω ⊗ f ∗F ≃ vf,idX(OZ) ⊗ id 2 ≃ 1 ≃ [ω, f ! OZ ] ⊗ ω ⊗ f ∗F [ω, f ! OZ ⊗ f ∗F ] ⊗ ω κ χf [ω, f !F ] ⊗ ω ϑ ≃ ω ⊗ f ∗F γ −1 κ−1 f ∗ OZ ⊗ ω ⊗ f ∗F [ω, f ! OZ ] ⊗f ∗F ⊗ ω ≃ 3 [ω, OX ] ⊗ f ! OZ ⊗ ω ⊗ f ∗F κ−1 f ∗F ⊗ ω ≃ κ−1 f ∗ OZ ⊗ f ∗F ⊗ ω ≃ κ−1 4 ϑ [ω, OX ] ⊗f ! OZ ⊗f ∗F ⊗ω γ −1 g! OY ⊗ f ! OZ ⊗ f ∗F χf [ω, OX ] ⊗ f !F ⊗ω ϑ ⊗ω χf γ −1 g! OY ⊗ f !F ⊗ ω Commutativity of the unlabeled subdiagrams is straightforward to verify. Commutativity of 1 follows from the definition (3.1.7) of vf, idX (OZ ). Commutativity of 2 is essentially the definition of the map κ. Commutativity of 3 results from Lemma 2.8. For 4 , it’s enough to have commutativity of the functorial diagram via χf g! OY ⊗X f!OZ ⊗X f ∗ −−−−→ g! OY ⊗X f !   via ϑy yϑ f ∗, f ∗ OZ ⊗X f ∗ that expands to the border of the next natural diagram, in which the omitted subscripts on ⊗ symbols are the obvious ones, and, with reference to the FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP standard fiber square p X ×Z X −−−2−→  p1  ♦ y X 19 X  f y −−−−→ Z , f β♦ is as in (2.6.7): via χf g! OY ⊗ f ! OZ ⊗ f ∗ g! OY ⊗ f ! ≃ g ! OY ⊗ g∗ p∗2 (f ! OZ ⊗ f ∗) 5 ≃ ≃ via χf g! OY ⊗ g∗ p∗2 f ! ≃ via β ♦ 6 g! OY ⊗ g ∗ p∗2 f ! OZ ⊗ g ∗ p∗2 f ∗ f g! OY ⊗ g∗(p∗2 f ! OZ ⊗ p∗2 f ∗) via β ♦ g! OY ⊗ g ∗ p!1 f ∗OZ ⊗ g∗ p∗2 f ∗ via χg via χp1 f χg ≃ 9 χp 1 g ≃ χg via χg g! (p!1 f ∗ OZ ⊗ p∗1 f ∗ ) 8 (p1 g)!f ∗OZ ⊗ (p1 g)∗f ∗ f ∗ OZ ⊗ f ∗ g! OY ⊗ g ∗(p!1 f ∗OZ ⊗ p∗1 f ∗) 7 g! p!1 f ∗ OZ ⊗ g∗ p∗1 f ∗ ≃ g! OY ⊗ g ∗ p!1 f ∗ via β ♦ (p1 g)!(f ∗ OZ ⊗ f ∗ ) via χp1 g! p!1 f ∗ ≃ (p1 g)! f ∗ ≃ f∗ For commutativity of subdiagram 5 , see the last two paragraphs of §3.6 in [L09]. Commutativity of 6 results from [Nm14, 13.7] with applied to the diagram ♦ (cf. [L09, 4.9.3(c)].) Commutativity of 7 , 8 and 9 are left mostly to the reader (cf. [L09, Exercises 4.7.3.4(a), (d) and (b)], as modified in [L09, 4.9.3(d)], describing the behavior of χ vis-à-vis associativity of tensor product, composition of maps, and identity maps, respectively.) For more details on 8 , see [Nm14, 13.4]. Commutativity of the remaining subdiagrams is easy to check, whence the assertion.  20 J. LIPMAN AND A. NEEMAN Remark 3.4.3 (Base change). Let there be given a fiber square in E g′ X ′ −−−−→   f ′y X  f y Z ′ −−−g−→ Z in which f (and hence f ′ ) is essentially smooth of relative dimension d. The isomorphism vf (OZ ) induces an OX -isomorphism  ∼ ωf := H −d f ! OZ −→ H −d Ωdf [d] = Ωdf , and similarly for f ′ . The resulting composite isomorphism ∼ ∼ ∼ ωf ′ , Ωdf ′ −→ g′∗ ωf −→ g′∗ Ωdf −→ is discussed in [S04, p. 740, Theorem 2.3.5]. The next Proposition expresses compatibility between vf and (derived) tensor product. Proposition 3.4.4. For any F1 , F2 ∈ Dqc (Z), the following diagram, where ⊗ := ⊗X , commutes. vf (F1 )⊗id f !F1 ⊗ f ∗F2 −−−−−−→ Ωfd [d] ⊗ f ∗F1 ⊗ f ∗F2     χf (F1, F2 )y ynatural f ! (F1 ⊗ F2 ) −−−−−−−→ Ωfd [d] ⊗ f ∗(F1 ⊗ F2 ). vf (F1 ⊗F2 ) Proof (Sketch). The definition of vf makes it enough to prove commutativity of the next diagram (expressing transitivity of χf for any F0 ∈ Dqc (Z)), and then to take F0 := OZ . χf (F0, F1)⊗id f ! (F0 ⊗ F1 ) ⊗ f ∗F2 ←−−−−−−−−− f !F0 ⊗ f ∗F1 ⊗ f ∗F2     χf (F0 ⊗F1, F2)y ynatural f ! (F0 ⊗ F1 ⊗ F2 ) ←−−−−−−−−− f !F0 ⊗ f ∗ (F1 ⊗ F2 ). χf (F0 , F1 ⊗F2) For this, one reduces easily, via a compactification of f, to the case where f is proper, a case dealt with (in outline) in [L09, Exercise 4.7.3.4(a)].  FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 21 4. The fundamental class 4.1. Let f : X → Z be a flat E-map. Set Y := X ×Z X, let δ : X → Y be the diagonal map, and pi : Y → X (i = 1, 2) the projections onto the first and second factors, respectively, so that we have the diagram, with fiber square ♣ , p δ (4.1.1) X −−−−→ Y −−−2−→  p1  ♣ y X  f y X −−−−→ Z f The maps pi are flat. There are maps of Dqc -functors (4.1.2) µi : δ∗ → p!i (i = 1, 2) adjoint, respectively, to the natural maps id = (pi δ)! → δ! p!i . Thus µi is the natural composite map δ∗ = δ∗ (pi δ)! −→ δ∗ δ! p!i −→ p!i . Associated to ♣ is the functorial base-change isomorphism (see (2.6.7)) ∼ β = β♣ : p∗2 f !F −→ p!1 f ∗F (F ∈ Dqc (Z)). Definition 4.2. With preceding notation, the fundamental class of f, Cf : δ∗ δ∗ f ∗ → f ! , a map between functors from Dqc (Z) to Dqc (X), is given by the composite δ∗ δ∗ f ∗ −−−→ δ∗ p!1 f ∗ −−f −−→ f ! . −−→ δ∗ p∗2 f ! −−f via µ1 δ∗β −1 natural Remarks. (Not used elsewhere). It results from [AJL14, 2.5 and 3.1] that the fundamental class commutes with essentially étale localization on X. That is, if g : X ′ → X is essentially étale then Cfg is obtained from Cf by applying the functor g ∗ and then making canonical identifications. See also [AJL14, Theorem 5.1] for the behavior of Cf under flat base change. These results imply that if u : U ֒→ X and v : V ֒→ Z are open immersions such that f (U ) ⊂ V , and f0 : U → V is the restriction of f , then u∗ (Cf ) can be identified with Cf . Locally, then, Cf reduces to the fundamental class of 0 a flat E-map of affine schemes, in which case a simple explicit description is given in [ILN14, Theorem 4.2.4]. The next Proposition expresses compatibility between Cf and (derived) tensor product. 22 J. LIPMAN AND A. NEEMAN Proposition 4.3. For any F1 , F2 ∈ Dqc (Z), the following diagram, where ⊗ := ⊗X , χf is as in (2.6.6) and ψ := ψ(δ, p1 , f ∗F1 , f ∗F2 ), commutes. δ∗δ∗ f ∗F1 ⊗ f ∗F2 Cf (F1 ) ⊗ id f !F1 ⊗ f ∗F2 ψ δ∗δ∗ (f ∗F1 ⊗ f ∗F2 ) χf (F1, F2 ) (2.6.1) δ∗δ∗ f ∗ (F1 ⊗ F2 ) f ! (F1 ⊗ F2 ) Cf (F1 ⊗ F2 ) Proof. The diagram expands, naturally, as follows, where α is induced by ∼ (f p )∗ = (f p )∗ −→ ∼ p∗ f ∗ and by the base-change the composite p∗2 f ∗ −→ 2 1 1 isomorphism β. δ∗δ∗ f ∗F1 ⊗ f ∗F2 δ∗ p!1 f ∗F1 ⊗ f ∗F2 δ∗ p∗2 f !F1 ⊗ f ∗F2 f !F1 ⊗ f ∗F2 1 δ∗ (p!1 f ∗F1 ⊗ p∗1 f ∗F2 ) 2 α δ∗ (δ∗ f ∗F1 ⊗ p∗1 f ∗F2 ) 3 δ∗δ∗ (f ∗F1 ⊗ δ ∗ χ p1 δ∗ (p∗2 f !F1 ⊗ p∗2 f ∗F2 ) δ∗ p∗1 f ∗F2 ) δ∗ p∗2 (f !F1 ⊗ f ∗F2 ) f !F1 ⊗ f ∗F2 δ∗ p!1 (f ∗F1 ⊗ f ∗F2 ) 4 δ∗δ∗ (f ∗F1 ⊗ f ∗F2 ) δ∗δ∗ f ∗ (F1 ⊗ F2 ) δ∗ p!1 f ∗ (F1 ⊗ F2 ) δ∗p∗2 χf δ∗ p∗2 f ! (F1 ⊗ F2 ) via χf f ! (F1 ⊗ F2 ) Commutativity of 1 follows from that of the next diagram of natural isomorphisms, the commutativity of whose subdiagrams is either obvious or included in the pseudofunctoriality of (−)∗ : FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP f ∗ = (p1 δ)∗ f ∗ (p2 δ)∗ f ∗ = f ∗ (f p1 δ)∗ (f p2 δ)∗ δ∗ (f p1 )∗ δ∗ (f p2 )∗ δ∗ p∗2 f ∗ δ∗ p∗1 f ∗ Subdiagram and p := p2 . 2 23 expands, naturally, as follows, with E1 := f !F1 , E2 := f ∗F2 (pδ)∗E1 ⊗ E2 δ∗p∗E1 ⊗ E2 E1 ⊗ E2 5 δ∗p∗E1 ⊗ (pδ)∗E2 (pδ)∗E1 ⊗ (pδ)∗E2 γ (pδ)∗ (E1 ⊗ E2 ) 6 δ∗p∗E1 ⊗ δ∗p∗E2 δ∗(p∗E1 ⊗ p∗E2 ) δ∗p∗ (E1 ⊗ E2 ) Commutativity of 6 is given by the dual of the commutative diagram [L09, 3.6.7.2] (see proof of [L09, 3.6.10]). As pδ is the identity map of X, the same diagram, with g = f = id, yields that the isomorphism γ is idempotent, whence it is the identity map, so that 5 commutes. Subdiagram 3 without δ∗ expands, naturally, to the following, with E1 := f ∗F1 , E2 := f ∗F2 , and p := p1 : δ∗E1 ⊗ p∗E2 δ∗ δ! p!E1 ⊗ p∗E2 p!E1 ⊗ p∗E2 7 δ∗ (δ! p!E1 ⊗ δ∗p∗E2 ) δ∗ χδ δ∗ δ! (p!E1 ⊗ p∗E2 ) χp δ∗ (E1 ⊗ δ∗p∗E2 )  δ∗ (pδ)!E1 ⊗ (pδ)∗E2 δ∗ δ! χp δ∗ δ! p! (E1 ⊗ E2 ) δ∗ (E1 ⊗ E2 ) Commutativity of subdiagram (δ being proper). 8 7 p! (E1 ⊗ E2 ) is immediate from the definition of χδ 24 J. LIPMAN AND A. NEEMAN In [Nm14] there is a blanket convention that the functors and natural transformations strictly respect identities, hence (pδ)∗ = id∗ = id = id! = (pδ)! . The commutativity of 8 follows from [Nm14, Theorem 13.4]. Commutativity of subdiagram 4 is given by [Nm14, Proposition 13.7]. Commutativity of all the remaining (unlabeled) subdiagrams is clear.  4.4. Let f : X → Z be a flat E-map. The map f is equidimensional of relative dimension d if for each x ∈ X that is a generic point of an irreducible component of the fiber f −1f (x), the transcendence degree of the residue field of the local ring OX,x over that of OZ,f (x) is d. When f is of finite type, this just means that every irreducible component of every fiber has dimension d. An essentially smooth E-map of constant relative dimension d is equidimensional of relative dimension d. For any equidimensional such f, of relative dimension d, it holds that H ef ! OZ = 0 whenever e < −d. Indeed, this assertion is local on Z and X (see the remark right after (1.1.3)). One gets then from [EGA4, 13.3.1] that f may be assumed to be of the form Spec B → Spec A where B is a localization of a module-finite quasi-finite algebra B0 over the polynomial ring A[T1 , . . . , Td ]. By Zariski’s Main Theorem [EGA4, 8.12.6] the map Spec B0 → Spec A[T1 , . . . , Td ] factors as finite ◦ (open immersion). The isomorphism (3.1.2) shows that the relative dualizing complex for the map Spec A[T1 , . . . , Td ] → Spec A is concentrated in degree −d, so (1.2.1) implies that the assertion holds for any map Spec B1 → Spec A with B1 finite over A[T1 , . . . , Td ], and then by (i) in 1.1, it holds for Spec B → Spec A. So there is a canonical composite map (4.4.1) Ωdf [d] −−−−→ (H −d δ∗δ∗ OX )[d] −−−−→ (H −d f ! OZ )[d] −→ f ! OZ , H −d Cf (3.2.2) whence a canonical map ∼ cf : Ωdf [d] ⊗ f ∗ −→ f ! OZ ⊗ f ∗ −→ f !. (2.6.6) For essentially smooth f there is then an obvious question—the one that motivated the present paper, and to which the answer is affirmative: Theorem 4.5. For essentially smooth E-maps f : X → Z of relative dimension d, and F ∈ Dqc (Z), the fundamental class map cf (F ) is inverse to Verdier’s isomorphism vf (F ). Proof. As in Section 4.1. set Y := X ×Z X, let δ : X → Y be the diagonal map, and pi : Y → X (i = 1, 2) the projections onto the first and second factors, respectively, so that we have the diagram, with fiber square ♣ , δ (4.5.1) p X −−−−→ Y −−−2−→  p1  ♣ y X  f y X −−−−→ Z f FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 25 Resolving δ∗ OX locally by a Koszul complex, one sees that H e δ∗δ∗ OX = 0 if e < −d; so one has natural maps  (4.5.2) ω := Ωdf [d] −−−→ H −d δ∗δ∗ OX [d] −→ δ∗δ∗ OX , (3.2.2) and cf is the composite χf ω ⊗ f ∗ −−−−−−→ δ∗δ∗ OX ⊗ f ∗ −−−−−−→ f ! OZ ⊗ f ∗ −−−−→ f ! . (4.5.2)⊗id Cf (OZ )⊗id (2.6.6) In view of Proposition 3.4.4, the theorem says then that the composite ω ⊗ f ∗ −−−−−−→ δ∗δ∗ OX ⊗ f ∗ −−−−−−→ f ! OZ ⊗ f ∗ −−−−−−→ ω ⊗ f ∗ (4.5.2)⊗id Cf (OZ )⊗id vf (OZ )⊗id is the identity map. (Here we implicitly used commutativity of the diagram of natural isomorphisms −−→ OX ⊗ f ∗ f ∗ OZ ⊗ f ∗ −−f    ≃ ≃y (4.5.3) y f ∗ (OX ⊗ id) −−f −−→ f∗ which commutativity holds since, mutatis mutandis, this diagram is dual [L09, 3.4.5] to the commutative subdiagram 2 in the proof of [L09, 3.4.7(iii)].) It suffices therefore to prove Theorem 4.5 when F = OZ . Let (−)′ be the endofunctor HomX (−, OX ) of D(X). The “mirror image” of the evaluation map ev(X, E, OX ) (see (2.2.2)) is the natural composite (4.5.4) ∼ E ⊗ E ′ −→ E ′ ⊗ E −−−→ OX (2.2.2) (E ∈ D(X)). Now, after unwinding of the definitions involved, Theorem 4.5 for F = OZ states that the border of the next natural diagram commutes. (Going around clockwise from the upper left corner to the bottom right one gives cf (OZ ), while going around counterclockwise gives vf (OZ )−1 .) In this diagram, ⊗ := ⊗X , ψ20 := ψ(δ, p2 , OX , OX )—the identity map of δ∗δ∗ OX (see 2.9.5), and ψ2 := ψ(δ, p2 , OX , δ! p!1 OX ). Commutativity of the unlabeled subdiagrams is straightforward to check. The problem is to show commutativity of 1 . 26 J. LIPMAN AND A. NEEMAN OX ⊗ ω (4.5.2) ω ⊗ OX ≃ ≃ δ! p!1 OX ⊗ ω ≃ (2.6.7) (4.5.2) δ∗δ∗ OX ⊗ δ! p!1 OX ≃ (2.6.6) ≃ ψ2 (3.1.6) ω ⊗ ω ′ ⊗ δ∗ p!1 OX (4.5.4) ≃ χ−1 δ δ∗ p!1 OX (2.6.7) ≃ δ! OY ⊗ δ∗ p∗2 f ! OZ ⊗ ω ≃ (2.6.7) δ∗ p∗2 f ! OZ (2.6.7) ≃ ≃ ≃ δ∗δ∗ δ! p!1 OX 1 ω ⊗ δ! OY ⊗ δ∗ p!1 OX δ! p∗2 f ! OZ ⊗ ω δ∗δ∗ OX ≃ ω ⊗ δ! p!1 OX f ψ20 δ∗δ∗ OX ⊗ OX (4.5.4) ω ⊗ δ! OY ⊗ δ∗ p∗2 f ! OZ (3.1.6) ω ⊗ ω ′ ⊗ δ∗ p∗2 f ! OZ ≃ ≃ δ! OY ⊗ f ! OZ ⊗ ω f (3.1.6) ω ′ ⊗ f !OZ ⊗ ω f ω ⊗ ω ′ ⊗ f ! OZ f (4.5.4) f ! OZ We’ll need another description of the map (3.1.6) (Lemma 4.5.9 below). For this, begin by checking that the counit map δ∗δ∗ G → G (G ∈ D(X)) has right inverses τp (G), where p : Y → X is any map such that pδ = idX (e.g., p = p1 or p2 ), and τp (G) is the natural composite (4.5.5) ∼ ∼ G −→ δ∗p∗ G −→ δ∗p∗ p∗ δ∗ G −→ δ∗ δ∗ G, δ∗ υ(G) ∼ δ ∗p∗ G −−−−→ δ ∗ δ G, where that is, the composite G −→ ∗ υ : p∗ → δ∗ (4.5.6) ∼ p δ . is the map adjoint to id −→ ∗ ∗ Let ρ 0 be the natural composite (of isomorphisms, since δ∗ OX is perfect) δ∗δ∗ δ! OY −−−−→ δ∗ HomY (δ∗ OX , OY ) −−−−→ (δ∗δ∗ OX )′ , (1.2.1) (2.6.4) and set (4.5.7) ρ = ρp := ρ 0 τp (δ! OY ) : δ! OY −→ (δ∗δ∗ OX )′ . As noted just before (3.2.7), H e (δ! OY ) = 0 for any e 6= d, whence the counit map δ∗δ∗ δ! OY → δ! OY is taken to an isomorphism by the functor H d . The inverse of this isomorphism is H d τp (δ! OY ) because τp (δ! OY ) is rightinverse to δ∗δ∗ δ! OY → δ! OY . It follows then from its description via (3.2.6) that (3.2.8), with U = X, W = Y and n = d, is the natural composite  δ! OY ∼ = H d (δ! OY ) [−d] (4.5.8)  H d (ρ)[−d] ∼ −−−−−−→ H d ((δ∗δ∗ OX )′ ) [−d] −→ (Ωfd )′ [−d], the last isomorphism arising via (3.2.5) (with n = d) and (4.5.2). FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 27 Lemma 4.5.9. For any ρ = ρp as in (4.5.7), the map (3.1.6) factors as via (4.5.2) ρ δ! OY −−→ (δ∗δ∗ OX )′ −−−−−−→ ω ′ . Proof. For any complex E ∈ D(X) set E ≥d := t≥d E, with t≥d the truncation functor (denoted τ≥d in [L09, § 10.1]). The natural map H d (E)[−d] → E ≥d is an isomorphism if H e E = 0 for all e > d, a condition satisfied when E = (δ∗ δ∗ OX )′ or ω ′ . Accordingly, and in view of the description of (3.1.6) via (3.2.8) = (4.5.8), the lemma asserts that the border of the following diagram, whose top row is (4.5.8), commutes. ≥d (Ωfd )′ [−d] (δ! OY )≥d δ! OY (δ∗δ∗ OX )′ via (4.5.2) ρ (ω ′ )≥d (δ∗δ∗ OX )′ 2 (3.1.5) ω′ via (4.5.2) The unlabeled subdiagrams clearly commute. Subdiagram naturally as follows, with Hom = HomX :  H d (δ∗δ∗ OX )′ [−d] ≃ expands  (H −d δ∗δ∗ OX )′ [−d] cf. (4.5.2)  (Ωfd )′ [−d]  ≥d (δ∗δ∗ OX )′ (H −d δ∗δ∗ OX [d])′ (3.2.5) 2  ≥d (3.1.5) via (4.5.2) (ω ′ )≥d ω′ The vertices of this diagram can all be identified with the complex G that is H 0 Hom(Ωfd , OX ) in degree d and 0 elsewhere. When this is done, all the maps in the diagram are identity maps except for the two labeled (3.2.5) and (3.1.5), which are both multiplication in G by (−1)d(d+1)/2 . (See the remarks following equations (3.2.5) and (3.1.5)). Hence subdiagram 2 com mutes, and Lemma 4.5.9 is proved. 28 J. LIPMAN AND A. NEEMAN One has now that subdiagram 1 without p!1 OX expands naturally as follows, with χ as in (2.6.6), id the identity functor, and ψ3 := ψ(δ, p2 , OX , δ! OY ⊗Y δ∗ (−)), ψ4 := ψ(δ, p2 , δ! OY , δ∗ (−)), ψ7 := ψ(δ, p2 , OX , δ! OY ). ω ⊗ δ! (4.5.2) ψ2 δ∗δ∗ OX ⊗ δ! χ−1 δ χ−1 δ χ−1 δ ω ⊗ δ! OY ⊗ δ∗ (4.5.2) δ∗δ∗ δ! δ∗δ∗ OX ⊗ δ! OY ⊗ δ∗ ψ3 δ∗δ∗ (δ! OY ⊗Y δ∗ ) 3 ψ7 ⊗ id via ρ (2.6.3)−1 ψ4 4 δ∗δ∗ δ! OY via ρ ⊗ δ∗ (2.6.1) δ∗ (δ∗ δ! OY ⊗Y id) δ∗δ∗ OX ⊗ (δ∗δ∗ OX )′ ⊗ δ∗ 7 (4.5.2) δ∗ OY ⊗ δ∗ ω ⊗ (δ∗δ∗ OX )′ ⊗ δ∗ ω ⊗ ω ′ ⊗ δ∗ (2.6.1) δ∗ (OY ⊗Y id) (4.5.4) 6 (4.5.4) 8 OX ⊗ δ∗ f (4.5.2) 5 f δ∗ Commutativity of the unlabeled subdiagrams is clear; Commutativity of 3 is given by Lemma 2.9.4. Commutativity of 5 (without δ∗ ) is the definition of χδ = χδ (OY , −). Commutativityof 6 is given by that of the first diagram in [L09, 3.5.3(h)], with (A, B, C) := (δ∗δ∗ OX , ω, OX ). For commutativity of 8 , cf. (4.5.3). After restoring the term p!1 OX ∼ = p∗2 f ! OZ omitted above, one gets commutativity of 4 from Lemma 2.9.2, with E := δ! OY , F := f ! OZ . FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 29 That leaves subdiagram 7 , which without “ ⊗ δ∗ ” expands naturally as follows, where p := p2 and F ′′ := HomY (F, OY ) (F ∈ D(Y )): (2.6.1) δ∗δ∗ OX ⊗ δ! OY via τp (δ!OY ) δ∗(δ∗ OX ⊗ p∗δ! OY ) via (1.2.1) ≃ δ∗ (δ∗ OX ⊗ δ∗ δ! OY ) (2.6.1) (2.6.1) δ∗δ∗ δ∗p∗ δ! OY 7 4 via (1.2.1) 7 2 δ∗δ∗ OX ⊗ δ∗ (δ∗ OX )′′ δ∗ δ∗ OX ⊗ (δ∗ OX )′′ δ∗δ∗ δ! OY cf.(4.5.4) OX (4.5.4) ≃  7 3 via (2.6.4) δ∗δ∗ OX ⊗ (δ∗δ∗ OX )′ δ∗δ∗ (OX ⊗ δ∗p∗δ! OY ) via (4.5.6) 7 1 δ∗δ∗ OX ⊗ δ∗δ∗ δ! OY (2.6.3) δ∗ OY f Commutativity of subdiagram 7 1 results from the definition of τp . Commutativity of subdiagram 7 2 is clear. Commutativity of 7 3 follows from [L09, 3.5.6(a)] (with f := δ, A := δ∗ OX and B := OY ). Subdiagram 7 4 , with the initial “δ∗ ” in each term dropped, expands naturally as follows: (2.6.3) δ∗ OX ⊗ p∗ δ! OY δ∗ (OX ⊗ δ∗p∗ δ! OY ) via (4.5.6) via (4.5.6) (2.6.3) δ∗ OX ⊗ δ∗ δ! OY ≃ δ∗ (OX ⊗ δ∗δ∗ δ! OY ) ≃ 7 41 (2.2.1) 7 42 δ∗ δ∗p∗ δ! OY δ∗ OX ⊗ δ∗ δ∗δ∗ δ! OY ≃ (2.2.1) δ∗ OX ⊗ δ∗ δ! OY δ∗ (OX ⊗ δ! OY ) f δ∗ δ! OY 7 43 via (1.2.1) δ∗ δ! OY ⊗ δ∗ OX ζ(OX , OY ) ⊗ id δ∗ OX ⊗ (δ∗ OX )′′ f (2.2.1) δ∗ (δ! OY ⊗ OX ) see (2.6.5) (δ∗ OX )′′ ⊗ δ∗ OX 7 44 (2.2.2) OY Here, commutativity of the unlabeled subdiagrams is clear. The commutativity of subdiagram 7 41 is given by the definition of the projection isomorphism (2.6.3). 30 J. LIPMAN AND A. NEEMAN Commutativity of subdiagram 7 42 (which says, incidentally, that the ∼ id) follows map υ in (4.5.6) is adjoint to the natural isomorphism δ∗ p∗ −→ easily from τp in (4.5.5) being right inverse to the counit map δ∗ δ∗ G → G. Subdiagram 7 43 commutes because δ∗ is a symmetric monoidal functor. (See §2.2.) Finally, commutativity of subdiagram 7 44 means that the map ζ(OX , OY ) is adjoint to the natural composite (4.5.10) (2.2.1) δ∗ δ! OY ⊗Y δ∗ OX −−−−→ δ∗ (δ! OY ⊗X OX ) = δ∗ δ! OY −→ OY . But for any F ∈ Dqc (Y ), ζ(OX , F ) is, by definition, right-conjugate to the projection isomorphism (4.5.11) ∼ δ∗ δ∗G = δ∗ (δ∗G ⊗X OX ) ←− G ⊗Y δ∗ OX , (2.6.3) that is (see [L09, 3.3.5]), ζ(OX , F ) is adjoint to the natural composite ∼ δ∗ δ! F ⊗Y δ∗ OX −→ δ∗ δ∗δ∗ δ! F −→ δ∗ δ! F −→ F, (4.5.11) which for F := OY is the same as (4.5.10), since for any A and B ∈ D(X) (e.g., A = δ! OY and B = OX ), the following natural diagram commutes (as follows easily from the definition of (2.6.3)): δ∗ A ⊗Y δ∗ B (2.2.1) δ∗ (A ⊗X B) (2.6.3) δ∗ δ∗δ∗ A ⊗Y δ∗ B δ∗ (δ∗ δ∗A ⊗X B) (2.2.1) So subdiagram 7 44 commutes. Thus, 7 commutes, whence so does 1 .  5. Acknowledgement We are grateful to Pramathanath Sastry for a number of comments from which this paper benefited. References [AJL11] L. Alonso Tarrı́o, A. Jeremı́as López, J. Lipman, Bivariance, Grothendieck duality and Hochschild homology I: Construction of a bivariant theory. Asian J. Math., 15 (2011), 451–497. 2, 7 [AJL14] , Bivariance, Grothendieck duality and Hochschild homology II: the fundamental class of a flat scheme-map. Advances in Math., 257 (2014), 365–461. 3, 4, 9, 21 [B07] N. Bourbaki, Algèbre, Chapitre 10. Algèbre homologique. Springer-Verlag, BerlinNew York, 2007. 14 [C00] B. Conrad, Grothendieck duality and base change, Lecture Notes in Math. 1750, Springer-Verlag, Berlin-New York, 2000. 2, 3, 12, 14, 15 [C01] , Clarifications and corrections for Grothendieck duality and base change, http://math.stanford.edu/~conrad/ 2 FUNDAMENTAL CLASS OF AN ESSENTIALLY SMOOTH SCHEME-MAP 31 [EGA4] A. Grothendieck, J. Dieudonné, Eléments de Géométrie Algébrique IV, Étude locale des schémas et des morphismes of schémas. Publications Mathématiques, 20, 24, 28, 32, Institut des Hautes Études Scientifiques, Paris, 1961–1967. 5, 24 [G60] A. Grothendieck, The cohomology theory of abstract algebraic varieties, Proc. Internat. Congress Math. (Edinburgh 1958). Cambridge University Press, New York, 1960, 103–118. 4 [H66] R. Hartshorne, Residues and Duality. Lecture Notes in Math., 20. SpringerVerlag, Berlin-New York, 1966. 2, 4, 6, 12, 15 [HS93] Hübl, R.; Sastry, P.: Regular differential forms and relative duality. Amer. J. Math. 115 (1993), no. 4, 749–787. 4 [I71] L. Illusie, Conditions de finitude relative, Théorie des Intersections et Théorème de Riemann-Roch (SGA 6). Lecture Notes in Math. 225, Springer-Verlag, BerlinNew York, 1971, 222–273. 5 [ILN14] S. B. Iyengar, J. Lipman, A. Neeman, Relation between two twisted inverse image pseudofunctors in duality theory. Compositio Mathematica, to appear. arXiv:1307.7092. 6, 21 [KM71] G. M. Kelly, S. Mac Lane, Coherence in closed categories. J. Pure Appl. Algebra, 1 (1971), 97–140. 9 [L84] J. Lipman, Dualizing sheaves, differentials and residues on algebraic varieties. Astérisque 117 (1984). 4 [L01] , Lectures on local cohomology and duality. Local Cohomology and Its Applications, ed. G. Lyubeznik, Marcel Dekker, New York, 2001, 39-89. 4 [L09] , Notes on derived categories and Grothendieck Duality. Foundations of Grothendieck duality for diagrams of schemes. Lecture Notes in Math., 1960, Springer-Verlag, Berlin-New York, 2009, 1–259. 2, 4, 5, 6, 7, 8, 10, 11, 13, 17, 19, 20, 23, 25, 27, 28, 29, 30 [LS81] , A. Sathaye, Jacobian ideals and a theorem of Briançon-Skoda. Michigan Math. J., 28 (1981), 199–222. 13 [Nk09] S. Nayak, Compactification for essentially finite type maps. Adv. Math. 222, (2009), 527–546. 2, 7 [Nm14] A. Neeman, An improvement on the base-change theorem and the functor f ! , preprint. [S04] P. Sastry, Base change and Grothendieck duality for Cohen-Macaulay maps. Compositio Math., 140 (2004), 729–777. 2, 7, 17, 19, 24 [V68] J.-L. Verdier, Base change for twisted inverse image of coherent sheaves. Algebraic Geometry (Bombay, 1968). Oxford Univ. Press, London, 1969; 393–408. 3, 20 3, 11, 15 142 Ranch Ln., Santa Barbara CA 93111, U.S.A. E-mail address: [email protected] Centre for Mathematics and its Applications, Mathematical Sciences Institute, Australian National University, Canberra, ACT 0200, Australia. E-mail address: [email protected]
0math.AC
Virtual vs. Real: Trading Off Simulations and Physical Experiments in Reinforcement Learning with Bayesian Optimization arXiv:1703.01250v1 [cs.RO] 3 Mar 2017 Alonso Marco1,5 , Felix Berkenkamp2,5 , Philipp Hennig1,5 , Angela P. Schoellig3 , Andreas Krause2,5 , Stefan Schaal1,4,5 , and Sebastian Trimpe1,5 Abstract— In practice, the parameters of control policies are often tuned manually. This is time-consuming and frustrating. Reinforcement learning is a promising alternative that aims to automate this process, yet often requires too many experiments to be practical. In this paper, we propose a solution to this problem by exploiting prior knowledge from simulations, which are readily available for most robotic platforms. Specifically, we extend Entropy Search, a Bayesian optimization algorithm that maximizes information gain from each experiment, to the case of multiple information sources. The result is a principled way to automatically combine cheap, but inaccurate information from simulations with expensive and accurate physical experiments in a cost-effective manner. We apply the resulting method to a cart-pole system, which confirms that the algorithm can find good control policies with fewer experiments than standard Bayesian optimization on the physical system only. I. I NTRODUCTION Typically, the control policies that are used in robotics depend on a small set of tuning parameters. To achieve the best performance on the real system, these parameters are usually tuned manually in experiments on the physical platform. Policy search methods in reinforcement learning aim to automate this process [1]. However, without prior knowledge, these methods can require significant amounts of experimental time before determining optimal, or even only reasonable parameters. In robotics, simulation models of the robotic system are usually available, e.g., as a by-product of the design process. While exploiting knowledge from simulation models has been considered before, no principled way to trade off between the relative costs and accuracies of simulations and experiments exists [2]. As a result, state-of-the-art reinforcement learning methods require more experimental time on the real system than necessary. In this paper, we propose a new reinforcement learning method that can automatically optimize the parameters of 1 Max Planck Institute for Intelligent Systems, Tübingen, Germany. Email: <firstname>.<lastname>@tuebingen.mpg.de 2 Learning & Adaptive Systems Group (LAS), Department of Computer Science, ETH Zurich, Switzerland. Email: {befelix, krausea}@ethz.ch 3 Dynamic Systems Lab (DSL), University of Toronto Institute for Aerospace Studies (UTIAS), Canada. Email: [email protected] 4 Computational Learning and Motor Control Lab, University of Southern California, USA. 5 Max Planck ETH Center for Learning Systems, Tübingen, Germany, and Zürich, Switzerland. This research was supported in part by the Max Planck ETH Center for Learning Systems, the Max Planck Society, SNSF grant 200020 159557, NSERC grant RGPIN-2014-04634, the Connaught New Researcher Award, and National Science Foundation grants IIS-1205249, IIS-1017134, EECS0926052, the Office of Naval Research, the Okawa Foundation Fig. 1. The proposed algorithm optimizes the parameters θ of a control policy based on data of a cheap, but inaccurate simulation and expensive data from the real system. By actively trading off between the information that can be gained from each system relative to their costs, the algorithm requires significantly fewer evaluations on the physical system. control policies based on data from different information sources, such as simulations and experiments. Specifically, we use an extension of Entropy Search [3], [4], a Bayesian optimization framework for information-efficient global optimization. The resulting method automatically trades off the amount of information gained from different sources with their respective costs and requires fewer physical experiments to determine optimal parameters (see Fig. 1). Related work: Improving the performance of reinforcement learning with prior model information from a simulator has been considered before. A typical approach is twostage learning, where algorithms are trained for a certain amount of time in simulation in order to warm-start the learning on the real robot [2]. For example, [5] reports performance improvements when using model information from simulation as a prior for real experiments. Transfer learning is a similar approach that aims to generalize between different tasks, rather than from a simulated model to the real system [6]. The work in [7] learns an optimal policy and value function of a finite Markov decision process based on models with different accuracies. They rely on hierarchical models and switch to higher accuracy models once a threshold accuracy has been reached at a lower level. A commonly used reinforcement learning method is policy gradients [8], where policy parameters are improved locally along the gradient. In this setting, simulation knowledge can be used to estimate the gradient of real experiments [9]. However, policy gradient methods only converge to locally optimal parameters. None of the above methods explicitly considers the cost of experiments on a robot. In this paper, we actively trade off the different costs and information gains associated with simulation and real experiments and obtain Accepted final version. To appear in 2017 IEEE International Conference on Robotics and Automation. c 2017 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. globally optimal parameter estimates. A method that has been particularly successful for parameter optimization in robotics is Bayesian optimization [10]. In particular, methods based on Gaussian process (GP, [11]) models are widely used because of their ability to determine globally optimal parameters within few evaluations. Examples include gait optimization in legged robots [12] and controller optimization for a snake-like robot [13]. In [14], the controller parameters of a linear state-feedback controller were optimized using the LQR framework as a low-dimensional representation of controller policies, while in [15] the control policy itself was defined by Bayesian optimization with a specifically chosen kernel. Safety constraints on the robot during the optimization process were considered in [16]. A comparison of different Bayesian and nonBayesian global optimization methods can be found in [17]. All the previous methods use Bayesian optimization directly on the real system. In contrast, we consider an extension of Bayesian optimization that can extract additional information from a simulator and speed up the optimization process. The methodology herein is related to multi-task Bayesian optimization, where one aims to transfer knowledge about two related tasks [18], [19]. A GP model with multiple information sources was first considered in [20]. Since then, optimization with multiple information sources has been considered under strict requirements, such as models forming a hierarchy of increasing accuracy and without considering different costs [21], [22]. More recently, [23] used a myopic policy, called the ‘knowledge gradient’ by [24], in order determine, which parameters to evaluate. Our contribution: In this paper, we present a Bayesian optimization algorithm for multiple information sources. We use entropy [3], [4] to measure the information content of simulations and experiments. Since this is an appropriate unit of measure for the utility of both sources, our algorithm is able to compare physically meaningful quantities in the same units on either side, and trade off accuracy for cost. As a result, the algorithm can automatically decide whether to evaluate cheap, but inaccurate simulations or perform expensive and precise real experiments. We apply the method to optimize the policy of a cart-pole system and show that this approach can speed up the optimization process significantly compared to standard Bayesian optimization [14]. The main contributions of the paper are (i) a novel Bayesian optimization algorithm that can trade off between costs of multiple information sources and (ii) the first application of such a framework to the problem of reinforcement learning and optimization of controller parameters. For convenience within the next sections, we rename the concepts accuracy and cost: We now refer to the lack of accuracy of a controller as cost. Furthermore, we now denominate the cost of retrieving an evaluation from a specific information source as effort. II. P ROBLEM S TATEMENT We consider a reinforcement learning setting, where we aim to find an optimal policy to complete a certain task on a dynamic system. While we do not have access to a perfect model of the system, we assume that a control policy is available, which is parameterized by parameters θ within some domain D. The goal is to determine the optimal parameters θ min that globally minimize the cost of a task, θ min ∈ argmin J(θ). (1) θ∈D The cost J(θ) measures the performance of the policy on a certain task on the real system. For example, one evaluation of the cost function could consist of controlling a robot with the parameterized policy and measuring an error signal over a fixed time horizon. To solve the optimization problem in (1), we can query a parameter vector θ n at each iteration n and observe the resulting performance J(θ n ). Since these experiments cause wear in the robot and take time, the goal is to minimize the number of iterations before the optimal parameters in (1) are determined. We assume that a simulation of the system is available, which we want to exploit to solve (1) more efficiently with fewer evaluations on the physical system. While simulations are only an approximation of the real world and cannot be used to determine the optimal parameters in (1) directly, they can be used to provide an estimate Jsim (θ) of the true cost. We use this estimate to obtain information about the location of the optimal parameters on the real system. As a result, at each iteration n, we do not only choose the next parameters θ n to evaluate, but also whether to perform a simulation or an experiment. Both experiments, in the real world and in simulation, have physically meaningful evaluation efforts associated to them. For example, the effort may account for the amount of time required to complete an experiment/simulation and for monetary costs such as wear in the system. The overall goal is to minimize the total effort incurred in the experiments and simulations until the optimal parameters (1) on the real system are found. III. P RELIMINARIES We start by introducing the necessary background information on GPs and Bayesian optimization. A. Gaussian Processes (GPs) While the cost J(θ) in (1) can easily be evaluated in an experiment for a given parameter θ, the functional relationship between parameters and the cost is unknown a priori. We use GPs as a nonparametric model to approximate the unknown function. The goal is to find an approximation of the nonlinear map, J(θ) : D 7→ R, from an input vector θ ∈ D to the function value J(θ). This is accomplished by modeling function values J(θ), associated with different values of θ, as random variables so that any finite number of these random variables have a joint Gaussian distribution [11]. For the nonparametric regression, we define a prior mean function m(θ), which encodes prior knowledge about the function J(·), and a covariance function k(θ, θ 0 ), which defines the covariance of any two function values, J(θ) and J(θ 0 ), θ, θ 0 ∈ D, and is used to model uncertainty about the mean estimate. The latter is also known as the kernel. The choice of kernel is problem-dependent and encodes assumptions about smoothness and rate of change of the unknown function, J(·). The GP framework can be used to predict the function value J(θ ∗ ) at an arbitrary input θ ∗ ∈ D, based on a set ˆ i )}n . We assume that of n past observations Dn = {θ i , J(θ i=1 observations are noisy measurements of the true function; that is, ˆ J(θ) = J(θ) + ω(θ), (2) where the noise ω(θ) ∼ N (0, η 2 (θ)) depends on the input. Conditioned on the previous observations, the mean and variance of the posterior normal distribution are µn (θ ∗ ) = m(θ ∗ ) + kn (θ ∗ )K−1 n ŷn , (3) T ∗ σn2 (θ ∗ ) = k(θ ∗ , θ ∗ ) − kn (θ ∗ )K−1 n kn (θ ), (4)   ˆ 1 ) − m(θ 1 ), . . . , J(θ ˆ n ) − m(θ n ) T is the where ŷn = J(θ vector of observed,  noisy deviations from  the mean, the vector kn (a∗ ) = k(θ ∗ , θ 1 ), . . . , k(θ ∗ , θ n ) contains the covariances between the new input θ ∗ and the observed data points in Dn , and the symmetric matrix Kn ∈ Rn×n has entries [Kn ](i,j) = k(θ i , θ j ) + δij η 2 (θ i ), i, j ∈ {1, . . . , n}. B. Bayesian Optimization We want to use the GP model of the cost function for parameter optimization. Using statistical models of an objective function for optimization is known as Bayesian optimization [10] in the literature. It comprises a class of data-efficient optimization methods that aim to determine the global optimum of cost functions that are expensive to evaluate. In our case, each evaluation of the cost with certain controller parameters on the robot cause wear in the system and may take a long time to perform. In the case of GP models, the mean, (3), and variance, (4) can be used to determine new parameters to evaluate that are promising candidates for the global optimum. For example, [25] uses upper confidence bounds that allow for provable convergence guarantees. In this paper, we build upon the Entropy Search (ES, [3]) algorithm, which selects parameters in order to maximally reduce the uncertainty about the location of the minimum of J(θ) in each step. It quantifies this uncertainty through the entropy of the distribution over the location of the minimum,  pmin (θ) = P θ ∈ argmin J(θ) . (5) θ∈D The approach becomes tractable by approximating pmin on a non-uniform grid, with higher resolution in areas where it is more likely to find the minimum. The key idea is that, upon convergence, we expect pmin to be peaked around the minima, thus to have low entropy. The rate of change in the entropy of pmin determines how much information about the location of the global minimum we obtain with each evaluation of the cost function. Given this metric, the optimal parameter at which to evaluate the cost function in the next iteration, is the one that is most informative: θ n+1 = argmax E [∆H(θ)] , (6) θ∈D where ∆H(θ) is the change in entropy of pmin caused by retrieving a new cost value at location θ. Intuitively, by collecting cost values at the most informative locations (6), we keep decreasing the amount of entropy in pmin until eventually pmin is peaked around the optima. At iteration n, we compute the best guess θ bg about the optimal parameters by minimizing the current GP posterior (3): θ bg = argmin µn (θ). (7) θ∈D The computation of ∆H given the GP model of J(·) requires several approximations. A full derivation is beyond the scope of the paper, but all details can be found in [3]. IV. R EINFORCEMENT L EARNING WITH S IMULATIONS In this section, we show how the ES algorithm can be extended to multiple sources of information, such as simulations and physical experiments. The two main challenges are modeling the errors of the simulator in a principled way and trading off evaluation effort and information gain. In the following, we focus on the case where only one simulation is available for ease of exposition. However, the approach can easily be extended to an arbitrary number of information sources. A. GP Model for Multiple Information Sources To model the choice between simulation and phisical experiment, we use a specific kernel structure that is similar to the one used in [23]. The key idea is to model the cost on the real system as being partly explained through the simulator plus some error term. That is, J(θ) = Jsim (θ) + Jerr (θ), where the true cost consists of the estimated cost of the simulation, Jsim (θ), and a systematic error term, Jerr (θ). To incorporate this in the GP framework of Sec. III-A, we extend the parameter vector by an additional binary variable δ, which indicates whether the cost is evaluated in simulation (δ = 0) or on the physical system (δ = 1). Based on the extended parameter a = (θ, δ), we can model the cost by adapting the GP kernel to k(a, a0 ) = ksim (θ, θ 0 ) + kδ (δ, δ 0 ) kerr (θ, θ 0 ). (8) The kernels ksim (·, ·) and kerr (·, ·) model the cost function on the simulator and its difference to the cost on the physical system, respectively. The kernel kδ (δ, δ 0 ) = δδ 0 is equal to one if both parameters indicate a physical experiment and zero otherwise. From Sec. III-A, we know that the kernel (8) models the covariances for different parameters. Intuitively, the kernel (8) encodes that two experiments on the physical system covary strongly. However, if one of the δ-variables is zero (i.e., a simulation), then the only covariances between the two values is captured by ksim . Effectively, the error covariance is switched off in simulations in order to model that simulations J( ) 2 according to (3) and (4). B. Optimization 0 H] -2 10 -3 4 E[ 2 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 a: Exploration stage after two evaluations J( ) 2 With the GP model defined, we now consider how it can be used to trade off accuracy for evaluation effort. As a first step, we quantify the goal. As before, we want to minimize the cost (1) on the real system. This means, the distribution over the minimum is defined in terms of the same cost (5) as in standard ES. In order to approximate pmin , we need to use the GP kernel with the additional δ factor fixed to one,  pmin (θ) = P θ ∈ argmin J(θ, δ) . (9) θ∈D, δ=1 0 H] -2 10 -3 4 E[ 2 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 b: Exploration stage after ten evaluations Fig. 2. Synthetic example of how simulations and physical experiments can be combined by trading off information and evaluation effort. In (a), top, it is shown the GP posterior conditioned on one simulation (blue dot) and one physical experiment (red dot). The GP model from Sec. IV-A encodes that a portion of the uncertainty in the cost of the real system (red shaded) can be explained through the simulator (blue shaded). The red dashed line represents the cost function of the physical system. The cost function of the simulator is omitted for simplicity. In (a), bottom, it is shown the expected information gain per unit of effort of the simulator (blue line), and of the physical system (red line). The most informative point (blue dot) is selected among the two sources by the proposed method as next evaluation (in this case, a simulation). In (b), top, it is shown the GP posterior after nine iterations. The global minimum (orange dot) is found close to the true minimum. cannot provide all the information about J. By choosing the kernels ksim and kerr , we can model to what extend J can be explained by the simulator and thereby its quality. This is illustrated with a synthetic example in Fig. 2. The total variance of the cost on the physical system is shown in red. Before any data is observed, it is equal to the uncertainty about the simulation plus the uncertainty about the error. As shown in Fig. 2a, the blue shaded region highlights the variance of the simulator. Evaluations in simulation (blue dots) reduce the uncertainty of this blue shaded region, but reduce only partially the uncertainty about the true cost (red). In contrast, an evaluation on the real system (red dot) allows one to learn the true cost J directly, thus reducing the total uncertainty (red), while some uncertainty about the variance of Jsim remains (blue). Having uncertainty about the simulation is by itself irrelevant for the proposed method, because we solely aim to minimize the performance on the physical system. Next to the kernel, we account for different amounts of noise in simulation (typically noise-free) and on the real system. That is, the noise variance of measurements, η 2 (a) 2 2 in (2), takes different values, ηexp and ηsim , depending on whether an experiment or a simulation is chosen. With this kernel and noise structure, the two information sources can be modeled by a single GP, and predictions can be made As in ES, the goal is to arrive at a distribution pmin that has low entropy (i.e., very peaked on a certain location). The expected change in entropy is an appropriate measure for this. However, this quantity additionally depends on the variable δ, so that the algorithm has an additional degree of freedom in the parameters to optimize. If one were to use the same optimization problem as in (6), the algorithm would always choose to evaluate parameters with δ = 1. This is because the experiments with δ = 1 provide information about the cost function J directly, while an evaluation with δ = 0 only provides information about part of the cost, Jsim . To trade off between the two choices more appropriately, we associate an effort measure with both kinds of evaluations; tsim for the simulation and texp for physical experiments. While simulations are less informative about pmin , they are significantly cheaper than experiments on a physical platform so that tsim < texp . These effort measures can have physically meaningful units, such as the amount of time taken by a simulation relative to a physical experiment. While the effort measures are important to trade off the relative gains in information, they do not require tuning. For example, setting the effort of the simulator too high may lead to more experiments on the physical system than necessary, but the optimal parameters on the real system are found regardless. A key advantage of using entropy to determine progress towards the goal is that it is a consistent unit of measurement for both information sources, even in the case of different noise variances. As a result, we can compare the gain in information about the location of the minimum (i.e., pmin ) in simulation and physical experiments relative to their efforts. Thus, we select the next parameters, θ n+1 , and where to evaluate them, δ, according to argmax E [∆Hi (θ)] / ti . (10) θ∈D, i∈{sim,exp} The expected gain in entropy, E [∆Hi ], depends on whether we evaluate in simulation or physical experiment. By selecting the best gain per unit of effort, the algorithm automatically decides which kind of evaluation decreases the uncertainty about the location of the minimum the most, relative to effort. Importantly, since the GP model in (8) is adaptive to the quality of the simulator, the acquisition function (10) leads to informed decisions about whether the simulator is reliable enough to lead to additional information. We illustrate a typical run of the algorithm in Fig. 2. The algorithm was initialized with one physical experiment (red dot in Fig. 2a) for the purpose of illustration. The evaluation effort of the simulator was set to 40% less of that of the real system. As a result, it is advantageous to exploit initially the low effort that takes to do simulations. The algorithm automatically decides to do so, as can be seen in Fig. 2a. The simulation (blue dot) decreases the amount of uncertainty about the simulation model, but provides only partial information about the true cost of the system. As a result, the method eventually starts to evaluate parameters on the real system. Notice that this is not the same as two stage learning, because the algorithm can decide to switch back to simulations if this is beneficial. This is especially important in situations where the quality of the simulation is not known in advance and the hyperparameters of the kernels in (8) are optimized. Eventually, the algorithm converges to a distribution pmin that is peaked around the minima of the cost function. Since the model can exploit cheap information from simulation, fewer physical experiments are needed to determine the minimum than if only physical experiments were used. Because the proposed method extends Entropy Search (ES) to multiple information sources, we refer to it as Multifidelity Entropy Search (MF-ES). V. E XPERIMENTAL R ESULTS In this section, we evaluate MF-ES for optimizing the feedback controller of an unstable cart-pole system, as illustrated in Fig. 1. A. Experimental Setup As experimental setup, we use the Quanser Linear Inverted Pendulum, [26]. The dynamics of the system are described by xk+1 = f (xk , uk ), (11) where xk = [sk , ψk , ṡk , ψ̇k ]T is the state at discrete time step k, which is comprised of pendulum angle ψ, cart position s, and their time derivatives; uk is the commanded motor voltage driving the cart; and f (·) is the transition function (see [26] for details). The cart-pole setup is connected through dedicated hardware to a standard Laptop and can be controlled via Matlab/Simulink. A nonlinear Simulink model of the system dynamics (11) is provided by the manufacturer and used as the simulator in our setting. B. Controller Tuning Problem To stabilize the pendulum about its upright equilibrium, we use a static state-feedback controller, uk = Fxk , (12) with gain matrix F ∈ R1×4 . We seek optimal gains F that minimize the cost function K−1 1 X 2 sk + ψk2 + ṡ2k + 0.1ψ̇k2 + 10−1.5 u2k J= K k=0 (13) over a sufficiently long time horizon K. The cost (13) penalizes deviations from the equilibrium x = 0 and control effort (u2k ). Instead of tuning the controllers gains F directly (i.e. setting θ = F), we follow the approach from [14], [27], and pre-structure suitable controllers gains by means of a Linear Quadratic Regulator (LQR, [28]) design using a nominal, linearized version, (A, B), of the dynamics in (11), around the aforementioned equilibrium, which can be obtained from the simulator, for example. That is, the controller gain is computed from a discrete-time LQR design, F = dlqr(A, B, Wx (θ), Wu (θ)), (14) where Wx (θ) and Wu (θ) are suitable parameterizations of LQR weights (see [14], [27] for details). Here, we selected Wx (θ) = diag(10θ1 , 1, 1, 0.1), −θ2 Wu (θ) = 10 , θ1 ∈ [−3, 2], (15) θ2 ∈ [1, 5]. (16) Hence, we are left with tuning two parameters, θ ∈ R2 . Advantages of the LQR parameterization in (14) are the possibility of dimensionality reduction, exploitation of prior knowledge in form of a linear dynamics model, and guarantees of stability and certain robustness properties with respect to the nominal system (see [14] for a discussion). However, we emphasize that LQR-weights are only one possible way to parameterize feedback controllers; alternative parameterizations [29] or direct tuning of the gains F [16] is also possible. The method proposed herein is independent of the specific parameterization used. With the above definitions, the cost function J(θ), which we seek to minimize (1), is defined by equations (13)–(16). An evaluation of the cost Jexp (θ ∗ ) is obtained by computing the controller gain (14) based on the weight matrices (15), (16), performing a 30 s balancing experiment on the physical system, and computing the cost according to (13) from the experimental data {xk , uk }k=0,...,K−1 . A simulation sample Jsim (θ ∗ ) is obtained in the same manner by running a 30 s simulation instead. If a candidate controller violates safety limits on the states and inputs, it is determined as unstable, and we assign a fixed penalty of Jexp = 0.06 and Jsim = 0.04 for physical experiment and simulation, respectively. These numbers are chosen conservatively larger than the cost of the worse stabilizing controller observed after some a priori initial evaluations. Thus, evaluations during the learning procedure shall not result in higher costs than these. The controller is automatically tuned over roll-outs without human intervention. To this end, a nominal1 controller θ nom = [0, 1.5] is balancing the pole when no tuning experiment is being performed. The optimizer triggers new experiments, when an evaluation on the real system is required. As soon as the experiment is finished, or instability is 1 The nominal controller is the optimal controller if the true dynamics was linear according to the nominal model (A, B). Then, choosing Wx (θ) and Wu (θ) corresponding to the cost (13) yields the optimal controller F, see [14]. This is a typical choice when neglecting the nonlinear dynamics. Cost 0.04 Simulation Experiment 0.02 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Best Guess # Iterations 0.1 0.08 J( ) 0.06 0.1 Best guess Final controller 0.05 0 1 0.02 5 0 4 -0.02 -3 2 3 4 5 6 7 8 9 10 11 12 13 14 # Iterations 0.04 3 -2 -1 2 0 1 1 2 1 2 Fig. 3. GP posterior after termination of the exploration with MF-ES. The evaluations on the simulator (light blue) are systematically below the evaluations on the real system (dark blue). This bias is captured by the GP model assuming a lower prior mean for the simulator data, as mentioned in Sec. V-C. The posterior mean (green surface) and ±2 std (grey surface) predict the underlying cost function of the real system, conditioned on the observed data from both simulator and experiments. The best guess location for the global minimum, θ bg , is represented by the orange dot. detected, the system switches back to the nominal controller. The nominal controller shows very poor performance, which shall be improved with the proposed RL method. C. Bayesian Optimization Settings We apply the method of Sec. IV, MF-ES, to optimize the experimental cost (13) by querying simulations and experiments. The efforts in (10) correspond to the approximate times we need to wait until a simulation is computed and a physical experiment is performed, tsim = 1 s and texp = 30 s, i.e., simulations require 30 times less effort than physical experiments. For the GP model, we choose the rational quadratic kernel with α = 1/4 (see [11]) for both ksim and kerr in (8). Hyperparameters, such as length scales and output variances, were chosen from some initial experiments and then held fixed during optimization. As prior mean functions, we use msim (θ) ≡ 0.04 and merr (θ) ≡ 0.02, respectively, for the simulation and error GP. These choices correspond to the penalties Jsim and Jexp given for unstable controllers (adding msim and merr for the experiment). Hence, the prior mean is pessimistic in the sense that we believe a controller to be unstable before seeing any data. The prior variance of 2 2 = 1.6 × 10−5 and σerr = ksim and kerr are chosen as σsim −4 3.84 × 10 respectively. The noise standard deviation of an evaluation on the real system, as defined in (2), has been estimated to ηexp = 2.08 × 10−4 , while the noise of the simulator has been set to ηsim = 10−5 , roughly twenty times lower. We stop the exploration when the GP posterior mean at the best guess θ bg (i.e., the current estimate of the global minimum) has not changed significantly (within a range of σerr /4 over the last 3 iterations), and we are sufficiently certain about its value (posterior standard deviation at θ bg Fig. 4. (Top) Cost obtained at each iteration with the proposed approach during one exploration run. When the exploration terminates, the best guess is evaluated on the physical system (violet dot). (Bottom) Evolution of the GP posterior mean at the best guess µn (θ bg ) and std ±σn (θ bg ). less than σerr /2). Once the exploration has terminated, we evaluate the final best guess controller on a physical experiment and take its cost as the outcome of the learning procedure. D. Results We run MF-ES on the LQR problem described in Sec. VB. Fig. 3 shows the final GP cost function landscape after the learning procedure, highlighting simulations (in light blue) and experiments (in dark blue). For the same learning run, Fig. 4 (top) illustrates how MF-ES alternates between simulations and physical experiments over iterations. As can be seen, the algorithm first performs multiple cheap simulations, which allow to identify regions of unstable controllers (i.e., regions of high predicted cost in Fig. 3) without any real experiment. At iterations 10 and 14, the algorithm demands two expensive physical experiments. The reason is that a time unit spent in simulation is expected to be less informative than on a physical experiment. Thereby, experiment time should be better spent on the physical system. Fig. 4 (bottom) shows the GP posterior mean and standard deviation of the best guess at each iteration. The stopping criterion terminates the exploration after 14 iterations because the GP posterior mean of the last three best guesses were steady enough. Finally, the algorithm selects the last global minimum, θ bg = [0.212, 2.42] (orange dot in Fig. 3), as the final controller, which was evaluated on the physical system retrieving a low cost J(θ bg ) = 0.0194. As a remark, we observe that the algorithm alternates between simulations and experiments in a non-trivial way, which cannot be reproduced with a simple two-stage learning process, where simulations are used to seed experimental reinforcement learning. Furthermore, in Fig. 3, we can see that the posterior mean around θ = [−2, 4] falls back to the prior in the absence of evaluations. As pointed out in Sec. V-C, the prior mean is pessimistic in the sense that predicts instability in unforeseen areas, which is a reasonable assumption in controller tuning of real systems. In order to illustrate the benefit of trading off data from experiments and simulations, we compare MF-ES to ES [3], which uses only physical experiments. The latter corresponds to the automatic controller tuning setting in [14]. We run each of these methods ten times on the controller tuning problem. The results are discussed in Fig. 5 and Fig. 6. 0.06 MF-ES ES Cost 0.04 0.02 0 Nominal Run 1 Run 2 Run 3 Run 4 Run 5 Run 6 Run 7 Run 8 Run 9 Run 10 Fig. 5. Comparison of the final controller cost at each run between the proposed approach (MF-ES) and ES. The cost of the nominal controller (beige) with ± 2 std is shown for reference. Number of evaluations 20 15 MF-ES Simulations MF-ES Experiments ES Experiments 10 5 0 Run 1 Run 2 Run 3 Run 4 Run 5 Run 6 Run 7 Run 8 Run 9 Run 10 Fig. 6. Number of physical experiments at each run for MF-ES (dark blue) and standard ES (dark red), as well as simulations for MF-ES (light blue). In Fig. 5, we show the cost of the final controller at each run, for both methods. The cost of the nominal controller (green) is shown as a reference. MF-ES finds controllers that are 33.23% better, on average. Moreover, it consistently finds stabilizing controllers, while ES fails to find a stabilizing solution in 4 out of 10 cases (cost of 0.06). Fig. 6 compares the number of physical experiments performed with MF-ES (dark blue) and with ES (dark red). While ES needs on average 3.5 physical experiments, MFES needs 2.7 (22.86% less) plus 11.9 simulations. These results demonstrate that MF-ES can find, on average, better controllers with a lower number of real experiments by also leveraging information from simulations. VI. C ONCLUSION We have shown a generic Bayesian optimization that can adaptively select between multiple information sources with different accuracies and evaluation efforts, such as experiments on a real robot and simulations. We applied this method to a policy optimization task on a cart-pole system. The experimental results confirm that using prior model information from a simulator can reduce the amount of data required to globally find good control policies. R EFERENCES [1] R. S. Sutton and A. G. Barto, Reinforcement Learning: An Introduction. MIT press, 1998. [2] J. Kober, J. A. Bagnell, and J. Peters, “Reinforcement learning in robotics: A survey,” The International Journal of Robotics Research, vol. 32, no. 11, pp. 1238–1274, 2013. [3] P. Hennig and C. J. Schuler, “Entropy search for information-efficient global optimization,” Journal of Machine Learning Research, vol. 13, no. 1, pp. 1809–1837, 2012. [4] J. Villemonteix, E. Vazquez, and E. Walter, “An informational approach to the global optimization of expensive-to-evaluate functions,” Journal of Global Optimization, vol. 44, no. 4, pp. 509–540, 2008. [5] M. Cutler and J. P. How, “Efficient reinforcement learning for robots using informative simulated priors,” in IEEE International Conference on Robotics and Automation, 2015, pp. 2605–2612. [6] M. E. Taylor and P. Stone, “Transfer learning for reinforcement learning domains: A survey,” Journal of Machine Learning Research, vol. 10, pp. 1633–1685, 2009. [7] M. Cutler, T. J. Walsh, and J. P. How, “Real-world reinforcement learning via multifidelity simulators,” IEEE Transactions on Robotics, vol. 31, no. 3, pp. 655–671, 2015. [8] J. Peters and S. Schaal, “Policy gradient methods for robotics,” in IEEE International Conference on Intelligent Robots and Systems, 2006, pp. 2219–2225. [9] P. Abbeel, M. Quigley, and A. Y. Ng, “Using Inaccurate Models in Reinforcement Learning,” in ACM International Conference on Machine Learning, 2006, pp. 1–8. [10] J. Mockus, Bayesian Approach to Global Optimization, ser. Mathematics and Its Applications, M. Hazewinkel, Ed. Springer, 1989, vol. 37. [11] C. E. Rasmussen and C. K. Williams, Gaussian Processes for Machine Learning. MIT Press, 2006. [12] D. J. Lizotte, T. Wang, M. H. Bowling, and D. Schuurmans, “Automatic gait optimization with Gaussian process regression.” in International Joint Conference on Artificial Intelligence, vol. 7, 2007, pp. 944–949. [13] M. Tesch, J. Schneider, and H. Choset, “Using response surfaces and expected improvement to optimize snake robot gait parameters,” in IEEE International Conference on Intelligent Robots and Systems, 2011, pp. 1069–1074. [14] A. Marco, P. Hennig, J. Bohg, S. Schaal, and S. Trimpe, “Automatic LQR tuning based on Gaussian process global optimization,” in IEEE International Conference on Robotics and Automation, 2016, pp. 270– 277. [15] H. Abdelrahman, F. Berkenkamp, J. Poland, and A. Krause, “Bayesian optimization for maximum power point tracking in photovoltaic power plants,” in European Control Conference, 2016, pp. 2078–2083. [16] F. Berkenkamp, A. Krause, and Angela P. Schoellig, “Bayesian optimization with safety constraints: Safe and automatic parameter tuning in robotics.” arXiv, 2016, arXiv:1602.04450 [cs.RO]. [17] R. Calandra, A. Seyfarth, J. Peters, and M. P. Deisenroth, “An experimental comparison of Bayesian optimization for bipedal locomotion,” in IEEE International Conference on Robotics and Automation, 2014, pp. 1951–1958. [18] A. Krause and C. S. Ong, “Contextual Gaussian process bandit optimization,” in Neural Information Processing Systems, 2011, pp. 2447–2455. [19] K. Swersky, J. Snoek, and R. P. Adams, “Multi-Task Bayesian Optimization,” in Advances in Neural Information Processing Systems, 2013, pp. 2004–2012. [20] M. C. Kennedy and A. O’Hagan, “Predicting the output from a complex computer code when fast approximations are available,” Biometrika, vol. 87, no. 1, pp. 1–13, 2000. [21] A. I. J. Forrester, A. Sóbester, and A. J. Keane, “Multi-fidelity optimization via surrogate modelling,” Royal Society of London A: Mathematical, Physical and Engineering Sciences, vol. 463, no. 2088, pp. 3251–3269, 2007. [22] K. Kandasamy, G. Dasarathy, J. B. Oliva, J. Schneider, and B. Poczos, “Multi-fidelity Gaussian process bandit optimisation.” arXiv, 2016, arXiv:1603.06288 [cs, stat]. [23] M. Poloczek, J. Wang, and P. I. Frazier, “Multi-Information Source Optimization with General Model Discrepancies.” arXiv, 2016, arXiv:1603.00389v2 [stat.ML]. [24] P. Frazier, W. Powell, and S. Dayanik, “The knowledge-gradient policy for correlated normal beliefs,” INFORMS Journal on Computing, vol. 21, no. 4, pp. 599–613, 2009. [25] N. Srinivas, A. Krause, S. M. Kakade, and M. Seeger, “Gaussian process optimization in the bandit setting: No regret and experimental design,” in International Conference on Machine Learning, 2010, pp. 1015–1022. [26] Quanser, “Self-erecting single inverted pendulum – Instructor manual”,” Tech. Rep. 516, rev. 4.1. [27] S. Trimpe, A. Millane, S. Doessegger, and R. D’Andrea, “A self-tuning LQR approach demonstrated on an inverted pendulum,” in 19th IFAC World Congress, 2014, pp. 11 281–11 287. [28] B. D. O. Anderson and J. B. Moore, Optimal Control: Linear Quadratic Methods. Mineola, New York: Dover Publications, 2007. [29] J. Roberts, I. Manchester, and R. Tedrake, “Feedback controller parameterizations for reinforcement learning,” in IEEE Symposium on Adaptive Dynamic Programming And Reinforcement Learning, 2011, pp. 310–317.
3cs.SY
Modeling and Reasoning over Distributed Systems using Aspect-Oriented Graph Grammars Rodrigo Machado Reiko Heckel Leila Ribeiro Univ. Federal do Rio Grande do Sul Porto Alegre, Brazil [email protected] Univ. of Leicester Leicester, UK [email protected] Univ. Federal do Rio Grande do Sul Porto Alegre, Brazil [email protected] Aspect-orientation is a relatively new paradigm that introduces abstractions to modularize the implementation of system-wide policies. It is based on a composition operation, called aspect weaving, that implicitly modifies a base system by performing related changes within the system modules. Aspect-oriented graph grammars (AOGG) extend the classic graph grammar formalism by defining aspects as sets of rule-based modifications over a base graph grammar. Despite the advantages of aspect-oriented concepts regarding modularity, the implicit nature of the aspect weaving operation may also introduce issues when reasoning about the system behavior. Since in AOGGs aspect weaving is characterized by means of rule-based rewriting, we can overcome these problems by using known analysis techniques from the graph transformation literature to study aspect composition. In this paper, we present a case study of a distributed client-server system with global policies, modeled as an aspect-oriented graph grammar, and discuss how to use the AGG tool to identify potential conflicts in aspect weaving. 1 Introduction Aspect-oriented programming [11] is a relatively new paradigm which introduces abstractions to modularize the implementation of system-wide policies. It is based on a composition operation, called aspect weaving, that modifies a base system globally according to structural rules such as, for instance, “register in a global log all modifications in the value of the field x of class C”. As characterized in [7], an aspect is a module that i) identifies in other modules sets of execution points, which are called pointcuts, and ii) define transformation rules associated with pointcuts. Those rules are called advices. Given a pointcut language expressive enough, the implementation of global policies becomes modular and consistent as the system evolves, i.e. new modules will abide by the global policy in the same way as the current ones. Those advantages stimulated the adoption of aspect-oriented programming in software development. Several languages now have aspect-oriented extensions, the most popular being the Java superset AspectJ [10]. Moreover, the usage of AOP-related concepts also started to appear in languages for system modeling, such as UML diagrams [9]. However, the wide usage of aspect-oriented concepts also introduces issues in the software development process. The implicit modifications caused by aspect weaving may result in behaviors which are difficult to identify by source code analysis. Also, when the system has more than one aspect they may interfere with each other, resulting in different final systems according to the order they are combined. To deal with those problems, the developer needs proper models to reason consistently about the aspect influence. On the formal side, several aspect-oriented calculi have been proposed to characterize aspect interference over programming languages [16, 8, 5, 4]. On the implementation side, integrated development environments offer support to new views related to aspect weaving [1]. However, outside the scope of source-code level aspects, there are still few models and techniques available to reason about aspect-oriented diagrams. I. Mackie and A. Martins Moreira (Eds.): Tenth International Workshop on Rule-Based Programming (RULE 2009) EPTCS 21, 2010, pp. 39–50, doi:10.4204/EPTCS.21.4 Modeling and Reasoning over Distributed Systems using AOGGs 40 The current proposals for studying aspect weaving over diagrams have a strong connection with graph transformation systems and graph grammars, models where the system state is represented by a graph, and its execution, by the application of graph rewriting rules. Given the natural representation of diagrams as graphs, both aspect-oriented systems and graph transformation systems share some common characteristics: pointcuts resemble matches for graph rules, and advices resemble graph rules themselves. In [13], aspect-oriented graph grammars (AOGGs) were proposed as an extension of the traditional graph grammars, where aspects were modeled as second-order transformations over the original specification. The advantage of this approach is that the same rewriting mechanism is used for both aspect weaving and base system execution, allowing to relate them formally. However, up to now it was not shown how to reason about AOGG models. In this work, we propose the use of AGG [2], an attributed graph grammar specification and analysis tool to reason about AOGG models. Since AGG does not support directly AOGGs, we propose an encoding procedure to convert graph grammar specifications into a single typed graph, with aspects being modeled as sets of graph rewriting rules. Then, we use the analysis functionalities of AGG to study conflicts between advices and aspects in the encoded AOGG system. The text is organized as follows: in Section 2, we review the graph grammar model, and introduce the base client-server example. In Section 3, we recall aspect-oriented graph grammars and present examples of aspects over the base system. In Section 4 we present the encoding of AOGGs as typed graphs in order to use the AGG tool. We discuss the use of critical pair analysis to study the aspect weaving in the encoded system in Section 5. Final remarks, related work and future steps are discussed in Section 6. 2 Graph Grammars A typed graph grammar is a visual model where the system state is represented by a graph and the system behavior is described by means of rule-based graph rewriting. Formally, a typed graph grammar is a tuple hT, G0 , P, π i, where i) T is a type graph defining the allowed kinds of nodes and edges within the specification; ii) the T -typed graph G0 is the initial state of the system; iii) P is a set of rule names, and iv) the function π : P → Rules(T ) maps every rule name to is respective T -typed graph transformation rule. In this work we follow the double-pushout (DPO) approach to graph transformation [6], where a graph transformation rule is represented as a monic span (a pair of injective morphisms with the same source) l r L ֋ K ֌ R in the category T -Graph (T -typed graphs and type-preserving graph homomorphisms). The left-hand side (LHS) graph L represents the pattern to be found in order to apply the rule. The right-hand side (RHS) graph R defines new graph elements to be added by the rule. The interface graph K and graph inclusions l and r identify elements in L and R. Elements in L but not in l(K) are said to be deleted, elements in R but not in r(K) are said to be created, and elements in K are preserved or read. Example 1 (Graph grammar). Figure 1 depicts a distributed client-server system modeled as a graph grammar. The type graph T defines four kinds of nodes (Client, Server, Data and Message) and four kinds of edges. The initial graph G0 defines the initial state of the system: two clients with messages to be sent and two data servers. Clients may retrieve values from servers or update stored data by means of message exchange. The system rules model this interaction as follows: a GET message is sent to the server by SendGET, then the data is retrieved by ExecuteGET, and it is returned to the client by ReceiveGET. The rules SendSET, ExecuteSET and ReceiveSET work in a similar way for messages that update data elements. Regarding the notation, rules are presented only by their left-hand side and right-hand side graphs. Common elements in K are simply marked to be the same in L and R using Machado R., Heckel R., Ribeiro L. Figure 1: Client-server system as a graph grammar. 41 Modeling and Reasoning over Distributed Systems using AOGGs 42 numbered prefixes (1:, 2:, . . . ). It is also important to notice that this example uses attributed graph nodes, which is an extension of the basic typed graph grammar formalism. In order to apply a graph transformation rule L ← K → R over a graph G it is required that there is some match in G for elements of L. Matches are defined as graph homomorphism m : L → G. Then, a rule r,m application (or direct derivation) from graph G to graph H using rule r and match m (denoted G =⇒ H) is defined as the following diagram in the category T -Graph, where both squares are pushouts. L m G l (1) K k l∗ D r R m∗ (2) H r∗ l∗ k In the DPO approach, rule application relies on finding G ← D ← K such that the square to the left is a pushout. This may not always be possible depending on the rule and match. For instance, when the rule tries to delete a node that has incident edges not in m(L), or when the match identifies preserved elements with deleted ones. The sequential behavior of a graph grammar is given by the successive application of graph rules starting from the initial graph. Usually, both rules and matches are nondeterministically chosen at each step. Operationally, this works as follows: 1. Set G0 as the current graph. 2. Find in the current graph all possible matches for rules in the set P of rule names. 3. Verify application conditions for matches, defining the set of valid pairs (rule,match). 4. If there is no valid pair at all, then STOP. Otherwise, non-deterministically choose a pair (rule,match) to be applied. 5. Delete from G all matched elements in L \ K. This will generate a graph D. 6. Create in D all elements in R \ K. This will generate a graph H. 7. Set H as the current graph. Return to step 2. Graph grammars are particularly useful to represent distributed systems since graph rules represent local transformations. This means that two or more rules may be applied in parallel if they do not conflict with each other. Moreover, the rules are usually intuitive and the control flow is data-driven, being guided by the graph topology. The AGG tool [2] allows to create, run and analyze graph grammars. Moreover, it supports several extensions to the basic typed graph grammar language, such as attributed graph elements, control flow mechanisms (rule layers, priorities), definition of positive and negative application conditions for rules, among others. The AGG graph transformation engine follows the single-pushout (SPO) approach [12], but it may also be configured to consider the conditions that characterize DPO transformations. 3 Aspect-Oriented Graph Grammars Aspect-Oriented Graph Grammars (AOGGs) [13] are graph grammars with aspects, i.e. modular descriptions of system-wide policies. Formally, an AOGG is a pair hG , ∆i, where G = hT, G0 , P, π i is a Machado R., Heckel R., Ribeiro L. 43 base graph grammar, and ∆ = [A1 , A2 , . . . , An ] is a sequence of graph aspects over G . A graph aspect represents a set of modifications over the base graph grammar, and it is defined by a triple hD,t, gi, where D is a set of graph advices, t : T ֒→ T ′ is an extension of the original type graph and g : G0 ֒→ G′ is an extension of the original initial graph. Graph advices are rules that modify graph transformation rules. Following the intuition provided by the DPO approach, graph advices are defined as monic spans p ֋ i ֌ e. The difference is that p, i, e are themselves graph rules, and l, r are rule morphisms. Rule morphisms are defined as triples of morphisms connecting the graph components of two rules, respecting the commutativity of the inner squares. This way, a graph advice correspond to the following commutative diagram in T -Graph. Rp Kp Lp Re Ri Ki Li Ke Le To emphasize the distinction between advices and base system rules, the components of a graph advice receive specific names: pointcut p, advice interface i and effect e. Example 2 (Log Aspect). Suppose we want to implement a logging mechanism over the client-server system such that every operation leaves an execution trace over a global object (the system logger). To implement this functionality, we should extend the type graph to introduce the logger type, initialize it in the initial graph and modify all rules to register their execution in this global object. Using AOGG, all these modifications can be enclosed within one single aspect, as shown in Figure 2. This aspect has only one advice, which has an empty pointcut. The advice adds a Logger object to both the LHS and RHS of the rule such that the occurrence on the RHS has the rule name appended to the story string. Notice that this value update depends on the existence of a reflective operation rulename() which provides the name of the rule being executed. The empty pointcut matches all possible rules of the specification, thus after aspect weaving all of them will read and update the global log object. Figure 2: Log aspect Example 3 (Security Aspect). Another kind of system-wide modification is the introduction of access control for servers. A simple implementation is to define two kinds of permissions for clients: Read and Write. Those permissions, represented as endoarcs in client nodes, affect message exchanges. A "SET" 44 Modeling and Reasoning over Distributed Systems using AOGGs message may only be sent by a user with write privileges, while a "GET" message, only by a user with read privileges. The aspect depicted in Figure 3 implements this policy over the base graph grammar of Example 1. The act of sending a message of a given kind (SET or GET) defines the pattern used in the pointcuts of both advices. The effect is to augment the rules such that they require the respective user permissions to be read in order to execute. In both advices the interface i is the same as the pointcut p. Figure 3: Security aspect As with graph rewriting, rule rewriting (advice application) is also defined as a double-pushout diagram. The difference is that it uses the category T -MSpan of T -typed rules and rule morphisms [13]. Given a graph grammar G = hT, G0 , P, π i and a graph aspect hD,t, gi over G , with t : T → T ′ and g : G0 → G′0 , the result of weaving A and G is the graph grammar G ′ = hT ′ , G′0 , P′ , π ′ i. The rule set (P′ , π ′ ) is calculated based on (P, π ) as the least set of rules such that 1. If a rule in (P, π ) is not matched by any advice in A, them the rule is kept unchanged in (P′ , π ′ ). 2. If a rule is matched by at least one advice in A, all the results of one-step rewritings (considering all possible advices and matchings) become elements of (P′ , π ′ ). In this case, the original rule does not appear in (P′ , π ′ ). This definition for aspect weaving makes advice rewriting non-reentrant, i.e. a given rule may not be modified more than once per advice and match. This assures termination for the weaving process, even for advices that do not delete elements from rules. Finally, the semantics of an AOGG hG , ∆i is given by its respective weaved graph grammar GW∆ , defined as the result of weaving all aspects of ∆ over G in their respective order. Machado R., Heckel R., Ribeiro L. 4 45 Encoding AOGGs in AGG The use of graph rewriting as an aspect weaving mechanism opens the possibility of using known techniques from the graph transformation area to reason about aspects. Those techniques allow the system modeler to identify potentially harmful behaviors of the final weaved system, such as unintended aspect interactions, at early stages of the system development. Furthermore, existing tools such as AGG can be used to analyze aspect-oriented models. Our approach consists in encoding the whole structure of a graph grammar specification as a single typed graph. For this, a representation of monic spans using graph elements is needed to encode individual rules. Moreover, one needs to encode both initial graph and rule set while keeping their as distinguished elements of the specification. For this, we employ the traditional graph typing mechanism: the type graph for the encoding of G = hT, G0 , P, π i has two disjoint components. The first is the original type graph T , used to type the initial graph G0 . The second is R(T ), used to type the encoded representation of the rule set. We start by defining the operation R that calculates the second component based on the original type graph T . Definition 1 (Type graph rule encoding). The operation R : Graph → Graph is defined as the composition R3 ◦ R2 ◦ R1 , where: • R1 encodes edges as nodes. The edges of the resulting graph follow the source and target functions of the input graph. • R2 creates three copies of the input graph (to represent L, K and R). Each node in K is connected to its copy in L and R by means of new edges. • R3 creates a new node in the graph together with edges connecting all the original nodes to this node. This node represents the identity of the rule. Example 4 (Type graph rule encoding). Figure 4 shows how to obtain R(T ) from a simple type graph T using the successive transformations R1 , R2 and R3 . Figure 4: Example of type graph rule encoding. Now we define the operation S, which encodes T -typed rules as R(T )-typed graphs. l r Definition 2 (Graph rule encoding). Given a T -typed graph rule r : L ← K → R, the graph rule encoding S : Rules(T ) → R(T )-Graph is defined as the composition S3 ◦ S2 ◦ S1 , where 46 Modeling and Reasoning over Distributed Systems using AOGGs • S1 applies R1 to L, K, R, and types them, respectively, over the left, central and right embeddings of R1 (T ) in R(T ). • S2 adds concrete edges to the input graph following the homomorphisms l and r. • S3 creates a new node typed over the node created by transformation R3 , together with new edges connecting all nodes of the input graph to it. Definition 3 (Graph rule set encoding). Given a graph grammar G = hT, G0 , P, π i, the R(T )-typed graph ϒ(G ) is defined as the gluing [S(π (r1 )), S(π (r2 )), . . . , S(π (rn ))] where r1..n ∈ P. The graph ϒ(G ) is the union of all encodings of rules S(π (rx )) typed over the single type graph R(T ). Example 5 (Graph rule set encoding). Figure 5 depicts a small graph grammar G (on the left) and its respective R(T )-typed encoding ϒ(G ) (on the right). Figure 5: Example of graph rule set encoding. Definition 4 (Encoded graph grammar). Given a graph grammar G = hT, G0 , P, π i, its graph encoding is the (T + R(T ))-typed graph |G | = G0 + ϒ(G ), where “+” stands for the disjoint union of typed graphs. Definition 5 (Encoded advice). Let A = hD,t, gi be and aspect over G , such that t : T → T ′ . Then, for every advice a : p ← i → e ∈ D, its respective encoding |a| is the R(T ′ )-typed span S(p) ← S(i) → S(e). Definition 6 (Encoded aspect-oriented graph grammar). Let D = (G , ∆) be an AOGG, such that ∆ , P∆ , π ∆ i be the weaved graph grammar G = hT, G0 , P, π i and ∆ = [A1 , A2 , . . . , An ]. Let GW∆ = hTW∆ , GW W W obtained from weaving ∆ over G . Then, the encoded aspect-oriented graph grammar |D| is the graph ∆ , P, π i is the type and initial graph extension grammar hTW∆ + R(TW∆ ), |G ′ |, |P∆ |, |π∆ |i where G ′ = hTW∆ , GW of G and the rule set (|P∆ |, |π∆ |) correspond to the gluing of all encoded advices |a| ∈ Di of all aspects Ai = hDi ,ti , gi i, 1 ≤ i ≤ n. In an AOGG D, each aspect extend the type graph and initial graph of the original system. In the encoded graph |D|, all these extensions must be present in order to accommodate all encoded advices (of all aspects) in the same rule set. Example 6 (Encoded AOGG). Figure 6 shows the encoding of (G , [A1 , A2 ]), where G is the base system of Figure 1, A1 is the log aspect (Figure 2) and A2 is the security aspect (Figure 3). For the sake of readability, some elements are omitted: attribute types in the type graph and attribute values in the initial graph and base system rules. However, attribute values are shown in the encoded advices. In all encoded advices the interface graph K and the left-hand side graph L are the same. Machado R., Heckel R., Ribeiro L. Figure 6: Encoded client-server system with log and security aspects. 47 48 5 Modeling and Reasoning over Distributed Systems using AOGGs Analyzing AOGG specifications From the point of view of aspect weaving, it is relevant to be able to predict when two different advices will potentially affect the same part of the specification. If this occurs, a different aspect ordering may yield a different weaved system. Given that we encode an AOGG specification as a graph grammar, we are able to apply techniques from graph rewriting theory to test the existence of conflicts between aspects. Critical pair analysis (CPA) is a static analysis technique that is used to detect both conflicts and r1 ,m1 dependencies between graph rewriting rules. Given a graph G and two direct derivations G =⇒ G′ , r2 ,m2 G =⇒ G′′ , we say that the derivations are in conflict if one of them deletes some graph element that is preserved or deleted by the other one. Thus, their execution in parallel is not possible. Given two r2 ,m2 r1 ,m1 subsequent direct derivations G =⇒ G′ =⇒ G′′ , we say that there is a dependency between (r1 , m1 ) and (r2 , m2 ) if the first creates a graph element that is preserved or deleted by the later. In this case, it is not possible to swap their order of execution. Critical pair analysis is used to test potential conflicts and dependencies within a graph grammar and consists of the following general steps: 1. The set of all pairs of rules (r1 , r2 ) ∈ P × P is generated. 2. For each pair (r1 , r2 ), all possible overlaps between a graph of r1 and a graph of r2 are calculated. In the case of conflict analysis, both LHSs are considered in this calculation. In the case of dependencies analysis, the RHS of r1 and the LHS of r2 are considered. 3. All overlaps are tested for conflicts or dependencies. 4. The number of all conflicting (or dependent) overlaps for each pair of rules is shown in a table. Figure 7: Critical pair analysis of the base system in AGG. Aspect-oriented graph grammars are two-layer specifications where the base graph grammar describe the original system behavior, while aspects describe the implementation of global policies as model transformation. By using the encoding of Section 4, we can use AGG to study characteristics of aspect weaving in a similar way as the original system execution. Figure 7 shows the results Machado R., Heckel R., Ribeiro L. 49 of critical pair analysis for the base graph grammar. In this level, conflicts arise only in the pair (ExecuteSet,ExecuteGET) when the first rule updates a value which is read by the second one. Dependencies reflect Send-Execute-Receive sequences of derivations, induced by the value of the Type attribute in message nodes. In the aspect level we analyze the possibility of conflicts in the aspect weaving process, since the rules are actually encoded advices. Figure 8 shows the results of CPA for the encoded model of Figure 6. In this particular system, where the advices do not delete elements from rules, the rules are obviously conflict-free. Lack of conflicts in the aspect level means that final weaved system does not change even if we change the order aspects are weaved to the base system. If there was at least one conflicting pair of encoded advices (a1 , a2 ) where a1 and a2 are not in the same aspect, then the aspects could potentially interact and aspect weaving would not be necessarily a confluent operation. Figure 8: Critical pair analysis of the aspect-oriented encoded system in AGG. 6 Final remarks This work proposed the use of AOGG to model distributed system with aspects, and also the use of the AGG tool to study their behavior. We introduced the AOGG model, described an encoding mechanism to describe the base system as a single typed graph, and discussed the use of critical pair analysis to reason about conflicts in the aspect weaving operation. The idea of using graph rewriting to define aspect weaving is not entirely new. In [14, 17], aspect weaving is also defined by means of graph rewriting, and the AGG tool is used to analyze the specification using critical pair analysis. In those approaches, however, UML diagrams are used as base system model. Following a different direction, the work by Aksit et al. [3] encodes a complete aspect-oriented calculus into the graph transformation tool Groove [15]. This allows to study the interference between aspects directly in the system unfolding, by employing the space-state generation feature of Groove. As future work, we intend to explore the properties of the proposed encoding. This is required in order to relate the behavior of the weaved system to the behavior of the original base system together with aspect specification. Furthermore, the usage of graph grammars as base systems may provide insights about how rule-base modification of rules affect the respective rule derivations, since both are representable as diagrams within the same categorical framework. Acknowledgements: The authors would like to thank the anonymous referees for their helpful comments and suggestions. This work was partially supported by CNPq – Conselho Nacional de Desenvolvimento Cientı́fico e Tecnológico. 50 Modeling and Reasoning over Distributed Systems using AOGGs References [1] Eclipse AJDT: AspectJ Development Tools. http://www.eclipse.org/ajdt/. [2] The AGG Homepage. http://user.cs.tu-berlin.de/ gragra/agg/. [3] Mehmet Aksit, Arend Rensink & Tom Staijen (2009): A graph-transformation-based simulation approach for analysing aspect interference on shared join points. In: AOSD ’09: Proceedings of the 8th ACM international conference on Aspect-oriented software development. ACM, New York, NY, USA, pp. 39–50. [4] Curtis Clifton & Gary T. Leavens (2006): MiniMAO1 : an imperative core language for studying aspectoriented reasonings. Sci. Comput. Program. 63(3), pp. 321–374. Available at http://dx.doi.org/10. 1016/j.scico.2006.02.009. [5] Simplice Djoko Djoko, Rémi Douence, Pascal Fradet & Didier Le Botlan (2006): CASB: Common Aspect Semantics Base,. Technical Report, Research Report, Network of Excellence in AOSD (AOSD-Europe, August 2006, no D54). [6] H. Ehrig, M. Pfender & H. J. Schneider (1973): Graph-grammars: An algebraic approach. In: Switching and Automata Theory, 1973. SWAT ’08. IEEE Conference Record of 14th Annual Symposium on. pp. 167–180. [7] Robert E. Filman & Daniel P. Friedman (2000): Aspect-Oriented Programming is Quantification and Obliviousness. Technical Report. [8] Radha Jagadeesan, Alan Jeffrey & James Riely (2006): Typed parametric polymorphism for aspects. Sci. Comput. Program. 63(3), pp. 267–296. [9] José Uetanabara Júnior, Valter Vieira Camargo & Christina Von Flach Chavez (2009): UML-AOF: a profile for modeling aspect-oriented frameworks. In: AOM ’09: Proceedings of the 13th workshop on Aspectoriented modeling. ACM, New York, NY, USA, pp. 1–6. [10] Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm & William G. Griswold (2001): An Overview of AspectJ. In: ECOOP. pp. 327–353. Available at http://link.springer.de/link/ service/series/0558/bibs/2072/20720327.htm. [11] Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean-Marc Loingtier & John Irwin (1997): Aspect-Oriented Programming. In: ECOOP. pp. 220–242. Available at http:// link.springer.de/link/service/series/0558/bibs/1241/12410220.htm. [12] Michael Löwe (1993): Algebraic approach to single-pushout graph transformation. Theor. Comput. Sci. 109(1-2), pp. 181–224. [13] Rodrigo Machado, Luciana Foss & Leila Ribeiro (2009): Aspects for Graph Grammars. In: Proceedings of the 8th International Workshop on Graph Transformation and Visual Modeling Techniques. [14] Katharina Mehner, Mattia Monga & Gabriele Taentzer (2006): Interaction Analysis in Aspect-Oriented Models. Requirements Engineering, 14th IEEE International Conference , pp. 69–78. [15] Arend Rensink (2004): The GROOVE simulator: A tool for state space generation. In: Applications of Graph Transformations with Industrial Relevance (AGTIVE), volume 3062 of Lecture Notes in Computer Science. Springer, pp. 479–485. [16] David Walker, Steve Zdancewic & Jay Ligatti (2003): A Theory of Aspects. In: ICFP ’03: Proceedings of the eighth ACM SIGPLAN international conference on Functional programming. ACM Press, New York, NY, USA, pp. 127–139. [17] Jon Whittle & Praveen K. Jayaraman (2007): MATA: A Tool for Aspect-Oriented Modeling Based on Graph Transformation. In: Holger Giese, editor: MoDELS Workshops, Lecture Notes in Computer Science 5002. Springer, pp. 16–27. Available at http://dblp.uni-trier.de/db/conf/models/models2007w.html# WhittleJ07.
6cs.PL
Risk-Management Methods for the Libor Market Model Using Semidefinite Programming∗ arXiv:cs/0302035v2 [cs.CE] 5 Oct 2005 A. d’Aspremont† December 27, 2017 Abstract When interest rate dynamics are described by the Libor Market Model as in Brace, Gatarek & Musiela (1997), we show how some essential risk-management results can be obtained from the dual of the calibration program. In particular, if the objective is to maximize another swaption’s price, we show that the optimal dual variables describe a hedging portfolio in the sense of Avellaneda & Paras (1996). In the general case, the local sensitivity of the covariance matrix to all market movement scenarios can be directly computed from the optimal dual solution. We also show how semidefinite programming can be used to manage the Gamma exposure of a portfolio. Keywords: Libor Market Model, Inverse problems, Semidefinite Programming, Calibration. 1 Introduction A recent stream of works on the Libor Market Model have showed how swap rates can be approximated by a basket of lognormal processes under an appropriate choice of forward measure. This, coupled with analytic European basket call pricing approximations, allows to cast the problem of calibrating the Libor Market Model to a set of European caps and swaptions as a semidefinite program, i.e. a linear program on the cone of positive semidefinite matrices (see Nesterov & Nemirovskii (1994) and Boyd & Vandenberghe (2004)). This work exploits the related duality theory to provide explicit sensitivity and hedging results based on the optimal solution to the calibration program. The lognormal approximation for basket pricing has its origin in electrical engineering as the addition of noise in decibels (see for example Schwartz & Yeh (1981)). Its application to basket option pricing dates back to Huynh (1994) or Musiela & Rutkowski (1997). Brace, Dun & Barton (1999) tested its empirical validity for swaption pricing and Brace & Womersley (2000) used it to study Bermudan swaptions. More recently, d’Aspremont (2003), Kawai (2002) and Kurbanmuradov, Sabelfeld & Schoenmakers (2002) obtained additional terms in the expansion and further evidence on the approximation performance. On the calibration front, Rebonato (1998) and Rebonato (1999) highlight the importance of jointly calibrating volatilities and correlations. These works, together with Longstaff, Santa-Clara & Schwartz (2000) also detail some of the most common non-convex calibration techniques based on parametrizations of the forward rates covariance factors. The mixed static-dynamic hedging formulation of the pricing problem has its source in the works by El Karoui, Jeanblanc-Picqué & Shreve (1998), Avellaneda, Levy & Paras (1995) and Avellaneda & Paras (1996), while Romagnoli & Vargiolu (2000) provide some closed-form results in the multivariate case. Here, we show how the dual solution to the calibration program provides a complete description of the sensitivity to changes in market condition. In fact, because the algorithms used to solve the calibration problem jointly solve the problem and its dual, the sensitivity of the calibrated covariance matrix is readily available from the dual solution to the calibration program. When the objective in the calibration program is another swaption’s price, the dual solution ∗ This work has been developed under the direction of Nicole El Karoui and I am very grateful to her. I also benefited in my work from discussions with Guillaume Amblard, Marco Avellaneda, Vlad Bally, Stephen Boyd, Jérôme Busca, Rama Cont, Darrell Duffie, Stefano Gallucio, Laurent El Ghaoui, Jean-Michel Lasry, Marek Musiela, Ezra Nahum, Antoon Pelsser, Yann Samuelides, Olivier Scaillet, Robert Womersley, seminar participants at the GdR FIQAM at the Ecole Polytechnique, the May 2002 Workshop on Interest Rate Models organized by Frontières en Finance in Paris, the June 2002 AFFI conference in Strasbourg and the Summer School on Modern Convex Optimization at the C.O.R.E. in U.C.L. Finally, I am also very grateful to Jérôme Lebuchoux, Cyril Godart and everybody inside FIRST and the S.P.G. at Paribas Capital Markets in London, their advice and assistance has been key in the development of this work. † ORFE, Princeton University, Princeton NJ 08544, U.S.A. Email: [email protected]. This work started while the author was at CMAPX, Ecole Polytechnique, Palaiseau, France. 1 also describes an approximate solution to the optimal hedging problem in Avellaneda & Paras (1996), which computes the price of a derivative product as the sum of a static hedging portfolio and a dynamic strategy hedging the worst-case residual risk. We also show how semidefinite programming can be used to efficiently solve the problem of optimally managing the Gamma exposure of a portfolio using vanilla options, as posed by Douady (1995). The results we obtain here underline the key advantages of applying semidefinite programming methods to the calibration problem: besides their numerical performance, they naturally provide some central results on sensitivity and risk-management. They can also eliminate numerical errors in sensitivity computations that were caused by the inherent instability of non-convex calibration techniques. The paper is organized as follows: In the next section, we quickly recall the calibration program construction for the Libor Market Model. Section three shows how to compute key sensitivities from the dual solution to this calibration problem. A fourth section details how these results can be used to form hedging portfolios. Finally, in the last section, we present some numerical results. 2 Model Calibration In this section, we begin by briefly recalling the Libor Market Model construction along the lines of Brace et al. (1997) (see also Jamshidian (1997), Sandmann & Sondermann (1997) and Miltersen, Sandmann & Sondermann (1997)). We then describe how to form the calibration program. 2.1 Zero coupon dynamics We use the Musiela parametrization of the Heath, Jarrow & Morton (1992) setup. r(t, θ ) is the continuously compounded instantaneous forward rate at time t, with duration θ . To avoid any confusion, Roman letters will be used for maturity dates and Greek ones for durations. The zero-coupon is here computed as  Z T −t  r(t, θ )d θ B(t, T ) = exp − (1) 0 All dynamics are described in a probability space (Ω, {Ft ;t ≥ 0}, P) where the filtration {Ft ;t ≥ 0} is the Paugmentation of the natural filtration generated by a d dimensional Brownian motion W = {Wt ,t ≥ 0}. The savings account is defined by:   βt = exp Z t r(s, 0)ds 0 and represents the amount generated at time t ≥ 0 by continuously reinvesting 1 euro in the spot rate r(s, 0) during the period 0 ≤ s ≤ t. As in Heath et al. (1992), the absence of arbitrage between all zero-coupons and the savings account states that:   Zt Z B(t, T ) 1 t 2 (2) |σ (s, T − s)| ds = B(0, T ) exp − σ (s, T − s)dWs − βt 2 0 0 is a martingale under P for all T > 0, where for all θ ≥ 0 the zero-coupon bond volatility process {σ (t, θ ); θ ≥ 0} is Ft -adapted with values in Rd . We assume that the function θ 7−→ σ (t, θ ) is absolutely continuous and the derivative τ (t, θ ) = ∂ /∂ θ (σ (t, θ )) is bounded on R2 × Ω. 2.2 Libor diffusion process All Heath et al. (1992) based arbitrage models are fully specified by their volatility structure and the forward rates curve today. The specification of the volatility σ (t, θ ) in Brace et al. (1997) is based on the assumption that for a given underlying maturity δ (for ex. 3 months) the associated forward Libor process {L(t, θ );t ≥ 0} with maturity θ defined by:   1 + δ L(t, θ ) = exp 2 Z θ +δ θ r(t, ν )d ν has a lognormal volatility structure. Using the Ito formula combined with the dynamics detailed above, we get as in Brace et al. (1997):   ∂ L(s,θ ) (1+δ L(s,θ )) B B (s, θ + δ ) − σ B (s, θ )) ds dL(s, θ ) = + σ (s, θ + δ )( σ ∂θ δ (3) + δ1 (1 + δ L(s, θ )) (σ B (s, θ + δ ) − σ B(s, θ ))dWs where Ws is the Brownian motion defined above and the deterministic volatility function γ : R2+ 7−→ Rd is bounded and piecewise continuous. To get the desired lognormal volatility for Libors we must specify the zero-coupon volatility σ (t, Ti ) as: i−1 δ K(t, T j ) σ (t, Ti ) = ∑ γ (t, T j − t) (4) j=1 1 + δ K(t, T j ) where {T1 , . . . , TM } is a calendar with period δ and the Forward Rate Agreement K(t, T ) = L(t, T − t) dynamics are given by: dK(s, T ) = γ (s, T − s)K(s, T ) [σ (s, T − s + δ )ds + dWs] Finally, as in Brace et al. (1997) we set σ (t, θ ) = 0 for 0 ≤ θ < δ . 2.3 Swaps A swap rate is the rate that zeroes the present value of a set of periodical exchanges of a fixed coupon against a floating coupon equal to a Libor rate. In a representation that is central in swaption pricing approximations, we can write swaps as baskets of forwards (see for ex. Rebonato (1998)). For example, in the case of a swap with start date TS and end date TN : N swap(t, TS , TN ) = ∑ ωi (t)K(t, Ti ) (5) i=S where TS , TN are calendar dates in {T1 , . . . , TM }, and: ωi (t) = cvg(Ti , Ti+1 )B(t, Ti+1 ) Level(t, TS , TN ) (6) with cvg(Ti , Ti+1 ), the coverage (time interval) between Ti and Ti+1 and Level(t, TS , TN ) the level payment, i.e. the sum of the discount factors for the fixed calendar of the swap weighted by their associated coverage: N Level(t, TS , TN ) = ∑ cvg(Ti , Ti+1 )B(t, Ti+1 ) i=S 2.4 Swaption price approximation As in Brace & Womersley (2000), d’Aspremont (2003) or Kurbanmuradov et al. (2002), we approximate the swap dynamics by a one-dimensional lognormal process, assuming the weights ωi (t) are constant equal to ωi : N d swap(s, TS , TN ) = ∑ ω̂i γ (s, Ti − s)dWsLV L swap(s, T, TN ) i=S where ω̂i = ωi (7) K(t, Ti ) swap(t, TS , TN ) is computed from the market data today and WtLV L is a d dimensional Brownian motion under the swap martingale measure defined in Jamshidian (1997), which takes the level payment as a numéraire. We can use the order zero basket pricing approximation in Huynh (1994) and compute the price of a payer swaption starting with maturity T, written on swap(s, TS , TN ), with strike κ using the Black (1976) pricing formula: p  Level(t, TS , TN ) swap(t, TS , TN )N(h) − κ N h − VTS (8) 3 where     S ,TN ) + 21 VTS ln swap(t,T κ p h= VTS and swap(t, TS , TN ) is the value of the forward swap today with the variance VTS given by: VT = Z TS t = Z TS t 2 N ∑ ω̂i γ (s, Ti − s) i=S ds = Z TS t N ∑ i, j=S ω̂i ω̂ j γ (s, Ti − s), γ (s, T j − s) Tr (Ωt Γs ) ds ! ds (9) We note Sn the set of symmetric matrices of size n × n. This cumulative variance is a linear form on the forward rates covariance, with Ωt and Γs ∈ SN−S+1 constructed such that:  Ωt = ω̂ ω̂ T = (ω̂i ω̂ j )i, j∈[S,N]  0 and Γs = γ (s, Ti − s), γ (s, T j − s) i, j∈[S,N]  0 where Γs is the covariance matrix of the forward rates (or the Gram matrix of the γ (s, Ti − s) volatility function defined above). Here swaptions are priced as basket options with constant coefficients. As detailed in Brace & Womersley (2000) or d’Aspremont (2003), this simple approximation creates a relative error on swaption prices of 1 − 2%, which is well within Bid-Ask spreads. Finally, we remark that caplets can be priced in the same way as one period swaptions. 2.5 Semidefinite programming In this section we give a brief introduction to semidefinite programming. 2.5.1 Complexity A standard form linear program can be written: minimize cT x subject to Ax = b x0 in the variable x ∈ Rn , where x  0 means here x componentwise nonnegative. Because their feasible set is the intersection of an affine subspace with the convex cone of nonnegative vectors, the objective being linear, these programs are convex. If the program is feasible, convexity guarantees the existence of a unique (up to degeneracy or unboundedness) optimal solution. The first method used to solve these programs in practice was the simplex method. This algorithm works well in most cases but is known to have an exponential worst case complexity. In practice, this means that convergence of the simplex method cannot be guaranteed. Since the work of Nemirovskii & Yudin (1979) and Karmarkar (1984) however, we know that these programs can be solved in polynomial time by interior point methods and most modern solver implement both techniques. More importantly for our purposes here, the interior point methods used to prove polynomial time solvability of linear programs have been generalized to a larger class of convex problems. One of these extensions is called semidefinite programming. A standard form semidefinite program is written: minimize subject to Tr(CX) Tr(Ai X) = bi , X 0 i = 1, . . . , m X Tr(Ai X) = bi , X 0 i = 1, . . . , m (10) in the variable X ∈ Sn , where X  0 means here that X is positive semidefinite. Nesterov & Nemirovskii (1994) showed that these programs can be solved in polynomial time. A number of efficient solvers are available to solve them, the one used in this work is called SEDUMI by Sturm (1999). In practice, a program with n = 50 will be solved in less than a second. In what follows, we will also formulate semidefinite feasibility problems: find subject to 4 in the variable X ∈ Sn . Their solution set is convex as the intersection of an affine subspace with the (convex) cone of positive semidefinite matrices and a particular solution can be found by choosing an objective matrix C and solving the corresponding semidefinite program (10). We will see below that most duality results on linear programming can be extended to semidefinite programs. 2.5.2 Semidefinite duality We now very briefly summarize the duality theory for semidefinite programming. We refer again the reader to Nesterov & Nemirovskii (1994) or Boyd & Vandenberghe (2004) for a complete analysis. A standard form primal semidefinite program is written: minimize Tr(CX) s.t. Tr(Ai X) = bi , i = 1, ..., m (11) X 0 in the variable X ∈ SM . For X  0, y ∈ Rm , we form the following Lagrangian: m L(X, y) = Tr(CX) + ∑ yk (bk − Tr(Ak X)) k=1 m = Tr ∑ (−yk Ak + C) X k=1 ! m + ∑ yk b k k=1 and because the semidefinite cone is self-dual, we find that L(X, y) is bounded below in X  0 iff: m C − ∑ yk A k  0 k=1 hence the dual semidefinite problem becomes: maximize ∑m k=1 yk bk s.t. C − ∑m k=1 yk Ak  0 (12) When the program is feasible, most solvers produce both primal and dual solutions to this problem as well as a certificate of optimality for the solution in the form of the associated duality gap: !! m µ = Tr X C − ∑ yk Ak k=1 which is an upper bound on the absolute error. If on the other hand the program is infeasible, the dual solution provides a Farkas type infeasibility certificate (see Boyd & Vandenberghe (2004) for details). This means that, for reasonably large problems, semidefinite programming solvers can be used as black boxes. 2.5.3 Cone programming The algorithms used to solve linear and semidefinite programs can be extended a little further to include second order cone constraints. A cone program mixes linear, second order and semidefinite constraints and is written: minimize subject to Tr(CX) kd Tj vec(X) + e j k ≤ f jT vec(X) + g j , Tr(Ai X) = bi , i = 1, . . . , m X 0 2 j = 1, . . . , p in the variable X ∈ Sn , where vec(X) turns X into a vector x ∈ Rn by stacking its columns. Again, a direct extension of the duality results above is valid for cone programs and solvers such as SEDUMI by Sturm (1999) give either both primal and dual solutions or a certificate of infeasibility in polynomial time. 5 2.6 The calibration program Here, we describe the practical implementation of the calibration program using the swaption pricing approximation detailed above. This is done by discretizing in s the covariance matrix Γs . We suppose that the calibration data set is made of m swaptions with option maturity TSk written on swaps of maturity TNk − TSk for k = 1, ..., m, with market volatility given by σk . 2.6.1 A simple example In the simple case where the volatility of the forwards is of the form γ (s, T − s) = γ (T − s) with γ piecewise constant over intervals of length δ , and we are given the market price of k swaptions with σk2 Tk ∈ R+ the Black (1976) cumulative variance of swaption k written on swap(t, TSk , TNk ), the calibration problem becomes, using the approximate swaption variance formula in (9): find X s.t. Tr(Ωk X) = σk2 TSk , X 0 k = 1, ..., m (13) k δ ϕk, j with ϕk, j ∈ SM the which is a semidefinite feasibility problem in the covariance matrix X ∈ SM and Ωk = ∑ j=1 T rank one matrix with submatrix ω̂k ω̂k starting at element ( j, j) and all other blocks equal to zero, with M = maxk Nk . In other words  ϕk, j j+p, j+q = ω̂k,p ω̂k,q , p, q = 1, . . . , Nk − Sk + 1 S with all other elements equal to zero. See Brace et al. (1999) or d’Aspremont (2003) for further details. 2.6.2 The general case Here we show that for general volatilities γ (s, T − s), the format of the calibration problem remains similar to that of the simple example above, except that X becomes block-diagonal. In the general non-stationary case where γ is of the form γ (s, T − s) and piecewise constant on intervals of size δ , the expression of the market cumulative variance becomes, according to formula (9): ! Sk N  Z TS 2 σk TSk = ∑ δ Tr Ωk,i Xi = ∑ ω̂i ω̂ j γ (s, Ti − s), γ (s, Tj − s) ds t i=1 i, j=S where Ωk,i ∈ SM−i is a block-matrix with submatrix ω̂k ω̂kT starting at element (Sk − i, Sk − i) and all other blocks equal to zero. Here Xi is the Gram matrix of the vectors γ (Ti , T j − Ti ). Calibrating the model to the swaptions k = (1, ..., m) can then be written as the following semidefinite feasibility problem: find s.t. Xi  Sk δ Tr Ωk,i Xi = σk2 TSk , ∑i=1 Xi  0, i = 1, ..., M k = 1, ..., m with variables Xi ∈ SM−i . We can write this general problem in the same format used in the simple stationary case. Let X be the block matrix   X1 0 . 0  0 . . .   X =  . . . 0  0 . 0 XM the calibration program can be written as in (13): find X s.t. Tr(Ω̄k X) = σk2 TSk , k = 1, ..., m X  0, X block-diagonal 6 (14) except that Ω̄k and X are here ”block-diagonal” matrices. We can also replace the equality constraints with Bid-Ask spreads. In the simple case detailed in (13), the new calibration problem is then written as the following semidefinite feasibility problem: find X 2 2 s.t. σBid,k TSk ≤ Tr(Ωk X) ≤ σAsk,k TSk , k = 1, ..., m X 0 2 2 , σAsk,k , TSk . Again, we can rewrite this program as a semidefinite in the variable X ∈ SM , with parameters Ωk , σBid,k feasibility problem: find X  s.t. Ωk Tr  0 0 Ωk Tr  0 0  0 I 0 0 0 0  0 X 0  0 0 0  0 X 0  0 −I 0 0 U1 0  0 2 0  = σAsk,k TSk U2 0 U1 0  0 2 0  = σBid,k TSk , U2 k = 1, ..., m X,U1 ,U2  0 in the variables X,U1 ,U2 ∈ SM , which can be summarized as find X̃ 2 TSk s.t. Tr(Ω̃Ask,k X̃) = σAsk,k 2 Tr(Ω̃Bid,k X̃) = σBid,k TSk k = 1, ..., m X̃  0, X̃ block-diagonal (15) with X̃, Ω̃k ∈ S3M . Because of these transformations and to simplify the analysis, we will always discuss the stationary case with equality constraints (13) in the following section, knowing that all results can be directly extended to the general case using the block-diagonal formulation detailed above. 3 Sensitivity analysis In this section, we show how the dual optimal solution can be exploited for computing solution sensitivities with minimal numerical cost. 3.1 Computing sensitivities Let us suppose that we have solved both the primal and the dual calibration problems above with market constraints σk2 TSk and let X opt and yopt be the optimal solutions. Suppose also that the market swaption price constraints are modified by a small amount u ∈ Rm . The new calibration problem becomes: minimize Tr(CX) s.t. Tr(Ωk X) = σk2 TSk + uk X 0 k = 1, ..., m (16) in the variable X ∈ SM with parameters Ωk ,C ∈ SM and σk2 TSk + uk ∈ R+ . Here C is, for example, an historical estimate of the covariance matrix. If we note popt (u) the optimal solution to the revised problem, we get (at least formally for now) the sensitivity of the solution to a change in market condition as: ∂ popt (0) opt = −yk ∂ uk (17) where yopt is the optimal solution to the dual problem (see Boyd & Vandenberghe (2004) for details). As we will see in this section and the next one, this has various interpretations depending on the objective function. Here, we want to study the variation in the solution matrix X opt , given a small change u in the market conditions. We start with the following definition. 7 Notation 1 Let us suppose that we have solved the general calibration problem in (16), we call X opt and yopt the primal and dual solutions to the above problem with u = 0. We note ! m Z opt = C − ∑ yopt k Ωk k=1 the dual solution matrix. As in Alizadeh, Haeberly & Overton (1998), we also define the symmetric Kronecker product as:  1 (P ⊛ Q) K := PKQT + QKPT 2 We note A and A∗ , the linear operators defined by: A : SM −→ Rm A∗ : Rm −→ SM and its dual X 7−→ AX := (Tr (Ωk X))k=1,...,m y− 7 → A∗ y := ∑m k=1 yk Ωk We now follow Todd & Yildirim (2001) to compute the impact ∆X on the solution of a small change in the market price data (uk )k=1,..,m , i.e. given u small enough we compute the next Newton step ∆X. Each solver implements one particular search direction to compute this step and we define a matrix M, with M = I in the case of the A.H.O. search direction based on the work by Alizadeh et al. (1998), see Todd & Yildirim (2001) for other examples. We also define the linear operators: E = Z opt ⊛ M and F = MX opt ⊛ I and their adjoints E ∗ = Z opt ⊛ M and X opt M ⊛ I We remark that if A, B ∈ SM commute, with eigenvalues α , β ∈ RM and common eigenvectors vi for i = 1, ..., M, then A ⊛ B has eigenvalues (αi β j + α j βi ) for i, j = 1, ..., M and eigenvectors vi vTi if i = j and (vi vTj + v j vTi ) if i 6= j for i, j = 1, ..., M. Provided the strict feasibility and nonsingularity conditions in §3 of Todd & Yildirim (2001) hold, we can compute the Newton step ∆X as: h −1 i u (18) ∆X = E −1 FA∗ AE −1 FA∗ and this will lead to a feasible point X opt + ∆X  0 iff the market variation movement u is such that: X opt −1 i opt − 1 − 1  −1 ∗ h 2 2 u E FA AE −1 FA∗ X 2 ≤1 (19) where k · k2 is the l2 norm. The intuition behind this formula is that semidefinite programming solvers are based on the Newton method and condition (19) ensures that the solution X opt remains in the region of quadratic convergence of the Newton algorithm. This means that only one Newton step is required to produce the new optimal solution X opt + ∆X and (18) simply computes this step. The matrix in (18) produces a direct method for updating X which we can now use to compute price sensitivities for any given portfolio. This illustrates how a semidefinite programming based calibration allows to test various realistic scenarios at a minimum numerical cost and improves on the classical non-convex methods that either had to ”bump the market data and recalibrate” the model for every scenario with the risk of jumping from one local optimum to the next, or simulate unrealistic market movements by directly adjusting the covariance matrix. One key question is stability: the calibration program in (13) has a unique solution, but as usual this optimum can be very unstable and the matrix in (18) badly conditioned. In the spirit of the work by Cont (2001) on volatility surfaces, we look in the next section for a way to solve this conditioning issue and stabilize the calibration result. 3.2 Robustness The previous sections were focused on how to compute the impact of a change in market conditions. Here we will focus on how to anticipate those variations and make the calibrated matrix robust to a given set of scenarios. Depending on the way the perturbations are modelled, this problem can remain convex and be solved very efficiently. Let us suppose here that we want to solve the calibration problem on a set of market Bid-Ask spreads data. A direct way to address 8 the conditioning issues detailed in the last section is to use a Tikhonov stabilization of the calibration program as in Cont (2001) and solve the following cone program: minimize kXk2 2 2 σBid,k TSk ≤ Tr(Ωk X) ≤ σAsk,k TSk , s.t. X 0 k = 1, ..., m (20) 2 2 in the variable X ∈ SM with parameters Ωk ,C ∈ SM and σBid,k TSk , σAsk,k TSk ∈ R+ . In the absence of any information on the uncertainty in the market data, we can simply maximize the distance between the solution and the market bounds to ensure that it remains valid in the event of a small change in the market variance input. As the robustness objective is equivalent to a distance maximization between the solution and the constraints (or Chebyshev centering), the input of assumptions on the movement structure is equivalent to a choice of norm. Without any particular structural information on the volatility market dynamics, we can use the l∞ norm and the calibration problem becomes: maximize t 2 2 σBid,k TSk + t ≤ Tr(Ωk X) ≤ σAsk,k TSk − t, s.t. X 0 k = 1, ..., m in the variables t ∈ R and X ∈ SM . Using the l1 norm instead, this becomes: maximize ∑m i=1 tk 2 2 s.t. σBid,k TSk + tk ≤ Tr(Ωk X) ≤ σAsk,k TSk − tk , X 0 k = 1, ..., m in the variables t1 , . . . ,tm ∈ R and X ∈ SM . The problems above optimally center the solution within the Bid-Ask spreads, which makes it robust to a change in market conditions given no particular information on the nature of that change. In the same vein, Ben-Tal, El Ghaoui & Lebret (1998) also show how to design a program that is robust to a change in the matrices Ωk . However, because the matrices Ωk are computed from ratios of zero-coupon bonds, their variance is negligible in practice compared to that of σk2 . Suppose now that V is a statistical estimate of the daily covariance of σk2 TSk (the mid-market volatilities in this case) and let us assume that these volatilities have a Gaussian distribution. We adapt the method used by Lobo, Vandenberghe, Boyd & Lebret (1998) for robust L.P. We suppose that the matrix V has full rank. We can then calibrate the model to this information: maximize Tr(CX) s.t. Tr (Ωk X) − σk2TSk = vk fork = 1, ..., m 1 V−2 v X 0 ∞ ≤ Φ−1 (µ ) where k·k∞ is the l∞ norm and Φ(x) is given by 1 Φ(x) = 1 − √ 2π Z x −x exp(−u2 /2)du There is no guarantee that this program is feasible and we can solve instead for the best confidence level by forming the following program: minimize t s.t. Tr (Ωk X) − σk2 TSk = vk fork = 1, ..., m 1 V−2 v X 0 ∞ ≤t The optimal confidence level is then η = Φ(t) and “centers” the calibrated matrix with respect to the uncertainty in σk2 TSk . This is a symmetric cone program and can be solved efficiently. 9 4 Hedging In this section, we show how semidefinite programming calibration techniques can be used to build a superreplicating portfolio, approximating the upper and lower hedging prices defined in El Karoui & Quenez (1995). An efficient technique for computing those price bounds with general non-convex payoffs on a single asset with univariate dynamics was introduced in Avellaneda et al. (1995) and recent work on this topic by Romagnoli & Vargiolu (2000) provided closed-form solutions for the prices of exchange options and options on the geometrical mean of two assets. 4.1 Approximate solution Here, using the approximation in (8), we first compute arbitrage bounds on the price of a basket by adapting the method used by Avellaneda et al. (1995) in the one-dimensional case. We then provide approximate solutions for these arbitrage bounds on swaptions and show how one can use the dual solution to build an optimal hedging portfolio in the sense of Avellaneda & Paras (1996), using derivative securities taken from the calibration set. As in Avellaneda & Paras (1996), the price here is derived from a mixed static-dynamic representation: Price = Min {Value of static hedge + Max (PV of residual liability)} (21) where the static hedge is a portfolio composed of the calibration assets and the maximum residual liability is computed as in El Karoui et al. (1998) or Avellaneda et al. (1995). This hedging representation translates into the pricing problem the market habit of calibrating a model on the instrument set that will be used in hedging. The static portfolio uses these instrument to reduce the payoff risk, while the dynamic hedging part hedges the remaining risk in conservative manner. Furthermore, because of the sub-additivity of the above program with respect to payoffs, we expect this diversification of the volatility risk to bring down the total cost of hedging. Let K(t) = (K(t, Ti ))i=1,...,M and suppose we have a set of market prices Ck for k = 1, . . . , m, of swaptions with corresponding market volatilities σk , coefficient matrices Ωk ∈ SM and payoffs hk (K(t)). As in Avellaneda & Paras (1996) we can write the price (21) of an an additional swaption with payoff h0 (K(t)): " ( #!) m inf λ ∈Rm ∑ λkCk + k=1 m sup E P β (T )−1 h0 (K(T )) − ∑ λk β (T )−1 hk (K(T )) P (22) k=1 where P varies within the set of equivalent martingale measure and β (T ) is the value of the savings account in T . We can rewrite the above problem as: ( !)    m   P P −1 −1 inf sup E β (T ) h0 (K(T )) − ∑ λk E β (T ) hk (K(T )) − Ck λ P i=1 where we recognize the optimum hedging portfolio problem as the dual of the maximum price problem above:   maximize E P β (T )−1 h0 (K(T )) s.t. E P β (T )−1 hk (K(T )) = Ck , k = 1, ..., m Using (8), we get an approximate solution by solving the following problem: maximize BS0 (Tr(Ω0 X)) s.t. BSk (Tr(Ωk X)) = Ck , X 0 and its dual: ( k = 1, ..., m m !) inf sup BS(Tr(Ω0 X)) − ∑ λk (BS (Tr(Ωk X)) − Ck ) λ X0 k=1 The primal problem, after we write it in terms of variance, becomes the following semidefinite program: 2 T = Tr(Ω X) maximize σmax 0 s.t. Tr(Ωk X) = σk2 Tk , k = 1, ..., m X 0 10 Again, we note yopt ∈ Rm the solution to the dual of this last problem: 2 minimize ∑m k=1 yk σk Tk m s.t. 0  ∑k=1 yk Ωk − Ω0 The KKT optimality conditions on the primal-dual semidefinite program pair above (see Boyd & Vandenberghe (2004) for example) can be written:  m yk Ω k − Ω 0   0  ∑k=1  0 = ∑m k=1 yk Ωk X − Ω0 X Tr(Ω X) = σk2 Tk , k = 1, ..., m  k   0X and we can compare those to the KKT conditions for the price maximization problem:  ∂ BSk (Tr(Ωk X)) 0 X))  Z = ∂ BS0 (Tr(Ω Ω0 + ∑m Ωk  k=1 λk ∂v ∂v  XZ = 0   BSk (Tr(Ωk X)) = Ci , k = 1, ..., m  0  X, Z with dual variables λ ∈ Rm and Z ∈ Sn . An optimal dual solution λk for the price maximization problem can then be constructed from yopt , the optimal dual solution of the semidefinite program on the variance, as: opt λkopt = −yopt k ∂ BS0 (Tr(Ω0 X)) /∂ v ∂ BSk (Tr(Ωk X)) /∂ v which gives the amount of basket k in the optimal static hedging portfolio defined by (21) . 4.2 The exact problem The bounds found in the section above are only approximate solutions to the superreplicating problem. Although the relative error in the swaption price approximation is known to be about 1-2%, it is interesting to notice that while being somewhat intractable, the exact problem shares the same optimization structure as the approximate one. Let us recall the results in Romagnoli & Vargiolu (2000). If, as above, we note C(K(t),t) the superreplicating price of a basket option, then C(K(t),t) is the solution to a multidimensional Black-Scholes-Barenblatt (BSB) equation. We can create a superreplicating strategy by dynamically trading in a portfolio composed of ∆ti = ∂∂ Cxi (t, K(t, Ti )) in each asset. The BSB equation in Romagnoli & Vargiolu (2000) can be rewritten in a format that is similar to that of the approximate problem above, to become:    ∂ C(x,t) ∂ 2C(x,t)   ∂ t + 12 maxΓ∈Λ Tr diag(x) ∂ x2 diag(x)Γ = 0   C(x, T ) = (∑ni=1 ωi xi − k)+ where diag(x) is the diagonal matrix formed with the components of x and Γ = γγ T is the model covariance matrix. If the set Λ is given by the intersection of the semidefinite cone (the covariance matrix has to be positive semidefinite) with a polyhedron (for example approximate price constraints, sign constraints or bounds on the matrix coefficients, ...), then the embedded optimization problem in (Romagnoli & Vargiolu (2000)) becomes a semidefinite program:   ∂ 2C(x,t) diag(x) max Tr Γdiag(x) Γ∈Λ ∂ x2 on the feasible set Λ. We recover the same optimization problem as in the approximate solution found in the section above, the only difference being here that the solution to the general problem might not be equal to a Black-Scholes price. This gives a simple interpretation of the embedded optimization problem in the BSB equation developed in Romagnoli & Vargiolu (2000). 11 4.3 Optimal Gamma Hedging For simplicity here, we work in a pure equity framework and, along the lines of Douady (1995), we study the problem of optimally adjusting the Gamma of a portfolio using only options on single assets. This problem is essentially motivated by a difference in liquidity between the vanilla and basket option markets, which makes it impractical to use some baskets to adjust the Gamma of a portfolio. Suppose we have an initial portfolio with a Gamma sensitivity matrix given by Γ in a market with underlying assets xi for i = 1, . . . n. We want to hedge (imperfectly) this position with yi vanilla options on each single asset xi with Gamma given by γi . We assume that the portfolio is maintained delta-neutral, hence a small perturbation of the stock price will induce a change in the portfolio price given by: 1 ∆P(x + ∆x) = P(x) + ∆xT Γ(y)∆x 2 where Γ(y) = Γ + diag(γ )y, with diag(γ ) the diagonal matrix with components γi . As in Douady (1995), our objective is to minimize in y the maximum possible perturbation given by: max ∆xT Γ(y)∆x ∆x∈E where E is the ellipsoid defined by  E = u ∈ Rn |uT Σu = 1 with Σi j = cov(xi , x j ) for i, j = 1, . . . , n, the covariance matrix of the underlying assets. This amounts to minimizing the maximum eigenvalue of the matrix ΣΓ(y) and can be solved by the following semidefinite program: minimize t subject to −tI  ΣΓ + Σdiag(γ )diag(y)  tI in the variables t ∈ R and y ∈ Rn . 5 Numerical results 5.1 Price bounds We use a data set from Nov. 6 2000 and we plot in figure (1) the upper and lower bounds obtained by maximizing (resp. minimizing ) the volatility of a given swaption provided that the Libor covariance matrix remains positive semidefinite and that it matches the calibration data. We calibrate by fitting all caplets up to 20 years plus the following set of swaptions: 2Y into 5Y, 5Y into 5Y, 5Y into 2Y, 10Y into 5Y, 7Y into 5Y, 10Y into 2Y, 10Y into 7Y, 2Y into 2Y. This choice of swaptions was motivated by liquidity (where all swaptions on underlying and maturity in 2Y, 5Y, 7Y, 10Y are meant to be liquid). For simplicity, all frequencies are annual. For each (Maturity,Underlying) pair in figure (1), we solve the semidefinite program detailed in (13): find X s.t. Tr(Ωk X) = σk2 TSk , X 0 k = 1, ..., m in the variable X ∈ S20 , where σk and Ωk are computed as in (13) using the data in Table (1) and (2). The programs are solved using the SEDUMI code by Sturm (1999). We then compare these upper and lower bounds (dotted lines) with the actual market volatility (solid line). Quite surprisingly considering the simplicity of the model (stationarity of the sliding Libor dynamics L(t, θ )), figure (1) shows that all swaptions seem to fit reasonably well in the bounds imposed by the model, except for the 7Y and 10Y underlying. This is in line with the findings of Longstaff et al. (2000). 5.2 Super-replication & calibration stability Here, we compare the performance and stability of the various calibration methodologies detailed here and in Rebonato (1999). For simplicity, we neglect the different changes of measure between forward measures and work with a multivariate lognormal model where the underlying assets xi,t for i = 1, . . . , 5 follow: 1 dxi,s /xi,s = σi dWs − σiT σi ds 2 12 (23) Sydney Opera House Effect 16% 15% 14% 13% Upper Bound Market Lower Bound 12% 11% 10% 9% (7Y , 10Y) (10Y , 10Y) (5Y , 10Y) (4Y , 10Y) (3Y , 10Y) (2Y , 10Y) (7Y , 7Y) (10Y , 7Y) (5Y , 7Y) (4Y , 7Y) (3Y , 7Y) (2Y , 7Y) (7Y , 5Y) (10Y , 5Y) (5Y , 5Y) (4Y , 5Y) (3Y , 5Y) (2Y , 5Y) (7Y , 4Y) (10Y , 4Y) (5Y , 4Y) (4Y , 4Y) (3Y , 4Y) (2Y , 4Y) (7Y , 3Y) (10Y , 3Y) (5Y , 3Y) (4Y , 3Y) (3Y , 3Y) (2Y , 3Y) (7Y , 2Y) (10Y , 2Y) (5Y , 2Y) (4Y , 2Y) (3Y , 2Y) (2Y , 2Y) 8% Swaption (Maturity, Underlying) Figure 1: Calibration result and price bounds on a ”Sydney opera house” set of swaptions. Caplet Vols (%, 1Y to 10Y) Caplet Vols (%, 11Y to 20Y) 14.3 13.0 15.6 12.7 15.4 12.4 15.1 12.2 14.8 12.0 14.5 11.9 14.2 11.8 14.0 11.8 0.13 0.12 Table 1: Caplet volatilities. Swaption 2Y into 5Y 5Y into 5Y 5Y into 2Y 10Y into 5Y 7Y into 5Y 10Y into 2Y 10Y into 7Y 2Y into 2Y Vol (%) 12.4 11.7 14.0 10.0 11.0 12.2 9.6 14.8 ω̂i 0.22 0.22 0.51 0.22 0.23 0.51 0.17 0.52 0.20 0.21 0.49 0.21 0.21 0.49 0.16 0.48 0.20 0.20 0.19 0.19 0.18 0.18 0.20 0.20 0.19 0.19 0.18 0.18 0.15 0.14 0.13 Table 2: Swaption volatilities and weights (data courtesy of BNP Paribas, London). 13 13.9 11.7 13.3 12.0 where Ws is a B.M. of dimension 5. At time 0, we set xi,0 = .1 and the covariance matrix σ T σ is given by:   0.0144 0.0133 0.0074 0.0029 0.0013  0.0133 0.0225 0.0151 0.0063 0.0032     0.0074 0.0151 0.0144 0.0065 0.0032     0.0029 0.0063 0.0065 0.0081 0.0027  0.0013 0.0032 0.0032 0.0027 0.0036 We then compare the performance of a delta hedging strategy implemented using various calibration techniques. In each case, we hedge a short position in an ATM basket option with coefficients w0 = (0, 0, .4, .1, .5), calibrating the model on all single asset ATM calls and an ATM basket with weight w6 = (1, 1, 0, 0, 0), the weights w1 , . . . , w5 being then equal to the Euclidean basis. All options have maturity one year and we rebalance the hedging portfolio 33 times over this period. At each time step, we calibrate to these option prices computed using the model in (23). To test the stability of the calibration techniques, we add a uniformly distributed noise to the calibration prices with amplitude equal to ±10% of the original price. We use four different calibration techniques to get the covariance matrices and compute the deltas. In the first one, we use the exact model covariance above to compute baseline results. In the second one, we use the simple stabilization technique detailed in (20) and solve: minimize kXk2 s.t. Tr(Ωk X) = σk2 TSk , X 0 k = 1, ..., 6 (24) in the variable X, where σk and the matrices Ωk for k = 1, . . . , 6 are computed from w1 , . . . , w6 as in (13). In the third one, we use the super replication technique detailed in §4.1 and calibrate the covariance matrix by solving maximize Tr(Ω0 X) s.t. Tr(Ωk X) = σk2 TSk , X 0 k = 1, ..., 6 (25) in the variable X, where σk and the matrices Ωk for k = 0, . . . , 6 are computed from w0 , . . . , w6 as in (13). Finally, our fourth calibrated covariance matrix is calibrated using the two factor parametrized best fit technique detailed in Rebonato (1999). For each calibration technique, we record the ratio of the delta hedging portfolio’s P&L to the initial option premium at every time step. In figure (2), we plot the P&L distributions for the super-hedging strategy (25) and the Rebonato (1999) calibration technique. We notice that while discrete hedging error makes the super-replication somewhat imperfect, the super-hedging calibration technique has a much higher P&L on average than the best fit calibration in Rebonato (1999). Furthermore, the super-hedging calibration produces a positive P&L in 68% of the sample scenarios, while the parametrized calibration has a positive P&L in only 41% of them. Finally, in table (2) we detail some summary statistics on the relative P&L of the four calibration techniques detailed above and on the change in covariance matrix between time steps. In this table, “mean change” is the average norm of the change in the calibration matrix at each time step, while “Mean P&L” and “StDev” are the mean and standard deviation of the ratio of the hedging portfolio’s P&L to the option premium. Finally, the “real covariance” calibration technique uses the actual model covariance matrix to compute the delta, the “robust” technique uses the solution to (24), the “super-hedging” one uses the solution to (25), while the “parametrized” uses the parametric algorithm described in Rebonato (1999). Calibration method Mean P&L StDev P&L Mean change (10−5) Real covariance -0.002 0.253 0 Robust 0.083 0.338 3.11 Super-Hedging 0.137 0.344 3.36 Parameterized -0.109 0.316 4.77 Table 3: Hedging P&L and covariance stability statistics for various calibration techniques. We notice that, as expected, the super hedging strategy improves the average P&L. However, while the robust calibration algorithm does show a smaller average change in calibrated covariance matrix, this does not translate 14 Figure 2: P&L distribution for the super-hedging (light) and the parametric (dark) calibration techniques. into significantly smaller hedging P&L standard deviation. This is perhaps due to the fact that the basket options considered here are not sensitive enough for these changes in the covariance to have a significant impact on the hedging performance. 6 Conclusion The results above have showed how semidefinite programming based calibration methods provide integrated calibration and risk-management results with guaranteed numerical performance, the dual program having a very natural interpretation in terms of hedging instruments and sensitivity. Furthermore, these techniques make possible the numerical computation of super-hedging strategies (detailed in section 4.1), which seem to perform well in our simulation examples. References Alizadeh, F., Haeberly, J. A. & Overton, M. L. (1998), ‘Primal–dual interior–point methods for semidefinite programming: Convergence rates, stability and numerical results’, SIAM Journal on Optimization 8, 746–768. Avellaneda, M., Levy, A. & Paras, A. (1995), ‘Pricing and hedging derivative securities in markets with uncertain volatilities’, Applied Mathematical Finance 2, 73–88. Avellaneda, M. & Paras, A. (1996), ‘Managing the volatility risk of portfolios of derivative securities: the lagrangian uncertain volatility model’, Applied Mathematical Finance 3, 21–52. Ben-Tal, A., El Ghaoui, L. & Lebret, H. (1998), Robust semidefinite programming, in S. Sastry, H. Wolkowitcz & L. Vandenberghe, eds, ‘Handbook on Semidefinite Programming’, Vol. 27 of International Series in Operations Research and Management Science. 15 Black, F. (1976), ‘The pricing of commodity contracts.’, Journal of Financial Economics 3, 167–179. Boyd, S. & Vandenberghe, L. (2004), Convex Optimization, Cambridge University Press. Brace, A., Dun, T. & Barton, G. (1999), ‘Towards a central interest rate model’, Working Paper. FMMA . Brace, A., Gatarek, D. & Musiela, M. (1997), ‘The market model of interest rate dynamics’, Mathematical Finance 7(2), 127–155. Brace, A. & Womersley, R. S. (2000), ‘Exact fit to the swaption volatility matrix using semidefinite programming’, Working paper, ICBI Global Derivatives Conference . Cont, R. (2001), ‘Inverse problems in financial modeling: theoretical and numerical aspects of model calibration.’, Lecture Notes, Princeton University. . d’Aspremont, A. (2003), Interest Rate Model Calibration and Risk-Management Using Semidefinite Programming, PhD thesis, Ecole Polytechnique. Douady, R. (1995), ‘Optimisation du gamma d’une option sur panier ou sur spread en l’absence d’options croisées.’, Working paper . El Karoui, N., Jeanblanc-Picqué, M. & Shreve, S. E. (1998), ‘On the robustness of the black-scholes equation’, Mathematical Finance 8, 93–126. El Karoui, N. & Quenez, M. (1995), ‘Dynamic programming and pricing of contingent claims in an incomplete market’, Siam Journal of Control and Optimization 33, 29–66. Heath, D., Jarrow, R. & Morton, A. (1992), ‘Bond pricing and the term structure of interest rates: A new methodology’, Econometrica 61(1), 77–105. Huynh, C. B. (1994), ‘Back to baskets’, Risk 7(5). Jamshidian, F. (1997), ‘Libor and swap market models and measures’, Finance and Stochastics 1(4), 293–330. Karmarkar, N. K. (1984), ‘A new polynomial-time algorithm for linear programming’, Combinatorica 4, 373–395. Kawai, A. (2002), ‘Analytical and monte-carlo swaption pricing under the forward swap measure’, Journal of Computational Finance 6(1), 101–111. Kurbanmuradov, O., Sabelfeld, K. & Schoenmakers, J. (2002), ‘Lognormal approximations to libor market models’, Journal of Computational Finance 6(1), 69–100. Lobo, M., Vandenberghe, L., Boyd, S. & Lebret, H. (1998), ‘Applications of second-order cone programming’, Linear Algebra and its Applications 284, 193–228. Special Issue on Linear Algebra in Control, Signals and Image Processing. Longstaff, F. A., Santa-Clara, P. & Schwartz, E. S. (2000), ‘The relative valuation of caps and swaptions: Theory and empirical evidence.’, Working Paper, The Anderson School at UCLA. . Miltersen, K., Sandmann, K. & Sondermann, D. (1997), ‘Closed form solutions for term structure derivatives with log-normal interest rates’, Journal of Finance 52(1), 409–430. Musiela, M. & Rutkowski, M. (1997), Martingale methods in financial modelling, Vol. 36 of Applications of mathematics, Springer, Berlin. Nemirovskii, A. S. & Yudin, D. B. (1979), ‘Problem complexity and method efficiency in optimization’, Nauka (published in English by John Wiley, Chichester, 1983) . Nesterov, Y. & Nemirovskii, A. (1994), Interior-point polynomial algorithms in convex programming, Society for Industrial and Applied Mathematics, Philadelphia. Rebonato, R. (1998), Interest-Rate Options Models, Financial Engineering, Wiley. 16 Rebonato, R. (1999), ‘On the simultaneous calibration of multi-factor log-normal interest rate models to black volatilities and to the correlation matrix.’, QUARCH Working paper, www.rebonato.com . Romagnoli, S. & Vargiolu, T. (2000), ‘Robustness of the black-scholes approach in the case of options on several assets’, Finance and Stochastics 4, 325–341. Sandmann, K. & Sondermann, D. (1997), ‘A note on the stability of lognormal interest rate models and the pricing of eurodollar futures’, Mathematical Finance 7, 119–128. Schwartz, S. C. & Yeh, Y. S. (1981), ‘On the distribution function and moments of power sums with log-normal components.’, The Bell System Technical Journal 61(7), 1441–1462. Sturm, J. F. (1999), ‘Using sedumi 1.0x, a matlab toolbox for optimization over symmetric cones’, Optimization Methods and Software 11, 625–653. Todd, M. & Yildirim, E. A. (2001), ‘Sensitivity analysis in linear programming and semidefinite programming using interior-points methods.’, Mathematical Programming 90(2), 229–261. 17
5cs.CE
Control of complex networks requires both structure and dynamics Alexander J. Gates1,2+ and Luis M. Rocha1,2,3* 1 School of Informatics and Computing, Indiana University, Bloomington, IN, USA in Cognitive Science, Indiana University, Bloomington, IN, USA 3 Instituto Gulbenkian de Ciencia, Oeiras, Portugal + [email protected] * [email protected] arXiv:1509.08409v2 [q-bio.MN] 18 Apr 2016 2 Program ABSTRACT The study of network structure has uncovered signatures of the organization of complex systems. However, there is also a need to understand how to control them; for example, identifying strategies to revert a diseased cell to a healthy state, or a mature cell to a pluripotent state. Two recent methodologies suggest that the controllability of complex systems can be predicted solely from the graph of interactions between variables, without considering their dynamics: structural controllability and minimum dominating sets. We demonstrate that such structure-only methods fail to characterize controllability when dynamics are introduced. We study Boolean network ensembles of network motifs as well as three models of biochemical regulation: the segment polarity network in Drosophila melanogaster, the cell cycle of budding yeast Saccharomyces cerevisiae, and the floral organ arrangement in Arabidopsis thaliana. We demonstrate that structure-only methods both undershoot and overshoot the number and which sets of critical variables best control the dynamics of these models, highlighting the importance of the actual system dynamics in determining control. Our analysis further shows that the logic of automata transition functions, namely how canalizing they are, plays an important role in the extent to which structure predicts dynamics. Introduction Complex systems are typically understood as large nonlinear systems. Their organization and behavior can be modeled by representations such as graphs and collections of automata. Graphs are useful to capture the structure of interactions between variables: the static organization of complex systems. However, nodes representing variables in graphs lack intrinsic dynamics. The simplest way to study nonlinear dynamics is to allow network nodes to have discrete states and update them with automata; for instance, Boolean Networks (BNs) are canonical models of complex systems which exhibit a wide range of interesting behaviors.1 The study of network structure has uncovered several organizing principles of complex systems — such as scale-free networks and community structure — and how they constrain system behavior, without explicit dynamical rules for node variables.2 There is, however, a need to control complex systems, in addition to characterizing their organization. This is particularly true in systems biology and medicine, where increasingly accurate models of biochemical regulation have been produced.3–6 More than understanding the organization of biochemical regulation, we need to derive control strategies that allow us, for instance, to revert a mutant cell to a wild-type state,7 or a mature cell to a pluripotent state.8 While the identification of such control strategies occurs for a given model, not the real system, predictions from control theory can be used for model verification and thus also aid the separate question of the accuracy of that model in predicting the real system. Network structure has been reported to predict properties of dynamics, such as the synchronization of connected limit-cycle oscillators,9 or the likelihood of robust attractors.10 On the other hand, there are important system attributes which depend on dynamical characteristics of variables and their interactions; e.g. the critical transition between ordered and chaotic dynamics in BNs depends both on structural (mean connectivity) and dynamical properties of nodes (bias and canalization).11–14 Indeed, we already know that such dynamical properties strongly impact the stability, robustness, and controllability of existing models of gene regulation and biochemical signaling in a number of organisms.7, 15–18 Therefore, a question of central importance remains: How well does network structure predict the dynamics of the underlying complex system, especially from the viewpoint of control? Recently, two related methodologies were used to predict the controllability of complex networks based solely on network structure without consideration of the dynamical properties of variables: structural controllability (SC)19, 20 and minimum dominating set (MDS).21, 22 Both techniques reduce dynamical systems to graphs where edges denote an interaction between a pair of variables. Using only graph connectivity, the goal is to identify a minimal set of driver variables (a.k.a. driver nodes) which can fully control system dynamics.23 SC assumes that, in the absence of cycles, a variable can control at most one of its neighbors in the structural interaction graph.19, 20 The influence from an intervention on a node then propagates along a backbone of directed paths, where the number of necessary paths to cover the network dictates the minimum set of driver variables (see Supplemental Material, SM). Cycles are considered to be self-regulatory and do not require an external control signal. SC has become an influential method, having been used to suggest that biological systems are harder to control and have appreciably different control profiles than social or technological systems.24, 25 The methodology has also been used to identify key banks in interbank lending networks,26 and to relate circular network motifs to control in transcription regulatory networks.27 However, despite its successful characterization of observability (a dual notion to controllability) in several nonlinear dynamical systems,28 SC’s application to models of biological and social systems has been heavily critiqued due to its stringent assumptions.29–31 MDS starts from the different assumption that each node can influence all of its neighbors simultaneously, but this signal cannot propagate any further. Driver variables are then identified by the minimal set such that every variable is separated by at most one interaction.21, 22 It has been used to identify control variables in protein interaction networks32 and characterize how disease genes perturb the Human regulatory network.33 Because both MDS and SC use only the interaction graph of complex systems, unless otherwise specified, we use structural control to refer to both methods. Since these methods are increasingly used in a variety of scientific domains, it is important to study how much network structure predicts the controllability of realistic, nonlinear dynamical systems. Here, we explore this problem using ensembles of BNs. These canonical models of complex systems are defined by a network of interconnected automata (the structure), and exhibit a wide range of dynamical behaviors.1 They have been used to model biochemical regulation in organisms, where dynamical attractors represent cell types, disease and healthy states.6, 34 It is well known that when the set of system variables is large, enumeration of the state-spaces of BNs becomes difficult, making the control problem for general deterministic BNs computationally intractable (NP-hard).35 However, for small systems we can fully enumerate the state-space and compute the actual controllability (as measured by three proposed measures of controllability) for parameterized ensembles of BNs. Our analysis is not meant to introduce alternative techniques to uncover control variables in BNs, since methods based on system dynamics already exist.7, 8, 36–42 The goal is to quantify the discrepancy between control as uncovered by approximate methods that use structure alone, from how actual control unfolds in BNs. Additionally, we characterize critical variables for the control of three models of biochemical regulation: the single-cell segment polarity network in Drosophila melanogaster, the eukaryotic cell cycle of budding yeast Saccharomyces cerevisiae, and the floral organ arrangement in the flowering plant Arabidopsis thaliana. Our results demonstrate that network structure is not sufficient to characterize the controllability of complex systems; predictions based on structural control can both under- and over-estimate the number and set of necessary driver variables. Therefore, previous assertions about the controllability of biochemical systems reached from analyses based on structural control methods do not offer a realistic portrayal of control.24, 25 Quantifying Control in Boolean Networks Background Boolean Networks (BNs) are discrete dynamical systems X ≡ {xi } of N Boolean variables xi ∈ {0, 1}. Interactions between variables are represented as a directed adjacency graph, the structural network: G = (X, E), where edges e ji ∈ E denote that variable x j is an input to variable xi . Furthermore, Xi ≡ {x j ∈ X : e ji ∈ E} and |Xi | = ki denote the input set and the in-degree of variable xi , respectively. Here, variables are updated synchronously according to deterministic logical functions: fi : {0, 1}ki → {0, 1}, such that xt+1 = fi (Xit ⊆ X), where Xit denotes the state of the inputs to xi at time t ∈ N. i At time t, the network is in a configuration of states X t , which is a vector of all variable states xti at t. The set of all possible network configurations is denoted by X ≡ {0, 1}N , where |X | = 2N . The complete dynamical behavior of the system for all initial conditions is captured by the state-transition graph (STG): G = (X , T ), where each node is a configuration Xα ∈ X , and an edge Tα ,β ∈ T denotes that a system in configuration Xα at time t will be in configuration Xβ at time t + 1. Under deterministic dynamics, only a single transition edge Tα ,β is allowed out of every configuration node Xα . Because G is finite, it contains at least one attractor, as some configuration or cycle of configurations must repeat in time.43 An exemplar STG is shown in Figure 1 (top, left). Control Measures We study the control exerted on the dynamics of a BN by a subset of driver variables D ⊆ X. Here, control interventions are instantaneous bit-flip perturbations to the state of the variables in D.44 To capture all possible trajectories due to controlled interventions on D, we introduce the controlled state transition graph (CSTG): GD = (X , T ∪TD ). The CSTG is an extension of the STG, where a set of additional edges TD denotes transitions from every configuration to each of its possible 2|D| − 1 2/15 STG G 100 010 101 110 011 001 CSTG G{x 010 1} 100 101 110 011 001 Variable Logic x1 x2 x3 x1 x1 v x2 CAG C{x 1} 111 000 CSTG G{x 010 2} 111 011 111 000 CSTG G{x 3} 010 000 011 CAG C{x 2} 111 000 100 101 110 001 100 101 110 001 CAG C{x 3} 111 000 111 111 000 000 Figure 1. The state transition graph (STG) and the controlled variants (CSTG) for an exemplar Boolean Network using the Feed-Forward network structure (Figure 2A), with the logical transition functions given in the upper right. Configurations are shown as green nodes, attractors are highlighted green nodes, and transitions are illustrated as solid black arrows. The CSTG GD for the three singleton driver variable sets D ≡ {x1 }, {x2 }, {x3 } are shown with controlled transitions denoted by dashed, orange arrows. The controlled attractor graphs CAG CD are also depicted for the singleton driver variable sets with the attractors shown as purple highlighted nodes and dashed orange arrows denoting the existence of at least one perturbed transition between attractor basins (if any exist). perturbed counterparts. In Figure 1, three examples of CSTG are shown with interventions to only one of the three variables: D = {x1 }, {x2 }, {x3 }. From the point of view of control theory,19, 45 the dynamics of a network of variables X is controllable by interventions to a subset of driver variables D ⊂ X when every configuration is reachable from every other configuration in GD . A configuration Xβ is reachable from Xα if a directed path from Xα to Xβ exists.45 For BN this is equivalent to requiring that the CSTG GD be strongly connected. To measure how much control D can exert, we tally the fraction of configurations that are reachable by interventions to D. Given a configuration Xα , the fraction of reachable configurations r(GD , Xα ) is the number of other configurations Xβ lying on all directed paths from Xα , normalized by the total number of other configurations 2N−1 . The mean fraction of reachable configurations: RD = 1 2N ∑ r(GD , Xα ) (1) Xα ∈X measures the proportion of configurations which are on average reachable by controlling the set of driver variables D. When a network is fully controlled by D, RD = 1.0, but for partially controlled networks RD ∈ [0.0, 1.0). Notice that R0/ ≥ 0, because the STG G of a network (D ≡ 0) / naturally contains transitions between configurations. Therefore, it is useful to measure the control exerted by a set of driver variables D beyond the uncontrolled dynamics. To this end, we introduce the mean fraction of controlled configurations: CD = RD − R0/ (2) It measures the fraction of configurations which are on average reachable by controlling the driver variables D that were not already reachable via the natural dynamics. By definition, CD ≤ RD for any system and set of driver variables. In practice, only certain subsets of configurations are meaningful. These subsets are typically cast as either attractors for the system dynamics or specific trajectories through the state space. Consider the case of BNs as models of biochemical regulation; attractors represent different cell types,1, 29, 46 diseased or normal conditions,47 and wild-type or mutant phenotypes.7 In this context, the formal sense of controllability is well beyond what is necessary. What is most relevant for some systems is to uncover the driver variables which can steer dynamics from attractor to attractor; transient configurations are irrelevant. To measure this more realistic sense of control, we introduce the controlled attractor graph (CAG): CD = (A , BD ). In this graph, each node Aκ ∈ A represents an attractor. A basin edge bκγ ∈ BD , denotes the existence of at least one path from attractor Aκ to attractor Aγ . In Figure 1 (right-side), three examples of CAGs are shown. The mean fraction of reachable attractors is then given by AD = 1 r(CD , Aκ ) |A | Aκ∑ ∈A (3) where κ = 1 . . . |A |. It measures the fraction of attractors which are on average reachable by controlling the driver variables in D. A network which can be controlled from any of its attractors to any of its attractors must have AD = 1.0; when D ≡ 0, / 3/15 A B C x1 x2 x3 E x2 x3 F x2 x3 x1 x2 x1 x2 x3 x1 x2 G x1 x1 I D x1 x1 x2 x3 x2 x3 H x3 x1 x2 x3 J x2 x4 x1 x3 x4 x3 x4 Figure 2. Directed network structure motifs used in this study: A) Feed-Forward motif, B) Chain motif, C) Loop motif, D) Loop motif with self-interactions, E) Fan motif, F) Co-regulated motif, G) Co-regulating motif, H) BiParallel motif, I) BiFan motif, and J) Dominated Loop motif. all attractors reside in disconnected basins in the original STG so A0/ = 0.0. Naturally, if a network is fully controllable by D in the control theory sense (RD = 1.0), AD = 1.0. Control Portraits of Complex Systems Boolean Network Ensembles Given the structural network G = (X, E) for a BN, many different logical functions fi can be assigned to each Boolean variable xi (see Background). An ensemble of BNs is constructed by considering all possible logical functions constrained by the fixed structure G48, 49 (see SM). However, since non-contingent functions (e.g. tautology and contradiction) are not found in most biological models, we divide the full ensemble into contingent and non-contingent subsets as follows: those BNs which only contain contingent functions and those BNs which contain at least one non-contingent transition function (NC). Within the set of contingent functions, there are canalizing functions which depend only on a subset of their input variables.16, 50 These functions are ubiquitous in BN models of gene regulation and contribute mechanisms of functional redundancy and degeneracy.7, 18 The redundancy of some logical functions means that the effective structure of interactions is reduced:7, 14 some edges of the structural graph G play no role in determining the transitions between configurations. Since control methodologies based on network structure assume that all interactions (edges) in the structural network are relevant for system dynamics, we further subdivide the contingent subset into two disjoint subsets: BNs which contain fully canalizing functions and thus possess a reduced effective structure (RES), and those without canalizing functions retaining a full effective structure (FES). Naturally, the FES subset is the scenario most coherent with the idea of using structure to predict controllability, since all interactions in the underlying structural graph G are dynamically relevant. Network Motifs We first consider the entire ensemble of BNs with simple structural graphs known as network motifs.51 These prototype networks have been useful for exploring the relationship between structure and dynamics of complex networks.52, 53 The motifs considered in our analysis are depicted in Figure 2. Consider the Feed-Forward network motif of N = 3 variables54 shown in Figure 2A. In this case, the full ensemble consists of 64 distinct BNs of which 36 are NC, 8 have RES, and 20 have FES. Figure 1 depicts the logic of one FES network instance for this motif, along with its STG, CSTGs, and CAGs for various driver sets D. The control portrait of the full BN ensemble is shown in Figure 3; control measures RD and C D are shown for all possible driver sets of one or two variables. Using solely this motif’s interaction network, structural control (both the SC and MDS methods) predicts that variable x1 is capable of fully controlling the network. However, our analysis reveals that this driver variable can fully control only 8 networks from the ensemble (4 RES and 4 FES), while the other 56 BNs (with the same structure) are not fully controlled (Figure 3). It is noteworthy that even when considering the FES subset — the scenario most coherent with the idea of using structure to predict the controllability of the dynamics — only 4 out of 20 BNs are fully controlled by interventions on x1 . It is clear that even in the case of such a simple motif, structure does not predict the control of dynamics. An extended analysis of the controlled Feed-Forward BN ensemble is provided in the SM. 4/15 Mean Fraction of Reachable Conf gurations (R D ) F R 1.0 0.5 0.0 1.0 0.5 0.0 1.0 0.5 0.0 0.0 0.5 1.0 0.0 0.5 1.00.0 0.5 1.0 Mean Fraction of Controlled Conf gurations (C D ) Figure 3. Control portrait of the BN ensemble constrained by the Feed-Forward network motif. The mean fraction of reachable configurations RD and the mean fraction of controllable configurations C D for the full ensemble of 64 BNs with structure given by the Feed-Forward network motif shown in Figure 2A, as controlled by all driver variable sets of one or two variables. The full effective structure (FES) subset is highlighted by red circles, the reduced effective structure (RES) subset is shown in blue squares, and the non-contingent subset (NC) is shown by green diamonds; the area of the object corresponds to the number of networks at that point. Let us now consider the N = 3 variable loop motif with self-interactions (Figure 2D). The full ensemble of BNs constrained by this motif is much larger than the previous example (every variable has ki = 2 inputs); it consists of 4096 networks of which 1352 are NC, 1744 have RES, and 1000 have FES. Figure 4A shows the control portrait of this motif’s BN ensemble for a single (D ≡ {xi }) or pair (D ≡ {xi , x j }) of driver variables. The control portrait of the STG illustrates the difference between the two measures of controllability. While RD varies greatly, CD = 0 for all BNs. This means that in some BNs, many configurations can be reached simply because the transient dynamics move through many network configurations. Structural control methodologies ignore this natural propensity for control (self-organization). Thus we use the measure CD to tally only the proportion of transitions that result from control interventions. The control portraits in Figure 4 again demonstrate that structure fails to characterize network control. In this case, SC predicts that any single variable is sufficient for full controllability, while MDS requires any two variables to achieve the same. Yet controllability varies greatly for both cases, depending on the particular transition functions of each BN in the ensemble. For 77% of the BNs in the ensemble a single variable is not capable of fully controlling dynamics; even two-variable driver sets fail to control 44% of the BNs. Similar results hold for the mean fraction of reachable attractors (AD ) shown in Figure 4B (middle, right). For 36% of the BNs in the ensemble, a single variable is not capable of fully controlling the system between attractors; even two-variable driver sets fail to control 20% of the BNs, regardless of the dynamical subset. Discounting the 1868 networks (Figure 4B, left) with only one attractor (hence AD = 1) further emphasizes the variation in attractor control, increasing the above proportions to 65% and 36% for one and two driver variables, respectively. Therefore, even if we analyze controllability from the point of view of attractor control rather than the stringent criteria of full controllability, single- and two-variable driver sets fail to achieve controllability of all networks in this ensemble. The control portraits of the other network motifs analyzed are presented in the Supplemental Material. Their analysis supports the same conclusion: predictions made from structure-only methods are only true for a small number of possible BNs. In general, they fail to predict the actual controllability of all the BN dynamics that can occur for a given motif structure. 5/15 Models of biochemical regulation To better understand the interplay between structure and dynamics in the context of controlling complex systems, we study three BN models from systems biology which are considerably larger than the network motifs of the previous section. Drosophila melanogaster During the early ontogenesis of the fruit fly, the specification of adult cell types is controlled by a hierarchy of a few genes. The Albert and Othmer segment polarity network (SPN) is a BN model55 capable of predicting the steady-state patterns experimentally observed in wild-type and mutant embryonic development with significant accuracy. Here, we analyze the single-cell SPN consisting of 17 gene and protein variables (see SM). Previous analysis has shown that the SPN model is controlled by the upstream value of the Sloppy Pair Protein (SLP) and the extra-cellular signals of the Hedgehog and Wingless proteins from neighboring cells nhh/nHH and nWG.55 The control portrait of this model also demonstrates that these three variables (driver set S 0 in Figure 5) are capable of fully controlling the dynamics from any attractor to any other attractor. This is to be expected in segment polarity regulation since it is a highly orchestrated developmental process. The attractor control ability of individual nodes of the SPN in the inset of Figure 5 further highlights this behavior, only the 3 chemical species mentioned above have a high AD when controlled alone, while all internal variables have negligible influence. The SC analysis of the SPN’s structural graph identifies 4 subsets of |D| = 4 driver variables, indicated in Figure 5 by enlarged red circles and labeled S 1, S 2, S 3 and S 4 (details in SM). S 0 is a subset of these 4 variable subsets, so naturally they also achieve AD = 1, but they all include an additional variable which is redundant for this purpose. However, none of these subsets are sufficient for fully controlling the BN as predicted by SC, these driver sets can control dynamics only to a very small proportion of configurations; RD≡S 4 ≈ 0.071 is the maximum value attained. These 4 driver sets also show considerable variation in RD , demonstrating that predictions with equivalent support from the point of view of the SC theory, lead to distinct amounts of real controllability. Interestingly, there are 5 driver variable sets of size |D| = 4 that lead to greater controllability (with a maximum of RD ≈ CD ≈ 0.124) than predicted by SC. Thus, SC fails to even correctly predict the 4-variable driver sets with greatest controllability. The MDS analysis of the SPN model predicts that |D| = 7 variables are required to fully control the system dynamics and uncovers 8 equivalent driver variable sets of this size (see SM). Not surprisingly, all of the MDS driver variable sets achieve full attractor control (AD = 1) since they contain S 0; however, none can fully control the network dynamics achieving only a maximum RD ≈ 0.31. Thus, the driver sets predicted by both SC and MDS are not sufficient to control dynamics in the control theory sense, and predict more variables than necessary to achieve attractor control. Saccharomyces cerevisiae The eukaryotic cell cycle process of the budding yeast Saccharomyces cerevisiae reflects the cyclical gene expression activity that leads to cell division. Here, we use the 12 variable simplified Boolean model of the yeast Cell-Cycle Network (CCN) derived by Li et al.17 The SC analysis of the CCN interaction graph identifies only one driver variable (Y 0 = {CellSize}) to be sufficient for fully controlling the BN’s dynamics. Yet, as demonstrated in Figure 6A, it only achieves negligible configuration control (RY 0 ≈ 0.021) and very weak attractor control (AY 0 ≈ 0.19). Similarly, MDS analysis identifies 8 driver variable sets of size |D| = 4 (Y 1 to Y 8), none of which achieve full control. It is particularly interesting that the driver sets predicted by MDS lead to values of both AD and RD that are essentially random, demonstrating once again that predictions with equivalent support from the point of view of the structure-only theories lead to widely different amounts of real controllability. Our analysis finds 3 driver sets of |D| = 4 variables that achieve full attractor control (highlighted in yellow in Figure 6A and detailed in SM). Neither SC nor MDS predict those specific driver sets, which ultimately provide the most useful form of control in such systems. Unlike the SPN, there are no “chief controller” variables in this network, as most variables achieve a similar value of AD when controlled alone (see inset in Figure 6A). The CCN was designed such that there is a large attractor basin towards a wild-type attractor which is robust to perturbation.17, 44 However, our analysis illuminates the tradeoff between robustness and flexibility in relation to system controllability. While a large basin of attraction facilitates controlling the system towards the wild-type behavior (high wild-type robustness), it also reduces the ability to control the system to other smaller basins of attraction (mutant phenotypic behavior), reflecting a tradeoff between wild-type robustness and low flexibility for potential evolvability (a property that was not initially designed into the model to begin with). This tradeoff is further elaborated by the CAGs for all single-variable driver sets, shown in Figure 6B. Some variables have a propensity to control the system towards the wild-type attractor (green node) or allow the system to remain there (e.g. Cln3, Clb5, 6, Clb1, 2, Mcm1/SFF, Cdc20/14), while only a few can control the system out of this attractor (e.g. CellSize, SBF, Cln1, 2). See SM for more details. A third model of biochemical regulation in the floral organ arrangement in the flowering plant Arabidopsis thaliana was analyzed, leading to a similar failure to predict actual control (see SM for details). 6/15 Canalization and Controllability When fully canalizing functions are present in a BN, not all of the edges in the structural graph contribute to the collective dynamics; there exists a subgraph that fully captures the dynamically relevant interactions (an effective structural graph).7, 14 Moreover, most Boolean functions are partially canalizing7, 50 whereby in some input conditions a subset of inputs is redundant, but in other conditions it is not. This means that most edges in the underlying structural graph of a random BN are either entirely or partially redundant. Since structural controllability methods assume that every edge of the underlying structure fully contributes to the dynamics, it is reasonable to suspect that the larger the mismatch between the structural graph and the effective structural graph, the more the predictions from SC and MDS will fail. To study this hypothesis, we constructed several ensembles of BNs where there is a perfect match between the structural graph and the effective structure graph. First consider the ensemble of BNs with the structural graph of the CCN, but with transition functions chosen from the set of two non-canalizing functions that exist for each variable’s in-degree. This constitutes a Full Effective Connectivity (FEC) ensemble of BNs whose effective structure perfectly matches the original structural graph of the CCN — there is no canalization in the dynamics of these networks. Even though both SC and MDS fail to predict controllability correctly for a sample of 50 networks from the FEC ensemble, our analysis reveals that they are more easily controlled by smaller driver sets than the original CCN model. Specifically, RD and AD averaged over all driver variable sets is larger for every FEC sample than for the original CCN model (details in SM). Many networks in the FEC ensemble were fully controllable by 2 driver variables and all networks could be fully controlled by 3 driver variables—whereas the original CCN requires 4 variables for full attractor control. Interestingly, canalization can also be used to improve controllability if selected appropriately. To see how, we compare BN ensembles with no canalization whatsoever to those with only fully canalizing functions for each motif (see SM for details). This uncovers the cases where canalization actually improves BN controllability, even beyond the controllability attained by networks with no canalization. In all such cases, the resulting effective structure reduces the original structural graph to simpler linear chain motifs (Figure S36 in SM). This way, canalization of the individual variable transition functions is orchestrated to obtain pathways that channel the collective dynamics towards greater control (macro-level canalization7). Because these linear chain effective structures match the assumptions of structure-only methods more accurately, their predictions are correct in such cases. Thus, canalization can enhance the accuracy of structure-only control methodologies if transition functions are appropriately selected to reduce the effective structure to a linear chain. Naturally, when the size of the network increases from simple motifs to realistic networks, BNs with such precise effective structure become extremely rare in the ensembles. Discussion We studied the interplay between structure and dynamics in the control of complex systems using ensembles of BNs and existing models of biochemical regulation. The analysis of the BN ensembles constrained by network motifs demonstrates that structure-only methods fail to properly characterize control; there is a large variation of possible dynamics that can occur for even the simplest network. The situation only gets worse for structure-only methods when we scale up to real models of biochemical regulation. Our analysis demonstrates that structural control predictions can both underestimate or overestimate the number of driver variables in these systems. These approaches also fail to predict which sets of variables best control dynamics as evaluated by: how much of the total configuration space is accessible (RD ), how much of the configuration space is accessible beyond the natural system dynamics (CD ), and the ability to transition between attractors (AD ). Often, arguments made about how easy it is to control network types (e.g. biological vs. social24 ) hinge on how many driver variables are predicted by structural control theories. Yet, our analysis reveals that much variation in real control occurs for the same structure and number of driver variables. Our approach also lays the groundwork for understanding which restrictions must be enforced on the transition functions of BNs such that structure may suffice for predicting controllability or at least improve the accuracy of structure-only methods in predicting control. In our experiments with ensembles of network motifs, canalizing transition functions generally rendered structure-only methods less effective at predicting the control of dynamics. Given the generality of motifs as network building blocks, this suggests our results will generalize to larger systems, as already observed in the three larger gene-regulation models considered here. On the other hand, we showed that it is possible to orchestrate canalization such that the effective structure matches the assumptions of structure-only methods, leading to more accurate predictions about control. This effect was identifiable in small networks, where it is easy to find the necessary effective structures, however, such structures are rare in the space of all possible dynamics for larger networks. Nonetheless, in principle, evolution or human design could select for such networks. Crucially, without more information about variable dynamics, we certainly cannot assume that a given multi-variate dynamical system meets the assumptions of structure-only methods. For instance, the CCN model uses canalization to make controllability harder than predicted by structure-only methods, while the SPN model uses canalization to control dynamics to 7/15 the wild-type attractor more easily than suggested by the same methods. All this suggests that canalization plays an important, nontrivial role in determining structure-dynamic relationships. Further research can explore this interplay in greater detail. But our current analysis suggests that, without more information about variable dynamics, structure-only methods cannot be accepted as even an approximation of how control occurs in complex systems. The control measures we introduced here for BNs provide a complementary viewpoint to those developed to study system robustness.44, 56 Both concepts are based on the response of the system to perturbations. However, robustness focuses on the quantity of perturbations to which the system’s dynamics is invariant, whereas control tracks the perturbations which alter the system’s dynamics. Future research will also explore other characteristics of the controlled state transition graph and controlled attractor graph so that the relationship between robustness and control can be better studied. Boolean Networks are ideal, parsimonious systems for our study since they are defined by both a clear interaction structure and rich nonlinear dynamics using only binary variables. However, our conclusions are not necessarily limited to this type of network. The control measures used in our study are formulated with respect to a state transition graph, and are therefore applicable to any discrete, deterministic dynamical system. Our conclusions are thus likely to extend to other classes of complex systems. Indeed, several recent papers have also questioned the validity of structure-only arguments for control of other nonlinear systems.42 These arguments are grounded in the treatment of finite time constants and self-interactions,30 the numerical limitations of nonlocal controlled trajectories,31 or the role of symmetry in the non-linear dynamics.57 Understanding the discrepancy between network structure and control is also important for specific applications where methods which construct a specific controller (i.e. an algorithm that identifies a specific sequence of controlled interventions given a set of constraints) are desired. Structure-only predictions do not aim to predict controllers, rather they focus on the mere identification of driver variables. The identification of controllers is the subject of much research in systems biology and complex systems; in this case, a greater disparity between structure-only predictions and actual control is expected.42 Ultimately, methodologies that can help us predict control in complex networks while avoiding computational complexity should be developed, but they must combine characteristics of both the structural and dynamical properties of the system. Promising methods are already being developed which include both structure and dynamics, such as monotone control systems,58 master stability functions,59 schema redescription,7 and stabilization subgraphs.60 Understanding how such simplifications scale-up while providing a reasonable account of how control operates is very important, especially in real-world systems. This can be accomplished via the type of study we undertook here to analyze the effectiveness of structure-only methods in predicting the controllability of complex systems. References 1. Kauffman, S. A. The Origins of Order: self-organization and selection in evolution (Oxford University Press, New York, 1993). 2. Newman, M. The structure and function of complex networks. SIAM Rev. 167–256 (2003). 3. Huang, S. Gene expression profiling, genetic networks, and cellular states: an integrating concept for tumorigenesis and drug discovery. J. Mol. Med. 77, 469–480 (1999). 4. Barabási, A.-L. & Oltvai, Z. N. Network biology: understanding the cell’s functional organization. Nat. Rev. Genet. 5, 101–113 (2004). 5. Zhu, X., Gerstein, M. & Snyder, M. Getting connected: analysis and principles of biological networks. Genes Dev. 21, 1010–1024 (2007). 6. Assmann, S. M. & Albert, R. Discrete dynamic modeling with asynchronous update, or how to model complex systems in the absence of quantitative information. In Belostotsky, D. A. (ed.) Plant Systems Biology, vol. 553 of Methods in Molecular Biology, 207–225 (Humana Press, 2009). 7. Marques-Pita, M. & Rocha, L. M. Canalization and control in automata networks: body segmentation in Drosophila melanogaster. PloS One 8, e55946 (2013). 8. Wang, R.-S. & Albert, R. Elementary signaling modes predict the essentiality of signal transduction network components. BMC systems biology 5 (2011). 9. Strogatz, S. H. Exploring complex networks. Nature 410, 268–276 (2001). 10. Klemm, K. & Bornholdt, S. Topology of biological networks and reliability of information processing. Proc. Natl. Acad. Sci. USA 102, 18414–18419 (2005). 11. Shmulevich, I., Kauffman, S. A. & Aldana, M. Eukaryotic cells are dynamically ordered or critical but not chaotic. Proc. Natl. Acad. Sci. USA 102, 13439–13444 (2005). 8/15 12. Nykter, M. et al. Gene expression dynamics in the macrophage exhibit criticality. Proc. Natl. Acad. Sci. USA 105, 1897–1900 (2008). 13. Hossein, S., Reichl, M. D. & Bassler, K. E. Symmetry in critical random boolean network dynamics. Phys. Rev. E 89, 042808 (2014). 14. Marques-Pita, M., Manicka, S., Teuscher, C. & Rocha, L. M. Effective Connectivity as an Order Parameter in Random Boolean Networks Submitted (2018). 15. Shmulevich, I., Lähdesmäki, H., Dougherty, E. R., Astola, J. & Zhang, W. The role of certain Post classes in Boolean network models of genetic networks. Proc. Natl. Acad. Sci. USA 100, 10734–10739 (2003). 16. Kauffman, S., Peterson, C., Samuelsson, B. & Troein, C. Genetic networks with canalyzing Boolean rules are always stable. Proc. Natl. Acad. Sci. USA 101, 17102–17107 (2004). 17. Li, F., Long, T., Lu, Y., Ouyang, Q. & Tang, C. The yeast cell-cycle network is robustly designed. Proc. Natl. Acad. Sci. USA 101, 4781–4786 (2004). 18. Gershenson, C., Kauffman, S. A. & Shmulevich, I. The role of redundancy in the robustness of random boolean networks. In Artificial Life X (MIT Press, 2006). 19. Lin, C. Structural controllability. IEEE Trans. Automat. Contr. 19, 201–208 (1974). 20. Liu, Y.-Y., Slotine, J.-J. & Barabási, A.-L. Controllability of complex networks. Nature 473, 167–173 (2011). 21. Nacher, J. C. & Akutsu, T. Dominating scale-free networks with variable scaling exponent: heterogeneous networks are not difficult to control. New J. Phys. 14, 073005 (2012). 22. Nacher, J. C. & Akutsu, T. Structural controllability of unidirectional bipartite networks. Scientific Reports 3 (2013). 23. Valente, T. Network Interventions. Science 337, 49–53 (2012). 24. Egerstedt, M. Complex networks: Degrees of control. Nature 473, 158–159 (2011). 25. Ruths, J. & Ruths, D. Control profiles of complex networks. Science 343, 1373–1376 (2014). 26. Delpini, D. et al. Evolution of controllability in interbank networks. Scientific Reports 3 (2013). 27. Österlund, T., Bordel, S. & Nielsen, J. Controllability analysis of transcriptional regulatory networks reveals circular control patterns among transcription factors. Integrative Biology 7, 560–568 (2015). 28. Liu, Y.-Y., Slotine, J.-J. & Barabási, A.-L. Observability of complex systems. Proc. Natl. Acad. Sci. USA 110, 2460–2465 (2013). 29. Müller, F.-J. & Schuppert, A. Few inputs can reprogram biological networks. Nature 478, E4–E5 (2011). 30. Cowan, N. J., Chastain, E. J., Vilhena, D. A., Freudenberg, J. S. & Bergstrom, C. T. Nodal Dynamics, Not Degree Distributions, Determine the Structural Controllability of Complex Networks. PloS One 7, e38398 (2012). 31. Sun, J. & Motter, A. E. Controllability Transition and Nonlocality in Network Control. Phys. Rev. Lett. 110, 208701 (2013). 32. Wuchty, S. Controllability in protein interaction networks. Proc. Natl. Acad. Sci. USA U.S.A. 111, 7156–7160 (2014). 33. Wang, B. et al. Diversified control paths: A significant way disease genes perturb the human regulatory network. PLoS One 10 (2015). 34. Bornholdt, S. Boolean network models of cellular regulation: prospects and limitations. J. R. Soc. Interface 5, S85–S94 (2008). 35. Akutsu, T., Hayashida, M., Ching, W.-K. & Ng, M. K. Control of Boolean networks: hardness results and algorithms for tree structured networks. J. Theor. Biol. 244, 670–679 (2007). 36. Langmead, C. J. & Jha, S. K. Symbolic approaches for finding control strategies in boolean networks. J. Bioinform. Comput. Biol. 7, 323–338 (2009). 37. Cheng, D. & Qi, H. Controllability and observability of Boolean control networks. Automatica 45, 1659–1667 (2009). 38. Srihari, S., Raman, V., Leong, H. W. & Ragan, M. A. Evolution and Controllability of Cancer Networks: A Boolean Perspective. IEEE Trans. Control Netw. Syst. 11, 83–94 (2013). 39. Jia, T. & Barabási, A.-L. Control Capacity and A Random Sampling Method in Exploring Controllability of Complex Networks. Scientific Reports 3 (2013). 9/15 40. Li, R., Yang, M. & Chu, T. Controllability and observability of boolean networks arising from biology. Chaos 25, 023104 (2015). 41. Lu, W., Tamura, T., Song, J. & Akutsu, T. Computing smallest intervention strategies for multiple metabolic networks in a boolean model. J. Comp. Biol. 22, 85–110 (2015). 42. Motter, A. E. Networkcontrology. Chaos 25, 097621 (2015). 43. Wuensche, A. Discrete dynamical networks and their attractor basins. In Standish, R. et al. (eds.) Complex Systems’98 (University of New South Wales, Sydney, Australia, 1998). 44. Willadsen, K. & Wiles, J. Robustness and state-space structure of Boolean gene regulatory models. J. Theor. Biol. 249, 749–765 (2007). 45. Sontag, E. D. Mathematical control theory: deterministic finite dimensional systems. Springer, New York (1998). 46. Kauffman, S. A. Metabolic stability and epigenesis in randomly constructed genetic nets. J. Theor. Biol. 22, 437–467 (1969). 47. Zhang, R. et al. Network model of survival signaling in large granular lymphocyte leukemia. Proc. Natl. Acad. Sci. USA 105, 16308–16313 (2008). 48. Kauffman, S. A., Peterson, C., Samuelsson, B. & Troein, C. Random Boolean network models and the yeast transcriptional network. Proc. Natl. Acad. Sci. USA 100, 14796–14799 (2003). 49. Ciliberti, S., Martin, O. C. & Wagner, A. Innovation and robustness in complex regulatory gene networks. Proc. Natl. Acad. Sci. USA 104, 13591–13596 (2007). 50. Reichhardt, C. J. O. & Bassler, K. Canalization and symmetry in boolean models for genetic regulatory networks. Physica A 40, 4339–4350 (2007). 51. Shen-Orr, S. S., Milo, R., Mangan, S. & Alon, U. Network motifs in the transcriptional regulation network of Escherichia coli. Nature Genetics 31, 64–68 (2002). 52. Ingram, P. J., Stumpf, M. P. & Stark, J. Network motifs: structure does not determine function. BMC Genomics 7, 108 (2006). 53. Prill, R. J., Iglesias, P. A. & Levchenko, A. Dynamic Properties of Network Motifs Contribute to Biological Network Organization. PLoS Biology 3, e343 (2005). 54. Mangan, S. & Alon, U. Structure and function of the feed-forward loop network motif. Proc. Natl. Acad. Sci. USA 100, 11980–11985 (2003). 55. Albert, R. & Othmer, H. G. The topology of the regulatory interactions predicts the expression pattern of the segment polarity genes in Drosophila melanogaster. J. Theor. Biol. 223, 1–18 (2003). 56. Chaves, M., Sontag, E. D. & Albert, R. Methods of robustness analysis for boolean models of gene control networks. IEE P. SYST. BIOL. 153, 154–167 (2006). 57. Whalen, A. J., Brennan, S. N., Sauer, T. D. & Schiff, S. J. Observability and controllability of nonlinear networks: The role of symmetry. Phys. Rev. X 5, 011005 (2015). 58. Angeli, D. & Sontag, E. D. Monotone control systems. IEEE Trans. Automat. Contr. 48, 1684–1698 (2003). 59. Gutiérrez, R., Sendiña-Nadal, I., Zanin, M., Papo, D. & Boccaletti, S. Targeting the dynamics of complex networks. Scientific Reports 2 (2012). 60. Zañudo, J. G. & Albert, R. Cell fate reprogramming by control of intracellular network dynamics. PLoS Comput. Biol. 11, e1004193 (2015). Acknowledgements We thank Randall Beer, Artemy Kolchinsky, Santosh Manicka, Eran Agmon, Ian Wood, and three anonymous reviewers for helpful conversations and feedback. This work was partially supported by a grant from the National Institutes of Health, National Library of Medicine Program, grant 01LM011945-01 ”BLR: Evidence-based Drug-Interaction Discovery: In-Vivo, In-Vitro and Clinical,” a fellowship from the NSF IGERT ”The Dynamics of Brain-Body-Enivronment Systems in Behavior and Cognition”, a grant from the Fundacao para a Ciencia e a Tecnologia (Portugal), PTDC/EIA-CCO/114108/2009 ?Collective Computation and Control in Complex Biochemical Systems?, as well as a grant from the joint program between the Fundacao Luso-Americana para o Desenvolvimento (Portugal) and the National Science Foundation (USA), 2012-2014, ”Network Mining For Gene Regulation And Biochemical Signaling.” The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. The source code is available upon request. 10/15 Author contributions statement A.G. and L.R. designed the study, analyzed the results, and wrote the manuscript. Additional information The authors declare no competing financial interests. 11/15 A STG 0.5 0.0 1.0 D = { xi } 0.5 0.0 1.0 D = { xi , xj } Mean Fraction of Reachable Conf gurations (R D ) 1.0 0.5 0.0 0.0 0.5 1.0 0.0 0.5 1.0 0.0 0.5 Mean Fraction of Controlled Conf gurations (C D ) 1 2 5 6 3 1.0 4 8 Figure 4. Control portrait of the BN ensemble constrained by the Loop network motif with self-interactions. A) The mean fraction of reachable configurations RD and the mean fraction of controllable configurations CD for the full ensemble of 4096 BNs with structure given by the Loop network motif with self-interactions shown in Figure 1D, as controlled by the driver variable sets D ≡ 0/ (STG), D ≡ {xi }, and D ≡ {xi , x j } (due to the symmetry of the network, all sets of size one are equivalent, likewise those of size two). The full effective structure (FES) subset is shown by red circles, the reduced effective structure (RES) subset is shown in blue squares, and the non-contingent (NC) subset is shown by green diamonds; the area of the object corresponds to the number of networks at that point. B) (left) The number of attractors for each network in the full ensemble spans from 1 − 8, the area of each pie chart scales logarithmically with the number of attractors, from 1868 to 1; the colored slices delineate the subset decompositions for NC, RES, and FES. (middle and right) Box plots for the distribution of the mean fraction of reachable attractors AD for D ≡ {xi }, {xi , x j } for the full ensemble (purple), NC, RES, and FES subsets. In each case, the box shows the interquartile range, the median is given by the solid vertical line, the mean is given by the black circle, and the whiskers show the support of the distribution. 13/15 1.0 0.75 0.5 0.25 0.0 0.06 0.0 SLP wg WG en EN hh HH ptc PTC PH SMO ci CI CIA CIR nhh/nHH nwg/nWG Mean Fraction of Reachable Attractors (A D ) 0.12 |D | = 1 |D | = 2 1.0 0.75 0.5 0.25 0.0 0.0 0.03 0.06 0.09 0.12 0.0 0.03 0.06 0.09 0.12 Mean Fraction of Reachable Conf gurations (R D ) Figure 5. Control of the single-cell segment polarity network (SPN) of gene and protein regulation in Drosophila melanogaster for all driver variable subsets of size |D| = 1, |D| = 2, |D| = 3, and |D| = 4. (inset) The mean fraction of reachable attractors AD for each singleton driver variable set. The driver subsets predicted by structural controllability (SC) to fully control the network are highlighted in red and labeled S 1, S 2, S 3, S 4. The three variable driver subset with full attractor control is highlighted in yellow and labeled S 0 (see SM for further details). 14/15 Mean Fraction of Reachable Attractors (A D ) A 1.0 0.75 0.5 0.25 |D | = 2 0.0 1.0 0.75 0.5 0.25 |D | = 3 0.0 0.0 0.25 0.5 0.75 1.0 0.0 0.25 0.5 0.75 1.0 Mean Fraction of Reachable Conf gurations (R D ) B CellSize Cln3 SBF MBF Cln1,2 Sic1 Clb5,6 Cdh1 Clb1,2 Mcm1/SFF Cdc20/14 Swi5 Figure 6. A) Control of the eukaryotic cell cycle of budding yeast Saccharomyces cerevisiae (CCN) for all driver variable subsets of size |D| = 1, |D| = 2, |D| = 3, and |D| = 4. (inset) The mean fraction of reachable attractors AD for each singleton driver variable set. The subset predicted to fully control the network are highlighted in red and labeled Y 0 for structural controllability (SC), while those predicted by minimum dominating sets (MDS) are labeled Y 1 − 8. The driver variable subsets with full attractor control are highlighted in yellow (see SM for further details). B) Controlled Attractor Graphs (CAGs) for each singleton driver variable set. The wild-type attractor is highlighted in green, all other attractors are in purple. 15/15
3cs.SY
arXiv:1611.06569v1 [math.GR] 20 Nov 2016 On finite P σT -groups Alexander N. Skiba Department of Mathematics, Francisk Skorina Gomel State University, Gomel 246019, Belarus E-mail: [email protected] Abstract Let σ = {σi |i ∈ I} be some partition of the set of all primes P and G a finite group. G is said to be σ-soluble if every chief factor H/K of G is a σi -group for some i = i(H/K). A set H of subgroups of G is said to be a complete Hall σ-set of G if every member 6= 1 of H is a Hall σi -subgroup of G for some σi ∈ σ and H contains exact one Hall σi -subgroup of G for every i ∈ I such that σi ∩ π(G) 6= ∅. A subgroup A of G is said to be σ-permutable or σ-quasinormal in G if G has a complete Hall σ-set H such that AH x = H x A for all x ∈ G and all H ∈ H. We obtain a characterization of finite σ-soluble groups G in which σ-quasinormality is a transitive relation in G. 1 Introduction Throughout this paper, all groups are finite and G always denotes a finite group. Moreover, P is the set of all primes, π ⊆ P and π ′ = P \ π. If n is an integer, the symbol π(n) denotes the set of all primes dividing n; as usual, π(G) = π(|G|), the set of all primes dividing the order of G. G is said to be a Dπ -group if G possesses a Hall π-subgroup E and every π-subgroup of G is contained in some conjugate of E. In what follows, σ is some partition of P, that is, σ = {σi |i ∈ I}, where P = ∪i∈I σi and σi ∩σj = ∅ for all i 6= j; Π is always supposed to be a subset of the set σ and Π′ = σ \ Π. By the analogy with the notation π(n), we write σ(n) to denote the set {σi |σi ∩ π(n) 6= ∅}; σ(G) = σ(|G|). G is said to be: σ-primary [1] if |σ(G)| ≤ 1; σ-decomposable (Shemetkov [2]) or σ-nilpotent (Guo and Skiba [3]) if G = G1 ×· · ·×Gn for some σ-primary groups G1 , . . . , Gn ; σ-soluble [1] if every chief factor of G is σ-primary; a σ-full group of Sylow type [1] if every subgroup E of G is a Dσi -group for every σi ∈ σ(E). A natural number n is said to be a Π-number if σ(n) ⊆ Π. A subgroup A of G is said to be: a Hall Π-subgroup of G [1, 4] if |A| is a Π-number and |G : A| is a Π′ -number; a σ-Hall subgroup of G if A is a Hall Π-subgroup of G for some Π ⊆ σ. 0 0 Keywords: finite group, σ-quasinormal subgroup, P σT -group, σ-soluble group, σ-nilpotent group. Mathematics Subject Classification (2010): 20D10, 20D15, 20D30 1 A set H of subgroups of G is a complete Hall σ-set of G [4, 5] if every member 6= 1 of H is a Hall σi -subgroup of G for some σi ∈ σ and H contains exact one Hall σi -subgroup of G for every σi ∈ σ(G). Recall that a subgroup A of G is said to be: σ-permutable or σ-quasinormal in G [1] if G possesses a complete Hall σ-set H such that AH x = H x A for all H ∈ H and all x ∈ G; σ-subnormal in G [1] if there is a subgroup chain A = A0 ≤ A1 ≤ · · · ≤ At = G such that either Ai−1 E Ai or Ai /(Ai−1 )Ai is σ-primary for all i = 1, . . . , t. In the classical case, when σ = σ 0 = {{2}, {3}, . . .}, σ-quasinormal subgroups are also called S-quasinormal or S-permutable [6, 7], and a subgroup A of G is subnormal in G if and only if it is σ 0 -subnormal in G. We say that G is a P σT -group [1] if σ-quasinormality is a transitive relation in G, that is, if K is a σ-quasinormal subgroup of H and H is a σ-quasinormal subgroup of G, then K is a σ-quasinormal subgroup of G. In the case, when σ = {{2}, {3}, . . .}, P σT -groups are called P ST -groups [6]. In view of Theorem B in [1], P σT -groups can be characterized as the groups in which every σ-subnormal subgroup is σ-quasinormal in G. Our first observation is the following fact, which generalizes the sufficiency condition in Theorem A of the paper [1]. Theorem A. Let G have a normal σ-Hall subgroup D such that: (i) G/D is a P σT -group, and (ii) every σ-subnormal subgroup of D is normal in G. If G is a σ-full group of Sylow type, then G is a P σT -group. Corollary 1.1 (See Theorem A in [1]). Let G have a normal σ-Hall subgroup D such that: (i) G/D is σ-nilpotent, and (ii) every subgroup of D is normal in G. Then G is a P σT -group. In the case when σ = {{2}, {3}, . . .}, we get from Theorem A the following Corollary 1.2 (See Theorem 2.4 in [8]). Let G have a normal Hall subgroup D such that: (i) G/D is a P ST -group, and (ii) every subnormal subgroup of D is normal in G. Then G is a P ST -group. Recall that GNσ denotes the σ-nilpotent residual of G, that is, the intersection of all normal subgroups N of G with σ-nilpotent quotient G/N ; GN denotes the nilpotent residual of G [9]. 2 Definition 1.3. We say that G is a special P σT -group provided the σ-nilpotent residual D = GNσ of G is contained in a Hall σi -subgroup E of G for some i and the following conditions hold: (i) D is a Hall subgroup of G and every element of G induces a power automorphism in D; (ii) D has a normal complement S in E. Note that if G = C5 × (C3 ⋊ C2 ), where C3 ⋊ C2 ≃ S3 and σ = {{3, 5}, {3, 5}′ }, then G is a special P σT -group with C3 = GNσ . The following theorem shows that every special P σT -group is a P σT -group. Theorem B. Suppose that G has a σ-nilpotent normal Hall subgroup D with σ-nilpotent quotient G/D such that G/O σi (D) is a special P σT -group for each σi ∈ σ(D). Then G is a P σT -group. Generalizing the concept of complete Wielandt σ-set of a group in [3], we say that a complete Hall σ-set H of G is a generalized Wielandt σ-set of G if every member H of H is π(GNσ )-supersoluble. Using Theorem B, we prove also the following revised version of Theorem A in [1]. Theorem C. Let G be σ-soluble and D = GNσ . Suppose that G has a generalized Wielandt σ-set. Then G is a P σT -group if and only if the following conditions hold: (i) D is an abelian Hall subgroup of G of odd order and every element of G induces a power automorphism in D; (ii) G/O σi (D) is a special P σT -group for each σi ∈ σ(D). Corollary 1.4 (See Theorem 2.3 in [8]). Let G be a soluble and D = GN . If G is a P ST -group, then D is an abelian Hall subgroup of G of odd order and every element of G induces a power automorphism in D. 2 Some preliminary results In view of Theorems A and B in [4], the following fact is true. Lemma 2.1. If G is σ-soluble, then G is a σ-full group of Sylow type. We use Nσ to denote the class of all σ-nilpotent groups. Lemma 2.2 (See Corollary 2.4 and Lemma 2.5 in [1]). The class Nσ is closed under taking products of normal subgroups, homomorphic images and subgroups. Moreover, if E is a normal subgroup of G and E/E ∩ Φ(G) is σ-nilpotent, then E is σ-nilpotent. In view of Proposition 2.2.8 in [9], we get from Lemma 2.2 the following Lemma 2.3. If N is a normal subgroup of G, then (G/N )Nσ = GNσ N/N. 3 Lemma 2.4 (See Knyagina and Monakhov [10]). Let H, K and N be pairwise permutable subgroups of G and H be a Hall subgroup of G. Then N ∩ HK = (N ∩ H)(N ∩ K). Lemma 2.5. The following statements hold: (i) G is a P σT -group if and only if every σ-subnormal subgroup of G is σ-quasinormal in G. (ii) If G is a P σT -group, then every quotient G/N of G is also a P σT -group. (iii) If G is a special P σT -group, then every quotient G/N of G is also a special P σT -group. Proof. (i) This follows from the fact (see Theorem B in [1]) that every σ-quasinormal subgroup of G is σ-subnormal in G. (ii) Let H/N be a σ-subnormal subgroup of G/N . Then H is a σ-subnormal subgroup of G by Lemma 2.6(5) in [1], so H is σ-quasinormal in G by hypothesis and Part (i). Hence H/N is σ-quasinormal in G/N by Lemma 2.8(2) in [1]. Hence G/N is a P σT -group by Part (i). (iii) Suppose that D = GNσ is a Hall subgroup of G and D ≤ E, where E = D × S is a Hall σi -subgroup E of G, and every element of G induces a power automorphism in D. Then EN/N is a Hall σi -subgroup of G/N and DN/N = (G/N )Nσ is a Hall subgroup of G/N by Lemma 2.3. Moreover, EN/N = (DN/N )(SN/N ) and, by Lemma 2.4, DN ∩ SN = N (D ∩ SN ) = N (D ∩ S)(D ∩ N ) = N (D ∩ N ) = N, which implies that (DN/N ) ∩ (SN/N ) = 1. Hence EN/N = (DN/N ) × (SN/N ). Finally, let H/N ≤ DN/N . Then H = N (H ∩D), where H ∩D is normal in G by hypothesis. But then H/N = N (H ∩D)/N is normal in G/N , so every element of G/N induces a power automorphism on DN/D. Hence G/N is a special P σT -group. The lemma is proved. 3 Proofs of the results Proof of Theorem A. Since G is a σ-full group of Sylow type by hypothesis, it possesses a complete Hall σ-set H = {H1 , . . . , Ht }, and a subgroup H of G is σ-quasinormal in G if and only if HHix = Hix H for all Hi ∈ H and x ∈ G. We can assume without loss of generality that Hi is a σi -group for all i = 1, . . . , t. Assume that this theorem is false and let G be a counterexample of minimal order. Then D 6= 1 and for some σ-subnormal subgroup H of G and for some x ∈ G and k ∈ I we have HHkx 6= Hkx H by Lemma 2.5(i). Let E = Hkx . 4 (1) The hypothesis holds for every quotient G/N of G. It is clear that G/N is a σ-full group of Sylow type and DN/N is a normal σ-Hall subgroup of G/N . On the other hand, (G/N )/(DN/N ) ≃ G/DN ≃ (G/D)/(DN/D), so (G/N )/(DN/N ) is a P σT -group by Lemma 2.5(ii). Finally, let H/N be a σ-subnormal subgroup of DN/N . Then H = N (H ∩ D) and, by Lemma 2.6(5) in [1], H is σ-subnormal in G. Hence H ∩ D is σ-subnormal in D by Lemma 2.6(1) in [1], so H ∩ D is normal in G by hypothesis. Thus H/N = N (H ∩ D)/N is normal in G/N . Therefore the hypothesis holds on G/N . (2) HG = 1. Assume that HG 6= 1. Clearly, H/HG is σ-subnormal in G/HG . Claim (1) implies that the hypothesis holds for G/HG , so the choice of G implies that G/HG is a P σT -group. Hence (H/HG )(EHG /HG ) = (EHG /HG )(H/HG ). by Lemma 2.5(i). Therefore EH = EHHG is a subgroup of G and so HE = EH, a contradiction. Hence HG = 1. (3) DH = D × H. By Lemma 2.6(1) in [1], H ∩ D is σ-subnormal in D. Hence H ∩ D is normal in G by hypothesis, which implies that H ∩ D = 1 by Claim (2). Lemma 2.6(1) in [1] implies also that H is σ-subnormal in DH. But H is a σ-Hall subgroup of DH since D is a σ-Hall subgroup of G and H ∩ D = 1. Therefore H is normal in DH by Lemma 2.6(10) in [1], so DH = D × H. Final contradiction. Since D is a σ-Hall subgroup of G, then either E ≤ D or E ∩ D = 1. But the former case is impossible by Claim (3) since HE 6= EH, so E ∩ D = 1. Therefore E is a Π′ -subgroup of G, where Π = σ(D). By the Schur-Zassenhaus theorem, D has a complement M in G. Then M is a Hall Π′ -subgroup of G and so for some x ∈ G we have E ≤ M x since G is a σ-full group of Sylow type. On the other hand, H ∩ M x is a Hall Π′ -subgroup of H by Lemma 2.6(7) in [1] and hence H ∩ M x = H ≤ M x since H ∩ D = 1 by Claim (3). Lemma 2.6(1) in [1] implies that H is σ-subnormal in M x . But M x ≃ G/D is a P σT -group by hypothesis, so HE = EH by Lemma 2.5(i). This contradiction completes the proof of the theorem. Lemma 3.1. If G is a special P σT -group, then it is a P σT -group. Proof. Let D = GNσ and E be a normal Hall σi -subgroup of G such that E = D × S. Since G/D is σ-nilpotent, G is σ-soluble. Hence G is a σ-full group of Sylow type by Lemma 2.1. Therefore G possesses a complete Hall σ-set H = {H1 , . . . , Ht }, and a subgroup H of G is σ-quasinormal in G if and only if HHjx = Hjx H for all Hj ∈ H and x ∈ G. We can assume without loss of generality that Hj is a σj -group for all j = 1, . . . , t. Assume that this lemma is false and let G be a counterexample of minimal order. Then G is not σ-nilpotent, and for some σ-subnormal subgroup H of G and for some x ∈ G and k ∈ I we 5 have HHkx 6= Hkx H by Lemma 2.5(i). Let E = Hkx . The subgroup S is normal in G since it is characteristic in E. Since G is not σ-nilpotent, D 6= 1. On the other hand, Theorem A and the choice of G imply that S 6= 1 since every subgroup of D is normal in G by hypothesis. Let R and N be minimal normal subgroups of G such that R ≤ D and N ≤ S. Then R is a group of order p for some prime p. Hence R ∩ HN ≤ Op (HN ) ≤ P , where P is a Sylow p-subgroup of H since π(D) ∩ π(S) = ∅, so R ∩ HN = R ∩ H. The hypothesis holds for G/R and G/N by Lemma 2.5(iii). Hence the choice of G and Lemma 2.5(i) imply that EHR/R = (ER/R)(HR/R) = (HR/R)(EHR/R) and so EHR is a subgroup of G. Similarly we get that EHN is a subgroup of G. Since |R| = p and EH is not a subgroup of G, R ∩ E = 1. Therefore from Lemma 2.4 we get that that R ∩ EHN = R ∩ E(HN ) = (R ∩ E)(R ∩ HN ) = R ∩ HN . Hence EHR ∩ EHN = E(HR ∩ EHN ) = EH(R ∩ EHN ) = EH(R ∩ HN ) = = EH(R ∩ HN ) = EH(R ∩ H) = EH is a subgroup of G. Hence HE = EH, a contradiction. The lemma is proved. Lemma 3.2. If H = {H1 , . . . , Ht } is a generalized Wielandt σ-set of G, then H0 = {H1 N/N, . . . , Ht N/N } is a generalized Wielandt σ-set of G/N . Proof. It is clear that H0 is a complete Hall σ-set of G/N . Now let D = GNσ and π = π(GNσ ). Then (G/N )Nσ = DN/N by Lemma 2.3, so π0 = π((G/N )Nσ ) = π(DN/N ) ⊆ π(D) = π. Hence every member Hi of H is π0 -supersoluble, so Hi N/N is π0 -supersoluble. Hence H0 is a generalized Wielandt σ-set of G/N . The lemma is proved. Proof of Theorem B. Clearly, G is σ-soluble, so G is a σ-full group of Sylow type by Lemma 2.1. Therefore G possesses a complete Hall σ-set H = {H1 , . . . , Ht }, and a subgroup H of G is σ-quasinormal in G if and only if HHix = Hix H for all Hi ∈ H and x ∈ G. We can assume without loss of generality that Hi is a σi -group for all i = 1, . . . , t. Assume that this theorem is false and let G be a counterexample of minimal order. Then D 6= 1 and for some σ-subnormal subgroup H of G and for some x ∈ G and k ∈ I we have HHkx 6= Hkx H by Lemma 2.5(i). Let E = Hkx . (1) G is not a special P σT -group (This follows from Lemma 3.1 and the choice of G). (2) |σ(D)| > 1. 6 Indeed, suppose that σ(D) = {σi }. Then O σi (D) = 1, so G ≃ G/O σi (D) is a special P σT -group by hypothesis, contrary to Claim (1). (3) The hypothesis holds for every quotient G/N of G, where N ≤ D. First we show that (G/N )/Oσi (DN/N ) is a special P σT -group for each σi ∈ σ(DN/N ). Note that σi ∈ σ(DN/N ) = σ(D/(D ∩ N )) ⊆ σ(D), so G/Oσi (D) is a special P σT -group by hypothesis. It is not difficult to show that Oσi (D)N/N = O σi (D/N ). Hence (G/N )/(Oσi (D/N )) = (G/N )/(Oσi (D)N/N ) ≃ G/N Oσi (D) ≃ ≃ (G/Oσi (D))/(Oσi (D)N/Oσi (D)) is a special P σT -group by Lemma 2.5(iii). It is clear also that DN/N ≃ D/D ∩ N is a σ-nilpotent normal Hall subgroup of G/N with σ-nilpotent quotient (G/N )/(DN/N ) ≃ G/DN ≃ (G/D)/(DN/D) by Lemma 2.2. Hence we have (3). (4) If N is a minimal normal subgroup of G contained in D, then EHN is a subgroup of G. Claim (3) and the choice of G implies that the conclusion of the theorem holds for G/N . On the other hand, EN/E is a Hall σk -subgroup of G/N and, by Lemma 2.6(4) in [1], HN/N is a σ-subnormal subgroup of G. Note also that G/N is σ-soluble, so every two Hall σk -subgroups of G/N are conjugate by Lemma 2.1. Thus, (HN/N )(EN/N ) = (EN/N )(HN/N ) = EHN/N by Lemma 2.5(i). Hence EHN is a subgroup of G. Final contradiction. Since |σ(D)| > 1 by Claim (2) and D is σ-nilpotent, G has at least two σprimary minimal normal subgroups R and N such that R, N ≤ D and σ(R) 6= σ(N ). Then at least one of the subgroups R or N , R say, is a σi -group for some i 6= k. Then R ∩ HN ≤ Oσi (HN ) ≤ V , where V is a Hall σi -subgroup of H, since N is a σi′ -group and G is a σ-full group of Sylow type. Hence R ∩ HN = R ∩ H. Claim (4) implies that EHR and EHN are subgroups of G. Now, arguing similarly as in the proof of Lemma 3.1, one can show that EHR ∩ EHN = EH is a subgroup of G, so HE = EH. This contradiction completes the proof of the result. Proof of Theorem C. Let π = π(D) and H = {H1 , . . . , Ht } be a generalized Wielandt σ-set of G. We can assume without loss of generality that Hi is a σi -group for all i = 1, . . . , t. Since G is σ-soluble by hypothesis, G is a σ-full group of Sylow type by Lemma 2.1. Necessity. Assume that this is false and let G be a counterexample of minimal order. Then D 6= 1. 7 (1) If R is a non-identity normal subgroup of G, then the hypothesis holds for G/R. Hence the necessity condition of the theorem holds for G/R (Since the hypothesis holds for G/R by Lemmas 2.5(ii) and 3.2, this follows from the choice of G). (2) If E is a proper σ-subnormal subgroup of G, then E Nσ ≤ D and the necessity condition of the theorem holds for E. Every σ-subnormal subgroup H of E is σ-subnormal in G by Lemma 2.6(2) in [1] and hence H is σ-quasinormal in G by hypothesis and Lemma 2.5(i). Thus H is σ-quasinormal in E by Lemma 2.8(1) in [1] since G is a σ-full group of Sylow type. Thus, E is a σ-soluble P σT -group. It is clear that E possesses a complete Hall σ-set H0 = {E1 , . . . , En } such that Ei ≤ Hixi for some xi ∈ G for all i = 1, . . . , n. Hence every member of H0 is π-supersoluble. Moreover, since E/E ∩ D ≃ ED/D ∈ Nσ and Nσ is a hereditary class by Lemma 2.2, we have E/E ∩ D ∈ Nσ . Hence E Nσ ≤ E ∩ D. Therefore, π0 = π(E Nσ ) ⊆ π. Hence every member of H0 is π0 -supersoluble. Hence H0 is a generalized Wielandt σ-set of E. Therefore the hypothesis holds for E, so the necessity condition of the theorem holds for E by the choice of G. (3) D is nilpotent. Assume that this is false and let R be a minimal normal subgroup of G. Then RD/R = (G/R)Nσ is abelian by Lemma 2.3 and Claim (1). Therefore R ≤ D, R is the unique minimal normal subgroup of G and R  Φ(G) by Lemma 2.2. Let V be a maximal subgroup of R. Since G is σ-soluble by hypothesis, R is a σi -group for some i. Hence V is σ-subnormal in G by Lemma 2.6(6) in [1], so V is σ-quasinormal in G by hypothesis and Lemma 2.5(i). Then R ≤ D ≤ Oσi (G) ≤ NG (V ) by Lemma 3.1 in [1]. Hence R is abelian, so R = CG (R) is a p-group for some prime p by [11, A, 15.2]. It is clear that R ≤ Hi ∩D for some i. Then Hi is p-supersoluble by hypothesis, so some subgroup L of R of order p is normal in Hi . On the other hand, L is clearly σ-quasinormal in G and hence G = Hi O σi (G) ≤ NG (L) by Lemma 3.1 in [1], so R = L. Therefore G/CG (R) = G/R is a cyclic group. Hence G is supersoluble and therefore D is nilpotent. (4) D is a Hall subgroup of G. Suppose that this is false and let P be a Sylow p-subgroup of D such that 1 < P < Gp , where Gp ∈ Sylp (G). We can assume without loss of generality that Gp ≤ H1 . (a) D = P is a minimal normal subgroup of G. Let R be a minimal normal subgroup of G contained in D. Since D is nilpotent by Claim (3), R is a q-group for some prime q. Moreover, D/R = (G/R)Nσ is a Hall subgroup of G/R by Claim (1) and Lemma 2.3. Suppose that P R/R 6= 1. Then P R/R ∈ Sylp (G/R). If q 6= p, then P ∈ Sylp (G). This contradicts the fact that P < Gp . Hence q = p, so R ≤ P and therefore P/R ∈ Sylp (G/R) and 8 we again get that P ∈ Sylp (G). This contradiction shows that P R/R = 1, which implies that R = P is the unique minimal normal subgroup of G contained in D. Since D is nilpotent, a p′ -complement E of D is characteristic in D and so it is normal in G. Hence E = 1, which implies that R = D = P . (b) D  Φ(G). Hence for some maximal subgroup M of G we have G = D ⋊ M (This follows from Lemma 2.2 since G is not σ-nilpotent). (c) If G has a minimal normal subgroup L 6= D, then Gp = D × (L ∩ Gp ). Hence Op′ (G) = 1. Indeed, DL/L ≃ D is a Hall subgroup of G/L by Claim (1). Hence Gp L/L = RL/L, so Gp = D × (L ∩ Gp ). Thus Op′ (G) = 1 since D < Gp by Claim (a). (d) V = CG (D) ∩ M is a normal subgroup of G and CG (D) = D × V ≤ H1 . In view of Claim (b), CG (D) = D × V , where V = CG (D) ∩ M is a normal subgroup of G. By Claim (a), V ∩D = 1 and hence V ≃ DV /D is σ-nilpotent by Lemma 2.2. Let W be a σ1 -complement of V . Then W is characteristic in V and so it is normal in G. Therefore we have (d) by Claim (c). (e) Gp 6= H1 . Assume that Gp = H1 . Let Z be a subgroup of order p in Z(Gp ) ∩ D. Then, since D ≤ Oσ1 (G) = Op (G), Z is normal in G by Lemma 3.1 in [1]. Hence D = Z < Gp and so D < CG (D). Then V = CG (D) ∩ M 6= 1 is a normal subgroup of G and V ≤ H1 = Gp by Claim (d). Let L be a minimal normal subgroup of G contained in V . Then Gp = D × L is a normal elementary abelian subgroup of G. Therefore every subgroup of Gp is normal in G by Lemma 3.1 in [1]. Hence |D| = |L| = p. Let D = hai, L = hbi and N = habi. Then N  D, so in view of the G-isomorphisms DN/D ≃ N ≃ N L/L = Gp /L = DL/L ≃ D we get that G/CG (D) = G/CG (N ) is a p-group since G/D is σ-nilpotent by Lemma 2.2. But then Claim (d) implies that G is a p-group. This contradiction shows that we have (e). Final contradiction for (4). In view of Theorem A in [4], G has a σ1 -complement E such that EGp = Gp E. Let V = (EGp )Nσ . By Claim (e), EGp 6= G. On the other hand, since D ≤ EGp by Claim (a), EGp is σ-subnormal in G by Lemma 2.6(5) in [1]. Therefore the necessity condition of the theorem holds for EGp by Claim (2). Hence V is a Hall subgroup of EGp . Moreover, by Claim (2) we have V ≤ D, so for a Sylow p-subgroup Vp of V we have |Vp | ≤ |P | < |Gp |. Hence V is a p′ -group and so V ≤ CG (D) ≤ H1 = Gp . Thus V = 1. Therefore EGp = E × Gp is σ-nilpotent and so E ≤ CG (D) ≤ H1 by Claim (d). Hence E = 1 and so D = 1, a contradiction. Thus, D is a Hall subgroup of G. (5) G/O σi (D) is a special P σT -group for each σi ∈ σ(D). First assume that O σi (D) 6= 1 and let N be a minimal normal subgroup of G contained in Oσi (D). Then G/N is a P σT -group by Lemma 2.5(ii), so the choice of G implies that (G/N )/Oσi (D/N ) = (G/N )/(Oσi (D)/N ) ≃ G/Oσi (D) 9 is a special P σT -group. Now assume that O σi (D) = 1, that is, D is a σi -group. Since G/D is σ-nilpotent by Lemma 2.2, Hi /D is normal in G/D and hence Hi is normal in G. Therefore all subgroups of D are σ-permutable in G by Lemma 2.3(2)(3) and hypothesis. Since D is a normal Hall subgroup of Hi , it has a complement S in Hi by the Schur-Zassenhaus theorem. Lemma 3.1 in [1] implies that D ≤ O σi (G) ≤ NG (S). Hence Hi = D × S. Therefore G = Hi Oσi (G) = SO σi (G) ≤ NG (L) for every subgroup L of D. Hence every element of G induces a power automorphism in D. Hence G is a special P σT -group. (6) Every subgroup H of D is normal in G. Hence every element of G induces a power automorphism in D. Since D is nilpotent by Claim (3), it is enough to consider the case when H is a subgroup of the Sylow p-subgroup P of D for some prime p. For some i we have P ≤ Oσi (D) = Hi ∩ D. On the other hand, we have D = Oσi (D) × Oσi (D) since D is nilpotent. Then HOσi (D)/Oσi (D) ≤ D/Oσi (D) = (G/O σi (D))Nσ , so HOσi (D)/Oσi (D) is normal in G/Oσi (D) by Claim (5). Hence HOσi (D) is normal in G, which implies that H = H(Oσi (D) ∩ Oσi (D)) = HOσi (D) ∩ Oσi (D) is normal in G. (7) If p is a prime such that (p − 1, |G|) = 1, then p does not divide |D|. In particular, |D| is odd. Assume that this is false. Then, by Claim (6), D has a maximal subgroup E such that |D : E| = p and E is normal in G. It follows that CG (D/E) = G since (p−1, |G|) = 1. Since D is a Hall subgroup of G, it has a complement M in G. Hence G/E = (D/E) × (M E/E), where M E/E ≃ M ≃ G/D is σ-nilpotent. Therefore G/E is σ-nilpotent by Lemma 2.2. But then D ≤ E, a contradiction. Hence p does not divide |D|. In particular, |D| is odd. (8) D is abelian. In view of Claim (6), D is a Dedekind group. Hence D is abelian since |D| is odd by Claim (7). From Claims (4)–(8) we get that the necessity condition of the theorem holds for G. Sufficiency. This directly follows from Theorem B. The theorem is proved. 10 References [1] A.N. Skiba, On σ-subnormal and σ-permutable subgroups of finite groups, J. Algebra, 436 (2015), 1–16. [2] L.A. Shemetkov, Formations of finite groups, Nauka, Main Editorial Board for Physical and Mathematical Literature, Moscow, 1978. [3] W. Guo, A.N. Skiba, Finite groups with permutable complete Wielandt sets of subgroups, J. Group Theory, 18 (2015), 191–200. [4] A.N. Skiba, A generalization of a Hall theorem, J. Algebra and its Application, 15(5) (2016), DOI: 10.1142/S0219498816500857. [5] A.N. Skiba, On some results in the theory of finite partially soluble groups, Commun. Math. Stat., 4(3) (2016), 281–309. [6] A. Ballester-Bolinches, R. Esteban-Romero, M. Asaad, Products of Finite Groups, Walter de Gruyter, Berlin-New York, 2010. [7] W. Guo, Structure Theory for Canonical Classes of Finite Groups, Springer, Heidelberg-New York-Dordrecht-London, 2015. [8] R.K. Agrawal, Finite groups whose subnormal subgroups permute with all Sylow subgroups, Proc. Amer. Math. Soc., 47 (1975), 77–83. [9] A. Ballester-Bolinches, L.M. Ezquerro, Classes of Finite groups, Springer, Dordrecht, 2006. [10] B.N. Knyagina, V.S. Monakhov, On π ′ -properties of finite groups having a Hall π-subgroup, Siberian Math. J., 522 (2011), 398–309. [11] K. Doerk, T. Hawkes, Finite Soluble Groups, Walter de Gruyter, Berlin-New York, 1992. 11
4math.GR
Inference for Multiple Change-points in Linear and Non-linear arXiv:1703.00647v1 [math.ST] 2 Mar 2017 Time Series Models Wai Leong Ng∗ Shenyi Pan† The Chinese University of Hong Kong The University of British Columbia Chun Yip Yau‡ The Chinese University of Hong Kong March 3, 2017 Abstract In this paper we develop a generalized likelihood ratio scan method (GLRSM) for multiple change-points inference in piecewise stationary time series, which estimates the number and positions of change-points and provides a confidence interval for each change-point. The computational complexity of using GLRSM for multiple change-points detection is as low as O(n(log n)3 ) for a series of length n. Consistency of the estimated numbers and positions of the change-points is established. Extensive simulation studies are provided to demonstrate the effectiveness of the proposed methodology under different scenarios. Keywords: confidence interval; likelihood ratio; piecewise stationary time series models; scan statistics; structural break; structural change. ∗ Department of Statistics, The Chinese University of Hong Kong, Shatin, N.T., Hong Kong. Email: [email protected] † Department of Statistics, The University of British Columbia, Vancouver, B.C., Canada. Email: [email protected] ‡ Department of Statistics, The Chinese University of Hong Kong, Shatin, N.T., Hong Kong. [email protected]. Supported in part by HKSAR-RGC Grants CUHK405012, 405113 and 14601015 1 Email: 1 Introduction Change-point detection has been recognized as an important issue in econometrics, biology, and engineering for decades. Extensive literature has explored the detection of change-points in time series models. Picard (1985) first studied the maximum likelihood estimator (MLE) of changepoints in autoregressive (AR) models. Bai et al. (1998) extends Picard’s method for change-points in multivariate AR and cointegrating models. Recently, multiple change-points problems have attracted growing attention. For example, Ombao et al. (2001) divides a time series into dyadic segments by minimizing an objective function and Braun et al. (2000) employs quasi-likelihood to detect multiple change-points in DNA sequences. Depending on whether the entire data set is considered as a whole or each data point is processed sequentially, change-point detection problems can be classified as off-line or on-line respectively. In this paper we focus on off-line change-point detection. Under the off-line setting, when the number of change-points is unknown, a common approach is to search for the set of change-points that minimizes certain objective functions, for example, the least-squares criterion for a change in the mean of a series (see Yao and Au (1989), Lavielle and Moulines (2000)), and minimum description length criterion for changes in model parameters (Davis et al. (2006)). However, such optimization procedures usually come with high computational costs because the number of possible combinations of change-points grows exponentially with sample size. Some attempts to reduce the computational burden include the genetic algorithm in Davis et al. (2006, 2008) and the pruned exact linear time (PELT) method in Killick et al. (2012). Nevertheless, the genetic algorithm involves many tuning parameters, while the computational cost of the PELT is close to O(n2 ) if the number of change-points does not increase linearly with the length of the time series n. Yau and Zhao (2016) proposed the likelihood ratio scan method (LRSM) to identify multiple change-points for piecewise stationary AR models. The computation can be performed with order O(n log n), which is lower than the standard order of O(n2 ). In practice, merely reporting the positions of the structural changes in the series does not pro- 2 vide complete information. A more informative description of change-points could be provided by confidence intervals (CI). To obtain the CIs, the asymptotic distribution of the change-point estimator is required. There is an extensive literature concerning limiting distribution of change-point estimators for independence sequences. Hinkley (1970) investigated maximum likelihood estimator of change-points in a sequence of i.i.d. random variables and proved that the estimated changepoint converges in distribution to the location of the maxima of a double-sided random walk. Bhattacharya and Brockwell (1976) derived the limiting distribution of change-point estimators for independent errors under local changes. Yao (1987) showed that Hinkley’s (1970) limiting distribution can be approximated by distribution which can be analytically tackled. Dümbgen (1991) investigated asymptotic behavior of non-parametric change-point estimators. Bai (1995) studied a structural-changed regression model and showed that the estimated change-point converges in distribution to the location of the maxima of a double-sided random walk. For a survey of various results, see Csörgö and Horváth (1997) and Antoch and Huskova (1999). For the time series case, Antoch et al. (1997) derived the asymptotic distribution of the change-point estimator for linear process with a change in mean. Recently, the asymptotic distribution of maximum likelihood estimator for a change-point in the parameters of time series models was established by Ling (2016), showing that the estimated change-point converges weakly to the location of the maxima of a double-sided random walk. In this paper, we propose a generalized LRSM (GLRSM) for multiple change-point inference in general time series models. Performing GLRSM involves three steps: first, a likelihood ratio scan statistic is used to obtain a possibly overestimated set of change-points; second, a model selection procedure is employed to give a set of consistent change-point estimates and, finally, a confidence interval is constructed for each estimated change-point. The GLRSM procedure thus provides a computationally efficient and automated procedure for change-point inference in time series. This paper is organized as follows. In Section 2, we review the basic settings of the change-point problem. In Section 3, we develop the GLRSM on general piecewise stationary time series based on the confidence interval construction procedure. Simulation studies are reported in Section 4. 3 We conclude in Section 5. Technical proofs of the theorems and lemmas are provided in Section 6. 2 Basic settings and assumptions In this section, we first review the basic settings of the change-point problem and the asymptotic distribution of the change-point estimator in Ling (2016). First we consider single change-point estimation in piecewise stationary processes. Assume that the time series {Xt : t = 1, 2, . . . } is Ft -measurable, strictly stationary, ergodic, and generated by Xt = g(θ, X t−1 , t ) , (1) where Ft is the σ-field generated by {t , t−1 , . . . }, X t = (Xt , . . . , Xt−q ) or X t = (Xt , Xt−1 , . . . ), θ is an unknown p × 1 parameter vector, and {t } are independently and identically distributed (i.i.d.) innovations. The structure of the time series {Xt } is characterized by a measurable function g and the parameter θ. We assume that the parameter space Θ is a bounded compact subset of Rp and g is continuous with respect to θ. We denote model (1) by M (θ 0 ) when the true parameter is θ = θ 0 . Let {X1 , . . . , Xn } be a random sample realization consists of two independent processes {X1 , . . . , Xτ10 } ∈ M (θ 01 ) and {Xτ10 +1 , . . . , Xn } ∈ M (θ 02 ) , (2) where τ10 ∈ {1, 2, . . . , n − 1} is the change-point satisfying δn < τ10 < (1 − δ)n for some small δ > 0, and θ 01 , θ 02 ∈ Θ are unknown parameters in the two segments satisfying θ 01 6= θ 02 . Define the conditional likelihood function lt (θ) ≡ log fθ (Xt |X t−1 ), where fθ is the conditional density of Xt given previous observations. The likelihood for the change-point model (2) is Ln (τ, θ 1 , θ 2 ) = L1n (τ, θ 1 ) + L2n (τ, θ 2 ) , where L1n (τ, θ 1 ) = Pτ t=1 lt (θ 1 ) and L2n (τ, θ 2 ) = Pn t=τ +1 lt (θ 2 ) are the log-conditional likelihood functions for the first and second segment, respectively. For a given τ , let θ̂ 1n (τ ) and θ̂ 2n (τ ) be the maximizer of L1n (τ, θ 1 ) and L2n (τ, θ 2 ) on Θ, respectively. The change-point τ is estimated by τ̂ = arg max Ln [τ, θ̂ 1n (τ ), θ̂ 2n (τ )] . 1≤τ ≤n 4 (3) The parameter estimates for the two segments are given by θ̂ 1 = θ̂ 1n (τ̂ ) and θ̂ 2 = θ̂ 2n (τ̂ ), respectively. Consistency of τ̂ , θ̂ 1 and θ̂ 2 are established in Ling (2016). 2.1 Asymptotic distribution of change-point estimators For the change-point model (2), define the double-sided random walk   Pτ  0 0   t=1 (lt (θ 1 ) − lt (θ 2 )) , τ > 0 ,     Wτ = 0 , τ = 0,       P   −1 (lt (θ 02 ) − lt (θ 01 )) , τ < 0 . t=τ (4) where Xt ∈ M (θ 02 ) when τ > 0 and Xt ∈ M (θ 01 ) when τ < 0. According to Theorem 2.2 (b) in Ling (2016), for fixed θ 01 and θ 02 , we have that d τ̂1 − τ10 → arg max Wτ . (5) τ ∈Z Note that the limit Wτ depends on the unknown parameters θ 01 and θ 02 and closed form expression for the distribution function is not available. Therefore, it is difficult to use (5) to construct confidence intervals in practice. Theorem 3.1 in Ling (2016) derived an approximation for Wτ when √ the parameter change was small. Specifically, if θ 01 − θ 02 = O(1/ n), then for any fixed M , ! ˆ0 ˆ0 −1 ˆ ˆ (d Ω̂d) (d Σ̂d) 2 arg max Wbm̂rc r∈[−M,M ]  d → arg max r∈[−M,M ]  1 B(r) − |r| , 2 (6) ∂ 2 lt (θ) 1 PM where B(r) is the standard Brownian motion in R, dˆ = θ̂ 1 − θ̂ 2 , Σ̂ = 2M t=−M ∂θ∂θ 0 |θ̂ 2 , PM Dt (θ̂2 ) ∂lt (θ) 1 PM 0 Ω̂ = 2M and D̄ = t=−M (Dt (θ̂ 2 ) − D̄)(Dt (θ̂ 2 ) − D̄) , where Dt (θ) = −M 2M , m̂ = ∂θ ˆ −2 (dˆ0 Ω̂d) ˆ and bac is the largest integer not greater than a. Using (6) for a sufficiently large (dˆ0 Σ̂d) M , Ling (2016) suggests an approximate 100(1 − α)% CI given by   CI = τ̂1 − [∆Fα/2 ] − 1, τ̂1 + [∆Fα/2 ] + 1 , ˆ dˆ0 Σ̂d) ˆ −2 and Fα/2 is the where ∆ = (dˆ0 Ω̂d)( α 2 -th 1 2 |r|}. 5 (7) quantile of the distribution arg maxr∈R {B(r) − 3 Estimation of multiple change-points using the Likelihood Ratio Scan Method In this section, we propose an automated procedure for estimating and constructing confidence intervals for multiple change-points. This procedure generalizes the Likelihood Ratio Scan Method (LSRM) in Yau and Zhao (2016) from piecewise stationary AR models to general time series models. First, we begin with some basic settings and assumptions. 3.1 Basic settings and assumptions We assume that the observations {Xt }t=1,...,n can be partitioned into m+1 stationary processes. For j = 1, . . . , m, the j-th segment Xj = {Xτj−1 +1 , . . . , Xτj } follows model M (θ j ), and τj is the j-th change-point where the j-th segment of the process changes to the (j + 1)-th segment. Set τ0 , 0 and τm+1 , n. To develop asymptotic theory in change-point analysis, the length of each segment must increase as the sample size increases. Let J = (τ1 , . . . , τm ) be the set of change-points. Define λj to be the relative position of the j-th change-point satisfying τj = [λj n], j = 0, . . . , m + 1. We assume that minj=0,...,m (λj+1 − λj ) > λ for some λ > 0. 3.2 Multiple change-points detection using scan statistics In this subsection we state the three steps of the generalized LRSM (GLRSM) method for multiple change-points inference. Discussions and asymptotic properties of GLRSM are given in Section 3.3. First step: Obtain potential change-points using scan statistics For t = h, . . . , n − h, define the scanning window at t and the corresponding observations as Wt (h) = {t − h + 1, . . . , t + h} and XWt (h) = (Xt−h+1 , . . . , Xt+h ) , respectively, where h is called the window radius. To establish asymptotic theory, we assume that h = h(n) depends on the sample size n. Define the likelihood ratio scan statistic for the 6 scanning window Wt (h) by Sh (t) = 1 1 1 L1h (t, θ̂ 1 ) + L2h (t, θ̂ 2 ) − L·h (t, θ̂) , h h h where L1h (t, θ̂ 1 ), L2h (t, θ̂ 2 ), and L·h (t, θ̂) are the quasi-likelihoods formed by the observations {Xs }s=t−h+1,...,t , {Xs }s=t+1,...,t+h , and {Xs }Wh (t) , evaluated at the maximum likelihood estimators (MLE) θ̂ 1 , θ̂ 2 , and θ̂, respectively. To be specific, given a sample z = {z1 , . . . , zn }, the quasi-likelihood is defined as L(θ) = n X t=1 lt (θ) ≡ n X log fθ (zt |zt−1 , zt−2 , . . .) , t=1 where fθ (zt |zt−1 , zt−2 , . . . ) is the conditional density of zt given previous observations and zs = 0 for s ≤ 0. Next, scan the observed time series by using Sh (t) to yield a sequence of likelihood ratio scan statistics (Sh (h), Sh (h + 1), . . . , Sh (n − h)). By construction, if t is a change-point, then Sh (t) tends to be large. If h is chosen such that 2h < nλ , then at most one change-point exists inside each scanning window. Therefore, we can obtain a set of potential change-points from the local maximizers of Sh (·). Define the local change-point estimates as follows: Jˆ(1) =  m ∈ {h, h + 1, . . . , n − h} : Sh (m) = max t∈(m−h,m+h]  Sh (t) , where Sh (t) , 0 for t < h and t > n − h. That is, m is a local change-point estimator if Sh (m) is the maximum over the window [m − h + 1, m + h] centering at m. We denote the number of elements in Jˆ(1) by m̂(1) . To further improve the computation efficiency, in practice we may restrict the size of Jˆ(1) by keeping a pre-specified number of change-points with the greatest Sh (m); see Yau and Zhao (2016). Second step: Consistent estimation by model selection approach The set of potential change-points Jˆ(1) obtained from the first step usually overestimates the true set of change-points. To detect the true change-points, we select the best subset 7 from Jˆ(1) based on certain information criteria. We adopt the minimum description length (MDL) criterion (see Davis et al. (2006, 2008)) which is found to give promising performance in a number of empirical studies. Given a set of change-points J = (τ1 , . . . , τm ), the MDL criterion is defined as MDL(m, J ) = log(m) + (m + 1) log(n) + cj m+1 XX log(ζj,k ) + j=1 k=1 m+1 X j=1 m+1 X dj log(nj ) − Lj (θ̂ j ; Xj ) , 2 j=1 where Lj (θ̂ j ; Xj ) is the quasi-likelihood for the j-piece, n1 , . . . , nm+1 are the segment lengths, dj is the dimension of θ j , and ζj,1 , . . . , ζj,cj are integer-valued parameters that specify the order of the model for the j-th segment. Given the local change-point estimates Jˆ(1) , the refined change-points can be estimated by (m̂(2) , Jˆ(2) ) = MDL(m, J ) . arg min m=|J |,J ⊆Jˆ(1) Note that searching for the best subset in Jˆ(1) is much more computationally efficient than the traditional approach of optimizing the MDL over all possible change-point positions. Third Step: Final change-point estimates and confidence intervals Define the extended local-window and the corresponding observations for the j-th estimated (2) change-point τ̂j ∈ Jˆ(2) by (2) Ej (h) = {τ̂j (2) − 2h + 1, . . . , τ̂j + 2h} and XEj (h) = (Xτ̂ (2) −2h+1 , . . . , Xτ̂ (2) +2h ) , j j respectively. Note that this construction ensures that each true change-point is within ( 14 , 34 ) of each extended local window Ej (h) with probability approaching 1. Let Lj (τ, θ 1 , θ 2 ) = Pτ Pτ̂j(2) +2h (2) l (θ ) + (2) t 1 t=τ +1 lt (θ 2 ). For j = 1, . . . , m̂ , define the final estimate as t=τ̂ −2h+1 j (3) τ̂j = arg max (2) Lj (τ, θ̂ j , θ̂ j+1 ) , (2) τ ∈(τ̂j −h,τ̂j +h] where θ̂ j = θ̂ j (τ ) = arg maxθ1 Pτ l (θ ), (2) t=τ̂j −2h+1 t 1 and θ̂ j+1 is defined analogously. Then, apply the procedures specified in Section 2.1 to obtain a confidence interval around each final (3) change-point estimate τ̂j . 8 In the first scanning step, given h, the computational complexity for evaluating Sh (t) for each t is of order O(h) since the size of Wj (h) is 2h. In the second step, minimizing MDL over m̂(1) change-point candidates requires a computational complexity of O((m̂(1) )2 n) when using the optimal partition (OP) method of Jackson et al. (2005). Finally, as the computation is restricted to the extended local windows in the third step, the computational complexity is O(m̂(2) h2 ). As both m̂(1) and m̂(2) are finite, the total computational complexity in the complete procedure to find the final change-point estimates is O(nh + h2 ). As will be shown in Section 3.3, the condition h = d(log n)3 is needed for some positive number d. When h is as small as the order of O((log n)3 ), the computation for change-point detection can be completed in O(n(log n)3 ) steps. Therefore, the  complete three-step GLRSM requires the computational complexity of O n(log n)3 , which is lower than the order of O(n2 ) using a dynamic programing algorithm. The GLRSM procedure includes one tuning parameter, the window radius h. As will be shown in Section 3.3, it is theoretically crucial to choose an h > d(log n)3 for Theorem 3.1 to hold, where d is an unknown constant. If h is of an order larger than O((log n)3 ), e.g. h = d2 (log n)4 , then the GLRSM is consistent for any choice of d2 . Based on our empirical studies, it is found that d2 = 1/25 and h ≥ 100 usually yields favorable results for various models and sample sizes. Thus, we suggest using max(100, (log n)4 /25) as a rule-of-thumb choice of h. 3.3 Asymptotic properties In this subsection we investigate the asymptotic properties of the GLRSM procedure. Specifically, we show the consistency of the estimated number of change-points and the coverage accuracy of the confidence intervals. We introduce the following assumptions. Assumption 3.1. For any two consecutive segments Xj = {Xτj−1 +1 , . . . , Xτj } and Xj+1 = {Xτj +1 , . . . , Xτj+1 }, the expectation of the conditional likelihood function E[lk (θ)] has a unique maximizer at θ = θ 0j for k ∈ {τj−1 + 1, . . . , τj } and at θ = θ 0j+1 for k ∈ {τj + 1, . . . , τj+1 }, with θ 0j 6= θ 0j+1 . Moreover, E[lk (θ 0j+1 )] < E[lk (θ 0j )] for k ∈ {τj−1 +1, . . . , τj } and E[lk (θ 0j )] < E[lk (θ 0j+1 )] for k ∈ {τj + 1, . . . , τj+1 }. 9 Assumption 3.2. Within any segment, lk (θ) is a measurable and continuous function with respect to {Xt }, and is almost surely twice continuously differentiable with respect to θ. Assumption 3.3. Let Yk (θ) = lk (θ) − E [lk (θ)]. For all θ ∈ Θ, there exists a K > 0 such that E(e|Yk (θ)| ) ≤ K for all k ∈ N. Assumption 3.4. For all θ j ∈ Θj , there exists an integrable function G(X t ) such that E(G(X t )) < ∞ and |lt (θ j )| ≤ G(X t ). Theorem 3.1 below asserts that all change-points can be identified in an h-neighborhood of Jˆ(1) . 0 ) and the set of local changeTheorem 3.1. Let the set of true change-points be J0 = (τ10 , . . . , τm 0 (1) (1) (1) point estimates be Jˆ(1) = {τ̂1 , τ̂2 , . . . , τ̂m̂(1) }, where m̂(1) = |Jˆ(1) |. Suppose Assumptions 3.1-3.4 hold, 2h < nλ and λ > c for some c > 0, then there exists some d > 0 such that for h ≥ d(log n)3 ,  P max min τ ∈J0 k=1,...,m̂(1) |τ − (1) τ̂k |  < h → 1. Note that as the minimum distance between change-points is nλ = O(n), the true number of change-points m0 is finite. However, there is no guarantee that m̂(1) equals the number of changepoints. That is, the number of change-points may be overestimated. Nevertheless, the following theorem shows that the MDL model selection approach yields the consistency of the number and positions of the change-points. p Theorem 3.2. Under the setting in Theorem 3.1 with λ > c for some c > 0, we have m̂(2) → m0 . In addition, given that m̂(2) = m0 , we have  P max |τ̂ j=1,...,m0 (2) − τj0 |  < h → 1. (2) Since h > d(log n)3 → ∞, Theorem 3.2 implies that maxj=1,...,m0 |τ̂j −τj0 | = Op (h), which is not optimal compared with the typical rate of Op (1). Nevertheless, the interval [τ̂j − h + 1, τ̂j + h] covers the true change-point τj0 with probability approaching 1. This allows the extended local-window to yield consistent final estimates and confidence intervals. 10 Theorem 3.3. Assume that the conditions of Theorem 3.2 hold, 3h < nλ , and Assumption 3.4 holds. Then, we have (3) τ̂j d − τj0 → arg max Wj,τ , τ ∈Z where Wj,τ is a double-sided random walk defined as   Pτj0 +τ   (l (θ 0 ) − lt (θ 0j+1 )) ,   t=τj0 +1 t j    Wj,τ = 0 ,       P 0   τj 0 (l (θ 0 ) − lt (θ 0j )) , t=τ +τ +1 t j+1 τ > 0, τ = 0, τ < 0. j (3) In particular, τ̂j − τj0 = Op (1). As the minimum distance between change-points is much larger than the window radius h, i.e., nλ /h → ∞, the distances between the extended local windows Ej (h)s diverge to ∞. Under some weak dependence conditions on the processes, the CIs constructed are asymptotic independent. Thus, a Bonferroni-type argument implies that an approximate 1 − α simultaneous confidence interval for all the m̂(2) change points can be constructed by a collection of (1 − α)1/m̂ (2) CIs for each of a set of m̂(2) change points. 4 Simulation studies In this section, we examine the finite sample performance of GLRSM via extensive simulation studies. In Sections 4.1, we study the performance of GLRSM on various models. In Section 4.2, we compare GLRSM to other methods in the literature, including Fryzlewicz and Subba Rao (2014), in terms of the performance of change-point detection. 4.1 Performance of GLRSM In this section, we apply GLRSM to multiple change-points problems in different piecewise stationary time series models, including AR, ARMA, and GARCH models. Also, the rule-of-thumb choice of h = max(100, (log n)4 /25) for the window radius is employed. 11 We applied GLRSM on the piecewise stationary processes generated from multiple change-point Models (C) to (G) listed below. Realizations of these models are given in Figure 1. In each model, i.i.d. t ∼ N (0, 1). The estimation results are summarized in Table 1. Model (D) −4 −4 −2 −2 0 0 2 2 4 4 Model (C) 200 400 600 800 1000 0 500 1000 Time Time Model (E) Model (F) 1500 2000 1500 2000 −6 −4 −4 −2 −2 0 0 2 2 4 4 6 0 0 200 400 600 800 1000 0 500 1000 Time Time −10 −5 0 5 10 Model (G) 0 500 1000 1500 2000 Time Figure 1: Realizations from Models (C) to (G). Vertical lines represent change-point positions (C). Piecewise stationary AR(1) processes     0.4Xt−1 + t ,      Xt = −0.6Xt−1 + t ,        0.5Xt−1 + t , (D). Piecewise stationary AR(2) processes 12 if 1 ≤ t ≤ 400 , if 401 ≤ t ≤ 700 , if 701 ≤ t ≤ 1000 . Model τ0 Median Mean 90% Range Mean of 90% CI Coverage Prob. 400 400 400.78 [391, 411] [393.62, 407.94] 83.2% 700 700 700.09 [691, 710] [694.18, 705.99] 83.1% 1000 1000 999.35 [991, 1007] [994.68, 1004.02] 81.7% 1500 1500 1499.66 [1487, 1511] [1490.83, 1508.50] 84.6% 400 400 400.56 [394, 407] [397.81, 403.31] 71.1% 600 600 599.38 [593, 605] [595.37, 603.39] 85.2% 800 800 800.01 [793, 806] [795.08, 804.95] 85.8% 1200 1200 1199.18 [1188, 1209] [1191.55, 1206.81] 84.7% 400 399 398.92 [391, 406] [394.76, 403.09] 78.6% 1600 1600 1599.72 [1593, 1609] [1593.51, 1605.92] 82.5% (C) (D) (E) (F) (G) Table 1: True value (τ 0 ), median, mean and the range of the middle 90% (90% Range) of the final estimates, average of the end-points (mean of 90% CI) and coverage probability (Coverage Prob.) of 90% confidence intervals for Models (C) to (G). The number of replications is 1000.     0.7Xt−1 + 0.1Xt−2 + t ,      Xt = −0.4Xt−1 t ,        0.5Xt−1 − 0.2Xt−2 + t , if 1 ≤ t ≤ 1000 , if 1001 ≤ t ≤ 1500 , if 1501 ≤ t ≤ 2000 . (E). Piecewise stationary ARMA(1,1) processes     −0.8Xt−1 + t + 0.5t−1 , if 1 ≤ t ≤ 400 ,      Xt = 0.9Xt−1 + t , if 401 ≤ t ≤ 600 ,        0.1Xt−1 + t − 0.5t−1 , if 601 ≤ t ≤ 1000 . (F). Piecewise stationary ARMA processes up to order 2     −0.6Xt−1 − 0.2Xt−2 + t , if 1 ≤ t ≤ 800 ,      Xt = 0.4Xt−1 + t + 0.3t−1 , if 801 ≤ t ≤ 1200 ,        t − 0.3t−1 − 0.2t−2 , if 1201 ≤ t ≤ 2000 . 13 (G). Piecewise stationary GARCH processes Xt = t σt , σt2 =    2 + 0.5σ 2 ,  3 + 0.1Xt−1  t−1     if 1 ≤ t ≤ 400 , 2 + 0.5σ 2 , if 401 ≤ t ≤ 1600 , 0.5 + 0.1Xt−1 t−1        2 + 0.8σ 2 , if 1601 ≤ t ≤ 2000 . 0.8 + 0.1Xt−1 t−1 When performing GLRSM on ARMA(p,q) models such as Model (E) and (F), in consideration of the computation complexity and the robustness of AR models, we conduct the first two steps (2) using piecewise AR models. After obtaining τ̂j from the second step, we use the ARMA models (3) to conduct the third step and compute the final estimate τ̂j , and construct the corresponding confidence intervals for each change-point estimate. Note that the consistency of the change-point estimator does not require that the true models be specified since the asymptotic results in Theorem 3.1 and 3.2 for the change-point estimates are valid when Assumptions 3.1-3.4 hold. From Table 1, it can be seen that the final change-points estimates are accurate and the coverage probability is quite close to the nominal level of 90%. Taking into account all the simulation results, we conclude that GLRSM has a stable performance in most scenarios. 4.2 GARCH change-point detection performance evaluation In this section we compare the detection accuracy of GLRSM to other multiple change-point estimation procedures such as the BASTA-res in Fryzlewicz and Subba Rao (2014). The codes for the BASTA-res are available at http://stats.lse.ac.uk/fryzlewicz/basta/basta.html. Following the same setting in Fryzlewicz and Subba Rao (2014), we consider different GARCH(1,1) models with sample size n = 1000 and one change-point occurring at time t = 500, i.e.,     2 + β σ 2 , if 1 ≤ t ≤ 500 , ω1 + α1 Xt−1 1 t−1 2 Xt = t σt , σt =    ω + α X 2 + β σ 2 , if 501 ≤ t ≤ 1000 , 2 2 t−1 i.i.d. 2 t−1 where t ∼ N (0, 1). The following ten change-point models are studied. 14 Model (ω1 , α1 , β1 ) (ω2 , α2 , β2 ) Model (ω1 , α1 , β1 ) (ω2 , α2 , β2 ) (a) (0.4, 0.1, 0.5) (0.4, 0.1, 0.5) (b) (0.1, 0.1, 0.8) (0.1, 0.1, 0.8) (c) (0.4, 0.1, 0.5) (0.4, 0.1, 0.6) (d) (0.4, 0.1, 0.5) (0.4, 0.1, 0.8) (e) (0.1, 0.1, 0.8) (0.1, 0.1, 0.7) (f) (0.1, 0.1, 0.8) (0.1, 0.1, 0.4) (g) (0.4, 0.1, 0.5) (0.5, 0.1, 0.5) (h) (0.4, 0.1, 0.5) (0.8, 0.1, 0.5) (i) (0.1, 0.1, 0.8) (0.3, 0.1, 0.8) (j) (0.1, 0.1, 0.8) (0.5, 0.1, 0.8) Note that there is no change-point in Models (a) and (b). Since the BASTA-res does not produce confidence intervals for the change-points, only the proportion of correct number, mean, median, and the standard error of the estimated change-points are compared. The simulation results are summarized in Table 2. From Table 2, when the structural change is small (Models (c), (e) and (g)), the performance of GLRSM is not as good as the BASTA-res method in Fryzlewicz and Subba Rao (2014). One possible reason is that the short scanning window has less power to identify the change-point when the change is small. However, the GLRSM has higher credibility when no structural change actually occurs (Models (a) and (b)). Also, the GLRSM performs significantly better when the structural difference is large (Models (d), (f) and (j)). In all scenarios, the biases of the change-point estimates given by GLRSM and BASTA-res are similar. However, the standard error of the change-point estimates by GLRSM is always smaller than the standard error by BASTA-res. That is, compared with BASTA-res, the change-point estimates by GLRSM have higher precision. 5 Conclusion In this paper, we developed GLRSM as a computationally efficient procedure for multiple change-points inference in general time series models. Compared with other methods that only yield point estimates, the GLRSM provides a confidence interval around each estimated changepoint. The results of the simulations and real data analyses indicated that the GLRSM performs well in change-points detection and has accurate coverage probabilities. In this paper, the use of 15 Method Statistic (a) (b) (c) (d) (e) Accuracy rate 94.0% 89.0% 34.8% 78.4% 71.4% Mean of est. NA NA 519.99 502.70 493.04 Median of est. NA NA 503 501 499 s.e. of est. NA NA 148.43 24.16 91.99 Accuracy rate 100% 100% 4.2% 95.2% 21.8% Mean of est. NA NA 520.71 504.27 484.80 Median of est. NA NA 505 501 493 s.e. of est. NA NA 43.30 21.61 50.67 Statistic (f) (g) (h) (i) (j) Accuracy rate 77.8% 25.2% 89.0% 68.0% 70.4% Mean of est. 499.34 490.85 497.93 500.07 502.66 Median of est. 501 495.5 500 501 501 s.e. of est. 15.82 150.26 75.84 47.53 20.13 Accuracy rate 93.4% 0.4% 65.2% 69.6% 93.2% Mean of est. 499.68 461.50 502.75 499.57 503.90 Median of est. 500 461.5 501 501 501 s.e. of est. 13.41 111.02 43.88 43.98 19.31 BASTA-res GLRSM Method BASTA-res GLRSM Table 2: Proportion of times that the correct number of change-points was detected, mean, median and standard error (s.e.) of the change-point estimates for different estimation methods for Models (a) to (j). For GLRSM, the scan window radius h = max(100, (log n)4 /25) is used, where n is the length of the series. The number of replications is 500. likelihood ratio scan statistics is restricted to univariate time series models. Nevertheless, with proper modifications to the scanning procedures and large deviation bounds, the GLRSM could potentially be extended to multivariate settings. 16 6 Proofs First we state the following lemmas about the asymptotic properties of the likelihood ratio scan statistics, Sh (t), which are required to prove Theorem 3.1. Lemma 6.1. For the j-th change-point τj0 , the scan statistic Sh (τj0 ) satisfies 1 1 1 L1h (τj0 , θ̂ 1 ) + L2h (τj0 , θ̂ 2 ) − L·h (τj0 , θ̂ 1,2 ) h h h     fk,θ2 (θ 2 ) fk,θ1 (θ 1 ) p + E log , gj > 0 , → E log fk,θ1 (θ 1,2 ) fk,θ2 (θ 1,2 ) Sh (τj0 ) = where θ̂ 1,2 1 = arg max h θ∈Θ τ0 τj0 +h j X  X lk,θ1 (θ) + k=τj0 −h+1  lk,θ2 (θ) , k=τj0 +1 and    θ 1,2 = arg max E lk,θ1 (θ) + E lk,θ2 (θ) . θ∈Θ Lemma 6.2. For any  >0, there exists a positive integer H such that for any h > H, 1 P(|Sh (t)| > ) ≤ 6 exp(− h1/3 2/3 ) , 4 for all t such that Wt (h) does not contain any change-point. Lemma 6.3. For any  > 0, there exists a positive integer H such that for any h > H,  1 P |Sh (τj0 ) − gj | >  ≤ 22 exp(− h1/3 2/3 ) , 4 for all j = 1, . . . , m0 . Proof of Theorem 3.1: Let At = {some point in the t-th local-window is a local change-point T estimate} and let A = t∈J0 At . The proof of Theorem 3.1 is completed if we can prove P(A)→ 1 as n → ∞. S Let Zn = {1, 2, . . . , n}. Define E = Zn \{ t∈J0 Wt (h)} as the set of all points outside the h-neighborhood of the true change-points. One sufficient condition for the event A to occur is that min Sh (t) > max Sh (t) . t∈J0 t∈E 17 (8) Let g = 1 2 minj=1,...,m0 (gj ) where gj ’s are defined in Lemma 6.1. Note from (8) that   P(A) ≥ P min Sh (t) > g > max Sh (t) . t∈J0 t∈E (9)  From Lemma 6.3 and the definition of g, it can be shown that P Sh (t) ≤ g ≤ 22 exp(− 14 h1/3 g 2/3 ), for all t ∈ J0 . Thus,  P min Sh (t) > g = 1 − P t∈J0  [  X {Sh (t) ≤ g} ≥ 1 − P(Sh (t) ≤ g) t∈J0 t∈J0 (10) 1 ≥ 1 − 22m0 exp(− h1/3 g 2/3 ) → 1 , 4 provided that h = d(log n)3 for some d > 0 and m0 = O(1). When t ∈ E, all observations in Sh (t) belong to one stationary piece. By Lemma 6.2, we have P(Sh (t) ≥ g) < 6 exp(− 14 h1/3 g 2/3 ) for all t ∈ E. Let h = d(log n)3 for some d > 64/g 2 , we have  P g > max Sh (t) = 1 − P t∈E [  m 0 +1 X 0 {Sh (t) ≥ g} ≥ 1 − (τj0 − τj−1 )P(Sh (tj ) ≥ g) j=1 t∈E (11) 1 > 1 − 6n exp(− h1/3 g 2/3 ) → 1 , 4 0 where tj ∈ (τj−1 + h, τj0 − h). Combining (9), (10), and (11) yields P(A) → 1 when h = d(log n)3 for some d > 64/g 2 , completing the proof of Theorem 3.1.  Proof of Theorem 3.2: The proof of this theorem is essentially the same as that of Theorem 2 in Yau and Zhao (2016), and hence is omitted. Proof of Theorem 3.3:  Based on Assumption 3.4, there exists a function G(Z t ) that dominates |lt (θ j )| for all θ j ∈ Θj . By using the uniform law of large number (ULLN) in Jennrich (1969), we P have as h → ∞, h1 ht=1 lt (θ j ) converges uniformly to Eθ0 (lt (θ j )), ∀θ j ∈ Θj . The remaining part j of the proof is the same as that of Theorem 3 in Yau and Zhao (2016). In practice, if the form of the underlying model is known, it is not difficult to find a dominating function G(Z t ) that satisfying Assumption 3.4. For example, if an AR(p) model is used, we can P P  take G(Zt , . . . , Zt−p ) = | 21 log(2πσ 2 )| + ( pj=0 Zj2 + 2 i6=j |Zi Zj |)/2σ 2 . 18 Proof of Lemma 6.1: Denote the conditional likelihood function at time k given Fk−1 with parameter θ as f (Xk , θ). As h → ∞, we have θ̂ 1,2 1 = arg max h θ∈Θ τ0 τj0 +h j X X l1 (k, θ) + k=τj0 −h+1  l2 (k, θ) k=τj0 +1     p = arg max E l1 (k, θ) + E l2 (k, θ) + op (1) → θ 1,2 . θ∈Θ p p Combining with θ̂ 1 → θ 1 and θ̂ 2 → θ 2 , we have Sh (τj0 ) 1 = h τ0 j X k=τj0 −h+1 τ 0 +h j 1 1 X log(fk,θ1 (θ̂ 1 ) + log(fk,θ2 (θ̂ 2 )) − h h 0 k=τj +1 τ0 j X log(fk,θ1 (θ̂ 1,2 )) k=τj0 −h+1 τj0 +h − 1 X log(fk,θ2 (θ̂ 1,2 )) h 0 k=τj +1 τ0 j X τ 0 +h j fk,θ2 (θ̂ 2 ) 1 X log + log fk,θ1 (θ̂ 1,2 ) h k=τ 0 +1 fk,θ2 (θ̂ 1,2 ) k=τj0 −h+1 j     fk,θ1 (θ 1 ) fk,θ2 (θ 2 ) p → E log + E log = gj . fk,θ1 (θ 1,2 ) fk,θ2 (θ 1,2 ) 1 = h fk,θ1 (θ̂ 1 ) (12) For the first expectation in (12), the Jensen’s Inequality implies that        fk,θ1 (θ 1,2 ) fk,θ1 (θ 1,2 ) fk,θ1 (θ 1 ) = −E log ≥ − log E . E log fk,θ1 (θ 1,2 ) fk,θ1 (θ 1 ) fk,θ1 (θ 1 ) Since the observations come from the segment with the true parameter θ 1 , we thus have    Z ∞  fk,θ1 (θ 1,2 ) fk,θ1 (θ 1,2 ) log E = log fk,θ1 (θ 1 )dxk = log 1 = 0 . fk,θ1 (θ 1 ) −∞ fk,θ 1 (θ 1 ) Notice that since θ 1,2 depends on two distinct time series models specified by θ 1 and θ 2 respectively, fk,θ1 (θ 1,2 ) fk,θ1 (θ 1 ) fk,θ1 (θ 1,2 ) fk,θ1 (θ 1 ) → c a.s., where c is a constant. Also, fk,θ1 (θ 1 )  the log-function is not a linear function. Therefore, E log fk,θ (θ 1,2 ) > 0, and the equality could then does not satisfy the condition that 1 not be achieved. Finally, using similar arguments for the second expectation in (12), we have gj > 0, and thus Lemma 6.1 follows.  Proof of Lemma 6.2: When there is no change-point in the scanning window Wt (h), we use the notation lk (θ) to represent lk,θ0 (θ), since all data are from the segment specified by θ 0 . Hence, we 19 can write the scan statistic as 1 Sh (t) = h t X t+h 1 X 1 [lk (θ̂ 1 ) − lk (θ 0 )] + [lk (θ̂ 2 ) − lk (θ 0 )] − h h k=t−h+1 k=t+1 t+h X [lk (θ̂) − lk (θ 0 )] , (13) k=t−h+1 where θ̂ 1 , θ̂ 2 , and θ̂ are the maximum likelihood estimators (MLE) of the parameter θ in the left half, right half, and the entire scanning window, respectively. We first decompose the third sum in (13) into the following form, 1 h t+h X 1 h [lk (θ̂) − lk (θ 0 )] = k=t−h+1 t+h X [lk (θ̂) − E(lk (θ̂))] − k=t−h+1 1 h t+h X [lk (θ 0 ) − E(lk (θ 0 ))] k=t−h+1 + [E(lk (θ̂)) − E(lk (θ 0 ))] . (14) By Assumptions 3.2, 3.3 and the compactness of the parameter space Θ, there exists a positive constant K ∗ , such that E(e|Yk (θ)| ) ≤ K ∗ for all k ∈ N and θ ∈ Θ. Then by Theorem 3.2 of Lesigne and Volnỳ (2001), for any  > 0, there exists a positive integer H0 depending only on K ∗ and , such that for any h > H0 and θ ∈ Θ,  P 1 h t+h X  1 1/3 2/3 [lk (θ) − E(lk (θ))] > /3 ≤ e− 4 h  , (15) k=t−h+1 Moreover, the exponential moment condition E(e|Yk (θ)| ) ≤ K ∗ for all θ ∈ Θ also implies the uniform p integrability of {lk (θ) : θ ∈ Θ}. Thus, together with θ̂ → θ 0 , we have that for any  > 0, there exists a constant H1 > 0 such that for any h > H1 , E(lk (θ̂)) − E(lk (θ 0 )) < /3 . (16) As a result, applying (15) on both θ̂ and θ 0 and (16) we have that for any  > 0, there exists a positive integer H ∗ such that for any h > H ∗ ,  P 1 h t+h X  1 1/3 2/3 [lk (θ̂) − lk (θ 0 )] >  ≤ 2e− 4 h  . k=t−h+1 Similarly exponential inequalities hold for the other two sums in (13), hence Lemma 6.2 follows. Proof of Lemma 6.3: Using the notations in Lemma 6.1, we have Sh (τj0 )  1 − gj = h τ0 j X k=τj0 −h+1 0   τX  j +h 1 lk,θ1 (θ̂ 1 ) − E(lk,θ1 (θ 1 )) + lk,θ2 (θ̂ 2 ) − E(lk,θ2 (θ 2 )) h 0 k=τj +1 20  τ0 j X  1 − h τ0 1 = h k=τj0 −h+1    1 lk,θ1 (θ̂ 1 ) − (lk,θ1 (θ 1 ) + h τ 0 +h j 1 X + h 0  lk,θ2 (θ̂ 2 ) − (lk,θ2 (θ 2 )   k=τj +1 1 + h  k=τj0 −h+1 j X     lk,θ1 (θ̂ 1,2 ) + lk+h,θ2 (θ̂ 1,2 ) − E lk,θ1 (θ 1,2 ) − E lk+h,θ2 (θ 1,2 ) τ0 j X τ0 j X  lk,θ1 (θ 1 ) − E(lk,θ1 (θ 1 )) k=τj0 −h+1 τj0 +h  1 X + lk,θ1 (θ 2 ) − E(lk,θ2 (θ 2 )) h 0  k=τj +1    lk,θ1 (θ̂ 1,2 ) + lk+h,θ2 (θ̂ 1,2 ) − lk,θ1 (θ 1,2 ) + lk+h,θ2 (θ 1,2 )  k=τj0 −h+1 τ0 j X  1 + h k=τj0 −h+1    1 lk,θ1 (θ 1,2 ) − E lk,θ1 (θ 1,2 ) + h τ0 j X   lk,θ2 (θ 1,2 ) − E lk+h,θ2 (θ 1,2 ) . k=τj0 −h+1 (17) By Lemma 6.2, we have that for any  > 0, there exists a constant H2 > 0 such that for any h > H2 ,  P 1 h τ0 j X P − lk,θ1 (τj0 , θ 1 )   1 1/3 2/3 >  ≤ 6e− 4 h  , k=τj0 −h+1 and  lk,θ1 (τj0 , θ̂ 1 ) τ 0 +h j 1 X h 0 lk,θ2 (τj0 , θ̂ 2 ) − lk,θ2 (τj0 , θ 2 )   1 1/3 2/3 >  ≤ 6e− 4 h  . k=τj +1 ∂ sumption 3.2 gives E ∂θ ∂ ∂θ E  lk,θ1 (θ) + lk,θ2 (θ) θ=θ1,2 = 0. Combining with As ∂  lk,θ1 (θ1,2 ) + lk,θ2 (θ1,2 ) = 0. Hence, ∂θ lk,θ1 (θ 1,2 ) + lk+h,θ2 (θ 1,2 ) is a By the definition of θ1,2 , we have martingale difference sequence. Using similar arguments in the proof of Lemma 6.2, we have that for any  > 0, there exists a constant H3 > 0 such that for any h > H3 ,  P 1 h τ0 j X  lk,θ1 (τj0 , θ̂ 1,2 )+lk+h,θ2 (τj0 , θ̂ 1,2 )  − lk,θ1 (τj0 , θ 1,2 )+lk+h,θ2 (τj0 , θ 1,2 )   1 1/3 2/3 >  ≤ 6e− 4 h  . k=τj0 −h+1 The remaining four terms in (17) can be bounded by considering the large deviation probabilities Pτj0 of h1 k=τ 0 −h+1 lk,θ 1 (θ 1 ) − E(lk,θ 1 (θ 1 )). For example, let Yk (θ 1 ) = lk,θ 1 (θ 1 ) − E(lk,θ 1 (θ 1 )). Note j that {Yk (θ 1 )} is a martingale difference sequence. By Assumption 3.3 and Theorem 3.2 of Lesigne 21 and Volnỳ (2001), for any  > 0, there exists a constant H4 > 0 such that for any h > H4 ,  P 1 h τ0 j X  Yk ≥  1 1/3 2/3 ≤ e− 4 h . k=τj0 −h+1 Therefore, the large deviation probability for every term in (17) has been obtained. The large deviation bound for Sh (τj0 ) − gj can thus be established and the proof is complete.  References Antoch, J. and Huskova, M. (1999). Estimators of changes. In Asymptotics, Nonparametrics, and Time Series (ed. S. Ghosh), pages 533–578. Antoch, J., Hušková, M., and Prášková, Z. (1997). Effect of dependence on statistics for determination of change. Journal of Statistical Planning and Inference, 60(2):291–310. Bai, J. (1995). Least absolute deviation estimation of a shift. Econometric Theory, 11(3):403–436. Bai, J., Lumsdaine, R. L., and Stock, J. H. (1998). Testing for and dating common breaks in multivariate time series. The Review of Economic Studies, 65(3):395–432. Bhattacharya, P. K. and Brockwell, P. J. (1976). The minimum of an additive process with applications to signal estimation and storage theory. Zeitschrift für Wahrscheinlichkeitstheorie und Verwandte Gebiete, 37(1):51–75. Braun, J. V., Braun, R., and Müller, H.-G. (2000). Multiple changepoint fitting via quasilikelihood, with application to dna sequence segmentation. Biometrika, 87(2):301–314. Csörgö, M. and Horváth, L. (1997). Limit theorems in change-point analysis. John Wiley & Sons Inc. Davis, R. A., Lee, T. C. M., and Rodriguez-Yam, G. A. (2006). Structural break estimation for nonstationary time series models. Journal of the American Statistical Association, 101(473):223– 239. 22 Davis, R. A., Lee, T. C. M., and Rodriguez-Yam, G. A. (2008). Break detection for a class of nonlinear time series models. Journal of Time Series Analysis, 29(5):834–867. Dümbgen, L. (1991). The asymptotic behavior of some nonparametric change-point estimators. The Annals of Statistics, 19(3):1471–1495. Fryzlewicz, P. and Subba Rao, S. (2014). Multiple-change-point detection for auto-regressive conditional heteroscedastic processes. Journal of the Royal Statistical Society: series B (statistical methodology), 76(5):903–924. Hinkley, D. V. (1970). Inference about the change-point in a sequence of random variables. Biometrika, 57(1):1–17. Jackson, B., Scargle, J. D., Barnes, D., Arabhi, S., Alt, A., Gioumousis, P., Gwin, E., Sangtrakulcharoen, P., Tan, L., and Tsai, T. T. (2005). An algorithm for optimal partitioning of data on an interval. Signal Processing Letters, IEEE, 12(2):105–108. Jennrich, R. I. (1969). Asymptotic properties of non-linear least squares estimators. The Annals of Mathematical Statistics, 40(2):633–643. Killick, R., Fearnhead, P., and Eckley, I. (2012). Optimal detection of changepoints with a linear computational cost. Journal of the American Statistical Association, 107(500):1590–1598. Lavielle, M. and Moulines, E. (2000). Least-squares estimation of an unknown number of shifts in a time series. Journal of time series analysis, 21(1):33–59. Lesigne, E. and Volnỳ, D. (2001). Large deviations for martingales. Stochastic processes and their applications, 96(1):143–159. Ling, S. (2016). Estimation of change-points in linear and nonlinear time series models. Econometric Theory, 32(02):402–430. 23 Ombao, H. C., Raz, J. A., von Sachs, R., and Malow, B. A. (2001). Automatic statistical analysis of bivariate nonstationary time series. Journal of the American Statistical Association, 96(454):543– 560. Picard, D. (1985). Testing and estimating change-points in time series. Advances in applied probability, 17:841–867. Yao, Y. C. (1987). Approximating the distribution of the maximum likelihood estimate of the change-point in a sequence of independent random variables. The Annals of Statistics, 15:1321– 1328. Yao, Y. C. and Au, S. (1989). Least-squares estimation of a step function. Sankhyā: The Indian Journal of Statistics, Series A, 51(3):370–381. Yau, C. Y. and Zhao, Z. (2016). Inference for multiple change points in time series via likelihood ratio scan statistics. Journal of the Royal Statistical Society: Series B, 78:895–916. 24
10math.ST
Generating High-Quality Query Suggestion Candidates for Task-Based Search Heng Ding1,2 , Shuo Zhang2 , Darı́o Garigliotti2 , and Krisztian Balog2 1 Wuhan University, Wuhan, China University of Stavanger, Stavanger, Norway [email protected], <firstname.lastname>@uis.no arXiv:1802.07997v1 [cs.IR] 22 Feb 2018 2 Abstract. We address the task of generating query suggestions for task-based search. The current state of the art relies heavily on suggestions provided by a major search engine. In this paper, we solve the task without reliance on search engines. Specifically, we focus on the first step of a two-stage pipeline approach, which is dedicated to the generation of query suggestion candidates. We present three methods for generating candidate suggestions and apply them on multiple information sources. Using a purpose-built test collection, we find that these methods are able to generate high-quality suggestion candidates. 1 Introduction Query suggestions, recommending a list of relevant queries to an initial user input, are an integral part of modern search engines [8]. Accordingly, this task has received considerable attention over the last decade [1, 2, 7]. Traditional approaches, however, do not consider the larger underlying task the user is trying to accomplish. In this paper, we focus on generating query suggestions for supporting task-based search. Specifically, we follow the problem definition of the task understanding task from the TREC Tasks track: given an initial query, the system should return a ranked list of suggestions “that represent the set of all tasks a user who submitted the query may be looking for” [14]. Thus, the overall goal is to provide a complete coverage of aspects (subtasks) for an initial query, while avoiding redundancy. We envisage a user interface where task-based query suggestions are presented once the user has issued an initial query; see Fig. 1. These query suggestions come in two flavors: query completions and query refinements. The difference is that the former are prefixed by the initial query, while the latter are not. It is an open question whether a unified method can produce suggestions in both flavors, or rather specialized models are required. The best published work on task-based query suggestions, that we know of, is by Garigliotti and Balog [4], who use a probabilistic generative model to combine keyphrase-based suggestions extracted from multiple information sources. Nevertheless, they rely heavily on Google’s query suggestion service. Thus, another main challenge in our work is to solve this task without relying on suggestions provided by a major web search engine (and possibly even without using a query log). Following the pipeline architecture widely adopted in general query suggestion systems [7, 12], we propose a two-step approach consisting of suggestion generation and 2 Heng Ding, Shuo Zhang, Darı́o Garigliotti, and Krisztian Balog choose bathroom Search choose bathroom brass choose bathroom cabinets choose bathroom colors choose bathroom warmers choose bathroom lighting (a) query completion living in india Search cost of living in india american expats in india indian classical music india tourism India Live TV (b) query refinement Fig. 1. Examples of query suggestions to support task-based search. suggestion ranking steps. In this paper, we focus exclusively on the first component. Our aim is to generate sufficiently many high-quality query suggestion candidates. The subsequent ranking step will then produce the final ordering of suggestions by reranking these candidates (and ensuring their diversity with respect to the possible subtasks). The first research question we address is: Can existing query suggestion methods generate high-quality query suggestions for task-based search? Specifically, we employ the popular suffix [7], neural language model [10], and sequence-to-sequence [12] approaches to generate candidate suggestions. The second research question we ask is: What are useful information sources for each method? We are particularly interested in finding out how a task-oriented knowledge base (Know-How [9]) and a community question answering site (WikiAnswers [3]) fare against using a query log (AOL [11]). We find that the sequence-to-sequence approach performs best among the tested three methods. As for data sources, we observe that, as expected, the query log is the highest performing one among all. Nevertheless, the other two also provide valuable suggestion candidates that cannot be generated from the query log. Overall, we find that all method-source configurations contribute unique suggestions, and thus it is beneficial to combine them. 2 Query Suggestion Generation Given a task-related initial query, q0 , we aim to generate a list of query suggestions that cover all the possible subtasks related to the task the user is trying to achieve. For a given suggestion q, let P (q|q0 ) denote the probability of that suggestion. Below, we present three methods from the literature. The first two methods are specialized only in producing query completions, while the third one is able to handle both query completions and refinements. Due to space constraints, only brief descriptions are given; we refer to the respective publications for further details. 2.1 Popular Suffix Model The popular suffix model [7] generates suggestions using frequently observed suffixes mined from a query log. The method generates a suggestion q by extending the input query q0 with a popular suffix s, i.e., q = q0 ⊕ s, where ⊕ denotes the concatenation operator. The query likelihood is based on the popularity of suffix s: P (q|q0 ) = pop(s), where pop(s) denotes the relative frequency of s occurring in the query log. Generating High-Quality Query Suggestion Candidates for Task-Based Search 2.2 3 Neural Language Model Neural language models (NLMs) can be used for generating query suggestions [10]. Suggestion q is created by extending the input query q0 character by character: q = q0 ⊕ s = (c1 , . . . , cn , cn+1 , . . . , cm ), where c1 , . . . , cn are the characters of q0 , and s = (cn+1 , . . . , cm ) are characters generated by the neural model. Given a sequence of previous characters c = (c1 , . . . , ci ), the model generates the next character (i ≥ n) according to: P (ci+1 |c) = softmax (hi ), where the hidden state vector at time i is computed using hi = f (xi , hi−1 ). Here, f denotes a special unit, e.g., a long short-term memory (LSTM) [5]; xi is the vector representation of the ith character of suggestion q and is taken to be xi = σ(ci ), where σ denotes a mapping function from a character to its vector representation. Finally, the query likelihood is estimated according to: P (q|q0 ) = m−1 Y P (cj+1 |c1 , . . . , cj ). j=n Our implementation uses a network of 512 hidden units. We initialize the word-embedded vector with the pre-trained vector from Bing queries.3 Beam search width is set to 30. 2.3 Sequence to Sequence Model The sequence-to-sequence model (Seq2Seq) [6] aims to directly model the conditional 0 |w1 , . . . , wn ) of translating a source sequence (w1 , . . . , wn ) probability P (w10 , . . . , wm 0 0 ). Thus, it lends itself naturally to implement our query to a target sequence (w1 , . . . , wm suggestion task using Seq2Seq, by letting the initial query be the source sequence q0 = 0 (w1 , . . . , wn ) and the suggestion be the target sequence q = (w10 , . . . , wm ). Typically, a Seq2Seq model consists of two main components: an encoder and a decoder. The encoder is a recurrent neural network (RNN) to compute a context vector representation c for the original query q0 . The hidden state vector of the encoder RNN at time i ∈ [1..n] is given by: hi = f (wi , hi−1 ), where wi is the ith word of the input query q0 , and f is a special unit (LSTM). The context vector representation is updated by c = φ(h1 , h2 , . . . , hn ), where φ is an operation choosing the last state hn . The decoder is another RNN to decompress the context vector c and output the 0 ), through a conditional language model. The hidden state suggestion, q = (w10 , . . . , wm 0 0 0 vector of the decoder RNN at time i ∈ [1..m] is given by hi = f 0 (hi−1 , wi−1 , c), where 0 wi is the ith word of the suggestion q, and f 0 is a special unit (LSTM). The language 0 0 0 0 0 model is given by: P (wi |w1 , . . . , wi−1 , q0 ) = g(hi , wi−1 , c), where g is a softmax classifier. Finally, the Seq2Seq model estimates the suggestion likelihood according to: P (q|q0 ) = m−1 Y 0 P (wj+1 |w10 , . . . , wj0 , q0 ) . j=1 We use a bidirectional GRU unit with size 100 for encoder RNNs, and a GRU unit with size 200 for decoder RNNs. We employ an Adam optimizer with an initial learning rate of 10−4 and a dropout rate of 0.5. Beam search width is set to 100. 3 https://www.microsoft.com/en-us/download/details.aspx?id=52597 4 Heng Ding, Shuo Zhang, Darı́o Garigliotti, and Krisztian Balog 3 Data Sources We consider three independent information sources. For the PopSuffix and NLM methods, we need a collection of short texts, C. For Seq2Seq, we need pairs of questionsuggestion pairs, hQ, Si. – AOL query log [11]: a large query log that includes queries along with anonymous user identity and timestamp. We extract all queries from the log as C. We detect sessions (each session including multiple queries) using the same criterion as in [12]. Then, we pair queries in the same session to obtain hQ, Si, where Q denotes a set of queries and S are suggestions paired against Q. In order to obtain more pairs, we extract all proper prefixes from the query, and pair them together. For example, given a query “make a pancake”, we can construct two pairs h “make”, “make a pancake” i and h “make a”, “make a pancake” i. This way, we end up with a total of 112K prefix-query pairs. – KnowHow [9]: a knowledge base that consists of two and half million entries. Each triple hs, p, oi represents a fact about a human task, where the subject s denotes a task (e.g., “make a pancake”) and the object o is a subtask (e.g., “prepare the mix”). We collect all subjects and objects as C, and take all (142K) subject-object pairs to form hQ, Si. Additionally, prefixes from tasks (i.e., subjects and objects) are extracted to get more pairs, the same way as it is done for the AOL query log. – WikiAnswers [3]: a collection of questions scraped from WikiAnswers.com.4 We detect task-related questions using a simple heuristic, namely, that a task-related question often starts with question constructions “how do you” or “how to.” These question constructions are removed from the questions to obtain C (e.g, “how to change gmail password” → “change gmail password”). This source can only be used for the PopSuffix and NLM methods, as it does not provide pairs for Seq2Seq. 4 Experiment We design and conduct an experiment to answers our research questions. First, we collect a pool of candidate suggestions, by applying the methods on different sources. Second, we collect annotations for each of these suggestions via crowdsourcing. Finally, we report and analyze the results. 4.1 Pool Construction We consider all queries (100 in total) from the TREC 2015 and 2016 Tasks tracks [13, 14]. We combine the proposed methods (Sect. 2) with various information sources (Sect. 3) for suggesting candidates. We shall write s-m to denote a particular configuration that uses method m with source s. In addition, we also include the suggestions generated by (i) the keyphrase-based query suggestion system [4], and (ii) the Google Query Suggestion Service (referred to as Google API for short. Two pools are constructed, one for query completions (QC) and one for query refinements (QR). The pool depth is 20, that is, we consider (up to) the top-20 suggestions for each method. 4 http://www.answers.com/Q/ Generating High-Quality Query Suggestion Candidates for Task-Based Search Method QC P@10 P@20 R CR QR P@10 P@20 AOL-PopSuffix KnowHow-PopSuffix WikiAnswers-PopSuffix AOL-NLM KnowHow-NLM WikiAnswers-NLM AOL-Seq2Seq KnowHow-Seq2Seq 0.257 0.195 0.181 0.256 0.166 0.163 0.283 0.158 0.245 0.170 0.167 0.241 0.147 0.121 0.181 0.111 0.168 0.102 0.101 0.170 0.108 0.088 0.156 0.079 0.168 0.256 0.333 0.474 0.575 0.650 0.765 0.813 0.043 0.206 0.031 0.148 Keyphrase-based [4] Google API 0.321 0.267 0.239 0.134 0.130 0.078 - 0.575 0.289 0.504 0.145 5 Table 1. Precision for candidate suggestions generated by different configurations. For QC methods, we also report on recall (R) and cumulative recall (CR). 4.2 Crowdsourcing Due to the fact that many of our candidate suggestions lack assessments in the TREC ground truth (and thus are considered irrelevant), we obtain relevance assessments for all suggestions via crowdsourcing. Specifically, we use the Crowdflower platform, where a dynamic number of annotators (3-5) are asked to label each suggestion as relevant or non-relevant. A suggestion is relevant if it targets for some more specific aspect of the original query, i.e., the suggestion must be related to the original query intent. It does not have to be perfectly correct grammatically, as long as the intent behind is clearly understandable. The final label is taken to be the majority vote among the assessors. A total of 12,790 QC and 9,608 QR suggestions are annotated, at the total expense of 692$. Further details are available in the online appendix.5 4.3 Results and Analysis Table 1 presents a comparison of methods in terms of precision at cutoff points 10 and 20 (P@10 and P@20). Overall, we find that our methods can generate high-quality query suggestions for task-based search. Our best numbers are comparable to that of the Google API. It should, however, be noted that the Google API can only generate a limited number of suggestions for each query. The keyphrase-based method [4] is the highest performing of all; it is expected, as it combines multiple information sources, including suggestions from Google. We find that the AOL query log is the best source for generating QC suggestions, while KnowHow works well for QR. AOL-Seq2Seq performs poorly on QR; this is because only 2% of all training instances in hQ, Si are QR pairs. For QC suggestions, the performance of AOL-PopSuffix and AOL-NLM are close to that of the Google API, while AOL-Seq2Seq even outperforms it. For QR suggestions, the performance of AOL-Seq2Seq is close to that of the Google API in terms of P@20, but is lower 5 http://bit.ly/2BnSjhR 6 Heng Ding, Shuo Zhang, Darı́o Garigliotti, and Krisztian Balog on P@10. In general, our system is able to produce more suggestions than what the (public) Google API provides. Additionally, we also evaluate the recall of each QC method, using all relevant suggestions found as our recall base. We further report on cumulative recall, i.e., for line i of Table 1 it is the recall of methods from lines 1..i combined together. We observe that each configuration brings a considerable improvement to cumulative recall. This shows that they generate unique query suggestions. For example, given the query “choose bathroom,” our system generates unique query suggestions from different methods and sources, e.g., “choose bathroom marks” (WikiAnswers-NLM), “choose bathroom supply” (AOL-NLM), “choose bathroom for your children” (KnowHow-NLM), “choose bathroom grout” and “choose bathroom appliances” (KnowHow-Seq2Seq), which are beyond what the Google API and the keyphrase-based system [4] provide. Therefore it is beneficial to combine suggestions from multiple configurations for further reranking. 5 Conclusions We have addressed the task of generating query suggestions that can assist users in completing their tasks. We have focused on the first component of a two-step pipeline, dedicated to creating suggestion candidates. For this, we have considered several methods and multiple information sources. We have based our evaluation on the TREC Tasks track, and collected a large number of annotations via crowdsourcing. Our results have shown that we are able to generate high-quality suggestion candidates. We have further observed that the different methods and information sources lead to distinct candidates. As our next step, we will focus on the second component of the pipeline, namely, suggestions ranking. As part of this component, we also plan to address the specific issue of subtasks coverage, i.e., improving the diversity of query suggestions. Bibliography [1] S. Bhatia, D. Majumdar, and P. Mitra. Query suggestions in the absence of query logs. In Proc. of SIGIR ’11, pages 795–804, 2011. [2] F. Cai and M. de Rijke. A Survey of Query Auto Completion in Information Retrieval. Now Publishers Inc., Hanover, MA, USA, 2016. [3] A. Fader, L. Zettlemoyer, and O. Etzioni. Open Question Answering Over Curated and Extracted Knowledge Bases. In Proc. of KDD ’14, 2014. [4] D. Garigliotti and K. Balog. Generating query suggestions to support task-based search. In Proc. of SIGIR ’17, pages 1153–1156, 2017. [5] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Comput., 9:1735–1780, 1997. [6] M. Luong, H. Pham, and C. D. Manning. Effective Approaches to Attention-based Neural Machine Translation, 2015. [7] B. Mitra and N. Craswell. Query auto-completion for rare prefixes. In Proc. of CIKM ’15, pages 1755–1758, 2015. [8] U. Ozertem, O. Chapelle, P. Donmez, and E. Velipasaoglu. Learning to suggest: A machine learning framework for ranking query suggestions. In Proc. of SIGIR ’ 12, pages 25–34, 2012. [9] P. Pareti, B. Testu, R. Ichise, E. Klein, and A. Barker. Integrating Know-How into the Linked Data Cloud, 2016. [10] D. H. Park and R. Chiba. A neural language model for query auto-completion. In Proc. of SIGIR ’17, pages 1189–1192, 2017. [11] G. Pass, A. Chowdhury, and C. Torgeson. A picture of search. In Proc. of InfoScale ’06, 2006. [12] A. Sordoni, Y. Bengio, H. Vahabi, C. Lioma, J. Grue Simonsen, and J.-Y. Nie. A hierarchical recurrent encoder-decoder for generative context-aware query suggestion. In Proc. of CIKM ’15, pages 553–562, 2015. [13] M. Verma, E. Kanoulas, E. Yilmaz, R. Mehrotra, B. Carterette, N. Craswell, and P. Bailey. Overview of the TREC tasks track 2016. In Proc. of TREC ’16, 2016. [14] E. Yilmaz, M. Verma, R. Mehrotra, E. Kanoulas, B. Carterette, and N. Craswell. Overview of the TREC 2015 tasks track. In Proc. of TREC ’15, 2015.
2cs.AI
1 Hybrid Urban Navigation for Smart Cities arXiv:1705.01516v1 [cs.SY] 3 May 2017 Oisı́n Moran*, Robert Gilmore*, Rodrigo Ordóñez-Hurtado and Robert Shorten Abstract This paper proposes a design for a hybrid, city-wide urban navigation system for moving agents demanding dedicated assistance. The hybrid system combines GPS and vehicle-to-vehicle communication from an ad-hoc network of parked cars, and RFID from fixed infrastructure –such as smart traffic lights– to enable a safely navigable city. Applications for such a system include high-speed drone navigation and directing visually impaired pedestrians. I. I NTRODUCTION Driven by increasing urban populations, ageing citizens, and an ever increasing need to make better use of existing resources, the smart city agenda has become one of the most defining research paradigms of recent times. At the heart of this research agenda is the need for services that require precise localisation and rapid navigation. Examples of such services include drones to assist emergency This work was partially supported by Science Foundation Ireland grant 11/PI/1177. *Joint first authors. O. Moran, R. Gilmore, R. Ordóñez-Hurtado and R. Shorten are with University College Dublin, School of Electrical, Electronic and Communications Engineering, Belfield, Dublin 4, Ireland. Emails: [email protected], [email protected], [email protected], [email protected]. 2 response units, and providing assistance to citizens with special needs. Thus, it is very likely that locating, controlling and feedback will be key enablers for a plethora of future city services. Despite the obvious need for such services, their realisation is not without significant challenges. Many services that we wish to develop require precise and rapid navigation (drones to support emergency response) but should function even in the partial absence of power or sensor coverage, and at the same time be non-invasive and respect the privacy concerns of modern society. Current navigation systems rely heavily on Global Navigation Satellite Systems (GNSSs) such as GPS and GLONASS, despite the fact that in urban environments GNSSs’ signals are in general inaccurate. A consequence of such inaccuracies is increased power consumption (drifting around desired paths or waypoints will result in longer times to successfully complete a journey). As a result, drone navigation in urban scenarios tends to be vision-based, which is seen by many as a major privacy concern. Thus the objective of this paper is to propose a viable alternative to vision based systems that addresses some of these drawbacks. Combining multiple types of sensing could provide the accuracy needed for dedicated autonomous navigation in cities, this paper focuses on creating such a system. As it would be virtually impossible (or at least impractical) to instrument an entire city with battery-powered devices using traditional infrastructure, we propose merging conventional and non-conventional approaches to create a system that is a hybrid of high and low power sensing devices, and a hybrid of high and low precision positioning technologies. We argue that this type of system is the key to enabling large-scale robust, accurate, and rapid localisation of moving agents within a city. For this, we propose to use an Ultra Wide Band (UWB) based system for the dense coverage of high power sensing, and propose to use a passive (cheap and zero power on the agent side) Radio Frequency Identification (RFID) based system for the sparser coverage of low power “last-mile” sensing. 3 The proposed hybrid system of wireless devices could be created by installing elements in the current city environment by either taking advantage of current infrastructure or by adding new sensors to the fleet of vehicles involved in ad-hoc networks. The latter approach, following [1] also enables the possibility of alternative monetization platforms for connected vehicles, with a car owner potentially receiving micro-payments to participate in the network. Providing such a network of collaborative technologies offers a broader coverage of an urban environment. Such a dense and expansive network provides the possibility of creating accurate, real-time sensory systems using multiple technologies to improve localisation, which results in the creation of new, safe and robust navigation opportunities. Using passive RFID tags, for example, has the benefit of ensuring an agent is not restricted by the battery life of a sensor. This in effect produces a “Zero Power” consuming sensor as the reflected radio waves in well-designed applications are enough to give adequate localisation in the event of a loss of power, representing a great advantage over traditional applications. In addition to this, this paper also investigates the viability of using a new style of static but flexible infrastructure, namely ad-hoc networks of parked cars, and how the potential services they provide may be able to support a multi-technology sensory system for localisation and navigation. In summary, we aim to make possible rapid urban navigation for specialised moving agents, such as drones for emergency response and priority delivery or fully autonomous vehicles, by the adoption of a hybrid tracking/localisation system which enables wider coverage than conventional systems and a contingency method in cases of power shortages on the agent side. The efficacy of the proposed system is demonstrated by means of two important use-cases: (i) rapid drone navigation in an urban environment; and (ii) the development of a smart traffic light system to assist citizens with special needs. 4 II. E NABLING T ECHNOLOGIES This paper investigates a number of technologies that could collect the data required to localise and track moving agents for control purposes. The infrastructure in which such technologies could be implemented, and the motivation for such a system, derive in part from the idea of a fluid infrastructure – a system that can provide complete coverage from permanently fixed and temporarily stationary network nodes (road side units and parked cars respectively). This system would provide the opportunity to instrument a city and localise an agent at virtually every point of an agent’s traversal through an urban environment. The road side units could be adorned with RFID technology to allow “Zero Power” sensing in critical locations, while UWB technology could be implemented as part of a new fluid infrastructure utilising parked cars. The system and technologies are described in depth in the following section. A. Parked Cars as Infrastructure Cars are parked for up to 95% of their lifespan [2] and practically serve no purpose in such a state other than the economic drain of occupying valuable space. However, as an underutilised network of dense sensors, these otherwise idle cars lend themselves to new, creative and useful applications. For example they have been proposed for a wide variety of dedicated tasks from finding missing keys to detecting gas leaks [3]. Additionally, with an increasing number of sensors, greater connectivity, and a move toward the car becoming a service platform, these potential use cases will only increase. Traditional infrastructure is generally expensive to set up and also to repair and maintain. Using cars as infrastructure effectively eliminates these costs, as the fleet is gradually refreshed. This system also has the extra benefit of upgrading itself over time in contrast to the stagnation or degradation associated with traditional infrastructure. The large number of cars in cities and their spatiotemporal stability 5 (staying in the same place for a long time) will also prove to be of great benefit. The implementation in question here is the integration of UWB antenna nodes within vehicles to act as data collectors and processing units for accurate position estimation purposes. B. Ultra Wide Band Technology With the recent explosion in the use of unmanned aerial vehicles (UAV), we have witnessed the legal landscape change (often not rapidly enough) in response to the real and perceived threats of drones. With vision-based navigation approaches proving so popular, the potential for the erosion of privacy becomes a growing and valid concern, with the additional downside that the performance of vision-based approaches rapidly deteriorates under poor weather conditions. For applications where the end goal is not necessarily itself a visual task (such as delivering a package), and where privacy issues may be of great concern, it would be helpful to have a precise and rapid approach to navigation that is not dependent on the availability of a camera or other vision sensors. Even in cases requiring visual feedback, such as a fire station wishing to ascertain the existence or severity of a fire, having a system capable of navigating to the intended location without the need for a trained operator would save precious time for the firefighters who would now only need to be present for the final stage. Currently, the closest option available to a precise and rapid non-vision-based approach would be the use of GPS which is not without its own technical drawbacks. A number of factors such as satellite position, signal attenuation, and clocking errors cause typical GPS applications to experience positioning errors of up to 30 m on average, while the advanced version DGPS still yields an average error of 5 m to 10 m in a variety of environments [4]. These positioning errors, specially those from conventional GPS, cannot be neglected in comparison with the average dimension of a drone (tens of centimeters). As with any traditional GNSS system, 6 the accuracy of GPS can also be greatly affected by atmospheric/environmental conditions, shadowing by buildings, and multipath propagation which is especially problematic in dense urban environments [5], [1]. While there exist different demonstrations of GPS-only (i.e. non-cooperative) approaches for drone navigation, such as [6], these are all invariably done in favourable conditions such as in open fields with no tall buildings. As any inaccuracies in position estimation convert directly to speed reductions for waypoint tracking tasks, any increase in accuracy is highly desirable for time-critical applications. For emergency applications such as the defibrillator drone designed by Alec Momont [7], these time savings could make all the difference for a victim of an out-of-hospital cardiac arrest where every minute that passes without treatment (CPR, defibrillatory shock, or definitive care) decreases his or her survival rate by around 5.5% [8]. Our proposed system will thus attempt to solve both challenging issues: navigation speed and privacy. It will do so by using stationary cars as anchor (reference) nodes in a cooperative positioning approach. The cars will average out measurements of their GPS location, thereby reducing the error in their estimation of their location, and will only be added to the network after they have been stationary for a sufficient period of time (decided by a suitable performance index). Involved cars and the drone are required to be equipped with UWB-based systems to accurately estimate the distances between them and cooperatively localize the drone. In this paper we use UWB as a means to emulate current V2V communication systems based on Dedicated Short Range Communications (DSRC), but a UWB module could be easily added to the growing sensory array found in cars. Thus, as there is no imaging equipment involved in this approach, then no privacy concerns arise. However, UWB-based systems depend on the availability of local power, so there is a gap in the system when power shortages occur in the host agent (i.e. UWB-based system is turned off due to the risk of a low battery level). In addition, as the density of cars in a city varies over space and time, there also exists 7 a possibility that the network of parked cars may not always be sufficient to support such a localisation system. From a business district which may become car-sparse at night, to a pedestrian crossing where there may be no parking spaces nearby, holes may arise in the otherwise connected system. A system without a fail-safe mechanism to allow, for example, a visually impaired person to cross a pedestrian crossing under any circumstance would be neither robust nor safe. We thus propose that a viable method to fill these gaps and thereby make the system more robust, must rely on “Zero Power” technology such as that found in RFID systems. C. RFID Technology RFID systems are now an ever present part of modern life (generally hidden from sight), with applications that range from collecting tolls and paying bills to gaining access to buildings [9]. In general, the traditional way of using RFID system is purely for identification purposes; however, by creating solutions that make use of different parameters, we find they are capable of much more. One such parameter that we will investigate in particular is the Received Signal Strength Indicator (RSSI) of a signal. For the case of urban navigation, we want to be able to distinguish the RSSI values from different tags to estimate the distances to them, and then to work towards the goal of implementing control systems based on that information. Despite the fact that the RSSI readings are generally noisy, some tactics can be employed to improve/augment the quality of the collected signals, and thus ensure that the information found is trustworthy and distinguishable enough to create a robustly controlled feedback system. Some relevant aspects when using RFID systems are the technical issues when working under Non Line of Sight (NLOS) scenarios, this is, when there are obstructions between the tag and the receiver, either a varying or stationary obstruction. This paper does not investigate how to 8 alleviate the concern of moving obstacles such as other road users (e.g., cars or people); however, there is already other research in this area (which can be further incorporated into our proposed approach). This paper focuses on applications in which RFID technology will not be affected by NLOS environments. In general, the environment will have a great impact on the measured RSSI values, however, with a suitable initial setup this issue can be alleviated. Deploying RFID antennas capable of producing RF signals with sufficient power to produce identifiable backscattered signals at critical locations (e.g., traffic lights, uncontrolled intersections) is where this technology most clearly shows its benefits. At these points, both RFID and UWB could be used collaboratively to provide more accurate estimations of an agent’s location. However, significantly at these critical locations, RFID could be used alone to determine the location and orientation of an agent in the event of a contingency related to power availability on the agent’s side. Passive RFID tags allow for “Zero Power” sensing on the agent’s side, which is of huge potential benefit as it alleviates the dangers of loss of power in areas where safety is of utmost concern (pedestrian direction along a pedestrian crossing) or at the end point of a journey (drone navigation). III. P ROPOSED I MPLEMENTATION Using both of the above technologies, namely UWB and RFID, integrated with parked cars as infrastructure, brings the potential to virtually cover a city with enough units/sensors to make it fully navigable using a cooperative approach, and with a contingency strategy for critical scenarios. A critical location is, in general, a location at which agents are most at risk, and where the risk of losing signal or battery power would have the greatest effect. A pedestrian crossing is a good example of such a location. Crossing, already a dangerous activity, has been made even more dangerous with the advent of “quiet cars” as more electric and hybrid cars take to the roads. Thus, reading the user’s location using both UWB and 9 RFID technologies in conjunction could direct a user safely across a road. Fig. 1. Potential infrastructure for urban navigation: pedestrians (moving agents), UWB-based systems (blue circles marked with A), RFID antennas (blue circles marked with B), and critical location (pedestrian crossing). Figure 1 illustrates a use-case scenario in which a visually impaired road user (a blind pedestrian) is directed using the UWB-based system for the largest section of their journey and then using both RFID and UWB, or RFID alone in critical zones. In the diagram, the cars are stationary (i.e. parked) and house UWB transceivers while the traffic light system would house the RFID antenna, thus adding functionality to existing infrastructure. In the case of battery power loss, a visually impaired road user will be safe when on the pavement and can continue their journey with confidence as they can re-orient themselves with reference to a known point – the edge of the pavement. However, at the critical and most dangerous point (the road crossing), no such reference is available. This is where the RFID system could provide feedback to the road user without need for any battery power on the agent’s side. Figure 2 visualises a system that could be of interest to the implementation of package delivery using drones. Many companies are investigating the feasibility of drone delivery systems and the approaches discussed in this paper may be able to accurately control and position drones for 10 this use. Again, the UWB positioning would be used for large-scale movement tracking, while RFID and UWB in conjunction could be used for more accurate positioning and orientation for docking, to ensure safe and timely delivery of products. Again, parked cars can be used as UWB anchors and RFID antennas could be installed like a traditional letterbox. RFID is useful in this use-case application for its potential even to control the orientation of the drone. Thus, in the case of a battery level at potentially critical level, then the UWB-based system could be turned off and the “Zero Power” RFID-based sensing system would be hugely beneficial to complete an agent’s journey successfully. Fig. 2. Potential infrastructure for drone delivery system: drone (moving agent), UWB-based systems (blue circles marked with A), and RFID antennas (blue circles marked with B). IV. E XPERIMENTAL R ESULTS A. Cooperative V2V navigation. Consistent indoor waypoint tracking has been successfully achieved using UWBbased Pozyx1 positioning system.The drone was able to navigate to within a 25 cm 1 https://www.pozyx.io/ 11 radius of each waypoint in a list, as demonstrated in Figure 3 and Movie A in Section V. 4000 y (mm) 3000 2000 1000 0 1000 2000 3000 4000 x (mm) Fig. 3. Position of drone during indoor waypoint navigation task as estimated by the Pozyx system. Position of drone is shown in blue and waypoints of radius 25 cm are shown in grey. Concerning tests in an urban-like scenario, we first established a GPS-only system as a benchmark for comparison reasons with respect to our cooperative proposed approach. The used location (periphery of UCD’s Science Centre) was chosen to be representative of an urban environment (see Figure 4) and as such was very close to tall buildings. As the GPS readings at this location (solid line in Figure 4)) contain positioning errors of high magnitude, the GPS-only system was unworkable in such an scenario, which provides a stronger justification to the 12 use of our approach. So far, in the steps toward a full proof of concept, we used the whole set of collected GPS data (4 hours of latitude, longitude, and HDOP readings, collected every 10 s) to obtain an improved position estimation by means of a weighted average described in [1]. Thus, every sample i is weighted by the factor λi given by HDOPi−2 λi = PN −2 j=1 HDOPj to finally obtain the average value represented with a blue circle in Figure 4, which is within a proximity of 2 m from the real location (yellow star). With these results, our next step will be the validation of the waypoint tracking in the outdoor scenario using the hybrid (GPS+UWB) positioning system, where the relative positioning can be obtained with high accuracy using the UWB anchors, and then the absolute position is estimated by merging the information from the weighted average of GPS positions. Such a validation process is currently being prepared. B. RFID localisation using RSSI measurements Characterising the relationship between RSSI readings and distance/orientation of moving agents carrying RFID tags is of utmost importance; this is to provide evidence that the backscattered RF signals are reliable and accurate enough to be used in navigational control systems. As mentioned previously, there are some limitations in the use of RFID technology, one of which being that the environment in which it is operated greatly impacts the readings obtained from tags. We have investigated this experimentally with a Parrot AR.Drone 2.0 covered by few tags, and the resulting curves displayed together in Figure 5. The differences in the returned RSSI values can be taken into account before making a decision in any control system, or the system could be constructed in a known location in which the environment is suitable. Something to note is that applications in a smart city 13 Fig. 4. GPS data (solid line) recorded every 10 s over 4 hours, versus weighted average (blue circle) and true location (yellow star). Black areas correspond to tall buildings (UCD’s Science Centre, Belfield, Dublin 4, Ireland). context will be more likely to involve outdoors environment where backscattering and multipath effects of RF waves will not be of much concern. The locations of such systems can be chosen to minimize dynamic changes in the environment, such as elevated locations including the top of traffic lights and lamp posts. Figure 5 shows the standard average over 20 s of RSSI readings per location, resulting in over 100 readings per location. This test was undertaken in multiple environments (enclosed/open) and operation modes (flying/held) to gain insight on how the location of the controllable agent would affect the returned RSSI values. For the enclosed laboratory, it is seen that for the first 2 m, the curve can 14 be characterised as a straight line, whereas at further distances it would be more difficult to determine where the tag is located. There is a one-to-many relationship caused by multipath effects in such an environment. This would not be the case in an outdoor environment as proven by the straight line relationship seen in the more open and unobstructed laboratory. Furthermore, it is useful to note that the RSSI values are of larger magnitude in the open lab, which is likely due to the reduction in multipath reflected return signals that would reduce the average value over the experimental test period. 90 Enclosed Lab, Held Enclosed Lab, Flying 85 Open Lab, Held RSSI Value Long Corridor, Held 80 75 70 65 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Distance (m) Fig. 5. RSSI curves for a tag a placed on drone in different environments and operation modes. Each point correspond to the standard average of over 100 reading collected over 20 s. 1) Distance Estimation: The results displayed in Figure 6 are for distance estimation of a drone carrying multiple tags with respect to two RFID antennas. The antennas were situated at either end of a straight line, with the tags on the 15 drone orientated perpendicularly with respect to the plane of the surface of both antennas. It should be noted here that despite the fact that maximum/minimum readings have a large variation the inter-quartile ranges are relatively small and do not overlap. In this experiment the RFID tags were interrogated for 10 s per data point which equated to no less than 80 returned RSSI values. 3 Distance (m) 2.5 2 1.5 1 0.5 0 0.5m 1m 1.25m 1.5m 2m Set of Distances Dataset Fig. 6. RSSI curve for tags attached to a drone at data points located in between 2 antennas, in an open laboratory. Each data point was interrogated for 10 s, which resulted in over 80 values per data point. Now that we can characterise the relationship between RSSI and distance, a Java script was developed to record the RFID-based position estimations. The information shown in Table I reveals that the system is accurate to within 13 cm, which is relevant enough for the dimensions of the test drone (51.7 cm x 51.7 cm). Figure 7 displays the information recorded during a straight line flight test, in which a simple control system is implemented. A destination point was set and 16 TABLE I. RFID- BASED POSITION ESTIMATION : AVERAGED POSITIONING ERROR IN RECORDED ESTIMATIONS True Dist (m) 0.5 1 1.5 2 2.5 Avg Recorded Dist (m) 0.6023 1.0449 1.3011 1.4738 2.1338 Error (m) -0.1023 -0.0449 -0.0511 0.0262 -0.1338 S.Deviation (m) 0.0489 0.0503 0.0422 0.0212 0.0622 the drone placed by the user at a point away from the destination. In this case, the starting point was 0.8 m from the reference antenna, and the destination was 1.25 m from the reference antenna. The RFID system collected the RSSI values and converted them to a distance; this estimation using RFID is shown in Figure 7. For comparison, the approximate ground truth was measured by the Pozyx system. A link to a video of this in operation can be found in Section V. 2 1.8 1.6 1.4 Distance (m) 1.2 1 0.8 RFID Data 0.6 Pozxy Data 0.4 0.2 0 0 Fig. 7. 5 10 Time (seconds) 15 Location estimation from RFID system and Pozxy system: 0.8 m to 1.25 m. 20 17 2) Angle Estimation: For many applications, the orientation of an agent is useful or even necessary. Investigations into how the comparison of multiple tags positioned (at known locations) on one agent has been undertaken here. Emphasis is placed on analysing the differences in returning RF signals, that when processed could track orientation in real-time. The results prove that not only distance can be accurately measured using RFID, but a relationship can be formed that converts the differences in RSSI to corresponding angles. An example of this data collected from 2 different tags on one side of the drone is shown in Figure 8, in which an roughly linear relationship is observed. Furthermore, Table II shows that the error between the true angle and the recorded angle using RFID technology is on average less than 1.1 degrees over a time period of 5 s. 20 y = -0.3526x + 15.23 15 Difference in RSSI 10 5 0 0 10 20 30 40 50 60 70 80 90 -5 -10 -15 -20 Angle (Degrees) Fig. 8. RSSI curve for the difference between the average value from 2 tags affixed to one side of the drone with 40 cm of separation. 18 When implemented in a control system, the drone could be rotated to any orientation within the range: ± 45 degrees. However, it was noted that the accuracy of the system seems to improve the closer the drone’s orientation was to zero degrees (i.e. perpendicular to the antenna). Figure 9 displays the orientation as recorded by the RFID reader and by the drone’s IMU. A link to a video of this in operation can be found in Section V. 40 35 RFID Data 30 Drone Data Angle (degrees) 25 20 15 10 5 0 -5 -10 0 Fig. 9. 20 40 60 Sample Number 80 Angle estimation from RFID system and drone’s accelerometer: +30 to 0 degrees. 3) Control Systems and Applications: With the information collected and proof that there is enough accuracy to recognise both distance and angle, it is clear that passive RFID tags can be used as zero power sensors in highly critical areas, alleviating fears of loss of power. From this, ideas of personal and airborne navigation through adding tags to moving agents are both feasible and accurate. A 19 TABLE II. RFID- BASED ANGLE ESTIMATION : AVERAGE ESTIMATION ERROR IN RECORDED ESTIMATIONS True Angle (◦ ) Avg Angle Found (◦ ) Error (◦ ) S. Deviation (◦ ) 0 -30 30 -15 15 0.6570 -30.2382 30.7499 -16.0704 15.6625 -0.6570 0.2382 -0.7499 1.0704 -0.6625 1.1135 1.2762 1.0035 0.8030 0.6567 system has already been developed using the results found in this paper, in which the tags alone can distinguish at which angle and position an agent is located, and offer navigation assistance to direct that agent. As discussed above, we imagine that this could be used to aid road crossing with auditory or vibratory feedback given through a user’s smartphone or the traffic light system itself. We further imagine that the sequence of traffic lights could be altered to ensure safety of the pedestrian. Using the difference in the RSSI values, it has been found that an agent can be directed to a centre line between 2 antennas, and from there the agent can be accurately maneuvered along such an straight line, as illustrated in Figure 10. Furthermore, using RSSI to estimate the distance of an agent from an antenna accurately in a straight line means that an agent can be controlled and moved/directed to a set location. This has been achieved in airborne tests using a Parrot AR Drone 2.0 and AutoFlight V. 2 drone control software. D EMONSTRATIONS We have prepared a set of movies to demonstrate the key salient points of our results. Movie A (Indoor Waypoint Navigation): Video demonstrating indoor waypoint tracking to a tolerance of 25 cm. Position is estimated by using 4 Pozyx 2 https://electronics.kitchen/autoflight 20 Fig. 10. Example of RFID setup for feedback control of a moving agent. anchors (UWB) to localize one tag located on the drone. Link: https://youtu.be/pnRgJtCT_Uw Movie B (Location Control of Drone using RFID): Video demonstrating control of drone’s location in one dimension to a tolerance of 10 cm, using RSSI readings from two tags, from two antennas. Link: https://youtu.be/cm7VHIjtH_U Movie C (Orientation Control of Drone using RFID): Video demonstrating control of drone’s orientation to a tolerance of 3 degrees, using RSSI readings from two tags, from one antenna. Link: https://youtu.be/bQjGTuhpIBQ VI. C ONCLUSIONS This paper explores the potential to use a number of technologies in a new and complementary way, to redefine how we look at possible infrastructures and implementations to provide city-wide navigation and control. There is huge scope for extension to this work, in refinement and in developing practical working systems that could be put into operation in minimal time. Using both UWB and RFID technologies, allows for a robust and reliable system that reduces the risk in the case of low battery or power shortages situations, maintaining safety at all times. Overall the work completed here has great potential for improving the daily 21 lives of commuters and residents through the implementation of smart services within the city of the future. R EFERENCES [1] R. H. Ordonez-Hurtado, E. Crisostomi, and R. N. Shorten, “An assessment on the use of stationary vehicles to support cooperative positioning systems,” International Journal of Control, 2017. In press. [2] C. Sommer, D. Eckhoff, and F. Dressler, “IVC in cities: Signal attenuation by buildings and how parked cars can improve the situation,” IEEE Transactions on Mobile Computing, vol. 13, pp. 1733–1745, August 2014. [3] S. Zhuk, T. Tchrakian, S. Moore, R. Ordonez-Hurtado, and R. Shorten, “On source-term parameter estimation for linear advection-diffusion equations with uncertain coefficients,” SIAM Journal on Scientific Computing, vol. 38, no. 4, pp. A2334–A2356, 2016. [4] W.-H. Kuo and S.-H. Fang, “The impact of GPS positioning errors on the hop distance in vehicular adhoc networks (VANETs),” in International Conference on Computing, Networking and Communications (ICNC), 2013. [5] R. H. Ordonez-Hurtado and R. N. Shorten, “Using stationary vehicles to enhance cooperative positioning in vehicular ad-hoc networks,” in 2014 International Conference on Connected Vehicles and Expo (ICCVE), pp. 867–868, Nov 2014. [6] L. V. Santana, A. S. Brandão, and M. Sarcinelli-Filho, “Outdoor waypoint navigation with the AR.Drone quadrotor,” in International Conference on Unmanned Aircraft Systems (ICUAS), 2015. [7] A. Moment, “Dronesforgood.” http://www.alecmomont.com/projects/dronesforgood/. Not to be confused with The UAE Drones for Good Award. [8] M. P. Larsen, M. S. Eisenberg, R. O. Cummins, and A. P. Hallstrom, “Predicting survival from out-ofhospital cardiac arrest: a graphic model.” Annals of Emergency Medicine, 1993. [9] J. Landt, “The history of RFID,” IEEE Potentials, vol. 24, pp. 8–11, Oct. 2005.
3cs.SY
arXiv:0802.0914v1 [q-bio.PE] 7 Feb 2008 Shrinkage Effect in Ancestral Maximum Likelihood Elchanan Mossel∗ Sebastien Roch† Mike Steel ‡ December 17, 2017 Abstract Ancestral maximum likelihood (AML) is a method that simultaneously reconstructs a phylogenetic tree and ancestral sequences from extant data (sequences at the leaves). The tree and ancestral sequences maximize the probability of observing the given data under a Markov model of sequence evolution, in which branch lengths are also optimized but constrained to take the same value on any edge across all sequence sites. AML differs from the more usual form of maximum likelihood (ML) in phylogenetics because ML averages over all possible ancestral sequences. ML has long been know to be statistically consistent – that is, it converges on the correct tree with probability approaching 1 as the sequence length grows. However, the statistical consistency of AML has not been formally determined, despite informal remarks in a literature that dates back 20 years. In this short note we prove a general result that implies that AML is statistically inconsistent. In particular we show that AML can ‘shrink’ short edges in a tree, resulting in a tree that has no internal resolution as the sequence length grows. Our results apply to any number of taxa. ∗ Email: [email protected]. Depts. of Statistics and Computer Science, U.C. Berkeley. Supported by an Alfred Sloan fellowship in Mathematics, by NSF grants DMS-0528488, DMS0548249 (CAREER), and by DOD ONR grant N0014-07-1-05-06. † Email: [email protected]. Theory Group, Microsoft Research. ‡ Email: [email protected]. Biomathematics Research Centre, University of Canterbury, Christchurch, New Zealand 1 1 Introduction Markov models of site substitution in DNA are the basis for most methods for inferring phylogenies (evolutionary trees) from aligned sequence data. The usual approach is maximum likelihood (ML) which seeks the tree and branch lengths that maximizes the probability of generating the observed data under a Markov process. In the simplest setting one assumes that sites evolve independently and identically, and that the extant sequences (data) label the leaves of the tree – for background on phylogenetics and ML see [9]. ML is computational complicated, and even the problem of finding the optimal branch lengths exactly on a fixed tree has unknown complexity. In ML one considers all possible ancestral sequences that could have existed within the tree, and averages each such ‘scenario’ by its probability. An alternative is to simply consider a single choice of ancestral sequences that has the highest probability – this is a variant of ML that was introduced in 1987 by Barry and Hartigan [3] under the name ‘most parsimonious likelihood’, and which later was renamed ancestral maximum likelihood (AML) (see e.g. [1]). The computational complexity of AML is slightly easier than ML, in that given the tree and either the optimal branch lengths or the optimal ancestral sequences, the other ‘unknown’ (ancestral sequences or branch length) is readily determined (see eg. [2]). The method can be viewed as being, in some sense, intermediate between ML and a primitive cladistic method, maximum parsimony (MP), which seeks the tree and ancestral sequences that minimizes the total number of sites substitutions required to describe the data. Indeed, AML would select the same trees as MP if one further constrained AML so that each edge had the same branch length, as shown in [10]. The recent interest in AML has sprung from computational complexity considerations. Firstly, AML seemed to provide a promising route by which to show that the problem of reconstructing an ML tree from sequences is NP-hard [1, 6]. It turned out that the NP-hardness of ML can be established directly, without invoking AML [15], however the relative computational simplicity of AML over ML suggests it may provide an alternative strategy for reconstructing large trees. Nevertheless, it is important to know whether the desirable statistical properties of ML carry over to methods such as AML. In particular ML has long been known to be statistically consistent as a way of estimating tree topologies – that is, as the sequence length grows, the probability that ML will reconstruct the tree that generated the sequences tends to 1. It has also been known (since 1978) that more primitive methods, such as MP, can be statistically inconsistent [8]. However the statistical consistency of AML is unclear, since the standard 2 Wald-style conditions required to prove consistency (in particular a fixed parameter space that does not grow with the size of the data) does not apply. Thus, one may suspect that AML might be inconsistent, and indeed remarks in the literature have suggested this could be the case (see [4], [11]). However the absence of a sufficient condition to prove consistency does not constitute proof of inconsistency, and the purpose of this short note is to formally show that AML is statistically inconsistent. More precisely we show that AML tends to ‘shrink’ short edges in a tree, and this can result in the collapse of the interior edges (and any short pendant edges) to produce a star tree. The results in this paper rely on probability arguments, based on expansions of the entropy function, and combinatorial properties of minimal sets of edges that separate each pair of leaves in a tree. 1.1 Problem Statement CFN model We define [n] = {0, . . . , n − 1} and we deal with the CavenderFarris-Neyman (CFN) model [5, 7, 13]. Definition 1 (CFN model) We are given a tree T = (V, E) on n leaves labelled [n] and an assignment of edge probabilities p : E → (0, 1/2). A realization of the model is obtained as follows: choose any vertex as a root; pick a state for the root uniformly at random in {0, 1}; moving away from the root, each edge e flips the state of its ancestor with probability pe . We denote by X the (random) state at the leaves obtained in this manner. We write X ∼ CFN(T, p). Ancestral Maximum Likelihood We consider two equivalent formulations of the Ancestral Maximum Likelihood problem. The second version is obtained by setting de pe = , (1) k for all e in the first version [1]. Definition 2 (AML, Version 1) The Ancestral Maximum Likelihood (AML) problem can be stated as follows. Given a set of n binary sequences of length k, find a tree T = (V, E) on n leaves, an assignment p : E → [0, 1/2] of edge probabilities, and an assignment of sequences λ : V → {0, 1}k to the vertices such that: 1. The sequences at the leaves under λ are exactly the sequences from S; 3 2. The quantity L(T, p | λ) = − log2 Y pde e (1 − pe )k−de e∈E is minimized, where ! , du,v = kλu − λv k1 . Definition 3 (AML, Version 2 [1]) The Ancestral Maximum Likelihood (AML) problem can alternatively be stated as follows. Given a set of n binary sequences of length k, find a tree T on n leaves and an assignment of sequences λ : V → {0, 1}k to the vertices such that: 1. The sequences at the leaves under λ are exactly the sequences from S; 2. The quantity H(T | λ) = X H e∈E  de k  , is minimized, where recall that the entropy function is H(p) = −p log2 p − (1 − p) log2 (1 − p), for 0 ≤ p ≤ 1. (k) Consistency A phylogeny estimator Φ = {(Φn )n,k≥1} is a collection of mappings from sequences to trees, that is, (k) Φ(k) n : Bn → Tn , (k) where Bn is the set of all assignments of the form Bn(k) = {µ | µ : [n] → {0, 1}k }, and Tn is the set of all trees on n leaves labelled by [n]. Let X = {X1 , X2 , . . .} (k) with Xj : [n] → {0, 1} for n ≥ 1. For all k ≥ 1, we denote by µ = µX the (k) assignment in Bn such that (µv )j = (Xj )v for all v ∈ [n] and j = 1, . . . , k. Definition 4 (Consistency) A phylogeny estimator Φ is said to be (statistically) consistent if for all n, all trees T = (V, E) ∈ Tn , and all edge probability assignments p : E → (0, 1/2), it holds that (k) Φ(k) n (µX ) → T, almost surely as k → +∞, where X = {X1 , X2 , . . .} with X1 , X2 , . . . independently generated by CFN(T, p). 4 1.2 Main Result Let ΦAML be the AML phylogeny estimator for AML Version 1, where all edges e with pe = 0 have been contracted and all edges e with pe = 1/2 have been removed. (Break ties arbitrarily.) Theorem 1 (AML Is Not Consistent) For all n ≥Q1 and each tree T = (V, E) ∈ Tn , there is a β > 0 and a shrinkage zone QT = e∈E Ie such that |Ie | > β for all e and if p ∈ QT , ΦAML returns a star rooted at 0 in the limit k → +∞ on the dataset X = {X1 , . . . Xk } with X1 , . . . , Xk independently generated by CFN(T, p). The phenomenon described in Theorem 1 is illustrated in Fig. 1. We note that our result does not imply the stronger statement that AML is “positively misleading” since we can think of the rooted star as the correct tree T where several edges are set to pe = 0. Note however that the solution is highly degenerate since the star can be obtained in this way from any tree. In other words, in the shrinkage zone, AML provides no information about the internal structure of the tree even with infinitely long sequences. 0 θe > 1 − δ 0 θe ≤ ǫ n−1 1 2 n n−1 1 n 2 Figure 1: The shrinkage effect: For the tree on the left, AML will reconstruct the star tree (right) from sufficiently long sequences 1.3 Organization We begin with some preliminary remarks in Section 2. The proof of Theorem 1 can be found in Section 3. 5 2 Preliminaries 2.1 Solution Properties (k) Fixed Extension Let T ∈ Tn . For an assignment of sequences µ ∈ Bn and 1 ≤ j ≤ k, we call χ : [n] → {0, 1} with χu = (µu )j for all u ∈ [n] the j-th character in µ. We write χ ∈ µ if there is j such that χ is the j-th character in µ. We also denote by χ# the number of characters in µ equal to χ. An extension of a character χ is a mapping χ̄ : V → {0, 1} such that χ̄v = χv for all v ∈ [n]. We denote by V(χ) the set of all extensions of χ on T . Let f : {0, 1}[n] → {0, 1}V −[n] . The mapping then defines an extension for all characters simultaneously by setting (χ̄f )v = χv for all v ∈ [n] and (χ̄f )v = f (χ)v for all v ∈ V − [n]. We show next that AML is in fact equivalent to finding such an f , which can significantly reduce (k) the size of the problem for large k. For a set of n binary sequences µ ∈ Bn and a tree T = (V, E) ∈ Tn , we denote by µ̄f the extension of µ to V by applying f as above to every character in µ. (k) Definition 5 (AML, Version 3) Given a set of n binary sequences µ ∈ Bn , find a tree T ∈ Tn and a mapping f : {0, 1}[n] → {0, 1}V −[n] such that the quantity X  de  H(T | µ̄f ) = H , k e∈E is minimized. Proposition 1 (AML, Version 3) There is always a solution of AML Version 1 and 2 of the form λ = µ̄f for some f : {0, 1}[n] → {0, 1}V −[n] . Proof: Note that L(T, p | λ) = − log2 Y pde e (1 − pe )k−de e∈E = −k X ! , log2 (1 − pe ) − e∈E k X X 1{(λu )j 6= (λv )j } log2 j=1 (u,v)∈E pe . 1 − pe For fixed p, since L “decomposes” in j, it is always possible to take the same extension for each character appearing in µ without affecting optimality. Then, we can choose the optimal p as in [1] to obtain the result.  6 Limit Problem Let T = (V, E) ∈ Tn . Assume as in Theorem 1 that we are given a dataset X = {X1 , X2 , . . .} with X1 , X2 , . . . i.i.d. CFN(T, p). Fix f : {0, 1}[n] → {0, 1}V −[n] . Let X ∼ CFN(T, p) and denote by Y = X̄f the (k) (k) extension of X under f . Also, let µ̄X,f be the extension of µX under f . By the (k) Law of Large Numbers, as k → +∞, the quantity H(T | µ̄X,f ) converges almost surely to X HX,T (f ) = H(Ye ), e∈E where, for e = (u, v), Ye is the indicator that Yu 6= Yv , and H(Ye ) is the entropy of Ye , that is, H(Ye ) = H(P[Yu 6= Yv ]). Note that, by Proposition 1, even as k → +∞ there are only a constant number of mappings f to consider. We say that f is HX,T -optimal if f minimizes HX,T (f ) over all f : {0, 1}[n] → {0, 1}V −[n] . The minimum need not be unique. Definition 6 (Expected AML) Given a random variable X taking values in {0, 1}[n], find a tree T = (V, E) ∈ Tn and a mapping f : {0, 1}[n] → {0, 1}V −[n] such that the quantity X HX,T (f ) = H(Ye ), e∈E is minimized, where Y = X̄f . By the previous remarks and (1), to prove Theorem 1 it suffices to show: Theorem 2 (Optimal Assignment) Let T ′ = (V ′ , Q E ′ ) ∈ Tn and let X ∼ CFN(T ′ , p). Then there is a β > 0 and a shrinkage zone QT = e∈E Ie such that |Ie | > β for all e and for all for all T = (V, E) ∈ Tn , the unique HX,T -optimal f : {0, 1}[n] → {0, 1}V −[n] assigns to all internal nodes of V the value at leaf 0 under all characters, that is, f (x) = (x0 , . . . , x0 ), for all x ∈ {0, 1}[n]. 2.2 Minimal Isolating Sets Definition In preparation for our proof of Theorem 2, we will need the following notion which is studied in [12]. 7 Definition 7 (Isolating Set) Let T = (V, E) be a tree. A subset S of E is called an isolating set for T if for any two leaves u, v there exists an edge e ∈ S on the path connecting u and v. The following result is proved in [12]. Proposition 2 (Minimal Isolating Set) The size of a minimal isolating set on an n-leaf tree is n − 1. We will also need: Proposition 3 (One Leaf Per Component) Let T be a tree on n leaves and let S be a minimal isolating set on T . Consider the forest F obtained from T by removing all edges in S. Then, each component of F contains exactly one leaf of T. Proof: If a component of F contains two leaves, then these cannot be isolated under S, a contradiction. On the other hand, if a component T ′ of F does not contain a leaf, then every edge adjacent to T ′ in T is in fact in S. But then one can remove one of these edges without losing the isolating property of S, contradicting the minimality of S.  Minimally Isolating f Let T = (V, E) ∈ Tn and f : {0, 1}[n] → {0, 1}V −[n] . We denote by Sf ⊆ E the set of edges e = (u, v) such that there is x ∈ {0, 1}[n] with f (x)u 6= f (x)v . Definition 8 (Minimally Isolating f ) We say that f is minimally isolating for T if Sf is a minimal isolating set of T . 2.3 Random cluster parameterization We will sometimes require a different (‘random cluster’) parameterization of the CFN model. Let T ∈ Tn and p ∈ [0, 1]E . (Note that we allow pe in [0, 1].) We let θe = 1 − 2pe , for all e ∈ E. The main property we will use is the following well-known identity. For two leaves u, v in T , let PathT (u, v) be the set of edges on the path between u and v. 8 Proposition 4 (Path Probability) Let T = (V, E) ∈ Tn and p ∈ [0, 1]E . Assume X ∼ CFN(T, p). Let u, v be two leaves of T . Then we have   Y 1 P[Xu 6= Xv ] = 1 − θe  . 2 e∈PathT (u,v) 3 Proof In this section, we prove Theorem 2 from which Theorem 1 follows. The proof has two components: 1. [Reduction to Minimal Isolating Sets] We first show that for any random variable X ∈ {0, 1}[n] close enough to uniform and any tree T ∈ Tn , the HX,T -optimal f ’s are minimally isolating for T . 2. [Rooted Star is Optimal] Second, we show that if X above is CFN(T ′ , p) for some T ′ ∈ Tn with pe ≈ 1/2 if e is adjacent to {1, . . . , n−1} and pe ≈ 0 otherwise, then for all T ∈ Tn the unique HX,T -optimal f assigns the value at 0 to all internal nodes. Throughout, n ≥ 1 is fixed. 3.1 Reduction to Minimal Isolating Sets We prove the following: Proposition 5 (Reduction to Minimal Isolating Sets) There exists ε > 0 (depending on n) such that the following hold. Let X be any random variable taking values in {0, 1}[n] with H(X) ≥ n − ε and let T be any tree in Tn . If f is HX,T optimal, then f is minimally isolating for T . Proof: We make a series of claims. Claim 1 (Reduction to Uniform) For all δ > 0 there exists ε = ε(δ) > 0 such that if X is a {0, 1}[n]-random variable with H(X) ≥ n − ε, and f : {0, 1}[n] → {0, 1}V −[n] then |HX,T (f ) − HU,T (f )| ≤ δ, 9 (2) where U is the uniform distribution on {0, 1}[n]. Therefore, it suffices to prove Proposition 5 for those f that are HU,T -optimal. Proof: The entropy of {0, 1}[n]-random variables is maximized uniquely at H(U) = n. The first part of the result follows by continuity of H(X) and HX,T (f ) in the distribution of X. For the second part, take δ > 0 small enough such that for all f, f ′ , we have HU,T (f ) > HU,T (f ′ ) =⇒ HU,T (f ) > HU,T (f ′ ) + 2δ. (3) (Recall that there are only finitely many f ’s for fixed n.) Take ε > 0 such that the first part holds. Then it follows that if f is HX,T -optimal then it must be HU,T optimal. We argue by contradiction. Assume there are f , f ′ such that HX,T (f ) ≤ HX,T (f ′ ) but HU,T (f ) > HU,T (f ′ ). By (3), we have HU,T (f ) > HU,T (f ′ ) + 2δ, (4) which implies HX,T (f ) > HX,T (f ′ ) by (2), a contradiction.  Claim 2 (Minimizer) If f is HU,T -optimal then HU,T (f ) = n − 1. Moreover, denoting Y = Ūf we have that {Y0 , (Ye )e∈E } are mutually independent. Proof: Upper Bound We first show that there is f such that HU,T (f ) ≤ n − 1. Let S be a minimal isolating set for T . Define f by letting f (x)u = f (x)v for all edges (u, v) not in S. By Proposition 3, this uniquely defines f . Letting Y = Ūf it is immediate to check that X X HU,T (Y ) = H(Ye ) = H(Ye ) ≤ n − 1, e∈E e∈S by Proposition 2. Lower Bound For any f : {0, 1}[n] → {0, 1}V −[n] with Y = Ūf , we have n = H(U) = H({(Yv )v∈[n] }) = H({Y0, (Ye )e∈E }) X X ≤ H(Y0 ) + H(Ye ) ≤ 1 + H(Ye ), e∈E e∈E 10 where we have used that {(Yv )v∈[n] } and {Y0, (Ye )e∈E } are deterministic functions of each other. Furthermore, the first inequality holds to equality if and only if {Y0 , (Ye )e∈E } are mutually independent.  We are ready to conclude the proof of Proposition 5. Let f be HU,T -optimal with Y = Ūf . Let u, v be any two leaves of T . We have by the previous claim that (Ye )e∈PathT (u,v) are mutually independent. Since Yu and Yv are independent uniform {0, 1} it must be that there is an edge e ∈ PathT (u, v) with H(Ye ) = 1. Indeed, define pe = P[Ye = 1] and θe = 1 − 2pe . Then by Proposition 4 we have Y 0 = 1 − 2P[Yu 6= Yv ] = θe , e∈PathT (u,v) which implies that at least one θe = 0. Let S ′ be the set of all edges where H(Ye ) = 1. Then we have shown that S ′ is an isolating set. Note furthermore that if e ∈ Sf then H(Ye ) ≥ H(2−n ) > 0. From f ’s optimality we obtain n − 1 = HU,T (f ) ≥ |S ′| + |Sf \ S ′ |H(2−n ). Therefore we must have Sf = S ′ and |S ′| = n − 1 which implies that Sf is a minimal isolating set as needed.  3.2 The Rooted Star is Optimal Let T = (V, E) ∈ Tn and S a minimal isolating set of T . Let T 0 be the tree obtained from T by contracting all edges not in S. By Proposition 3, T 0 is an n-node tree where each node (leaf or internal) is (uniquely) labelled by a leaf of T . Let Tn0 be all such trees on n nodes. By Proposition 5, the AML phylogeny estimator is among Tn0 . Note that for T ∈ Tn0 the only possible extension is trivially f = 1 since there are no unlabelled internal vertices. Proposition 6 (Rooted Star is Optimal) Let T = (V, E) ∈ Tn . Let W be the set of leaf edges of T , except the edge pendant at 0. Then for ε, δ > 0 sufficiently small the following holds. Assume X ∼ CFN(T, p) with corresponding random cluster parameterization satisfying 0 < θe ≤ ε for all e ∈ W and 1 > θe > 1 − δ for all e ∈ / W . Then, among all trees T ′ ∈ Tn0 , the star rooted at 0 uniquely minimizes HX,T ′ (1) for all δ sufficiently small. Proof: We assume that δ and ε are small enough so that they satisfy (n − 1)(1 − δ)2n−4 > n − 2, 11 and ε2 < (n − 1)(1 − δ)2n−4 − (n − 2). (5) Let T ′ = (V ′ , E ′ ) ∈ Tn0 and f = 1 with corresponding variables (Y0 , {Ye }e∈E ′ ) where Y0 = X0 and Yu,v = 1{Xu 6= Xv }. Let e = (u, v) be an edge in T ′ . In particular, note that u and v are leaves of T . Let pu,v be the probability that u and v disagree and let θu,v = 1 − 2pu,v . We will use the following Taylor expansion of the entropy around 1/2     1−τ log2 e H =1− τ 2 + O(τ 4 ). 2 2 Note further that H(Ye ) = H(pu,v ) = H  1 − θu,v 2  . As ε approaches 0, pu,v goes to 1/2. Therefore, by Proposition 4, up to smaller order terms we want to find T ′ = (V ′ , E ′ ) in Tn0 that maximizes X Y Θ(T ′ ) := θe2 . e′ =(u,v)∈E ′ e∈PathT (u,v) If T ′ has an edge e′ between two leaves neither of which is 0, then e′ makes a contribution of at most ε4 to Θ(T ′ ) since PathT (u, v) crosses two edges in W . Therefore, by (5), Θ(T ′ ) ≤ (n − 2)ε2 + ε4 < (n − 1)(1 − δ)2n−4 ε2 , where we have used that T ′ has exactly n − 1 edges and each edge e′′ ∈ E ′ makes a contribution of at most ε2 since PathT (u, v) contains at least one edge in W . On the other hand, the star rooted at 0, which we denote by T ∗ , is the only tree in Tn0 which does not include an edge between two leaves neither of which is 0. In that case, we get Θ(T ∗ ) ≥ (n − 1)(1 − δ)2(n−2) ε2 , where we have used that any path between 0 and another leaf in T contains at most n − 2 edges not in W (since |E| ≤ 2n − 3 and |W | = n − 1) and exactly one edge in W . Taking ε small enough gives the result.  12 4 Concluding remarks It would be interesting to extend our results beyond the 2-state case. We note in particular that for the symmetric r-state model, with r > 2, the equivalent formulation of the AML problem given in Definition 3 does not apply. Indeed, it is easy to check that, instead, one needs to minimize X  de  X de ′ H (T | λ) = H + log2 (r − 1) . k k e∈E e∈E The second term on the r.h.s.—a parsimony “correction”—may lead to a different behavior when r > 2. We thank Peter Ralph for sharing his recent, independent results [14] regarding the structure of the optimal solution in the 2-state case (similarly to [2]) as well as a number of simulations on 4-taxon trees. References [1] L. Addario-Berry, B. Chor, M. Hallett, J. Lagergren, A. Panconesi, T. Wareham, “Ancestral Maximum Likelihood of Evolutionary Trees is Hard,” Jour. of Bioinformatics and Comp. Biology, vol. 2, no. 2, pp. 257-271, 2004. [2] N. Alon, B. Chor, F. Pardi, A. Rapoport, “Approximate maximum parsimony and ancestral maximum likelihood,” to appear in IEEE/ACM Transactions on Computational Biology and Bioinformatics, 2008. [3] D. Barry, J. Hartigan, “Statistical analysis of hominoid molecular evolution,” Stat. Sci., 2, pp. 191-207, 1987. [4] D. Barry, J. Hartigan, “Rejoinder [on Statistical analysis of hominoid molecular evolution],” Stat. Sci., vol. 2, pp. 209-210, 1987. [5] J. A. Cavender, “Taxonomy with confidence,” Math. Biosci., vol. 40, no. 3-4, 1978. [6] B. Chor, T. Tuller, “Finding the maximum likelihood tree is hard,” in Proc. 9th Annual International Symposium on Research in Computational Biology (RECOMB 2005), 2005. 13 [7] J. S. Farris, “A probability model for inferring evolutionary trees”, Syst. Zool., vol. 22, no. 4, pp. 250-256, 1973. [8] J. Felsenstein, 1978. “Cases in which parsimony or compatiability methods will be positively misleading”, Syst. Biol., 27, pp. 401–410. [9] J. Felsenstein, Inferring phylogenies, Sinauer, Sunderland, MA, 2004. [10] N. Goldman, 1990. “Maximum likelihood inference of phylogenetic trees, with special reference to a Poisson process of DNA substitution and to parsimony analysis”, Syst. Zool. 39, pp. 345–361. [11] P. A. Goloboff, “Parsimony, likelihood, and simplicity,” Cladistics, vol. 19, pp. 91-103, 2003. [12] V. Moulton, M. Steel, “Peeling phylogenetic ‘oranges’,” Adv. in Appl. Math., vol. 33, no. 4, pp. 710-727, 2004. [13] J. Neyman, “Molecular studies of evolution: a source of novel statistical problems,” in Statistical desicion theory and related topics, (eds. S. S. Gupta and J. Yackel), pp. 1-27, Academic Press, New York, 1971. [14] P. Ralph, in preparation, 2008. [15] S. Roch, “A Short Proof that Phylogenetic Tree Reconstruction by Maximum Likelihood is Hard,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 3, no. 1, pp. 92-94, 2006. 14
5cs.CE
Stationary signal processing on graphs Nathanaël Perraudin and Pierre Vandergheynst ∗ April 25, 2017 arXiv:1601.02522v5 [cs.DS] 21 Apr 2017 Abstract Graphs are a central tool in machine learning and information processing as they allow to conveniently capture the structure of complex datasets. In this context, it is of high importance to develop flexible models of signals defined over graphs or networks. In this paper, we generalize the traditional concept of wide sense stationarity to signals defined over the vertices of arbitrary weighted undirected graphs. We show that stationarity is expressed through the graph localization operator reminiscent of translation. We prove that stationary graph signals are characterized by a well-defined Power Spectral Density that can be efficiently estimated even for large graphs. We leverage this new concept to derive Wiener-type estimation procedures of noisy and partially observed signals and illustrate the performance of this new model for denoising and regression. Index terms— Stationarity, graphs, spectral graph theory, graph signal processing, power spectral density, Wiener filter, covariance estimation, Gaussian markov random fields 1 Introduction Stationarity is a traditional hypothesis in signal processing used to represent a special type of statistical relationship between samples of a temporal signal. The most commonly used is wide-sense stationarity, which assumes that the first two statistical moments are invariant under translation, or equivalently that the correlation between two samples depends only on their time difference. Stationarity is a corner stone of many signal analysis methods. The expected frequency content of stationary signals, called Power Spectral Density (PSD), provides an essential source of information used to build signal models, generate realistic surrogate data or perform predictions. In Figure 1, we present an example of a stationary process (blue curve) and two predictions (red and green curves). As the blue signal is a realization of a stationary process, the red curve is more probable than the green one because it respects the frequency content of the observed signal. Classical stationarity is a statement of statistical regularity under arbitrary translations and thus requires a regular structure (often "time"). However many signals do not live on such a regular structure. For instance, imagine that instead of having one sensor returning a temporal signal, we have multiple sensors living in a two-dimensional space, each of which delivers only one value. In this case (see Figure 2 left), the signal support is no longer regular. Since there exists an underlying continuum in this example (2D space), one could assume the existence of a 2D stationary field and use Kriging [1] to interpolate observations to arbitrary locations, thus generalizing stationarity for a regular domain but irregularly spaced samples. On the contrary, the goal of this contribution is to generalize stationarity for an irregular domain that is represented by a graph, without resorting to any underlying regular continuum. Graphs are convenient for this task as they are able to capture complicated relations between variables. In this work, a graph is composed of vertices connected by weighted undirected edges and signals are now scalar values observed at the vertices of the graph. Our approach is to use a weak notion of translation invariance, define on a graph, that captures the structure (if any) of the data. Whereas classical stationarity means correlations are computed by translating the auto-correlation function, here correlations are given by localizing a common graph kernel, which is a generalized notion of translation as detailed in Section 2.2. Figure 2 (left) presents an example of random multivariate variable living in a 2-dimensional space. Seen as scattered samples of an underlying 2D stochastic function, one would (rightly) conclude it is not stationary. However, under closer inspection, the observed values look stationary within the spiral-like ∗ EPFL, Ecole Polytechnique Fédérale de Lausanne, LTS2 Laboratoire de traitement du signal, CH-1015 Lausanne, Switzerland 1 Figure 1: Signal prediction. The red curve is more likely to occur than the green curve because it respects the frequency statistics of the blue curve. structure depicted by the graph in Figure 2 (right). The traditional Kriging interpolation technique would ignore this underlying structure and conclude that there are always rapid two dimensional variations in the underlying continuum space. This problem does not occur in the graph case, where the statistical relationships inside the data follow the graph edges resulting in this example in signals oscillating smoothly over the graph. A typical example of a stationary signal on a graph would be the result of a survey Figure 2: Example of stationary graph signals. The graph connections express relationships between the different elements of one signal. In this case, the signal varies smoothly along the snail shape of the graph. performed by the users of a social network. If there is a relationship between a user’s answers and those of his neighbors, this relationship is expected to be constant among all users. Using stationarity on the graph, we could predict the most probable answer for users that never took the survey. 1.1 Contributions We use spectral graph theory to extend the notion of stationarity to a broader class of signals. Leveraging the graph localization operator, we establish the theoretical basis of this extension in Section 3. We show that the resulting notion of stationarity is equivalent to the proposition of Girault [2, Definition 16], although the latter is not defined in terms of a localization operator. Localization is a very desirable feature, since it naturally expresses the scale at which samples are strongly correlated. 2 Since our framework depends on the power spectral density (PSD), we generalize the Welch method [3, 4] in Section 4 and obtain a scalable and robust way to estimate the PSD. It improves largely the covariance estimation when the number of signals is limited. Based on the generalization of Wiener filters, we propose a new regularization term for graph signal optimization instead of the traditional Dirichlet prior, that depends on the noise level and on the PSD of the signal. The new optimization scheme presented in Section 5 has three main advantages: 1) it allows to deal with an arbitrary regularization parameter, 2) it adapts to the data optimally as we prove that the optimization model is a Maximum A Posteriori (MAP) estimator, and 3) it is more scalable and robust than a traditional Gaussian estimator. Finally, in Section 6, we show experimentally that common datasets such as USPS follow our stationarity assumption. In section 7, we exploit this fact to perform missing data imputation and we show how stationarity improves over classical graph models and Gaussian MAP estimator. 1.2 Related work Graphs have been used for regularization in data applications for more than a decade [5, 6, 7, 8] and two of the most used models will be presented in Section A. The idea of graph filtering was hinted at by the machine learning community [6] but developed for the spectral graph wavelets proposed by Hammond et al. [9] and extended by Shuman et al. in [10]. While in most cases, graph filtering is based on the graph Laplacian, Moura et al. [11] have suggested to use the adjacency matrix instead. We note that a probabilistic model using Gaussian random fields has been proposed in [12, 13]. In this model, signals are automatically graph stationary with an imposed covariance matrix. Our model differentiates itself from these contributions because it is based on a much less restrictive hypothesis and uses the point of view of stationarity. A detailed explanation is given at the end of Section 3. Finally, stationarity on graphs has been recently proposed in [14, 2] by Girault et al. These contributions use a different translation operator, promoting energy preservation over localization. While seemingly different, we show that our approach and Girault’s result in the same graph spectral characterization of stationary signals. Girault et al [15] have also shown that using the Laplacian as a regularizer in a de-noising problem (Tikhonov) is equivalent to applying a Wiener filter adapted to a precise class of graph signals. In [2, pp 100], an expression of graph Wiener filter can be found. After the publication of the first version of this contribution, additional work was done on the topic. First some PSD estimation methods were proposed in [16, 17]. Then stationarity has been extended to time evolving signals on graphs in [18, 19]. 2 Background theory 2.1 Graph signal processing Graph nomenclature A graph G = {V, E, W} is defined by two sets: V, E and a weight function W. V is the set of vertices representing the nodes of the graph and E is the set of edges that connect two nodes if there is a particular relation between them. In this work all graphs are undirected. To obtain a finer structure, this relation can be quantified by a weight function W : V × V → R that reflects to what extent two nodes are related to each other. Let us index the nodes from 1, . . . , N = |V| and construct the weight matrix W ∈ RN ×N by setting W [i, n] = W(vi , vn ) as the weight associated to the edge connecting the node i and the node n. When no edge exists PN between i and n, the weight is set to 0. For a node vi ∈ V, the degree d[i] is defined as d[i] = n=1 W [i, n]. In this framework, a signal is defined as a function f : V → R (this framework can be extended to C) assigning a scalar value to each vertex. It is convenient to consider a signal f as a vector of size N with the nth component representing the signal value at the nth vertex. The most fundamental operator in graph signal-processing is the (combinatorial) graph Laplacian, defined as: L = D − W, where D is the diagonal degree matrix (D[i, i] = d[i]). Spectral theory Since the Laplacian L is always a symmetric positive semi-definite matrix, we know from the spectral theorem that it possesses a complete set of orthonormal eigenvectors. We denote them by {u` }`=0,1,...,N −1 . For convenience, we order the set of real, non-negative eigenvalues as follows: 0 = λ0 < λ1 ≤ · · · ≤ λN −1 = λmax . When the graph is connected1 , there is only one zero eigenvalue. In fact, the multiplicity of the zero eigenvalue(s) is equal to the number of connected components. For 1a path connects each pair of nodes in the graph 3 more details on spectral graph theory, we refer the reader to [20, 21]. The eigenvectors of the Laplacian are used to define a graph Fourier basis [5, 10] which we denote as U . The eigenvalues are considered as a generalization of squared frequencies. The Laplacian matrix can thus be decomposed as L = U ΛU ∗ , where U ∗ denotes the transposed conjugate of U . The graph Fourier transform is written fˆ = U ∗ f and its inverse f = U fˆ. This Graph Fourier Transform possesses interesting properties further studied in [10]. Note that the graph Fourier transform is equivalent to the Discrete Fourier transform for cyclic graphs. The detailed computation for the "ring" can be found in [22, pp 136-137]. Graph convolutive filters The graph Fourier transform plays a central role in graph signal processing since it allows a natural extension of filtering operations. In the classical setting, applying a filter to a signal is equivalent to a convolution, which is simply a point-wise multiplication in the spectral domain. For a graph signal, where the domain is not regular, filtering is still well defined, as a point-wise multiplication in the spectral domain [10, Equation 17]. A graph convolutive filter g(L) is defined from a continuous kernel g : R+ → R. In the spectral domain, filtering a signal s with a convolutive filter g(L) is, as the classical case, a point-wise multiplication written as ŝ0 [`] = g(λ` ) · ŝ[`], where ŝ0 , ŝ are the Fourier transform of the signals s0 , s. In the vertex domain, we have s0 := g(L)s = U g(Λ)U ∗ s, (1) where g(Λ) is a diagonal matrix with entries g(λ` ). For convenience, we abusively call ’filter’ the generative kernel g. We also drop the term convolutive as we are only going to use this type of filters. A comprehensive definition and study of these operations can be found in [10]. It is worth noting that these formulas make explicit use of the Laplacian eigenvectors and thus its diagonalization. The complexity of this operation is in general O(N 3 ). In order to avoid this cost, there exist fast filtering algorithms based on Chebyshev polynomials or the Lanczos method [9, 23]. These methods scale with the number of edges |E| and reduce the complexity to O(|E|), which is advantageous in the case of sparse graphs. 2.2 Localization operator As most graphs do not possess a regular structure, it is not possible to translate a signal around the vertex set with an intuitive shift. As stationarity is an invariance with respect to translation, we need to address this issue first. A solution is present in [10, Equation 26], where Shuman et. al. define the generalized translation for graphs as a convolution with a Kroneker delta. The convolution ∗ is defined as the element-wise multiplication in the spectral domain leading to the following generalized translation definition: N −1 X Ti s[n] := (s ∗ δi )[n] = ŝ[`]u∗` [i]u` [n]. `=0 Naturally, the generalized translation operator does not perform what we would intuitively expect from it, i.e it does not shift a signal s from node n to node i as this graph may not be shift-invariant. Instead when ŝ changes smoothly across the frequencies (more details later on), then Ti s is localized around node i, while s is in general not localized at a particular node or set of nodes. In order to avoid this issue, we define the localization operator as follows Definition 1. Let C be the set of functions R+ → R. For a graph kernel g ∈ C (defined in the spectral domain) and a node i, the localization operator Ti : C → RN reads: Ti g[n] := N −1 X g(λ` )u∗` [i]u` [n] = (g(L)δi )[n] = g(L)[i, n]. (2) `=0 Here we use the calligraphic notation Ti to differentiate with the generalized translation operator Ti . We first observe from (2) that the ith line of graph filter matrix g(L) is the kernel g localized at node i. Intuitively, it signifies [g(L)s](i) = hs, Ti gi. We could replace g(λ` ) by ŝ[`] in Definition 1 and localize the discrete vector ŝ instead. We prefer to work with a kernel for two reasons. 1) In practice when the graph is large, the Fourier basis cannot be computed making it impossible to localize a vector. On the other side, for a kernel g, there are techniques to approximate Ti g. 2) The localization properties are theoretically easier to interpret when g is a filter. Let us suppose that g is a K order polynomial, then the 4 support of Ti g is exactly contained in a ball of radius K centered at node i. Building on this idea, for a sufficiently regular function g, it has been proved in [10, Theorem 1 and Corollary 2] that the localization operator concentrates the kernel g around the vertex i. Let us now clarify how generalized translation and localization are linked. The main difference between these two operators is the domain on which they are applied. Whereas, the translation operator acts on a discrete signal defined in the time or the vertex domain, the localization operator requires a continuous kernel or alternatively a discrete signal in the spectral domain. Both return a signal in the time or the vertex domain. To summarize, the localization operator can be seen as computing the inverse Fourier transform first and then translating the signal. It is an operator that takes a filter from the spectral domain and localizes it at a given node i while adapting it to the graph structure. In the classical periodic case ("ring" graph), localization is strongly connected to translation as the localized kernels are translated versions of each other: Ti g[n] = N `n `i 1 X g(λ` )e−j2π N ej2π N N = N `(n−i) 1 X g(λ` )ej2π N = T0 g[n − i]. N `=1 (3) `=1 In this case, localizing a kernel g can be done by computing the inverse discrete Fourier transform of the vector ŝ(`) = g(λ` ) and then translating at node i. However, for irregular graphs, localization differs from translation because the shape of the localized filter adapts to the graph and varies as a function of its topology. Figure 3 shows an example of localization using the Mexican hat wavelet filter. The shape of the localized filter depends highly on the graph topology. However, we observe that the general shape of the wavelet is preserved. It has large positive values around the node where it is localized. It then goes negative a few nodes further away and stabilizes at zero for nodes far away. To summarize, the localization operator preserves the global behavior of the filter while adapting to the graph topology. Additional insights about the localization operator can be found in [10, 9, 24, 25]. Figure 3: Top left: Mexican hat filter in the spectral domain g(x) = localized around three different vertices (highlighted by a black circle). 5 5x λmax   2 exp − λ25x . The filter is 2 max 2.3 Stationarity for temporal signals Let x[t] be a time indexed stochastic process. Throughout this paper, all random variables are written  in bold fonts. We use mx = E x to denote the expected value of x. In this section, we work with the periodic discrete case. Definition 2 (Time Wide-Sense Stationarity). A signal is Time Wide-Sense Stationary (WSS) if its first two statistical moments are invariant under translation, i.e:  1. mx [t] = E x[t] = c ∈ R,  2. E (x[t] − mx )(x[s] − mx )∗ = ηx [t − s], where ηx is called the autocorrelation function of x. Note that using (3), the autocorrelation can be written in terms of the localization operator: ηx [t − s] = Ts γx [t]. (4) For a WSS signal, the autocorrelation function depends only on one parameter, t − s, and is linked to the Power Spectral Density (PSD) through the Wiener-Khintchine Theorem [26]. The latter states that the PSD of the stochastic process x denoted γx [`] is the Fourier transform of its auto-correlation : N `t 1 X ηx [t]e−j2π N , γx [`] = √ N i=1 (5) √ where j = −1. As a consequence, when a signal is convolved with a filter ȟ, its PSD is multiplied by the energy of the convolution kernel: for y = ȟ ∗ x, we have 2 γy [`] = |h[`]| γx [`], where h[`] is the Fourier transform of ȟ. For more information about stationarity, we refer the reader to [27]. When generalizing these concepts to graphs, the underlying structure for stationarity will no longer be time, but graph vertices. 3 Stationarity of graph signals We now generalize stationarity to graph signals. While we define stationarity through the localization operator, Girault [14] uses an isometric translation operator instead. That proposition is briefly described in Section 3.2, where we also show the equivalence of both definitions. 3.1 Stationarity under the localization operator Let x ∈ RN be a stochastic graph signal with a finite number of variables indexed by the vertices of a weighted undirected graph. The expected value of each variable is written mx [i] = E x[i] and the  covariance matrix of the stochastic signal is Σx = E (x − mx )(x − mx )∗ ). We additionally define x̃ = x − mx . For discrete time WSS processes, the covariance matrix Σx is Toeplitz, or circulant for periodic boundary conditions, reflecting translation invariance. In that case, the covariance is diagonalized by the Fourier transform. We now generalize this property to take into account the intricate graph structure. As explained in Section 2.2, the localization operator adapts a kernel to the graph structure. As a result, our idea is to use the localization operator to adapt the correlation between the samples to the graph structure. This results in a localized version of the correlation function, whose properties can then be studied via the associated kernel. Definition 3. A stochastic graph signal x defined on the vertices of a graph G is called Graph Wide-Sense (or second order) Stationary (GWSS), if and only if it satisfies the following properties:  1. its first moment is constant over the vertex set: mx [i] = E x[i] = c ∈ R and 6 2. its covariance is the result of localizing a graph kernel:  Σx [i, n] = E (x[i] − mx )(x[n] − mx ) = Ti γx [n]. The first part of the above definition is equivalent to the first property of time WSS signals. The requirement for the second moment is a natural generalization where we are imposing an invariance with respect to the localization operator instead of the translation. It is a generalization of Definiton 2 using (4). In simple words, the covariance is assumed to be driven by a global kernel (filter) γx . The localization operator adapts this kernel to the local structure of the graph and provides the correlation between the vertices. Additionally, Definition 3 implies that the spectral components of x are uncorrelated. Theorem 1. A signal is GWSS if and only if its covariance matrix Σx is jointly diagonalizable with the Laplacian of G with2 γx (λ` ) = u∗` Σx u` , i.e Σx = U Γx U ∗ , where Γx is a diagonal matrix. Proof. By Definition 1, the covariance localization operator can be written as: Ti γx [n] = γx (L)[i, n] = U γx (Λ)U ∗ [i, n] (6) where γx (Λ) is a diagonal matrix satisfying γx (Λ)[`, `] = γx (λ` ). To complete the proof set Γx = γx (Λ). The choice of the filter γx in this result is somewhat arbitrary, but we shall soon see that we are interested in localized kernels. In that case, γx will be typically be the lowest degree polynomial satisfying the constraints and can be constructed using Lagrange interpolation for instance. Definition 3 provides a fundamental property of the covariance. The size of the correlation (distance over the graph) depends on the support of localized the kernel Ti γx . In [10, Theorem 1 and Corollary 2], it has been proved that the concentration of Ti γx around i depends on the regularity3 of γx . For example, if γx is a polynomial of degree K, it is exactly localized in a ball of radius K. Hence we will be mostly interested in such low degree polynomial kernels. The graph spectral covariance matrix of a stochastic graph signal is given by Γx = U ∗ Σx U . For a GWSS signal this matrix is diagonal and the graph power spectral density (PSD) of x becomes: γx (λ` ) = (U ∗ Σx U )`,` . (7) Table 1 presents the differences and the similarities between the classical and the graph case. For a regular cyclic graph (ring), the localization operator is equivalent to the traditional translation and we recover the classical cyclic-stationarity results by setting ηx = T0 γx . Our framework is thus a generalization of stationarity to irregular domains. Example 1 (Gaussian i.i.d. noise (see  also [14])). Normalized Gaussian i.i.d. noise is GWSS for any graph. Indeed, the first moment is E x[k] = 0. Moreover, the covariance matrix can be written as I = Σx = U IU ∗ with any orthonormal matrix U and thus is diagonalizable with any graph Laplacian. We also observe that the PSD is constant, which implies that similar to the classical case, white noise contains all "graph frequencies". When γx is a bijective function, the covariance matrix contains an important part of the graph structure: the Laplacian eigenvectors4 . On the contrary, if γx is not bijective, some of the graph structure is lost as it is not possible to recover all eigenvectors. This is for instance the case when the covariance matrix is low-rank. As another example, let us consider completely uncorrelated centered samples with variance 1. In this case, the covariance matrix becomes Σx = I and loses all graph information, even if by definition the stochastic signal remains stationary on the graph. One of the crucial benefits of stationarity is that it is preserved by filtering, while the PSD is simply reshaped by the filter. The same property holds on graphs. 2 If the graph Laplacian has an eigenspace of multiplicity greater than one, this condition implies that all eigenvalues of the covariance matrix associated with this eigenspace are equal, i.e., if λ`1 = λ`2 , then u∗`1 Σx u`1 = u∗`2 Σx u`2 . On a ring graph, it ensures 1) that the Fourier transform of the PSD to be symmetric with respect to the 0 frequency, and 2) that the autocorrelation ηx is real and symmetric. 3 A regular kernel can be well approximated by a smooth function, for instance a low order polynomial, over the spectrum of the laplacian. 4 If the laplacian contains eigenvalues with multiplicity, then the covariance matrix contains all its eigenspaces. 7 Theorem 2. When a graph filter g is applied to a GWSS signal, the result remains GWSS, the mean becomes mg(L)x = mx g(0) and the PSD satisfies: γg(L)x (λ` ) = |g(λ` )|2 · γx (λ` ). (8) Proof. The output of a filter g can be written as x0 = g(L)x̃ + g(L)mx . If the input signal x is GWSS, we can check easily that the first moment of the filter’s output is constant, E{g(L)x[i]} = g(L)E{mx } = g(0)mx . The computation of the second moment gives: n ∗ o = g(L)E {x̃x̃∗ } g(L)∗ E g(L)x̃ g(L)x̃ = g(L)Σx g(L)∗ = U g 2 (Λ)γx (Λ)U ∗ , which is equivalent to our claim. Theorem 2 provides a simple way to artificially produce stationary signals with a prescribed PSD by simply filtering white noise : The resulting signal will be stationary with PSD g 2 . In the sequel, we assume for simplicity that the signal is centered at 0, i.e: mx = 0. Note that the input white noise could well be non-Gaussian. Classical Graph Translation  E x[t] = mx = c ∈ R  Σx [t, s] = E x̃[t]x̃∗ [s] = ηx [t − s] The localization operator  E x[i] = mx = c ∈ R  Σx [i, n] = E x̃[i]x̃∗ [n] = γx (L)i,n Σx diagonalizable with L Wiener Khintchine Σx Toeplitz PN t` γx (λ` ) = √1N i=1 ηx [t]e−j2π N γx (λ` ) = (Γx )`,` = (U ∗ Σx U )`,` Result of filtering γǧ∗x (λ` ) = |g(λ` )|2 · γx (λ` ) γg(L)x [`] = |g(λ` )|2 · γx (λ` ) Stationary with respect to First moment Second moment (We use x̃ = x − mx ) Table 1: Comparison between classical and graph stationarity. In the classical case, we work with a N periodic discrete signal and we use ǧ to denote the inverse Fourier transform of g. 3.2 Comparison with the work of B. Girault Stationarity for graph signals has been defined in the past [2, 14]. The proposed definition is based on an isometric graph translation operator defined for a graph signal s as: s ! L TB s := exp j2π s = b(L)s, ρG  q  where b(x) = exp j2π ρxG and ρG is an upper bound5 on λmax . While this operator conserves the energy of the signal (kTB sk2 = ksk2 ), it does not have localization properties. In a sense, one trades localization for isometry. Using this operator, the stationarity definition of Girault [2, 14] is a natural extension of the classical case (Definition 2). Definition 4. [2, Definition 16] A stochastic signal x on the graph G is Wide-Sense Stationary (WSS) if and only if 1. E {TB x} = E {x} 5ρ G = maxi∈V p ¯ ¯ = 2d[i](d[i] + d[i]) where d[i] P N n =1 W [i,n]d[n] d[i] 8  ∗ 2. E TB x (TB x) = E {xx∗ } While this definition is based on a fairly different construction, the resulting notion of stationarity is similar. We distinguish two cases: 1) In the case where all eigenvalues are disjoint, they are equivalent. Indeed, [2, Theorem 7] says that if a signal is stationary with Definition 4, then its first moment is constant and the covariance matrix in the spectral domain U ∗ Σx U has to be diagonal. Using Theorem 1, we therefore recover Definition 3. 2) In the case where the graph has at least an eigenvalue with multiplicity, e.g., a ring graph, our Definition 3 is more restrictive than Definition 4, since we need for every λ`1 = λ`2 , that γx (λ`1 ) = γx (λ`2 ). As a result, there exist signals that are only stationary according to the Definition 4 of Girault, but not according to our Definition 3. As a consequence, for real signals on a ring graph, our definition forces the autocorrelation function to be symmetric, matching exactly the classical stationarity Definition 2, whereas this is not true for Girault’s definition. Let us consider as an example the ring graph with real sine/cosine Fourier basis. Note that a different k ), where w ∼ N (0, 1). basis choice leads to the same conclusion. The stochastic signal x[i] = w cos(2πi N This signal is made of a single graph Fourier mode, i.e., x = wu2k−1 . The first moment is given by E{x} = u2k−1 E{w} = 0 and the covariance matrix reads:     k k cos 2πi . Σx [n, i] = E{x[n]x[i]} = cos 2πn N N To verify the stationary property of this signal, let us observe this quantity in the spectral domain: ( N if `1 = `2 = 2k − 1 ∗ . u`1 Σx u`2 = 4 0 otherwise This signal is not stationary according to the classical definition. Indeed it is not invariant with respect N N to translation. To observe it, just compute 1 = E{x[N ]x[N ]} = 6 E{x[ 4k ]x[ 4k ]} = 0. Our definition agrees to this: Applying Theorem 1, even if the covariance matrix in the spectral domain is diagonal, we find that the signal is not stationary. Indeed, we cannot find a kernel satisfying g(λ` ) = u∗` Σx u` for all ` as we have λ2k = λ2k−1 and 0 = u∗2k Σx u2k 6= u∗2k−1 Σx u2k−1 = N4 . However, according to the definition by Girault, this signal is stationary [2, Theorem 7]. Another key difference is that our definition allows us to generalize the notion of PSD to the graph setting in a simpler manner. To extend the notion of PSD using Girault’s definition, one would have to deal with a block diagonal structure of the covariance matrix in the spectral domain that changes depending on the choice of eigenvectors at eigenvalue multiplicities6 . 3.3 Gaussian random field interpretation The framework of stationary signals on graphs can be interpreted using Gaussian Markov Random Field (GMRF). Let us assume that the signal x is drawn from a distribution P(x) = 1 −(x−mx )∗ p(L)(x−mx ) e , Zp (9) R ∗ where Zp = RN e−(x−mx ) p(L)(x−mx ) dx. If we assume that p(L) is invertible, drawing from this distribution will generate a stationary x with covariance matrix given by: Σx = (p(L)) −1 = p−1 (L). In other words, assuming a GRF probabilistic model with inverse covariance matrix p(L) leads to a stationary graph signal with a PSD = p−1 . However a stationary graph signal is not necessarily a GRF. Indeed, stationarity assumes statistical properties on the signal that are not necessarily based on Gaussian distribution. In Section 3 of [12], Gadde and Ortega have presented a GMRF model for graph signals. But they restrict themselves to the case where p(L) = L+δI. Following a similar approach Zhang et al. [13] link the inverse covariance matrix of a GMRF with the Laplacian. Our approach is much broader than these two contributions since we do not make any assumption on the function p(L). Finally, we exploit properties of stationary signals, such as the characterization of the PSD, to explicitly solve signal processing problems in Section 5. 6 For a subspace associated with an eigenvalue with multiplicity greater than one, there exist multiple possible sets of eigenvectors. 9 4 Estimation of the signal PSD As the PSD is central to our method, we need a reliable and scalable way to compute it. Equation (7) suggests a direct estimation method using the Fourier transform of the covariance matrix. We could thus estimate the covariance Σx empirically from Ns realizations {xn }n=1...,Ns of the stochastic graph signal x, as Ns X 1 (xn [i] − m̄x [i]))(xn [j] − m̄x [j])∗ , Σ̄x [i, j] = Ns − 1 n=1 where m̄x [i] = 1 Ns PNs n=1 xn [i]. Then our estimate of the PSD would read γ̄x (λ` ) = U ∗ Σ̄x U [`, `]. Unfortunately, when the number of nodes is considerable, this method requires the diagonalization of the Laplacian, an operation whose complexity in the general case scales as O(N 3 ) for the number of operations and O(N 2 ) for memory requirements. Additionally, when the number of available realizations Ns is small, it is not possible to obtain a good estimate of the covariance matrix. To overcome these issues, inspired by Bartlett [4] and Welch [3], we propose to use a graph generalization of the Short Time Fourier transform [10] to construct a scalable estimation method. Bartlett’s method can be summarized as follows. After removing the mean, the signal is first cut into equally sized segments without overlap. Then, the Fourier transform of each segment is computed. Finally, the PSD is obtained by averaging over segments the squared amplitude of the Fourier coefficients. Welch’s method is a generalization that works with overlapping segments. Figure 4: Illustration of the PSD estimation process for a temporal signal. Top right: original PSD. Top left: a stationary signal. Bottom right: The squared modulus of the STFT of the signal. Bottom left: Sum of the STFT squared coefficients over time. We observe that averaging the squared STFT coefficients approximate well the PSD. This method is a version of the Welch method that is generalizable to graphs. On the other hand, we can see the PSD estimation of both methods as the averaging over time of the squared coefficients of a Short Time Fourier Transform (STFT). Let x̃ be a zero mean stochastic graph 10 signal, the classical PSD estimator can thus be written as PN 2 (STFT{x̃}[`, n]) , γ̄x [`] = n=1 N kgk22 where g is the window used for the STFT. This is shown in Figure 4. Method Our method is based on this idea, using the windowed graph Fourier transform [10]. Instead of a translated rectangular window in time, we use a kernel g shifted by multiples of a step τ in the spectral domain, i.e. λmax gm (λ` ) = g(λ` − mτ ), m = 1 . . . M, τ = . M We then localize each spectral translation at each individual node of the graph. The coefficients of the graph windowed Fourier transform can be seen as a matrix with elements C[i, m] = hx, Ti gm i = [gm (L)x]i . Our algorithm consists in averaging the squared coefficients of this transform over the vertex set. Because graphs have an irregularP spectrum, we additionally need a normalization factor which is given by the norm of the window gm : ` g(λ` − mτ )2 = kgm (L)k2F , where k · kF is used for the Frobenius norm. Note that this norm will vary for the different m. Our final estimator reads : PN 2 kgm (L)xk22 i=1 C[i, m] = , (10) γ̄x (mτ ) = kgm (L)k2F kgm (L)k2F where x is a single realization of the stationary stochastic graph signal x. This estimator provides a discrete approximation of the PSD. Interpolation is used to obtain a continuous estimator. This approach avoids the computation of the eigenvectors and the eigenvalues of the Laplacian. Our complete estimation procedure is as follows. First, we design a filterbank by choosing a mother 2 2 function g (for example a Gaussian g(λ) = e−λ /σ ). A frame is then created by shifting uniformly M 2 2 times g in the spectral domain: gm (λ) = g(λ − mτ ) = e−(λ−mτ ) /σ . Second, we compute the estimator γ̄x (mτ ) from the stationary signal x. Note that if we have access to K1 realizations {xk }k=1,...,K1 of thestationary signal, we P can, of course, average the estimator to further reduce the variance using E kgm (L)x̃k22 ≈ 1/K1 k kgm (L)x̃k k22 . Third we use the following trick to quickly approximate kgm (L)k2F . Using K2 randomly-generated Gaussian normalized zero centered white signals, we estimate  E kgm (L)wk22 = kgm (L)k2F . Finally, the last step consists  in computing the ratio between the two quantities and interpolating the discrete points (mτ, g ∗ γx (mτ )). Variance of the estimator Studying the bias of (10) reveals its interest :  PN −1 2 E kgm (L)x̃k22 `=0 (g(λ` − mτ )) γx (λ` ) , = P N −1 2 kgm (L)k2F `=0 (g(λ` − mτ )) (11) where x is the stationary stochastic graph signal. For a filter g well concentrated at the origin, (11) gives a smoothed estimate of γx (mτ ). This smoothing corresponds to the windowing operation in the vertex domain: the less localized the kernel g in the spectral domain, the more pronounced the smoothing effect in (11) and the more concentrated the window in the vertex domain. It is very interesting to note we recover the traditional trade-off between bias and variance in non-parametric spectral estimation. Indeed, if g is very sharply localized on the spectrum, ultimately a Dirac delta, the estimator (10) is unbiased. Let us now study the variance. Intuitively, if the signal is correlated only over small regions of the vertex set, we could isolate them with localized windows of a small size and averaging those uncorrelated estimates together would reduce the variance. These small size windows on the vertex set correspond to large bandpass kernel gm and therefore large bias. However, if those correlated regions are large, and this happens when the PSD is localized in low-frequencies, we cannot hope to benefit from vertex-domain averaging since the graph is finite. Indeed the corresponding windows gm on the vertex set are so large that a single window spans the whole graph and there is no averaging effect: the variance increases precisely when we try to suppress the bias. 11 Experimental assessment of the method Figure 5 shows the results of our PSD-estimation algorithm on a 10-nearest neighbors graph of 200 000 nodes (random geometric graph, weighted with an exponential kernel) and only K = 1 realization of the stationary graph signal. We compare the estimation using frames of M = 10, 30, 100 Gaussian filters. The parameters σ and τ are adapted to the number of max ). For this filters such that the shifted windows have an overlap of approximately 2 (τ = σ 2 = (M +1)λ M2 experiment K2 is set to 4 and the Chebysheff polynomial order is 30 The estimated curves are smoothed versions of the PSD. Figure 5: Left: PSD estimation on a graph of 200 000 nodes with K = 1 measurements. Our algorithm is able to successively estimate the PSD of a signal. Right: Computation time versus size of the graph (average over 10 runs.). We use m = 30 filters. The algorithm scales linearly with the number of edges. Complexity analysis The approximation scales with the number of edges of the graph O(|E|), (which is proportional to N in many graphs). Precisely, our PSD estimation method necessitates (K + K2 )M filtering operations (with M the number of shifts of g). A filtering operation costs approximately Oc |E|, with Oc the order of the Chebysheff polynomial [23]. The final computational cost of the method is thus O (Oc (K + K2 )M |E|). Error analysis The difference between the approximation and the exact PSD is caused by three different factors. 1. The inherent bias of the estimator, which is now directly controlled by the parameter σ. 2. We estimate the expected value using K1 realization of the signal (often K1 = 1). For large graphs N  K1 and a few filters M  N , this error is usually low because the variance of kgm (L)x̃k22 is inversely proportional to bias. The estimation error improves as K11 . 3. We use a fast-filtering method based on a polynomial approximation of the filter. For a rough approximation, σ  λmax N , this error is usually negligible. However, in the other cases, this error may become large. 5 Graph Wiener filters and optimization framework Using stationary signals, we can naturally extend the framework of Wiener filters [28] largely used in signal processing for Mean Square Error (MSE) optimal linear prediction. Wiener filters for graphs have already been succinctly proposed in [2, pp 100]. Since the construction of Wiener filters is very similar for non-graph and graph signals, we present only the latter here. The main difference is that the traditional frequencies are replaced by the graph Laplacian eigenvalues7 λ` . Figure 6 presents the Wiener estimation scheme. 7 The graph eigenvalues are equivalent to classical squared frequencies. 12 Figure 6: Wiener estimation scheme. ws is a centered random variable with covariance I. ws generates the stationary stochastic signal x thanks to the filter s(L). The random variable y is then generated by filtering x through h(L) and adding uncorrelated noise wn with PSD n(λ). The estimator of x given y: x̄|y is obtained with the Wiener filter g(L). The estimation error is denoted e. For simplicity, we present the case where mx = 0. Graph Wiener filtering The Wiener filter can be used to produce a mean-square error optimal estimate of a stationary signal under a linear but noisy observation model. Let us consider the GWSS stochastic signal x with PSD of s2 (λ` ). For simplicity, we assume mx = 0 in this subsection. The measurements y are given by: y = h(L)x + wn , (12) where h(L) is a graph filter and wn additive uncorrelated noise of PSD n(λ` ). To recover x, Wiener filters can be extended to the graph case: g(λ` ) = h2 (λ h(λ` )s2 (λ` ) . 2 ` )s (λ` ) + n(λ` ) (13) The expression above can be derived by exactly mimicking the classical case and minimizes the expected quadratic error, which can be written as: n  o ˆ [`] 2 = E {x̂[`] − g(λ` )ŷ[`]}2 , e[`] = E x̂[`] − x̄ where x̄ = g(L)y is the estimator of x given y. Theorem 5 proves the optimality of this filter for the graph case. Wiener optimization In this contribution, we would like to address a more general problem. Let us suppose that our measurements are generated as: y = Hx + wn , (14) 2 where the GWSS stochastic graph signal x has a PSD denoted s (λ` ) and the noise wn a PSD of n(λ` ). We assume x and wn to be uncorrelated. H is a general linear operator not assumed to be diagonalizable with L. As a result, we cannot build a Wiener filter that constructs a direct estimation of the signal x. If x varies smoothly on the graph, i.e is low frequency based, a classic optimization scheme would be the following: x̄|y = arg min kHx − yk22 + βx∗ Lx. (15) x This optimization scheme presents two main disadvantages. Firstly, the parameter β must be tuned in order to remove the best amount of noise. Secondly, it does not take into account the data structure characterized by the PSD s2 (λ` ). Our solution to overcome these issues is to solve the following optimization problem that we suggestively call Wiener optimization x̄|y = arg min kHx − yk22 + kw(L)(x − mx )k22 , (16) x where w(λ` ) is the Fourier penalization weights. These weights are defined as p n(λ` ) 1 w(λ` ) = =p . s(λ` ) SN R(λ` ) Notice that compared to (15), the parameter β is exchanged with the PSD of the noise. As a result, if the noise parameters are unknown, Wiener optimization does not solve completely the issue of finding the regularization parameter. In the noise-less case, one can alternatively solve the following problem x̄ = arg min ks−1 (L)(x − mx )k22 , x 13 s. t. Hx = y. (17) For both Problems 16 and 17 we assume that 0 × ∞ = 0. It forces x̂[`] = 0 when s(λ` ) = 0. Problem (16) generalizes Problem (15) which assumes implicitly a PSD of λ1` and a constant noise level of γ across all frequencies. Note that this framework generalizes two main assumptions made on the data in practice: 1. The signal is smooth on the graph, i.e: the edge derivative has a small `2 -norm. As seen before this is done by setting the PSD as λ1` . This case is studied in [15]. 2. The signal is band-limited, i.e it is a linear combination of the k lowest graph Laplacian eigenvectors. This class of signal simply have a null PSD for λ` > λk . Theoretical motivations for the optimization framework The first motivation is intuitive. The weight w(λ` ) heavily penalizes frequencies associated with low SNR and vice versa. The second and main motivation is theoretical. If we have a Gaussian Random multivariate signal with i.i.d Gaussian noise, then Problem (16) is a MAP estimator.   Theorem 3. If x ∼ N 0, s2 (L) and wn ∼ N 0, σ 2 I , i.e: x is GWSS and Gaussian, then problem (16) is a MAP estimator for x|y The proof is given in Appendix B. Theorem 4. If x is GWSS with PSD s2 (L) and wn is i.i.d white noise, i.e: n(`) = σ 2 , then problem (16) leads to the linear minimum mean square estimator:  −1 x|y = Σxy Σ−1 (18) y y + I − Σxy Σy H mx with Σxy = s2 (L)H ∗ and Σy = Hs2 (L)H ∗ The proof is given in Appendix D. Additionally, when H is jointly diagonalizable with L, Problem (16) can be solved by a single filtering operation. Theorem 5. If the operator H is diagonalizable with L, (i.e: H = h(L) = U a(Λ)U ∗ ), then problem (16) is optimal with respect to the weighting w in the sense that its solution minimizes the mean square error: (N ) X   2 E kek22 = E kx̄ − xk22 = E (x̄[i] − x[i]) . i=1 Additionally, the solution can be computed by the application of the corresponding Wiener filter. The proof is given in Appendix C. The last motivation is algorithmic and requires the knowledge of proximal splitting methods [29, 30]. Problem (16) can be solved by a splitting scheme that minimizes iteratively each of the terms. The minimization of the regularizer, i.e the proximal operator of kw(L)x̃k22 , becomes a Wiener de-noising operation: prox 21 kw(L)x̃k22 (y) = mx + arg min kw(L)x̃k22 + kx̃ − ỹk22 x̃ = mx + g(L)ỹ = mx + g(L)(y − mx ) with g(λ` ) = s2 (λ` ) 1 = . 1 + w2 (λ` ) s2 (λ` ) + n(λ` ) Advantage of the Wiener optimization framework over a Gaussian MAP estimator Theorem 3 shows that the optimization framework is equivalent to a Gaussian MAP estimator. In practice, when the data is only close to stationary, the true MAP estimator will perform better than Wiener optimization. So one could ask why we bother defining stationarity on graphs. Firstly, assuming stationarity allows us for a more robust estimate of the covariance matrix. This is shown is in Figure 5, where only one signal is used to estimate the PSD (and thus the covariance matrix). Another example is the USPS experiment presented in the next section. We estimate the PSD by using only 20 digits. The final result is much better than a Gaussian MAP based on the empirical covariance. Secondly, we have a scalable solution for Problem (16) (See Algorithm 1 below). On the contrary the classical Gaussian MAP estimator requires the explicit computation of a large part of the covariance matrix and it’s inverse, which are both not scalable operations. 14 Solving Problem (16) Note that Problem (16) can be solved with a simple gradient descent. However, for a large number of nodes N , the matrix w(L) requires O(N 3 ) operations to be computed and O(N 2 ) bits to be stored. This difficulty can be overcome by applying its corresponding filter operator at each iteration. As already mentioned, the cost of the approximation scale with the number of edges O(Oc |E|) [23]. When s(λ` ) ≈ 0 for some λ` the operator w(L) becomes badly conditioned. To overcome this issue, Problem (16) can be solved efficiently using a forward-backward splitting scheme [31, 29, 30]. The proximal operator of the function kw(L)x̃k22 has been given above and we use the term kHx − yk22 as the differentiable function. Algorithm 1 uses an accelerated forward backward scheme [32] to solve Problem (16) where β is the step size (we select β = 2λmax1(H)2 ),  the stopping tolerance, J the maximum number of iterations and δ is a very small number to avoid a possible division by 0. Algorithm 1 Fast Wiener optimization to solve (16) INPUT: z1 = x, u0 = x, t1 = 1,  > 0, β ≤ 1 2λmax (H)2 2 s (λ) SET: g(λ) = s2 (λ)+βn(λ) for j = 1, . . . J do v = zj − βH ∗ (Hzj − y) uj+1 = g(L)v √ 1+ . Wiener filter . Gradient step . Proximal step 1+4t2 j tj+1 = 2 tj −1 zj+1 = zj + tj+1 (uj − uj−1 ) if kzj+1 −zj k2F kzj k2F +δ . FISTA scheme . Update step <  then . Stopping criterion BREAK end if end for SOLUTION: zJ 6 Evidence of graph stationarity: illustration with USPS Stationarity may not be an obvious hypothesis for a general dataset, since our intuition does not allow us to easily capture the kind of shift invariance that is really implied. In this section we give additional insights on stationarity from a more experimental point of view. To do so, we will show that the wellknown USPS dataset is close to stationary on a nearest neighbor graph. We show similar results with a dataset of faces. Images can be considered as signals on the 2-dimensional euclidean plane and, naturally, when the signal is sampled, a grid graph is used as a discretization of this manifold. The corresponding eigenbasis is the 2 dimensional DCT8 . Many papers have exploited the fact that natural texture images are stationary 2-dimensional signals [33, 34, 35], i.e stationary signals on the grid graph. In [36], the authors go one step further and ask the following question: suppose that pixels of images have been permuted, can we recover their relative two-dimensional location? Amazingly, they answer positively adding that only a few thousand images are enough to approximately recover the relative location of the pixels. The grid graph seems naturally encoded within images. The observation of [36] motivates the following experiment involving stationarity on graphs. Let us select the USPS data set which contains 9298 digit images of 16 × 16 pixels. We create 5 classes of data: (a) the circularly shifted digits9 , (b) the original digits and (c), (d) and (e) the classes of digit 3, 7 and 9. As a pre-processing step, we remove the mean of each pixel, thus forcing the first moment to be 0, and focus on the second moment. For those 5 cases, we compute the covariance matrix Σ and its "Fourier transform", Γ = U ∗ ΣU, (19) for 2 different graphs: (a) the grid and (b) the 20 nearest neighbors graph. In this latter case, each node is a pixel and is associated to a feature vector containing the corresponding pixel value of all images. We use the squared euclidean distance between feature vectors and an exponential kernel to define edge weights10 . We then compute the stationarity level of each class of data with both graphs using the 8 This 9 We is a natural extension of [22] performed all possible shifts in both directions. Because of this, the covariance matrix becomes Toeplitz 10 W [i, n] =e −kxi −xn k2 2 σ2 if xi is in the 20 nearest neighbors of xn . 15 Data \Graph Shifted all digits All digits Digit 3 Digit 7 Digit 9 2-dimensional grid 0.86 0.66 0.64 0.52 0.52 20 nearest neighbors graph 1 0.79 0.83 0.79 0.81 2 Table 2: sr (Γ) = kdiag(Γ)k : stationarity measures for different graphs and different datasets. The nearest kΓkF neighbors graph adapts to the data. The individual digits are stationary with the nearest neighbor graph. following measure: sr (Γ) = ! 12 P 2 Γ kdiag(Γ)k2 P P` `,`2 = . kΓkF `1 `2 Γ`1 ,`2 (20) The closer sr (Γ) is to 1, the more diagonal the matrix Γ is and the more stationary the signal. Table 2 shows the obtained stationarity measures. The less universal the data, the less stationary it is on the grid. Clearly, specificity inside the data requires a finer structure than a grid. This is confirmed by the behavior of the nearest neighbors graph. When only one digit class is selected, the nearest neighbors graph still yields very stationary signals. Let us focus on the digit 3. For this experiment, we build a 20 nearest neighbors graph with only 50 samples. Figure 7 shows the eigenvectors of the Laplacian and of the covariance matrix. Because of stationarity, they are very similar. Moreover, they have a 3-like shape. Since the data is almost stationary, we can use the associated graph and the p PSD to generate samples by filtering i.i.d Gaussian noise with the following PSD based kernel: g(λ` ) = Γ`,` . The resulting digits have a 3-like shape confirming that the class is stationary on the nearest neighbors graph. Figure 7: Studying the number 3 of USPS using a 20-neighbors graph. Top left: Spectral covariance matrix of the data (Note the diagonal shape of the matrix). We only display the upper left part for better visibility. Top right: generated samples by filtering Gaussian random noise on the graph. Bottom left: Covariance eigenvectors associated with the 16 highest eigenvalues. Bottom right: Laplacian eigenvectors associated with the 16 smallest non-zero eigenvalues. Because of stationarity, Laplacian eigenvectors are similar to the covariance eigenvectors. To further illustrate this phenomenon on a different dataset, we use the CMUPIE set of cropped faces. With a nearest neighbor graph we obtained a stationarity level of sr = 0.92. This has already 16 been observed in [37] where the concept of Laplacianfaces is introduced. Finally, in [38] the authors successfully use the graph between features to improve the quality of a low-rank recovery problem. The reason seems to be that the principal components of the data are the lowest eigenvectors of the graph, which is again a stationarity assumption. To intuitively motivate the effectiveness of nearest neighbors at producing stationary signals, let us define the centering operator J = I −11> /N . Given K signal xk , the matrix of average squared distances PN between the centered features ( i=1 xk [i] = 0) is directly proportional to the covariance matrix : 1 Σ̄x = − JDJ, 2 (21) PK PK 2 1 1 where D[i, n] = K k=1 (xk [i] − xk [n]) and Σ̄x [i, n] = K k=1 xk [i]xk [n]. The proof is given in Appendix E. The nearest-neighbors graph can be seen as an approximation of the original distance matrix, which pleads for using it as a good proxy destined to leverage the spectral content of the covariance. Put differently, when using realizations of the signal as features and computing the k-NN graph we are connecting strongly correlated variables via strong edge weights. 7 Experiments All experiments were performed with the GSPBox [39] and the UNLocBoX [40] two open-source software library. The code to reproduce all figures of the paper can be downloaded at: https://lts2.epfl. ch/rrp/stationarity/. As the stationary signals are random, the reader may obtain slightly different results. However, conclusions shall remain identical. The models used in our comparisons are detailed in the Appendix A for completeness, where we also detail how the tuning of the parameters is done. All experiments are evaluated with respect to the Signal to Noise Ratio (SNR) measure:   var(x − ẋ) SNR(x, ẋ) = −10 log var(x) 7.1 Synthetic dataset In order to obtain a first insight into applications using stationarity, we begin with some classical problems solved on a synthetic dataset. Compared to real data, this framework allows us to be sure that the signal is stationary on the graph. Graph Wiener deconvolution We start with a de-convolution example on a random geometric graph. This can model an array of sensors distributed in space or simply a mesh. The signal is chosen with a low frequency band-limited PSD. To produce the measurements, the signal is convolved with the heat kernel h(λ) = e−τ λ . Additionally, we add some uncorrelated i.i.d Gaussian noise. The heat kernel is chosen because it simulates a heat diffusion process. Using de-convolution we aim at recovering the original signal before diffusion. For this experiment, we put ourselves in an ideal case and suppose that both the PSD of the input signal and the noise level are known. Figure 8 presents the results. We observe that Wiener filtering is able to de-convolve the measurements. The second plot shows the reconstruction errors for three different methods: Tikhonov presented in problem (23), TV in (25) and Wiener filtering in (13). Wiener filtering performs clearly much better than the other methods because it has a much better prior assumption. Graph Wiener in-painting In our second example, we use Wiener optimization to solve an in-painting problem. This time, we suppose that the PSD of the input signal is unknown and we estimate it using 50 signals. Figure 9 presents quantitative results for the in-painting. Again, we compare three different optimization methods: Tikhonov (22), TV (25) and Wiener (16). Additionally we compute the classical MAP estimator based on the empirical covariance matrix (see [41] 2.23). Wiener optimization performs clearly much better than the other methods because it has a much better prior assumption. Even with 50 measurements, the MAP estimator performs poorly compared to graph methods. The reason is that the graph contains a lot of the covariance information. Note that the PSD estimated with only one measurement is sufficient to outperform Tikhonov and TV. 17 10x Figure 8: Graph de-convolution on a random geometric graph. The convolution kernel is e− λmax . Top: Signal and filters for a noise level of 0.16. Bottom: evolution of the error with respect to the noise. Figure 9: Wiener in-painting on a geometric graph of 400 nodes. Top: true VS approximated PSD and resulting Wiener filters. Bottom: in-painting relative error with respect to the number of measurements. 7.2 Meteorological dataset We apply our methods to a weather measurements dataset, more precisely to the temperature and the humidity. Since intuitively these two quantities are correlated smoothly across space, it suggests that they are more or less stationary on a nearest neighbors geographical graph. 18 The French national meteorological service has published in open access a dataset11 with hourly weather observations collected during the Month of January 2014 in the region of Brest (France). From these data, we wish to ascertain that our method still performs better than the two other models (TV and Tikhonov) on real measurements. The graph is built from the coordinates of the weather stations by 2 connecting all the neighbors in a given radius with a weight function W [i, n] = e−din τ where τ is adjusted to obtain an average degree around 3 (τ , however, is not a sensitive parameter). For our experiments, we consider every time-step as an independent realization of a GWSS signal. As sole pre-processing, we remove the temperature mean of each station independently. This is equivalent to removing the first moment. Thanks to the 744 time observation, we can estimate the covariance matrix and check whether the signal is stationary on the graph. Prediction - Temperature The result of the experiment with temperatures is displayed in Figure 10. The covariance matrix shows a strong correlation between the different weather stations. Diagonalizing it with the Fourier basis of the graph shows that the meteorological instances are not really stationary within the distance graph as the resulting matrix is not really diagonal. However, even in this case, Wiener optimization still outperforms graph TV and Tikhonov models, showing the robustness of the proposed method. In our experiment, we solve a prediction problem with a mask operator covering 50 per cent of measurements and an initial average SNR of 13.4 dB . We then average the result over 744 experiments (corresponding to the 744 observations) to obtain the curves displayed in Figure 10. We observe that Wiener optimization always performs better than the two other methods. Prediction - Humidity Using the same graph, we have performed another set of experiments on humidity observations. The results are displayed in Figure 11. In our experiment, we solve a prediction problem with a mask operator covering 50% of measurements and various amount of noise. The rest of the testing framework is identical as for the temperature and the conclusions are similar. 7.3 USPS dataset We perform the same kind of in-painting/de-noising experiments with the USPS dataset. For our experiments, we consider every digit as an independent realization of a GWSS signal. As sole pre-processing, we remove the mean of each pixel separately. This ensures that the first moment is 0. We create the graph12 and estimate the PSD using only the first 20 digits and we use 500 of the remaining ones to test our algorithm. We use a mask covering 50% of the pixel and various amount of noise. We then average the result over 500 experiments (corresponding to the 500 digits) to obtain the curves displayed in Figure 1213 . For this experiment, we also compare with traditional TV de-noising [42] and Tikhonov de-noising. The optimization problems used are similar to (22). Additionally we compute the classical MAP estimator based on the empirical covariance matrix for the solution see ([41] 2.23). The results presented in Figure 12 show that graph optimization is outperforming classical techniques, meaning that the grid is not the optimal graph for the USPS dataset. Wiener once again outperforms the other graphbased models. Moreover, this experiment shows that our PSD estimation is robust when the number of signals is small. In other words, using the graph allows us for a much better covariance estimation than a simple empirical average. When the number of measurements increases, the MAP estimator improves in performance and eventually outperforms Wiener because the data is close to stationary on the graph. 7.4 ORL dataset For this last experiment, we use the ORL face dataset. We have a good indication that this dataset is close to stationary since CMUPIE (a smaller faces dataset) is also close to stationary. Each image has 112 × 92 = 10304 pixels making it complicated to estimate the covariance matrix and to use a Gaussian MAP estimator. Wiener optimization, on the other hand, does not necessitate an explicit computation of the covariance matrix. Instead, we estimate the PSD using the algorithm presented in 11 Access to the raw data is possible directly through our code or through the link https://donneespubliques. meteofrance.fr/donnees_libres/Hackathon/RADOMEH.tar.gz 12 The graph is created using patches of pixels of size 5 × 5. The pixels’ patches help because we have only a few digits available. When the size of the data increases, a nearest neighbor graph performs even better. 13 All parameters have been tuned optimally in a probabilistic way. This is possible since the noise is added artificially. √ The models presented in Appendix A have only one parameter to be tuned:  which is set to  = σ #y, where σ is the variance of the noise and #y the number of elements of the vector y. In order to be fair with the MAP estimator, we construct the graph with the only 20 digits used in the PSD estimation. 19 Figure 10: Experiments on the temperature of Molene. Top: Covariance matrices. Bottom left: A realization of the stochastic graph signal (first measure). Bottom center: the temperature of the Island of Brehat. Bottom right: Recovery errors for different noise levels. Section 4. A detailed experiment is performed in Figure 13. After adding Gaussian noise to the image, we remove randomly a percentage of the pixels. We consider the obtained image as the measurement and we reconstruct the original image using TV, Tikhonov and Wiener priors. In Figure 14, we display the reconstruction results for various noise levels. We create the graph with 300 faces14 and estimate the PSD with 100 faces. We test the different algorithms on the 100 remaining faces. 8 Conclusion In this contribution, we have extended the common concept of stationarity to graph signals. Using this statistical model, we proposed a new regularization framework that leverages the stationarity hypothesis by using the Power Spectral Density (PSD) of the signal. Since the PSD can be efficiently estimated, even 14 We build a nearest neighbor graph based on the pixels values. 20 Figure 11: Experiments on the humidity of Molene. Top: Covariance matrices. Bottom: Recovery errors for different noise levels. for large graphs, the proposed Wiener regularization framework offers a compelling way to solve traditional problems such as denoising, regression or semi-supervised learning. We believe that stationarity is a natural hypothesis for many signals on graphs and showed experimentally that it is deeply connected with the popular nearest neighbor graph construction. As future work, it would be very interesting to clarify this connection and explore if stationarity could be used to infer the graph structure from training signals, in the spirit of [43]. Acknowledgments We thank the anonymous reviewers for their constructive comments that helped us improve the structure of the paper, especially Section III B. We also thank Andreas Loukas, Vassilis Kalofolias and Nauman Shahid for their useful suggestions. This work has been supported by the Swiss National Science Foundation research project Towards Signal Processing on Graphs, grant number: 2000_21/154350/1. A Convex models Convex optimization has recently become a standard tool for problems such as de-noising, de-convolution or in-painting. Graph priors have been used in this field for more than a decade [6, 7, 8]. The general assumption is that the signal varies smoothly along the edges, which is equivalent to saying that the signal is low-frequency-based. Using this assumption, one way to express mathematically an in-painting problem is the following: x̄ = arg min xT Lx s.t. kM x − yk2 ≤  (22) x where M is a masking operator and  a constant computed thanks to the noise level. We could also rewrite the objective function as xT Lx+γkM x−yk22 , but this implies a greedy search of the regularization parameter γ even when the level of noise is known. For our simulations, we use Gaussian i.i.d. noise of 21 Figure 12: Top left: Some digits of the USPS dataset. Top right: Different PSDs. Compared to λ1 , the approximation is a smoothed version of the experimental PSD. Middle left: Weights matrix of the 10 nearest neighbors (patch) graph (The diagonal shape indicates the grid base topology of the graph). Middle right: spectral covariance matrix for the first 50 graph frequencies. Since we only use 20 digits for the graph construction, the stationarity level is low. Nevertheless, Wiener optimization outperforms other methods. Bottom: Recovery errors for different noise levels. Methods using the graph perform better. Even if the data is not stationary on the graph, the stationarity assumption helps a lot in the recovery. √ standard deviation n. It allows us to optimally set the regularization parameter  = n #y, where #y is the number of elements of the measurement vector. Graph de-convolution can also be addressed with the same prior assumption leading to x̄ = arg min xT Lx s.t. kh(L)x − yk2 ≤  (23) x where h is the convolution kernel. To be as generic as possible, we combine problems (22) and (23) together leading to a model capable of performing de-convolution, in-painting and de-noising at the same 22 Figure 13: ORL dataset, single in-painting experiment. Top left: Original image. Top center: Noisy image (SNR 12.43 dB). Top right: Measurements 50% of the noisy image. Bottom left: Reconstruction using Tikhonov prior (SNR 12.12 dB). Bottom center: Reconstruction using classic TV prior (SNR 13.53 dB). Bottom right: Reconstruction using Wiener optimization (SNR 14.42 dB). Figure 14: Inpainting experiments on ORL dataset. Left: some images of the dataset. Right: reconstruction error. time: x̄ = arg min xT Lx s.t. kM h(L)x − yk2 ≤ . (24) x When the signal is piecewise smooth on the graph, another regularization term can be used instead of xT Lx = k∇G xk22 , which is the `2 -norm of the gradient on the graph15 . Using the `1 -norm of the gradient favors a small number of major changes in the signal and thus is better for piecewise smooth signals. The resulting model is: x̄ = arg min k∇G xk1 s.t. kM h(L)x − yk2 ≤  (25) x 15 The gradient on the graph is defined as ∇G x(e) = linking the nodes i and j. 1 2 p W (i, j) (x(i) − x(j)), where e is the index corresponding the edge 23 In order to solve these problems, we use a subset of convex optimization tools called proximal splitting methods. Since we are not going to summarize them here, we encourage a novice reader to consult [29, 30] and the references therein for an introduction to the field. B Proof of Theorem 3 Proof. The proof is a classic development used in Bayesian machine  learning. By assumption x is a sample of a Gaussian random multivariate signal x ∼ N mx , s2 (L) . The measurements are given by y = Hx + wn ,  2  where wn ∼ N 0, σ and thus have the following first and second moments: y|x ∼ N Hx, σ 2 I) . For simplicity, we assume s2 (L) to be invertible. However this assumption is not necessary. We can write the probabilities of x and y|x as: P(x) = 1 −1 ZHx e−ks (L)(x−mx )k22 P(y|x) = = 1 ZHx −1 e−ks (L)x̃k22 , 1 −σ2 k(Hx−y)k22 e . Zsx Using Bayes law, we find P(x|y) = P(y|x)P(x) . P(y) The MAP estimator is x̄|y = arg max P(x|y) = arg max log (P(x|y)) = arg min − log (P(y|x)) − log (P(x)) + log (P(y)) x x x = arg min ks−1 (L)x̃k22 + σ −2 k(Hx − y)k22 = arg min kw(L)x̃k22 + k(Hx − y)k22 , x x where w(L) = σs−1 (L). C Proof of Theorem 5 The following is a generalization of the classical proof. For simplicity, we assume that mx̃ = 0, i.e x̃ = x. Proof. Since by hypothesis H = h(L) = U h(Λ)U ∗ , we can rewrite the optimization problem (16) in the graph Fourier domain using the Parseval identity kxk2 = kU xk2 = kx̂k2 : ˆ |ŷ = arg min kw(Λ)x̂k22 + kh(Λ)x̂ − ŷk22 . x̄ x̂ Since the matrix h(Λ) is diagonal, the solution of this problem satisfies for all graph eigenvalue λ` ˆ [`] + h2 (λ` )x̄ ˆ [`] − h(λ` )ŷ[`] = 0. w2 (λ` )x̄ For simplicity, we drop the notation (λ` ) and [`]. The previous equation is transformed in x̄ = h ŷ. w2 + h2 As a next step, we use the fact that ŷ = hx̂ + ŵn to find: 2 ˆ¯ = h x̂ + hŵn . x̂ w2 + h2 24 (26) The error performed by the algorithm becomes 2 ¯ − x̂ = −w x̂ + hŵn . ê = x̂ w2 + h2 w2 + h2 The expectation of the error can thus be computed:    2 h2 E ŵn2 w4 E x̂2 hw2 E {x̂ŵn } + − E ê = 2 2 2 (w2 + h2 ) (w2 + h2 ) (w2 + h2 ) w4 s2 + h2 n = 2 , (w2 + h2 ) with s2 the PSD of x and n the PSD of the noise wn . Note that E {x̂ŵn } = 0 because x and w are uncorrelated. Let us now substitute w2 by z and minimize the expected error (for each λ` ) with respect to z: ∂  2 E ê ∂z = = ∂ z 2 s2 + h2 n ∂z (z + h2 )2   2zs2 z + h2 − 2 z 2 s2 + h2 n 3 (z + h2 ) = 0. From the numerator, we get: 2zs2 h2 − 2h2 n = 0 The three possible solutions for z are z1 = sn2 , z2 = ∞ and z3 = −∞. z3 is not possible because z is required to be positive. z2 leads to ẋ = 0 which is optimal only if s2 = 0. The optimal solution is `) therefore z(λ` ) = sn(λ 2 (λ ) , resulting in ` s n(λ` ) . w(λ` ) = s2 (λ` ) This finishes the first part of the proof. To show that the solution to (16) is a Wiener filtering operation, `) we replace w2 (λ` ) by sn(λ 2 (λ ) in (26) and find ` x̂[`] = s2 (λ` )h(λ` ) ŷ[`], h2 (λ` )s2 (λ` ) + n(λ` ) which is the Wiener filter associated with the convolution h(L) = H. D Proof of Theorem 4 Proof. Let x be GWSS with covariance matrix Σx = s2 (L) and mean mx . The measurements satisfy y = Hx + wn , where wn is i.i.d noise with PSD σ 2 . The variable y has a covariance matrix Σy = Hs2 (L)H ∗ + σ 2 I and a mean my = Hmx . The covariance between x and y is Σxy = Σ∗yx = s2 (L)H ∗ . For simplicity, we assume s2 (L) and Hs2 (L)H ∗ + σ 2 I to be invertible. However this assumption is not necessary. The Wiener optimization framework reads: x̄ = arg min kHx − yk22 + σ 2 ks−1 (L)(x − mx )k22 . x We perform the following change of variable x̃ = x − mx , ỹ = y − mx and we obtain: ¯ = arg min kH x̃ − ỹk22 + σ 2 ks−1 (L)x̃)k22 . x̃ x̃ The solution of the problem satisfies ¯ − H ∗ ỹ + σ 2 s−2 (L)x̃ ¯ = 0. H ∗ H x̃ 25 ¯ and transform it as: From this equation we get x̃ −1 ∗ H ỹ H ∗ H + σ 2 s−2 (L) −1 2 ∗ s(L)H ∗ ỹ = s(L) σ I + s(L)H Hs(L) ¯ x̃ = =  1 σ2 s2 (L)H ∗ − σ12 s2 (L)H ∗ (σ 2 I+H ∗ s2 (L)H ) 1 2 s (L)H ∗ I − σ 2 I + H ∗ s2 (L)H σ2 −1 = s2 (L)H ∗ σ 2 I + H ∗ s2 (L)H ỹ  = = −1  Hs2 (L)H ∗ ỹ −1 (27)  Hs2 (L)H ∗ ỹ Σxy Σ−1 y ỹ where (27) follows from the Woodbury, Sherman and Morrison formula. The linear estimator of x corresponding to Wiener optimization is thus: x̄ = ¯ + mx x̃ = Σxy Σ−1 y (y − Hmx ) + mx =  −1 Σxy Σ−1 y y + I − Σxy Σy H mx = Qy + (I − QH) mx We observe that it is equivalent to the solution of the linear minimum mean square error estimator: arg min E {kQy + b − x̄k} 2 Q,b with y = Hx + wn . See [44, Equation 12.6]. Using similar arguments, we can prove that x̄ = arg min ks−1 (L)(x − mx k22 x leads to x̄ = s2 (L) Hs2 (L)H ∗ −1 s.t. y = Xx  −1  y + I − s2 (L) Hs2 (L)H ∗ H mx and is thus a linear minimum mean square estimator too. E Development of equation 21 P 1 2 Proof. Let us denote the matrix of squared distances D[i, j] = K k |xk [i] − xk [j]| for the samples {x1 , x2 , . . . xK } of the random multivariate variable x on a N vertex graph. Let us assume further that PN m[k] = n=1 xk [n] = 0. We show then that Σ̄x = − 12 JDx J where Σ̄x is the covariance (Gram) matrix PK 1 1 defined as Σ̄x [i, j] = K k=1 xk [i]xk [j] and J is centering matrix J[k, l] = δk [l] − N . We have (JDJ)[i, j] = D[i, j] + N −2 N X D[k, l] − N −1 k,l=1 N X (D[i, k] + D[k, j]) k=1 Let us substitute D[i, j] = Σ̄x [i, i] + Σ̄x [j, j] − 2Σ̄x [i, j], then we find (JDJ)[i, j] = Σ̄x [i, i] + Σ̄x [j, j] − 2Σ̄x [i, j] + N −2 2N N X ! ∗ Σ̄x [n, n] − 2m m n=1 N X ! − N −1 = −2Σ̄x [i, j] − 2N −2 m∗ m + 2N −1 m∗ (x[j] + x[i]). N Σ̄x [i, i] + N Σ̄x [j, j] + 2 Σ̄x [n, n] − 2m∗ (x[j] + x[i]) n=1 Under the assumption m[k] = PN n=1 xk [n] = 0, we recover the desired result Σ̄x = − 12 JDx J. 26 References [1] C. K. Williams, “Prediction with gaussian processes: From linear regression to linear prediction and beyond,” in Learning in graphical models. Springer, 1998, pp. 599–621. [2] B. Girault, “Signal processing on graphs-contributions to an emerging field,” Ph.D. dissertation, Ecole normale supérieure de lyon, 2015. [3] P. Welch, “The use of fast fourier transform for the estimation of power spectra: a method based on time averaging over short, modified periodograms,” IEEE Transactions on audio and electroacoustics, pp. 70–73, 1967. [4] M. S. Bartlett, “Periodogram analysis and continuous spectra,” Biometrika, pp. 1–16, 1950. [5] D. I. Shuman, S. K. Narang, P. Frossard, A. Ortega, and P. Vandergheynst, “The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains,” Signal Processing Magazine, IEEE, vol. 30, no. 3, pp. 83–98, 2013. [6] A. J. Smola and R. Kondor, “Kernels and regularization on graphs,” in Learning theory and kernel machines. Springer, 2003, pp. 144–158. [7] D. Zhou and B. Schölkopf, “A regularization framework for learning from graph data,” 2004. [8] G. Peyré, S. Bougleux, and L. Cohen, “Non-local regularization of inverse problems,” in Computer Vision–ECCV 2008. Springer, 2008, pp. 57–68. [9] D. K. Hammond, P. Vandergheynst, and R. Gribonval, “Wavelets on graphs via spectral graph theory,” Applied and Computational Harmonic Analysis, vol. 30, no. 2, pp. 129–150, 2011. [10] D. I. Shuman, B. Ricaud, and P. Vandergheynst, “Vertex-frequency analysis on graphs,” Applied and Computational Harmonic Analysis, vol. 40, no. 2, pp. 260–291, 2016. [11] A. Sandryhaila and J. M. Moura, “Discrete signal processing on graphs,” IEEE transactions on signal processing, vol. 61, pp. 1644–1656, 2013. [12] A. Gadde and A. Ortega, “A probabilistic interpretation of sampling theory of graph signals,” in Acoustics, Speech and Signal Processing (ICASSP), 2015 IEEE International Conference on. IEEE, 2015, pp. 3257–3261. [13] C. Zhang, D. Florêncio, and P. A. Chou, “Graph signal processing–a probabilistic framework,” Microsoft Res., Redmond, WA, USA, Tech. Rep. MSR-TR-2015-31, 2015. [14] B. Girault, “Stationary graph signals using an isometric graph translation,” in Signal Processing Conference (EUSIPCO), 2015 23rd European. IEEE, 2015, pp. 1516–1520. [15] B. Girault, P. Goncalves, E. Fleury, and A. S. Mor, “Semi-supervised learning for graph to signal mapping: A graph signal wiener filter interpretation,” in Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on. IEEE, 2014, pp. 1115–1119. [16] A. G. Marques, S. Segarra, G. Leus, and A. Ribeiro, “Stationary graph processes and spectral estimation,” unpublished, arXiv:1603.04667, 2016. [17] S. P. Chepuri and G. Leus, “Subsampling for graph power spectrum estimation,” in Sensor Array and Multichannel Signal Processing Workshop (SAM), 2016 IEEE. IEEE, 2016, pp. 1–5. [18] A. Loukas and N. Perraudin, arXiv:1611.00255, 2016. “Stationary time-vertex signal processing,” unpublished, [19] N. Perraudin, A. Loukas, F. Grassi, and P. Vandergheynst, “Towards stationary time-vertex signal processing,” in IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). To appear, 2017. [20] F. R. Chung, Spectral graph theory. AMS Bookstore, 1997, vol. 92. [21] F. Chung, “Laplacians and the cheeger inequality for directed graphs,” Annals of Combinatorics, vol. 9, no. 1, pp. 1–19, 2005. 27 [22] G. Strang, “The discrete cosine transform,” SIAM review, vol. 41, no. 1, pp. 135–147, 1999. [23] A. Susnjara, N. Perraudin, D. Kressner, and P. Vandergheynst, “Accelerated filtering on graphs using lanczos method,” unpublished, arXiv:1509.04537, 2015. [24] N. Perraudin, B. Ricaud, D. Shuman, and P. Vandergheynst, “Global and local uncertainty principles for signals on graphs,” unpublished, arXiv:1603.03030, 2016. [25] D. I. Shuman, C. Wiesmeyr, N. Holighaus, and P. Vandergheynst, “Spectrum-adapted tight graph wavelet and vertex-frequency frames,” IEEE Transactions on Signal Processing, vol. 63, no. 16, pp. 4223–4235, 2015. [26] N. Wiener, “Generalized harmonic analysis,” Acta mathematica, vol. 55, no. 1, pp. 117–258, 1930. [27] A. Papoulis and S. U. Pillai, Probability, random variables, and stochastic processes. Tata McGrawHill Education, 2002. [28] N. Wiener, Extrapolation, interpolation, and smoothing of stationary time series. MIT press Cambridge, MA, 1949, vol. 2. [29] P. L. Combettes and J.-C. Pesquet, “Proximal splitting methods in signal processing,” in Fixed-point algorithms for inverse problems in science and engineering. Springer, 2011, pp. 185–212. [30] N. Komodakis and J.-C. Pesquet, “Playing with duality: An overview of recent primal? dual approaches for solving large-scale optimization problems,” IEEE Signal Processing Magazine, vol. 32, no. 6, pp. 31–54, 2015. [31] P. L. Combettes and V. R. Wajs, “Signal recovery by proximal forward-backward splitting,” Multiscale Modeling & Simulation, vol. 4, no. 4, pp. 1168–1200, 2005. [32] A. Beck and M. Teboulle, “A fast iterative shrinkage-thresholding algorithm for linear inverse problems,” SIAM journal on imaging sciences, vol. 2, no. 1, pp. 183–202, 2009. [33] V. Heine, “Models for two-dimensional stationary stochastic processes,” Biometrika, vol. 42, no. 1-2, pp. 170–178, 1955. [34] A. Jain and J. Jain, “Partial differential equations and finite difference methods in image processing– part ii: Image restoration,” IEEE Transactions on Automatic Control, vol. 23, no. 5, pp. 817–834, 1978. [35] R. Chellappa and R. Kashyap, “Texture synthesis using 2-d noncausal autoregressive models,” IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 33, no. 1, pp. 194–203, 1985. [36] N. L. Roux, Y. Bengio, P. Lamblin, M. Joliveau, and B. Kégl, “Learning the 2-d topology of images,” in Advances in Neural Information Processing Systems, 2008, pp. 841–848. [37] X. He, S. Yan, Y. Hu, P. Niyogi, and H.-J. Zhang, “Face recognition using laplacianfaces,” IEEE transactions on pattern analysis and machine intelligence, vol. 27, no. 3, pp. 328–340, 2005. [38] N. Shahid, N. Perraudin, V. Kalofolias, G. Puy, and P. Vandergheynst, “Fast robust pca on graphs,” IEEE Journal of Selected Topics in Signal Processing, vol. 10, no. 4, pp. 740–756, 2016. [39] N. Perraudin, J. Paratte, D. Shuman, L. Martin, V. Kalofolias, P. Vandergheynst, and D. K. Hammond, “Gspbox: A toolbox for signal processing on graphs,” unpublished, arXiv:1408.5781, 2014. [40] N. Perraudin, D. Shuman, G. Puy, and P. Vandergheynst, “Unlocbox a matlab convex optimization toolbox using proximal splitting methods,” unpublished, arXiv:1402.0779, 2014. [41] C. E. Rasmussen, “Gaussian processes in machine learning,” in Advanced lectures on machine learning. Springer, 2004, pp. 63–71. [42] A. Chambolle, “An algorithm for total variation minimization and applications,” Journal of Mathematical imaging and vision, vol. 20, no. 1-2, pp. 89–97, 2004. [43] V. Kalofolias, “How to learn a graph from smooth signals,” in Proceedings of the 19th International Conference on Artificial Intelligence and Statistics, ser. Proceedings of Machine Learning Research, vol. 51. Cadiz: PMLR, 09–11 May 2016, pp. 920–929. 28 [44] S. M. Kay, Fundamentals of statistical signal processing: estimation theory. 1993. 29 Prentice-Hall, Inc.,
8cs.DS
1 On the Easiest and Hardest Fitness Functions Jun He, Tianshi Chen and Xin Yao, arXiv:1203.6286v5 [cs.NE] 12 Feb 2015 Abstract The hardness of fitness functions is an important research topic in the field of evolutionary computation. In theory, the study can help understanding the ability of evolutionary algorithms. In practice, the study may provide a guideline to the design of benchmarks. The aim of this paper is to answer the following research questions: Given a fitness function class, which functions are the easiest with respect to an evolutionary algorithm? Which are the hardest? How are these functions constructed? The paper provides theoretical answers to these questions. The easiest and hardest fitness functions are constructed for an elitist (1+1) evolutionary algorithm to maximise a class of fitness functions with the same optima. It is demonstrated that the unimodal functions are the easiest and deceptive functions are the hardest in terms of the time-based fitness landscape. The paper also reveals that in a fitness function class, the easiest function to one algorithm may become the hardest to another algorithm, and vice versa. I. I NTRODUCTION Which fitness functions are easy for an evolutionary algorithm (EA) and which are not? This is an important research topic in the field of evolutionary computation. In theory, the study of the hardness of fitness functions can help understanding the ability of EAs. In practice, the study may provide a guideline to the design of benchmarks. Answers to the above questions vary as the scope of fitness functions changes from all possible functions to a single function. The first scenario is to consider all possible fitness functions. In this case No Free Lunch theorems [1], [2] have answered the question. The theorems claim that the performance of any two EAs are equivalent in terms of average performance. The second scenario is to consider a class of fitness functions with the same features, such as unimodal functions versus multi-modal functions, or deceptive functions versus non-deceptive functions. However a multi-modal function may be easy to solve [3]. A unimodal function may be difficult for certain EAs but easy for others [4]. A non-deceptive function may be difficult to an EA [5], and a deceptive function may be easy [6]. Few features are available to distinguish whether a function class is easy or hard for an EA. The third scenario is to consider a single fitness function. A popular approach is to develop a statistic measure to predict the hardness of a fitness function, such as fitness-distance correlation [7], fitness variance [8], and epistasis variance [9]. Unfortunately it is intractable to design a measure that can predict the hardness of a function efficiently [10], [11]. Different from the above three scenarios, an alternative scenario is considered in the current paper: given an EA and a class of fitness functions with the same optima, which function is the hardest within the class? Which is the easiest? And how to construct them? Here the easiest function is referred to a function on which the runtime of the EA is the shortest; and the hardest is a function on which the runtime of the EA is the longest. Both are compared with other functions in the same class. These questions have never rigorously been answered before. Our research aims at understanding the hardest and easiest fitness functions within a function class, and helping design benchmarks. The set of benchmarks usually include several typical fitness functions, for example, easy, hard and ‘averagely hard’ functions in the class. An EA has the best performance on the easiest function, and the worst performance on the hardest function. We will focus on these two extreme cases in this paper. The paper is organised as follows: Section II describes related work. Section III defines the easiest and hardest fitness functions, and establishes criteria of determining whether a function is the easiest or the hardest. Section IV constructs the easiest and hardest functions. Section V discusses the mutual transformation between the easiest and hardest functions. Section VI concludes the paper. II. R ELATED W ORK The hardness of fitness functions (or called problem difficulty) has been studied over two decades. Normally a fitness function is said to be easy to an EA if the runtime is polynomial on the function or hard if the runtime is exponential. How to characterize which fitness functions are easy or hard was thought to be a major challenge [10]. One approach is to link features of a fitness landscape to the hardness of fitness functions. Several features have been investigated, for example, isolation, deception and multi-modality, ruggedness and neutrality. A fitness landscape with isolation is hard for EAs, but other characteristics may not be related too much to the hardness of fitness functions [10]. A fully This work was supported by the EPSRC under Grant Nos. EP/I009809/1 and EP/I010297/1. Xin Yao was supported by a Royal Society Wolfson Research Merit Award and also by the NSFC under Grant No. 61329302. Tianshi Chen was supported by the NSFC under Grant Nos. 61100163 and 61221062. Jun He is with Department of Computer Science, Aberystwyth University, Aberystwyth, SY23 3DB, UK. Tianshi Chen is with State Key Laboratory of Computer Architecture, Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China. Xin Yao is with CERCIA, School of Computer Science, University of Birmingham, Birmingham B15 2TT, UK. 2 non-deceptive function may be difficult for an EA [5] but some deceptive functions can be solved easily by an EA [6]. Some multi-modal functions may be easy to solve [3], but the unimodal function like the ‘long path’ problem [3] could be difficult for certain EAs [4]. Few features are universally useful to distinguish between hard and easy fitness functions. Another approach is to predict the hardness of a fitness function through a statistic measure. Many measures are proposed, for example, fitness-distance correlation [7], correlation length and operator correlation [12], fitness variance [8], and epistasis variance [9]. Nevertheless, to compute the exact value of such measures usually is exponential in the problem size due to the fact that the search space is exponentially large [10], [11], [13]. Inherent flaws also exist in the common hardness measures such as epistasis variance, fitness-distance correlation and epistasis correlation [14]. An alternative theoretical approach is based on fitness levels. Hard fitness functions are classified into two types: ‘wide gap’ problems and ‘long path’ problems [15], [16]. For the ‘wide gap’ type, the EA is trapped at a fitness level, because there is a wide gap between that fitness level and higher fitness levels. For the ‘long-path’ type, the EA has to take a long path to reach an optimum. The behavior of EAs on these two problems are different [17], [18]. The research in the current paper is totally different from previous work. The hardest and easiest functions are compared with other fitness functions within the same function class. The hardest function are not relevant to exponential runtime and the easiest fitness functions are not relevant to polynomial runtime. For some function class, an EA only needs polynomial time on the hardest function. For some other function class, an EA may take exponential time on the easiest function. Our study is also different from No Free Lunch theorems [1], [2], which state that any two EAs are equivalent when their performance is averaged across all possible fitness functions. We don’t intend to investigate the easiest and hardest functions among all possible fitness functions, instead only within a class of fitness functions with the same optima. III. E ASIEST AND H ARDEST F ITNESS F UNCTIONS In this section we define the easiest and hardest fitness functions in a function class and establish the criteria to determine whether a function is the easiest or hardest. A. Definition of Easiest and Hardest Fitness Functions Consider the problem of maximizing a class of fitness functions with the same optima. An instance of the problem is to maximize a fitness function f (x): max{f (x); x ∈ S}, (1) where S is a finite set. The optimal set is denoted by Sopt and the non-optimal set by Snon . Without loss of generality, the function f (x) takes L + 1 finite values f0 > f1 > · · · > fL (called fitness levels). Corresponding to fitness levels, the set S is decomposed into L + 1 subsets: Sl := {x | f (x) = fl }, l = 0, 1, · · · , L. For simplicity of analysis, we only investigate strictly elitist (1+1) EAs. Using strictly elitist selection, the parent is replaced by the child only when the child is fitter. Therefore the best found solution is always preserved. In the EAs, mutation is independent of the fitness function. Both mutation and selection operators are time invariant (i.e., static). The procedure of such an elitist (1+1) EA is described as follows. 1: input: fitness function f (x); 2: generate a solution at random and denote it by φ0 ; 3: generation counter t ← 0; 4: while the maximum value of f (x) is not found do 5: child φt.m ← is mutated from parent φt ; 6: if f (φt.m ) > f (φt ) then 7: next generation parent φt+1 ← φt.m ; 8: else 9: next generation parent φt+1 ← φt ; 10: end if 11: t ← t + 1; 12: end while 13: output: the maximal value of f (x). Let G(x) denote the expected number of generations for an EA to find an optimal solution for the first time when starting at x (called expected hitting time). In (1+1) EAs, G(x) also represents the expected number of fitness evaluations (called expected runtime). In this paper, we restrict our discussion to those EAs whose expected runtime is finite (convergent). Definition 1: Given an EA for maximising a class of fitness functions with the same optima, a function f (x) in the class is said to be the easiest to the EA if starting from any initial point, the runtime of the EA for maximising f (x) is no more than the runtime for maximising any fitness function g(x) in the class when starting from the same initial point. A function f (x) 3 in the class is said to be the hardiest to the EA if starting from any initial point, the runtime of the EA for maximising f (x) is no less than the runtime for maximising any fitness function g(x) in the class when starting from the same initial point. The definition of the easiest and hardest functions is based on a point-by-point comparison of the runtime of the EA on two fitness functions. It is irrelevant to polynomial or exponential runtime. The easiest and hardest functions are not unique. This will be demonstrated in Subsection IV-C. B. Criterion for Determining Easiest Function Before we establish the criterion, we apply drift analysis to the random sequence {φt , t = 0, 1, · · · } and draw several preliminary results. Notice that each generation of the (1+1) EA consists of two steps: mutation and selection, selection mutation φt −→ φt.m with φt −→ φt+1 . The mutation operator is a transition from φt to φt.m , whose transition probabilities are represented by P [m] (x, y) := P (φt.m = y | φt = x), x, y ∈ S. (2) Here φ is a random variable and x its value. The selection operator is another transition from φt and φt.m to φt+1 , whose transition probabilities are represented by P [s] (x, y; z) := P (φt+1 = z | φt = x, φt.m = y), x, y, z ∈ S. The tth generation is a transition from φt to φt+1 , whose transition probabilities are represented by P (x, z) := P (φt+1 = z | φt = x). (3) In drift analysis, a function d(x) is called a drift function if it is non-negative at any point and equals to 0 at any optimum. Given a drift function d(x), drift represents the progress rate of moving towards the optima per generation. Drift at point x is defined by X ∆(x) := P (x, y)(d(x) − d(y)). y∈S + − Define positive drift ∆ (x) and negative drift ∆ (x) as follows X P (x, y)(d(x) − d(y)), ∆+ (x) = y:d(x)>d(y) − ∆ (x) = X P (x, y)(d(x) − d(y)). y:d(x)<d(y) Then the drift ∆(x) = ∆+ (x) + ∆− (x). Using drift analysis [19], we obtain the following preliminary results. Lemma 1: [19, Lemma 1] If the drift satisfies that ∆(x) ≥ 1 for any non-optimal point x, then the expected runtime satisfies that G(x) ≤ d(x) for any point x. Lemma 2: [19, Lemma 2] If the drift satisfies that ∆(x) ≤ 1 for any non-optimal point x, then the expected runtime satisfies that G(x) ≥ d(x) for any point x. Lemma 3: [19, Lemma 3] Let the drift function d(x) = G(x), then the drift satisfies ∆(x) = 1 for any non-optimal point x. Furthermore, the runtime of an elitist (1+1) EA can be explicitly expressed in transition probabilities. Lemma 4: [16, Theorem 4] For any elitist (1+1) EA, its expected runtime is given by  x = S0 .  0, Pl−1 P 1+ P (x,y)G(y) G(x) = y∈Sk Pk=0 , x ∈ Sl , l > 0.  l−1 P k=0 y∈Sk P (x,y) Using the above lemmas, we establish a criterion of determining whether a fitness function is the easiest to an elitist (1+1) EA. Theorem 1: Given an elitist (1+1) EA, and a class of fitness functions with the same optima, let Gf (x) denote the runtime of the (1+1) EA for maximising f (x). If the following monotonically decreasing condition holds: • for any two points x and y such that Gf (x) < Gf (y), it has f (x) > f (y), then f (x) is the easiest in the fitness function class. Proof: Let g(x) be a fitness function in the function class. {φt , t = 1, 2, · · · } denotes the sequence for maximising f (x), and {ψt , t = 1, 2, · · · } the sequence for maximising g(x). Let Gg (x) denote the runtime of the (1+1) EA for maximising g(x). Since our objective is to show the expected runtime on f (x) is no more than the runtime on any other function, we take the runtime on f (x) as the drift function: d(x) = Gf (x). This plays a crucial role in our analysis. 4 For the sequence {φt }, denote the drift at point x by ∆φ (x). For the sequence {ψt }, denote the drift at point x by ∆ψ (x). The subscripts φ and ψ are used to distinguish between the two sequences {φt } and {ψt }. Notice that d(x) = Gf (x), then we apply Lemma 3 and get that for any non-optimal point x, drift ∆φ (x) = 1. (4) The rest of proof is based on the idea: first, we prove the drift ∆ψ (x) ≤ 1 for the sequence {ψt }, and then draw the derived conclusion using Lemma 2. (1) First we compare the negative drift of the two sequences. In the case of negative drift, we consider two points x and y such that d(x) < d(y) (i.e., Gf (x) < Gf (y)). According to the monotonically decreasing condition, f (x) > f (y). For the sequence {φt }, y is never accepted due to elitist section, which leads to Pφ (x, y) = 0. Thus for the sequence {φt }, there is no negative drift. ∆− φ (x) = 0. For the sequence {ψt }, there exist two cases: (i) g(x) < g(y); (ii) g(x) ≥ g(y). In the case of g(x) < g(y), y will be accepted, which implies Pψ (x, y) ≥ 0. Thus there exists negative drift for the sequence {ψt }. ∆− ψ (x) ≤ 0. Comparing the negative drift of these two sequences, we get − ∆− ψ (x) ≤ ∆φ (x). (5) (2) Secondly we compare the positive drift of the two sequences. In the case of positive drift, we consider two points x and y such that d(x) > d(y). If y is not an optimum, then according to the monotonically decreasing condition, f (x) < f (y). If y is an optimum, then naturally f (x) < f (y). For the sequence {φt }, if such a y has been mutated from x, then y is always accepted due to elitist selection. Thus Pφ (x, y) = P [m] (x, y). For the sequence {ψt }, there exist two cases: (i) g(x) < g(y); (ii) or g(x) ≥ g(y). In the case of g(x) < g(y), according to elitist section, y is always accepted. Thus Pψ (x, y) = P [m] (x, y). In the case of g(x) ≥ g(y), according to elitist section, y will not be accepted. The transition probability Pψ (x, y) = 0. Then we get that Pφ (x, y) ≥ Pψ (x, y). Hence X Pψ (x, y)(d(x) − d(y)) y:d(x)>d(y) ≤ X Pφ (x, y)(d(x) − d(y)). y:d(x)>d(y) So the positive drift of the two sequences satisfies + ∆+ ψ (x) ≤ ∆φ (x). (6) Merging (5) and (6) and using (4), we know that the total drift of the two sequences satisfies ∆ψ (x) ≤ ∆φ (x) = 1. Applying Lemma 2, we see the expected runtime on g(x) satisfies Gg (x) ≥ d(x) = Gf (x), then we finish the proof. Now we give an intuitive explanation of the above theorem. The monotonically decreasing condition means the function is unimodal in terms of the time-based fitness landscape and Theorem 1 asserts that a unimodal function is always the easiest. In the following we explain this in detail. In a time-based fitness landscape, runtime G(x) is regarded as the distance d(x) between a point x and the optimum. It is completely different from a neighbourhood-based distance such as the Hamming distance. Time is seldom used as a distance measure in evolutionary computation but popular in our real life. Taking runtime as the distance, we visualise the monotonically decreasing condition • for any two points x and y such that d(x) < d(y), it has f (x) > f (y), using a time-based fitness landscape (see Fig. 1), where the x axis is the runtime and the y axis is the fitness, and the origin represents the set of optima with d(x) = 0. 5 f (x) d(x) Fig. 1. A unimodal time-based fitness landscape. The x axis is the runtime: d(x) = G(x). The y axis is the fitness function. The origin represents the optimum. The landscape is unimodal: the function f (x) has exactly one optimum. In contrast, any unimodal function defined in the 2-D time-based fitness landscape will satisfy the monotonically decreasing condition. The unimodal property implies that no negative drift exists in an elitist EA. Thus the EA always moves towards the optimum. This makes the unimodal time-based fitness landscapes the easiest to the EA. The theorem only states that a unimodal time-based fitness landscape is the easiest. Nevertheless this assertion could not be established if using a neighbourhood-based distance such as the Hamming distance. A unimodal function in the context of a neighbourhood-based fitness landscape is not always the easiest. C. Criterion of Determining Hardest Function In a similar way, we establish a criterion of determining whether a fitness function is the hardest to an elitist (1+1) EA. It is similar to Theorem 1. The monotonically decreasing condition is replaced by the monotonically increasing condition. Theorem 2: Given an elitist (1+1) EA, and a class of fitness functions with the same optima, let Gf (x) denote the expected runtime for maximising f (x). If the following monotonically increasing condition holds: • for any two non-optimal points x and y such that Gf (x) < Gf (y), it has f (x) < f (y), then f (x) is the hardest in the class. Proof: The proof is similar to that of Theorem 1 but with several changes. Let g(x) be a fitness function in the function class. {φt , t = 1, 2, · · · } denotes the sequence for maximising f (x), and {ψt , t = 1, 2, · · · } the sequence for maximising g(x). Gg (x) denotes the runtime of the (1+1) EA for maximising g(x). We take the runtime on f (x) as the drift function: d(x) = Gf (x). For the sequence {φt }, notice that d(x) = Gf (x), then we apply Lemma 3 and get for any non-optimal point x ∆φ (x) = 1. (7) (1) First we compare the negative drift of the two sequences. We consider two non-optimal points x and y such that d(x) < d(y) (i.e., Gf (x) < Gf (y)). According to the monotonically increasing condition, f (x) < f (y). For the sequence {φt }, if such a y has been mutated from x, then y is always accepted due to elitist selection. Thus Pφ (x, y) = P [m] (x, y). For the sequence {ψt }, there exist two cases: (i) g(x) < g(y); (ii) or g(x) ≥ g(y). In the case of g(x) < g(y), if such a y has been mutated from x, then y is always accepted due to elitist selection. Thus Pψ (x, y) = P [m] (x, y). In the case of g(x) ≥ g(y), according to elitist section, y will not be accepted. The probability Pψ (x, y) equals to Pψ (x, y) = 0. Then we get that Pφ (x, y) ≥ Pψ (x, y). Hence X Pψ (x, y)(d(x) − d(y)) y:d(x)<d(y) ≥ X y:d(x)<d(y) Pφ (x, y)(d(x) − d(y)). (8) 6 Equivalently the negative drift of the two sequences satisfies − ∆− ψ (x) ≥ ∆φ (x). (9) (2) Secondly we compare the positive drift of the two sequences. We consider two points x and y such that d(x) > d(y), where y could be either an optimum or not. First consider y an optimum. For the sequence {φt }, if such a y has been mutated from x, then y is always accepted due to elitist selection. Thus Pφ (x, y) = P [m] (x, y). Similarly for the sequence {ψt }, y is always accepted due to elitist selection. Thus Pψ (x, y) = P [m] (x, y). Then we get Pψ (x, y) = Pφ (x, y). (10) Then consider y not an optimum. According to the monotonically increasing condition, f (x) > f (y) if y is not an optimum. For the sequence {φt }, y is never accepted due to elitist section, which leads to Pφ (x, y) = 0. For the sequence {ψt }, even if f (x) > f (y), it is still possible that g(x) < g(y). So y may be accepted. This means Pψ (x, y) ≥ 0. Thus we have Pψ (x, y) ≥ Pφ (x, y). (11) Combining (10) and (11), we have for any y, Pψ (x, y) ≥ Pφ (x, y). Then X Pψ (x, y)(d(x) − d(y)) y:d(x)>d(y) ≥ X Pφ (x, y)(d(x) − d(y)). (12) y:d(x)>d(y) Equivalently the positive drift of the two sequences satisfies + ∆+ ψ (x) ≥ ∆φ (x). (13) Merging (9) and (13) and using (7), we draw that the total drift of the two sequences satisfies ∆ψ (x) ≥ ∆φ (x) = 1. It follows from Lemma 1 that for any non-optimal point x Gg (x) ≤ d(x) = Gf (x), then we finish the proof. An intuitive explanation of the above theorem is that the monotonically increasing condition means the function is deceptive and Theorem 2 states a deceptive function is always the hardest. Let’s demonstrate this using the time-based fitness landscape. Still taking runtime G(x) as the distance d(x) to the optima, we visualise the monotonically increasing condition • for any two non-optimal points x and y such that d(x) < d(y), it has f (x) < f (y), using a time-based fitness landscape (see Fig. 2). The landscape is deceptive: the closer a point is to the origin, the lower its fitness is. The deceptive time-based fitness landscape is the hardest. When using a neighbourhood-based distance, it is impossible to establish a similar result under a similar condition. A deceptive function in the context of the neighbourhood-based fitness landscape is not always the hardest. Note: the above unimodal and deceptive time-based fitness landscapes are different from the easy and hard fitness landscapes described in [20], which are classified by polynomial or exponential hitting time. 7 f (x) d(x) Fig. 2. A deceptive time-based fitness landscape. The x axis is the runtime: d(x) = G(x). The y axis is the fitness function. Th origin represents the optimum. D. Case Study: 0-1 Knapsack Problem We give two simple examples to show the application of the above theorems. The examples come from the 0-1 knapsack problem. We will not consider all instances of the 0-1 knapsack problem. Instead we focus on an instance class. Example 1: Consider an instance class of the 0-1 knapsack problem described as follows: Pn maximize fP(x) = i=1 vi xi , n subject to i=1 wi xi ≤ C, where vi > 0 is the value of item i, wi > 0 its weight, and C the knapsack capacity. The value of items satisfies v1 > v2 + · · · + vn , and the weight of items satisfies w1 > w2 + · · · + wn , the knapsack capacity C = w1 . A solution is represented by a binary string x = (x1 · · · xn ). The unique optimum is (10 · · · 0), denoted by x∗ . An elitist (1+1) EA using bitwise mutation is applied to the problem. 1 1 • EA( n ). Flip each bit independently with flipping probability n . For simplicity of analysis, we adopt the simplest approach to handle the constraint: reject any infeasible solution during selection. Let’s investigate a special instance in the class: v1 = n and v2 = · · · = vn = 1; w1 = n and w2 = · · · = wn = 1. Notice that the global optimum is x∗ := (10 · · · 0) and the local optimum is (01 · · · 1). It is a deceptive function. We can prove the monotonically increasing condition holds. We give an outline of the proof but omit its detailed calculation. Corresponding to fitness level fl , the subset S0 = {x∗ }, and f0 = n, Sl = {x | h(x, x∗ ) = n − l}, and fl = n − l, for l > 0, where h(x, y) is the Hamming distance between x and y. According to Lemma 4, the expected runtime of EA( n1 ) is given by the following recurrence relation: G(x) = 0 for x ∈ S0 and Pl−1 P 1 + k=0 y∈Sk P (x, y)G(y) G(x) = , x ∈ Sl , Pl−1 P k=0 y∈Sk P (x, y) where P (x, y) = P [m] n−h(x,y)  h(x,y)  1 1 . (x, y) = 1 − n n Then the monotonically increasing condition holds. G(x) < G(y) =⇒ f (x) < f (y), x, y ∈ Snon . Applying Theorem 2, we know the fitness function related to this instance is the hardiest in the class. Example 2: Consider an instance class of the 0-1 knapsack problem. The knapsack capacity C is enough large such that C ≥ w1 + · · · + wn . The unique optimum is (1 · · · 1). This function class is equivalent to linear functions. We apply EA( n1 ) to the problem. Let’s investigate a special instance in the class: v1 = · · · = vn = 1. Its fitness function is equivalent to the OneMax function, so that it is easy. We prove the OneMax function is the easiest through verifying the monotonically decreasing condition. We give an outline of the proof. Corresponding to fitness level fl where l = 0, · · · , n, the subset Sl = {x | h(x, ~1) = l}, and fl = n − l, 8 where h(x, y) is the Hamming distance between x and y. According to Lemma 4, the expected runtime of EA( n1 ) is given by the following recurrence relation: G(x) = 0 for x ∈ S0 and for l > 0 Pl−1 P 1 + k=0 y∈Sk P (x, y)G(y) G(x) = , x ∈ Sl , Pl−1 P k=0 y∈Sk P (x, y) where P (x, y) = P [m]  n−h(x,y)  h(x,y) 1 1 (x, y) = 1 − . n n Then the monotonically decreasing condition holds. G(x) < G(y) =⇒ f (x) > f (y), x, y ∈ S. Applying Theorem 1, we get the OneMax function is the easiest among all linear functions. Note: The monotonically increasing condition is a sufficient condition for a fitness function being the hardest, but not necessary. The same is true to the monotonically decreasing condition of the easiest functions. The reason is trivial: Consider a function class only includes one function, then the function will be both the easiest and hardest in the class, regardless of the monotonically increasing or decreasing condition. IV. C ONSTRUCTION OF E ASIEST AND H ARDEST F ITNESS F UNCTIONS TO AN EA In this section we construct unimodal functions (the easiest) and deceptive functions (the hardest), respectively, to any given elitist (1+1) EA. A. Construction of Easiest Fitness Functions Given a class consisting of all fitness functions with the same optima on a finite set S, consider an elitist (1+1) EA for maximising a fitness function in the class. We construct the easiest function f (x) to the EA as follows. 1) Let S0 = Sopt . For any x ∈ S0 , define G′ (x) = 0. 2) Suppose that the subsets S0 , · · · , Sl−1 are given and G′ (x) has been defined on these subsets. Let Sl be the set consisting of all points such that Pl−1 P 1 + k=0 y∈Sk P [m] (x, y)G′ (y) . arg min Pl−1 P [m] (x, y) x∈S\∪l−1 S k=0 k k=0 y∈Sk P For any x ∈ Sl , define ′ G (x) = 1+ Pl−1 P k=0 y∈Sk Pl−1 P k=0 P [m] (x, y)G′ (y) y∈Sk P [m] (x, y) . (14) The value of G′ (x) is the same for any point x in the same subset. 3) Repeat the above step until any point is covered by a subset. Then there exists some integer L > 0 and S = ∪L k=0 Sk . 4) Choose L + 1 numbers f0 , · · · , fL such that f0 > · · · > fL . Set a fitness function f (x) as follows: f (x) = fk , for x ∈ Sk . The following theorem shows that the fitness function constructed above is the easiest to the EA. The proof is a direct application of the monotonically decreasing condition. Theorem 3: f (x) is the easiest function in the function class with respect to the EA. Proof: (1) We show that G′ (x) equals to the expected runtime G(x). According to Lemma 4, the expected runtime G(x) = 0 for x ∈ S0 and for l > 0 Pl−1 P 1 + k=0 y∈Sk P (x, y)G(y) , x ∈ Sl . (15) G(x) = Pl−1 P k=0 y∈Sk P (x, y) For any x ∈ Sk and y ∈ Sl where k > l, since f (x) = fk < f (y) = fl and the EA adopts elitist selection, y is always accepted if it has been generated via mutation. Thus the transition probability P (x, y) equals to P [m] (x, y). (15) equals to Pl−1 P 1 + k=0 y∈Sk P [m] (x, y)G(y) G(x) = , x ∈ Sl . (16) Pl−1 P [m] (x, y) k=0 y∈Sk P Comparing it with (14), G(x) and G′ (x) are identical. (2) We prove the monotonically decreasing condition. 9 First we prove an inequality: G(x) > G(y), x ∈ Sl+1 , y ∈ Sl . (17) We prove it by induction. For any x ∈ S1 , y ∈ S0 , it is trivial that G(x) > G(y) = 0. Suppose that for any x ∈ Sl , y ∈ Sl−1 , it holds G(x) > G(y). We prove that for any x ∈ Sl+1 , y ∈ Sl , it holds G(x) > G(y). Since y ∈ Sl , from the construction, we know that Pl−1 P 1 + k=0 z∈Sk P [m] (w, z)G(z) G(y) = min . Pl−1 P l−1 [m] (w, z) w∈S\∪k=0 Sk k=0 z∈Sk P Let w = x, then we get G(y) ≤ 1+ Pl−1 P k=0 x∈Sk Pl−1 P k=0 Equivalently G(y) l−1 X X P [m] z∈Sk P [m] (x, z) l−1 X X (x, z) ≤ 1 + . P [m] (x, z)G(z). k=0 z∈Sk k=0 z∈Sk P P [m] (x, z)G(z) [m] We add the term z∈Sl P (x, z)G(z) to both sides. Notice that G(z) = G(y) for z ∈ Sl . As to the left-hand side, we replace the factor G(z) by G(y) and move it outside of the summation. Then we get G(y) l X X l X X P [m] (x, z) ≤ 1 + k=0 z∈Sk k=0 z∈Sk Equivalently G(y) ≤ 1+ Since x ∈ Sl+1 , it follows from (16) G(x) = P [m] (x, z)G(z). 1+ Pl P P z∈Sk P [m] (x, z) Pl P z∈Sk P [m] (x, z)G(z) k=0 Pl k=0 k=0 Pl k=0 z∈Sk P z∈Sk P [m] (x, z)G(z) P [m] (x, z) . . So we get G(y) ≤ G(x). The inequality is strict since x and y are in different subsets. Thus we prove (17). Secondly using (17), we can infer the monotonically decreasing condition easily. From (17), we draw that G(x) > G(y), if x ∈ Sl , y ∈ Sk with l > k. (18) For any two points x and y such that G(x) > G(y), let x ∈ Sk , y ∈ Sl . Then k and l must satisfy k < l. Then we have f (x) = fk < f (y) = fl . This proves the monotonically decreasing condition. (3) The conclusion is drawn from Theorem 1. The above theorem provides an approach to designing the easiest fitness functions in the function class. The idea behind the construction procedure is simple: we construct a function which is unimodal in the time-based fitness landscape and then it is the easiest. Notice that the number of the easiest functions is infinite since the potential values of each fl are infinite. B. Construction of Hardest Fitness Functions We consider an elitist (1+1) EA and a class of fitness functions with the same optima. The hardest fitness function f (x) in this class is constructed as follows. 1) Let S0 = Sopt . For any x ∈ S0 , let G′ (x) = 0. 2) Suppose that the subsets S0 , · · · , Sl−1 have been produced and G(x) have been defined on these subsets. Then define Sl to be the set of all points such that Pl−1 P [m] 1 + k=0 (x, y)G′ (y) y∈Sk P . arg max P P l−1 [m] (x, y) x∈S\∪l−1 S k=0 k k=0 y∈Sk P For any x ∈ Sl , set ′ G (x) = 1+ Pl−1 P k=0 y∈Sk Pl−1 P k=0 P [m] (x, y)G′ (y) y∈Sk P [m] (x, y) . (19) 3) Repeat the above step until any point is covered by a subset. Then there exists an integer L > 0 such that S = ∪L k=0 Sk . 10 4) Choose L + 1 number f0 , · · · , fL such that f0 > · · · > fL > 0. Set the fitness function to be f (x) = fk , x ∈ Sk . Now we prove that f (x) is the hardest fitness function in the class using the monotonically increasing condition. Theorem 4: f (x) is the hardest function in the function class to the EA. Proof: (1) We prove that the mean runtime G(x) = G′ (x). The proof is similar to the first step in the proof of Theorem 3. (2) We prove the monotonically increasing condition. The proof is similar to the second step in the proof of Theorem 3. (3) The conclusion is drawn from Theorem 2. The above theorem provides an approach to designing the hardest fitness functions in the class. We construct a function which is deceptive in the time-based fitness landscape and then it is the hardest. In the construction of the easiest and hardest functions, we don’t restrict the representation of fitness functions. However, the current approach is not suitable for the fitness function class with a specific requirement, for example, all fitness functions in the class must be linear or quadratic. This research issue is left for future studies. C. Case Study: Benchmarks in Pseudo-Boolean Optimisation So far we have introduced a general approach to constructing the easiest and hardest fitness functions. Now we illustrate an application in pseudo-Boolean optimisation: to design benchmarks within a fitness function class. According to No Free Lunch theorems, the performance of two EAs are equivalent if averaged over all possible Boolean-valued fitness functions. Therefore we only consider a fitness class. Example 3: Consider the class of all pseudo-Boolean functions with the same optima at ~0 := (0 · · · 0) and ~1 := (1 · · · 1). max{f (x); x ∈ {0, 1}n}. (20) We compare the performance of two (1+1) elitist EAs on this problem using different mutation rates. 1) EA( n1 ). Flip each bit independently with flipping probability n1 . The mutation probability from x to y is n−h(x,y)  h(x,y)  1 1 , P [m] (x, y) = 1 − n n where h(x, y) denote the Hamming distance between x and y. 2) EA( 12 ). Flip each bit independently with flipping probability 12 . The mutation probability from x to y is  n 1 P [m] (x, y) = . 2 (21) (22) As to benchmark functions, their optima must be known in advance and the number of benchmarks is often between 5 to 30. Since a function class normally includes a large amount of functions, a question is which functions should be chosen as benchmarks? Naturally we prefer typical functions in the class: easy, hard and ‘averagely hard’ functions. Here we only consider how to design the easiest and hardest fitness functions. The easiest fitness function to EA( n1 ) is constructed as follows. 1) Let S0 = {~0, ~1}. For any x ∈ S0 , define G(x) = 0. 2) Suppose that the subsets S0 , · · · , Sl−1 are given and G(x) has been defined on these subsets. Let Sl be the set consisting of all points such that Pl−1 P 1 + k=0 y∈Sk P [m] (x, y)G(y) . (23) arg min Pl−1 P [m] (x, y) x∈S\∪l−1 S k=0 k k=0 y∈Sk P Using the mutation probability P [m] (x, y) = we get n−h(x,y)  h(x,y)  1 1 , 1− n n Sl = {x | min{h(x, ~0), h(x, ~1)} = l}. For any x ∈ Sl , define G(x) = 1+ Pl−1 P k=0 Pl−1 k=0 y∈Sk P y∈Sk P [m] (x, y)G(y) P [m] (x, y) . (24) 3) Repeat the above step until any point is covered by a subset. The last subset is SL where L := n/2. Without loss of generality, assume n is even. 4) Choose L + 1 numbers f0 , · · · , fL such that f0 > · · · > fL . Set the fitness function f (x) = fl , for x ∈ Sl . Then f (x) is the easiest function in the function class. 11 An example of the easiest function to EA( n1 ) is the Two Max function, given by f (x) = n − min{h(x, ~0), h(x, ~1)}. (25) The runtime is calculated as follows. Let x ∈ Sl , without loss of generality, suppose it has l 0-valued bits and n − l 1-valued bits (with l ≤ n − l). The event of going from the fitness level fl to a higher fitness level will happen if one of 0-valued bits is flipped and other bits are kept unchanged. The probability of this event is at least n−1    1 l l 1 1− ≥ , n ne 1 n where e is Euler’s constant. Thus the runtime of going from the fitness level fl to a higher fitness level is no more than Since the number of fitness levels is L, therefore the total runtime to reach the global optima is at most L X en l=1 l en l . = O(n ln n). There are infinite easiest fitness functions, including linear, quadratic and other non-linear functions, for example,  k f (x) = n − min{h(x, ~0), h(x, ~1)} , k = 1, 2, · · · (26) The runtime of the EA on all easiest fitness functions is the same no matter whether they are linear or not. It is worth noting that the Two Max function is unimodal in the time-based fitness landscape. But using the Hamming distance, the function is two-modal due to two optima at ~0 and ~1. The hardest fitness function to EA( n1 ) is constructed as follows. 1) Let S0 = {~0, ~1}. For any x ∈ S0 , let G(x) = 0. 2) Suppose that the subsets S0 , · · · , Sl−1 have been produced and G(x) have been defined on these subsets. Then define Sl to be the set of all points such that Pl−1 P [m] 1 + k=0 (x, y)G(y) y∈Sk P . arg max P P l−1 [m] (x, y) x∈S\∪l−1 S k=0 k k=0 y∈Sk P Using the mutation probability P [m] (x, y) =  n−h(x,y)  h(x,y) 1 1 1− , n n we get (let L := n/2 and assume n/2 is an integer) Sl = {x | min{h(x, ~0), h(x, ~1)} = L − l − 1}. For any x ∈ Sl , set G(x) = 1+ Pl−1 P k=0 y∈Sk Pl−1 P k=0 y∈Sk P [m] (x, y)G(y) P [m] (x, y) . 3) Repeat the above step until any point is covered by a subset. The last subset is SL . 4) Choose L + 1 numbers f0 , · · · , fL such that f0 > · · · > fL . Set the fitness function f (x) = fl , for x ∈ Sl . An example of the hardest function to EA( n1 ) is a Fully Deceptive function  n + 1, if x = ~0, ~1; f (x) = ~ ~ min{h(x, 0), h(x, 1)}, otherwise. (27) (28) Consider a point x ∈ S1 where x consists of exact n/2 zero-valued bits and x is the farthest from ~0 and ~1. Now we calculate the runtime G(x). Since the Hamming distance between x and the optima ~0 and ~1 is n/2, so the transition probability of going from x to the two optima is between n/2  n/2 n/2  n/2   1 1 1 1 and 2 1 − , 1− n n n n and the runtime is Θ(nn/2 ). There are infinite hardest fitness functions, for example, for k = 1, 2, · · · ( (n + 1)k , if x = ~0, ~1;  k f (x) = min{h(x, ~0), h(x, ~1)} , otherwise. (29) 12 TABLE I T HREE BENCHMARKS AND RUNTIME C OMPARISON OF T WO EA S . name Two Max Fully Deceptive f (x) = function f(x) = n − min{h(x, ~0), h(x, ~1)} Two Needles in Haystack time-based fitness landscape unimodal 1 EA( n ) O(n ln n) EA( 21 ) Θ(2n ) deceptive Θ(nn/2 ) Θ(2n ) isolation nΘ(n) × Θ(1) Θ(2n ) n + 1, if x = ~0, ~1; min{h(x, ~0), h(x, ~1)}, otherwise. n 1, if x = ~0, ~1; f (x) = 0, otherwise. We can construct the easiest and hardest fitness functions to EA( 21 ) in the same way. The easiest fitness function to EA( 21 ) is constructed as follows. 1) Let S0 be the set of optima ~0 and ~1. 2) Let S1 be the set consisting of all points such that x∈S\S0 Using the mutation probability 1 . [m] (x, y) P y∈S0 arg min P P [m] (x, y) = 2−n , we get S1 = {x | x 6= ~0, ~1}. 3) Choose 2 numbers f0 , f1 such that f0 > f1 . Set the fitness function f (x) = fl , for x ∈ Sl . Then f (x) is the easiest function in the function class. An example of the easiest function to EA( 21 ) is the Two Needles in the Haystack function  1, if x = ~0, ~1; f (x) = (30) 0, otherwise. We calculate the runtime G(x) for x ∈ S1 as follows. The transition probability of going from x to the two optima is between ( 12 )n and 2 × ( 12 )n . Then the runtime is Θ(2n ). The hardest fitness function to EA( 21 ) is constructed as follows. 1) Let S0 = {~0, ~1}. 2) Let S1 be the set of all points such that x∈S\S0 Using the mutation probability 1 . [m] (x, y) y∈S0 P arg max P P [m] (x, y) = 2−n , we get S1 = {x | x 6= ~0, ~1}. 3) Choose 2 numbers f0 , f1 such that f0 > f1 . Set the fitness function f (x) = fl , for x ∈ Sl . Then the above function f (x) is the hardest to EA( 21 ). An example of the hardest function to EA( 21 ) is the Two Needles in the Haystack function, the same as the easiest function. The runtime is Θ(2n ). Since the runtime of EA( 12 ) on both the easiest and hardest functions is Θ(2n ). Then we know for any function in the class, its runtime is Θ(2n ). We have constructed three benchmark functions: Two Max, Fully Deceptive and Two Needles in the Haystack. They are described in Table I. The three functions represent three typical fitness landscapes: unimodal, deceptive and isolation. Using the benchmarks, we can make a fair comparison of the performance of EA( n1 ) and EA( 21 ). Table I lists the results. The runtime of EA( n1 ) on the Two Needles in the Haystack function is calculated as follows. Suppose the initial point x consists of Θ(n) 0-valued bits and Θ(n) 1-valued bits, then the event of going from x to the optima happens when either all 0-valued bits are flipped and other bits unchanged; or all 1-valued bits are flipped and other bits unchanged. The probability of the event is ( n1 )Θ(n) × Θ(1). Thus the runtime is nΘ(n) × Θ(1). From the table, we see that EA( n1 ) is better than EA( 21 ) on the Two Max function, but worse on the Fully Deceptive Points and Two Needles in the Haystack functions. The comparison gives an understanding of the two EAs’ ability in different fitness landscapes: unimodal, deceptive and isolation. Each EA has its own advantage. EA( n1 ) is more suitable for unimodal functions, but EA( 12 ) performs better on deceptive or isolation functions. The runtime of EA( n1 ) and EA( 21 ) increases exponentially fast on the Fully Deceptive and Two Needles in the Haystack functions. Thus it will be difficult to compare the runtime of the EAs via computer experiments unless n is small. 13 V. M UTUAL T RANSFORMATION B ETWEEN THE E ASIEST AND H ARDEST F ITNESS F UNCTIONS In the case study of the previous section, we observe that the easiest and hardest fitness functions vary as EAs change. In this section we prove an interesting result: a fitness function that is the easiest to one elitist (1+1) EA could becomes hardest to another elitist (1+1) EA and vice versa. A. Easiest May Become Hardest Consider a class consisting of all functions with the same optima. Let f (x) be the easiest to an elitist (1+1) EA (called the original EA). Denote its fitness levels by f0 > · · · > fL and define the set Sl = {x; f (x) = fl }. We construct another elitist (1+1) EA (called the bad EA) and show f (x) is the hardest to the bad EA. The mutation operator in the bad EA is constructed as follows. 1) Choose L + 1 non-negative numbers m0 , m1 , · · · , mL such that m0 = 0, m1 > m2 > · · · > mL > 0. 2) For any x ∈ S0 and y ∈ S, let the mutation transition probability P [m] (x, y) be any probability. 3) For any x ∈ Sl (where l = 1, · · · , L) and y ∈ S, set the mutation transition probability P [m] (x, y) such that Pk−1 P 1 + j=0 y∈Sj P [m] (x, y)mj < mk , for k < l, Pk−1 P [m] (x, y) j=0 y∈Sj P and 1+ Pl−1 P j=0 Pl−1 P j=0 y∈Sj y∈Sj P [m] (x, y)mj P [m] (x, y) = ml . (31) The above mutation operator is determined by the subsets S1 , · · · , Sl rather than fitness levels. The following theorem shows the function f (x) satisfies the monotonically increasing condition and then it is the hardest to the bad EA. Theorem 5: f (x) is the hardest function to the bad EA. Proof: (1) We prove that the expected runtime of the bad EA G(x) = ml , for x ∈ Sl , l = 0, · · · , L. According to Lemma 4, the expected runtime Pl−1 P 1 + j=0 y∈Sj P (x, y)G(y) G(x) = . Pl−1 P j=0 y∈Sj P (x, y) For any x ∈ Sl and y ∈ Sk where l > k. Since f (x) = fl < f (y) = fk and the bad EA adopts elitist selection, y is always accepted if it has been generated via mutation. Thus the transition probability P (x, y) equals to P [m] (x, y). The expected runtime becomes Pl−1 P 1 + j=0 y∈Sj P [m] (x, y)G(y) G(x) = . Pl−1 P [m] (x, y) j=0 y∈Sj P Comparing it with (31), we obtain G(x) and ml are identical. (2) We prove the monotonically increasing condition. Assume that x ∈ Sl , y ∈ Sk for some l and k. If G(x) < G(y), then it is equivalent to ml < mk . Thus we have k < l and f (x) = fl < f (x) = fk . which gives the monotonically increasing condition. (3) The conclusion is drawn from Theorem 2. In the construction of the mutation operator and the proof of the above theorem, we don’t utilize the assumption of f (x) being the easiest to the original EA. Thus the theorem can be understood more generally: for any fitness function f (x), we can construct an elitist (1+1) EA to which f (x) is the hardest. From the theoretical viewpoint, the theorem shows the existence of a bad EA to the easiest fitness function. B. Hardest May Become Easiest Let f (x) be the hardest fitness function to the original elitist (1+1) EA. We construct another elitist (1+1) EA (called the good EA), and show f (x) becomes the easiest to the good EA. The mutation operator in the good EA is constructed as follows. 1) Choose L + 1 non-negative numbers m0 , · · · , mL such that m0 = 0 < · · · < mL . 2) For any x ∈ S0 and y ∈ S, let the mutation transition probability P [m] (x, y) be any probability. 14 3) For any x ∈ Sl (where l = 1, · · · , L) and y ∈ S, set the mutation transition probability P [m] (x, y) such that Pk−1 P [m] (x, y)mj 1 + j=0 y∈Sj P > mk , for k < l, Pk−1 P [m] (x, y) j=0 y∈Sj P and 1+ Pl−1 P j=0 Pl−1 P j=0 y∈Sj y∈Sj P [m] (x, y)mj P [m] (x, y) = ml . (32) The following theorem shows f (x) satisfies monotonically decreasing condition and then it is the easiest to the good EA. Theorem 6: f (x) is the easiest function to the good EA. Proof: (1) We prove that the expected runtime of the good EA G(x) = mk , for x ∈ Sk , k = 0, 1, · · · , L. The proof is similar to the first step in the proof of Theorem 5. (2) We prove the monotonically decreasing condition. The proof is similar to the second step in the proof of Theorem 5. (3) The conclusion is drawn from Theorem 1. In the construction of the mutation operator and the proof of the above theorem, we also don’t utilize the assumption of f (x) being the hardest to the original EA. The theorem implies that for any fitness function f (x), we can construct a good (1+1) EA to which f (x) is the easiest. The above theorem reveals if a fitness function is the hardest to one EA, then it is possible to design another good EA to which the function is the easiest. However, the above construction method is intractable in practice since the complexity of construction is exponential. How to design such a good EA is an ultimate goal in the study of EAs but beyond the scope of the current paper. Theorems 5 and 6 can be viewed as a complement to No Free Lunch theorems. No Free Lunch theorems concern all potential fitness functions. The theorems claim the performance of any two EAs are equivalent if averaged over all possible functions. Theorems 5 and 6 concern the hardness of a single fitness function. The two theorems assert that a fitness function could be the easiest to one elitist (1+1) EA but the hardest to another EA. This implies for a single fitness function, a good EA (but also a bad EA) always exists. VI. C ONCLUSIONS AND F UTURE W ORK This paper presents a rigorous analysis devoted to the easiest and hardest fitness functions with respect to any given elitist (1+1) EA for maximising a class of fitness functions with the same optima. Such fitness functions have been constructed step by step. It is demonstrated that the unimodal functions are the easiest and deceptive functions are the hardest in terms of the time-based fitness landscape. Furthermore it reveals that the hardest (and easiest) functions may become the easiest (and hardest) with respect to another elitist (1+1) EA. From the theoretical viewpoint, a good EA (but also a bad EA) always exists for a single fitness function. A potential application of the theoretical work is the design of benchmarks. Benchmarks play an essential role in the empirical comparison of EAs. In order to make a fair comparison, a good practice is to choose typical fitness functions in benchmarks, for example, several easy, hard and ‘averagely hard’ fitness functions. Our work provides a theoretical guideline to the design of easy and hard functions: to choose unimodal (the easiest) and deceptive (the hardest) fitness functions with respect to EAs under comparison. Another application is to understand the ability of EAs on a class of fitness functions with the same optima. Through the comparison of EAs on the easiest and hardest fitness functions, our work helps understand the ability of EAs in unimodal and deceptive time-based fitness landscapes. This has been shown in the second case study. Non-elitist EAs, population-based EAs and dynamical EAs are not investigated in this paper. The extension of our work to such EAs will be the future research. Another work in the future is to study how to construct the easiest and hardest fitness functions such that a special requirement, for example, all fitness functions must be linear or quadratic. R EFERENCES [1] D. H. Wolpert and W. G. Macready, “No free lunch theorems for optimization,” IEEE Transactions on Evolutionary Computation, vol. 1, no. 1, pp. 67–82, 1997. [2] ——, “Coevolutionary free lunches,” IEEE Transactions on Evolutionary Computation, vol. 9, no. 6, pp. 721–735, 2005. [3] J. Horn and D. E. Goldberg, “Genetic algorithms difficulty and the modality of fitness landscapes,” in Proceedings of the 3rd Workshop on Foundations of Genetic Algorithms, L. D. Whitley and M. D. Vose, Eds. Morgan Kauffman, 1995, pp. 243–269. [4] G. Rudolph, “How mutation and selection solve long path problems in polynomial expected time,” Evolutionary Computation, vol. 4, no. 2, pp. 207–211, 1996. [5] M. D. Vose and A. H. Wright, “Stability of vertex fixed points and applications,” in Proceedings of the 3rd Workshop on Foundations of Genetic Algorithms, L. D. Whitley and M. D. Vose, Eds. Morgan Kaufmann, 1995, pp. 103–114. [6] S. W. Wilson, “GA-easy does not imply steepest-ascent optimizable,” in Proceedings of the 4th International Conference on Genetic Algorithms, R. K. Belew and L. B. Booker, Eds. Morgan Kaufmann, 1991, pp. 85–89. 15 [7] T. Jones and S. Forrest, “Fitness distance correlation as a measure of problem difficulty for genetic algorithms.” in Proceedings of the 6th International Conference on Genetic Algorithms, L. J. Eshelman, Ed. Morgan Kaufmann, 1995, pp. 184–192. [8] N. J. Radcliffe and P. D. Surry, “Fitness variance of formulae and performance prediction,” in Proceedings of the 3rd Workshop on Foundations of Genetic Algorithms, L. D. Whitley and M. D. Vose, Eds. Morgan Kaufmann, 1995, pp. 51–72. [9] Y. Davidor, “Epistasis variance: A viewpoint on GA-hardness,” in Proceedings of the 1st Workshop on Foundations of Genetic Algorithms., G. J. E. Rawlins, Ed. Morgan Kaufmann, 1991, pp. 23–35. [10] B. Naudts and L. Kallel, “A comparison of predictive measure of problem difficulty in evolutionary algorithms,” IEEE Trans. on Evolutionary Computation, vol. 4, no. 1, pp. 1–15, 2000. [11] J. He, C. Reeves, C. Witt, and X. Yao, “A note on problem difficulty measures in black-box optimization: Classification, existence and predictability,” Evolutionary Computation, vol. 15, no. 4, pp. 435–443, 2007. [12] B. Manderick, M. K. de Weger, and P. Spiessens, “The genetic algorithms and the structure of the fitness landscape,” in Proceedings of the 4th International Conference on Genetic Algorithms, R. K. Belew and L. B. Booker, Eds. Morgan Kaufman, 1991, pp. 143–150. [13] T. Jansen, “On classifications of fitness functions,” in Theoretical Aspects of Evolutionary Computing, L. Kallel, B. Naudts, and A. Rogers, Eds. Springer, 2001, pp. 371–386. [14] C. Reeves, “Predictive measures for problem difficulty,” in Proceedings of 1999 Congress on Evolutionary Computation, vol. 1. IEEE Press, 1999, pp. 736–743. [15] J. He and X. Yao, “An analysis of evolutionary algorithms for finding approximation solutions to hard optimisation problems,” in Proceedings of IEEE 2003 Congress on Evolutionary Computation. IEEE Press, 2003, pp. 2004–2010. [16] ——, “Towards an analytic framework for analysing the computation time of evolutionary algorithms,” Artificial Intelligence, vol. 145, no. 1-2, pp. 59–97, 2003. [17] T. Chen, J. He, G. Sun, G. Chen, and X. Yao, “A new approach for analyzing average time complexity of population-based evolutionary algorithms on unimodal problems,” IEEE Transactions on Systems, Man and Cybernetics, Part B, vol. 39, no. 5, pp. 1092–1106, 2009. [18] T. Chen, J. He, G. Chen, and X. Yao., “Choosing selection pressure for wide-gap problems,” Theoretical Computer Science, vol. 411, no. 6, pp. 926–934, 2010. [19] J. He and X. Yao, “A study of drift analysis for estimating computation time of evolutionary algorithms,” Natural Computing, vol. 3, no. 1, pp. 21–35, 2004. [20] J. He, X. Yao, and Q. Zhang, “To understand one-dimensional continuous fitness landscapes by drift analysis,” in Proceedings of 2004 Congress on Evolutionary Computation. IEEE Press, 2004, pp. 1248–1253.
9cs.NE
Presentations for (singular) partition monoids: a new approach James East Centre for Research in Mathematics; School of Computing, Engineering and Mathematics arXiv:1606.07594v2 [math.GR] 27 Jun 2016 Western Sydney University, Locked Bag 1797, Penrith NSW 2751, Australia J.East @ WesternSydney.edu.au Abstract We give new, short proofs of the presentations for the partition monoid and its singular ideal originally given in the author’s 2011 papers in J. Alg. and I.J.A.C. Keywords: Partition monoid, Singular ideal, Presentations. MSC: 20M05; 20M20. 1 Introduction Partition monoids arise in the construction of partition algebras [16, 21] as twisted semigroup algebras [14, 25]. Although the partition algebras (and other related diagram algebras) were originally introduced in the context of theoretical physics and representation theory, their applications have been many and varied; see for example the recent surveys [17, 22]. In particular, diagram monoids have played an increasingly important role in semigroup theory in the last two decades; see for example [1–3, 9, 12, 18], and especially [10] for an extensive list of references. This semigroup approach was first employed by Wilcox in the context of cellular algebras [25], and was also instrumental in providing the first full proof [6] of a presentation (by generators and relations) for the partition algebras; the presentation was first stated in [14]. The method in [6] was to first obtain a presentation for the partition monoid (stated in Theorem 2.2 below), and then apply a general result on twisted semigroup algebras (which was also proved in [6]). Taking classical work of Howie on singular transformation semigroups [15] as inspiration, the singular ideals of partition monoids were investigated in [7], the main result being a presentation by generators and relations (stated in Theorem 2.1 below); the generating set consists of idempotents and is of minimal possible size. (See also [20], where a similar presentation was given for the singular part of the Brauer monoid.) The article [7] unlocked some intriguing combinatorial properties of the partition monoids, and paved the way for several further studies, most notably [10], which concerns the question of (minimal) idempotent generation of arbitrary ideals in several natural families of diagram monoids. The proofs of Theorems 2.1 and 2.2 given in [6, 7] relied on several previous results [4,5,11,24] to obtain initial (highly complex) presentations, which were subsequently reduced (using lengthy sequences of Tietze transformations); the articles [6, 7] have a combined length of 58 pages. The purpose of the current article is to give shorter, more direct, and conceptually simpler proofs of Theorems 2.1 and 2.2. Apart from quoting two results (Theorem 2.1 of [8] and Theorem 2 of [11]), 1 the current article is entirely self-contained: we give the required definitions and state the main results in Section 2, and then prove them in Sections 3 and 4. We believe that the new, efficient techniques for working with presentations are of independent interest, as may be the normal forms given in Proposition 3.14. 2 Preliminaries and statement of the main results Fix an integer n ≥ 2 (everything is trivial if n ≤ 1), and write n = {1, . . . , n} and n′ = {1′ , . . . , n′ }. The partition monoid of degree n, denoted Pn , consists of all set partitions of n ∪ n′ , under a product described below. Such a partition α ∈ Pn may be represented graphically. We draw vertices 1, . . . , n on an upper row (increasing from left to right) with 1′ , . . . , n′ directly below, and add edges so that connected components of the graph correspond to the blocks of α. For example, the partition  α = {1, 4}, {2, 3, 4′, 5′ }, {5, 6}, {1′, 3′, 6′ }, {2′} ∈ P6 is represented by the graph . The product of two partitions α, β ∈ Pn is calculated as follows. We first stack (graphs representing) α and β so that lower vertices 1′ , . . . , n′ of α are identified with upper vertices 1, . . . , n of β. The connected components of this graph are then constructed, and we finally delete the middle row; the resulting graph is the product αβ ∈ Pn . Here is an example calculation with α, β ∈ P6 : α= = αβ β= The operation is associative, so Pn is a semigroup: in fact, a monoid, with identity 1 = ··· . ··· A block of a partition α ∈ Pn is called a transversal block if it has non-trivial intersection with both n and n′ ; otherwise, it is a non-transversal block (which may be an upper or lower non-transversal block, with obvious meanings). The rank of α, denoted rank(α), is the number of transversal blocks of α. For example, α ∈ P6 as above has transversal block {2, 3, 4′, 5′ } (so rank(α) = 1), upper non-transversal blocks {1, 4}, {5, 6}, and lower non-transversal blocks {1′ , 3′ , 6′ }, {2′ }. For α ∈ Pn and x ∈ n ∪ n′ , we write [x]α for the block of α containing x. We then define the domain and codomain of α to be the sets dom(α) = {x ∈ n : [x]α ∩ n′ 6= ∅} and codom(α) = {x ∈ n : [x′ ]α ∩ n 6= ∅}. We also define the kernel and cokernel of α to be the equivalences  ker(α) = (x, y) ∈ n × n : [x]α = [y]α and For example, with α ∈ P6 as as above, dom(α) = {2, 3}, codom(α) = {4, 5},  coker(α) = (x, y) ∈ n × n : [x′ ]α = [y ′]α . ker(α) = (1, 4 | 2, 3 | 5, 6), coker(α) = (1, 3, 6 | 2 | 4, 5), using an obvious notation for equivalences. It is immediate from the definitions that the following hold for all α, β ∈ Pn : dom(αβ) ⊆ dom(α), ker(αβ) ⊇ ker(α), codom(αβ) ⊆ codom(β), Also, rank(αβγ) ≤ rank(β) for all α, β, γ ∈ Pn . 2 coker(αβ) ⊇ coker(β). If α ∈ Pn , we will write α= A1 · · · Ar C1 · · · Cp B1 · · · Br D1 · · · Dq ! to indicate that α has transversal blocks Ai ∪ Bi′ (for 1 ≤ i ≤ r), upper non-transversal blocks Cj (for 1 ≤ j ≤ p), and lower non-transversal blocks Dk′ (for 1 ≤ k ≤ q). (For A ⊆ n, we  1 ··· Ar . write A′ = {a′ : a ∈ A}.) If α (as above) has no non-transversal blocks, we will write α = A B1 ··· Br Such a partition is also known as a block bijection, and the set Jn of all such block bijections is (isomorphic to) the dual symmetric inverse monoid of degree n; see [6, 13]. If each block of α (as above) n in at most one point and also intersects n′ in at most one point, we will write   a1 intersects ··· ar α = b1 ··· br to indicate that α has transversal blocks {ai , b′i } (for 1 ≤ i ≤ r), all other blocks being singletons. Such a partition is also known as a partial permutation, and the set In of all such partial permutations is (isomorphic to) the symmetric inverse monoid ; see [7, 19]. As usual, with α ∈ In as above, we will write ai α = bi for each i. The group of units of Pn is (isomorphic to)the symmetric  1 ··· n 1 ··· n . = group Sn = Jn ∩ In . A permutation π of n is identified with the partition 1π 1π ··· nπ ··· nπ The set Pn \ Sn = {α ∈ Pn : rank(α) < n} of non-invertible (i.e., singular ) partitions is a subsemigroup (indeed, an ideal) of Pn . In order to state the above-mentioned presentations for Pn \ Sn and Pn from [6, 7], we first fix the notation we will be using for presentations. Let X be an alphabet, and denote by X + (resp., X ∗ ) the free semigroup (resp., free monoid) on X. If R ⊆ X + × X + (resp., R ⊆ X ∗ × X ∗ ), we denote by R♯ the congruence on X + (resp., X ∗ ) generated by R. We say a semigroup (resp., monoid) S has semigroup (resp., monoid ) presentation hX : Ri if S ∼ = X + /R♯ (resp., S ∼ = X ∗ /R♯ ) or, equivalently, if there is an epimorphism X + → S (resp., X ∗ → S) with kernel R♯ . If φ is such an epimorphism, we say S has presentation hX : Ri via φ. A relation (w1 , w2 ) ∈ R will usually be displayed as an equation: w1 = w2 . We will always be careful to specify whether a given presentation is a semigroup or monoid presentation. We denote the empty word (over any alphabet) by 1, so X ∗ = X + ∪ {1}. If A is a subset of a semigroup S, then hAi always denotes the subsemigroup generated by A. For 1 ≤ r ≤ n and 1 ≤ i < j ≤ n, define partitions r 1 er = n ··· ··· ··· ··· and tij = tji = n j i 1 ··· ··· ··· ··· ··· ··· . Consider alphabets E = {er : 1 ≤ r ≤ n} and T = {tij : 1 ≤ i < j ≤ n}, and define a (semigroup) homomorphism φ : (E ∪ T )+ → Pn \ Sn by er φ = er and tij φ = tij for each 1 ≤ r ≤ n and 1 ≤ i < j ≤ n. We will use symmetric notation when referring to the letters from T , so we write tij = tji for all 1 ≤ i < j ≤ n. Consider the relations e2i = ei ei ej = ej ei t2ij = tij tij tkl tij tjk tij ek tij ek tij ek tij ek ek tki ei tij ej tjk ek ek tki ei tij ej tjl el tlk ek for all i for distinct i, j for all i, j = tkl tij = tjk tki = ek tij = tij = ek = ek tkj ej tji ei tik ek = ek tkl el tli ei tij ej tjk ek for all i, j, k, l for distinct i, j, k if k 6∈ {i, j} if k ∈ {i, j} if k ∈ {i, j} for distinct i, j, k for distinct i, j, k, l. Here is the first of our main results; it originally appeared in [7, Theorem 46]. 3 (R1) (R2) (R3) (R4) (R5) (R6) (R7) (R8) (R9) (R10) Theorem 2.1. The semigroup Pn \ Sn has semigroup presentation hE ∪ T : (R1–R10)i via φ. In order to state the second main result, define partitions n 1 e = e1 = ··· n 1 , t = t1 = ··· ··· , si Φ = ··· n i 1 ··· ··· ··· ··· for 1 ≤ i ≤ n − 1. Consider the alphabet S = {si : 1 ≤ i ≤ n − 1}, and define a (monoid) homomorphism Φ : (S ∪ {e, t})∗ → Pn by eΦ = e, tΦ = t and si Φ = si for each i. Consider the relations s2i = 1 for all i si sj = sj si if |i − j| > 1 si sj si = sj si sj if |i − j| = 1 2 e = e = ete 2 t = t = tet = ts1 = s1 t esi = si e if i ≥ 2 tsi = si t if i ≥ 3 s1 es1 e = es1 es1 = es1 e ts2 ts2 = s2 ts2 t t(s2 s3 s1 s2 )t(s2 s3 s1 s2 ) = (s2 s3 s1 s2 )t(s2 s3 s1 s2 )t t(s2 s1 es1 s2 ) = (s2 s1 es1 s2 )t. (R11) (R12) (R13) (R14) (R15) (R16) (R17) (R18) (R19) (R20) (R21) Here is our second main result; this originally appeared in [6, Theorem 32]. Theorem 2.2. The monoid Pn has monoid presentation hS ∪ {e, t} : (R11–R21)i via Φ. We conclude this section by stating the presentation for In \ Sn from [8]. (Recall that In was defined above.) With this in mind, for i, j ∈ n with i 6= j, define f ij = ei tij ej (using symmetric notation for tij = tji ). Note that f ij 6= f ji ; rather,  n j 1 i  ··· ··· ···    if i < j   ··· ···  ··· f ij =    1··· j ··· i ··· n    if j < i.  ··· ··· ··· Define an alphabet F = {fij : i, j ∈ n, i 6= j}, and consider the relations fij fji fij = fij fij3 = fij2 = fji2 fij fkl fij fji fij fik = fjk fij fki fij fjk fki fij fjk fkl = fkl fij = fik fki = fik fjk = fkj fji fik = fkl fli fij fjl for distinct i, j for distinct i, j (F1) (F2) for for for for for (F3) (F4) (F5) (F6) (F7) distinct distinct distinct distinct distinct i, j, k, l i, j, k i, j, k i, j, k i, j, k, l. The next result is [8, Theorem 2.1]. Theorem 2.3. The semigroup In \ Sn has semigroup presentation hF : (F1–F7)i via fij 7→ f ij . 4 ✷ 3 Presentation for Pn \ Sn There are two components to the proof of Theorem 2.1: that the map φ : (E ∪ T )+ → Pn \ Sn is an epimorphism; and that ker φ is generated by relations (R1–R10). Proposition 3.1 accomplishes the first task, and the remainder of the section is devoted to the second. We write Eqn for the set of all equivalence relations on n, which we regard as a semilattice (monoid of commuting idempotents) under ∨; the join, ε ∨ η, of two equivalences ε, η ∈ Eqn is defined to be the smallest equivalence containing ε ∪ η (see [11, 13]).  i1 ··· ik . Note that tA = 1 if |A| ≤ 1. For a subset A ⊆ n with n \ A = {i1 , . . . , ik }, we write tA = A A i1 ··· ik Note that if i, j ∈ n with i 6= j, then t{i,j} = tij in the notation of the previous section. Note that if A = {a1 , a2 , . . . , ar } with r = |A| ≥ 2, then tA = ta1 a2 ta2 a3 · · · tar−1 ar = ta1 a2 ta1 a3 · · · ta1 ar . For an 1 ··· Ak = tA1 · · · tAk . In equivalence ε ∈ Eqn with equivalence classes A1 , . . . , Ak , we write tε = A A1 ··· Ak fact, the set {tε : ε ∈ Eqn } is equal to E(Jn ), the semilattice of idempotents of (the isomorphic copy of) the dual symmetric inverse monoid Jn ⊆ Pn ; see [13]. In particular, E(Jn ) is isomorphic to the semilattice (Eqn , ∨); so tε tη = tε∨η for all ε, η ∈ Eqn . By the discussion above, we see that E(Jn ) is generated (as a monoid) by the set {tij : 1 ≤ i < j ≤ n}. Theorem 2 of [11] says that E(Jn ) has (monoid) presentation hT : (R3–R5)i via the map tij 7→ tij . Proposition 3.1. The semigroup Pn \Sn is generated by the set {er : 1 ≤ r ≤ n}∪{tij : 1 ≤ i < j ≤ n}. In particular, the map φ : (E ∪ T )+ → Pn \ Sn is surjective. Proof. Let α ∈ Pn \ Sn , and write α= A1 · · · Ar C1 · · · Cp B1 · · · Br D1 · · · Dq ! , noting that r = rank(α) ≤ n − 1. For each r, choose Ai and bi ∈ Bi . Then clearly  some ai ∈  1 ≤ i≤ B1 ··· Br D1 ··· Dq a1 ··· ar A1 ··· Ar C1 ··· Cp α = βγδ, where β = A1 ··· Ar C1 ··· Cp , γ = b1 ··· br and δ = B1 ··· Br D1 ··· Dq . Note that β = tker(α) and δ = tcoker(α) , so that β, δ ∈ htij : 1 ≤ i < j ≤ ni ∪ {1}, by the discussion before the statement of the proposition. By Theorem 2.3, γ ∈ In \ Sn is a (non-empty) product of terms of the form f ij = ei tij ej . ✷ Remark 3.2. Proposition 3.1 was also proven in [9, Theorem 9], using a classical result of Howie on transformation semigroups [15]. Since {er : 1 ≤ r ≤ n} ⊆ E(In ) and {tij : 1 ≤ i < j ≤ n} ⊆ E(Jn ), it follows that hE(Pn )i = hE(In ) ∪ E(Jn )i = {1} ∪ (Pn \ Sn ). Now that we know φ is surjective, it remains to show that ker φ = ∼, where ∼ is the congruence on (E ∪ T )+ generated by the relations (R1–R10). For w ∈ (E ∪ T )+ , we write w = wφ. Even though the empty word 1 does not belong to (E ∪ T )+ , we will also write 1 = 1 and 1 ∼ 1. Lemma 3.3. We have ∼ ⊆ ker φ. Proof. This follows by a simple diagrammatic check that φ preserves the relations (R1–R10). We do this for (R7) in Figure 1, and leave the rest for the reader. ✷ For i, j ∈ n with i 6= j, define the word zij = ei tij ej ∈ (E ∪ T )+ , and write Z = {zij : i, j ∈ n, i 6= j} for the set of all such words. Note that z ij = zij φ = f ij ∈ In . The words zij will play a crucial role in what follows. We first prove a number of basic relations satisfied among them. 5 n j i 1 n j i 1 ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· ··· = n j i 1 ··· ··· ··· ··· ··· ··· = Figure 1: Diagrammatic proof of relation (R7): tij ei tij = tij ej tij = tij . Lemma 3.4. Let i, j, k ∈ n be distinct. Then (i) ei zij ∼ zij ∼ zij ej ; 2 (ii) ej zij ∼ zij ei ∼ ei ej ∼ zij2 ∼ zji ; (iii) zij zji ∼ ei ; (iv) ek zij ∼ zij ek . Proof. Part (i) follows immediately from (R1). For (ii), note that ej zij = ej ei tij ej ∼ ei ej tij ej ∼ ei ej , by (R2) and (R8). A similar calculation gives zij ei ∼ ei ej . Together with (R8), it also follows that 2 zij2 = zij ei tij ej ∼ ei ej tij ej ∼ ei ej ; similarly, zji ∼ ei ej , completing the proof of (ii). For (iii), we have zij zji = ei tij ej ej tij ei ∼ ei tij ej tij ei ∼ ei tij ei ∼ ei , by (R1), (R7) and (R8). Finally, (iv) follows immediately from (R2) and (R6). ✷ Recall that for α ∈ In and x ∈ dom(α), we write xα for the (unique) element of codom(α) such that {x, (xα)′ } is a block of α. Recall also that we are using symmetric notation for the tij = tji . Lemma 3.5. Let i, j, k, l ∈ n with i 6= j, k 6= l and k 6∈ {i, j}.   zkl tij if l tij zkl ∼ zkl tiz kl ,jzkl = zkl tkj if l   zkl tik if l Then 6∈ {i, j} =i = j. Proof. The case in which l 6∈ {i, j} follows immediately from (R4) and (R6). If l = i, then tij zkl = tlj ek tkl el ∼ ek tlj tkl el = ek tjl tlk el ∼ ek tlk tkj el ∼ ek tkl el tkj = zkl tkj , by (R5) and (R6). The l = j case is similar. ✷ Recall that hZi denotes the subsemigroup of (E ∪ T )+ generated by Z. Corollary 3.6. If w ∈ hZi and i, j ∈ dom(w) with i 6= j, then tij w ∼ wtiw,jw . Proof. This follows immediately from Lemma 3.5, after writing w = zk1 l1 · · · zks ls . ✷ The next result shows that (modulo the relations (R1–R10)) the words zij satisfy the defining relations for In \ Sn from Theorem 2.3. Lemma 3.7. For distinct i, j, k, l ∈ n, we have zij zji zij ∼ zij 2 zij3 ∼ zij2 ∼ zji zij zkl zij zji zij zik ∼ zjk zij zki zij zjk zki zij zjk zkl 6 ∼ zkl zij ∼ zik zki ∼ zik zjk ∼ zkj zji zik ∼ zkl zli zij zjl . (Z1) (Z2) (Z3) (Z4) (Z5) (Z6) (Z7) Proof. For (Z1), we have zij zji zij ∼ ei zij ∼ zij , by Lemma 3.4(iii) and (i). For (Z2), note that 2 zij2 ∼ zji ∼ ei ej by Lemma 3.4(ii); it also follows that zij3 ∼ ei ej zij ∼ ei ei ej ∼ ei ej by Lemma 3.4(ii) and (R1), completing the proof of (Z2). Relation (Z3) follows immediately from (R2), (R4) and (R6). Relation (Z4) follows immediately from Lemma 3.4(iii). For (Z5), first note that zij zik ∼ zij ei zik ∼ ei ej zik ∼ ej ei zik ∼ ej zik , by Lemma 3.4(i) and (ii), and (R2). We also have zjk zij = ej tjk ek ei tij ej ∼ ei ej tjk tij ej ek = ei ej tkj tji ej ek ∼ ei ej tji tik ej ek ∼ ei ej tji ej tik ek ∼ ei ej tik ek ∼ ej ei tik ek = ej zik by (R2) and (R6) by by by by (R5) (R6) (R8) (R2). By Lemma 3.4(i), (ii) and (iv), zik zjk ∼ zik ek zjk ∼ zik ej ek ∼ ej zik ek ∼∼ ej zik , completing the proof of (Z5). For (Z6), we have zki zij zjk = ek tki ei ei tij ej ej tjk ek ∼ ek tki ei tij ej tjk ek ∼ ek tkj ej tji ei tik ek ∼ ek tkj ej ej tji ei ei tik ek = zkj zji zik , by (R1) and (R9). Finally, for (Z7), first observe that by a similar calculation to that just carried out, (R10) gives zki zij zjl zlk ∼ zkl zli zij zjk . We then have zki zij zjk zkl ∼ zki zij zji zij zjk zkl ∼ zki zij zjl zlj zjk zkl ∼ zki zij zjl zlk zkj zjl ∼ zkl zli zij zjk zkj zjl ∼ zkl zli zij zjl zlj zjl ∼ zkl zli zij zjl by by by by by by (Z1) (Z4) (Z6) the observation (Z4) (Z1). This completes the proof. ✷ Corollary 3.8. If u, v ∈ hZi, then u = v ⇒ u ∼ v. Proof. Write u = zi1 j1 · · · zis js and v = zk1 l1 · · · zkt lt , and suppose u = v. Then f i1 j1 · · · f is js = z i1 j1 · · · z is js = u = v = z k1 l1 · · · z kt lt = f k1 l1 · · · f kt lt . By Theorem 2.3, the word fi1 j1 · · · fis js may be transformed into fk1 l1 · · · fkt lt using relations (F1–F7). By Lemma 3.7, this transformation leads to a transformation of u into v using (Z1–Z7). ✷ The next result follows from [11, Theorem 2], which (as noted above) states that E(Jn ) ∼ = (Eqn , ∨) has monoid presentation hT : (R3–R5)i via tij 7→ tij . Lemma 3.9. If u, v ∈ T ∗ , then u = v ⇒ u ∼ v. ✷ In order to complete the proof of Theorem 2.1, we aim to show that any word over E ∪ T may be rewritten (using the relations) to take on a very specific form; see Proposition 3.14, the proof of which requires the next three intermediate lemmas. Lemma 3.10. If w ∈ (E ∪ T )+ , then w ∼ w1 w2 w3 for some w1 , w3 ∈ T ∗ and w2 ∈ hZi. 7 Proof. We prove this by induction on ℓ(w), the length of the word w. Suppose first that ℓ(w) = 1. If w = ei for some i, then w ∼ zij zji for any j ∈ n \ {i}, by Lemma 3.4(iii), and we are done (with w1 = w3 = 1 and w2 = zij zji ). If w = tij for some 1 ≤ i < j ≤ n, then w = tij ∼ tij ei tij ∼ tij zij zji tij , by (R7) and Lemma 3.4(iii), and we are done (with w1 = w3 = tij and w2 = zij zji ). Now suppose ℓ(w) ≥ 2, and write w = ux, where u ∈ (E ∪ T )+ and x ∈ E ∪ T . By an inductive hypothesis, u ∼ u1 u2 u3 for some u1 , u3 ∈ T ∗ and u2 ∈ hZi. If x ∈ T , then w ∼ u1 u2 u3 x, and we are done (with w1 = u1 , w2 = u2 and w3 = u3 x). So suppose x = ei ∈ E, and write u3 = tk1 l1 · · · tks ls . Case 1. If i 6∈ {k1 , . . . , ks , l1 , . . . , ls }, then u3 ei ∼ ei u3 ∼ zij zji u3 for any j ∈ n \ {i}, by (R6) and Lemma 3.4(iii), so w ∼ u1 u2 zij zji u3 , and we are done (with w1 = u1 , w2 = u2 zij zji and w3 = u3 ). Case 2. Now suppose i ∈ {k1 , . . . , ks , l1 , . . . , ls }. By (R3), (R4), and the symmetrical notation for the tkl = tlk , we may assume that in fact u3 = til1 · · · tilr · tkr+1lr+1 · · · tks ls with r ≥ 1 and l1 < · · · < lr . Now til1 · · · tilr ∼ til1 tl1 l2 · · · tlr−1 lr , by Lemma 3.9. It follows that w ∼ u1 u2 til1 tl1 l2 · · · tlr−1 lr tkr+1 lr+1 · · · tks ls ei ∼ u1 · u2 til1 ei · u4 , where u4 = tl1 l2 · · · tlr−1 lr tkr+1 lr+1 · · · tks ls . For simplicity, we will write j = l1 . Since u1 , u4 ∈ T ∗ , the proof will be complete if we can show that u2 tij ei ∼ v1 v2 v3 for some v1 , v3 ∈ T ∗ and v2 ∈ hZi. Subcase 2.1. Suppose first that i, j ∈ codom(u2 ), and let k, l ∈ dom(u2 ) be such that ku2 = i and lu2 = j. Then tkl u2 ∼ u2 tij , by Corollary 3.6, whence u2 tij ei ∼ tkl u2 ei ∼ tkl u2 zij zji , and we are done (with v1 = tkl , v2 = u2 zij zji and v3 = 1). Subcase 2.2. Next suppose i 6∈ codom(u2 ). Then u2 ∼ u2 zij zji ∼ u2 ei , by Corollary 3.8 and Lemma 3.4(iii). But then, together with (R8), it follows that u2 tij ei ∼ u2 ei tij ei ∼ u2 ei ∼ u2 , and we are done (with v1 = v3 = 1 and v2 = u2). Subcase 2.3. Finally, suppose j 6∈ codom(u2 ). Then u2 ∼ u2 ej , as in the previous case, giving u2 tij ei ∼ u2 ej tij ei = u2 zji , and we are done (with v1 = v3 = 1 and v2 = u2 zij ). ✷ To improve Lemma 3.10, we first define some words over T . Consider a subset A ⊆ n. If |A| ≤ 1, then put tA = 1. Otherwise, write A = {i1 , . . . , ik } with i1 < · · · < ik , and define tA = ti1 i2 ti2 i3 · · · tik−1 ik . For an equivalence ε ∈ Eqn with equivalence classes A1 , . . . , Ar with min(A 1 ) < · · · < min(Ar ), define  A1 ··· Ar ∗ tε = tA1 · · · tAr . Note that if w ∈ T is such that w = tε = A1 ··· Ar , then w ∼ tε , by Lemma 3.9. For the proof of the next result, if ε ∈ Eqn , we write n/ε for the set of all ε-classes. Lemma 3.11. Let w ∈ (E ∪ T )+ , and put ε = ker(w) and η = coker(w). Then w ∼ tε utη for some u ∈ hZi.  Proof. By Lemmas 3.9 and 3.10, the set (λ, u, ρ) ∈ Eqn × hZi × Eqn : w ∼ tλ utρ is non-empty. Choose an element (λ, u, ρ) from this set such that k = |n/λ| + |n/ρ| is minimal. Suppose the λclasses and ρ-classes are A1 , . . . , Ap and B1 , . . . , Bq , respectively (so p = |n/λ| and q = |n/ρ|). Note that λ = ker(tλ ) ⊆ ker(tλ utρ ) = ker(w) = ε and, similarly, ρ ⊆ η. In particular, each ε-class is a union of (one or more) λ-classes, with a similar statement holding for η-classes and ρ-classes. Let the ε-classes and η-classes be C1 , . . . , Cs and D1 , . . . , Dt , respectively (so s = |n/ε| and t = |n/η|), noting that s ≤ p and t ≤ q. In particular, k = p + q ≥ s + t. If k = s + t, then p = s and q = t, so that λ = ε and ρ = η, and the proof would be complete. So suppose instead that k > s + t. Note that one of the following statements must be true: (i) there exist a, b ∈ dom(u) such that (a, b) ∈ λ and (au, bu) 6∈ ρ; or (ii) there exist a, b ∈ dom(u) such that (a, b) 6∈ λ and (au, bu) ∈ ρ. 8 Indeed, if (i) and (ii) were both false, then we would have λ = ker(tλ utρ ) = ker(w) = ε and, similarly, ρ = η, contradicting the assumption that k > s + t. Suppose (i) is true (the other case being similar), and write c = au and d = bu. Relabelling if necessary, we may assume that a, b ∈ A1 , c ∈ B1 and d ∈ B2 . Since (a, b) ∈ λ, Lemma 3.9 gives tλ ∼ tλ tab . Let εcd ∈ Eqn be the equivalence whose only non-singleton equivalence class is {c, d}, and let κ = εcd ∨ ρ. Then Lemma 3.9 also gives tcd tρ = tεcd tρ ∼ tκ . Together with Corollary 3.6, it then follows that w ∼ tλ tab utρ ∼ tλ utcd tρ ∼ tλ utκ . But κ has q − 1 equivalence classes (i.e., B1 ∪ B2 , B3 , . . . , Bq ), so |n/λ| + |n/κ| = k − 1, contradicting the minimality of k. ✷ Remark 3.12. The proof of Lemma 3.11 is set out as a reductio merely for convenience. It is easily adapted to become constructive. (The same is true of Lemma 3.13 and Proposition 3.14). Lemma 3.13. Let w ∈ (E ∪ T )+ , and put ε = ker(w) and η = coker(w). Then w ∼ tε utη for some u ∈ hZi with rank(u) = rank(w). Proof. Put r = rank(w). By Lemma 3.11, the set {u ∈ hZi : w ∼ tε utη } is non-empty. Choose an element u from this set with rank(u) minimal. If rank(u) = r, then we are done, so suppose otherwise. Since r = rank(w) = rank(tε utη ) ≤ rank(u), it follows that rank(u) > r. Suppose the ε-classes and η-classes are A1 , . . . , Ap and B1 , . . . , Bq , respectively, and that the transversal blocks of w are A1 ∪ B1′ , . . . , Ar ∪ Br′ . Note that dom(u) ⊆ A1 ∪ · · · ∪ Ar and codom(u) ⊆ B1 ∪ · · · ∪ Br . Since rank(u) > r, we may assume (relabelling if necessary) that |A1 ∩ dom(u)| ≥ 2. Let i, j ∈ A1 ∩ dom(u) with i 6= j, and put k = iu and l = ju, noting that k, l ∈ B1 . It follows from Lemma 3.9 and Corollary 3.6 that tε ∼ tε tij , tη ∼ tkl tη , and tij u ∼ utkl . Together with (R7) and Lemma 3.4(iii), we then obtain w ∼ tε utη ∼ tε tij utη ∼ tε tij ei tij utη ∼ tε tij ei utkl tη ∼ tε (zij zji u)tη . But dom(z ij z ji u) = dom(u) \ {i}, so that rank(z ij z ji u) = rank(u) − 1, contradicting the minimality of rank(u). ✷ The next result gives a set of normal forms for words over E ∪ T , and is the final ingredient in the proof of Theorem 2.1. For each α ∈ In \ Sn , fix some zα ∈ hZi such that z α = zα φ = α. Proposition 3.14. Let w ∈ (E ∪ T )+ , and write ! A1 · · · Ar C1 · · · Cp w= , ε = ker(w), B1 · · · Br D1 · · · Dq η = coker(w), α= " # a1 · · · ar , b1 · · · br where ai = min(Ai ) and bi = min(Bi ) for each i. Then w ∼ tε zα tη . Proof. By Lemma 3.13, the set {u ∈ hZi : rank(u) = r, w ∼ tε utη } is non-empty. Choose some u We claim that k = 2r. from this set with k = |dom(u) ∩ dom(α)| + |codom(u) ∩ codom(α)|   c1 ··· crmaximal. Indeed, suppose to the contrary that k < 2r, and write u = d1 ··· dr , where ci ∈ Ai and di ∈ Bi for each i. Since k < 2r, it follows that ci 6= ai or di 6= bi for some i. We assume the former is the case (the latter is treated in similar fashion). Relabelling if necessary, we may assume that i = 1; for simplicity, we will write a = a1 and c = c1 . Since a 6∈ dom(u), we have u ∼ zac zca u = ea tac ec zca u ∼ ea tac zca u, by Corollary 3.8 and Lemma 3.4(i). Since a, c ∈ A1 , Lemma 3.9 gives tε ∼ tε tac . Together with (R7), it cr . follows that w ∼ tε utη ∼ tε tac (ea tac zca u)tη ∼ tε tac zca utη ∼ tε (zca u)tη . Note that z ca u = ad11 dc22 ··· ··· dr But |dom(z ca u) ∩ dom(α)| + |codom(z ca u) ∩ codom(α)| = k + 1, contradicting the maximality of k. This completes the proof of the claim. It follows that u = α, so Corollary 3.8 gives u ∼ zα . ✷ We now have all we need to complete the proof of the first main result. Proof of Theorem 2.1. It remains to check that ker φ ⊆ ∼, so suppose w, v ∈ (E ∪ T )+ are such that w = v. Then w ∼ tε zα tη , in the notation of Proposition 3.14. Since v = w, we also have v ∼ tε zα tη , so that w ∼ v. ✷ 9 4 Presentation for Pn Again, the proof of Theorem 2.2 involves two steps: showing that the map Φ : (S ∪ {e, t})∗ → Pn is an epimorphism; and showing that ker Φ is generated by relations (R11–R21). Write ≈ for the congruence on (S ∪ {e, t})∗ generated by (R11–R21). Without causing confusion, we will write w = wΦ for any w ∈ (S ∪ {e, t})∗ . For w = si1 · · · sik ∈ S ∗ , we will write w −1 = sik · · · si1 , noting that ww −1 ≈ w −1 w ≈ 1, by (R11). Note also that the symmetric group Sn ⊆ Pn has monoid presentation hS : (R11–R13)i via si 7→ si ; see [23]. For 1 ≤ r ≤ n and 1 ≤ i < j ≤ n, define the words cr = s1 · · · sr−1 , ǫr = c−1 i eci , −1 τij = τji = c−1 i cj tcj ci . One may easily check diagrammatically that ǫr = ǫr Φ = er and τ ij = τij Φ = tij . In particular, im Φ contains Pn \ Sn , by Proposition 3.1. Since also SΦ = {sr : 1 ≤ r ≤ n − 1} generates Sn , it follows that Φ is surjective. It is easy to check that each of relations (R11–R21) are preserved by Φ. So, to prove Theorem 2.2, it remains to check that ker Φ ⊆ ≈, and the rest of this section is devoted to that task. We begin with some simple properties of the words ǫr and τij . Lemma 4.1. If 1 ≤ r ≤ n and 1 ≤ k ≤ n − 1, then sk ǫr sk ≈ ǫrsk . Proof. We must show that   ǫr−1 sk ǫr sk ≈ ǫr+1   ǫr if k = r − 1 if k = r otherwise. These follows quickly from (R11), (R16), and the easily checked facts that   −1 s c if k ≤ r − 2 cr sk+1 if   k+1 r     c  if k = r − 1 c−1 if r−1 r−1 cr sk ≈ and sk c−1 ≈ r −1   cr+1 if k = r cr+1 if       −1 sk cr if k ≥ r + 1 cr sk if k k k k ≤r−2 = r−1 =r ≥ r + 1. −1 For example, if k = r − 1, then sk ǫr sk = sr−1 c−1 r ecr sr−1 ≈ cr−1 ecr−1 = ǫr−1 , while if k ≤ r − 2, then −1 −1 −1 sk ǫr sk = sk c−1 ✷ r ecr sk ≈ cr sk+1 esk+1 cr ≈ cr sk+1 sk+1 ecr ≈ cr ecr = ǫr . Lemma 4.2 (cf. [11, p322]). If 1 ≤ i < j ≤ n and 1 ≤ k ≤ n − 1, then sk τij sk ≈ τisk ,jsk . Proof. This follows by a similar proof to that of Lemma 4.1, using the same relations satisfied by the cr , sk . For example, if k = j, then −1 −1 −1 −1 −1 sk τij sk = sj c−1 i cj tcj ci sj ≈ ci sj cj tcj sj ci ≈ ci cj+1 tcj+1 ci = τi,j+1 . ✷ Corollary 4.3. If 1 ≤ r ≤ n, 1 ≤ i < j ≤ n, and w ∈ S ∗ , then w −1ǫr w ≈ ǫrw and w −1 τij w ≈ τiw,jw . Proof. This follows from Lemmas 4.1 and 4.2 and a simple induction on the length of w. ✷ We now aim to link the presentations hE ∪ T : (R1–R10)i and hS ∪ {e, t} : (R11–R21)i in a certain sense. With this in mind, we define a map ψ : (E ∪ T )+ → (S ∪ {e, t})∗ by er ψ = ǫr and tij ψ = τij . Note that u = uψ (i.e., uφ = uψΦ) for all u ∈ (E ∪ T )+ . Recall that ∼ is the congruence on (E ∪ T )+ generated by relations (R1–R10). 10 Lemma 4.4. If u, v ∈ (E ∪ T )+ , then u ∼ v ⇒ uψ ≈ vψ. Proof. We just need to check this for each relation u = v from (R1–R10). Relations (R1) and (R3) follow immediately from (R11), (R14), (R15). For (R2), first note that ǫ1 ǫ2 = es1 es1 ≈ s1 es1 e = ǫ2 ǫ1 , by (R18). Together with Corollary 4.3, it follows that for any w ∈ S ∗ with 1w = i and 2w = j, ǫi ǫj ≈ w −1 ǫ1 ww −1ǫ2 w ≈ w −1 ǫ1 ǫ2 w ≈ w −1 ǫ2 ǫ1 w ≈ w −1 ǫ2 ww −1 ǫ1 w ≈ ǫj ǫi . The other relations are all treated in similar fashion; in each case, we use Corollary 4.3 to reduce the calculation to a fixed set of values of the subscripts. For example, for (R9), taking (i, j, k) = (1, 2, 3), ǫ3 τ31 ǫ1 τ12 ǫ2 τ23 ǫ3 = (s2 s1 es1 s2 )(s2 s1 ts1 s2 )et(s1 es1 )(s1 s2 s1 ts1 s2 s1 )(s2 s1 es1 s2 ) ≈ s2 s1 ets2 etes2 ts2 s1 s2 s1 es1 s2 by (R11) and (R15) ≈ s2 s1 ets2 es2 ts2 s2 s1 s2 es1 s2 by (R13) and (R14) ≈ s2 s1 etes2 s2 ts1 s2 es1 s2 by (R11) and (R16) ≈ s2 s1 etes2 s1 s2 by (R11), (R14), (R15) and (R16) ≈ s2 s1 es2 s1 s2 by (R14), with a similar calculation giving ǫ3 τ32 ǫ2 τ21 ǫ1 τ13 ǫ3 ≈ s2 s1 es2 s1 s2 . ✷ Lemma 4.5. If 1 ≤ r ≤ n and 1 ≤ k ≤ n − 1, then ǫr sk and sk ǫr are both ≈-equivalent to elements of im ψ. Proof. Since sk ǫr ≈ sk ǫr sk sk ≈ ǫrsk sk , by (R11) and Lemma 4.1, it suffices to show that   if k = r − 1 ǫr τr,r−1 ǫr−1 ǫr sk ≈ ǫr τr,r+1 ǫr+1 if k = r   ǫr τrk ǫk τk,k+1ǫk+1 τk+1,r ǫr otherwise. We just treat the case in which k 6∈ {r − 1, r}, the others being easier. As above, we may assume that k = 1 and r = 3. Here we have ǫ3 τ31 ǫ1 τ12 ǫ2 τ23 ǫ3 ≈ s2 s1 es2 s1 s2 ≈ s2 s1 es1 s2 s1 = ǫ3 s1 , by (R13) and the calculation from the proof of Lemma 4.4. ✷ Lemma 4.6. If 1 ≤ i < j ≤ n and 1 ≤ k ≤ n − 1, then τij sk and sk τij are both ≈-equivalent to elements of im ψ. Proof. Again, it suffices to do this for just τij sk . By (R11) and Lemmas 4.2 and 4.4, we have τij sk ≈ τij ǫi τij sk ≈ τij ǫi sk sk τij sk ≈ τij (ǫi sk )τisk ,jsk , and the result now follows from Lemma 4.5. ✷ Lemma 4.7. If w ∈ (S ∪ {e, t})∗ \ S ∗ , then w is ≈-equivalent to an element of im ψ. Proof. Put Σ = (E ∪ T )ψ = {ǫr : 1 ≤ r ≤ n} ∪ {τij : 1 ≤ i < j ≤ n}, noting that im ψ = hΣi. Since e = ǫ1 ∈ Σ and t ≈ s1 ts1 = τ12 ∈ Σ, it suffices to show that every element of hΣ ∪ Si \ S ∗ is ≈-equivalent to an element of hΣi. With this in mind, let w ∈ hΣ ∪ Si \ S ∗ , and write w = x1 · · · xk , where x1 , . . . , xk ∈ Σ ∪ S. Denote by l the number of factors xi that belong to S. We proceed by induction on l. If l = 0, then we already have w ∈ hΣi, so suppose l ≥ 1. Since w 6∈ S ∗ , there exists 1 ≤ i ≤ k − 1 such that either (i) xi ∈ S and xi+1 ∈ Σ, or (ii) xi ∈ Σ and xi+1 ∈ S. In either case, Lemmas 4.5 and 4.6 tell us that xi xi+1 ≈ u for some u ∈ im ψ = hΣi. But then w ≈ (x1 · · · xi−1 )u(xi+2 · · · xk ), and we are done, after applying an induction hypothesis (noting that (x1 · · · xi−1 )u(xi+2 · · · xk ) has l − 1 factors from S). ✷ 11 We may now prove the second main result. Proof of Theorem 2.2. It remains to show that ker Φ ⊆ ≈, so suppose w1 , w2 ∈ (S ∪ {e, t})∗ are such that w 1 = w 2 . If w1 ∈ Sn , then w1 , w2 ∈ S ∗ , so w1 ≈ w2 , using only relations (R11–R13). So suppose w1 6∈ Sn . It follows that w1 , w2 ∈ (S ∪ {e, t})∗ \ S ∗ . So, by Lemma 4.7, w1 ≈ u1 ψ and w2 ≈ u2 ψ for some u1, u2 ∈ (E ∪ T )+ . We then have u1 = u1 ψ = w 1 = w 2 = u2 ψ = u2 , so that u1 ∼ u2 , by Theorem 2.1. Lemma 4.4 then gives u1 ψ ≈ u2 ψ, so that w1 ≈ w2 . ✷ References [1] K. Auinger, Yuzhu Chen, Xun Hu, Yanfeng Luo, and M. V. Volkov. The finite basis problem for Kauffman monoids. Algebra Universalis, 74(3-4):333–350, 2015. [2] Karl Auinger. Pseudovarieties generated by Brauer type monoids. Forum Math., 26(1):1–24, 2014. [3] Karl Auinger, Igor Dolinka, and Mikhail V. Volkov. Equational theories of semigroups with involution. J. Algebra, 369:203–225, 2012. [4] James East. A presentation of the singular part of the symmetric inverse monoid. Comm. Algebra, 34(5):1671– 1689, 2006. [5] James East. A presentation for the singular part of the full transformation semigroup. Semigroup Forum, 81(2):357–379, 2010. [6] James East. Generators and relations for partition monoids and algebras. J. Algebra, 339:1–26, 2011. [7] James East. On the singular part of the partition monoid. Internat. J. Algebra Comput., 21(1-2):147–178, 2011. [8] James East. A symmetrical presentation for the singular part of the symmetric inverse monoid. Algebra Universalis, 74(3-4):207–228, 2015. [9] James East and D. G. FitzGerald. The semigroup generated by the idempotents of a partition monoid. J. Algebra, 372:108–133, 2012. [10] James East and R. D. Gray. Diagram monoids and Graham–Houghton graphs: idempotents and generating sets of ideals. Preprint, 2014, arXiv:1404.2359. [11] D. G. FitzGerald. A presentation for the monoid of uniform block permutations. Bull. Austral. Math. Soc., 68(2):317–324, 2003. [12] D. G. FitzGerald and Kwok Wai Lau. On the partition monoid and some related semigroups. Bull. Aust. Math. Soc., 83(2):273–288, 2011. [13] D. G. FitzGerald and Jonathan Leech. Dual symmetric inverse monoids and representation theory. J. Austral. Math. Soc. Ser. A, 64(3):345–367, 1998. [14] Tom Halverson and Arun Ram. Partition algebras. European J. Combin., 26(6):869–921, 2005. [15] J. M. Howie. The subsemigroup generated by the idempotents of a full transformation semigroup. J. London Math. Soc., 41:707–716, 1966. [16] V. F. R. Jones. The Potts model and the symmetric group. In Subfactors (Kyuzeso, 1993), pages 259–267. World Sci. Publ., River Edge, NJ, 1994. [17] Steffen Koenig. A panorama of diagram algebras. In Trends in representation theory of algebras and related topics, EMS Ser. Congr. Rep., pages 491–540. Eur. Math. Soc., Zürich, 2008. [18] Kwok Wai Lau and D. G. FitzGerald. Ideal structure of the Kauffman and related monoids. Comm. Algebra, 34(7):2617–2629, 2006. [19] Stephen Lipscomb. Symmetric inverse semigroups, volume 46 of Mathematical Surveys and Monographs. American Mathematical Society, Providence, RI, 1996. [20] Victor Maltcev and Volodymyr Mazorchuk. Presentation of the singular part of the Brauer monoid. Math. Bohem., 132(3):297–323, 2007. [21] Paul Martin. Temperley-Lieb algebras for nonplanar statistical mechanics—the partition algebra construction. J. Knot Theory Ramifications, 3(1):51–82, 1994. [22] Paul Martin. On diagram categories, representation theory and statistical mechanics. In Noncommutative rings, group rings, diagram algebras and their applications, volume 456 of Contemp. Math., pages 99–136. Amer. Math. Soc., Providence, RI, 2008. [23] Eliakim Hastings Moore. Concerning the abstract groups of order k! and 12 k! holohedrically isomorphic with the symmetric and the alternating substitution-groups on k letters. Proc. London Math. Soc., 28(1):357–366, 1897. [24] L. M. Popova. Defining relations in some semigroups of partial transformations of a finite set (in Russian). Uchenye Zap. Leningrad Gos. Ped. Inst., 218:191–212, 1961. [25] Stewart Wilcox. Cellularity of diagram algebras as twisted semigroup algebras. J. Algebra, 309(1):10–31, 2007. 12
4math.GR
arXiv:1205.3416v2 [math.RT] 29 Dec 2013 On the generalized Davenport constant and the Noether number Kálmán Cziszter a a ∗ and Mátyás Domokos b † Central European University, Department of Mathematics and its Applications, Nádor u. 9, 1051 Budapest, Hungary Email: cziszter [email protected] b Rényi Institute of Mathematics, Hungarian Academy of Sciences, Reáltanoda u. 13-15, 1053 Budapest, Hungary Email: [email protected] Abstract Known results on the generalized Davenport constant relating zerosum sequences over a finite abelian group are extended for the generalized Noether number relating rings of polynomial invariants of an arbitrary finite group. An improved general upper degree bound for polynomial invariants of a non-cyclic finite group that cut out the zero vector is given. 2010 MSC: 13A50 (Primary) 11B75, 13A02 (Secondary) Keywords: Noether number, Davenport constant, polynomial invariants 1 Introduction The Davenport constant D(A) of a finite abelian group A is defined as the smallest positive integer n such that every sequence over A of length at least n has a non-empty zero-sum subsequence. The Davenport constant naturally appears in the theory of polynomial invariants of finite groups. The Noether number β(G) of a finite group G is the maximal possible degree of an indecomposable polynomial invariant of G (the definition involves a fixed base field F which we always assume to have characteristic not dividing the order of G). It was shown by B. Schmid [20] that when G = A is abelian, then β(G) = D(A). Halter-Koch [14] introduced for any positive integer k the generalized Davenport constant Dk (A) as the smallest positive integer n such that every sequence over A of length at least n is divisible by the product of k non-empty zero-sum subsequences (cf. Chapter 6.1 in [13]; by the product of sequences over A we mean their concatenation, and divisibility of sequences is defined accordingly). ∗ The paper is based on results from the PhD thesis of the first author written at the Central European University. † The second author is partially supported by OTKA NK81203 and K101515. 1 This notion also can be seen as the abelian special case of a concept of invariant theory. In [2] the authors introduced the generalized Noether number βk (G) for an arbitrary finite group G and positive integer k (the definition again involves a fixed base field F of characteristic not dividing |G|, suppressed from the notation). When G = A is abelian, then βk (A) = Dk (A). As it is demonstrated in [2], the main use of the generalized Noether number is that it can be efficiently used to derive upper bounds for the ordinary Noether number of a group in terms of the generalized Noether numbers of its subquotients (see the beginning of Section 4 for some details). In the first part of the present note we develop further the analogy between the generalized Davenport constant and the generalized Noether number. Theorem 3.4 gives a lower bound for the generalized Noether number of a direct product of groups in terms of the generalized Noether numbers of the factors, generalizing thereby Lemma 6.1.4 from [13] for non-abelian groups. Next we investigate the behaviour of βk (G) as a function of k. The fact that Dk (A) is an almost linear function of k was shown by M. Freeze and W. A. Schmid [11], building on a result of Delorme, Ordaz and Quiroz [4]; see also Theorem 6.1.5 in [13]. This is generalized in Corollary 4.7, which we derive from basic generalities on graded rings and the method of polarization in invariant theory. It states that for a fixed finite group G and a base field F of characteristic zero there exists a positive integer k0 and a non-negative integer β0 (G) such that for all k ≥ k0 we have βk (G) = kσ(G)+β0 (G); the number σ(G) is another well known quantity of invariant theory: it is the minimal positive integer n such that for any representation of G there exist homogeneous G-invariant polynomial functions of degree at most n such that their only common zero is the origin. (In the special case when G = A is abelian, we have σ(A) = exp(A), the exponent of A. We note also that for linearly reductive algebraic groups a related quantity σ(G, V ) plays a significant role in constructive invariant theory, see [19] or [5].) In Section 5 we establish some basic properties of σ(G) for G finite. They are used to prove Theorem 7.1, stating that if G is non-cylic, then σ(G) ≤ |G|/q for the minimal prime divisor of |G|, provided that char(F) does not divide |G|. This is an easier but stronger variant for σ(G) of the main combined result on β(G) proved in [2] and [3] (continuing the investigations of [20], [7], [21]). 2 Preliminaries We need to recall some generalities on graded L∞ modules. By a graded module here we mean an L N-graded module M = d=0 Md over a commutative graded F∞ algebra R = d=0 Rd such that R0 = F is a field when R is unital and R0 = {0} otherwise; in the latter case still we assume that M is an F-vector space, the multiplication map is F-bilinear, and a submodule is L Ls or an ideal by definition M , and R := assumed to be a subspace. We set M≤s := R d + d=0 d>0 d . l We write R+ for the lth power of the ideal R+ , and more generally, for subsets A, B ⊂ R, AB stands for the F -subspace spanned by {ab | a ∈ A, b ∈ B}, and hAi denotes the ideal in R generated by A. The subalgebra of R generated by 2 Ls R≤s := d=0 Rd will be denoted by F[R≤s ]. The factor space M/R+ M inherits the grading. Define β(M, R) := the top degree of M/R+ M provided that M/R+ M has finitely many non-zero homogeneous components, and write β(M, R) = ∞ otherwise. By the graded Nakayama Lemma β(M, R) is the minimal non-negative integer s such that M = M≤s + M≤s R (i.e. M is generated as an R-module by M≤s ), when M is generated in bounded degree. In particular, the maximal degree of a homogeneous element of R+ not 2 belonging to R+ is β(R) := β(R+ , R), the minimal positive integer n such that R is generated as an F-algebra by homogeneous elements of degree at most n. Let M be a graded R-module. We define for any integer k ≥ 1 k βk (M, R) := β(M, R+ ) The abbreviation βk (R) := βk (R+ , R) will also be used. In the special case k = 1 we recover β1 (M, R) = β(M, R) and β1 (R) = β(R). Note the trivial inequality βk (R) ≤ kβ(R). The graded modules and algebras we are interested in come from invariant theory. We fix a base field F, and let G be a finite group whose order is invertible in F. Take a G-module V , i.e. a finite dimensional F-vector space endowed with a representation of G on V . The coordinate ring F[V ] is defined in abstract terms as the symmetric tensor algebra of the dual space V ∗ . So F[V ] is a polynomial ring in dim(V ) variables, hence in particular it is a graded ring with F[V ]1 = V ∗ . The left action of G on V induces a natural right action on V ∗ given by xg (v) = x(gv) for any g ∈ G, v ∈ V and x ∈ V ∗ . This right action of G on V ∗ extends to the symmetric tensor algebra F[V ]. The corresponding ring of polynomial invariants is F[V ]G := {f ∈ F[V ] : f g = f ∀g ∈ G} and β(G, V ) := β(F[V ]G ) is called the Noether number of the G-module V . We also set βk (G, V ) := βk (F[V ]G ) for an arbitrary positive integer k, and βk (G) := sup{βk (G, V ) | V is a finite dimensional G-module over F}. We shall refer to these numbers as the generalized Noether numbers of the group G. 3 The famous theorem of E. Noether asserts that β(G) := β1 (G) is bounded by the order of G. When char(F) = 0 or char(F) > |G|, this was proved in [18]. The result was extended to non-modular positive characteristic independently by Fleischmann [8] and Fogarty [10]. Convention 2.1. Throughout this paper F is our base field and G (or H) is a finite group of order not divisible by char(F), unless explicitly stated otherwise. By a G-module we mean a finite dimensional F-vector space endowed with a linear action of G. 3 Lower bound for direct products Lemma 3.1. For any G-module V there exists an irreducible G-module U such that βk (G, V ⊕ U ) ≥ βk (F[V ], F[V ]G ) + 1. Proof. Write L := F[V ], R := F[V ]G and set d := βk (L, R). By complete k reducibility of the G-module Ld its submodule R+ L ∩ Ld has a direct complement, which is non-zero by the definition of d, hence it contains an irreducible G-submodule U . Choose a basis e1 , . . . , en in U and let ε1 , . . . , εn be the corresponding dual basis in U ∗ . The matrix of g acting on U ∗ via the contragredient representation is the transpose of the inverse of the matrix of g P acting on U . Thus f := ni=1 ei εi , viewed as an element in the polynomial ring F[V ⊕ U ] = F[V ] ⊗ F[ε1 , . . . , εn ], is a G-invariant of degree d + 1. We claim that k+1 f 6∈ S+ where S := F[V ⊕U ]G . Note that the action of G on F[V ⊕U ] preserves ∗ the total degree both in the variables to U ∗ . Suppose indiP belonging to V and k+1 k rectly that f ∈ S+ . Then f = j gj hj where gj ∈ R+ while hj ∈ S+ is linear Pn on U , i.e. hj = i=1 hj,i εi for some polynomials equating the P hj,i ∈ L. After k L, contradicting coefficients of εi on both sides we get that ei = j gj hj,i ∈ R+ the choice of U . Corollary 3.2. If V is a G-module such that βk (G, V ) = βk (G) then βk (G, V ) = βk (F[V ], F[V ]G ) + 1. Proof. For any G-module V it holds that βk (G, V ) ≤ βk (L, R) + 1 where L = F[V ] and R = L F[V ]G . Indeed, if f ∈ L has degree deg(f ) > βk (L, R) + 1 k . Apply the transfer map τ : L → R, then f ∈ L+ · ( d>βk (L,R) Ld ) ⊆ L+ R+ P g f 7→ g∈G f . It is a graded R-module epimorphism from L onto R (see for k+1 example Chapter 1 in [1]). It follows that τ (f ) ∈ R+ , and on the other hand τ (L) = R, hence the desired inequality follows. The reverse inequality is an immediate consequence of Lemma 3.1. Remark 3.3. Compare Corollary 3.2 with the formula Dk (A) = dk (A) + 1 in Lemma 6.1.2 of [13], where dk (A) is the maximal length of a sequence over A which is not divisible by the product of k zero-sum subsequences. It is not difficult to show that dk (A) = supV βk (F[V ], F[V ]A ) where V ranges over all A-modules, whereas βk (A) = Dk (A), as we mentioned in the introduction. 4 Theorem 3.4. For any integers r, s ≥ 1 and finite groups G, H we have the inequality βr+s−1 (G × H) ≥ βr (G) + βs (H) − 1. Proof. If M and N are graded modules over the graded algebras R and S, respectively, then: βr+s−1 (M ⊗ N, R ⊗ S) ≥ βr (M, R) + βs (N, S) (1) r s Indeed, there are elements x ∈ Mβr (M,R) \ R+ M and y ∈ Nβs (N,S) \ S+ N. r Take an F-vector space basis B1 of R+ M , and extend B1 ∪ {x} to a basis B s of M . Similarly, let C1 be a basis of S+ N , and extend C1 ∪ {y} to a basis C in N . Then A := {u ⊗ v | u ∈ B1 , v ∈ C or u ∈ B, v ∈ C1 } is a basis r s of T := R+ M ⊗ N + M ⊗ S+ N . On the other hand A ∪ {x ⊗ y} is part of the basis {u ⊗ v | u ∈ B, v ∈ C} of M ⊗ N , showing that x ⊗ y 6∈ T . But T ⊇ (R ⊗ S)r+s−1 (M ⊗ N ) and deg(x ⊗ y) = βr (M, R) + βs (N, S), whence (1) + readily follows. Now take a G-module V with βr (G, V ) = βr (G), and an H-module W with βs (H, W ) = βs (H). Given that F[V ⊕ W ]G×H = F[V ]G ⊗ F[W ]H we have the following sequence of inequalities: βr+s−1 (G × H) − 1 ≥ βr+s−1 (F[V ⊕ W ], F[V ⊕ W ]G×H ) G by Lemma 3.1 H ≥ βr (F[V ], F[V ] ) + βs (F[W ], F[W ] ) by (1) = βr (G) + βs (H) − 2 by Corollary 3.2 Remark 3.5. In the special case G = A abelian we recover Lemma 6.1.4 from [13]. 4 The growth rate of βk (G) In the study of the Noether bound for finite groups, the following inequalities due to Schmid [20] in characteristic zero and extended to positive non-modular characteristic by Sezer [21], Fleischmann [9], Knop [16] are very useful: For a normal subgroup N in G and an arbitrary subgroup H in G we have β(G) ≤ [G : H]β(H) and β(G) ≤ β(N )β(G/N ). Our motivation to study βk (G) stems from the following strengthening proved in [2]: βk (G) ≤ ββk (G/N ) (N ) βk (G) ≤ βk[G:H] (H) The estimates for β(G) obtained in terms of generalized Noether numbers of its subquotient K using the latter inequalities are better than the estimates derived from the original inequalitites, as soon as βk (K) is strictly smaller than kβ(K). A partial theoretical explanation of the experience that indeed, typically βk (G) is strictly smaller than kβ(G) and its extent is obtained in this section. 5 We start by studying in general for a fixed commutative graded F-algebra R k+1 k the behavior of βk (R) as a function of k. The surjection R+ /R+ → R+ /R+ shows that βk (R) ≤ βk+1 (R) for all k. We note that βk (R) is not always a strictly increasing function of k: Example 4.1. Consider the ring R = F[a, b]/(b3 − a9 , ab2 − a7 ) and define a 2 3 grading by setting deg(a) = 1 and deg(b) = 3. Then b2 ∈ R+ \ R+ , and b2 spans 2 4 the degree 6 homogeneous component of R+ /R+ . In this case for all l ≥ 7 we 5 have that Rl ⊆ R+ , hence 6 = β2 (R) = β3 (R) = β4 (R). On the other hand, for a fixed G-module V , βk (G, V ) is unbounded because of the following trivial observation: Lemma 4.2. βk (R) as a function of k is bounded if and only if there is an integer n such that Ri = {0} for all i ≥ n. L n+1 n+1 , Proof. Note that R+ ⊆ d≥n+1 Rd . Hence if Rn 6= {0}, then Rn * R+ implying βn (R) ≥ n. Conversely, if Ri = {0} for all i ≥ n then βi (R) < n. Lemma 4.3. For any positive integers r ≤ k we have the inequality βk (R) ≤ k βr (R). r Proof. Suppose to the contrary that βk (R) > kr βr (R). Then there exist homogeneous elements f1 , . . . , fl ∈ R+ such that l ≤ k, f := f1 · · · fl is not contained l+1 in R+ , and deg(f ) > kr βr (R) (this forces that l > r). We may suppose that deg(f1 ) ≥ · · · ≥ deg(fl ). Then deg(fr+1 ) + · · · + deg(fl ) deg(f1 ) + · · · + deg(fr ) ≥ deg(fr ) ≥ deg(fr+1 ) ≥ r l−r hence deg(f1 · · · fr ) ≥ r r deg(f1 . . . fl ) ≥ deg(f ) > βr (R). l k r+1 l+1 It follows that h := f1 · · · fr ∈ R+ , hence f = hfr+1 · · · fl ∈ R+ , a contradiction. By Lemma 4.3 the sequence βkk(R) is monotonically decreasing, and as it is also non-negative, it must converge to a certain limit. Our next goal will be to clarify what is the value of this limit. For a graded finitely generated commutative F-algebra R with R0 = F set σ(R) := min{d ∈ N : R is finitely generated as a module over F[R≤d ]} Equivalently, σ(R) is the minimal integer d such that β(R+ , F[R≤d ]) is finite. Proposition 4.4. Let R be a finitely generated commutative graded F-algebra. For any positive integer k we have βk (R) ≥ kσ(R). 6 Proof. It is well known that given a set h1 , . . . , hs ∈ R of homogeneous elements, R is a finitely generated module over its subalgebra F[h1 , . . . , hs ] if and only if p R+ = hh1 , . . . , hs i, the radical of the ideal generated by the hi . If R is finite dimensional then σ(R) = 0 and our statement obviously holds. Suppose dim F (R) = ∞, hence σ(R) > 0. By definition qL q L of t := σ(R) we have R+ 6= t−1 t h d=1 Rd i, on the other hand R+ = h d=1 Rd i, hence there exists an qL k+1 k+1 k f ∈ Rt with f ∈ / h t−1 / R+ . Indeed, f k ∈ R+ d=1 Rd i. We claim that f ∈ L t−1 would imply f k ∈ h d=1 Rd i, contrary to the choice of f . Thus βk (R) ≥ k deg(f ) = kσ(R). By definition of σ(R) the number η(R) := β(R+ , F[R≤σ(R) ]) is finite. Moreover, any homogeneous element f ∈ R with deg(f ) > η(R) Lσ(R) belongs to the ideal ( d=1 Rd ) · R+ , hence β(R) ≤ η(R) and more generally, by induction on k one obtains βk (R) ≤ (k − 1)σ(R) + η(R). We know from Lemma 4.2 that an integer k0 exists such that βk (R) ≥ η(R) − σ(R) holds for any k ≥Pk0 . Hence if deg(f ) > βk (R) + σ(R) then f ∈ R can be written in the form i gi hi where 0 < deg(gi ) ≤ σ(R) and deg(hi ) > βk (R), k+1 k+2 whence hi ∈ R+ and f ∈ R+ . This argument shows that for any k ≥ k0 we have βk+1 (R) ≤ βk (R) + σ(R) (2) This simple observation immediately leads us to the following result: Proposition 4.5. Let R be a finitely generated commutative graded F-algebra. Then there are non-negative integers k0 (R) and β0 (R) such that βk (R) = kσ(R) + β0 (R) for every k > k0 (R). Proof. Consider the sequence of integers ak := βk (R) − kσ(R), where k = k0 , k0 + 1, . . . and βk0 (R) ≥ η(R) − σ(R). By (2) it is monotonically decreasing and by Proposition 4.4 it is non-negative, therefore it stabilizes after finitely many steps, and this is what has been claimed. For any G-module V we write σ(G, V ) := σ(F[V ]G ). This quantity was much studied for G a linearly reductive group (see e.g. [5] or [19]) and has the following well-known interpretation by the Hilbert Nullstellensatz: 7 Proposition 4.6. σ(G, V ) is the minimal positive integer n such that there exists a subset of F[V ]G + consisting of homogeneous elements with degree at most n, whose common zero locus in F̄ ⊗F V is {0} (where F̄ stands for the algebraic closure of F). Supposing |G| ∈ F× we have σ(G, V ) ≤ β(G, V ) ≤ |G|, and define σ(G) := sup{σ(G, V ) | V is a G-module}. (In fact the inequality σ(G) ≤ |G| holds in the modular case char(F) | |G| as well, see Remark 5.6 (ii).) As an immediate corollary of Proposition 4.5 we obtain that for any G-module V there exist non-negative integers k0 (G, V ) and β0 (G, V ) such that for all k ≥ k0 (G, V ) we have βk (G, V ) = kσ(G, V )+β0 (G, V ). In characteristic zero the following can be proved: Corollary 4.7. Suppose char(F) = 0 and let G be a finite group. There exist non-negative integers k0 (G) and β0 (G) such that for all k ≥ k0 (G) we have βk (G) = kσ(G) + β0 (G). In particular, βk (G) = σ(G). k→∞ k lim Proof. Denoting by Vreg the regular representation of G, we have that βk (G) = βk (G, Vreg ) holds for all k by the same argument as in the proof of the special case k = 1 in [20] based on Weyl’s theorem on polarization (cf. [22]). Hence the statement holds by Proposition 4.5. Remark 4.8. As we mentioned in the Introduction, Corollary 4.7 in the special case when G = A is abelian is due to M. Freeze and W. A. Schmid [11], and Delorme, Ordaz and Quiroz [4]. For some results on η(A) see e.g. [13] ch. 5.7. 5 Some basic properties of σ(G) In this section we collect some basic statements about σ(G) that we will need to prove Theorem 7.1. Lemma 5.1. Let V1 , ..., Vn be any G-modules and W = V1 ⊕ · · · ⊕ Vn . Then n σ(G, W ) = max σ(G, Vi ) i=1 In particular σ(G) = maxU σ(G, U ) where U ranges over all isomorphism classes of irreducible G-modules. Proof. Let R = F[W ]G and denote by Si the subalgebra of F[Vi ]G generated by its elements of degree at most σ(G, Vi ). As F[W ] = ⊗ni=1 F[Vi ] is obviously finitely generated as a ⊗ni=1 Si -module, and ⊗ni=1 Si ⊆ F[R≤d ] where d := maxni=1 σ(G, Vi ), it follows that σ(G, W ) ≤ d. 8 For the reverse inequality let T = F[Vi ]G for a fixed i and observe that the restriction to Vi gives a graded algebra surjection ψ : R → T . Hence the image under ψ of a finite set of module generators of R over its subalgebra F[R≤σ(R) ] must generate T = ψ(R) as a module over its subalgebra ψ(F[R≤σ(R) ]) = F[T≤σ(R) ], as well. In particular σ(G, Vi ) ≤ σ(G, W ). Remark 5.2. The number σ(F[W ]G ) when G is a linearly reductive group acting algebraically on W plays important role in finding explicit upper bounds for β(F[W ]G ), see [19] and [5]. Lemma 5.1 is special for finite groups, and does not hold in general for reductive algebraic groups, when it may well happen that F[V ]G = F, but F[V ⊕ · · · ⊕ V ]G contains non-constant elements (for example, take as V the natural module Fn over G = SLn (F)). For an abelian group A denote by exp(A) the least common multiple of the orders of the elements of A. Corollary 5.3. Let A be an abelian group and suppose that F is algebraically closed of characteristic not dividing |A|. Then σ(A) = exp(A). Proof. Lemma 5.1 asserts that σ(A) = maxU σ(A, U ) where U runs through the irreducible representations of A. These are all 1-dimensional, and if U ∗ = hxi then F[x]A = F[xe ] where e ∈ N is the order of the character chari : A → F× defined by xa = chari(a)x (a ∈ A). This readily implies our claim, as A ∼ = Â, where  := homZ (A, F× ) is the group of characters of A. Lemma 5.4. Let N be a normal subgroup of G and V a G-module. Then σ(G, V ) ≤ σ(G/N )σ(N, V ). Lσ(N,V ) N Proof. Set W := F[V ]N d and denote by S the subalgebra of F[V ] d=1 generated by W . Then S is a finite module over its finitely generated subalgebra S G/N = S G , and F[V ]N is a finite S-module, thus F[V ]N is a finite, hence noetherian S G -module, implying in turn that its submodule F[V ]G is also a finite S G -module. Write π for the F-algebra surjection F[W ∗ ] → S induced by the natural isomorphism between the linear component (W ∗ )∗ of the polynomial ring F[W ∗ ] and W ⊂ F[V ]N . By linear reductivity of G/N , π maps F[W ∗ ]G/N onto Lσ(G/N,W ∗ ) G/N S G . Let T be the F-subalgebra of F[W ∗ ] generated by d=1 F[W ∗ ]d . Then F[W ∗ ]G/N is a finite T -module, implying that S G is a finite π(T )-module, and thus F[V ]G is a finite π(T )-module. Since by construction π(T ) is generated by elements of degree at most σ(N, V )σ(G/N, W ∗ ), the desired inequality follows. Lemma 5.5. Let G be a finite group, H a subgroup of G, and V a G-module. Then σ(H, V ) ≤ σ(G, V ) ≤ [G : H]σ(H, V ). 9 Proof. The first inequality is trivial. By Proposition 4.6 there are homogeneous elements f1 , . . . , fr ∈ F[V ]H of degree at most σ(H, V ) suchQthat the common zero locus of f1 , . . . , fr in F̄ ⊗ V is {0}. The formula 0 = g (fi − fig ) where [G:H] g ranges over a set of right H-coset representatives in G shows that fi [G:H] ) ≤ is contained in the ideal of F[V ] generated by F[V ]G + . Since deg(fi L[G:H]σ(H,V ) [G : H]σ(H, V ), it follows that the common zero locus of d=1 F[V ]G d is [G:H] | i = 1, . . . , r}. Consequently, contained in the common zero locus {0} of {fi again by Proposition 4.6, F[V ]G is a finitely generated module over its subalgebra generated by the homogeneous components F[V ]G d with d ≤ [G : H]σ(H, V ). Remark 5.6. (i) The statement and proof of Lemma 5.4 remain valid under the weaker assumption that [G : N ] is not divisible by char(F). (ii) The statement and proof of Lemma 5.5 remain valid in the modular case char(F) | |G|. When H = {1} is the trivial subgroup, we obtain the inequality σ(G, V ) ≤ |G|. Lemma 5.4 and Lemma 5.5 have the folowing immediate corollary: Corollary 5.7. For any subquotient K of G we have σ(K) σ(G) ≤ |G| |K| Remark 5.8. Lemma 5.4 and Lemma 5.5 are the analogues for σ of the reduction lemmata for β in [20] mentioned at the beginning of Section 4. For a variant of these statements concerning separating invariants see Section 3.9.4 in [6], [15], and [17]. 6 σ(G) for some semidirect products We need some facts and terminology relating zero-sum sequences over A = Zp , the group of prime order p, written additively. See for example [12] as a general reference to this topic. Recall that by a sequence over A we mean a sequence S = (s1 , ..., sd ) of elements si ∈ A where the order of the elements is disregarded Pd and repetition is allowed. We say that S is a zero-sum sequence if i=1 si = 0 ∈ A. Denote by supp(S) the set of elements of A that occur in S. Lemma 6.1. For any non-empty subset S ⊆ Zp \ {0} there exists a zero-sum sequence T of length at most p with supp(T ) = S. Proof. Let s1 , . . . , sk denote the elements of S. If s1 + · · · + sk = 0, then the sequence T := (s1 , . . . , sk ) satisfies the requirements. Otherwise for i = 1, . . . k denote ni the unique element in {1, . . . , p − 1} with ni si = −(s1 + · · · + sk ) ∈ Zp . The ni are distinct, hence the smallest among them, say n1 ≤ p − k. Then the sequence T := (s1 , . . . , s1 , s2 , . . . , sk ) (where the multiplicity of s1 is n1 + 1) satisfies the requirements. 10 Proposition 6.2. Let G = Zp ⋊ Zd be a semidirect product of cyclic groups, where p is a prime, d is a divisor of p−1, and Zd acts faithfully (via conjugation) on Zp . Then we have σ(G) = p. Proof. We know that σ(G) ≥ σ(Zp ) = p by Lemma 5.5 and Corollary 5.3. By Lemma 5.1 it is enough to prove that σ(G, U ) ≤ p, where U is an irreducible Gmodule. Since σ(G) is not sensitive for extending the base field, we may assume that F is algebraically closed. Denote by A the maximal normal subgroup Zp of G. Then G has only two types of irreducible representations: if U is 1-dimensional with A in its kernel, then σ(G, U ) ≤ |G/A| = |Zd | ≤ p − 1. Otherwise U is induced from a non-trivial 1-dimensional A-module. In this case we may choose variables x1 , . . . , xd in F[U ] such that the xi are A-eigenvectors permuted up to scalar multiples by G, and denoting by θi ∈  := homZ (A, F× ) the corresponding character of A (i.e. xai = θi (a)x for all a ∈ A), the set O := {θ1 , . . . , θd } is a G/A-orbit in  (on which G acts in the standard way). αd 1 For a monomial m = xα ∈ F[U ] denote by Φ(m) the sequence over 1 . . . xd  containing θi with multiplicity αi for i = 1, . . . , d, and no other elements. Obviously m is A-invariant if and only if Φ(m) is a zero-sum sequence. For every k ≤ |O| we choose representatives Sk,1 , ..., Sk,rk from each G/Aorbit of the k-element subsets of O. By Lemma 6.1 we can assign to each of them an A-invariant monomial mSk,i ∈ F[U ] with support supp(Φ(mSk,i )) = Sk,i and degree at most p. Now consider the polynomials: fk = rk X X mgSk,i for k = 1, ..., |O| i=1 g∈G/A They are all G-invariants, moreover, it is easily checked that their common zero locus is {0}. Indeed, if the vector u = (u1 , ..., u|O| ) ∈ F̄ ⊗ U ∼ = F̄d belongs to this common zero locus, and if the set S = {i : ui 6= 0} has cardinality k > 0 then 0 = fk (u) = c · mS (u) for some divisor c of d. It follows that mS (u) = 0, implying that uj = 0 for an index j ∈ S, which is a contradiction. Consequently F[U ]G is finitely generated over F[f1 , ..., f|O| ] by Proposition 4.6, hence σ(G, U ) ≤ maxk deg(fk ) ≤ p. Proposition 6.3. Let G = A ⋊ Z2 be a semidirect product where A is a nontrivial abelian group on which Z2 acts by inversion. Then σ(G) = exp(A). Proof. By Lemma 5.1 we know that σ(G) = max σ(G, U ) where U is an irreducible G-module. As above, we may assume that F is algebraically closed. If U is 1-dimensional, then σ(G, U ) ≤ σ(G/G′ ), where G′ is the commutator subgroup of G. It is easy to see that G/G′ is an elementary abelian 2-group, whence σ(G/G′ ) = exp(G/G′ ) = 2 ≤ exp(A). If the irreducible G-module U is not 1-dimensional, then F[U ]1 = U ∗ = hx, yi where xa = θ(a)x for any a ∈ A and some character θ ∈ Â, and y a = θ(a)−1 y; moreover x and y are exchanged by the generator b of Z2 . Let e denote the order of θ in Â; evidently e ≤ exp A. Now it is easily seen that F[U ]G ⊇ F[xe + y e , xy], whence σ(G, U ) ≤ max{e, 2}. 11 Thus we proved the inequality σ(G) ≤ exp(A). For the reverse inequality note that σ(G) ≥ σ(A) by the first inequality in Lemma 5.5. 7 An improved general bound on σ(G) In this section we give an improvement for non-cyclic G of the general inequality σ(G) ≤ |G|. Theorem 7.1. If G is non-cyclic and q is the smallest prime divisor of |G|, then |G| σ(G) ≤ q Proof. If G has a subquotient isomorphic to Zp × Zp for some prime p then by Corollary 5.7 and Corollary 5.3 we get that: 1 σ(Zp × Zp ) σ(G) = ≤ |G| p2 p and we are done. Note that for a non-cyclic p-group P , the factor group P/Φ(P ) (where Φ(P ) is the Frattini subgroup of P ) contains a subgroup isomorphic to Zp × Zp . So it remains to deal with the case when all Sylow subgroups of G are cyclic. Then by a well known theorem of Burnside G is the semidirect product of cyclic groups, and necessarily contains as a subquotient a non-abelian semidirect product Zp ⋊ Zq , where p, q are primes, q dividing p − 1 (see for example [2] for references and details). Therefore by Corollary 5.7 and Proposition 6.2 we conclude σ(G)/|G| ≤ σ(Zp ⋊ Zq )/pq = 1/q. Remark 7.2. Theorem 7.1 is sharp for example for the abelian group Znq × Zq or for a non-abelian semi-direct product Zn ⋊ Zq . Theorem 7.1 is a variant for σ(G) of the main combined result of [2] and [3] concerning β(G). The present result for σ(G) is easier, but the conclusion is stronger. We finish by stating a corresponding conjectured statement for the Noether number: Conjecture 7.3. Let Cq denote the set of isomorphism classes of non-cyclic finite groups of order not divisible by char(F) and with smallest prime divisor q. Then 1 β(G) = lim sup |G| q G∈Cq The case q = 2 holds by [2] and [3]. For q > 2 the conjecture is open. Acknowledgement We thank the referees for helpful comments on the manuscript. 12 References [1] D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge University Press, 1993. [2] K. Cziszter and M. Domokos, Groups with large Noether bound, arXiv:1105.0679v4 . [3] K. Cziszter and M. Domokos, Noether’s bound for the groups with a cyclic subgroup of index two, arXiv:1205.3011v1. [4] Ch. Delorme, O. Ordaz, and D. Quiroz, Some remarks on Davenport constant, Discrete Math. 237 (2001), 119-128. [5] H. Derksen, Polynomial bounds for rings of invariants, Proc. Amer. Math. Soc. 129 (2001), 955-963. [6] H. Derksen and G. Kemper, Computational Invariant Theory, SpringerVerlag, Berlin, 2002. [7] M. Domokos and P. Hegedűs, Noether’s bound for polynomial invariants of finite groups, Arch. Math. 74 (2000), 161-167. [8] P. Fleischmann, The Noether bound in invariant theory of finite groups, Adv. Math. 156 (2000), 23-32. [9] P. Fleischmann, On invariant theory of finite groups, in ”Invariant Theory in All Characteristics”, (Ed.: H. E. A. Eddy Campbell and D. L. Wehlau), CRM Proceedings and Lecture Notes 35, Amer. Math. Soc., Providence, Rhode Island, pp. 43-69, 2004. [10] J. Fogarty, On Noether’s bound for polynomial invariants of a finite group, Electron. Res. Announc. Amer. Math. Soc. 7 (2001), 5-7. [11] M. Freeze and W. A. Schmid, Remarks on a generalization of the Davenport constant, Discrete Mathematics 310 (2010) 3373-3389. [12] W. Gao and A. Geroldinger, Zero-sum problems in finite abelian groups: A survey, Expo. Math. 24 (2006), 337-369. [13] A. Geroldinger and F. Halter-Koch, Non-unique factorizations. Algebraic, combinatorial and analytic theory, Monographs and Textbooks in Pure and Applied Mathematics, Chapman & Hall/CRC, 2006. [14] F. Halter-Koch, A generalization of Davenport’s constant and its arithmetical applications, Colloquium Mathematicum 63 (1992), 203-210. [15] G. Kemper, Separating invariants, J. Symbolic Computation 44 (2009), 1212-1222. 13 [16] F. Knop, On Noether’s and Weyl’s bound in positive characteristic, in ”Invariant Theory in All Characteristics”, (Ed.: H. E. A. Eddy Campbell and D. L. Wehlau), CRM Proceedings and Lecture Notes 35, Amer. Math. Soc., Providence, Rhode Island, pp. 175-188, 2004. [17] M. Kohls and H. Kraft, Degree bounds for separating invariants, Math. Res. Lett. 17 (2010), 1171-1182. [18] E. Noether, Der Endlichkeitssatz der Invarianten endlicher Gruppen, Math. Ann. 77 (1916), 89-92. [19] V. Popov, The constructive theory of invariants, Math. USSR Izvest. 10 (1982), 359-376. [20] B. J. Schmid, Finite groups and invariant theory, “Topics in Invariant Theory”, Lect. Notes in Math. 1478 (1991), 35-66. [21] M. Sezer, Sharpening the generalized Noether bound in the invariant theory of finite groups, J. Algebra 254 (2002), 252-263. [22] H. Weyl, The Classical Groups, Princeton University Press, Princeton, 1939. 14
0math.AC
arXiv:1710.00502v1 [math.ST] 2 Oct 2017 Bivariate Exponentiated Generalized Linear Exponential Distribution with Applications in Reliability Analysis Mohamed Ibrahim1 , M. S. Eliwa2,∗, M. El- Morshedy2 1 Department of Applied Statistics and Insurance, Faculty of Commerce, Damietta University, Damietta, Egypt. 2 Department of Mathematics, Faculty of Science, Mansoura University, Mansoura, Egypt. [email protected] [email protected] mah [email protected] Abstract The aim of this paper, is to define a bivariate exponentiated generalized linear exponential distribution based on Marshall-Olkin shock model. Statistical and reliability properties of this distribution are discussed. This includes quantiles, moments, stressstrength reliability, joint reliability function, joint reversed (hazard) rates functions and joint mean waiting time function. Moreover, the hazard rate, the availability and the mean residual lifetime functions for a parallel system, are established. One data set is analyzed, and it is observed that, the proposed distribution provides a better fit than Marshall-Olkin bivariate exponential, bivariate generalized exponential and bivariate generalized linear failure rate distributions. Simulation studies are presented to estimate both the relative absolute bias, and the relative mean square error for the distribution parameters based on complete data. Key words: Joint probability density function, Joint reversed (hazard) rates functions, Joint mean waiting time function, Simulation studies. 1 Introduction Sarhan et al. (2013) introduced exponentiated generalized linear exponential distribution (EGLED), which generalized a lot of probability distributions such as exponential (E), generalized exponential (GE), linear exponential (LE), generalized linear failure rate (GLFR), generalized linear exponential (GLE) distributions, among others. Furthermore, the EGLED provides more flexibility to analyze real data sets such as Leukemia data, drug data, among others. ∗ Corresponding author: [email protected] 1 In many scientific practical situations, multivariate lifetime data arise frequently, so it is important to consider different multivariate models that could be used to model such multivariate lifetime data. Such these models are interesting in several applications, such as reliability engineering, industrial engineering and computer systems. So, the aim of this paper is to introduce a bivariate exponentiated generalized linear exponential distribution (BEGLED) based on Marshall-Olkin shock model (1967), whose marginal distributions are EGLED. In the mentioned applications of the bivariate distribution, could be the lifetimes of two components, the magnitudes of stress and strength components and drought intensities. A lot of bivariate distributions based on Marshall-Olkin model are studied by many authors, see Sarhan and Balakrishnan (2007), Al- Khedhairi and El-Gohary (2008), Kundu and Gupta (2009), Sarhan et al. (2011), Kundu and Gupta (2013), Balakrishna and Shiji (2014), El-Gohary et al. (2016), Rasool and Akbar (2016) and El-Bassiouny et al. (2016). The random variable X is said to have EGLED(a, b, α, θ) if its CDF is θ  α FX (x) = 1 − e−η (x) ; x ≥ 0, (1) where η(x) = ax + 2b x2 , the parameters a, b ≥ 0 such that a + b > 0 and α, θ > 0. The parameters a and b are scale parameters, while α and θ are shape parameters. 2 The BEGLED and Its Marginal Functions Assume Ui ∼ EGLED(α, a, b, θi ), i = 1, 2, 3 are three independent random variables. Define Xk = max{Uk , U3 } ; k = 1, 2. So, the bivariate vector (X1 , X2 ) has the BEGLED with parameters vector Φ =(α, a, b, θ1 , θ2 , θ3 ). The joint CDF of (X1 , X2 ) is θ3 θ2  θ1   α α α , z = min(x1 , x2 ). 1 − e−η (z) 1 − e−η (x2 ) FX1 ,X2 (x1 , x2 ) = 1 − e−η (x1 ) (2) Also, we can get the joint PDF of (X1 , X2 ) as follows  if 0 < x1 < x2  f1 (x1 , x2 ) fX1 ,X2 (x1 , x2 ) = f2 (x1 , x2 ) if 0 < x2 < x1  f3 (x, x) if x1 = x2 = x, (3) where (x1 )+η α (x2 ))  1 − e−η α (x2 ) α−1 −(η α (x1 )+η α (x2 ))  1 − e−η α (x1 ) f1 (x1 , x2 ) = ϕ2 [η(x1 )η(x2 )]α−1 e−(η f2 (x1 , x2 ) = ϕ1 [η(x1 )η(x2 )] α e and f3 (x, x) = αθ3 (a + bx)η α−1 (x)e−η where 2 α (x)  1 − e−η α θ2 −1  1 − e−η α (x1 ) θ1 −1  1 − e−η α (x2 ) (x) θ1 +θ2 +θ3 −1 , θ1 +θ3 −1 , θ2 +θ3 −1 , ϕi = α2 θ i (θ 3−i + θ3 )(a + bx1 )(a + bx2 ) , i = 1, 2. On the other hand, the marginal CDFs for the BEGLED can be represented as follows θi +θ3  α , i = 1, 2. FXi (xi ) = 1 − e−η (xi ) (4) Therefore, we can get the marginal PDFs for the BEGLED as follows f (xi ) = α(θi + θ 3 )(a + bxi )η α−1 (xi )e−η 3 α (xi )  θi +θ3 −1 α 1 − e−η (xi ) , i = 1, 2. (5) Statistical Properties 3.1 The median of the BEGLED Domma (2009) presented the median correlation coefficient MX1 ,X2 as a form MX1 ,X2 = 4FX1 ,X2 (MX1 , MX2 ) − 1, (6) where MX1 and MX2 denote the median of X1 and X2 respectively. If X1 ∼ EGLED(α, a, b, θ1 + θ3 ) and X2 ∼ EGLED(α, a, b, θ2 + θ3 ) then   v u !# α1 " 1  ( θ +θ ) u 3 i 1 1  t i = 1, 2. MXi = −a + a2 + 2b − ln 1 − , b 2 So, the coefficient of median correlation between X1 and X2 is ( θ2 θ1 +θ3 α α 4 1 − e−η (MX2 ) 1 − e−η (MX1 ) −1 MX1 ,X2 =  θ2 +θ3 α α θ1 4 1 − e−η (MX1 ) 1 − e−η (MX2 ) −1 if x1 < x2 if x1 > x2 . (7) (8) Equation (8) can be used to generate a bivariate data. 3.2 The mathematical expectation We can derive the marginal expectation (rth moment) of Xi when Xi ∼ EGLED(α, a, b, θi + θ3 ) such that i = 1, 2 as follows E(Xir )= Z∞ xri fXi (xi )dxi , (9) 0 by using Equation (5), Maclaurin expansion, binomial expansion and gamma function, we get E(Xir ) = ∞ α−1 ∞ X XX j=0 k=0 l=0 where 3 (l) ζ j,k (a + bΘ)Γ(Θ), (10) (l) (l) ζ j,k = Θ = (−1)j ak Uj α (θi + θ 3 ) l! r + l + 2α − k − 1, and (l) Uj = 3.3  α−k−1    b α − 1 θ i + θ3 − 1 , 2 k j dl (exp(−(j + 1)η α (xi ) + xi ))|xi =0 . dxli The conditional probability density functions The conditional probability density function of Xi given Xj = xj , (i, j = 1, 2, i 6= j) is given by  (1)    fXi |Xj (xi | xj ) if xi > xj > 0 fXi |Xj (xi | xj ) = where (2) fXi |Xj (xi | xj )    f (3) (xi | xj ) Xi |Xj (1) | xj ) = αθi (a + bxi )η α−1 (xi )e−η (2) | xj ) = fXi |Xj (xi α (xi ) if xi = xj > 0, θi −1  α , 1 − e−η (xi ) α fXi |Xj (xi αθj (θ i + θ3 )(a + bxi )η α−1 (xi )e−η (xi ) 1 − e−η α (θj + θ3 )(1 − e−η (xj ) )θ3 and (3) fXi |Xj (xi | xj ) = (11) if xj > xi > 0 α  (xi ) θ i +θ3 −1 , iθi α θ3 h 1 − e−η (xi ) . θj + θ 3 Equation (11) can be getting by substituting from Equations (3) and (5) in the following relation fXi ,Xj (xi , xj ) fXi |Xj (xi | xj ) = , (i 6= j = 1, 2). (12) fXj (xj ) 3.4 The distributions of T = max(X1 , X2 ) and S = min(X1 , X2 ) In the mentioned applications X1 and X2 could be exchange rates in two time periods. So, it is important to get the distributions of T and S. If the bivariate vector (X1 , X2 ) has the BEGLED then FT (t) = = = P (max(X1 , X2 ) ≤ t) P (max(U1 , U3 ) ≤ t, max(U2 , U3 ) ≤ t) FEGLED (α, a, b, θ1 + θ 2 + θ 3 ). (13) Also, we can get the distribution of S as follows FS (t) = P (min(X1 , X2 ) ≤ t) = P (X1 < t) + P (X2 < t) − P (X1 < t, X2 < t, ) = FEGLED (α, a, b, θ1 + θ3 ) + FEGLED (α, a, b, θ2 + θ3 ) −FEGLED (α, a, b, θ1 + θ 2 + θ 3 ). 4 (14) 4 Reliability Properties In this section, we present the stress-strength reliability, the joint reliability function, the joint reversed (hazard) functions and the joint of mean waiting time function. Also, we present the hazard rate, the availability and the mean residual lifetime functions for a parallel system with two components. 4.1 Stress-strength reliability Let X1 is a random variable represents stress, and X2 is a random variable represents strength, and the random vector (X1 , X2 ) has the BEGLED then, the reliability function R is R = = = 4.2 P [X1 < X2 ] P (U1 < U3 < U2 ) + P (U3 < U1 < U2 ) θ2 + θ3 . θ1 + θ2 + 2θ3 (15) The joint reliability function Assume (X1 , X2 ) be two dimensional random variable with CDF FX1 ,X2 (x1 , x2 ), and the marginal functions are FX1 (x1 ) and FX2 (x2 ) then, the joint reliability function RX1 ,X2 (x1 , x2 ) is RX1 ,X2 (x1 , x2 ) = 1 − FX1 (x1 ) − FX2 (x2 ) + FX1 ,X2 (x1 , x2 ). (16) Assume the random vector (X1 , X2 ) has the BEGLED then, the joint reliability function of (X1 , X2 ) is given by   R1 (x1 , x2 ) if 0 < x1 < x2 R2 (x1 , x2 ) if 0 < x2 < x1 RX1 ,X2 (x1 , x2 ) = (17)  R3 (x, x) if x1 = x2 = x, where R1 (x1 , x2 ) = R2 (x1 , x2 ) = R3 (x, x) = θ2 +θ3 θ1 +θ3   α α − 1 − e−η (x2 ) 1 − 1 − e−η (x1 ) θ1 +θ3 θ2   α α , 1 − e−η (x1 ) + 1 − e−η (x2 ) θ2 +θ3 θ1 +θ3   α α − 1 − e−η (x2 ) 1 − 1 − e−η (x1 ) θ2 +θ3 θ1   α α , 1 − e−η (x2 ) + 1 − e−η (x1 ) θ2 +θ3 θ1 +θ3   α α − 1 − e−η (x) 1 − 1 − e−η (x)  θ1 +θ2 +θ3 α . + 1 − e−η (x) 5 4.3 4.3.1 The joint reversed (hazard) rate functions The joint hazard rate function and its marginal functions Assume (X1 , X2 ) be two dimensional random variable with PDF fX1 ,X2 (x1 , x2 ), and reliability function RX1 ,X2 (x1 , x2 ). Basu (1971) defined the bivariate hazard rate function as fX1 ,X2 (x1 , x2 ) h(x1 , x2 ) = . (18) RX1 ,X2 (x1 , x2 ) So, the bivariate hazard rate function for the random vector (X1 , X2 ) which has the BEGLED is  if 0 < x1 < x2  h1 (x1 , x2 ) (19) hX1 ,X2 (x1 , x2 ) = h2 (x1 , x2 ) if 0 < x2 < x1  h3 (x, x) if x1 = x2 = x, where h1 (x1 , x2 ) = h2 (x1 , x2 ) = ϕ2 [η(x1 )η(x2 )] α−1 −(η α (x1 )+η α (x2 )) e θ 1 +θ 3 1 − (Ψ(x1 )) ϕ1 [η(x1 )η(x2 )] e and h3 (x, x) = − (Ψ(x2 )) θ2 +θ3 αθ3 (a + bx)η α−1 (x)e−η α (x) (Ψ(x2 ))θ2 −1 (Ψ(x1 )) + (Ψ(x2 )) α−1 −(η α (x1 )+η α (x2 )) θ 1 +θ 3 1 − (Ψ(x1 )) − (Ψ(x2 )) θ2 +θ3 (Ψ(x1 )) θ2 (Ψ(x1 )) θ1 −1 + (Ψ(x1 )) θ1 θ1 +θ3 −1 θ1 +θ3 (Ψ(x2 )) (Ψ(x2 )) (Ψ(x))θ1 +θ2 +θ3 −1 1 − (Ψ(x))θ1 +θ3 − (Ψ(x))θ2 +θ3 + (Ψ(x))θ1 +θ2 +θ3 , θ2 +θ3 −1 θ2 +θ3 , , α where Ψ(.) = 1 − e−η (.) . Also, the marginal hazard rate functions hi (xi ), i = 1, 2 of the BEGLED are hi (xi ) = 4.3.2 α(θ i + θ3 )(a + bxi )η α−1 (xi )e−η 1 − (Ψ(xi )) α (xi ) θ i +θ3 −1 (Ψ(xi )) θi +θ3 , i = 1, 2. (20) The joint reversed hazard rate function and its marginal functions Assume (X1 , X2 ) be two dimensional random variable with CDF FX1 ,X2 (x1 , x2 ), the joint reversed hazard rate function is r(x1 , x2 ) = fX1 ,X2 (x1 , x2 ) . FX1 ,X2 (x1 , x2 ) (21) So, the joint reversed hazard rate function for the random vector (X1 , X2 ) which has the BEGLED is  if 0 < x1 < x2  r1 (x1 , x2 ) r2 (x1 , x2 ) if 0 < x2 < x1 rX1 ,X2 (x1 , x2 ) = (22)  r3 (x, x) if x1 = x2 = x, where 6 r1 (x1 , x2 ) = α−1 α α α−1 α α ϕ2 [η(x1 )η(x2 )] e−(η (x1 )+η (x2 ))   , α (x ) −η 2 1 − e−ηα (x1 ) 1−e ϕ [η(x1 )η(x2 )] e−(η (x1 )+η (x2 ))   r2 (x1 , x2 ) = 1 , α 1 − e−η (x2 ) 1 − e−ηα (x1 ) and r3 (x, x) = αθ3 (a + bx)η α−1 (x)e−η  1 − e−ηα (x) α (x) . Also, the marginal reversed hazard rate functions ri (xi ), i = 1, 2 to the BEGLED are 4.4 α(θ i + θ3 )(a + bxi )η α−1 (xi )e−η  ri (xi ) = 1 − e−ηα (xi ) α (xi ) , i = 1, 2. (23) The joint mean waiting time and its marginal functions The waiting time is closely related to important random variable reversed hazard rate function, which the failure occurs in the interval [0, t]. The observations of waiting times can be used for prediction the distribution function. So, one of the most important applications of the waiting time is to describe different maintenance strategies to any system. The joint mean waiting time function Mw (t1 , t2 ) is defined as follows Z t1 Z t2 1 F (x1 , x2 ) dx2 dx1 . (24) Mw (t1 , t2 ) = F (t1 , t2 ) 0 0 Assume the random vector (X1 , X2 ) has the BEGLED. Using Maclaurin and binomial expansions then, the joint mean waiting time function Mw (t1 , t2 ) is  if t1 > t2 > 0  Mw1 (t1 , t2 ) if 0 < t1 < t2 Mw2 (t1 , t2 ) Mw (t1 , t2 ) = (25)  if t1 = t2 = t, Mw3 (t, t) where Mwi (t1 , t2 ) =  (k) (k)   ∞ X gj ψ j 1 θ3−i + θ3 θi k+1 (t1 t2 ) ; i = 1, 2, 2 F (t1 , t2 ) j j ((k + 1)!) j,k=0 Mw3 (t, t) =  (k)  ∞ X (−1)j Qj θ1 + θ2 + θ3 k+1 1 t , j F (t, t) (k + 1)! j,k=0 and (k) gj = dk −jη α (x1 ) dk −jη α (x2 ) (k) = (e )| , ψ (e )|x2 =0 , x =0 1 j dxk1 dxk2 (k) Qj = dk −jη α (x) (e )|x=0 . dxk Also, the marginal mean waiting time functions mwi (t) for X1 and X2 can be written as: Z t 1 FXi (xi ) dxi mwi (t) = FXi (t) 0  (k)  ∞ X (−1)j g∗j θi + θ3 k+1 1 t ; i = 1, 2, (26) = j FXi (t) (k + 1)! j,k=0 7 where (k) g∗j = 4.5 dk −jη α (xi ) (e )|xi =0 . dxki The hazard rate, the availability and the mean residual lifetime functions for a parallel system Cox (1972) defined the joint hazard rate function as a vector, which is useful to calculate the total life span of a two component parallel system (2 − out − of − 2 : F ) as follows h(x∗ ) = (hX (x), h12 (x1 |x2 ), h21 (x2 |x1 )) , (27) where the first element h(x) in the vector h(x∗ ), gives the hazard function of the system using the information that both the component has survived beyond x, where X = min(X1 , X2 ). The second element h12 (x1 |x2 ), gives the hazard function span of the first component given that it has survived to an age x1 , and the other has failed at x2 . Similar argument holds for the third element h21 (x2 |x1 ). If (X1 , X2 ) is a BEGLE random vector, then the joint hazard rate function h(x∗ ) is α hX (x) = and α(θ 1 + θ 2 + θ 3 )(a + bx)η α−1 (x)e−η (x) 1 − e−η θ1 +θ2 +θ3 −1 1 − e−ηα (x) −1 θ3 α fX1 (x1 ) 1 − e−η (x1 ) h12 (x1 |x2 ) = θ1 1 − 1 − e−ηα (x1 ) h21 (x2 |x1 ) = fX2 (x2 ) 1 − e−η α  (x2 ) θ3 1 − 1 − e−ηα (x2 ) θ2 . α  (x) −1 , (28) (29) (30) Also, the joint availability function can be defined as a vector, which is useful to calculate the expected lifetime of a parallel system with two component as follows V (x∗ ) = (vX (x), v12 (x1 |x2 ), v21 (x2 |x1 )) , (31) where the first element v(x) in the vector V (x∗ ), gives the expected lifetime of the system using the information that both the component has survived beyond x, where X = min(X1 , X2 ). The second element v12 (x1 |x2 ), gives the expected lifetime span of the first component given that it has survived to an age x1 , and the other has failed at x2 . Similar argument holds for the third element v21 (x2 |x1 ). If (X1 , X2 ) is a BEGLE random vector, then the joint availability functionV (x∗ ) is 1 V (x) = A Z∞ yfX (y) dy; A = x Z∞ fX (y) dy , (32) x using Maclaurin expansion, binomial expansion and upper incomplete gamma function, we get ∞ α−1 ∞ X XX 1 (k) (33) ϑi,j (aΓ(α∗ , x) + b(Γ(α∗ + 1, x)). V (x) = θ +θ +θ 1 − (Ψ(x)) 1 2 3 i=0 j=0 k=0 8 Similarly, V12 (x1 |x2 ) = 1 B Z∞ yf (y, x2 ) dy; B = f (y, x2 ) dy, x1 > x2 , x1 x1 = Z∞ 1 θ1 1 − (Ψ(x1 )) α−1 X ∞ X (k) ξ i,j (aΓ(α∗ , x1 ) + b(Γ(α∗ + 1, x1 )), (34) j=0 i,k=0 and V21 (x2 |x1 ) = 1 C Z∞ yf (x1 , y) dy; C = x2 = Z∞ f (x1 , y) dy, x1 < x2 , x2 1 θ2 1 − (Ψ(x2 )) α−1 X ∞ X (k) Ωi,j (aΓ(α∗ , x2 ) + b(Γ(α∗ + 1, x2 )), (35) j=0 i,k=0 where (k) = (k) = Ωi,j (k) = α∗ = ϑi,j ξ i,j   (k)  j  b α − 1 θ1 + θ2 + θ3 − 1 (−1)i aα−j−1 Q∗i , k! 2 j i   (k)  j  b α − 1 θ1 − 1 (−1)i aα−j−1 Q∗i , αθ 1 k! 2 j i   (k)  j  (−1)i aα−j−1 Q∗i b α − 1 θ2 − 1 αθ 2 , k! 2 j i α + j + k + 1, α (θ1 + θ2 + θ3 ) and dk (exp(−(1 + i)η α (y) + y))|y=0 . dy k On the other hand, Asha and Jagathnath (2008) defined the joint mean residual lifetime m(x∗ ), which is useful to compute the mean residual lifetime (MRL) to two component in a parallel system, as follows (k) Q∗i = m(x∗ ) = (mX (x), m12 (x1 |x2 ), m21 (x2 |x1 )) , (36) ∗ where the first element m(x) in the vector m(x ), gives the MRL of the system using the information that both the component has survived beyond x ,where X = min(X1 , X2 ). The second element m12 (x1 |x2 ), gives the MRL span of the first component given that it has survived to an age x1 , and the other has failed at x2 . Similar argument holds for the third element m21 (x2 |x1 ). The joint MRL function related to the joint vitality function by the relationships mX (x) m12 (x1 |x2 ) = vX (x) − x , x > 0. = v12 (x1 |x2 ) − x1 , x1 > x2 . (37) (38) m21 (x2 |x1 ) = v21 (x2 |x1 ) − x2 , x1 < x2 . (39) So, If (X1 , X2 ) is a BEGLE random vector, then it is easy to get the vector m(x∗ ). 9 5 Maximum Likelihood Estimation (MLE) In this section, we want to estimate the unknown parameters of the BEGLED. We will use the maximum likelihood method. Suppose that (x11 , x21 ), (x12 , x22 ),..., (x1n , x2n ) is a sample of size n, from the BEGLED. We use the following notation I1 = {x1i < x2i }, I2 = {x1i > x2i }, I3 = {x1i = x2i = xi }, I = I1 ∪ I2 ∪ I3 , |I1 | = n1 , |I2 | = n2 , |I3 | = n3 , and |I| = n1 + n2 + n3 = n. Based on the observations, the likelihood function l(Φ) of this sample is l(Φ) = n1 Y f1 (x1i , x2i ) n2 Y f2 (x1i , x2i ) f3 (xi , xi ). (40) i=1 i=1 i=1 n3 Y Substituting from Equation (3) into Equation (40), the log-likelihood function L(Φ) can be written as L(Φ) = n1 n1 X  X ln(η(x1i )) ln(a + bx1i ) + (α − 1) n1 ln α2 θ 2 (θ1 + θ3 ) + i=1 i=1 + (θ1 + θ 3 − 1) n1 X i=1 +(α − 1) n1 X n1 n1  X  X α ln(a + bx2i ) η α (x1i ) + ln 1 − e−η (x1i ) − ln(η(x2i )) + (θ 2 − 1) ln 1 − e−η i=1 +n2 ln(α2 θ 1 (θ 2 + θ 3 )) + n2 X α (x2i ) ln(a + bx1i ) + (α − 1) n2 X i=1 +(α − 1) n2 X − − η α (x2i ) i=1 n2 X ln(η(x1i )) n2 n2  X  X α ln(a + bx2i ) η α (x1i ) + ln 1 − e−η (x1i ) − ln(η(x2i )) + (θ 2 + θ 3 − 1) n2 X i=1 α η (x2i ) + n3 ln αθ3 + n3 X   α ln 1 − e−η (x2i ) ln(a + bxi ) + (α − 1) n3 X i=1 n3 X ln(η(xi )) i=1 i=1 i=1 + (θ1 + θ 2 + θ 3 − 1) i=1 i=1 i=1 n2 X  i=1 i=1 +(θ1 − 1) i=1 n1 X i=1  n3   X α η α (xi ). ln 1 − e−η (xi ) − i=1 The first partial derivatives of Equation (41) with respect to α, a, b, θ1 , θ2 and θ 3 are 10 (41) ∂L ∂α n1 n1 X η α (x1i ) ln(η(x1i )) 2n1 X ln(η(x1i )) + (θ 1 + θ3 − 1) + α eηα (x1i ) − 1 i=1 i=1 = − n1 X η α (x1i ) ln(η(x1i )) + +(θ 2 − 1) +(θ 1 − 1) n2 X η α (x1i ) ln(η(x1i )) i=1 − i=1 n2 X e 1i ) ∂L ∂a = n1 X i=1 −α η (x2i ) ln(η(x2i )) + n3 X n2 X η α (x1i ) ln(η(x1i )) i=1 n2 X η α (x2i ) ln(η(x2i )) eηα (x2i ) − 1 ln(η(xi )) − n3 X η α (xi ) ln(η(xi )) i=1 i=1 n3 X η α (xi ) ln(η(xi )) n3 + (θ 1 + θ2 + θ3 − 1) α i=1 eηα (xi ) − 1 (42) , n1 n1 X X x1i 1 αx1i η α−1 (x1i ) + (α − 1) + (θ 1 + θ 3 − 1) a + bx1i η(x1i ) eηα (x1i ) − 1 i=1 i=1 n1 X x1i η α−1 (x1i ) + +(θ2 − 1) +(α − 1) n1 X 1 x2i + (α − 1) a + bx2i η(x 2i ) i=1 n1 X αx2i η α−1 (x2i ) i=1 n2 X i=1 n2 X n1 X i=1 i=1 + n2 X i=1 i=1 + − −1 ln(η(x1i )) + (θ2 + θ3 − 1) α η α (x2i ) ln(η(x2i )) 2n2 ln(η(x1i )) + α i=1 + eηα (x2i ) − 1 η α (x n1 X i=1 n1 X η α (x2i ) ln(η(x2i )) i=1 + ln(η(x2i )) − i=1 i=1 n2 X n1 X eηα (x2i ) −1 −α n1 X x2i η α−1 (x2i ) + i=1 n2 X n2 X i=1 1 a + bx1i n2 X αx1i η α−1 (x1i ) x1i x1i η α−1 (x1i ) + (θ 1 − 1) −α η(x1i ) eηα (x1i ) − 1 i=1 i=1 n2 n2 X X 1 x2i αx2i η α−1 (x2i ) + (α − 1) + (θ2 + θ3 − 1) a + bx2i η(x2i ) eηα (x2i ) − 1 i=1 i=1 i=1 n2 X −α i=1 x2i η α−1 (x2i ) + n3 X i=1 n3 X 1 αxi η α−1 (xi ) + (θ1 + θ2 + θ3 − 1) a + bxi eηα (xi ) − 1 i=1 n3 n3 X X xi xi η α−1 (xi ), +(α − 1) −α η(x ) i i=1 i=1 11 (43) ∂L ∂b = n1 X n i=1 n1 X + i=1 + n 1 1 x1i (x1i )2 α(x1i )2 η α−1 (x1i ) α−1X θ1 + θ3 − 1 X + + a + bx1i 2 i=1 η(x1i ) 2 eηα (x1i ) − 1 i=1 n1 n1 x2i α(x2i )2 η α−1 (x2i ) αX θ2 − 1 X − (x1i )2 η α−1 (x1i ) + a + bx2i 2 i=1 2 i=1 eηα (x2i ) − 1 n n n 2 1 1 X x1i α−1 X (x2i )2 αX (x2i )2 η α−1 (x2i ) + − 2 i=1 η(x2i ) 2 i=1 a + bx1i i=1 n n 2 2 α−1 X (x1i )2 α(x1i )2 η α−1 (x1i ) θ1 − 1 X + + 2 i=1 η(x1i ) 2 i=1 eηα (x1i ) − 1 − + + n2 n2 n2 X x2i αX (x2i )2 α−1 X (x1i )2 η α−1 (x1i ) + + 2 i=1 a + bx2i 2 i=1 η(x2i ) i=1 n2 n2 θ2 + θ 3 − 1 X α(x2i )2 η α−1 (x2i ) α X − (x2i )2 η α−1 (x2i ) ηα (x2i ) − 1 2 2 e i=1 i=1 n3 X i=1 n n n 3 3 (xi )2 α(xi )2 η α−1 (xi ) α−1 X θ1 + θ2 + θ3 − 1 X xi + + a + bxi 2 i=1 η(xi ) 2 eηα (xi ) − 1 i=1 3 αX − (xi )2 η α−1 (xi ), 2 i=1 ∂L ∂θ1 n = n 1 2  n    X X α α n1 2 ln 1 − e−η (x1i ) + ln 1 − e−η (x1i ) + + θ1 + θ3 i=1 θ1 i=1 + n3 X i=1 ∂L ∂θ2 (44)   α ln 1 − e−η (xi ) , (45) n = n 1 2     X α α n2 n1 X ln 1 − e−η (x2i ) + ln 1 − e−η (x2i ) + + θ2 θ2 + θ3 i=1 i=1 + n3 X i=1   α ln 1 − e−η (xi ) , (46) and ∂L ∂θ3 n n = 2 1  n   X  X α α n1 3 ln 1 − e−η (x2i ) + ln 1 − e−η (x1i ) + + θ1 + θ3 i=1 θ 3 i=1 n 3   X α n2 + ln 1 − e−η (xi ) . + θ 2 + θ 3 i=1 (47) By Equating the Equations (42-47) by zeros, we get the non-linear normal Equations. So, the solution has to be obtained numerically. 12 6 Data Analysis In this section, we have analyzed one bivariate real data set to explicate that the BEGLED can be a good lifetime model, comparing with Marshall-Olkin bivariate exponential distribution (MOBED), bivariate generalized exponential distribution (BVGED) and bivariate generalized linear failure rate distribution (BGLFRD). To make this comparison, we will use the log-likelihood values (L), Akaike information criterion (AIC), correct Akaike information criterion (CAIC), Hannan-Quinn information criterion (HQIC) and the likelihood ratio test (Λ). The data set in Table 1 has been obtained from Meintanis (2007). This data represents football (soccer) data of the UEFA Champion’s League data for the year 2004 : 2005 and 2005 : 2006. This data describes the games which satisfy the following two conditions: 1. At least one kick goal scored by any team have been considered. 2. The home team must be scored at least one goal. Note that, the kick goal is the goal which scored directly from foul kick, penalty kick or any other direct free kick. Here the variables X1 and X2 are as follows: X1 : represents the time in minutes of the first kick goal scored by any team. X2 : represents the first goal of any type scored by the home team. Table 1. The UEFA Champion’s League data for the year 2004 : 2005 and 2005 : 2006 X1 X2 2004 : 2005 Lyon : Real Madrid 26 20 Internazionale : Bremen Milan : Fenerbahce 63 18 Real Madrid : Roma Chelsea : Anderlecht 19 19 Man. United : Fenerbahce Club Brugge : Juventus 66 85 Bayern : Ajax Fenerbahce : PSV 40 40 Moscow : PSG Internazionale : Rangers 49 49 Barcelona : Shakhtar Panathinaikos : Bremen 8 8 Leverkusen : Roma Ajax : Arsenal 69 71 Arsenal : Panathinaikos Man. United : Benfica 39 39 Dynamo Kyiv : Real Madrid Real Madrid : Rosenborg 82 48 Man. United : Sparta Villarreal : Benfica 72 72 Bayern : M. TelAviv Juventus : Bayern 66 62 Bremen : Internazionale Club Brugge : Rapid 25 9 Anderlecht : Valencia Olympiacos : Lyon 41 3 Panathinaikos : PSV Internazionale : Porto 16 75 Arsenal : Rosenborg Schalke : PSV 18 18 Liverpool : Olympiacos Barcelona : Bremen 22 14 M. Tel-Aviv : Juventus Milan : Schalke 42 42 Bremen : Panathinaikos Rapid : Juventus 36 52 2005 : 2006. X1 X2 34 34 53 39 54 7 51 28 76 64 64 15 26 48 16 16 44 13 25 14 55 11 49 49 24 24 44 30 42 3 27 47 28 28 2 2 To analyze this data by the BEGLED, we fit at first the marginals X1 and X2 of the BEGLED separately one by one on this data. The following Tables obtain the MLEs, L, Anderson-Darling (A∗ ) and Cramér-Von Mises (W∗ ) values for the marginals X1 and X2 13 respectively for each model. Table 2. The MLE(s), L, A∗ , W ∗ values for X1 . Model E GE GLFR EGLE ∧ a 0.0245 0.0449 0.0052 0.0022 ∧ ∧ b 0.0009 0.0006 θ 3.119 1.302 0.492 ∧ α 1.897 -L 174.30 165.82 162.68 161.89 A∗ 0.5202 0.6171 0.2637 0.2530 W∗ 0.0686 0.0826 0.0399 0.0396 Table 3. The MLE(s), L, A∗ , W ∗ values for X2 . Model E GE GLFR EGLE ∧ a 0.0304 0.0413 0.0192 0.0172 ∧ ∧ b θ α – – – – 6 × 10−4 2 × 10−4 1.678 1.14 0.622 ∧ – – 1.705 -L 166.219 163.937 162.938 162.672 A∗ 0.3651 0.3859 0.2713 0.2640 W∗ 0.0549 0.0576 0.04478 0.0436 We can conclude that, the EGLE distribution fits the data better than E, GE and GLFR distributions for the marginals, because it has the smallest value among -L, A∗ and W∗ . Since, the E, GE and GLFR distributions are special cases from the EGLE distribution, we perform the following three testing of hypotheses for X1 and X2 separately: Test 1: H01 : α = 1, b = 0, θ = 1 (ED) against H11 : α 6= 1, b > 0, θ 6= 1 (EGLED). Test 2: H02 : α = 1, b = 0 (GED) against H12 : α 6= 1, b > 0 (EGLED). Test 3: H03 : α = 1 (GLFRD) against H13 : α 6= 1 (EGLED). The likelihood ratio test statistics (Λ), the degree of freedom (d.f) and the corresponding p-values for the three tests of hypotheses in case of X1 and X2 are presented in Tables 4 and 5 respectively. Table 4. The likelihood ratio test statistics, d.f and p-values for X1 . Model H◦ Λ d.f. p-values E α = 1, b = 0, θ = 1 24.824 3 0.00001681 GE α = 1, b = 0 7.846 2 0.01978166 GLFR α=1 1.576 1 0.20933780 Table 5. The likelihood ratio test statistics, d.f and p-values for X2 . Model H◦ Λ d.f. p-values E α = 1, b = 0, θ = 1 7.094 3 0.06896126 GE α = 1, b = 0 2.53 2 0.2822393 GLFR α=1 0.532 1 0.46576723 When the level of significance δ equals 0.05, it is clear that: 14 (a) The EGLED provides a significantly better fit in case of X1 and X2 compared to the ED. (b) The EGLED provides a significantly better fit in case of X1 compared to the GED. (c) The EGLED provides a better fit for X2 compared to the GED. (d) The EGLED provides a better fit in case of X1 and X2 compared to the GLFRD. On the other hand, after studying the marginals X1 and X2 , we fit the BEGLED on the UEFA Champion’s League data. The following tables obtain the MLEs, L, AIC, CAIC and HQIC values. Table 6. The MLEs and L values Model MOBE BVGE BGLFR BEGLE ∧ ∧ ∧ ∧ ∧ ∧ a b – – – 0.039 0.0002 0.0107 0.0008 2.711 θ1 0.012 1.351 0.492 0.00017 θ2 0.014 0.465 0.411 0.249 θ3 0.022 1.153 0.411 0.220 α – – 0.089 – -L 339.0 296.9 293.4 291.7 Table 7. The AIC, CAIC and HQIC values. Model MOBE BVGE BGLFR BEGLE AIC 684.0 601.9 596.8 595.4 CAIC 684.7 603.1 598.7 598.2 HQIC 685.8 604.1 599.6 598.8 It is clear that, the BEGLED provides a better fit than MOBE, BVGE and BGLFR distributions because it has the smallest value among -L, AIC, CAIC and HQIC. Since, the BVGE and BGLFR distributions are special cases from the BEGLED, then we perform the following two testing of hypotheses: Test 1: H02 : α = 1, b = 0 (BVGED) against H12 : α 6= 1, b > 0 (BEGLED). Test 2: H03 : α = 1 (BVGLFRD) against H13 : α 6= 1 (BEGLED). The likelihood ratio test statistics, d.f and p-values for the BVGE and the BGLFR distributions are given in the following Table. Table 8. The likelihood ratio test statistics, d.f and p-values. Model H◦ Λ d.f. p-values BVGE α= 1, b = 0 10.466 2 0.00533749 BGLFR α= 1 3.354 1 0.06704192 We note that the p-value is not large. So, we prefer the BEGLED for analyzing this data. 15 7 Simulation Study In this section, the MLE method is used to estimate the parameters α, a, b, θ1 , θ2 and θ3 of the BEGLED. The population parameters are generated using software ”Mathcad prime 3” package. The sampling distributions are obtained for different sample sizes n = [30, 50, 100, 200] from N = 1000 replications. This study presents an assessment of the properties of the MLE for the parameters in terms of bias, variance (Var), mean square error (MSE) and 95% confidence intervals (C.I), which be obtained in the following Tables. Table 9. The MLEs, Bias, Var, MSE and C.I values n parameter Estimate Bias Var 30 α = 1.5 1.529447 0.029447 0.0422195 a = 0.5 0.505473 0.005473 0.0050818 b = 0.7 0.711647 0.011647 0.0098601 θ1 = 0.8 0.913251 0.113251 0.2811745 θ2 = 1.2 1.300607 0.100607 0.3690383 θ3 = 1.3 1.35555 0.05555 0.2409224 50 α = 1.5 1.5125455 0.0125455 0.0249091 a = 0.5 0.4996033 −0.000396 0.0031267 b = 0.7 0.7016369 0.0016369 0.0059615 θ1 = 0.8 0.901861 0.101861 0.1651336 θ2 = 1.2 1.2920736 0.0920736 0.2386965 θ3 = 1.3 1.3579218 0.0579218 0.1491417 100 α = 1.5 1.5092043 0.0092043 0.011566 a = 0.5 0.5002042 0.0002042 0.0014805 b = 0.7 0.7015377 0.0015377 0.0028327 θ1 = 0.8 0.8486051 0.0486051 0.0765937 θ2 = 1.2 1.2433257 0.0433257 0.1115477 θ3 = 1.3 1.3260033 0.0260033 0.0700138 200 α = 1.5 1.5029588 0.0029588 0.0057007 a = 0.5 0.4999514 −.0000486 0.0007961 b = 0.7 0.700456 0.000456 0.0015143 θ1 = 0.8 0.8273891 0.0273891 0.0397173 θ2 = 1.2 1.2235063 0.0235063 0.0584567 θ3 = 1.3 1.3136215 0.0136215 0.0367075 16 MSE 0.0430866 0.0051117 0.0099958 0.2940002 0.37916 0.2440082 0.0250665 0.0031268 0.0059642 0.1755093 0.247174 0.1524966 0.0116508 0.0014805 0.0028351 0.0789561 0.1134248 0.0706899 0.0057094 0.0007961 0.0015145 0.0404674 0.0590093 0.036893 C.I (1.2060, 2.0056) (0.3717, 0.6442) (0.5353, 0.9118) (0.2862, 2.2053) (0.5189, 2.7853) (0.6489, 2.4833) (1.2673, 1.8829) (0.3929, 0.6071) (0.5624, 0.8559) (0.3843, 1.9003) (0.5865, 2.4482) (0.7602, 2.2375) (1.3322, 1.7394) (0.4263, 0.5754) (0.6049, 0.8093) (0.4596, 1.5080) (0.7225, 1.9904) (0.8795, 1.9229) (1.3728, 1.6699) (0.4468, 0.5564) (0.6319, 0.7807) (0.5076, 1.2493) (0.8101, 1.7279) (0.9755, 1.7035) Table 10. The MLEs, Bias, Var, MSE and n parameter Estimate Bias 30 α=2 1.8540053 −0.1459947 a = 0.2 0.2043051 0.0043051 b = 1.5 1.5124662 0.0124662 θ1 = 0.5 0.5857591 0.0857591 θ2 = 0.6 0.6827111 0.0827111 θ3 = 0.9 0.9424471 0.0424471 50 α=2 1.8900924 −0.1099076 a = 0.2 0.2016888 0.0016888 b = 1.5 1.5054807 0.0054807 θ1 = 0.5 0.5604422 0.0604422 θ2 = 0.6 0.657993 0.057993 θ3 = 0.9 0.9271563 0.0271563 100 α=2 1.9448174 −0.0551826 a = 0.2 0.2006911 0.0006911 b = 1.5 1.5025237 0.0025237 θ1 = 0.5 0.5351945 0.0351945 θ2 = 0.6 0.6309327 0.0309327 θ3 = 0.9 0.9152326 0.0152326 200 α=2 1.977254 −0.022746 a = 0.2 0.2002004 0.0002004 b = 1.5 1.5009306 0.0009306 θ1 = 0.5 0.5172642 0.0172642 θ2 = 0.6 0.6161236 0.0161236 θ3 = 0.9 0.9085774 0.0085774 C.I values Var 0.0861492 0.0047227 0.0168988 0.092056 0.108878 0.0855705 0.054245 0.0029133 0.0103271 0.0556656 0.0633326 0.0536466 0.0271835 0.0014431 0.0050839 0.0261092 0.0311299 0.0263485 0.0112714 0.0006825 0.0023884 0.0120296 0.014622 0.0124857 MSE 0.1074636 0.0047412 0.0170542 0.0994106 0.1157192 0.0873723 0.0663247 0.0029162 0.0103572 0.0593188 0.0666958 0.054384 0.0302286 0.0014436 0.0050903 0.0273479 0.0320867 0.0265805 0.0117888 0.0006825 0.0023893 0.0123276 0.014882 0.0125593 C.I (1.3579, 2.5402) (0.0793, 0.3422) (1.2850, 1.7882) (0.2091, 1.3758) (0.2713, 1.4742) (0.4933, 1.6119) (1.4403, 2.4056) (0.0983, 0.3127) (1.3217, 1.7219) (0.2489, 1.1597) (0.3180, 1.3028) (0.5486, 1.4589) (1.6074, 2.2876) (0.1273, 0.2765) (1.3686, 1.6470) (0.2977, 0.9242) (0.3745, 1.0547) (0.6396, 1.2798) (1.7652, 2.1946) (0.1481, 0.2525) (1.4047, 1.6006) (0.3456, 0.7748) (0.4252, 0.9035) (0.7099, 1.1482) From Tables 9 and 10, we note that the bias is reduced as the sample size is increased. 8 Conclusions In this paper, we have proposed a bivariate exponentiated generalized linear exponential distribution (BEGLED), whose marginals are exponentiated generalized linear exponential distributions. We discussed some statistical and reliability properties of the new distribution. Since the joint CDF and the joint PDF are in a closed form, therefore the BEGLED can be used in practice for non-negative and positively correlated random variables. The maximum likelihood estimates (MLE) of the six parameters index to the BEGLED are discussed. Moreover, a real data set is analyzed to show the usefulness of the proposed distribution. Also, the bias of the parameters is calculated using simulation studies. We hope our new distribution (BEGLED) might attract wider sets of applications in reliability analysis. References [1] Al-Khedhairi, A. and El-Gohary, A., (2008). A new class of bivariate Gompertz distributions and its mixture. International journal of mathematical analysis, 2(5), 235-253. 17 [2] Asha, G. and Jagathnath, K. M., (2008). Modeling and characterizations of a bivariate Pareto distribution. Stat and appli, 7(4), 435-452. [3] Balakrishna, N. and Shiji, K., (2014). On a class of bivariate exponential distributions. Statistics and probability letters, 85,153-160. [4] Basu, A. P., (1971). Bivariate failure rate. American statistics association, 66, 103-104. [5] Cox, D. R.,(1972). Regression models and life tables. Royal statistics society, 34, 187220. [6] Domma, F., (2009). Some properties of the bivariate Burr type III distribution. Statistics. DOI: 10.1080/02331880902986547. [7] El-Bassiouny, A. H., EL-Damcese, M., Abdelfattah, M. and Eliwa, M. S., (2016). Bivariate exponentaited generalized Weibull-Gompertz distribution. Journal of applied probability and statistics, 11(1), 25-46. [8] El-Gohary, A., El-Bassiouny, A. H. and El-Morshedy, M., (2016). Bivariate exponentiated modified Weibull extension distribution. J. stat. appl. pro, 5(1), 67-78. [9] Kundu, D. and Gupta, R. D., (2009). Bivariate generalized exponential distribution. Journal of multivariate analysis,100, 581-593. [10] Kundu, D. and Gupta, K., (2013). Bayes estimation for the Marshall-Olkin bivariate Weibull distribution. Journal of computational statistics and data analysis, 57(1), 271281. [11] Marshall, A. W. and Olkin, I., (1967). A multivariate exponential model. Journal of the American statistical association, 62, 30-44. [12] Meintanis, S. G., (2007). Test of fit for Marshall-Olkin distributions with applications. Journal of statistical planning and inference, 137, 3954-3963. [13] Rasool, R. and Akbar, A. J., (2016). On bivariate exponentiated extended Weibull family of distributions. Ciênciae Natura, Santa Maria, 38(2), 564-576. [14] Sarhan, A. and Balakrishnan, N., (2007). A new class of bivariate distributions and its mixture. Journal of multivariate analysis, 98,1508-1527. [15] Sarhan, A. M., Hamilton, D. C., Smith, B., and Kundu, D., (2011). The bivariate generalized linear failure rate distribution and its multivariate extension. Computational statistics and data analysis, 55(1),644-654. [16] Sarhan, A., Abd EL-Baset, A. A., Ibtesam, A. A., (2013). Exponentiated generalized linear exponential distribution. Applied mathematical modelling, 37, 2838-2849. 18
10math.ST
Submitted to the Annals of Statistics GAUSSIAN APPROXIMATION FOR THE SUP-NORM OF HIGH-DIMENSIONAL MATRIX-VARIATE U-STATISTICS AND ITS APPLICATIONS∗ arXiv:1602.00199v3 [math.ST] 30 Sep 2016 By Xiaohui Chen‡† University of Illinois at Urbana-Champaign‡ This paper studies the Gaussian approximation of high-dimensional and non-degenerate U-statistics of order two under the supremum norm. We propose a two-step Gaussian approximation procedure that does not impose structural assumptions on the data distribution. Specifically, subject to mild moment conditions on the kernel, we establish the explicit rate of convergence that decays polynomially in sample size for a high-dimensional scaling limit, where the dimension can be much larger than the sample size. We also supplement a practical Gaussian wild bootstrap method to approximate the quantiles of the maxima of centered U-statistics and prove its asymptotic validity. The wild bootstrap is demonstrated on statistical applications for high-dimensional non-Gaussian data including: (i) principled and data-dependent tuning parameter selection for regularized estimation of the covariance matrix and its related functionals; (ii) simultaneous inference for the covariance and rank correlation matrices. In particular, for the thresholded covariance matrix estimator with the bootstrap selected tuning parameter, we show that the Gaussian-like convergence rates can be achieved for heavy-tailed data, which are less conservative than those obtained by the Bonferroni technique that ignores the dependency in the underlying data distribution. In addition, we also show that even for subgaussian distributions, error bounds of the bootstrapped thresholded covariance matrix estimator can be much tighter than those of the minimax estimator with a universal threshold. 1. Introduction. Let X1 , · · · , Xn be a sample of independent and identically distributed (iid) random vectors in Rp with the distribution function F . Let B be a separable Banach space equipped with the norm k · k and h : Rp × Rp → B be a B-valued measurable and symmetric kernel function such that h(x1 , x2 ) = h(x2 , x1 ) for all x1 , x2 ∈ Rp and Ekh(X1 , X2 )k < ∞. Consider the U-statistics of order two  −1 X n (1) U= h(Xi , Xj ). 2 1≤i<j≤n ∗ First version: January 30, 2016. This version: October 4, 2016. Research partially supported by NSF grant DMS-1404891 and UIUC Research Board Award RB15004. † 1 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 2 CHEN The main focus of this paper is to study the asymptotic behavior of the random variable kU − EU k in the high-dimensional setup when p := p(n) → ∞. Since the introduction of U-statistics by Hoeffding [28], their limit theorems have been extensively studied in the classical asymptotic setup where n diverges and p is fixed [29, 26, 51, 2, 57, 24, 30, 31]. Recently, due to the explosive data enrichment, regularized estimation and dimension reduction of high-dimensional data have attracted a lot of research attentions such as covariance matrix estimation [6, 7, 22, 14], graphical models [20, 56, 9], discriminant analysis [38], factor models [23, 34], among many others. Those problems all involve the consistent estimation of an expectation of U-statistics of order two E[h(X, X0 )], where X and X0 are two independent random vectors in Rp with the distribution F . Below are two examples. P Example 1.1. The sample covariance matrix Ŝ = (n − 1)−1 ni=1 (Xi − P X̄)(Xi − X̄)> , where X̄ = n−1 ni=1 Xi is the sample mean vector, is an unbiased estimator of the covariance matrix Σ = Cov(X). Then Ŝ is a matrix-valued U-statistic of form (1) with the unbounded kernel (2) 1 h(x1 , x2 ) = (x1 − x2 )(x1 − x2 )> 2 for x1 , x2 ∈ Rp . Example 1.2. The covariance matrix Σ quantifies the linear dependency in X = (X1 , · · · , Xp )> . The rank correlation is another measure for the nonlinear dependency in a random vector. For m, k = 1, · · · , p, (Xm , Xk ) 0 , X 0 ) are said to be concordant if (X − X 0 )(X − X 0 ) > 0. Let and (Xm m k m k k (3) hmk (x1 , x2 ) = 2 · 1{(x1m − x2m )(x1k − x2k ) > 0} and h(x1 , x2 ) = {hmk (x1 , x2 )}pm,k=1 . Kendall’s tau rank correlation coefficient matrix T = {τmk }pm,k=1 can be written as a U-statistic with the bounded kernel hmk in (3) τmk  −1 n = 2 X hmk (Xi , Xj ) − 1. 1≤i<j≤n 0 )(X − X 0 ) > 0), Then, (τmk + 1)/2 is an unbiased estimator of P((Xm − Xm k k 0 , X 0 ) are concordant. i.e. the probability that (Xm , Xk ) and (Xm k In this paper, we are interested in the following central questions: how does the dimension impact the asymptotic behavior of U-statistics and how can we make statistical inference when p → ∞? Motivation of this paper imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 3 comes from the estimation and inference problems for large covariance matrix and its related functionals [42, 56, 49, 46, 55, 10, 7, 14, 15]. To establish rate of convergence for the regularized estimators or to study the `∞ -norm Gaussian approximations in high-dimensions, a key issue is to characterize the supremum norm of U − EU . Therefore, as the primary concern of the current paper, we shall consider B = Rp×p and khk = max1≤m,k≤p |hmk |. Our first main contribution is to provide a Gaussian approximation scheme for the high-dimensional non-degenerate U-statistics under the sup-norm. Different from the central limit theorem (CLT) type results for the maxima of sums of iid random vectors [16], which are directly approximated by the Gaussian counterparts with the matching first and second moments, approximating the sup-norm of U-statistics is more subtle because of its dependence and nonlinearity. Here, we propose a two-step Gaussian approximation method in Section 2. In the first step, we approximate the U-statistics by the leading component of a linear form in the Hoeffding decomposition (a.k.a. the Hájek projection); in the second, the linear term is further approximated by the Gaussian random vectors. To approximate the distribution of the sup-norm of U-statistics by a linear form, a maximal moment inequality is developed to control the nonlinear and canonical, i.e. completely degenerate, form of the reminder term. Then the linear projection is handled by the recent development of Gaussian approximation in high-dimensions [16, 59, 58]. Explicit rate of convergence of the Gaussian approximation for high-dimensional U-statistics is established for unbounded kernels subject to sub-exponential and uniform polynomial moment conditions. Specifically, under either moment conditions, we show that the same convergence rate that decays polynomially in sample size as in the Gaussian approximation for the maxima of sums of iid random vectors is attained and the validity of the Gaussian approximation is proved for a high-dimensional scaling limit, where p can be much larger than n. The second contribution of this paper is to propose a Gaussian wild boot√ strap procedure for approximating the quantiles of nkU − EU k. Since the (unobserved) linear projection terms of the centered U-statistics depend on the unknown underlying data distribution F and there is a nonlinear remainder term, we use an additional estimation step beyond the Gaussian approximation. Here, we employ the idea of decoupling and estimate the linear projection on an independent dataset. Validity of the Gaussian wild bootstrap is established under the same set of assumptions in the Gaussian approximation results. One important feature of the Gaussian approximation and the bootstrap procedure is that no structural assumptions on the distribution F are required and the strong dependence in F is allowed, imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 4 CHEN which in fact helps the Gaussian and bootstrap approximation. In Section 4, we demonstrate the capability of the proposed bootstrap method applied to a number of important high-dimensional problems, including the datadependent tuning parameter selection in the thresholded covariance matrix estimator and the simultaneous inference of the covariance and Kendall’s tau rank correlation matrices. Two additional applications for the estimation problems of the sparse precision matrix and the sparse linear functionals are given in the Supplemental Materials (SM). In those problems, we show that the Gaussian like convergence rates can be achieved for non-Gaussian data with heavy-tails. For the sparse covariance matrix estimation problem, we also show that the thresholded estimator with the tuning parameter selected by the bootstrap procedure can gain potentially much tighter performance bounds over the minimax estimator with a universal threshold that ignores the dependency in F [7, 14, 11]. To establish the Gaussian approximation result and the validity of the bootstrap method, we have to bound the the expected sup-norm of the second-order canonical term in the Hoeffding decomposition of the U-statistics and establish its non-asymptotic maximal moment inequalities. An alternative simple data splitting approach by reducing the U-statistics to sums of iid random matrices can give the exact rate for bounding the moments in the non-degenerate case [52, 40, 32, 21]. Nonetheless, the reduction to the iid summands in terms of data splitting does not exploit the complete degeneracy structure of the canonical term and it does not lead to the convergence result in the Gaussian approximation for the non-degenerate U-statistics; see Section 5.1 for details. In addition, unlike the Hoeffding decomposition approach, the data splitting approximation is not asymptotically tight in distribution and therefore it is less useful in making inference of the highdimensional U-statistics. P Notations and definitions. For a vector x, we use |x|1 = j |xj |, P 2 1/2 |x| := |x|2 = ( j xj ) , and |x|∞ = maxj |xj | to denote its entry-wise `1 , P `2 , and `∞ norms, respectively. For a matrix M , we use |M |F = ( i,j Mij2 )1/2 and kM k2 = max|a|=1 |M a| to denote its Frobenius and spectral norms, respectively. Denote a ∨ b = max(a, b) and a ∧ b = min(a, b). We shall use K, K0 , K1 , · · · to denote positive finite absolute constants, and C, C 0 , C0 , C1 , · · · and c, c0 , c0 , c1 , · · · , to denote positive finite constants whose values do not depend on n and p and may vary at different places. We write a . b if a ≤ Cb for some constant C > 0, and a  b if a . b and b . a. For a random variable X, we write kXkq = (E|X|q )1/q for q > 0. We use khk = max1≤m,k≤p |hmk | and khk∞ = supx1 ,x2 ∈Rp kh(x1 , x2 )k. Throughimsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 5 out the paper, we write Xn1 = (X1 , · · · , Xn ) and let X and X0 be two independent random vectors in Rp with the distribution F , which are independent of Xn1 . We write Eh = E[h(X, X0 )] and Eg = Eg(X), where g(x) = E[h(x, X0 )]−Eh and x ∈ Rp . For a matrix-valued kernel h : Rp ×Rp → Rp×p , we say that: (i) h is non-degenerate w.r.t. F if Var(gmk (X)) > 0 for all m, k = 1, · · · , p; (ii) h is canonical or completely degenerate w.r.t. F if E[hmk (x1 , X0 )] = E[hmk (X, x2 )] = E[hmk (X, X0 )] = 0 for all m, k = 1, · · · , p and for all x1 , x2 ∈ Rp . Without loss of generality, we shall assume throughout the paper that p ≥ 3 and the matrix h = {hmk }pm,k=1 is symmetric, i.e. hmk = hkm . 2. Gaussian approximation. In this section, we study the Gaussian approximation for max1≤m,k≤p (Umk − EUmk ) in (1), or equivalently the approximation for the sup-norm of the centered U-statistics by considering U − EU and −U + EU . If Xi ’s are non-Gaussian, a seemingly intuitive method would be generating Gaussian random vectors Yi ’s by matching the first and second moments of Xi ; i.e. to approximate U by U 0 = n −1 P 1≤i<j≤n h(Yi , Yj ). However, empirical evidence suggests that this 2 may not be a good approximation and theoretically it seems that the nonlinearity in U and U 0 accounts for a statistically invalid approximation. To illustrate this point, we simulate n = 200 iid observations from the p-variate elliptic t-distribution in (66) with mean zero and degree of freedom ν = 8 in the SM. We consider the covariance matrix kernel (2) as an example. For p = 40, the P-P plot of the empirical cdfs of the sup-norm of the centered covariance matrices made from Xi and Yi is shown in Figure 1 (left) over 5000 simulations. To correct the bias, a closer inspection reveals that U is an approximately linear statistic and its linear projection part in the Hoeffding decomposition is the leading term. This motivates us to propose a two-step approximation method. Let (4) (5) g(x1 ) = Eh(x1 , X0 ) − Eh, f (x1 , x2 ) = h(x1 , x2 ) − Eh(x1 , X0 ) − Eh(X, x2 ) + Eh. Clearly, f is a B-valued symmetric and canonical U-statistic of order two w.r.t. the distribution F . Then the Hoeffding decomposition of the kernel h is given by (6) h(x1 , x2 ) = f (x1 , x2 ) + g(x1 ) + g(x2 ) + Eh, imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 6 1.0 0.8 0.6 0.4 0.2 0.0 0.0 0.2 0.4 Z Y 0.6 0.8 1.0 CHEN 0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 X 0.6 0.8 1.0 X Fig 1. P-P plots of the sup-norm approximation for the centered sample covariance matrix U − EU with the kernel (2) by U 0 − EU 0 (left) and by the leading term in the Hoeffding decomposition of U − EU (right). from which we have U − EU = 2 n(n − 1) n X f (Xi , Xj ) + 2X g(Xi ). n i=1 1≤i<j≤n On the right-hand side of the last expression, the second term is expected to be the leading term (a.k.a. the Hájek projection) and the first term to be negligible under the sup-norm. Therefore, we can reasonably expect that √ n n 1 X (U − EU ) ≈ √ g(Xi ), 2 n i=1 P where the latter can be further approximated by n−1/2 ni=1 Zi for iid Gaussian random vectors Zi ∼ N (0, Γg ) and Γg is the positive-definite covariance matrix of g(Xi ); c.f. [16]. Denote p0 = p(p + 1)/2. Here, we slightly abuse notations and write g̃i = vech(g(Xi )) as the half-vectorized lower triangular matrix of g(Xi ) by columns. Therefore Γg = Cov(g̃i ) is the p0 × p0 covariance matrix indexed by ((j, k), (m, l)) such that j ≥ k and m ≥ l. Similarly, we shall use Zi to denote either the p × p matrix or the p0 × 1 half-vectorized version. For the previous elliptic t-distribution example, we plotPthe empirical cdfs of max1≤m,k≤p (Ŝmk − σmk )/2 against max1≤m,k≤p n−1 ni=1 Zi,mk . Figure 1 (right) shows a much better approximation using the leading term in the Hoeffding decomposition. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 7 P P √ Let T = n(U −EU )/2, L = n−1/2 ni=1 g(Xi ), W = n−1/2 (n−1)−1 1≤i<j≤n f (Xi , Xj ), P and Z = n−1/2 ni=1 Zi , where Zi are iid N (0, Γg ). Denote T̄0 = maxm,k Tmk , L̄0 = maxm,k Lmk , and Z̄0 = maxm,k Zmk . Let ρ(T̄0 , Z̄0 ) = sup |P(T̄0 ≤ t) − P(Z̄0 ≤ t)| t∈R be the Kolmogorov distance between T̄0 and Z̄0 . Let Bn ≥ 1 be a sequence of real numbers possibly tending to infinity. We consider two types of conditions on the kernel moments. First, we establish the explicit convergence rate for the kernels with sub-exponential moments; e.g. the ε-contaminated normal distribution (65) in the SM. Theorem 2.1 (Gaussian approximation for centered U-statistics: sub– exponential kernel). Let U be a non-degenerate U-statistic of order two. Assume that there exist constants C1 , C2 ∈ (0, ∞) and K ∈ (0, 1) such that 2 ≥ C and (GA.1) Kernel moment: Egmk 1 (7) max E(|hmk |2+` /Bn` ) ∨ E[exp(|hmk |/Bn )] ≤ 2 `=0,1,2 for all 1 ≤ m, k ≤ p; (GA.2) Scaling limit: Bn2 log7 (pn) ≤ C2 n−K . n Then there exists a constant C > 0 depending only on C1 , C2 such that (8) (9) ρ(T̄0 , Z̄0 ) ≤ Cn−K/8 . The assumptions in Theorem 2.1 have meaningful interpretations. (GA.1) ensures the non-degeneracy of the Gaussian approximation and that the truncation does not lose too much information due to the sub-exponential tails. (GA.2) describes the high-dimensional scaling limit of valid Gaussian approximation range. In the high-dimensional context, the dimension p grows with the sample size n and the distribution function F also depends on n. Therefore, Bn is allowed to increase with n. Theorem 2.1 shows that the approximation error in the Kolmogorov distance converges to zero even if p can be much larger than n and no structural assumptions on F are required. In particular, Theorem 2.1 applies to kernels with the subexponential distribution such that khmk kq ≤ Cq for all q ≥ 1, in which case Bn = O(1) and the dimension p is allowed to have a subexponential growth rate in the sample size n, i.e. p = O(exp(n(1−K)/7 )). Condition (GA.1) also covers bounded kernels khk∞ ≤ Bn , where Bn may increase with n. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 8 CHEN Remark 1. Theorem 2.1 shows that the asymptotic validity of Gaussian approximation for centered non-degenerate U-statistics holds under the high-dimensional scaling limit (GA.2), which involves only a polynomial factor of log p. However, the sup-norm convergence rate n−K/8 obtained in (9) is slower than n−1/2 . Similar observations have been made in the existing literature on the Berry-Esseen type bounds [47, 3] for the normalized sums of iid random vectors Xi ∈ Rp with mean zero and the identity covariance ma√ trix. [47] showed that the sample mean nX̄ has the asymptotic normality √ if p = o( n) and [3] showed that √ sup |P( nX̄ ∈ A) − P(Z ∈ A)| ≤ Kp1/4 E|X1 |3 /n1/2 , A∈A where A is the class of all convex subsets in Rp , Z ∼ N (0, Idp ), and K > 0 is an absolute constant. In either case, the dependence of the CLT rate on the dimension p is polynomial (p/n1/2 and p7/4 /n1/2 , resp). [16] considered the √ Gaussian approximation for maxj≤p nX̄j and they obtained the rate n−c for some (unspecified) exponent c > 0. Following the proofs of Theorem 2.1 in the current paper and Theorem 2.2 and Corollary 2.1 in [16], we can show that c is allowed to take the value K/8. Therefore, the effect of higher-order terms than the Hájek projection to a linear subspace in the Hoeffding decomposition vanishes in the Gaussian approximation. A similar observation is made for the uniform polynomial moment kernels; c.f. Theorem 2.2. For multivariate symmetric statistics of order two, to the best of our knowledge, the Gaussian approximation result (9) with the explicit convergence rate is new. When p is fixed, the rate of convergence and the Edgeworth expansion of such statistics can be found in [5, 25, 4]. In those papers, assuming the Cramér condition on g(X1 ) and suitable moment conditions on h(X1 , X2 ), the Edgeworth expansion of U-statistics was established for the univariate case (p = 1) with remainder o(n−1/2 ) or O(n−1 ) [5, 4] and the multivariate case (p > 1 fixed) with remainder o(n−1/2 ) [25]. In the latter work [25], it is unclear that how the constant in the error bound depends on the dimensionality parameter p. On the contrary, our Theorem 2.1 can allow p to be larger than n in order to obtain the CLT type results in much higher dimensions. Next, we consider kernels with uniform polynomial moments (up to the fourth order); e.g. the elliptical t-distribution (66) in the SM. Theorem 2.2 (Gaussian approximation for centered U-statistics: kernel with uniform polynomial moment). Let U be a non-degenerate U-statistic of order two. Assume that there exist constants C1 , C2 ∈ (0, ∞) and K ∈ (0, 1) such that imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 9 2 ≥ C and (GA.1’) Kernel moment: Egmk 1 (10) max E(|hmk |2+` /Bn` ) ∨ E[(khk/Bn )4 ] ≤ 1 `=0,1,2 for all 1 ≤ m, k ≤ p; (GA.2’) Scaling limit: Bn4 log7 (pn) ≤ C2 n−K . n (11) Then there exists a constant C > 0 depending only on C1 , C2 such that (9) holds. Theorem 2.1 and 2.2 allow us to approximate the quantiles of T̄0 by those of Z̄0 , with the knowledge of Γg . In practice, the covariance matrix Γg and the Hájek projection terms g(Xi ), i = 1, · · · , n, depend on the data distribution F , which is unknown. Thus, quantiles of Z̄0 need to be estimated in real applications. However, we shall see in Section 3 that Theorem 2.1 and 2.2 can still be used to derive a feasible resampling based method to approximate the quantiles of Gaussian maxima Z̄0 and therefore T̄0 . 3. Wild bootstrap. The main purpose of this section is to approximate the quantiles of T̄0 . Let X01 , · · · , X0n be an independent copy of X1 , · · · , Xn that are observed; call this training data. Such data can always be obtained by a half-sampling or data splitting on the original data. Therefore, we assume that the sample size of total data {X1 , · · · , Xn , X01 , · · · , X0n } is 2n. Since g(Xi ), i = 1, · · · , n, are unknown, we construct an estimator for it. Let ĝi := ĝi (X1 , · · · , Xn , X01 , · · · , X0n ) be an estimator of g(Xi ) using the original and training data. Recall that g(x) = Eh(x, X0j ) − Eh(X0i , X0j ) for any fixed x ∈ Rp , which can be viewed as the population version for the second variable X0j . Therefore, we build an empirical version as our estimator of g(Xi ). Specifically, we consider (12)  −1 n 1X n 0 ĝi = h(Xi , Xj ) − n 2 j=1 X h(X0j , X0l ). 1≤j<l≤n Conditional on Xi , ĝi is an unbiased estimator of g(Xi ). It is interesting to view ĝi as a decoupled estimator of g(Xi ). Let n L̂∗0 1 X = max √ ĝi,mk ei 1≤m,k≤p n i=1 n and L̄∗0 1 X = max √ gmk (Xi )ei , 1≤m,k≤p n i=1 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 10 CHEN where e1 , e2 , · · · are iid standard Gaussian random variables that are also independent of X1 , · · · , Xn , X01 , · · · , X0n . Then L̂∗0 and L̄∗0 are bootstrapped versions of L̄0 . Denote the conditional quantiles of L̂∗0 and L̄∗0 given the data X1 , · · · , Xn , X01 , · · · , X0n as aL̂∗ (α) = inf{t ∈ R : Pe (L̂∗0 ≤ t) ≥ α}, 0 aL̄∗0 (α) = inf{t ∈ R : Pe (L̄∗0 ≤ t) ≥ α}, where Pe is the probability taken w.r.t. e1 , · · · , en . Now, we can compute the conditional quantile aL̂∗ (α) by the Gaussian wild bootstrap method. 0 Specifically, aL̂∗ (α) can be numerically approximated by resampling on the 0 multiplier Gaussian random variables e1 , · · · , en and we wish to use aL̂∗ (α) 0 to approximate the quantiles of T̄0 . Theorem 3.1 (Asymptotically validity of Gaussian wild bootstrap for centered U-statistics). Let U be a non-degenerate U-statistic of order two. (i) (Subexponential kernel) If (GA.1) and (GA.2) hold for some constants C1 , C2 ∈ (0, ∞) and K ∈ (0, 1), then there exist a constant C > 0 depending only on C1 , C2 such that for all α ∈ (0, 1) (13) |P(T̄0 ≤ aL̂∗ (α)) − α| ≤ Cn−K/8 . 0 (ii) (Uniform polynomial kernel) If (GA.1’) and (GA.2’) hold for some constants C1 , C2 ∈ (0, ∞) and K ∈ (0, 1), then there exist a constant C > 0 depending only on C1 , C2 such that for all α ∈ (0, 1) (14) |P(T̄0 ≤ aL̂∗ (α)) − α| ≤ Cn−K/12 . 0 Remark 2. From Theorem 3.1, the convergence rate of the wild bootstrap approach for subexponential kernels is the same as the Gaussian approximation results (Theorem 2.1), while it is slower for kernels with uniform polynomial moment of the order four (Theorem 2.2). The major error in the latter case is due to the estimation of L̄∗0 by L̂∗0 in the wild bootstrap. Under (GA.1’) and (GA.2’), the approximation error of L̂∗0 for L̄∗0 is on the order O(n−1/4 Bn (log(np))1/2 ); see Lemma C.7 in the SM. This is different from the previous work [16], which does not need this extra estimation P step for g(Xi ), i = 1, · · · , n, since only sums of iid random vecn −1/2 tors n i=1 Xi are involved. Therefore, for sums of iid random vectors, the wild bootstrap can attain the rate n−K/8 for both subexponential and uniform polynomial moment (of the order four) observations. However, with better moment conditions on the U-statistic kernel, the rate n−K/8 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 11 can be attained for polynomial moment kernels. Specifically, assuming that max`=0,1,2 E(|hmk |2+` /Bn` ) ∨ E[(khk/Bn )q ] ≤ 1 for q ≥ 8, one can show that the convergence rate (13) is attained. In addition, [16] does not deal with the higher-order nonlinear terms, here we have to explicitly handle the canonical part W in the Hoeffding decomposition. The degeneracy structure plays a key role to establish the convergence of the bootstrap method (as well as the Gaussian approximation results in Section 2) and new proof techniques, in particular the decoupling, are required. The established moment bounds in Section 5.1 are especially suitable for controlling the completely degenerate errors of quadratic forms. To assess the quality of the Gaussian wild bootstrap, we show two examples for the covariance matrix kernel on the ε-contaminated normal distribution (65) with the sub-exponential moment and on the elliptic t-distribution (66) with the uniform polynomial moment. In each simulation, we generate 200 bootstrap samples for L̂∗0 . Then, we estimate P(T̄0 ≤ aL̂∗ (α)) for the 0 whole range of probabilities α ∈ [0.01, 0.99]. Figure 2 shows the empirical approximation result. Here, we choose V = 0.9×1p 1> p +0.1×Idp in (65) and (66), where 1p is the p×1 vector of all ones. From Figure 2, the bootstrap approximation seems to be better in the sub-exponential moment case than in the polynomial moment case; see (GA.1)+(GA.2) versus (GA.1’)+(GA.2’). More simulation examples can be found in the SM. 4. Statistical applications. In this section, we present two statistical applications for the theoretical results established in Section 2–3. Two additional examples can be found in the SM. Here, for P notational convenience, we rescale L̂∗0 and let L̂∗0 = 2n−1 max1≤m,k≤p | ni=1 ĝi,mk ei |. Recall that Γg = Cov(g̃i ), where gi = vech(g(Xi )). 4.1. Tuning parameter selection for the thresholded covariance matrix estimator. Consider the problem of sparse covariance matrix estimation. Let r ∈ [0, 1) and p n o X G(r, C0 , ζp ) = Σ ∈ Rp×p : σmm ≤ C0 , |σmk |r ≤ ζp for all m = 1, · · · , p k=1 be the class of sparse covariance matrices in terms of the strong `r -ball. Here, C0 > 0 is a constant and ζp > 0 may grow with p. Let τ ≥ 0 and Σ̂(τ ) = {ŝmk 1{|ŝmk | > τ }}pm,k=1 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 12 CHEN Wild bootstrap 0.8 0.6 0.0 0.0 0.2 0.4 Bootstrap approximation 0.6 0.4 0.2 Bootstrap approximation 0.8 1.0 1.0 Wild bootstrap 0.0 0.2 0.4 0.6 alpha 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 alpha Fig 2. Plots of the estimated probabilities P(T̄0 ≤ aL̂∗ (α)) by the Gaussian wild bootstrap 0 for the range of α ∈ [0.01, 0.99]. Left is the ε-contaminated normal distribution (model: (M1)+(D1) in the SM) and right is the elliptical t-distribution (model: (M2)+(D1)). Sample size n = 200 and dimension p = 40. be the thresholded sample covariance matrix estimator of Σ. The class G(r, C0 , ζp ) was introduced in [7] and the high-dimensional properties of Σ̂(τ ) were analyzed in [7] for iid sub-Gaussian data and in [14, 15] for heavy-tailed time series with algebraic tails. In both scenarios, the rates of convergence were obtained with the Bonferroni (i.e. union bound) technique and one-dimensional concentration inequalities. Those performance bounds of the thresholded estimator Σ̂(τ ) critically depend on the tuning parameter τ . The ideal choice of the threshold for establishing the rate of convergence under the spectral and Frobenius norms is τ = kŜ − Σk, whose distribution depends on the unknown underlying data distribution F . In the problem of the high-dimensional sparse covariance matrix estimation, data-dependent tuning parameter selection is often empirically done with the cross-validation (CV) and its theoretical properties largely remain unknown. High probability bounds of τ are given in [7, 14]. Here, we provide a principled and data-dependent way to determine the threshold τ . Definition 4.1 (Subgaussian random variable). A random variable X is said to be subgaussian with mean zero and variance factor ν 2 , if √ (15) E[exp(X 2 /ν 2 )] ≤ 2. Denote X ∼ subgaussian(ν 2 ). In particular, if X ∼ N (0, σ 2 ), then X ∼ imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 13 subgaussian(4σ 2 ). √ The upper bound 2 in (15) is not essential and it is chosen for conveniently comparing with kXkψ2 , which is the Orlicz norm of X for ψ2 (x) = exp(x2 ) − 1 and x ≥ 0. In general, the variance factor for a subgaussian random variable is not equivalent to the variance. For a sequence of random variables Xn , n = 1, 2, · · · , if Xn ∼ subgaussian(ν√2 ) and σ 2 = Var(Xn ), then by Markov’s inequality, we always have σ 2 ≤ 2ν 2 , while ν 2 may depend on n and it may diverge at faster rate than σ 2 such as σ 2 ≤ C0 and ν 2 → ∞ as n → ∞. As a simple example, let an > 0 be a sequence of real numbers such that an → ∞ and consider random variables X1 , · · · , Xn such that P(Xn = ±an ) = (2a2n )−1 and P(Xn = 0) = 1 − (2a2n )−1 . Obviously, EXn = 0 and Var(Xn ) = 1. Let ν 2 = Ca2n for √ some constant C > 0. Then C −1 ≤ e E[exp(Xn2 /ν 2 )] = [1 − (2a2n )−1 ] + a−2 2 for all large enough n; i.e. n 2 Xn ∼ subgaussian(Can ). In fact, if X ∼ subgaussian(ν 2 ), then ν 2 ≥ kXkψ2 . Therefore, we are mainly interested in the general case when ν 2 := νn2 → ∞ as n → ∞ in the statistical applications. Theorem 4.1 (Adaptive threshold selection by wild bootstrap: subgaussian observations). Let ν ≥ 1 and Xi be iid mean zero random vectors such that Xik ∼ subgaussian(ν 2 ) for all k = 1, · · · , p and Σ ∈ G(r, C0 , ζp ). Suppose that there exist constants Ci > 0, i = 1, · · · , 4, such that {Γg }(j,k),(j,k) ≥ C1 , kX1k k4 ≤ C2 , kX1k k6 ≤ C3 ν 1/3 and kX1k k8 ≤ C4 ν 1/2 for all j, k = 1, · · · , p. Let β ∈ (0, 1) and τ∗ = β −1 aL̂∗ (1 − α), where the bootstrap samples are 0 generated with the covariance matrix kernel in (2). If ν 4 log7 (np) ≤ C5 n1−K for some K ∈ (0, 1), then we have   r  3 + 2β β kΣ̂(τ∗ ) − Σk2 ≤ (16) + ζp aL̂∗ (1 − α)1−r , 0 β 1−r 1−β   r  2 4 + 3β β (17) p−1 |Σ̂(τ∗ ) − Σ|2F ≤ 2 +2 ζp aL̂∗ (1 − α)2−r , 2−r 0 β 1−β with probability at least 1 − α − Cn−K/8 for some constant C > 0 depending only on C1 , · · · , C5 . In addition, we have E[aL̂∗ (1 − α)] ≤ C 0 (log(p)/n)1/2 0 and (18) E[τ∗ ] ≤ C 0 β −1 (log(p)/n)1/2 , where C 0 > 0 is a constant depending only on α and C1 , · · · , C5 . imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 14 CHEN Remark 3 (Comments on the conditions in Theorem 4.1). The nondegeneracy condition {Γg }(j,k),(j,k) ≥ C1 is quite mild in Theorem 4.1. Consider the multivariate cumulants of the joint distribution of the random vector X = (X1 , · · · , Xp )> following a distribution F in Rp . Let χ(t) = E[exp(ιt> X)] be the characteristic function of X, where t = (t1 , · · · , tp )> ∈ √ Rp and ι = −1. Then, the multivariate cumulants κ12···p r1 r2 ···rp of the joint distribution of X are the coefficients in the expansion log χ(t) = ∞ X r1 ,r2 ,··· ,rp =0 κ12···p r1 r2 ···rp (ιt1 )r1 (ιt2 )r2 · · · (ιtp )rp . r1 !r2 ! · · · rp ! For the covariance matrix kernel (2), we have (19) {Γg }(j,k),(m,l) = (κjkml 1111 + σjm σkl + σjl σkm )/4, jkjk where κjkml 1111 is the fourth-order cumulants of F . Therefore, if κ1111 ≥ C for some (large) constant C > 0 depending only on C0 and C1 , then {Γg }(j,k),(j,k) ≥ C1 for Σ ∈ G(r, C0 , ζp ). For data following distributions in the elliptic family [43, Chapter 1], the condition {Γg }(j,k),(j,k) ≥ C1 is equivalent to min1≤j≤p σjj ≥ C for some constant C > 0 depending only on C1 . To see this, for F in the elliptic family [43, Chapter 1], it is known that κjkml 1111 = κ(σjk σml + σjm σkl + σjl σkm ), where the kurtosis parameter κ = [1 + ε(ν 4 − 1)]/[1 + ε(ν 2 − 1)]2 − 1 for the ε-contaminated normal distribution in (65) and κ = 2/(ν − 4) for the elliptic t-distribution in (66). For the elliptic t-distribution with ν = 8 (as consid2 )/8. Therefore, ered in Figure 1), we have {Γg }(j,k),(j,k) = (3σjj σkk + 4σjk {Γg }(j,k),(j,k) ≥ C1 if and only if there exists a constant C > 0 such that σjj ≥ C for all j = 1, · · · , p. Similar comments apply to the ε-contaminated normal distribution. The assumption σkk ≤ C0 in Theorem 4.1 is redundant and it is automatically fulfilled under a slightly stronger condition kX1k k4 ≤ C2 . Conditions on the growth rate on kX1k k` , ` = 4, 6, 8, are also not restrictive. Consider the special case for the multivariate Gaussian distribution Xi ∼ N (0, Σ) such that σkk ≤ C0 . Then X1k are subgaussian(4C0 ) and max`=4,6,8 kX1k k` ≤ C for some constant C > 0 depending only on C0 . Therefore, if the data follow the Gaussian distribution, then the bootstrapped thresholded covariance matrix estimator Σ̂(τ∗ ) attains (16) and (17) when p = O(exp(n(1−K)/7 )). However, we shall emphasize that, for Σ ∈ G(r, C0 , ζp ), although the diagonal entries in Σ are uniformly bounded by a constant C0 , we do allow ν 2 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 15 to grow with n in the subgaussian distribution, in which case the bootstrap approach can have advantages over the non-adaptive minimax thresholding procedure (see the paragraphs below for more detailed discussions). There are a number of interesting features ofPTheorem 4.1. Consider r = 0; i.e. Σ is truly sparse such that max1≤m≤p pk=1 1{σmk 6= 0} ≤ ζp for Σ ∈ G(0, C0 , ζp ). Then we can take β = 1 and the convergence rates are kΣ̂(τ∗ ) − Σk2 ≤ 6ζp aL̂∗ (1 − α) and 0 p−1 |Σ̂(τ∗ ) − Σ|2F ≤ 18ζp aL̂∗ (1 − α)2 . 0 Hence, the tuning parameter can be adaptively selected by bootstrap samples while the rate of convergence is nearly optimal in the following sense. Since the distribution of τ∗ mimics that of τ , Σ̂(τ∗ ) achieves the same convergence rate as the thresholded estimator Σ̂(τ ) for the oracle choice of the threshold τ with probability at least 1 − α − Cn−K/8 . On the other hand, the bootstrap method is not fully equivalent to the oracle procedure in terms of the constants in the estimation error bounds. Suppose that we know the support Θ of Σ, i.e. locations of the nonzero entries in Σ. Then, the oracle estimator is simply Σ̆ = {ŝmk 1{(m, k) ∈ Θ}}pm,k=1 and we have kΣ̆ − Σk2 ≤ max m≤p p X |ŝmk − σmk |1{(m, k) ∈ Θ} k=1 ≤ kŜ − Σk max m≤p p X 1{(m, k) ∈ Θ} = τ ζp . k=1 Therefore, the constant of the convergence rate for the bootstrap method does not attain the oracle estimator. However, we shall comment that β is not a tuning parameter since it does not depend on F and the effect of β only appears in the constants in front of the convergence rates (16) and (17). Assuming that the observations are subgaussian(ν 2 ) and the variance factorpν 2 is a fixed constant, it is known that the threshold value τ∆ = C(ν) log(p)/n achieves the minimax rate for estimating the sparse covariance matrix [11]. Compared with the minimax optimal tuning parameter τ∆ , our bootstrap threshold τ∗ exhibits several advantages which we shall highlight (with stronger side conditions). First, τ∆ is non-adaptive since the constant C(ν) > 0 depends on the underlying distribution F through ν 2 and it is more conservative than the bootstrap threshold τ∗ in view of (18). The reason is that the minimax lower bound is based on the worst case analysis and the matching upper bound is obtained by the union bound which ignores the dependence structures in F . On the contrary, τ∗ takes into account the dependence information of F by conditioning on the observations. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 16 CHEN Second, the bootstrap threshold τ∗ does not need the knowledge of ν 2 and it allows ν 2 to increase with n and p. In this case, the universal thresholding p rule τ∆ = C 0 ν log(p)/n even for Σ ∈ G(r, C0 , ζp ), in which the variances σkk , k = 1, · · · , p, are uniformly bounded by a constant. In contrast, from (18), the bootstrap threshold τ∗ = OP ((log(p)/n)1/2 ), where the constant of OP (·) depends only on α, β, C1 , · · · , C5 . Therefore τ∗ = oP (τ∆ ) as ν 2 → ∞ and τ∗ can potentially gain much tighter performance bounds than τ∆ . One exception for ruling out the increasing ν 2 when maxk≤p σkk ≤ C0 is the Gaussian distribution Xi ∼ N (0, Σ). However, the main focus of this paper is the statistical estimation and inference for high-dimensional non-Gaussian data and therefore the Gaussian example is not so interesting here. Third, as we shall demonstrate in Theorem 4.2, the Gaussian type convergence rate of the bootstrap method in Theorem 4.1 remains valid even for heavy-tailed data with polynomial moments. Specifically, we have the following result. Theorem 4.2 (Adaptive threshold selection by wild bootstrap: uniform polynomial moment observations). Let Xi be iid mean zero random vectors such that k max1≤k≤p |X1k |k8 ≤ ν and Σ ∈ G(r, C0 , ζp ). Suppose that there exist constants Ci > 0, i = 1, · · · , 4, such that {Γg }(j,k),(j,k) ≥ C1 , kX1k k4 ≤ C2 , kX1k k6 ≤ C3 ν 1/3 and kX1k k8 ≤ C4 ν 1/2 for all j, k = 1, · · · , p. Let β ∈ (0, 1) and τ∗ = β −1 aL̂∗ (1−α), where the bootstrap samples are generated 0 with the covariance matrix kernel in (2). If ν 8 log7 (np) ≤ C5 n1−K for some K ∈ (0, 1), then (16) and (17) hold with probability at least 1 − α − Cn−K/12 for some constant C > 0 depending only on C1 , · · · , C5 . In addition, (18) holds for some constant C 0 > 0 depending only on α and C1 , · · · , C5 . From Theorem 4.2, the subgaussian assumption on F is not essential: for the non-Gaussian data with heavier tails than subgaussian, the thresholded covariance matrix estimator with the threshold selected by the wild bootstrap approach again attains the Gaussian type convergence rate at the asymptotic confidence level 100(1 − α)%. In particular, the dimension p may still be allowed to increase subexponentially fast in the sample size n. The cost of the heavy-tailed distribution F is only a sacrifice of the convergence rate from n−K/8 to n−K/12 . However, as commented in Remark 2, this gap becomes smaller and eventually vanishes for stronger moment conditions (here, we need q ≥ 16). Next, we compare Theorem 4.2 with the threshold obtained by the union bound approach. Assume that E|X1k |q < ∞ for q ≥ 8. By the Nagaev imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 17 inequality [44] applied to the split sample in Remark 4, one can show that τ] = Cq n p4/q  log p 1/2 o ξ + ξ4 , q n n1−2/q where ξq = max kX1k kq , 1≤k≤p is the right threshold that gives a large probability bound for τ = kŜ − Σk. For q = 8, we see that τ∗ = oP (τ] ) when n1/2 = o(p). Therefore, in high dimensional settings, the bootstrap method adapts to the dependence in F and gives better convergence rate under the spectral and Frobenius norms. Moreover, for observations with polynomial moments, the minimax lower bound is currently not available to justify τ] . 4.2. Simultaneous inference for covariance and rank correlation matrices. Another related important problem of estimating the sparse covariance matrix Σ is the consistent recovery of its support, i.e. non-zero off-diagonal entries in Σ [33]. Towards this end, a lower bound of the minimum signal strength (Σ-min condition) is a necessary condition to separate the weak signals and true zeros. Yet, the Σ-min condition is never verifiable. To avoid this undesirable condition, we can alternatively formulate the recovery problem as a more general hypothesis testing problem (20) H0 : Σ = Σ0 versus H1 : Σ 6= Σ0 , where Σ0 is a known p × p matrix. In particular, if Σ0 = Idp×p , then the support recovery can be re-stated as the following simultaneously testing problem: for all m, k ∈ {1, · · · , p} and m 6= k, (21) H0,mk : σmk = 0 versus H1,mk : σmk 6= 0. The test statistic we construct is T̄0 = kŜ − Σ0 koff , which is an `∞ type statistic by taking the maximum magnitudes on the off-diagonal entries. Then H0 is rejected if T̄0 ≥ aL̂∗ (1 − α). 0 Corollary 4.3 (Asymptotic size of the simultaneous test: subgaussian observations). Let ν ≥ 1 and Xi be iid mean zero random vectors such that Xik ∼ subgaussian(ν 2 ) for all k = 1, · · · , p. Suppose that there exist constants Ci > 0, i = 1, · · · , 4, such that {Γg }(j,k),(j,k) ≥ C1 , kX1k k4 ≤ C2 , kX1k k6 ≤ C3 ν 1/3 and kX1k k8 ≤ C4 ν 1/2 for all j, k = 1, · · · , p. Let β ∈ (0, 1) and τ∗ = β −1 aL̂∗ (1 − α), where the bootstrap samples are generated with 0 the covariance matrix kernel in (2). If ν 4 log7 (np) ≤ C5 n1−K for some K ∈ (0, 1), then the above test based on T̄0 for (20) has the size α+O(n−K/8 ); i.e. the family-wise error rate of the simultaneous test problem (21) is asymptotically controlled at the level α. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 18 CHEN From Corollary 4.3, the test based on T̄0 is asymptotically exact of size α for subgaussian data. A similar result can be established for observations with polynomial moments. Due to the space limit, the details are omitted. [12] proposed a similar test statistic for comparing the two-sample large covariance matrices. Their results (Theorem 1 in [12]) are analogous to Corollary 4.3 in this paper in that no structural assumptions in Σ are needed in order to obtain the asymptotic validity of both tests. However, we shall note that their assumptions (C.1), (C.2), and (C.3) on the non-degeneracy are stronger than our condition {Γg }(j,k),(j,k) ≥ C1 . For subgaussian observations Xik ∼ subgaussian(ν 2 ), (C.3) in [12] assumed that min1≤j≤k≤p sjk /ν 4 ≥ c for some constant c > 0, where sjk = Var(X1j X1k ). If ν 2 → ∞, then [12, Theorem 1] requires that sjk for all j, k = 1, · · · , p have to obey a uniform lower bound that diverges to infinity. For the covariance matrix kernel, since g(x) = (xx> − Σ)/2, we only need that minj,k sjk ≥ c for some fixed lower bound. Next, we comment that a distinguishing feature of our bootstrap test from the `2 test statistic [13] is that no structural assumptions are made on F and we allow for the strong dependence in Σ. For example, consider again the elliptic distributions with the positive-definite V = %1p 1> p + (1 − %)Idp×p such that the covariance matrix Σ is proportion to V . Then, we have tr(V 4 ) = p[1 + (p − 1)%2 ]2 + p(p − 1)[2% + (p − 2)%2 ]2 , tr(V 2 ) = %2 p2 + (1 − %2 )p. For any % ∈ (0, 1), tr(V 4 )/tr2 (V 2 ) → 1 as p → ∞. Therefore, the limiting distribution of the `2 test statistic in [13] is no longer normal and its asymptotic distribution remains unclear. Finally, the covariance matrix testing problem (20) can be generalized further to nonparametric forms which can gain more robustness to outliers and the nonlinearity in the dependency structures. Let U = E[h(X1 , X2 )] be the expectation of the random matrix associated with h and U0 be a known p × p matrix. Consider the testing problem H0 : U = U0 versus H1 : U 6= U0 . Then, the test statistic can be constructed as T̄0 = kU − U0 k (or T̄00 = kU − U0 koff ) and H0 is rejected if T̄0 ≥ aL̂∗ (1 − α) (or T̄00 ≥ aL̂∗ (1 − α)), 0 0 where the bootstrap samples are generated w.r.t. the kernel h. The above test covers Kendall’s tau rank correlation matrix as a special case where h is the bounded kernel defined in (3). imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 19 Corollary 4.4 (Asymptotic size of the simultaneous test for Kendall’s tau correlation matrix). Let Xi be iid random vectors following the distribution F in Rp . Suppose that there exists a constant C1 > 0 such that {Γg }(j,k),(j,k) ≥ C1 for all j, k = 1, · · · , p. Let β ∈ (0, 1) and τ∗ = β −1 aL̂∗ (1− 0 α), where the bootstrap samples are generated with Kendall’s tau rank correlation matrix kernel in (3). If log7 (np) ≤ C2 n1−K for some K ∈ (0, 1), then the test based on T̄00 has the size α + O(n−K/8 ). Therefore, the asymptotic validity of the bootstrap test for large Kendall’s tau rank correlation matrix is obtained when log p = o(n1/7 ) without imposing structural and moment assumptions on F . 5. Proofs of the main results. The rest of the paper is organized as follows. In Section 5.1, we first present a useful inequality for bounding the expectation of the sup-norm of the canonical U-statistics and then compare with an alternative simple data splitting bound by reducing to the moment bounding exercise for the sup-norm of sums of iid random matrices. We shall discuss several advantages of using the U-statistics approach by exploring the degeneracy structure. Section 5.2 contains the proofs of the main results on Gaussian approximation and Section 5.3 proves the convergence rate of the Gaussian wild bootstrap. Proofs of the statistical applications are given in Section 5.4. Additional proofs and technical lemmas are given in the SM. 5.1. A maximal inequality for canonical U-statistics. Before proving our main results, we first establish a maximal inequality of the canonical Ustatistics of order two. The derived expectation bound is useful in controlling the size of the nonlinear and completely degenerate error term in the Gaussian approximation. Theorem 5.1 (Expectation bound for canonical U-statistics). Let f : Rp × Rp → Rp×p be a P symmetric and canonical U-statistic kernel of or−1 der two and V = n2 1≤i<j≤n f (Xi , Xj ) such that Ekf (X1 , X2 )k < ∞. n 0 Let X 1 be an independent copy of Xn1 , M = max1≤i<j≤n (kf (Xi , Xj )k ∨ kf (Xi , X0j )k), Dq = max1≤m,k≤p (E|fmk |q )1/q for q > 0. If 2 ≤ p ≤ exp(bn) for some absolute constant b > 0, then there exists an absolute constant K > 0 such that n log p 3/2  log p 5/4 o log p (22) EkV k ≤ K(1 ∨ b1/2 ) kM k4 + D2 + D4 . n n n Note that Theorem 5.1 is non-asymptotic. As immediate consequences of Theorem 5.1, we can derive the rate of convergence of EkV k with kernels under the subexponential and uniform polynomial moment conditions. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 20 CHEN Corollary 5.2 (Kernel with subexponential moment). Let Bn be a sequence of positive reals and f be a symmetric and canonical kernel. Suppose that (23) max E [exp(|fmk |/Bn )] ≤ 2 1≤m,k≤p and 2 ≤ p ≤ exp(bn) for some absolute constant b > 0. Then, there exists a constant C(b) > 0 such that (24) EkV k ≤ C(b)Bn {n−3/2 (log p)3/2 log(np) + n−1 log p}. Corollary 5.3 (Kernel with uniform polynomial moment). Let q ≥ 4 and Bn , Bn0 be two sequences of positive reals. Let f be a symmetric and canonical kernel. Suppose that (25) E(kf k/Bn )q + max E(|fmk |/Bn0 )4 ≤ 1 1≤m,k≤p and 2 ≤ p ≤ exp(bn) for some absolute constant b > 0. Then, there exists a constant C(b) > 0 such that (26) EkV k ≤ C(b){Bn n−1 (log p)3/2 + Bn0 n−1 log p}. Remark 4 (Comparison of Theorem 5.1 with sums of iid random matrices). For the U -statistic taking values in a Banach space B (here, we consider B = Rp×p ), its expected norm can also be bounded by the expected norm of sums of iid random matrices. Assume that Ekf (X1 , X2 )k < ∞ and let m = [n/2] be the largest integer no greater than n/2. As noted in [29], we can write (27) m 1 X X m(V − EV ) = [f (Xπn (2i−1) , Xπn (2i) ) − Ef ], n! all πn i=1 P where the summation all πn is taken over all possible permutations πn : {1, · · · , n} → {1, · · · , n}. By Jensen’s inequality and the iid assumption of Xi , we have (28) EkV − EV k ≤ m X 1 E [f (Xi , Xi+m ) − Ef ] , m i=1 which can be viewed as a data splitting method into two halves. Under condition (23), it follows from Bernstein’s inequality [54, Proposition 5.16] that p (29) EkV − EV k ≤ K1 Bn ( log(p)/n + log(p)/n). imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 21 So if log p ≤ bn1−ε for some ε ∈ (0, 1), then EkV −EV k ≤ C(b)Bn (log(p)/n)1/2 . There are three advantages of using the U-statistics approach in Theorem 5.1 over the data splitting method into iid summands (28) and (29). For the canonical kernel, EV = 0. First, we can obtain from (24) that EkV k ≤ C(b)Bn {n1−5ε/2 + n−3/2ε (log n) + n−ε }. Therefore, sharper rate is obtained by (24) when ε ∈ (1/2, 1) which covers the regime of valid Gaussian approximation and bootstrap. Under the scaling limit for the Gaussian approximation validity, i.e. Bna log7 (np)/n ≤ Cn−K2 for some K2 ∈ (0, 1), where a = 2 for the subexponential moment kernel and a = 4 for the uniform polynomial moment kernel, it is easy to see that log p ≤ log(np) ≤ Cn(1−K2 )/7 so we can take ε = (6 + K2 )/7. Second and more importantly, the rate of convergence obtained by the Bernstein bound (29) does not lead to a convergence rate for the Gaussian approximation and the bootstrap method. Following the argument of proving Theorem 5.5, one can only show with (29) that for any γ ∈ (0, 1) and `n = log(np/γ) ≥ 1 3 2 1/4 1/2 −1/2 3/2 ρ(T̄0 , Z̄0 ) . n−1/8 `7/8 + `1/2 `n u(γ) + γ, n (D̃3 + D̃4 ) n Bn + n where the second term on the right-hand side does not converge to zero and u(γ) is defined in the proof of Theorem 5.5. The reason is that, although (29) is rate-exact for non-degenerate U-statistics, where the dependence of the rate in (29) on the sample size is O(Bn n−1/2 ), it is not strong enough √ to control the size of the nonlinear correction term Ek nV k when p → ∞ √ (recall that W = nV ). On the contrary, our bound in Theorem 5.1 exploits the degeneracy structure of V and the dependence of the rate in (22) on the sample size is O(Bn n−1 + kM kn−3/2 ). Therefore, Theorem 5.1 is more mathematically appealing in the degenerate case. Third, the reduction to sums of iid random matrices in (28) does not give tight asymptotic distributions in order to make inference on the nondegenerate U-statistics. To illustrate this point, we consider the case p = 1 and let Xi be iid mean zero random variables with variance σ 2 . Let ζ12 = Var(g(X1 )) and ζ22 = Var(h(X1 , X2 )). Assume that ζ12 > 0. So ζ12 is the variance of the leading projection term used in the Gaussian approximation √ D and by Jensen’s inequality ζ12 ≤ ζ22 . Note that n(U − EU ) → N (0, 4ζ12 ) [51, p P D Theorem A, page 192] and by the CLT 2/m m i=1 [f (Xi , Xi+m ) − Ef ] → N (0, 2ζ22 ). Since in general ζ22 6= 2ζ12 , the limiting distribution of the Ustatistic is not the same as that in the data splitting method in view of imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 22 CHEN (27). For example, consider the non-degenerate covariance kernel h(x1 , x2 ) = −1 P 4 (x1 − x2 )2 /2 w.r.t. F and U = n2 1≤i<j≤n h(Xi , Xj ). Denote µ4 = EX1 and g(x1 ) = (x21 −σ 2 )/2. Then, ζ22 = (µ4 +σ 4 )/2 and ζ12 = (µ4 −σ 4 )/4 so that ζ22 > 2ζ12 when σ 2 > 0. In particular, if Xi are iid N (0, σ 2 ), then µ4 = 3σ 4 , 4ζ12 = 2σ 4 , and 2ζ22 = 4σ 4 . Therefore, even though (29) gives better rate in the non-degenerate case, the reduction by splitting the data into the iid summands is not optimal for the Gaussian approximation purpose, which is the main motivation of this paper. In fact, ζ22 serves no purpose in the √ limiting distribution of n(U − EU ). 5.2. Proof of results in Section 2. Let β > 0 and for Z ∈ Rp×p Fβ (Z) = β −1 log( p X exp(βZmk )) m,k=1 be the smooth-max function for approximating Z̄0 = max1≤m,k≤p Zmk . Denote πmk (Z) = ∂mk Fβ (Z) as the first-order partial derivative w.r.t. Zmk and Cb3 (R) the space of all bounded functions that are three times continuously differentiable on R with supt∈R |∂ q f (t)| < +∞ for q = 0, 1, 2, 3. Let λ0 : R → [0, 1] be such that: (i) λ0 ∈ Cb3 (R) and sups∈R |∂ q λ0 (s)| ≤ K0 for some absolute constant K0 > 0 and for q = 0, 1, 2, 3; (ii) λ0 (s) = 1 if s ≤ 0 and λ0 (s) = 0 if s ≥ 1. Let eβ = 2β −1 log p and for any t ∈ R, let λ(s) = λ0 (ψ(s − t − eβ )) for ψ > 0. Then sups∈R |∂ q λ(s)| ≤ K0 ψ q for q = 0, 1, 2, 3. Here, β and ψ are smoothing parameters for approximating the max and indicator functions, respectively. In particular, we have Z̄0 ≤ Fβ (Z) ≤ Z̄0 + eβ (30) for all Z ∈ Rp×p , (31) 1(s ≤ t + eβ ) ≤ λ(s) ≤ 1(s ≤ t + eβ + ψ −1 ) for all s, t ∈ R. Define D̃q = max (E|gmk |q )1/q , 1≤m,k≤p Dq = max (E|hmk |q )1/q . 1≤m,k≤p Clearly D̃q ≤ Dq for q ≥ 1. Let 2 2 ux (γ) = inf{u ≥ 0 : P(gmk (Xi ) ≤ u2 Egmk for all m, k, i) ≥ 1 − γ} and uz (γ) be similarly defined with gmk (Xi ) replaced by Zi,mk , where Zi follow iid N (0, Γg ). Put u(γ) = ux (γ) ∨ uz (γ). To prove Theorem 2.1 and 2.2, we first need a smoothing lemma. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 23 √ √ Lemma 5.4. Let u > 0, γ ∈ (0, 1). Assume that c0 ≤ D̃2 ≤ C0 , 8uD̃2 β/ n ≤ 1 and u ≥ u(γ). Then we have p (32) ρ(T̄0 , Z̄0 ) ≤ C1 [(ψEkW k + ∆v ) + (eβ + ψ −1 ) 1 ∨ log(pψ)], where p (33) ∆v = n−1/2 (ψ 3 +ψ 2 β +ψβ 2 )D̃33 +(ψ 2 +ψβ)ϕ̄(u)+ψ ϕ̄(u) log(p/γ)+γ and ϕ̄(u) = C2 u−1 D̃42 . Here, C1 , C2 > 0 are constants only depending on c0 and C0 . Theorem 5.5 (Rate of convergence for Gaussian approximation). Let γ ∈ (0, 1) and `n = log(pn/γ) ≥ 1. Assume c0 ≤ D̃2 ≤ C0 and 2 ≤ p ≤ exp(bn) for some absolute constants c0 , C0 , b > 0. Then, there exists a constant C > 0 depending only on c0 , C0 , and b such that n 1/2 1/2 3 2 1/4 ρ(T̄0 , Z̄0 ) ≤ C n−1/8 `7/8 + n−1/2 `n kM k4 + n−1/4 `n3/4 D2 n (D̃3 + D̃4 ) o 1/2 (34) +n−3/8 `n7/8 D4 + n−1/2 `n3/2 u(γ) + γ . Proof sketch of Theorem 5.5. The proof is based on a delicate combination of Lemma 5.4 and Theorem 5.1. Since the proof of Theorem 5.5 is quite involved, here we only explain the main idea and give a sketch of the proof. All proof details can be found in the SM. Main idea. Lemma 5.4 gives a general rate of convergence for the Gaussian approximation with some unspecified smoothing parameters β and ψ. The error bound in Lemma 5.4 involves three parts: (i) one from approximating the linear projection ∆v , (ii) one from the second-order canonical remainder W , and (iii) one from the smoothing errors of the max and indicator functions. Recall that β is the degree of smoothing for the max function (30) and ψ controls the approximation of the indicator function (31). For larger β > 0 (or ψ > 0), Fβ (Z) (or λ(s)) is closer to the non-smooth function maxm,k Zmk (or 1(s ≤ t + eβ )). Specifically, for larger β and ψ, (iii) contributes less, while (i) and (ii) contribute more, to the error bound for the Gaussian approximation (32). Hence, the key step is to optimize the Gaussian approximation error bound (32) on the smoothing parameters β and ψ to find the best trade-off of the three parts. Step 1. Choose the smoothing parameters. Note that both β and ψ depend on the truncation parameter u in Lemma 5.4. Therefore, the optimization problem eventually boils down to choose a proper threshold u. Once u is chosen, then we shall first have a natural choice of β to make imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 24 CHEN √ √ the constraint of Lemma 5.4 on 8uD̃2 β/ n ≤ 1 active in order to apply (32); i.e β = Cn−1/2 u−1 . So β is a strictly decreasing function in u and we need to choose a non-decreasing ψ(u) to counter-balance the smoothing errors. Motivated from the proof of [16, Theorem 2.2] in which only the linear part of T̄0 was dealt with, here we need to choose a larger u because of the extra nonlinear term W . Since in the linear case of [16, Theorem 2.2] −5/8 3/4 −5/8 1/2 u = max{u0 , u1 , u(γ)} where u0 = n3/8 `n D̃4 and u1 = n3/8 `n D̃3 , it is intuitive to choose u = max{u0 , u1 , u2 , u3 , u4 , u(γ)} in our case such i2 T εi3 , where T = kM k , D , D for i = 2, 3, 4 that ui takes the form nεi1 `−ε i 4 2 4 n i and the corresponding indicator smoothing parameters as ψi (u) = min{n1/2−εi1 `εni2 −1 Ti−εi3 , `n−1/6 (ϕ̄(u))−1/3 }, where ϕ̄(u) is defined in Lemma 5.4. For i = 2, 3, 4, we require different {εij }j=1,2,3 , to balance the error bound (32). Let u∗i be the solution for balancing the two components in ψi (u). Then, ψi (u) is strictly increasing when u ∈ (0, u∗i ) and it is truncated to a constant level for u ≥ u∗i . Step 2. Calculate the error bound for the chosen parameters. Now, we invoke Theorem 5.1 to quantify the contributions of kM k4 , D2 , and D4 to EkW k. Combining (22) and (32), it will be shown (after some algebraic manipulations on the two cases 0 < u < u∗ and u ≥ u∗ , where u∗ = max1≤i≤4 {u∗i }) that the optimal choice of {εij }j=1,2,3 in order to achieve the overall error bound ρ(T̄0 , Z̄0 ) . n−1/2 `3/2 n u+γ (35) −1/2 1/2 −3/4 1/2 −5/8 1/2 is given by u2 = `n kM k4 , u3 = n1/4 `n D2 , and u4 = n1/8 `n D4 . Then, the explicit rate of convergence (34) is immediate by substituting the choice of u into (35). In the following proofs of Theorem 2.1, 2.2 and 3.1, the constants of . depend only on C1 and C2 in (GA.1) and (GA.2) in the sub-exponential kernel case and (GA.1’) and (GA.2’) in the uniform polynomial kernel case. Proof of Theorem 2.1. Choose γ = n−K1 for some K1 ≥ 1/8. Let `n = log(pn1+K1 ). By Theorem 5.5 and Lemma A.1, we have −1/4 3/4 ρ(T̄0 , Z̄0 ) . n−1/8 `n7/8 Bn1/4 + n−1/2 `n Bn1/2 `1/2 `n n +n +n−3/8 `n7/8 Bn1/4 + n−1/2 `n3/2 Bn `2n + γ . n−1/8 `n7/8 Bn1/4 + n−1/2 `n7/2 Bn + n−K1 . By (8), we have ρ(T̄0 , Z̄0 ) . n− min(K1 ,K/8) . Since K ∈ (0, 1), (9) follows. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 25 Proof of Theorem 2.2. Choose γ = n−K1 for some K1 ∈ (0, K). Let `n = log(pn1+K1 ). By Theorem 5.5 and Lemma A.3 with q = 4, we have 1/4 −1/2 ρ(T̄0 , Z̄0 ) . n−1/8 `7/8 `n Bn1/2 n1/4 + n−1/4 `3/4 n Bn + n n +n−3/8 `n7/8 Bn1/4 + n−1/2 `n3/2 Bn n 1/4 3/2 . n−1/8 `7/8 n Bn + `n Bn n K K−K1 ,K1 ) 4 . n− min( 8 , 1−K − 4 1 1+K1 4 +γ + n−K1 . Choose K1 ∈ [K/8, K/2]. Then, it follows that ρ(T̄0 , Z̄0 ) . n−K/8 . 5.3. Proof of results in Section 3. Proof of Theorem 3.1. Let ρ (α) = P({T̄0 ≤ aL̂∗ (α)} {L̄0 ≤ aZ̄0 (α)}), 0 where aZ̄0 (α) = inf{t ∈ R : P(Z̄0 ≤ t) ≥ α} is the α-th quantile of Z̄0 and A B = (A\B)∪(B \A) is the symmetric difference of two subsets A and B. Let `n = log(np) ≥ 1. We first deal with the sub-exponential kernel moment condition. Assume (GA.1) and (GA.2). The proof contains two steps. Step 1. Relate the bootstrap approximation to the Gaussian approximation. Note that for all α ∈ (0, 1) |P(T̄0 ≤ aL̂∗ (α)) − α| ≤ ρ(L̄0 , Z̄0 ) + |P(T̄0 ≤ aL̂∗ (α)) − P(L̄0 ≤ aZ̄0 (α))| 0 0 ≤ ρ(L̄0 , Z̄0 ) + ρ (α). Under conditions (GA.1) and (GA.2), following the proof of Theorem 5.5 and Theorem 2.1, we have ρ(L̄0 , Z̄0 ) . n−K/8 . Let ∆1 be defined in (57). By Lemma C.2, we can bound ρ (α) as (36) h i ρ (α) ≤ 2 ρ(L̄0 , Z̄0 ) + Cv 1/3 (log p)2/3 + P(∆1 > v) + C 0 ζ1 (log p)1/2 + 5ζ2 , provided that P(|T̄0 − L̄0 | > ζ1 ) < ζ2 , (37) (38) P(Pe (|L̂∗0 − L̄∗0 | > ζ1 ) > ζ2 ) < ζ2 , (effect of W ), (effect of ∆2 ), where (37) is due to the nonlinear remainder of the U-statistics decomposition and (38) is due to the estimation error of g(Xi ). Choose ζ1 = −1/2 Cn−K1 `n and ζ2 = Cn−K2 for some K1 , K2 > 0 whose values are to be imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 26 CHEN √ −1/2 determined in Step 2. Then, ζ1 log p ≤ Cn−K1 . Choose v = `n (E∆1 )3/4 . −1/2 By Lemma C.3, v . `n $1 (n, p)3/4 , where $1 (n, p) is defined in (56). By Markov’s inequality, 1/4 P(∆1 > v) ≤ E(∆1 )/v = `1/2 . `n1/2 $1 (n, p)1/4 , n (E∆1 ) 1/2 1/2 where under (GA.2) $1 (n, p) ≤ n−1/2 `n Bn + n−1 `3n Bn2 . n−1/2 `n Bn . Therefore, we have −3K/8 v . `−1/2 (n−1/2 `n1/2 Bn )3/4 . `−2 . n n n So it follows that (v 1/2 log p)2/3 . n−K/8 and −1/2 1/2 P(∆1 > v) . `1/2 `n Bn )1/4 . n−K/8 . n (n Substituting those bounds into (36), we get (39) ρ (α) . n−K/8 + n−K1 + n−K2 . n− min{K/8, K1 , K2 } . Step 2. Verify the constraints (37) and (38). Since max is a 1-Lipschitz function and by Markov’s inequality and Lemma C.5, we have P(|T̄0 − L̄0 | > ζ1 ) ≤ EkW k/ζ1 ≤ C$3 (n, p)ζ1−1 , where $3 (n, p) is defined in (61). Then, (37) is fulfilled whenever Cζ1 ζ2 ≥ $3 (n, p) for some constant C > 0. Next, we deal with (38). Note that n X 1 |L̂∗0 − L̄∗0 | ≤ √ max [ĝi,mk − gmk (Xi )]ei . n 1≤m,k≤p i=1 By the argument leading to (46), conditional on Xn1 and X0 n1 , we have n nX o1/2 K3 Ee |L̂∗0 − L̄∗0 | ≤ √ (log p)1/2 max [ĝi,mk − gmk (Xi )]2 , 1≤m,k≤p n i=1 from which it follows that 1/2 E|L̂∗0 − L̄∗0 | ≤ K3 (log p)1/2 E(∆2 ) and ∆2 is defined in (58). By Markov’s inequality (also conditional on Xn1 and X0 n1 ), Pe (|L̂∗0 − L̄∗0 | > ζ1 ) ≤ ζ1−1 Ee |L̂∗0 − L̄∗0 | so that P(Pe (|L̂∗0 − L̄∗0 | > ζ1 ) > ζ2 ) ≤ P(Ee |L̂∗0 − L̄∗0 | > ζ1 ζ2 ) 1/2 ≤ K3 (log p)1/2 E(∆2 ) E|L̂∗0 − L̄∗0 | ≤ . ζ1 ζ2 ζ1 ζ2 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 27 √ By Lemma C.4, (38) is fulfilled when $2 (n, p) ≤ Cζ1 ζ22 / log p. Recall that we need to check (40) n−(K1 +K2 ) $3 (n, p) ≤ Cζ1 ζ2 = C p , log(np) (41) n−(K1 +2K2 ) ζ1 ζ 2 p $2 (n, p) ≤ C √ 2 = C √ . log p log p log(np) By Lemma C.4 and C.5 $3 (n, p) ≤ n−1 (log(np))5/2 Bn + n−1/2 (log p) + n−3/4 (log(np))5/4 Bn1/2 , $2 (n, p) ≤ n−1/2 (log(np))3/2 Bn + n−1 (log(np))2 Bn . So sufficient conditions for (40) and (41) are given by (42) (43) n−1 `3n Bn + n−1/2 `n3/2 + n−3/4 `n7/4 Bn1/2 . n−(K1 +K2 ) , −1 3 −(K1 +2K2 ) n−1/2 `5/2 . n B n + n `n B n . n Under (GA.2), since the LHS of (42) is bounded by n−K +n−K/2 +n−3K/4 ≤ 3n−K/2 and the LHS of (43) is bounded by 2n−K/2 , we deduce that K1 and K2 must satisfy the constraint K1 + 2K2 ≤ K/2. Take K1 = K2 = K/6. Then we obtain from (39) that |P(T̄0 ≤ aL̂∗ (α)) − α| . n− min{K/8, K/6} = n−K/8 . 0 Similar argument applies to the kernel with uniform polynomial moment, so we only sketch the proof in this case. Assume (GA.1’) and (GA.2’). −1/2 Step 1’. We shall use the same v = `n (E∆1 )3/4 as in the sub-exponential kernel case. Under (GA.1’) and (GA.2’), by Lemma C.6 with q = 4, we 2/3 −1/2 have $1 (n, p) . n−1/2 `n Bn2 and v . `n (n−1/2 `n Bn2 )3/4 = (n−1 `n Bn4 )3/8 . Therefore, (v 1/2 log p)2/3 . (n−1 `6n Bn4 )1/8 . n−K/8 and P(∆1 > v) . `n1/2 (n−1/2 `n Bn2 )1/4 . n−K/8 . Then, by (36), we get ρ (α) . n− min{K/8, K1 , K2 } . Step 2’. By Lemma C.7 and C.8 with q = 4, we must verify the constraints −3/4 7/4 1/2 n−1/2 `2n Bn + n−1/2 `3/2 `n Bn . n−(K1 +K2 ) , n +n −1/2 2 n−1/4 `3/2 `n Bn . n−(K1 +2K2 ) . n Bn + n Under (GA.2’), a sufficient condition for the last two inequalities to hold is K1 + 2K2 ≤ K/4. Then, we can take K1 = K2 = K/12 to get ρ (α) . n−K/12 and thus (14). imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 28 CHEN 5.4. Proof of results in Section 4. Proof of Theorem 4.1. Let β ∈ (0, 1) and τ = β −1 kŜ − Σk. By the subgaussian assumption and Lemma A.2, it is easy to verify that there is a large enough constant C > 0 depending only on C2 , C3 , C4 such that max E[|hmk |2+` /(Cν 2` )] ∨ E[exp(|hmk |/ν 2 )] ≤ 2, (44) `=0,1,2 where h is the covariance matrix kernel in (2). Since {Γg }(j,k),(j,k) ≥ C1 for all j, k = 1, · · · , p and ν 4 log7 (np) ≤ C5 n1−K , by Theorem 3.1, we have kŜ − Σk ≤ aL̂∗ (1 − α) with probability at least 1 − α − Cn−K/8 , where C > 0 0 is a constant depending only on Ci , i = 1, · · · , 5. Therefore, P(τ ≤ τ∗ ) ≥ 1 − α − Cn−K/8 and the rest of the proof is restricted to the event {τ ≤ τ∗ }. By the decomposition ρ(Σ̂(τ∗ ) − Σ) ≤ ρ(Σ̂(τ∗ ) − Tτ∗ (Σ)) + ρ(Tτ∗ (Σ) − Σ) ≤ I + II + III + τ∗1−r ζp , where Tτ (Σ) = {σmk 1{|σmk | > τ }}pm,k=1 is the resulting matrix of the thresholding operator on Σ and X I = max |ŝmk |1{|ŝmk | > τ∗ , |σmk | ≤ τ∗ }, m k II = max m |σmk |1{|ŝmk | ≤ τ∗ , |σmk | > τ∗ }, k III = max m X X |ŝmk − σmk |1{|ŝmk | > τ∗ , |σmk | > τ∗ }. k Note that on the event {τ ≤ τ∗ }, maxm,k |ŝmk − σmk | ≤ βτ∗ . Since Σ ∈ G(r, C0 , ζp ), we can bound III ≤ (βτ∗ )(τ∗−r ζp ) = βτ∗1−r ζp . By triangle inequality, X X II ≤ max |ŝmk − σmk |1{|σmk | > τ∗ } + max |ŝmk |1{|ŝmk | ≤ τ∗ , |σmk | > τ∗ } m ≤ m k (βτ∗ )(τ∗−r ζp ) + τ∗ (τ∗−r ζp ) = (1 + k β)τ∗1−r ζp . imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 29 Let η ∈ (0, 1). We have I ≤ IV + V + V I, where X IV = max |σmk |1{|ŝmk | > τ∗ , |σmk | ≤ τ∗ }, m V = max m V I = max m k X |ŝmk − σmk |1{|ŝmk | > τ∗ , |σmk | ≤ ητ∗ }, k X |ŝmk − σmk |1{|ŝmk | > τ∗ , ητ∗ < |σmk | ≤ τ∗ }. k Clearly, IV ≤ τ∗1−r ζp . On the indicator event of V , we observe that βτ∗ ≥ |ŝmk − σmk | ≥ |ŝmk | − |σmk | > (1 − η)τ∗ . Therefore, V = 0 if η + β ≤ 1. For V I, we have V I ≤ (βτ∗ )(ητ∗ )−r ζp . Collecting all terms, we conclude that ρ(Σ̂(τ∗ ) − Σ) ≤ (3 + 2β + η −r β)ζp τ∗1−r + V. Then (16) follows from the choice η = 1 − β. The Frobenius norm rate (17) can be established similarly. Details are omitted. Next, we prove (18). Let Φ(·) denote the cdf of the standard Gaussian random variable. By the union bound, we have for all t > 0 n h  t i   2 X ĝi ei ≥ t ≤ 2p2 1 − Φ ¯ , Pe √ n ξ i=1 Pn −1/2 β −1 ξΦ 2 2 = 4n−1 ¯ −1 (1− where ξ¯ = max1≤m,k≤p ξmk and ξmk i=1 ĝi,mk . Let τ̃ = n α/(2p2 )); then τ∗ ≤ τ̃ . Since Φ−1 (1 − α/(2p2 ))  (log p)1/2 , we have E[τ∗ ] ≤ 1/2 , where C 0 > 0 is a constant only depending on α. ¯ C 0 β −1 E[ξ](log(p)/n) ¯ Let ∆ = n−1 maxm,k Pn [ĝi,mk − gmk (Xi )]2 . Then, Now, we bound E[ξ]. i=1 n X 8 2 ξ¯2 ≤ max gmk (Xi ) + 8∆. n m,k i=1 By Lemma C.4 and recall that ν 4 log7 (np) ≤ C5 n1−K , E[∆1/2 ] ≤ Cn−1/2 (log(pn))3/2 ν 2 , imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 30 CHEN where C > 0 is constant depending only on Ci , i = 1, · · · , 5. By [17, Lemma 9] and Pisier’s inequality [53, Lemma 2.2.2], we have E[max m,k n X n n o X 2 2 2 gmk (Xi )] ≤ K1 max E[ gmk (Xi )] + (log p)E[max max gmk (Xi )] m,k i=1 m,k i≤n i=1 n o ≤ C n + (log(np))3 ν 4 . By Jensen’s inequality, we get n o ¯ ≤ C 1 + (ν 4 log3 (np)/n)1/2 ≤ C. E[ξ] Then, we conclude that E[τ∗ ] ≤ C(α, C1 , · · · , C5 )β −1 (log(p)/n)1/2 . Proof of Theorem 4.2. The proof is similar to that of Theorem 4.1 and we only sketch the differences. By the assumptions and Lemma A.4, we have max E[|hmk |2+` /(Cν 2` )] ∨ E[khk/(2ν 2 )]4 ≤ 1. `=0,1,2 By Theorem 3.1, we have kŜ − Σk ≤ aL̂∗ (1 − α) with probability at least 0 1−α−Cn−K/12 , where C > 0 is constant depending only on Ci , i = 1, · · · , 5. So (16) and (17) follow. Note that E[max m,k n X i=1 n n o X 2 2 2 gmk (Xi )] ≤ K1 max E[ gmk (Xi )] + (log p)E[max max gmk (Xi )] m,k i=1 m,k i≤n o n ≤ C n + (log p)n1/2 ν 4 . Then, under the assumption that ν 8 log7 (np) ≤ C5 n1−K , it follows from Lemma C.7 that o n 1/2 1/2 2 2 2 ¯ ≤ C 1 + ν log (p) + ν log (np) + ν log(np) ≤ C. E[ξ] n1/4 n1/4 n1/2 Therefore, we get E[τ∗ ] ≤ C(α, C1 , · · · , C5 )β −1 (log(p)/n)1/2 . Acknowledgments. The author would like to thank two anonymous referees, an Associate Editor, and the Co-Editor Tailen Hsing for their many constructive comments that lead to the significant improvements of this paper. The author is also grateful to Stephen Portnoy (UIUC), Xiaofeng Shao (UIUC), and Wei Biao Wu (University of Chicago) for their helpful discussions. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 31 SUPPLEMENTARY MATERIAL Supplemental Materials to: “Gaussian approximation for the sup-norm of high-dimensional matrix-variate U-statistics and its applications” (). This supplemental file contains the additional proofs, technical lemmas, and simulation results. REFERENCES [1] Adamczak, R. (2006). Moment inequalites for U-statistics. Annals of Probability 34 2288-2314. [2] Arcones, M. and Giné, E. (1993). Limit theorems for U-processes. Annals of Probability 21 1494-1542. [3] Bentkus, V. (2003). On the dependence of the Berry-Esseen bound on dimension. Journal of Statistical Planning and Inference 113 385-402. [4] Bentkus, V., Götze, F. and van Zwet, W. R. (1997). An edgeworth expansion for symmetric statistics. Annals of Statistics 25 851-896. [5] Bickel, P. J., Götze, F. and van Zwet, W. R. (1986). The Edgeworth expansion for U-statistics of degree two. Annals of Statistics 14 1463-1484. [6] Bickel, P. J. and Levina, E. (2008). Covariance Regularization by Thresholding. Annals of Statistics 36 2577-2604. [7] Bickel, P. J. and Levina, E. (2008). Regularized Estimation of Large Covariance Matrices. Annals of Statistics 36 199-227. [8] Brodie, J., Daubechies, I., De Mol, C., Giannone, D. and Loris, I. (2009). Sparse and stable Markowitz portfolios. Proceedings of the National Academy of Sciences 106 12267-12272. [9] Bühlmann, P. and van de Geer, S. (2011). Statistics for High-Dimensional Data: Methods, Theory and Applications. Springer Series in Statistics. [10] Cai, T., Liu, W. and Luo, X. (2011). A Constrained `1 Minimization Approach to Sparse Precision Matrix Estimation. Journal of American Statistical Association 106 594-607. [11] Cai, T. and Zhou, H. (2012). Optimal Rates of Convergence for Sparse Covariance Matrix Estimation. Annals of Statistics 40 2389-2420. [12] Chang, J., Zhou, W., Zhou, W.-X. and Wang, L. (2016). Comparing large covariance matrices under weak conditions on the dependence structure and its application to gene clustering. Biometrics, to appear. [13] Chen, S. X., Zhang, L.-X. and Zhong, P.-S. (2010). Test for high-dimensional covariance matrices. Journal of American Statistical Association 105 810-819. [14] Chen, X., Xu, M. and Wu, W. B. (2013). Covariance and precision matrix estimation for high-dimensional time series. Annals of Statistics 41 2994-3021. [15] Chen, X., Xu, M. and Wu, W. B. (2015). Regularized estimation of linear functionals for high-dimensional time series. Preprint, arXiv:1506.03832. [16] Chernozhukov, V., Chetverikov, D. and Kato, K. (2013). Gaussian approximations and multiplier bootstrap for maxima of sums of high-dimensional random vectors. Annals of Statistics 41 2786-2819. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 32 CHEN [17] Chernozhukov, V., Chetverikov, D. and Kato, K. (2014). Comparison and anticoncentration bounds for maxima of Gaussian random vectors. arXiv:1301.4807v4. [18] de la Peña, V. and Giné, E. (1999). Decoupling: From Dependence to Independence. Springer. [19] de la Peña, V. and Montgomery-Smith, S. (1995). Decoupling inequalities for the tail probabilities of multivariate U-statistics. Annals of Probability 23 806-816. [20] Dempster, A. P. (1972). Covariance selection. Biometrics 28 157-175. [21] Einmahl, U. and Li, D. (2008). Characterization of LIL behavior in Banach space. Trans. Amer. Math. Soc. 360 6677-6693. [22] El Karoui, N. (2008). Operator norm consistent estimation of large dimensional sparse covariance matrices. Annals of Statistics 36 2717-2756. [23] Fan, J., Liao, Y. and Mincheva, M. (2011). High-dimensional covariance matrix estimation in approximate factor models. Annals of Statistics 39 3320-3356. [24] Giné, E., Latala, R. and Zinn, J. (2000). Exponential and moment inequalities for U-statistics. High Dimensional Probability II, Springer. [25] Götze, F. (1987). Approximations for multivaraite U-statistics. Journal of Multivariate Analysis 22 212-229. [26] Gregory, G. G. (1977). Large sample theory for U-statistics and tests of fit. Annals of Statistics 5 110-123. [27] Guerci, J. R. (1999). Theory and Application of Covariance Matrix Tapers for Robust Adaptive Beamforming. IEEE Transactions on Signal Processing 47 977985. [28] Hoeffding, W. (1948). A class of statistics with asymptotically normal distributions. Annals of Mathematical Statistics 19 293–325. [29] Hoeffding, W. (1963). Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association 58 13-30. [30] Houdré, C. and Reynaud-Bouret, P. (2003). Exponential inequalities, with constants, for U-statistics of order two. Stochastic Inequalities and Applications 56 55-69. [31] Hsing, T. and Wu, W. B. (2004). On weighted U-statistics for stationary processes. Annals of Probability 32 1600-1631. [32] Klein, T. and Rio, E. (2005). Concentration around the mean for maxima of empirical processes. Annals of Probability 33 1060–1077. [33] Lam, C. and Fan, J. (2009). Sparsistency and Rates of Convergence in Large Covariance Matrix Estimation. The Annals of Statistics 37 4254-4278. [34] Lam, C. and Yao, Q. (2012). Factor modeling for high-dimensional time series: inference for the number of factors. Ann. Statist. 40 694–726. MR2933663 [35] Latala, R. (1997). Estimation of moments of sums of independent random variables. Annals of Probability 25 1502-1513. [36] Lauritzen, S. L. (1996). Graphical Models. Oxford University Press. [37] Ledoux, M. and Talagrand, M. (1991). Probability in Banach Spaces: Isoperimetry and Processes. Springer. New York. [38] Mai, Q., Zou, H. and Yuan, M. (2012). A direct approach to sparse discriminant analysis in ultra-high dimensions. Biometrika 99 29-42. [39] Markowitz, H. M. (1952). Portfolio Selection. The Journal of Finance 7 77-91. [40] Massart, P. (2000). About the constants in Talagrand’s concentration inequalities for empirical processes. Annals of Probability 28 863-884. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 33 [41] McMurry, T. and Politis, D. (2015). High-dimensional autocovariance matrices and optimal linear prediction. Electronic Journal of Statistics 9 753-788. [42] Meinshausen, N. and Bühlmann, P. (2006). High-dimensional graphs and variable selection with the Lasso. The Annals of Statistics 34 1436-1462. [43] Muirhead, R. J. (1982). Aspects of Multivariate Statistical Theory. Wiley Series in Probability and Statistics. [44] Nagaev, S. V. (1979). Large deviations of sums of independent random variables. Annals of Probability 7 745-789. [45] Nazarov, F. (2003). On the maximal perimeter of a convex set in Rn with respect to a Gaussian measure. In Geometric Aspects of Functional Analysis, Lecture Notes in Mathematics Volume 1807, Springer. [46] Peng, J., Wang, P., Zhou, N. and Zhu, J. (2009). Partial Correlation Estimation by Joint Sparse Regression Models. Journal of American Statistical Association 104 735-746. [47] Portnoy, S. (1986). On the central limit theorem in Rp when p → ∞. Probability Theory and Related Fields 73 571-583. [48] Ravikumar, P., Wainwright, M. J., Raskutti, G. and Yu, B. (2008). Highdimensional covariance estimation by minimizing `1 -penalized log-determinant divergence. Electronic Journal of Statistics. [49] Rothman, A. J., Bickel, P. J., Levina, E. and Zhu, J. (2008). Sparse Permutation Invariant Covariance Estimation. Electronic Journal of Statistics 2 494-515. [50] Rudelson, M. and Vershynin, R. (2013). Hanson-Wright inequality and subGaussian concentration. Electronic Communications in Probability 18 1-9. [51] Serfling, R. J. (2001). Approximation Theorems of Mathematical Statistics. Wiley, New York. [52] Talagrand, M. (1996). New concentration inequalities in product spaces. Invent. Math 126. [53] van der Vaart, A. and Wellner, J. (1996). Weak Convergence and Empirical Processes: With Applications to Statistics. Springer. [54] Vershynin, R. (2010). Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027. [55] Yuan, M. (2010). High dimensional inverse covariance matrix estimation via linear programming. Journal of Machine Learning Research 11 2261-2286. [56] Yuan, M. and Lin, Y. (2007). Model selection and estimation in the Gaussian graphical model. Biometrika 94 19-35. [57] Zhang, C.-H. (1999). Sub-Bernoulli functions, moment inequalities and strong laws for nonnegative and symmterized U-staitstics. Annals of Probability 27 432-453. [58] Zhang, D. and Wu, W. B. (2015+). Gaussian approximation for high-dimensional time series. arXiv preprint arXiv:1508.07036. [59] Zhang, X. and Cheng, G. (2014). Bootstrapping high dimensional time series. arXiv:1406.1037. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 34 CHEN Supplemental Materials to “Gaussian approximation for the sup-norm of high-dimensional matrix-variate U-statistics and its applications” Xiaohui Chen University of Illinois at Urbana-Champaign Let q > 0 and gi := g(Xi ) = E[h(Xi , X0 )|Xi ] − Eh is the Hájek projection in (4). Write gmk = gmk (X) for m, k = 1, · · · , p. Recall the definitions Dq = max(E|hmk |q )1/q , D̃q = max(E|gmk |q )1/q , m,k m,k M = max (kh(Xi , Xj )k ∨ kh(Xi , X0j )k). 1≤i<j≤n We shall use K, K0 , K1 , · · · to denote positive absolute constants, and C, C 0 , C0 , C1 , · · · and c, c0 , c0 , c1 , · · · to denote positive finite constants whose values are independent of n and p and may vary at different places. We write a . b if a ≤ Cb for some constant C, and a  b if a . b and b . a. APPENDIX A: AUXILIARY LEMMAS IN THE PROOF OF SECTION 2 Appendix A contains additional technical lemmas that are used to prove the main results of this paper. Recall that u(γ) = ux (γ) ∨ uz (γ), where 2 2 for all m, k, i) ≥ 1 − γ} (Xi ) ≤ u2 Egmk ux (γ) = inf{u ≥ 0 : P(gmk and uz (γ) is similarly defined with gmk (Xi ) replaced by Zi,mk . Here, Zi follow iid N (0, Γg ). Lemma A.1 (Moment bounds for sub-exponential kernel). Let K1 > 0 and γ = n−K1 . If (GA.1) holds for all m, k = 1, · · · , p, then we have D̃2 ≤ D2 ≤ 21/2 , D̃3 ≤ D3 ≤ 21/3 Bn1/3 , D̃4 ≤ D4 ≤ 21/4 Bn1/2 , kM kq ≤ Kq!Bn log(np) ∀q ≥ 1, 2 u(γ) ≤ CBn log (np), where C > 0 is a constant depending only on C1 in (GA.1). imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 35 Proof of Lemma A.1. The bounds on D̃` and D` for ` = 2, 3, 4, are obvious under (7). Since khmk (X, X0 )/Bn kψ1 ≤ 1, where k · kψq is the Orlicz norm for ψq (x) = exp(xq ) − 1 for q ≥ 1 and x ≥ 0, we have by Pisier’s inequality [53, Lemma 2.2.2] that ! hmk (Xi , X0j ) hmk (Xi , Xj ) M ≤ K log(np) max max + . m,k i<j Bn ψ1 Bn Bn ψ1 ψ1 Since kM kq ≤ q! kM kψ1 for any q ≥ 1, we get kM kq ≤ Kq!Bn log(np). By [16, Lemma 2.2], we have p u(γ) ≤ C max{M 0 log(1 + n/γ), D̃2 log(np/γ)}, where C > 0 is a constant only depending on C1 in (GA.1) and M 0 satisfies E[exp(max1≤m,k≤p |gmk |/M 0 )] ≤ 2. By Pisier’s and Jensen’s inequalities, and using (7), we have max |gmk |/Bn m,k ψ1 ≤ K(log p) max kgmk /Bn kψ1 ≤ K log p. m,k Therefore, we can take M 0 = KBn log p for a large enough absolute constant K > 0. Then, we have u(γ) ≤ CBn log2 (np) for γ = n−K1 . Lemma A.2 (A moment bound for subgaussian observations). Suppose that Xi are iid mean zero random vectors such that Xim ∼ subgaussian(ν 2 ). If h is the covariance matrix kernel in (2), then we have for all m, k = 1, · · · , p, E[exp(|hmk |/ν 2 )] ≤ 2, i.e. khmk kψ1 ≤ ν 2 . Proof of Lemma A.2. The lemma follows from       |hmk (X1 , X2 )| 1 |X1m − X2m | |X1k − X2k | E exp = E exp ν2 2 ν ν    2 (X1m − X2m ) (X1k − X2k )2 ≤ E exp + 4ν 2 4ν 2    (X1m − X2m )2 ≤ max E exp 1≤m≤p 2ν 2    2 2 X1m + X2m ≤ max E exp 1≤m≤p ν2    2 2 X1m ≤ max E exp ≤ 2, 1≤m≤p ν2 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 36 CHEN where we used the elementary inequality |ab| ≤ (a2 + b2 )/2 in the second step, the Cauchy-Schwarz inequality in the third step, (a − b)2 ≤ 2(a2 + b2 ) in the fourth step, the iid assumption in the fifth step, and the assumption that Xim ∼ subgaussian(ν 2 ) in the last step. Lemma A.3 (Moment bounds for uniform polynomial kernel). 2 ≥ C and K1 > 0 and γ = n−K1 . If Egmk 1 (45) Let q ≥ 4, max E(|hmk |2+` /Bn` ) ∨ E[(khk/Bn )q ] ≤ 1 `=0,1,2 for all m, k = 1, · · · , p, then we have D̃2 ≤ D2 ≤ 1, D̃3 ≤ D3 ≤ Bn1/3 , D̃4 ≤ D4 ≤ Bn1/2 , kM kq ≤ 2Bn n2/q , u(γ) ≤ C max{Bn n 1+K1 q , log1/2 (np)}, where C > 0 is a constant depending only on C1 . Proof of Lemma A.3. The bounds on D̃` and D` for ` = 2, 3, 4, are similar to those in Lemma A.1. By [53, Lemma 2.2.2] and (45), we have max i<j kh(Xi , Xj )k Bn ≤ n2/q max i<j q Same bound holds for maxi<j kh(Xi , X0j )k. [16, Lemma 2.2] and the choice γ = n−K1 . khk Bn ≤ n2/q . q The bound on u(γ) follows from Lemma A.4 (A moment bound for observations with uniform polynomial moments). Let q ≥ 8. Suppose that Xi are iid mean zero random vectors such that k max1≤k≤p |X1k |kq ≤ ν. If h is the covariance matrix kernel in (2), then we have E[khk/(2ν 2 )]4 ≤ 1. Proof of Lemma A.4. The lemma follows from h i8/q E[khk/ν 2 ]4 ≤ E(khk/ν 2 )q/2 h  i8/q = 2−4 E max |X1m − X2m |q /ν q m h i8/q −4 q q q ≤ 2 2 E(max |X1m | /ν ) ≤ 24 . m imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 37 APPENDIX B: PROOF DETAILS IN SECTION 5 Proof of Theorem 5.1. In the proof, we shall use K1 , K2 , · · · , to denote absolute constants whose values may differ from place to place, and the indices i < j and (m, k) implicitly run over 1 ≤ i < j ≤ n and 1 ≤ m, k ≤ p. Let εi , i = 1, · · · , n, be a sequence of iid Rademacher random variables such that P(εi = ±1) = 1/2 and εi , i = 1, · · · , n, are also independent of Xn1 and X0 n1 . By the randomization inequality [18, Theorem 3.5.3], we have X X Ek f (Xi , Xj )k ≤ K1 Ek εi εj f (Xi , Xj )k. i<j i<j Fix an m, k = 1, · · · , p and let Λm,k be the n × n upper triangular matrix m,k ) = 0 with diagonal of zeros and Λm,k ij = fmk (Xi , Xj ) for i < j. Since tr(Λ and εi ’s are iid sub-Gaussian, by the Hanson-Wright inequality [50, Theorem 1], conditional on Xn1 , we have for all t > 0    t2 t > m,k n P(|ε Λ ε| ≥ t | X1 ) ≤ 2 exp −K2 min , , |Λm,k |2F |Λm,k |2 where ε = (ε1 , · · · , εn )> . Denote V1 = maxm,k |Λm,k |F and V2 = maxm,k |Λm,k |2 . Let n p o t∗ = max V1 log(p2 )/K2 , V2 log(p2 )/K2 . By the union bound, we have Z ∞ E[max |ε> Λm,k ε| | Xn1 ] = P(max |ε> Λm,k ε| ≥ t | Xn1 ) dt m,k m,k    0  Z ∞ K2 t2 K2 t ∗ 2 ≤ t + 2p max exp − 2 , exp − dt. V2 V1 t∗ Changing variables, we see that    2 Z ∞ Z ∞ K2 t2 V1 s √ exp − 2 dt ≤ exp − ds. √ 2 ∗ V 2K2 t 4 log p 1 By the tail bound 1 − Φ(x) ≤ φ(x)/x for all x > 0, where Φ(·) and φ(·) are the cdf and pdf of the standard Gaussian random variable, respectively, it follows that   Z ∞ K2 t2 V1 2 (46) 2p dt ≤ √ ≤ K2 V1 . exp − 2 V1 2K2 log p t∗ Here, we used p ≥ 2. Similarly, we have Z ∞ 2 2p exp (−K2 t/V2 ) dt ≤ 2V2 /K2 . t∗ imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 38 CHEN Note that V2 ≤ V1 . Therefore, we have X Ek εi εj f (Xi , Xj )k ≤ K3 t∗ ≤ K3 (log p)E max |Λm,k |F m,k i<j ≤ K3 (log p)(E max |Λm,k |2F )1/2 , (47) m,k where the last step follows from Jensen’s inequality. Next, we bound the term E[maxm,k |Λm,k |2F ]. Consider the Hoeffding de2 . Let composition of fmk 2 2 f˜1m,k (x1 ) = Efmk (x1 , X0 ) − Efmk and 2 2 2 2 . (X, x2 ) + Efmk f˜m,k (x1 , x2 ) = fmk (x1 , x2 ) − Efmk (x1 , X0 ) − Efmk Clearly, E[f˜1m,k (X)] = 0 and E[f˜m,k (X, X0 )] = E[f˜m,k (x1 , X0 )] = E[f˜m,k (X, x2 )] = 0 for all x1 , x2 ∈ Rp ; i.e. f˜1m,k is centered and f˜m,k is a canonical kernel of U-statistic of order two w.r.t. F . Since 2 2 = f˜m,k (x1 , x2 ) + f˜1m,k (x1 ) + f˜1m,k (x2 ), (x1 , x2 ) − Efmk fmk we have by the triangle inequality X X X 2 2 2 2 ) (Xi , Xj ) − Efmk E max (Xi , Xj ) ≤ max + E max (fmk fmk Efmk m,k m,k i<j (48) i<j 2 + Ek ≤ n2 max Efmk m,k m,k X i<j f˜(Xi , Xj )k + (n − 1)Ek i<j n X i=1 where f˜ = {f˜m,k }pm,k=1 and f˜1 = {f˜1m,k }pm,k=1 are p × p random matrices. By the Hoeffding inequality, conditional on Xn1 , we have for all t > 0 ! n 2 X K t 4 P(| εi f˜1m,k (Xi )| ≥ t | Xn1 ) ≤ 2 exp − Pn . ˜m,k (Xi ))2 ( f i=1 1 i=1 By the symmetrization inequality [53, Lemma 2.3.1] and the argument for bounding (46), we get (49) n n n h i1/2 X X X 1/2 ˜ ˜ Ek f1 (Xi )k ≤ 2Ek εi f1 (Xi )k ≤ K5 (log p) E max f˜1m,k (Xi )2 . i=1 i=1 m,k i=1 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 f˜1 (Xi )k, GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 39 By the randomization inequality as in the previous argument before Jensen’s inequality (47), we get (50) h i1/2 X X X . Ek f˜(Xi , Xj )k ≤ K1 Ek εi εj f˜(Xi , Xj )k ≤ K3 (log p)E max f˜m,k (Xi , Xj )2 i<j m,k i<j i<j By the triangle and Jensen’s inequalities, we have h i1/2 h i1/2 X X 4 E max f˜m,k (Xi , Xj )2 ≤ 2E max fmk (Xi , Xj ) m,k m,k i<j i<j n o1/2 h i1/2 X X 2 2 2 +81/2 E max [E(fmk (Xi , X0 )|Xn1 )]2 + 2 max (Efmk ) . m,k Let I = E[maxm,k ity, we have P i<j m,k i<j i<j 2 (X , X )]. Then by the Cauchy-Schwarz inequalfmk i j h i1/2 √ √ X 4 E max fmk (Xi , Xj ) ≤ I EM 2 , m,k i<j and o1/2 n X 2 E max (Xi , X0 )|Xn1 )]2 [E(fmk m,k i<j i1/2 h i1/2 o nh X 2 2 (Xi , X0j )|Xn1 ) max (Xi , X0j )|Xn1 ≤ E max max E(fmk E(fmk i<j m,k ≤ h m,k 2 (Xi , X0j )|Xn1 ) E max max E(fmk m,k i1/2 h i<j √ √ ≤ EM 2 4I, E max m,k i<j X i1/2 2 (Xi , X0j )|Xn1 ) E(fmk i<j where in the last step we used Jensen’s inequalityP and the decoupling in2 )2 ≤ IEM 2 . equality [18, Theorem 3.1.1]. In addition, maxm,k i<j (Efmk Therefore, we obtain from (50) that X √ √ f˜(Xi , Xj )k ≤ K6 (log p) I EM 2 . Ek i<j By (48), (49), and (50), we obtain that n h i1/2 o X m,k √ √ 2 f˜1 (Xi )2 . I ≤ K7 n2 max Efmk +(log p) I EM 2 +n(log p)1/2 E max m,k m,k i imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 40 CHEN The solution of this quadratic inequality for I is given by (51) n h i1/2 o X m,k 2 I ≤ K8 (log p)2 (EM 2 )+n2 max Efmk +n(log p)1/2 E max f˜1 (Xi )2 . m,k m,k i By [17, Lemma 9] and Jensen’s inequality, h i n h io X m,k X m,k E max f˜1 (Xi )2 ≤ K9 max E f˜1 (Xi )2 + (log p)E max max f˜1m,k (Xi )2 m,k m,k i (52) i m,k i n h io 4 4 ≤ K9 n max Efmk (X1 , X2 ) + (log p)E max max fmk (Xi , X0j ) i<j m,k m,k n o 4 ≤ K9 n max Efmk (X1 , X2 ) + (log p)EM 4 . m,k Now, combining (47), (51), and (52), we conclude that X Ek f (Xi , Xj )k i<j o1/2 n 4 1/2 2 2 1/2 4 2 2 ≤ K10 (log p) n max Efmk + (log p) EM + n(log p) [n max Efmk + (log p)EM ] m,k m,k n o ≤ K10 (log p) nD2 + (log p)kM k2 + n3/4 (log p)1/4 D4 + (n log p)1/2 kM k4 . Since kM k2 ≤ kM k4 and p ≤ exp(bn), we have (log p)kM k2 ≤ (bn log p)1/2 kM k4 , from which (22) follows. Proof of Corollary 5.2. The Corollary follows from the bounds D2 ≤ D4 ≤ Bn and kM k4 ≤ KBn log(np), where the last inequality comes from Lemma A.1. Proof of Corollary 5.3. The Corollary follows from the bounds D2 ≤ D4 ≤ Bn0 and kM k4 ≤ Bn n1/2 , where the last inequality comes from Lemma A.3. Proof of Lemma 5.4. Let vP= λ ◦ Fβ . By the mean value theorem and noticing that πmk (Z) ≥ 0 and pm,k=1 πmk (Z) = 1 for all Z ∈ Rp×p , we have |E[v(T ) − v(L)]| = |E[ p X Wmk ∂λ(Fβ (ξ))πmk (ξ)]| ≤ K0 ψEkW k, m,k=1 where ξ is a random matrix on the line segment between T and L. Let ∆v = |E[v(L) − v(Z)]|. Then, |E[v(T ) − v(Z)]| ≤ ∆v + K0 ψEkW k. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 41 By the smoothing properties of Fβ (·) in (30) and λ(·) in (31), we have P(T̄0 ≤ t) ≤ P(Fβ (T ) ≤ t + eβ ) ≤ E[λ(Fβ (T ))] = E[v(T )] ≤ E[v(Z)] + (K0 ψEkW k + ∆v ) = E[λ(Fβ (Z))] + (K0 ψEkW k + ∆v ) ≤ P(Fβ (Z) ≤ t + eβ + ψ −1 ) + (K0 ψEkW k + ∆v ) ≤ P(Z̄0 ≤ t + eβ + ψ −1 ) + (K0 ψEkW k + ∆v ). By the anti-concentration inequality [16, Lemma 2.1], P(Z̄0 ≤ t + eβ + ψ −1 ) − P(Z̄0 ≤ t) ≤ C(eβ + ψ −1 ) p 1 ∨ log(pψ), where C > 0 is a constant depending only on c0 and C0 . Therefore, we get p P(T̄0 ≤ t) − P(Z̄0 ≤ t) ≤ C[(ψEkW k + ∆v ) + (eβ + ψ −1 ) 1 ∨ log(pψ)]. Since L involves sums of iid random matrices and Z is Gaussian of the matching first and second moments to L, the bound for ∆v in (33) follows from Theorem 2.1 and the Step 1 in the proof of Theorem 2.2 in [16]. Similarly, we can prove the other half inequality. Proof of Theorem 5.5. In this proof, we shall use a . b to denote a ≤ Cb for some constant C > 0 depending only on c0 , C0 , and b. Since D̃2 is lower and upper bounded, we may √ assume that D̃2 = 1. For u > 0, let 1/2 2 ϕ̄(u) = C1 D̃4 /u and β(u) = n /(2 2u). Define −3/4 ψ1 (u) = min{n1/8 `−3/8 D̃3 n , `n−1/6 (ϕ̄(u))−1/3 }, −1/2 ψ2 (u) = min{n1/2 `−1/2 kM k4 n , `n−1/6 (ϕ̄(u))−1/3 }, −1/2 , `n−1/6 (ϕ̄(u))−1/3 }, −1/2 , `n−1/6 (ϕ̄(u))−1/3 }, ψ3 (u) = min{n1/4 `n−1/4 D2 ψ4 (u) = min{n3/8 `n−3/8 D4 and let ψ(u) = min1≤i≤4 ψi (u). Clearly, ψ(u) ≤ n1/8 for u ≥ 0 and ψi (u) are strictly increasing functions for u ∈ (0, u∗i ), where u∗i balances the corresponding two components in ψi (u) for i = 1, 2, 3, 4. In addition, for u ≥ u∗i we have ψi (u) = ψi (u∗i ) = maxv≥0 ψi (v), i.e. all the u∗i ’s attain the corresponding maximum values of ψi (·) at the truncation levels. Let u∗ = max1≤i≤4 u∗i . Our goal is to show that: for any γ ∈ (0, 1) and for some properly chosen u in Step 1 below, we have (53) ρ(T̄0 , Z̄0 ) . n−1/2 `3/2 n u + γ. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 42 CHEN Step 1. Choose a proper value of u. 3/2 To prove (53), we may further assume that n−1/2 `n u ≤ 1 because otherwise it trivially holds. Choose u = u0 ∨ u1 ∨ u2 ∨ u3 ∨ u4 ∨ u(γ), where 1/2 u0 = n3/8 `−5/8 D̃4 , n 3/4 u1 = n3/8 `−5/8 D̃3 , n 1/2 u2 = `n−1/2 kM k4 , 1/2 u3 = n1/4 `−3/4 D2 , n 1/2 u4 = n1/8 `n−5/8 D4 . For this chosen u, we then determine the smoothing parameters β := β(u) and ψ = min1≤i≤4 ψi where ψi := ψi (u). Let β̄i = n1/2 u−1 for i = 1, 2, 3, 4, i and β̄ = min1≤i≤4 β̄i . Then, (β ∨ ψ) ≤ β̄ because β = 8−1/2 n1/2 u−1 ≤ n1/2 min1≤i≤4 u−1 = β̄ and ψi ≤ β̄i for i i = 1, 2, 3, 4. Step 2. Show that (53) holds for our choice of u (and therefore β and ψ). Then, (34) follows immediately from the substitution of u into (53) ρ(T̄0 , Z̄0 ) . n−1/2 `3/2 n [u0 ∨ u1 ∨ u2 ∨ u3 ∨ u4 ∨ u(γ)] + γ. The rest of the proof is to show (53). First, note that since ψ ≤ n1/8 , p p −1/2 3/2 eβ 1 ∨ log(pψ) ≤ K1 β −1 (log p) log(pn) ≤ K1 β −1 `3/2 `n u. n ≤ K1 n For the rest of the terms, we divide into two cases. Case I: u ≥ u∗ . By Lemma 5.4 and Theorem 5.1, we have ρ(T̄0 , Z̄0 ) . n−1/2 β̄ 2 ψ D̃33 + β̄ψ ϕ̄(u) + ψ ϕ̄(u)`n1/2 +γ + n−1/2 `n3/2 u {z } | {z } | {z } | (i) (ii) (iii) + ψ −1 `1/2 + ψ`3/2 n−1 kM k4 + ψ`n n−1/2 D2 + ψ`5/4 n−3/4 D4 , {z } | n {z | {zn } | n {z } } | (iv) (v) (vi) (vii) where we used (β ∨ ψ) ≤ β̄ in terms (i)–(ii) and ψ ≤ n1/8 in term (iv). Next, we bound the terms (i)–(vii). imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 43 Term (i). We have n−1/2 β̄ 2 ψ D̃33 ≤(1) n−1/2 β̄12 ψ1 D̃33 =(2) n−1/2 β̄12 ψ1 (u∗1 )D̃33 −3/4 2 =(3) n−1/2 (n1/8 `n5/8 D̃3 3/4 =(4) n−1/8 `n7/8 D̃3 −3/4 ) (n1/8 `n−3/8 D̃3 )D̃33 −1/2 3/2 =(5) n−1/2 `3/2 `n u, n u1 ≤(6) n where (1) follows from the definitions of ψ and β̄, (2) from u ≥ u∗ ≥ u∗1 , (3) from the definition of β̄1 and the truncation property of ψ1 (u∗1 ) = maxv≥0 ψ1 (v), (4) from the direct calculations, (5) from the definition of u1 , and (6) from u ≥ u1 . Term (ii). We have β̄ψ ϕ̄(u) ≤(1) β̄1 ψ1 (u∗1 )ϕ̄(u∗1 ) −3/4 =(2) (n1/8 `n5/8 D̃3 3/4 =(3) n−1/8 `n7/8 D̃3 −3/4 )(n1/8 `−3/8 D̃3 n 9/4 )(n−3/8 `n5/8 D̃3 ) ≤(4) n−1/2 `3/2 n u, where (1) follows from the definitions of ψ, β̄, ϕ̄(u) is a decreasing function in u and u ≥ u∗1 , (2) from the definition of β̄1 and the truncation property of ψ1 (·), (3) from the direct calculations, and (4) from the steps (5) and (6) in bounding term (i). 1/2 1/2 1/2 Term (iii). Note that ψ ϕ̄(u)`n = β̄ψ ϕ̄(u)`n /β̄. We claim that `n /β̄ ≤ 1/2 1. Then, by the calculations in term (ii), we have ψ ϕ̄(u)`n ≤ β̄ψ ϕ̄(u) ≤ 3/2 n−1/2 `n u. Now, we verify the claim. Since ψi = ψi (u∗i ) for u ≥ u∗ , it is easy 1/2 u−1 = `−1 β̄ and therefore `1/2 β̄ −1 = `−1/2 ψ −1 . to check that ψi = `−1 n n i n n n i 1/2 −1 −1/2 −1 1/2 −1 3/2 −1/2 By Lemma C.1, we have `n β̄ = `n ψ ≤ `n ψ ≤ n `n u ≤ 1. 1/2 −1 3/2 −1/2 Term (iv). The bound `n ψ ≤ n `n u follows from Lemma C.1. Term (v), (vi), and (vii). Since ψ ≤ ψi for i = 2, 3, 4, we can show by direct calculations that −1 3/2 −1 1/2 −1 1/2 −1 ψ`3/2 ≤ n−1/2 `n3/2 u, n n kM k4 ≤ ψ2 `n n kM k4 = `n ψ2 ≤ `n ψ ψ`n n−1/2 D2 ≤ ψ3 `n n−1/2 D2 = `n1/2 ψ3−1 ≤ `n1/2 ψ −1 ≤ n−1/2 `n3/2 u, −1 −3/4 −3/4 1/2 −1 ψ`5/4 D4 ≤ ψ4 `5/4 D4 = `1/2 ≤ n−1/2 `3/2 n n n n n ψ4 ≤ `n ψ n u where the last steps of each line follow from Lemma C.1. Therefore, we conclude that (53) holds when u ≥ u∗ . imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 44 CHEN Case II: 0 < u < u∗ . By Lemma 5.4 and Theorem 5.1, we have ρ(T̄0 , Z̄0 ) . n−1/2 β̄ 2 ψ D̃33 + (ψ 2 + ψβ)ϕ̄(u) + ψ ϕ̄(u)`n1/2 +γ + n−1/2 `n3/2 u | {z } | {z } | {z } (i) (ii) (iii) 3/2 −1 + ψ −1 `1/2 n−1/2 D2 + ψ`n5/4 n−3/4 D4 , n + ψ`n n kM k4 + ψ` | n {z } | {z } (iv) | {z (v) } | (vi) {z (vii) } where we used (β ∨ ψ) ≤ β̄ in terms (i) and ψ ≤ n1/8 in term (iv). Again, our task is to bound the terms (i)–(vii) in order to achieve (53). Term (i). We have 3/4 n−1/2 β̄ 2 ψ D̃33 ≤(1) n−1/2 β̄12 ψ1 D̃33 ≤(2) n−1/8 `n7/8 D̃3 ≤(3) n−1/2 `n3/2 u, where (1) follows from the definitions of ψ and β̄, (2) from the definition −3/8 −3/4 of β̄1 , the truncation property of ψ1 ≤ n1/8 `n D̃3 and steps (3)–(4) of term (i) in Case I, and (3) from steps (5)–(6) of term (i) in Case I. Term (ii). We write (ii) = (ii.1)+(ii.2), where (ii.1) = ψ 2 ϕ̄(u) and (ii.2) = ψβ ϕ̄(u). By the truncation property of ψ(·), we have (ii.1) ≤ [`−1/3 (ϕ̄(u))−2/3 ]ϕ̄(u) = `n−1/3 (ϕ̄(u))1/3 , n (ii.2) ≤ [`−1/6 (ϕ̄(u))−1/3 ]β ϕ̄(u) = β`−1/6 (ϕ̄(u))2/3 . n n √ −5/8 1/2 Recall that ϕ̄(u) = C D̃42 u−1 , β(u) = (2 2)−1 n1/2 u−1 , and u0 = n3/8 `n D̃4 so that (54) ϕ̄(u0 ) = Cn−3/2 `n5/2 u30 , β(u0 ) = Cn1/2 u−1 0 . Since ϕ̄(·) and β(·) are decreasing in u and u ≥ u0 , we get −1/2 1/2 (ii.1) ≤ `−1/3 (ϕ̄(u0 ))1/3 ≤ Cn−1/2 `1/2 `n u, n n u0 ≤ Cn (ii.2) ≤ β(u0 )`−1/6 (ϕ̄(u0 ))2/3 ≤ Cn−1/2 `n3/2 u0 ≤ Cn−1/2 `n3/2 u. n 3/2 Therefore, we obtain that (ii) . n−1/2 `n u. Term (iii). By the same argument as in bounding the term (ii) above, we have 1/3 2/3 ψ ϕ̄(u)`1/2 ≤(1) [`−1/6 (ϕ̄(u))−1/3 ]ϕ̄(u)`1/2 ≤(2) `n1/3 (ϕ̄(u0 ))2/3 n n n = `n (ϕ̄(u)) ≤(3) Cn−1 `2n u20 ≤ Cn−1 `2n u2 = C(n−1/2 `n3/2 u)(n−1/2 `n1/2 u) ≤ Cn−1/2 `3/2 n u. | {z } | {z } ≤1 3/2 ≤n−1/2 `n u imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 45 where (1) follows from the truncation property of ψ(·), (2) from the fact that ϕ̄(·) is decreasing and u ≥ u0 , (3) from (54), and the rest equalities and inequalities are obvious. 1/2 3/2 Term (iv). By Lemma C.1, we have `n ψ −1 ≤ Cn1/2 `n u for some constant C > 0 depending only on c0 and C0 . Term (v), (vi), and (vii). Since ψi (·) is non-decreasing, ψ is no greater than its value in Case I and these three terms can be handled in the same way as in Case I. Therefore, regardless of u ≥ u∗ or 0 < u < u∗ , (53) always holds for any γ ∈ (0, 1) and the proof is complete. APPENDIX C: AUXILIARY LEMMAS IN THE PROOF OF SECTION 5 Lemma C.1 (A key bound on ψ −1 ). Let u∗ , u, and ψi (·), i = 1, 2, 3, 4 be defined in the proof of Theorem 5.5. Let ψi = ψi (u) and ψ = min1≤i≤4 ψi . Assume that c0 ≤ D̃2 ≤ C0 . Then we have for all u > 0 (55) −1 `1/2 ≤ Cn−1/2 `n3/2 u, n ψ where C > 0 is a constant depending only on c0 and C0 . In particular, if u ≥ u∗ , then we can take C = 1. Proof of Lemma C.1. We shall use the same notations as in the proof of Theorem 5.5. We divide the proof of (55) into two cases. Case I: u ≥ u∗ . In this case, all the ψi (u)’s for i = 1, 2, 3, 4 attain the corresponding maximum of ψi at the truncation levels; i.e. −3/4 ψ1 = n1/8 `−3/8 D̃3 n ψ2 = ψ3 = ψ4 = , −1/2 n1/2 `−1/2 kM k4 , n −1/2 n1/4 `−1/4 D2 , n −1/2 n3/8 `n−3/8 D4 . Then (55) follows from the definitions of ui and the direct calculations 3/4 −1 `1/2 = n−1/8 `7/8 n ψ1 n D̃3 −1/2 3/2 = n−1/2 `3/2 `n u, n u1 ≤ n 1/2 −1 `1/2 = n−1/2 `n kM k4 n ψ2 −1/2 3/2 = n−1/2 `3/2 `n u, n u2 ≤ n 1/2 = n−1/2 `n3/2 u3 ≤ n−1/2 `n3/2 u, 1/2 = n−1/2 `n3/2 u4 ≤ n−1/2 `n3/2 u. −1 `1/2 = n−1/4 `3/4 n ψ3 n D2 −1 `1/2 = n−3/8 `7/8 n ψ4 n D4 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 46 CHEN 1/2 Case II: 0 < u < u∗ . In this case, note that `n ψ −1 is equal to n o 1/2 1/6 1/3 −1/8 3/8 3/4 −1/2 1/2 −1/4 1/4 1/2 −3/8 3/8 1/2 `1/2 max ` ( ϕ̄(u)) , n ` D̃ , n ` kM k , n ` D , n ` D . n n n n n n 3 4 2 4 1/2 1/6 We only need to bound `n [`n (ϕ̄(u))1/3 ] since the remaining terms have the same bounds as in Case I. Since ϕ̄(·) is decreasing in u and u ≥ u0 , we have 1/3 `2/3 ≤ `n2/3 (ϕ̄(u0 ))1/3 . n (ϕ̄(u)) −5/8 1/2 Recall the definitions ϕ̄(u) = C D̃42 u−1 and u0 = n3/8 `n D̃4 . Then, 5/4 5/2 D̃4 = u20 n−3/4 `n and ϕ̄(u0 ) = C D̃42 u−1 = Cu30 n−3/2 `n . Therefore, we 0 2/3 3/2 3/2 have `n (ϕ̄(u0 ))1/3 = C 1/3 n−1/2 `n u0 ≤ C 1/3 n−1/2 `n u since u ≥ u0 . Lemma C.2. Let ρ (α) = P({T̄0 ≤ aL̂∗ (α)} {L̄0 ≤ aZ̄0 (α)}), where 0 aZ̄0 (α) = inf{t ∈ R : P(Z̄0 ≤ t) ≥ α} is the α-th quantile of Z̄0 . Assume that 2 ≥ C for all m, k = 1, · · · , p. Suppose that Egmk 1 P(|T̄0 − L̄0 | > ζ1 ) < ζ2 , P(Pe (|L̂∗0 − L̄∗0 | > ζ1 ) > ζ2 ) < ζ2 , for some ζ1 , ζ2 ≥ 0. Then, for every α ∈ (0, 1) and v > 0, we have h i ρ (α) ≤ 2 ρ(L̄0 , Z̄0 ) + Cv 1/3 (log p)2/3 + P(∆1 > v) + C 0 ζ1 (log p)1/2 + 5ζ2 , where ∆1 is defined in (57) and C, C 0 > 0 are constants only depending on C1 . Proof of Lemma C.2. The proof is a modification of [16, Theorem 3.2], verbatim replacing the anti-concentration inequality of [17, Theorem 2 and 3] by Nazarov’s inequality [45]. The benefit of using Nazarov’s inequality is that we can have v 1/3 (log p)2/3 and ζ1 (log p)1/2 , instead of v 1/3 (1 ∨ log(p/v))2/3 and ζ1 (1 ∨ log(p/ζ))1/2 in [16, Theorem 3.2], respectively, where the former can give the convergence rates in Theorem 3.1 that decay to zero polynomially fast in n without additional logarithm factors. In the following Lemma C.3–C.8, we shall assume that p ≥ 2. Lemma C.3 (Bound on E(∆1 ): sub-exponential moment). Assume (7). Let   log p 1/2 (log p)(log(np))2 2 (56) $1 (n, p) = Bn + Bn . n n imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 47 and (57) ∆1 = n 1 X g̃i g̃i> − Γg , n i=1 where g̃i = vech(g(Xi )). Then, E(∆1 ) ≤ K$1 (n, p) for some absolute constant K > 0. Proof of Lemma C.3. Let j, k, m, l = 1, · · · , p be such that j ≥ k and m ≥ l and write MAX = maxj≥k,m≥l . By [17, Lemma 8], ( " n #1  1 ) 2 X 2 1 K1 2 2 2 2 (log p) 2 MAX E +(log p) E max MAXgi,jk gi,ml . E(∆1 ) ≤ gi,jk gi,ml i≤n n i=1 4 2 g 2 ] = E[max Note that E[maxi≤n MAXgi,jk i≤n maxj≥k gi,jk ]. By [53, Lemma i,ml 2.2.2] and (7), max max |gi,jk | i≤n j≥k ψ1 ≤ K2 (log(np)) max max kgi,jk kψ1 ≤ K2 (log(np))Bn . i≤n j≥k Therefore, we have 4 4 ] ≤ K3 max max |gi,jk | E[max max gi,jk i≤n j≥k i≤n j≥k ≤ K3 (log(np))4 Bn4 . ψ1 By the Cauchy-Schwarz inequality and (7), we have for all j ≥ k and m ≥ l " E n X #1 " 2 2 2 gi,ml gi,jk ≤ (E i=1 n X 4 gi,jk )1/2 (E j≥k #1 2 4 )1/2 gi,ml i=1 i=1 ≤ max(E n X n X 4 gi,jk )1/2 ≤ (2n)1/2 Bn . i=1 Now, (56) follows. 1/2 Lemma C.4 (Bound on E(∆2 ): sub-exponential kernel). Let n (58) X 1 [ĝi,mk − gmk (Xi )]2 ∆2 = max n m,k i=1 imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 48 CHEN and (59) $2 (n, p) = Bn n log3/2 (np) n1/2 ∨ log2 (np) o . n Assume (7). Then 1/2 E(∆2 ) ≤ K$2 (n, p) for some absolute constant K > 0. Proof of Lemma C.4. Write MAX = maxm,k maxi≤n . By the definition of ĝi and g(Xi ), we have (60) 1/2 ∆2 ≤ max max |ĝi,mk − gmk (Xi )| m,k i≤n n ≤ X 1 MAX hmk (Xi , X0j ) − E[hmk (Xi , X0j )|Xn1 ] n j=1  −1 X n hmk (X0j , X0l ) − Ehmk . + max m,k 2 1≤j<l≤n By [17, Lemma 8] conditional on Xn1 , we have n h i X E MAX hmk (Xi , X0j ) − E[hmk (Xi , X0j )|Xn1 ] | Xn1 j=1 n n hX i1/2  1/2 ≤ K1 (log(np)) MAX E h2mk (Xi , X0j ) | Xn1 j=1 h  i1/2 o +(log(np)) E MAX max h2mk (Xi , X0j ) | Xn1 . j≤n By [53, Lemma 2.2.2] and (7), we have max max |hmk (Xi , X0j )| m,k i,j ψ1 ≤ K2 log(np) max max khmk (Xi , X0j )kψ1 ≤ K2 (log(np))Bn . m,k i,j Then, we have by Jensen’s inequality that h  i1/2 E E MAX max h2mk (Xi , X0j ) | Xn1 ≤ 2K2 (log(np))Bn . j≤n imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 49 By Jensen’s inequality twice and [53, Lemma 2.2.2], we have n n hX  i1/2 o E MAX E h2mk (Xi , X0j ) | Xn1 j=1 n h  io1/2 ≤ n1/2 E MAX E[h2mk (Xi , X01 ) | Xn1 ] n h io1/2 ≤ n1/2 E max max h2mk (Xi , X01 ) ≤ K3 n1/2 (log(np))Bn . m,k i≤n Then n i X 1 h E MAX hmk (Xi , X0j ) − E[hmk (Xi , X0j ) | Xn1 ] ≤ K4 $2 (n, p). n j=1 Finally, by (28) and (29), the expectation of the second term in the last inequality of (60) is bounded by K5 Bn {(log(p)/n)1/2 ∨ (log(p)/n)}, which is on the smaller order of $2 (n, p). The lemma now follows. Lemma C.5 (Bound on EkW k: sub-exponential kernel). (61) $3 (n, p) = Let (log p)3/2 (log(np)) log p (log p)5/4 1/2 Bn + 1/2 + Bn . n n n3/4 Assume (7). If 2 ≤ p ≤ exp(bn) for some absolute constant b > 0, then EkW k ≤ K(1 ∨ b1/2 )$3 (n, p) for some absolute constant K > 0. Proof of Lemma C.5. By Lemma A.1, we have kM kq ≤ Kq!Bn log(np) 1/2 and D2 ≤ 21/2 , D4 ≤ 21/4 Bn . By Theorem 5.1, we have h log p 3/2  log p   log p 5/4 i EkW k ≤ K(1∨b1/2 )n1/2 Bn log(np)+ + Bn1/2 , n n n from which lemma follows. Lemma C.6 (Bound on E(∆1 ): uniform polynomial moment). Assume (45). Let   log p 1/2 log p Bn + 1−2/q Bn2 . (62) $1 (n, p) = n n Let q ≥ 4. Then, E(∆1 ) ≤ K$1 (n, p), where ∆1 is defined in (57) and K > 0 is an absolute constant. imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 50 CHEN Proof of Lemma C.6. The proof is similar to the argument of Lemma 4 ]. By Jensen’s inC.3 with the difference in bounding E[maxi≤n maxj≥k gi,jk equality, max max i≤n j≥k |gi,jk | Bn ≤ max max i≤n j≥k 4 |gi,jk | Bn ≤ n1/q max q i≤n gi Bn ≤ n1/q . q Therefore, we have 4 E[max max gi,jk ] ≤ n4/q Bn4 . i≤n j≥k 1/2 Lemma C.7 (Bound on E(∆2 ): kernel with uniform polynomial moment). Let q ≥ 4 and " # Bn (log(np))1/2 (log(np))1/2 (63) $2 (n, p) = 1∨ . n1/2−1/q n1/2−1/q Assume (45). Then 1/2 E(∆2 ) ≤ K$2 (n, p), where ∆2 is defined in (58) and K > 0 is an absolute constant. Proof of Lemma C.7. The proof is similar to the argument in Lemma C.4. We only note the differences. First, under (45), k max max |hmk (Xi , X0j )|kq ≤ n2/q Bn , m,k i,j which in combination with the conditional Jensen’s inequality imply that i1/2 h  E E max max h2mk (Xi , X0j ) | Xn1 ≤ n2/q Bn . m,k i,j Second, by Jensen’s inequality twice and [53, Lemma 2.2.2], we have n n hX  i1/2 o E MAX E h2mk (Xi , X0j ) | Xn1 j=1 n h io1/2 ≤ n1/2 E max max h2mk (Xi , X01 ) m,k i≤n k max max |hmk (Xi , X01 )|kq ≤ n 1/2 ≤ n 1/2+1/q m,k i≤n kkhkkq ≤ n1/2+1/q Bn . imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 51 Then n i X 1 h E MAX hmk (Xi , X0j ) − E[hmk (Xi , X0j ) | Xn1 ] ≤ K1 $2 (n, p). n j=1 By (28) and [16, Lemma 8], we have hn−1 E max m,k 2 ≤ K2 n (log p)1/2 n X hmk (X0j , X0l ) − Ehmk i 1≤j<l≤n max m,k n/2 hX i1/2 Eh2mk (Xi , Xi+n/2 ) i=1 i1/2 o  log p h  E max kh(Xi , Xi+n/2 )k2 + n 1≤i≤n/2 n log p 1/2 B log p o n ≤ K3 + 1−1/q . n n Since the last bound is of smaller order than $2 (n, p), the remaining proof follows from the argument in Lemma C.4. Lemma C.8 (Bound on EkW k: kernel with uniform polynomial moment). Let q ≥ 4 and (64) $3 (n, p) = (log p)3/2 log p (log p)5/4 1/2 B + + Bn . n n1−2/q n1/2 n3/4 Assume (45). If 2 ≤ p ≤ exp(bn) for some absolute constant b > 0, then EkW k ≤ K(1 ∨ b1/2 )$3 (n, p) for some absolute constant K > 0. Proof. By Lemma A.3, we have kM k4 ≤ kM kq ≤ 2n2/q Bn , D2 ≤ 1 and 1/2 D4 ≤ Bn . By Theorem 5.1, we have EkW k ≤ K(1 ∨ b1/2 )n1/2 h log p 3/2 n Bn n2/q +  log p  n +  log p 5/4 n i Bn1/2 . imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 52 CHEN APPENDIX D: ADDITIONAL NUMERICAL COMPARISONS We present more numerical comparisons of the Gaussian approximation on the Hájek projection and its wild bootstrap version for the covariance matrix. We consider two mean-zero distributions from the elliptical family [43]: (M1) (sub-exponential moment) The ε-contaminated p-variate elliptical normal distribution with density function  > −1  1−ε x V x f (x; ε, ν, V ) = exp − p/2 1/2 2 (2π) det(V )  > −1  ε x V x (65) + ; exp − p/2 1/2 2 2ν 2 (2πν ) det(V ) (M2) (polynomial moment) The p-variate elliptical t-distribution with degree of freedom ν and density function  −(ν+p)/2 Γ(ν + p)/2 x> V −1 x (66) f (x; ν, V ) = 1+ . ν Γ(ν/2)(νπ)p/2 det(V )1/2 For the positive-definite matrix V , we consider three dependence models: (D1) strong dependence model with V = 0.9 × 1p 1> p + 0.1 × Idp , where 1p is the p × 1 vector of all ones; (D2) moderate dependence AR(1) model with V = {vmk }pm,k=1 and vmk = 0.7|m−k| ; (D3) weak dependence AR(1) model with V = {vmk }pm,k=1 and vmk = 0.3|m−k| . We use ε = 0.2 and ν = 1.5 in (M1) and ν = 10 in (M2). For the chosen parameters, the two distributions have the same variance scaling for each V , while the kurtosis of the sub-exponential case is 0.16 and the polynomial case is 1/3. We compare the finite sample performance on n = 500 and p = 40 so that there are 820 covariance parameters. In each setup, we compare the approximation quality of T̄0 using Z̄0 and L̂∗0 . All results are reported over 5000 simulation runs. First, Figure 3 shows a better approximation than Figure 4 for Z̄0 and L̂∗0 . This is predicted by our theory in Section 2 and 3. Second, the approximation becomes more accurate as the dependence gets stronger in both Figure 3 and Figure 4. Third, the wild bootstrap has high-quality approximation for the upper tail probabilities, which is particularly relevant for statistical applications; see Section 4 below. This occurs even when the Gaussian approximation has deteriorated performance such as in the weakly dependent imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 53 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 0.6 0.8 1.0 1.0 0.8 0.0 0.2 0.4 X 0.6 0.8 1.0 0.0 0.8 1.0 1.0 0.8 1.0 Bootstrap approximation 0.6 0.2 0.4 Bootstrap approximation 0.0 0.2 0.0 0.6 alpha 0.8 Wild bootstrap 0.8 1.0 0.8 0.6 0.4 0.2 0.4 0.6 X Wild bootstrap 0.0 0.2 0.4 1.0 Wild bootstrap 0.0 0.2 X 0.6 0.4 0.4 0.2 0.0 0.2 0.4 Z 0.6 0.8 0.0 0.2 0.4 Z 0.6 0.8 0.6 Z 0.4 0.2 0.0 0.0 Bootstrap approximation Gaussian approximation 1.0 Gaussian approximation 1.0 Gaussian approximation 0.0 0.2 0.4 0.6 alpha 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 alpha Fig 3. Gaussian approximations (top row) by Z̄0 and wild bootstrap approximations (bottom row) by L̂∗0 for the ε-contaminated normal distribution model: left (M1)+(D1), middle (M1)+(D2), and right (M1)+(D3). Sample size n = 500 and dimension p = 40. AR(1) models (D2) and (D3). One possible explanation for this phenomenon can be the numeric instability for simulating the p0 × 1 normal random vectors Zi in the approximation, where p0 = p(p + 1)/2. On the contrary, the wild bootstrap only requires the simulation of n univariate normal random variables. APPENDIX E: TWO ADDITIONAL APPLICATION EXAMPLES In this section, we provide two more examples for applying the Gaussian wild bootstrap procedure. We only state results for subgaussian observations. For the uniform polynomial moment case, we can easily obtain similar results as in Section 4. For a matrix Θ = {θmk }pm,k=1 and a vector θ, we P write max1≤k≤p pm=1 |θmk | is the matrix L1 -norm of Θ and |θ|w = Pp |Θ|L1w =1/w ( j=1 |θj | ) , w ≥ 1, is the `w -norm of θ, where |θ|∞ = max1≤j≤p |θj | is the max-norm. E.1. Estimation of the sparse precision matrix. Precision matrix, i.e. the inverse of the covariance matrix Ω = Σ−1 , is an important object in imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 54 CHEN 0.6 0.8 1.0 1.0 0.8 0.0 0.2 0.4 X 0.6 0.8 1.0 0.0 0.8 1.0 1.0 0.8 1.0 Bootstrap approximation 0.6 0.2 0.4 Bootstrap approximation 0.0 0.2 0.0 0.6 0.8 Wild bootstrap 0.8 1.0 0.8 0.6 0.4 0.2 0.4 0.6 X Wild bootstrap 0.0 0.2 0.4 1.0 Wild bootstrap 0.0 0.2 X 0.6 0.4 0.4 0.2 0.0 0.2 0.4 Z 0.6 0.8 0.0 0.2 0.4 Z 0.6 0.8 0.6 Z 0.4 0.2 0.0 0.0 Bootstrap approximation Gaussian approximation 1.0 Gaussian approximation 1.0 Gaussian approximation 0.0 0.2 alpha 0.4 0.6 alpha 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0 alpha Fig 4. Gaussian approximations (top row) by Z̄0 and wild bootstrap approximations (bottom row) by L̂∗0 for the elliptic t-distribution model: left (M2)+(D1), middle (M2)+(D2), and right (M2)+(D3). Sample size n = 500 and dimension p = 40. high-dimensional statistics because it closely ties to the Gaussian graphical models and partial correlation graphs [42, 56, 49, 46, 55, 10]. For multivariate Gaussian observations Xi , zero entries in the precision matrix correspond to missing edges in the graphical models; i.e. ωmk = 0 means that Xm and Xk are conditionally independent given the values of all other variables [20, 36]. To avoid the overfitting for graphical models with a large number of nodes, the sparsity is a widely considered structural assumption. Here, we consider the estimation of Ω by using the CLIME method [10] (67) Ω̂(λ) = argminΘ∈Rp×p |Θ|1 subject to kŜΘ − Idp×p k ≤ λ, where λP≥ 0 is a tuning parameter to control the sparsity in Ω̂(λ) and |Θ|1 = pm,k=1 |θmk |. As in the thresholded covariance matrix estimation case in Section 4.1, the performance of CLIME depends on the selection of tuning parameter λ. A popular approach is to use the cross-validation (CV), whose theoretical properties again are unclear in the high-dimensional setup. Here, we shall apply the Gaussian wild bootstrap to determine λ. Let imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 55 r ∈ [0, 1) and p n o X p×p G̃(r, M, ζp ) = Θ ∈ S+ : |Θ|L1 ≤ M, max |θmk |r ≤ ζp , m≤p k=1 where Sp×p is the collection of positive-definite p × p symmetric matrices. + Theorem E.1 (Adaptive tuning parameter selection for CLIME: subgaussian observations). Let ν ≥ 1 and Xi be iid mean zero random vectors such that Xik ∼ subgaussian(ν 2 ) for all k = 1, · · · , p. Suppose that there exist constants Ci > 0, i = 1, · · · , 4, such that {Γg }(j,k),(j,k) ≥ C1 , kX1k k4 ≤ C2 , kX1k k6 ≤ C3 ν 1/3 and kX1k k8 ≤ C4 ν 1/2 for all j, k = 1, · · · , p. Assume that Ω ∈ G̃(r, M, ζp ) and and ν 4 log7 (np) ≤ C1 n1−K for some K ∈ (0, 1). Choose λ∗ = M aL̂∗ (1 − α), where the bootstrap samples are generated with 0 the covariance matrix kernel in (2). Then, we have with probability at least 1 − α − Cn−K/8 for some constant C > 0 depending only on C1 , · · · , C5 such that kΩ̂(λ∗ ) − Ωk2 ≤ Cr ζp M 2−2r aL̂∗ (1 − α)1−r , (68) 0 (69) −1 p |Ω̂(λ∗ ) − Ω|2F ≤ 4Cr ζp M 4−2r aL̂∗ (1 − α)2−r , 0 where Cr = 23−2r (1 + 21−r + 31−r ). In addition, we have E[aL̂∗ (1 − α)] ≤ 0 C 0 (log(p)/n)1/2 for some constant C 0 > 0 depending only on α and C1 , · · · , C5 . In particular, E[λ∗ ] ≤ C 0 M (log(p)/n)1/2 . Now, we compare Theorem E.1 with [10, Theorem 1(a) and 4(a)]. Let η ∈ (0, 1/4) and K, τ ∈ (0, ∞) be bounded constants. Assuming that log(p)/n ≤ η, E[exp(tXij2 )] ≤ K for all |t| ≤ η and i = 1, · · · , n; j = 1, · · · , p, and Ω ∈ G̃(r, M, ζp ), [10] showed that with probability at least 1 − 4p−τ 0 kΩ̂(λ∆ ) − Ωk2 ≤ C∆ ζp M 2−2r (log(p)/n)(1−r)/2 , p−1 |Ω̂(λ∆ ) − Ω|2F 0 ≤ 4C∆ ζp M 4−2r (log(p)/n)1−r/2 , 0 = where λ∆ = C∆ M (log(p)/n)1/2 , C∆ = 2η −2 (2 + τ + η −1 e2 K 2 )2 , and C∆ 1−r 2 −2 Cr C∆ . If Xij ∼ subgaussian(ν ), then η ≤ ν for large enough K. There0 & ν 8(1−r) , both diverging to infinity as ν 2 → ∞ (i.e. fore, C∆ & ν 8 and C∆ η → 0). Therefore, λ∗ = oP (λ∆ ) and the convergence rates in (68) and (69) are much sharper than those obtained in [10, Theorem 1(a) and 4(a)]. On the other hand, the turning parameter λ∗ requires the knowledge of M and thus the estimator Ω̂(λ∗ ) is not fully data-dependent. In contrast imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 56 CHEN with the thresholded covariance matrix estimation problem in Section 4.1, the fundamental difficulty here for estimating the precision matrix is that there is no sample analog of Ω when p > n and M can be viewed as a stability parameter in the sparse inversion of the matrix Ŝ. That is, the larger M , the more difficult to estimate Ω = Σ−1 ; in particular for CLIME, the rates (68) and (69) become slower. In addition, |Ω|L1 plays a similar role in the graphical Lasso model for estimating the sparse precision matrix [48]. The same comments apply to the problem of estimating the sparse linear functionals in Section E.2. E.2. Estimation of the sparse linear functionals. Consider estimation of the linear functional θ = Σ−1 b, where b is a fixed known p × 1 vector and Σ = Var(Xi ). Functionals of such form are related to the solution of the linear equality constrained quadratic program (70) minimizew∈Rp×p w> Σw subject to b> w = 1, which arises naturally in Markowitz portfolio selection, linear discriminant analysis, array signal processing, best linear unbiased estimator (BLUE), and optimal linear prediction for univariate time series [39, 38, 27, 41]. For example, in Markowitz portfolio selection, the portfolio risk Var(X> i w) is minimized subject to the constraint that the expected mean return E(X> i w) is fixed at certain level. The solution of (70) w∗ = (b> Σ−1 b)−1 Σ−1 b is proportional to θ and the optimal value of (70) is (b> Σ−1 b)−1 . A naive approach to estimate θ has two steps: first construct an invertible estimator Σ̂ of Σ and second estimate θ by Σ̂−1 b. This two-step estimator may not be consistent for θ in high-dimensions even though Σ̂ is a spectral norm consistent (and typically regularized) estimator of Σ because in the worst case |θ̂ − θ| = |Σ̂−1 b − Σ−1 b| ≤ kΣ̂−1 − Σ−1 k2 · |b| does not converge if |b| → ∞ at faster rate than kΣ̂−1 − Σ−1 k2 → 0. However, if θ has some structural assumptions such as sparsity, then we can directly estimate θ without the intermediate step for estimating Σ̂ or Σ̂−1 . Sparsity in θ is often a plausible assumption in real applications. For instance, the sparse portfolio has been considered in [8] to obtain the stable portfolio optimization and to facilitate the transaction cost for a large number of assets. When θ is sparse, the following Dantzig-selector type problem has been proposed in [15] to estimate θ (71) θ̂(λ) = argminw∈Rp×p |w|1 subject to |Ŝw − b|∞ ≤ λ, where λ ≥ 0 is a tuning parameter to control the sparsity in θ̂(λ). The optimization problem (71) can be solved by linear programming and thus there imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 57 are computationally efficient algorithms for obtaining θ̂(λ). The intuition of (71) is that since Σθ = b, we should expect that Ŝ θ̂ ≈ b for a reasonably good estimator θ̂. Under the sparsity assumption on θ and suitable moment conditions on Xi , [15] obtained the rate of convergence for θ̂(λ). However, a remaining issue for using (71) on real data is to properly select the tuning parameter λ. Different from the thresholded covariance matrix estimation where the sparsity is assumed in Σ, here we do not require this structure in the linear functional estimation. Instead, we impose the sparsity assumption directly on θ. Let r ∈ [0, 1) and p n o X p G (r, ζp ) = w ∈ R : |wj |r ≤ ζp . 0 j=1 Here, ζp controls the sparsity level of the elements in G 0 (r, ζp ). Without assuming any structure on Σ, we can allow stronger dependence in Σ and therefore the Gaussian wild bootstrap approximation may perform better in this case. Theorem E.2 (Adaptive tuning parameter selection in linear functional estimation: subgaussian observations). Let ν ≥ 1 and Xi be iid mean zero random vectors such that Xik ∼ subgaussian(ν 2 ) for all k = 1, · · · , p. Suppose that there exist constants Ci > 0, i = 1, · · · , 4, such that {Γg }(j,k),(j,k) ≥ C1 , kX1k k4 ≤ C2 , kX1k k6 ≤ C3 ν 1/3 and kX1k k8 ≤ C4 ν 1/2 for all j, k = 1, · · · , p. Assume that θ ∈ G 0 (r, ζp ) and ν 4 log7 (np) ≤ C5 n1−K for some K ∈ (0, 1). Let |θ|1 ≤ M and choose λ∗ = M aL̂∗ (1 − α), where the bootstrap 0 samples are generated with the covariance matrix kernel in (2). Then we have for all w ∈ [1, ∞] (72) 1 |θ̂(λ∗ ) − θ|w ≤ (2 · 6 w · 5 1−r w 1 r r )ζpw (M |Σ−1 |L1 )1− w aL̂∗ (1 − α)1− w 0 with probability at least 1 − α − Cn−K/8 for some constant C > 0 depending only on C1 , · · · , C5 . In addition, we have (73) E[λ∗ ] ≤ C 0 M (log(p)/n)1/2 , where C 0 > 0 is a constant depending only on α and C1 , · · · , C5 . p The tuning parameter λ∆ = C∆ M log(p)/n is selected in [15, Theorem II.1], which is non-adaptive and the constant C∆ > 0 depends on the underlying data distribution F through ν 2 . In particular, C∆ → ∞ as ν 2 → ∞. Theorem E.2 shows that the bootstrap tuning parameter selection strategy imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 58 CHEN is less conservative in view of (73) and the rate (72) can be much tighter than θ̂(λ∆ ) when ν 2 → ∞. However, as in Section E.1, the turning parameter λ∗ here requires the knowledge of M and thus the estimator θ̂(λ∗ ) is not fully data-dependent. But this is due to the fundamental difficulty for the lack of the sample analog of θ in this problem. E.3. Proof of Theorem E.1 and E.2. Lemma E.3. Then, we have Suppose that Ω ∈ G̃(r, M, ζp ) and let λ ≥ |Ω|L1 kŜ − Σk. |Ω̂(λ) − Ω|∞ ≤ 4|Ω|L1 λ, kΩ̂(λ) − Ωk2 ≤ C1 ζp λ1−r , p−1 |Ω̂(λ) − Ω|2F ≤ C2 ζp λ2−r , where C1 ≤ 2(1 + 21−r + 31−r )(4|Ω|L1 )1−r and C2 ≤ 4|Ω|L1 C1 . Proof of Lemma E.3. See [10, Theorem 6]. Lemma E.4. Let λ ≥ |θ|1 kŜ − Σk. Then, θ satisfies |Ŝθ − b|∞ ≤ λ. For the Dantzig-selector estimator θ̂(λ) in (71), we have 1 1 |θ̂(λ) − θ|w ≤ [6D(5λ|Σ−1 |L1 )] w (2λ|Σ−1 |L1 )1− w , P where D(u) = pj=1 (|θj | ∧ u), u ≥ 0, is the smallness measure of θ. Proof of Lemma E.4. See [15, Lemma V.6]. Proof of Theorem E.1. Let λ = |Ω|L1 kŜ − Σk. By the subgaussian assumption and Lemma A.2, we have (44) for some large enough constant C > 0 depending only on C2 , C3 , C4 so that (44) holds. Since {Γg }(j,k),(j,k) ≥ C1 for all j, k = 1, · · · , p and ν 4 log7 (np) ≤ C5 n1−K , by Theorem 3.1, we have kŜ − Σk ≤ aL̂∗ (1 − α) with probability at least 1 − α − Cn−K/8 , where 0 C > 0 is a constant depending only on Ci , i = 1, · · · , 5. Since |Ω|L1 ≤ M for Ω ∈ G̃(r, M, ζp ), P(λ ≤ λ∗ ) ≥ 1 − α − Cn−K/8 . Then, (68) and (69) follow from Lemma E.3 applied to the event {λ ≤ λ∗ }. The bounds for E[aL̂∗ (1 − α)] and E[λ∗ ] are the same as those in Theorem 4.1. 0 Proof of Theorem E.2. For θ ∈ G 0 (r, C0 , ζp ), we have D(u) ≤ 2u1−r ζp . Let λ = |θ|1 kŜ − Σk. Following the proof of Theorem E.1, we have P(λ ≤ imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 59 λ∗ ) ≥ 1 − α − Cn−K/8 . By Lemma E.4, we have with probability at least 1 − α − Cn−K/8 1 1 |θ̂(λ∗ ) − θ|w ≤ [6D(5λ∗ |Σ−1 |L1 )] w (2λ∗ |Σ−1 |L1 )1− w 1 ≤ (2 · 6 w · 5 1−r w 1 r 1− w 1− r )ζpw |Σ−1 |L1 w λ∗ , which is (72). The bound for E[λ∗ ] is immediate. APPENDIX F: HIGHER-ORDER MOMENT INEQUALITIES OF THE DECOUPLED AND CANONICAL V-STATISTICS Let X0 n1 be an independent copy of Xn1 following the distribution F . Here, we present some higher-order moment and concentration inequalities for X V0 = f (Xi , X0j ), 1≤i,j≤n which is the unnormalized version of the decoupled V-statistics. Formally, U-statistics is equivalent to V-statistics by removing the diPasymptotically n 0 agonal sum i=1 f (Xi , Xi ). So here we also refer V 0 as the decoupled Ustatistics with the kernel f . We consider the canonical kernel f . Tail probability inequalities for kV 0 k is closely related to the moment bounds of higherorders. Let B be a separable Banach space, (B ∗ , k · k∗ ) the dual space of (B, k · k), and B1∗ the unit ball in B ∗ . Let In = {1, · · · , n} and ι = (i, j) ∈ In2 be the collection of index pairs implicitly runningP over i, j ∈ In . For notation 0 0 simplicity, we write f(ι) = f (Xi , Xj ) and V = ι f(ι) . For I ⊂ I2 , we let ιI be the |I|-dimensional vector such that it is the restriction of ι to the coordinates in I (e.g. if ι = (2, 5), then ι{1} = 2). For J ∈ I2 , we denote EJ (j) as the expectation taken w.r.t. the random variables Xi for all j ∈ J and i ∈ In . By convention, E∅ X = X. Following [1], for J ⊂ I ⊂ I2 and I 6= ∅, we define n X Y ∗ (X(j) f(ι) I,J = EI\J sup EJ φ(f(ι) ) gι(j) ιj ) : φ ∈ B1 , j ιI (j) gi (74) j∈J : Rp → R, j ∈ J, i ∈ In , and E X o (j) (j) |gi (Xi )|2 ≤ 1 . i If I = ∅, then by convention f(ι) f(ι) and I2 ,J f(ι) ∅,∅ = kf(ι) k. As remarked by [1], is a deterministic quantity and it is in fact a norm. For I 6= I2 , (k) (1) is random variable only depending on {Xιk }k∈I c where Xi I,J (2) Xj = = Xi X0j . imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 60 CHEN Lemma F.1 (Higher-order moment inequality for unbounded canonical kernel). Let h be a canonical kernel of order two w.r.t. F . Then, there exists an absolute constant K > 0 such that we have for all q ≥ 2 n X X f(ι) k)q f(ι) kq ≤ K q (Ek Ek ι ι +q q/2 h q I2 ,{1} f(ι) + q I2 ,{2} f(ι) + [E2 X X X X (E1 k f(ι) k)2 ]q/2 + [E1 (E2 k f(ι) k)2 ]q/2 j i i j q/2 X q/2 X q/2 i X Ekf(ι) k2 + E2 max E1 kf(ι) k2 + E1 max E2 kf(ι) k2 + j ι +q q h i i q {1},∅ q I2 ,I2 q {2},∅ j i + E1 max f(ι) + E2 max f(ι) f(ι) i j o i h q q 3q/2 E2 max f(ι) {1},{1} + E1 max f(ι) {2},{2} + q 2q E max kf(ι) kq . +q ι i j (75) For bounded kernels, (75) leads to an exponential concentration inequality; c.f. Corollary F.2 below. Lemma F.1 can be viewed as the matrix-variate version of the moments and exponential inequalities for the real-valued Ustatistics in [24]. On the other hand, it can also be viewed as an extension of the upper tail part of Talagrand’s inequality for maxima of empirical processes of iid random variables to U-statistics [52, 40]. Indeed, Lemma F.1 recovers [24, Theorem 3.2] for real-valued kernels. For f taking values in R, it was established in [24, Theorem 3.2] that there exists an absolute constant K > 0 such that for all q ≥ 2 n X X 2 q/2 E| f(ι) |q ≤ K q q q/2 ( Ef(ι) ) + q q kf(ι) kqL2 →L2 ι +q 3q/2 ι h E1 max(E2 X i j 2 q/2 f(ι) ) + E2 max(E1 j X o i 2 q/2 + q 2q E max |f(ι) |q , f(ι) ) ι i (76) where n X o X (1) (1) X (2) (2) (1) (1) (2) (2) kf(ι) kL2 →L2 = sup E f(ι) gi (Xi )gj (Xj ) : E |gi (Xi )|2 ≤ 1, E |gj (Xj )|2 ≤ 1 . ι i j To compare (76) and (75), we first compute the terms with coefficient q 3q/2 in (75). By (86), we have  X q/2 q 2 f(ι) , E2 max f(ι) {1},{1} ≤ E2 max E1 j j i imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 61 which is handled by the q 3q/2 term in (76). Similar bound holds for E1 maxi f(ι) q . {2},{2} Next, we consider the q q terms. Observe that f(ι) I ,I = kf(ι) kL2 →L2 . In 2 2 addition, by (87) and Jensen’s inequality, we have  q  X q/2 X q 2 f(ι) | ≤ E2 max E1 f(ι) , E2 max f(ι) {1},∅ = E2 max E1 | j j j i i which is again smaller than q 3q/2 terms in (76). For the q q/2 terms, by (83), the degeneracy of h, Jensen’s inequality, and the orthogonality of f(ι) conditional on Xn1 , we have (77) n o X X X X X 2 2 . (E2 k f(ι) k)2 ≤ E1 E2 ( f(ι) )2 = Ef(ι) f(ι) I ,{1} , E1 max 2 i j i ι j Remark 5. On the contrary, unlike the real-valued kernels where the higher-order moment bounds and exponential inequalities involving only the L2 and L∞ norms, the matrix-valued U-statistics involves more subtle balance among the “mixed norms” of h in (75). Those quantities are expressed in terms of the maxima of empirical processes and it thus can be much smaller than a straightforward extension of (76). This remark also applies to Corollary F.2. F.1. Exponential inequality for bounded kernels. As an immediate consequence of Lemma F.1, we have the following concentration inequality, which is equivalent to (75) up to constants. Corollary F.2 (Exponential inequality for bounded canonical kernel). Let f be a bounded canonical kernel of order two w.r.t. F . Then, there exist absolute constants K, M, M 0 > 0 such that for all t > 0 (78) ( "      2   1 #) X X t t 3 t 2 t 2 0 P(k f(ι) k ≥ KEk f(ι) k+t) ≤ M exp −M min , , , , D C B A ι ι where A = kf(ι) k∞ , B= f(ι) {1},{1} ∞ + f(ι) {2},{2} ∞ , C = kf(ι) kI2 ,I2 + f(ι) {1},∅ + f(ι) {2},∅ , ∞ ∞ h i1 1 2 D = n 2 nEkf(ι) k2 + E1 kf(ι) k2 ∞ + E2 kf(ι) k2 ∞ + f(ι) I ,{1} 2 X X X X 1 2 21 + f(ι) I ,{2} + [E1 (E2 k f(ι) k) ] + [E2 (E1 k f(ι) k)2 ] 2 . 2 i j j i imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 62 CHEN Proof of Corollary F.2 is based on a standard argument combining the Chebyshev and higher-order moment inequalities (Theorem F.1); see e.g. [24]. Corollary F.2 is a Bernstein-type inequality for the high-dimensional matrix-valued U-statistics. Exact computations of A, B, C, D are quite complicated. Below, we shall give a less sharp (with uniform bounds) but userfriendly version of Corollary F.2. Corollary F.3. If f be a bounded canonical kernel of order two w.r.t. F and kf k∞ ≤ C0 , then there exist constants K, M > 0 and a constant M 0 > 0 depending only C0 such that for all t > 0 (79) " !# X X t2 t t2/3 1/2 0 P(k f(ι) k ≥ KEk f(ι) k + t) ≤ M exp −M min , , ,t . 3 n n1/3 n ι ι Remark 6. 1. Except for a worse factor on t2 /n3 , the exponential inequality (79) is the same as [24, Corollary 3.4], which considered the real-valued kernels and the corresponding term is t2 /n2 . The loss of order n is due to the lack of orthogonality for the sup-norm. Since the Banach space (Rp×p , k · k) is of type 1 and nothing more [37, Chapter 9.2] , this term in (79) cannot be improved. 2. In view of the undecoupled results of [18, 19], inequalities (75), (78) P and (79) also hold for 1≤i,j≤n f (Xi , Xj ). F.2. Proof of results in Section F. P Proof of Lemma F.1. Note that f(ι) I ,∅ = Ek ι f(ι) k. By [1, The2 orem 1] with order two, there exists an absolute constant K1 > 0 such that for all q ≥ 2, we have n h i X X q q Ek f(ι) kq ≤ K1q (Ek f(ι) k)q + q q/2 f(ι) I ,{1} + f(ι) I ,{2} 2 2 ι ι +q q h q I2 ,I2 f(ι) + X E2 f(ι) q {1},∅ j +q 3q/2 hX +q 2q E X E2 f(ι) j (80) + X E1 f(ι) q {2},∅ i i q {1},{1} + X E1 f(ι) q {2},{2} i i o kf(ι) kq . ι First, we replace the summation in the last term on the RHS of (80) by the maximum over ι, with proper modifications of the argument from [24] imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 63 in the Banach space setting. Applying Lemma F.4 with s = q/2 and α = 4 conditional on Xn1 , we have X (81) q 2q Ekf(ι) kq ι h  q 4 i X n q 2q o X q ≤ 22q+1 1 + E1 E2 max kf(ι) kq + ( E2 kf(ι) k2 ) 2 . j 2 2 i j By a second application of Lemma F.4 for E1 with s = q/2 and α = 0, we can bound the second term on the RHS of (81) by h i X X X X q q q Ekf(ι) k2 ) 2 . E1 ( E2 kf(ι) k2 ) 2 ≤ 2 E1 max( E2 kf(ι) k2 ) 2 + ( i i j ι j For the first term on the RHS of (81), by Fubini’s theorem to interchange the order of E1 and E2 , we proceed as  q 2q X E2 E1 max kf(ι) kq j 2 i h  q 4 i n q 2q o X q ≤(∗) 2 1 + E2 E1 max kf(ι) kq + ( E1 max kf(ι) k2 ) 2 ι j 2 2 i h  q 4 in q 2q hXX i q o 2 ≤ 2 1+ E max kf(ι) kq + E2 , E1 kf(ι) k2 ι 2 2 j i where in step (∗) a third application of Lemma F.4 is used with s = q/2 and α = 4. By Lemma F.5 with s = q/2 and by Lemma F.4 with s = q/2 and α = 0 both on E2 , we have hXX i q 2 E2 E1 kf(ι) k2 j i h q  q X 2 q ≤ K2 E2 X E1 kf(ι) k2 q 2 + X Ekf(ι) k2 q i 2 2 ι j i q q h X q/2  X q i 2 q 2 2 2 ≤ K3 E2 max E1 kf(ι) k + Ekf(ι) k . j 2 ι i Now, substituting those estimates into (81), it follows that n X q X q (82) Ekf(ι) k2 ) 2 q 2q Ekh(ι) kq ≤ K4q q 2q E max kf(ι) kq + q 2 ( ι i<j h +q q/2 E2 max j X i E1 kf(ι) k2 q/2 ι + E1 max i X E2 kf(ι) k2 q/2 io . j imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 64 CHEN Next, by Lemma F.6, we can replace the q 3q/2 P q E2 f(ι) {1},{1} in (80) by P q 3q/2 q E2 maxj f(ι) {1},{1} , with an additional term ( ι Ekf(ι) k2 )q/2 that have already been subsumed in the previous steps. Similarly, by Lemma P q q F.7, we may replace q q j E2 f(ι) {1},∅ in (80) by q q E2 maxj f(ι) {1},∅ + P P [E2 j (E1 k i f(ι) k)2 ]q/2 and then move the second term to the q q/2 terms. Now, (75) follows from (80) and (82). j Proof of Corollary F.3. By (86) and (87), elementary calculations show that A = O(1), B = O(n1/2 ), C = O(n) for bounded kernels. For D, it is easy to see that h XX i1/2 f(ι) I ,{1} = E2 sup E1 ( φ(f(ι) ))2 (83) 2 φ∈B1∗ i j i1/2 h X i1/2 X X X ≤ E2 E1 k f(ι) k2 ≤ E1 E2 k f(ι) k2 . h i j i j Therefore, D = O(n3/2 ) and (79) follows from (78). Lemma F.4. Let s ≥ 1 and α ≥ 0. Let ξi be nonnegative independent random variables. Then, we have X X  (84) sαs Eξis ≤ 2(1 + sα ) max sαs E max ξis , ( Eξi )s . i i i Proof of Lemma F.4. See equation (2.6) in [24]. Lemma F.5. Let s ≥ 1 and ξi be nonnegative independent random variables. Then, we have X X X  (85) E( ξi )s ≤ (2e)s max ess−1 Eξis , es ( Eξi )s . i i i Proof of Lemma F.5. See [35]. The following Lemma F.6 and F.7 hold for both non-degenerate and canonical V-statistics with the kernel f . Lemma F.6. Let q ≥ 2 and f(ι) {1},{1} be defined in (74). Then, there exists an absolute constant K > 0 such that h i X X q q q 3q/2 E2 f(ι) {1},{1} ≤ K q q 3q/2 E2 max f(ι) {1},{1} +( Ekf(ι) k2 )q/2 . j j ι imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 GAUSSIAN APPROXIMATION FOR HIGH-DIMENSIONAL U-STATISTICS 65 Proof of Lemma F.6. By duality, we have n X o X (1) (1) (1) (1) f(ι) {1},{1} = sup E1 φ(f(ι) )gi (Xi ) : φ ∈ B1∗ , E |gi (Xi )|2 ≤ 1 i i n X 1/2 o = sup E1 φ2 (f(ι) ) : φ ∈ B1∗ . (86) i 2 Therefore, { f(ι) {1},{1} }nj=1 is a sequence of nonnegative independent random variables. By Lemma F.4 with α = 3 and s = q/2, we have X q q 3q/2 E2 f(ι) {1},{1} j h  q 3 ih q 3q/2 E2 max f(ι) ≤ 21+3q/2 1 + j 2 2 By (86), f(ι) 2 {1},{1} ≤ 2 i E1 kf(ι) k P q {1},{1} +( X E2 f(ι) 2 )q/2 {1},{1} j and the lemma follows. Lemma F.7. Let q ≥ 2 and f(ι) {1},∅ be defined in (74). Then, there exists an absolute constant K > 0 such that  X h q/2 i X X q q (E1 k . f(ι) k)2 qq E2 f(ι) {1},∅ ≤ K q q q E2 max f(ι) {1},∅ + E2 j j j i Proof of Lemma F.7. As in the proof of Lemma F.6, by duality we have nX o X (87) f(ι) {1},∅ = E1 sup φ(f(ι) ) : φ ∈ B1∗ = E1 k f(ι) k. i i By Lemma F.4 with α = 2 and s = q/2, we have h X X q q qq E2 f(ι) {1},∅ ≤ K q q q E2 max f(ι) {1},∅ + ( E2 f(ι) j j 2 )q/2 {1},∅ i . j Xiaohui Chen Department of Statistics 725 S. Wright Street Champaign, IL 61820 E-mail: [email protected] imsart-aos ver. 2014/01/08 file: ustat-June-24-2016.tex date: October 4, 2016 i .
10math.ST
arXiv:1711.03239v2 [cs.PL] 17 Nov 2017 Active Learning of Points-To Specifications Osbert Bastani Rahul Sharma Stanford University USA [email protected] Microsoft Research India [email protected] Alex Aiken Percy Liang Stanford University USA [email protected] Stanford University USA [email protected] Abstract static analysis [4, 11, 23, 25, 31, 38]. In particular, tools have been designed to infer properties of missing code, including taint flow properties [13], function models [18, 19], and callback control flow [20]. While these approaches are incomplete, and may not infer sound specifications, current static analyses used in production already rely on user-provided specifications [14], and as we will show, tools that automatically infer specifications can outperform human analysts. We propose an algorithm based on dynamic analysis that infers library specifications summarizing points-to effects relevant to a flow-insensitive points-to analysis. Our algorithm works by iteratively guessing a candidate specification, and then checking whether this candidate is “correct”. More precisely, we want to only infer specifications that must be included in any sound set of specifications, thus avoiding spurious specifications that cause false positives. There are two constraints that make our problem substantially more challenging than previously studied settings: When analyzing programs, large libraries pose significant challenges to static points-to analysis. A popular solution is to have a human analyst provide points-to specifications that summarize relevant behaviors of library code, which can substantially improve precision and furthermore handle missing code such as native code. We propose Atlas, a tool that automatically infers points-to specifications. Atlas synthesizes unit tests that exercise the library code, and then infers points-to specifications based on observations from these executions. Atlas automatically infers specifications for the Java standard library, and produces better results for a client static information flow analysis on a benchmark of 46 Android apps compared to using existing handwritten specifications. 1 Introduction When analyzing programs, dependencies on large libraries can significantly reduce the effectiveness of static analysis, since libraries frequently contain (i) native code that cannot be analyzed, (ii) use of challenging language features such as reflection, and (iii) deep call hierarchies that reduce precision. For example, the implementation of the Vector class in OpenJDK 1.7 uses multiple levels of call indirection and calls the native function System.arrayCopy. A standard workaround is to use specifications that summarize the relevant behaviors of library functions [14, 47]. For a one-time cost of writing specifications for the library, the precision and soundness of the static analysis can improve dramatically when analyzing any client code. However, many libraries contain a large number of functions, making writing specifications for the entire library expensive [8, 47]. Additionally, manually written specifications are often error prone [18]. Finally, every time the library code is updated, the specifications must be updated. To address these issues, approaches have been proposed for automatically inferring specifications for library code, both based on dynamic analysis [3, 7, 29, 34, 35] and on • Points-to effects cannot be summarized for a library function in isolation, e.g., in Figure 1, set, get, and clone all refer to the mutual field f. Furthermore, f is not from the library implementation; it is a ghost field that must be invented by the inference algorithm. Thus, a guessed candidate must simultaneously summarize the points-to effects of set, get, and clone. • In practice it is often difficult or impossible to instrument library code (e.g., native code); we assume only blackbox access. To address these challenges, we introduce path specifications to describe points-to effects of library code. Each path specification summarizes a single points-to effect of a combination of functions. An example is: For two calls box.set(x) and box.get(), the return value of get may alias x. Path specifications have two desirable properties: (i) we can check if a candidate path specification is correct using inputoutput examples, and (ii) correctness of path specifications is independent. These two properties imply that we can infer path specifications incrementally. In particular, we propose an active learning algorithm that infers specifications by Conference’17, July 2017, Washington, DC, USA 2017. ACM ISBN 978-x-xxxx-xxxx-x/YY/MM. . . $15.00 https://doi.org/10.1145/nnnnnnn.nnnnnnn 1 Conference’17, July 2017, Washington, DC, USA boolean test() { Object in = new Object(); // o_in Box box = new Box(); // o_box box.set(in); Object out = box.get(); return in == out; } Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang class Box { // library Object f; void set(Object ob) { f = ob; } Object get() { return f; } Box clone() { Box b = new Box(); // o_clone b.f = f; return b; }} Figure 1. An example of a program using the Box class in the library (right), and the implementation of the library functions set, get, and clone in the Box class. actively identifying promising candidate specifications, and then automatically checking their correctness. We implement our algorithm in a tool called Atlas,1 which infers path specifications for functions in Java libraries. In particular, we evaluate Atlas by using it to infer specifications for the Java standard library, including the Collections API, which contains many functions that exhibit complex points-to effects. We evaluate Atlas using a standard static explicit information flow client [6, 7, 16, 17] on a benchmark of 46 Android apps. Our client uses handwritten points-to specifications for the Java standard library [8, 47]. Over the course of two years, we have handwritten a number of pointsto specifications tailored to finding information flows in apps we analyzed, including those in our benchmark. However, these specifications remain incomplete. We use Atlas to infer specifications for classes in six commonly used packages in the Java standard library. Atlas inferred more than 5× as many specifications as the existing, handwritten ones. We show that using the specifications inferred by Atlas instead of the handwritten ones improves the recall of our information flow client by 52%. Moreover, we manually wrote ground truth specifications for the most frequently used subset of classes in the Collections API, totalling 1,731 lines of code, and show that Atlas inferred the correct specifications (i.e., identical to handwritten ground truth specifications) for 97% of these functions. Finally, we show that on average, using specifications more than halves the number of false positive points-to edges compared to directly analyzing the library implementation— in particular, the library implementation contains deep call hierarchies, which our points-to analysis is insufficiently context-sensitive to handle. Our contributions are: • We introduce path specifications, and prove that they are sufficiently expressive to precisely model the library code when using a standard flow-insensitive points-to analysis. • We formulate the problem of inferring path specifications as a language inference problem and design a novel specification inference algorithm. • We implement our approach in Atlas, and use it to infer a large number of useful specifications for the 1 Atlas Java standard library. In particular, we show that our specification inference tool can automatically replicate and even improve the results of our existing static information flow client. 2 Overview Consider the program test shown in Figure 1. We assume that the static analysis resolves aliasing using Andersen’s analysis [5], a context- and flow-insensitive points-to analysis; our approach also applies to cloning-based context- and object-sensitive extensions [43]. To determine that variables in and out may be aliased, the points-to analysis has to reason about the heap effects of the set and get methods in the Box class. The analyst can write specifications for library functions class that summarize their heap effects with respect to the semantics of the points-to analysis. For example, consider the Stack class in the Java library: its implementation extends Vector, which is challenging to analyze due to deep call hierarchies and native code. The following are the specifications for the Stack class, implemented as code fragments that overapproximate the heap effects of the methods: class Stack { Object f; void push(Object ob) { f = ob; } Object pop() { return f; }} In contrast to the implementation, the specifications for Stack are very simple and easy to analyze. In fact, these specifications are not only sound but also precise, since we are considering a flow-insensitive points-to analysis that collapses arrays into a single field. A typical approach is to write specifications lazily [8, 47]— the analyst examines the program being analyzed, identifies the library functions most relevant to the static analysis, and writes specifications for them. The effort put in writing specifications helps reduce the labor required to discharge false positives.2 The analyst can trade off between manual effort and soundness by expending more effort as needed to increase the completeness of the library specifications. Atlas helps bootstrap the specification writing process by automatically inferring points-to specifications. In accordance with the goal of reducing false positives, Atlas 2 In contrast to the recurring cost of debugging false positives, the cost of implementing specifications is amortized over many programs. stands for AcTive Learning of Alias Specifications. 2 Active Learning of Points-To Specifications Conference’17, July 2017, Washington, DC, USA Testing specifications. Path specifications satisfy two key requirements. The first requirement is that we can check the precision of a single path specification. For example, for the specification s box , consider the program test shown in Figure 1. This unit test satisfies three properties: prioritizes the precision of the inferred specifications by employing a two-phase approach. In the first phase, Atlas infers specifications guaranteed to be precise. In particular, each inferred specification s comes with a witness, which intuitively is a unit test that proves the precision of s by exhibiting the heap effects specified by s. In the second phase, Atlas inductively generalizes the specifications inferred in the first phase, devising a large number of checks to minimize the possibility of imprecision. • It satisfies the assumptions of s box , since thisset and thisget are aliased. • It does not induce any other relations between the variables at the interface of the Box class (i.e., ob, thisset , i, thisget , and r get ). • It returns the consequent of s box , i.e., whether ob and r get point to the same object. Specification search space. The main challenge in inferring points-to specifications is to formulate the search space of candidate specifications. Naïvely searching over the space of code fragments is ineffective because specifications are highly interdependent, i.e., the specification of a library function is dependent on the specifications of other functions. For example, the specifications for each of the methods in the Box class all refer to the shared field f. Thus, to infer precise specifications, the naïve algorithm would have to guess a code fragment for every the functions in the library (or at least in a class) before it can check for precision; the likelihood that it could make a correct guess is tiny. Our key insight is that while specifications cannot be broken at function boundaries, we can decompose them in a different way. In particular, we propose path specifications, which are independent units of points-to effects. Intuitively, a path specification is a dataflow path an object might take through library code. An example of a path specification is s box = ob d thisset → thisget d r get . Since test returns true, any sound set of specifications must include s box , so s box is precise. We refer to such a unit test as a witness for the path specification. In summary, long as we can find a witness for a candidate path specification s, then we can guarantee that s is precise. One caveat is that even if test returns false, s box may still be precise. Therefore, to check if a candidate path specification s is precise, our algorithm can synthesize a unit test P similar to test and execute it. If P returns true, then our algorithm concludes that s is precise; otherwise, it (conservatively) concludes that s is imprecise. Note that s may be precise even if P returns false; this possibility is unavoidable since executions are underapproximations. We use heuristics to ensure that our algorithm rarely concludes that precise specifications are imprecise. We describe our unit test synthesis algorithm in detail in Section 5.4. The second requirement of path specifications that they are independent, i.e., given a set of path specifications for which each specification has a witness, then the set as a whole is precise in the sense that it is a subset of any sound set of path specifications. In other words, we can use a potential witness to check the precision of a path specification in isolation. Thus, our specification inference algorithm can focus on inferring individual path specifications. (1) This path specification roughly has the following semantics: • Suppose that an object o enters the library code as the parameter ob of set; then, it is associated with the receiver thisset of the set method (the edge ob d thisset ). • Suppose that in the client program, thisset is aliased with thisget (the edge thisset → thisget ); then, o enters the get method. • Then, o exits the library as the return value r get of get. Specification inference. Our specification inference algorithm uses two inputs: In particular, the dashed edges ob d thisset and thisget d r get represent the effects of library code, and the solid edge thisset → thisget represents an assumption about the effects of client code. Then, the path specification says that, if the points-to analysis determines that thisget and thisset are aliased, then ob is transfered to r get , which intuitively means that ob is indirectly assigned to r get . More precisely, the semantics of s box is the following logical formula: Alias Transfer (thisset −−−→ thisget ) ⇒ (ob −−−−−−→ r get ). • Library interface: The type signature of each function in the library. • Blackbox access: The ability to execute a library function on a chosen input and obtain the corresponding output. In the first phase (described in Section 5.2), Atlas randomly guesses a candidate path specification s, synthesizes a potential witness for s, and retains s if this unit test returns true. This process is repeated a large number of times to obtain a large but finite set of precise path specifications. In general, to soundly model library code, an infinite number of path specifications may be required. For example, the path specifications required to soundly model set, get, and (2) A Here, an edge x − → y says that program variables x and y satisfy a binary relation A. We describe path specifications in detail in Section 4. 3 Conference’17, July 2017, Washington, DC, USA y ←x (assign) (allocation) Assign (store) Store[f ] o = (x ← X ()) Transfer → ε | Transfer Assign | Transfer Store[f ] Alias Load[f ] New o −−−→ o x −−−−−→ y y .f ← x Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang (load) y ← x .f Load[f ] Transfer → ε | Assign Transfer | Load[f ] Alias Store[f ] Transfer σ (backwards) x −→ y Alias → Transfer New New Transfer σ y −→ x x −−−−−−→ y y ← m(x ) y ← m(x ) (call parameter) (call return) Assign Assign x −−−−−→ pm rm −−−−−→ y x −−−−−−→ y FlowsTo → New Transfer Figure 3. Productions for the context-free grammar C pt . The start symbol of C pt is FlowsTo. Figure 2. Rules for constructing a graph G encoding the relevant semantics of program statements. 3 clone are ob d thisset ( → thisclone d r clone )∗ Background on Points-To Analysis We consider programs with assignments y ← x (where x, y ∈ V are variables), allocations x ← X () (where X ∈ C is a type), stores y.f ← x and loads y ← x .f (where f ∈ F is a field), and calls to library functions y ← m(x) (where m ∈ M is a library function). For simplicity, we assume that each library function m has a single parameter pm and a return value rm . An abstract object o ∈ O is an allocation statement o = (x ← X ()). A points-to edge is a pair x ,→ o ∈ V × O. A static points-to analysis computes points-to edges Π ⊆ V × O. Our results are for Andersen’s analysis, a flowinsensitive points-to analysis [5], but generalize to objectand context-sensitive extensions based on cloning [43]. We describe the formulation of Andersen’s analysis as a contextfree language reachability problem [21, 22, 32, 40, 41]. (3) → thisget d r get . These specifications say that if we call set, then call clone n times in sequence, and finally call get (all with the specified aliasing between receivers and return values), then the parameter ob of set is transfered to the return value of get. Thus, in the second phase (described in Section 5.3), we inductively generalize the set S of path specifications in the first phase to a possibly infinite set. We leverage the idea that a path specification is simply a sequence of variables, ∗ in particular, s ∈ Vpath where Vpath are the variables in the library interface. Thus, a set of path specifications is a formal language over the alphabet Vpath . As a consequence, we can frame the inductive generalization problem as a language inference problem: given (i) the finite set of positive examples from phase one, and (ii) an oracle we can query to determine whether a given path specification s is precise (though this oracle is noisy, i.e., it may return false even if s is precise), ∗ . the goal is to infer a (possibly infinite) language S ⊆ Vpath We devise an active language learning algorithm to solve this problem. Our algorithm proposes candidate inductive generalizations of S, and then checks the precision of these candidates using a large number of synthesized unit tests. Unlike phase one, we may introduce imprecision even if all the unit tests pass; we show empirically that precision is maintained. Finally, our algorithm infers a regular set of path specifications. In theory, no regular set may suffice to model the library code and more expressive language inference techniques might be required [10]. But we find that, in practice, regular sets are sufficient (see Section 7.3). In our example, suppose that phase one infers Graph representation. First, our static analysis constructs a labeled graph G representing the program semantics. The vertices of G are V ∪ O. The edge labels are Σpt = {Assign, New, Store, Load, Assign, New, Load, Store} that encode the semantics of program statements. The rules for constructing G are in Figure 2. For example, the edges extracted for the program test in Figure 1 are the solid edges in Figure 4. Transitive closure. Second, our static analysis computes e of G according to the context-free the transitive closure G α grammar C pt in Figure 3. A path y 99K x in G is a sequence of edges σ1 σ2 σk x −−→ v 1 −−→ ... −−→ y e contains (i) the edges such that α = σ1 ...σk ∈ Σ∗pt . Then, G α σ x− → y in G, and (ii) if there is a path x 99K y in G such that A ∗ A⇒ = α (where A is a nonterminal of C pt ), the edge x − → y. e using dynamic programming; see [26]. We can compute G The first production in Figure 3 constructs the transfer ob d thisset → thisclone d r clone → thisclone d r clone → thisget d r get . Transfer relation x −−−−−−→ y, which says that x may be “indirectly assigned” to y. The second production constructs the “backwards” transfer relation. The third production constructs Then, phase two would inductively generalize it to (3). Finally, our tool automatically converts these path specifications to the equivalent code fragment specifications shown in Figure 1 (right). These code fragment specifications can be used in place of (or in the absence of) library implementations while analyzing a client. Alias the alias relation x −−−→ y, which says that x may alias y. The fourth production computes the points-to relation, i.e., FlowsTo e x ,→ o whenever o −−−−−−→ x ∈ G. 4 Active Learning of Points-To Specifications Conference’17, July 2017, Washington, DC, USA FlowsTo FlowsTo New o in Transfer in Assign Store[f] o box Transfer thisset Assign New Transfer in Assign o box ob r get Transfer New Transfer Assign box Load[f] thisset thisget out Assign Transfer Assign Transfer ob o in out Assign r get New Transfer Assign box thisget Alias Alias Alias Transfer (thisset −−−−→ thisget ) ⇒ (ob −−−−−−→ r get ) e computed by the static analysis with the library code, and the right-hand side Figure 4. The left-hand side shows the graph G e shows G computed with path specifications (the relevant path specification is shown below the graph). The solid edges are the e when graph G extracted from the program test shown in Figure 1. In addition, the dashed edges are a few of the edges in G computing the transitive closure. We omit backward edges (i.e., with labels A) for clarity. Vertices and edges corresponding to library code are highlighted in red. 4 where zi , w i ∈ Vmi for library function mi ∈ M. We require that w i and zi+1 are not both return values, and that w k is a return value. For clarity, we typically use the syntax Path Specifications Suppose that our static analysis could analyze the library implementation, and that while computing the transitive e contains a path closure, G β1 A1 z 1 d w 1 → z 2 d ... d w k −1 → zk d w k . βk Ak −1 Semantics. Given path specification (4), for each i ∈ [k], define the nonterminal Ai in the grammar C pt to be z 1 99K w 1 −−→ ... −−−−→ zk 99K w k . Here, z 1 , w 1 , ..., zk , w k ∈ Vpath , where Vpath contains the parameters and return values of library functions, β 1 , ..., βk ∈ Σ∗pt , A1 , ..., Ak−1 ∈ are nonterminals in C pt , and   Transfer if w i = rmi and zi+1 = pmi +1    Ai = Alias if w i = pmi and zi+1 = pmi +1    Transfer if w i = pm and zi+1 = rm . i i +1  ∗ A⇒ = β 1A1 ...βk −1Ak−1 βk . Also, define the nonterminal A by ( Transfer if z 1 = pm1 A= Alias if z 1 = rm1 . A e Then, our static analysis would add edge z 1 − → w k to G as well. Path specifications ensure that the static analysis computes these edges when the library code is unavailable. In particular, as above, a path specification says that if β1 Then, the path specification corresponds to adding a rule ! k −1 Û Ai A e ⇒ (z 1 − e w i −−→ zi+1 ∈ G → w k ∈ G) βk A1 e z 1 99K w 1 −−→ z 2 , ..., zk 99K w k ∈ G, A e as well. then the static analysis must add z 1 − → w k to G For example, while analyzing test in Figure 1 with the library code on the right available, the analysis sees the path Store[f] Alias (4) i=1 to the static points-to analysis. The rule also adds the backA e but we omit it for clarity. We refer wards edge w k − → z 1 to G, to the antecedent of this rule as the premise of the path specification, and the consequent of this rule as the conclusion of the path specification. Continuing our example, the path specification s box shown in (1) has the semantics Load[f] ob −−−−−−→ thisset −−−→ thisget −−−−−→ r get . ∗ Since Transfer ⇒ = Store[f] Transfer Load[f], the analysis Transfer adds edge ob −−−−−−→ r get . As we describe below, the path specification s box shown in (1) ensures that this edge is added e when the library code is unavailable. to G Alias Transfer (thisset −−−→ thisget ) ⇒ (ob −−−−−−→ r get ). Alias Syntax. Let Vprog be the variables in the program (i.e., excluding variables in the library), let Vm = {pm , rm } be the parameter and Ð return value of library function m ∈ M, and let Vpath = m ∈M Vm be the visible variables (i.e., variables at the library interface). A path specification is a sequence This rule says that if the static analysis computes thisset −−−→ Transfer e then it must add ob −− e For exthisget ∈ G, −−−−→ r get to G. ample, this rule is applied in Figure 4 (right) to compute Transfer ob −−−−−−→ r get . The middle column of Figure 5 shows examples of candidate path specifications for the library code shown in the first column. ∗ z 1w 1z 2w 2 ...zk w k ∈ Vpath , 5 Conference’17, July 2017, Washington, DC, USA Code Fragment Specifications void set(Object ob) { f = ob; } Object get() { return f; } void set(Object ob) { f = ob; } Object clone() { return f; } void set(Object ob) { f = ob; } Object get() { return f; } Box clone() { Box b = new Box(); // ~o_clone b.f = f; return b; }} Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang Candidate Path Specifications Synthesized Unit Test ob d thisset → thisget d r get boolean test() { Object in = new Object(); // o_in Box box = new Box(); // o_box box.set(in); Object out = box.get(); return in == out; } ✓ ob d thisset → thisclone d r clone boolean test() { Object in = new Object(); // o_in Box box = new Box(); // o_box box.set(in); Object out = box.clone(); return in == out; } ✗ ob d thisset ( → thisclone d r clone )∗ → thisget d r get boolean test0() { Object in = new Object(); // o_in Box box0 = new Box(); // o_box box0.set(in); Object out = box0.get(); return in == out; } boolean test1() { Object in = new Object(); // o_in Box box0 = new Box(); // o_box box0.set(in); Box box1 = box0.clone(); Object out = box1.get(); return in == out; } boolean test2() { Object in = new Object(); // o_in Box box0 = new Box(); // o_box box0.set(in); Box box1 = box0.clone(); Box box2 = box1.clone(); Object out = box2.get(); return in == out; } ... ✓ Figure 5. Examples of hypothesized library implementations (left column), an equivalent set of path specifications (middle column), and the synthesized test cases to check the precision of these specifications (right column), with a check mark ✓ (indicating that the tests pass) or a cross mark ✗ (indicating that the tests fail). e∗ (P) denote the true set of relations for a Precision. Let G program P (i.e., relations that hold dynamically for some execution of P); note that because the library code is omitted from analysis, we only include relations between proe∗ (P). Then, given path specifications S, gram variables in G e let G(P, S) denote the points-to edges computed using S for e+ (P, S) = G(P, e S) \ G e∗ (P) be the false positives, and P, let G e− (P, S) = G e∗ (P) \ G(P, e S) be the false negatives. let G e− (P, S) = ∅. We say S and Specification set S is sound if G S ′ are equivalent (written S ≡ S ′) if for very program P, e S) = G(P, e S ′). Finally, S is precise if for every sound G(P, ′ ′ S , S ∪ S ≡ S ′. In other words, using S computes no false positive points-to edges compared to any sound set S ′. We say a single path specification s is precise if {s} is precise. We have the following result, which follows by induction: particular, a program P is a potential witness for a candidate path specification s if P returns true only if s is precise. If P is a potential witness for s, and upon execution, P in fact returns true, then we say P is a witness for s. The last column of Figure 5 shows potential witnesses for the candidate path specification in the middle column; a green check indicates the potential witness returns true (we say P passes), and a red check indicates it returns false or raises an exception (we say P fails). Note that P may return false even if s is precise. This property is inevitable since executions are underapproximations; we show empirically that if s is precise, then typically the potential witness synthesized by our algorithm passes. Soundly and precisely modeling library code. It is not obvious that path specifications are sufficiently expressive to precisely model library code. In this section, we show that path specifications are in fact sufficiently expressive to do so in the case of Andersen’s analysis (and its cloning-based context- and object-sensitive extensions). More precisely, for Theorem 4.1. For any set S of path specifications, if each s ∈ S is precise, then S is precise. Witnesses. Our algorithm needs to synthesize unit tests that check whether a candidate path specification s is precise. In 6 Active Learning of Points-To Specifications Library Interface M (Input) Conference’17, July 2017, Washington, DC, USA Unit Test Synthesis (§5.4) for Noisy Oracle O (§5.1) Learned Automaton M̂ (§5.3) Sampled Positive Examples S 0 (§5.2) Generated Code Fragments C (§A) 5 Specification Inference Algorithm In this section, we describe our algorithm for inferring path specifications. Our system is summarized in Figure 6, which also shows the section where each component is described in detail. 5.1 Overview ∗ be the set of all path specLet the target language S ∗ ⊆ Vpath ifications that are precise. By Theorem 4.1, S ∗ is precise. The goal of our algorithm is to infer a set of path specifications that approximates S ∗ as closely as possible. Figure 6. An overview of our specification inference system. The section describing each component is in parentheses. Inputs. Recall that our algorithm is given two inputs: (i) the library interface, and (ii) blackbox access to the library functions. We use these two inputs to construct the noisy oracle and positive examples as describe below. any implementation of the library, there exists a (possibly infinite) set of path specifications such that the points-to sets computed using path specifications are both sound and at least as precise as analyzing the library implementation: Noisy oracle. Given a path specification s, the noisy oracle ∗ O : Vpath → {0, 1} (i) always returns 0 if s is imprecise, and (ii) ideally returns 1 if s is precise (but may return 0). This oracle is implemented by synthesizing a potential witness P for s and returning the result of executing P. We describe how we synthesize a witness for s in Section 5.4. e be the points-to sets computed with Theorem 4.2. Let G(P) e S) is the library code. Then, there exists S such that G(P, e S) ⊆ G(P). e sound and G(P, We give a proof in Appendix C. Note that the set S of path specifications may be infinite. This infinite blowup is unavoidable since we want the ability to test the precision of an individual path specification. In particular, the library implementation may exhibit effects that require infinitely many unit tests to check precision (e.g., the path specifications shown on the third row of Figure 5). Positive examples. Phase one of our algorithm constructs a set of positive examples: our algorithm randomly samples ∗ , and then uses O to candidate path specifications s ∼ Vpath determine whether each s is precise. More precisely, given ∗ } of random samples, it constructs a set S = {s ∼ Vpath positive examples S 0 = {s ∈ S | O(s) = 1}. We describe how ∗ we sample s ∼ Vpath in Section 5.2. Regular sets of path specifications. Since the library implementation may correspond to an infinite set of path specifications, we need a mechanism for describing such sets. In ∗ , particular, since a path specification is a sequence s ∈ Vpath we can think of a set S of path specifications as a formal ∗ language S ⊆ Vpath over the alphabet Vpath . Then, we can express an infinite set of path specifications using standard representations such as regular expressions or context-free grammars. We make the empirical observation that the set of path specifications corresponding to the library implementation is a regular language. There is no particular reason that this fact should be true, but it holds for all the Java library functions we have examined so far. For example, consider the code fragment shown in the first column of the third row of Figure 5. This specification corresonds to the set of path specifications shown as a regular expression in the middle column of the same line (tokens in the regular expression are highlighted in blue for clarity). Language inference problem. Phase two of our algorithm inductively generalizes S 0 to a regular set of path specifications. We formulate this inductive generalization problem as follows: Definition 5.1. The language inference problem is to, given the noisy oracle O and the positive examples S 0 ⊆ S ∗ , infer a language Sˆ that approximates S ∗ as closely as possible. In Section 5.3, we describe our algorithm for solving this problem. Our algorithm outputs a regular language Sˆ = L(M̂), where M̂ is a finite state automaton—e.g., given S 0 = {ob thisset thisclone r clone thisget r get }, our language inference algorithm returns an automaton encoding the regular language ob thisset (thisclone r clone )∗ thisget r get . 5.2 Sampling Positive Examples ∗ We sample a path specification s ∈ Vpath by building it one variable at a time, starting from s = ε (where ε denotes the empty string). At each step, we ensure that s satisfies the path specification constraints, i.e., (i) zi and w i are parameters or return values of the same library function, (ii) w i and zi+1 Static analysis with path specifications. To perform static analysis with regular sets of path specifications, we convert the path specifications into equivalent code fragments and then analyze the client alongwith the code fragments. We describe our algorithm for doing so in Appendix A. 7 Conference’17, July 2017, Washington, DC, USA Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang Our algorithm initializes M̂ to be the FSA representing the finite language S 0 . In particular, it initializes M̂ to be the prefix tree acceptor [30], which is the FSA where the underlying transition graph is the prefix tree of S 0 , the start state is the root of this prefix tree, and the accept states are the leaves of this prefix tree. Then, our algorithm iteratively considers merging pairs of states of M̂. More precisely, given two states p, q ∈ Q (without loss of generality, assume q , q init ), Merge(M̂, p, q) is the FSA obtained by (i) replacing transitions are not both return values, and (iii) the last variable w k is a return value. In particular, given current sequence s, the set T (s) ⊆ Vpath ∪ {ϕ} of choices for the next variable (where ϕ indicates to terminate and return s) is: • If s = z 1w 1z 2 ...zi , then the choices for w i are T (s) = {pm , rm }, where zi ∈ {pm , rm }. • If s = z 1w 1z 2 ...zi w i , and w i is a parameter, then the choices for zi+1 are T (s) = Vpath . • If s = z 1w 1z 2 ...zi w i , and w i is a return value, then the choices for zi+1 are T (s) = {z ∈ Vpath | z is a parameter} ∪ {ϕ}. σ σ σ (r − → q) becomes (r − → p), At each step, our algorithm samples x ∼ T (s), and either constructs s ′ = sx and continues if x , ϕ or returns s if x = ϕ. We consider two sampling strategies. σ (q − → r ) becomes (p − → r ), (ii) adding p to Q fin if q ∈ Q fin , and (iii) removing q from Q. Our algorithm makes a single pass over all the states Q. We describe how a single step proceeds: let q be the state being processed in the current step, let Q 0 be the states that have been processed so far but not removed from Q, and let M̂ be the current FSA. For each p ∈ Q 0 , our algorithm checks whether merging q and p overgeneralizes the language, and if not, greedily performs the merge. More precisely, for each p ∈ Q 0 , our algorithm constructs Random sampling. We choose x ∼ T (s) uniformly at random at every step. Monte Carlo tree search. We can exploit the fact that certain choices x ∈ T (s) are much more likely to yield a precise path specification than others. To do so, note that our search space is structured as a tree, where each vertex corresponds ∗ , the root corresponds to the prefix ε, edges to a prefix in Vpath are defined by T , and leaves correspond to candidate path specifications. We can sample x ∼ T (s) using Monte Carlo tree search (MCTS) [12], a search algorithm that learns over time which choices are more likely to succeed. In particular, MCTS keeps ∗ track of a score Q(s, x) for every visited s ∈ Vpath and every x ∈ T (s). Then, the choices are sampled according to the distribution Õ ′ 1 Pr[x | s] = e Q (s,x ) where Z = e Q (s,x ) . Z ′ M diff = Merge(M̂, q, p) \ M̂, Whenever a candidate s = x 1 ...x k is found, we increase the score Q(x 1 ...x i , x i+1 ) (for each 0 ≤ i < k) if s is a positive example (O(s) = 1) and decrease it otherwise (O(s) = 0): which represents the set of strings that are added to L(M̂) if q and p are merged. Then, for each s ∈ M diff up to some maximum length N (we take N = 8), our algorithm queries O(s). If all queries pass (i.e., O(s) = 1), then our algorithm greedily accepts the merge, i.e., M̂ ← Merge(M̂, q, p) and continues to the next q ∈ Q. Otherwise, it considers merging q with the next p ∈ Q 0 . Finally, if q is not merged with any state p ∈ Q 0 , then our algorithm does not modify M̂ and adds q to Q 0 . Once it has completed a pass over all states in Q, our algorithm returns M̂. For example, suppose our language learning algorithm is given a single positive example Q(x 1 ...x i , x i+1 ) ← (1 − α)Q(x 1 ...x i , x i+1 ) + α O(s). ob thisset thisclone r clone thisget r get . x ∈ T(s) We choose the learning rate α = 1/2. 5.3 Then, our algorithm constructs the finite state automaton Language Inference Algorithm ob r this this r get thisget clone clone q init −−→ q 1 −−−−−set −→ q 2 −−−−−−−−→ q 3 −−−−−→ q 4 −−−−−−→ q 5 −−−→ q fin . Our language inference algorithm is based on RPNI [30], modified to leverage access to the noisy oracle. In particular, whereas RPNI takes as input a set of negative examples, we use the oracle to generate them on-the-fly. Our algorithm learns a regular language Sˆ = L(M̂) represented by the (nondeterministic) finite state automaton (FSA) M̂ = (Q, Vpath , δ, q init , Q fin ), where Q is the set of states, δ : Q × Vpath → 2Q is the transition function, q init ∈ Q is the start state, and Q fin ⊆ Q are the accept states. If there is a single accept state, we denote it by q fin . We denote transitions σ q ∈ δ (p, σ ) by p − → q. Our algorithm fails to merge q init , q 1 , q 2 , or q 3 with any previous states. It then tries to merge q 4 with each state {q init , q 1 , q 2 , q 3 }; the first two merges fail, but merging q 4 with q 2 produces q init ob q1 thisset q2 r clone thisclone q3 8 thisget q4 r get q fin . Active Learning of Points-To Specifications Conference’17, July 2017, Washington, DC, USA input ob d thisset → thisclone → r clone → thisget → r get analysis to compute relation e for P. Therefore, if P witnesses s, then s is guaranteed to be precise. skeleton ??.add(??); ?? = ??.clone(); ?? = ??.get(??); fill holes list.add(in); List listClone = list.clone(); Object out = listClone.get(??); initialization & scheduling Object in = new Object(); List list = new List() list.add(in); List listClone = list.clone(); Object out = listClone.get(0); return in == out; Skeleton construction. Our algorithm first constructs the skeleton of the unit test. In particular, a witness for s must include a call to each function m 1 , ..., mk , where the variables zi , w i ∈ Vmi are parameters or return values of mi , since the graph G extracted from the unit test must by definition contain edges connecting the w i to zi+1 . For each function call y ← m(x), the argument x and the left-hand side variable y are left as holes ?? to be filled in subsequent steps. Fill holes. Second, our algorithm fills the holes in the skeleton corresponding to reference variables. In particular, for each pair of function calls ??y,i ← mi (??x,i ) and ??y,i+1 ← mi+1 (??x,i+1 ), it fills the holes ??y,i and ??x,i+1 depending Ai on the edge w i −−→ zi+1 : Figure 7. Steps in the witness synthesis algorithm for a candidate path specification for Box. Code added at each step is highlighted in blue. Scheduling is shown in the same line as initialization. • Case Ai = Transfer: In this case, w i is a return value and zi+1 is a parameter. Thus, the algorithm fills ??y,i and ??x,i+1 with the same fresh variable x. • Case Ai = Transfer: This case is analogous to the case Ai = Transfer. • Case Ai = Alias: In this case, w i and zi+1 are both parameters. Thus, the algorithm fills ??y,i and ??x,i+1 with the same fresh variable x, and additionally adds to the test an allocation statement x ← X (). Then, the specifications of length at most N in M diff are ob thisset (thisclone r clone )0 thisget r get ob thisset (thisclone r clone )1 thisget r get ... ob thisset (thisclone r clone )N thisget r get , We show in Theorem 5.2, the added statements ensure that P is a potential witness for s. all of which are accepted by our noisy oracle O. Therefore, our algorithm greedily accepts this merge and continues. The remaining merges fail and our algorithm returns this automaton. 5.4 Initialization. Third, our algorithm initializes the remaining reference variables and primitive variables in the unit test. In particular, function calls y ← mi (x) may have additional parameters that need to be filled. For Theorem 5.2 to hold, we require that remaining reference variables are filled with the value null. However, this approach is likely to synthesize unit tests that fail (by raising exceptions) even when s is precise. Therefore, we alternatively use a heuristic where we allocate a fresh variable for each reference variable. For allocating reference variables that are passed as arguments to constructors, we have to be careful to avoid infinite recursion; for example, a constructor Integer(Integer i); should be avoided. Our algorithm uses a shortest-path algorithm to generate the smallest possible initialization statements; see Appendix B.3 for details. With this approach, we can no longer guarantee that P is a witness and our oracle may be susceptible to false positives. In our evaluation, we show that this heuristic substantially improves recall with no reduction in precision. Primitive variables can be initialized arbitrarily, but the choice of initialization affects whether P is a witness when s is precise. We initialize primitive variables using default values (0 for numeric variables and true for boolean variables) that work well in practice. Unit Test Synthesis We describe how we synthesize a unit test that is a potential witness for a given specification s = (z 1 d w 1 → ... → zk d w k ), relegating  details to Appendix B. Recall that the semantics Ók −1 Ai A e ⇒ (z 1 − e Then, of s are −→ zi+1 ∈ G → w k ∈ G). i=1 w i − consider a program P that satisfies the following properties: • The conclusion of s does not hold statically for P with A e ∅). empty specifications, i.e., z 1 − → w k < G(P, Ai e {s}) • The premise of s holds for P, i.e., w i −−→ zi+1 ∈ G(P, for each i ∈ [k − 1]. A • For every set S of path specifications, if z 1 − → wk ∈ e S), then S ∪ {s} is equivalent to S. G(P, Intuitively, if program P is a potential witness for path spece then ification s with premise ψ and conclusion ϕ = (e ∈ G), s is the only path specification that can be used by the static 9 Conference’17, July 2017, Washington, DC, USA Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang 400,000 we demonstrate the usefulness of the specifications inferred by Atlas for a static information flow analysis, comparing to the existing, handwritten specifications, even though many of these specifications were designed specifically for the apps in our benchmark. Second, we evaluate the precision and recall of Atlas by comparing to ground truth specifications; furthermore, we demonstrate the effectiveness of using specifications by showing that ground truth specifications significantly decreases false positives compared to analyzing the actual library implementation. Finally, we analyze some of the choices made when designing our algorithm. To compare how two different sets of specifications impact the results of a static analysis, we examine the ratio of the sizes of the computed relations. We preprocess these sizes in two ways. First, we only consider relations between program variables. Second, we subtract off trivial relations that can be computed even when no points-to specifications are provided (i.e., all library functions are treated as no-ops with respect to heap effects). For example, for computed points-to edges, the metric we use is Jimple LOC 300,000 200,000 100,000 0 programs Figure 8. Jimple lines of code of the apps in our benchmark. Scheduling. Fourth, our algorithm determines the ordering of the statements in the unit test. There are many possible choices of statement ordering, which affect whether P is a witness when s is precise. There are hard constraints on the ordering (in particular, a variable must be defined before it is used) and soft constraints (in particular, statements corresponding to edges w i → zi+1 for smaller i should occur earlier in P). Our scheduling algorithm produces an ordering that satisfies the hard constraints while trying to satisfy as many soft constraints as possible. It does so using a greedy strategy, i.e., it orders the statements sequentially from first to last, choosing at each step the statement that satisfies the hard constraints and the most soft constraints; see Appendix B.4. R pt (S, S ′) = where Π(S) ⊆ V × O is the set of points-to edges computed using specifications S, and Π(∅) ⊆ V × O is the set of trivial points-to edges. We base our evaluation on a benchmark of Android apps, including a mix of malicious and benign apps given to us by a major security company. These apps include various functionalities, such as games, battery managers, wallpaper apps, flashlights, etc. We show the sizes of these apps in Jimple lines of code (Jimple is the intermediate representation used by Soot) in Figure 8. The malware in this benchmark consist primarily of apps that leak user information, such as contacts, location, or SMS messages. Our information flow client is designed to find such malicious behaviours. Guarantees. Then, we have the following guarantee for the unit test synthesis algorithm: Theorem 5.2. The unit test P synthesized for path specification s is a potential witness for s. We give a proof in Appendix E. 6 Implementation We have implemented our specification inference algorithm as Atlas. We use Atlas to infer specifications for a client static information flow analysis for Android apps [6, 7, 16, 17]. The client is built on Chord [28] modified to use Soot [42] as a backend. It computes an Andersen-style, 1-object-sensitive, flow- and path-insensitive points-to analysis. Based on these points-to sets, it computes an explicit information flow analysis [33], between sources such as location, contacts, and device information, and sinks such as the Internet and SMS messages. Our tool omits analyzing the Java standard library (version 7), and instead analyzes client code and userprovided code fragment specifications. We have handwritten several hundred code fragment specifications, including many written specifically for our benchmark of android apps. 7 |Π(S) \ Π(∅)| , |Π(S ′) \ Π(∅)| 7.1 Comparison to Our Existing Specifications Over the course of two years, we have handwritten points-to specifications for our static information flow client for 90 classes in the Java standard library. These specifications were written as needed for the apps that we analyzed, including the apps in our benchmark. The most time consuming aspect of developing the existing specifications was not writing them (they total a few thousand lines of code), but identifying which functions required summaries. Thus, they cover many fewer functions than the handwritten ground truth specifications described in Section 7.2, but are tailored to finding information flows for apps in our benchmark. We compare the quality of the inferred specifications to these handwritten specifications, in particular, aiming to improve our information flow client. We focus on inferring specifications for the commonly used packages java.lang, java.util, java.io, java.nio, java.net, and java.math; Evaluation In this section, we evaluate the ability of Atlas to infer points-to specifications for the Java standard library. First, 10 Active Learning of Points-To Specifications Conference’17, July 2017, Washington, DC, USA 0.9 5.0 atlas vs. true (points-to) atlas vs. handwritten (flows) 6.0 implementation vs. true (points-to) 1 6.0 4.0 3.0 2.0 1.0 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0.0 programs 0 (a) programs (b) 5.0 4.0 3.0 2.0 1.0 0.0 programs (c) Figure 9. In (a), we show the ratio of nontrivial information flows discovered using Atlas versus existing specifications. We show the ratio of nontrivial points-to edges discovered using (b) Atlas versus ground truth and (c) ground truth versus implementation. The ratios are sorted from highest to lowest for the 46 benchmark programs with nontrivial points-to edges. Note that some values exceeded the graph scale. 7.2 all the specifications we have manually written for the Java standard library are for classes in these packages. Comparison to Ground Truth To evaluate the precision and recall of our inferred specifications, we compare to ground truth specifications. Because of the manual effort required to write ground truth specifications, we do so only for the 12 classes in the Java Collections API that are most frequently used by our benchmark (98.5% of calls to the Collections API target these 12 classes). We focus on the Java Collections API (namely, classes that implement the Collection or Map interfaces), because it requires by far the most complex points-to specifications. Inferred specifications. We used a total of 12 million random samples for phase one, which ran in 44.9 minutes. Phase two of our algorithm ran in 31.0 minutes; the initial FSA had 10,969 states, and the final FSA had 6,855 states. We compare our inferred specifications to the handwritten ones. Most strikingly, Atlas infers 5× as many specifications as the existing, handwritten ones—Atlas infers specifications for 878 library functions, whereas handwritten specifications cover only 159 library functions. Furthermore, Atlas infers 89% of the handwritten specifications. We manually examined the 5 false negatives (i.e., handwritten specifications that Atlas fails to infer) for the Collections API. Each one is due to a false negative in the unit test synthesis. For example, the function subList(int,int) in the List class requires a call of the form subList(0, 1) to retrieve the first object in the list. Similarly, the function set(int,Object) in the List class requires an object to already be in the list or it raises an index out-of-bounds exception. The potential witnesses synthesized by Atlas fail to exercise the relevant behaviors in these instances. Finally, we manually examined more than 200 of the inferred specifications; all of them were precise, which is strong evidence that our tool has very few if any false positives despite the heuristics we employ. Inferred specifications. We examine the top 50 most frequently called functions in our benchmark (in total, accounting for 95% of the function calls). We count a specification as correct if it is identical to the specification we would have written by hand; for specifications with multiple statements, we count each statement fractionally. The recall of our algorithm is 97% (i.e., we inferred the correct specification for 97% of the 50 functions) and the precision is 100% (i.e., each specification is as precise as the true specification). Points-to sets. To show the quality of the specifications inferred by Atlas, we study the ratio R pt (S atlas , S true ) of using specifications inferred by Atlas to using ground truth specifications. We found that using Atlas does not compute a single false positive points-to edge compared to using ground truth specifications, i.e., the precision of Atlas is 100%. Thus, 1−R pt (S atlas , S true ) is the rate of false negative points-to edges when using Atlas. Figure 9 (b) shows R pt (S atlas , S true ) for each app in our benchmark, sorted by magnitude. This ratio is 1.0 for almost half of the programs, i.e., for almost half the programs, there are no false negatives. The median recall is 99.0%, and the average recall is 75.8%. Information flows. To show how Atlas can improve upon our existing handwritten specifications, we study the ratio R flow (S atlas , S hand ) of information flows computed using Atlas versus using the existing, handwritten specifications. A higher ratio (R flow > 1) says that Atlas has higher recall, and a lower ratio (R flow < 1) says that handwritten specifications have higher recall. Figure 9 (a) shows R(S atlas , S hand ). Overall, Atlas finds 52% more information flows compared to the handwritten specifications. The size of this gap is noteworthy because we have already analyzed these apps over the past few years—many of the existing specifications were written specifically for this benchmark. Benefits of using specifications. We show that using specifications can greatly improve the precision and soundness of a static analysis. In particular, we compare the ground truth specifications to the library implementation, i.e., the class files comprising the actual implementation of the Collections API (developed by Oracle). We compute the ratio 11 Conference’17, July 2017, Washington, DC, USA Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang R pt (S impl , S true ) of analyzing the library implementation S impl to analyzing the ground truth specifications S true . This ratio measures the number of false positives due to analyzing the library implementation instead of using ground truth specifications, since every points-to edge computed using the implementation but not the ground truth specifications is a false positive. Figure 9 (c) shows this ratio R pt (S impl , S true ). For a third of programs, the false positive rate is more than 100% (i.e., when R pt ≥ 2), and for four programs, the false positive rate is more than 300% (i.e., R pt ≥ 4). The average false positive rate is 115.2%, and the median is 62.1%. Furthermore, for two of the programs, there are false negatives (i.e., R pt < 1) due to unanalyzable calls to native code. 7.3 the existing, handwritten specifications, and is furthermore very close to ground truth. In addition, we have shown that Atlas can substantially improve recall on an information flow client compared to the handwritten specifications, despite the fact that we have already written specifications specifically for apps in this benchmark. Thus, Atlas substantially improves the practicality of using specifications to model hard-to-analyze code in static analysis. We believe that the remaining gap can be bridged by the human analyst. 8 Inferring specifications for library code. Techniques have been proposed for mining specifications for library code from executions, e.g., taint specifications (i.e., whether taint flows from the argument to the return value) [13], functional specifications of library functions [19], specifications for x86 instructions [18], and specifications for callback control flow [20]. In contrast, points-to specifications that span multiple functions are more complex properties. One approach is to infer points-to specifications using data gathered from deployed instrumented apps [9]. In contrast, our algorithm actively synthesizes unit tests that exercise the library code and requires no instrumentation of deployed apps. Another approach is to interact with a human analyst to infer specifications [1, 8, 47]. These approach guarantee soundness, but still require substantial human effort, e.g., in [8], the analyst may need to write more than a dozen points-to specifications to analyze a single app. Finally, [2] uses a static approach to infer callgraph specifications for library code. Design Choices Finally, we compare the performance of different design choices for our specification inference algorithm; in particular, we infer specifications for 733 library functions in the Java Collections API using different design choices. Positive examples: random sampling vs. MCTS. We sample two million candidate path specifications using each sampling algorithm. Random sampling found 3,124 positive examples, whereas MCTS found 10,153. Object initialization: null vs. instantiation. Each of the 11,613 positive examples passed the unit test constructed using instantiation, but only 7,721 passed when using null initialization, i.e., instantiation finds 50% more specifications. As discussed above, even with this heuristic, we estimate that the false positive rate of our tool is zero. 7.4 Related Work Inferring program properties. There has been work inferring program invariants from executions [29], including approaches using machine learning [34–36]. The most closely related work is [10], which uses an active learning strategy to infer program input grammars for blackbox code. In contrast, our goal is to infer points-to specifications for library code. There has also been work on specifications encoding desired properties of client programs (rather than encoding behaviors of the library code), both using dynamic analysis [7, 11, 23, 25, 31, 38] and using static analysis [4, 45]. Discussion As we have seen, using ground truth substantially improves precision and soundness compared to analyzing the library implementation—for the one-time cost of writing specifications, we can eliminate imprecision due to deep call hierarchies and unsoundness due to native code, dynamically loaded code, reflection, etc. In fact, such an approach is already used in production static analysis systems to handle hard-to-analyze code [14]. However, manually writing specifications that are complete or close to complete is impractical—writing ground truth specifications for just 12 classes took us more than a week of time and contains 1,731 lines of code, but there are more than 4,000 classes in the Java standard library. Typically, manual effort is focused on writing specifications for the most commonly used functions, but this approach leaves a long tail of missing specifications [8]. Moreover, handwritten specifications can be error prone to write [18]. Finally, libraries grow over time—for example, the Java 9 standard library contains more than 2,000 new classes—so specifications must be maintained over time. We have shown that Atlas automatically covers an order of magnitude more of the Java Collections API compared to Static points-to analysis. There is a large literature on static points-to analysis [5, 15, 27, 37, 44], including formulations based on set-constraints and context-free language reachability [21, 22, 32, 41]. Recent work has focused on improving context-sensitivity [24, 39, 40, 43, 46]. Using specifications in conjunction with these analyses can improve precision, scalability, and even soundness. One alternative is to use demand driven static analyses to avoid analyzing the entire library code [41]; however, these approaches are not designed to work with missing code, and furthermore do not provide much benefit for demanding clients that require analyzing a substantial fraction of the library code. 12 Active Learning of Points-To Specifications 9 Conference’17, July 2017, Washington, DC, USA Conclusion [16] Yu Feng, Saswat Anand, Isil Dillig, and Alex Aiken. 2014. Apposcopy: Semantics-based detection of android malware through static analysis. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. ACM, 576–587. [17] Adam P Fuchs, Avik Chaudhuri, and Jeffrey S Foster. 2009. Scandroid: Automated security certification of android. (2009). [18] Stefan Heule, Eric Schkufza, Rahul Sharma, and Alex Aiken. 2016. Stratified synthesis: automatically learning the x86-64 instruction set. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 237–250. [19] Stefan Heule, Manu Sridharan, and Satish Chandra. 2015. Mimic: Computing models for opaque code. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering. ACM, 710–720. [20] Jinseong Jeon, Xiaokang Qiu, Jonathan Fetter-Degges, Jeffrey S Foster, and Armando Solar-Lezama. 2016. Synthesizing framework models for symbolic execution. In Software Engineering (ICSE), 2016 IEEE/ACM 38th International Conference on. IEEE, 156–167. [21] John Kodumal and Alex Aiken. 2004. The set constraint/CFL reachability connection in practice. ACM Sigplan Notices 39, 6 (2004), 207–218. [22] John Kodumal and Alexander Aiken. 2005. Banshee: A scalable constraint-based analysis toolkit. In SAS, Vol. 5. Springer, 218–234. [23] Ted Kremenek, Paul Twohey, Godmar Back, Andrew Ng, and Dawson Engler. 2006. From uncertainty to belief: Inferring the specification within. In Proceedings of the 7th symposium on Operating systems design and implementation. USENIX Association, 161–176. [24] Percy Liang and Mayur Naik. 2011. Scaling abstraction refinement via pruning. In ACM SIGPLAN Notices, Vol. 46. ACM, 590–601. [25] Benjamin Livshits, Aditya V Nori, Sriram K Rajamani, and Anindya Banerjee. 2009. Merlin: specification inference for explicit information flow problems. ACM Sigplan Notices 44, 6 (2009), 75–86. [26] David Melski and Thomas Reps. 2000. Interconvertibility of a class of set constraints and context-free-language reachability. Theoretical Computer Science 248, 1 (2000), 29–98. [27] Ana Milanova, Atanas Rountev, and Barbara G Ryder. 2002. Parameterized object sensitivity for points-to and side-effect analyses for Java. In ACM SIGSOFT Software Engineering Notes, Vol. 27. ACM, 1–11. [28] Mayur Naik, Alex Aiken, and John Whaley. 2006. Effective static race detection for Java. Vol. 41. ACM. [29] Jeremy W Nimmer and Michael D Ernst. 2002. Automatic generation of program specifications. ACM SIGSOFT Software Engineering Notes 27, 4 (2002), 229–239. [30] Jose Oncina and Pedro Garcia. 1992. Identifying regular languages in polynomial time. Advances in Structural and Syntactic Pattern Recognition 5, 99-108 (1992), 15–20. [31] Murali Krishna Ramanathan, Ananth Grama, and Suresh Jagannathan. 2007. Static specification inference using predicate mining. In ACM SIGPLAN Notices, Vol. 42. ACM, 123–134. [32] Thomas Reps. 1998. Program analysis via graph reachability. Information and software technology 40, 11 (1998), 701–726. [33] Andrei Sabelfeld and Andrew C Myers. 2003. Language-based information-flow security. IEEE Journal on selected areas in communications 21, 1 (2003), 5–19. [34] Rahul Sharma and Alex Aiken. 2014. From invariant checking to invariant inference using randomized search. In International Conference on Computer Aided Verification. Springer, 88–105. [35] Rahul Sharma, Aditya V Nori, and Alex Aiken. 2012. Interpolants as classifiers. In International Conference on Computer Aided Verification. Springer, 71–87. [36] Rahul Sharma, Eric Schkufza, Berkeley Churchill, and Alex Aiken. 2013. Data-driven equivalence checking. In ACM SIGPLAN Notices, Vol. 48. ACM, 391–406. [37] Olin Shivers. 1991. Control-flow analysis of higher-order languages. Ph.D. Dissertation. Citeseer. Specifications summarizing the points-to effects of library code can be used to increase precision, recall, and scalability of running a static points-to analysis on any client code. By automatically inferring such specifications, Atlas fully automatically achieves all of these benefits without the typical time-consuming and error-prone process of writing specifications by hand. We believe that Atlas is an important step towards improving the usability of static analysis in practice. References [1] Aws Albarghouthi, Isil Dillig, and Arie Gurfinkel. 2016. Maximal specification synthesis. In ACM SIGPLAN Notices, Vol. 51. ACM, 789– 801. [2] Karim Ali and Ondřej Lhoták. 2013. Averroes: Whole-program analysis without the whole program. In European Conference on Object-Oriented Programming. Springer, 378–400. [3] Rajeev Alur, Pavol Černỳ, Parthasarathy Madhusudan, and Wonhong Nam. 2005. Synthesis of interface specifications for Java classes. ACM SIGPLAN Notices 40, 1 (2005), 98–109. [4] Glenn Ammons, Rastislav Bodík, and James R Larus. 2002. Mining specifications. ACM Sigplan Notices 37, 1 (2002), 4–16. [5] Lars Ole Andersen. 1994. Program analysis and specialization for the C programming language. Ph.D. Dissertation. University of Cophenhagen. [6] Steven Arzt, Siegfried Rasthofer, Christian Fritz, Eric Bodden, Alexandre Bartel, Jacques Klein, Yves Le Traon, Damien Octeau, and Patrick McDaniel. 2014. Flowdroid: Precise context, flow, field, object-sensitive and lifecycle-aware taint analysis for android apps. ACM SIGPLAN Notices 49, 6 (2014), 259–269. [7] Osbert Bastani, Saswat Anand, and Alex Aiken. 2015. Interactively verifying absence of explicit information flows in Android apps. ACM SIGPLAN Notices 50, 10 (2015), 299–315. [8] Osbert Bastani, Saswat Anand, and Alex Aiken. 2015. Specification inference using context-free language reachability. In ACM SIGPLAN Notices, Vol. 50. ACM, 553–566. [9] Osbert Bastani, Lazaro Clapp, Saswat Anand, Rahul Sharma, and Alex Aiken. 2017. Eventually Sound Points-To Analysis with Missing Code. arXiv preprint arXiv:1711.03436 (2017). [10] Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang. 2017. Synthesizing program input grammars. In Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 95–110. [11] Nels E Beckman and Aditya V Nori. 2011. Probabilistic, modular and scalable inference of typestate specifications. In ACM SIGPLAN Notices, Vol. 46. ACM, 211–221. [12] Cameron B Browne, Edward Powley, Daniel Whitehouse, Simon M Lucas, Peter I Cowling, Philipp Rohlfshagen, Stephen Tavener, Diego Perez, Spyridon Samothrakis, and Simon Colton. 2012. A survey of monte carlo tree search methods. IEEE Transactions on Computational Intelligence and AI in Games 4, 1 (2012), 1–43. [13] Lazaro Clapp, Saswat Anand, and Alex Aiken. 2015. Modelgen: mining explicit information flow specifications from concrete executions. In Proceedings of the 2015 International Symposium on Software Testing and Analysis. ACM, 129–140. [14] Facebook. 2017. Adding models. (2017). http://fbinfer.com/docs/ adding-models.html [15] Manuel Fähndrich, Jeffrey S Foster, Zhendong Su, and Alexander Aiken. 1998. Partial online cycle elimination in inclusion constraint graphs. ACM SIGPLAN Notices 33, 5 (1998), 85–96. 13 Conference’17, July 2017, Washington, DC, USA Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang [38] Sharon Shoham, Eran Yahav, Stephen J Fink, and Marco Pistoia. 2008. Static specification mining using automata-based abstractions. IEEE Transactions on Software Engineering 34, 5 (2008), 651–666. [39] Yannis Smaragdakis, George Kastrinis, and George Balatsouras. 2014. Introspective analysis: context-sensitivity, across the board. In ACM SIGPLAN Notices, Vol. 49. ACM, 485–495. [40] Manu Sridharan and Rastislav Bodík. 2006. Refinement-based contextsensitive points-to analysis for Java. In ACM SIGPLAN Notices, Vol. 41. ACM, 387–400. [41] Manu Sridharan, Denis Gopan, Lexin Shan, and Rastislav Bodík. 2005. Demand-driven points-to analysis for Java. In ACM SIGPLAN Notices, Vol. 40. ACM, 59–76. [42] Raja Vallée-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. 1999. Soot-a Java bytecode optimization framework. In Proceedings of the 1999 conference of the Centre for Advanced Studies on Collaborative research. IBM Press, 13. [43] John Whaley and Monica S Lam. 2004. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In ACM SIGPLAN Notices, Vol. 39. ACM, 131–144. [44] Robert P Wilson and Monica S Lam. 1995. Efficient context-sensitive pointer analysis for C programs. Vol. 30. ACM. [45] Jinlin Yang, David Evans, Deepali Bhardwaj, Thirumalesh Bhat, and Manuvir Das. 2006. Perracotta: mining temporal API rules from imperfect traces. In Proceedings of the 28th international conference on Software engineering. ACM, 282–291. [46] Xin Zhang, Ravi Mangal, Radu Grigore, Mayur Naik, and Hongseok Yang. 2014. On abstraction refinement for program analyses in Datalog. ACM SIGPLAN Notices 49, 6 (2014), 239–248. [47] Haiyan Zhu, Thomas Dillig, and Isil Dillig. 2013. Automated inference of library specifications for source-sink property verification. In Asian Symposium on Programming Languages and Systems. Springer, 290– 306. 14 Active Learning of Points-To Specifications A Conference’17, July 2017, Washington, DC, USA Static Points-To Analysis with Regular Sets of Path Specifications z (initial parameter) z In this section, we describe how to run our static pointsto analysis in conjunction with a possibly infinite regular set S of path specifications (assumed to be represented as an FSA, i.e., S = L(M̂)). In particular, our static analysis converts S to a set S˜ of code fragment specifications, which are replacements for the library code that have the same points-to effects as encoded by S. Given path specifications S, our static analysis constructs ˜ i.e., G(P, S) = equivalent code fragment specifications S, ˜ ˜ G(P, S). In other words, S has the same semantics as S with respect to our static points-to analysis. One detail in our def˜ may contain additional inition of equivalence is that G(P, S) vertices corresponding to variables and abstract objects in the code fragment specifications; we omit these extra vertices and their relations at the end of the static analysis. (initial return) z (final return) (Ai = Alias) Converting a Single Path Specification into an equivalent set of code fragment specifications, where Ai = Alias for each i and z 1 is a parameter. Let the code fragment specifications S˜ corresponding to s be: ... mk = {w k ← zk .fk −1 }, z w z w (Ai = Transfer) p− → q −−→ r ∈ M̂, z = pm , w = rm wX(), t ← z.fp , w.fr ← t ∈ m (Ai = Transfer) p− → q −−→ r ∈ M̂, {z, w } ⊆ {pm , rm } z ← X (), t ← w.fr , z.fp ← t ∈ m w q init − → q −−→ q fin ∈ M̂, {z, w } ⊆ {pm , rm } w ←z ∈m Since each fi is a fresh field, there is only one edge labeled Store[fi ] and only one edge labeled Load[fi ]. Thus, this proAlias ˜ and duction can only be triggered if (i) zi −−−→ w i ∈ G(P, S), ˜ = G(P, {s}) ∪ G ′(P, S), ˜ Proposition A.1. We have G(P, S) ′ ˜ ˜ where G (P, S) consists of the edges in G(P, S) that refer to ˜ vertices corresponding to variables and abstract objects in S. Transfer ˜ If triggered, (ii) for some vertex x, x −−−−−−→ ti ∈ G(P, S). Transfer ˜ For the static analysis adds an edge x −−−−−−→ ti+1 to G(P, S). i = 1, the only vertices x satisfying the second condition are Alias ˜ x = z 1 and x = t 1 . By induction, if w i −−−→ zi+1 ∈ G(P, S) for each i, we have ˜ SupProof. (sketch) First, we show that G(P, {s} ⊆ G(P, S). Ai pose that the premise of s holds, i.e., zi −−→ w i+1 ∈ G for Transfer each i. Then, the static analysis computes z 1 −−−−−−→ w k ∈ Transfer ˜ as G(P, {s}); we need to show that z 1 −−−−−−→ w k ∈ G(P, S) well. Note that we have Transfer ˜ z 1 −−−−−−→ ti ∈ G(P, S) Transfer ˜ t j −−−−−−→ ti ∈ G(P, S) Load[f 1 ] for each j ≤ i. None of the ti are part of an Assign edge except t 1 and tk ; for the latter, the production Transfer → Transfer ˜ Transfer Assign triggers and we get z 1 −−−−−−→ w k ∈ G(P, S). ˜ that does not refer to This edge is the only one in G(P, S) vertices extracted from the code fragments, so the claim follows. □ ˜ z 1 −−−−−−→ w 1 −−−→ z 2 −−−−−−→ t 2 ∈ G(P, S) Load[f ] Alias 2 2 ˜ t 2 −−−−−−→ w 2 −−−→ z 3 −−−−−−→ t 3 ∈ G(P, S) ... Load[f w Transfer → Transfer Store[f ] Alias Load[f ]. where f 1 , ...fk−1 ∈ F are fresh fields and t 2 , ..., tk −1 are fresh variables. Then: ] z p− → q −−→ r ∈ M̂, z = pm , w = pm t ← z.fp , w.fr ← t ∈ m Transfer m 2 = {t 2 ← z 2 .f 1 , w 2 .f 2 ← t 2 } Store[f w By induction, the static analysis computes z 1 −−−−−−→ ti ∈ ˜ for each i ∈ [k −1]. Thus, the static analysis computes G(P, S) Transfer ˜ as claimed. z 1 −−−−−−→ w k ∈ G(P, S), ˜ ⊆ G(P, S) ∪ Next, we show the converse, i.e., that G(P, S) ′ ˜ G (P, S). First, note that the only production with Store[f ] is m 1 = {w 1 .f 1 ← z 1 } Store[f ] z p− → q −−→ q fin ∈ M̂, z = rm , w = rm t ← X (), z.fp ← t, w ← t ∈ m Figure 10. Rules for generating code fragment specifications from path specifications defined by a finite state automaton M̂ = (Q, Vpath , δ, q init , Q fin ), where for simplicity we assume M̂ has a single accept state q fin . s = (z 1 d w 1 → ... → zk d w k ) Alias w p− → q −−→ q fin ∈ M̂, z = pm , w = rm w ← z.fp ∈ m z For intuition, we begin by describing how to convert a single path specification Store[f 1 ] w q init − → q −−→ r ∈ M̂, z = rm , w ∈ {pm , rm } t ← X (), z ← t, w.fr ← t ∈ m (final parameter) (initial final) A.1 w q init − → q −−→ r ∈ M̂, z = pm , w ∈ {pm , rm } w.fr ← z ∈ m ] Alias k −1 k −1 ˜ tk −1 −−−−−−−−→ w k −1 −−−→ zk −−−−−−−−→ w k ∈ G(P, S). 15 Conference’17, July 2017, Washington, DC, USA Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang Candidate (Regular Expression) Candidate (Finite State Automaton) ob d thisset → thisget d r get ob d thisset → thisclone d r clone → thisget d r get ∗ q init ob q1 thisset qf thisget q2 q init ob q1 thisset qf thisget q2 r get r get Code Fragments q fin q fin r clone thisclone q3 q init ob q1 ob d thisset → thisget d r get thisset qf thisget q2 r get thisclone q3 + ob d thisset → thisclone d r clone → thisget → r get r clone qg + ob d thisset → thisclone d r clone → thisclone d r clone → thisget d r get thisget thisclone q4 thisget r clone qh q fin void set(Object ob) { f = ob; } Object get() { return f; } void set(Object ob) { f = ob; } Object get() { return f; } Box clone() { Box b = new Box(); // ~o_clone b.f = f; return b; }} void set(Object ob) { f = ob; } Object get() { return f; return g; return h; } Box clone() { Box b = new Box(); // ~o_clone b.g = f; b.h = g; return b; }} Figure 11. Examples of candidate code fragment specifications (left column), and the equivalent path specifications as a regular expression (middle column) and as a finite state automaton (right column). A.2 B Converting a Regular Set of Path Specifications Our construction generalizes straightforwardly to constructing code fragment specifications from M̂. For each state q ∈ Q, we introduce a fresh field fq ∈ F . Intuitively, transitions into q correspond to stores into fq , and transitions coming out of q correspond to loads into fq . In particular, we include statements in m according to the rules in Figure 10. The following guarantee follows similarly to the proof of Proposition A.1: Unit Test Synthesis Algorithm In this section, we describe our algorithm for synthesizing a unit test to check correctness of a candidate path specification. For example, in Figure 12, the synthesized unit test contains exactly the external edges in the candidate’s premise: Alias Transfer thisadd −−−→ thisclone , r clone −−−−−−→ thisget . Upon executing this unit test, the candidate’s conclusion ′ ˜ = G(P, S) ∪ G (P, S), ˜ Proposition A.2. We have G(P, S) ′ ˜ where G (P, S) is defined as before. Transfer in −−−−−−→ out holds dynamically. Therefore, this unit test witnesses the correctness of the given candidate. Our algorithm first constructs a skeleton containing a call to each function in the specification. Then, it (i) fills in holes with variable names, (ii) initializes variables, and (iii) orders (or schedules) statements. The last step also adds a statement returning whether the candidate’s conclusion holds. There are certain constraints on the choices that ensure that the synthesized unit test is a valid witness. Even with these constraints, a number of additional choices remain. Each choice produces a valid unit test, but some of these unit tests may not pass even if the candidate specification is correct. We describe the choices made by our algorithm, which empirically finds almost all correct candidate specifications. In Figure 11, we show examples of path specifications (first column), the corresponding FSA (middle column), and the generated code fragment specifications. For example, in the second line, the transitions ob thisset thisget r get q init −−→ q 1 −−−−−→ q 2 −−−−−→ q 3 −−−→ q fin generate the specifications for set (the first two transitions, with field f = fq2 ) and get (the last two transitions), and the self-loop thisclone r clone q 2 −−−−−−−→ q 6 −−−−→ q 2 generates the specification for clone. 16 Active Learning of Points-To Specifications B.1 Conference’17, July 2017, Washington, DC, USA ob d thisadd → thisclone d r clone → thisget d r get Skeleton Construction To witness correctness of the candidate path specification, the synthesized unit test must exhibit exactly the external edges in its premise. In particular, the unit test must include a call to each function in the candidate. Our algorithm constructs a skeleton consisting of these calls, for example, the skeleton on the second step of Figure 12. A symbol ??, called a hole, is included for each parameter and return value of each function call, and must be filled in with a variable name. B.2 Filling Holes The external edges in the candidate specification impose constraints on the arguments that should be used in each function call. In particular, the synthesized unit test must exhibit every behavior encoded by the external edges in the candidate specification: • Alias: For an aliasing edge pmi −−−→ pmi +1 , the algorithm has to ensure that the arguments pmi (passed to mi ) and pmi +1 (passed to mi+1 ) are aliased. Transfer • Transfer: For a transfer edge rmi −−−−−−→ pmi +1 , the algorithm has to use the return value of mi as the argument passed to mi+1 (and similarly for backwards fill holes list.add(in); List listClone = list.clone(); Object out = listClone.get(??); initialization & scheduling Object in = new Object(); List list = new List() list.add(in); List listClone = list.clone(); Object out = listClone.get(0); return in == out; Then, our algorithm computes the connected components in this graph. For each connected component, the algorithm chooses a fresh variable name, and each hole in that connected component is filled with this variable name. For example, for the candidate in Figure 12, our algorithm computes the following partitions: Transfer transfer edges pmi −−−−−−→ rmi +1 ). For example, the holes in the skeleton in Figure 12 are filled so that the following premises are satisfied: Transfer thisadd −−−→ thisclone , r clone −−−−−−→ thisget . {ob}, {thisadd , thisclone }, {r clone , thisget }, {r get }, One issue is that internal edges may be self-loops, in which case more than two parameters may need to be aliased. For example, consider the following candidate: and fills the corresponding holes with the variables names in, list, listClone, out, ob d thisadd → thisclone d thisid → thisget d r get . ??.add(??); ?? = ??.clone(); ?? = ??.get(??); Figure 12. Steps in the unit test synthesis algorithm (right) for a candidate path specification for List (left). Code added at each step is highlighted in blue. Scheduling is shown in the same line as initialization—it chooses the final order of the statements. This figure is a duplicate of Figure 7, and is shown here for clarity. Alias Alias skeleton respectively. Similarly, for (5), we compute partitions (5) {ob}, {thisadd , thisclone , thisget }, {r clone }, {r get }. For the unit test for this candidate, the three calls to add, clone, and get must all share the same receiver: The variable names are the same as those chosen in Figure 12. list.add(in); List listClone = list.clone(); Object out = list.get(??); B.3 Variable Initialization We describe primitive variables and reference variables separately. For the case of initializing reference variables, we describe two different strategies: • Null: Whenever possible, initialize to null. • Instantiation: Whenever possible, use constructor calls. The first strategy ensures that the unit test does not exhibit additional transfer and alias edges beyond those in the candidate specification. The second strategy may produce a unit test that does not witness correctness, since it may include spurious edges not in the premise of the candidate. However, certain functions require that some of their arguments are not null; for example, the put function in the Hashtable class. We show empirically that the second variant identifies Our algorithm partitions the holes into subsets that must be aliased—since aliasing is a transitive relation, every hole in a subset has to be aliased with every other hole in that subset. To do so, the algorithm constructs an undirected graph where the vertices are the holes, and an edge (h, h ′) ∈ E connects two holes h and h ′ in the following cases: • There is an external edge wmi → zmi +1 in the candidate specification, where h is the hole corresponding to wmi and h ′ is the hole corresponding to zmi +1 . • There is an internal edge pmi d pmi in the candidate specification, where h is the hole corresponding to the pmi on the left-hand side and h ′ is the hole corresponding to the pmi on the right-hand side. 17 Conference’17, July 2017, Washington, DC, USA Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang a number of candidates missed by the first, and that these additional specifications are in fact correct. X1, ..., Xk, we recursively define the constructor Primitive initialization. We initialize all primitive variables with 0 (except characters, which are initialized as ’a’). In our experience, the only important choice of primitive value is the index parameter passed to functions such as get, which retrieve data from collections. Choosing the index = 0 retrieves the single object the unit test previously added to the collection. Testing more primitive values is possible but has so far been unnecessary. Therefore, devising a constructor call to instantiate an object of type X amounts to computing a path in G with root X. Paths to every reachable vertex can be efficiently computed using a standard dynamic programming algorithm. Furthermore, we can add a weight w e to each edge in e ∈ E. Then, the Í shortest path (i.e., the path minimizing the total weight v ∈T eT ,v ) can similarly be efficiently computed. We choose all weights w e = 1 for each e ∈ E. For example, suppose that the List class has a single constructor List(Object val). Then, our algorithm constructs a hypergraph with two vertices and two edges: CT (X) = new X(CT (X1), ..., CT (Xk)). Reference initialization using null. Reference variables for which aliasing relations hold must be instantiated (unless they have already been initialized as the return value of a function call). Any other reference variable is initialized to null. For example, in Figure 12, the variables list and out must be instantiated, but cloneList has already been initialized as the return value of clone. In general, the unit test we synthesize calls the constructor with the fewest number of arguments; primitive arguments are initialized as before, and reference arguments are initialized using null. V = {Object, List} E = {(Object, []), (List, [Object])}. Then, the path corresponding to List is the tree T = which corresponds to the constructor call List Object , new List(new Object()) used to instantiate variables of type List. As with initializing primitive variables, multiple choices of constructor calls could be used, but selecting a single constructor suffices has been sufficient so far. Reference initialization using instantiation. In this approach, we have to synthesize constructor calls when empty constructors are unavailable. For example, if the only constructor for the List class was List(Object val), then we would have to initialize an object of type Object as well: B.4 Statement Scheduling Note that the unit test now contains both function call statements as well as variable initialization statements added in the previous step. All the added variable initialization statements can be executed first, so it suffices to schedule the function call statements. There are two kinds of constraints on scheduling function calls. First, consider edges of the form List list = new List(new Object()); We encode the problem of synthesizing a valid constructor call as a directed hypergraph reachability problem. A directed hypergraph is a pair G = (V , E), where V is a set of vertices, and edges e ∈ E have the form e = (h, B), where h ∈ V is the head of the edge, and B ⊆ V is its body. For our purposes, B is a list rather than a set, and may contain a single vertex multiple times. We construct a hypergraph G = (V , E) where vertices correspond to classes, and edges to constructors: Transfer rmi −−−−−−→ pmi +1 in the premise of the candidate path specification; they impose hard constraints on the schedule, since mi must be called before mi+1 so its return value can be transfered to • Vertices: A vertex v ∈ V is a library class. • Edges: An edge e = (h, B) ∈ E is a constructor, where h is the class of the constructed object and B is the list of classes of the constructor parameters. Transfer pmi +1 (edges of the form pmi −−−−−−→ rmi +1 impose hard constraints as well). For example, in Figure 12, the edge Transfer r clone −−−−−−→ thisget imposes the hard constraint that the call to clone must be scheduled before the call to get. Then, any of the following orderings is permitted: For convenience, we also include primitive types as vertices in G, along with an edge representing the “empty constructor”, which returns the initialization value described above. Now, a path T in the hypergraph G = (V , E) is a finite tree with root vT ∈ V (called the root of the path), such that for each vertex v ∈ T , v and its (ordered) children [v 1 , ..., vk ] are an edge eT ,v = (v, [v 1 , ..., vk ]) ∈ E. Note that for each leaf v of T , there must necessarily be an edge (v, []) ∈ E, since v has no children. Also, we say a vertex v ∈ V is reachable is there exists a path with root v. In our setting, a path in our hypergraph G corresponds to a call to a constructor—for each vertex X ∈ T with children [add, clone, get], [clone, add, get], [clone, get, add]. We use soft constraints to choose among schedules satisfying the hard constraints. Empirically, we observe that the order of the functions in the specification is typically the same as the order in which they must be called for the conclusion to be exhibited dynamically. More precisely, function mi should be called before function m j whenever i < j. In our example, the soft constraint says that add should be scheduled before both clone and get. 18 Active Learning of Points-To Specifications Conference’17, July 2017, Washington, DC, USA ∗ Our algorithm iteratively constructs a schedule [i 1 , ..., i k ] of the function calls F = {m 1 , ..., mk }. At iteration t, it selects the tth function call mi t from the remaining calls Ft ⊆ F . It does so greedily, by identifying the choices G t ⊆ Ft that satisfy the hard constraints, and then selecting mi t ∈ G t to be optimal according to the soft constraints. These conditions uniquely specify mi t , since our soft constraints are a total ordering. Our algorithm keeps track of the remaining statements Ft as a directed acyclic graph (DAG), which includes an edge mi → m j for each hard constraint that mi should be scheduled before m j . Then, G t is the set of roots of Ft . Furthermore, our algorithm maintains G t as a priority queue, where the priority of mi is i (the highest priority element in G t is the element with the smallest index i). We initialize F 1 = F ; then, G 1 is the subset of vertices in F 1 without a parent. Updates are computed as follows: such that A ⇒ = β 1α̃ 1 ...α̃ k −1 βk in C pt , where ( Transfer if z 1 = pm1 A= Alias if z 1 = rm1 and   Assign    α̃ i = Assign    New New  Then, we prove that the conclusion of Theorem 4.2 holds for S constructed with this algorithm. C.2 G ⊆ G(S). In Figure 12, F 1 has three vertices add (priority 1), clone (priority 2), and get (priority 3), and a single edge clone → get, and G 1 includes add and clone. Therefore, the selected schedule is [add, clone, get]. FlowsTo For simplicity, we focus on points-to edges o −−−−−−→ x; the alias and transfer relations follow similarly. Suppose that FlowsTo Proof of Equivalence Theorem α0 β1 α1 βk αk x 99K z 1 99K w 1 99K ... 99K w k 999K y, (6) where α = α 0 β 1α 1 ...βk α k . This decomposition suggests that the following path specification may be applied to derive Assumption C.1. Let Flib be fields accessed by the library and Fprog be fields accessed by the program, and let the shared fields be Fshare = Flib ∩ Fprog . We assume Fshare = ∅. Transfer x −−−−−−→ y: z 1 d w 1 → ... → zk d w k . We can remove this assumption by having the static analysis treat accesses to library fields in the program as calls to getter and setter library functions. (7) At a high level, our proof has two parts. First, we prove the case where the segments of α in the program do not contain field accesses, i.e., α ∈ (Σfree ∪ Σlib )∗ , where Σfree = {Assign, Assign, New, New} Converting the Library Implementation to Path Specifications Σprog = {Store[f ], Load[f ], Store[f ], Load[f ] | f ∈ Fprog } First, we describe how to convert the library implementation into a set S of transfer and proxy object specifications. A specification of the form Σlib = {Store[f ], Load[f ], Store[f ], Load[f ] | f ∈ Flib }. Second, we show how “nesting” of fields allows us to reduce the general case to the case α ∈ (Σfree ∪ Σlib ∪ Σprog )∗ . In particular, by Assumption C.1, the library field accesses and program field accesses do not match one another. As previously discussed, this assumption can be enforced by a purely syntactic program transformation where accesses to library fields in the program are converted into calls to getter and setter functions. z 1 d w 1 → ... → zk d w k . is included in S if there exist paths β1 New o −−−−−−→ y ∈ G(S); then, there must exist a path o −−−→ ∗ α x 99K y, where Transfer ⇒ = α. This path passes into and out of library functions, leading to a decomposition We prove Theorem 4.2, relegating the proof of technical lemmas to Appendix D. To simplify the proof, we assume the following: C.1 Proof Overview Let G denote the points-to sets computed by running the static analysis with the library implementation available, and G(S) denote the points-to sets computed by running the static analysis with the path specifications S. We have to prove that G = G(S); the direction G(S) ⊆ G follows easily, since a path specification s is included in S exactly when the library implementation would imply the same logical formula as the semantics of s. The challenging direction is to show that S is sound, i.e., 1. The highest priority function call mi t in G t is removed from both G t and from Ft . 2. For each child mi of mi t in Ft , we determine if mi is now a root of Ft (i.e., none of its parents are in Ft ). 3. For every child mi that is now a root of Ft , we add mi to G t with priority i. C if w i = pmi and zi+1 = rmi +1 if w i = rmi and zi+1 = pmi +1 if w i = pmi and zi+1 = pmi +1 . βk z 1 99K w 1 , ..., zk 99K w k 19 Conference’17, July 2017, Washington, DC, USA Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang Consider a path of the form (6) such that α ∈ (Σfree ∪ Σlib )∗ . We need to show that in this case, we derive the edge is “equivalent” to α̃ i . Intuitively, for α̃ i = Assign, we show that the sequence of statements represented by α i exhibits the same semantics as a single assignment. For example, y ← x, z ← y has the same points-to effects as z ← x (assuming y is temporary). We leverage the correspondence established by formulating points-to analysis as context-free language reachability: Transfer x −−−−−−→ y ∈ G(S), where S is constructed as in Section C.1. Our proof of this claim relies on two results. The first result says that for such a path, the conclusion of (7) holds when each w i is connected to zi+1 by α i : Proposition C.2. For any path of the form (6) such that α ∈ (Σfree ∪ Σlib )∗ we have (i) the case w i = r i and zi+1 = r i+1 ∗ cannot happen, and (ii) Transfer ⇒ = β 1α 1 β 2 ...α k−1 βk . sequence of statements = sequence α ∈ Σ∗ . For example, the first sequence of statements above corresponds to (Assign Assign), and the second to Assign. Using this correspondence, we can reduce reasoning about sequences of statements with equivalent semantics to studying equivalence classes of strings α ∈ Σ∗ : As a consequence of this result, we know that the path specification (7) is contained in S. The second result says that the premise of (7) holds for our case: Proposition C.3. For any path of the form (7) such that α ∈ (Σfree ∪ Σlib )∗ , we have ∗ Ai ⇒ = αi (∀i ∈ [k − 1]) ∗ (∀i ∈ {0, k}). Ai ⇒ = αi equivalent sequences of statements γ αδ ∈ L(C pt ) ⇔ γ βδ ∈ L(C pt ) (∀γ , δ ∈ Σ∗ ). Theorem C.4. Theorem 4.2 holds for any α ∈ (Σfree ∪ Σlib )∗ . Transfer Proof. Consider an edge x −−−−−−→ y ∈ G derived by the static analysis using the library implementation. We claim that this edge is derived by the static analysis when using γ Transfer β Proof. By definition, γ α βδ ⇔ γ α ′ βδ ⇔ γ α ′ β ′δ . x −−−−−−→ z 1 −−−−−−→ w k −−−−−−→ y ∈ G(S), Transfer so the static analysis derives x −−−−−−→ y ∈ G(S), as claimed. δ □ In particular, Lemma C.5 shows that sequencing is welldefined for equivalence classes: FlowsTo Now, we know that any points-to edge o −−−−−−→ y ∈ G Transfer [α] [β] = [α β], has the form o −−−→ x −−−−−−→ y. Since we have shown Transfer that x −−−−−−→ y ∈ G(S), the static analysis also derives (9) since different choices α ′ ∈ [α] and β ′ ∈ [β] yield the same equivalence class, i.e., [α β] = [α ′ β ′]. Abstractly, Σ∗ is a semigroup, with sequencing as the semigroup operation; then, Lemma C.5 shows the equivalence relation is compatible with the semigroup operation, so the quotient Σ/∼ is a semigroup with semigroup operation (9). For convenience, we let ϕ denote an element of the equivalence class of strings such that □ In the remainder of the section, we introduce the technical machinery that enables us to reason about “equivalence” of the semantics of different sequences of statements. Then, we describe how we prove Propositions C.2 & C.3. Finally, we reduce Theorem 4.2 to Theorem C.4. C.3 γ o 99K v 99K w 99K x, Lemma C.5. If [α] = [α ′] and [β] = [β ′], then [α β] = [α ′ β ′]. Transfer derives its conclusion, i.e., z 1 −−−−−−→ w k ∈ G(S). Therefore, we have o −−−−−−→ y ∈ G(S), so the result follows. δ the first results in x ,→ o if and only if the second does. For example, [Assign Assign] = [Assign]. Then, equivalence is compatible with sequencing: Transfer FlowsTo α o 99K v 99K w 99K x, path specifications, i.e., x −−−−−−→ y ∈ G(S). By Proposition C.2, we conclude that (7) is in S. Furthermore, by Proposition C.3, the premise of (7) holds, so the static analysis New (8) In other words, α can be used interchangeably with β in any string without affecting whether the string is contained in L(C pt ). We use [α] = {β ∈ Σ∗ | α ∼ β } to denote the equivalence class of α ∈ Σ∗ . Then, [α] = [β] if for any two paths Transfer of the path specification (7), i.e., z 1 −−−−−−→ w k ∈ G(S). In summary, we have the following result: Transfer equivalence classes . [α] ⊆ Σ∗ In particular, α, β ∈ Σ∗ are equivalent if Therefore, we can conclude that when running the static analysis using path specifications, we derive the conclusion Transfer = Equivalent Semantics for all γ , δ ∈ Σ∗ , γ ϕδ < L(C pt ). Proving Propositions C.2 & C.3 requires reasoning about the equivalence of the semantics of sequences of statements in P. For example, to prove Proposition C.2, we show that each α i (10) In other words, [ϕ] describes sequences of statements that can never be completed to a valid flows-to path. 20 Active Learning of Points-To Specifications C.4 Conference’17, July 2017, Washington, DC, USA 1. By Lemma C.7, we can write α = γ σ βτδ , where (σ , τ ) ∈ ∆prog and β ∈ (Σfree ∪ Σlib )∗ , such that Proofs of Propositions C.2 & C.3 Now, we describe how to prove that under the conditions of Proposition C.2, [α i ] = [α̃ i ], which suffices to prove the proposition. We focus on the case α̃ i = Assign; the other cases are similar. We need the following technical lemma (we give a proof in Appendix D.1): γ With this lemma, since α̃ i = Assign, wmi = rmi and αi zmi +1 = pmi , so the path wmi 99K zmi +1 has form This procedure must terminate, since α has finitely many pairs of store and load statements. Theorem 4.2 follows. □ Assign wmi = rmi −−−−−→ yi 99K x i+1 −−−−−→ pmi +1 = zmi +1 , D where α i = Assign α i′ Assign. By Lemma C.6, D.1 Since (New α) ∈ L(C pt ), we cannot have [α i ] = [ϕ], so Proof of Lemma C.6 We first show the following lemma, which completely characterizes the subgroupoid of elements Σ∗free ⊆ Σ∗ : [α i ] = [Assign] = [α̃ i ], Lemma D.1. We have as claimed. We have also proven the claim in Proposition C.3 ∗ that Ai ⇒ = α i (with Ai = Transfer) also follows. The other claims in Propositions C.2 & C.3 follow similarly. □ [Assign] [Assign] = [Assign] [Assign] [Assign] = [ϕ] [Assign] [Assign] = [ϕ] Reduction of Theorem 4.2 to Theorem C.4 To handle field accesses, we use the fact that pairs of terminals (Store[f ], Load[f ]) and (Load[f ], Store[f ]) in strings α ∈ L(C pt ) are matching. Therefore, can identify an innermost nested pair (σ , τ ) such that the string β between σ and τ contains no field accesses, i.e., β ∈ Σfree . Furthermore, by Assumption C.1, library field accesses and program field accesses do not match one another. In particular, the set of matching program field accesses is Ø ∆prog = {(Store[f ], Load[f ]), (Load[f ], Store[f ])}. [Assign] [Assign] = [Assign] [Assign] [New New] = [ϕ] [New New] [Assign] = [New New] [Assign] [New New] = [Assign] [New New] [Assign] = [ϕ] [New New] [New New] = [ϕ]. Proof. We show the first relation; the others follow similarly. First, we show that if γ Assign δ ∈ L(C pt ), then γ Assign Assignδ ∈ L(C pt ). There must exist a derivation f ∈ Fprog Lemma C.7. For any α ∈ L(C pt ), either α ∈ (Σfree ∪ Σlib )∗ , or there exists a pair of terminals (σ , τ ) ∈ ∆prog such that α = γ σ βτδ , where γ , δ ∈ Σ∗ and β ∈ (Σfree ∪ Σlib )∗ . FlowsTo ⇒ ... ⇒ Transfer uδ ⇒ Transfer Assign uδ The next step is to characterize [σ βτ ]: Lemma C.8. For any (σ , τ ) ∈ ∆prog and β ∈ (Σfree ∪ Σlib Proof of Technical Lemmas We prove the technical lemmas used in Appendix C. [α i ] = [Assign] [α i′] [Assign] ∈ {[Assign], [ϕ]}. C.5 δ Alias ˜ therefore, 4. By Theorem 4.2, we have w −−−→ t ∈ G(S); Transfer ˜ as well. v 999999K u ∈ G(S) 5. Recursively apply the procedure to α ′ = γ Assign δ . [Assign] [α] [Assign] ∈ {[Assign], [ϕ]}. α i′ τ 2. By Lemma C.8, [σ ] [β] [τ ] = [Assign]. 3. By Lemma C.9, [β] = [New New]. Lemma C.6. For any α ∈ Σ∗free , we have Assign β σ y 99K v − → w 99K t → − u 99K x . ⇒ ... ⇒ γ Assign δ )∗ , since the only production in C pt containing the terminal symbol Assign is Transfer → Transfer Assign. Therefore, the following derivation also exists: [σ ] [β] [τ ] ∈ {[Assign], [ϕ]}. Finally, β must be an aliasing relation: Lemma C.9. For any β ∈ Σ∗ , FlowsTo ⇒ ... ⇒ Transfer δ [Store[f ]] [β] [Load[f ]] = [Assign] ⇒ [β] = [New New] ⇒ Transfer Assign uδ [Load[f ]] [β] [Store[f ]] = [Assign] ⇒ [β] = [New New]. ⇒ Transfer Assign Assign uδ ⇒ ... Now, if α ∈ Σ∗free , we are done. Otherwise, putting the three lemmas together, we perform the following procedure: ⇒ γ Assign Assign δ, 21 Conference’17, July 2017, Washington, DC, USA Osbert Bastani, Rahul Sharma, Alex Aiken, and Percy Liang i.e., γ Assign Assign δ ∈ L(C pt ). By a similar argument, it follows that if γ Assign Assign δ ∈ L(C pt ), then γ Assign δ ∈ L(C pt ), so [Assign] [Assign] = [Assign]. □ Proof. Suppose that γ Store[f ] New New Load[f ] δ ∈ L(C pt ). Then, we must have derivation FlowsTo ⇒ ... ⇒ uγ Transfer uδ ⇒ uγ Store[f ] Alias Load[f ] uδ It follows directly that if α ∈ Σ∗free , then ⇒ ... [α] ∈ {[ϕ], [ϵ], [Assign], [Assign], [New New]}. ⇒ γ Store[f ] α Load[f ] δ, In particular, for α ′ ∈ Σ∗free , [Assign] [α ′] ∈ {[Assign], [ϕ]}, so the lemma follows by taking α ′ = α Assign. □ D.2 so we also have derivation FlowsTo ⇒ ... ⇒ uγ Transfer uδ Proof of Lemma C.7 ⇒ uγ Assign uδ If we replace the terminal symbols σ ∈ Σfree with ϵ in C pt , then C pt is a parentheses matching grammar where each “open parentheses” Store[f ] (resp., Load[f ]) must be matched with a corresponding “closed parentheses” Load[f ] (resp., Store[f ]). Also, by Assumption C.1, Σlib ∩ Σprog = ∅. Now, we prove by induction on the length of α. The base case α = ϵ is clear. If α ∈ Σ∗ does not contain a pair of matched parentheses (Store[f ], Load[f ]) ∈ Σ2prog , then α ∈ (Σfree ∪ Σlib )∗ , so we are done. Otherwise, for any such pair of matched parentheses, we can express α = γ σα ′τδ . By induction, the lemma holds for α ′, so we can write α = γ ′σ ′ β ′τ ′δ ′ as in the lemma. Therefore, we have ⇒ ... ⇒ γ Assign Load[f ] δ . Thus, γ Assign δ ∈ L(C pt ). The converse follows similarly, as does the second claim. □ Lemma D.3. For any β ∈ Σ∗ \ {ϵ }, we have [β] = [Assign] ⇔ β ∈ L(C pt , Transfer) [β] = [Assign] ⇔ β ∈ L(C pt , Transfer) [β] = [New New] ⇔ β ∈ L(C pt , Alias). Proof. We first show the forward implication. If [β] = [Assign], then New Assign ∈ L(C pt ), so New β ∈ L(C pt ). Therefore, there must exist a derivation α = (γ σγ )σ β (τ δ τδ ), ′ ′ ′ ′ ′ so the claim follows. □ D.3 FlowsTo ⇒ New Transfer ⇒ ... ⇒ New β, Proof of Lemma C.8 so β ∈ L(C pt , Transfer). The other two cases follow similarly. Now, we show the backward implication. Suppose that β ∈ L(C pt , Transfer). We prove by structural induction on the derivation of β from Transfer. Since β , ϵ, β cannot have been produced by Transfer ⇒ ϵ. If β is produced by Transfer → Transfer Assign, then β = β ′Assign, where β ′ ∈ L(C pt , Transfer). By induction, [β ′] = [Assign], so We show the case (σ , τ ) = (Store[f ], Load[f ]), where f ∈ Fprog ; the case (σ , τ ) = (Load[f ], Store[f ]) is similar. First, suppose that γ σ βτδ ∈ L(C pt ). Then, there must exist a derivation of form FlowsTo ⇒ ... ⇒ uγ Transfer uδ ⇒ uγ Transfer σ Alias τ uδ [β] = [β ′] [Assign] = [Assign] [Assign] = [Assign], ⇒ ... where the last step follows from Lemma D.1. Next, if β is produced using the production ⇒ γ σ βτδ, so the following derivation exists: Transfer → Transfer Store[f ] Alias Load[f ], FlowsTo ⇒ ... ⇒ uγ Transfer uδ then β = β ′ Store[f ] β ′′ Load[f ], where β ′ ∈ L(C pt , Transfer) and β ′′ ∈ L(C pt , Alias). By induction, [β ′] = [Assign] and [β ′′] = [New New], so ⇒ uγ Transfer Assign uδ ⇒ ... ⇒ γ Assign δ . β = [β ′] [Store[f ]] [β ′′] [Load[f ]] The converse follows similarly, so the claim follows. □ = [Assign] [Store[f ]] [New New] [Load[f ]] D.4 = [Assign], Proof of Lemma C.9 where the last step follows from Lemma D.2 and Lemma D.1. The remaining cases follow similarly. □ We show two preliminary lemmas. Lemma D.2. We have [Store[f ]] [New New] [Load[f ]] = [Assign] Now, suppose that [Store[f ]] [β] [Load[f ]] = [Assign]. Since [Load[f ]] [New New] [Store[f ]] = [Assign]. New Store[f ] New New Load[f ] ∈ L(C pt ), 22 Active Learning of Points-To Specifications Conference’17, July 2017, Washington, DC, USA • Case Ai = Transfer: Then, w i is a return value and zi+1 is a parameter. Then, the unit test synthesis algorithm assigns the return value of mi to the argument of mi+1 , i.e., the edges we have New Store[f ] β Load[f ] ∈ L(C pt ), so the following derivation must exist: FlowsTo ⇒ New Store[f ] Alias Load[f ] Assign ⇒ ... where G is the graph extracted from P. Therefore, we ⇒ New Store[f ] β Load[f ], Transfer have (w i −−−−−−→ zi+1 ) ∈ G(P, ∅). • Case Ai = Transfer: This case is analogous to the case A = Transfer. • Case Ai = Alias: Then, w i and zi+1 are both parameters. Then, w i and zi+1 are both parameters. Then, the unit test synthesis algorithm allocates a new object and passes it as a parameter to each mi and mi+1 , i.e., the edges i.e., β ∈ L(C pt , Alias). Finally, by Lemma D.3, we have [β] = [New New]. The second case follows similarly. □ E Proof of Correctness of Unit Test Synthesis In this section, we sketch a proof of Theorem 5.2, which says that the unit tests synthesized by our algorithm are potential witnesses. E.1 Assign w i −−−−−→ x −−−−−→ zi+1 ∈ G, New Assign New Assign o −−−→ x −−−−−→ w i ∈ G and o −−−→ x −−−−−→ zi+1 ∈ G. General Condition Alias Therefore, we have (w i −−−→ zi+1 ) ∈ G(P, ∅). First, we establish a general condition for P to be a potential witness: Ai Second, consider all edges w −−→ z, where w, z ∈ Vlib and Ai ∈ {Transfer, Transfer, Alias}, that are contained in the premise of s. By inspection, of the edges in G as described above, the only additional edges in G(P, ∅) of this form are: Proposition E.1. Let s be a path specification with premise (e 1 ∈ G) ∧ ... ∧ (ek ∈ G). A program P is a potential witness of s if the set of edges {e 1 , ..., ek } in the premise of s exactly equals   w, z ∈ Vlib and A w− → z ∈ G(P, ∅) . A ∈ {Transfer, Transfer, Alias} Transfer Transfer • The self-loops zi −−−−−−→ zi and w i −−−−−−→ w i (since there is a production Transfer → ϵ in the points-to grammar C pt ). Ai Proof. Let P be a potential witness for s, and suppose that the conclusion of s is (e ∈ G). Let S be a set of path specifications that computes e for P, i.e., e ∈ G(P, S). We need to show that for any such S, S ∪ {s} is equivalent to S. Clearly, S ∪ {s} has higher or equal recall than S, so it suffices to show that it also has higher or equal precision than S. Consider an arbitrary program P ′. Then, if s is used during the computation G(P, S ∪ {s}), then at that point, the premise of s holds for G, i.e., e 1 , ..., ek ∈ G. Since the graph for P is contained in the graph for P ′, and our static analysis is monotone, we have e ∈ G(P, S) ⊆ G(P ′, S), i.e., e is computed without s. Thus, G(P ′, S ∪ {s}) = G(P ′, S), so S ∪ {s} equivalent to S as claimed. □ • The backward edges zi+1 −−→ w i , where we have Ai ∈ {Transfer, Transfer}). If these edges were added to the premise of s for P, then by Proposition E.1, we could conclude that P is a potential witness of s. However, these edges are in G(P, S) for any program P and any specifications S, so we can add them to the premise of s without affecting its semantics. It follows that if P is a witness for s ′, and s ′ is equivalent to s, then P is a witness for s as well. Therefore, P is a witness for s as claimed. □ E.2 Proof Sketch of Theorem 5.2 Let s = z 1 → w 1 d ... → zk d w k . Since the function calls are treated as no-ops by the static analysis (according to the definition of a potential witness), they do not add any edges to the extracted graph G except for assignments to and from parameters and return values. The only other edges in the graph G extracted from P are those corresponding to the allocation statements added to P in the initialization step. First, we show that the edges in the premise of s are contained in G(P, ∅). For an edge w i → zi+1 , there are three possibilities—either Ai = Transfer, Ai = Transfer, or Ai = Alias: 23
6cs.PL
Gayaz Khakimzyanov Institute of Computational Technologies, Novosibirsk, Russia Denys Dutykh CNRS–LAMA, Université Savoie Mont Blanc, France arXiv:1707.01301v1 [physics.flu-dyn] 5 Jul 2017 Oleg Gusev Institute of Computational Technologies, Novosibirsk, Russia Nina Shokina Institute of Computational Technologies, Novosibirsk, Russia Dispersive shallow water wave modelling. Part II: Numerical simulation on a globally flat space arXiv.org / hal Last modified: July 7, 2017 Dispersive shallow water wave modelling. Part II: Numerical simulation on a globally flat space Gayaz Khakimzyanov, Denys Dutykh∗, Oleg Gusev, and Nina Yu. Shokina Abstract. In this paper we describe a numerical method to solve numerically the weakly dispersive fully nonlinear Serre–Green–Naghdi (SGN) celebrated model. Namely, our scheme is based on reliable finite volume methods, proven to be very efficient for the hyperbolic part of equations. The particularity of our study is that we develop an adaptive numerical model using moving grids. Moreover, we use a special form of the SGN equations where non-hydrostatic part of pressure is found by solving a nonlinear elliptic equation. Moreover, this form of governing equations allows to determine the natural form of boundary conditions to obtain a well-posed (numerical) problem. Key words and phrases: nonlinear dispersive waves; moving adaptive grids; finite volumes; conservative finite differences MSC: [2010] 76B15 (primary), 76M12, 65N08, 65N06 (secondary) PACS: [2010] 47.35.Bb (primary), 47.35.Fg (secondary) Key words and phrases. nonlinear dispersive waves; non-hydrostatic pressure; moving adaptive grids; finite volumes; conservative finite differences. ∗ Corresponding author. Dispersive shallow water wave modelling. Part II 3 / 66 Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 Mathematical model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 Well-posedness conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Linear waves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.2 Conservative form of equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Intermediate conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.3 One-dimensional case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Boundary conditions on the elliptic part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Unicity of the elliptic equation solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4 Vector short-hand notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Flat bottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.5 Linear dispersion relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3 Numerical method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1 Adaptive mesh construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Initial grid generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Grid motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.2 The SGN equations on a moving grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.3 Predictor–corrector scheme on moving grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Predictor step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Corrector step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Well-balanced property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.4 Numerical scheme for linearized equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Linear stability of the scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Discrete dispersion relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4 Numerical results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.1 Solitary wave propagation over the flat bottom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Uniform grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Adaptive grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.2 Solitary wave/wall interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Wave action on the wall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.3 Solitary wave/bottom step interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.4 Wave generation by an underwater landslide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.2 Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 A Derivation of the non-hydrostatic pressure equation B Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 References . . . . . . . . . . . . . 57 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Dispersive shallow water wave modelling. Part II 5 / 66 1. Introduction In 1967 D. Peregrine derived the first two-dimensional Boussinesq-type system of equations [117]. This model described the propagation of long weakly nonlinear waves over a general non-flat bottom. From this landmark study the modern era of long wave modelling started. On one hand researchers focused on the development of new models and in parallel the numerical algorithms have been developed. We refer to [20] for a recent ‘reasoned’ review of this topic. The present manuscript is the continuation of our series of papers devoted to the long wave modelling. In the first part of this series we derived the so-called base model [92], which encompasses a number of previously known models (but, of course, not all of nonlinear dispersive systems). The governing equations of the base model are Ht + ∇ · [ HU ] = 0 , p̌ 1 h ∇P (HU )t + (ū · ∇)(HU ) = ∇h − ūt + (ū · ∇)ū + H H H i + H(U · ∇) ū + HU ∇ · ū , (1.1) (1.2) def where U := ū + U is the modified horizontal velocity and U = U (H, ū) is the closure relation to be specified later. Depending on the choice of this variable various models can be obtained (see [92, Section §2.4]). Variables P and p̌ are related to the fluid pressure. The physical meaning of these variables is reminded below in Section 2. In the present paper we propose an adaptive numerical discretization for a particular, but very popular nowadays model which can be obtained from the base model (1.1), (1.2). Namely, if we choose U ≡ 0 (thus, U becomes the depth-averaged velocity u) then we obtain equations equivalent to the celebrated Serre–Green–Naghdi (SGN) equations [72, 126, 127] (rediscovered later independently by many other researchers). This system will be the main topic of our numerical study. Most often, adaptive techniques for dispersive wave equations involve the so-called Adaptive Mesh Refinement (AMR) [121] (see also [15] for nonlinear shallow water equations). The particularity of our study is that we conserve the total number of grid points and the adaptivity is achieved by judiciously redistributing them in space [83, 84]. The ideas of redistributing grid nodes is stemming from the works of Bakhvalov [7], Il’in [85] and others [1, 134]. The base model (1.1), (1.2) admits an elegant conservative form [92]: Ht + ∇ · [ HU ] = 0 , i (H U )t + ∇ · Hū ⊗ U + P(H, ū) · I + H U ⊗ ū = p̌ ∇h , h (1.3) (1.4) where I ∈ Mat 2 × 2 (R) is the identity matrix and the operator ⊗ denotes the tensorial product. We note that the pressure function P(H, ū) incorporates the familiar hydrostatic g H2 well-known from the Nonlinear Shallow Water Equations (NSWE) pressure part 2 G. Khakimzyanov, D. Dutykh, et al. 6 / 66 [11, 43]. By setting U ≡ 0 we obtain readily from (1.3), (1.4) the conservative form of the SGN equations (one can notice that the mass conservation equation (1.1) was already in conservative form). Nonlinear dispersive wave equations represent certain numerical difficulties since they involve mixed derivatives (usually of the horizontal velocity variable, but sometimes of the total water depth as well) in space and time. These derivatives have to be approximated numerically, thus leaving a lot of room for the creativity. Most often the so-called Method Of Lines (MOL) is employed [97, 120, 123, 128], where the spatial derivatives are discretized first and the resulting system of coupled Ordinary Differential Equations (ODEs) is then approached with more or less standard ODE techniques, see e.g. [76, 77]. The MOL separates the choice of time discretization from the procedure of discretization in space, even if the interplay between two schemes might be important. For example, it would be natural to choose the same order of accuracy for both schemes. Let us review the available spatial discretization techniques employed in recent numerical studies. We focus essentially on fully nonlinear weakly dispersive models, even if some interesting works devoted to Boussinesq-type and unidirectional equations will be mentioned. First of all, dispersive wave equations with the dispersion relation given by a rational function (à la BBM [14, 116]) usually involve the inversion of an elliptic operator. This gives the first idea of employing the splitting technique between the hyperbolic and elliptic operators. This idea was successfully realized in e.g. [8, 9, 18, 82]. Historically, perhaps the finite difference techniques were applied first to dispersive (and more general non-hydrostatic) wave equations [24, 35–37, 108, 109, 143, 147]. Then, naturally we arrive to the development of continuous Galerkin/Finite Element type discretizations [2, 17, 45, 47, 114, 131, 139]. See also a recent review [46] and references therein. Pseudospectral Fourier-type methods can also be successfully applied to the SGN equations [52]. See [62] for a pedagogical review of pseudo-spectral and radial basis function methods for some shallow water equations. More recently, the finite volume type methods were applied to dispersive equations [30, 52, 57, 58, 89, 100]. In the present study we also employ a predictor–corrector finite volume type scheme [129], which is described in details below. The present article is organized as follows. In Section 2 we present the governing equations in 2D and 1D spatial dimensions. The numerical method is described in Section 3. Several numerical illustrations are shown in Section 4 including the solitary wave/wall or bottom interactions and even a realistic underwater landslide simulation. Finally, in Section 5 we outline the main conclusions and perspectives of the present study. In Appendices A we provide some details on analytical derivations used in this manuscript. 2. Mathematical model In this study we consider the following system of the Serre–Green–Naghdi (SGN) equations, which describes the incompressible homogeneous fluid flow in a layer bounded from below by the impermeable bottom y = −h(x, t) and above by the free surface 7 / 66 Dispersive shallow water wave modelling. Part II l y O α η (x,t) x u(x,t) d h(x,t) H(x,t) Figure 1. Sketch of the fluid domain in 2D. y = η (x, t), x = (x1 , x2 ) ∈ R2 :   Ht + ∇ · Hu = 0 , (2.1) p̌ ∇P = ∇h , (2.2) ut + (u · ∇) u + H H where for simplicity we drop the bars over the horizontal velocity variable u(x, t) =  def u1 (x, t), u2(x, t) . Function H(x, t) := h(x, t) + η(x, t) being the total water depth. The sketch of the fluid domain is schematically depicted in Figure 1. For the derivation of equations (2.1), (2.2) we refer to the first part of the present series of papers [92]. The depth-integrated pressure P(u, H) is defined as g H2 − ℘(x, t) , 2 where ℘(x, t) is the non-hydrostatic part of the pressure: def P (u, H) := ℘ (x, t) def := H2 H3 R1 + R2 , 3 2 (2.3) with def def R1 := D(∇ · u) − (∇ · u)2 , R2 := D 2 h , def D := ∂t + u · ∇ . Above, D is the total or material derivative operator. On the right hand side of equation def (2.2) we have the pressure trace at the bottom p̌ := p|y = −h , which can be written as p̌ (x, t) = gH − ̺ (x, t) , where ̺(x, t) is again the non-hydrostatic pressure contribution: def ̺ (x, t) := H2 R1 + H R2 . 2 (2.4) 8 / 66 G. Khakimzyanov, D. Dutykh, et al. Equations above are much more complex comparing to the classical NSWE (or SaintVenant equations) [43], since they contain mixed derivatives up to the third order. From the numerical perspective these derivatives have to be approximated. However, the problem can be simplified if we ‘extract’ a second order sub-problem for the non-hydrostatic component of the pressure. Indeed, it can be shown (see Appendix A) that function ℘(x, t) satisfies the following second order linear elliptic equation with variable coefficients (by analogy with incompressible Navier–Stokes equations, where the pressure is found numerically by solving a Poisson-type problem [33, 79]):     ∇h   2 Υ − 3 (∇℘ · ∇h) ∇h ∇℘ ℘ = F , (2.5) − 6 − · + ∇· ∇· H HΥ H3 Υ H2 Υ {z } | (⋆) def where Υ := 4 + | ∇h |2 and F, R are defined as   R ∇h 6R def u u F := ∇ · g ∇η + − + 2 (∇ · u) 2 − 2 1 x1 1 x2 , Υ HΥ u 2 x1 u 2 x2   def R := −g ∇η · ∇h + (u · ∇)∇h · u + htt + 2 u · ∇ht . (2.6) (2.7) Symbol | · | in (2.6) denotes the determinant of a 2 × 2 matrix. Equation (2.5) is uniformly elliptic and it does not contain time derivatives of the fluid velocity u. If the coefficient (⋆) is positive (for instance, it is the case for a flat bottom h(x, t) ≡ const), we deal with a positive operator and stable robust discretizations can be proposed. Taking into account the fact that equation (2.5) is linear with respect to the variable ℘(x, t), its discrete counterpart can be solved by direct or iterative methods∗. Well-posedness of this equation is discussed below (see Section 2.1). The boundary conditions for equation (2.5) will be discussed below in Section 2.3.1 (in 1D case only, the generalization to 2D is done by projecting on the normal direction to the boundary). Introduction of the variable ℘(x, t) allows to rewrite equation (2.2) in the following equivalent form: ut + (u · ∇)u + g ∇H = g ∇h + ∇℘ − ̺ ∇h . H (2.8) The non-hydrostatic pressure at the bottom ̺(x, t) can be expressed through ℘ in the following way: i 1 h 6℘ ℘ ̺(x, t) = + H R + ∇ · ∇h . (2.9) Υ H The derivation of this equation (2.9) is given in Appendix A as well. So, thanks to this relation (2.9), the usage of equation (2.4) is not necessary anymore. Once we found the function ℘(x, t), we can compute the bottom component from (2.9). ∗In our implementation we use the direct Thomas algorithm, since in 1D the resulting linear system of equations is tridiagonal with the dominant diagonal. Dispersive shallow water wave modelling. Part II 9 / 66 Remark 1. It can be easily seen that taking formally the limit ℘ → 0 and ̺ → 0 of vanishing non-hydrostatic pressures, allows us to recover the classical NSWE (or SaintVenant equations) [43]. Thus, the governing equations verify the Bohr correspondence principle [16]. 2.1. Well-posedness conditions In order to obtain a well-posed elliptic problem (2.5), one has to ensure that coefficient (⋆) is positive. This coefficient involves the bathymetry function h(x, t) and the total water depth H(x, t). In other words, the answer depends on local depth and wave elevation. It is not excluded that for some wave conditions the coefficient (⋆) may become negative. In the most general case the positivity condition is trivial and, thus, not very helpful, i.e.  ∇h  2 Υ − 3 (⋆) ≡ > 0. (2.10) · + ∇· H3 Υ H2 Υ On the flat bottom h(x, t) → d = const we know that the above condition is satisfied 1 > 0. Consequently, by continuity of the coefficient (⋆) since Υ → 4 and (⋆) → 2 H3 we conclude that the same property will hold for some (sufficiently small) variations of the depth h(x, t), i.e. | ∇h | ≪ 1. In practice it can be verified that bathymetry variations can be even finite so that condition (2.10) still holds. Remark 2. It may appear that restrictions on the bathymetry variations are inherent to our formulation only. However, it is the case of all long wave models, even if this assumption does not appear explicitly in the derivation. For instance, bottom irregularities will inevitably generate short waves ( i.e. higher frequencies) during the wave propagation process. A priori, this part of the spectrum is not modeled correctly by approximate equations, unless some special care is taken. 2.1.1 Linear waves Let us take the limit of linear waves η → 0 in expression (⋆). It will become then  ∇h  2 Υ − 3 def ⋆ ) := . · + ∇ · (⋆) → (⋆ h3 Υ h2 Υ ⋆ ) then takes the following form: The positivity∗ condition of (⋆    2 Υ + h hx1 x1 1 − h2x1 + h2x2 + hx2 x2 1 + h2x1 − h2x2 − 4 hx1 hx2 hx1 x2 > 0 . If we restrict our attention to the one-dimensional bathymetries (i.e. hx2 → 0), then we obtain an even simpler condition: 2 1 + hx2 , hxx > − · h 1 − hx2 ∗Non-negativity, to be more precise. 10 / 66 G. Khakimzyanov, D. Dutykh, et al. where by x we denote x1 for simplicity. The last condition can be easily checked at the problem outset. A further simplification is possible if we additionally assume that | ∇h | ≡ | hx | < 1 , (2.11) 2 hxx > − . h (2.12) then we have the following elegant condition: 2.2. Conservative form of equations Equations (2.1), (2.2) admit an elegant conservative form, which is suitable for numerical simulations:   Ht + ∇ · Hu = 0 , (2.13) (Hu)t + ∇ · F = g H ∇h + ∇℘ − ̺∇h , (2.14) where the flux matrix F (H, u) is the same as in NSWE (or Saint-Venant equations):   g H2 2 H u1 · u2  def H u1 + 2 . F (H, u) :=  g H2 H u1 · u2 H u22 + 2 Notice that it is slightly different from the (fully-)conservative form given in Part I [92]. Conservative equations∗ (2.13), (2.14) can be supplemented by the energy conservation equation which can be used to check the accuracy of simulation (in conservative case, i.e. ht ≡ 0) and/or to estimate the energy of generated waves [54]: h  Pi = −p̌ ht , (2.15) (H E )t + ∇ · H u E + H where the total energy E is defined as g def (H − 2h) . E := 12 | u | 2 + 61 H 2 (∇ · u)2 + 21 H (Dh) (∇ · u) + 21 (Dh)2 + 2 Notice that equation (2.15) is not independent. It is a differential consequence of the mass and momentum conservations (2.13), (2.14) (as it is the case for incompressible flows in general). 2.2.1 Intermediate conclusions As a result, the system of nonlinear dispersive equations (2.1), (2.2) was split in two main parts: (1) Governing equations (2.13), (2.14) in the form of (hyperbolic) balance laws with source terms ∗It is not difficult to see that the mass conservation equation (2.1) is already in a conservative form in the SGN model. Thus, equations (2.1) and (2.13) are obviously identical. 11 / 66 Dispersive shallow water wave modelling. Part II (2) A scalar nonlinear elliptic equation to determine the non-hydrostatic part of the pressure ℘(x, t) (and consequently ̺(x, t) as well) This splitting idea will be exploited below in the numerical algorithm in order to apply the most suitable and robust algorithm for each part of the solution process [9]. 2.3. One-dimensional case In this study for the sake of simplicity we focus on the two-dimensional physical problem, i.e. one horizontal and one vertical dimensions. The vertical flow structure being resolved using the asymptotic expansion (see Part I [92] of this series of papers), thus we deal with def PDEs involving one spatial (horizontal) dimension (x := x1 ) and one temporal variable t ∈ R+ . The horizontal velocity variable u(x, t) becomes a scalar function in this case. Below we provide the full set of governing equations (which follow directly from (2.13), (2.14) and (2.5)): Ht + [ H u ]x = 0 , h g H2 i = g H hx + (H u)t + H u2 + 2 x   h h i  ℘x  2 Υ − 3 x ℘ = F, − 6 4 · + HΥ x H3 Υ H2 Υ x (2.16) ℘x − ̺ hx , (2.17) (2.18) def where Υ := 4 + h2x and def F := def  R hx gηx + Υ  x − 6R + 2 u2x , HΥ R := −g ηx hx + u2 hxx + htt + 2 u hxt . The last equations can be trivially obtained from corresponding two-dimensional versions given in (2.6), (2.7). This set of equations will be solved numerically below (see Section 3). 2.3.1 Boundary conditions on the elliptic part First, we rewrite elliptic equation (2.18) in the following equivalent form:   K ℘x x − K0 ℘ = F , where (2.19) h 2 Υ − 3  h  i 4 def x . , K0 := 6 + 3 2 HΥ H Υ H Υ x We assume that we have to solve an initial-boundary value problem for the system (2.16)– (2.18). If we have a closed numerical wave tank∗ (as it is always the case in laboratory def K := ∗Other possibilities have to be discussed separately. 12 / 66 G. Khakimzyanov, D. Dutykh, et al. experiments), then on vertical walls the horizontal velocity satisfies: ∀t ∈ R+ . u(x, t) |x = 0 = u(x, t) |x = ℓ ≡ 0, For the situation where the same boundary condition holds on both boundaries, we introduce a short-hand notation: =ℓ u(x, t) |xx = 0 ≡ 0, ∀t ∈ R+ . Assuming that equation (2.8) is valid up to the boundaries, we obtain the following boundary conditions for the elliptic equation (2.18):  x=ℓ  ℘ − ̺h x x − g ηx = 0, ∀t ∈ R+ . H x=0 Or in terms of equation (2.19) we equivalently have: x=ℓ   R hx  6 hx ℘  = g η + K℘ x − x H 2Υ Υ x=0 x=ℓ , x=0 ∀t ∈ R+ . (2.20) The boundary conditions for the non-hydrostatic pressure component ℘ are of the 3rd kind (sometimes they are referred to as of Robin-type). For the case where locally at the =ℓ boundaries the bottom is flat (to the first order), i.e. hx |xx = 0 ≡ 0, then we have the nd (non-homogeneous) Neumann boundary condition of the 2 kind: =ℓ K℘x |x = 0 = g ηx |xx = 0 , x=ℓ ∀t ∈ R+ . For a classical Poisson-type equation this condition would not be enough to have a wellposed problem. However, we deal rather with a Helmholtz-type equation (if K0 > 0). So, the flat bottom does not represent any additional difficulty for us and the unicity of the solution can be shown in this case as well. 2.3.2 Unicity of the elliptic equation solution The mathematical structure of equation (2.19) is very advantageous since it allows to show the following Theorem 1. Suppose that the Boundary Value Problem (BVP) (2.20) for equation (2.19) admits a solution and the following conditions are satisfied: K0 > 0, then this solution is unique. hx |x = 0 > 0, hx |x = ℓ 6 0 , (2.21) Proof. Assume that there are two such solutions ℘1 and ℘2 . Then, their difference def ℘ := ℘1 − ℘2 satisfies the following homogeneous BVP:   K ℘x x − K0 ℘ = 0 , (2.22) x=ℓ  6 hx ℘  ℘ = 0. (2.23) K x − H 2Υ x=0 13 / 66 Dispersive shallow water wave modelling. Part II Let us multiply the first equation (2.22) by ℘ and integrate over the computational domain: ˆ ℓ ˆ ℓ   2 K ℘x x ℘ dx − K0 ℘ dx = 0 . 0 |0 {z } () Integration by parts of the first integral () yields: ˆ ℓ ˆ ℓ x=ℓ 2 2 K ℘x ℘| − K ℘x ℘|x = 0 − K ℘x dx − K0 ℘ dx = 0 . 0 0 And using boundary conditions (2.23) we finally obtain: ˆ ℓ ˆ ℓ x=ℓ 6 hx 6 hx 2 2 2 2 ℘ ℘ − − K ℘x dx − K0 ℘ dx = 0 . H 2Υ H 2Υ 0 0 x=0 Taking into account this Theorem assumptions (2.21) and the fact that K > 0, the last identity leads to a contradiction, since the left hand side is strictly negative. Consequently,  the solution to equation (2.19) with boundary condition (2.20) is unique. Remark 3. Conditions in Theorem 1 are quite natural. The non-negativity of coefficient K0 has already been discussed in Section 2.1. Two other conditions mean that the water depth is increasing in the offshore direction (hx |x = 0 > 0) and again it is decreasing ( hx |x = ℓ 6 0) when we approach the opposite shore. 2.4. Vector short-hand notation For the sake of convenience we shall rewrite governing equations (2.16), (2.17) in the following vectorial form:   v t + F (v) x = G (v, ℘, ̺, h) , (2.24) where we introduced the following vector-valued functions:   ! Hu def def H v := , F (v) :=  2 g H2 , Hu Hu + 2 and the source term is defined as ! def 0 G (v, ℘, ̺, h) := . g H hx + ℘x − ̺hx The point of view that we adopt in this study is to view the SGN equations as a system of hyperbolic equations (2.24) with source terms G (v, ℘x , ̺, h). Obviously, one has to solve also the elliptic equation (2.18) in order to compute the source term G . The Jacobian matrix of the advection operator coincides with that of classical NSWE equations: ! def dF (v) 0 1 A (v) := = . dv −u2 + g H 2u 14 / 66 G. Khakimzyanov, D. Dutykh, et al. Eigenvalues of the Jacobian matrix A (v) can be readily computed: def p λ− = u − s , λ+ = u + s , s := gH. (2.25) The Jacobian matrix appears naturally in the non-divergent form of equations (2.24): v t + A (v) · v x = G , (2.26) By multiplying both sides of the last equation by A (v) we obtain the equations for the advection flux function F (v): Ft + A (v) · Fx = A · G . (2.27) In order to study the characteristic form of equations one needs also to know the matrix of left and right eigenvectors correspondingly: ! ! 1 def def s −1 1 −λ+ 1 L := 2 . (2.28) , R := s 2 −λ− λ+ −λ− 1 If we introduce also the diagonal matrix of eigenvalues ! def λ− 0 Λ := , 0 λ+ the following relations can be easily checked: R·Λ·L ≡ A , R·L = L ·R ≡ I, where I is the identity 2 × 2 matrix. 2.4.1 Flat bottom Equations above become particularly simple on the flat bottom. In this case the bathymetry functions is constant, i.e. h(x, t) ≡ d = const > 0 . Substituting it into governing equations above, we straightforwardly obtain: Ht + [ H u ]x = 0 , h g H2 i 2 (H u)t + H u + = ℘x , 2 x  ℘x  3 ℘ − = g ηxx + 2 u2x . H x H3 15 / 66 Dispersive shallow water wave modelling. Part II Solitary wave solution. Equations above admit an elegant analytical solution known as the solitary wave ∗. It is given by the following expressions: √   3αg υ · η(x, t) 2 η(x, t) = α · sech u(x, t) = x − x0 − υ t , , (2.29) 2dυ d + η(x, t) where α is the wave amplitude, x0 ∈ R is the initial wave position and υ is the velocity defined as def p υ := g (d + α) . The non-hydrostatic pressure under the solitary wave can be readily computed as well: ℘(x, t) = g  H 2 (x, t) − d 2  − d υ u(x, t) . 2 One can derive also periodic travelling waves known as cnoidal waves. For their expressions we refer to e.g. [52, 55]. 2.5. Linear dispersion relation The governing equations (2.16)–(2.18) after linearizations take the following form: ηt + d ux = 0 , ut + g ηx = ℘xx def where c := form √ − 3 d2 ℘ ℘x d , = c2 ηxx , g d is the linear gravity wave speed. By looking for plane wave solutions of η(x, t) = α ei (kx − ω t) u(x, t) = υ ei (kx − ω t) , ℘(x, t) = ρ ei (kx − ω t) ,  where k is the wave number, ω(k) is the wave frequency and α, υ, ρ ∈ R are some (constant) real amplitudes. The necessary condition for the existence of plane wave solutions reads ck ω(k) = ± r . (2.30) (kd)2 1 + 3 2π into the last formula and dividing both sides by By substituting the definition of k = λ k we obtain the relation between the phase speed cp and the wavelength λ:  c def ω k(λ)  . = r cp (λ) := k λ 4π 2 d 2 1 + 3λ2 ∗Solitary , waves are to be distinguished from the so-called solitons which interact elastically [48]. Since the SGN equations are not integrable (for the notion of integrability we refer to e.g. [145]), the interaction of solitary waves is inelastic [114]. 16 / 66 G. Khakimzyanov, D. Dutykh, et al. This dispersion relation is accurate to 2nd order at the limit of long waves kd → 0. There are many other nonlinear dispersive wave models which share the same linear dispersion relation, see e.g. [61, 64, 117, 149]. However, their nonlinear properties might be very different. 3. Numerical method The construction of numerical schemes for hyperbolic conservation laws on moving grids was described in our previous work [94]. In the present manuscript we make an extension of this technology to dispersive PDEs illustrated on the example of the SGN equations (2.16)–(2.18). The main difficulty which arises in the dispersive case is handling of high order (possibly mixed) derivatives. The SGN system is an archetype of such systems with sufficient degree of nonlinearity and practically important applications in Coastal Engineering [96]. 3.1. Adaptive mesh construction In the present work we employ the method of moving grids initially proposed in early 60’s by Tikhonov & Samarskii [135, 136] and developed later by Bakhvalov (1969) [7] and Il’in (1969) [85]. This technology was recently described by the authors to steady [90] and unsteady [94] problems. For more details we refer to our recent publications [90, 94]. An alternative recent approach can be found in e.g. [3, 4]. In the present Section we just recall briefly the main steps of the method. The main idea consists in assuming that there exists a (time-dependent) diffeomorphism def from the reference domain Q := [0, 1] to the computational domain I = [0, ℓ]: x(q, t) : Q 7→ I . It is natural to assume that boundaries of the domains correspond to each other, i.e. x(0, t) = 0 , x(1, t) = ℓ , ∀t > 0 . We shall additionally assume that the Jacobian of this map is bounded from below and above def ∂x 0 < m 6 J(q, t) := 6 M < +∞ (3.1) ∂q by some real constants m and M. The construction of this diffeomorphism x(q, t) is the heart of the matter in the moving grid method. We employ the so-called equidistribution method. The required non-uniform grid Ih of the computational domain I is then obtained as the image of the uniformly distributed nodes Qh under the mapping x(q, t): xj = x(qj , t) , qj = j ∆q , ∆q = 1 , N 17 / 66 Dispersive shallow water wave modelling. Part II where N is the total number of grid points. Notice, that strictly speaking, we do not even need to know the mapping x(q, t) in other points besides {qj }N j=0 . Under condition (3.1) it easily follows that the maximal discretization step in the physical space vanishes when we refine the mesh in the reference domain Qh : max | xj+1 − xj | 6 M ∆q → 0 , j=0 ... ,N −1 as ∆q → 0 . 3.1.1 Initial grid generation Initially, the desired mapping x(q, 0) is obtained as a solution to the following nonlinear elliptic problem   d dx ̟(x) = 0, x(0) = 0, x(1) = ℓ , (3.2) dq dq where we drop in this Section the 2nd constant argument 0. The function ̟(x) is the so-called monitor function. Its choice will be specified below, but we can say that this functions has to be positive defined and bounded from below, i.e. ̟(x) > C > 0 , ∀x ∈ R . In practice the lower bound C is taken for simplicity to be equal to 1. A popular choice of the monitor function is, for example, ϑ0 ∈ R+ , ̟[η](x) = 1 + ϑ0 | η | , where η is the free surface elevation. Another possibility consists in taking into account the free surface gradient: ϑ1 ∈ R+ , ̟[η](x) = 1 + ϑ1 | ηx | , or even both effects: ̟[η](x) = 1 + ϑ0 | η | + ϑ1 | ηx | , ϑ0,1 ∈ R+ . In some simple cases equation (3.2) can be solved analytically (see e.g. [90]). However, in most cases we have to solve the nonlinear elliptic problem (3.2) numerically. For this purpose we use an iterative scheme, where at every stage we have a linear three-diagonal problem to solve: 1 ∆q  (n+1) (n) ̟(xj+1/2 ) xj+1 (n+1) − xj ∆q (n+1) − (n) ̟(xj−1/2 ) xj (n+1) − xj−1 ∆q  = 0, n ∈ N0 . (3.3) The iterations are continued until the convergence is achieved to the prescribed tolerance parameter (typically ∝ 10−10 ). 18 / 66 G. Khakimzyanov, D. Dutykh, et al. 3.1.2 Grid motion In unsteady computations the grid motion is given by the following nonlinear parabolic equation:   ∂ ∂x ∂x ̟(x, t) = β , β ∈ R+ . (3.4) ∂q ∂q ∂t The parameter β plays the rôle of the diffusion coefficient here. It is used to control the smoothness of nodes trajectories. Equation (3.4) is discretized using an implicit scheme:   n+1 xn+1 − xnj xn+1 xn+1 − xn+1 1 j j+1 − xj j j−1 n n ̟j+1/2 = β − ̟j−1/2 , (3.5) ∆q ∆q ∆q τ with boundary conditions xn+1 = 0, xn+1 = ℓ as above. We would like to reiterate 0 N that at every time step we solve only one additional (tridiagonal) linear system. Nonlinear iterative computations are performed only once when we project the initial condition on the ad-hoc non-uniform grid. So, the additional overhead due to the mesh motion is linear in complexity, i.e. O(N). Similarly to the elliptic case (3.2), equation (3.4) admits smooth solutions provided that the monitor function ̟(x, t) is bounded from below by a positive constant. In numerical examples shown below we always take monitor functions which satisfy the condition ̟(x, t) > 1, ∀x ∈ I , ∀t > 0 . Thus, for any t > 0 equation (3.4) provides us the required diffeomorphism between the reference domain Q and the computational domain I. 3.2. The SGN equations on a moving grid Before discretizing the SGN equations (2.16)–(2.18), we have to pose them on the reference domain Q. The composed functions will be denoted as:  def ů(q, t) := (u ◦ x) (q, t) ≡ u x(q, t), t .  def And we introduce similar notations for all other variables, e.g. H̊(q, t) := H x(q, t), t . The conservative (2.24) and non-conservative (2.26), (2.27) forms of hyperbolic equations read:   ˚ − xt v̊ (Jv̊)t + F = G˚, (3.6) q  1 ˚ 1 ˚ Fq − xt v̊ q = G, v̊ t + J J   ˚t + 1 A˚· F ˚q − xt v̊ q = 1 A˚· G˚, F J J where the terms on the right-hand sides are defined similarly as above: ! 0 def G˚ := . ˚ − ˚ g H̊ h̊q + ℘ ̺ h̊q q (3.7) (3.8) 19 / 66 Dispersive shallow water wave modelling. Part II The non-hydrostatic pressure on the bottom is computed in Q space as:  ˚ ˚ h̊  ℘ h̊q2 6℘ def 1 def q q ˚ ̺ := + H̊ R̊ + , Υ̊ := 4 + J2 J2 Υ̊ H̊ (3.9) Finally, we just have to specify the expression for R̊:  i η̊q h̊q ů 2 h h̊q i xt  2 ů − xt h xt def R̊ := −g 2 + + h̊t − h̊q h̊q . · h̊t − + J J J q J J J t q We have to specify also the equations which allow us to find the non-hydrostatic part of ˚ . Equation (2.19) posed on the reference domain Q reads: the pressure field ℘  ˚  ˚ = F̊ , K̊ ℘q q − K̊0 ℘ (3.10) where the coefficients and the right-hand side are defined as   h̊   2 J Υ̊ − 3 4 def def q · + , , K̊0 := 6 K̊ := Υ̊ H̊ 3 J H̊ Υ̊ J H̊ 2 Υ̊ q h η̊ ůq2 R̊ h̊q i 6 R̊ J def q F̊ := g − + + 2 . J J J Υ̊ q H̊ Υ̊ Finally, the boundary conditions are specified now at q = 0 and q = 1. For the hyperbolic part of the equations they are ů(0, t) = 0 ů(1, t) = 0 ∀t > 0 . For the elliptic part we have the following mixed-type boundary conditions:   q=1  q=1  R̊ 1 4 ℘ ˚ ˚ − 6 h̊q ℘ . gη̊q + h̊q = q J Υ̊ J H̊ Υ̊ J H̊ 2 Υ̊ q=0 q=0 (3.11) 3.3. Predictor–corrector scheme on moving grids In this Section we describe the numerical finite volume discretization of the SGN equations on a moving grid. We assume that the reference domain Q is discretized with a def  N uniform grid Qh := qj = j ∆q j = 0 , with the uniform spacing ∆q = N1 . Then, the grid Inh in the physical domain I at every time instance t = t n > 0 is given by the image of the uniform grid Qh under the mapping x(q, t) , i.e. xnj = x(qj , t n ) , j = 0, 1, . . . , N or def  N simply Inh = x(Qh , t n ). We assume that we know the discrete solution∗ v̊ ♯n := v̊ jn j = 0 , def  ˚ n N ˚ n := ℘ ℘j j = 0 at the current time t = tn and we already constructed the non-uniform ♯ def  N grid xn+1 := xn+1 at the following time layer t n+1 using the equidistribution method j ♯ j =0 described above. We remind that the non-uniform grid at the following layer is constructed based only on the knowledge of v̊ ♯n . ∗With symbol ♯ we denote the set of solution values at discrete spatial grid nodes. 20 / 66 G. Khakimzyanov, D. Dutykh, et al. 3.3.1 Predictor step In the nonlinear case, during the predictor step the hyperbolic part of equations is solved two times: def  N −1 • First, using equation (3.7) we compute the discrete solution values v̊ ∗♯, c := v̊ ∗j+1/2 j = 0 def  N −1 in the cell centers Qh, c := qj+1/2 = qj + ∆q . 2 j =0 • Then, using equation (3.8) we compute the values of the flux vector equally in the def  N −1 ˚∗ ˚∗ := . F cell centers F ♯, c j+1/2 j = 0 We rewrite equations (3.7), (3.8) in the characteristic form by multiplying them on the left by the matrix L̊ (of left eigenvectors of the Jacobian A˚):   1 ˚q − xt v̊ q = 1 L̊ · G˚, L̊ · F J J   1 ˚t + ˚q − xt v̊ q = 1 Λ̊ · L̊ · G˚, L̊ · F Λ̊ · L̊ · F J J L̊ · v̊ t + The discretization of last equations reads: 1 n 1  n v̊ ∗j+1/2 − v̊ nj+1/2 ˚q − xt v̊ q , = L̊ · F L̊ · G˚ + τ /2 J J j+1/2 j+1/2 (3.12) ˚∗ ˚n n 1 1 F  n n j+1/2 − Fj+1/2 −1 ˚ ˚ Λ̊ · L̊ · Fq − xt v̊ q Λ̊ · L̊ · G + , = D · L̊ j+1/2 · τ /2 J J j+1/2 j+1/2 (3.13) D−1 · L̊ n · j+1/2 where τ is the time step, L̊nj+1/2 is an approximation of matrix L̊ in the cell centers Qh, c (it will be specified below). The matrix D is composed of cell parameters for each equation: ! ! 1, n −, n 1 + θ 0 1 + λ 0 def def j+1/2 j+1/2 n n Dj+1/2 := , Λ̊j+1/2 := , 2, n n 0 1 + θj+1/2 0 1 + λ+, j+1/2 n with λ±, j+1/2 being the approximations of eigenvalues (2.25) in the cell centers Qh, c (it will be specified below). On the right-hand side the source term is ! 0 def n n G˚j+1/2 := , ˚ − ˚ g H̊ h̊q + ℘ ̺ h̊ q q j+1/2 where derivatives with respect to q are computed using central differences: n ˚ ℘ q, j+1/2 def := ˚n ℘ j+1 ˚n − ℘ j , ∆q def h̊nq, j+1/2 := h̊nj+1 − h̊nj . ∆q 21 / 66 Dispersive shallow water wave modelling. Part II n The value of the non-hydrostatic pressure trace at the bottom ˚ ̺j+1/2 is computed according ˚n in cell centers are computed as: to formula (3.9). Solution vector v̊ n and the fluxes F ♯, c ♯, c ˚n ˚n + def Fj+1 + Fj ˚n := , F . j+1/2 2 2 The derivatives of these quantities are estimated using simple finite differences: n n ˚n ˚n def Fj+1 − Fj def v̊ j+1 − v̊ j ˚n := , F . v̊ nq, j+1/2 := q, j+1/2 ∆q ∆q Finally, we have to specify the computation of some mesh-related quantities: def v̊ nj+1/2 := xnt, j xn+1 − xnj j , := τ def v̊ nj+1 v̊ nj def xnt, j+1/2 := xnt, j + xnt, j , 2 def Jnj+1/2 ≡ xnq, j+1/2 := xnj+1 − xnj . ∆q n The approximation of the matrix of left eigenvectors L̊nj+1/2 and eigenvalues λ±, j+1/2 depends on the specification of the Jacobian matrix A˚n . Our approach consists in choosing the j+1/2 discrete approximation in order to have at discrete level n ˚n F A˚· v̊ q j+1/2 , q, j+1/2 ≡ (3.14) which is the discrete analogue of the continuous identity F̊q ≡ A˚ · v̊ q . Basically, our philosophy consists in preserving as many as possible continuous properties at the discrete level. For example, the following matrix satisfies the condition (3.14): ! n 0 1 n A˚j+1/2 = = R̊ · Λ̊ · L̊ j+1/2 n n n n −uj uj+1 + g Hj+1/2 2 uj+1/2 The matrices Lnj+1/2 and Rnj+1/2 = (Lnj+1/2 )−1 are computed by formulas (2.28). The n Jacobian matrix A˚j+1/2 eigenvalues can be readily computed: q q def def n n n n n n 2 − un un := λ±, := (u ± s) , s (u ) + g H > g Hj+1/2 > 0. j+1/2 j+1/2 j j+1 j+1/2 j+1/2 j+1/2 Thanks to the discrete differentiation rule (3.14), we can derive elegant formulas for the ˚∗ by drastically simplifying the scheme (3.12), (3.13): predicted values v̊ ∗♯, c , F ♯, c h  in τ ¯ v̊ ∗j+1/2 = v̊ − R̊ · D · Λ̊ · P̊ − L̊ · G˚ , (3.15) 2J j+1/2 h  in τ ¯ ∗ ˚ ˚ ˚ Fj+1/2 = F − , (3.16) R̊ · D · Λ̊ · Λ̊ · P̊ − L̊ · G 2J j+1/2 where we introduced two matrices: n def def ¯ n := L̊ · v̊ q j+1/2 . P̊j+1/2 Λ̊nj+1/2 := Λ̊nj+1/2 − xt,nj+1/2 · I , 1,2 Finally, the scheme parameters θj+1/2 are chosen as it was explained in our previous works [94, 129] for the case of Nonlinear Shallow Water Equations. This choice guarantees the TVD property of the resulting scheme. 22 / 66 G. Khakimzyanov, D. Dutykh, et al. ˚∗ , Non-hydrostatic pressure computation. Once we determined the predicted values v̊ ∗♯, c , F ♯, c we have to determine also the predicted value for the non-hydrostatic pressure components ˚ ∗ located in cell centers Q . In order to discretize the elliptic equation (3.10) we apply ℘ h, c ♯, c the same finite volume philosophy. Namely, we integrate equation (3.10) over one cell [qj , qj+1 ]. Right now for simplicity we consider an interior element. The approximation near boundaries will be discussed below. The integral form of equation (3.10) reads ˆ qj+1  qj ˚ ∗  dq K̊ ℘ q q − ˆ qj+1 ˚ ∗ dq K̊0 ℘ ˆ = qj qj+1 (3.17) F̊ dq . qj The coefficients K̊, K̊0 are evaluated using the predicted value of the total water depth n H̊♯,∗ c . If the scheme parameter θj+1/2 ≡ 0 , ∀j = 0, . . . , N − 1, then the predictor value would lie completely on the middle layer t = t n + τ2 . However, this simple choice of n {θj+1/2 }jN=−1 0 does not ensure the desired TVD property [10, 129]. The solution of this integral equation will give us the predictor value for the non˚ ∗ . The finite difference scheme for equation (3.10) is obtained hydrostatic pressure ℘ ♯, c by applying the following quadrature formulas to all the terms in integral equation (3.17): ˆ qj+1  qj ˆ qj+1 qj ˆ qj+1 qj ˚∗ ˚∗ ℘ ℘  − K̊ + K̊ j+3/2 j+1/2 j+3/2 j+1/2 ˚ · K̊ ℘ q q dq ≃ 2 ∆q ∗ K̊j+1/2 + K̊j−1/2 − · 2  ˚ ∗ dq ≃ K̊0 ℘ ∆q · h 12 Jn (H̊ ∗ )3 h + · Υ̊ − 3 i Υ̊ ˚∗ ℘ j+1/2 ˚∗ − ℘ j−1/2 , ∆q j+1/2 3 h̊nq Υ̊ Jn (H̊ ∗ )2 i j+3/2 − h 3 h̊nq Υ̊ Jn (H̊ ∗ )2 i j−1/2  ˚∗ ℘ j+1/2 ,  η̊ ∗  (ů∗ )2  η̊ ∗ R̊ h̊nq  R̊ h̊nq  6 R̊ Jn  q q q − g n + . F̊ dq ≃ ∆q · 2 n − + g n + J J J Υ̊ Jn j+1 Υ̊ Jn j Υ̊ H̊ ∗ j+1/2 In approximation formulas above we introduced the following notations: def K̊j+1/2 := h 4 Υ̊ Jn H̊ ∗ i j+1/2 , def Υ̊j+1/2 := 4 +  h̊n 2 q n J j+1/2 , def Jnj := Jnj+1/2 + Jnj−1/2 2 . 23 / 66 Dispersive shallow water wave modelling. Part II In this way we obtain a three-point finite difference approximation of the elliptic equation (3.10) in interior of the domain, i.e. j = 1, . . . , N − 2 : ˚∗ ˚∗ ˚∗ ˚∗ K̊j+1/2 + K̊j−1/2 ℘j+1/2 − ℘j−1/2 K̊j+3/2 + K̊j+1/2 ℘j+3/2 − ℘j+1/2 · − · 2 ∆q 2 ∆q   n h 12 Jn Υ̊ − 3 i i i h h 3 h̊nq 3 h̊q − ∆q · · = − + j+1/2 Υ̊ (H̊ ∗ )3 Υ̊ Jn (H̊ ∗ )2 j+3/2 Υ̊ Jn (H̊ ∗ )2 j−1/2  (ů∗ )2  η̊ ∗  η̊ ∗ R̊ h̊nq  R̊ h̊nq  6 R̊ Jn  q q q ∆q · 2 n − + g n + − g n + . (3.18) J J J Υ̊ Jn j+1 Υ̊ Jn j Υ̊ H̊ ∗ j+1/2 Two missing equations are obtained by approximating the integral equation (3.17) in intervals adjacent to the boundaries. As a result, we obtain a linear system of equations N −1 ˚∗ where unknowns are {℘ j+1/2 }j = 0 . The approximation in boundary cells will be illustrated on the left boundary [q0 ≡ 0, q1 ]. The right-most cell [qN −1 , qN ≡ 1] can be treated similarly. Let us write down one-sided quadrature formulas for the first cell: K̊3/2 + K̊1/2 · 2 + ˚∗ ℘ 3/2 h ˚∗ ˚∗ − ℘ 4℘ 1/2 q − ∗ ∆q J H̊ Υ̊ {z | 1 3 h̊nq Υ̊ Jn (H̊ ∗ )2 i 3/2 + h q=0 }  h 12 Jn Υ̊ − 3 i ∗ ˚ ℘ − 1/2 ∆q · · 1/2 Υ̊ (H̊ ∗ )3 3 h̊nq Υ̊ Jn (H̊ ∗ )2  (ů∗ )2  η̊ ∗ 6 R̊ Jn  q q = ∆q · 2 n − + g n ∗ J J Υ̊ H̊ 1/2 i  + ˚∗ 6 h̊nq ℘ J (H̊ ∗ )2 Υ̊ q=0 {z } | 2  η̊ ∗ R̊ h̊nq  R̊ h̊nq  q + − g n + J Υ̊ Jn 1 Υ̊ Jn {z | 3 1/2 . q =0 } It can be readily noticed that terms 1 + 2 + 3 vanish thanks to the boundary condition (3.11) (the part at q = 0). The same trick applies to the right-most cell [qN −1 , qN ≡ 1]. We reiterate on the fact that in our scheme the boundary conditions are taken into account exactly. Consequently, in two boundary cells we obtain a two-point finite difference approximation to equation (3.10). The resulting linear system of equations can be solved using e.g. the direct Thomas algorithm with linear complexity O(N). Under 6 0 the numerical solution exists, it is > 0 , h̊q the conditions K̊0 > 0 , h̊q q =0 unique and stable [122]. q=1 24 / 66 G. Khakimzyanov, D. Dutykh, et al. 3.3.2 Corrector step During the corrector step we solve again separately the hyperbolic and elliptic parts of the SGN equations. In order to determine the vector of conservative variables v̊ n+1 we use ♯ an explicit finite volume scheme based on the conservative equation (3.6): ˚∗ − xt · v̊ ∗ F (Jv̊)n+1 − (Jv̊)nj j + τ  j+1/2 ˚∗ − xt · v̊ ∗ F − ∆q  j−1/2 = G˚j∗ , (3.19) where def G˚j∗ :=    0 ,  ˚∗ − ˚ ̺∗ h̊nq + ♭ + ℘ q g H̊ n + ♭ ∗ ˚ ℘ q, j def := ˚∗ ℘ j+1/2 j ˚∗ − ℘ j−1/2 , ∆q and n+1 n+1 n n H̊j+1 + H̊j−1 + 2 H̊jn+1 + 2 H̊jn + H̊j+1 + H̊j−1 , 8 n+1 n+1 n n def h̊j+1 − h̊j−1 + h̊j+1 − h̊j−1 := . 4 ∆q def H̊jn + ♭ := h̊nq + ♭ (3.20) (3.21) The algorithm of the corrector scheme can be summarized as follows: (1) From the mass conservation equations (the first component in (3.19)) we find the total water depth H̊♯n+1 in interior nodes of the grid (2) Using the method of characteristics and the boundary conditions ůn+1 = ůn+1 ≡ 0 0 N n+1 n+1 we determine the total water depth H̊0 , H̊N in boundary points q0 ≡ 0 and qN ≡ 1 (3) Then, using the momentum conservation equation (the second component in (3.19)) we find the momentum values (H̊ ů)n+1 on the next time layer. ♯ In this way, we obtain an explicit scheme despite the fact that the right hand side G˚♯∗ depends on the water depth H̊♯n+1 at the new time layer t = tn+1 . ˚ n+1 is comNon-hydrostatic pressure correction. The non-hydrostatic pressure correction ℘ ♯ puted by integrating locally the elliptic equation (3.10) around each grid point: ˆ qj+1/2  qj−1/2 ˚ n+1  dq − K̊ ℘ q q ˆ qj+1/2 qj−1/2 ˚ n+1 dq = K̊0 ℘ ˆ qj+1/2 qj−1/2 F̊ n+1 dq , j = 1, . . . , N −1 , 25 / 66 Dispersive shallow water wave modelling. Part II The details of integrals approximations are similar to the predictor step described above. Consequently, we provide directly the difference scheme in interior nodes: ˚ n+1 ℘ j+1 ˚ n+1 ˚ n+1 − ℘ ˚ n+1 ℘ − ℘ j j j−1 Kj+1/2 − Kj−1/2 = ∆q ∆q   n+1 n+1  n+1  ( Υ̊ − 3) J h̊ ( Υ̊ − 3) J h̊ q q ˚ − 6 ℘j ∆q = + ∆q − + Υ̊ H̊ 3 Υ̊ J H̊ 2 j−1/2 Υ̊ H̊ 3 Υ̊ J H̊ 2 j+1/2  η̊  ů2  η̊ 6 R̊ J n+1 R̊ h̊q n+1 R̊ h̊q n+1 q q q − + + − g , (3.22) ∆q 2 + g J J J Υ̊ J j+1/2 Υ̊ J j−1/2 Υ̊ H̊ j where 4 def Kj+1/2 := Υ̊ J H̊ n+1 , def Υ̊n+1 j+1/2 := 4+ j+1/2 h h̊n+1 − h̊n+1 i2 j+1 j n+1 xn+1 j+1 − xj , def Jn+1 j+1/2 := n+1 xn+1 j+1 − xj . ∆q In order to complete the scheme description, we have to specify the discretization of the elliptic equation (3.10) in boundary cells. To be specific we take again the left-most cell [q0 ≡ 0, q1/2 ]. The integral equation in this cell reads: ˆ q1/2 ˆ q1/2 ˆ q1/2  ˚ n+1  n+1 ˚ ℘ ℘ K̊ q dq − K̊0 dq = F̊ n+1 dq . q q0 q0 q0 And the corresponding difference equation is K1/2 ˚ n+1 ℘ 1  n+1 ˚ n+1 ˚ n+1 ˚ n+1 ℘ n+1 4℘ − ℘ ( Υ̊ − 3) J h̊ 6 h̊ q q q 0 ˚ − 6 ℘0 = − ∆q + + ∆q Υ̊ H̊ 3 J H̊ Υ̊ q = 0 J H̊ 2 Υ̊ 1/2 J H̊ 2 Υ̊ q = 0 | | {z } {z } 31 32 n+1  n+1  ů2  η̊ R̊ h̊q R̊ h̊q  3 R̊ J  η̊q q q . + − + + ∆q g − g J J J Υ̊ J Υ̊ J q = 0 Υ̊ H̊ 1/2 | {z } 33 By taking into account the boundary condition (3.11) we obtain that three under-braced terms vanish: 31 + 32 + 33 ≡ 0 . A similar two-point approximation can be obtained by integrating over the right-most cell h   ∆q i qN −1/2 , qN ≡ 1 − , 1 . In this way we obtain again a three-diagonal system of 2 linear equations which can be efficiently solved with the Thomas algorithm [81]. 26 / 66 G. Khakimzyanov, D. Dutykh, et al. Stability of the scheme. In order to ensure the stability of (nonlinear) computations, we impose a slightly stricter restriction on the time step τ than the linear analysis given below predicts (see Section 3.4.1). Namely, at every time layer we apply the same restriction as for hyperbolic (non-dispersive) Nonlinear Shallow Water Equations [94]: n, ± max{ Cj+1/2 } 6 1, j n, ± where Cj+1/2 are local Courant numbers [40] which are defined as follows τ h | λ± − xt | in def n, ± := Cj+1/2 . ∆q J j+1/2 3.3.3 Well-balanced property It can be easily established that the predictor–corrector scheme presented above preserves exactly the so-called states ‘lake-at-rest’: Lemma 1. Assume that the bottom is stationary ( i.e. ht ≡ 0 , but not necessary flat) and initially the fluid is at the ‘lake-at-rest’ state, i.e. η̊j0 ≡ 0 , ůj0 ≡ 0 j = 0, 1, 2, . . . , N . (3.23) Then, the predictor–corrector scheme will preserve this state at all time layers. Proof. In order to prove this Lemma, we employ the mathematical induction [80]. First, we have to discuss the generation of the initial grid and how it will be transformed to the next time layer along with the discrete numerical solution: x0♯ ֒→ x1♯ , v̊ 0♯ ֒→ v̊ ∗c, ♯ ֒→ v̊ 1♯ . Then, by assuming that our statement is true at the nth time layer, we will have to show that it is true on the upcoming (n + 1)th layer. This will complete the proof [80]. If the monitoring function ̟(x, t) depends only on the free surface elevation η(x, t) and fluid velocity u(x, t), then the monitoring function ̟(x, t) ≡ 1 thanks to Lemma assumption (3.23). And the equidistribution principle (3.2) will give us the uniform mesh. However, in most general situations one can envisage the grid adaptation upon the bathymetry profile∗ h(x, t). Consequently, in general we can expect that the mesh will be non-uniform even under condition (3.23), since hx 6= 0 . However, we know that the initial grid satisfies the fully converged discrete equidistribution principle (3.3). From now on we assume that the initial grid is generated and it is not necessarily uniform. In order to construct the grid at the next layer, we solve just one linear equation (3.5). Since, system (3.5) is diagonally dominant, its solution exists and it is unique [122]. It is not difficult to check that the set of values {xj1 ≡ xj0 }N j = 0 solves the system (3.5). It follows from two observations: • The right-hand side of (3.5) vanishes when x1j ≡ x0j , ∀j = 0, . . . , N . 0 • The monitor function {̟j+1/2 }jN=−10 is evaluated on the previous time layer t = 0 . ∗In the present study we do not consider such example. However, the idea of grid adaptation upon the bathymetry function certainly deserves to be studied more carefully. 27 / 66 Dispersive shallow water wave modelling. Part II Thus, we obtain that x♯1 ≡ x♯0 . Consequently, we have xt,0 j ∀j = 0, . . . , N . ≡ 0 and Jj1 = Jj0 , ˚ 0 and ˚ In order to complete the predictor step we need to determine the quantities ℘ ̺♯0 ♯ 0 on which depends the source term G˚j+1/2 . These quantities are uniquely determined by ˚ 0 are obtained by solving linear equations prescribed initial conditions. For instance, ℘ ♯ (3.22). We showed above also that the solution to this equation is unique. We notice also that the right-hand side in equation (3.22) vanishes under conditions of this Lemma. ˚ 0 ≡ 0 . By applying a finite difference analogue of equation Consequently, we obtain ℘ ♯ (3.9) we obtain also that ̺♯0 ≡ 0 . As the result, at the ‘lake-at-rest’ state the right-hand side of predictor equations (3.12), (3.13) reads ! 0 0 G˚j+1/2 = . 0 (g h̊ h̊q )j+1/2 Taking into account the fact that the mesh does not evolve x0♯ ֒→ x1♯ ≡ x0♯ , we obtain q ¯0 0 0 g h̊j+1/2 , xt,0 j ≡ 0 and thus Λ̊j+1/2 ≡ Λ̊j+1/2 , sj+1/2 ≡ ! !   h̊q, j+1/2 h̊q, j+1/2 0 0 ¯ . , L̊ · G˚ j+1/2 ≡ Λ̊ · P̊ j+1/2 ≡ h̊q, j+1/2 h̊q, j+1/2 Consequently, the predictor step (3.15), (3.16) gives us the following values: 0 v̊ ∗j+1/2 ≡ v̊ j+1/2 , ˚∗ ˚0 F j+1/2 ≡ Fj+1/2 . For the sake of clarity, we rewrite the last predictions in component-wise form: ! ! 0 h̊ j+1/2 ˚∗ 2 v̊ ∗j+1/2 ≡ , F . g h̊j+1/2 j+1/2 ≡ 0 2 ∗ Thus, H̊j+1/2 ≡ h̊j+1/2 . As an intermediate conclusion of the predictor step we have: ∗ ηj+1/2 ≡ 0, ů∗j+1/2 ≡ 0 , ˚ ∗, ˚ ∗ and all dispersive corrections ℘ ♯ ̺♯ vanish as well by applying similar arguments to equation (3.18). The corrector step (3.19), written component-wise reads: (J ů H̊)j1 − (J ů H̊)j0 τ (J H̊)j1 − (J H̊)j0 = 0, τ 2 2 g h̊j+1/2 − g h̊j−1/2 ♭ + = g H̊ h̊q j 2 ∆q From the first equation above taking into account that Jj1 ≡ Jj0 and H̊j0 = h̊j we obtain H̊j1 = h̊j . And thus, by the definition of the total water depth we obtain η̊j1 ≡ 0 . In 28 / 66 G. Khakimzyanov, D. Dutykh, et al. the second equation above by condition (3.23) we have that ůj0 ≡ 0 . Moreover, in the left-hand side: 2 2 g h̊j+1/2 − g h̊j−1/2 2 ∆q = g (h̊j+1 − h̊j−1 ) · (h̊j+1 + 2 h̊j + h̊j−1 ) . 8 ∆q (3.24) The right-hand side of the same corrector equation can be rewritten using definitions (3.20), (3.21) as ♭ 2 h̊j+1 + 4 h̊j + 2 h̊j−1 2 h̊j+1 − 2 h̊j−1 g H̊ h̊q j = g · . (3.25) 8 4 ∆q Comparing equation (3.24) with (3.25) yields the desired well-balanced property of the predictor–corrector scheme and thus ůj1 ≡ 0 . By assuming that (3.23) is verified at the time layer t = t n and repeating precisely the same reasoning as above (by substituting superscripts 0 ← n and 1 ← n + 1) we obtain that (3.23) is verified at the next time layer t = t n+1 . It completes the proof of this Lemma.  We would like to mention that the well-balanced property of the proposed scheme was checked also in numerical experiments on various configurations of general uneven bottoms (not reported here for the sake of manuscript compactness) — in all cases we witnessed the preservation of the ‘lake-at-rest’ state up to the machine precision. This validates our numerical implementation of the proposed algorithm. 3.4. Numerical scheme for linearized equations In order to study the numerical scheme stability and its dispersive properties, we consider the discretization of the linearized SGN equations on a uniform unbounded grid (for simplicity we consider an IVP without boundary conditions). The governing equations after linearization can be written as (we already gave these equations in Section 2.5) ηt + d ux = 0 , ut + g ηx = ℘xx − 3 d2 ℘ 1 d ℘x , = c2 ηxx , √ where c = g d is the speed of linear gravity waves. We shall apply to these PDEs precisely the same scheme as described above. Since the grid is uniform, we can return to the original notation, i.e. v̊ ≡ v, etc. Let ∆x be the discretization step in the computational domain Ih and τ is the local time step. We introduce the following finite difference operators (illustrated on the free surface elevation η ♯n ): ηt,nj ηjn+1 − ηjn := , τ def ηx,n j n ηj+1 − ηjn := , ∆x def n η(x), j n n ηj+1 − ηj−1 := , 2 ∆x def 29 / 66 Dispersive shallow water wave modelling. Part II n n n n n n ηj+1 − 2 ηjn + ηj−1 def ηxx, j + ηxx, j+1 def ηxx, j+1 − ηxx, j n n , η , η . := := xx, j+1/2 xxx, j ∆x2 2 ∆x +∞ ∗ ∗ Then, at the predictor step we compute auxiliary quantities {ηj+1/2 }+∞ j = −∞ , {uj+1/2 }j = −∞ ∗ and {℘j+1/2 }+∞ j = −∞ . First, we solve the hyperbolic part of the linearized SGN equations:  ∗ n ηj+1/2 − 21 ηj+1 + ηjn + d unx, j = 0 , ∗ τj+1/2  u∗j+1/2 − 12 unj+1 + unj 1 ℘n + g ηx,n j = , ∗ τj+1/2 d x, j def n ηxx, j := and then we solve the elliptic equation to find {℘j+1/2 }+∞ j = −∞ : ∗ ℘∗j+3/2 ∗ ∗ ∗ ∗ η∗ − 2 ηj+1/2 + ηj−1/2 − 2 ℘j+1/2 + ℘j−1/2 3 ℘∗ 2 j+3/2 − 2 j+1/2 = c , ∆x2 d ∆x2 def τ ∗ n n where τj+1/2 := (1 + θj+1/2 ) and θj+1/2 is the numerical scheme parameter [94], 2 whose choice guarantees the TVD property (strictly speaking the proof was done for scalar hyperbolic equations only). Then, the predicted values are used on the second — corrector step, to compute all n+1 n+1 +∞ physical quantities {ηjn+1 }+∞ }j = −∞ and {℘j }+∞ j = −∞ , {uj j = −∞ on the next time layer n+1 t = t : u∗j+1/2 − u∗j−1/2 = 0, (3.26) ηt,nj + d ∆x ∗ ∗ ∗ ∗ ηj+1/2 − ηj−1/2 1 ℘j+1/2 − ℘j−1/2 n ut, j + g = , (3.27) ∆x d ∆x 3 ℘n+1 n+1 ℘n+1 = c2 ηxx, (3.28) xx, j − j . d2 j It can be easily checked that the scheme presented above has the first order accuracy if n n θj+1/2 = const , ∀j and the second order if θj+1/2 ≡ 0 , ∀j . However, the last condition can be somehow relaxed. There is an interesting case of quasi-constant values of the scheme parameter: n θj+1/2 = O (τ + ∆x) . In this case the scheme is second order accurate as well. In the present Section we perform n a theoretical analysis of the scheme and we shall assume for simplicity that θj+1/2 ≡ const. Consequently, from now on we shall drop the index j + 1/2 in the intermediate time step ∗ τj+1/2 . 3.4.1 Linear stability of the scheme In this Section we apply the so-called von Neumann stability analysis to the predictor– corrector scheme described above [28]. In order to study the scheme stability, first we 30 / 66 G. Khakimzyanov, D. Dutykh, et al. +∞ ∗ ∗ exclude algebraically the predicted values {ηj+1/2 }+∞ j = −∞ , {uj+1/2 }j = −∞ from difference equations. The resulting system reads: n ∗℘ ηt,nj + d un(x), j = τ ∗ c2 ηxx, j − τ xx, j , n unt, j ℘∗j+3/2 − 2 ℘∗j+1/2 + ℘∗j−1/2 + g n η(x), j ∗ 2 = τ c unxx, j − ℘j−1/2 , (3.30) ∆x  − τ ∗ d unxxx, j . (3.31) 1 + d ℘∗j+1/2 (3.29) ∗ 3 ℘∗ n = c2 ηxx, j+1/2 d2 j+1/2 We substitute in all difference relations above the following elementary harmonics ∆x 2 ηjn = Λ0 ρn e i j ξ , − unj = Ψ0 ρn e i j ξ , ℘nj = Φ0 ρn ei j ξ , ℘∗j+1/2 = Φ∗0 (ρ) e i (j+1/2) ξ , (3.32) def where ξ := k · ∆x ∈ [0, π] is the scaled wavenumber and ρ is the transmission factor between the time layers tn and tn+1 . As a result, from equations (3.28) and (3.31) we obtain the following expressions for Φ0 and Φ∗0 : h i 2 2 4 c2 d 2 2 ∗ n 2c d ∗ 4d 2 Φ0 = ‫ג‬ Λ , Φ (ρ) = ρ ‫ג‬ Λ sin(ξ) − i τ ‫ג‬ Ψ , 0 0 0 0 3 ℏ ∆x 2 3 ℏ ∆x 2 ∆x where we introduced some short-hand notations: ξ  4 d2 2 τ def def def def def , k := 4 c2 ℵ 2 ‫ ג‬2 , i := c ℵ sin(ξ) , ℏ := 1 + , ‫ ג‬:= sin ‫ ג‬. ℵ := ∆x 2 3 ∆x 2 By substituting just obtained expressions for Φ0 and Φ∗0 into equations (3.29), (3.30) we obtain two linear equations with respect to amplitudes Λ0 and Ψ0 : h 2 c2 ℵ2 (1 + θ) 2 i ρ − 1 + ‫ ג‬Λ0 + i ℵ d sin(ξ) Ψ0 = 0 , ℏ h 2 c2 ℵ2 (1 + θ) 2 i g ℵ sin(ξ) Λ0 + ρ − 1 + ‫ ג‬Ψ0 = 0 . i ℏ ℏ The necessary condition to have non-trivial solutions gives us an algebraic equation for the transmission factor ρ: k (1 + θ) k2 (1 + θ)2 i2 (ρ − 1) + + = 0. ℏ 4 ℏ2 ℏ This quadratic equation admits two distinct roots: (ρ − 1)2 + ρ± = 1 − k (1 + θ) i ± i√ . 2ℏ ℏ (3.33) The necessary stability condition | ρ | 6 1 is equivalent to the following condition on quadratic equation coefficients: h 4 ς2 i d def 2 2 2 c ℵ (1 + θ) ζ − 1 + ζ (ζ + θ) 6 0 , ς := , (3.34) 3 ∆x def which has to be fulfilled for all ζ := ‫ ג‬2 ∈ [0, 1]. The parameter ς characterizes the grid resolution relative to the mean water depth. This parameter appears in stability condition Dispersive shallow water wave modelling. Part II 31 / 66 along with the Courant ratio ℵ. It is one of the differences with non-dispersive equations whose discretization stability depends only on ℵ. Further thoughts about stability. When long waves travel towards the shoreline, their shoal- ing process is often accompanied with the formation of undular bores [75, 116]. Undular bores have dispersive nature and cannot be correctly described by dispersionless models. In [75] it was shown that satisfactory description of dispersive effects in shallow water d def = 2 ∼ 4 . In another study [70] it was shown environments is obtained for ς := ∆x that for satisfactory modeling of trans-oceanic wave propagation it is sufficient to choose ς ≈ 4 in deep ocean and ς ≈ 1 in shallow coastal areas. In other words, it is sufficient to choose the grid size equal to water depth in shallow waters and in deep areas — four times smaller than the water depth. On coarser grids the numerical dispersion may dominate √ 3 over the physical one [70]. In the present study we shall assume that parameter ς > . 2 Substituting into equation (3.34) the value ζ ≡ 0 we obtain that for stability reasons necessarily the scheme parameter θ > 0 . Since the predictor layer should be in between time layers t = tn and t = tn+1 we have θ 6 1 . Then, for fixed values of parameters ς and θ the stability condition (3.34) takes the following form: r 4 1 + ς2 θ 3 . cℵ 6 1 + θ For θ ≡ 0 the last condition simply becomes: cℵ 6 1, and it does not depend on parameter ς. However, when θ > 0, then the scheme stability depends on the mesh refinement ς relative to the mean water depth. Surprisingly, more we refine the grid, less stringent becomes the stability barrier. In the asymptotic limit ς ≫ 1 we obtain the following restriction on the time step τ : √ 2 θ 1 τ 6 √ τ0 < √ τ0 ≈ 0.58 τ0 , 3 (1 + θ) 3 def where τ0 := dc ≡ √dgd is the characteristic time scale of gravity waves. Above we used the following obvious inequality: √ 1 + θ > 2 θ, ∀ θ ∈ R+ . So, in practice for sufficiently refined grids the stability condition de facto does not involve the grid spacing ∆x anymore. This property is very desirable for numerical simulations. For the sake of comparison we give here (without underlying computations) the stability restriction of the same predictor–corrector scheme for NSWE equations: cℵ 6 √ 1 . 1 + θ 32 / 66 G. Khakimzyanov, D. Dutykh, et al. So, another surprising conclusion obtained from this linear stability analysis is that the SGN equations require in fine a less stringent condition on the time step than corresponding dispersionless NSWE. Most probably, this conclusion can be explained by the regularization effect of the dispersion. Indeed, the NSWE bores are replaced by smooth undular bores whose regularity is certainly higher. The smoothness of solutions allows to use a larger time step τ to propagate the numerical solution. This conclusion was checked in (fully nonlinear) numerical experiments (not reported here) where the time step τ was artificially pushed towards the stability limits. In general, the omission of dispersive effects yields a stricter stability condition. The authors of [71] came experimentally to similar conclusions about the time step limit in dispersive and hydrostatic simulations. Our theoretical analysis reported above may serve as a basis of rational explanation of this empirical fact. This result is to be compared with a numerical scheme proposed in [41] for a weakly nonlinear weakly dispersive water wave model. They used splitting technique and solved an elliptic equation to determine the non-hydrostatic pressure correction. The main drawback of the scheme proposed in [41] is the stability condition: ∆x > 1.5 d . One can easily see that a numerical computation with a sufficiently refined grid is simply impossible with that scheme. Our method is free of such drawbacks. 3.4.2 Discrete dispersion relation The dispersion relation properties are crucial to understand and explain the behaviour of the numerical solution [101]. In this Section we perform the dispersion relation analysis of the proposed above predictor–corrector scheme. This analysis is based on the study of elementary plane-wave solutions (3.32). The continuous case was already analyzed in Section 2.5. Dispersive properties of the scheme can be completely characterized by the def phase error ∆ϕ := φ − ϕ committed during solution transfer from time layer t = tn to t = tn+1 = tn + τ . Here we denote by φ the phase shift due to the SGN equations dynamics and ϕ is its discrete counterpart. From equations (2.30) and (3.33) we obtain correspondingly: φ = arg(e−i ω τ ) ≡ −ω τ = ± r cℵξ , ξ ∈ [0, π] , ς 2 ξ2 1 + 3 i h k (1 + θ)  /| ρ | , ϕ = arg ρ = ± arccos 1 − 2ℏ (3.35) (3.36) In other words, the phase change φ is predicted by the ‘exact’ SGN equations properties, while ϕ comes from the approximate dynamics as predicted by the predictor–corrector Dispersive shallow water wave modelling. Part II 33 / 66 scheme. Since we are interested in long wave modelling, we can consider Taylor expansions of the phase shifts in the limit ξ → 0 (assuming that ς and ℵ are kept constant): h i cℵ 2 3 φ = ± cℵξ − ς ξ + O(ξ 4 ) , 6 i h  cℵ (c ℵ)2 (3 θ + 1) − 1 − ς 2 ξ 3 + O(ξ 4 ) . ϕ = ± cℵξ + 6 The asymptotic expression for the phase error is obtained by subtracting above expressions: ∆ϕ = ∓  cℵ  (c ℵ)2 (3 θ + 1) − 1 ξ 3 + O(ξ 4 ) . 6 From the last relation one can see that the leading part of the phase error has the same asymptotic order as the ‘physical’ dispersion of the SGN equations. In general, this result is not satisfactory. However, this situation can be improved if for the given scheme parameter θ > 0, the Courant ratio ℵ is chosen according to the following formula: cℵ = √ 1 . 1 + 3θ In this case the numerical phase error will be one order lower than the physical dispersion of the SGN system. In Figure 2 we represent graphically phase shifts predicted by various models. The dashed line (1) is the phase shift of the predictor–corrector scheme given by equation (3.36) (taken with + sign) for the parameters values θ = 0 , c ℵ = 1 , ς = 2 . The continuous dispersion relation are shown with the dotted line (3) (the SGN equations, formula (3.35)) and the solid line (4) (full Euler equations): s tanh(ς ξ) φEuler = ± c ℵ ξ . ςξ It can be seen that our predictor–corrector scheme provides a better approximation to the dispersion relation than the scheme proposed by Peregrine [116] (dash-dotted line (2) in Figure 2). The analysis of the discrete dispersion relation of Peregrine’s scheme is not given here, but we provide only the final result for the phase change:  i2 . φPeregrine = ± arccos 1 − 2ℏ In Figure 2 one can see that the predictor–corrector scheme (curve (1)) approximates well the dispersion relation of the SGN equations (curve (3)) up to ξ = k · ∆x > π4 . In terms of the wave length λ we obtain that λ ? 8 ∆x and for ς = 2 we obtain the inequality λ ? 4 d. So, as the main result of the present analysis we conclude that our scheme is able to propagate accurately water waves whose length is four times longer than the mean water depth d. 34 / 66 G. Khakimzyanov, D. Dutykh, et al. Φ 1.2 4 3 0.8 1 0.4 2 0.0 0 1 2 ξ 3 Figure 2. Phase shifts in different models: (1) predictor–corrector scheme; (2) Peregrine’s numerical scheme [116]; (3) the SGN equations; (4) full Euler equations. 4. Numerical results Below we present a certain number of test cases which aim to validate and illustrate the performance of the numerical scheme described above along with our implementation of this method. 4.1. Solitary wave propagation over the flat bottom As we saw above in Section 2.4.1, in a special case of constant water depth h(x, t) = d the SGN equations admit solitary wave solutions (given by explicit simple analytical formulas) which propagate with constant speed without changing their shapes. 4.1.1 Uniform grid These analytical solutions can be used to estimate the accuracy of the fully discrete numerical scheme. Consequently, we take a sufficiently large domain [0, ℓ] with ℓ p = 80. In this Section all lengths are relative to the water depth d, and time is scaled with g/d. 35 / 66 Dispersive shallow water wave modelling. Part II 0.4 0.4 η /d η /d 1 2 3 4 0.3 0.2 0.2 0.1 0.1 0 0 55 60 65 70 x/d 1 2 3 4 0.3 75 10 (a) 15 20 t(g/d) 1/2 25 (b) Figure 3. Propagation of a solitary wave over the flat bottom: (a) free surface profile at t = 20; (b) wave gauge data at x = 60. Various lines denote: (1) — N = 80, (2) — N = 160, (3) — N = 320, (4) — the exact analytical solution given by formula (2.29). For instance, if the solitary wave amplitude α = 0.7, then α d = 0.7 d in dimensional variables. So, the solitary wave is initially located at x0 = 40. In computations below we take a solitary wave of amplitude α = 0.4. In general, the SGN travelling wave solutions approximate fairly well those of the full Euler model up to amplitudes α > 21 (see [49] for comparisons). In Figure 3 we show a zoom on free surface profile (a) at t = 20 and wave gauge data (b) in a fixed location x = 60 for various spatial (and uniform) resolutions. By this time, the solitary wave propagated the horizontal distance of 20 mean water depths. It can be seen that the numerical solution converges to the analytical one. In order to quantify the accuracy of the numerical solution we measure the relative l∞ discrete error: def k εh k∞ := α−1 k ηh − η k∞ , where ηh stands for the numerical and η – for the exact free surface profiles. The factor α−1 is used to obtain the dimensionless error. Then, the order of convergence k can be estimated as   k ε h k∞ k ≃ log2 . k εh/2 k∞ The numerical results in Table 1 indicate that k → 2, when N → +∞. This validates the proposed scheme and the numerical solver. 36 / 66 G. Khakimzyanov, D. Dutykh, et al. N ς 80 160 320 640 1280 2560 1 2 4 8 16 32 k ε h k∞ 0.2442 0.1277 0.3344 × 10−1 0.8639 × 10−2 0.2208 × 10−2 0.5547 × 10−3 k — 0.94 1.93 1.95 1.97 1.99 Table 1. Numerical estimation of the convergence order for the analytical d solitary wave propagation test case. The parameter ς = ∆x characterizes the mesh resolution relative to the mean water depth d. 4.1.2 Adaptive grid In order to show the performance of the adaptive algorithm, we adopt two monitor functions in our computations: ̟0 [ η ] (x, t) = 1 + ϑ0 | η(x, t) | , ̟1 [ η ](x, t) = 1 + ϑ0 | η(x, t) | + ϑ1 | ηx (x, t) | , (4.1) (4.2) where ϑ 0, 1 > 0 are some positive constants. In numerical simulations we use ϑ 0 = ϑ 1 = 10 and only N = 80 grid points. Above we showed that numerical results are rather catastrophic when these 80 grid points are distributed uniformly (see Figure 3). Numerical results on adaptive moving grids obtained with monitor functions ̟ 0, 1 (x, t) are shown in Figure 4. The monitor function ̟ 0 (x, t) ensures that points concentrate around the wave crest, leaving the areas in front and behind relatively rarefied. The visual comparison of panels 4(b) and 4(c) shows that the inclusion of the spatial derivative ηx into the monitor function ̟1 (x, t) yields the increase of dense zones around the wave crest. With an adaptive grid involving only N = 80 points we obtain a numerical solution of quality similar to the uniform grid with N = 320 points. 4.2. Solitary wave/wall interaction For numerous practical purposes in Coastal Engineering it is important to model correctly wave/structure interaction processes [118]. In this Section we apply the above proposed numerical algorithm to the simulation of a simple solitary wave/vertical wall interaction. The reason is two-fold: (1) Many coastal structures involve vertical walls as building elements, (2) This problem is well studied by previous investigators and, consequently, there is enough available data/results for comparisons 37 / 66 Dispersive shallow water wave modelling. Part II 20 t(g/d) η /d t(g/d) 1/2 1/2 20 0.4 1 2 3 4 0.3 0.2 0.1 15 15 10 10 5 5 0 55 60 65 (a) 70 x/d 75 0 30 40 50 (b) 60 x/d 70 0 30 40 50 60 x/d 70 (c) Figure 4. Propagation of a solitary wave over the flat bottom simulated with moving adapted grids: (a) free surface profile at t = 20; (b) trajectory of some grid points predicted with monitor function ̟0 (x, t) ; (c) the same but with monitor function ̟1 (x, t) . On panel (a) the lines are defined as: (1) — numerical solution on a uniform fixed grid; (2) — numerical solution predicted with monitor function ̟0 (x, t) ; (3) — the same with ̟1 (x, t) ; (4) — exact analytical solution. We would like to underline that this problem is equivalent to the head-on collision of two equal solitary waves due to simple symmetry considerations. This ‘generalized’ problem was studied in the past using experimental [111, 125], numerical [26, 67] and analytical techniques [21, 113, 132]. More recently this problem gained again some interest of researchers [22, 25, 39, 52, 57, 58, 107, 138]. Despite the simple form of the obstacle, the interaction process of sufficiently large solitary waves with it takes a highly non-trivial character as it will be highlighted below. Figure 5(a) shows the free surface dynamics as it is predicted by the SGN equations solved numerically using the moving grid with N = 320 nodes. The initial condition consists of an exact analytical solitary wave (2.29) of amplitude α = 0.4 moving rightwards to the vertical wall (where the wall boundary condition u = 0 is imposed∗ on the velocity, for the pressure see Section 2.3.1). The computational domain is chosen to be sufficiently large [0, ℓ] = [0, 80], so there is no interaction with the boundaries at t = 0. Initially the solitary wave is located at x0 = 40 (right in the middle). The bottom is flat h(x, t) = d = const in this test case. From Figure 5(a) it can be clearly seen that the reflection process generates a train of weakly nonlinear waves which propagate with different speeds in agreement with the dispersion relation. The moving grid was constructed using the monitor function ̟1 (x, t) from the previous Section (see the definition in equation (4.2)). with ϑ0 = ϑ1 = 10. The resulting trajectories of mesh nodes are shown in Figure 5(b). The grid is clearly refined around the solitary wave and nodes follow it. Moreover, we ∗The same condition is imposed on the left boundary as well, even if during our simulation time there are no visible interactions with the left wall boundary. 38 / 66 G. Khakimzyanov, D. Dutykh, et al. (a) (b) Figure 5. Solitary wave (amplitude α = 0.4)/vertical wall interaction in the framework of the SGN equations: (a) space-time plot of the free surface elevation; (b) nodes trajectories. For the sake of clarity every 5th node is shown only, the total number of nodes N = 320. would like to note also a slight mesh refinement even in the dispersive tail behind the reflected wave (it is not clearly seen in Figure 5(b) since we show only every 5th node). One of the main interesting characteristics that we can compute from these numerical experiments is the maximal wave run-up R on the vertical wall: def R := sup 0 6 t 6 T {η(ℓ, t)} . The sup is taken in some time window when the wave/wall interaction takes place. For the class of incident solitary wave solutions it is clear that maximal run-up R will depend on the (dimensionless) solitary wave amplitude α. In [132] the following asymptotic formula was derived in the limit α → 0:   R (α) = 2 α 1 + 14 α + 83 α2 + O(α4 ) . (4.3) The last approximation was already checked against full the Euler simulations [39, 67] and even laboratory experiments [111]. Figure 6 shows the dependence of the maximal run-up R on the incident solitary wave amplitude α as it is predicted by our numerical model, by formula (4.3) and several other experimental [42, 110, 111, 144] and numerical [26, 39, 67] studies. In particular, one can see that almost all models agree fairly well up to the amplitudes α > 0.4. Then, there is an apparent ‘separation’ of data in two branches. Again, our numerical model gives a very good agreement with experimental data from [110, 111, 144] up to the amplitudes α > 0.7. 39 / 66 Dispersive shallow water wave modelling. Part II 2.4 R/d 1 2 3 4 5 6 7 8 9 2.0 1.6 1.2 0.8 0.4 0.0 0 0.1 0.2 0.3 0.4 0.5 0.6 α /d 0.7 Figure 6. Dependence of the maximal run-up R on the amplitude α of the incident solitary wave. Experimental data: (1) — [144], (2) — [111], (3) — [42], (4) — [110]. Numerical data: (5) — [67], (6) — [26], (7) — [39]. The solid line (8) — our numerical results, the dashed line (9) — the analytical prediction (4.3). 4.2.1 Wave action on the wall The nonlinear dispersive SGN model can be used to estimate also the wave force exerted on the vertical wall. Moreover, we shall show below that this model is able to capture the non-monotonic behaviour of the force when the incident wave amplitude is increased. This effect was first observed experimentally [144] and then numerically [148]. For the 2D case with flat bottom the fluid pressure p(x, y, t) can be expressed: h H2  (y + d)2 i p(x, y, t) R1 , = g H − (y + d) − − ρ 2 2 def − d 6 y 6 η(x, t) , (4.4) with R1 := uxt + u uxx − u2x . The horizontal wave loading exerted on the vertical wall located at x = ℓ is given by the following integral: ˆ η(ℓ,t) F0 (t) H3 g H2 = − R̄1 , p(ℓ, y, t) dy = ρ 2 3 −d 40 / 66 η /d F/ρgd 2 G. Khakimzyanov, D. Dutykh, et al. 1.5 1.5 1 2 3 4 1.0 1.0 0.5 0.5 0.0 0.0 25 30 35 40 45 1 2 3 4 t(g/d) 1/2 25 (a) 30 35 40 45 t(g/d) 1/2 (b) Figure 7. Solitary wave/vertical wall interaction: (a) time series of wave run-up on the wall; (b) dynamic wave loading on the wall. Different lines correspond to different incident solitary wave amplitudes: (1) — α = 0.1, (2) — α = 0.3, (3) — α = 0.5, (4) — α = 0.7. where due to boundary conditions R̄1 = uxt − u2x . After removing the hydrostatic force, we obtain the dynamic wave loading computed in our simulations: h H2 F(t) H3 d2 i − = g − R̄1 . ρ 2 2 3 The expression for corresponding tilting moment can be found in [52, Remark 3]. Figure 7 shows the wave elevation (a) and the dynamic wave loading (b) on the vertical wall. From Figure 7(b) it can be seen that the force has one maximum for small amplitude solitary waves. However, when we gradually increase the amplitude (i.e. α ? 0.4), the second (local) maximum appears. For such large solitary waves a slight run-down phenomenon can be noticed in Figure 7(a). We reiterate that this behaviour is qualitatively and quantitatively correct comparing to the full Euler equations [25, 39]. However, the complexity of the nonlinear dispersive SGN model and, consequently, the numerical algorithm to solve it, is much lower. 4.3. Solitary wave/bottom step interaction Water waves undergo continuous changes while propagating over general uneven bottoms. Namely, the wave length and wave amplitude are modified while propagating over bottom irregularities. Such transformations have been studied in the literature [44, 98]. In the present Section we focus on the process of a Solitary Wave (SW) transformation over a Dispersive shallow water wave modelling. Part II 41 / 66 bottom step. In the early work by Madsen & Mei (1969) [106] it was shown using long wave approximation that a solitary wave can be disintegrated into a finite number of SWs with decreasing amplitudes while passing over an underwater step. This conclusion was supported in [106] by laboratory data as well. This test case was used later in many works, see e.g. [29, 53, 99]. We illustrate the behaviour of the adaptive numerical algorithm as well as the SGN model on the solitary wave/bottom interaction problem. The bottom bathymetry is given by the following discontinuous function: ( −h0 , 0 6 x 6 xs , y = −h(x) = −hs , xs < x 6 ℓ , where ℓ is the numerical wave tank length, h0 (respectively hs ) are the still water depths on the left (right) of the step located at x = xs . We assume also that 0 < hs < h0 . The initial condition is a solitary wave located at x = x0 and propagating rightwards. For the experiment cleanliness we assume that initially the solitary wave does not ‘feel’ the step. In other words it is located sufficiently far from the abrupt change in bathymetry. In our experiment we choose x0 so that η(xs ) > 0.01 α, where α is the SW amplitude. The main parameters in this problem are the incident wave amplitude α and the bottom step jump ∆bs = h0 − hs . Various theoretical and experimental studies show that a solitary wave undergoes a splitting into a reflected wave and a finite number of solitary waves after passing over an underwater step. See [98] for a recent review on this topic. Amplitudes and the number of solitary waves over the step were determined in [88] in the framework of the shallow water theory. These expressions were reported later in [124] and this result was improved recently in [115]. However, in the vicinity of the step, one may expect important vertical accelerations of fluid particles, which are simplified (or even neglected) in shallow water type theories. Nevertheless, in [115] a good agreement of this theory with numerical and experimental data was reported. There is also another difficulty inherent to the bottom step modelling. In various derivations of shallow water models there is an implicit assumption that the bathymetry gradient ∇h is bounded (or even small | ∇h | ≪ 1, e.g. in the Boussinesq-type equations [19]). On the other hand, numerical tests and comparisons with the full (Euler and even Navier–Stokes) equations for finite values of | ∇h | ∼ O(1) show that resulting approximate models have a larger applicability domain than it was supposed at the outset [19]. In the case of a bottom step, the bathymetry function is even discontinuous which is an extreme case we study in this Section. There are two main approaches to cope with this problem. One consists in running the approximate model directly on discontinuous bathymetry, and the resulting eventual numerical instabilities are damped out by ad-hoc dissipative terms (see e.g. references in [115]). The magnitude of these terms allows to increase the scheme dissipation, and overall computation appears to be stable. The difficulty of this approach consists in the fine tuning of dissipation, since • Insufficient dissipation will make the computation unstable, G. Khakimzyanov, D. Dutykh, et al. 42 / 66 • Excessive dissipation will yield unphysical damping of the solution. An alternative approach consists in replacing the discontinuous bathymetry by a smoothed  ℓs ℓs  version over certain length xs − , where ℓs is the smoothing length on , xs + 2 2 which the jump from h0 to hs is replaced by a smooth variation. For instance, in all numerical computations reported in [124] the smoothing length was chosen to be ℓs = 60 cm independently of the water depths before h0 and after hs the step. In another work [66] the smoothing length was arbitrarily set to ℓs = 20 cm independently of other parameters. Unfortunately, in a recent work [146] the smoothing procedure was not described at all. Of course, this method is not perfect since the bathymetry is slightly modified. However, one can expect that sufficiently long waves will not ‘notice’ this modification. This assumption was confirmed by the numerical simulations reported in [35, 66, 124]. In the present work we also employ the bottom smoothing procedure. However, the smoothing length ℓs is chosen in order to have a well-posed problem for the elliptic operator (2.5). For simplicity, we use the sufficient condition (2.12) (obtained under restriction (2.11)), which is not necessarily optimal, but it allows us to invert stably the nonlinear elliptic operator (2.18). Namely, the smoothed step has the following analytical expression:  ℓs  , −h0 , 0 6 x 6 xs −    2    ℓs ℓs ∆bs y = −h(x) = −h0 + (4.5) · 1 + sin ζ , xs − 6 x 6 xs + ,  2 2 2     ℓs −h , xs + 6 x 6 ℓ, s 2 def π(x − xs ) where ζ := . For this bottom profile, the inequalities (2.11), (2.12) take the ℓs form:  π π π ∆bs , cos ζ < 1 , ∀ ζ ∈ − , 2 ℓs 2 2 2 π 2 ∆bs sin ζ > − . 2 h + h ∆bs 2 ℓs 0 s − sin ζ 2 2 These inequalities have corresponding solutions: π p π ∆bs ℓs > , ℓs > h0 ∆bs . 2 2 The last inequalities are verified simultaneously if the second inequality is true. If we assume that the bottom step height ∆bs is equal to the half of the water depth before it, then we obtain the following condition: π ℓs > √ h0 ≈ 1.11 h0 . 2 2 We underline that the last condition is only sufficient and stable numerical computations can most probably be performed even for shorter smoothing lengths ℓs . For instance, we tested the value ℓs = h0 and everything went smoothly. 43 / 66 Dispersive shallow water wave modelling. Part II Parameter Value Wave tank length, ℓ 35 m 3.65 cm Solitary wave amplitude, α 11 m Solitary wave initial position, x0 20 cm Water depth before the step, h0 Water depth after the step, hs 10 cm h0 Water depth used in scaling, d 10 cm Bottom step jump, ∆bs Bottom step location, xs 14 m 350 Number of grid points, N 17.6 s Simulation time, T Table 2. Values of various numerical parameters used in the solitary wave/bottom step interaction test case. In [124] the results of 80 experiments are reported for various values of α and h0 (for fixed values of the bottom jump ∆bs = 10 cm). In our work we repeated all experiments from [124] using the SGN equations solved numerically with the adaptive predictor–corrector algorithm described above. In general, we obtained a very good agreement with experimental data from [124] in terms of the following control parameters: • number of solitary waves moving over the step, • amplitudes of solitary waves over the step, • amplitude of the (main) reflected wave. We notice that the amplitude of the largest solitary wave over the step corresponds perfectly to the measurements. However, the variation in the amplitude of subsequent solitary waves over the step could reach in certain cases 20%. Remark 4. The conduction of laboratory experiments on the solitary wave/bottom step interaction encounters a certain number of technical difficulties [27, 124] that we would like to mention. First of all, the wave maker generates a solitary wave with some dispersive components. Moreover, one has to take the step sufficiently long so that the transmitted wave has enough time to develop into a finite number of visible well-separated solitary waves. Finally, the reflections of the opposite wave flume’s wall are to be avoided as well in order not to pollute the measurements. Consequently, the successful conduction of experiments and accurate measurement of wave characteristics requires a certain level of technique. We would like to mention the exemplary experimental work [78] on the head-on collision of solitary waves. Below we focus on one particular case of α = 3.65 cm. All other parameters are given in Table 2. It corresponds to the experiment N◦ 24 from [124]. The free surface dynamics is depicted in Figure 8(a) and the trajectories of every second grid node are 44 / 66 G. Khakimzyanov, D. Dutykh, et al. (a) (b) Figure 8. Interaction of a solitary wave with an underwater step: (a) space-time plot of the free surface elevation y = η(x, t) in the dimensional time interval [0 s, 17.6 s]; (b) trajectories of every second grid node. Numerical parameters are provided in Table 2. shown in Figure 8(b). For the mesh adaptation we use the monitor function (4.2) with ϑ1 = ϑ2 = 10 . In particular, one can see that three solitary waves are generated over the step. This fact agrees well with the theoretical predictions [88, 115]. Moreover, one can see that the distribution of grid points follows perfectly all generated waves (over the step and the reflected wave). Figure 9(a) shows the free surface dynamics in the vicinity of the bottom step. In particular, one can see that the wave becomes notoriously steep by the time instance t = 3 s and during later times it splits into one reflected and three transmitted waves. The free surface profile at the final simulation time y = η(x, T ) is depicted in Figure 9(b). On the same panel the experimental measurements are shown with empty circles ◦ , which show a very good agreement with our numerical simulations. In our numerical experiments we go even further since a nonlinear dispersive wave model (such as the SGN equations employed in this study) can provide also information about the internal structure of the flow (i.e. beneath the free surface). For instance, the nonhydrostatic component of the pressure field can be easily reconstructed∗: h η + y + 2h i pd (x, y, t) = −(η − y) · R1 + R2 , −h(x) 6 y 6 η(x, t) . (4.6) ρ 2 where the quantities R1,2 are defined in (2.3) as (see also the complete derivation in [92]): R1 = uxt + u uxx − ux2 , R2 = ut hx + u [ u hx ]x . ∗Please, notice that formula (4.4) is not applicable here, since the bottom is not flat anymore. 45 / 66 Dispersive shallow water wave modelling. Part II η /d η /d 0.20 0.25 1 2 3 4 5 6 0.15 0.10 0.20 1 2 0.15 0.05 0.10 0.00 0.05 0.00 -0.05 60 70 (a) 80 x/d 140 150 160 170 x/d (b) Figure 9. Free surface profiles y = η(x, t) during the interaction process of a solitary wave with an underwater step: (a) initial condition (1), t = 1.5 s (2), t = 2.0 s (3), t = 2.5 s (4), t = 3.0 s (5), smoothed bottom profile given by formula (4.5) (6); (b) free surface profile y = η(x, T ) (1) at the final simulation time t = T . The experimental points (2) are taken from [124], experiment N◦ 24. Numerical parameters are provided in Table 2. We do not consider the hydrostatic pressure component since its variation is linear with water depth y: ph = ρ g (η − y) . Even if the dispersive pressure component pd might be negligible comparing to the hydrostatic one ph , its presence is crucial to balance the effects of nonlinearity, which results in the existence of solitary waves, as one of the most widely known effects in dispersive wave propagation [48]. The dynamic pressure field and several other physical quantities under a solitary wave were computed and represented graphically in the framework of the full Euler equations in [51]. A good qualitative agreement with our results can be reported. The balance of dispersive and nonlinear effects results also in the symmetry of the non-hydrostatic pressure distribution with respect to the wave crest. It can be seen in Figure 10(a,d ) before and after the interaction process. On the other hand, during the interaction process the symmetry is momentaneously broken (see Figure 10(b,c)). However, with the time going on, the system relaxes again to a symmetric∗ pressure distribution shown in Figure 10(d ). Knowledge of the solution  to the SGN equations allows to reconstruct also the velocity † field ũ(x, y, t), ṽ(x, y, t) in the fluid bulk. Under the additional assumption that the ∗The †This symmetry here is understood with respect to the vertical axis passing by the wave crest. information can be used later to compute fluid particle trajectories [69], for example. 46 / 66 G. Khakimzyanov, D. Dutykh, et al. pd /ρ gd y/d 0.005 0.002 -0.000 -0.003 -0.005 -0.008 -0.010 -0.013 -0.015 -0.018 0.2 0.0 0.0 -0.2 -0.4 -0.4 56 0.005 0.003 0.001 -0.001 -0.003 -0.006 -0.008 -0.010 -0.012 -0.014 0.2 -0.2 54 pd /ρgd y/d x/d 58 68 70 (a) (b) pd /ρ gd y/d 0.007 0.004 0.001 -0.002 -0.005 -0.008 -0.011 -0.014 -0.017 -0.021 0.2 0.0 0.0 -0.4 -0.4 (c) 80 x/d 0.011 0.004 -0.004 -0.011 -0.018 -0.025 -0.032 -0.040 -0.047 -0.054 0.2 -0.2 78 pd /ρgd y/d -0.2 76 x/d 72 164 166 168 x/d (d) Figure 10. Non-hydrostatic pressure distribution during a solitary wave/underwater step interaction process at different instances of time: (a) t = 0.1 s, (b) t = 2.0 s, (c) t = 3.0 s, (d) t = 17.5 s. Numerical parameters are provided in Table 2. flow is potential, one can derive the following asymptotic (neglecting the terms of the order 4 2 O(µ4 ) ≡ O λd4 in the horizontal velocity ũ(x, y, t) and of the order O(µ2 ) ≡ O λd2 for the vertical one ṽ(x, y, t)) representation formula [64] (see also the derivation in [92] for 47 / 66 Dispersive shallow water wave modelling. Part II y/d y/d 0.2 0.2 0.0 0.0 -0.2 -0.2 -0.4 -0.4 -0.6 65 70 x/d 75 (a) -0.6 60 70 x/d 80 (b) Figure 11. Reconstructed velocity field in the fluid during the solitary wave interaction process with an underwater step: (a) t = 2.0 s , (b) t = 3.0 s . Solid blue lines show a few streamlines. Numerical parameters are provided in Table 2. the 3D case with moving bottom): ũ(x, y, t) = u +   H2  (y + h)2  uxx , − y − h · [ u hx ]x + ux hx + − 2 6 2 (4.7) H ṽ(x, y, t) = −u hx − (y + h) ux . (4.8) The formulas above allow to compute the velocity vector field in the fluid domain at any time (when the solution H(x, t), u(x, t) is available) and in any point (x, y) above the bottom y = −h(x) and beneath the free surface y = η(x, t) . Figure 11 shows a numerical application of this reconstruction technique at two different moments of time t = 2 and 3 s during the interaction process with the bathymetry change. In particular, in Figure 11(a) one can see that important vertical particle velocities emerge during the interaction with the bottom step. In subsequent time moments one can see the division of the flow in two structures (see Figure 11(b)): the left one corresponds to the reflected wave, while the right structure corresponds to the transmitted wave motion. The reconstructed velocity fields via the SGN model compare fairly well with the 2D Navier–Stokes predictions [115]. However, the computational complexity of our approach is significantly lower than the simulation of the full Navier–Stokes equations. This is probably the main advantage of the proposed modelling methodology. G. Khakimzyanov, D. Dutykh, et al. 48 / 66 4.4. Wave generation by an underwater landslide As the last illustration of the proposed above numerical scheme, we model wave generation by the motion of an underwater landslide over uneven bottom. This test-case is very challenging since it involves rapid bottom motion (at least of its part). We recall that all previous tests were performed on a static bottom (i.e. ht ≡ 0 ). The numerical simulation of underwater landslides is an important application where the inclusion of non-hydrostatic effects is absolutely crucial [105]. Moreover, the accurate prediction of generated waves allows to assess more accurately the natural hazard induced by unstable sliding masses (rockfalls, debris, ground movements) [140]. Usually, the precise location of unstable underwater masses is unknown and the numerical simulation is a preferred tool to study these processes. The landslide can be modelled as a solid undeformable body moving down the slope [34, 60, 74, 142]. Another possibility consists in representing the landslide as another fluid layer of higher density (possibly also viscosity) located near the bottom [23, 68]. In some works the landslide motion was not simulated (e.g. [86]) and the initial wave field generated by the landslide motion was determined using empirical formulas [73]. Then, this initial condition was propagated using an appropriate water wave model [86]. However, strictly speaking the employed empirical models are valid only for an absolutely rigid landslide sliding down a constant slope. Subsequent numerical simulations showed that the bottom shape influences quite substantially the generated wave field [13]. Consequently, for realistic modelling of real world cases one needs to take into account the actual bathymetry [103] and even possible deformations of the landslide during its motion [102]. In a recent experimental work [102] the deformability of the landslide was achieved by composing it with four solid parts interconnected by springs. The idea to represent a landslide as a finite number of blocks was used in numerical [119] and theoretical [137] investigations. In the present study we use the quasideformable∗ landslide model [12, 56, 59]. In this model the landslide deforms according to encountered bathymetry changes, however, at every time instance, all components of the velocity vector are the same in all particles which constitute the landslide (as in a solid rigid body). We shall use two long wave models: • The SGN equations (fully nonlinear non-hydrostatic weakly dispersive model) • NSWE equations† (standard hydrostatic dispersionless model) The advantage of the SGN equations over other frequently used long wave models [86, 105, 141] are: • The Galilean invariance • The energy balance equation (consistent with the full Euler [65]) NSWE were employed in [5] to model the real world 16th October 1979 Nice event. It looks like the consensus on the importance of dispersive effects in landslide modeling is far from ∗This †The [94]. model can be visualized if you imagine a landslide composed of infinitely many solid blocks. numerical algorithm to solve NSW equations on a moving grid was presented and validated in Dispersive shallow water wave modelling. Part II 49 / 66 being achieved. For example, in [86] the authors affirm that the inclusion of dispersion gives results very similar to NSWE. In other works [71, 104, 133] the authors state that dispersive effects significantly influence the resulting wave field, especially during long time propagation. Consequently, in the present study we use both the SGN and NSWE equations to shed some light on the rôle of dispersive effects. Consider a 1D fluid domain bounded from below by the solid (static) impermeable bottom given by the following function:   h+ + h− h+ − h− h0 (x) = + tanh ̥(x − ξ̥ ) , (4.9) 2 2 where h+ and h− are water depths at ± ∞ correspondingly (the domain we take is finite, of course). We assume for definiteness that h+ < h− < 0 . We have also by definition hh − h i 1 2 tan θ0 def def 0 + > 0, ξ̥ := > 0, ln ̥ := h− − h+ 2̥ h− − h+ where h0 ≡ h0 (0) is water depth in x = 0 and θ0 is the maximal slope angle, which is reached at the inflection point ξ̥ . It can be easily checked that h+ + h− < h0 < h− . 2 Equation (4.9) gives us the static part of the bottom shape. The following equation prescribes the shape of the bathymetry including the unsteady component: y = −h(x, t) = h0 (x) + ζ(x, t) , where function ζ(x, t) prescribes the landslide shape. In the present study we assume that the landslide initial shape is given by the following analytical formula:   h 2 π x − x (0) i   ~ ν c   1 + cos , | x − xc (0) | 6 , 2 ν 2 ζ(x, 0) =  ν  0 , , | x − xc (0) | > 2 where xc (0), ~ and ν are initial landslide position, height and width (along the axis Ox) correspondingly. Initially we put the landslide at the unique∗ point where the water depth is equal to h0 = 100 m, i.e. hh − h i 1 0 + ≈ 8 323.5 m . ln xc (0) = ξ̥ − 2̥ h− − h+ For t > 0 the landslide position xc (t) and its velocity v(t) are determined by solving a second order ordinary differential equation which describes the balance of all the forces acting on the sliding mass [12]. This model is well described in the literature [56, 59] and we do not reproduce the details here. ∗This point is unique since the static bathymetry h0 (x) is a monotonically increasing function of its argument x . 50 / 66 G. Khakimzyanov, D. Dutykh, et al. Parameter Value Fluid domain length, ℓ 80 000 m −5.1 m Water depth, h0 (0) −500 m Rightmost water depth, h+ −5 m Leftmost water depth, h− Maximal bottom slope, θ0 6◦ 20 m Landslide height, ~ 5000 m Landslide length, ν Initial landslide position, xc (0) 8 323.5 m 1.0 Added mass coefficient, Cw 1.0 Hydrodynamic resistance coefficient, Cd 1.5 Landslide density, ρsl /ρw ∗ Friction angle, θ 1◦ 1000 s Final simulation time, T 400 Number of grid points, N Monitor function parameter, ϑ0 200 Table 3. Numerical and physical parameters used in landslide simulation. In Figure 12(a) we show the dynamics of the moving bottom from the initial condition at t = 0 to the final simulation time t = T . All parameters are given in Table 3. It can be clearly seen that landslide’s motion significantly depends on the underlying static bottom shape. In Figure 12(b) we show landslide’s barycenter trajectory x = xc (t) (line 1), its velocity v = v(t) (line 2) and finally the static bottom profile y = h0 (x) (line 3). From the landslide speed plot in Figure 12(b) (line 2), one can see that the mass is accelerating during the first 284.2 s and slows down during 613.4 s. The distances traveled by the landslide during these periods have approximatively the same ratio ≈ 2 . It is also interesting to notice that the landslide stops abruptly its motion with a negative (i.e. nonzero) acceleration. In order to simulate water waves generated by the landslide, we take the fluid domain I = [0, ℓ]. For simplicity, we prescribe wall boundary conditions∗ at x = 0 and x = ℓ. Undisturbed water depth at both ends is h0 and ≈ h+ respectively. The computational domain length ℓ is chosen to be sufficiently large to avoid any kind of reflections from the right boundary. Initially the fluid is at rest with undisturbed free surface, i.e. η(x, 0) ≡ 0 , ∗It u(x, 0) ≡ 0 . would be better to prescribe transparent boundary conditions here, but this question is totally open for the SGN equations. 51 / 66 Dispersive shallow water wave modelling. Part II 0 900 10 v, m/s 20 30 t, s 3 0 y, m 1 600 -200 300 2 -400 0 (a) 0 10000 20000 x, m (b) Figure 12. Generation of surface waves by an underwater landslide motion: (a) dynamics of the moving bottom; (b) graphics of functions (1) x = xc (t) , (2) v = v(t) , (3) y = h0 (x) . Two outer red circles denote landslide initial t = 0 and terminal t = 897.6 s positions. Middle red circle denotes landslide position at the moment of time t = 284.2 s where landslide’s speed is maximal vmax ≈ 26.3 m/s . The black square shows the inflection point ξ̥ position. The maximal speed is achieved well below the inflection point ξ̥ . Numerical parameters are given in Table 3. Segment I is discretized using N = 400 points. In order to redistribute optimally mesh nodes, we employ the monitor function defined in equation (4.1), which refines the grid where the waves are large (regardless whether they are of elevation or depression type). In Figure 13 we show the surface y = η(x, t) in space-time, which shows the main features of the generated wave field. The left panel (a) is the dispersive SGN prediction, while (b) is the computation with NSWE that we include into this study for the sake of comparison. For instance, one can see that the dispersive wave system is much more complex even if NSWE seem to reproduce the principal wave components. The dispersive components follow the main wave travelling rightwards. There is also at least one depression wave moving towards the shore. The motion of grid points is shown in Figure 14. The initial grid was chosen to be uniform, since the free surface was initially flat. However, during the wave generation process the grid adapts to the solution. The numerical method redistributes the nodes according to the chosen monitor function ̟0 [ η ] (x, t) , i.e. where the waves are large (regardless whether they are of elevation or depression type). We would like to underline the fact that in order to achieve a similar accuracy on a uniform grid, one would need about 4 N points. In Figure 15 we show two snapshots of the free surface elevation at two moments of time (a) and wave gauge records collected at two different spatial locations (b). In particular, 52 / 66 G. Khakimzyanov, D. Dutykh, et al. (a) (b) Figure 13. Generation of surface waves y = η(x, t) by an underwater landslide motion: (a) the SGN model (dispersive); (b) NSWE equations (dispersionless). Numerical parameters are given in Table 3. we observe that there is a better agreement between NSWE and the SGN model in shallow regions (i.e. towards x = 0), while a certain divergence between two models becomes more apparent in deeper regions (towards the right end x = ℓ). In the previous Section 4.3 we showed the internal flow structure during nonlinear transformations of a solitary wave over a static step. In this Section we show that SGN equations can be used to reconstruct and to study the physical fields in situations where the bottom moves abruptly. In order to reconstruct the non-hydrostatic field between moving bottom and the free surface, one can use formula (4.6), but the quantity R2 has some extra terms due to the bottom motion: R2 = ut hx + u [ u hx ]x + htt + 2 u hxt . In Figure 16 we show the non-hydrostatic pressure field at two different moments of time. More precisely, we show a zoom on the area of interest around the landslide only. In panel (a) t = t1 = 150 s and the landslide barycenter is located at xc (t1 ) = 9456 m . Landslide moves downhill with the speed v(t1 ) = 15.72 m/s and it continues to accelerate. In particular, one can see that there is a zone of positive pressure in front of the landslide and a zone of negative pressure just behind. This fact has implications on the fluid particle trajectories around the landslide. In right panel (b) we show the moment of time t = t2 = 400 s . At this moment xc (t2 ) = 15 264 m and v(t2 ) = 21.4 m/s . The non-hydrostatic pressure distribution qualitatively changed. Zones of positive and negative pressure switched their respective positions. Moreover, in Figure 15 we showed that dispersive effects start to be noticeable at the free surface only after t > 400 s and by t = 800 s they are flagrant. In Figure 17 we show the velocity fields in the fluid bulk at corresponding moments of 53 / 66 t, s Dispersive shallow water wave modelling. Part II 800 600 400 200 0 0 20000 40000 60000 x, m Figure 14. Trajectories of every second grid node during the underwater landslide simulation in the framework of the SGN equations. Numerical parameters are given in Table 3. time t1 and t2 . We notice some similarities between the fluid flow around a landslide with an air flow around an airfoil. To our knowledge the internal hydrodynamics of landslide generated waves on a general non-constant sloping bottom and in the framework of SGN equations has not been shown before. We remind that in the presence of moving bottom one should use the following reconstruction formulas for the velocity field (which are slightly different from (4.7), (4.8)):   H2  (y + h)2  uxx , − y − h · [ ht + u hx ]x + ux hx + − 2 6 2 ṽ(x, y, t) = −ht − u hx − (y + h) ux . ũ(x, y, t) = u + H 54 / 66 G. Khakimzyanov, D. Dutykh, et al. y, m y, m 1 2 3 4 2 3 0 0 -3 -2 1 2 3 4 -6 -4 -9 0 20000 40000 60000 0 x, m 200 (a) 400 600 800 t, s (b) Figure 15. Generation of surface waves by an underwater landslide: (a) free surface elevation profiles y = η(x, t1, 2 ) at t1 = 300 s (1,3) and t2 = 800 s (2,4); (b) free surface elevation y = η(x1, 2 , t) as a function of time in two spatial locations x1 = 20000 m (1,3) and x2 = 40000 m (2,4). The SGN predictions are represented with solid lines (1,2) and NSWE with dashed lines (3,4). Numerical parameters are given in Table 3. y, m pd , kPa y, m pd , kPa 0.0 41.780 35.960 30.140 24.320 18.500 12.681 6.861 1.041 -4.779 -10.599 0.0 41.780 35.960 30.140 24.320 18.500 12.681 6.861 1.041 -4.779 -10.599 -100.0 -200.0 -100.0 -200.0 -300.0 -300.0 -400.0 -400.0 -500.0 -500.0 5000 7500 10000 (a) 12500 x, m 12500 15000 17500 x, m 20000 (b) Figure 16. Generation of surface waves by an underwater landslide. Isolines of the non-hydrostatic pressure at two moments of time: t = 150 s (a); t = 400 s (b). Numerical parameters are given in Table 3. 55 / 66 Dispersive shallow water wave modelling. Part II y, m y, m 0.0 0.0 -100.0 -100.0 -200.0 -200.0 -300.0 -300.0 -400.0 -400.0 -500.0 -500.0 5000 7500 10000 (a) 12500 x, m 12500 15000 17500 x, m 20000 (b) Figure 17. Generation of surface waves by an underwater landslide. The reconstructed velocity field at two moments of time: t = 150 s (a); t = 400 s (b). Numerical parameters are given in Table 3. These formulas naturally become (4.7), (4.8) if the bottom is static, i.e. ht ≡ 0 . 5. Discussion Above we presented a detailed description of the numerical algorithm and a number of numerical tests which illustrate its performance. The main conclusions and perspectives of this study are outlined below. 5.1. Conclusions In the second part of our series of papers we focused on the development of numerical algorithms for shallow water propagation over globally flat spaces (i.e. we allow some variations of the bathymetry in the limits discussed in Section 2.1). The main distinction of our work is that the proposed algorithm allows for local mesh adaptivity by moving the grid points where they are needed. The performance of our method was illustrated on several test cases ranging from purely academic ones (e.g. propagation of a solitary waves, which allowed us to estimate the overall accuracy of the scheme) to more realistic applications with landslide-generated waves [12]. The mathematical model chosen in this study allows us to have a look into the distribution of various physical fields in the fluid bulk. In particular, in some interesting cases we reconstructed the velocity field and the hydrostatic pressure distribution beneath the free surface. G. Khakimzyanov, D. Dutykh, et al. 56 / 66 We studied the linear stability of the proposed finite volume discretization. It was shown that the resulting scheme possesses an interesting and possible counter-intuitive property: smaller we take the spatial discretization step ∆x, less restrictive is becoming the stability CFL-type condition on the time step τ . This result was obtained using the classical von Neumann analysis [28]. However, we show (and we compute it) that there exists the upper limit of allowed time steps. Numerical schemes with such properties seem to be new. We considered also in great detail the question of wall boundary conditions∗ for the SGN system. It seems that this issue was not properly addressed before. The wall boundary condition for the elliptic part of equations follows naturally from the form of the momentum equation we chose in this study. Finally, in numerical experiments we showed how depth-integrated SGN equations can be used to study nonlinear transformations of water waves over some bathymetric features (such as an underwater step or a sliding mass). Moreover, we illustrated clearly that SGN equations (and several other approximate dispersive wave models) can be successfully used to reconstruct the flow field under the wave. The accuracy of this reconstruction will be studied in future works by direct comparisons with the full Euler equations where these quantities are resolved. 5.2. Perspectives The main focus of our study was set on the adaptive spatial discretization. The first natural continuation of our study is the generalization to 3D physical problems (i.e. involving two horizontal dimensions). The main difficulty is to generalize the mesh motion algorithm to this case, even if some ideas have been proposed in the literature [6]. In the present computations the time step was chosen to ensure the linear CFL condition. In other words, it was chosen in order to satisfy the numerical solution stability. In future works we would like to incorporate an adaptive time stepping procedure along the lines of e.g. [130] aimed to meet the prescribed error tolerance. Of course, the extension of the numerical method presented in this study to three-dimensional flows (i.e. two horizontal dimensions) represents the main important extension of our work. Further improvement of the numerical algorithm can be expected if we include also some bathymetric features (such as ∇h) into the monitor function ̟[η, h](x, t) . Physically this improvement is fully justified since water waves undergo constant transformations over bottom irregularities (as illustrated in Sections 4.3 & 4.4). A priori, everything is ready to perform these further numerical experiments. Ideally, we would like to generalize the algorithm presented in this study for the Serre– Green–Naghdi (SGN) equations to the base model in its most general form (1.3), (1.4). In this way we would be able to incorporate several fully nonlinear shallow water models (discussed in Part I [91]) in the same numerical framework. It would allow the great ∗The x=ℓ wall boundary condition for the velocity component u(x, t) is straightforward, i.e. u(x, t)|x = 0 = 0. However, there was an open question of how to prescribe the boundary conditions for the elliptic part of the equations. Dispersive shallow water wave modelling. Part II 57 / 66 flexibility in applications to choose and to assess the performance of various approximate models. Moreover, in the present study we raised the question of boundary conditions for SGN equations. However, non-reflecting (or transparent) boundary conditions would allow to take much smaller domains in many applications. Unfortunately, this question is totally open to our knowledge for the SGN equations (however, it is well understood for NSWE). In future works we plan to fill in this gap as well. Finally, the SGN equations possess a number of variational structures. The Hamiltonian formulation can be found e.g. in [87]. Various Lagrangians can be found in [38, 63, 95, 112]. Recently, a multi-symplectic formulation for SGN equations has been proposed [32]. All these available variational structures raise an important question: after the discretization can we preserve them at the discrete level as well? It opens beautiful perspectives for the development of structure-preserving numerical methods as it was done for the classical Korteweg–de Vries [50] and nonlinear Schrödinger [31] equations. In the following parts of this series of papers we shall discuss the derivation of the SGN equations on a sphere [91] and their numerical simulation using the finite volume method [93]. Acknowledgments This research was supported by RSCF project No 14–17–00219. The authors would like to thank Prof. Emmanuel Audusse (Université Paris 13, France) who brought our attention to the problem of boundary conditions for the SGN equations. A. Derivation of the non-hydrostatic pressure equation In this Appendix we give some hints for the derivation of the non-hydrostatic pressure equation (2.5) and relation (2.9). Let us start with the latter. For this purpose we rewrite equation (2.8) in a more compact form using the total derivative operator: Du = −g ∇η + ∇℘ − ̺∇h , (A.1) H and ̺ (see equations (2.3) and (2.4) corre- By definition of non-hydrostatic quantities ℘ spondingly) we obtain: 3℘ H ̺ = + R2 . 2H 4 We have to substitute into the last relation the expression for R2 :  R2 = (Du) · ∇h + u · (u · ∇)∇h + htt + 2 u · ∇ht , along with the expression (A.1) for the horizontal acceleration Du of fluid particles. After simple algebraic computations one obtains (2.9). 58 / 66 G. Khakimzyanov, D. Dutykh, et al. The derivation of equation (2.5) is somehow similar. First, from definitions (2.3), (2.4) we obtain another relation between non-hydrostatic pressures: H3 H R1 + ̺, 12 2 with R1 rewritten in the following form: ℘ (A.2) = R1 = ∇ · (Du) − 2 (∇ · u)2 + 2 u 1 x1 u 1 x2 . u 2 x1 u 2 x2 Substituting into equation (A.2) the just shown relation (2.9) with the last expression for R1 , yields the required equation (2.5). B. Acronyms In the text above the reader could encounter the following acronyms: SW: Solitary Wave AMR: Adaptive Mesh Refinement BBM: Benjamin–Bona–Mahony BVP: Boundary Value Problem CFL: Courant–Friedrichs–Lewy IVP: Initial Value Problem MOL: Method Of Lines ODE: Ordinary Differential Equation PDE: Partial Differential Equation SGN: Serre–Green–Naghdi TVD: Total Variation Diminishing NSWE: Nonlinear Shallow Water Equations References [1] G. B. Alalykin, S. K. Godunov, L. L. Kireyeva, and L. A. Pliner. Solution of OneDimensional Problems in Gas Dynamics on Moving Grids. Nauka, Moscow, 1970. 5 Dispersive shallow water wave modelling. Part II 59 / 66 [2] J. S. Antunes Do Carmo, F. J. Seabra Santos, and E. Barthélemy. Surface waves propagation in shallow water: A finite element model. Int. J. Num. Meth. Fluids, 16(6):447–459, mar 1993. 6 [3] C. Arvanitis and A. I. Delis. Behavior of Finite Volume Schemes for Hyperbolic Conservation Laws on Adaptive Redistributed Spatial Grids. SIAM J. Sci. Comput., 28(5):1927–1956, jan 2006. 16 [4] C. Arvanitis, T. Katsaounis, and C. Makridakis. Adaptive Finite Element Relaxation Schemes for Hyperbolic Conservation Laws. ESAIM: Mathematical Modelling and Numerical Analysis, 35(1):17–33, 2010. 16 [5] S. Assier-Rzadkieaicz, P. Heinrich, P. C. Sabatier, B. Savoye, and J. F. Bourillet. Numerical Modelling of a Landslide-generated Tsunami: The 1979 Nice Event. Pure Appl. Geophys., 157(10):1707–1727, oct 2000. 48 [6] B. N. Azarenok, S. A. Ivanenko, and T. Tang. Adaptive Mesh Redistibution Method Based on Godunov’s Scheme. Commun. Math. Sci., 1(1):152–179, 2003. 56 [7] N. S. Bakhvalov. The optimization of methods of solving boundary value problems with a boundary layer. USSR Computational Mathematics and Mathematical Physics, 9(4):139– 166, jan 1969. 5, 16 [8] V. B. Barakhnin and G. S. Khakimzyanov. On the algorithm for one nonlinear dispersive shallow-water model. Russ. J. Numer. Anal. Math. Modelling, 12(4):293–317, 1997. 6 [9] V. B. Barakhnin and G. S. Khakimzyanov. The splitting technique as applied to the solution of the nonlinear dispersive shallow-water equations. Doklady Mathematics, 59(1):70–72, 1999. 6, 11 [10] T. J. Barth and M. Ohlberger. Finite Volume Methods: Foundation and Analysis. In E. Stein, R. de Borst, and T. J. R. Hughes, editors, Encyclopedia of Computational Mechanics. John Wiley & Sons, Ltd, Chichester, UK, nov 2004. 22 [11] E. Barthélémy. Nonlinear shallow water theories for coastal waves. Surveys in Geophysics, 25:315–337, 2004. 6 [12] S. A. Beisel, L. B. Chubarov, D. Dutykh, G. S. Khakimzyanov, and N. Y. Shokina. Simulation of surface waves generated by an underwater landslide in a bounded reservoir. Russ. J. Numer. Anal. Math. Modelling, 27(6):539–558, 2012. 48, 49, 55 [13] S. A. Beisel, L. B. Chubarov, and G. S. Khakimzyanov. Simulation of surface waves generated by an underwater landslide moving over an uneven slope. Russ. J. Numer. Anal. Math. Modelling, 26(1):17–38, 2011. 48 [14] T. B. Benjamin, J. L. Bona, and J. J. Mahony. Model equations for long waves in nonlinear dispersive systems. Philos. Trans. Royal Soc. London Ser. A, 272:47–78, 1972. 6 [15] M. J. Berger, D. L. George, R. J. LeVeque, and K. T. Mandli. The GeoClaw software for depth-averaged flows with adaptive refinement. Advances in Water Resources, 34(9):1195– 1206, sep 2011. 5 [16] N. Bohr. Über die Serienspektra der Element. Zeitschrift für Physik, 2(5):423–469, oct 1920. 9 [17] J. L. Bona, V. A. Dougalis, and O. A. Karakashian. Fully discrete Galerkin methods for the Korteweg-de Vries equation. Computers & Mathematics with Applications, 12(7):859–884, jul 1986. 6 [18] P. Bonneton, F. Chazel, D. Lannes, F. Marche, and M. Tissier. A splitting approach for the fully nonlinear and weakly dispersive Green-Naghdi model. J. Comput. Phys., 230:1479– 1498, 2011. 6 G. Khakimzyanov, D. Dutykh, et al. 60 / 66 [19] M.-O. Bristeau, N. Goutal, and J. Sainte-Marie. Numerical simulations of a non-hydrostatic shallow water model. Comput. & Fluids, 47(1):51–64, aug 2011. 41 [20] M. Brocchini. A reasoned overview on Boussinesq-type models: the interplay between physics, mathematics and numerics. Proc. R. Soc. A, 469(2160):20130496, oct 2013. 5 [21] J. G. B. Byatt-Smith. The reflection of a solitary wave by a vertical wall. J. Fluid Mech., 197:503–521, 1988. 37 [22] F. Carbone, D. Dutykh, J. M. Dudley, and F. Dias. Extreme wave run-up on a vertical cliff. Geophys. Res. Lett., 40(12):3138–3143, 2013. 37 [23] M. J. Castro, M. de la Asuncion, J. Macias, C. Parés, E. D. Fernandez-Nieto, J. M. GonzalezVida, and T. Morales de Luna. IFCP Riemann solver: Application to tsunami modelling using CPUs. In M. E. Vazquez-Cendon, A. Hidalgo, P. Garcia-Navarro, and L. Cea, editors, Numerical Methods for Hyperbolic Equations: Theory and Applications, pages 237–244. CRC Press, Boca Raton, London, New York, Leiden, 2013. 48 [24] V. Casulli. A semi-implicit finite difference method for non-hydrostatic, free-surface flows. Int. J. Num. Meth. Fluids, 30(4):425–440, jun 1999. 6 [25] J. Chambarel, C. Kharif, and J. Touboul. Head-on collision of two solitary waves and residual falling jet formation. Nonlin. Processes Geophys., 16:111–122, 2009. 37, 40 [26] R. K.-C. Chan and R. L. Street. A computer study of finite-amplitude water waves. J. Comp. Phys., 6(1):68–94, aug 1970. 37, 38, 39 [27] K.-A. Chang, T.-J. Hsu, and P. L.-F. Liu. Vortex generation and evolution in water waves propagating over a submerged rectangular obstacle. Coastal Engineering, 44(1):13–36, sep 2001. 43 [28] J. G. Charney, R. Fjörtoft, and J. Neumann. Numerical Integration of the Barotropic Vorticity Equation. Tellus, 2(4):237–254, nov 1950. 29, 56 [29] F. Chazel. Influence of bottom topography on long water waves. M2AN, 41:771–799, 2007. 41 [30] F. Chazel, D. Lannes, and F. Marche. Numerical simulation of strongly nonlinear and dispersive waves using a Green-Naghdi model. J. Sci. Comput., 48:105–116, 2011. 6 [31] J.-B. Chen, M.-Z. Qin, and Y.-F. Tang. Symplectic and multi-symplectic methods for the nonlinear Schrödinger equation. Computers & Mathematics with Applications, 43(8-9):1095– 1106, apr 2002. 57 [32] M. Chhay, D. Dutykh, and D. Clamond. On the multi-symplectic structure of the SerreGreen-Naghdi equations. J. Phys. A: Math. Gen, 49(3):03LT01, jan 2016. 57 [33] A. Chorin. Numerical solution of the Navier-Stokes equations. Math. Comp., 22:745–762, 1968. 8 [34] L. B. Chubarov, S. V. Eletsky, Z. I. Fedotova, and G. S. Khakimzyanov. Simulation of surface waves by an underwater landslide. Russ. J. Numer. Anal. Math. Modelling, 20(5):425– 437, 2005. 48 [35] L. B. Chubarov, Z. I. Fedotova, Y. I. Shokin, and B. G. Einarsson. Comparative Analysis of Nonlinear Dispersive Shallow Water Models. Int. J. Comp. Fluid Dyn., 14(1):55–73, jan 2000. 6, 42 [36] L. B. Chubarov and Y. I. Shokin. The numerical modelling of long wave propagation in the framework of non-linear dispersion models. Comput. & Fluids, 15(3):229–249, jan 1987. [37] R. Cienfuegos, E. Barthélemy, and P. Bonneton. A fourth-order compact finite volume scheme for fully nonlinear and weakly dispersive Boussinesq-type equations. Part II: boundary conditions and validation. Int. J. Num. Meth. Fluids, 53(9):1423–1455, mar 2007. 6 Dispersive shallow water wave modelling. Part II 61 / 66 [38] D. Clamond and D. Dutykh. Practical use of variational principles for modeling water waves. Phys. D, 241(1):25–36, 2012. 57 [39] M. J. Cooker, P. D. Weidman, and D. S. Bale. Reflection of a high-amplitude solitary wave at a vertical wall. J. Fluid Mech., 342:141–158, 1997. 37, 38, 39, 40 [40] R. Courant, K. Friedrichs, and H. Lewy. Über die partiellen Differenzengleichungen der mathematischen Physik. Mathematische Annalen, 100(1):32–74, 1928. 26 [41] M. H. Dao and P. Tkalich. Tsunami propagation modelling - a sensitivity study. Nat. Hazards Earth Syst. Sci., 7:741–754, 2007. 32 [42] V. H. Davletshin. Force action of solitary waves on vertical structures. In Tsunami meeting, pages 41–43, Gorky, 1984. Institute of Applied Physics. 38, 39 [43] A. J. C. de Saint-Venant. Théorie du mouvement non-permanent des eaux, avec application aux crues des rivières et à l’introduction des marées dans leur lit. C. R. Acad. Sc. Paris, 73:147–154, 1871. 6, 8, 9 [44] M. W. Dingemans. Water wave propagation over uneven bottom. World Scientific, Singapore, 1997. 40 [45] V. A. Dougalis and O. A. Karakashian. On Some High-Order Accurate Fully Discrete Galerkin Methods for the Korteweg-de Vries Equation. Mathematics of Computation, 45(172):329, oct 1985. 6 [46] V. A. Dougalis and D. E. Mitsotakis. Theory and numerical analysis of Boussinesq systems: A review. In N. A. Kampanis, V. A. Dougalis, and J. A. Ekaterinaris, editors, Effective Computational Methods in Wave Propagation, pages 63–110. CRC Press, 2008. 6 [47] V. A. Dougalis, D. E. Mitsotakis, and J.-C. Saut. On some Boussinesq systems in two space dimensions: Theory and numerical analysis. Math. Model. Num. Anal., 41(5):254–825, 2007. 6 [48] P. G. Drazin and R. S. Johnson. Solitons: An introduction. Cambridge University Press, Cambridge, 1989. 15, 45 [49] A. Duran, D. Dutykh, and D. Mitsotakis. On the Galilean Invariance of Some Nonlinear Dispersive Wave Equations. Stud. Appl. Math., 131(4):359–388, nov 2013. 35 [50] D. Dutykh, M. Chhay, and F. Fedele. Geometric numerical schemes for the KdV equation. Comp. Math. Math. Phys., 53(2):221–236, 2013. 57 [51] D. Dutykh and D. Clamond. Efficient computation of steady solitary gravity waves. Wave Motion, 51(1):86–99, jan 2014. 45 [52] D. Dutykh, D. Clamond, P. Milewski, and D. Mitsotakis. Finite volume and pseudo-spectral schemes for the fully nonlinear 1D Serre equations. Eur. J. Appl. Math., 24(05):761–787, 2013. 6, 15, 37, 40 [53] D. Dutykh and F. Dias. Dissipative Boussinesq equations. C. R. Mecanique, 335:559–583, 2007. 41 [54] D. Dutykh and F. Dias. Energy of tsunami waves generated by bottom motion. Proc. R. Soc. A, 465:725–744, 2009. 10 [55] D. Dutykh and D. Ionescu-Kruse. Travelling wave solutions for some two-component shallow water models. J. Diff. Eqns., 261(2):1099–1114, jul 2016. 15 [56] D. Dutykh and H. Kalisch. Boussinesq modeling of surface waves due to underwater landslides. Nonlin. Processes Geophys., 20(3):267–285, may 2013. 48, 49 [57] D. Dutykh, T. Katsaounis, and D. Mitsotakis. Finite volume schemes for dispersive wave propagation and runup. J. Comput. Phys., 230(8):3035–3061, apr 2011. 6, 37 G. Khakimzyanov, D. Dutykh, et al. 62 / 66 [58] D. Dutykh, T. Katsaounis, and D. Mitsotakis. Finite volume methods for unidirectional dispersive wave models. Int. J. Num. Meth. Fluids, 71:717–736, 2013. 6, 37 [59] D. Dutykh, D. Mitsotakis, S. A. Beisel, and N. Y. Shokina. Dispersive waves generated by an underwater landslide. In E. Vazquez-Cendon, A. Hidalgo, P. Garcia-Navarro, and L. Cea, editors, Numerical Methods for Hyperbolic Equations: Theory and Applications, pages 245–250. CRC Press, Boca Raton, London, New York, Leiden, 2013. 48, 49 [60] F. Enet and S. T. Grilli. Experimental study of tsunami generation by three-dimensional rigid underwater landslides. J. Waterway, Port, Coastal and Ocean Engineering, 133(6):442– 454, 2007. 48 [61] R. C. Ertekin, W. C. Webster, and J. V. Wehausen. Waves caused by a moving disturbance in a shallow channel of finite width. J. Fluid Mech., 169:275–292, aug 1986. 16 [62] M. S. Fabien. Spectral Methods for Partial Dierential Equations that Model Shallow Water Wave Phenomena. Master, University of Washington, 2014. 6 [63] Z. I. Fedotova and E. D. Karepova. Variational principle for approximate models of wave hydrodynamics. Russ. J. Numer. Anal. Math. Modelling, 11(3):183–204, 1996. 57 [64] Z. I. Fedotova and G. S. Khakimzyanov. Shallow water equations on a movable bottom. Russ. J. Numer. Anal. Math. Modelling, 24(1):31–42, 2009. 16, 46 [65] Z. I. Fedotova, G. S. Khakimzyanov, and D. Dutykh. Energy equation for certain approximate models of long-wave hydrodynamics. Russ. J. Numer. Anal. Math. Modelling, 29(3):167–178, jan 2014. 48 [66] Z. I. Fedotova and V. Y. Pashkova. Methods of construction and the analysis of difference schemes for nonlinear dispersive models of wave hydrodynamics. Russ. J. Numer. Anal. Math. Modelling, 12(2), 1997. 42 [67] J. D. Fenton and M. M. Rienecker. A Fourier method for solving nonlinear water-wave problems: application to solitary-wave interactions. J. Fluid Mech., 118:411–443, apr 1982. 37, 38, 39 [68] E. D. Fernandez-Nieto, F. Bouchut, D. Bresch, M. J. Castro-Diaz, and A. Mangeney. A new Savage-Hutter type models for submarine avalanches and generated tsunami. J. Comput. Phys., 227(16):7720–7754, 2008. 48 [69] G. R. Flierl. Particle motions in large-amplitude wave fields. Geophysical & Astrophysical Fluid Dynamics, 18(1-2):39–74, aug 1981. 45 [70] S. Glimsdal, G. K. Pedersen, K. Atakan, C. B. Harbitz, H. P. Langtangen, and F. Lovholt. Propagation of the Dec. 26, 2004, Indian Ocean Tsunami: Effects of Dispersion and Source Characteristics. Int. J. Fluid Mech. Res., 33(1):15–43, 2006. 31 [71] S. Glimsdal, G. K. Pedersen, C. B. Harbitz, and F. Løvholt. Dispersion of tsunamis: does it really matter? Natural Hazards and Earth System Science, 13(6):1507–1526, jun 2013. 32, 49 [72] A. E. Green, N. Laws, and P. M. Naghdi. On the theory of water waves. Proc. R. Soc. Lond. A, 338:43–55, 1974. 5 [73] S. Grilli, S. Vogelmann, and P. Watts. Development of a 3D numerical wave tank for modeling tsunami generation by underwater landslides. Engng Anal. Bound. Elem., 26:301– 313, 2002. 48 [74] S. T. Grilli and P. Watts. Tsunami Generation by Submarine Mass Failure. I: Modeling, Experimental Validation, and Sensitivity Analyses. Journal of Waterway Port Coastal and Ocean Engineering, 131(6):283, 2005. 48 Dispersive shallow water wave modelling. Part II 63 / 66 [75] J. Grue, E. N. Pelinovsky, D. Fructus, T. Talipova, and C. Kharif. Formation of undular bores and solitary waves in the Strait of Malacca caused by the 26 December 2004 Indian Ocean tsunami. J. Geophys. Res., 113(C5):C05008, may 2008. 31 [76] E. Hairer, S. P. Nørsett, and G. Wanner. Solving ordinary differential equations: Nonstiff problems. Springer, 2009. 6 [77] E. Hairer and G. Wanner. Solving Ordinary Differential Equations II. Stiff and DifferentialAlgebraic Problems. Springer Series in Computational Mathematics, Vol. 14, 1996. 6 [78] J. Hammack, D. Henderson, P. Guyenne, and M. Yi. Solitary wave collisions. In Proc. 23rd International Conference on Offshore Mechanics and Arctic Engineering, 2004. 43 [79] F. H. Harlow and J. E. Welch. Numerical Calculation of Time-Dependent Viscous Incompressible Flow of Fluid with Free Surface. Phys. Fluids, 8:2182, 1965. 8 [80] H. Hermes. Introduction to Mathematical Logic. Universitext. Springer Berlin Heidelberg, Berlin, Heidelberg, 1973. 26 [81] N. J. Higham. Accuracy and Stability of Numerical Algorithms. SIAM Philadelphia, 2nd ed. edition, 2002. 25 [82] J. Horrillo, Z. Kowalik, and Y. Shigihara. Wave Dispersion Study in the Indian OceanTsunami of December 26, 2004. Marine Geodesy, 29(3):149–166, dec 2006. 6 [83] W. Huang. Practical Aspects of Formulation and Solution of Moving Mesh Partial Differential Equations. J. Comp. Phys., 171(2):753–775, aug 2001. 5 [84] W. Huang and R. D. Russell. Adaptive mesh movement - the MMPDE approach and its applications. J. Comp. Appl. Math., 128(1-2):383–398, mar 2001. 5 [85] A. M. Il’in. Differencing scheme for a differential equation with a small parameter affecting the highest derivative. Mathematical Notes of the Academy of Sciences of the USSR, 6(2):596–602, aug 1969. 5, 16 [86] M. Ioualalen, S. Migeon, and O. Sardoux. Landslide tsunami vulnerability in the Ligurian Sea: case study of the 1979 October 16 Nice international airport submarine landslide and of identified geological mass failures. Geophys. J. Int., 181(2):724–740, mar 2010. 48, 49 [87] R. S. Johnson. Camassa-Holm, Korteweg-de Vries and related models for water waves. J. Fluid Mech., 455:63–82, 2002. 57 [88] A. Kabbaj. Contribution à l’étude du passage des ondes de gravité et de la génération des ondes internes sur un talus, dans le cadre de la théorie de l’eau peu profonde. Thèse, Université Scientifique et Médicale de Grenoble, 1985. 41, 44 [89] M. Kazolea and A. I. Delis. A well-balanced shock-capturing hybrid finite volume-finite difference numerical scheme for extended 1D Boussinesq models. Appl. Numer. Math., 67:167–186, 2013. 6 [90] G. Khakimzyanov and D. Dutykh. On supraconvergence phenomenon for second order centered finite differences on non-uniform grids. J. Comp. Appl. Math., 326:1–14, dec 2017. 16, 17 [91] G. S. Khakimzyanov, D. Dutykh, and Z. I. Fedotova. Dispersive shallow water wave modelling. Part III: Model derivation on a globally spherical geometry. Submitted, pages 1–40, 2017. 56, 57 [92] G. S. Khakimzyanov, D. Dutykh, Z. I. Fedotova, and D. E. Mitsotakis. Dispersive shallow water wave modelling. Part I: Model derivation on a globally flat space. Submitted, pages 1–40, 2017. 5, 7, 10, 11, 44, 46 [93] G. S. Khakimzyanov, D. Dutykh, and O. Gusev. Dispersive shallow water wave modelling. Part IV: Numerical simulation on a globally spherical geometry. Submitted, pages 1–40, G. Khakimzyanov, D. Dutykh, et al. [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] 64 / 66 2017. 57 G. S. Khakimzyanov, D. Dutykh, D. E. Mitsotakis, and N. Y. Shokina. Numerical solution of conservation laws on moving grids. Submitted, pages 1–28, 2017. 16, 21, 26, 29, 48 J. W. Kim, K. J. Bai, R. C. Ertekin, and W. C. Webster. A derivation of the Green-Naghdi equations for irrotational flows. J. Eng. Math., 40(1):17–42, 2001. 57 J. W. Kim and R. C. Ertekin. A numerical study of nonlinear wave interaction in regular and irregular seas: irrotational Green-Naghdi model. Marine Structures, 13(4-5):331–347, jul 2000. 16 H. O. Kreiss and G. Scherer. Method of lines for hyperbolic equations. SIAM Journal on Numerical Analysis, 29:640–646, 1992. 6 A. A. Kurkin, S. V. Semin, and Y. A. Stepanyants. Transformation of surface waves over a bottom step. Izvestiya, Atmospheric and Oceanic Physics, 51(2):214–223, mar 2015. 40, 41 Z. Lai, C. Chen, G. W. Cowles, and R. C. Beardsley. A nonhydrostatic version of FVCOM: 1. Validation experiments. J. Geophys. Res., 115(C11):C11010, nov 2010. 41 O. Le Métayer, S. Gavrilyuk, and S. Hank. A numerical scheme for the Green-Naghdi model. J. Comp. Phys., 229(6):2034–2045, 2010. 6 D. Y. Le Roux. Spurious inertial oscillations in shallow-water models. J. Comp. Phys., 231(24):7959–7987, oct 2012. 32 E. K. Lindstrøm, G. K. Pedersen, A. Jensen, and S. Glimsdal. Experiments on slide generated waves in a 1:500 scale fjord model. Coastal Engineering, 92:12–23, oct 2014. 48 P. L.-F. Liu, T.-R. Wu, F. Raichlen, C. E. Synolakis, and J. C. Borrero. Runup and rundown generated by three-dimensional sliding masses. J. Fluid Mech., 536(1):107–144, jul 2005. 48 F. Løvholt, G. Pedersen, and G. Gisler. Oceanic propagation of a potential tsunami from the La Palma Island. J. Geophys. Res., 113(C9):C09026, sep 2008. 49 P. Lynett and P. L. F. Liu. A numerical study of submarine-landslide-generated waves and run-up. Proc. R. Soc. A, 458(2028):2885–2910, dec 2002. 48 O. S. Madsen and C. C. Mei. The transformation of a solitary wave over an uneven bottom. J. Fluid Mech., 39(04):781–791, dec 1969. 41 P. A. Madsen, H. B. Bingham, and H. Liu. A new Boussinesq method for fully nonlinear waves from shallow to deep water. J. Fluid Mech., 462:1–30, 2002. 37 P. A. Madsen, R. Murray, and O. R. Sorensen. A new form of the Boussinesq equations with improved linear dispersion characteristics. Coastal Engineering, 15:371–388, 1991. 6 P. A. Madsen and O. R. Sorensen. A new form of the Boussinesq equations with improved linear dispersion characteristics. Part 2. A slowly-varying bathymetry. Coastal Engineering, 18:183–204, 1992. 6 S. V. Manoylin. Some experimental and theoretical methods of estimation of tsunami wave action on hydro-technical structures and seaports. Technical report, Siberian Branch of Computing Center, Krasnoyarsk, 1989. 38, 39 T. Maxworthy. Experiments on collisions between solitary waves. J. Fluid Mech, 76:177–185, 1976. 37, 38, 39 J. W. Miles and R. Salmon. Weakly dispersive nonlinear gravity waves. J. Fluid Mech., 157:519–531, 1985. 57 S. M. Mirie and C. H. Su. Collision between two solitary waves. Part 2. A numerical study. J. Fluid Mech., 115:475–492, 1982. 37 D. Mitsotakis, B. Ilan, and D. Dutykh. On the Galerkin/Finite-Element Method for the Serre Equations. J. Sci. Comput., 61(1):166–195, feb 2014. 6, 15 Dispersive shallow water wave modelling. Part II 65 / 66 [115] E. Pelinovsky, B. H. Choi, T. Talipova, S. B. Wood, and D. C. Kim. Solitary wave transformation on the underwater step: Asymptotic theory and numerical experiments. Applied Mathematics and Computation, 217(4):1704–1718, oct 2010. 41, 44, 47 [116] D. H. Peregrine. Calculations of the development of an undular bore. J. Fluid Mech., 25(02):321–330, mar 1966. 6, 31, 33, 34 [117] D. H. Peregrine. Long waves on a beach. J. Fluid Mech., 27:815–827, 1967. 5, 16 [118] D. H. Peregrine. Water-Wave Impact on Walls. Annu. Rev. Fluid Mech., 35:23–43, 2003. 36 [119] B. Ranguelov, S. Tinti, G. Pagnoni, R. Tonini, F. Zaniboni, and A. Armigliato. The nonseismic tsunami observed in the Bulgarian Black Sea on 7 May 2007: Was it due to a submarine landslide? Geophys. Res. Lett., 35(18):L18613, sep 2008. 48 [120] S. C. Reddy and L. N. Trefethen. Stability of the method of lines. Numerische Mathematik, 62(1):235–267, 1992. 6 [121] G. Sadaka. Solution of 2D Boussinesq systems with FreeFem++: the flat bottom case. Journal of Numerical Mathematics, 20(3-4):303–324, jan 2012. 5 [122] A. A. Samarskii. The Theory of Difference Schemes. CRC Press, New York, 2001. 23, 26 [123] W. E. Schiesser. Method of lines solution of the Korteweg-de vries equation. Computers Mathematics with Applications, 28(10-12):147–154, 1994. 6 [124] F. J. Seabra-Santos, D. P. Renouard, and A. M. Temperville. Numerical and Experimental study of the transformation of a Solitary Wave over a Shelf or Isolated Obstacle. J. Fluid Mech, 176:117–134, 1987. 41, 42, 43, 45 [125] F. J. Seabra-Santos, A. M. Temperville, and D. P. Renouard. On the weak interaction of two solitary waves. Eur. J. Mech. B/Fluids, 8(2):103–115, 1989. 37 [126] F. Serre. Contribution à l’étude des écoulements permanents et variables dans les canaux. La Houille blanche, 8:830–872, 1953. 5 [127] F. Serre. Contribution to the study of long irrotational waves. La Houille blanche, 3:374–388, 1956. 5 [128] L. F. Shampine. ODE solvers and the method of lines. Numerical Methods for Partial Differential Equations, 10(6):739–755, 1994. 6 [129] Y. I. Shokin, Y. V. Sergeeva, and G. S. Khakimzyanov. Predictor-corrector scheme for the solution of shallow water equations. Russ. J. Numer. Anal. Math. Modelling, 21(5):459–479, jan 2006. 6, 21, 22 [130] G. Söderlind and L. Wang. Adaptive time-stepping and computational stability. J. Comp. Appl. Math., 185(2):225–243, 2006. 56 [131] O. R. Sørensen, H. A. Schäffer, and L. S. Sørensen. Boussinesq-type modelling using an unstructured finite element technique. Coastal Engineering, 50(4):181–198, feb 2004. 6 [132] C. H. Su and R. M. Mirie. On head-on collisions between two solitary waves. J. Fluid Mech., 98:509–525, 1980. 37, 38 [133] D. R. Tappin, P. Watts, and S. T. Grilli. The Papua New Guinea tsunami of 17 July 1998: anatomy of a catastrophic event. Nat. Hazards Earth Syst. Sci., 8:243–266, 2008. 49 [134] P. D. Thomas and C. K. Lombart. Geometric conservation law and its application to flow computations on moving grid. AIAA Journal, 17(10):1030–1037, 1979. 5 [135] A. N. Tikhonov and A. A. Samarskii. Homogeneous difference schemes. Zh. vych. mat., 1(1):5–63, 1961. 16 [136] A. N. Tikhonov and A. A. Samarskii. Homogeneous difference schemes on non-uniform nets. Zh. vych. mat., 2(5):812–832, 1962. 16 G. Khakimzyanov, D. Dutykh, et al. 66 / 66 [137] S. Tinti, E. Bortolucci, and C. Vannini. A Block-Based Theoretical Model Suited to Gravitational Sliding. Natural Hazards, 16(1):1–28, 1997. 48 [138] J. Touboul and E. Pelinovsky. Bottom pressure distribution under a solitonic wave reflecting on a vertical wall. Eur. J. Mech. B/Fluids, 48:13–18, nov 2014. 37 [139] M. Walkley and M. Berzins. A finite element method for the two-dimensional extended Boussinesq equations. Int. J. Num. Meth. Fluids, 39(10):865–885, aug 2002. 6 [140] S. N. Ward. Landslide tsunami. J. Geophysical Res., 106:11201–11215, 2001. 48 [141] P. Watts, S. T. Grilli, J. T. Kirby, G. J. Fryer, and D. R. Tappin. Landslide tsunami case studies using a Boussinesq model and a fully nonlinear tsunami generation model. Natural Hazards And Earth System Science, 3(5):391–402, 2003. 48 [142] P. Watts, F. Imamura, and S. T. Grilli. Comparing model simulations of three benchmark tsunami generation cases. Science of Tsunami Hazards, 18(2):107–123, 2000. 48 [143] G. Wei and J. T. Kirby. Time-Dependent Numerical Code for Extended Boussinesq Equations. J. Waterway, Port, Coastal and Ocean Engineering, 121(5):251–261, sep 1995. 6 [144] N. N. Zagryadskaya, S. V. Ivanova, L. S. Nudner, and A. I. Shoshin. Action of long waves on a vertical obstacle. Bulletin of VNIIG, 138:94–101, 1980. 38, 39 [145] V. E. Zakharov. What Is Integrability? Springer Series in Nonlinear Dynamics, 1991. 15 [146] Y. Zhang, A. B. Kennedy, N. Panda, C. Dawson, and J. J. Westerink. Boussinesq-GreenNaghdi rotational water wave theory. Coastal Engineering, 73:13–27, mar 2013. 42 [147] B. B. Zhao, R. C. Ertekin, and W. Y. Duan. A comparative study of diffraction of shallowwater waves by high-level IGN and GN equations. J. Comput. Phys., 283:129–147, feb 2015. 6 [148] M. I. Zheleznyak. Influence of long waves on vertical obstacles. In E. N. Pelinovsky, editor, Tsunami Climbing a Beach, pages 122–139. Applied Physics Institute Press, Gorky, 1985. 39 [149] M. I. Zheleznyak and E. N. Pelinovsky. Physical and mathematical models of the tsunami climbing a beach. In E. N. Pelinovsky, editor, Tsunami Climbing a Beach, pages 8–34. Applied Physics Institute Press, Gorky, 1985. 16 G. Khakimzyanov: Institute of Computational Technologies, Siberian Branch of the Russian Academy of Sciences, Novosibirsk 630090, Russia E-mail address: [email protected] D. Dutykh: LAMA, UMR 5127 CNRS, Université Savoie Mont Blanc, Campus Scientifique, F-73376 Le Bourget-du-Lac Cedex, France E-mail address: [email protected] URL: http://www.denys-dutykh.com/ O. Gusev: Institute of Computational Technologies, Siberian Branch of the Russian Academy of Sciences, Novosibirsk 630090, Russia E-mail address: [email protected] N. Yu. Shokina: Institute of Computational Technologies, Siberian Branch of the Russian Academy of Sciences, Novosibirsk 630090, Russia E-mail address: [email protected] URL: https://www.researchgate.net/profile/Nina_Shokina/
5cs.CE
ADM-CLE APPROACH FOR DETECTING SLOW VARIABLES IN CONTINUOUS TIME MARKOV CHAINS AND DYNAMIC DATA∗ MIHAI CUCURINGU† ‡ AND RADEK ERBAN§ Abstract. A method for detecting intrinsic slow variables in high-dimensional stochastic chemical reaction networks is developed and analyzed. It combines anisotropic diffusion maps (ADM) with approximations based on the chemical Langevin equation (CLE). The resulting approach, called ADM-CLE, has the potential of being more efficient than the ADM method for a large class of chemical reaction systems, because it replaces the computationally most expensive step of ADM (running local short bursts of simulations) by using an approximation based on the CLE. The ADM-CLE approach can be used to estimate the stationary distribution of the detected slow variable, without any a-priori knowledge of it. If the conditional distribution of the fast variables can be obtained analytically, then the resulting ADM-CLE approach does not make any use of Monte Carlo simulations to estimate the distributions of both slow and fast variables. arXiv:1504.01786v1 [cs.CE] 8 Apr 2015 Key words. diffusion maps, stochastic chemical reaction networks, slow variables, stationary distributions 1. Introduction. The time evolution of a complex chemical reaction network often occurs at different time scales, and the observer is interested in tracking the evolution of the slowly evolving quantities (i.e., of the so called slow variables) as opposed to recording each and every single reaction that takes place in the system. Whenever a separation of scales exists, one has to simulate a large number of reactions in the system in order to capture the evolution of the slowly evolving variables. With this observation in mind, it becomes crucial to be able to detect and parametrize the underlying slow manifold corresponding to the slow variables intrinsic to the system. In the present paper, we introduce an unsupervised method of discovering the underlying hidden slow variables in chemical reaction networks, and of their stationary distributions, using the anisotropic diffusion map (ADM) framework [39]. The ADM is a special class of diffusion maps which have gained tremendous popularity in machine learning and statistical analysis, as a robust nonlinear dimensionality reduction technique, in recent years [36, 2, 10, 6]. Diffusion maps have been successfully used as a manifold learning tool, where it is assumed that the high dimensional data lies on a lower dimensional manifold, and one tries to capture the underlying geometric structure of the data, a setup where the traditional linear dimensionality reduction techniques (such as the Principal Component Analysis) have been shown to fail. In the diffusion maps setup, one constructs or is given a sparse weighted connected graph (usually in the form of a weighted k-Nearest-Neighbor graph, with each node connected only to its k nearest or most similar neighbors), and uses it to build the associated combinatorial Laplacian L̃ = D − W , where W denotes the matrix of weights and D denotes a diagonal matrix with Dii equal to the sum of all weights of the node i. Next, one considers the generalized eigenvalue problem L̃x = λDx, whose solutions are related to the solutions of the eigenvalue problem Lx = λx, where L = D−1 W is a row-stochastic matrix often dubbed as the random walk normalized Laplacian. Whenever the pair (λ, x) is an eigenvalue-eigenvector solution to Lx = λx, then so is (1 − λ, x) for L̃x = λDx. The (non-symmetric) matrix L can also be interpreted as a transition probability matrix of a Markov chain with state space given by the nodes of the graph, and entries Lij denoting the one-step transition probability from node i to j. In the diffusion map framework, one exploits a property of the top nontrivial eigenvector of the graph Laplacian of being piecewise constant on subsets of nodes in the domain that correspond to the same state associated to the underlying slow variable. We make this statement precise in Section 4, and further use the resulting classification in Section 5 to propose an unsupervised method for computing the stationary distribution of the hidden slow variable, without using any prior information on its structure. Since the top eigenvectors of the above Laplacian define the coarsest modes of variation in the data, and have a natural interpretation in terms of diffusion and random walks, they have been used in a very wide range of applications, including but ∗ Submitted to the journal’s Computational Methods in Science and Engineering section March 23, 2018. The research leading to these results has received funding from the European Research Council under the European Community’s Seventh Framework Programme (FP7/2007-2013)/ ERC grant agreement No. 239870. This publication is based on work supported in part by Award No KUK-C1-013-04, made by King Abdullah University of Science and Technology (KAUST). † Department of Mathematics, UCLA, 520 Portola Plaza, Mathematical Sciences Building 6363, Los Angeles, CA 90095-1555. Email: [email protected] ‡ Program in Applied and Computational Mathematics (PACM), Princeton University, Fine Hall, Washington Road, Princeton, NJ, 08544-1000 USA. This work was initiated when the author was a Ph.D. student supported by PACM. Mihai Cucuringu also acknowledges support from AFOSR MURI grant FA9550-10-1-0569, and is grateful to Amit Singer for his support, via Award Number R01GM090200 from the NIGMS, and Award Number FA9550-09-1-0551 from AFOSR. § Mathematical Institute, University of Oxford, Radcliffe Observatory Quarter, Woodstock Road, Oxford, OX2 6GG, United Kingdom. E-mail: [email protected]; Radek Erban would like to thank the Royal Society for a University Research Fellowship; Brasenose College, University of Oxford, for a Nicholas Kurti Junior Fellowship; and the Leverhulme Trust for a Philip Leverhulme Prize. This prize money was used to support research visits of Mihai Cucuringu in Oxford. 1 not limited to partitioning [41, 40], clustering and community detection [34, 45, 33], image segmentation [38], ranking [47, 17], and data visualization and learning from data [7, 36]. The main application area studied in this paper are stochastic models of chemical reaction networks. They are written in terms of stochastic simulation algorithms (SSAs) [21, 22] which have been used to model a number of biological systems, including the phage λ lysis-lysogeny decision circuit [1], circadian rhythms [44], and the cell cycle [27]. The Gillespie SSA [21] is an exact stochastic method that simulates every chemical reaction, sampling from the solution of the corresponding chemical master equation (CME). To characterize the behavior of a chemical system, one needs to simulate a large number of reactions and realizations, which leads to very computationally intensive algorithms. For suitable classes of chemically reacting systems, one can sometimes use exact algorithms which are equivalent to the Gillespie SSA, but are less computationally intensive, such as the Gibson-Bruck SSA [19] and the Optimized Direct Method [5]. However, these methods also stochastically simulate the occurrence of every chemical reaction, which can be a computationally challenging task for systems with a very large number of species. One way to tackle this problem is to use parallel stochastic simulations [28]. In this work, we discuss an alternative approach which does not make use of parallel stochastic simulations, but at the same time, the proposed approach can also benefit from large processing power and parallel computing, as many steps of our proposed algorithms are highly parallelizable. An alternative approach to treating the molecular populations as discrete random variables, is to describe them in terms of their continuously changing concentration, which can be done via the Chemical Langevin equation (CLE), a stochastic differential equation that links the discrete stochastic simulation algorithm with the deterministic reaction rate equations [20]. Although such an approach can be less computationally expensive, it comes with the disadvantage that, for certain chemical systems, it can lead to negative populations [46]. In addition, note that none of the above approaches takes explicit advantage of the separation of scales if one exists, a which we will make use of in this paper as detailed in Sections 4 and 5. It is often the case that a modeller is not interested in every single reaction which takes place in the system, but only in the slowly evolving quantities. Certain systems possess multiple time scales, meaning that one has to simulate a large number of reactions to reveal the slow dynamics. Several algorithms for chemical networks with fast and slow variables have already been developed in the literature. The authors of [25] proposed to simulate the fast reactions using Langevin dynamics, and the slow reactions using the Gillespie algorithm. This approach requires both the time scale separation and a sufficiently large system volume; however the latter constraint can be avoided using probability densities of the fast species conditioned on the slow species, and estimating the effective propensity functions of the slow species [3, 4, 13, 37, 43]. An alternative approach to simulating the evolution of the slow variables while avoiding doing so for the fast variables, is to estimate the probability distribution of the slow variables [18]. The key point in this approach is to use short bursts of appropriately initialized stochastic simulations to estimate the drift and diffusion coefficients for an approximating Fokker-Planck equation written in terms of the slow variables [15]. The success of this approach has already been demonstrated in a range of applications including materials science [24], cell motility [14], and social behavior of insects [42]. Ref. [8] introduces the conditional stochastic simulation algorithm (CSSA) that allows one to sample efficiently from the distribution of the fast variables conditioned on the slow ones [8], and to estimate the coefficients of the effective stochastic differential equation (SDE) on the fly via a proposed constrained multiscale algorithm (CMA) algorithm. The CMA can be further modified by estimating the drift and diffusion coefficients in the form given by the CLE for the slow subsystem, which requires the estimation of effective propensity functions of slow reactions [9]. The main question we plan to address in our present work builds on and combines two already existing ideas investigated in [8] and [39], and brings several computational and algorithmic improvements. The above-mentioned CSSA algorithm explicitly makes use of the knowledge of the slow variables (often unavailable in many real applications), a drawback we plan to address as explained later in Section 4, where, driven by the top eigenvector of an appropriately constructed Laplacian, we discover the underlying slow variable. In doing so, we make use of the ADM framework [39] which modifies the traditional diffusion map approach to take into account the time-dependence of the data, i.e., the time stamp of each of the data points under consideration. By integrating local similarities at different scales, the ADM gives a global description of the data set. The rest of this paper is organized as follows. In Section 2 we provide a mathematical framework for multiscale modeling of stochastic chemical reactions networks and detail the two chemical systems via which we use to illustrate our approach. In Section 3 we introduce the ADM-CLE framework and we highlight its differences from the approaches which were previously introduced in the literature. In Section 4 we propose a robust mapping from the observable space to the “dynamically meaningful” inaccessible space, that allows us to recover the hidden slow variables. In Section 5 we introduce a Markov-based approach for approximating the steady distribution of the slow variable, and compare our results with another recently proposed approach. We conclude with a summary and discussion of future work in Section 6. 2 2. Problem formulation. A multi-scale modeling framework for stochastic chemical reaction networks can be formulated as follows. We consider a well-mixed system of ` chemical species, denoted by X1 , X2 , . . . , X` that interact through m reaction channels R1 , R2 , . . . , Rm in a reactor of volume V . We denote the state of the system by X(t) = [X1 (t), X2 , . . . , X` (t)], where Xi (t), i = 1, 2, . . . , ` represents the number of molecules of type Xi in the system at time t. With a slight abuse of notation, we interchangeably use Xi to denote the type i of the molecule. In certain scenarios, one may assume that the reactions can be classified as either fast or slow, depending on the time scale of occurrence [3]. As expected, the fast reactions occur many times on a timescale for which the slow reactions occur with very small probability. As defined in [3], the fast species denoted by F are those species whose population gets changed by a fast reaction. Slow species (denoted by S) are not changed by fast reactions. Considering that slow species are not only species from the set {X1 , X2 , . . . , X` }, but also their functions which are not changed by fast reactions, the components of the fast and slow species can be used as a basis for the state space of the system, whose dimension equals the number of linearly independent species. For each reaction channel Rj , j = 1, 2, . . . , m, there exists a corresponding propensity function αj ≡ αj (x), such that αj dt denotes the probability that, given X(t) = x, reaction Rj occurs within the infinitesimal time interval [t, t + dt). We denote by ν the stochiometrix matrix of size m × `, with entry νji denoting the change in the number of molecules of type Xi caused by one occurrence of reaction channel Rj . The continuous time discrete in space Markov chain can be further approximated by the CLE for a multivariate continuous Markov process [20]. Using time step ∆t, the Euler-Maruyama discretization of the CLE is given by Xi (t + ∆t) = Xi (t) + ∆t m X νji αj (X(t)) + j=1 m X νji q √ αj (X(t)) Nj (t) ∆t, for all i = 1, 2, . . . , `, (2.1) j=1 where Xi , with another slight abuse of notation, denotes a real-valued approximation of the number of molecules of the i-th chemical species, i = 1, 2, . . . , `. Here, Nj (t), j = 1, 2, . . . , m, denote the set of m independent normally distributed random variables with zero mean and unit variance. 2.1. Illustrative example CS-I. As the first illustrative example, we consider the following simple 2dimensional chemical system, with the two chemical species denoted by X1 and X2 (i.e., ` = 2) which are subject to four reaction channels Rj , j = 1, 2, 3, 4 (i.e., m = 4), given by k2 k1 k4 ∅ −→ X1 −→ ←− X2 −→ ∅. (2.2) k3 Throughout the rest of this paper, we shall refer to the chemical system (2.2) as CS-I (i.e. “chemical system I”). We label by Rj the reaction corresponding to the reaction rate subscript kj , j = 1, 2, 3, 4, and note that each reaction Rj has associated a propensity function αj (t) given by [21] α1 (t) = k1 V, α2 (t) = k2 X1 (t), α3 (t) = k3 X2 (t), α4 (t) = k4 X2 (t), (2.3) where V denotes the volume of the reactor. We consider the system with the following dimensionless parameters k1 V = 100, k2 = k3 = 200 and k4 = 1. (2.4) We plot in Figure 2.1(a) the time evolution of the two different species in system (2.2), together with the slow variable S = (X1 + X2 )/2, starting from initial conditions X1 (0) = X2 (0) = 100. As the figure shows, the system variables X1 and X2 are changing very frequently (thus we label them as fast variables), while the newly defined variable S changes very infrequently and can be considered to be a slow variable. Following [26], for the chemical system in (2.2) comprised only of monomolecular reactions, it is possible to compute analytically the stationary distribution of the slow variable S, since the joint probability distribution of the two variables X1 and X2 is a multivariate Poisson distribution  λ̄n1 1 λ̄n2 2 exp −λ̄1 − λ̄2 n1 ! n2 ! P(X1 = n1 , X2 = n2 ) = (2.5) with parameters given by λ̄1 = k1 V (k3 + k4 ) = 100.5 k2 k4 3 and λ̄2 = k1 V = 100. k4 (2.6) (a) (b) Trajectory of X1, X2, and S/3 = (X1 + 2 X2)/3 Trajectory of X1, X2, and (X1 + X2)/2 40 Number of molecules Number of molecules 120 110 100 90 80 0 X1 X2 X 1 2 (X + 2 X )/3 1 2 30 25 20 15 10 (X1 + X2)/2 0.05 X 35 0.1 0.15 5 0 0.2 0.02 0.04 0.06 0.08 0.1 Time t Time t Fig. 2.1. (a) Trajectories of the CS-I considered in (2.2) showing the behavior of the slow variable S = (X1 + X2 )/2 in contrast to the behavior of the fast variables X1 and X2 , where the system propensity functions and parameters are given by (2.3) and (2.4). (b) Trajectories of the CS-II considered in (2.7), showing the slow behavior of the variable S = X1 + 2X2 in contrast to the fast behavior of variables X1 and X2 , where the system parameters are given by (2.8). 2.2. Illustrative example CS-II. The second example is taken from Ref. [8]. We shall refer to it as CS-II from now on. We consider the following system k1 X2 −→ ←− X1 + X2 , k2 k3 ∅ −→ ←− X1 , k4 k5 X1 + X1 −→ ←− X2 , (2.7) k6 involving two molecular species X1 and X2 , whose reactions R1 , R2 , . . . , R6 have the propensity functions given by α1 (t) = k1 X2 (t), α4 (t) = k4 X1 (t), α2 (t) = k2 X1 (t)X2 (t)/V, X1 (t)(X1 (t) − 1) , α5 (t) = k5 V α3 (t) = k3 V, α6 (t) = k6 X2 (t), where V denotes the system volume. Figure 2.1(b) shows a simulated trajectory of this chemical system using the Gillespie algorithm for the following dimensionless parameters [8] k1 = 32, k2 = 0.04V, k3 V = 1475, k4 = 19.75, k5 = 10V, k6 = 4000, (2.8) where we use V = 8. Note that in this second example, reactions R5 and R6 are occurring on a much faster timescale than the other four reactions R1 , R2 , R3 and R4 . A natural choice for the slow variable is S = X1 +2X2 , which is invariant with respect to all fast reactions [8], as we illustrate in Figure 2.1(b). 2.3. Main problem. Our end goal in the present paper is to propose an algorithm that efficiently and accurately estimates the stationary probability density of the hidden slow variable S, without any prior knowledge of it. The approach we propose builds on the anisotropic diffusion map framework (ADM) to implicitly discover the mapping from the observable state space to the dynamically meaningful coordinates of the fast and slow variables, as previously introduced in [39], and on the CLE approximation (2.1). 3. ADM-CLE approach. Let us consider example CS-II, and assume that s = s(x1 , x2 ) = x1 + 2x2 and f = f (x1 , x2 ) = x1 are the slowly and rapidly changing variables, respectively. They together define a mapping g : (x1 , x2 ) 7→ (s, f ) from the observable state variables x1 and x2 in the accessible space O to the “dynamically meaningful” (but in more complicated examples inaccessible) slow variable s and the fast accessible variable f , both in space H. In other words, g maps (x1 , x2 ) 7→ (x1 + 2x2 , x1 ), and conversely its inverse h := g −1 : (s, f ) 7→ (f, s−f 2 ). The approach introduced in [39] exploits the local point clouds generated by many local bursts of simulations at each point (x1 , x2 ) in the observable space O. Such observable local point clouds are the image under h of similar local point clouds in the inaccessible space H (at corresponding coordinates (s, f ) such that h(s, f ) = (x1 , x2 )), which, due to the separation of scales between the fast and slow variables f and s, have the appearance of thin elongated ellipses. It is precisely this separation of scales that we leverage into building a sparse anisotropic graph Laplacian L in the observable space, and use it as an approximation of the isotropic graph Laplacian in the inaccessible space H. As we shall see, the top nontrivial eigenvector of L will robustly indicate all pairs of original states (x1 , x2 ) that correspond to the same slow variable S = s (where s = x1 + 2x2 for CS-II). In other words, we discover on the fly the structure of the slow variable S, and further integrate this information into a 4 Markov-based method for estimating its stationary distribution P(S = s), while also computing along the way an analytical expression for the conditional distribution of the fast variable given the slow variable P(F = f |S = s). Singer et al. [39] run many local bursts of simulations for a short time step δt starting at (x1 , x2 ). Such trajectories end up at random locations forming a cloud of points in the observable plane O, with a bivariate normal distribution with 2 × 2 covariance matrix Σ. The shape of the resulting point cloud is an ellipse, whose axes reflect the dynamics of the data points. In other words, when there is a separation of scales, the ellipses are thin and elongated, with the ratio between the axis of the ellipse given by the ratio τ= b1 λ b2 λ (3.1) b1 points in the direction of the fast dynamics of the two eigenvalues of Σ. The first eigenvector corresponding to λ on the line x1 + 2x2 = s, while the second one points in the direction of the slow dynamics. In particular, τ is a small parameter, i.e. 0 < τ  1. In general, we wish to piece together locally defined components into a globally consistent framework, a nontrivial task when the underlying unobservable slow variables (or the propensity functions of the system) are complicated nonlinear functions of the observable variables in O. The construction of the ADM framework in [39] relates the anisotropic graph Laplacian in the observable space O with the isotropic graph Laplacian in the inaccessible space H. In that setup, each of the N data points x(i) , i = 1, 2, . . . , N, lives in an `-dimensional data space. For both CS-I and CS-II, the data is twodimensional, thus ` = 2. For the former system, we consider each lattice point in the domain [50, 150] × [50, 150], hence there are N = 1012 = 10, 201 states, while for the latter one we consider the domain [1, 110] × [1, 110], i.e. N = 1102 = 12, 100. Throughout the paper, we will often refer to the N data points x(i) = (x1 , x2 )(i) , i = 1, 2, . . . , N, as O-states of the chemical system. The ADM [39] then generates ensembles of short simulation bursts at each of the N points in the data set, computes the averaged position after statistically averaging over the many simulated trajectories, and obtain an estimate of the local 2 × 2 covariance matrix Σ(i) . For each data point x(i) , the inverse of Σ(i) is computed and symmetric Σ-dependent squared distance between pairs of data points in the two-dimensional observable space R2 (given by (3.3) below) is defined. The ADM framework then uses this dynamic distance measure to approximate the Laplacian on the underlying hidden slow manifold. We provide further details on the anisotropic diffusion maps framework in Section 3.2. We now highlight the first difference between the approach taken in this paper and in [39]. 3.1. Replacing short simulation bursts by the CLE approximation. The local bursts of simulations initiated at each data point in order to estimate the local covariances may be computationally expensive to estimate. In this paper, we bypass these short bursts of simulations by using an approximation given by the CLE (2.1), which allows for a theoretical derivation of the local 2 × 2 covariance matrices. Using (2.1), we obtain Cov(Xi (t + ∆t), Xk (t + ∆t)) = E[Xi (t + ∆t)Xk (t + ∆t)] − E[Xi (t + ∆t)]E[Xk (t + ∆t)] m X = ∆t νji νjk αj (X). (3.2) j=1 Computing the eigen-decomposition of a local covariance matrix is analogous to performing the Principal Component Analysis on the local cloud of points, generated by the short simulations bursts. The advantage of (3.2) over the computational approach used in [39] is that Σ(i) can be computed at each data point without running (computationally intensive) short bursts of simulations. The error of the CLE approximation depends on the values of coordinates of the data point x(i) , i.e. on the system volume V [23, 12]. In the case of CS-I or CS-II, the most probable states contain about one hundred molecules of each chemical species and the CLE approximation (3.2) is well justified. 3.2. Anisotropic diffusion kernels. The next task is the integration of all local principal components into a global framework, with the purpose of identifying the hidden slow variable. We estimate the distance (and hence the similarity measure) between the slow variables in the underlying inaccessible manifold using the anisotropic graph Laplacian [39]. We derive a symmetrized second order approximation of the (unknown) distances in the inaccessible space H, based on the Jacobian of the unknown mapping from the inaccessible to the observable space. The Σ-dependent distance between two O-states is given by   T   1 −1 (i) (j) (x1 , x2 )(i) − (x1 , x2 )(j) Σ−1 + Σ (x , x ) − (x , x ) , d2Σ (x1 , x2 )(i) , (x1 , x2 )(j) = 1 2 1 2 (i) (j) (x1 ,x2 ) (x1 ,x2 ) 2 (3.3) 5 and represents a second order approximation of the Euclidean distance in the inaccessible (s, τ f )-space d2Σ [(x1 , x2 )(i) , (x1 , x2 )(j) ] ≈ (s(i) − s(j) )2 + τ 2 (f (i) − f (j) )2 ≈ (s(i) − s(j) )2 , (3.4) where the last approximation is due to the fact that τ is a small parameter, see (3.1). Note that it is also possible to extend (3.4) to higher dimensions, as long as there exists a separation of scales between the set of slow variables and the set of fast variables [39]. Using approximation (3.3)–(3.4) of the distance between states of the slow variable, we next construct (an approximation of) the Laplacian on the underlying hidden slow manifold, using the Gaussian kernel as a similarity measure between the slow variable states. We build an N × N similarity matrix W with entries     2 −(s(i) − s(j) )2 −dΣ [(x1 , x2 )(i) , (x1 , x2 )(j) ] ≈ exp , i, j = 1, 2, . . . , N, (3.5) Wij = exp ε2 ε2 where the single smoothing parameter ε (the kernel scale) has a two-fold interpretation. On one hand, ε denotes the squared radius of the neighborhood √ used to infer local geometric information, in particular Wij is O(1) when s(i) and s(j) are in a ball of radius ε, thus close on the underlying slow manifold, but it is exponentially small √ for states that are more than ε apart. On the other hand, ε represents the discrete time step at which the underlying random walker jumps from one point to another. We refer the reader to [31] for a detailed survey of random walks on graphs, and their applications. We normalize W using the diagonal matrix D to define the row-stochastic matrix L by Dii = N X L = D−1 W. Wij , (3.6) j=1 Since L is a row-stochastic matrix, it has eigenvalue λ0 = 1 with trivial eigenvector Φ0 = (1, 1, . . . , 1)T . The remaining eigenvalues can be ordered as 1 = λ0 ≥ λ1 ≥ λ2 ≥ . . . ≥ λN −1 . We denote by Φi the corresponding eigenvectors, i.e. LΦi = λi Φi . The top d nontrivial eigenvectors of the random-walk anisotropic Laplacian L describe the geometry of the underlying d-dimensional manifold [16], i.e. the i-th data point x(i) is represented by the following diffusion map (Φ1 (i), Φ2 (i), . . . , Φd (i)), i = 1, 2, . . . , N, (3.7) where Φj (i) denotes the i-th component of the eigenvector Φj . However, note that some of the considered eigenvectors can be higher harmonics of the same principal direction along the manifold, thus in practice one computes the correlation between the computed eigenvectors before selecting the above d eigenvectors chosen to parametrize the underlying manifold. For the two chemical systems considered in this paper, we show in the remainder of this section how the top (i.e., d = 1) non-trivial eigenvector of L can be used to successfully recover the underlying slow variable. Using the stochasticity of L, we can interpret it as a random walk matrix on the weighted graph G = (V, E), where the set of nodes corresponds to the original observable states (x1 , x2 )(i) , i = 1, 2, . . . , N (and implicitly to states s(i) of the slow variable), and there is an edge between nodes i and j if and only if Wij > 0. The associated combinatorial Laplacian is given by L̃ = D − W . Whenever the pair (λi , Φi ) is an eigenvalue-eigenvector solution to LΦi = λi Φi , then so is (1 − λi , Φi ) for the generalized eigenvalue problem L̃Φi = λi DΦi . We plot in Figures 3.1(a) and 3.2(a) the spectrum of the combinatorial Laplacian L̃ = D − W , for the chemical systems CS-I and CS-II. In Figures 3.1(b) and 3.2(b) we color the states of the network with the top non-trivial eigenvector Φ1 . Before considering the top eigenvector of L for determining the underlying slow variable and estimating its stationary distribution, we propose to use a sparse graph Laplacian which differs from the ADM method in [39], where the Laplacian matrix is associated to a complete weighted graph. However, using a complete graph leads to computing the Σ-dependent squared distance in equation (3.3) for any pair of nodes, thus an O(N 2 ) number of computations is used. In light of the approximation (3.4), a pair of points which are far away in the observable space (i.e., for which d2Σ ((x1 , x2 )(i) , (x1 , x2 )(j) ) is large) denotes a pair of corresponding states of the slow variable which are also far away in the inaccessible space. Thus we do not have to do such computations, because points far away in the unobservable space will have an exponentially small similarity Wij close to 0. The fact that the shape of the local point cloud is an ellipse provides some insight in this direction. Thus we will build a sparse graph of pairwise measurements and no longer compute the Σ-dependent distance between all points of the data 6 (a) (b) (c) (d) Φ1 Weighted degree 150 Histogram of the weighted degrees of nodes in G 150 Top 500 eigenvalues 550 0.015 500 0.01 450 200 0.8 400 0.005 350 −0.005 0.4 x2 0 100 count 1−λ x2 0.6 150 300 100 250 100 200 −0.01 0.2 150 50 −0.015 100 50 0 100 200 300 400 rank largest eigenvalue −0.02 50 50 500 100 x1 0 150 100 200 300 400 weighted degree 50 50 500 100 x1 150 Fig. 3.1. Illustrative Example CS-I. (a) The top 500 eigenvalues of the associated combinatorial Laplacian, i.e. (1 − λi ) for i = 1, 2, . . . , 500. (b) The coloring of the nodes of G (states of the observable space) according to their corresponding entry in the top eigenvector Φ1 of L given by (3.6). (c) The weighted degree distribution of the ground state graph G. (d) A scatterplot of the states of the system, colored by their weighted degree. (b) (a) (c) (d) Weighted degree Φ 1 800 Top 500 eigenvalues Histogram of the weighted degrees of nodes in G 0.015 100 600 100 700 0.01 0.8 80 500 80 400 60 600 500 60 count 1−λ x2 0.6 0 40 0.4 x2 0.005 300 400 40 300 −0.005 200 20 0.2 0 100 200 300 400 rank largest eigenvalue 500 −0.01 20 40 60 80 0 100 x1 200 20 100 100 200 400 600 weighted degree 800 20 40 60 80 100 x1 Fig. 3.2. Illustrative Example CS-II. (a) The top 500 eigenvalues of the associated combinatorial Laplacian, i.e. (1 − λi ) for i = 1, 2, . . . , 500. (b) The coloring of the nodes of G (states of the observable space) according to their corresponding entry in the top eigenvector Φ1 of L given by (3.6). (c) The weighted degree distribution of the ground state graph G. (d) A scatterplot of the states of the system, colored by their weighted degree. set, but only between a very small subset of the points. The spectrum of the covariance matrix Σi , in particular the ratio τ of its two eigenvalues given by (3.1), guides us in building locally at each point, a sparse ellipsoid-like neighborhood graph. For each observable state (x1 , x2 )(i) , we build a local adjacency graph, denoted by Gi , in the shape of an ellipse pointing in the direction of the fast dynamics, and whose small axis points in the direction of the slow dynamics. Figure 3.3 shows an example of such a local 1-hop neighborhood graph Gi , where the central node (x1 , x2 )(i) is connected to all points contained within the boundaries of an appropriately scaled ellipse centered at (x1 , x2 )(i) . Finally, we define the sparse graph G of size N × N associated to the entire network as the union of SN all locally defined ellipsoid-like neighborhood graphs G = i=1 Gi . Note that the union graph G is still a simple graph, with no self edges and no multiple edges connecting the same pair of nodes. We compute the distance dΣ by (3.3) (and thus the similarity Wij ) between a pair of nodes (x1 , x2 )(i) and (x1 , x2 )(j) if and only if the corresponding edge (i, j) exists in G. We plot in Figures 3.1(c) and 3.2(c) the histogram of the weighted degrees of the nodes in the weighted graph W defined in (3.5), while Figures 3.1(d) and 3.2(d) show a scatterplot of the states of the system, where each state i is colored by its weighted degree, i.e., the sum of all its outgoing weighted edges Wij , j = 1, 2, . . . , n. Throughout the computational examples in this paper, the smoothing parameter ε which appears in (3.5) was set to ε = 0.1. In contrast to the approach in [39] which computes all O(N 2 ) pairwise similarities, the sparsity of G (and thus of the associated graph Laplacian L) in our approach only requires the computation of a much smaller number of distances, as low as linear, depending on the discretization of the domain, and makes it computationally feasible to solve problems with thousands or even tens of thousands of nodes. 4. A robust mapping from the observable space O to the “dynamically meaningful” inaccessible space H. As a first step towards partitioning the nodes of the original graph G and detecting the associated slow variable, we sort the entries of the top eigenvector Φ1 , which we then denote by Φ̄1 with Φ̄1 (1) ≥ Φ̄1 (2) ≥ . . . ≥ Φ̄1 (N ). This sorting process defines permutation σ of the original index set i = 1, 2, . . . , N so that Φ̄1 (σ(i)) = Φ1 (i). We consider the increments between two consecutive (sorted) values δi = Φ̄1 (i) − Φ̄1 (i + 1), i = 1, 2, . . . , N − 1. 7 (4.1) 125 120 115 110 105 100 80 85 90 95 100 105 Fig. 3.3. The local neighborhood graph Gi at a given node (x1 , x2 )(i) ; the shape is an ellipsoid whose axis ratio is given by the ratio of the eigenvalues τ of the local covariance matrix d2Σ ((x1 , x2 )(i) , (x1 , x2 )(j) ), i.e. by (3.1). The corresponding eigenvectors are used to calculate the orientation of the ellipse. (a) (b) x 10 0.01 4 3 2 15 eigenvector value Top eigenvector 5 Jump size 20 0.015 6 0.005 0 −0.005 50 100 150 200 Eigenvector entry 250 300 10 5 −0.01 −0.015 1 zoom−in −4 x 10 n=10201; Spearman Correlation=0.99998 i 7 0 (c) Top largest jumps δ −8 −0.02 50 0 100 True slow variable 150 5000 5200 5400 5600 5800 6000 Index Fig. 4.1. Illustrative example CS-I. (a) Jump sizes (4.1) of the sorted eigenvector Φ1 of the sparse anisotropic graph Laplacian L. (b) The correlation of Φ1 with the ground truth slow variable s = (x1 + x2 )/2. (c) Zoom-in on the sorted top eigenvector Φ̄1 (the colors denote the corresponding slow variable) showing that Φ̄1 is almost piece-wise constant on the bins that correspond to distinct slow variable states. The kernel scale is set to ε = 0.1. Next, we sort the vector of such increments, denote its entries by δ̄1 ≥ δ̄2 ≥ . . . δ̄N −1 , and show in Figure 4.1(a) (resp. Figure 4.2(a)) the top 300 (resp. top 420) largest such increments δ̄i for illustrative example CS-I (resp. CS-II). Note that this already give us an idea about the number of distinct slow states in the system, a set which we denote by S. Ideally, the difference Φ1 (i) − Φ1 (j) in the entries of the top eigenvector corresponding to two observable states (x1 , x2 )(i) and (x1 , x2 )(j) that belong to the same slow variable s (i.e., (i) (j) (j) (i) x1 + 2x2 = x1 + 2x2 = s for illustrative example CS-II) should be zero or close to zero, in which case we expect that only approximately |S| of the N − 1 increments δi are significantly larger than zero, while the remaining majority are zero or close to zero. In Figures 4.1(b) and 4.2(b) we highlight the correlation between the entries of the top non-trivial eigenvector Φ1 and the corresponding slow variable S. In Figures 4.1(c) and 4.2(c), we zoom on a subset of states to make the point that the eigenvector Φ1 is almost constant on the O-states that correspond to the same value of the slow variable. The plots in Figures 3.1(b) and 3.2(b) show a coloring of the networks generated by the two chemical systems CS-I and CS-II, based on the first nontrivial eigenvector of the associated sparse Laplacian L. Note that the eigenvector looks almost piecewise constant along the lines that point to the evolution of the fast variable, for a given value of the slow variable (S = (X1 + X2 )/2 for CS-I and S = X1 + 2X2 for CS-II), yet nowhere along the way we have input this information into the method. In the next step we use this top eigenvector to identify all nodes of the graph (original states of the chemical system) that correspond to the same value of the underlying slow variable. In other words, all nodes whose corresponding eigenvector entries are between an appropriately chosen interval (that we shall refer to a bin) will be labeled as belonging to the same slow variable S. In other words, we seek a partition of the observable states in O, i.e., of the nodes of G, such that all original states (x1 , x2 )(i) with the same value of the corresponding slow variable s((x1 , x2 )(i) ) end up in the same bin. 8 (a) (b) 1.2 (c) Top largest jumps δ n=12100; Spearman Correlation=0.99999 i −8 x 10 zoom−in −3 x 10 −0.5 0.01 1 Jump size 0.6 0.4 0 −0.005 −1.5 −2 −2.5 −0.01 0.2 0 eigenvector value Top eigenvector −1 0.8 0.005 −3 −0.015 50 100 150 200 250 300 Eigenvector entry 350 50 100 True slow variable 400 150 5000 5200 5400 5600 5800 6000 Index Fig. 4.2. Illustrative example CS-II. (a) Jump sizes (4.1) of the sorted eigenvector Φ1 of the sparse anisotropic graph Laplacian L. (b) The correlation of Φ1 with the ground truth slow variable s = x1 + 2x2 . (c) Zoom-in on the sorted top eigenvector Φ̄1 (the colors denote the corresponding slow variable) showing that Φ̄1 is almost piece-wise constant on the bins that correspond to distinct slow variable states. The kernel scale is set to ε = 0.1. Our goal is to find a partition P = {P1 , P2 , . . . , Pk } of O such that Pj = {(x1 , x2 )(i) ∈ O | s(x1 , x2 ) = qj } and k [ Pj = O, (4.2) j=1 where k denotes the number of distinct values qj , j = 1, 2, . . . , k, of the slow variable S. As an example, in the case of CS-I given by (2.2), the partition Pj = {(1, 99), (2, 98), . . . , (99, 1)} corresponds to all nodes in the graph for which the value of the associated slow variable is constant qj = 50. The key observation we exploit here is that the top eigenvector of the Laplacian matrix is almost piecewise constant on the bins that partition O, since the nodes of G that correspond to the same value of the slow variable have a very high pairwise similarity, with Wij very close to 1. One may also interpret the above problem as a clustering problem, where the similarity between pairs of points is given by (3.5), and is such that nodes that belong to the same bin have a much higher similarity compared to nodes that belong to two different bins, an effect due to the strong separation of scales. In the case of illustrative example CS-I, the clusters correspond to lines in the two-dimensional plane such that (x1 + x2 )/2 = c, for a constant c. We point out the interested reader to the work of [32], where the top eigenvectors of the random walk Laplacian are used for clustering. While in practice one uses the top several eigenvectors as the reduced eigenspace where clustering is subsequently performed, in our case the top eigenvector alone suffices to capture the many different clusters (i.e., bins), a fact we attribute to the strong separation of scales exhibited by the illustrative chemical systems CS-I and CS-II. If several eigenvectors were considered then one could use a clustering algorithm, such as k-means or spectral clustering [38, 45], to obtain the partitioning (4.2). However, a simpler method has been successfully used for the 1-dimensional eigenspace in both examples we considered. It is described as follows. Recall the sorted vector of increments δ̄1 ≥ δ̄2 ≥ . . . ≥ δ̄N −1 defined in equation (4.1), and consider the set of the k − 1 largest such increments {δ̄1 , δ̄2 , . . . , δ̄k−1 } where δ̄1 ≥ δ̄2 ≥ . . . ≥ δ̄k−1 . Next, from the sorted eigenvector Φ̄1 we extract the position of the entries whose associated increment (with respect to its right-next neighbor index) belongs to {δ̄1 , δ̄2 , . . . , δ̄k−1 }. In others words, we compute bt = arg Φ̄1 (i) − Φ̄1 (i + 1) = δ̄t , where t = 1, 2, . . . , k − 1, (4.3) i=1,2,...,N −1 and b0 = 0 and bk = N. Finally, we compute an estimated partition P̂ of O by P̂q = {i ∈ O | σ(i) ∈ (bq−1 , bq ]}, where q = 1, 2, . . . , k, and σ is the permutation of the original index set i = 1, 2, . . . , N, given in the definition of Φ̄1 , i.e. Φ̄1 (σ(i)) = Φ1 (i). To illustrate the correctness of our proposed technique, we compute the Jaccard index between each proposed partition set P̂j , j = 1, 2, . . . , k and each ground truth partition set Pi , i = 1, 2, . . . , |S|: Jij = |Pi ∩ P̂j | |Pi ∪ P̂j | , where i = 1, 2, . . . , |S|, j = 1, 2, . . . , k, (4.4) and show a heatmap of this matrix in Figure 4.3(b). Since we are interested not only in the partition, but also in recovering the ordering of the slow variable, we show in Figure 4.3(c) the correlation between the ground truth ordering of the slow variable and our recovered ordering. Note that we can only recover the ordering up to a 9 (c) Jaccard index heatmap 1 Our recovered 201 slow variables Number of original states 100 80 60 40 20 0 50 100 Slow variable 150 0.8 50 0.6 100 0.4 150 0.2 200 200 50 100 150 Ground truth 201 slow variables 0 200 (d) Max matching in the Jaccard index matrix Spearman correlation = 1 200 1 Jaccard Similarity Index (b) Cardinality eig slow var. |S | = 201, Θ = 200 Ground truth label of matched slow variables (a) 150 100 50 50 100 150 Order of our slow variables (1:201) 0.8 0.6 0.4 0.2 0 200 0 50 100 150 200 Our recovered slow variables (1:201) Fig. 4.3. Illustrative example CS-I. (a) The eigenvector-based slow variable cardinality. The Theta score Θ is the smoothness measure of the bin cardinalities, defined in (4.5). The algorithm perfectly recovers the ground truth partition. (b) The heatmap of the pairwise Jaccard similarity matrix given by (4.4). (c) The correlation between the ordering of the ground truth slow variable and the eigenvector recovered slow variable. (d) The Jaccard index of the pairwise matched bins (from the maximum matching). (b) (a) (c) Cardinality true slow var. |S | = 328, Θ = 108 Cardinality eig slow var. |S | = 328, Θ = 7206 40 30 20 10 0 50 100 150 200 Slow variable 250 300 50 Number of original states 50 Number of original states Number of original states 50 Cardinality eig slow var. |S | = 328, Θ = 7206 40 30 20 10 0 50 100 150 200 Slow variable 250 300 40 30 20 10 0 130 140 150 160 Slow variable (zoom−in) 170 Fig. 4.4. Illustrative example CS-II. (a) The ground truth slow variable cardinality. (b) The eigenvector-based slow variable cardinality. Θ captures the smoothness of the bin cardinalities, as introduced in (4.5). (c) Plot of the cardinalities of a subset of bins, showing the erroneous bin assignments in the eigenvector-based partition. This is a zoomed-in version of panel (b). global sign, since −Ψ1 is also an eigenvector of L. Finally, we compute the maximum weight matching (using, for example, the Hungarian method [29]) in the bipartite graph with node set P ∪ P̂ and edges across the two sets given by matrix J in (4.4). In Figure 4.3(d) we plot the Jaccard index of the matched partitions. For the first chemical system CS-I, note that the algorithm perfectly recovers the ground truth partition. In Figure 4.4 we present the outcome of the binning algorithm for the illustrative example CS-II, which is no longer satisfactorily by itself and requires further improvement. Though the bin cardinalities in the initial solution visually resemble the ground truth, there are numerous mistakes being made. To illustrate this, for a given partition P, we compute the following measure of continuity of the recovered bin cardinalities ΘP = Θ(P1 , . . . , PS ) = S−1 X (|Pi | − |Pi+1 |)2 . (4.5) i=1 In other words, ΘP captures the squared difference in the cardinalities of two consecutive bins. For the chemical system CS-II, the ground truth yields a score Θ = 108, while for the eigenvector-recovered solution Θ = 7206, thus indicating already that numerous misclassifications are being made, without even computing the Jaccard similarity matrix (4.4) between the two partitions. To this end, we introduce in the next subsection a heuristic denoising technique followed by a truncation of the domain, which altogether lead to a better partitioning of O into groups of states that correspond to the same slow variable. 4.1. A bin denoising scheme. While the eigenvector-based partition procedure detailed above yields accurate results for the CS-I in (2.2), this procedure alone is not sufficient for obtaining a satisfactory partition for the more complex CS-II considered in (2.7), as illustrated by the high corresponding Θ-score (Θ = 7206) shown in Figure 4.4(b). In Figure 4.4(c) we zoom into some of the recovered bins, showing that the eigenvectorbased reconstruction splits some of the inner bins, which explains the high associated Θ-score. In other words, states/bins which in the ground truth solution correspond to the same values of the slow state variable, are divided into two adjacent bins, and mistaken for two distinct states of the slow variable. To solve this issue, we propose a bin-denoising heuristic that robustly assigns data points to their respective bins. In hindsight, the continuity of the eigenfunctions of the Laplacian should be reflected in the continuity of the histogram of state counts in bins corresponding to adjacent intervals. We detail in Algorithm 1 an 10 Algorithm 1 Bin-merging algorithm: 1: Initialize FLAG = TRUE 2: while FLAG is TRUE do  3: Compute αi := Θ P1 , . . . , Pi ∪ Pi+1 , . . . P|S| , 4: if min αi < Θ(P1 , . . . , P|S| ) then ∀i = 1, 2, . . . |S| − 1 using definition (4.5) i=1,2,...,|S|−1 q= 5: argmin αi i=1,2,...,|S|−1 P := P1 , . . . , Pq ∪ Pq+1 , . . . P|S| |S| = |S| − 1 else FLAG = FALSE end if end while (b) (c) Up dated cardinality slow var. |S | = 314, Θ = 103 Jaccard index heatmap 1 Our recovered 314 slow variables Number of original states 50 40 30 20 10 0 50 0.8 100 0.6 150 0.4 200 250 0.2 300 50 100 150 200 250 300 Slow variable (after truncation and denoising) 50 100 150 200 250 Ground truth 314 slow variables 300 0 (d) Max matching in the Jaccard index matrix Spearman correlation = 1 300 1 250 Jaccard Similarity Index (a) Ground truth label of matched slow variables 6: 7: 8: 9: 10: 11: 200 150 100 50 50 100 150 200 250 Order of our slow variables (1:314) 300 0.8 0.6 0.4 0.2 0 0 50 100 150 200 250 300 Our recovered slow variables (1:314) Fig. 4.5. Illustrative example CS-II. (a) The eigenvector-based slow variable cardinality after truncating and bin denoising. The Theta score Θ is the smoothness measure of the bin cardinalities, defined in (4.5). (b) The heatmap of the pairwise Jaccard similarity matrix given by (4.4). (c) The correlation between the ordering of the ground truth slow variable and the eigenvector recovered slow variable. (d) The Jaccard index of the pairwise matched bins (from the maximum matching). iterative heuristic procedure which, at each step, merges two adjacent bins such that the resulting Θ-score is minimized across all possible pairs of adjacent bins that can be merged. We show in Figure 4.5(a) the resulting bin cardinalities after the bin-merging heuristic and after truncating at the boundary of the slow variable. Note that the new denoised partition yields Θ = 103, and the number of bins (states of the slow variable) decreases from |S| = 328 to |S| = 314. Furthermore, in Figure 4.5(b) we compute the Jaccard similarity matrix between the ground truth and the newly obtained partition, showing in Figure 4.5(d) that we almost perfectly recover the structure of the ground truth bins. 5. A Markov approach for computing the steady distribution of the slow variable. In this section, we focus on the final step of the ADM-CLE approach, of estimating the stationary distribution of the slow variable, without any prior knowledge of what the slow variable actually is. One of the ingredients needed along the way is an estimation of the conditional distribution P(F |S = s) of the fast variable F given a value s of the slow variable S, which we compute via two approaches. As the first approach, we consider the Conditional Stochastic Simulation Algorithm (CSSA) [8] which is given in Algorithm 2. It samples from the distribution of the fast variable conditioned on the slow variable. The second approach is entirely analytic and free of any stochastic simulations, and amounts to analytically solving the CME for each set in the partition P = {P1 , P2 , . . . , Pk }. We then compare our results to the Constrained Multiscale Algorithm (CMA) introduced in [8], which approximates the effective dynamics of the slow variable as a SDE, after estimating the effective drift and diffusion using the CSSA (Algorithm 2). 5.1. A stochastic simulation algorithm for estimating the conditional probability (CSSA). Our next task is to estimate the conditional distribution P(F |S = s) of the fast variable F given a value s of the slow variable S. One possible approach for doing this relies on the CSSA algorithm to globally integrate the effective dynamics of the slow variable. One iteration of the CSSA is given in Algorithm 2. Ideally, one repeats steps 1–6 of Algorithm 2 and samples values of F until the distribution P(F |S = s) converges. In practice, we run Algorithm 2 until Lc changes of the slow variable S occur. This computation is done for each value in the range of the slow variable S = {s1 , s2 , . . . , s|S| }. 5.2. An analytical derivation of the conditional distribution. An alternative approach which we follow in this paper relies on an analytical computation of the conditional distribution P(F |S = s), thus eliminating 11 Algorithm 2 One iteration of the CSSA for computing the conditional distribution P(F |S = s) of the fast variable F given a value s of the slow variable S m X 1: Compute the propensity functions αi (t), for i = 1, 2, . . . , m, and their sum α0 (t) = αi (t). i=1 2: Generate r1 and r2 , two uniformly distributed random numbers in (0, 1). 3: Compute the next reaction time as t + τ where τ = − log(r1 )/α0 (t). 4: Use r2 to select reaction Rj which occurs at time t + τ (each reaction Ri , i = 1, 2, . . . , m occurs with probability αi /α0 ). 5: If the slow variable S changes its current state from s to s0 6= s due to reaction Rj occurring, reset S = s to its previous value, while not changing the value of the fast variable F . 6: If any of the variables Xi goes outside the boundary of the considered domain, then revert to the state of the system in Step 4 before reaction Rj occurred. X1 1 1 1 1 1 3 3 3 3 3 3 5 5 5 5 5 5 7 7 7 X2 3 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 0 0 0 S 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 X10 2 0 2 0 3 4 2 4 2 1 5 6 4 6 4 3 7 8 6 5 X20 3 3 3 3 2 2 2 2 2 3 1 1 1 1 1 2 0 0 0 1 S0 8 6 8 6 7 8 6 8 6 7 7 8 6 8 6 7 7 8 6 7 Rj 1 2 3 4 6 1 2 3 4 5 6 1 2 3 4 5 6 3 4 5 αj /α0 7.8 × 10−3 7.8 × 10−5 1.5 × 10−2 1.6 × 10−3 9.7 × 10−1 7.3 × 10−3 2.0 × 10−4 2.1 × 10−2 6.7 × 10−3 5.4 × 10−2 9.1 × 10−1 5.4 × 10−3 3.0 × 10−4 3.1 × 10−2 1.6 × 10−2 2.7 × 10−1 6.7 × 10−1 5.0 × 10−2 3.7 × 10−2 9.1 × 10−1 αj 96 0.96 184.38 19.75 12000 64 1.92 184.38 59.25 480 8000 32 1.6 184.38 98.75 1600 4000 184.38 138.25 3360 Table 5.1 Illustrative example CS-II. The set of all ground states of the system (x1 , x2 ) corresponding to the slow variable S = X1 +2X2 = 7. We denote by (x01 , x02 ) the states reachable from (x1 , x2 ) in one transition step, and by S 0 the associated corresponding slow variable such that S 0 = X10 + 2X20 . Rj denotes the reaction channel that takes the chemical system from state (x1 , x2 ) to (x01 , x02 ), with corresponding propensity αj . We highlight in bold letters the subset of all states via which the system can transition in one step from the slow variable S = 7 to S = 8. the need for any expensive stochastic simulations. We illustrate in Figure 5.1 the transition diagrams for the two chemical systems we consider in this paper. For chemical system CS-II, the system can transition from a given state (x1 , x2 ) to four adjacent distinct O-states: to (x1 − 2, x2 + 1) via channel R5 , to (x1 + 2, x2 − 1) via channel R6 , to (x1 − 1, x2 ) via channels R2 and R4 , and finally to state (x1 + 1, x2 ) via channels R1 and R3 . However, in terms of the underlying slow variable S, the system can transition to only two adjacent states S = s − 1 (via channels R2 and R4 ) and S = s + 1 (via channels R1 and R3 ), or remain at the current state S = s, via channels R5 and R6 . Considering the subsystem of fast reactions of CS-II and conditioning on the line s = x1 + 2x2 , the stationary CME takes the form 0 = k5 (x1 + 2)(x1 + 1) P(X1 = x1 + 2, X2 = x2 − 1) + k6 (x2 + 1) P(X1 = x1 − 2, X2 = x2 + 1) − (k5 x1 (x1 − 1) + k6 x2 ) P(X1 = x1 , X2 = x2 ). Thus, the conditional distribution for CS-II is, for 0 ≤ x1 ≤ s, given by C P(F = x1 |S = s) = x1 ! x2 !  k5 k6 x2 C = x1 ! ((s − x1 )/2)! 12  k5 k6 (s−x1 )/2 , if (s − x1 ) is an even number. (a) (b) ! ! !"'(#$)*%& !"'(#$)(%& +.& *,& ! *(& !"#$%& *-& !"#"$%&" !%#$ !")(#$%& !"'*#$%& +(& +-& ! !"#$%& +*& +,& !"#$ !")*#$%& *+& +/& !"#$'(%& !")(#$'(%& !")(#$'*%& !"'"$%&" ! ! Fig. 5.1. Transition diagrams for the two chemical systems: (a) CS-I; and (b) CS-II. Ps−1 S=s −1 Ps s −1 Θ1 Ps+1 s Θ1 S=s s S=s +1 s+1 Θ2 Θ2 Fig. 5.2. The Markov chain on the slow variable state space, using the aggregated transition probabilities (5.1)–(5.2) for the chemical system CS-II. Here, C is the normalization constants and P(F = x1 |S = s) = 0 if (s − x1 ) is an odd number. A similar argument can be used for CS-I. The stationary CME of the fast subsystem of CS-I is written as 0 = k2 (x1 + 1) P(X1 = x1 + 1, X2 = x2 − 1) + k3 (x2 + 1) P(X1 = x1 − 1, X2 = x2 + 1) − (k2 x1 + k3 x2 ) P(X1 = x1 , X = x2 ). where s = (x1 + x2 )/2. Thus, the conditional distribution for CS-I is, for 0 ≤ x1 ≤ 2s, given by  x2  2s−x1 C k2 k2 C P(F = x1 |S = s) = = , x1 !x2 ! k3 x1 !(2s − x1 )! k3 where C is again the normalization constant. 5.3. Aggregated transition rates and a Markov Chain on the state of slow variables. In the final step of the ADM-CLE approach, we set up a Markov chain on the state space of slow variables with the end goal of estimating the stationary distribution of the slow variable. As illustrated in Figure 5.1(b), the system CS-II can can transition from a given state S = s to two adjacent states S = s − 1 (via reaction channels R2 and R4 ) and S = s + 1 (via channels R1 and R3 ), or it can remain at the current state S = s, via channels R5 and R6 . Consider now the set Ps = {x(i) = (x1 , x2 )(i) |x1 + 2x2 = s}, illustrated as the middle bin in Figure 5.2. To compute the transition rate between two adjacent bins Ps and Ps+1 , one has to aggregate over possible ways (s) of getting from an observable state in bin Ps to an observable state in bin Ps+1 . We compute Θ1 to be the (i) (j) aggregated transition rate from state Ps to state Ps+1 , over all possible states (x , x ), such that x(i) ∈ PS and x(j) ∈ Ps+1 , by Θs1 = X X (i) P(F = x1 |S = s) m X αk (x(i) ) Q(x(i) , x(j) , Rk ) (5.1) k=1 x(i) ∈Ps x(j) ∈Ps+1 where Q(x(i) , x(j) , Rk ) denotes the indicator functions of whether one can transition from the O-state x(i) to O-state x(j) via reaction Rk . We define similarly the aggregated transition rate Θs2 , that the chemical system transitions from the slow variable state Ps to Ps−1 by Θs2 = X X (i) P(F = x1 |S = s) m X αk (x(i) ) Q(x(i) , x(j) , Rk ) (5.2) k=1 x(i) ∈Ps x(j) ∈Ps−1 We illustrate in Figure 5.3 the aggregated transition rates between the slow state S = s and its adjacent states S = s − 1 and S = s + 1, for all values of the slow variable S. Note that in the derivations (5.1) and (5.2), we 13 (a) (b) 3500 3000 5000 0 4500 −200 4000 −400 3500 −600 Θ1 − Θ2 2000 Θ2 Θ1 2500 (c) 3000 2500 1500 2000 1000 500 1500 −1200 1000 −1400 500 50 100 150 200 slow variable S 250 −800 −1000 300 −1600 50 100 150 200 slow variable S 250 300 50 100 150 200 slow variable S 250 300 Fig. 5.3. Plot of the aggregated transition rates for the illustrative example CS-II: (a) Θ1 ; (b) Θ2 ; and (c) Θ1 − Θ2 . (a) (b) Error = 0.028239 Error = 0.0033892 0.018 ADM−CLE exact solution 0.025 ADM−CLE exact solution 0.016 0.014 0.012 π(s) π(s) 0.02 0.015 0.01 0.01 0.008 0.006 0.004 0.005 0.002 0 140 160 180 200 220 240 0 260 s 50 100 150 200 250 300 s Fig. 5.4. The final estimated stationary distribution of the slow variable S for the ADM-CLE approach, computed without knowledge of the slow variable, for (a) the chemical system CS-I; and (b) the chemical system CS-II. (blue histograms). Red solid lines are exact solutions computed by solving the CME of the full model and using the corresponding definition of the slow variable. can either rely on the CSSA algorithm to sample from the conditional distribution of fast variables given values for the slow variables, as shown in Section 5.1, or use the analytic formulation which is possible to derived for both CS-I and CS-II, see Section 5.2. Finally, we compute the solution to the stationary CME associated to the system in Figure 5.2 which can be written as s s 0 = Θs−1 π(s − 1) + Θs+1 1 2 π(s + 1) − (Θ1 + Θ2 ) π(s), (5.3) where π(s) ≈ P(S = s) is the probability that S = s at time t. Assuming that π(s) = 0 for all s 6∈ S and using no-flux boundary conditions, we arrive at a linear system. The eigenvector of the resulting matrix, with associated eigenvalue λ = 0, yields an approximate solution of the stationary CME, which we plot in blue in Figure 5.4. Our result is visually indistinguishable from the exact solution (plotted as the red solid line). 5.4. A comparison with the Constrained Multiscale Algorithm (CMA). We compare the approach we introduced in the previous Section 5.3 with the CMA method proposed in [8]. We compare the results of the two methods with the ground truth, and record the error defined as   X Error π, P(S = s) = π(s) − P(S = s) , (5.4) s∈S where P(S = s) denotes the ground truth probability distribution of the slow, and π denotes the estimated solution, either by the CMA and or the ADM-CLE. As Table 5.2 shows, the ADM-CLE approach yields lower errors compared to the CMA algorithm, even when we run the latter with the parameter Lc as large as 20,000. Note that for the chemical system CS-I, the ground truth probability distribution of the slow variable P(S = s) can be easily computed using the multivariate Poisson distribution, as discussed in Section 2.1. For the second chemical system CS-II, we consider as ground truth the solution obtained by solving the associated CME of the full model in a large (truncated) domain. 14 CS-I CS-II Lc = 100 0.21768 0.66641 Lc = 500 0.089228 0.49063 Lc = 2, 000 0.10723 0.14206 Lc = 5, 000 0.045092 0.070711 Lc = 10, 000 0.040542 0.12937 Lc = 20, 000 0.066988 0.10995 ADM-CLE 0.003389 0.028239 Table 5.2 The distance (as measured by the error in (5.4)) between the estimated and the ground truth probability distributions of the slow variable, for the CMA algorithm which runs the CSSA algorithm for each value of the slow variable S = s, until Lc changes of the slow variable occur. The rightmost column shows the recovery errors for our proposed Markov-based approach. Error = 0.40385 0.04 Error = 0.1225 0.03 CMA exact solution 0.035 Error = 0.055016 CMA exact solution 0.025 0.025 Error = 0.053468 CMA exact solution 0.025 0.03 0.02 0.02 0.02 0.015 0.015 π(s) 0.02 π(s) π(s) 0.025 π(s) CMA exact solution 0.03 0.015 0.01 0.01 0.005 0.005 0.015 0.01 0.01 0.005 140 160 180 200 220 240 0 260 140 160 180 s 220 240 0 260 140 160 180 s (a) L = 100 0.02 0 260 140 160 180 0.025 0.025 0.02 0.02 0.015 200 220 240 260 s (d) L = 100, 000 Error = 0.039577 CMA KDE exact solution 0.03 π(s) π(s) 0.025 240 Error = 0.066556 CMA KDE exact solution 0.03 0.03 220 (c) L = 10, 000 Error = 0.1133 CMA KDE exact solution 200 s (b) L = 1, 000 Error = 0.31617 0.035 π(s) 200 CMA KDE exact solution 0.03 0.025 π(s) 0 0.005 0.015 0.02 0.015 0.015 0.01 0.005 0 140 160 180 200 220 s (e) L = 100 240 260 0.01 0.01 0.01 0.005 0.005 0.005 0 140 160 180 200 220 240 260 s 0 140 160 180 200 220 s (f) L = 1, 000 (g) L = 10, 000 240 260 0 140 160 180 200 220 240 260 s (h) L = 100, 000 Fig. 5.5. (a)–(d) The stationary distribution of the slow variable computed by the CMA for CS-I, using knowledge of the slow variable (blue histograms). The red solid line is the exact solution, P(S = s), obtained by solving the CME of the full system CS-I. The CMA approach runs the CSSA algorithm for each value of the slow variable S = s until Lc = {102 , 103 , 104 , 105 } changes of the slow variable occur. Panels (e)–(f) show the CMA-computed distribution after smoothing out by the Kernel Density Estimation procedure. In Table 5.2 we show numerical results that highlight the accuracy improvement of the ADM-CLE approach compared to the CMA approach of [8]. For the latter method, we run the CSSA algorithm [8] for each value of the slow variable, until Lc changes of the slow variable occur. As expected, the accuracy of the CMA algorithm improves as Lc increases, at the cost of additional computational running time of the method. In comparison, our stochastic simulation free approach yields significantly more accurate results, with errors that are at least one order of magnitude lower than the CMA method with L = 20, 000. We plot in Figures 5.5 and 5.6 (top rows) the estimated stationary distribution of the CMA method for both chemical systems considered throughout this paper, for several values of the L parameter. The bottom rows of the same Figures 5.5 and 5.6 show the estimated distribution, after smoothing out by the Kernel Density Estimation (KDE). 6. Summary and discussion. In this paper we have introduced an ADM-CLE approach for detecting intrinsic slow variables in high-dimensional dynamic data, generated by stochastic dynamical systems. In the original ADM framework, the local bursts of simulations initiated at each data point to estimate the local covariances are computationally expensive, a shortcoming we avoid by using an approximation of the CLE. A second innovation that further improved the computational performance relates to the underlying similarity graph, a starting point for the diffusion map approach. By exploiting the spectrum of each local covariance matrix, we built a sparse ellipsoid-like neighborhood graph at each point in the data set, with the end result of being able to build a sparse similarity graph that requires the computation of a much smaller number of distances, which makes the ADM-CLE approach scalable to networks with thousands or even tens of thousands of nodes. For the two illustrative examples considered in this paper, the size of the resulting graphs is N = 10, 201 for CS-I, and N = 12, 100 for CS-II, respectively. Had these graphs been complete graphs, the number of resulting weighted edges would be over 50 million, while in our computations, the number of edges is approximately 2.9 million for CS-I, and 3.9 million for CS-II. We have proposed a spectral-based method for inferring the slow variable present within the chemical sys15 Error = 0.68339 0.035 Error = 0.19916 CMA exact solution Error = 0.12937 CMA exact solution 0.02 Error = 0.080234 0.018 CMA exact solution 0.018 0.016 0.03 0.025 0.014 0.014 0.015 0.012 0.015 0.01 0.01 0.005 0.005 50 100 150 200 250 0 300 50 100 150 200 250 0.006 0.006 0.004 0.004 0.002 π(s) 150 200 s (e) L = 100 250 300 π(s) 0.012 0.005 0 300 0.01 0.014 0.014 0.012 0.012 0.01 0.006 0.004 0.004 0.002 0.002 250 0 0 300 s CMA KDE exact solution 0.008 0.002 50 100 150 200 s (f) L = 1, 000 300 0.01 0.006 200 250 Error = 0.1174 0.004 150 200 0.016 0.006 100 150 0.018 CMA KDE exact solution 0.008 50 100 (d) L = 100, 000 0.008 0 50 Error = 0.16161 0.014 0.01 250 s 0.016 0.016 0.015 200 0.018 CMA KDE exact solution 0.018 0.02 150 (c) L = 10, 000 Error = 0.18977 CMA KDE exact solution 100 100 s (b) L = 1, 000 Error = 0.65294 0.025 50 50 s (a) L = 100 π(s) 0.008 0 0 300 0.01 0.008 0.002 s 0 0.01 π(s) 0 π(s) π(s) π(s) π(s) 0.012 0.02 CMA exact solution 0.016 (g) L = 10, 000 250 300 0 50 100 150 200 250 300 s (h) L = 100, 000 Fig. 5.6. (a)–(d) The stationary distribution of the slow variable computed by the CMA for CS-II, using knowledge of the slow variable (blue histograms). The red solid line is the exact solution, P(S = s), obtained by solving the CME of the full system CS-II. The CMA approach runs the CSSA algorithm for each value of the slow variable S = s until Lc = {102 , 103 , 104 , 105 } changes of the slow variable occur. Panels (e)–(f) show the CMA-computed distribution after smoothing out by the Kernel Density Estimation procedure. tem without any prior knowledge of its structure, and a Markov-based approach for estimating its stationary distribution. We augment the proposed algorithmic approach with numerical simulations that confirm that the ADM-CLE approach can compare favorably for some systems to the CMA for estimating the stationary distribution of such slow variables. The ADM-CLE approach can also be applied to systems with a low number of states of slow variables. The CMA, as introduced in [8], is more suitable for systems where the slow variable(s) can take many different values, because the CMA uses an underlying SDE approximation for the behaviour of the slow variables. One option to overcome this problem is to estimate effective propensity functions of the slow subsystem [9]. An open question is to extend the ADM-CLE to systems where the range of the Xi variables is very large. In the ADM-CLE approach applied to CS-I or CS-II, we associate a state (i.e., node in the initial graph) to each possible combination of pairs of states (x1 , x2 ), an approach no longer feasible whenever the range of the variables is large. To bypass this problem, one could change the discretization of the state space and modify accordingly the Markov chain based approach (Figure 5.2) used in the ADM-CLE. The ADM-CLE couples a method for finding slow variables (ADM) with an approach to compute the stationary distribution of a multiscale chemical reaction network. Chemical systems depend on a number of parameters (e.g. kinetic rate constants) and an open question is to extend the ADM approach to situations where one (or more) parameters are varied, i.e. to perform bifurcation analysis of multiscale stochastic chemical systems [30]. Finally, we point out recent work of Dsilva et al. [11], who also rely on the ADM framework to discover nonlinear intrinsic variables in high-dimensional data in the context of multiscale simulations, with the task of merging different simulations ensembles or partial observations of such ensembles in a globally consistent manner. Their work is motivated by the fact that often one is not merely interested in extracting the hidden (slow) variables from the underlying low-dimensional manifold, given partial observations x(i) , i = 1, 2, . . . , N as in the ADM setting, but also in extending high-dimensional functions on a set of points lying in a low-dimensional manifold. Their proposed approach relies on the so called Laplacian Pyramids [35], a multiscale algorithm for extending a high-dimensional function defined on a set of points in the space of intrinsic variables to a second set of points not in the data set, by using Laplacian kernels of decreasing bandwidths (the ε parameter in (3.5)). REFERENCES [1] A. Arkin, J. Ross, and H. McAdams, Stochastic kinetic analysis of developmental pathway bifurcation in phage l-infected Escherichia Coli cells, Genetics, 149 (1998), pp. 1633–1648. [2] M. Belkin and P. Niyogi, Laplacian eigenmaps for dimensionality reduction and data representation., Neural Computation, 15 (2003), pp. 1373–1396. 16 [3] Y. Cao, D. Gillespie, and L. Petzold, Multiscale stochastic simulation algorithm with stochastic partial equilibrium assumption for chemically reacting systems, Journal of Computational Physics, 206 (2005), pp. 395–411. [4] Y. Cao, D. T. Gillespie, and L. R. Petzold, The slow-scale stochastic simulation algorithm, Journal of Chemical Physics, 122 (2005). [5] Y. Cao, H. Li, and L. Petzold, Efficient formulation of the stochastic simulation algorithm for chemically reacting systems, Journal of Chemical Physics, 121 (2004), pp. 4059–4067. [6] R. R. Coifman and S. Lafon, Diffusion maps, Applied and Computational Harmonic Analysis, 21 (2006), pp. 5–30. [7] R. R. Coifman, S. Lafon, A. B. Lee, M. Maggioni, B. Nadler, F. Warner, and S. W. Zucker, Geometric diffusions as a tool for harmonic analysis and structure definition of data: Diffusion maps, Proceedings of the National Academy of Sciences of the United States of America, 102 (2005), pp. 7426–7431. [8] S. Cotter, K. Zygalakis, I. Kevrekidis, and R. Erban, A constrained approach to multiscale stochastic simulation of chemically reacting systems, Journal of Chemical Physics, 135(9), 094102 (2011). [9] S. Cotter and R. Erban, Error analysis of diffusion approximation methods for multiscale systems in reaction kinetics, submitted (2014), available as: http://arxiv.org/abs/1412.5755 [10] D. L. Donoho and C. Grimes, Hessian eigenmaps: Locally linear embedding techniques for high-dimensional data, Proceedings of the National Academy of Sciences of the United States of America, 100 (2003), pp. 5591–5596. [11] C. J. Dsilva, R. Talmon, N. Rabin, R. Coifman, and I. Kevrekidis, Nonlinear intrinsic variables and state reconstruction in multiscale simulations, Journal of Chemical Physics, 139 (2013), p. 184109. [12] A. Duncan, S. Liao, T. Vejchodsky, R. Erban and R. Grima, Noise-induced multistability in chemical systems: Discrete vs Continuum modeling, to appear in Physical Review E (2015), available as: http://arxiv.org/abs/1407.8256 [13] W. E, D. Liu, and E. Vanden-Eijnden, Nested stochastic simulation algorithm for chemical kinetic systems with disparate rates., Journal of Chemical Physics, 123 (2005), p. 194107. [14] R. Erban, I. Kevrekidis, and H. Othmer, An equation-free computational approach for extracting population-level behavior from individual-based models of biological dispersal, Physica D, 215 (2006), pp. 1–24. [15] R. Erban, I. Kevrekidis, D. Adalsteinsson and T. Elston, Gene regulatory networks: a coarse-grained, equation-free approach to multiscale computation, Journal of Chemical Physics, 124 (2006), 084106 [16] R. Erban, T. Frewen, X. Wang, T. Elston, R. Coifman, B. Nadler and I. Kevrekidis, Variable-free exploration of stochastic models: a gene regulatory network example, Journal of Chemical Physics, 126 (2007), 155103 [17] F. Fogel, R. Jenatton, F. Bach, and A. d’Aspremont, Convex relaxations for permutation problems., in NIPS, C. J. C. Burges, L. Bottou, Z. Ghahramani, and K. Q. Weinberger, eds., 2013, pp. 1016–1024. [18] W. C. Gear, J. M. Hyman, P. G. Kevrekidid, I. G. Kevrekidis, O. Runborg, and C. Theodoropoulos, Equation-Free, Coarse-Grained Multiscale Computation: Enabling Macroscopic Simulators to Perform System-Level Analysis, Communications in Mathematical Sciences, 1 (2003), pp. 715–762. [19] M. Gibson and J. Bruck, Effcient exact stochastic simulation of chemical systems with many species and many channels, Journal of Physical Chemistry A, 104 (2000), pp. 1876–1889. [20] D. T. Gillepsie, The chemical Langevin equation, Journal of Chemical Physics, 113 (2000), pp. 297–306. , A general method for numerically simulating the stochastic time evolution of coupled chemical reactions, Journal of [21] Computational Physics, 22 (1976), pp. 403–434. , Exact stochastic simulation of coupled chemical reactions, Journal of Physical Chemistry, 81 (1977), pp. 2340–2361. [22] [23] R. Grima, P. Thomas, A. Straube, How accurate are the chemical Langevin and Fokker-Planck equations?, Journal of Chemical Physics, 135 (2011), 084103. [24] M. Haataja, D. J. Srolovitz, and I. G. Kevrekidis, Apparent hysteresis in a driven system with self-organized drag., Phys Rev Lett, 92 (2004), p. 160603. [25] E. L. Haseltine and J. B. Rawlings, Approximate simulation of coupled fast and slow reactions for stochastic chemical kinetics, Journal of Chemical Physics, 117 (2002), pp. 6959–6969. [26] T. Jahnke and W. Huisinga, Solving the chemical master equation for monomolecular reaction systems analytically, Journal of Mathematical Biology, 54 (2007), pp. 1–26. [27] S. Kar, W. Baumann, M. Paul, and J. Tyson, Exploring the roles of noise in the eukaryotic cell cycle, Proceedings of the National Academy of Sciences, USA, 16 (2009), pp. 6471–6476. [28] G. Klingbeil, R. Erban, M. Giles, and P. K. Maini, STOCHSIMGPU: Parallel stochastic simulation for the Systems Biology Toolbox 2 for MATLAB, Bioinformatics, 27 (2011), pp. 1170-1171. [29] H. W. Kuhn, The Hungarian method for the assignment problem, Naval Research Logistics Quarterly, 2 (1955), pp. 83–97. [30] S. Liao, T. Vejchodsky, R. Erban, Parameter estimation and bifurcation analysis of stochastic models of gene regulatory networks: tensor-structured methods, submitted (2015), available as: http://arxiv.org/abs/1406.7825 [31] L. Lovász, Random walks on graphs: A survey, Combinatorics, Paul Erdös is Eighty, 2 (1993), pp. 1–46. [32] M. Meila and J. Shi, A random walks view of spectral segmentation, AI and STATISTICS (AISTATS), (2001). [33] M. Newman, Finding community structure in networks using the eigenvectors of matrices, Physical Review E, 74 (2006). [34] A. Y. Ng, M. I. Jordan, and Y. Weiss, On spectral clustering: Analysis and an algorithm, NIPS: Proceedings of the 15th Annual Conference on Advances in Neural Information Processing Systems, (2001). [35] N. Rabin and R. R. Coifman, Heterogeneous datasets representation and learning using diffusion maps and laplacian pyramids, in Proceedings of the Twelfth SIAM International Conference on Data Mining, Anaheim, California, USA, April 26-28, 2012., 2012, pp. 189–199. [36] S. Roweis and L. Saul, Nonlinear dimensionality reduction by local linear embedding, Science, 290 (2000), pp. 2323–2326. [37] H. Salis and Y. Kaznessis, Accurate hybrid stochastic simulation of a system of coupled chemical or biochemical reactions, Journal of Chemical Physics, 122 (2005), p. 054103. [38] J. Shi and J. Malik, Normalized cuts and image segmentation, IEEE Transcations of Pattern Analysis and Machine Intelligence, 22 (2000), pp. 888–905. [39] A. Singer, R. Erban, I. G. Kevrekidis, and R. R. Coifman, Detecting intrinsic slow variables in stochastic dynamical systems by anisotropic diffusion maps, Proceedings of the National Academy of Sciences, 106 (2009), pp. 16090–16095. [40] D. Spielman and S.-H. Teng, Spectral partitioning works: Planar graphs and finite element meshes, FOCS ’96: Proceedings of the 37th Annual IEEE Symposium on Foundations of Computer Science, (1996), pp. 96–107. [41] , Spectral partitioning works: Planar graphs and finite element meshes, Linear Algebra and its Applications, 421 (2007), 17 pp. 284–305. [42] Y. Sun, W. Lin and R. Erban, Time delay can facilitate coherence in self-driven interacting particle systems, Physical Review E, 90 (2014), 062708 [43] E. Vanden-Eijnden, Numerical techniques for multi-scale dynamical systems with stochastic effects, Communications in Mathematical Sciences, 1 (2003), pp. 385–391. [44] J. Villar, H. Kueh, N. Barkai, and S. Leibler, Mechanisms of noise-resistance in genetic oscillators, Proceedings of the National Academy of Sciences of the United States of America, 99 (2002), pp. 5988–5992. [45] U. von Luxburg, A tutorial on spectral clustering, Technical Report 149, Max Plank Institute for Biological Cybernetics, (2006). [46] J. Wilkie and Y. M. Wong, Positivity preserving chemical Langevin equations, Chemical Physics, 353 (2008), pp. 132–138. [47] X. Zhou, M. Belkin, and N. Srebro, An iterated graph Laplacian approach for ranking on manifolds, in Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’11, New York, NY, USA, 2011, ACM, pp. 877–885. 18
5cs.CE
BRINGING SIMULATION TO APPLICATION : PRESENTATION OF A GLOBAL APPROACH IN THE DESIGN OF PASSIVE SOLAR BUILDINGS UNDER HUMID TROPICAL CLIMATES F. GARDE,* H. BOYER,* R. CELAIRE** Laboratoire de Génie Industriel, University of Reunion Island, IUT de Saint Pierre, 40 avenue de Soweto, Saint-Pierre, Reunion Island, 97 410, France, (+262) 96 28 91, (+262) 96 28 99, [email protected] ** Concept Energie, 1 rue Mirabeau, Lambesc, 13410, France, (+33) 04 42 92 84 19, (+33) 04 42 92 71 36, [email protected] Abstract – In early 1995, a DSM pilot initiative has been launched in the French islands of Guadeloupe and Reunion through a partnership between several public and private partners (the French Public Utility EDF, the University of Reunion Island, low cost housing companies, architects, energy consultants, etc...) to set up standards to improve thermal design of new residential b uildings in tropical climates. This partnership led to defining optimized bio-climatic urban planning and architectural designs featuring the use of passive cooling architectural principles (solar shading, natural ventilation) and components, as well as energy effici ent systems and technologies. The design and sizing of each architectural component on internal thermal comfort in building has been assessed with a validated thermal and airflow building simulation software (CODYRUN). These technical specifications have been edited in a reference document which has been used to build over 300 new pilot dwellings through the years 1996-1998 in Reunion Island and in Guadeloupe. An experimental monitoring has been made in these first ECODOM dwellings in 1998 and 1999. It will result in experimental validation of impact of the passive cooling strategies on thermal comfort of occupants leading to modify specifications if necessary. The paper present all the methodology used for the elaboration of ECODOM, from the simulations to the experimental results. This follow up is important, as the setting up of the ECODOM standard will be the first step towards the setting up of thermal regulations in the French overseas territories, by the year 2002. 1. INTRODUCTION 2 2. THE ECODOM STANDARD 3 2.1 THE OBJECTIVES 2.2 THE PRESCRIPTIONS 3 4 3. METHODOLOGY 5 4. ECODOM : THE REFERENCE DOCUMENT 6 4.1 SOLAR PROTECTION 4.2 NATURAL VENTILATION 4.3 DOMESTIC HOT WATER 7 8 9 5. PRESENTATION OF AN ECODOM PROJECT : “LA DECOUVERTE” 10 6. THE SOCIOLOGICAL AND TECHNICAL MONITORING 12 6.1 DESCRIPTION 6.2 PRESENTATION OF SOME EXPERIMENTAL RESULTS 6.3 SYNTHESIS 12 13 15 7. CONCLUSION 16 1 1. INTRODUCTION Each year 20,000 dwellings are built in the French Overseas Territories. There are four French Overseas Territories (called DOM) : two islands are located in the Caribbean (Martinique and Guadeloupe), one island is situated 400 km to the east of Madagascar in the Indian Ocean (Reunion Island) while the fourth DOM (French Guyana) is in South America North of Brazil. Each one of these DOM experiences a hot and humid climate, tropical for the islands of Guadeloupe, Martinique and Reunion and equatorial for French Guyana. Two thirds of these new dwellings are social housing. Initially these new dwellings were built without air conditioning or hot water. This situation has led to haphazard installation of instant electrical hot water boilers and poorly located, designed, sized, and maintained individual air conditioning systems. The lack of building codes on thermal design of buildings, combined with designs widely inspired from temperate climates together with economic constraints of tight budgets for public constructions have led to the development of buildings totally unfitted to tropical climate. Large population increase in these DOM, rise in living standards, and the decreasing costs of air conditioning systems result in a real energy, economical and environmental problem. When considering economical aspects, high electricity production cost also creates continual high deficit for the French Electricity Utility (EDF). EDF loses 350 millions Euros every year in overseas territories. The average selling price of electricity is less than 9 Euro cents (less then half the real production-distribution cost) because of the French pricing policy (selling price of electricity is the same as in mainland France). All these factors point out that passive solar cooling for thermal design of buildings is of great economical, social and environmental relevance. A long term overall program to improve comfort and energy performance in residential and commercial buildings has been set up in these DOM. In the new housing sector, a quality standard label has been launched concerning the building envelope, hot water production systems and air conditioning systems and components. 2 2. THE ECODOM STANDARD A Demand Side Management pilot initiative called ECODOM was launched in early 1995 in the French islands of Guadeloupe and Reunion through a partnership between the French electricity utility (EDF), the French authority for environment and energy conservation (ADEME), the ministries of Housing, of Industry and of Overseas Territories, the University of Reunion island and several other public and private partners, such as low cost housing companies, architects, energy consultants, etc... 2.1 The objectives ECODOM standard aims to facilitate construction of naturally ventilated comfortable dwellings whilst avoiding the usual necessity of electricity driven compression air cooling. The ECODOM standard provides simple technical specifications to do so, at an affordable price. Existing bibliography on passive thermal design of buildings is extremely rich and varied. Publications often focus either on the optimization of one component of building (Bansal, 1992), (Malama, 1996), (Rousseau 1996) (Peuportier, 1995) or on the presentation of a performing bio-climatic project (Filippin et al, 1998), (Ashley and Reynolds, 1993) or on global approach of building with a description of the passive solar strategies to implement in it (Garg, 1991), (Hassid, 1985), (Millet, 1988), (Gandemer 1992). These publications often have an obvious interest for building physicists but cannot be easily applicable in a national overall program to generalize improvement of thermal performances of buildings : because scientific preoccupations are often far from economical building reality. In addition architects and engineers lack of time to learn to use scientific tools and to read research reports in the fields of thermal design of building. Thus, to bridge the gap between building designers and building physicists, a simple, straightforward and pedagogical language must be spoken. Another objective of the ECODOM project was to define simple rules which can be easily understood by the whole building community. 3 Finally, ECODOM has also social objectives because more than half of the 20 000 dwellings in the French overseas territories are built by public housing companies. ECODOM allows to give basic thermal comfort to people who will never be able to afford air conditioning investments and subsequent electricity bills. A reference document comprising a pedagogical presentation of the technical passive options was published in 1996. This document enables all building designers to speak the same language in the study of future ECODOM buildings. Once the document was made, the next step was obviously to implement the standard to 300 pilot new dwellings throughout the years 1996-1998, then, after a technical and sociological validation period, to expand this pilot phase to the residential sector on a much broader scale (objective of 2000 new dwellings per year), and complete similar global energy efficiency projects to existing housing and to large and medium size commercial buildings. Then, the experimental feed back will allow the setting up of thermal regulations in the new housing sector by the year 2002 (see figure 1). Fig. 1 : The ECODOM process 2.2 The prescriptions Comfort level is reached through an architectural building design adapted to local climate : the dwelling is protected from the negative climatic parameters (mainly the sun) and benefits from positive climatic factors (the wind). Achievement of a good level of thermal comfort requires respecting various compulsary rules. These rules concern immediate surroundings of the dwelling and envelope components. These rules cover five issues: 1) Location on site (vegetation around the building); 2) Solar protection (roof, walls, windows); 3) Natural ventilation (exploitation of trade winds, and optimized ratio of inside/outside air-permeability of dwelling envelope) or mechanical ventilation (ceiling fans); 4 4) Domestic hot water production ( solar water heaters , efficient gas water heaters or properly designed off-peak hours servo-controlled high efficiency storage electric water heaters); 5) As an option, high efficiency intermittent air conditioning systems for bedrooms (air tightness of rooms, efficient components, controls,..). 3. METHODOLOGY To define these quality standards specifications, a large number of simulations were computed for each component of building envelope in order to quantify thermal and energetic impact of each one on thermal comfort within the building. Various authors have already worked on specific issues concerning the outside structure of the building : (Bansal, 92) on the effect of external color, (Malama, 96) on passive cooling strategies for roofs and walls, (Rousseau, 96) on the effect of natural ventilation, (De Walls 93) on global considerations on the building adapted for a defined climate. Our approach consisted in studying typical dwellings, selected as the most representative types of the ones built in the Reunion island, in terms of architecture and building materials (see figure 2). Fig. 2 : Typical dwelling Simulations were carried out with the use of a building thermal and airflow simulation software on envelope components (roof, walls, windows) and on natural ventilation, in a way allowing to estimate the influence of each one of the above specifications in terms of thermal comfort and energetic performances. This has led to the definition of efficient passive technical specifications for each comprising part of building envelope and likewise to a minimum porosity ratio for optimizing natural ventilation. These simulations, their analysis and synthetic results have been presented in (Garde, 99a) and (Garde 99b). 5 4. ECODOM : THE REFERENCE DOCUMENT We will illustrate here after some of the final results which are presented in the ECODOM reference document (Celaire, 1997). This reference document is essential since it is used as a common tool for study and design of new ECODOM projects by architects, building physicists and engineers. 4.1 Solar protection In humid tropical climate, source of uncomfort result from internal temperature increase due to poor architectural design, primarily due to lack of solar protection (shading). 80% of temperature rises are due to solar radiation and the remaining to conduction exchanges. Setting up efficient solar protection specifications is the second fundamental step in thermal design of buildings. This protection concerns all external components of dwelling envelope : roof, walls and windows. Solar protection of the roof Roofs can account for up to 60% of overall envelope heat gains in dwellings. Efficient solar protection of roofs is therefore of prime necessity for optimal thermal design. The following table is valid for terraced roofs, tilted roofs without attics, or roofs with closed or barely ventilated attics. Table 1 only gives results for polystyrene and polyurethane, as these types of insulation are the most commonly used at an affordable price in humid tropical climates. Other alternatives exist (low emissivity materials for instance) and can be used if their equivalent thermal resistance is sufficient compared to values given in Table 1. Table 1 : Roof solar protection 6 Solar protection of walls Thermal gains from walls account for 20 to 30% (40 à 65 % for dwellings which are not under roof) of overall envelope heat gains in dwellings. Various solutions enable efficient solar protection of walls from sunlight : horizontal or vertical overhangs or sun-breakers, thermal insulation. Results obtained from simulations lead to the table 2 which give, for Reunion island, optimum dimensions of overhang according to wall orientation and to wall thermal resistance. Table 2 : Overhang - minimum d/h ratio values to be respected. Table 3 : Insulation of walls (in cm) for different orientations and external colours (for a conductivity of 0.041 W/m.K) When walls do not have overhangs or shading systems, minimum insulation thickness (in cm) required for the various types of walls and various orientations are shown in table 3. If values of d/h seem excessive, other alternatives such as vertical shading systems or double-skin systems with ventilated air-gaps may be considered. In that specific case, no sizing specifications are needed for each wall orientation (shading effect is sufficient whatever the orientation is provided the shading component covers the entire wall surface). Meanwhile, these solar shading principles and sizing values are fully compatible with the creole architectural components such as verandas and balconies which insure efficient solar protection of dwellings walls and windows together with creating outdoor living spaces. Solar protection of windows : Solar protection of windows is essential, not only because they account for 15 to 30% of overall envelope heat gains in dwellings but also because they contribute to increasing uncomfort experienced by occupant, due to the instant heating of ambient air temperature and an exposure to direct or reflected sunlight. All windows must therefore be protected by some kind of window shading system, such as horizontal overhangs and other shading devices such as venitian blinds or opaque, mobile louvers (see Fig. 3). Simulations enabled to optimize geometric characteristics of horizontal overhangs in relationship with glazing. (see table 4). 7 Table 4 : Values of d/(2a+h) (case 1), or d/h (case 2) Fig. 3 : Some of the shading devices required by ECODOM 4.2 Natural ventilation In warm climates, natural ventilation is the most usual means of cooling both occupants and buildings : Natural ventilation, depending on flow-rate values (or air change per hour), can ensure three functions :  Weak flow-rate (1 to 2 ACH) : preservation of hygiene conditions in building by internal air renewal;  Moderate flow-rate (40 ACH): dissipation of internal heat gains and cooling of building envelope;  High flow-rate (more than 100 ACH) : improvement of comfort of occupants by increasing heat transfer at skin level . High air speed and even distribution of air flow through dwelling increases sudation process. This is the only means enabling to create cooling by compensating for simultaneous high temperatures and high hygrometry. Our aim is therefore to find exterior/interior walls porosity coupling enabling to reach 40 ACH. On one hand dwelling envelope will be sufficiently cooled and on the other hand, such ACH values allows to benefit from wind speeds of 0.2 à 0.5m.s-1, which is largely sufficient, when taking into account climatic parameters (outside temperature seldom greater than 32°C), to insure good comfort level. Simulations run in (Garde, 99) and (Garde, 97) showed that critical rate of 40 ACH is obtained for designs with minimal exterior and interior porosities of 25% whether building is light or high mass. Natural ventilation is simply more effective during night time for heavy structures, whereas in light structures it serves mainly to evacuate daytime overheating. Thus dwellings should have layouts allowing for effective cross ventilation of all rooms (see Fig. 4). At each level or floor, there should exist openings in each main room, on at least two opposite facades (main rooms being bedrooms and living, dining room and other living spaces). Interior lay-out should also be designed to allow outside air to flow through main rooms from one facade to the other through halls, corridors, doors and other internal openings in room partitions. 8 Fig. 4 : Cross ventilated dwelling Calculation details needed to determine that exterior and interior porosities are greater than 25% are reported below. First thing to do is to calculate the mean porosity of two opposite facades of dwelling. Internal and external porosity required by ECODOM standards is 25% of the mean. So1  0.25 Sp So P2   0.25 Sp Sp1  Sp 2 Sp  2 Si1  So1 o r So 2 Si 2  So1 o r So 2 P1  So1 : Net surface area of external openings, main rooms (façade 1); So2 : Net surface area of external openings, main rooms (façade 2); Sp1, Sp2 : Total surface area of façades 1 and2 of main rooms; Si1 and Si2 : Total surface area of internal openings. 4.3 Domestic hot water It is essential that the dwellings are equipped with energy efficient long-lasting and economic, domestic hot water heating systems. Water heating can be solar, electric or gas or a combination of such systems. In the case of solar water heaters for example, the system must conform technical control by the french centre for scientific and technical building studies (C.S.T.B.). Total minimum solar collectors area should be defined in relationship with the size of dwelling.(see table 5). Capacity of water storage tank should be 60 to 120 liters per square meter of net collector area. Conventional minimum annual productivity should be 700kWh per net square meter of the collector area. Table 5 : Technical characteristics - solar water heaters As far as electrical heaters are concerned, they must feature an approved French standard manufacturing seal (Norme Française). Minimal capacity of water heater and maximum value of cooling constant (defining storage efficiency of heaters), depending on number of main rooms of dwelling, are required. 9 5. PRESENTATION OF AN ECODOM PROJECT : “LA DECOUVERTE” At present time, three experimental operations have been built in Reunion Island, and two in Guadeloupe, what represents a total number of 300 dwellings. One of these called “La Découverte” is represented by Fig. 5. 44 dwellings were studied with the ECODOM specifications as part of “La Découverte” project. Fig. 5 : ECODOM “La Découverte” - the original project. This project started in 1996 when first contacts were taken with project architect and the building owner. The main problem was to create confident working relationship between physicits and engineers in charge of promoting Ecodom concept and project architect : to be successful ECODOM design approach had to be understood not as factor limiting architectural creativity. Figure 6 illustrates project after application of ECODOM specifications. Fig. 6 : Modifications of the original project The ECODOM modifications applied to project are explained here after. No modification was made for site location because gardens around buildings had already been planned. In addition project has an optimal orientation as main façades have a north and south orientation, with limited west and east walls exposure to morning and afternoon low incidence sunrays. Thus the only façade to be upgraded was the northern one as the southern one is seldom exposed (for the southern hemisphere latitude of Reunion Island, midday sun shines on southern façade only in december). As far as solar protection of roof was concerned, architect had already planned 5 cm insulation for red and blue roofs. According to table 1, it is not enough. Therefore, he was asked to increase insulation thickness up to 8 cm (value for medium colors) and to use polystyrene as insulation rather than mineral wool. Mineral wool is fairly cheap but not very well adapted to tropical climates : it loses its thermal properties when it absorbs ambient humidity . As far as solar protection of walls is concerned, the color is light and materials used are hollow concrete blocks. In table 2, it is specified to install 1 cm insulation on East and West sides. The southern façade was 10 not insulated because it is protected by overhangs. In addition as the initial project didn’t provide solar protection for bedrooms windows, is was specified to add overhangs on exposed windows of northern facade. However, the solar protection of windows is strongly correlated to the natural ventilation. The bigger the opening, the wider the overhang must be. Concerning natural ventilation, dwelling porosity in initial project was not sufficient. For example, ECODOM standards required for bedrooms a 2 square meters porosity while the initial project only had 1.44 square meter. This is why all initial windows have been replaced by glazed doors in order to increase porosity. To reach the same porosity indoor,it was asked to add fanlights above the bedroom doors . Balconies were also added all along the facade for solar protection of windows and of walls (see figure 7). Fig. 7 : Floor plan of an ECODOM dwelling. Increase in porosity of bedrooms (glazed windows) and solar protection of northern facade (balconies). All the modifications expressed above have been taken under considerations by the architect and integrated into the final project which is represented by Fig.8. The operation « La Découverte » ended in April, 1999, which is three years after our first contacts with the persons responsible for the project. We also got through a phase of technical support in the thermal conception to a phase of implementation of the project. To make the methodoly completed, it only lacks the experimental monitoring and feed back, what is going to be presented in the following section. Fig. 8 : The final project (april 1999) 11 6. THE TECHNICAL AND SOCIOLOGICAL MONITORING 6.1 Description An experimental monitoring has been launched for the first ECODOM dwellings in order to validate experimentally impact of the passive cooling specifications on the performances of the envelope of the building and on the comfort of occupants. The campaigns of instrumentation occured on the first two operations ECODOM implemented in Reunion : the first one has been presented in this paper and the second one was built one year earlier and is called the operation «La Trinité». Our objective was firstly to test the performances of the buildings without the occupants. So, we could make our own scenarios of measure and modify the configurations of apartments without disturbing the tenants. Secondly, we led a campaign of measure in occupied flats (for the Trinity only) to test the dwellings in real case. The measurements results and analysis have been supplemented for the both projects with a sociological study in inhabitated dwellings in order to understand how thermal comfort, acoustic comfort (in tropical climates, it might be difficult to obtain thermal comfort and acoustic comfort at the same time), visual comfort and dwelling environment are appreciated by occupants Table 6 gives the schedule of the campaigns of measures for the two operations. Table 6 : Experimental schedule for non occupied and occupied periods These campaigns happened during the two last warm seasons (on 1998 for « The Trinity » and on 1999 for « The Discovery ») for estimating the thermal performances of flats during extreme climatic periods (the warm and wet season in Reunion occurs from the middle of December to the middle of April). The sociological study 12 was led for the operation « The Trinity » in April, 1998. It is also foreseen for « La Découvert » by April, 2000. With the agreement of the housing companies, in each case (“La Trinité” and “La Découverte”) four dwellings have been instrumented during the hot season. Dwellings have been selected in order to allow comparison and studies of various parameters such as roof and walls thermal insulation, natural ventilation. Thus we chose a flat under roof (et en pignon) and the same flat in a lower level to test the influence of the roof and of the solar protection of the glazings . The two other instrumented flats are rigorously identical in orientation and in level or floor, this to test different scenarios such as the effect of natural ventilation with a flat which serves us as a reference and the second on whom we modify its configuration. A portable data-logger was set up close to the buildings to record all the climatic data (external temperature and humidity, direct and diffuse solar radiation, wind speed and wind direction). During non-occupied period, sensors used are thermocouples for measurement of indoor air temperature, resultant temperature and surface temperatures on walls and roofs; thermo-hygrometers for the relative humidity, accurate anemometer for indoor air speed (see fig.9). Data are collected every minute and the average is made every hour. During occupied period, sensors are like small “white boxes” with internal memory which can be wall mounted. They give temperature and hygrometry measurements each 30 minutes during several months. Fig. 9 : Measurements of indoor air and resultant temperature inside dwelling 6.2 Presentation of some experimental results We shall present in this section only some significant experimental results. The whole results and their analysis are contained in two research reports (one for the operation “La Trinité” and one for the operation « La Découverte ») available with the authors. Impact of the solar protection of roof : 13 The insulation of the roof is a first urgency in solar protection within the framework of the ECODOM process. To put in evidence the influence of the roof, we have instrumented two identical apartments (same as the one figure 8) but with one under roof and the another one at a lower level. In that case, when the two apartments are closed, only the energetic contribution of the roof is responsible of the gap between the indoor resultant temperature. Figures 10 and 11 show respectively the insolation during the period of the instrumentation and the evolution of the indoor resultant temperature of the two apartments. A systematic offset is observed of 1¨C to 1,5¨C between the two apartments during the whole period of measure. One finds again the same type of result for the two campaigns of measure (“La Trinité” and “La Découverte”) : a flat under roof with a good insulation corresponding to ECODOM has always his resultant temperature upper of 1¨C to 1,5¨C compared to the flats which are not under roof. With a badly designed roof, distances of more of 3¨C have been observed. This type of measure confirms the major importance of a good insulation of the roof in tropical climate. Fig. 10 : Solar radiation during the assessment of the solar protection of the roof Fig. 11 : Comparison of the resultant temperature in two dwellings (one under roof and the other one at intermediate level Occupied period (operation “La Trinité”) We present here the results obtained for a occupied flat of the operation « The Trinity ». The period of instrumentation lasted two months (in March and April, 1998). The instrumented flat ihad two levels. The first level had as two bedrooms, the kitchen and the dining room. The upper level under roof had only a third bedroom. This flat had two infringements compared to the ECODOM specifications : the first one concerned the insulation of roof which was only 5 cms while ECODOM asked for 10 cms (the roof was of grey colour). The second one concerned the ventilation of the bedroom under roof : the percentage of ventilation was sharply lower than the percentage required by ECODOM. 14 Figures 12 and 13 show the set of the temperature/humidity couples over the period of instrumentation for a room (chamber 2) of the first level and for the room under roof (chamber 3). We observed generally that the rooms which are not under roof and well naturally ventilated have globally the same thermal and airflow behavior which is represented by Fig. 12. We are on average 10 % of time outside the zone of comfort The room (bedroom 3) under roof is very warm. The distribution of the points on the psychrometric chart is very spread over the axis of the resulatant temperatures. Although this room is naturally ventilated and is often used by the tenant, we are 40% of the time outside the comfort zone. It is not so the way of living that influences the thermal behavior of the room, but rather a problem of the insufficient heat insulation. Besides, we can suppose that the crossing ventilation of the room is apparently insufficient. Fig. 12 : Temperature/humidity couples of an occupied flat, room at intermediate level Fig. 13 : Temperature/humidity couples of an occupied flat, room under roof 6.3 Synthesis Experimental and sociological results will enable to have feed back informations about ECODOM dwellings and to supply eventual appropriated corrections to quantitative values of passive solar specifications. Above all, experimental feed-back allow us to know if dwellings are well adapted to occupant way of life. We can't point out the whole points of these studies but some of the main conclusions can be indicated.  The solar protection of the roof stays one of the main point in the thermal design of buildings in tropical climate. We were able to show some defaults of the implemented insulation in the experimented operations leading important overheating. It is also necessary to maintain the specifications of table 1 concerning the minimum thickness of insulation needed. 15  Natural ventilation showed itself effective in the tested flats except at night in the case of very weak night breezes where an overheating of 1¨C was observed compared to the outside temperature. Also, the ECODOM percentage of openings of 25 % is a minimum value below which we can not get through.  Finally, the sociological study showed that the tenants were globally satisfied with their flat considering the thermal aspects. However the dissatisfaction resulted from the bad acoustic design of the flats. And we touch here one of the major problems of the conception in tropical climate : the duality of thermal and acoustic design. One the one hand, we must open the dwelling to look for thermal comfort, on the other hand, the acoustic comfort is reached by closing the windows. 7. CONCLUSION Methodology used for developing ECODOM standards, from simulations to experimental results, has been presented. This whole work led to a pedagogical reference document defining efficient passive solar cooling strategies and specifications for each component of dwelling envelope and likewise minimal porosity ratios to optimize natural ventilation. Dwellings to be constructed according to ECODOM standards should follow these specifications. ECODOM actors (architects, designers, engineers, building physicists,…) now speak the same “language” by using the reference ECODOM document. An experimental monitoring has been set up for first ECODOM dwellings constructed in order to validate experimentally impact of passive cooling specifications on comfort of occupants. This experimental work has allowed a real scale feed back. Such monitoring is essential, as the ECODOM standard is the first step towards the setting up of building codes and regulations on energy efficiency in envelope of residential buildings in the French overseas territories, that REFERENCES 16 should be effective by the year 2002. Ashley R. and Reynolds J.S. (1993). Overall and zonal efficiency end use in an energy conscious office building. Solar energy. 52, 1, 75-83. Bansal N.K, Garg S.N., and Kothari S. (1992). Effect of Exterior Surface Color on the Thermal Performance of Buildings. Building and Environment. 27, 31-37. Célaire R. (1997). Opération expérimentale ECODOM, cahier de prescriptions. Document de référence. De Waal H.B. (1993). New Recommendations for Building in Tropical Climates. Building and Environment. 28, 271-285. Filippin C., Beascochea A., Esteves A., De Rosa C., Cortegoso L. and Estelrich D. (1998). A passive solar building for ecological research in Argentina : The first two years experience. Solar Energy. 63, 2, 105-115. Gandemer J., Barnaud G., Sacre C., Millet J.R. (1992). Guide sur la climatisation naturelle en climat tropical humide. Tome 1 : Méthodologie de prise en compte des paramètres climatiques dans l’habitat et conseils pratiques. C.S.T.B., 133 p. Garde F. (1997) Validation et développement d'un modèle thermo-aéraulique de bâtiments en climatisation passive et active. Intégration multimodèle de systèmes. PhD Thesis, Université de La Réunion, 260 p. Garde F., Boyer H., Gatina J.C. (1999a) Elaboration of global quality standards for natural and low energy cooling in french tropical island buildings. Building and Environment. 34, 71-83. Garde F., Boyer H. and Celaire R. (1999b) Building Design in Tropical Climates. Elaboration of the ECODOM standard in the french overseas “departements”. In Proceedings of ISES Solar Word Congress, 4-11 July, Jerusalem, Israel. Garg N.K. (1991). Passive solar options for thermal comfort in building enveloppes – An assessment. Solar energy. 47, 6, 437441. Hassif S. (1986). A linear model for passive solar evaluation. Solar Energy. 37, 2, 165-174. Malama A. and Sharples S. (1996). Thermal and Economic Implications of Passive Cooling Strategies in Low-Cost Housing in Tropical Upland Climates. Architectural Science Review. 39, 95-105. Millet J.R. (1988). Conception thermique des bâtiments en climatisation naturelle dans les D.O.M. Document d’application. C.S.T.B n° 88.4343, 124 p. Peuportier B. and Michel J. (1995). Comparative analysis of active and passive solar heating systems with transparent insulation. Solar Energy. 54, 1, 13-18. Rousseau P.G. and Mathews E.H. (1996). A new integrated design tool for naturally ventilated buildings. Energy and buildings. 23, 231-236. 17 1994 1995 1996 1997-99 Identification of the energetic, climatic and social contexts Setting up of a network between the ECODOM partners (ministry of housing, architects, the french autority for environment and energy conservation, energy consultants, the university of Reunion island, low cost housing companies, public utilities…) Choice of typical dwellings and of a typical day for running the simulations Simulations on typical dwellings with the thermal and airflow software CODYRUN Definition of the performant passive cooling solutions. Edition of the ECODOM reference document after numerous in and outs among the different partners for taking into account the pedagogical aspects of the document. Search for the first ECODOM projects. Communication. 300 ECODOM dwellings built in the DOM. 5 experimental ECODOM operations. (2 in Guadeloupe and 3 in La Réunion) Experimental and social follow up. Consulting and research of new projects. 2000 Experimental feed back and modification of the reference document. 2002 Setting up of building codes and regulations on energy efficiency in envelope of residential buildings in the French overseas territories. Fig. 1 : The ECODOM process Fig. 2 : Typical dwelling a h d d h Fig. 3 : Some of the shading devices required by ECODOM SO2 FACADE 2 Si2 Si1 SO1 FACADE 1 Fig. 4 : Cross ventilated dwelling North Fig. 5 : ECODOM “La Découverte” - The original project (1996) 2. Solar protection of the roof : (increase of the insulation at 8 cm) 3. Solar protection of walls and windows : balconies added on the northern facade 3. Insulation of Est and West sides 4. Natural ventilation : increase in the porosity of the bedrooms windows Fig. 6 : Modifications of the original project (1997) Fig. 7 : Floor plan of an ECODOM dwelling. Increase in porosity of bedrooms (glazed windows ) and solar protection of northern facade (balconies). Fig. 8 : The final project (april 1999) Fig. 9 : Measurements of ambient air and resultant temperature inside dwelling Horizontal solar radiation (W/m²) 1000 Direct solar radiation Diffuse solar radiation 900 800 700 600 500 400 300 200 100 0 01/01 02/01 03/01 04/01 05/01 06/01 07/01 Fig. 10 : Solar radiation during the assessment of the solar protection of the roof Resulatnt temperature (°C) Constant temperature gap Room under roof Room at intermediate stair 33 32 31 30 29 01/01 02/01 03/01 04/01 05/01 06/01 07/01 Fig. 11 : Comparison of the resultant temperature in two dwellings (one under roof and the other one at intermediate level 10 5 0 40 35 30 15 25 20 F15ch2 25 20 15 10 5 0 15 20 25 30 35 40 Fig. 12 : Temperature/humidity couples of an occupied flat, room at intermediate level F15ch3 25 20 15 10 5 0 15 20 25 30 35 40 Fig. 13 : Temperature/humidity couples of an occupied flat, room under roof Table 1 : Roof solar protection Insulated simple roofs Roof colour light ( = 0.4) medium (=0.6) dark ( = 0.8) Roofs with well-ventilated attics Polystyrene type insulation  = 0.041 W/m.K 5 cm 8 cm 10 cm Polyurethane type insulation  = 0.029 W/m.K 4 cm 6 cm 8 cm Polystyrene type insulation Polyurethane type insulation  = 0.041 W/m.K  = 0.029 W/m.K No insulation needed 2 cm 0 cm Roof colour light ( = 0.4) medium or dark (=0.6) Table 2 : Overhang - minimum d/h ratio values to be respected. Type of wall Poured concrete 15cm (R=0.1 m².K/W) hollow concrete blocks (R=0.2 m².K/W) wood (R=0.5 m².K/W) light colour medium colour East Sout West Nort East Sout West Nort h h h h 0.4 0.2 0.7 0.5 1 0.5 1.3 0.7 0.1 0.1 0.3 0.2 0.5 0.3 0.8 0.5 0 0 0 0 0 0 0.2 0.1 d h Table 3 Insulation of walls (in cm) for different orientations and external colours (for a conductivity of 0.041 W/m.K) light colour East Sout west h concrete 20cm (R=0.1 m².K/W) 1 1 1 hollow concrete blocks (R=0.2 m².K/W) 1 1 1 wood (R=0.5 m².K/W) 0 0 0 Type of wall Table 4 Values of d/(2a+h) (case 1), or d/h (case 2) Orientation of windows East South West North Reunion Island 0.8 0.3 1 0.6 Table 5 : Technical characteristics - solar water heaters Solar water heaters minimum collector area to be installed for various types of dwellings F1-F2 (2 rooms) 1.5 m² F3 (3 rooms) 2.0 m² F4 (4 rooms) 2.5 m² F5 (5 rooms) 3.0 m² F6 and more 3.5 m² Nort h 1 1 0 medium colour East Sout West North h 2 1 2 2 1 1 2 2 0 0 1 1 Table 6 : Experimental schedule for non occupied and occupied periods « La Découverte » « La Trinité » Non-occupied period From january to april, 1999 From january to may,1998 Occupied period No measurement From march to april, 1998
5cs.CE
arXiv:1510.02993v2 [math.AC] 3 Oct 2017 RATIONAL SINGULARITIES AND UNIFORM SYMBOLIC TOPOLOGIES ROBERT M. WALKER Abstract. Take (R, m) any normal Noetherian domain, either local or N-graded over a field. We study the question of when R satisfies the uniform symbolic topology property (USTP) of Huneke, Katz, and Validashti: namely, that there exists an integer D > 0 such that for all prime ideals P ⊆ R, the symbolic power P (Da) ⊆ P a for all a > 0. Reinterpreting results of Lipman, we deduce that when R is a twodimensional rational singularity, then it satisfies the USTP. Emphasizing the non-regular setting, we produce explicit, effective multipliers D, working in two classes of surface singularities in equal characteristic over an algebraically closed field, using: (1) the volume of a parallelogram in R2 when R is the coordinate ring of a simplicial toric surface; or (2) known invariants of du Val isolated singularities in characteristic zero due to Lipman. 1. Introduction and Conventions for the Paper Given a Noetherian commutative ring R, an important open problem is discerning when there is an integer D = D(R) > 0, depending on R, such that the symbolic power P (Da) ⊆ P a for all prime ideals P ⊆ R and all integers a > 0. When such a D exists, one says that R satisfies the uniform symbolic topology property (USTP) on prime ideals [13]. There are several simple cases where D = 1 will suffice, that is, where symbolic powers and ordinary powers coincide for all prime ideals. Namely D = 1 works if R is: (a) Artinian; or (b) a one-dimensional domain; or (c) a two-dimensional UFD (Cl(R) = 0 in Lemma (1.1) below). In particular, D = 1 works for any regular local ring of dimension at most two. The Ein-Lazarsfeld-Smith Theorem [3, 9], as extended by Hochster and Huneke, says that if R is a d-dimensional regular ring containing a field, then 2010 Mathematics Subject Classification. Primary 13H10. Secondary 14C20, 14M25 Keywords: symbolic powers, divisor class group, rational singularity, toric variety. I wish to thank my thesis adviser, Karen E. Smith, for several hours of fruitful, encouraging conversation. I also thank Daniel Hernández, Felipe Pérez, and Luis Núñez-Betancourt for each critiquing a draft of the paper. I thank the anonymous referee for suggestions improving the exposition. I was supported by a NSF GRF under Grant Number PGF-031543, and this work was partially supported by the NSF RTG grant 0943832. 1 2 ROBERT M. WALKER P (da) ⊆ P a for all prime ideals P ⊆ R and all integers a > 0; the papers [10, 14, 17] extend what is known for regular rings containing a field. In stark contrast, effective uniform bounds are harder to unearth in the non-regular setting. In this direction, Huneke, Katz, and Validashti [12, Cor 3.10] give a non-constructive proof, under mild hypotheses on the ground field, that a uniform D exists when R is a reduced isolated singularity containing a field. As far as the author knows, no constructive (or even sharp) bounds D were known prior to cases covered in this paper. The following is a simple main case of the key lemma we use to produce effective bounds: Lemma 1.1. Let R be a Noetherian normal domain whose global divisor class group Cl(R) := Cl(Spec(R)) is finite abelian of order D. Then for all ideals q ⊆ R of pure height one, the symbolic power q(Da) ⊆ qa for all a > 0. Lemma 1.1 supports Huneke’s philosophy in [11] that there are uniform bounds lurking in Noetherian rings. In particular, when R in Lemma 1.1 has Krull dimension two, it satisfies the uniform symbolic topology property on prime ideals, since height one primes are the only nontrivial class to check. Notice that the R in Lemma 1.1 is allowed to be of mixed characteristic, unlike all previous results which require the ring to contain a field. It remains to identify classes of rings that satisfy the hypotheses of Lemma 1.1. In dimension two, we use the following result due to Lipman: Theorem 1 (Lipman [15, Prop 17.1]). Let (R, m) be a normal Noetherian local domain of dimension two. If R has a rational singularity, then Cl(R) is finite. Lipman defines a two-dimensional, normal Noetherian local domain (R, m) to have rational singularities if there is a proper, birational map f : X → Spec(R) from a regular scheme X such that H 1 (X, OX ) = 0. This allows us to affirmatively answer a question of Huneke, Katz, and Validashti [13, Question 1.1] for rationally singular surfaces: Theorem 1.2. All two-dimensional rational singularities (R, m) satisfy the uniform symbolic topology property on primes. In what other cases can we find effective values of D? In subsection 3.2, we will use results of Lipman to identify explicit effective values D for du Val singularities over C; see Table 3.3. Interestingly, our sharp results show that the smallest D that works for a class of non-regular rings can be arbitrarily large, even if the Krull dimension and multiplicity of the singularity are fixed. To produce effective bounds in higher dimension, we turn to the class of normal toric rings containing an arbitrary algebraically closed field k. These rings are built from a convex-geometric starter: precisely, a polyhedral cone σ ⊆ Rn generated by a finite set of primitive lattice points vi ∈ Zn , each RATIONAL SINGULARITIES AND UNIFORM SYMBOLIC TOPOLOGIES 3 having coordinates whose gcd is one. It turns out that a toric ring has finite class group precisely when it is simplicial, that is, the vi are R-linearly independent [2, Prop 4.2.2+Prop 4.2.7]. In particular, we have a Theorem 1.3. Let σ ⊆ Rn be a full-dimensional simplicial strongly convex rational polyhedral cone, and let R = k[σ ∨ ∩ Zn ] be the corresponding toric ring over an algebraically closed field k. Then R satisfies the uniform symbolic topology property on ideals of pure height one with multiplier D, where D is the volume of the n-parallelotope spanned by the primitive generators of σ. In particular, this volume can be computed as the determinant of a positivedefinite integer matrix. See subsection 3.1 for details. Conventions: All our rings are commutative with identity. From subsection 2.1 onwards, and except when stated otherwise, all our rings R will be Noetherian normal domains, and k will denote an algebraically closed field. All our algebraic varieties L over k are irreducible. When we say R is graded, we mean that R = d≥0 Rd is graded by N, with R0 being a field, and L m = d>0 Rd the unique homogeneous maximal ideal. 2. Local Uniform Annihilation and Symbolic Powers Defining Symbolic Powers. If P is a prime ideal in a nonzero Noetherian ring R, its a-th (a ∈ Z>0 ) symbolic power P (a) := P a RP ∩ R is the unique P -primary component in any minimal primary decomposition of P a . More generally, if I is any proper ideal of R, its a-th symbolic power is [ I (a) := I a W −1 R ∩ R, where W = R − {P : P ∈ AssR (R/I)}. While I a ⊆ I (a) for all a, the converse can fail for a > 1: I (1) = I since W is the set of nonzerodivisors modulo I. 2.1. Uniform Annihilation and Class Groups. Given a normal Noetherian domain R, the divisor class group Cl(R) = Cl(Spec(R)) of R is the free abelian group on the set of height one prime ideals of R modulo relations a1 P1 + . . . + ar Pr = 0, (a ) (a ) P1 1 ∩ . . . ∩ Pr r is principal (see Hochster’s lecture notes whenever the ideal [8] for more details on this definition; see also Hartshorne’s presentation [5, Ch.II,§6]). It is well known that the class group Cl(R) is trivial if and only if R is a UFD [5, Ch.II,§6]. Both conditions mean that every height one prime ideal in R is principal. We now show this latter assertion is equivalent to saying that all symbolic powers of a height one prime ideal P ⊆ R are principal, so P (a) = P a for all a > 0, and all height one primes P in a UFD. We follow an anonymous referee’s advice to state a 4 ROBERT M. WALKER Lemma 2.1. If R is an arbitrary Noetherian ring, and P = (f ) is prime with f a nonzerodivisor, then P (a) = (f a ) for all a > 0. Proof. Induce on a with base case a = 1. Assuming the statement for some a ≥ 1, take x ∈ P (a+1) . Since x ∈ P (a+1) ⊆ P (a) = (f a ), x = f a y for some y. By the choice of x, there is s 6∈ P with sx = sf a y ∈ P a+1 = (f a+1 ). Since f is a nonzerodivisor, sy ∈ (f ) = P , which is prime. Therefore, y ∈ P = (f ), and x ∈ (f a+1 ).  Given a Noetherian reduced ring R, recall that the affine scheme X = Spec(R) is locally factorial if Rp is a UFD for all prime ideals p ⊆ R; or equivalently, if Cl(Rp ) = 0 for all primes p ⊆ R. Definition 2.2. A reduced Noetherian normal ring R is (locally) uniformly annihilated if there exists an integer (multiplier) D > 0 such that one, and hence all, of the following equivalent conditions will hold: (1) D · Cl(Rp ) = 0 for all prime ideals p ⊆ R. More precisely, P (D) Rp = (P Rp )(D) is principal for all height one primes P ⊆ p. (2) The annihilator ideal AnnZ (Cl(Rp )) ⊇ DZ for all prime ideals p ⊆ R. (3) D · Cl(Rm ) = 0 for all maximal ideals m ⊆ R. Notice that (3) implies (1) since principal ideals remain principal when we extend along the ring map Rm → Rp . Note that since one can take D = 1 at locally factorial points of Spec(R), it suffices to compute D at maximal ideals m ⊆ R such that Rm is not a UFD. In language more familiar to algebraic geometers, D annihilates the local class group Clloc (X) = Cl(X)/ Pic(X) of X = Spec(R). Remark 2.3. A Noetherian normal domain R is uniformly annihilated when the annihilator ideal AnnZ (Cl(R)) 6= 0 (e.g., if Cl(R) is finite). However, the smallest local uniform multiplier need √ not annihilate Cl(R) globally. For example, if the Dedekind domain R = Z[ −5], then Cl(R) ∼ = Z/2Z, while any Dedekind domain R is locally factorial, so Cl(R)/ Pic(R) is trivial in the language of algebraic geometry, and D = 1 is the optimal multiplier. Remark 2.4. If R is local, then the smallest uniform multiplier would generate AnnZ (Cl(R)). When R is N-graded over a field with unique graded maximal ideal m, Cl(R) ∼ = Cl(Rm ) [16, Lem 5.1] and we again consider a generator of AnnZ (Cl(R)). In each case, this optimal multiplier D is the class group’s order if and only if the group is finite cyclic; we fill in Table 3.3’s final column via this fact. 2.2. The Main Lemma. Symbolic powers are notoriously difficult to compute by hand, i.e., to give generators for. Working in height one, item (a) of the following proposition allows us to study them indirectly. Note that if I is a proper ideal in a Noetherian ring, we say that I has pure height h if all of its associated primes have height h, in particular, none are embedded. RATIONAL SINGULARITIES AND UNIFORM SYMBOLIC TOPOLOGIES 5 Proposition 2.5. Let R be a Noetherian normal domain, and q any ideal of pure height one with associated primes P1 , . . . , Pr . Then: (a) There exist positive integers b1 , . . . , br , uniquely determined by q, such (Eb ) (Eb ) that the symbolic power q(E) = P1 1 ∩ . . . ∩ Pr r for all E > 0. (D) (b) If either (1) D · Cl(R) = 0, or simply (2) q is principal, then for all integers a > 0, q(Da) = (q(D) )a is principal and q(Da) ⊆ qa . Proof. First, we prove (a). For each i, the local ring Si = RPi is a discrete valuation ring, and we let ti ∈ Si be a local uniformizing parameter. Then Si is a PID, so an ideal J ⊆ Si is Pi Si = (ti )Si -primary if and only if J = (Pi Si )n = Pin Si = (tni )Si for some n > 0. In particular, qSi is Pi Si -primary, (b ) say qSi = (tbi i )Si . Then the Pi -primary component of q is Pi i . Thus q = (b1 ) (br ) P1 ∩ . . . ∩ Pr and clearly the bi are uniquely determined by q. Similarly, (Eb ) (Eb ) i )S for E > 0, so q(E) = P1 1 ∩ . . . ∩ Pr r for all E > 0. qE Si = (tEb i i (b ) (b ) For (b), first note that (1) implies (2): indeed, since q = P1 1 ∩ · · · ∩ Pr r , it yields an element [q] := b1 [P1 ] + · · · + br [Pr ] ∈ Cl(R), and since 0 = D[q] = [q(D) ] ∈ Cl(R), we conclude that q(D) is principal. So we proceed assuming q(D) is principal. Since q(D) ⊆ q(1) = q, by taking a-th powers, part (b) follows in full once we explain how q(Da) = (q(D) )a for all integers a > 0. Indeed, using the notation in the proof of (a), q(Da) Si = (q(D) )a Si = (tDabi )Si for all i, and we simply contract back to R.  We now prove the main lemma of the paper, expanding on Lemma 1.1: Lemma 2.6. Let R be a reduced Noetherian normal ring. Suppose D annihilates Cl(Rm ) for all maximal ideals m in R. Then for all a > 0 and all ideals q ⊆ R of pure height one, the symbolic power q(Da) ⊆ qa . Proof. First, we reduce to the local case. Indeed, recall that given two ideals I, J in R, the inclusion I ⊆ J holds (that is, the R-module J+I J = 0) if and (J+I)Rm JRm +IRm only if IRm ⊆ JRm (that is, the Rm -module JRm = = 0) for JRm all maximal ideals m ⊆ R. So we may assume R is a normal Noetherian local domain (in keeping with R being uniformly annihilated). Then, for R, D, and all q as stated, Proposition 2.5(b) gives us the inclusions.  3. Effective Uniform Bounds We begin with a selective review of toric geometry. For more details (e.g., omitted definitions, proofs, and relevant exercises) we refer the reader to: Chapters 1,3,4 of Cox, Little, and Schenck [2]; or alternatively, Chapters 1 and 3 of Fulton [4].1 For simplicity, we work with the standard lattice Zn in Rn , and a fixed algebraically closed field k. 1While both references work over C, the facts we review in this paper hold over any algebraically closed field. 6 ROBERT M. WALKER Any normal affine toric n-fold can be obtained from a strongly convex, rational polyhedral cone σ in Rn , that is, a closed, convex set ( ) X σ = Cone(G) = av · v : each av ∈ R≥0 ⊆ Rn , v∈G containing no line through the origin (strong convexity) and generated by a (possibly empty) finite set G of nonzero vectors in Zn (rationality). The cone has dimension dim σ := dim(R-linear span of G) ≤ n; if dim σ = n, then σ is called full. For such a cone σ = Cone(G) ⊆ Rn , the dual σ ∨ := {w ∈ Rn : hw, vi ≥ 0 for all v ∈ G} (h·, ·i is dot product in Rn ) is rational polyhedral and full, from which we obtain (1) A finitely-generated semigroup under addition ) ( r X ∨ n ai mi : each ai ∈ Z≥0 (Sσ , +) := σ ∩ Z = i=1 for some finite list of generators m1 , . . . , mr ∈ σ ∨ ∩ Zn . (2) A normal domain of finite type over k: namely, the semigroup ring R = k[Sσ ] generated as a k-vector space by the characters χm with m ∈ Sσ . Note that k[Sσ ] is generated as a k-algebra by characters χm1 , . . . , χmr where the mi are the semigroup generators of Sσ in (1). Any domain so obtained is a (normal) toric ring (or normal affine semigroup algebra, by definition) over k. (3) A normal toric n-fold, Uσ = Spec(k[Sσ ]). The cone σ ⊆ Rn as above is simplicial if σ = {0} or σ = Cone(G) for some G ⊆ Zn forming part of a R-basis for Rn , and we call the corresponding toric ring and toric variety simplicial. When σ 6= {0}, we may assume G = {v1 , . . . , vdim(σ) } consists of primitive vectors, i.e., that the coordinates of each vi have no common prime integer factor. When σ is full, we index the vi so the matrix AG ∈ Matn×n (Z) whose i-th row is vi has determinant d = det(AG ) ∈ Z>0 , the volume of the n-parallelotope spanned by v1 , . . . , vn . Working over an algebraically closed field k, each ray ρ ∈ Σ(1), the collection of rays (one-dimensional faces) of σ, has a generator uρ ∈ ρ ∩ Zn that is primitive, and yields a torus-invariant prime divisor Dρ on X = Uσ , per the Orbit-Cone Correspondence [2, Thm 3.2.6]. The torus-invariant Weil divisors on X form a free abelian group [2, Exercise 4.1.1] M ZDρ . DivT (X) = ρ∈Σ(1) We close by recording without proof a few facts from sections 4.1 and 4.2 of [2] about the divisor class group Cl(X), specialized to the affine case. Theorem 3.1. Take a normal affine toric variety X = Uσ . Then RATIONAL SINGULARITIES AND UNIFORM SYMBOLIC TOPOLOGIES 7 (1) Cl(X) is finite abelian if and only if σ is simplicial (cf., [2, Prop 4.2.2 and Prop 4.2.7]). If so, then all Weil divisors on X are Q-Cartier of index bounded by the order of Cl(X). (2) If G = {uρ : ρ ∈ Σ(1)} spans Rn , i.e., σ is full, then we have a short exact sequence of abelian groups (3.1) φ 0 → Zn → DivT (X) → Cl(X) → 0, P where φ(m) = div(χm ) = ρ∈Σ(1) hm, uρ iDρ , and h·, ·i is dot product. 3.1. The Toric Case. The short exact sequence 3.1 makes it easy to compute the divisor class group Cl(Uσ ). If Σ(1) = {ρ1 , . . . , ρr } has r elements,2 the map φ can be treated, up to isomorphism, as a map Zn → Zr given by the matrix A = (uρ1 , . . . , uρr )T where T denotes transpose: that is, the i-th row of A is given by the coordinates of uρi . Cl(Uσ ) is the cokernel of φ, and hence can be computed up to isomorphism by first finding the Smith normal form of A. Note that since the alternating sum of the ranks in the short exact sequence vanishes, Cl(Uσ ) has rank r − n. We now re-express Theorem 1.3: Corollary 3.2. Let σ = Cone(G) ⊆ Rn be a simplicial full strongly convex rational polyhedral cone. Let Uσ be the corresponding affine toric variety. Let AG ∈ Matn×n (Z) be the accompanying matrix of primitive ray generators. Then Cl(Uσ ) is a finite abelian group of order d = | det(AG )|. Proof. We maintain the notational conventions of the statement of Theorem 3.1, along with those in the paragraph on simplicial toric varieties in our review above. By hypothesis, G = {uρ : ρ ∈ Σ(1)} forms an R-vector space basis of Rn since σ is simplicial. So by Theorem 3.1(2), Cl(Uσ ) has rank zero, and hence is finite abelian. Moreover, as a special case of following the Smith normal form approach in the paragraph above, we see that the matrix AG defines the action of φ. Thus we conclude that d is the order of Cl(Uσ ).  3.2. Rational double points. To obtain additional explicit, effective multipliers, we turn to the case of complete, normal Noetherian local domains S in equal characteristic zero with du Val (ADE) isolated singularity and algebraically closed residue field; for simplicity, we work with C. In [15, §24], Lipman computes the class group isomorphism type (as a Z-module) of each du Val singularity. The du Val (ADE) singularities, also known as rational double points, are the most basic isolated surface singularities. For a brief introduction to these singularities and their basic properties, we refer the reader to sections III.3 and III.7 of [1]. Their minimal resolutions can be understood and classified by the simply-laced Dynkin diagrams of types A, D, and E. We can express S as above as the quotient of the power series C[[x, y, z]] by a single local equation. We now situate a succinct data table, where the last column’s entries are the optimal uniform multipliers from Remark 2.4: 2Note that r ≥ n since G spans Rn by hypothesis in Theorem 3.1(2). 8 ROBERT M. WALKER Table 3.3. du Val Singularity type An (n ≥ 1) Local Equation xz − y n+1 Dn (n ≥ 4) x2 + yz 2 − z n−1 En (n = 6, 7, 8)  4 3 2  x + y + z 3 3 x y + y + z2   5 x + y3 + z 2 if n = 6 if n = 7 if n = 8 Class group (isomorphism type) ( Z/(n + 1)Z (Z/2Z)2 n even Z/4Z n odd.   Z/3Z if n=6  Z/2Z if n = 7   0 if n = 8 Dmin (S) ( n+1 2 n even 4 n odd.   3 if n = 6  2 if n = 7   1 if n = 8 Note that an analogous data table can be drafted for affine du Val singularity hypersurfaces in C3 (affine, N-graded case), which arise as the quotients C2 /G by the action of a finite subgroup G ⊆ SU2 (C). Taking the above data table in tandem with Theorem 1.3, we now have access to an infinite supply of concrete, effective uniform bounds that hold in non-regular Noetherian domains whose singularities are sufficiently nice (e.g., toric, du Val). In particular, the Huneke-Katz-Validashti result [12] on uniform bounds now has some added company in the setting of rational surface singularities, courtesy of Lipman’s work. Remark 3.4. When a Noetherian ring R satisfies the uniform symbolic topology property (USTP) on prime ideals, experts might initially expect that the optimal multiplier D = Dmin (R) should depend only on simple numerical invariants of R, such as Krull dimension, or the multiplicity of R at an isolated singularity. However, An -singularities and E8 -singularities have multiplicity two, being rational double points. At one extreme, Dmin (An ) = n + 1 is optimal, grows arbitrarily large with n, and does not depend on any such numerical invariants of An . At the other extreme, Dmin (E8 ) = 1 is lower than both the Krull dimension and the multiplicity. Therefore, a (sharp) uniform bound depending only on such numerical invariants need not exist. 4. Lingering Questions and Future Directions To summarize, we have deduced a group-theoretic criterion (Lemma 2.6) for uniform symbolic topologies on ideals of pure height one in a Noetherian normal domain. We also demonstrated the criterion’s utility relative to familiar classes of local- or graded Cohen-Macaulay domains with rational singularities [6, 7]. We close with two natural lines for further investigation. (1) Can Lemma 2.6 be strengthened to cover all (non-prime) ideals of height one? (2) Can we identify a candidate mechanism (e.g., group-theoretic) to verify the uniform symbolic topology property for: prime ideals of height one in non-simplicial toric rings; or prime ideals of height two or more, even in the case of simplicial toric rings of dimension at least three? RATIONAL SINGULARITIES AND UNIFORM SYMBOLIC TOPOLOGIES 9 References [1] W.P. Barth, K. Hulek, C.A.M. Peters, A. Van de Ven, Compact Complex Surfaces, second edition. Springer-Verlag Berlin, 2004. [2] D.A. Cox, J.B Little, and H.K. Schenck. Toric Varieties (2011), Graduate Studies in Mathematics 124. American Mathematical Society, Providence, RI. [3] L. Ein, R. Lazarsfeld, and K. Smith. Uniform bounds and symbolic powers on smooth varieties. Invent. Math. 144 (2001), pp. 241-252. [4] W. Fulton. Introduction to Toric Varieties (1993), Annals of Math. Studies 131. Princeton University Press, Princeton, NJ. [5] R. Hartshorne. Algebraic Geometry. Graduate Texts in Math. 52, Springer-Verlag, New York, 1977. [6] M. Hochster. Cohen-Macaulay Rings and Modules. Proceedings of the International Congress of Mathematicians, Helsinki, Finland, V. I, Academia Scientiarum Fennica, 1980, pp. 291-298. [7] M. Hochster. Rings of invariants of tori, Cohen-Macaulay rings generated by monomials, and polytopes. Ann. of Math (2) 96 (1972), pp. 318-337. [8] M. Hochster. Math 615 Winter 2007 Lecture 4/6/07. Online link. [9] M. Hochster and C. Huneke. Comparison of ordinary and symbolic powers of ideals. Invent. Math. 147 (2002), pp. 349-369. [10] M. Hochster and C. Huneke. Fine behavior of symbolic powers of ideals. Illinois J. Math. 51 (2007), no. 1, pp. 171–183. [11] C. Huneke. Uniform bounds in Noetherian rings. Invent. Math. 107 (1992), pp. 203223. [12] C. Huneke, D. Katz, and J. Validashti. Uniform equivalence of symbolic and adic topologies. Illinois J. Math. 53 (2009), no. 1, pp. 325–338. [13] C. Huneke, D. Katz, and J. Validashti. Uniform symbolic topologies and finite extensions. J. Pure Appl. Algebra 219 (2015), no. 3, pp. 543–550. [14] M.R. Johnson. Containing symbolic powers in regular rings. Comm. in Algebra Vol. 42 (2014), no. 8, pp. 3552–3557. [15] J. Lipman. Rational singularities, with applications to algebraic surfaces and unique factorization. Inst. Hautes Études Sci. Publ. Math. (1969), no. 36, pp. 195–279. [16] M.P. Murthy. Vector bundles over affine surfaces birationally equivalent to a ruled surface. Ann. of Math (2) 89 (1969), pp. 242-253. [17] S. Takagi, and K. Yoshida. Generalized test ideals and symbolic powers. Michigan Math. J. 57 (2008), pp. 711–725. Department of Mathematics, University of Michigan, Ann Arbor, MI, 48109 E-mail address: [email protected]
0math.AC
Underapproximation of Procedure Summaries for Integer Programs Pierre Ganty1 , Radu Iosif2 , and Filip Konečný2,3 arXiv:1210.4289v3 [cs.PL] 24 Oct 2016 1 Imdea Software Institute, Madrid, Spain 2 Verimag/CNRS, Grenoble, France 3 École Polytechnique Fédérale de Lausanne (EPFL), Switzerland Abstract We show how to underapproximate the procedure summaries of recursive programs over the integers using off-the-shelf analyzers for nonrecursive programs. The novelty of our approach is that the non-recursive program we compute may capture unboundedly many behaviors of the original recursive program for which stack usage cannot be bounded. Moreover, we identify a class of recursive programs on which our method terminates and returns the precise summary relations without underapproximation. Doing so, we generalize a similar result for non-recursive programs to the recursive case. Finally, we present experimental results of an implementation of our method applied on a number of examples. 1 Introduction Formal approaches to reasoning about behaviors of programs usually fall into one of the following two categories: certification approaches, that provide proofs of correctness, and bug-finding approaches, that explore increasingly larger sets of traces in order to find possible errors. While the methods in the first category are used typically in the development of safety-critical software whose failures may incur dramatic losses in terms of human lives (airplanes, space missions, or nuclear power plants), the methods in the second category have a broad application in industry, outside of the safety-critical market niche. Another difference between the two categories is methodological: certification approaches are based on over-approximations of the set of behaviors (if the over-approximation is free of errors, the original system is correct), while bug-finding needs systematic under-approximation techniques (if there are errors, the method will eventually discover all of them). Finally, over-approximation methods are guaranteed to terminate, but the answer might be inconclusive (spurious errors are introduced due to the abstraction), whereas under-approximation methods provide precise results (all reported errors are real), but with no guarantee for termination. Procedure summaries are relations between the input and return values of a procedure, resulting from its terminating executions. Computing summaries is important, as they are a key enabler for the development of modular verification techniques for inter-procedural programs, such as checking safety, termination 1 or equivalence properties. Summary computation is, however, challenging in the presence of recursive procedures with integer parameters, return values, and local variables. While many analysis tools exist for non-recursive programs, only a few ones address the problem of recursion (e.g. InterProc [19]). In this paper, we propose a novel technique to generate arbitrarily precise underapproximations of summary relations. Our technique is based on the following idea. The control flow of procedural programs is captured precisely by the language of a context-free grammar. A k-index underapproximation of this language (where k ě 1) is obtained by filtering out those derivations of the grammar that exceed a budget, called index, on the number (at most k) of occurrences of nonterminals occurring at each derivation step. As expected, the higher the index, the more complete the coverage of the underapproximation. From there we define the k-index summary relations of a program by considering the k-index underapproximation of its control flow. Our method then reduces the computation of k-index summary relations for a recursive program to the computation of summary relations for a non-recursive program, which is, in general, easier to compute because of the absence of recursion. The reduction was inspired by a decidability proof [4] in the context of Petri nets. The contributions of this paper are threefold. First, we show that, for a given index, recursive programs can be analyzed using off-the-shelf analyzers designed for non-recursive programs. Second, we identify a class of recursive programs, with possibly unbounded stack usage, on which our technique is complete, i.e. it terminates and returns the precise result. Third, we present experimental results of an implementation of our method applied on a number of examples. Motivating Example To properly introduce the reader to our result, we describe our source-to-source program transformation through an illustrative example. Consider the recursive program P “ tP u, consisting of a single recursive procedure P , given in Fig. 1 (a), whose control flow graph is given in Fig. 1 (b). The nodes of this graph represent control locations in the program, with a designated initial location Qinit and a final location ε. The 1 edges are labeled with relations denoting the program semantics, where primed variables x1 and z 1 denote the values at the next step. For instance, the edge z 1 “P px´1q^x1 “x t2 : Q2 ÝÝÝÝÝÝÝÝÝÝÝÑ Q3 corresponds to the recursive call on line 3 in the program—the edge labels of the control flow graph explicitly mention the copies of variables not changed by the program action corresponding to the edge, e.g. x1 “ x. In this paper, we model programs using visibly pushdown grammars (VPG) [3]. The VPG for P is given in Fig. 1 (c). The role of the grammar is to define the set of interprocedurally valid paths in the control-flow graph of the program P . Every edge in the control-flow graph matches one or two symbols from the finite alphabet tτ1 , x τ2 , τ2 y , τ3 , τ4 u, where x τ2 and τ2 y denote the call and return, respectively. Each edge in the graph translates to a production rule in the grammar, labeled pb1 , pc2 , pa3 and pa4 —the superscript a, b and c distinguishes rules with 0, 1 and 2 nonterminals on the right-hand side, respectively. For instance, the call edge t2 becomes the rule Q2 Ñ x τ2 Qinit 1 τ2 y Q3 . The language of the n n grammar of Fig. 1 (c) (with axiom Qinit 1 ) is the set tpτ1 x τ2 q τ4 pτ2 y τ3 q | n P Nu of interprocedurally valid paths, where each call symbol x τ2 is matched by a return symbol τ2 y , and the matching relation is well-parenthesized. The outcome of the program transformation applied to P is the non-recursive 2 (K program Q “ query i i“0 , depicted in Fig. 1 (d), where K is a parameter of our analysis. The main idea is that the executions of the procedure query k , ending with an empty stack, correspond to the derivations of the VPG in Fig. 1 (c), of index at most k—since there is no derivation of index 0, the set of executions of query 0 will be empty. The body of a procedure query k consists of a main loop, starting at the control label begin_loop in Fig. 1 (d). Each branch inside the main loop corresponds to the simulation of one of the production rules of the grammar in Fig. 1 (c) and starts with a control label which is the name of that rule (pb1 , pc2 , pa3 , pa4 ). Next, we explain the relations labeling the control edges of query k . For each production rule p in the grammar we have a relation ρp pxI , zI , xO , zO q, where subscript I and O denote the input and output copies of the program variables of P , respectively. In addition, we consider auxiliary copies xJ , zJ , xK , zK and xL , zL , defined in a similar way. For instance, the auxiliary variables store intermediate results of the computation of pc2 as follows: rxI , zI s x τ2 rxJ , zJ s Qinit rxK , zK s τ2 y rxL , zL s Q3 rxO , zO s. The transition 1 pc2 Ñ in_order{out_of _order can be understood by noticing that x τ2 gives rise to the constraint xJ “ xI ´ 1, τ2 y to zL “ zK and xI “ xL corresponds to the frame condition x1 “ x. The peculiarity of the resulting program is that a function call is modeled in two possible ways: (i) in-order execution of the function body, followed by the continuation of the call, and (ii) out-of-order execution of the continuation, followed by the execution of the function body. The two cases correspond ˚ to k-index derivations of the VPG in Fig 1 (c) of the form uQinit 1 vQ3 w ñ ˚ init ˚ ˚ uv1 vQ3 w ñ uv1 vv2 w and uQ1 vv2 w ñ uv1 vv2 w ñ uv1 vv2 w, respectively, where Qinit ñ˚ v1 and Q3 ñ˚ v2 are derivations of the VPG. In the first case, 1 the control path simulating the derivation in query k follows the left branch in_order{out_of _order Ñ begin_loop, whereas the second case is simulated by the right branch. Since the only call of query k is to query k´1 , on the edges in_order{out_of _order Ñ begin_loop, the whole program is a non-recursive under-approximation of the semantics of the original program P , amenable to analysis using intra-procedural program analysis tools. Indeed, the computation of the pre-condition relation of the program Q “ tquery 2 , query 1 , query 0 u with the Flata tool [17] yields the formula zO “ 2 ¨ xI , which matches the summary z 1 “ 2 ¨ x of the program P . In other words, the analysis of the under-approximation of P of index at most 2 suffices to infer the complete summary of the program (the analysis for values K ą 2 will necessarily yield the same result, since the under-approximation method is monotonic in K). This fact matches the completeness result of Section 5, stating that the analysis needs to be carried up to a certain bound (linear in the size of the program’s VPG) whenever the language of the VPG is included in the language of the regular expression w1˚ . . . wn˚ , for some nonempty words w1 , . . . , wn . In our case, the completeness result applies due to n n ˚ ˚ tpτ1 x τ2 q τ4 pτ2 y τ3 q | n P Nu Ď pτ1 x τ2 q τ4˚ pτ2 y τ3 q . Related Work The problem of analyzing recursive programs handling integers (in general, unbounded data domains) has gained significant interest with the seminal work of Sharir and Pnueli [24]. They proposed two orthogonal approaches for interprocedural dataflow analysis. The first one keeps precise values (call strings) up to a limited depth of the recursion stack, which bounds the number of executions. In contrast to the methods based on the call strings approach, 3 q init 1 x > 0 x0 = x int P(int x) { int z; 1: assume(x ≥ 0); 2: if (x > 0) 3: z := P(x-1); 4: z := z+2; t1 q2 z 0 = P (x − 1) x0 = x t4 t2 x = 0 z0 = 0 pb 1 pc 2 pa 3 pa 4 : Qinit → τ1 Q2 1 : Q2 → hhτ2 Qinit τ2 ii Q3 1 : Q3 → τ3 : Qinit → τ4 1 q3 t3 5: else 6: z := 0 7: return z; } x0 = x z0 = z + 2 ε (b) (a) k query (X, xI , zI , xO , zO ) (c) init P C0 = X begin loop pa 3 P C = Q3 xO = xI zO = zI + 2 ε (d) pa 4 P C = Qinit 1 xI = 0 zO = 0 ε pc 2 pb 1 P C = Qinit 1 xI > 0 xJ = xI 0 x = xJ I z 0 = zJ I P C 0 = Q2 x0 = xJ I z 0 = zJ I P C0 = Y x0 = xK O z 0 =zK O k−1 query (Z, xL , zL , xO , zO ) P C = Q2 Y 0 = Qinit 1 Z 0 = Q3 xJ = xI − 1 zK = zL xI = xL out of order/in order x0 = xL I z 0 = zL I P C0 = Z query k−1 (Y, xJ , zJ , xK , zK ) Figure 1: A recursive program returning the parameter value multiplied by two (a), its corresponding control flow graph (b) and visibly pushdown grammar (c), and the non-recursive program query k pX, xI , zI , xO , zO q resulting from our index-bounded under-approximation (d). our method can also analyse precisely certain programs for which the stack is unbounded, allowing for unbounded number of executions to be represented at once. The second approach of Sharir and Pnueli [24] is based on computing the least fixed point of a system of recursive dataflow equations (the functional approach). This approach to interprocedural analysis is based on computing an increasing Kleene sequence of abstract summaries. It is to be noticed that abstraction is key to ensuring termination of the Kleene sequence, the result being an over-approximation of the precise summary. Recently [11], a Newton sequence defined over the language semiring was shown to converge at least as fast as the Kleene sequence over the same semiring. An iterate of a Newton sequence is the set of control paths in the program that correspond to words produced by a grammar, with bounded number of nonterminals at each step in the derivation. By increasing this bound, we obtain an increasing sequence of languages that converges to the language of behavior of the program. Our contribution can be thus seen as a technique to compute the iterates of the Newton sequence for programs with integer parameters, return values, and local variables, the result being, at each step, an under-approximation of the precise summary. 4 The complexity of the functional approach was shown to be polynomial in the size of the (finite) abstract domain, in the work of Reps, Horwitz and Sagiv [23]. This result is achieved by computing summary information, in order to reuse previously computed information during the analysis. Following up on this line of work, most existing abstract analyzers, such as InterProc [19], also use relational domains to compute over-approximations of function summaries – typically widening operators are used to ensure termination of fixed point computations. The main difference of our method with respect to static analyses is the use of under-approximation instead of over-approximation. If the final purpose of the analysis is program verification, our method will not return false positives. Moreover, the coverage can be increased by increasing the bound on the derivation index. Previous works have applied model checking based on abstraction refinement to recursive programs. One such method, known as nested interpolants represents programs as nested word automata [3], which have the same expressive power as the visibly pushdown grammars used in our paper. Also based on interpolation is the Whale algorithm [2], which combines partial exploration of the execution paths (underapproximation) with the overapproximation provided by a predicatebased abstract post operator, in order to compute summaries that are sufficient to prove a given safety property. Another technique, similar to Whale, although not handling recursion, is the Smash algorithm [15] which combines may- and mustsummaries for compositional verification of safety properties. These approaches are, however, different in spirit from ours, as their goal is proving given safety properties of programs, as opposed to computing the summaries of procedures independently of their calling context, which is our case. We argue that summary computation can be applied beyond safety checking, e.g., to prove termination [5], or program equivalence. The technique of under-approximation is typically used for bug discovery, rather than certification of correctness. For instance, bug detection based on under-approximation has been developed for non-recursive C programs with arrays [18]. Our approach in orthogonal, as we consider more complex control structures (possibly recursive procedure calls) but simpler data domains (scalar values such as integers). Paper organization. After introducing the basic definition in Section 2, we present, in Section 3, our model for programs, a semantics based on nested words and another one, equivalent, based on derivations of the underlying grammar. Then, in Section 4, we present our main contribution which is a program transformation underapproximating the semantics of the input program. In Section 5, we define a class of programs for which the underapproximation is complete. Finally, after reporting on experiments in Section 6 we conclude in Section 7. 2 2.1 Preliminaries Grammars Let Σ be an alphabet, that is a finite non-empty set of symbols. We denote by Σ˚ the set of finite words over Σ including ε, the empty word. Given a word w P Σ˚ , let |w| denote its length and let pwqi , with 1 ď i ď |w|, be the i-th symbol of w. 5 By pwqi...j , with 1 ď i ď j ď |w|, we denote the subword pwqi . . . pwqj of w. For a word w P Σ˚ and Σ1 Ď Σ, we denote by wÓΣ1 the result of erasing all symbols of w not in Σ1 . A context-free grammar (or simply grammar) is a tuple G “ xΞ, Σ, ∆y, where Ξ is a finite nonempty set of nonterminals, Σ is an alphabet, such that Ξ X Σ “ H, and ∆ Ď Ξ ˆ pΣ Y Ξq˚ is a finite set of productions. A production pX, wq P ∆ is often conveniently noted X Ñ w. Also define head pX Ñ w q “ X and tail pX Ñ wq “ w. Given two strings u, v P pΣYΞq˚ , a production pX, wq P ∆ pX,wq{j and 1 ď j ď |u|, we define a step u ùùùùùñG v if, and only if, puqj “ X and v “ puq1 ¨ ¨ ¨ puqj´1 ¨ w ¨ puqj`1 ¨ ¨ ¨ puq|u| . We omit pX, wq or j above the arrow when it is not important. In this notation and others, when G is clear from the context, we omit it. Step sequences (including the empty sequence) are defined using the reflexive transitive closure of the step relation ñ ù G , denoted ñ ù ˚G . For ˚ instance, X ñ ù G w means there exists a sequence of steps that produces the word w P pΣ Y Ξq˚ , starting from X. We call any step sequence v ñ ù ˚G w a ˚ derivation whenever v P Ξ and w P Σ . The language produced by G, starting with a nonterminal X is the set LX pGq “ tw P Σ˚ | X ñ ù ˚G wu. By defining a control word to be a sequence of productions γ P ∆˚ , we can annotate step sequences as expected: ε P ∆˚ is the control word for empty step γ sequences, and given a control word γ of length n we write u ñ ù G v whenever there exists w0 , . . . , wn P pΞ Y Σq˚ such that pγq1 pγq2 pγqn u “ w0 ùùñG w1 ùùñG . . . wn´1 ùùñG wn “ v . Given a nonterminal X P Ξ and a set Γ Ď ∆˚ of control words (a.k.a control γ set), we denote by L̂X pΓ, Gq “ tw P Σ˚ | Dγ P Γ : X ñ ù wu the language generated by G using only control words in Γ. 2.2 Visibly Pushdown Grammars To model the control flow of procedural programs we use languages generated by visibly pushdown grammars, a subset of context-free grammars. In this setting, p “ ΣYxxΣYΣyy, where x Σ “ txxa | a P Σu words are defined over a tagged alphabet Σ represents procedure call sites and Σyy “ tayy | a P Σu represents procedure return p ∆y is a grammar that sites. Formally, a visibly pushdown grammar G “ xΞ, Σ, has only productions of the following forms, for some a, b P Σ: XÑa X Ñ aY X Ñ x a Y byy Z . It is worth pointing that, for our purposes, we do not need a visibly pushdown grammar to generate the empty string ε. Each tagged word generated by visibly pushdown grammars is associated a nested word [3] the definition of which we briefly recall. Given a finite alphabet Σ, a nested word over Σ is a pair pw, ;q, where ; Ď t1, . . . , |w|u ˆ t1, . . . , |w|u is a set of nesting edges (or simply edges) where: 1. i ; j only if i ă j; edges only go forward; 2. ||tj | i ; ju|| ď 1 and ||ti | i ; ju|| ď 1; no two edges share a call/return position; 6 3. if i ; j and k ; ` then it is not the case that i ă k ď j ă `; edges do not cross. Intuitively, we associate a nested word to a tagged word as follows: there is an edge between tagged symbols x a and byy if and only if both symbols are produced by the same derivation step. Finally, let w_nw denote the mapping which given a tagged word in the language of a visibly pushdown grammar returns the nested word thereof. Example 2.1. For the tagged word w “ τ1 x τ2 τ1 x τ2 τ4 τ2 y τ3 τ2 y τ3 , w_nwpwq “ pτ1 τ2 τ1 τ2 τ4 τ2 τ3 τ2 τ3 , t2 ; 8, 4 ; 6uq is the associated nested word.  2.3 Integer Relations Given a set S, let ||S|| denote its cardinality. We denote by Z the set of integers. Let x “ xx1 , . . . , xd y be a tuple of variables, for some d ą 0. We define by x1 the primed variables of x to be the tuple xx11 , x12 , . . . , x1d y. We consider implicitly that all variables range over Z. We denote by |x| “ d the length of the tuple x, and for a tuple y “ xy1 , . . . , ye y, we denote by x ¨ y “ xx1 , . . . , xd , y1 , . . . , ye y their concatenation. For two tuples of variables t and s such that |t| “ |s| “ k, Źk we denote by t “ s the conjunction i“1 ti “ si . řd A linear term t is a linear combination of the form a0 ` i“1 ai xi , where a0 , . . . , ad P Z. An atomic proposition is a predicate of the form t ď 0, where t is a linear term. We consider formulae in the first-order logic over atomic propositions t ď 0, also known as Presburger arithmetic. A valuation of x is a function ν : x Ñ Ý Z. The set of all valuations of x is denoted by Zx . If x “ xx1 , . . . , xd y and ν P Zx , then νpxq denotes the tuple xνpx1 q, . . . , νpxd qy. An arithmetic formula Rpx, y1 q defining a relation R Ď Zx ˆ Zy is evaluated with respect to two valuations ν1 P Zx and ν2 P Zy , by replacing each x P x by ν1 pxq and each y 1 P y1 by ν2 pyq in R. The composition of two relations R1 Ď Zx ˆ Zy and R2 Ď Zy ˆ Zz is denoted by R1 ˝ R2 “ txu, vy P Zx ˆ Zz | Dt P Zy . xu, ty P R1 and xt, vy P R2 u. We denote y Ď x if y “ xxi1 , . . . , xi` y, for a sequence of indices 1 ď i1 ă . . . ă i` ď d of x. For a valuation ν P Zx and a tuple y Ď x, we denote by νÓy P Zy the projection of ν onto variables y, i.e. νÓxy1 ,...,yk y “ xνpy1 q, . . . , νpyk qy. Finally, given two valuations I, O P Zx , we denote by I ¨O the valuation Ipxq¨Opxq, and we define Zxˆx “ tI ¨O | I, O P Zx u. 2.4 Parikh Images Let Θ “ tθ1 , . . . , θk u be a linearly ordered subset of the alphabet Σ. For a symbol a P Σ its Parikh image is defined as P kΘ paq “ ei if a “ θi , where ei is the k-dimensional vector having 1 on the i-th position and 0 everywhere else. Otherwise, if a P ΣzΘ, let P kΘ paq “ 0 where 0 is the k-dimensional vector with 0 everywhere. For a word w P Σ˚ of length n, we define P kΘ pwq “ řn 1 Furthermore, let P kΘ pLq “ tP kΘ pwq | w P Lu for any i“1 P kΘ ppwqi q. ˚ language L Ď Σ . 1 We adopt the convention that the empty sum evaluates to 0. 7 2.5 Labelled Graphs In this paper we use of the notion of labelled graph G “ xQ, L, δy, where Q is a finite set of vertices, L is a set of labels whose elements label edges as defined by ` the edge relation δ Ď Q ˆ S ˆ Q. We denote by q Ñ Ý q 1 the fact that pq, `, q 1 q P δ. A path π in G is an alternating sequence of vertices and edges whose endpoints `1 `2 `n are vertices. Sometimes, π is conveniently written as q0 ÝÑ q1 ÝÑ . . . qn´1 ÝÑ qn w and further abbreviated q0 Ý Ñ qn where w “ `1 . . . `n . 3 Integer Recursive Programs We consider in the following that programs are collections of procedures calling each other, possibly according to recursive schemes. Formally, an integer program is an indexed tuple P “ xP1 , . . . , Pn y, where P1 , . . . , Pn are procedures. Each out init procedure is a tuple Pi “ xxi , xin , Fi , ∆i y, where xi are the local i , xi , Si , qi 2 in variables of Pi (xi X xj “ H for all i ‰ j), xi , xout Ď xi are the tuples of input i and output variables, Si are the control states of Pi (Si X Sj “ H, for all i ‰ j), qiinit P Si zFi is the initial, and Fi Ď Si (Fi ‰ H) are the final states of Pi , and ∆i is a set of transitions of one of the following forms: Rpxi ,x1 q • q ÝÝÝÝÝiÑ q 1 is an internal transition, where q, q 1 P Si , and Rpxi , x1i q is a Presburger arithmetic relation involving only the local variables of Pi ; z1 “Pj puq • q ÝÝÝÝÝÝÑ q 1 is a call, where q, q 1 P Si , Pj is the callee, u are linear terms out over xi , z Ď xi are variables, such that |u| “ |xin j | and |z| “ |xj |. The 1 call is said to be terminal if q P Fi . It is well-known that terminal calls can be replaced by internal transitions. The call graph of a program P “ xP1 , . . . , Pn y is a directed graph with vertices P1 , . . . , Pn and an edge pPi , Pj q, for each Pi and Pj , such that Pi has a call to Pj . A program is recursive if its call graph has at least one cycle, and non-recursive if its call graph is a dag. Ťn In the rest of this paper, we denote by F pPq “ i“1 Fi the set of final states of the program P, by nFpPi q the set Si zFi of non-final states of Pi , and by Ťn nFpPq “ i“1 nFpPq be the set of non-final states of P. 3.1 Simplified syntax To ease the description of programs defined in this paper, we use a simplified, human readable, imperative language such that each procedure of the program conforms to the following grammar:3 P ::“ proc Pi pid ˚ q begin var id ˚ S0 ; S end S0 ::“ assume f | goto `` | havoc id ` | id Ð t S ::“ S0 | S; S | id Ð Pi pt˚ q; S0 | Pi pt˚ q; S0 | return id 2 Observe that there are no global variables in the definition of integer program. Those can be encoded as input and output variables to each procedure. 3 Our simplified syntax does not seek to capture the generality of integer programs. Instead, our goal is to give a convenient notation for the programs given in this paper and only those. 8 The local variables occurring in P are denoted by id, linear terms by t, Presburger formulae by f , and control labels by `. Each procedure consists in local declarations followed by a sequence of statements. Statements may carry a label. Program statements can be either assume statements4 , assignments, procedure calls (possibly with a return value), return to the caller (possibly with a value), non-deterministic jumps goto `1 or . . . or `n , and havoc x1 , x2 , . . . , xn statements5 . In order to simplify the upcoming technical developments, we forbid empty procedures, procedures starting with a call or a return, i.e. each procedure must start with a statement generated by the S0 nonterminal. We consider the usual syntactic requirements (used variables must be declared, jumps are well defined, no jumps outside procedures, etc.). We do not define them, it suffices to know that all simplified programs in this paper comply with the requirements. A program using the simplified syntax can be easily translated into the formal syntax (Fig. 1). Example 3.1. Figure 1 shows a program in our simplified imperative language and its corresponding integer program P. Formally, P “ xP y, where P is the only procedure in the program, defined as: P “ xtx, zu, txu, tzu, tq1init , q2 , q3 , εu, q1init , tεu, tt1 , t2 , t3 , t4 uy Since P calls itself once (within the call transition t2 ), this program is recursive.  3.2 Semantics We are interested in computing the summary relation between the values of the input and output variables of a procedure. To this end, we give the semantics of a program P “ xP1 , . . . , Pn y as a tuple of relations, denoted JqK in the following, describing, for each non-final control state q P nFpPi q of a procedure Pi , the effect of the program when started in q upon reaching a state in Fi . The summary of a procedure Pi is the relation corresponding to its unique initial state, i.e. Jqiinit K. An interprocedurally valid path is represented by a tagged word over an p which maps each internal transition t to a symbol τ , and each call alphabet Θ, p In the sequel, we denote by Q the transition t to a pair of symbols x τ, τ y P Θ. nonterminal corresponding to the control state q, and by τ P Θ the alphabet symbol corresponding to the transition t of P. Formally, we associate P a visibly p ∆y, such pushdown grammar, denoted in the rest of the paper by GP “ xΞ, Θ, that Q P Ξ if and only if q P nFpPq and: R (a) Q Ñ τ P ∆ if and only if t : q ÝÑ q 1 and q 1 P F pPq R (b) Q Ñ τ Q1 P ∆ if and only if t : q ÝÑ q 1 and q 1 P nFpPq z1 “Pj puq (c) Q Ñ x τ Qinit τ y Q1 P ∆ if and only if t : q ÝÝÝÝÝÝÑ q 1 . j It is easily seen that interprocedurally valid paths in P and tagged words in GP are in one-to-one correspondence. In fact, each interprocedurally valid path of P between state q P nFpPi q and a state of Fi , where 1 ď i ď n, corresponds exactly to one tagged word of LQ pGP q. 4 assume φ is executable if and only if the current values of the variables satisfy the Presburger formula φ. 5 havoc assigns non deterministically chosen integers to x , x , . . . , x . n 1 2 9 Example 3.2. (contd. from Ex. 3.1) The visibly pushdown grammar GP corresponding to P is given in Fig. 1 (c). In the following, we use superscripts a, b, c to distinguish productions of the form (a) Q Ñ τ , (b) Q Ñ τ Q1 or (c) Q Ñ x τ Qinit τ y Q1 , respectively. The language LQinit pGP q generated by GP j 1 init starting with Q1 contains the word w “ τ1 x τ2 τ1 x τ2 τ4 τ2 y τ3 τ2 y τ3 , of which w_nwpwq “ pτ1 τ2 τ1 τ2 τ4 τ2 τ3 τ2 τ3 , t2 ; 8, 4 ; 6uq is the corresponding nested word. The word w corresponds to an interprocedurally valid path where P calls itself twice. The control words γ1 “ pb1 pc2 pb1 pc2 pa4 pa3 pa3 and γ2 “ pb1 pc2 pa3 pb1 pc2 pa4 pa3 γ1 γ2 both produce w in this case, i.e. Qinit ùñ w and Qinit ùñ w.  1 1 The semantics of a program is the union of the semantics of the nested words corresponding to its executions, each of which being a relation over input and output variables. To define the semantics of a nested word, we first associate to p an integer relation ρτ , defined as follows: each τ P Θ R • for an internal transition t : q ÝÑ q 1 P ∆i , we define ρτ ” Rpxi , x1i q Ď Zxi ˆ Zxi ; z1 “Pj puq • for a call transition t : q ÝÝÝÝÝÝÑ q 1 P ∆i , we define a call relation ρx τ ” 1 xj pxin “ uq Ď Zxi ˆ Zxj , a return relation ρτ y ” pz1 “ xout ˆ Zxi j j q Ď Z Ź 1 xi xi and a frame relation φτ ” xPxi zz x “ x Ď Z ˆ Z . Intuitively, the frame relation copies the values of all local variables, that are not involved in the call as return value receivers (z), across the call. We define the semantics of the program P “ xP1 , . . . , Pn y in a top-down manner. Assuming a fixed ordering of the non-final states in the program, i.e. nFpPq “ xq1 , . . . , qm y, the semantics of the program P, denoted JPK, is the tuple of relations xJq1 K, . . . , Jqm Ky. For each non-final control state q P nFpPi q where xi 1 ď i ď n, we denote by JqK Ď ZŤ ˆ Zxi the relation (over the local variables of procedure Pi ) defined as JqK “ αPLQ pGP q JαK. It remains to define JαK, the semantics of the tagged word (or equivalently interprocedural valid path) α. Out of convenience, we define the semantics of its corresponding nested word w_nwpαq “ pθ, ;q over alphabet Θ, and define JαK “ Jw_nwpαqK. For a nesting relation ; Ď t1, . . . , |θ|u ˆ t1, . . . , |θ|u, we define ;i,j “ tps ´ pi´1q, t ´ pi´1qq | ps, tq P ; X ti, . . . , ju ˆ ti, . . . , juu, for some i, j P t1, . . . , `u, i ă j. Finally, we define Jpθ, ;qK Ď Zxi ˆ Zxi as follows: $ ’ if |θ| “ 1 &ρpθq1 ρpθq1 ˝ Jppθq2...|θ| , ;2,|θ| qK if |θ| ą 1, 1 ; j for no j ’ % CaRet jθ ˝ Jppθqj`1...|θ| , ;j`1,|θ| qK if |θ| ą 1, 1 ; j for a j where, in the last case, which corresponds to call transition t P ∆i˘, we have ` pθq1 “ pθqj “ τ and define CaRet jθ “ ρx τ ˝ Jpθq2...j´1 , ;2,j´1 qK ˝ ρτ y X φτ . Example 3.3. (contd. from Ex. 3.2) The semantics of a given the nested word θ “ pτ1 τ2 τ1 τ2 τ4 τ2 τ3 τ2 τ3 , t2 ; 8, 4 ; 6uq is a relation between valuations of tx, zu, given by: ` ` ˘ JθK “ ρτ1 ˝ pρx τ2 ˝ ρτ1 ˝˘ pρx τ2 ˝ ρτ4 ˝ ρτ2 y q X φτ2 ˝ ρ τ3 ˝ ρ τ y q X φ τ 2 ˝ ρ τ3 2 One can verify that JθK ” x “ 2 ^ z 1 “ 4, i.e. the result of calling P with input valuation x “ 2 is an output valuation z “ 4.  10 Finally, we introduce a few useful notations. An interprocedural valid path α is said to be feasible whenever JαK ‰ H. We denote by JPKq the component of JPK corresponding to q P nFpPq. Notice that JPKq P Zxi ˆ Zxi , i.e. is a relation over the valuations of the local variables of the procedure Pi if q is a state of Pi , i.e. q P Si . Slightly abusing notations, we define LPi pGP q as LQinit pGP q and i x x i i JPKPi as JPKqiinit . Clearly we have that JPKPi Ď Z ˆ Z . 3.3 A Semantics of Depth-First Derivations We present an alternative, but equivalent, program semantics, using derivations of visibly pushdown program grammars, instead of the generated (nested) words. This semantics brings us closer to the notion of under-approximation defined in the next section. We start by defining depth-first derivations, that have the following informal property: if X and Y are two nonterminals produced by the application of one rule, then the steps corresponding to a full derivation of the form X ñ ù ˚ u will be applied without interleaving with the steps corresponding to a derivation of the form Y ñ ù ˚ v. In other words, once the derivation of X has started, it will be finished before the derivation of Y begins. For an integer tuple α “ xα1 , . . . , αn y, we denote by }α}max “ maxni“1 αi . For a set of symbols S Ď Ξ Y Σ, and a set of positive integers I Ď N, we define S I “ txxiy | x P S, i P Iu. Given a word w P pΞ Y Σq˚ of length n ě 0, and a n-dimensional vector α “ xα1 , . . . , αn y P Nn , we define wα as the birthdatexα y xα y annotated word (bd-word) pwq1 1 . . . pwqn n over the alphabet pΞ Y ΣqN . We denote wxxcyy “ wc , where c P N and c “ xc, . . . , cy P N|w| . For instance, abcx1,2,3y “ ax1y bx2y cx3y and abcxx2yy “ ax2y bx2y cx2y . pZ,wq{j Let G “ xΞ, Σ, ∆y be a grammar and u ùùùùñ v be a step, for some production pZ, wq P ∆ and 1 ď j ď |u|. If α P N|u| is a vector of birthdates, the corresponding birthdate-annotated step (bd-step) is defined as folpZ,wq{j lows: uα ùùùùñ v β if and only if puα qj “ Z xiy and v β “ puα q1 ¨ ¨ ¨ puα qj´1 ¨ wxx}α}max `1yy ¨ puα qj`1 ¨ ¨ ¨ puα q|u| . Example 3.4. Consider the grammar G “ xtX, Y, Zu, ta, bu, ∆y with rules pX,Y Zq pY,aY q ∆ “ tX Ñ Y Z, Y Ñ aY | ε, Z Ñ Zb | εu. Then X x0y ùùùùñ Y x1y Z x1y ùùùùñ pZ,Zbq pY,εq pZ,εq ax2y Y x2y Z x1y ùùùùñ ax2y Y x2y Z x3y bx3y ùùùñ ax2y Z x3y bx3y ùùùñ ax2y bx3y and pX,Y Zq pY,aY q pY,εq pZ,Zbq pZ,εq X x0y ùùùùñ Y x1y Z x1y ùùùùñ ax2y Y x2y Z x1y ùùùñ ax2y Z x1y ùùùùñ ax2y Z x3y bx3y ùùùñ x2y x3y a b are birthdate-annotated step sequences.  A birthdate annotated step is further said to be depth-first whenever, in the above definition of a bd-step, we have, moreover, that i is the most recent birthdate among the nonterminals of u , i.e. i “ max tj | P kΞtju puα q ‰ 0u. We write this fact as follows uα ù ñ v β . A birthdate annotated step sequence is said to df pγq1 {j1 be depth-first if all of its steps are depth-first. Finally, a step sequence w0 ùùùùñ pγqn {jn w1 . . . wn´1 ùùùùñ wn for some control word γ is said to be depth-first, written γ w0 ùñ wn , if there exist vectors α1 P N||P kΞ pw1 q|| , . . . , αn P N||P kΞ pwn q|| such that df xx0yy pγq1 {j1 w0 ùùùùñ df α pγqn {jn n´1 w1α1 . . . wn´1 ùùùùñ wnαn holds. df 11 Example 3.5. (contd. from Ex. 3.4) Consider the grammar G from Example pX,Y Zq pY,aY q pZ,Zbq pY,q pZ,q 3.4. Then X ùùùùñ Y Z ùùùùñ aY Z ùùùùñ aY Zb ùùùñ aZb ùùùñ ab is not pX,Y Zq pY,aY q pY,q pZ,Zbq a depth-first derivation, whereas X ùùùùñ Y Z ùùùùñ aY Z ùùùñ aZ ùùùùñ pZ,q aZb ùùùñ ab is a depth-first derivation.  p ∆y Since we are dealing with visibly pushdown grammars GP “ xΞ, Θ, init 1 corresponding to programs P, for every production Q Ñ Ý x τ Qj τ y Q P ∆ we have Qinit ‰ Q1 . Hence, we can assume wlog that for all productions p P ∆, j all nonterminals occurring in tail ppq are distinct (e.g. X Ñ Z Z is not allowed). As we show next, under that assumption, a control word uniquely identifies a depth-first derivation: p ∆y be a visibly pushdown grammar corresponding Lemma 3.1. Let GP “ xΞ, Θ, γ γ to a program P, Q P Ξ be a nonterminal, Q ù ñ u and Q ù ñ v be two depth-first df df derivations of GP . Then they differ in no step, hence u “ v. Proof. By contradiction, suppose that there exists a step that differs in the two derivations from Q with control word γ P ∆˚ . Thus, there exists an integer pγq1 pγqi i, 1 ď i ă |γ|, such that Q “ w0 ùñ w1 ¨ ¨ ¨ wi´1 ùñ wi and wi contains two occurrences of the nonterminal head ppγqi`1 q, that is, there exists p1 ‰ p2 pwi qp1 “ pwi qp2 “ head ppγqi`1 q. Two cases arise: 1. pwi qp1 and pwi qp2 result from the occurrence of some pγqj with j ď i which contradicts that all nonterminals occurring in tail ppγqj q are distinct. 2. pwi qp1 and pwi qp2 result from the occurrence of pγqk and pγql with k ‰ l respectively. Hence in the bd-step sequence thereof, their birthdate necessarily differ. Therefore there is only one occurence of head ppγqi`1 q with the most recent birthdate which contradicts the existence of two distinct depth-first derivations. Consequently, in a visibly pushdown grammar corresponding to a program, a control word uniquely determines a step sequence, and, moreover, if this step sequence is a derivation, the control word determines the word produced by it. This remark leads to the definition of an alternative semantics of programs, based on control words, instead of produced words. To this end, for each non-final control location q P nFpPi q, of a program P “ xP1 , . . . , Pn y, where 1 ď i ď n, we define the semantics of a control word γ that induces a depth-first γ p ∆y, as a set JγK Ď Zx ˆ Zx , derivation Q ù ñ w of the grammar GP “ xΞ, Θ, df where x “ x1 ¨ . . . ¨ xn is the set of variables in P. The definition of JγK is by induction on the structure of γ: ( (a) if γ “ Q Ñ Ý τ then JγK “ I ¨ O | xIÓxi , OÓxi y P ρτ , where Q P Ξ corresponds to q P nFpPi q; (b) if γ “ pQ Ñ Ý τ Q1 q ¨ γ 1 then ( JγK “ I ¨ O | DJ . xIÓxi , JÓxi y P ρτ and J ¨ O P Jγ 1 K where Q, Q1 P Ξ correspond to q, q 1 P nFpPi q; 12 (c) if γ “ pQ Ñ Ý x τ Qinit τ y Q1 q ¨ γ 1 then JγK is given by j tI ¨ O | DJ, K, L P Zx . xIÓxi , JÓxj y P ρx τ , J ¨ K P Jγ1 K, xKÓxj , LÓxi y P ρτ y , xIÓxi , LÓxi y P φτ , L ¨ O P Jγ2 Ku , where Qinit , Q1 P Ξ correspond to qjinit (the initial control location of Pj ), j γ1 γ2 df df q 1 P nFpPi q, and Qinit ù ñ w1 , Q1 ù ñ w2 , γ 1 “ γ1 γ2 , respectively; since γ is j the control word of a depth-first derivation, the derivations of Qinit and Q1 j are unique, and will not interleave with each other. The following lemma proves the equivalence of the semantics of a (tagged) word generated by a visibly pushdown grammar and that of a control word that produces it. p ∆y be a visibly pushdown grammar for a program Lemma 3.2. Let GP “ xΞ, Θ, P “ xP1 , . . . , Pn y, x “ x1 ¨ . . . ¨ xn be the concatenation of all tuples of local variables in P, Q P Ξ be a nonterminal corresponding to a non-final control γ p˚ location q P nFpPi q, and Q ù ñ α be a depth-first derivation of GP , where α P Θ df and γ P ∆˚ . Then, we have: JγK “ I ¨ O P Zxˆx | xIÓxi , OÓxi y P JαK ( . Ý τ , we have α “ τ , Proof. By induction on |γ| ą 0. If |γ| “ 1, i.e. γ “ Q Ñ hence JαK “ Jw_nwpαqK “ ρτ and the equality follows trivially. If |γ| ą 1, let γ “ p ¨ γ 1 , for some p P ∆ and some γ 1 P ∆˚ . We distinguish two cases, based on the type of p: γ1 • p “ Q Ñ Ý τ Q1 : in this case α “ τ ¨ β and Q1 ù ñ β is a depth-first df 1 derivation of GP . By the induction ( hypothesis, since |γ | ă |γ|, we have 1 Jγ K “ J ¨ O | xJÓxi , OÓxi y P JβK . JγK “ tI ¨ O | DJ . xIÓxi , JÓxi y P ρτ and xJÓxi , OÓxi y P JβKu “ tI ¨ O | xIÓxi , OÓxi y P Jw_nwpαqKu “ tI ¨ O | xIÓxi , OÓxi y P JαKu • p“QÑ Ý x τ Qinit τ y Q1 : in this case α “ x τ β1 τ y β2 and GP has depthj γ1 γ2 df df first derivations Qinit ù ñ β1 and Q1 ù ñ β2 . We have two symmetrical j cases: either γ 1 “ γ1 γ2 or γ 1 “ γ2 γ1 . We consider the first case in the following: JγK “ tI ¨ O | DJ, K, L P Zx . xIÓxi , JÓxj y P ρx τ , J ¨ K P Jγ1 K, xKÓxj , LÓxi y P ρτ y , xIÓxi , LÓxi y P φτ , L ¨ O P Jγ2 Ku We apply the induction hypothesis to γ1 and γ2 , since |γ1 | ă |γ| and |γ2 | ă |γ|, and obtain: JγK DJ, K, L P Zx . xIÓxi , JÓxj y P ρx τ , xJÓxj , KÓxj y P Jβ1 K, xKÓxj , LÓxi y P ρτ y , xIÓxi , LÓxi y P φτ , xLÓxi , OÓxi y P Jβ2 Ku “ tI ¨ O | xIÓxi , OÓxi y P Jw_nwpαqKu “ tI ¨ O | xIÓxi , OÓxi y P JαKu “ tI ¨ O | 13 Consequently, the semantics of a program P “ xP1 , . . . , Pn y can be equivalently defined considering the sets Ť γ JγKu , JPKq “ txIÓxi , OÓxi y | I ¨ O P Qù ñ w df for each non-final state q P nFpPi q of the procedure Pi of P. 4 Underapproximating the Program Semantics In what follows we define context-free language underapproximations by filtering out derivations. In particular, in this section, we define a family of underapproximations of JPK, called bounded-index underapproximations. Then we show that each k-index underapproximation of the semantics of a (possibly recursive) program P coincides with the semantics of a non-recursive program computable from P and k. 4.1 Index-bounded derivations The central notion of this section are index-bounded derivations, i.e. derivations in which each step has a limited budget of nonterminals. This notion is the key to our underapproximation method. For a given integer constant k ą 0, a word u P pΣ Y Ξq˚ is said to be of index k, if u contains at most k occurrences of nonterminals (formally, |uÓΞ | ď k ). A step u ñ v is said to be k-indexed, denoted u ùñ v, if and only if both u and pkq v are of index k. As expected, a step sequence is k-indexed if all its steps are k-indexed. For instance, both derivations from Ex. 3.5 are of index 2. Lemma 4.1. For every grammar G “ xΞ, Σ, ∆y the following properties hold: (1) ùñ˚ Ď ùùùñ˚ for all k ě 1 pkq (2) ñ ù “ pk`1q Ť8 k“1 ùñ˚ pkq (3) for all X, Y P Ξ, XY ùñ˚ w P Σ˚ if and only if there exist w1 , w2 P Σ˚ , pkq such that w “ w1 w2 and either: (i) X ùùùñ˚ w1 and Y ùñ˚ w2 , or pk´1q pkq (ii) Y ùùùñ˚ w2 and X ùñ˚ w1 . pk´1q pkq Proof. The proof of points (1) and (2) follow immediately from the definition of ùñ˚ . Let us now turn to the proof of point (3) (only if). First we define w1 and pkq w2 . Consider the step sequence XY ùñ˚ w and look at the last step. It must pkq be of the form uZv ùñ˚ uyv “ w, where u, v, y P Σ˚ , and one of the following pkq must hold: Z has been generated from either X or Y . Suppose that Z stems from Y (the other case is treated similarly). In this case, transitively remove from the step-sequence all the steps transforming the rightmost occurrence of 14 Y . Hence we obtain a step sequence XY ùñ˚ w1 Y . Then w2 is the unique pkq word satisfying w “ w1 w2 . Since XY ùñ˚ w1 Y , by removing the occurrence of pkq Y in rightmost position at every step, we find that X ùùùñ˚ w1 , and we are pk´1q done. Having Z stemming from X yields Y ùùùñ˚ w2 . For the proof of the pk´1q other direction (if) assuming (i) (the other case is similar), it is easily seen that XY ùñ˚ w1 Y ùñ˚ w1 w2 . pkq pkq The previous definitions extend naturally ` ˘˚ to bd-steps and bd-step sequences, and we define Υpkq “ twβ P pΞ Y ΣqN | |wβ ÓΞN | ď ku the set of bd-words with at most k occurrences of nonterminals. We write the fact that a bd-step sequence uα ñ˚ v β is both k-indexed and depth-first as uα ùùùñ˚ v β . For any df pkq symbol X P Ξ and constant k ą 0, we define the languages: pkq LX pGq “ tw P Σ˚ | X ùñ˚ wu pkq Γ df pkq γ pGq “ tγ P ∆ | Du , v β P Υpkq : uα ùùùñ v β u . ˚ α df pkq Example 4.1. (contd. from Ex. 3.2) Inspecting the grammar GP from Ex.3.2 reveals that n n LQinit pGP q “ tpτ1 x τ2 q τ4 pτ2 y τ3 q | n P Nu . 1 For each value of n we give a 2-index derivation capturing the word: repeat n times the steps pb1 pc2 pa 3 Qinit ùùñ τ1 x τ2 Qinit ñ τ1 x τ2 Qinit 1 1 τ2 y Q3 ù 1 τ2 y τ3 followed by the step pa 4 Qinit ùñ τ4 . 1 p2q Therefore the 2-index approximation of GP shows that LQinit pGP q “ LQinit pGP q. 1 1  Example 4.2. (contd. from Ex. 3.5) For the grammar G from Ex. 3.5, we obtain the following control sets: Γdf p1q Γdf p2q “ pY, aY q˚ pY, εq Y pZ, Zbq˚ pZ, εq “ pX, Y ZqpY, aY q˚ pY, εqpZ, Zbq˚ pZ, εqY pX, Y ZqpZ, Zbq˚ pZ, εqpY, aY q˚ pY, εq Y Γdf p1q .  We recall a known result. Proposition 1 ([20]). For all k ě 1, G “ pΞ, Σ, ∆q and X P Ξ, we have pkq LX pGq “ L̂X pΓdf pkq , Gq. Finally, given k ě 1, we define the k-index semantics of P as JPKpkq “ xJq1 Kpkq , . . . , Jqm Kpkq y, where nFpPq “ tq1 , . . . , qm u and the k-index semantics of a non-final control state q P nFpPi q of a procedure Pi of the program P is the pkq relation JqK “ JPKq Ď Zxi ˆ Zxi , defined as: Ť γ JPKpkq JγKu . q “ txIÓxi , OÓxi y | I ¨ O P Qù ùùñw df pkq 15 pY, aY q pZ, Zbq pY, εq tY utZu tZu pY, aY q pZ, εq pY, εq pX, Y Zq tXu tY, Zu 0 pZ, εq pZ, Zbq tZutY u pY, εq tY u pZ, εq pZ, Zbq pY, aY q Figure 2: The graph Adf pkq pGq for k ě 2 and for the grammar G of Ex. 3.5 4.2 Depth-first index-bounded control sets For a bd-word wα , let rwα s “ P kΞt}α}max u pwα q ¨ P kΞt}α}max ´1u pwα q ¨ ¨ ¨ P kΞt0u pwα q . Each symbol in rwα s is a ||Ξ||-dimensional vector, that is rwα s P pN||Ξ|| q˚ . Therefore with a slight abuse, we can view each of these tuples as a multiset on Ξ. Moreover, each tuple P kΞtiu pwα q in rwα s is the multiset of nonterminals that occur in wα with the same birthdate 0 ď i ď }α}max , and the elements of rwα s are ordered in the reversed order of their birthdates. For instance, the first tuple P kΞt}α}max u pwα q is the multiset of the most recently added nonterminals. Notice that for each bd-word u we have rus “ 0 if u P pΣN q˚ . Finally, let 0 be the identity element for concatenation, i.e. rwα s ¨ 0 “ 0 ¨ rwα s “ rwα s. x0y x1y x1y Example 4.3. (contd. from Ex. 3.5) For the bd-step“sequence ù ù ‰ X ñ “ Y Z ‰ ñ ax2y Y x2y Z x1y ñ ù ax2y Y x2y Z x3y bx3y (Ex. 3.5) we have X x0y “ tXu, Y x1y Z x1y “ “ ‰ “ ‰ tY, Zu, ax2y Y x2y Z x1y “ tY u ¨ tZu and ax2y Y x2y Z x3y bx3y “ tZu ¨ tY u .  The r.s operator is lifted from bd-words to sets of bd-words, i.e. subsets of ˘˚ “ ‰ pΣYΞqN . The set Υpkq is of particular interest in the following developments. “ ‰ “ ‰ Next we define the graph Adf pkq pGq “ x Υpkq , p∆˚ , ¨q, Ñy, where Υpkq is the set of vertices, ∆ is the set of edge labels and Ñ is the edge relation, defined as: ` pZ,wq vr ÝÝÝÑ w r if and only if: • vr “ pr v q1 ¨ vrt , where pr v q1 P N||Ξ|| , and P kΞ pZq ď pr v q1 , i.e. Z occurs with maximal birthdate vr, that is, it occurs in pr v q1 , and • w r “ P kΞ pwq ¨ ppr v q1 ´ P kΞ pZqq ¨ vrt , i.e. Z is removed from its multiset pr v q1 , r and the nonterminals of w are added, with maximal birthdate to obtain w. γ r in Adf pkq pGqu. For example, Next, define LpAdf pkq pGqq “ tγ P ∆˚ | vr Ý Ñ w df pkq Fig. 2 shows the A graph for the grammar G from Ex. 3.5. The next lemma proves that the paths of Adf pkq pGq represent the control words of the depth-first derivations of G of index k. In the following, we omit the argument G from Γdf pkq pGq, or Adf pkq pGq, when it is clear from the context. 16 Lemma 4.2. Given a grammar G “ xΞ, Σ, ∆y, and k ą 0, for each X P Ξ and γ γ P ∆˚ , there exists a derivation X ùùùñ w, for some w P Σ˚ , if and only if df pkq γ rXs Ý Ñ 0 in Adf pkq pGq. γ Proof. “ñ” We shall prove the following more general statement. Let uα ùùùñ df pkq wβ be a k-indexed depth-first bd-step sequence. By induction on |γ| ě 0, we ‰ γ “ show the existence of a path ruα s Ý Ñ wβ in Adf pkq . “ ‰ For the base case |γ| “ 0, we have uα “ wβ which yields ruα s “ wβ and “ ‰ since uα P Υpkq by definition of Γdf pkq we have that ruα s P Υpkq and we are done. pZ,xq For the induction step |γ| ą 0, let v η ùùùñ wβ be the last step of the sequence, df pkq for some pZ, xq P ∆, i.e. γ “ σ ¨ pZ, xq with σ P ∆˚ . By the induction hypothesis, σ Adf pkq has a path ruα s Ý Ñ rv η s. Let rv η s “ v1 ¨ vrt , where v1 “ prv η sq1 P N|Ξ| , and |Ξ| ˚ q is a sequence of multisets “vrt Pβ ‰pN pkq “ ‰ of nonterminals. It remains to show that w P Υ , P kΞ pZq ď v1 and wβ “ P kΞ pxq ¨ pv1 ´ P kΞ pZqq ¨ vrt to conclude ‰ ‰ pZ,xq “ γ “ that Adf pkq has an edge rv η s ÝÝÝÑ wβ , hence a path ruα s Ý Ñ wβ . pZ,xq{j Since v η ùùùùñ wβ for some 1 ď j ď |v η | we have that pv η qj “ Z xiy df pkq where i “ max tj | P kΞtju pv η q ‰ 0u and wβ “ pv η q1 . . . pv η qj´1 ¨ xxx}η}max `1yy ¨ pv η qj`1 . . . pv η q|vη | . It is easily seen that }β}max “ }η}max ` 1. Moreover, since i is the maximal birthdate among the non-terminals of v η , we have rv η s “ P kΞtiu pv η q . . . P kΞt0u pv η q, hence v1 “ P kΞtiu pv η q and vrt “ P kΞti´1u pv η q . . . P kΞt0u pv η q. Also we have P kΞtju pwβ q “ 0 for all j, i ă j ď }η}max , P kΞtiu pwβ q “ P kΞtiu pv η q´ P kΞtiu pZ xiy q and P kΞt`u pwβ q “ P kΞt`u pv η q for all `, 0 ď ` ă i. Using the foregoing properties of wβ the following equalities are easy to check: “ β‰ w “ P kΞt}η}max `1u pwβ q ¨ P kΞt}η}max u pwβ q . . . P kΞt0u pwβ q “ P kΞt}η}max `1 u pwβ q ¨ P kΞtiu pwβ q ¨ P kΞti´1u pwβ q . . . P kΞt0u pwβ q “ P kΞ pxq ¨ P kΞtiu pwβ q ¨ P kΞti´1u pwβ q . . . P kΞt0u pwβ q “ P kΞ pxq ¨ pP kΞtiu pv η q ´ P kΞtiu pZ xiy qq . . . P kΞt0u pwβ q “ P kΞ pxq ¨ pv1 ´ P kΞ pZqq ¨ P kΞti´1u pwβ q . . . P kΞt0u pwβ q “ P kΞ pxq ¨ pv1 ´ P kΞ pZqq ¨ P kΞti´1u pv η q . . . P kΞt0u pv η q “ P kΞ pxq ¨ pv1 ´ P kΞ pZqq ¨ vrt “ ‰ This concludes that wβ “ P kΞ pzq ¨ pv1 ´ P kΞ pZqq ¨ vrt , and since wβ P Υpkq , we ‰ ‰ pZ,xq “ γ “ obtain that rv η s ÝÝÝÑ wβ is an edge in Adf pkq , and finally that ruα s Ý Ñ wβ is a path in Adf pkq . γ rÝ Ñw r be a path of Adf pkq pGq. “ð” We prove a more general statement. Let u We show by induction on |γ| that there exist bd-words uα , wβ P Υpkq , such that “ ‰ γ ruα s “ u r, wβ “ w, r and uα ùùùñ wα . df pkq “ ‰ r“w r P Υpkq then The base case |γ| “ 0 is trivial, because u r and since u there exists uα P Υpkq such that ruα s “ u r, and we are done. For the induction step |γ| ą 0, let γ “ σ¨pZ, xq, for some production pZ, xq P ∆ and σ P ∆˚ . By the induction hypothesis, there exist bd-words uα , v η P Υpkq 17 σ σ pZ,xq r “ ruα s Ý r is a path in Adf pkq , and uα ùùùñ v η is a such that u Ñ rv η s ÝÝÝÑ w df pkq k-index bd-step sequence. By the definition of the edge relation in Adf pkq , it follows that rv η s “ P kΞtiu pv η q ¨ vrt where i “ max tj | P kΞtiu pv η q ‰ 0u. Moreover, there exists j, 1 ď j ď |v η | such that pv η qj “ Z xiy since P kΞ pZq ď P kΞtiu pv η q. Now define wβ “ pv η q1 . . . pv η qj´1 ¨ xxx}η}max `1yy ¨ pv η qj`1 . . . pv η q|vη | . It is routine “ ‰ pZ,xq{j r “ wβ which concludes the to check v η ùùùùñ wβ holds. Next we show, w df proof. w r vt “P kΞ pxq¨pP kΞtiu pv η q´P kΞ pZqq¨r “P kΞt}η}max `1u pxxx}η}max `1yy q¨pP kΞtiu pv η q´P kΞtiu pZ xiy qq¨r vt vt “P kΞt}η}max `1u pwβ q¨pP kΞtiu pv η q´P kΞtiu pZ xiy qq¨r “P kΞt}η}max `1u pwβ q¨pP kΞtiu pv η q´P kΞtiu pZ xiy qq¨ P kΞti´1u pv η q . . . P kΞt0u pv η q Since i “ max tj | P kΞtiu pv η q ‰ 0u; P kΞt`u pwβ q “ P kΞt`u pv η q for 0 ď ` ă i and P kΞtiu pwβ q “ P kΞtiu pv η q´P kΞtiu pZ xiy q show that “P kΞt}η}max `1u pwβ q¨P kΞtiu pwβ qP kΞti´1u pwβ q . . . P kΞt0u pwβ q “P kΞt}η}max `1u pwβ q¨P kΞtiu pwβ qP kΞti´1u pwβ q . . . P kΞt0u pwβ q “ ‰ “ wβ Consequently, we have the following (also proved in [22]): Corollary 1. For all k ě 1, G “ pΞ, Σ, ∆q and X P Ξ, we have Γdf pkq is regular. 4.3 Bounded-index Underapproximations of Control Structures We start describing our program transformation, from a recursive program to a non-recursive program in which all computation traces correspond to words generated by an index-bounded grammar. In the beginning we choose to ignore the data manipulations, and give the non-recursive program only in terms of transitions between control locations and (non-recursive) calls. Then we show that the execution traces of this new program match the depth-first indexbounded derivations of the visibly pushdown grammar of the original program. Let P “ xP1 , . . . , Pn y be a recursive program. For the moment, let us assume that P has no (local) variables, and thus, all the labels of the internal transitions, as well as all the call, return and frame relations are trivially true. As we did previously, we assume a fixed ordering q1 , . . . , qm on the set nFpPq of non-final p ∆y be the visibly pushdown grammar associated states of P. Let GP “ xΞ, Θ, with P, where each non-final state q of P is associated a nonterminal Q P Ξ. Then, for a given constant K ą 0, we define a non-recursive program HK that captures only the traces of P corresponding to K-index depth-first derivations of GP (Algorithm 1). Formally, we define HK “ xquery 0 , query 1 , . . . , query K y, i.e. the program is structured in K ` 1 procedures, such that: 18 • query 0 consists of a single statement assume false, i.e. no execution going through a call of query 0 is possible, • all executions of query k , for each 1 ď k ď K correspond to k-index depth-first derivations of GP . We distinguish between grammar productions of type (a) Q Ñ Ý τ , (b) Q Ñ Ý τ Q1 and (c) Q Ñ Ý x τ, Qinit τ y Q1 (see Ex. 3.2) of the visibly pushdown grammar j p are finite sets, we associate each nonterminal Q P Ξ p ∆y. Since Ξ and Θ G “ xΞ, Θ, p an integer 1 ď Iτ ď ||Θ||, p an integer 1 ď IQ ď ||Ξ||, each alphabet symbol τ P Θ and define the productions by the following formulae: ł πa px, yq ” x “ IQ ^ y “ Iτ pQÑ Ý τ qP∆ ł πb px, y, zq ” x “ IQ ^ y “ Iτ ^ z “ IQ 1 pQÑ Ý τ Q1 qP∆ ł ` πc px, y, z, t, sq ” x “ IQ ^ y “ Ix τ ^ 1 qP∆ pQÑ Ý x τ Qinit τ y Q j ˘ z “ IQinit ^ t “ Iτ y ^ s “ IQ1 j It is easy to see that the sizes of the πa , πb and πc formulae are linear in the size of P (there is one disjunctive clause per production of GP , and each such production corresponds to a transition of P). The translation of P into H can hence be implemented as a linear time source-to-source program transformation. Algorithm 1: proc query k pXq for 1 ď k ď K begin var PC, y, z ; asgnk PC Ð X ; 0: k start : goto prodka or prodkb or prodkc ; k proda : assume Dτ. πa pPC, τ q ; asgnk assume true ; a: return; prodk havoc (y) ; b: assume Dτ. πb pPC, τ, yq ; asgnk PC Ð y ; b: goto startk ; k prodc : havoc (y,z) ; assume Dτ, τ 1 . πc pPC, τ, y, τ 1 , zq ; ndetk : goto swapk or asgnkc ; k swap : swap (y, z) ; asgnk PC Ð z ; c: query k´1 pyq ; goto startk ; end /* Q Ñ τ */ /* Q Ñ τ Q1 */ 1 1 /* QÑτ Qinit j τ Q */ Next, we show a mapping from the paths of Adf pkq onto the feasible interprocedural valid paths of query k . To relate these paths, we need to introduce the 19 “ ‰ p Given s P Υpkq Y tsink u and p P ∆ define δps, pq “ s1 if s Ý Ñ s1 holds in Adf pkq p for some s1 , otherwise (s Ý Ñ s1 holds for no s1 ) then δps, pq “ sink . The output mapping λ is defined as follows: k´|r v| v| 1. λptXu ¨ vr, pX, τ qq “ startk´|rv| prodk´|r asgna startk´|rv|`1 , if vr ‰ ε; a k k k 2. λptXu, pX, τ qq “ start proda asgna k´|r v| k´|r v| 3. λptXu ¨ vr, pX, τ X 1 qq “ startk´|rv| prodb asgnb startk´|rv| k´|r v| k´|r v| 1 4. λptXu ¨ vr, pX, X2 qq “ start prodc ndetk´|rv| ( τ X1 τinit init 1 2 5. λp Q , Q ¨ vr, pQ , τ Q qq “ k´|r v| k´|r v |´1 k´|r v |´1 asgnc asgn startk´|rv|´1 prodb ( 0 init 1 1 6. λp Q , Q ¨ vr, pQ , τ qq “ k´|r v| k´|r v |´1 k´|r v| k´|r v |´1 k´|r v |´1 asgnb startk´|rv|´1 k´|r v |´1 startk´|rv| k´|r v |´1 startk´|rv|´1 v |´1 swapk´|rv| asgn asgn0 startk´|rv|´1 prodk´|r asgna a ( c init 1 1 2 7. λp Q , Q ¨ vr, pQ , τ Q qq “ k´|r v |´1 swapk´|rv| asgnc asgn0 startk´|rv|´1 prodb asgnb 8. λps, pq “ K, for all s and p, such that δps, pq “ sink holds. Figure 3: Definition of the mappings δ and λ for SC kQ . notion of gsm mappings. Definition 1 ([14]). A generalized sequential machine, abbreviated gsm, is a 6-tuple S “ xK, Σ, ∆, δ, λ, q1 y where (1) K is a finite non-empty set of states; (2) Σ and ∆ respectively are input and output alphabet; (3) δ and λ are mappings from K ˆ Σ into K and ∆˚ , respectively; (4) q1 P K is the start state. The functions δ and λ are extended by induction to K ˆ Σ˚ by defining for every state q, x P Σ˚ , and y P Σ: • δpq, εq “ q and λpq, εq “ ε. • δpq, xyq “ δpδpq, xq, yq and λpq, xyq “ λpq, xqλpδpq, xq, yq. The operation defined by Spxq “ λpq1 , xq for each x P Σ˚ is called a gsm mapping. “ ‰ We define the gsm SC kQ “ x Υpkq Y tsink u, ∆, L, δ, λ, rQsy upon Adf pkq , where L denotes the statement labels found in query 0 , . . . , query k ; and the mappings δ and λ are given by the rules of Fig. 3. p ∆y, and k ą 0, for Lemma 4.3. For a visibly pushdown grammar G “ xΞ, Θ, each Q P Ξ the set of feasible interprocedural valid paths of query k pQq coincides γ with the set tSC kQ pγq | rQs Ý Ñ 0 in Adf pkq u. Proof. The feasible interprocedural valid paths of query k pQq at Algorithm 1 δ δ δn´1 0 1 matches sequences of the form σ0 ÝÑ σ1 ÝÑ . . . ÝÝÝÑ σn , where each σi P Ξ˚ is a stack, i.e. a possibly empty sequence of frames each containing a snapshot of the value of the local variable PC, δi P ∆ are productions of G. The sequence of stacks σ0 , σ1 , . . . , σn are snapshots of values of the local variable PC between two consecutive visit to a start label or between the last visit to a start label and the last return. Instances of such consecutive visits are given by startk , prodka , asgnka ; or startk , prodka , asgnka , return, startk`1 (when returning from a previous call); or startk , prodkc , ndetk , swapk , asgnkc , startk´1 (immediately after entering the call query k´1 ). When Algorithm 1 is started with a call to query k pQq, the first stack in the trace is Q. The set of stack sequences are generated by a labelled graph defined 20 by the following rules, where the stack on both sides of each rule are words w P Ξ˚ such that |w| ď k. pQ,τ q (a) Q ¨ σ ÝÝÝÑ σ pQ,τ Q1 q (b) Q ¨ σ ÝÝÝÝÝÑ Q1 ¨ σ pQ,xxτ Q1 τ y Q2 q pQ,xxτ Q1 τ y Q2 q (c) we have either (i) Q ¨ σ ÝÝÝÝÝÝÝÝÝÑ Q1 ¨ Q2 ¨ σ, or (ii) Q ¨ σ ÝÝÝÝÝÝÝÝÝÑ Q2 ¨ Q1 ¨ σ Following the previous definition, we find that the set of sequences of control γ labels tSC kQ pγq | Q Ý Ñ εu coincides with the feasible interprocedural valid path of query k pQq. γ Next we show that Q Ý Ñ ε is a valid stack sequence of query k pQq if and only γ if rQs Ý Ñ 0 in Adf pkq pGq. For this, consider the following relation between the “ ‰ r P Υpkq : we write σ Î w stacks σ P Ξ˚ such that |σ| ď k and words w r if and only if exactly one of the following holds: (1) |σ| “ |w| r and, for all 1 ď i ď |w| r : tpσqi u “ pwq r i , or r ` 1, pwq r 1 “ tpσq1 , pσq2 u, and for all 1 ă i ď |w| r : tpσqi`1 u “ pwq r i. (2) |σ| “ |w| The proof goes by induction and shows the following stronger statement relating the reachable stacks and the states of Adf pkq reachable from rQs: for any stack γ γ sequence Q Ý Ñ σ, there exists a path rQs Ý Ñw r in Adf pkq , such that σ Î w, r and vice versa. By putting together the previous result about the feasible interprocedural valid paths of query k pQq we find that they coincide with the set tSC kQ pγq | γ rQs Ý Ñ 0 in Adf pkq u. 4.4 Bounded-index Underapproximations of Programs Algorithm 1 implements the transformation of the control structure of a recursive program P into a non-recursive program HK “ xquery 0 , . . . , query K y, which simulates its K-index derivations (actually, the control words thereof). In this section we extend this construction to programs with integer variables and data manipulations (Algorithm 2), by defining a set of procedures query k , for all 0 ď k ď K, such that each procedure query k has five sets of local variables, all of the same cardinality as x: two sets, named xI and xO , are used as input variables, whereas the other three sets, named xJ , xK and xL are used locally by query k . Besides, each query k has local variables called PC, τ , y, z and input k variable X. There are no output variables in query k . Let Vquery denote the k K 1 K tuple of local variables of query , and let VH “ Vquery ¨ . . . ¨ Vquery be the tuple of all variables of HK . For two tuples of variables x and y of equal length, and a valuation ν P Zx , we denote by νry{xs the valuation that maps pyqi into pνpxqqi , for all 1 ď i ď |x|. The following lemma is needed in the proof of Thm. 1. p ∆y be a visibly pushdown grammar for a program Lemma 4.4. Let GP “ xΞ, Θ, P “ xP1 , . . . , Pn y, let x “ x1 ¨ . . . ¨ xn be the tuple of variables in P, and let HK “ xquery 0 , . . . , query K y be the program defined by Algorithm 2. Given a nonterminal Q P Ξ, corresponding to a non-final control state q P nFpPq, γ P ∆˚ , 21 Algorithm 2: proc query k pX, xI , xO q for 1 ď k ď K begin var xJ , xK , xL ; var PC, τ, y, z ; asgnk PC Ð X ; 0: startk : goto prodka or prodkb or prodkc ; k proda : havoc (τ ); assume πa pPC, τ q; /* Q Ñ τ */ asgnk assume ρτ pxI , xO q; a: return; prodk havoc (τ, y); b: assume πb pPC, τ, yq; /* Q Ñ τ Q1 */ havoc (xJ ); assume ρτ pxI , xJ q; xI Ð xJ ; asgnk PC Ð y; b: goto startk ; k prodc : havoc (τ, y, z); 1 assume πc pPC, x τ, y, τ y , zq; /* QÑxxτ Qinit j τ y Q */ havoc (xJ , xK , xL ); assume ρx τ pxI , xJ q ; /* call relation */ assume ρτ y pxK , xL q ; /* return relation */ assume φτ pxI , xL q ; /* frame relation */ ndetk : goto swapk or asgnkc ; swapk : swap(y, z); swap(xJ , xL ); swap(xK , xO ); asgnk : xI Ð xL ; c PC Ð z; query k´1 py, xJ , xK q; goto startk ; end 22 Example call query 4.4. Let 2 us consider pQinit 1 , p 1 0 q, p 1 2 qq an following pa 4 execution Qinit 1 c pb 1 p2 ùñ of query for the τ1 x τ2 Qinit τ2 y Q 3 1 ùñ pa 3 τ1 x τ2 Qinit τ2 y τ3 ùñ τ1 x τ2 τ4 τ2 y τ4 . 1 In the table below, the first row (labelled PC) gives the value of local variable PC when control hits the labelled statement given at the second row (labelled ip). The third row (labelled xI {xO ) represents the content of the two arrays. xI {xO “ p a b qp c d q says that, in xI , x has value a and z has value b; in xO , x has value c and z has value d. PC Qinit ´ Q2 ´ ´ 1 ip start2 prod2b ppb1 q start2 prod2c ppc2 q swap2 xI {xO p 1 0 qp 1 2 q p 1 0 qp 1 2 q p 1 0 qp 1 2 q p 1 0 qp 1 2 q p 1 0 qp 1 2 q PC Q3 ´ Qinit ´ 1 1 ip start1 proda ppa3 q start2 prod2a ppa4 q xI {xO p 1 0 qp 1 2 q p 1 0 qp 1 2 q p 0 0 qp 42 0 q p 0 0 qp 42 0 q The execution of query 2 pQinit 1 , p 1 0 q, p 1 2 qq starts on row 1, column 1 and proceeds until the call to query 1 pQ3 , p 1 0 q, p 1 2 qq at row 2, column 1 (the out of order case). The latter ends at row 2, column 2, where the execution of query 2 pQinit 1 , p 1 0 q, p 1 2 qq resumes. Since the execution is out of order, and the previous havocpxJ , xK , xL q results into xJ “ p 0 0 q, xK “ p 42 0 q and xL “ p 1 0 q (this choice complies with the call relation), the values of xI {xO are updated to p 0 0 q{p 42 0 q.  p ˚ , and 1 ď k ď K, such that Q ùùγùñ w, we have: wPΘ df pkq JγK “ !` ) ˘ IÓxI ¨xO rx ¨ x{xI ¨ xO s | I ¨ O P JSC kQ pγqK K where JγK Ď Zxˆx and JSC kQ pγqK Ď ZVH . Proof. By induction on |γ| ą 0, applying a case split on the type of the first production in γ. The following theorem summarizes the first major result in this paper, namely that any K-index underapproximation of the semantics of a recursive program P can be computed by looking at the semantics of a non-recursive program HK , obtained from P by a syntactic source-to-source transformation. Theorem 1. Let P “ xP1 , . . . , Pn y be a program, x “ x1 ¨ . . . ¨ xn be the tuple of variables in P, and let q P nFpPi q be a non-final control state of out init Pi “ xxi , xin , Fi , ∆i y. Moreover, let HK “ xquery 0 , . . . , query K y i , xi , Si , qi be the program defined by Algorithm 2. For any 1 ď k ď K, we have: r r JPKpkq q “ txpI ÓxI rx{xI sqÓxi , pI ÓxO rx{xO sqÓxi y | r P JHK Kquery k , IpXq r Ir ¨ O “ Qu . p ∆y be the visibly pushdown grammar corresponding to Proof. Let GP “ xΞ, Θ, P. By definition, we have ! ) Ť γ JPKpkq “ xIÓ , OÓ y | I ¨ O P JγK xi xi q Qù ùùñw df pkq 23 γ ”Ď” Let Q ùùùñ w be a derivation of GP , and I ¨ O P JγK be a tuple from Zxˆx . df pkq γ By Lemma 4.2, rQs Ý Ñ 0 is a path in Adf pkq pGP q, and by Lemma 4.3, SC kQ pγq is a feasible interprocedurally valid path of query k pQq. By´ Lemma¯4.4, there exists rO r such that Ir ¨ O r P JSC k pγqK, and I ¨ O “ IÓ r x ¨x rx ¨ x{xI ¨ xO s. tuples I, Q I O We obtain thus I “ Ir ÓxI rx{xI s and O “ Ir ÓxO rx{xO s. k rO r P ZVquery r P JHK Kquery k and IpXq r ”Ě” Let I, , such that Ir ¨ O “ Q. Then there exists a feasible interprocedurally valid path π of query k pQq, such that r P JπK. By Lemma 4.3, there exists a control word γ P ∆˚ , such that Ir ¨ O ´ ¯ γ r x ¨x rx ¨ x{xI ¨ xO s P JγK. By rQs Ý Ñ 0 and π “ SC kQ pγq. By Lemma 4.4, IÓ I O γ Lemma 4.2, we have that Q ùùùñ w is a derivation of GP . We can conclude df pkq that xpIr ÓxI rx{xI sqÓxi , pIr ÓxO rx{xO sqÓxi y P JPKq . As a last point, we observe that the bounded-index sequence tJPKpkq u8 k“1 satisfies several conditions that advocate its use in program analysis, as an underapproximation sequence. The subset order and set union is extended to tuples of relations, point-wise. JPKpkq Ď JPKpk`1q for all k ě 1 pA1q Ť8 pkq JPK “ JPK pA2q k“1 Condition (A1) requires that the sequence is monotonically increasing, the limit of this increasing sequence being the actual semantics of the program (A2). These conditions follow however immediately from the two first points of Lemma 4.1. To decide whether the limit JPK has been reached by some iterate JPKpkq , it is enough to check that the tuple of relations in JPKpkq is inductive with respect to the statements of P. This can be implemented as an SMT query. 5 Completeness of Index-Bounded Underapproximations for Bounded Programs In this section we define a class of recursive programs for which the precise summary semantics of each program in that class is effectively computable. We show for each program P in the class that (a) JPK “ JPKpkq for some value k ě 1, bounded by a linear function in the total number locpPq of control states in P, and moreover (b) the semantics of Hk is effectively computable (and so is that of JPKpkq by Thm. 1). Ť8 Given an integer relation R Ď Zn ˆ Zn , its transitive closure R` “ i“1 Ri , where R1 “ R and Ri`1 “ Ri ˝ R, for all i ě 1. In general, the transitive closure of a relation is not definable within decidable subsets of integer arithmetic, such as Presburger arithmetic. In this section we consider two classes of relations, called periodic, for which this is possible, namely octagonal relations, and finite monoid affine relations. Octagonal relation An octagonal relation is defined by a finite conjunction of constraints of the form ˘x ˘ y ď c, where x and y range over the set x Y x1 , and c is an integer constant. The transitive closure of any octagonal relation has been shown to be Presburger definable and effectively computable [8]. 24 Linear affine relation A linear affine relation is defined by a formula Rpx, x1 q ” Cx ě d ^ x1 “ Ax ` b, where A P Znˆn , C P Zpˆn are matrices and b P Zn , d P Zp . R is said to have the finite monoid property if and only if the set tAi | i ě 0u is finite. It is known that the finite monoid condition is decidable [7], and moreover that the transitive closure of a finite monoid affine relation is Presburger definable and effectively computable [12, 7]. We define a bounded-expression b to be a regular expression of the form b “ w1˚ . . . wd˚ , where d ě 1 and each wi is a non-empty word. A language (not necessarily context-free) L over alphabet Σ is said to be bounded if and only if L is included in (the language of) a bounded expression b. Theorem 2 ([21]). Let G “ pΞ, Σ, ∆q be a grammar, and X P Ξ be a nonterminal, such that LX pGq is bounded. Then there exists a linear function B : N Ñ N pkq such that LX pGq “ LX pGq for some 1 ď k ď Bp||Ξ||q. If the grammar in question is GP , for a program P, then clearly ||Ξ|| is bounded by the number of control locations in P, by the definition of GP . The class of programs for which our method is complete is defined below: p ∆q be its corresponding Definition 2. Let P be a program and GP “ pΞ, Θ, visibly pushdown grammar. Then P is said to be bounded periodic if and only if: 1. LX pGP q is bounded for each X P Ξ; p is periodic. 2. each relation ρτ occurring in the program, for some τ P Θ, p2q Example 5.1. (continued from Ex. 4.1) Recall that LQinit pGP q “ L init pGP q ` ˘n ` ˘n ` 1 ˘˚ ˚ ` Q1˘˚ which equals to the set t τ1 x τ2 τ4 τ2 y τ3 | n ě 0u Ď τ1 τ2 x τ4 τ2 y τ3 .  Concerning condition 1, it is decidable [14] and previous work [16] defined a class of programs following a recursion scheme which ensures boundedness of the set of interprocedurally valid paths. This section shows that the underapproximation sequence tJPKpkq u8 k“1 , defined in Section 4, when applied to any bounded periodic programs P, always yields JPK in at most BplocpPqq steps, and moreover each iterate JPKpkq is computable and Presburger definable. Furthermore the method can be applied as it is to bounded periodic programs, without prior knowledge of the bounded expression b Ě LQ pGP q. The proof goes as follows. Because P is bounded periodic, Thm. 2 shows that the semantics JPK of P coincide with its k-index semantics JPKpkq for some 1 ď k ď BplocpPqq. Hence, the result of Thm. 1 shows that for each q P nFpPq, pkq the k-index semantics JPKq “ txIÓxI , IÓxO y | I ¨ O P JHK Kquery k , IpXq “ Qu, pkq that is, the semantics JPKq is computed from that of procedure query k called with X “ Q. Then, because P is bounded, we show in Thm. 3 that every procedure query k of program H is flattable (Def. 3). Moreover, since the only transitions of H which are not from P are equalities and havoc, all transitions of H are periodic. Since each procedure query k is flattable then JPK is computable in finite time by existing tools, such as Fast [6] or Flata [9, 8]. In fact, these tools are guaranteed to terminate provided that (a) the input program is flattable; and (b) loops are labelled with periodic relations. Definition 3. Let P “ xP1 , . . . , Pn y be a non-recursive program and GP “ p ∆q be its corresponding visibly pushdown grammar. Procedure Pi is said pΞ, Θ, 25 to be flattable if and only if there exists a bounded and regular language R over p such that JPKP “ Ť Θ, i αPLP pGP qXR JαK. i Notice that a flattable program is not necessarily bounded (Def. 2), but its semantics can be computed by looking only at a bounded subset of interprocedurally valid paths. The proof that the procedures query k are flattable relies on grammar based reasoning, and, in particular, on control-sets with relative completeness properties. Let us now turn to our main result, Theorem 3 stated next, whose proof is organized as follows. First, Proposition 2 roughly states that provided LpGq is bounded, then a bounded subset of the k-index depth-first derivations suffices to capture Lpkq pGq for some k. The proof of this proposition is split into Theorem 4, Lemma 5.1 and Lemma 5.2. The rest of the proof uses Lemma 4.3 which roughly states that there is a well-behaved mapping from the k-index depth-first derivations of GP from Q to the runs of query k pQq for every value of k and Q. Theorem 3. Let P “ xP1 , . . . , Pn y be a bounded program, then, for any k ě 1, procedure query k of program H is flattable. 5.1 Bounded languages with bounded control sets The following result was proved in [13]: Theorem 4 (Thm. 1 from [13], also in [20]). For every regular language L over alphabet Σ there exists a bounded expression bΓ such that P kΣ pLXbΓ q “ P kΣ pLq. Next we prove a result characterizing a subset of derivations sufficient to capture a bounded context-free language. But first, given a grammar G “ pΞ, Σ, ∆q and X P Ξ define df pkq ΓX df pkq Observe that ΓX tomaton. γ “ tγ P ∆˚ | rXs Ý Ñ 0 in Adf pkq u . is a regular language, because Adf pkq is a finite state au- Lemma 5.1. Let G “ pΞ, Σ, ∆q be a grammar and X P Ξ be a nonterminal, such that for all p P ∆, X does not occur in tail ppq. Also LX pGq Ď pa1 w1 q˚ . . . pad wd q˚ where a1 , . . . , ad are distinct symbols of Σ none of which occurs in w1 ¨ ¨ ¨ wd . Then, for each k ě 1 there exists a bounded expression bΓ pkq df pkq over ∆ such that LX pGq “ L̂X pbΓ X ΓX , Gq. Proof. We first establish the claim that for each k ě 1, there exists a bounded expression bΓ over ∆ such that P k∆ pΓdf pkq XbΓ q “ P k∆ pΓdf pkq q. By Corollary 1, Γdf pkq is a regular language, and by Theorem 4, there exists a bounded expression bΓ over ∆ such that P k∆ pΓdf pkq X bΓ q “ P k∆ pΓdf pkq q which proves the claim. Define A “ ta1 , . . . , ad u and assume ∆ is given as a linearly ordered set of γ m productions tp1 , . . . , pm u. Then for u such that X ñ ù u, we have P kA puq “ P k∆ pγq ˆ Π where Π is the matrix of m rows and d columns where row i is given by P kA ptail ppi qq. Next, let γ1 , γ2 be two control words such that P k∆ pγ1 q “ P k∆ pγ2 q and each γi (i “ 1, 2) generates a word ui of LX pGq, that is γi X ùñ ui . We conclude from the above that P kA pu1 q “ P kA pu2 q. Moreover, the 26 assumption LX pGq Ď pa1 w1 q˚ . . . pad wd q˚ where a1 , . . . , ad are distinct symbols shows that u1 ÓA “ u2 ÓA . Furthermore, because no symbol of A occurs in w1 ¨ ¨ ¨ wd we find that u1 “ u2 . df pkq pkq pkq To show LX pGq “ L̂X pbΓ X ΓX , Gq we prove that LX pGq Ď L̂X pbΓ X df pkq ΓX , Gq the other direction being immediate because of Proposition 1 which pkq says that LX pGq “ L̂X pΓdf pkq , Gq and because only those control words γ such that head ppγq1 q “ X matters. γ df pkq So, let u P L̂X pΓX , Gq be a word, and X ùùùñ u be a depth-first derivation df pkq P k∆ pΓX df pkq df pkq P k∆ pΓX q, there of u. Since X bΓ q “ exists a control word β P Γdf pkq X bΓ such that P k∆ pβq “ P k∆ pγq. Also because no production p P ∆ is such that tail ppq contains an occurrence of X, we find that pβq1 “ pγq1 . Finally, Lemma 3.1 shows that given β P Γdf pkq , there exist a (unique) word u1 β such that X ùùùñ u1 , hence u1 “ u as shown above. df pkq For the rest of this section, let G “ pΞ, Θ, ∆q be a visibly pushdown grammar (we ignore for the time being the distinction between tagged and untagged alphabet symbols), and X0 P Ξ be an arbitrarily chosen nonterminal. Let b “ w1˚ ¨ ¨ ¨ wd˚ be a bounded expression 6 over alphabet Θ and define r “ pa1 w1 q˚ . . . pad wd q˚ such that ta1 , . . . , ad u and the bounded expression b r Θ are disjoint. Next, let `i “ |ai wi | for every 1 ď i ď d and let Gb “ r r pΞb , Θ Y ta1 , . . . , ad u, δ b q be the regular grammar where ! ) r psq Ξb “ qr | 1 ď s ď d ^ 1 ď r ď `s ! ) r psq psq δb “ qi Ñ pas ws qi qi`1 | 1 ď s ď d ^ 1 ď i ă `s Y ! ) psq ps1 q q`s Ñ pas ws q`s q1 | 1 ď s ď s1 ď d . psq pxq r holds is routine. Checking tw | q1 ñ˚ w q1 for some 1ďsďxďdu “ Lpbq r b ’ ’ Next, given G and G , define G “ pΞ , Θ Y ta1 , . . . , ad u, ∆’ q such that r 7 LX ’ pG’ q “ LX0 pGq k Lpbq. 0 ) ( ! psq r pxq psq pxq • Ξ’ “ X0’ Y rqr Xqy s | X P Ξ, qr , qy P Ξb , s ď x • ∆’ is the set containing for every 1 ď s ď x ď d a production X0’ Ñ psq pxq rq1 X0 q1 s, and: – for every production X Ñ γ P ∆, ∆’ has a production pxq b if qpsq ; r Ñ γ qy P ∆ pxq rqpsq r Xqy s Ñ γ r 6 Recall (1) that each wi is a non-empty word. ˚ two languages L1 Ď Σ˚ 1 and L2 Ď Σ2 their asynchronous product, denoted L1 k L2 , is the language L over the alphabet Σ “ Σ1 Y Σ2 such that w P L iff the projections of w to Σ1 and Σ2 belong to L1 and L2 , respectively. Observe that the L1 k L2 depends on L1 , L2 and also their underlying alphabet Σ1 and Σ2 . 7 Given 27 – for every production X Ñ γ Y P ∆, ∆’ has a production pzq pxq pxq rqpsq r Xqy s Ñ γ rqt Y qy s pzq if qpsq r Ñ γ qt P ∆b ; (2) r – for every production X Ñ τ Z σ Y P ∆, ∆’ has a production pzq p`q pxq puq pxq rqpsq r Xqy s Ñ τ rqt Zqv s σ rqk Y qy s pzq if qpsq r Ñ τ qt psq p`q b P ∆b and qpuq v Ñ σ qk P ∆ ; (3) r puq – for every production q1 Ñ as qv r P δ b , ∆’ has a production r psq puq pxq rq1 Xqpxq y s Ñ as rqv Xqy s . (4) ∆’ has no other production. psq pxq Next we define the mapping ξ which maps each nonterminal rqr Xqy s P Ξ’ onto X, X0’ onto X0 , every ai , 1 ď i ď d, onto ε and maps any other terminal (Θ) onto itself. Then ξ is naturally extended to words over Θ Y ta1 , . . . , ad u Y Ξ’ . Next we lift ξ to productions of ∆’ such that the mapping of a production is defined by the mapping of its head and tail. The lifting of ξ to sequences of productions and sets of sequences of productions is defined in the obvious way. From the above definition we observe that given a derivation D’ ” X0’ ñ psq pxq rq1 X0 q1 s ùñ˚ w in G’ , ξ maps D’ onto a derivation of G of the form X0 ñ X0 ùñ˚ wÓΘ . Lemma 5.2. Let G “ pΞ, Θ, ∆q be a visibly pushdown grammar, X0 P Ξ be a nonterminal such that LX0 pGq Ď b for a bounded expression b “ w1˚ . . . wd˚ . Let ta1 , . . . , ad u be a set of d symbols disjoint from Θ. Then for every k ě 1, the following hold: 1. Let i1 , . . . , id P N we have pkq pkq w1i1 . . . wdid P LX0 pGq iff pa1 w1 qi1 . . . pad wd qid P LX ’ pG’ q ; 0 2. Given a control set Γ over ∆’ such that pkq L̂X ’ pΓ X Γdf pkq pG’ q, G’ q “ LX ’ pG’ q 0 0 then the control set Γ1 “ ξpΓq over ∆ satisfies pkq L̂X0 pΓ1 X Γdf pkq pGq, Gq “ LX0 pGq . Proof. The proof of point 1 is by induction. As customary, we show the following stronger statement: let k ě 1 and w P pΘ Y ta1 , . . . , ad uq˚ ¨ Θ, we have puq puq psq psq rqr Xqv s ùñ˚ w iff qr ñ˚ w qv and X ùñ˚ wÓΘ . The proof of the if pkq pkq psq qr puq direction is by induction on the length of ñ˚ w qv . r psq puq b i “ 1. Then qr Ñ τ qv P ∆ . Two cases can occur: (i) τ P Θ; or (ii) τ P ta1 , . . . , ad u. 28 In case (i), we conclude from X ùñ˚ wÓΘ that w“w ÓΘ “τ and X Ñ τ P ∆, pkq psq puq rqr Xqv s hence that psq ’ puq Ñ τ P ∆ , and finally that rqr Xqv s ùñ˚ w. Case pkq (ii) is not allowed since w must end with a symbol in Θ. w hnlj psq ps1 q puq i ą 1. Then qr ñ τ qr1 ñ ˝ ñ˚ τ y qv . As seen previously, two cases can occur: (i) τ P ta1 , . . . , ad u; or (ii) τ P Θ. In case (i), because w “ τ y and τ R Θ we find that X ùñ˚ wÓΘ “ yÓΘ . Hence the induction hypothesis shows pkq that ps1 q puq rqr1 Xqv s ps1 q psq ˚ puq ùñ y. Finally the definition of G’ shows that rqr Xqv s Ñ pkq puq puq psq τ rqr1 Xqv s P ∆’ , hence that rqr Xqv s 1 ps q puq ùñ˚ τ rqr1 Xqv s ùñ˚ τ y “ w and we are done. pkq pkq For case (ii) (τ P Θ), we do a (sub)case analysis according to the first production rule used in the derivation X ùñ˚ wÓΘ . pkq psq • X Ñ τ . Then X ùñ˚ wÓΘ “ τ . On the other hand qr pkq ps1 q ñ τ qr1 ñ puq ˝ ñ˚ τ y qv and our assumption on w “ τ y shows that y ends with a symbol in Θ. Hence a contradiction since wÓΘ “ τ does not coincide with the projection of w “ τ y. psq • X Ñ τ Y . Then X ùñ τ Y ùñ˚ τ yÓΘ “ wÓΘ . Also qr pkq pkq ps1 q ñ τ qr1 ñ puq ˝ ñ˚ τ y qv . The induction hypothesis applied on Y ùñ˚ yÓΘ and pkq ps1 q puq qr1 ñ˚ y qv ps1 q puq shows that rqr1 Y qv s ùñ˚ y. Finally, X Ñ τ Y P ∆ and pkq r ps1 q psq puq b Ñ τ qr1 P ∆ show that rqr Xqv s Ñ τ psq puq ps1 q puq that rqr Xqv s ùñ˚ τ rqr1 Y qv s ùñ˚ τ y “ pkq pkq psq qr ps1 q puq rqr1 Y qv s P ∆’ , hence w and we are done. • X Ñ τ X1 σ X2 . Then X ùñ τ X1 σ X2 ùñ˚ τ w1 ÓΘ σ w2 ÓΘ “ wÓΘ . pkq puq prq pkq Moreover, since qs ñ˚ w qv and τ, σ P Θ we find that there exist prq pbq pb1 q pdq puq qs ñ τ qa ñ˚ τ w1 qa1 ñ τ w1 σ qc ñ˚ τ w1 σ w2 qv . Hence, the definition of G’ shows that pb1 q puq pbq pdq puq rqprq s Xqv s Ñ τ rqa X1 qa1 s σ rqc X2 qv s . On the other hand, since X1 X2 ùñ˚ w1 ÓΘ w2 ÓΘ (simply delete τ and pkq σ), Lemma 4.1 shows that either X1 ùùùñ˚ w1 ÓΘ and X2 ùñ˚ w2 ÓΘ ; pk´1q pkq or X1 ùñ˚ w1 ÓΘ and X2 ùùùñ˚ w2 ÓΘ . Let us assume the latter holds pkq pk´1q (the other being treated similarly). Applying the induction hypothepbq pb1 q pdq puq sis, we find that rqa X1 qa1 s ùñ˚ w1 and rqc X2 qv s ùùùñ˚ w2 , pkq prq pk´1q puq hence we conclude the case with the k-index derivation rqs Xqv s ùñ˚ pkq τ pbq pb1 q pdq puq rqa X1 qa1 s σ rqc X2 qv s ˚ ùñ τ pkq 29 pbq pb1 q rqa X1 qa1 s σ w2 ˚ ùñ τ w1 σ w2 . pkq The “only if” direction is proved similarly, this time by induction on the length psq puq of the derivation rqr Xqv s ùñ˚ w. pkq For the proof of point 2 the “Ď” direction is obvious by definition of depth-first derivations. For the reverse direction “Ě” point 1 combined with the assumption shows that for every i1 , . . . , id P N the following equivalence holds: pkq w1i1 . . . wdid P LX0 pGq iff pa1 w1 qi1 . . . pad wd qid P L̂X ’ pΓ X Γdf pkq , G’ q . 0 So let D ” X0’ ùñ˚ w be a depth-first k-index derivation of G’ with control pkq word conforming to Γ. Now consider ξpDq, it defines again a depth-first k-index derivation except that this time the control word conforms to ξpΓq. Further, the definition of ξ shows that the word generated by ξpDq results from deleting the symbols ta1 , . . . , ad u from w “ pa1 w1 qi1 ¨ ¨ ¨ pad wd qid . To conclude, observe that pkq w1i1 ¨ ¨ ¨ wdid P LX0 pGq and we are done. pkq The following proposition shows that LQ pGP q is captured by a subset of depth-first derivations whose control words belong to some bounded expression. p ∆q be a visibly pushdown grammar, X0 P Ξ be Proposition 2. Let G “ pΞ, Θ, a nonterminal such that LX0 pGq is bounded. Then for each k ě 1 there exists a pkq bounded expression bΓ over ∆ such that L̂X0 pbΓ X Γdf pkq , Gq “ LX0 pGq. Proof. Since LX0 pGq is bounded there exists a bounded expression b “ w1˚ . . . wd˚ such that LX0 pGq Ď b. Next, define ta1 , . . . , ad u be an alphabet disjoint from Θ. Lemma 5.2 pkq shows that for every i1 , . . . , id P N the equivalence w1i1 . . . wdid P LX0 pGq iff pkq pkq 0 0 pa1 w1 qi1 . . . pad wd qid P LX ’ pG’ q holds. Next, applying Lemma 5.1 on LX ’ pG’ q (whose assumptions holds by definition of G’ ) we obtain a bounded expression pkq bΓ’ over ∆’ such that L̂X ’ pbΓ’ X Γdf pkq , G’ q “ LX ’ pG’ q. Our next step 0 0 pkq is to apply the results of Lemma 5.2 (second point) to obtain that LX0 pGq “ L̂X0 pξpbΓ’ q X Γdf pkq q, Gq. Finally, since bΓ’ is a bounded expression, and ξ is an homomorphism we have that ξpbΓ’ q is bounded (see Lem. 5.3), hence included in a bounded expression and we are done by setting bΓ to ξpbΓ’ q. 5.2 Proof of Theorem 3 We recall two results from Ginsburg [14]. Theorem 5 (Theorem 3.3.2, [14]). Each gsm mapping preserves regular sets. Lemma 5.3 (Lemma 5.5.3, [14]). Spw1˚ . . . wn˚ q is bounded for each gsm S and all words w1 , . . . , wn . And finally, the proof that query k is flattable. 30 # identity 210 leq 152 parity 384 plus 462 times2 210 k“2 t 0.10 0.12 0.14 0.53 0.14 fp no no no no no # 330 240 606 728 330 k“3 t 0.22 0.27 0.54 2.54 0.35 fp yes no no no yes k“4 t 328 0.41 828 1.31 994 9.20 # fp yes yes yes Table 1: Experiments with recursive implementations of basic arithmetic functions and predicates [1]. of Theorem. 3. Since P is bounded periodic we can apply Proposition 2 showing the existence of a bounded expression bΓ over ∆ such that L̂Q pbΓ XΓdf pkq , GP q “ Ť pkq pkq LQ pGP q. Hence we find that JPKq coincides with αPLpkq pGP q JαK which in Q Ť turn is equal to αPL̂Q pbΓ XΓdf pkq ,GP q JαK. γ Lemma 3.2 shows that for all control word γ P ∆˚ such that Q ù ñ α we df ( have that JγK “ I ¨ O | xIÓxi , OÓxi y P JαK . This enables the use of Lemma 4.3 showing that such control word γ is such that JγK “ JSC kQ pγqK. This is saying the semantics of γ in P can be obtained by computing that of SC kQ pγq in query k . We then conclude from Lem. 5.3 and Thm. 5, that SCkQ pbΓ q is a bounded and regular language. Back to JHKquery k , we find that Ť Ť JHKquery k “ αPL k pGH q JαK “ αPL k pGH qXSCk pbΓ q JαK query query Q and that JHKquery k is flattable since SCkQ pbΓ q is a bounded regular set. 6 Experiments We have implemented the proposed method in the Flata verifier [17] and experimented with several benchmarks. The Flata tool is publicly available8 and the benchmarks used in this section are given in the repository. First, we have considered several programs from external sources [1], that compute arithmetic functions or predicates in a recursive way such as identity (identity), plus (addition), times2 (multiplication by two), leq (comparison), and parity (parity checking). It is worth noting that all of these programs have bounded index visibly pushdown grammars, i.e. LpGP q is of bounded index, for each program P P tidentity, plus, times2, leq, parityu, the stabilization of the under-approximation sequence is thus guaranteed. For all our benchmarks, the condition that the tuple of relation JPKpkq is inductive with respect to the statements of P is met for k ď 3. Table 1 shows the results, giving the size (#) of each under-approximation query k (the number of transitions) and the time (t) needed to compute its summary (in seconds). The column fp indicates whether the fixpoint check was successful. The platform used for all experiments is MacBookPro with Intel Core i7 2, 3 GHz with 16 GB of RAM. Next, we have considered two generalizations of the McCarthy 91 function [10], a well-known verification benchmark that has long been a challenge. We have automatically computed precise summaries of its generalizations Fa (Table 8 https://github.com/filipkonecny/flata 31 F1 F2 F3 F4 F5 F6 F7 F8 k“2 t 0.05 0.06 0.06 0.06 0.07 0.07 0.08 0.08 # 32 72 128 200 288 392 512 648 " Fa pxq “ fp no no no no no no no no # 50 114 204 320 462 630 824 1044 k“3 t 0.07 0.74 0.30 0.44 0.63 0.82 0.86 1.09 fp no no no no no no no no x ´ 10 pFa qa px ` 10 ¨ a ´ 9q # 68 156 280 440 636 868 1136 1440 k“4 t 0.09 1.55 1.59 4.02 5.97 7.54 14.23 12.87 fp yes yes yes yes yes yes yes yes if x ě 101 if x ď 100 Table 2: Generalized McCarthy Fa Experiments. The function F2 is the original McCarthy91 function. G11 G12 G13 G14 # 72 72 72 72 k“2 t 0.06 0.08 0.08 0.08 fp no no no no " Gb pxq “ # 114 114 114 114 k“3 t 0.74 1.53 5.07 7.07 x ´ 10 GpGpx ` bqq fp no no no no # 156 156 156 156 k“4 t 1.55 n/a n/a n/a fp yes ? ? ? if x ě 101 if x ď 100 Table 3: Generalized McCarthy Gb Experiments. The function G11 is the original McCarthy91 function. 32 G11 pxq G12 pxq G13 pxq G14 pxq 91 if x ď 100 x ´ 10 if x ě 101 91 if x ď 100 and 2|x ` 1 92 if x ď 100 and 2|x x ´ 10 if x ě 101 91 if x ď 100 and 3|x ` 1 92 if x ď 100 and 3|x 93 if x ď 100 and 3|x ` 2 x ´ 10 if x ě 101 91 if x ď 100 and 4|x ` 3 92 if x ď 100 and 4|x ` 2 93 if x ď 100 and 4|x ` 1 94 x ď 100 and 4|x x ´ 10 if x ě 101 Table 4: Automatically computed summaries for the generalized McCarthy Gb functions (for index k “ 3). 2) and Gb (Table 3) above for a “ 2, . . . , 8 and b “ 12, 13, 14. For the Fa functions, the computed summaries are given by: " 91 if x ď 100 Fa pxq “ for all a “ 1, . . . , 8 . x ´ 10 if x ě 101 The computed summaries for the Gb functions are given in Table 4. The visibly pushdown grammars corresponding to the recursive programs implementing the Fa , Gb functions are not bounded. In the case of the Fa function, the under-approximation sequence reaches a fixpoint after 4 iterations. In the case of Gb , for b “ 12, 13, 14, the summary of query 3 is the expected result. However, due to the limitations of the Flata tool, which is based on an acceleration procedure without abstraction, we could not compute the summary of query 4 , and we could not verify automatically that the fixpoint has been reached. 7 Conclusions We have presented an underapproximation method for computing summaries of recursive programs operating on integers. The underapproximation is driven by bounding the index of derivations that produce the execution traces of the program, and computing the summary, for each index, by analyzing a nonrecursive program. We also present a class of programs on which our method is complete. Finally, we report on an implementation and experimental evaluation of our technique. Acknowledgements. Pierre Ganty is supported by the EU FP7 2007–2013 program under agreement 610686 POLCA, by the Madrid Regional Government under CM project S2013/ICE-2731 (N-Greens) and RISCO: RIgorous analysis of Sophisticated COncurrent and distributed systems, funded by the Spanish Ministry of Economy and Competitiveness No. TIN2015-71819-P (2016–2018). Pierre thanks Thomas Reps for pointing out inconsistencies in the examples. 33 References [1] Termination Competition 2011. http://termcomp.uibk.ac.at/termcomp/ home.seam. [2] A. Albarghouthi, A. Gurfinkel, and M. Chechik. Whale: An interpolationbased algorithm for inter-procedural verification. In VMCAI ’12, volume 7148 of LNCS, pages 39–55. Springer, 2012. [3] R. Alur and P. Madhusudan. Adding nesting structure to words. JACM, 56(3):16, 2009. [4] M. F. Atig and P. Ganty. Approximating petri net reachability along context-free traces. In FSTTCS ’11, volume 13 of LIPIcs, pages 152–163. Schloss Dagstuhl, 2011. [5] A. P. B. Cook and A. Rybalchenko. Summarization for termination: no return! Formal Methods in System Design, 35:369–387, 2009. [6] S. Bardin, A. Finkel, J. Leroux, and L. Petrucci. Fast: Fast acceleration of symbolic transition systems. In CAV ’03, volume 2725 of LNCS, pages 118–121. Springer, 2003. [7] B. Boigelot. Symbolic Methods for Exploring Infinite State Spaces. PhD thesis, University of Liège, 1998. [8] M. Bozga, R. Iosif, and F. Konečný. Fast acceleration of ultimately periodic relations. In CAV ’10, volume 6174 of LNCS, pages 227–242. Springer, 2010. [9] M. Bozga, R. Iosif, and Y. Lakhnech. Flat parametric counter automata. Fundamenta Informaticae, 91(2):275–303, 2009. [10] J. Cowles. Knuth’s generalization of mccarthy’s 91 function. In ComputerAided reasoning: ACL2 case studies, pages 283–299. Kluwer Academic Publishers, 2000. [11] J. Esparza, S. Kiefer, and M. Luttenberger. Newtonian program analysis. JACM, 57(6):33:1–33:47, 2010. [12] A. Finkel and J. Leroux. How to compose presburger-accelerations: Applications to broadcast protocols. In FSTTCS ’02, volume 2556 of LNCS, pages 145–156. Springer, 2002. [13] P. Ganty, R. Majumdar, and B. Monmege. Bounded underapproximations. Formal Methods in System Design, 40(2):206–231, 2012. [14] S. Ginsburg. The Mathematical Theory of Context-Free Languages. McGrawHill, Inc., New York, NY, USA, 1966. [15] P. Godefroid, A. V. Nori, S. K. Rajamani, and S. Tetali. Compositional maymust program analysis: unleashing the power of alternation. In POPL ’10, pages 43–56. ACM, 2010. [16] G. Godoy and A. Tiwari. Invariant checking for programs with procedure calls. In SAS ’09, volume 5673 of LNCS, pages 326–342. Springer, 2009. 34 [17] H. Hojjat, F. Konečný, F. Garnier, R. Iosif, V. Kuncak, and P. Rümmer. A verification toolkit for numerical transition systems - tool paper. In FM, pages 247–251, 2012. [18] D. Kroening, M. Lewis, and G. Weissenbacher. Under-approximating loops in C programs for fast counterexample detection. In CAV ’13: Proc. 23rd Int. Conf. on Computer Aided Verification, LNCS, pages 381–396. Springer, 2013. [19] G. Lalire, M. Argoud, and B. Jeannet. Interproc. //pop-art.inrialpes.fr/people/bjeannet/bjeannet-forge/ interproc/index.html. http: [20] M. Latteux. Mots infinis et langages commutatifs. Informatique Théorique et Applications, 12(3), 1978. [21] M. Luker. A family of languages having only finite-index grammars. Information and Control, 39(1):14–18, 1978. [22] M. Luker. Control sets on grammars using depth-first derivations. Mathematical Systems Theory, 13:349–359, 1980. [23] T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In POPL ’95, pages 49–61. ACM, 1995. [24] M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications, chapter 7, pages 189–233. Prentice-Hall, Inc., 1981. 35
6cs.PL
Local Distributed Algorithms in Highly Dynamic Networks arXiv:1802.10199v1 [cs.DS] 27 Feb 2018 Philipp Bamberger · University of Freiburg · [email protected] Fabian Kuhn1 · University of Freiburg · [email protected] Yannic Maus1 · University of Freiburg · [email protected] Abstract The present paper studies local distributed graph problems in highly dynamic networks. We define a (in our view) natural generalization of static graph problems to the dynamic graph setting. For some parameter T > 0, the set of admissible outputs of nodes in a T -dynamic solution for a given graph problem at some time t is defined by the dynamic graph topology in the time interval [t − T, t]. The guarantees of a T -dynamic solution become stronger the more stable the graph remains during the interval [t − T, t] and they coincide with the definition of the static graph problem if the graph is static throughout the interval. We further present an abstract framework that allows to develop distributed algorithms for a given dynamic graph problem. For some T > 0, the algorithms always output a valid T -dynamic solution of the given graph problem. Further, if a constant neighborhood around some part of the graph is stable during an interval [t1 , t2 ], the algorithms compute a static solution for this part of the graph throughout the interval [t1 + T ′ , t2 ] for some T ′ > 0. Ideally T and T ′ are of the same asymptotic order as the time complexity for solving the given graph problem in static networks. We apply our generic framework to two classic distributed symmetry breaking problems: the problem of computing a (degree+1)-vertex coloring and the problem of computing a maximal independent set (MIS) of the network graph. For both problems, we obtain distributed algorithms that always output a valid O(log n)-dynamic solution. Further, if some part of the graph and its O(1)-neighborhood remain stable for some interval [t1 , t2 ], for the given part of the graph, the algorithms compute a valid static solution for the two problems that remains stable throughout an interval [t1 + O(log n), t2 ]. 1 Supported by ERC Grant No. 336495 (ACDC). 1 Introduction & Related Work Many modern computer systems are built on top of large-scale networks such as the Internet, the world wide web, wireless ad hoc and sensor networks, or peer-to-peer networks. Often, the network topology of such systems is inherently dynamic: nodes can join or leave at any time and (e.g., in the context of overlay networks or mobile wireless networks) communication links might appear and disappear constantly. As a consequence, we believe that it is important to develop distributed algorithms that can cope with a potentially highly dynamic network topology and to understand what can and what cannot be computed in a dynamic network. In the present paper, we develop techniques to develop distributed dynamic network solutions for local distributed graph problems such as computing a graph coloring or a maximal independent set (MIS) of the network graph (see, e.g., [ABI86, BEPS12, BE13, Gha16, Lub86]). Unlike previous solutions, our algorithms always satisfy non-trivial guarantees, no matter how dynamic the network is. The guarantees become stronger if the network is less dynamic and if the network becomes static in a constant neighborhood around some part of the network, the solution of that part also coverges to a static solution after a short time. By now, there is already a significant body of work that studies distributed computations in dynamic network. However, to a large extent, the existing work deals with distributed solutions for mostly global network problems such as broadcasting information to all nodes of a dynamic network [AGKM15,AAL+ 16, BCF09, CFMS15, CMPS09, DPR+ 13, HK11, KLO10, OW05], computing a global function on inputs that are distributed among the nodes of a dynamic network [JYZ17, KLO10, MCS13, MCS14, San15, YZJ16], performing a random walk on the nodes of a dynamic network [AKL08, DMP15, DR14], solving agreement problems in dynamic network [APRU15, KMO11, OSM04, RB04, ISWW09], or synchronizing clocks in a dynamic network [FNC15, KLO11, KLLO10]. In contrast, in this paper, we focus on local distributed algorithms [Pel00] that have a running time that is typically constant or polylogarithmic in the size of the network. We believe that local distributed algorithms are particularly suited for dynamic networks. If a distributed algorithm has time complexity T in a static network G, the output of each node v of G only depends on the initial state of the T -neighborhood of v in G. Therefore if the topology of G only changes locally, the algorithm can be used to repair an existing solution in time T by only changing the output of nodes in a T -neighborhood around the local topological changes. In our opinion, this fact is one of the key reasons why we should aim for distributed algorithms that are as local as possible. In [AS88, APSPS92, LSW09], this connection between local algorithms and dynamic networks is made explicit. In [AS88,APSPS92], it is shown that a synchronous T -round algorithm can be run in an asynchronous dynamic network such that whenever the T -hop neighborhood of some part of the dynamic graph becomes stable, the algorithm also eventually converges to a stable solution in this part of the graph. We note that if the graph never becomes stable in some part, the results of [AS88, APSPS92] do not guarantee anything. In [LSW09], it is shown that local distributed algorithms can be turned into fast converging self-stabilizing algorithms.2 The problem of locally repairing a single dynamic change in the network has been studied by CensorHillel, Haramaty and Karnin [CHHK16] for the problem of computing an MIS. They show that a simple randomized distributed greedy algorithm guarantees that when a single topological change occurs (i.e., if a single node or edge is inserted or deleted), on average, the MIS can be repaired in constant time and in fact even such that only a constant number of nodes need to change their state. While the above algorithms certainly encourage the use of local algorithms in dynamic networks, they do not show that such algorithms can be used to always produce a meaningful output in a dynamic network in which the topology constantly changes. To the best of our knowledge, none of the existing work on distributed algorithms for solving graph problems in dynamic networks provides any non-trivial guarantees if the network is arbitrarily dynamic. The objective of this work is to provide techniques that allow to compute a meaningful output at all times, no matter how bad the dynamic network behaves. Clearly, it is not possible to always output a valid solution for the current network topology for any non-trivial graph problem. The requirement on the outputs produced by a distributed graph algorithm in a dynamic algorithm 2 A distributed algorithm is called self-stabilizing if it is guaranteed to converge to a stable and valid solution (in a static network) even if the algorithm starts in an arbitrary initial state [Dij74, Dol00]. 1 therefore have to depend on some (limited) history of the dynamic topology. Ideally, the guarantees depend on the dynamics of the network topology: If the network is static or locally static, the guarantees should be the same as for the static graph problem and the guarantees can become weaker the more dynamic the network topology is. 1.1 Contribution & Techniques in a Nutshell The contribution of this paper is threefold. We define a general method to turn a large class of static graph problems into graph problems that are defined on arbitrarily dynamic graphs. The valid outputs at any point in time are defined by the dynamic graph topology of the last T time units, where T is a parameter that ideally is at most polylogarithmic in the number of nodes. We further provide a framework that allows to develop a distributed algorithm for a given graph problem such that the output always satisfies the requirements of the dynamic graph version of the problem and such that the output satisfies the guarantees of a (locally) static solution if the graph is (locally) static for at least T time units. Finally, we provide instantiations of our framework for two classic distributed symmetry breaking problems: computing a proper coloring such that each node v has a color between 1 and deg(v) + 1 and computing an MIS of the network graph. In the following, we provide an informal description of our model and framework, for formal definitions, we refer to Sections 2 and 3. We model a dynamic network as a synchronous system over a set V of n potential nodes. Time is divided into rounds and in each round r = 0, 1, 2, . . . , there is a communication graph Gr = (Vr , Er ). We will later assume that nodes can wake up gradually, however for the purpose of this summary, we assume that all nodes wake up initially and we thus have Vr = V for all r ≥ 1. We consider graph problems that can be decomposed into two parts that are given by a packing and a covering graph property. Essentially, a packing property is a graph property that remains true when removing edges and a covering property is a graph property that remains true when adding edges. In addition, we assume that the validity of a solution can be checked locally, i.e., by evaluating it in the constant neighborhood of every node [FKP11, NS93]. For the formal details, we refer to Section 2. For example, the problem of finding an MIS on a graph G can be decomposed into the problem of finding a subset S of the nodes such that no two neighbors are in S (packing property) and S is a dominating set of G (covering property). For the (degree+1)-coloring problem, the requirement that the vertex coloring is proper is a packing property and the requirement that the color of a node v is from {1, . . . , deg(v) + 1} is a covering property. For a given graph problem and an integer parameter T ≥ 1, we say that a given solution is a T -dynamic solution at time r if a) the solution satisfies the packing property for the intersection graph GTr ∩ = Gr−T +1 ∩Gr−T +1 ∩. . .∩Gr (i.e., the graph that contains all edges that have been present throughout the last T rounds), and b) the solution satisfies the covering property for the union graph GTr ∪ = Gr−T +1 ∪ Gr−T +1 ∪ . . . ∪ Gr (i.e., the graph that contains all edges that have been present at least once in the last T rounds). We believe that this provides a natural generalization of a static graph problem to the dynamic context. Note that the dynamic guarantees are stronger the less dynamic the graph is and if the graph has been static during rounds r − T + 1, . . . , r, a T -dynamic solution at time r is that same as a static solution for the given graph problem for the graph Gr in round r. When designing a distributed algorithm for a given dynamic graph problem, we require that for some T ≥ 1, the algorithm outputs a valid T -dynamic solution after each round r. Assume that we can construct an algorithm A such that if all nodes start A in round 1, after round T , A outputs a valid T -dynamic solution w.r.t. to the first T graphs (i.e., a solution that satisfies the packing property for GTT ∩ and the covering property for GTT ∪ ). Given such an algorithm A, we can in principle design an algorithm that always outputs a valid T -dynamic solution by just starting a new instance of A in every round and outputting the solution of an instance started in round r + 1 after round r + T . However, clearly such a solution would not be satisfactory because especially if A is randomized, the output might change completely from round to round even if the graph is only mildly dynamic or even static. We therefore refine the above approach and define two abstract types of algorithms to deal with dynamic graph problems. For two positive integers T and α, we say that an algorithm SA LG is a (T, α)-network-static algorithm 2 for a given dynamic graph problem if it satisfies the following properties. At the end of each round r ≥ 1, the algorithm outputs a valid partial solution for the graph Gr .3 In addition, if the α-neighborhood of some node v remains static in some interval [r, r2 ], v must output a fixed value 6= ⊥ throughout the interval [r + T, r2 ]. Further, for a positive integer T , we say that an algorithm DA LG is a T -dynamic algorithm for a given dynamic graph problem if it satisfies the following property. Let r ≥ 1 be some round and assume that we are given a valid partial solution for Gr . If DA LG is started in round r + 1, at the end of round r + T − 1, it outputs a valid T -dynamic solution that extends the given partial solution for Gr . The following theorem shows that a T1 -dynamic algorithm and a (T2 , α)-network-static algorithm can be combined to obtain a distributed algorithm that always outputs a valid T1 -dynamic solution while (essentially) inheriting the properties of SA LG if the graph is locally static for sufficiently long. Our framework thus allows to separate the two tasks of (1) always outputting a T -dynamic solution and (2) provide a locally stable output if the network is locally static. Theorem 1.1. Let T1 and T2 be positive integers, P a packing, and C a covering problem. Let DA LG be a T1 -dynamic algorithm and SA LG a (T2 , α)-network-static algorithm for (P, C) . Then one can combine both algorithms to an algorithm such that: 1. (dynamic solution) Its output in round r is a T1 -dynamic solution for (P, C) . 2. (locally static) If the graph is static in the α-neighborhood of a node v ∈ Vr in all rounds in an interval [r, r2 ] then the output of v does not change for all rounds l ∈ [r + T1 + T2 , r2 ]. We show how to apply the above framework to two of the classic local symmetry breaking problems: computing a vertex coloring and computing an MIS of the network graph. In both cases, we can adapt existing algorithms to obtain a (O(log n), O(1))-network-static algorithm SA LG and a O(log n)-dynamic algorithm DA LG. For vertex coloring, we use a variant of the most basic randomized coloring algorithm. In each round, each uncolored node v selects a uniformly random color from {1, . . . , deg(v) + 1} \S, where S is the set of colors that are already taken by the colored neighbors of v. Node v keeps a color if no neighbor chooses the color in the same round.4 5 Theorem 1.2. There is a T = O(log n) and an algorithm that, w.h.p., outputs a T -dynamic solution for (degree+1)-coloring in every round and the output of any node v is static in all rounds l ∈ [r + 2T, r2 ] if the 2-neighborhood of v is static in all rounds in the interval [r, r2 ]. For the MIS problem we adapt the algorithm by Ghaffari [Gha16] to obtain a (O(log n), O(1))-networkstatic algorithm SA LG and we adapt Luby’s well-known algorithm [ABI86, Lub86] to obtain a O(log n)dynamic algorithm DA LG. Theorem 1.3. There is a T = O(log n) and an algorithm that, w.h.p., outputs a T -dynamic solution for MIS in every round and the output of any node v is static in all rounds l ∈ [r + 2T, r2 ] if the 2-neighborhood of v is static in all rounds in the interval [r, r2 ]. Outline In Section 2 we introduce our dynamic graph model and provide further notation. In Section 3 we formally introduce packing and covering problems as well as T -dynamic and (T, α)-network-static algorithms and 3 In a partial solution, nodes are allowed to output ⊥. For each node v that ouputs a value 6= ⊥, it must hold that there exists an extension of the partial solution such that the packing property for v is satisfied and the covering property for v is satisfied for all extensions of the partial solution. For a formal definition, we again refer to Sections 2 and 3. 4 It is commonly known that this simple randomized algorithm terminates in O(log n) rounds in static graphs. The algorithm is for example used and analyzed in [BEPS12, Joh99]. 5 We say that a statement holds with high probability (w.h.p.) if it holds with probability 1 − 1/nc for a constant c > 1 that can be chosen arbitrarily. We assume that all executions are of length at most polynomial in n. All our probabilistic results could be extended to arbitrarily long executions if we allow the output to be invalid in a polynomially small fraction of the rounds. 3 prove Theorem 1.1. In Section 4 we apply the framework from Section 3 to the (degree+1)-coloring problem to prove Theorem 1.2 and in Section 5 we apply the framework to the MIS problem to prove Theorem 1.3. Finally, in Section 6, we introduce a pipelined version of the basic randomized coloring algorithm to which we refer in Section 4. 2 Dynamic Graph Model A dynamic graph is a sequence of graphs G0 = (V0 , E0 ), G1 = (V1 , E1 ), G2 = (V2 , E2 ), . . . that is provided by an adaptive worst case adversary in a synchronous round-based model. We require that the sequence of nodes ∅ = V0 ⊆ V1 ⊆ . . . is increasing. This allows the addition of nodes to the network and a node v leaving the network can be modeled by removing all edges adjacent to v but keeping the node in the network as an inactive isolated node. Throughout this work n is an upper bound on the number of nodes in Vi for each i and n is known by all nodes of the network. Round r consists of the following steps: 1. The adversary changes the graph, i.e., it provides graph Gr = (Vr , Er ), 2. Nodes send/receive messages through the edges Er and perform local computations, 3. Each node returns its output. The algorithm can use fresh randomness in every round. The communication is by local broadcast and a node does not have to know its neighbors at the beginning of a round; in particular a node does not know its degree in Gr at the beginning of round r. We do not limit the message size but all presented algorithms can be adapted to work with poly log n bits per message. Whenever we say that a property holds in round r we mean that the property holds at the end of round r, that is, before the adversary has changed the input graph to graph Gr+1 and after the nodes have performed the computations of round r. Definition 2.1. For any integer T ≥ 0 and round r, define r0 = max{0, r − T + 1} and VrT ∩ := r \ r ′ =r Vr′ 0 and ErT ∩ := r \ r ′ =r Er′ 0 and ErT ∪ := r [ r ′ =r  We call GTr ∩ := VrT ∩ , ErT ∩ the (T -)intersecting graph (in round r) and GTr ∪ := (T -)union graph (in round r). Er′ . 0  VrT ∩ , ErT ∪ the Asynchronous wake up can be modeled via Vr being the nodes that have woken up until round r. Then, in round r, VrT ∩ contains the nodes that have been awake for at least T rounds and V0 = ∅ means that all nodes are asleep at the beginning. When a node wakes up it does not know the current round number; round numbers are only for the sake of analysis. Note that GTr ∩ ⊆ Gr , so any edge in the intersecting graph can be used for communication purposes in round r. However, there is no guarantee that edges in GTr ∪ can be used for communication in round r. Definition 2.2 (Distributed Graph Problem). A distributed graph problem T is given by a set of tuples of the form (G, ~y ), where G = (V, E) is a simple, undirected graph and ~y is a |V |-dimensional vector with entries yv for each node v ∈ V . The output vector ~y is called a solution for T if (G, ~y ) ∈ T. Furthermore, yv is the output of v; if a node has not produced any output yet we set yv = ⊥. A vector ~z is called an extension of ~y if zv = yv whenever yv 6= ⊥. In a solution we require that all nodes produce some output. A vector φ with an entry for each node of G is also called an input. In this paper we consider distributed graph problems for which the feasibility of a solution can be verified by checking the solution for each O(1)-radius neighborhood (cf. the problem class LD(O(1)) in [FKP11]); maximal independent set and coloring can be checked with radius one. In the style of locally 4 checkable labeling problems (LCL problems) [NS93] we say that the LCL condition satisfied for a node if the feasibility check of its O(1)-neighborhood is positive. We model the maximal independent set (MIS) as all the pairs (G, ~y ) such that M = {v ∈ V | yv = 1} is an MIS of G and yv = 0 for all v ∈ / M . The problem of properly c-coloring consists of all the valid pairs (G, ~y ) with yv ∈ [c] for all v ∈ V (G) and yv 6= yu for all {u, v} ∈ E(G). A ρ-oblivious adversary does not know the random bits of the last ρ rounds, e.g., a 2-oblivious adversary does not know the random bits of round r and r − 1 when determining graph Gr . An adaptive offline adversary knows all random bits of the algorithm in advance. Our algorithms rely on different types of adversaries and we mention the respective type with the respective algorithm. Notation ′ For an algorithm A let Arr (φ) denote the output of the algorithm if it starts its computation in round r with input φ and runs until round r ′ (inclusively), that is, it executes the rounds r, r + 1, r + 2, . . . r ′ . For a node v ∈ V (G), NG (v) denotes the set of its neighbors in the graph G. For positive integers α, k and a node v, let Nα (v) denote the α-neighborhood of v and [k] := 1, . . . , k. For a round r, and a positive integer T , we ∪T ∩T ∪T denote by dr (v) (d∩T r (v), dr (v) resp.) the degree of v in Gr (Gr , Gr resp.). We repeatedly use the inequalities (1 − x) ≤ e−x for all x and 1 − x ≥ 4−x for x ≤ 1 . 2 (1) 3 A Framework for Highly Dynamic Network Algorithms The main objective of this section is to prove Theorem 1.1. In this section we also formally introduce packing and covering problems as well as T -dynamic and (T, α)-network-static algorithms. We begin with the definition of packing and covering problems. Definition 3.1 (Packing, Covering Problem). We call a distributed graph problem T • packing if any solution for a graph G is a solution for any graph G1 = (V, E ′ ⊆ E(G)), • covering if any solution for a graph G is a solution for any graph G1 = (V, E ′ ⊇ E(G)). The independent set problem is a packing problem. The dominating set problem is a covering problem. Properly coloring without any restriction on the number of colors is a packing problem. (Improperly) coloring a given graph where adjacent nodes are allowed to have the same colors and where v’s color is in the range {1, . . . , deg(v) + 1} is a covering problem. Very often packing and covering problems have trivial solutions, e.g., the emptyset is an independent set or all nodes form a dominating set. In the setting of LCL problems usually only their intersection is an object of interest, e.g., the intersection of the independent set problem and the dominating set problem is an MIS. The intersection of the introduced packing and covering coloring variants leads to the standard (degree+1) coloring problem. Our goal is to devise algorithms for highly dynamic networks that, in every round, guarantee properties which are closely related to the original problem and behave well in static graphs. In particular we desire the following guarantees: (1) For a suitably chosen T and any round r it should be a solution for the packing problem in G∩T r and ∪T for the covering problem in Gr . (2) The output should locally not change if the dynamic graph is locally static. We present a general framework to combine algorithms that separately take care of the requirements (1) and (2). The following natural properties describe the algorithms satisfying (1) and (2). Definition 3.2. Let T be a distributed graph problem. We call a vector φ 5 • partial packing for T if there is an extension φ̄ of φ with φ̄u 6= ⊥, for all u ∈ V such that for all nodes v with φv 6= ⊥ the LCL condition of T is satisfied in φ̄. • partial covering for T if for all extensions φ̄ of φ with φ̄u 6= ⊥, for all u ∈ V and for all nodes with φv 6= ⊥ the LCL condition of T is satisfied in φ̄. Let P be a packing problem and C a covering problem. We call an output vector φ a partial solution for (P, C) if φ is partial packing for P and partial covering for C. Definition 3.3 (dynamic, network-static). Let P be a packing problem, C a covering problem, T and α positive integers and G0 , G1 , . . . a dynamic graph. • An algorithm A is called T -dynamic for (P, C) if it satisfies the following: ′ A.1 (input-extending) For any j ′ ≥ j and any vector φ, Ajj (φ) is an extension of φ. A.2 (finalizing) For j ≥ T −1 and any partial solution φ for (P,C) in Gj−T +1 , the output Ajj−T +2 (φ) ∪T is a solution for P in G∩T j and a solution for C in Gj . • An algorithm A is called (T, α)-network-static for (P, C) if it satisfies for any input φ: B.1 (partial solution) Its output in round j is a partial solution for (P, C) in Gj .     B.2 (locally static) For each v ∈ Vr and each interval [r, r2 ] with Gl Nα (v) = Gl′ Nα (v) for all l, l′ ∈ [r, r2 ], the output of v is 6= ⊥ and does not change for all l, l′ ∈ [r + T, r2 ]. A.1 requires that a dynamic algorithm never deletes anything from a partial solution of a problem. A.2 says that any solution which is a partial solution of both problems is completed within T rounds. B.1 ensures that the algorithm always computes partial solutions for the current graph and B.2 ensures that the algorithm behaves well if it is locally static. Now, we combine a T -network-static algorithm SA LG with a T -dynamic algorithm DA LG. SA LG is started in round zero and serves as a base algorithm that first computes a partial solution and forwards it to DA LG. Then DA LG extends it to a full solution. If the graph is locally static SA LG provides a locally unchanged output that is not changed by DA LG. Algorithm 1 Round r of C ONCAT Input: Output: Vars.: ⊥ φr φj J (no node has an output) Output of SA LG in round j, partial solution for (P, C) on Gj One of the DA LG-instances Start: Initiate an SA LG-instance SA LG(⊥); φ−1 = ⊥ // No communication round needed Round r of C ONCAT 1: Start a new DA LG-instance DA LG(φr−1 ) 2: if there are T1 − 1 DA LG instances then discard the oldest DA LG-instance 3: for all DA LG-instances J do in parallel 4: Execute one round of J 5: In parallel to the above, execute one further round of SA LG; denote the output with φr . 6: Output the output of the oldest DA LG-instance This algorithm leads to our following main theorem. Theorem 1.1. Let T1 and T2 be positive integers, P a packing, and C a covering problem. Let DA LG be a T1 -dynamic algorithm and SA LG a (T2 , α)-network-static algorithm for (P, C) . Then one can combine both algorithms to an algorithm such that: 6 1. (dynamic solution) Its output in round r is a T1 -dynamic solution for (P, C) . 2. (locally static) If the graph is static in the α-neighborhood of a node v ∈ Vr in all rounds in an interval [r, r2 ] then the output of v does not change for all rounds l ∈ [r + T1 + T2 , r2 ]. Proof of Theorem 1.1. 1. If r < T1 − 1, the graphs Gr∩T1 and Gr∪T1 are both empty as no node has been awake for T1 rounds. For r ≥ T1 − 1 let ψ := SA LG 0r−T1 +1 . At the beginning of round r − T1 + 2, C ONCAT starts a new instance of DA LG on ψ. This instance becomes the output of C ONCAT exactly after the run of T1 − 1 rounds, i.e., C ONCAT outputs DA LG rr−T1 +2 (ψ) after round r. By property B.1 we know that ψ is a partial solution for (P, C) in Gr−T1 +1 and thus by A.2 C ONCATr0 is a solution for P in Gr∩T1 and a solution for C in Gr∪T1 . 2 2. Due to B.2, we have (ψ)v := (SA LG r+T )v = (SA LG l0 )v 6= ⊥ for all l ∈ [r + T2 , r2 ]. This is the 0 input of all DA LG instances starting between r + T2 + 1 and r2 + 1. As DA LG is input-extending (A.1) (ψ)v is also the output of C ONCAT for v in any round l ∈ [r + T1 + T2 , r2 ]. The following remark holds along similar lines as the proof of Theorem 1.1, 1. Remark. Theorem 1.1 also holds if V0 6= ∅ and the algorithm is started with a solution in G0 for P and C as input. Remark. In principle, using the same technique, one could also combine more than two algorithms. One could for example imagine to also have a dynamic network algorithm that has stronger guarantees, but only works in dynamic networks with much more limited dynamic changes. In combination with the static and the dynamic algorithms considered in the paper, this can lead to an algorithm that a) converges to a locally stable solution if the graph is locally static, b) satisfies the stronger dynamic guarantees if the topological changes are only of the required limited form, and c) satisfies the dynamic guarantees of the present paper for arbitrary dynamic topologies. 4 Coloring in Highly Dynamic Networks In this chapter we consider the coloring problem. Let CP be the problem of properly coloring the nodes of a graph without an upper bound on the number of colors. CC is the (potentially non proper) degree + 1 coloring problem, i.e., the color c(u) of node u has to be in the range {1, . . . , deg(v) + 1}. Both problems are LCL problems as the feasibility of a solution can be checked by investigating the 1-neighborhood. This section is devoted to proving Theorem 1.2. Theorem 1.2. There is a T = O(log n) and an algorithm that, w.h.p., outputs a T -dynamic solution for (degree+1)-coloring in every round and the output of any node v is static in all rounds l ∈ [r + 2T, r2 ] if the 2-neighborhood of v is static in all rounds in the interval [r, r2 ]. For this purpose we will present two randomized algorithms, one being T -dynamic (cf. Section 4.1) and the other (T, α)-network-static for (CP , CC ), w.h.p., for a T ∈ O(log n) and α = 2 (cf. Section 4.2). Both algorithms are variants of the following basic randomized coloring algorithm [BEPS12,Joh99] that operates in phases of two rounds: In the first round each uncolored node v chooses a tentative uniformly at random color from the range {1, . . . , deg(v) + 1} \ S (where S is the set of forbidden colors that colored neighbors have chosen previously). In the second round v keeps the color if no neighboring node picked the same color and otherwise it discards the color. This two rounds in one phase implementation is not desirable in an asynchronous wake-up model without a global clock. In Section 6 we thus provide a pipelined version for the basic randomized coloring algorithm (for static graphs) that works without a global clock. The algorithms we present in this chapter are based on this pipelined version. 7 4.1 The O(log n)-Dynamic Coloring Algorithm DC OLOR DC OLOR is a variant of the basic randomized coloring algorithm, with the difference that the communication network is always restricted to the current intersection graph. At all times each uncolored node has a palette Pv of potential colors. When DC OLOR is started in round j, the palette Pv is initialized with the set [dj (v) + 1] without the colors of v’s neighbors in Gj . As long as v is uncolored, in each round r ≥ j it chooses a tentative uniformly at random color from its current palette, sends it to its neighbors and receives the tentative colors and permanently chosen colors from its neighbors in the intersection graph Gr∩ j+r . If its tentative color c is not among the received colors, v permanently keeps color c and informs its neighbors about its choice in the next round. Otherwise, v stays uncolored, deletes the received permanent colors from its palette and repeats the procedure. Algorithm 2 DC OLOR Input: Output: Vars.: n-vector φ φ φ, Pv R Color palette. Communication is always restricted to GR∩ r . Denote by j the round in which the algorithm starts. v does not have to know this value. Start: R = 0. // The start needs one communication round Send φv to all neighbors in Gj . Receive values from neighbors. // Initialize color palette If φv = ⊥, set Pv = [dj (v) + 1] \ {φw | w ∈ NGj (v)} Round r of DC OLOR 1: switch φv = ? do 2: case φv = ⊥: Pick tentative color cv ∈ Pv u.a.r. and send it to neighbors in GR∩ r . R∩ 3: case φv 6= ⊥: Send φv to neighbors in Gr . 4: Receive fixed colors Fv = {φw | w ∈ NGR∩ (v)} and tentative colors Sv = {cw | w ∈ NGR∩ (v)}. r r 5: Pv = Pv \ Fv // Update color palette 6: switch φv = ? do 7: case φv = ⊥: 8: if cv ∈ Pv and cv ∈ / Sv then φv = cv else keep φv = ⊥. 9: case φv 6= ⊥: Do nothing. 10: R + + // Intersect one more graph in the next round 11: Output φ We show that DC OLOR is O(log n)-dynamic, w.h.p. Lemma 4.1. DC OLOR is T -dynamic for (CP , CC ) w.h.p. for a T ∈ O(log n). To prove the result we first have to show that each node is decided after O(log n) rounds (Lemma 4.4). For this purpose we prove that – regardless of the dynamicity – the palette of v is always larger than the number of uncolored neighbors in the intersection graph (Lemma 4.2). With this property we show in Lemma 4.3 that if less than a fourth of the colors are deleted from v’s palette in the current round, then with constant probability v chooses a so called good color that it can keep with constant probability. Lemma 4.4 then follows together with the property that colors are never added to v’s palette in DC OLOR and a node is colored once its palette size equals one. If DC OLOR is started in round j, then for a node v and an R ≥ 0, let U (v) := {u ∈ NGR∩ (v) | φu = ⊥} j+R be the set of uncolored neighbors of node v in the intersection graph in round j + R. We omit the round number in the notation as it will be always clear from the context. 8 Lemma 4.2. For all v ∈ V , in every round of DC OLOR one has |Pv | ≥ |U (v)| + 1. Proof. Assume DC OLOR is started in round j. The inequality is true in round j as Pv is initially set to [dj (v) + 1]. In the following rounds, whenever a color is removed from Pv , at least one neighbor of v chose this color, i.e., |U (v)| decreases by at least one. Apart from that, changes in the graph topology can only decrease the number of uncolored neighbors of v in the intersection graph and do not affect the palette. Lemma 4.3. In one round of DC OLOR, each uncolored node is colored with probability at least 1/64 or its color palette shrinks by a factor of at least 1/4. Proof. Assume DC OLOR is started in round j. Let R ≥ 0 and v be uncolored at the beginning of round j + R. We assume |U (v)| ≥ 1 (otherwise, v will be colored in the current round as there will be no conflicts for v’s color choice). As v ∈ U (u) for all u ∈ U (v) one deduces that U (u) ≥ 1 holds for these nodes. By Lemma 4.2, v and its uncolored neighbors have palettes of size at least 2. We emphasize that all of the following definitions and arguments are only for the sake of the analysis and nodes executing the algorithm do not need to know these parameters. For a color c ∈ Pv , define the weight of c as wc := X {u∈U (v)|c∈Pu } 1 . |Pu | Let Zv be the set of those colors in Pv which have been permanently chosen by some u ∈ NGR∩ (v) in the j+R last round (these are the colors which will be deleted from Pv in the current round after (!) node v chose its tentative color). Call a color c ∈ Pv good if c ∈ / Zv and wc ≤ 2. For a good color c we have Y Pr (v keeps c | v chose c as tentative color) = {u∈U (v)|c∈Pu }  1 1− |Pu |  (1) 1 . ≥ 4−wc ≥ 4−2 = 16 At most |U (v)|/2 colors from Pv can have a weight larger than 2 because ! X X X X |Pu ∩ Pv | 1 wc = = ≤ |U (v)| . |Pu | |Pu | c∈Pv u∈U (v) c∈Pu ∩Pv u∈N (v) colors in Pv are not good. With |U (v)| ≤ |P2v | it follows So in addition to the colors in Zv , at most |U (v)| 2 2 that in Pv , at least |Pv | − |Zv | − |P2v | colors are good. When we assume that |Zv | ≤ |P4v | (i.e., the color palette of v shrinks by a factor of at most 1/4 in this round), then at least one fourth of the colors, i.e., |Pv | − |Zv | − |P2v | ≥ |P4v | , are good. So in this case, the probability for choosing a good color is at least 1/4, which means that the overall probability for v being colored is at least 1/64. Therefore, if the color palette of v does not shrink by a factor of at least 1/4, v is colored with probability at least 1/64. Lemma 4.4. There is a T ∈ O(log n) such that for any dynamic graph and any input, after T − 1 rounds of DC OLOR , w.h.p. all nodes are colored. Proof. Assume DC OLOR is started in round j on some dynamic graph and some input φ. Fix a constant  b ≥ 1 and set T1 := log 3 n4 , T2 := 64(b + 1) ln(n) and T ′ := T1 + T2 = O(log n). For each initially 4 uncolored node v (i.e., φv = ⊥), denote by Av the event that v is not colored after round j + T ′ , i.e., after the execution of the start round j and the T ′ following rounds. For Av to come true, there can have been at most T1 rounds in which v’s color palette shrinks by a factor of at least 1/4, because after T1 such rounds, one has T |Pv | ≤ n 43 1 = 1 (initially it is |Pv | ≤ n), which means that v’s color palette can not shrink another time without v getting colored (a node will get colored before its palette gets empty). By Lemma 4.3 it follows that there must have been at least T2 rounds in which v got colored with probability at least 1/64, so we 9 T2 1 T2 1 obtain Pr(Av ) ≤ (1 − 64 ) ≤ e− 64 = nb+1 . With a union bound over all nodes, we can upper bound the probability that there is an uncolored node left after round j + T ′ : ! [ 1 n Au ≤ b+1 = b . Pr n n u∈V It follows that with probability at least 1 − we get the desired result. 1 , nb all nodes are colored after round j + T ′ . With T := T ′ + 2, Once all nodes are colored the output of DC OLOR will be the same in all following rounds as DC OLOR never uncolors a node. Before we prove Lemma 4.1, we shortly characterize a vector φ that is partial packing and partial covering in this context: A vector φ is partial packing if there is an extension of φ in which the LCL condition of CP is satisfied for all nodes with φv 6= ⊥ (cf. Definition 3.2). If the graph induced by all colored nodes of φ forms a proper coloring it is straightforward to build such an extension by greedily coloring the remaining nodes. Thus φ is partial packing if and only if the graph induced by all colored nodes of φ forms a proper coloring. A vector φ is partial covering if the LCL condition of CC is satisfied for all nodes with φv 6= ⊥ and for all extensions of φ. The feasibility of the LCL condition of CC for a node v only depends on the color of v and its degree – it is independent from the colors of its neighbors. Both parameters do not depend on the choice of the extension and it is sufficient that v’s color is in [d(v) + 1] for all v with φv 6= ⊥ to prove that φ is partial covering. Proof of Lemma 4.1. Let T = O(log n) be as in Lemma 4.4. Property A.1: Getting φ as input, DC OLOR will only change the values of nodes v with φv = ⊥. Hence DC OLOR is input-extending. Property A.2: Let j ≥ T −1 and φ a partial solution for (CP , CC ) in Gj−T +1 . Let φ′ := DC OLOR jj−T +2 (φ). By Lemma 4.4, all nodes have chosen a color, w.h.p. We show: (1) φ′v 6= φ′w for all nodes v and w adjacent ∪T ′ in G∩T j ; (2) φv ∈ [dj (v) + 1] for all nodes v. (1): Consider two nodes v and w adjacent in every graph Gj−T +1 , . . . , Gj , i.e., adjacent in G∩T j . If φv , φw 6= ⊥, we also have φ′v 6= φ′w as φ is partial packing for CP in Gj−T +1 and both nodes keep their color. Now, assume that v or w is uncolored in round j − T + 1. It is not possible for them to take the same color in the same round (if they choose the same tentative color, they discard it again). If node v (node w) is colored with color c before w (before v) or was already colored with color c in the input φ , then c is removed from w’s palette (v ′ s palette), i.e., node w (node v) is not able to take color c in the following rounds. (2): Fix a node v. If φv 6= ⊥, then φ′v = φv (A.1) and φv ∈ [dj−T +1 (v) + 1] ⊆ [d∪T j (v) + 1] as φ is partial covering for CC in Gj−T +1 . If v gets colored in some round i ∈ {j − T + 2, . . . , j}, it takes a color among [di (v) + 1] ⊆ [d∪T j (v) + 1]. 4.2 The O(log n)-Network-Static Coloring Algorithm SC OLOR SC OLOR is similar to DC OLOR and we describe a single round of the algorithm: Colored nodes send their color to their neighbors (call these colors fixed to distinguish them from tentative colors), uncolored nodes choose a tentative color from their palette and send them to their neighbors. But here, unlike in DC OLOR, the graph used for communication in round r is the current graph Gr and not the intersection graph. Then the color palettes are updated: Node v’s new palette is the set [dr (v)+1] without the fixed colors of its neighbors. So in contrast to DC OLOR, colors can also be added to the palette. Then two cases are considered: (1) If v is uncolored, it checks if its tentative color is part of its new palette and not among its neighbors’ tentative colors. If yes, v colors itself with this color, if not, v stays uncolored. (2) If v is colored, it checks if its color is part of its palette. If yes, it keeps its color, if not, it uncolors itself. 10 Algorithm 3 SC OLOR Input: Output: Vars.: φ φ φ, Pv Start: Pv = {1} Color palette. // Initialize color palette (no communication round needed) Round r of SC OLOR 1: switch φv = ? do 2: case φv = ⊥: Pick tentative color cv ∈ Pv u.a.r. and send it to neighbors in Gr . 3: case φv 6= ⊥: Send φv to neighbors in Gr . 4: Receive fixed colors Fv = {φw | w ∈ NGr (v)} and tentative colors Sv = {cw | w ∈ NGr (v)}. 5: Pv = [dr (v) + 1] \ Fv // Update color palette 6: switch φv = ? do 7: case φv = ⊥: 8: if cv ∈ Pv and cv ∈ / Sv then φv = cv else keep φv = ⊥. 9: case φv 6= ⊥: // Potential Uncoloring 10: if φv ∈ / Pv then Set φv = ⊥. 11: Output φ We show that SC OLOR is (T, α = 2)-network-static, w.h.p. The result is based on the local nature of the basic coloring algorithm and the fact that a node and its neighbors do not uncolor themselves in SC OLOR if the 2-neighborhood of the node is static. Lemma 4.5. SC OLOR is (T, α = 2)-network-static for (CP , CC ) w.h.p. for a T ∈ O(log n). Proof. For proving B.1 we have to show that at the end of each round r, no colored node has a neighbor in Gr with the same color and the color of node v is in the range [dr (v) + 1]. Both properties are fulfilled as any node which does not satisfy them is uncolored (cf. line 10 in Algorithm 3). Property B.1 is satisfied independently of the choice of T . For proving B.2, let T ′ = O(log n) be the runtime of the basic coloring algorithm for static graphs (Lemma 6.1) and set T := T ′ + 2. Let v ∈ Vr and r2 ≥ r + T such that Gl [N2 (v)] = Gl′ [N2 (v)] for all l, l′ ∈ [r, r2 ] (for r2 < r + T , B.2 holds trivially). A node may uncolor itself only if it becomes adjacent to a node which has the same color or if the value of its current degree plus one falls below its chosen color. Both things do not happen if v’s 1-neighborhood is static. So if v is colored after round r + T , it will keep its color at lest until round r2 . We show why v is colored in O(log n) rounds, w.h.p., if its 2-neighborhood is static from round r on: In that case v executes the same steps in SC OLOR as it does in the basic algorithm for static graphs (cf. Section 6). This does not hold for all nodes in the dynamic network. However, the knowledge about the behavior of all nodes that we need to mimic the proof of Lemma 6.1 can be reduced to three properties that have to hold as long as v is uncolored. Thus we only have to prove the following three properties: (1) In all rounds in the interval [r + 2, r2 ], the color palettes of v’s uncolored neighbors have size ≥ 2. (2) From round r + 1 to r2 , the size of v’s color palette is at least the number of v’s uncolored neighbors. (3) From round r + 1 to r2 , colors may only be deleted from but never join Pv . With (1) and (2), we show that if less than |Pv |/4 colors are deleted from Pv in the current round, then with probability 1/16 v chooses a so called good color and keeps it with probability at least 1/4. Thus the palette of v shrinks by a constant factor or v is colored with constant probability. With (3) it follows that v has chosen a color after O(log n) rounds, w.h.p. Even though the three statements seem to be trivially satisfied this needs careful arguments, e.g., (1) might not be satisfied in rounds r and r + 1. (1) Let w ∈ N (v) and v, w be uncolored in some round in [r+2, r2 ]. As the nodes do not uncolor themselves in all rounds in [r + 1, r2 ], both nodes are already uncolored at the end of round r (one cannot deduce that 11 they are uncolored in the first competition for colors at the beginning of round r as they could be colored in round r − 1, at the beginning of r and only become uncolored at the end of round r due to a new edge in round r). Then in round r + 1, Pw is updated to [dr (w) + 1] \ Fw (the degree of w does not change), where Fw contains the colors of w’s colored neighbors. As v is an uncolored neighbor of w, it follows that |Fw | ≤ dr (w) − 1 and therefore |Pw | ≥ dr (w) + 1 − |Fw | ≥ 2. In the following rounds, a color can only be deleted from Pw if one of w’s (already existing) neighbors takes this color. But as long as w has v as uncolored neighbor, the value of dr (w) + 1 is always at least larger by two than the number of its colored neighbors. (2) In round r, Pv is set to [dr (v) + 1] \ Fv . The size of Fv is at most the number of v’s colored neighbors, so the size of Pv is at least the number of v’s uncolored neighbors. In the following rounds, as v’s degree is static, a color may only be deleted from Pv if at least one of its neighbors chooses this color, i.e., if v looses at least one uncolored neighbor. On the other hand, the number of v’s uncolored neighbors can not increase as none of v’s neighbors uncolors itself as long as v’s 2-neighborhood is static. (3) As v’s degree remains static, a color may only join Pv if a neighbor of v uncolors itself and its color thus becomes available for v again. But as pointed out above no neighbor of v uncolors itself if v’s 2neighborhood is static. 4.3 Proof of Theorem 1.2 Theorem 1.1 with the O(log n)-network-static SC OLOR for (CP , CC ) (cf. Lemma 4.5) and the O(log n)dynamic algorithm DC OLOR (cf. Lemma 4.1) for (CP , CC ) implies the result. Remark. The analysis of DC OLOR and SC OLOR does not require the adversary to have any obliviousness. Thus, all results in this section are valid even for an adaptive offline adversary, which knows the choice of random bits in any round in advance. 5 MIS in Highly Dynamic Networks Let MP be the independent set problem (packing) and MC be the dominating set problem (covering). Both problems are LCL problems as the feasibility of a solution can be checked by investigating the 1neighborhood. The main objective of this section is to prove the following theorem. Theorem 1.3. There is a T = O(log n) and an algorithm that, w.h.p., outputs a T -dynamic solution for MIS in every round and the output of any node v is static in all rounds l ∈ [r + 2T, r2 ] if the 2-neighborhood of v is static in all rounds in the interval [r, r2 ]. Instead of the vector-notation from Section 2, we use the more intuitive notion with dynamic set variables: Algorithms produce a tuple of sets (M, D) with M denoting the MIS-nodes and D the dominated nodes. This notation can be easily translated into the vector-notation from Section 2 by setting the value of a node to 1 if it is in M , to 0 if it is in D and to ⊥ if it is in V \ (M ∪ D). The T -dynamic algorithm in section Section 5.1 is a modification of Luby’s algorithm [ABI86, Lub86]. Luby’s algorithm proceeds in phases of two rounds: First each undecided node draws a random number and sends it to its neighbors. In the second round, nodes with the smallest number in their neighborhood join M and inform their neighbors which then join D. We present a pipelined version of Luby’s algorithm in which each round is identical such that it works in the asynchronous wake up model. The network static algorithm in Section 5.2 is based on a modified and pipelined version of the MIS algorithm in [Gha16]. 5.1 The O(log n)-Dynamic MIS Algorithm DM IS DM IS (dynamic MIS) is an implementation of Luby’s algorithm, where any form of communication in round r ≥ i (if DM IS is started in round i) ignores edges added by the adversary after round i, i.e., commu∩(r−i+1) nication is restricted to the graph Gr = Gi ∩ Gi+1 ∩ . . . ∩ Gr . More detailed: At all times each node 12 is in exactly one of three sets, i.e., in the set M of MIS-nodes, in the set D of dominated nodes or in the set U , i.e., the node is undecided. The algorithm can be started in round i with any configuration of states such that M forms an independent set of Gi and each node in D has a neighbor in M in Gi . If started in round i, the communication graph is always a subgraph of Gi , i.e., every edge that it uses for communication was already an edge in Gi . To identify the current communication graph G∩R r , we introduce a parameter R that is initialized with zero and raised in every round. 6 Sending. Each node v ∈ M sends a mark to all nodes that were neighbors in the last R rounds, that is, to all neighbors of v in the graph GR∩ r ; each node v ∈ U draws a random number and sends it to its neighbors that were neighbors in the last R rounds. After Receiving. Nodes that receive a mark change their state to dominated. Still undecided nodes that drew a smaller number than all random numbers they received join M . At the end of the round, the parameter R is increased by one. Output. The algorithm returns the state of each node at the end of each round, i.e., it either returns mis, dominated or undecided. Algorithm 4 DM IS Input: Output: Vars.: (M, D) (M, D) M, D, U R Start: R = 0 (independent set, dominated nodes) MIS-nodes, dominated nodes, undecided nodes Communication is always restricted to GR∩ r // No communication round needed Round r of DM IS 1: U = V \ (M ∪ D) 2: switch v ∈ ? do 3: case v ∈ M : send mark to all neighbors in GTr ∩ 4: case v ∈ U : send random number αv ∈ [0, 1] to all neighbors in GR∩ r 5: Receive random numbers {αu | u ∈ U ∩ NGR∩ (v)} and marks from all neighbors in GR∩ r r 6: switch v ∈ ? do 7: case mark received: join D 8: case v ∈ U and αv < min{αu | u ∈ U ∩ NGR∩ (v)}: join M r 9: R + + // Intersect one more graph in the next round 10: Output (M, D) Lemma 5.1. DM IS is T -dynamic for (MP , MC ), w.h.p., for a T ∈ O(log n). First we prove that there is a T ∈ O(log n) such that after T − 1 rounds of DM IS , w.h.p., all nodes are decided, i.e., either joined M or D. The proof is similar to the ’standard’ Luby analysis in [Win04, MRNZ10], but needs additional care due to the dynamicity of the graph. As the graph changes, edges which are needed to inform neighbors about a joining MIS node might not be there anymore in the next round and the proofs in [Win04, MRNZ10] heavily rely on these edges. We adapt the proof and show that within two rounds and in expectation one third of the edges between undecided nodes are removed in the intersection graph, either because the adversary removes the edge or because one (or both) endpoints join M or D. Note that, in the dynamic setting, we cannot guarantee that, in expectation, half of the edges are removed as it is done in [Win04, MRNZ10]. Particularly, we show that when DM IS is started in round j on some input (M, D), then after executing ∩ T ∈ O(log n) rounds (i.e., after round j +T −1), w.h.p., there is no edge left in GTj+T −1 with both endpoints undecided. Then in the following round, all leftover undecided nodes either join D (if they have a neighbor 6 Note that a global parameter as R is not needed as every node can simply keep track of the current set of edges/neighbors it still has to consider for communication. 13 +1∩ in M in GTj+T +1 ) or otherwise they join M . To ease presentation, we write Mr , Dr and Ur for the state of the set variables M , D, U in DM IS at the beginning of round r. Furthermore we define Hr := Gr∩ j+r [Ur ] for each positive integer r. Lemma 5.2. Given a dynamic graph, assume DM IS is started in round j on some input (M, D). Then for each r ≥ 0 we have   2 E |E(Hr+2 )| |E(Hr )| ≤ |E(Hr )| . 3 Proof. We will show that, in expectation, at least   one third of the edges of Hr are not contained in Hr+2 , i.e, we show E |E(Hr ) \ E(Hr+2 )| |E(Hr )| ≥ 31 |E(Hr )|. This is sufficient to prove the claim as E(Hr+2 ) ⊆ E(Hr ). Therefore define the following set of edges E ′ := {{v, w} ∈ E(Hr ) | {v, w} ∈ Er+1 and v, w ∈ / Dr+1 } . For {v, w} ∈ E ′ define the event (v → w)r as αv < αx for all x ∈ NHr (v) ∪ NHr (w) \ {v}) . We consider two (non-disjoint) types of edges of Hr that are not contained in Hr+2 : 1. Edges that are not contained in E ′ , 2. Edges that are removed due to an event (v → w)r for some {v, w} ∈ E ′ . In the following we lower bound the expected number of edges of type (2) by |E ′ |/2. The event (v → w)r says that the chosen random value of v in round r is smaller than those of all its neighbors in Hr as well as those of all neighbors of w in Hr (without v of course). If the event (v → w)r occurs, v joins M in round r and so w joins D in round r + 1. Note that v actually does join M as v ∈ / Dr+1 implies that v did not receive a mark from a neighbor in M in round r. Furthermore node w does indeed join D because {v, w} ∈ Er+1 so that v can actually inform w about joining M . Thus event (v → w)r implies that all incident edges of w in Hr (i.e., dUr (w) := |ΓHr (w)| many) will not be contained in the graph Hr+2 . LetPX(v→w)r be the random variable with value dUr (w) if event (v → w)r occurs and 0 otherwise. Then X = {v,w}∈E ′ X(v→w)r denotes the number of removed edges of type (2) (with some double counting   involved). We now lower bound E X |E(Hr )| . As we have assumed that for its changes at the beginning of round r + 1, the adversary can not take into account the choice of the random values made in round r, the probability of the event (v → w)r for {v, w} ∈ E ′ is at least 1/(dUr (v) + dUr (w)). Thus we can lower bound as follows. X   E X |E(Hr )| = E[X(v→w)r |E(Hr )|] + E[X(w→v)r |E(Hr )|] {v,w}∈E ′ = X P [(v → w)r ] · dUr (w) + P [(w → v)r ] · dUr (v) X X {v,w}∈E ′ ≥ {v,w}∈E ′ dUr (w) dUr (v) + = dUr (v) + dUr (w) dUr (w) + dUr (v) 1 = |E ′ | . {v,w}∈E ′ To determine the expected edges that are removed we now take care of double counting: If for an edge {v, w} of Hr there are x, y with {x, v} ∈ E ′ and {y, w} ∈ E ′ such that both (x → v)r and (y → w)r holds, {v, w} is counted twice in X. Every edge in E(Hr ) \ E ′ is not contained in the graph Hr+2 . However, we might have counted such an edge twice in X as follows; There might be v, w, x, y ∈ Ur with {x, v}, {v, w}, {w, y} ∈ E(Hr ) such that (x → v)r , (y → w)r and {v, w} ∈ / E ′ . Thus E[X]+ E (Hr )\E ′ counts each removed edge between undecided nodes up to three times (once by E (Hr ) \ E ′ and twice by X). Hence the number of edges between undecided nodes that are removed in expectation is lower bounded by  1 1 E[X] + E (Hr ) \ E ′ ≥ 3 3 E ′ + E (Hr ) \ E ′ 14  = 1 E (Hr ) . 3 Remark. The proof of Lemma 5.2 relies on a 2-oblivious adversary: If the adversary knew the random values of round r, it could, e.g., delete all edges between nodes for which (v → w)r holds. Therefore, the probability of event (v → w)r would be zero for all {v, w} ∈ E ′ . To show that the algorithm terminates in O(log n) rounds we need the following lemma. Lemma 5.3. For every c ∈ [0, 1) there is a T ∈ O(log K) such that for every series of random variables K ≥ X0 ≥ X1 ≥ . . . with E[Xi+1 |Xi ] ≤ c · Xi , w.h.p., we have XT < 1. Proof sketch: For 0 ≤ i ≤ T = O(log n) define the random variable Yi+1 that is 1 if Xi+1 ≤ (1/2+c/2)Xi or Xi+1 < 1. Due to Markov’s inequality the probability that Yi equals 1 is constant. We have XT < 1 if at least log2 K of the Yi ’s have value one and it is straightforward to show that this holds w.h.p. Lemmas 5.2 and 5.3 imply the O(log n) ’runtime’ of DM IS . Lemma 5.4. There is a T ∈ O(log n) such that for any dynamic graph and any input, after T − 1 rounds of DM IS , w.h.p. all nodes are decided. Proof. Assume DM IS is started in round j on some dynamic graph G0 , G1 , . . . with input (M, D). For each i ≥ 0, let Xi be the random variable whose value is the number of edges in G2i∩ j+2i with both endpoints 2 2 in Uj+2i . We have n ≥ X0 ≥ X1 , . . . and by Lemma 5.2 E[Xi+1 |Xi ] ≤ 3 Xi holds. By Lemma 5.3, there is a T ′ ∈ O log(n2 ) = O log n such that for any such sequence of random variables, w.h.p., 2T ′ ∩ . Then in round XT ′ < 1 holds, which means that there are no two undecided nodes adjacent in Gj+2T ′ ′ j + 2T + 1, all leftover undecided nodes either join D or M . The statement in the lemma then holds for T := 2T ′ + 2 = O(log n). Note that Lemma 5.4 does not need any requirements on the input. However, in the proof of Lemma 5.1, it is necessary that the input is a partial solution. Proof of Lemma 5.1. Let T ∈ O(log n) be chosen as in Lemma 5.4. That is, after T − 1 rounds of DM IS , w.h.p. all nodes are decided, i.e., all nodes are either in M or D and do not change their status afterwards. We now show that DM IS is T -dynamic, w.h.p. Property A.1: Getting (M, D) as input, DM IS only adds nodes to these sets but will never delete a node from them. Thus DM IS is input-extending, which proves A.1. Property A.2: Let j ≥ T − 1 and the input (M, D) be a partial solution for (MP , MC ) in the graph Gj−T +1 , i.e., M is an independent set in Gj−T +1 and every node in D has a neighbor in M in Gj−T +1 . Let (M ′ , D ′ ) := DM IS jj−T +2 (M, D). We show the following two properties that imply property A.2 because, w.h.p., no node is undecided in round j − T + 1. ∩T M ′ is an independent set in G∩T j , deterministically. Consider two nodes adjacent in Gj , i.e., adjacent in every graph Gj−T +1 , . . . , Gj . As the input set M is an independent set in Gj−T +1 , they can not be both in M in the beginning. Furthermore, they can not both join M in the same round as they are part of each others neighborhood and only a node with the smallest random value among its neighbors may join M . If one of the nodes joins M in some round (or already was in M in the beginning), then the other one joins D latest in the next round. As nodes do not leave M or D again, there is no way for the two nodes to be both in M in round j. Therefore, M ′ is an independent set in G∩T j and this holds deterministically as it is not required that all nodes are decided. M ′ is a dominating set in G∪T j , w.h.p. If a node is in D at the beginning, it is adjacent to a node in M in Gj−T +1 , as the input (M, D) is a partial solution for (MP , MC ) in Gj−T +1 . An initially undecided node joins D in one of the rounds j − T + 2, . . . , j only if it has been adjacent to a node in M in some graph Gj−T +2 , . . . , Gj . As nodes do not leave M , it follows that any node which is in D ′ has been adjacent to a node in M ′ in some graph Gj−T +1 , . . . , Gj , i.e., in the graph G∪T j . In round j, w.h.p., there is no undecided ′ ′ ′ node left, i.e., all nodes not in M are in D . It follows that M is, w.h.p., a dominating set in G∪T j . 15 5.2 The O(log n)-Network-Static MIS Algorithm SM IS The framework presented in Section 3 applied to the MIS problem starts a new instance of DM IS in every round. After T rounds it outputs the oldest instance and discards it. These instances should not start to compute a solution from scratch if the dynamic graph does not change much. Instead each instance begins its computation with a backbone independent set that does locally not change if the graph is locally static. The algorithm that computes the backbone independent has to be network static (cf. Definition 3.3) and here we present and analyze the network static algorithm SM IS (static MIS). It is strongly influenced by Ghaffari’s algorithm [Gha16] with the crucial difference that nodes can leave the set of MIS nodes and become undecided again. SM IS uses the current graph for all communication. Algorithm 5 SM IS Input: Output: Vars.: (M, D) (M, D) M, D, U p(v), δ(v) Start: p(v) = 1/2 (independent set, dominated nodes) MIS-nodes, dominated nodes, undecided nodes desire-level, effective degree // No communication round needed Round r of SM IS 1: U = V \ (M ∪ D) 2: switch v ∈ ? do 3: case v ∈ M : send mark to all neighbors in NGr (v) 4: case v ∈ U : Become candidate with probability p(v). Send p(v) and candidate-note to all neighbors in Gr . 5: Receive marks, desire-levels and candidate-notes from all neighbors in Gr . If v ∈ U : //Pupdate desire-level δ(v) = p(u) u∈U∩NGr (v) ( 1 } if δ(v) ≥ 2 max{p(v)/2, 5n p(v) = min{2p(v), 1/2} if δ(v) < 2 6: switch v ∈ ? do 7: case v ∈ U and mark received: join D 8: case v ∈ U , no mark received, being candidate and no candidate-note received: join M 9: case v ∈ M and mark received: join U 10: case v ∈ D and no mark received: join U 11: Output (M, D) SM IS: At all times, each node is in exactly one of three sets: In the set M of MIS-nodes, in the set D of dominated nodes or in the set U of undecided nodes. Each node v has a desire-level p(v) which is initially set to 1/2 and is updated in every round. It is upper bounded by 1/2 and lower bounded by 1/(5n). P In each round, the effective-degree of v, δ(v), is set to δ(v) = u∈N (v)∩U p(u) and is used to update v’s desire-level. As long as v is decided, its desire-level does not influence the algorithm and thus it is not updated until v becomes undecided again. pr (v) (δr (v)) denotes the desire-level (effective-degree) of v at the beginning of round r before they are updated in the course of the round. Sending. At the start of round r each node v in M sends a mark to all neighbors in Gr ; each node v in U becomes a candidate with probability pr (v) and sends pr (v) and the information whether it became a candidate to its neighbors in Gr . After Receiving. Undecided nodes update their desire-level. Nodes that were in state undecided and received a mark join the set D. Still undecided nodes that became a candidate and have no neighbor that is also a candidate join M . Nodes in M that received a mark leave M and become undecided. Nodes in D which loose their domination, i.e., do not receive a mark in the current round, become undecided. 16 Output. The algorithm returns the state of each node at the end of each round. Lemma 5.5. SM IS is (T, α = 2)-network-static for (MP , MC ), w.h.p., for a T ∈ O(log n). We show that after O(log n) rounds of SM IS, a node v is decided, w.h.p., if its 2-neighborhood is static, and does not change its output as long as its 2-neighborhood is static. The core ideas of the proof are contained in the purely local analysis of [Gha16]. However, the proof needs to be adapted in several places. Most important is the change of the definition of golden rounds of type two that is needed because SM IS is a pipelined version of the algorithm in [Gha16]. Further, we need a more careful reasoning due to the facts that a node might not have desire level 1/2 when its neighborhood becomes static and the cap of desire levels at 1/(5n). Lemma 5.6. After O(log n) rounds of SM IS, a node v is decided, w.h.p., if its 2-neighborhood is static, and does not change its output as long as its 2-neighborhood is static. Proof. We first show that a node v does not change its output once it is 6= ⊥ and if its 2-neighborhood is static. A node v leaves M only if it becomes adjacent to a node that has already been in M as well. This does not happen if v’s 1-neighborhood is static. Node v may only leave D if it either looses a neighbor (due to a graph change) which was in M or if some neighbor w of v leaves M . The first will not happen if v’s 1-neighborhood does not change, the second, as seen before, does not happen if w’s 1-neighborhood is static, which is the case if v’s 2-neighborhood is static. To show that a node is decided fast, w.h.p., let c ≥ 1. We show that there is a β such that when SM IS is started in any round j with some input on a dynamic graph which is static in the 2-neighborhood of a node v ∈ Vj , the probability that v is still undecided after β log n rounds is at most n1c . We say an undecided node u is low-degree if δr (u) < 2, and high-degree otherwise. We define two types of golden rounds for an undecided node v: (1) rounds in which δr (v) < 2 and pr (v) = 1/2, (2) rounds in which δr (v) ≥ 1 and at least δr (v)/10 of it is contributed by low-degree neighbors that did not receive a mark at the beginning of the round. For the sake of analysis, we assume that node v keeps track of the number of golden rounds of each type it has been in. We show the following two statements: β log n. I. After β log n rounds, either v is decided or at least one of its two golden round counts reached 13 II. If v is still undecided and r a golden round, with probability at least 1/200, v gets decided in round r or r + 1. If r is a golden round, we call the rounds r and r + 1 a golden phase. By II, the probability that v does β log n golden rounds, there are at least not get decided in a golden phase is at most (1 − 1/200). Among 13 β 26 log n golden phases (in the worst case, both rounds of a golden phase are golden rounds). β It follows that the probability that v is not decided after at least 13 log n golden rounds (that is by I after β log n rounds) is at most  1 1− 200 β 26 log n β log n − 200·26 ≤e   β 1 200·26 1 ≤ ≤ c n n for β ≥ 200 · 26 · c . Recall that Ur denotes the set of undecided nodes at the beginning of round r. We write Ur (v) for the set of undecided neighbors of v at the beginning of round r. A decided node will not get undecided as long as its 1-neighborhood is static, so a decided neighbor of v does not get undecided if v’s 2-neighborhood is static. Hence, one has Ur+1 (v) ⊆ Ur (v) (this is also valid for the algorithm in [Gha16], where decided nodes are considered as removed from the graph). 17 Proof of I. We consider the first β log n rounds after the start of SM IS. Let g1 and g2 be the number of golden rounds of type 1 and type 2, respectively, during that period. We assume that after β log n rounds, v β β log n, and show that g2 ≥ 13 log n. is not decided and g1 ≤ 13 Let h be the number of rounds in which δr (v) ≥ 2. We first show that if less than 1/13 of the β log n rounds are g1 rounds then almost half of the rounds (actually a 6/13 fraction of the rounds minus an absolute value of 21 log 52 n) are rounds with δr (v) ≥ 2, i.e., we lower bound h. Then, in a second step we show that h is upper bounded by a function of g2 which then implies the desired lower bound for g2 . We first lower bound h. If δr (v) < 2, either pr (v) = 1/2, which means that r is a type-1 golden round and pr (v) does not change, or pr (v) < 1/2 and pr (v) will increase by a factor of 2 (capped by 1 1/2). As pr (v) is between 5n and 1/2, the number of factor 2 increases of pr (v) is at most the number of 5 factor 2 decreases plus log 2 n (every factor 2 decrease cancels one factor 2 increase, leaving at most log 52 n further increases without exceeding 1/2). So if we take the total of β log n rounds, subtract the type-1 golden rounds and the ’log 25 n-slack’, in at most half of the remaining rounds, the desire-level can increase, because for each increasing round there must be a decreasing counterpart. This means that there are at least 5 1 2 (β log n − g1 − log 2 n) decreasing rounds, i.e., rounds with δr (v) ≥ 2. It follows β 5 g1 ≤ 13 6β 1 5 1 h ≥ (β log n − g1 − log n) ≥ log n − log n . 2 2 13 2 2 (2) Now upper bound h with a function of g2 . If δr (v) ≥ 1 and r is not a type-2 golden round, one has X X X δr+1 (v) = pr+1 (u) = pr+1 (u) + pr+1 (u) u∈Ur+1 (v) u∈Ur+1 (v) δr (u)<2 u∈Ur+1 (v) δr (u)≥2 For u ∈ Ur+1 (v) with δr (u) < 2 we have pr+1 (u) ≤ 2pr (u) . For u ∈ Ur+1 (v) with δr (u) ≥ 2 one has 1 . As v has at most n neighbors, the contribution of nodes u with either pr+1 (u) = 12 pr (u) or pr+1 (u) = 5n 1 pr+1 (u) = 5n to δr+1 (v) is at most 1/5. Hence we get X δr+1 (v) ≤ 2 pr (u) + u∈Ur+1 (v) δr (u)<2 1 2 X pr (u) + u∈Ur+1 (v) δr (u)≥2 1 . 5 (3) As r is not a type-2 golden round and δr (v) ≥ 1, one has X u∈Ur+1 (v) δr (u)<2 pr (u) ≤ 1 δr (v), 10 X pr (u) ≤ δr (v), u∈Ur+1 (v) δr (u)≥2 1 1 ≤ δr (v) . 5 5 (4) Using the inequalities in (4) to upper bound the terms in Equation (3) we obtain δr+1 (v) ≤ 2 1 1 1 4 δr (v) + δr (v) + δr (v) = δr (v) . 10 2 5 5 Thus every round in which δr (v) is increased to a value larger than 2 is a type-2 golden round. The effect of these rounds is canceled by at most four rounds with δr (v) ≥ 2 which are not golden rounds of type 2, because in these rounds, the effective degree shrinks by a factor of at least 4/5 whereas in a golden round it is increased by at most a factor of 2 and (4/5)4 · 2 < 1. Apart from these 5g2 rounds that are either golden rounds or cancellation counterparts, in every remaining round with δr (v) ≥ 2, the effective degree is decreased at least by a 4/5 factor. Due to δr (v) ≤ n this can happen at most log 5 n times while 4 keeping δr (v) ≥ 2 . It follows that the number of rounds with δr (v) ≥ 2 is at most log 5 n + 5g2 , i.e., h ≤ log 5 n + 5g2 . Together with h ≥ 4 6β 13 log n − 21 log 52 n (Equation (2)) we get g2 ≥ 18 β 13 4 log n. Proof of II. In a type-1 golden round, v becomes a candidate with probability 1/2. The probability that no undecided neighbor of v becomes a candidate is Y u∈U (v) P (1) 1 (1 − pr (u)) ≥ 4− u∈U (v) pr (u) ≥ 4−δr (v) ≥ 4−2 = . 16 So if v does not receive a mark in round r, it joins M with probability at least 1/32 > 1/200 in a type-1 golden round. Otherwise (if v receives a mark), it joins D in the next round. Let L be the set of v’s undecided, low-degree neighbors that did not receive a mark. In a type-2 golden round, the probability that there is a candidate in L is at least P Y 1− (1 − pr (u)) ≥ 1 − e− u∈L pr (u) ≥ 1 − e−δr (v)/10 ≥ 1 − e−1/10 > 0.08 . u∈L If u ∈ L is a candidate, the probability that no undecided neighbor of u is also a candidate is at least Q −δr (u) > 1 . In this case, as u did not receive a mark at the beginning of the w∈U (u) (1 − pr (w)) ≥ 4 16 round, it will join M (line 8) and therefore v joins D in the next round, because v and u stay adjacent due to the assumption that the 1-neighborhood of v is static. So the probability that one of v’s neighbors joins M (and thus v joins D in the next round) is at least 0.08/16 = 1/200. Before we prove Lemma 5.5, we shortly describe what it means for an output vector φ to be partial packing and partial covering for the MIS problem. If there are no two adjacent nodes in the state mis, setting all nodes with φv = ⊥ to the state dominated yields an extension in which the LCL condition of MP is satisfied for all nodes with φv 6= ⊥. On the other hand, such an extension can only exist if no two mis nodes are adjacent. Furthermore, the LCL condition of MC is satisfied if and only if every node in the state dominated has an mis neighbor. If, for some output φ, all nodes in the state dominated already have an mis neighbor their LCL condition is also satisfied for all extensions of φ. Conversely, if one dominated node in φ does not have an mis neighbor in φ its LCL condition is violated in the extension which sets all nodes with φv = ⊥ to the state dominated. Thus, φ is partial packing for MP if and only if no two mis nodes are adjacent and partial covering for MC if and only if every dominated node is adjacent to an mis node. Proof of Lemma 5.5. Property B.1: If at the beginning of round r, there are two nodes in M adjacent in Gr , both will receive a mark (cf. line 3 in Algorithm 5) and leave M (line 9) by the end of the round. Additionally, a node from U only joins M if it did not receive a mark, i.e., if it has no neighbor in M in Gr . Finally, no two adjacent nodes from U join M in the same round because a node only joins M if it has no other candidate in its neighborhood. If at the start of round r, there is a node in D not adjacent to a node in M , it will not receive a mark and leave D (line 10) by the end of the round. Additionally, a node from U joins D in round r only if it received a mark, i.e., has a neighbor in M in Gr . Property B.1 holds independently of the choice of T . Property B.2: Let v ∈ Vr and T = O(log n) be the time until v is decided, w.h.p., if SM IS is started in round r and v’s 2-neighborhood is static (cf. Lemma 5.6). Let r2 ≥ r+T such that Gl [N2 (v)] = Gl′ [N2 (v)] for all l, l′ ∈ [r, r2 ] (for r2 < r + T , B.2 holds trivially). Then, by Lemma 5.6, v is decided after round r + T , w.h.p., and does not change its output as long as its 2-neighborhood is static, i.e., at least until round r2 . 5.3 Proof of Theorem 1.3 Theorem 1.1 with the O(log n)-network-static algorithm SM IS for (MP , MC ) (cf. Lemma 5.5) and the O(log n)-dynamic algorithm DM IS (cf. Lemma 5.1) for (MP , MC ) implies the result. Remark. The analysis of DM IS and SM IS (in particular the proof of Lemma 5.4) relies on a 2-oblivious adversary. 19 6 Basic Randomized Coloring Algorithm for Static Graphs The following algorithm is a variant of the simplest randomized distributed node coloring algorithm (in static graphs). Usually (e.g. in [BEPS12, Joh99]), this algorithm is described to operate in phases, each consisting of two communication rounds: In the first round of a phase, each uncolored node picks a tentative uniformly at random color c from its palette and sends it to its neighbor. It keeps c as its permanent color if none of its uncolored neighbors chose c in the same round. If it keeps a color permanently it informs its neighbors about its permanent color in the next round and deletes the received colors from its palette. Initially, the color palette of a node v is set to [d(v) + 1]. With a slight adaption we can change this algorithm to an algorithm consisting of only one type of round. This has the advantage that this algorithm can also be used in an asynchronous wake-up model without needing a global clock that tells each node which type of round to execute. Algorithm 6 BASIC C OLORING Start: φv = ⊥, Pv = {1} // No communication round needed Round r of BASIC C OLORING 1: switch φv = ? do 2: case φv = ⊥: Pick tentative color cv ∈ Pv uniformly at random and send it to neighbors. 3: case φv 6= ⊥: Send φv to neighbors. 4: Receive fixed colors Fv = {φw | w ∈ N (v)} and tentative colors Sv = {cw | w ∈ N (v)}. 5: Pv = [d(v) + 1] \ Fv // Update color palette 6: switch φv = ? do 7: case φv = ⊥: 8: if cv ∈ Pv and cv ∈ / Sv then φv = cv else keep φv = ⊥. 9: case φv 6= ⊥: Do nothing. 10: Output φ We believe that the following proofs are well known folklore but we could not find a publication that contains them. Lemma 6.1. In one round of Algorithm 6, each node gets colored with probability at least 1/64 or its color palette shrinks by a factor of at least 1/4. Proof. Fix some arbitrary round and an uncolored node v. Let Pv be v’s color palette and U (v) the set of v’s uncolored neighbors. We assume |U (v)| ≥ 1 (otherwise, v will be colored in the current round as there will be no conflicts with v’s color choice). It follows that also U (u) ≥ 1 for all u ∈ U (v), as v ∈ U (u). For all nodes w ∈ V one has |Pw | ≥ |U (w)| + 1. This holds at the beginning of the algorithm as Pw is initially set to [d(w) + 1]. In the following rounds, a color may only be removed from Pw if it is taken by a neighbor. Therefore, v and its uncolored neighbors have palettes of size at least 2. For c ∈ Pv , define the weight of c as wc := X {u∈U (v)|c∈Pu } 1 . |Pu | Let Zv be the set of those colors in Pv which have been permanently chosen by a neighbor of v in the last round (these are the colors which will be deleted from Pv in the current round). Call a color c ∈ Pv good if c∈ / Z and wc ≤ 2. For a good color c we have Y Pr (v keeps c | v chose c as tentative color) = {u∈U (v)|c∈Pu } 20  1− 1 |Pu |  (1) 1 ≥ 4−wc ≥ 4−2 = . 4 Because of X c∈Pv wc = X u∈U (v) X c∈Pu ∩Pv 1 |Pu | ! = X |Pu ∩ Pv | ≤ |U (v)| , |Pu | u∈U (v) colors from Pv can have a weight larger than 2. So in addition to the colors in it follows that at most |U (v)| 2 |U (v)| ≤ |P2v | it follows that in Pv , at least |Pv |−|Zv |− |P2v | Zv , at most 2 colors in Pv are not good. With |U (v)| 2 colors are good. When we assume that |Zv | ≤ |P4v | (i.e., the color palette of v shrinks by a factor of at most 1/4), then at least |Pv | − |Zv | − |P2v | ≥ |P4v | colors are good. So in this case, the probability for choosing a good color is at least 1/4, which means that the overall probability for v being colored is at least 1/64. Therefore, if the color palette of v does not shrink by a factor of at least 1/4, v gets colored with probability at least 1/64. With Lemma 6.1 we can prove the O(log n) runtime of Algorithm 6. Lemma 6.2. There is a T ∈ O(log n) such that after T rounds of Algorithm 6, w.h.p. all nodes are colored.  Proof. Fix a constant b ≥ 1 and set T1 := log 3 n4 , T2 := 64(b + 1) ln(n) and T := T1 + T2 = O(log n). 4 For each node v, denote by Av the event that v is not colored after T rounds. For Av to come true, there can have been at most T1 rounds in which v’s color palette shrinks by a factor of at least 1/4, because after T1 T such rounds, one has |Pv | ≤ n 43 1 = 1 (initially it is |Pv | ≤ n), which means that v’s color palette can not shrink another time without v getting colored (a node will get colored before its palette gets empty). By Lemma 6.1 it follows that there must have been at least T2 rounds in which v got colored with probability T2 1 1 T2 . With a union bound over all nodes, we ) ≤ e− 64 = nb+1 at least 1/64, so we obtain Pr(Av ) ≤ (1 − 64 can upper bound the probability that there is an uncolored node left after T rounds: ! [ 1 n Au ≤ b+1 = b . Pr n n u∈V It follows that with probability at least 1 − 1 , nb all nodes are colored after T rounds. 21 References [AAL+ 16] J. Augustine, C. Avin, M. Liaee, G. Pandurangan, and R. Rajaraman. Information spreading in dynamic networks under oblivious adversaries. In Proc. 30th Symp. on Distributed Computing (DISC), pages 399–413, 2016. [ABI86] N. Alon, L. Babai, and A. Itai. A fast and simple randomized parallel algorithm for the maximal independent set problem. J. of Algorithms, 7(4):567–583, 1986. [AGKM15] M. Ahmadi, A. Ghoselahi, F. Kuhn, and A.R. Molla. The cost of global broadcast in dynamic radio networks. In Proc. 19th Conf. on Principles of Distributed Systems (OPODIS), pages 7:1–7:17, 2015. [AKL08] C. Avin, M. Koucký, and Z. Lotker. How to explore a fast-changing world (cover time of a simple random walk on evolving graphs). In Proc. 35th Int. Coll. on Automata, Languages and Programming (ICALP, pages 121–132, 2008. [APRU15] J. Augustine, G. Pandurangan, P. Robinson, and E. Upfal. Distributed agreement in dynamic peer-to-peer networks. J. Comput. Syst. Sci., 81(7):1088–1109, 2015. [APSPS92] B. Awerbuch, B. Patt-Shamir, D. Peleg, and M. E. Saks. Adapting to asynchronous dynamic networks. In Proc. of the 24th Annual ACM Symposium on Theory of Computing (STOC), pages 557–570, 1992. [AS88] B. Awerbuch and M. Sipser. Dynamic networks are as fast as static networks. In Proc. 29th Symp. on Foundations of Computer Science (FOCS), pages 206–219, 1988. [BCF09] H. Baumann, P. Crescenzi, and P. Fraigniaud. Parsimonious flooding in dynamic graphs. In Proc. of 28th Symp. on Principles of Distributed Computing (PODC), pages 260–269, 2009. [BE13] L. Barenboim and M. Elkin. Distributed Graph Coloring: Fundamentals and Recent Developments. Morgan & Claypool Publishers, 2013. [BEPS12] L. Barenboim, M. Elkin, S. Pettie, and J. Schneider. The locality of distributed symmetry breaking. In Proc. 53th Symp. on Foundations of Computer Science (FOCS), 2012. [CFMS15] A. Casteigts, P. Flocchini, B. Mans, and N. Santoro. Shortest, fastest, and foremost broadcast in dynamic networks. Int. J. Found. Comput. Sci., 26(4):499–522, 2015. [CHHK16] K. Censor-Hillel, E. Haramaty, and Z.S. Karnin. Optimal dynamic distributed MIS. In Proc. 35th ACM Symp. on Principles of Distributed Computing (PODC), pages 217–226, 2016. [CMPS09] A. E. F. Clementi, A. Monti, F. Pasquale, and R. Silvestri. Broadcasting in dynamic radio networks. J. Comput. Syst. Sci., 75(4):213–230, 2009. [Dij74] E.W. Dijkstra. Self-stabilizing systems in spite of distributed control. Communications of the ACM, 11:643–644, 1974. [DMP15] A. Das Sarma, A. R. Molla, and G. Pandurangan. Distributed computation in dynamic networks via random walks. Theor. Comput. Sci., 581:45–66, 2015. [Dol00] S. Dolev. Self-Stabilization. MIT Press, 2000. [DPR+ 13] C. Dutta, G. Pandurangan, R. Rajaraman, Z. Sun, and E. Viola. On the complexity of information spreading in dynamic networks. In Proc. 24th ACM-SIAM Symp. on Discrete Algorithms (SODA), pages 717–736, 2013. 22 [DR14] O. Denysyuk and L. E. T. Rodrigues. Random walks on evolving graphs with recurring topologies. In Proc. 28th Symp. on Distributed Computing (DISC), pages 333–345, 2014. [FKP11] P. Fraigniaud, A. Korman, and D. Peleg. Local distributed decision. In FOCS, pages 708–717. IEEE Computer Society, 2011. [FNC15] M. Függer, T. Nowak, and B. Charron-Bost. Diffusive clock synchronization in highly dynamic networks. In Proc. 49th Conf. on Information Sciences and Systems (CISS), pages 1–6, 2015. [Gha16] M. Ghaffari. An improved distributed algorithm for maximal independent set. In Proc. 27th ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 270–277, 2016. [HK11] B. Haeupler and D. Karger. Faster information dissemination in dynamic networks via network coding. In Proc. 30th ACM Symp. on Principles of Distributed Computing (PODC), pages 381– 390, 2011. [ISWW09] R. Ingram, P. Shields, J. E. Walter, and J. L. Welch. An asynchronous leader election algorithm for dynamic networks. In Proc. of 23rd IEEE Int. Symp. on Parallel and Distributed Processing (IPDPS), pages 1–12, 2009. [Joh99] Ö. Johansson. Simple distributed Delta+1-coloring of graphs. Inf. Process. Lett., 70(5):229– 232, 1999. [JYZ17] I. Jahja, H. Yu, and Y. Zhao. Some lower bounds in dynamic networks with oblivious adversaries. In Proc. 31st Symp. on Distributed Computing (DISC), pages 29:1–29:16, 2017. [KLLO10] F. Kuhn, C. Lenzen, T. Locher, and R. Oshman. Optimal gradient clock synchronization in dynamic networks. In Proc. 29th ACM Symp. on Principles of Distributed Computing (PODC), pages 430–439, 2010. [KLO10] F. Kuhn, N. Lynch, and R. Oshman. Distributed computation in dynamic networks. In Proc. 42nd ACM Symposium on Theory of Computing (STOC), pages 513–522, 2010. [KLO11] F. Kuhn, T. Locher, and R. Oshman. Gradient clock synchronization in dynamic networks. Theory Comput. Syst., 49(4):781–816, 2011. [KMO11] F. Kuhn, Y. Moses, and R. Oshman. Coordinated consensus in dynamic networks. In Proc. Symp. on Principles of Distributed Computing (PODC), pages 1–10, 2011. [LSW09] C. Lenzen, J. Suomela, and R. Wattenhofer. Local algorithms: Self-stabilization on speed. In Proc. 11th Symp. on Stabilization, Safety, and Security of Distributed Systems (SSS), pages 17–34, 2009. [Lub86] M. Luby. A simple parallel alg. for the maximal ind. set problem. SIAM J. Comp., 15:1036– 1053, 1986. [MCS13] O. Michail, I. Chatzigiannakis, and P. G. Spirakis. Naming and counting in anonymous unknown dynamic networks. In Proc. 15th Symp. on Stabilization, Safety, and Security of Distributed Systems (SSS), pages 281–295, 2013. [MCS14] O. Michail, I. Chatzigiannakis, and P. G. Spirakis. Causality, influence, and computation in possibly disconnected synchronous dynamic networks. J. Parallel Distrib. Comput., 74(1):2016– 2026, 2014. [MRNZ10] M.Yves, J. M. Robson, S.-D. Nasser, and A. Zemmari. An optimal bit complexity randomized distributed mis algorithm (extended abstract). In Proc. Structural Information and Communication Complexity (SIROCCO), pages 323–337, 2010. 23 [NS93] M. Naor and L. J. Stockmeyer. What can be computed locally? In STOC, pages 184–193. ACM, 1993. [OSM04] R. Olfati-Saber and R. M. Murray. Consensus problems in networks of agents with switching topology and time-delays. IEEE Transactions on Automatic Control, 49(9):1520–1533, 2004. [OW05] R. O’Dell and R. Wattenhofer. Information dissemination in highly dynamic graphs. In Proc. of 9th Joint Workshop on Foundations of Mobile Computing (DIALM-POMC), pages 104–110, 2005. [Pel00] D. Peleg. Distributed Computing: A Locality-sensitive Approach. Society for Industrial and Applied Mathematics, 2000. [RB04] W. Ren and R. W. Beard. Consensus of information under dynamically changing interaction topologies. In Proc. of American Control Conference, pages 4939–4944, 2004. [San15] N. Santoro. Time to change: On distributed computing in dynamic networks (keynote). In Proc. 19th Conf. on Principles of Distributed Systems (OPODIS), pages 3:1–3:14, 2015. [Win04] A. Windsor. A simple proof that finding a maximal independent set in a graph is in NC. Inf. Process. Lett., 92(4):185–187, 2004. [YZJ16] H. Yu, Y. Zhao, and I. Jahja. The cost of unknown diameter in dynamic networks. In Proc. 28th ACM Symp. on Parallelism in Algorithms and Architectures (SPAA), pages 405–416, 2016. 24
8cs.DS
THE TWO-DIMENSIONAL CENTRALIZER CONJECTURE arXiv:1802.04685v2 [math.AC] 20 Feb 2018 VERED MOSKOWICZ Abstract. A result by C. C.-A. Cheng, J. H. Mckay and S. S.-S. Wang says the following: Suppose Jac(A, B) ∈ C∗ and Jac(A, w) = 0 for A, B, w ∈ C[x, y]. Then w ∈ C[A]. We show that in CMW’s result it is possible to replace C by any field of characteristic zero, and we conjecture the following ’two-dimensional Centralizer Conjecture over D’: Suppose Jac(A, B) ∈ D ∗ and Jac(A, w) = 0 for A, B, w ∈ D[x, y], D is an integral domain of characteristic zero. Then w ∈ D[A]. We show that if the famous two-dimensional Jacobian Conjecture is true, then the two-dimensional Centralizer Conjecture is true. 1 Introduction Throughout this note, k denotes a field of characteristic zero, D denotes an integral domain of characteristic zero (D is commutative) with field of fractions Q(D). The group of invertible elements of a ring R will be denoted by R∗ . In [6, Theorem 1], C. C.-A. Cheng, J. H. Mckay and S. S.-S. Wang have shown that ‘the centralizer with respect to the Jacobian’ of an element A ∈ C[x, y] which has a Jacobian mate, equals the polynomial ring in A over C: Suppose Jac(A, B) ∈ C∗ and Jac(A, w) = 0 for A, B, w ∈ C[x, y]. Then w ∈ C[A]. We show that C can be replaced by k. Then we conjecture that k can be replaced by any integral domain of characteristic zero, and call this ’the two-dimensional Centralizer Conjecture over D’: Suppose Jac(A, B) ∈ D∗ and Jac(A, w) = 0 for A, B, w ∈ D[x, y]. Then w ∈ D[A]. The famous two-dimensional Jacobian Conjecture says that every k-algebra endomorphism f : (x, y) 7→ (p, q) of k[x, y] having an invertible Jacobian, Jac(p, q) := px qy − py qx ∈ k[x, y]∗ = k ∗ , is an automorphism of k[x, y]; it was raised by O. H. Keller [13], actually over Z not over k. We show that if the two-dimensional Jacobian Conjecture is true then the twodimensional Centralizer Conjecture is true. Therefore, if the two-dimensional Centralizer Conjecture is false for some D, then the two-dimensional Jacobian Conjecture is false. We ’believe’ that the two-dimensional Jacobian Conjecture is true, so there should be no counterexample to the two-dimensional Centralizer Conjecture. 2 CMW’s theorem over k We will show in two ways that in CMW’s theorem it is possible to replace C by k. 2.1 First way: Independent of the original CMW’s theorem We will apply the following observation of E. Formanek. 2010 Mathematics Subject Classification. Primary 14R15, 16W20; Secondary 13F20, 16S32. Key words and phrases. Jacobian Conjecture, Jacobian mate, automorphism pair, Dixmier Conjecture, Weyl algebras, Centralizers. 1 2 VERED MOSKOWICZ Proposition 2.1 (Formanek’s observation). Let F be any field. Assume that C, D ∈ F [x, y] are algebraically dependent over F . Then there exist h ∈ F [x, y] and u(t), v(t) ∈ F [t], such that C = u(h) and D = v(h). Proof. The proof of Formanek can be found in [16]. We wish to mention that it uses Lüroth’s theorem, a sharpening of E. Noether (characteristic zero) and A. Schinzel (arbitrary field); those three results can be found in [20, first chapter].  The following is a known result due to Jacobi (1841); we will only need the second statement of it. Theorem 2.2 (Jacobi’s theorem). Let F be any field, C, D ∈ F [x, y]. (1) If C and D are algebraically dependent over F , then Jac(C, D) = 0. (2) Assume that F is of characteristic zero. If Jac(C, D) = 0, then C and D are algebraically dependent over F . Proof. See [19, page 8] or [14, pages 19-20].  Actually, in (2) of Jacobi’s theorem, the base field F can be either a field of characteristic zero or a field of large enough characteristic, as is shortly explained in [19, page 8]. However, we are only interested in the zero characteristic case, since we are interested in the (two-dimensional) Jacobian Conjecture, which has a counterexample over a field of prime characteristic P , for example, (x, y) 7→ (x + xP , y). Now we are ready to prove CMW’s result over k: Theorem 2.3 (CMW’s theorem over k). Suppose Jac(A, B) ∈ k ∗ and Jac(A, w) = 0 for A, B, w ∈ k[x, y]. Then w ∈ k[A]. Proof. Jac(A, w) = 0, so by Jacobi’s theorem, Theorem 2.2 (2), we obtain that A and w are algebraically dependent over k. By Formanek’s observation, Proposition 2.1, applied to A and w we obtain that there exist h ∈ k[x, y] and u(t), v(t) ∈ k[t], such that A = u(h) and w = v(h). Then, u′ (h) Jac(h, B) = Jac(u(h), B) = Jac(A, B) ∈ k ∗ , where the first equality can be easily proved. Therefore, u′ (h) ∈ k ∗ (and Jac(h, B) ∈ k ∗ ). Write u(t) = cm tm + cm−1 tm−1 + · · · + c2 t2 + c1 t + c0 , cj ∈ k, so u′ (t) = mcm tm−1 + (m − 1)cm−1 tm−2 + · · · + 2c2 t + c1 , and then u′ (h) = mcm hm−1 + (m − 1)cm−1 hm−2 + · · · + 2c2 h + c1 . From u′ (h) ∈ k ∗ , we obtain that mcm hm−1 +(m−1)cm−1 hm−2 +· · ·+2c2 h+c1 ∈ ∗ k , which implies that mcm = (m − 1)cm−1 = . . . = 2c2 = 0, c1 ∈ k ∗ , and c0 ∈ k. Since k is of characteristic zero, we necessarily have cm = cm−1 = . . . = c2 = 0. Therefore, u(t) = c1 t + c0 , c1 ∈ k ∗ , and c0 ∈ k, so A = u(h) = c1 h + c0 . A−c0 0  Then, h = A−c c1 , which shows that w = v(h) = v( c1 ) ∈ k[A]. The above proof of Theorem 2.3 (which is based on Formanek’s observation) is independent of [6, Theorem 1], so it can serve as another proof for [6, Theorem 1]. Our proof of Theorem 2.3 is not valid if we replace k by a field of large enough characteristic (= a characteristic for which Jacobi’s theorem, Theorem 2.2 (2), is valid); indeed, although Formanek’s observation is valid for any field, we needed zero characteristic for ’jcj = 0 implies cj = 0, 2 ≤ j ≤ m’, and we do not have control on m. 2.2 Second way: Dependent on the original CMW’s theorem We can prove CMW’s theorem over k, Theorem 2.3, in a way which is not based on Formanek’s observation, but it relies on the original proof [6, Theorem 1]. For convenience, we will divide our proof to three steps: THE TWO-DIMENSIONAL CENTRALIZER CONJECTURE 3 • Step 1: Replace C by an algebraically closed field of characteristic zero. • Step 2: Prove the result for any sub-field of an algebraically closed field of characteristic zero. • Step 3: Consider k as a sub-field of k̄, where k̄ is an algebraic closure of k. Proposition 2.4 (Step 1). Let L be an algebraically closed field of characteristic zero. Suppose Jac(A, B) ∈ L∗ and Jac(A, w) = 0 for A, B, w ∈ L[x, y]. Then w ∈ L[A]. Proof. The proof of the original CMW’s theorem [6, Theorem 1] is still valid if we replace C by L. Indeed, that proof uses three results: Jacobi’s theorem, Theorem 2.2 (1), [22, Theorem 1] and [2, Corollary 1.5, p. 74]. In order to replace C by any algebraically closed field of characteristic zero, it is enough to check that each of these three results are valid over an algebraically closed field of characteristic zero; indeed: • Theorem 2.2 (1) is over any field. • [22, Theorem 1] is over any ring. • [2, Corollary 1.5, p. 74] is over an algebraically closed field of characteristic zero.  Proposition 2.5 (Step 2). Let L be an algebraically closed field of characteristic zero, and let K ⊆ L be any sub-field of L. Suppose Jac(A, B) ∈ K ∗ and Jac(A, w) = 0 for A, B, w ∈ K[x, y]. Then w ∈ K[A]. P Proof. w ∈ K[x, y], so we can write w = sj=0 wj y j , for some wj ∈ K[x], 0 ≤ j ≤ s. Pt A ∈ K[x, y], so we can write A = l=0 Al y l , for some Al ∈ K[x], 0 ≤ l ≤ t. ∗ A, B, w ∈ K[x, y] ⊆ L[x, y] satisfy Jac(A, B) ∈ K ∗ ⊆ PrL andi Jac(A, w) = 0, so Proposition 2.4 implies that w ∈ L[A], namely, w = i=0 ci A for some ci ∈ L, 0 ≤ i ≤ r. We will show that for every 0 P ≤ i ≤ r, ci ∈ K, by induction on r: P If r = 0, then w = c0 . Then sj=0 wj y j = c0 , so sj=0 wj y j − c0 = 0, namely, Ps j j=1 wj y + (w0 − c0 ) = 0. As an equation in L[x, y] = L[x][y], we get w0 − c0 = 0 and wj = 0, 1 ≤ j ≤ s. Hence K[x] ∋ w0 = c0 ∈ L, so c0 ∈ L ∩ K[x] = K. If Ptr = 1, then w = c0 + c1 A. On the one hand, w = c0 + c1 A = c0 + c1 ( l=0 Al y l ) = c0 + c1 (A0 + A1 y + · · · + At−1 y t−1 + At y t ) = (c0 + c1 A0 ) + c1 A1 y + · · · + c1 At−1 y t−1 + c1 At y t ; as an element of L[x][y] its (0, 1)-degree equals Ps j t and its (0, 1)-leading term is c1 At y t . On the other hand, w = j=0 wj y = s−1 s w0 + w1 y + · · · + ws−1 y + ws y ; as an element of K[x][y] ⊆ L[x][y] its (0, 1)degree equals s and its (0, 1)-leading term is ws y s . Combining the two yields that s t = s and c1 At = ws . Hence c1 = w At ∈ K(x), so c1 ∈ L ∩ K(x) = K. From w = c0 + c1 A, we get c0 = w − c1 A ∈ K[x, y]. Hence c0 ∈ L ∩ K[x, y] = K, so c0 ∈ K. Therefore, we obtained that w = c0 + c1 A ∈ K[A]. Pr Pr Pt i l i If r ≥ 2: On the one hand, w = i=0 ci A = i=0 ci ( l=0 Al y ) = c0 + Pt P t l r l c1 ( l=0 Al y )+· · ·+cr ( l=0 Al y ) ; as an element of L[x][y] its (0,P1)-degree equals s tr and its (0, 1)-leading term is cr Art y tr . On the other hand, w = j=0 wj y j ; as an element of K[x][y] ⊆ L[x][y] its (0, 1)-degree equals s and its (0, 1)-leading term is ws ws y s . Combining the two yields that tr = s and cr Art = ws . Hence cr = A r ∈ K(x), t so cr ∈ L ∩ K(x) = K. P Then r−1 c Ai = w − cr Ar ∈ K[x, y]. We can apply the induction hypothesis Pr−1 i=0i i on i=0 ci A and P obtain that for every 0 ≤ i ≤ r − 1, ci ∈ K. Therefore, we r  obtained that w = i=0 ci Ai ∈ K[A]. 4 VERED MOSKOWICZ Now we present a second proof for CMW’s theorem over k, Theorem 2.3: Proposition 2.6 (Step 3, second proof for CMW’s theorem over k). Suppose Jac(A, B) ∈ k ∗ and Jac(A, w) = 0 for A, B, w ∈ k[x, y]. Then w ∈ k[A]. Proof. Let k̄ be an algebraic closure of k. We have, k ⊆ k̄ with k̄ an algebraically closed field of characteristic zero. Apply Proposition 2.5 and get that w ∈ k[A].  3 The two-dimensional Centralizer Conjecture For u, v ∈ R[x, y], R a commutative ring, we will use the following usual terminology: • If Jac(u, v) ∈ R[x, y]∗ = R∗ , then we say that u has a Jacobian mate in R[x, y], v (and vice versa), and u, v is a Jacobian pair (in R[x, y]). • If (x, y) 7→ (u, v) is an automorphism of R[x, y], then we say that u, v is an automorphism pair (in R[x, y]). (An automorphism pair is a Jacobian pair, since the Jacobian of an automorphism pair is invertible in R[x, y]). Also, we will use the following non-usual terminology: If Jac(u, v) = 0, then we say that v is in ’the centralizer of u with respect to the Jacobian’, u is in ’the centralizer of v with respect to the Jacobian’, and u, v ’commute with respect to the Jacobian’. From CMW’s theorem over k, Theorem 2.3 or Proposition 2.6, it is immediate to obtain the following: Theorem 3.1. Suppose Jac(A, B) ∈ D[x, y]∗ = D∗ and Jac(A, w) = 0 for A, B, w ∈ D[x, y]. Then w ∈ Q(D)[A]. Proof. A, B ∈ D[x, y] ⊂ Q(D)[x, y] satisfy Jac(A, B) ∈ D∗ ⊂ Q(D)∗ and w ∈ D[x, y] ⊂ Q(D)[x, y] satisfies Jac(A, w) = 0. We can apply Theorem 2.3 or Proposition 2.6 (Q(D) is a field of characteristic zero) and obtain that w ∈ Q(D)[A].  Theorem 3.1 shows that there exists d(w) ∈ D such that d(w)w ∈ D[A]; indeed, P λi i 0 6= µi , λi ∈ D. Then, since w ∈ Q(D)[A] we can write w = µi A , for some Q P Q λj µi 1 i ∗ ∈ D. Therefore, dw = di A , where d = µi ∈ D and dj = µj w = d P P P d( d1 di Ai ∈ D[A]. This does not tell much, since each di Ai ) = d d1 ( di Ai ) = w has its own d = d(w), so in order to obtain the centralizer of A with respect 1 ’s to D. In to the Jacobian, we will need to add (apriori) infinitely many d(w) 1 other words, we can say that the centralizer of A is D[{ d(w) }w ][A] ⊆ Q(D)[A]. We 1 conjecture that the centralizer of A is the smallest possible (= every d(w) belongs to D), namely D[A]. Conjecture 3.2 (The two-dimensional Centralizer Conjecture over D). Suppose Jac(A, B) ∈ D[x, y]∗ = D∗ and Jac(A, w) = 0 for A, B, w ∈ D[x, y]. Then w ∈ D[A]. Examples 3.3 (Non-counterexamples). First non-counterexample: The following is not a counterexample to the two-dimensional Centralizer Conjecture over Z: A = 2 + 3y, w = 1 + y; clearly w is in the centralizer of A w.r.t. the Jacobian, and w = 1 + y = 13 + 13 (2 + 3y) = 13 + 31 A ∈ Q[A] − Z[A]. However, A does not have a Jacobian mate in Z[x, y], since if B ∈ Z[x, y] was a Jacobian mate of A, then, by definition, −3Bx = Jac(A, B) ∈ Z[x, y]∗ = Z∗ = {1, −1} (Bx denotes the derivative of B w.r.t. x), so Bx = ± 31 ∈ / Z[x, y], which is impossible (since B ∈ Z[x, y] implies that Bx ∈ Z[x, y]). Second non-counterexample: The following is not a counterexample to the two-dimensional Centralizer Conjecture over D := k[a2 , ab, b2 , a3 , b3 ], where a and THE TWO-DIMENSIONAL CENTRALIZER CONJECTURE 5 b are transcendental over k; it is due to YCor [17]: A = (ax+ by)2 = a2 x2 + 2abxy + b2 y 2 ∈ D[x, y], w = (ax + by)3 = a3 x3 + 3a2 bx2 y + 3ab2 xy 2 + b3 y 3 ; clearly w is in the centralizer of A w.r.t. the Jacobian. From considerations of degrees, w ∈ / D[A] and also from considerations of degrees, w ∈ / Q(D)[A] (the degree of w is 3, while the degree of a polynomial in A is even). However, A does not have a Jacobian mate in D[x, y]; this can be seen in two ways: • Otherwise, by Theorem 3.1, w ∈ Q(D)[A], but w ∈ / Q(D)[A]. • Otherwise, if B ∈ D[x, y] was a Jacobian mate of A, then, by definition, Jac(A, B) ∈ D[x, y]∗ = D∗ = k ∗ A direct computation shows that 1 2 2 2 Jac(A, B) = (a x + aby)By − (b y + abx)Bx , hence Jac(A, B)|(x = 0, y = 0) = 0, which contradicts Jac(A, B) ∈ k ∗ . The two-dimensional Centralizer Conjecture has a positive answer (at least) in the following two special cases: • First special case: D is, in addition, a field; this is CMW’s theorem over k, Theorem 2.3 or Proposition 2.6. • Second special case: (x, y) 7→ (A, B) is, in addition, an automorphism (A, B is an automorphism pair); this is the content of the following Theorem 3.4. Theorem 3.4 (Special case: Automorphism pair). Suppose Jac(A, B) ∈ D[x, y]∗ = D∗ and Jac(A, w) = 0 for A, B, w ∈ D[x, y]. Further assume that (x, y) 7→ (A, B) is an automorphism of D[x, y]. Then w ∈ D[A]. Proof. Denote g : (x, y) 7→ (A, B). By assumption, g is an automorphism of D[x, y], so g −1 : D[x, y] → D[x, y] exists and is also an automorphism of D[x, y]. First step A = x: If A = x, then it is easy to see that w ∈ D[A] = D[x]. Indeed, wy = Jac(x, w) = Jac(A, w) = 0, where wy is the derivative of w with respect to y. Write w in its (0, 1)-degree form: w = w0 + w1 y + w2 y 2 + · · · + wm y m , where w0 , w1 , w2 , . . . , wm ∈ D[x]. We have just seen that wy = 0, hence, 0 = wy = w1 + 2w2 y + · · · + mwm y m−1 , which implies that w1 = 2w2 = . . . = mwm = 0, so w1 = w2 = . . . = wm = 0 (since the characteristic of D is zero). Therefore, w = w0 ∈ D[x] = D[A], and we are done. Second step A arbitrary: The general case can be obtained from the special case A = x. Claim: u := g −1 (w) is in the centralizer of x. Proof of Claim: Jac(x, u) = Jac(g −1 (A), g −1 (w)) = 0, since Jac(A, w) = 0 (it is clear that if A and w are algebraically dependent over D, then g −1 (A) and g −1 (w) are also algebraically dependent over D). Apply the first step and get that g −1 (w) = u ∈ D[x]. Hence we can write g −1 (w) = d0 + d1 x + d2 x2 + · · · + dl xl , for some d0 , d1 , d2 , . . . , dl ∈ D. Then, w = g(d0 +d1 x+d2 x2 +· · ·+dl xl ) = g(d0 )+g(d1 x)+g(d2 x2 )+· · ·+g(dl xl ) = g(d0 ) + g(d1 )g(x) + g(d2 )g(x2 ) + · · · + g(dl )g(xl ) = d0 + d1 A + d2 A2 + · · · + dl Al ∈ D[A].  It is not surprising that we have not succeeded to find a counterexample to the two-dimensional Centralizer Conjecture, since when we picked an A ∈ D[x, y] which has a Jacobian mate B ∈ D[x, y], those A and B always defined an automorphism of D[x, y], and for an automorphism of D[x, y] (= A is part of an automorphism pair) the conjecture holds by Theorem 3.4. Given a commutative ring R, denote: • JC(2, R): The two-dimensional Jacobian Conjecture over R is true, namely, every R-algebra endomorphism of R[x, y] having an invertible Jacobian (the Jacobian is in R[x, y]∗ = R∗ ) is an automorphism of R[x, y]. 6 VERED MOSKOWICZ • CC(2, R): The two-dimensional Centralizer Conjecture over R is true, namely, if Jac(A, B) ∈ R[x, y]∗ = R∗ and Jac(A, w) = 0 for A, B, w ∈ R[x, y], then w ∈ R[A]. We have, Theorem 3.5 (JC(2, D) implies CC(2, D)). If the two-dimensional Jacobian Conjecture over D is true, then the two-dimensional Centralizer Conjecture over D is true. We do not know if the converse of Theorem 3.5 is true, namely, if a positive answer to the two-dimensional Centralizer Conjecture over D implies a positive answer to the two-dimensional Jacobian Conjecture over D. Proof. Assume that A ∈ D[x, y] has a Jacobian mate B in D[x, y], and w ∈ D[x, y] satisfies Jac(A, w) = 0. We must show that w ∈ D[A]. By assumption, the twodimensional Jacobian Conjecture over D is true, so (x, y) 7→ (A, B) is an automorphism of D[x, y]. Apply Theorem 3.4 and get that w ∈ D[A].  Recall [9, Lemma 1.1.14] which says that JC(2, C) implies JC(2, D), therefore: Theorem 3.6. If the two-dimensional Jacobian Conjecture over C is true, then the two-dimensional Centralizer Conjecture over D is true. Proof. JC(2, C) ⇒ JC(2, D) ⇒ CC(2, D), where the first implication is due to [9, Lemma 1.1.14], while the second implication is due to Theorem 3.5.  Of course, Theorem 3.5 implies that if there exists an integral domain D of characteristic zero such that the two-dimensional Centralizer Conjecture over D is false, then the two-dimensional Jacobian Conjecture over D is false, and then, by [9, Lemma 1.1.14], the two-dimensional Jacobian Conjecture over C is false. We suspect that the two-dimensional Centralizer Conjecture over any integral domain of characteristic zero is true, because we ’believe’ that the two-dimensional Jacobian Conjecture is true. Finally, we wish to quote A. van den Essen [10, page 2]: “... All these experiences fed my believe that the Jacobian Conjecture, if true at all, would be difficult to generalize, since it felt like a kind of optimal statement”. 4 Non-commutative analog: The first Weyl algebra By definition, the n’th Weyl algebra An (k) is the unital associative k-algebra generated by 2n elements X1 , . . . , Xn , Y1 , . . . , Yn subject to the following defining relations: [Yi , Xj ] = δij , [Xi , Xj ] = 0 and [Yi , Yj ] = 0, where δij is the Kronecker delta. When n = 1, we will denote the generators by X, Y instead of by X1 , Y1 . The first Weyl algebra, A1 (k), was first studied by Dirac [7]. In [8], Dixmier posed six questions concerning A1 (k), k is a field of characteristic zero. The first question asked if every k-algebra endomorphism of A1 (k) is an automorphism of A1 (k); this is known as Dixmier Conjecture. Given a commutative ring R, denote: • JC(n, R): The n-dimensional Jacobian Conjecture over R is true, namely, every R-algebra endomorphism of R[x1 , . . . , xn ] having an invertible Jacobian (the Jacobian is in R[x1 , . . . , xn ]∗ = R∗ ) is an automorphism of R[x1 , . . . , xn ]. • DC(n, R): The n’th Dixmier Conjecture over R is true, namely, every Ralgebra endomorphism of An (R) is an automorphism of An (R). • JC(∞, R): For all n ∈ N, the n-dimensional Jacobian Conjecture over R is true. THE TWO-DIMENSIONAL CENTRALIZER CONJECTURE 7 • DC(∞, R): For all n ∈ N, the n’th Dixmier Conjecture over R is true. There is a well-known connection between the Jacobian Conjecture and the Dixmier Conjecture, which says the following: For all n ∈ N: (i) DC(n, k) ⇒ JC(n, k). (ii) JC(2n, k) ⇒ DC(n, k). The first result can be found in [9, Theorem 4.2.8] and in [3, page 297] (immediately after Proposition 2.3). The second result was proved independently by Y. Tsuchimoto [21] and by A. Belov-Kanel and M. Kontsevich [5]. There exist additional proofs due to V. V. Bavula [4], and due to K. Adjamagbo and A. van den Essen [1]. From (i) and (ii) it is clear that JC(∞, k) is equivalent to DC(∞, k). In the non-commutative algebra A1 (k), denote the centralizer of an element P by Cent(P ) (= all the elements in A1 (k) which commute with P ). An analog result in A1 (k) to CMW’s result in k[x, y] exists, and is due to J. A. Guccione, J. J. Guccione and C. Valqui, namely: Theorem 4.1 (Analog of CMW’s theorem over k). If P, Q ∈ A1 (k) satisfy [Q, P ] ∈ A1 (k)∗ = k ∗ , then Cent(P ) = k[P ]. Proof. See [11, Theorem 2.11].  Notice that the non-commutative case [11, Theorem 2.11] is already over k, while the commutative case [6, Theorem 1] is over C and we showed in Theorem 2.3 and in Proposition 2.6 that C can be replaced by k. Remark 4.2. It seems that none of the proofs of Theorem 2.3 and Proposition 2.6 has a non-commutative version: • The proof of Theorem 2.3 is based on Formanek’s observation, Proposition 2.1, and on Jacobi’s theorem, Theorem 2.2 (2), which together say the following: Assume that C, D ∈ k[x, y] satisfy Jac(C, D) = 0. Then there exist h ∈ k[x, y] and u(t), v(t) ∈ k[t], such that C = u(h) and D = v(h). However, there exists a known counterexample due to Dixmier [8] to this result in the non-commutative case, namely, there exist C, D ∈ A1 (k) satisfying [C, D] = 0, but there exist no h ∈ A1 (k) and u(t), v(t) ∈ k[t], such that C = u(h) and D = v(h). For more details on the counterexample, see [15] and [18]. • The proof of Proposition 2.6 is based on the original CMW’s theorem; the proof of the original CMW’s theorem uses results concerning C[x, y] (such as extension of derivations), and we do not know if those results have noncommutative analogs. CMW’s theorem over k implies Theorem 3.1, and similarly, the analog of CMW’s theorem over k, Theorem 4.1, implies the following analog of Theorem 3.1: Theorem 4.3. Suppose [A, B] ∈ A1 (D)∗ = D∗ and [A, w] = 0 for A, B, w ∈ A1 (D). Then w ∈ Q(D)[A]. Proof. A, B ∈ A1 (D) ⊂ A1 (Q(D)) satisfy [A, B] ∈ D∗ ⊂ Q(D)∗ and w ∈ A1 (D) ⊂ A1 (Q(D)) satisfies [A, w] = 0. We can apply Theorem 4.1 (Q(D) is a field of characteristic zero) and obtain that w ∈ Q(D)[A].  We conjecture the non-commutative analog of Conjecture 3.2: Conjecture 4.4 (The (first) Centralizer Conjecture over D). Suppose [A, B] ∈ A1 (D)∗ = D∗ and [A, w] = 0 for A, B, w ∈ A1 (D). Then w ∈ D[A]. The following useful equation will be applied in Examples 4.6 and in the proof of Theorem 4.7. 8 VERED MOSKOWICZ Lemma 4.5 (Useful equation). For all t(Y ) ∈ k[Y ] and i ∈ N: [t(Y ), X i ] =  i iX i−1 t′ (Y ) + 2 X i−2 t′′ (Y ) + . . . . In particular, this equation is valid for t(Y ) ∈ D[Y ] (since t(Y ) ∈ D[Y ] ⊂ Q(D)[Y ]). Proof. See [12, Proposition 1.6].  The analog of Examples 3.3 is: Examples 4.6 (Non-counterexamples). First non-counterexample: The following is not a counterexample to the (first) Centralizer Conjecture over Z: A = 2 + 3Y , w = 1 + Y ; clearly w ∈ Cent(A), and w = 1 + Y = 31 + 31 (2 + 3Y ) = 1 1 3 + 3 A ∈ Q[A] − Z[A]. However, A does not have a Dixmier mate in A1 (Z), since if B ∈ A1 (Z) was a Dixmier mate of A, then by the definition of a Dixmier mate, [A, B] ∈ A1 (Z)∗ = Z∗ = {1, this is impossible from the following direct P −1}. But j computation:PWrite B = bij X i Y P , bij ∈ Z. Then, P i j i j [B, A] = [ bij XP Y , 2 + 3Y ] = bij [XP Y , 2 + 3Y ] = bijP (X i [Y j , 2 + 3Y ] + i i j i j i [XP , 2 + 3Y ]Y j ) = bij [X , 2 + 3Y ]Y = 3b [X , Y ]Y = − ]Y j = ij P P3bij [Y, X i−1 j i−1 j i−1 j − 3bij iX Y = − 3ibij X Y . If [A, B] ∈ {1, −1}, then 3ibij X Y ∈ {1, −1}. Therefore, 3b10 ∈ {1, −1}, so b10 ∈ { 31 , − 31 }, a contradiction to b10 ∈ Z. Second non-counterexample: The following is not a counterexample to the (first) Centralizer Conjecture over D := k[a2 , ab, b2 , a3 , b3 ], where a and b are transcendental over k: A = (aX + bY )2 , w = (aX + bY )3 . w ∈ Cent(A) (clear), w ∈ / Q(D)[A] (considerations of degrees), A does not have a Dixmier mate in A1 (D) (direct computation). The (first) Centralizer Conjecture has a positive answer (at least) in the following two special cases: • First special case: D is, in addition, a field; this is the analog of CMW’s theorem over k, Theorem 4.1. • Second special case: (X, Y ) 7→ (A, B) is, in addition, an automorphism (A, B is an automorphism pair); this is the content of the following Theorem 4.7. Theorem 4.7 (Special case: Automorphism pair). Suppose [A, B] ∈ A1 (D)∗ = D∗ and [A, w] = 0 for A, B, w ∈ A1 (D). Further assume that (X, Y ) 7→ (A, λB), λ = [A, B]−1 , is an automorphism of A1 (D). Then w ∈ D[A]. Proof. Denote g : (X, Y ) 7→ (A, λB). By assumption, g is an automorphism of A1 (D), so g −1P : A1 (D) → A1 (D) exists and is also an automorphism of A1 (D). Write w = wij X i Y j , wij ∈ D, 0 ≤ i ≤ m, 0 ≤ j ≤ l. FirstPstep A = X: If P A = X, then it isPeasy to see that w P∈ D[A] = D[X]. i Indeed, jwijP X i Y j−1 = wij XP jY j−1 = wij X i [Y j , X] = wij (X i [Y j , X] + [X i , X]Y j ) = wij [X i Y j , X] = [ wij X i Y j , X] = [w, X] = [w, A] = 0. Therefore, jwij = 0, 0 ≤ i ≤ m, 1 ≤ jP≤ l. Since D is P of characteristic zero, m m wij = 0, 0 ≤ i ≤ m, 1 ≤ j ≤ l. Then, w = i=0 wi0 X i Y 0 = i=0 wi0 X i ∈ D[X]. Second step A arbitrary: The general case can be obtained from the special case A = X. Claim: u := g −1 (w) is in the centralizer of X. Proof of Claim: [X, u] = [g −1 (A), g −1 (w)] = g −1 (A)g −1 (w) − g −1 (w)g −1 (A) = g −1 (Aw) − g −1 (wA) = g −1 (Aw − wA) = g −1 ([A, w]) = g −1 (0) = 0. Apply the first step and get that g −1 (w) = u ∈ D[X]. Hence we can write g −1 (w) = d0 + d1 X + d2 X 2 + · · · + dl X l , for some d0 , d1 , d2 , . . . , dl ∈ D. Then, w = g(d0 + d1 X + d2 X 2 + · · · + dl X l ) = g(d0 ) + g(d1 X) + g(d2 X 2 ) + · · · + g(dl X l ) = g(d0 ) + g(d1 )g(X)+g(d2 )g(X 2 )+· · ·+g(dl )g(X l ) = d0 +d1 A+d2 A2 +· · ·+dl Al ∈ D[A].  THE TWO-DIMENSIONAL CENTRALIZER CONJECTURE 9 We have an analog to Theorem 3.5: Theorem 4.8. If the first Dixmier Conjecture over D is true, then the (first) Centralizer Conjecture over D is true. We do not know if the converse of Theorem 4.8 is true, namely, if a positive answer to the (first) Centralizer Conjecture over D implies a positive answer to the first Dixmier Conjecture over D. Proof. Assume that A ∈ A1 (D) has a Dixmier mate B in A1 (D), and w ∈ A1 (D) satisfies [A, w] = 0. We must show that w ∈ D[A]. By assumption, the first Dixmier Conjecture over D is true, so (X, Y ) 7→ (A, λB), λ = [A, B]−1 , is an automorphism of A1 (D). Apply Theorem 4.7 and get that w ∈ D[A].  We do not know if an analog of [9, Lemma 1.1.14] exists, hence we do not know how to obtain an analog of Theorem 3.6. Of course, Theorem 4.8 implies that if there exists an integral domain D of characteristic zero such that the first Centralizer Conjecture over D is false, then the first Dixmier Conjecture over D is false, namely, there exists A, B ∈ A1 (D), [B, A] = 1 and (X, Y ) 7→ (A, B) is not an automorphism of A1 (D). We have recalled above in (ii) that JC(2n, k) ⇒ DC(n, k). If this implication is also valid if we replace k by D, namely, JC(2n, D) ⇒ DC(n, D), then, in particular, JC(2, D) ⇒ DC(1, D). Therefore, if the first Dixmier Conjecture over D is false, then the two-dimensional Jacobian Conjecture over D is false, and then by [9, Lemma 1.1.14], the two-dimensional Jacobian Conjecture over C is false. References [1] K. Adjamagbo, A. van den Essen, On the equivalence of the Jacobian, Dixmier and Poisson Conjectures in any characteristic, arXiv:math/0608009v1 [math.AG] 1 Aug 2006. [2] H. Bass, Differential structure of étale extensions of polynomial algebras, in Commutative Algebra, M. Hochster, C. Huncke and J. D. Sally (ed.), Springer-Verlag, New York, 1989, Proceedings of a Microprogram Held, June 15-July 2, 1987. [3] H. Bass, E. Connell and D. Wright, The Jacobian Conjecture: reduction of degree and formal expansion of the inverse, Bull. Amer. Math. Soc. (New Series) 7, 287-330, 1982. [4] V. V. Bavula, The Jacobian conjecture-2n implies the Dixmier problem-n, arXiv:math/0512250v1 [math.RA] 12 Dec 2005. [5] A. Belov-Kanel, M. Kontsevich, The Jacobian conjecture is stably equivalent to the Dixmier conjecture, Mosc. Math. J. 7, no. 2, 349, 209-218, 2007. [6] C. C.-A. Cheng, J. H. Mckay and S. S.-S. Wang, Younger mates and the Jacobian conjecture, Proc. Amer. Math. Soc. 123, no. 10, 2939-2947, 1995. [7] P. A. M. Dirac, On quantum algebra, Proc. Cambridge Phil. Soc. 23, 412-418, 1926. [8] J. Dixmier, Sur les algebres de Weyl, Bull. Soc. Math. France, vol. 96, 209-242, 1968. [9] A. van den Essen, Polynomial automorphisms and the Jacobian Conjecture, Progress in Mathematics, 190. Birkhäuser Verlag, Basel, 2000. [10] A. van den Essen, The amazing Image Conjecture, arXiv:1006.5801v1 [math.AG] 30 Jun 2010. [11] J. A. Guccione, J. J. Guccione and C. Valqui, On the centralizers in the Weyl algebra, Proc. Amer. Math. Soc. 140, no. 4, 1233-1241, 2012. [12] J.A. Guccione, J.J. Guccione, and C. Valqui, The Dixmier conjecture and the shape of possible counterexamples, J. of Algebra 399, 581-633, 2014. [13] O. H. Keller, Ganze Cremona-Transformationen, Monatsh. Math. Phys. 47, 299-306, 1939. [14] L. Makar-Limanov, Locally nilpotent derivatives, a new ring invariant and applications, http://www.math.wayne.edu/ lml/lmlnotes.pdf, 1995. [15] L. Makar-Limanov, Centralizers in the quantum plane algebra, Studies in Lie Theory, Progress in Mathematics 243, 411-416, 2006. [16] MathOverflow, Any two bivariate algebraically dependent polynomials are always in the same ring generated by some bivariate polynomial?, https://mathoverflow.net/questions/190920/ [17] MathOverflow, If f, g ∈ D[x, y] are algebraically dependent over D, then f, g ∈ D[h] for some h ∈ D[x, y]?, https://mathoverflow.net/questions/287610/ 10 VERED MOSKOWICZ [18] MathStackExchange, Commuting elements in Weyl algebras of characteristic zero, https://math.stackexchange.com/questions/210438/ [19] N. Saxena, Algebraic independence and applications, Hausdorff Center for Mathematics, Bonn. (Joint work with Malte Beecken and Johannes Mittmann, HCM, Bonn). [20] A. Schinzel, Selected topics on polynomials, Ann Arbor, University of Michigan Press, 1982. [21] Y. Tsuchimoto, Endomorphisms of Weyl algebra and p-curvature, Osaka J. Math. 42, no. 2, 435-452, 2005. [22] S. S.-S. Wang, Extension of derivations, J. of Algebra 69, 240-246, 1981. Department of Mathematics, Bar-Ilan University, Ramat-Gan 52900, Israel. E-mail address: [email protected]
0math.AC
An Optimal Choice Dictionary Torben Hagerup arXiv:1711.00808v1 [cs.DS] 2 Nov 2017 Institut für Informatik, Universität Augsburg, 86135 Augsburg, Germany [email protected] Abstract. A choice dictionary is a data structure that can be initialized with a parameter n ∈ N = {1, 2, . . .} and subsequently maintains an initially empty subset S of {1, . . . , n} under insertion, deletion, membership queries and an operation choice that returns an arbitrary element of S. The choice dictionary is fundamental in space-efficient computing and has numerous applications. The best previous choice dictionary can be initialized with n and a second parameter t ∈ N in constant time and subsequently executes all operations in O(t) time and occupies n + O(n(t/w)t + log n) bits on a word RAM with a word length of w = Ω(log n) bits. We describe a new choice dictionary that, following a constant-time initialization, executes all operations in constant time and, in addition to the space needed to store n, occupies only n + 1 bits, which is shown to be optimal if w = o(n). Allowed ⌈log2 (n + 1)⌉ bits of additional space, the new data structure also supports iteration over the set S in constant time per element. Keywords. Data structures, space efficiency, choice dictionaries, bounded universes. 1 Introduction Following similar earlier definitions [3,5] and concurrently with that of [2], the choice-dictionary data type was introduced by Hagerup and Kammer [8] as a basic tool in space-efficient computing and is known to have numerous applications [2,5,8,10,11]. Its precise characterization is as follows: Definition 1.1. A choice dictionary is a data type that can be initialized with an arbitrary integer n ∈ N = {1, 2, . . .}, subsequently maintains an initially empty subset S of U = {1, . . . , n} and supports the following operations, whose preconditions are stated in parentheses: insert (ℓ) delete(ℓ) contains(ℓ) choice: (ℓ ∈ U ): (ℓ ∈ U ): (ℓ ∈ U ): Replaces S by S ∪ {ℓ}. Replaces S by S \ {ℓ}. Returns 1 if ℓ ∈ S, 0 otherwise. Returns an (arbitrary) element of S if S 6= ∅, 0 otherwise. As is common and convenient, we use the term “choice dictionary” also to denote data structures that implement the choice-dictionary data type. Following the initialization of a choice dictionary D with an integer n, we call (the constant) n the universe size of D and (the variable) S its client set. If a choice dictionary D can operate only if given access to n (stored outside of D), we say that D is externally sized. Otherwise, for emphasis, we may call D self-contained. Our model of computation is a word RAM [1,7] with a word length of w ∈ N bits, where we assume that w is large enough to allow all memory words in use to be addressed. As part of ensuring this, in the discussion of a choice dictionary with universe size n we always assume that w > log2 n. The word RAM has constant-time operations for addition, subtraction and multiplication modulo 2w , division with truncation ((x, y) 7→ ⌊x/y⌋ for y > 0), left shift modulo 2w ((x, y) 7→ (x ≪ y) mod 2w , where x ≪ y = x · 2y ), right shift ((x, y) 7→ x ≫ y = ⌊x/2y ⌋), and bitwise Boolean operations (and, or and xor (exclusive or)). We also assume a constant-time √ operation to load an integer that deviates from w by at most a constant factor—this enables the proof of Lemma 2.1. The best previous choice dictionary [8, Theorem 7.6] can be initialized with a universe size n and a second parameter t ∈ N in constant time and subsequently executes all operations in O(t) time and occupies n + O(n(t/w)t + log n) bits. Let us call a choice dictionary atomic if it executes all operations including the initialization in constant time. Then, for every constant 1 t ∈ N, the result just cited implies the existence of an atomic choice dictionary that occupies n + O(n/wt + log n) bits when initialized for universe size n. Here we describe an externally sized atomic choice dictionary that needs just n + 1 bits, which is optimal if w = o(n). The optimality of the bound of n + 1 bits follows from a simple argument of [9,12]: Because the client set S of a choice dictionary with universe size n can be in 2n different states, any two of which can be distinguished via calls of contains, if the choice dictionary uses only n bits it must represent each possible state of S through a unique bit pattern. Since S is in one particular state following the initialization, the latter must force each of n bits to a specific value, which needs Ω(n/w) time. In addition to being more space-efficient than all earlier choice dictionaries, the new data structure is also significantly simpler than its best predecessors, and in an actual implementation its operations are likely to be faster by a constant factor. The new choice dictionary owes much to a recent data structure of Katoh and Goto [12] that implements so-called initializable arrays. A connection between choice dictionaries and initializable arrays was first noted by Hagerup and Kammer [9], who observed that the light-path technique, invented in [8] in the context of choice dictionaries, also yields initializable arrays better than those known at the time. Here we show that an ingenious and elegant data representation devised by Katoh and Goto, slightly modified and used together with additional operations, yields a choice dictionary that leaves little to be desired. Our main result, formulated in Theorem 1.2 below, can be expressed informally as follows: At the price of one additional bit, a bit vector can be augmented with the operations “clear all” and “locate a 1”. Theorem 1.2. There is an externally sized atomic choice dictionary that, when initialized for universe size n, occupies n + 1 bits in each quiescent state (i.e., between operations) and needs O(w) additional bits of transient space during the execution of each operation. 2 A Simple Reduction For n ∈ N, the bit-vector representation over U = {1, . . . , n} of a subset S of U is the sequence (d1 , . . . , dn ) of n bits with dℓ = 1 ⇔ ℓ ∈ S, for ℓ = 1, . . . , n, or its obvious layout in n consecutive bits in memory. If we represent the client set of a choice dictionary with universe size n via its bitvector representation B, the choice-dictionary operations translate into the reading and writing of individual bits in B and the operation choice, which now returns the position of a nonzero bit in B (0 if all bits in B are 0). It is trivial to carry out all operations other than initialization and choice in constant time. In the special case n = O(w), the latter operations can also be supported in constant time. This is a consequence of the following lemma. Pw−1 Lemma 2.1 ([6,8]). Given a nonzero integer j=0 2j dj , where dj ∈ {0, 1} for j = 0, . . . , w − 1, constant time suffices to compute max J and min J, where J = {j ∈ {0, . . . , w − 1} | dj = 1}. We use the externally sized atomic choice dictionary for universe sizes of O(w) implied by these considerations to handle the few bits left over when we divide a bit-vector representation of n bits into pieces of a fixed size. The details are as follows: Let b be a positive integer that can be computed from w and n in constant time using O(w) bits (and therefore need not be stored) and that satisfies b ≥ log2 n, but b = O(w). In order to realize an externally sized choice dictionary D with universe size n and client set S, partition the bit-vector representation B of S into N = ⌊n/(2b)⌋ segments B1 , . . . , BN of exactly 2b bits each, with n′ = n mod (2b) bits left over. If n′ 6= 0, maintain (the set corresponding to) the last n′ bits of B in an externally sized atomic choice dictionary D2 realized as discussed above. Assume without loss of generality that N ≥ 1. The following lemma is proved in the remainder of the paper: Lemma 2.2. There is a data structure that, if given access to b and N , can be initialized in constant time and subsequently occupies 2bN + 1 bits and maintains a sequence (a1 , . . . , aN ) ∈ {0, . . . , 22b − 1}N , initially (0, . . . , 0), under the following operations, all of which execute in 2 constant time: read (i) (i ∈ {1, . . . , N }), which returns ai ; write(i, x) (i ∈ {1, . . . , N } and x ∈ {0, . . . , 22b − 1}), which sets ai to x; and nonzero, which returns an i ∈ {1, . . . , N } with ai 6= 0 if there is such an i, and 0 otherwise. For i = 1, . . . , N , view Bi as the binary representation of an integer and maintain that integer as ai in an instance of the data structure of Lemma 2.2. This yields an externally sized atomic choice dictionary D1 for the first 2bN bits of B: To carry out insert , delete or contains, update or inspect the relevant bit in one of a1 , . . . , aN , and to execute choice, call nonzero and, if the return value i is positive, apply an algorithm of Lemma 2.1 to ai . It is obvious how to realize the full choice dictionary D through a combination of D1 and D2 . The only nontrivial case is that of the operation choice. To execute choice in D, first call choice in D1 (say). If the return value is positive, it is a suitable return value for the parent call. Otherwise call choice in D2 , increase the return value by 2bN if it is positive, and return the resulting number. D is atomic because D1 and D2 are, and the total number of bits used by D is 2bN + 1 + n′ = n + 1. Theorem 1.2 follows. 3 The Main Construction In this section we prove Lemma 2.2, except that we relax the space bound by allowing 2bN + w bits instead of 2bN + 1 bits. 3.1 The Storage Scheme This subsection describes how the sequence (a1 , . . . , aN ) is represented in memory in 2bN + w bits. Most of the available memory stores an array A of N cells A[1], . . . , A[N ] of 2b bits each. In addition, a w-bit word is used to hold an integer k ∈ {0, . . . , N } best thought of as a “barrier” that divides V = {1, . . . , N } into a part to the left of the barrier, {1, . . . , k}, and a part to its right, {k + 1, . . . , N }. We often consider a (2b)-bit quantity x to consist of a lower half, denoted by x and composed of the b least significant bits of x (i.e., x = x and (2b − 1)) and an upper half, x = x ≫ b, and we may write x = (x, x). A central idea is that the upper halves of A[1], . . . , A[N ] are used to implement a matching on V according to the following convention: Elements i and j of V are matched exactly if A[i] = j, A[j] = i, and precisely one of i and j lies to the left of the barrier, i.e., i ≤ k < j or j ≤ k < i. In this case we call j the mate of i and vice versa. The assumption b ≥ log2 n ensures that the upper half of each cell in A can hold an arbitrary element of V . A function that inputs an element i of V and returns the mate of i if i is matched and i itself if not is easily coded as follows: mate(i): i′ := A[i]; if (1 ≤ i ≤ k < i′ ≤ N or 1 ≤ i′ ≤ k < i ≤ N ) and A[i′ ] = i then return i′ ; return i; For all i ∈ V , call i strong if i is matched and i ≤ k or i is unmatched and i > k, and call i weak if it is not strong. The integers A[1], . . . , A[N ] and k represent the sequence (a1 , . . . , aN ) according to the following storage invariant: For all i ∈ V , – ai = 0 exactly if i is weak; – if i is strong and i > k, then ai = A[i]; – if i is strong and i ≤ k, then ai = (A[i], A[mate(i)]). The storage invariant is illustrated in Fig. 1. The following drawing conventions are used here and in subsequent figures: The barrier is shown as a thick vertical line segment with a triangular base. Each pair of mates is connected with a double arrow, and a cell A[i] of A is shown in a darker hue if i is strong. A question mark indicates an entry that can be completely arbitrary, except that it may not give rise to a matching edge, and the upper and lower halves of some cells of A are shown separated by a dashed line segment. 3 Fig. 1. The storage scheme. Above: The array A. Below: The sequence a represented by A. 3.2 The Easy Operations The data structure is initialized by setting k = N , i.e., by placing the barrier at the right end. Then the matching is empty, and all elements of V are to the left of the barrier and weak. Thus the initial value of (a1 , . . . , aN ) is (0, . . . , 0), as required. The implementation of read closely reflects the storage invariant: read (i): if mate(i) ≤ k then return 0; (∗ i is weak exactly if mate(i) ≤ k ∗) if i > k then return A[i]; else return (A[i], A[mate(i)]); The code for nonzero is short but a little tricky: nonzero: if k = N then return 0; return mate(N ); The implementation of write(i, x) is easy if i is weak and x = 0 (then nothing needs to be done) or i is strong and x 6= 0. In the latter case the procedure simple write shown below can be used. The only point worth noting is that writing to A[i] when i is strong and i > k may create a spurious matching edge that must be eliminated. simple write(i, x): if i ≤ k then (A[i], A[mate(i)]) := (x, x); else A[i] := x; i′ := mate(i); if i′ 6= i then A[i′ ] := i′ ; (∗ eliminate a spurious matching edge ∗) 3.3 Insertion and Deletion The remaining, more complicated, operations of the form write(i, x) are those in which ai is changed from zero to a nonzero value—call such an operation an insertion—or vice versa— a deletion. When the data structure under development is used to realize a choice dictionary, insertions and deletions are triggered by (certain) insertions and deletions, respectively, executed on the choice dictionary. Insertions and deletions are the operations that change the barrier and usually the matching. In fact, k is decreased by 1 in every insertion and increased by 1 in every deletion, so k is always the number of i ∈ V with ai = 0. The various different forms that an insertion may take are illustrated in Figs. 2 and 3. The situation before the insertion is always shown above the situation after the insertion. A “1” outside of the “stripes” indicates the position of an insertion and symbolizes the nonzero value to be written, while a “1” inside the stripes symbolizes that value after it has been written. The various forms of a deletion are illustrated in Figs. 4 and 5. Here a “0” indicates the position of a deletion, while a “1” symbolizes the nonzero value that is to be replaced by zero. There are many somewhat different cases, but for each it is easy to see that the storage invariant is preserved and that the sequence (a1 , . . . , aN ) changes as required. It is also easy to turn the figures into a write procedure that branches into as many cases. Here we propose the following realization of write that is terser, but needs a more careful justification. 4 Fig. 2. Insertion to the left of the barrier. Fig. 3. Insertion to the right of the barrier. Fig. 4. Deletion to the left of the barrier. Fig. 5. Deletion to the right of the barrier. 5 write(i, x): x0 := read (i); (∗ the value to be replaced by x ∗) i′ := mate(i); if x 6= 0 then if x0 = 0 then (∗ an insertion ∗) k ′ := mate(k); (∗ e k = k will cross the barrier ∗) u := read (k); (∗ save aek ∗) k := k − 1; (∗ move the barrier left ∗) simple write(k + 1, u); (∗ reestablish the value of aek ∗) if i 6= k ′ then { A[i′ ] := k ′ ; A[k ′ ] := i′ ; A[k ′ ] := A[i]; } (∗ match i′ and k ′ ∗) simple write(i, x); (∗ i was or has been made strong ∗) else (∗ x = 0 ∗) if x0 6= 0 then (∗ a deletion ∗) k ′ := mate(k + 1); (∗ e k = k + 1 will cross the barrier ∗) v := read (k ′ ); (∗ save ak′ ∗) k := k + 1; (∗ move the barrier right ∗) A[i′ ] := k ′ ; A[k ′ ] := i′ ; (∗ match i′ and k ′ ∗) if k ′ 6= i then simple write(k ′ , v); (∗ reestablish the value of ak′ ∗) To see the correctness of the procedure write shown above, consider a call write(i, x) and assume that it gives rise to an insertion or a deletion, since in the remaining cases the procedure is easily seen to perform correctly. Let k0 be the value of k (immediately) before the call. Because the call changes the value of k by 1, a single element e k of V crosses the barrier, i.e., is to the left of the barrier before or after the call, but not both. In the case of an insertion, e k = k0 ; in that of a deletion, e k = k0 + 1. Assume that i does not cross the barrier, i.e., that i 6= e k. Because the call changes ai from zero to a nonzero value or vice versa, i must change its matching status, i.e., be matched before or after the call, but not both. In detail, if i is matched before the call, its mate at that time, if different from e k, must find a new mate, which automatically leaves i unmatched. If i is unmatched before the call, i itself must find a mate. We can unify the two cases by saying that if i′ = mate(i) (evaluated before the call under consideration has changed k and A) is not e k, then i′ must find ′ ′ e a (new) mate. If i 6= k, moreover, i is to the left of the barrier in the case of an insertion and to the right of it in the case of a deletion. Assume now that the call does not change aek , i.e., that e k 6= i. Then, because e k crosses the barrier, it must also change its matching status: If e k is matched before the call, its mate at that time, if different from i, must find a new mate, and otherwise e k itself must find a mate. As above, this can be expressed by saying that if k ′ = mate(e k) (evaluated before the call has changed k and A) is not i, then k ′ must find a new mate. Moreover, after the call k ′ is to the right of the barrier in the case of an insertion and to the left of it in the case of a deletion. Exclude the special cases identified above by assuming that {i, i′ } ∩ {e k, k ′ } = ∅. Then it can be seen that all required changes to the matching can be effectuated by matching i′ and k ′ , which is what the procedure write does. In the case of an insertion, this makes i strong, which implies that ai can be set to x simply by executing simple write(i, x) at the very end. In addition, with ℓ = min{i′ , k ′ }, it must be ensured that the call does not change aℓ except if ℓ = i. In the case of an insertion, ℓ = i′ , and if i′ 6= i, the mate of i′ switches from being i to being k ′ , so that it suffices to execute A[k ′ ] := A[i], which happens in the procedure. The same assignment is executed if i′ = i, in which case it is useless but harmless, given that it takes place before the call simple write(i, x). In the case of a deletion, ℓ = k ′ . Here the procedure plays it safe by remembering the value of ak′ before the call in a variable v and restoring ak′ to that value at the end, unless k ′ = i, via the call simple write(k ′ , v). This is convenient because ak′ is not stored in a unique way before the call. At this point i, i′ and k ′ have been “taken care of”, but e k still needs attention. In the case k is weak, so nothing more needs to be done. In an insertion, the of a deletion, either e k = k ′ or e procedure saves the original value of aek in u and restores it afterwards through the statement 6 simple write(k + 1, u). This is necessary and meaningful only if e k is strong. If e k is weak, however, the effect of the statement—except for the harmless possible elimination of a spurious matching edge—is canceled through the subsequent assignment to A[k ′ ] and A[k ′ ]. We still need to consider the special cases that were ignored above, namely calls with {i, i′ } ∩ {e k, k ′ } 6= ∅. These form part (b) of Figs. 2–5. In fact, the number of special cases is quite limited. If e k is weak before an insertion or strong before a deletion, it is unmatched. Thus if i = e k, we have i = i′ = e k = k ′ , and i′ = k ′ implies i = e k. On the other hand, each of the statements i = k ′ and i′ = e k implies the other one. Thus there are two cases to consider: (1) i = i′ = e k = k ′ and ′ ′ e (2) i = k 6= k = i . In case (1), all writing to A happens to A[i]. For insertion, the execution of simple write(i, x) at the very end ensures the correctness of the call. For deletion, the execution of A[k ′ ] := i′ at the end ensures that i is unmatched, which is all that is required. In case (2), after an insertion, i and e k are both to the right of the barrier, ai and aek are both nonzero, and the execution of k] have the correct values simple write(i, x) and simple write(k + 1, u) ensures that A[i] and A[e after the call. After a deletion, i and e k are both to the left of the barrier and ai = aek = 0, and k are both unmatched, the execution of A[i′ ] := k ′ and A[k ′ ] := i′ in fact ensures that i and e which is all that is required. Since all operations of the data structure have been formulated as pieces of code without loops and b = O(w), it is clear that the operations execute in constant time. 4 4.1 The Last Bits and Pieces Reducing the Space Requirements The space requirements of the data structure of the previous section can be reduced from 2bN +w bits to 2bN + 1 bits, as promised in Lemma 2.2, by a method of [9,12]. First, b is chosen to satisfy not only b ≥ log2 n, but b ≥ 2 log2 n, which is clearly still compatible with b = O(w). As a result, for each i ∈ V to the left of the barrier, A[i] has at least 2 log2 n − ⌈log2 N ⌉ ≥ ⌈log2 N ⌉ unused bits. If k ≥ 1, we store k in the unused bits of A[1] (the unused bits of A[2], . . . , A[k] continue to be unused). When k = 0, even A[1] is to the right of the barrier and there are no unused bits in A, so we use a single bit outside of A to indicate whether k is nonzero. The resulting data structure occupies exactly 2bN + 1 bits. 4.2 The Choice of b A practical choice dictionary based on the ideas of this paper would probably content itself with the main construction of Section 3 and refrain from applying the construction of Subsection 4.1 to squeeze out the last few bits. Then there is no reason to choose b larger than w, and b = w seems the best choice. This yields a self-contained atomic choice dictionary that occupies n + 2w bits when used with universe size n. If w is even and w ≥ 2 log2 n, another plausible choice is b = w/2, which allows an entry in the array A to be manipulated with a single instruction and simplifies the access to cells of A. It seems likely, however, that the gains in certain scenarios from choosing b = w/2 instead of b = w are small and can be reduced still further through an optimization of the case b = w that omits superfluous operations on upper or lower halves of cells in A. If the space needed for an externally sized choice dictionary is to be reduced all the way to n + 1 bits for universe size n, b = 2w seems the best choice. 4.3 A Self-Contained Atomic Choice Dictionary In order to convert the externally sized atomic choice dictionary of Theorem 1.2 to a selfcontained one, we must augment the data structure with an indication of the universe size n. This can clearly always be done with w additional bits. If a space bound is desired that depends 7 only on n, n must be stored as a so-called self-delimiting numeric value. Assume first that the most significant bits in a word are considered to be its “first” bits, i.e., the ones to be occupied by a data structure of fewer than w bits (the “big-endian” convention). Then one possibility is to use the code γ ′ of Elias [4]: With bin(n) denoting the usual binary representation of n ∈ N (e.g., bin(10) = 1010), store n in the form of the string 0|bin(n)|−1 bin(n), which can be decoded in constant time with an algorithm of Lemma 2.1. Since |bin(n)| = ⌈log2 (n + 1)⌉, this yields a space bound for the self-contained choice dictionary of n+ 2⌈log2 (n+ 1)⌉ bits. If instead the least significant bits of a word are considered to be its first bits (the “little-endian” convention), the |bin(n)|−1 c scheme needs to be changed slightly: The string 0|bin(n)|−1 bin(n) is replaced by bin(n)0 , c where bin(n) is the same as bin(n), except that the leading 1 is moved to the end. Incidentally, if an application can guarantee that k never becomes zero, the method of Subsection 4.1 can be used to “hide” n as well as k in the array A if we choose b ≥ 4⌈log2 (n + 1)⌉. This yields a restricted self-contained atomic choice dictionary that occupies n + 1 bits. The restriction is satisfied, e.g., if the universe {1, . . . , n} always contains 4b − 1 consecutive elements that do not belong to the client set. 4.4 Iteration We say that a choice dictionary with client set S supports iteration in constant time per element if there are constant-time operations to reset the iteration, to return (“enumerate”) some “next” element of S, and to test whether the iteration is complete, i.e., whether all elements of S have been enumerated. A more precise description can be found in [8]. Using Lemma 2.1, it is easy to enumerate the positions of the nonzero bits in a bit vector of length O(w) in constant time per position output—two shifts can be used to clear the bits whose positions were already enumerated. This reduces the problem of supporting constant-time iteration for the choice dictionary of Theorem 1.2 to that of supporting constant-time iteration over {i ∈ {1, . . . , N } | ai 6= 0} for the data structure of Lemma 2.2. And the latter is easy: For i = k + 1, . . . , N , enumerate mate(i). The iteration needs to remember ⌈log2 (n + 1)⌉ bits of state information between calls. 4.5 Additional Operations and Features Compared to the best previous choice dictionary [8], the choice dictionary of the present paper, while doing better on the “core business” of a choice dictionary, lacks many important additional operations and features. If an application needs any of these additional capabilities, it must still resort to the choice dictionary of [8]. First, the new choice dictionary supports iteration over the client set S, but it is not robust in the sense of [8]: If S is modified during an iteration through insertions and deletions, the data structure will not suffer a run-time error and will not enumerate elements outside of S, but an element of S may be enumerated more than once, and it may not be enumerated at all even though it belongs to S throughout the iteration. Second, there is no obvious way to extend the new dictionary to several colors, i.e., to the maintenance of several pairwise disjoint subsets of U = {1, . . . , n}, where n is the universe size, or even to support the operation choice, which returns an element in the complement of the client set with respect to U . Operations that could be supported in constant time are batched insertion and deletion of all elements of a subset I of U with max I − min I = O(w) presented via a bit-vector representation in a constant number of words, as well as batched inspection, in the sense of contains, of O(w) consecutive elements of U . However, this is a characteristic shared with earlier choice dictionaries. References 1. D. Angluin and L. G. Valiant. Fast probabilistic algorithms for Hamiltonian circuits and matchings. J. Comput. Syst. Sci., 18(2):155–193, 1979. 8 2. Niranka Banerjee, Sankardeep Chakraborty, and Venkatesh Raman. Improved space efficient algorithms for BFS, DFS and applications. In Proc. 22nd International Conference on Computing and Combinatorics (COCOON 2016), volume 9797 of LNCS, pages 119–130. Springer, 2016. 3. Preston Briggs and Linda Torczon. An efficient representation for sparse sets. ACM Lett. Program. Lang. Syst., 2(1-4):59–69, 1993. 4. Peter Elias. Universal codeword sets and representations of the integers. IEEE Trans. Inform. Theory, 21(2):194–203, 1975. 5. Amr Elmasry, Torben Hagerup, and Frank Kammer. Space-efficient basic graph algorithms. In Proc. 32nd International Symposium on Theoretical Aspects of Computer Science (STACS 2015), volume 30 of LIPIcs, pages 288–301. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2015. 6. Michael L. Fredman and Dan E. Willard. Surpassing the information theoretic bound with fusion trees. J. Comput. Syst. Sci., 47(3):424–436, 1993. 7. Torben Hagerup. Sorting and searching on the word RAM. In Proc. 15th Annual Symposium on Theoretical Aspects of Computer Science (STACS 1998), volume 1373 of LNCS, pages 366–398. Springer, 1998. 8. Torben Hagerup and Frank Kammer. Succinct choice dictionaries. Computing Research Repository (CoRR), arXiv:1604.06058 [cs.DS], 2016. 9. Torben Hagerup and Frank Kammer. On-the-fly array initialization in less space. In Proc. 28th International Symposium on Algorithms and Computation (ISAAC 2017), to appear, 2017. 10. Torben Hagerup, Frank Kammer, and Moritz Laudahn. Space-efficient Euler partition and bipartite edge coloring. In Proc. 10th International Conference on Algorithms and Complexity (CIAC 2017), volume 10236 of LNCS, pages 322–333. Springer, 2017. 11. Frank Kammer, Dieter Kratsch, and Moritz Laudahn. Space-efficient biconnected components and recognition of outerplanar graphs. In Proc. 41st International Symposium on Mathematical Foundations of Computer Science (MFCS 2016), volume 58 of LIPIcs, pages 56:1–56:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2016. 12. Takashi Katoh and Keisuke Goto. In-place initializable arrays. Computing Research Repository (CoRR), arXiv:1709.08900 [cs.DS], 2017. 9
8cs.DS
A GEOMETER’S VIEW OF THE THE CRAMÉR-RAO BOUND ON ESTIMATOR VARIANCE arXiv:1710.01598v2 [stat.OT] 25 Oct 2017 ANTHONY D. BLAOM Abstract. The classical Cramér-Rao inequality gives a lower bound for the variance of a unbiased estimator of an unknown parameter, in some statistical model of a random process. In this note we rewrite the statment and proof of the bound using contemporary geometric language. The Cramér-Rao inequality gives a lower bound for the variance of a unbiased estimator of a parameter in some statistical model of a random process. Below is a restatement and proof in sympathy with the underlying geometry the problem. While our presentation is mildly novel, its mathematical content is very well-known. Assuming some very basic familiarity with Riemannian geometry, and that one has reformulated the bound appropriately, the essential parts of the proof boil down to half a dozen lines. For completeness we explain the connection with loglikelihoods, and show how to recover the more usual statement in terms of the Fisher information matrix. We thank Jakob Ströhl for helpful feedback. 1. The Cramér-Rao inequality The mathematical setting of statistical inference consists of: (i) a smooth1 manifold X , the sample space, which we will suppose is finite-dimensional; and (ii) a set P of probability measures on X , called the space of models or parameters. The objective is to make inferences about an unknown model p ∈ P, given one or more observations x ∈ X , drawn at random from X according to p. Under certain regularity assumptions detailed below, this data suffices to make X into a Riemannian manifold, whose geometric properties are related to problems of statistical inference. It seems that Calyampudi Radhakrishna Rao was the first to articulate this connection between geometry and statistics [2]. In formulating the Cramér-Rao inequality, we suppose that P is a smooth finitedimensional manifold (i.e., we are doing so-called parametric inference). We say that P is regular if the probability measures p ∈ P are all Borel measures on X , and if there exists some positive Borel measure µ on X , hereafter called a reference measure, such that (1) p = fp µ, for some collection of smooth functions fp , p ∈ P, on X . The definition of regularity furthermore requires that we may arrange (x, p) 7→ fp (x) to be jointly smooth. 1 In this note ‘smooth’ means C 2 . 1 2 ANTHONY D. BLAOM An unbiased estimator of some smooth function θ : P → R (the “parameter”) is a smooth function θ̂ : X → R whose expectation under each p ∈ P is precisely θ(p): Z (2) θ(p) = E(θ̂ | p) := θ̂(x) dp ; p ∈ P. x∈X Theorem (Rao-Cramér [2, 1]). The space of models P determines a natural Riemannian metric on X , known as the Fisher-Rao metric, with respect to which there is the following lower bound on the variance of an unbiased estimator θ̂ of θ: V(θ̂ | p) > |∇θ(p)|2 ; (3) p ∈ P. More informally: The parameter space P comes equipped with a natural way of measuring distances, leading to a well-defined notion of steepest rate of ascent, for any function θ on P. The square of this rate is precisely the lower bound for the variance of an unbiased estimator θ̂. 2. Observation-dependent one-forms on the space of models It is fundamental to the present geometric point of view that each observation x ∈ X determines a one-form λx on the space P of models in the following way: Let v ∈ Tp0 P be a tangent vector, understood as the derivative of some path t 7→ pt ∈ P through p0 : (4) v= d pt dt t=0 . Then, recalling that each pt is a probability measure on X (and P is regular) we may write pt = gt p0 , for some smooth function gt : X → R, and define d gt (x) dt The proof of the following is straightforward: λx (v) = t=0 . Lemma. E(λx (v) | p) = 0 for all p ∈ P and v ∈ Tp P. Now if v ∈ Tp0 P is a tangent vector as in (4), and if (2) holds, then Z Z Z d d θ̂(x) dpt = θ̂(x)gt (x) dp0 = θ̂(x)λx (v) dp0 , dθ(v) = dt x∈X dt x∈X t=0 t=0 x∈X giving us: Proposition. For any unbiased estimator θ̂ : X → R of θ : P → R, one has Z dθ(v) = θ̂(x)λx (v) dp; v ∈ Tp P. x∈X A GEOMETER’S VIEW OF THE THE CRAMÉR-RAO BOUND ON ESTIMATOR VARIANCE3 3. Log-likelihoods As an aside, we shall now see that the observation-dependent one-forms λx are exact, and at the same time give their more usual interpretation in terms of loglikelihoods. Choosing a reference measure µ, and defining fp as in (1), one defines the loglikelihood function (x, p) 7→ Lx (p) : X × P → R by Lx (p) = log fp (x). While the log-likelihood depends on the reference measure µ, its derivative dLx (a one-form on P) does not, for in fact: Lemma. dLx = λx . Proof. With a reference measure fixed as in (1), we have, along a path t 7→ pt , pt = gt p0 , where gt = fpt /fp0 . Applying the definition of λx , we compute  d    d d fpt (x) d eLx (pt ) λx = = . = dLx pt pt dt t=0 dt fp0 (x) t=0 dt eLx (p0 ) t=0 dt t=0  In particular, local maxima of Lx (points of so-called maximum likelihood) do not depend on the reference measure. 4. The metric and derivation of the bound With the observation-dependent one-forms in hand, we may now define the Fisher-Rao Riemannian metric on P. It is given by Z I(u, v) = λx (u)λx (v) dp , for u, v ∈ Tp P. x∈X Now that we have a metric, it is natural to consider ∇θ instead of dθ in Proposition 2. By the definition of gradient, we have |∇θ(p)|2 = dθ(∇θ(p)). This equation and Proposition 2 now gives, for any v ∈ Tp P, Z Z 2 |∇θ(p)| = θ̂(x)λx (∇θ(p)) dp = (θ̂(x) − θ(p))λx (∇θ(p)) dp. x∈X R The second equality holds because x∈X λx (∇θ(p)) dp = 0, by Lemma 2. Applying the Cauchy-Schwartz inequality to the right-hand side gives Z 1/2 Z 1/2 2 2 |∇θ(p)| 6 (θ̂(x) − θ(p)) dp λx (∇θ(p))λx (∇θ(p)) dp x∈X x∈X q q p = V(θ̂ | p)) I(∇θ(p), ∇θ(p)) = V(θ̂ | p)) |∇θ(p)|. The Cramér-Rao bound now follows. 4 ANTHONY D. BLAOM 5. The bound in terms of Fisher information Theorem 1 is coordinate-free formulation. To recover the more usual statement of the Cramér-Rao bound, let φ1 , . . . , φk be local coordinates on P, the space of models on X , and ∂φ∂ 1 , . . . , ∂φ∂ k the corresponding vector fields on P, characterised by   ∂ = δij . dφi ∂φj Here δij = 1 if i = j and is zero otherwise. Applying Lemma 3, the coordinate representation Iij of the Fisher-Rao metric I is given by      ∂  Z ∂ ∂ ∂ Iij (p) = I (p), (p) = dλx (p) dλx (p) dp ∂φi ∂φj ∂φi ∂φj x∈X    Z ∂Lx ∂Lx (p) (p) dp, = ∂φi ∂φj x∈X where Lx (p) = log fp (x) is the log-likelihood. In statistics Iij is known as the Fisher information matrix. For the moment we continue to let θ denote an arbitrary function on P, and θ̂ an unbiased estimate. Now ∇θ is the gradient of θ, with respect to the metric I. Since the coordinate representation of the metric is Iij , a standard computation gives the local coordinate formula X ∂θ ∂ ∇θ = I ij , ∂φ ∂φ i j i,j where {I ij } is the inverse of {Iij }. Regarding the lower bound in Theorem 1, we compute  X  ∂ ∂θ ∂ ∂θ (p) (p) , I mn (p) (p) (p) |∇θ(p)|2 = I(∇θ(p), ∇θ(p)) = I I ij (p) ∂φi ∂φj ∂φm ∂φn i,j,m,n  ∂  X ∂θ ∂θ ∂ = I ij (p)I mn (p) (p) (p) I (p), (p) ∂φi ∂φm ∂φj ∂φn i,j,m,n X ∂θ ∂θ (p) (p) = I ij (p)Ijn (p)I mn (p) ∂φi ∂φm i,j,m,n X X ∂θ ∂θ ∂θ ∂θ = δin I mn (p) (p) (p) = I mi (p) (p) (p). ∂φi ∂φm ∂φi ∂φm i,m,n i,m Theorem 1 now reads V(θ̂ | p) > X i,m I mi (p) ∂θ ∂θ (p) (p). ∂φi ∂φm A GEOMETER’S VIEW OF THE THE CRAMÉR-RAO BOUND ON ESTIMATOR VARIANCE5 In particular, if we suppose θ is one of the coordinate functions, say θ = φj , then we obtain X X ∂φj ∂φj V(φ̂j | p) > I mi (p) (p) (p) = I mi δji δjm = I jj (p), ∂φ ∂φ i m i,m i,m the version of the Cramér-Rao bound to be found in statistics textbooks. References [1] Harald Cramér. Mathematical Methods of Statistics. Princeton Mathematical Series, vol. 9. Princeton University Press, Princeton, N. J., 1946. [2] C. Radhakrishna Rao. Information and the accuracy attainable in the estimation of statistical parameters. Bull. Calcutta Math. Soc., 37:81–91, 1945. E-mail: [email protected]
10math.ST
Noname manuscript No. (will be inserted by the editor) Finding Better Active Learners for Faster Literature Reviews Zhe Yu · Nicholas A. Kraft · Tim Menzies arXiv:1612.03224v5 [cs.SE] 2 Feb 2018 the date of receipt and acceptance should be inserted later Abstract Literature reviews can be time-consuming and tedious to complete. By cataloging and refactoring three state-of-the-art active learning techniques from evidence-based medicine and legal electronic discovery, this paper finds and implements FASTREAD, a faster technique for studying a large corpus of documents, combining and parametrizing the most efficient active learning algorithms. This paper assesses FASTREAD using datasets generated from existing SE literature reviews (Hall, Wahono, Radjenović, Kitchenham et al.). Compared to manual methods, FASTREAD lets researchers find 95% relevant studies after reviewing an order of magnitude fewer papers. Compared to other state-of-the-art automatic methods, FASTREAD reviews 20-50% fewer studies while finding same number of relevant primary studies in a systematic literature review. Keywords Active Learning · Systematic Literature Review · Software Engineering · Primary Study Selection 1 Errarta This version contains updated results after fixing issues in previous datasets. The new results make the same overall conclusion as before; i.e. FASTREAD is best. The authors thank Chandramouli Shama Sastry for pointing out those issues in the datasets. The updated datasets are available at https://doi.org/10.5281/zenodo.1162952. Zhe Yu Department of Computer Science, North Carolina State University, Raleigh, NC, USA E-mail: [email protected] Nicholas A. Kraft ABB Corporate Research, Raleigh, NC, USA E-mail: [email protected] Tim Menzies Department of Computer Science, North Carolina State University, Raleigh, NC, USA E-mail: [email protected] 2 Zhe Yu et al. 2 Introduction When conducting a literature review in software engineering, it is common practice [30] to conduct a primary study selection where a large number of potentially relevant papers, collected via some initial query (e.g. keyword search in Google Scholar), are manually reviewed and assessed for relevance. To reduce the effort associated with conducting such tedious and time-consuming linear manual reviews, researchers in the fields of evidencebased medicine [47, 60, 62] and electronic discovery [11, 12] have developed active learning methods that can build an automatic classifier that prunes away irrelevant papers using feedback from users. In this paper we investigate whether there are any insights from that related work that can reduce the effort associated with literature reviews in software engineering (SE). Specifically, in this paper we: – Review those active learning methods [11, 12, 47, 60, 62] and find that in evidence-based medicine and legal electronic discovery, there are three widely recognized state-of-the-art active learning methods [11, 40, 62]. – Analyze those three active learning methods and find that they are each assembled from lower-level techniques that address four questions: (1) when to start training, (2) which study to query next, (3) whether to stop training, and (4) how to balance the training data. – Investigate 32 possible active learning approaches that represent different combinations of lower-level techniques to address the four questions. – Evaluate the 32 active learning approaches using SE data and the evaluation criteria “work saved over sampling at 95% recall” (WSS@95) [8]. – Discover that one of those 32 active learning approaches, which we call FASTREAD, reduces the effort required to find relevant papers the most. Based on that work, the contributions and outcomes of this paper are: 1. A cautionary tale that verbatim reuse of data mining methods from other fields may not produce the best results for SE. Specifically, we show that supposed state-of-the-art methods from other fields do not work best on SE data. 2. A case study showing the value of refactoring and recombining data mining methods. The FASTREAD tool recommended by this paper was constructed via such refactoring. 3. A demonstration that FASTREAD is a new highwater mark in reducing the effort associated with primary study selection in SE literature reviews. 4. A open source workbench that allows for the fast evaluation of FASTREAD, or any other technology assisted reading method. See https://github.com/fastread/src. 5. Four new data sets that enable extensive evaluation of FASTREAD or other methods. The creation and distribution of these data sets is an important contribution, because prior to this study, it was very difficult to obtain even one such data set. The rest of this paper offers background notes on the problem of reading technical documents and on how that problem has been solved in other fields. We then refactor those solution into 32 candidate solutions, which we asses using prominent published SE literature reviews. Using that data, we ask and answer the following three research questions: – RQ1: Can active learning techniques reduce effort in primary study selection? We find that using FASTREAD, after reviewing a few hundred papers, it is possible to find 95% of the relevant papers found by a linear manual review of thousands of papers. Finding Better Active Learners for Faster Literature Reviews 3 – RQ2: Should we just adopt the state-of-the-art treatments from other fields? Our results show that better active learners for SE can be build by mixing and matching methods from the state-of-the-art in other fields. – RQ3: How much effort can FASTREAD, our new state-of-the-art method for primary study selection, save in an SLR? We show that FASTREAD can reduce more than 40% of the effort associated with the primary selection study phase of a literature review while retrieving 95% of the relevant studies. 3 Background Systematic Literature Reviews (SLRs) are a well established and widely applied review method in Software Engineering since Kitchenham, Dybå, and Jørgensen first adopted it to support evidence-based software engineering in 2004 and 2005 [14, 32]. Researchers can get a general idea of current activity in their field of interests by reading the SLR studies. Furthermore, a deeper understanding of the topic may be gained by conducting an SLR. An increasing number of SLRs has been conducted since the proposal and revision of the SLR guidelines in 2007 [29]. For example, there were 26 SLRs on IEEE Xplore during the year of 2005 and that number has increased to 137, 199 for the years 2010, 2015 (respectively). Various scholars suggest that an SLR is required before any research in Software Engineering is conducted [29]. While this is certainly a good advice, currently an SLR is a large, time consuming and complex task [5, 6, 24, 25]. Cost reduction in SLRs is therefore an important topic and will benefit researchers in software engineering community. Previously we have analyzed the costs of SLRs [6, 25]. As shown in Fig. 1, primary study selection, which is noted as “selecting papers” in Fig. 1, is among the top three most difficult as well as time-consuming aspects in an SLR. Usually, reviewers need to evaluate thousands of studies trying to find dozens of them that are relevant to the research questions based on their title, abstract, or full text [5]. An extreme example of this is where reviewers sourced over 3,000 studies, and only used 7 of them in their final review [2]. In terms of actual cost, Malheiros has documented that it requires 3 hours for one reviewer to review 100 studies [36]. This implies that it is a month’s work for one graduate student to review 3000 studies or three months’ work to review 9000 studies. The cost associated with primary study selection has become a serious problem and will continue (a) Most Difficult Aspects of SLR Process. (b) Most Time Consuming Aspects of SLR Process. Fig. 1: Data collected from surveys to SLR authors [6]. green , red , and blue show the most, second most, and third most, respectively voted item. 4 Zhe Yu et al. to grow in the near future as the population of candidates for primary studies increases dramatically. In this paper, we focus on reducing cost in primary study selection only. Our prioritization on the cost reductions of primary study selection is not to discount the effort associated with other parts of the SLR process. Indeed, one of our considerations is that there are already tools to support other parts of the SLR process, as well as different techniques to facilitate primary study selection. All these techniques (such as Quasi-Gold Standard based search [65, 66], visual text mining [16, 18, 19, 36], and snowballing [27, 63]) are compatible with works in this paper and a better performance is expected when applied together. This leads to a direction of future work in which the best setting to integrate different techniques will be explored. There are three main aspects in primary study selection: (1) retrieving initial list of primary studies, (2) excluding irrelevant studies, (3) including missing studies. We focus on excluding irrelevant studies because a) there already exists techniques and tools to facilitate (1) and (3) such as Snowballing [27] and StArt [26]; b) the performance of excluding irrelevant studies can be evaluated using existing SLR publications. 3.1 Related Work 3.1.1 Software Engineering Tools In recent years, various tools have been developed to facilitate SLRs in the software engineering community, as summarized in the associated SLRs [37–39]. These tools aim at providing support for protocol development [20, 26, 41], automated search [26, 41], primary study selection [5, 20, 26, 41], quality assessment [5, 20, 41], data extraction and validation [5, 20, 26, 41], data synthesis [5, 20, 26, 41], and report write up [5, 20, 26, 41]. It is extremely helpful to have a tool for managing the whole SLR process. However, the support for primary study selection using these tools is limited (e.g., to tasks such as assigning review jobs to multiple reviewers or to resolving disagreements). Hence, we planned to introduce machine learning to assist primary study selection in SE SLRs but before this paper is published, Ros et al. [50] has achieved this in June 2017. While Ros’17 [50] provided a wide range of techniques to support both search and selection, it has several limitations such as (a) not comparing against state-of-the-art techniques from other domains (which are approaches discussed later in Section 3.1.2 and 3.1.3); (b) not considering any data balancing; (c) testing only on a single unpublished dataset. Visual text mining (VTM) is a technique especially explored in Software Engineering community to support SLR. It is an unsupervised learning method which visualizes the relationship between candidate studies and helps the reviewer to make quick decisions. Malheiros et al. [36] first applied VTM to support primary study selection in SLR. In their small-scale experiment (100 candidate studies, 31 of which are “relevant”), VTM retrieves around 90% of the “relevant” studies by spending about 30% as much time as manual review. However, VTM requires some prior experience and knowledge of text mining and visualization techniques to use [5], and more case studies with large scale are needed to validate their results. Snowballing is another technique attracting much attention in SE SLR research. Given the inherent relevance relationship between a study and its citations, it is of high probability for the citations of (used in backward snowballing) and the studies cite (used in forward snowballing) a known “relevant” study to also be “relevant” [32]. Jalali and Wohlin [27, 63] applied backward snowballing to search for primary studies in SE SLRs and found comparably good Finding Better Active Learners for Faster Literature Reviews 5 result as database search. Felizardo et al. [17] and Wohlin [64] applied forward snowballing to update SE SLRs and greatly reduced the number studies need to be reviewed comparing to a database search. This paper does not use snowballing since, as mentioned by Wohlin [63], snowballing starts with an initial set of relevant papers. FASTREAD’s task is very different: we start with zero relevant papers. 3.1.2 Legal Electronic Discovery Tools Electronic Discovery (e-discovery) is a part of civil litigation where one party (the producing party), offers up materials which are pertinent to a legal case [33]. This involves a review task where the producing party need to retrieve every “relevant” document in their possession and turn them over to the requesting party. It is extremely important to reduce the review cost in e-discovery since in a common case, the producing party will need to retrieve thousands of “relevant” documents among millions of candidates. Technology-assisted review (TAR) is the technique to facilitate the review process. The objective of TAR is to find as many of the “relevant” documents in a collection as possible, with reasonable cost [22]. Various machine learning algorithms have been studied in TAR. So far, in every controlled studies, continuous active learning (Cormack’14) has outperformed others [11, 12], which makes it the state-of-the-art method in legal electronic discovery. It has also been selected as a baseline method in the total recall track of TREC 2015 [49]. Details on continuous active learning are provided in Section 4. 3.1.3 Evidence-based Medicine Tools Systematic literature reviews were first adopted from evidence-based medicine in 2004 [32]. To facilitate citation screening (primary study selection) in systematic review, many groups of researchers have investigated different types of machine learning algorithms and evaluation mechanisms [46, 47]. Cohen et al. first applied text mining techniques to support citation screening and developed several performance metrics (including WSS@95) for assessing the performance of different techniques in 2006 [10]. While the great contribution of introducing machine learning and text mining into citation screening as well as the proposed performance metrics of Cohen has been widely acknowledged [46], most of Cohen’s work focused on supervised learning which does not utilize unlabeled data and relies on random sampling to obtain the sufficiently large training set [7–10]. Wallace et al. conducted a series of studies with machine learning techniques, especially active learning [42, 57–62]. Wallace first set up a baseline approach called “patient active learning” (Wallace’10) for machine learning assisted citation screening [62]. The performance of patient active learning is good enough (nearly 100% of the “relevant” citations can be retrieved at half of the conventional review cost) to convince systematic review conductors to adopt machine learning assisted citation screening. Instead of improving this baseline method, Wallace then focused on other aspects of machine learning assisted citation screening such as introducing external expert knowledge [60], allocating review tasks to multiple experts [61] or to crowdsourcing workers [42], and building a tool called abstrackr to provide overall support [59]. Wallace’s work on this topic is of exemplary high-impact and his core algorithm (on simple expert screening), is one of the most popular active learning techniques we have found in the evidence-based medical literature. That said, this technique has not been updated since 2010 [62]. In this paper we are focused on the core active learning algorithm for cost 6 Zhe Yu et al. minimization. Hence, we do not explore techniques such as Wallace’s use of multiple experts (but in future work, we will explore this approach). More recent work of Miwa et al. explored alternative data balancing and query strategy in 2014 [40] and proposed a new treatment of Certainty plus Weighting (Miwa’14). Instead of uncertainty sampling in patient active learning (Wallace’10), Miwa found that certainty sampling provides better results in clinical citation screening tasks. Similar conclusion for data balancing method as weighting relevant examples was found to be more effective than aggressive undersampling. Although not stated explicitly, Certainty plus Weighting keeps training until all “relevant” studies have been discovered, which differs from the stopping criteria of Wallace’10. Aside from the core algorithm, additional views from latent Dirichlet allocation (LDA) has been found to be potentially useful. Other work related to machine learning assisted citation screening do not utilize active learning. Pure supervised learning requires a sufficiently large training set, which leads to a huge review cost [1, 10]. Semi-supervised learning [35] does not utilize the human reviewers’ feedback for updating the model, which leads to a depreciated performance in a long run. As a result, the patient active learning proposed by Wallace et al. [62] and the Certainty plus Weighting approach by Miwa et al. [40] are still considered to be the state-of-the-art method for citation screening in the scenario with no external knowledge and equally expensive reviewers. Details on these two approaches are provided in Section 4. There are also existing tools to support study selection in systematic reviews, e.g. Abstrakr1 [59], EPPI-Reviewer2 [54], Rayaan3 [45]. Useful features can be found in these tools such as a) Rayaan and EPPI-Reviewer: incorporated keyword search in screening; b) Rayaan and EPPI-Reviewer: deduplication; c) Rayaan and EPPI-Reviewer: define inclusion/exclusion criteria by terms; d) Abstrakr: user defined tags; e) all three: assign review tasks to multiple reviewers; f) all three: automatically extract data from PubMed. However, the active learning parts alone in these tools are depreciated. Under the condition that no additional feature (search, tags, define inclusion/exclusion terms) is used, we tried all three tools with one of our dataset– Hall set (104 relevant in 8911 studies) and after reviewing 1000 studies, only 10 to 15 relevant ones were found, which was very close to a random sampling result without any learning. Since none of these tools are open-source, we cannot tell whether active learning is applied or how/when it is applied in each tool. This motivates us to develop an open source tool which focuses on active learning to support the primary study selection process. Details about our tool are presented in Section 7. 4 Technical Details As mentioned in Section 3.1, the existing state-of-the-art methods are Wallace’10 [62] (patient active learning), Miwa’14 [40] (Certainty plus Weighting), and Cormack’14 [11] (continuous active learning). All three state-of-the-art methods share the following common techniques. Support vector machines (SVM) are a well-known and widely used classification technique. The idea behind is to map input data to a high-dimension feature space and then construct a linear decision plane in that feature space [13]. Linear SVM [28] has been proved to be a useful model in SE text mining [33] and is applied in the state-of-the-art active learning methods of both evidence-based medicine and electronic discovery [11, 40, 62]. One 1 2 3 http://abstrackr.cebm.brown.edu http://eppi.ioe.ac.uk/cms/er4/ http://rayyan.qcri.org/ Finding Better Active Learners for Faster Literature Reviews (a) No data balancing (b) With weighting 7 (c) With aggressive undersampling. Fig. 2: Active learning with SVM and different data balancing techniques. drawback of SVM is its poor interpretability as compared to classifiers like decision trees. However, SVM still fits here since the model itself is not important as long as it could provide a relative ranking of literature. Active learning is a cost-aware machine learning algorithm where labels of training data can be acquired with certain costs. The key idea behind active learning is that a machine learning algorithm can perform better with less training if it is allowed to choose the data from which it learns [52]. There are several scenarios active learning is applied to, such as membership query synthesis, stream-based selective sampling, and pool-based sampling [51]. There are also different query strategies of active learning, such as uncertainty sampling, query-by-committee, expected model change, expected error reduction, variance reduction, and density-weighted methods [51]. Here, we briefly introduce one scenario and two query strategies, which are used in our later experiments and discussions. Figure 2 shows a simple demonstration of an SVM active-learner. For the sake of simplicity, this demonstration assumes that the data has two features (shown in that figure as the horizontal and vertical axis). In that figure, “O” is the minority class, “relevant” studies in SLR. “O”s in blue are studies already identified as “relevant” (included) by human reviewers. “X ” is the majority class, “irrelevant” studies in SLR. “X ”s in red are studies already identified as “irrelevant” (excluded) by human reviewers (note that in (c), some red “X ”s are removed from the training set by aggressive undersampling). Markers in gray are the unlabeled studies (studies have not been reviewed yet), and black line is SVM decision plane. In (b) Weighting balances the training data by putting more weight on the minority class examples. In (c), aggressive undersampling balances the training data by throwing away majority class examples closest to the old decision plane in (a). When deciding which studies to be reviewed next, uncertainty sampling returns the unlabeled examples closest to the decision plane (U) while certainty sampling returns the unlabeled examples furthest to the decision plane from the bottom-left side (C). By analyzing the differences between the state-of-the-art methods, we identified the following key components in solving the problem with active learning and linear SVM. When to start training: – P stands for “patient”. As suggested by Wallace et al. [62], “hasty generation”, which means start training with too few relevant examples, may lead to poor performance. The algorithm keeps random sampling until a sufficient number of “relevant” studies are retrieved. In our experiments, the sufficient number of “relevant” studies retrieved is set to 5, which means when at least 5 “relevant” studies have been retrieved by random 8 Zhe Yu et al. sampling, the algorithm goes into next stage. Wallace’10 [62] and Miwa’14 [40] use P for when to start training. – H stands for “hasty”, which is the opposite of P. The algorithm starts training as soon as ONE “relevant” study is retrieved, as suggested in Cormack’14 [11, 12]. Which document to query next: – U stands for “uncertainty sampling”. The algorithm utilizes uncertainty sampling to build the classifier, where unlabeled examples closest to the SVM decision plane are sampled for query (U in Figure 2). Wallace’10 [62] uses U for Query strategy. – C stands for “certainty sampling”. The algorithm utilizes certainty sampling to build the classifier, where unlabeled examples furthest to the SVM decision plane and lie in the “relevant” side are sampled for query (C in Figure 2). Miwa’14 [40] and Cormack’14 [11, 12] use C for query strategy. Whether to stop training (or not): – S stands for “stop training”. The algorithm stops training once the classifier is stable. In our experiments, the classifier is treated as stable once more than 30 “relevant” studies have been retrieved as training examples. Wallace’10 [62] uses S for whether to stop training. – T stands for “continue training”. The algorithm never stops training as suggested in Cormack’14 [11] and Miwa’14 [40]. If query strategy is U, algorithm switches to certainty sampling after classifier is stable but training never stops. How to balance the training data: – N stands for “no data balancing”. The algorithm does not balance the training data (demonstrated in Figure 2a) as suggested by Cormack’14 [11]. – A stands for “aggressive undersampling”. The algorithm utilizes aggressive undersampling4 after classifier is stable, as suggested by Wallace’10 [62]. – W stands for “Weighting”. The algorithm utilizes Weighting5 for data balancing (before and after the classifier is stable), as suggested by Miwa’14 [40]. – M stands for “mixing of Weighting and aggressive undersampling”. Weighting is applied before the classifier is stable while aggressive undersampling is applied after the classifier is stable. This treatment comes from the observation that “Weighting” performs better in early stages while “aggressive undersampling” performs better in later stages. By combining different approaches, we ended up with 32 possible treatments including the state-of-the-art methods: – The PUSA approach advocated by Wallace’10 [62]. – The PCTW approach advocated by Miwa’14 [40]. – The HCTN approach advocated by Cormack’14 [11]. Pseudo code for the 32 machine learning treatments are shown in Algorithm 1. Along with the current standard procedure as a baseline approach: – Linear Review: no machine learning, query studies in a random order. 4 Aggressive undersampling throws away majority (irrelevant) training examples closest to SVM decision plane until reaching the same number of minority (relevant) training examples. A demonstration is shown in Figure 2c. 5 Weighting assigns different weight to each class, W = 1/|L |, W = 1/|L |, when training SVM. R R I I A demonstration is shown in Figure 2b. LR is defined in Figure 3. Finding Better Active Learners for Faster Literature Reviews All 32 machine learning treatments are tested and compared in Section 5. 9 10 Zhe Yu et al. Algorithm 1: Psuedo Code Input :E, set of all candidate studies R, set of ground truth relevant studies AL, algorithm code, e.g. PUSA for Wallace’10 treatment :LR , set of included studies Output 1 2 3 4 5 6 7 L ← ∅; LR ← ∅; ¬L ← E; // Keep reviewing until stopping rule satisfied while |LR | < 0.95|R| do // Start training or not if |LR | ≥ Enough(AL) then if T ∈ AL or N otStable(LR ) then CL ← T rain(AL, L); // Query next x ← Query(AL, CL, ¬L, LR ); 8 9 10 11 12 13 14 15 else // Random Sampling x ← Random(¬L); // Simulate review L ← L ∪ x; ¬L ← ¬L \ x; if x ∈ R then LR ← LR ∪ x; The algorithm on this page use the following notation. – E: the set of all candidate studies (returned from search). – R ⊂ E: the set of ground truth relevant studies. – I = E \ R: the set of ground truth irrelevant studies. – L ⊂ E: the set of labeled/reviewed studies, each review reveals whether a study x ∈ R, but incurs a cost. – ¬L = E \ L: the set of unlabeled/unreviewed studies. – LR = L ∩ R: the identified relevant (included) studies. – LI = L ∩ I: the identified irrelevant (excluded) studies. The general form of the excluding irrelevant studies problem can be described as following: start with L = ∅, prioritize which studies to be reviewed so as to maximize |LR | while minimizing |L| (identify more relevant studies with less cost). Fig. 3: Notations and Problem Description return LR ; Support functions for Algorithm 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 t1 ← 5; t2 ← 30; Function Enough(AL) if P ∈ AL then return t1; else if H ∈ AL then return 1; else return ∞; Function NotStable(LR ) if |LR | ≥ t2 then return False ; else return True ; Function Train(AL, L) if W ∈ AL or M ∈ AL then // Train linear SVM with Weighting CL ← SV M (L, kernel = linear, class weight = balanced); else // Train linear SVM CL ← SV M (L, kernel = linear); 22 if A ∈ AL or M ∈ AL then if ¬ NotStable(LR ) then // Aggressive undersampling LI ← L \ LR ; tmp ← argsort(CL.decision f unction(LI ))[: |LR |]; CL ← SV M (LR ∪ tmp, kernel = linear); 23 return CL; 18 19 20 21 24 25 26 27 28 29 Function Query(AL, CL, ¬L, LR ) if U ∈ AL and N otStable(LR ) then // Uncertainty Sampling x ← argsort(abs(CL.decision f unction(¬L)))[0]; else // Certainty Sampling x ← argsort(CL.decision f unction(¬L))[−1]; return x; Finding Better Active Learners for Faster Literature Reviews 11 5 Experiments This section describes the experimental procedures that we used to evaluate the treatments described in Section 4. 5.1 Performance Metrics As shown in Figure 3, the problem to be solved is multi-objective. The performance of each algorithm is thus usually evaluated by its recall (|LR |/|R|) vs. studies reviewed (|L|) curve. This performance metrics is suggested by Cormack et al. [11,12,55] and best fits the objectives of excluding irrelevant studies problem. To enable a statistical analysis of the performances, the recall vs. studies reviewed curve is cut by a 0.95 recall line where studies reviewed (|L|) when reaching 0.95 recall (|LR | ≥ 0.95|R|) is used to assess performances. The reason behind 0.95 recall is that a) 1.00 recall can never be guaranteed by any text mining method unless all the candidate studies are reviewed; b) 0.95 recall is usually considered acceptable in evidence-based medicine [8, 10, 46] despite the fact that there might still be “relevant” studies missing [53]. As a result, two metrics are used for evaluation: – X95 = min{|L| | |LR | ≥ 0.95|R|}. – WSS@95 = 0.95 − X95/|P |. Note that one algorithm is better than the other if its X95 is smaller or WSS@95 [8] is larger. 5.2 Datasets Although a large number of SLRs are published every year, there is no dataset clearly documenting the details in primary study selection. As a result, three datasets are created reverse-engineering existing SLRs and being used in this study to simulate the process of excluding irrelevant studies. The three datasets are named after the authors of their original publication source– Wahono dataset from Wahono et al. 2015 [56], Hall dataset from Hall et al. 2012 [23], and Radjenović dataset from Radjenović et al. 2013 [48]. For each of the datasets, the search string S and the final inclusion list F from the original publication are used for the data collection. We retrieve the initial candidate collection E from IEEE Xplore with the search string (slightly modified to meet the requirement of IEEE Xplore). Then make a final list of inclusion R as R = F ∩ E. Here, for simplicity we only extract candidate studies from IEEE Xplore. We will explore possibilities for efficiently utilizing multiple data sources in the future work but in this paper, without loss of generality, we only extract initial candidate list from single data source. In this way, we created three datasets that reasonably resemble real SLR selection results assuming that any study outside the final inclusion list F is irrelevant to the original SLRs. A summary of the created datasets is presented in Table 1. Apart from the three created datasets, one dataset (Kitchenham) is provided directly by the author of Kitchenham et al. 2010 [31] and includes two levels of relevance information. In general, only the “content relevant” labels are used in experiments for a fair comparison with other datasets. Additionally, the “abstract relevant” labels are used for detailed review cost analysis in RQ3. Summary of Kitchenham dataset is also presented in Table 1. All the above datasets are available on-line at Seacraft, Zenodo6 . 6 https://doi.org/10.5281/zenodo.1162952 12 Zhe Yu et al. Table 1: Descriptive statistics for experimental datasets Datasets Generated Original #Candidate |E| #Relevant |R| #Candidate #Relevant |F| Wahono 7002 62 2117 72 Hall 8911 104 2073 136 Radjenović 6000 48 13126 106 Kitchenham 1704 45 (132) 1704 45 (132) Our datasets are generated using information in the original SLR literature. Our candidate studies are retrieved by applying similar if not the same the search string from original SLR literature and search in IEEE Xplore. The set of our relevant studies is the intersection of the set of our candidate studies and the set of final included studies in the original SLR literature. Kitchenham dataset is different as it is provided directly by Kitchenham and it has two level of relevance labels– 132 relevant studies by title and abstract review and within which, 45 relevant studies by content review. 5.3 Simulation Studies In the following, each experiment is a simulation of one specific treatment on one dataset. More specifically, there is no human activity involved in these experiments, when asked for a label, the true label in the dataset is queried instead of a human reviewer. As a result, each experiment can be repeated with different random seed to capture variances and also makes reproducing the experiments possible. 5.4 Controlled Variables For the sake of a fair comparison, different treatments in Section 4 share an identical set of controlled variables including preprocessing, featurization and classifier. Each candidate study in the initial list is first tokenized by stop words removal after concatenating its title and abstract. After tokenization, the bag of words are featurized into a term frequency vector. Then, reduce the dimensionality of the term frequency vector with to keep only M = 4000 of the terms with highest tf-idf7 score and normalize the hashed matrix by its L2 norm each row at last. TfidfVectorizer in scikit-learn is utilized for the above preprocessing and featurization steps. Alternatives such as stemming, LDA [3], paragraph vectors [34] require further exploration and are scheduled in our future works. All 32 treatments use the same classifier– linear SVM from scikit-learn. 6 Results All the following results were generated from 30 repeats simulations, using different random number seeds from each simulation. As shown below, all our results are reported in terms of medians (50th percentile) and iqrs ((75-25)th percentile). 7 For term t in document d, T f idf (t, d) = wdt × (log P frequency of term t in document d. For term t, T f idf (t) = (log P |D| t) sgn(wd d∈D + 1) and is used for feature selection. |D| t) sgn(wd d∈D P + 1) where wit is the term P t d∈D T f idf (t, d) = d∈D wd × Finding Better Active Learners for Faster Literature Reviews 13 Table 2: Scott-Knott analysis for number of studies reviewed/ work saved over sampling to reach 95% recall Wahono X95 WSS@95 Rank Treatment Median IQR Median IQR 1 HUTM 670 230 0.85 0.04 1 HCTM 740 220 0.84 0.03 2 HUTA 780 140 0.84 0.02 2 HCTW 790 90 0.84 0.02 2 HUTW 800 110 0.84 0.02 2 HCTA 800 140 0.83 0.02 3 PCTM 1150 450 0.78 0.07 3 PUTM 1180 420 0.78 0.07 3 PCTA 1190 340 0.78 0.05 3 PUTA 1190 340 0.78 0.05 3 PCTW 1210 350 0.78 0.06 3 PUTW 1220 370 0.77 0.06 4 HUSM 1410 400 0.75 0.06 5 HUSA 1610 370 0.72 0.07 6 PUSM 1810 370 0.69 0.06 6 PUSA 1910 700 0.67 0.10 7 HUSW 2220 400 0.63 0.06 7 PUSW 2240 360 0.63 0.06 8 HUTN 2700 40 0.56 0.01 8 HCTN 2720 40 0.56 0.01 8 PCSW 2860 1320 0.54 0.20 8 PCSM 2860 1320 0.54 0.20 8 PCTN 2850 1130 0.54 0.17 8 PUTN 2850 1130 0.54 0.17 9 PCSN 3020 1810 0.51 0.26 9 PCSA 3020 1810 0.51 0.26 10 HUSN 4320 110 0.33 0.03 10 PUSN 4370 1290 0.32 0.19 11 linear 6650 0 0 0 11 HCSA 6490 2760 -0.01 0.39 11 HCSN 6490 2760 -0.01 0.39 11 HCSM 6490 3110 -0.01 0.44 11 HCSW 6490 3110 -0.01 0.44 Radjenović X95 WSS@95 Rank Treatment Median IQR Median IQR 1 HUTM 680 180 0.83 0.03 1 HCTM 780 130 0.82 0.02 1 HCTA 790 180 0.82 0.03 1 HUTA 800 180 0.82 0.03 2 HUSA 890 310 0.80 0.06 2 HUSM 890 270 0.80 0.05 3 HUTW 960 80 0.79 0.02 3 HCTW 980 60 0.79 0.01 3 HUSW 1080 410 0.77 0.07 4 PCTM 1150 270 0.76 0.05 4 PUTM 1150 270 0.76 0.05 5 HUTN 1250 100 0.74 0.02 5 PCTA 1260 210 0.74 0.05 5 PUTA 1260 210 0.74 0.05 5 HCTN 1270 70 0.74 0.02 5 PUSM 1250 400 0.74 0.07 5 PUSW 1250 450 0.73 0.08 5 PUTW 1350 310 0.72 0.06 5 PCTW 1370 310 0.72 0.06 5 PUSA 1400 490 0.71 0.09 6 HUSN 1570 300 0.69 0.05 6 PCTN 1600 360 0.68 0.06 6 PUTN 1600 360 0.68 0.06 7 PUSN 1890 320 0.64 0.06 8 PCSW 2250 940 0.57 0.20 8 PCSM 2250 940 0.57 0.20 9 PCSN 2840 1680 0.47 0.31 9 PCSA 2840 1680 0.47 0.31 10 HCSA 5310 2140 0.07 0.36 10 HCSN 5310 2140 0.07 0.36 10 HCSM 5320 2200 0.02 0.37 10 HCSW 5320 2200 0.02 0.37 10 linear 5700 0 0 0 Hall Rank 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 4 4 4 4 5 5 6 6 7 7 7 7 8 8 8 8 8 X95 WSS@95 Treatment Median IQR Median IQR HUTW 340 90 0.91 0.01 HUTA 340 130 0.91 0.02 HUTM 350 120 0.91 0.01 HCTW 370 60 0.91 0.01 HUTN 370 90 0.91 0.01 HCTM 380 100 0.91 0.01 HCTA 390 150 0.91 0.02 HCTN 410 80 0.90 0.01 HUSM 530 120 0.89 0.01 HUSW 560 250 0.89 0.03 PCTW 610 210 0.88 0.02 PUTW 610 220 0.88 0.03 HUSA 630 170 0.88 0.02 PCTN 650 220 0.88 0.03 PUTN 650 220 0.88 0.03 PUTM 670 220 0.87 0.03 PCTM 680 230 0.87 0.03 PCTA 700 210 0.87 0.03 PUTA 700 220 0.87 0.03 PUSW 740 230 0.87 0.03 PUSM 770 240 0.86 0.03 PUSA 880 270 0.85 0.04 PCSW 1150 570 0.82 0.07 PCSM 1150 570 0.82 0.07 PCSN 1530 1050 0.78 0.13 PCSA 1530 1050 0.78 0.13 PUSN 1550 1120 0.77 0.13 HUSN 1800 1020 0.74 0.11 HCSA 7470 5980 0.03 0.67 HCSN 7470 5980 0.03 0.67 linear 8464 0 0 0 HCSM 8840 6060 -0.04 0.68 HCSW 8840 6060 -0.04 0.68 Kitchenham X95 WSS@95 Rank Treatment Median IQR Median IQR 1 HUSA 590 170 0.60 0.19 1 HUTA 590 80 0.60 0.06 1 HUSM 620 70 0.58 0.04 1 HUTM 630 110 0.58 0.07 1 PUSA 640 130 0.57 0.08 1 HUSW 640 140 0.57 0.09 2 HUTN 680 30 0.55 0.02 2 HCTA 680 100 0.55 0.08 2 PUSM 680 90 0.55 0.06 2 HCTM 680 110 0.55 0.07 2 PCTM 690 90 0.54 0.06 2 PUTM 690 70 0.54 0.05 2 PUTA 710 110 0.53 0.08 2 HUTW 710 20 0.53 0.02 3 PUSW 720 110 0.52 0.08 3 PCTA 720 100 0.52 0.08 3 HCTN 730 60 0.52 0.04 3 HCTW 750 60 0.51 0.04 3 PUTN 750 80 0.51 0.05 4 PCTN 750 80 0.51 0.05 4 PUTW 780 70 0.49 0.04 4 PCTW 780 150 0.49 0.09 5 PUSN 800 140 0.47 0.09 5 HUSN 870 280 0.43 0.16 6 PCSW 990 330 0.35 0.19 6 PCSM 990 330 0.35 0.19 6 PCSN 1050 370 0.32 0.24 6 PCSA 1050 370 0.32 0.24 7 linear 1615 0 0 0 7 HCSA 1670 60 -0.04 0.04 7 HCSN 1670 60 -0.04 0.04 7 HCSM 1680 60 -0.04 0.04 7 HCSW 1680 60 -0.04 0.04 Simulations are repeated for 30 times, medians (50th percentile) and iqrs ((75-25)th percentile) are presented. Smaller/larger median value for X95/WSS@95 represents better performance while smaller iqr means better stability. Treatments with same rank have no significant difference in performance while treatments of smaller number in rank are significantly better than those of larger number in rank. The recommended treatment FASTREAD is colored in green while the state-of-the-art treatments are colored in red and linear review is colored in blue . 14 Zhe Yu et al. RQ1: Can active learning techniques reduce effort in primary study selection? In Table 2, we tested 32 active learning treatments and linear review. According to the results, most active learning treatments perform consistently better than linear review (colored in blue ) on all four datasets while four treatments (HCS*) can be even worse than linear review. Interestingly these four treatments share same codes of HCS, which hastily start training (H) with greedy query strategy (C) and give up the attempt to correct the model short after (S). The problem of “hasty generation” is maximized in the setting of HCS and thus leads to an even worse performance than linear review. In general, other active learning treatments can reduce review costs by allowing the reviewer to read fewer studies while still find 95% of the relevant ones. As for how much effort can be saved, RQ3 will answer the question in details. Based on the above, we say: Finding 1 In general, active learning techniques can reduce cost in primary study selections with a sacrifice of (say 5%) recall. RQ2: Should we just adopt the state-of-the-art treatments from other fields? Is it possible to build a better one by mixing and matching from those? In Table 2, performance of the three state-of-the-art treatments are colored in red . On Wahono datasets, Miwa’14 (PCTW) outperforms the other two treatments; while on Hall dataset, Cormack’14 (HCTN) has the best performance; on Radjenović dataset, all three treatments perform similarly; and on Kitchenham dataset, Wallace’10 (PUSA) outperforms the others. Neither of the three state-of-the-art treatments consistently performs the best. This means that adopting the state-of-the-art treatments will not produce best results. According to Scott-Knott analysis, the performance of one treatment, HUTM (colored in green ), consistently stays in the top rank across all four datasets. Further, this treatment dramatically out-performs all three state-of-the-art treatments by requiring 20-50% fewer studies to be reviewed to reach 95% recall. We call this treatment FASTREAD. It executes as follows: 1. Randomly sample from unlabeled candidate studies until 1 “relevant” example retrieved. 2. Then start training with weighting and query with uncertainty sampling, until 30 “relevant” examples retrieved. 3. Then train with aggressive undersampling and query with certainty sampling until finished. Hence, our answer to this research question is: Finding 2 No, we should not just adopt the state-of-the-art methods from other fields. A better method called FASTREAD is generated by mixing and matching from the state-of-the-art methods. RQ3: How much effort can FASTREAD save in an SLR? In terms of the number of studies reviewed, WSS@95 scores in Table 2 reflects how much FASTREAD can save. Number of “relevant” studies (|R|) and the total number of candidate studies (|C|) affect WSS@95 a lot, e.g. WSS@95=0.58 in Kitchenham dataset with |R|=45, |C|=1704 and WSS@95=0.91 in Hall dataset with |R|=104, |C|=8911. Even the smallest number of WSS@95=0.58 in Kitchenham dataset is a success in the reduction of number of studies need to be reviewed comparing to the 5% recall lost. The above performance metrics can be used for comparing the performance of different algorithms. However, for a more realistic cost analysis, labeling/reviewing each study has Finding Better Active Learners for Faster Literature Reviews 15 Table 3: How much can FASTREAD save? Datasets Wahono Hall Radjenović Kitchenham # Studies Reviewed 7002 − 670 = 6332 8991 − 350 = 8641 6000 − 680 = 5320 1704 − 630 = 1074 Review Cost # Missing Relevant ≥ 6332CA + 4CD 4 ≥ 8641CA + 6CD 6 ≥ 5320CA + 3CD 3 32CD + 1074CA 3 Numbers of reviewing every candidate study minus numbers of reviewing with FASTREAD. For example, on Kitchenham dataset, FASTREAD reviews 1074 fewer studies, which costs 32CD + 1074CA less review effort, while misses 3 “relevant” ones. Here CD is the cost to review a study by its content and CA is the cost to review a study by its title and abstract. different costs. For each studies in L, its abstract and title has been reviewed, thus costs CA . In addition, there exists a set LD ⊂ L, LR ⊂ LD where studies in LD have been reviewed by their contents, thus cost an additional CD for each study. Table 3 shows how much FASTREAD save over reviewing all candidate studies. Suppose CD = 9CA , following the estimation that Shemilt made: 1 minute to screen a title-abstract record, 4 minutes to retrieve a full-text study report, and 5 minutes to screen a full-text study report [53]. Then the reduction in review cost is (32CD + 1074CA )/(132CD + 1704CA ) = 47.1%8 . On other datasets, although we do not have the exact number of “abstract relevant” studies, we can estimate the worst case review cost reduction9 with the numbers in Table 1 and Table 3: a) Wahono dataset: 1 − 670(CA + CD )/((670 + 4)CD + 7002CA ) = 48.7%; b) Hall dataset: 1 − 350(CA + CD )/((350 + 6)CD + 8991CA ) = 71.3%; c) Radjenović dataset: 1 − 680(CA + CD )/((680 + 3)CD + 6000CA ) = 44.0%. Note that training time costs are negligibly small (1 second for each round in average) compared to the review time CA because of the small training size (less than 1000 examples before reaching 95% recall). Finding 3 Our results and estimations suggest that FASTREAD can save more than 40% of the effort (associated with the primary selection study phase of a literature review) while retrieving 95% of the “relevant” studies. 7 Tool Support In order to implement FASTREAD, we developed a simple tool as shown in Fig. 4. This software is freely available from SeaCraft Zenodo at https://doi.org/10.5281/zenodo.837861 and its Github repository at https://github.com/fastread/src. Using FASTREAD, a review starts with A: selecting the input candidate study list from workspace/data/ directory. The input candidate list is specified in the format shown in Fig. 5a. The input CSV file must have the Document Title, Abstract, Year, and PDF Link columns. The label column, which is the true label of the candidate studies, is optional and is only used 8 According to Table 1, reviewing all studies costs 132C + 1704C . In our simulations, in average D A FASTREAD did 630 abstract reviews and 100 content reviews. 9 In the worst case we assume that every study reviewed is “abstract relevant” and thus costs C + C to D A review and there is no “abstract relevant” study left except for the 5% missing “content relevant” ones. E.g. in Wahono dataset, FASTREAD reviews 670 studies among the 7002 candidate ones, it costs 670(CA + CD ) while reviewing all studies costs (670 + 4)CD + 7002CA . 16 Zhe Yu et al. for testing. The output CSV file generated by the FASTREAD tool has an additional code column, which is the reviewer-decided label for the candidate study. The final inclusion list can be retrieved by extracting all the studies with “yes” in the code column. As shown by the annotations in Fig. 4, reviews using FASTREAD proceeds as follows: B Randomly select 10 candidate studies for review. C Read through the title and abstract (and click on the title and read the full text if needed) of the candidate study. D Decide whether this study should be coded as Relevant or Irrelevant then click Submit. E Click the Next button to save codes. 10 more candidates are then selected. F The review status will change every time new studies are coded by reviewer and the Next button is hit. The status is shown in the format “Documents Coded: Number of relevant studies found / Number of studies reviewed (Total number of candidate studies).” G1 Once 1 “relevant” study is coded, Random sampling moves to Uncertainty sampling. G2 Once 30 “relevant” study is coded, Uncertainty sampling can change Certainty sampling. H Fig. H can be plotted by clicking the Plot button or checking Auto Plot (figure cached in src/static/image/ directory). I Once finished, coded studies can be exported into a CSV file in the workspace/coded/ directory, in the format shown in Fig. 5b. Note that the Restart button (J) is only for testing and discards all codes. Fig. 4: Basic interface of the FASTREAD tool. 8 Discussion 8.1 What is missed? Our results will show, with FASTREAD, 95% of the “relevant” studies can be retrieved by reviewing a small portion (usually hundreds of studies) of long candidate study list. Given Finding Better Active Learners for Faster Literature Reviews (a) Input format 17 (b) Output format Fig. 5: Data format for FASTREAD tool. that, it is wise to reflect on the 5% of papers not found by such an analysis. To this end, we took one of our case studies and reflected on: – The set of papers R that a human analyst declared to be “relevant” (as listed in their reference list at the end of their paper). – The tangentially relevant subset of those papers R1 ⊆ R that a human analyst explicitly mentions, however briefly, in the body of their paper. – The yet smaller subset of those papers R2 ⊆ R1 that a human analyst discusses, at length, in the body of their report (and for our purposes “at length” is “more that two lines”). We call these insightful papers. Clearly, FASTREAD should not be recommended if our method always misses the insightful papers. For our case studies, on 30 repeats of our methods, we found that R2 \ LR = ∅; i.e. FASTREAD never missed an insightful paper. As for the tangentially relevant papers, FASTREAD found all of those in 95% of the 30 repeats. Based on this analysis, we infer that missing 5% of the papers is not a major impediment to using FASTREAD. Similar conclusion was derived by Shemilt et al. in 2016 [53]. More interestingly, we found that more than 90% of the missing studies come from a same set of size of 0.1|R|. Which means some studies are more likely to be missed while most studies have never been missed in 30 repeats. This may suggest that there are outliers in relevant studies, which are not very important according to our case studies. That said, if the SLR conductor does not want to miss any potential relevant study, they need to review all the candidate studies with full cost. We are actively exploring possibilities to mitigate or compensate the missing studies issue. For example, one technique is “diversity sampling”; i.e. to explore unknown regions by sampling the least similar studies from what have been reviewed before. Exploration and exploitation can be balanced by selection different weight between diversity sampling and certainty/uncertainty sampling Note that more exploration means fewer missing studies but higher review cost. 8.2 What about domain knowledge? In our simulations, we assume that no initial seed training set is available thus a random sampling is performed to collect the minimum training set. This assumption represents the worst case while no external knowledge is available. We show in this work that the absence of that domain knowledge is not a critical failing of the approach. On the other hand, such domain knowledge usually exists in real world SLRs and will boost the performance of FASTREAD if wisely used. For example, if one relevant example and one irrelevant example are known in the very beginning, the random sampling step of FASTREAD is no longer needed and thus leads to additional cost reduction. More details about how to wisely use domain knowledge to boost FASTREAD will be explored further after this work. While we have some preliminary results in that area, we have nothing definitive to report at this time. 18 Zhe Yu et al. 8.3 What about real human reviewers? In our simulations, we assume that there is only one reviewer who never make mistakes. In real world SLRs, there will be multiple reviewers who make some mistakes. To handle this, FASTREAD could be changed to one central learner with multiple review agents. Every agent reviews different studies and feedback his or her decisions to the central learner. The central learner then trains on the feedback of every agent and assigns studies to each agent for review. Such schema will keep all the property of single reviewer FASTREAD and performs similarly. In addition, there might be more intelligent way to allocate review tasks based on the different performance of review agents [61]. Second, consider those multiple reviewers now make mistakes. Candidate studies need to be reviewed by multiple reviewers in case any of them makes mistakes. To explore this issue, appropriate data need to be collected on how human reviewers make mistakes. Wallace et al. addressed this issue in 2015 [42] by analyzing the best policy for allocating review tasks to reviewers with different experience levels as well as difference costs. We also plan to to address this issue in our future work. 8.4 What about multiple categories of studies? In our simulations, we assume that the target is binary classification. However, primary study selection in real world SLRs might be a multi-label classification problem. For example, an SLR with two research questions might go through a primary study selection while each candidate is labeled as “relevant to RQ1”, “relevant to RQ2”, or “irrelevant” while the first two labels can co-exist. The simplest solution for this is to run multiple FASTREAD learners each learns on one label vs. others and each reviewer classify on one label only. In this case, the multi-label classification problem can be divided into multiple FASTREAD problems. Additional work such as ensemble learners can be explored in future works. 9 Threats to Validity There are several validity threats to the design of this study [15]. Any conclusions made from this work must be considered with the following issues in mind: Conclusion validity focuses on the significance of the treatment. To enhance the conclusion validity of this work, we employed several statistical tests (Scott-Knott) to reduce the changes of making spurious conclusions. Internal validity measures how sure we can be that the treatment actually caused the outcome. To enhance internal validity, we heavily constrained our experiments (see our simulated results in strictly controlled environments as discussed in Section 5.4). Construct validity focuses on the relation between the theory behind the experiment and the observation. In this work, we evaluated our results via different treatments with WSS@95 as stated in Section 5.1– note that those measures took us as close as we can to computing cost reduction without “abstract relevant” information. That is, it fits the objective of human-in-the-loop primary study selection as defined in the current literature [11, 12, 55]. Increasing the number of different measures may increase construct validity so, in future work, we will further explore more metrics. External validity concerns how well the conclusion can be applied outside. All the conclusions in this study are drawn from the experiments running on three software engineering SLR Finding Better Active Learners for Faster Literature Reviews 19 datasets created with information from Hall, Wahono, Radjenović et al. studies [23, 48, 56] and one dataset provided by Kitchenham [31]. Therefore, such conclusions may not be applicable to datasets of different scenarios, e.g., citation screening from evidence based medicine or TAR from e-discovery. Such bias threatens any classification experiment. The best any researcher can do is to document that bias then make available to the general research community all the materials used in a study (with the hope that other researchers will explore similar work on different datasets). Existing active learning techniques in citation screening have been criticized by Olorisade et al. for being not replicable [43, 44]. To this end, we have published all our code at https://github.com/fastread/src and all our data at https://doi.org/10.5281/zenodo.1162952. In the experiments, we assume that the human reviewer is always correct. In practice, this assumption cannot hold and problems such as disagreement between reviewers or concept drift (in which reviewers disagree with themselves as time passes) may occur. As discussed below when we discuss Future Work, we intend to explore this matter in the near future. The comparisons in our experiment are based on the controlled variables listed in Section 5.4. If those settings change, then the conclusion in Section 6 may become unreliable. 10 Conclusions Systematic literature reviews are the primary method for aggregating evidence in evidencebased software engineering. It is suggested for every researcher in software engineering to frequently conduct SLRs [29]. One drawback with such SLRs is the time required to complete such a study: an SLR would can weeks to months to finish and the conclusion drawn can be out of date in a few years. To tackle this barrier to understanding the literature, this study focuses on primary study selection, one of the most difficult and time consuming steps in an SLR. Machine learning methods, especially active learning, are explored in our attempts to reduce the effort required to exclude primary studies. In this paper: – We explored 32 different active learners. To the best of our knowledge, this is largest such study yet completed in the software engineering domain. – We have collected data from four large literature reviews. This data is publically available (doi.org/10.5281/zenodo.1162952). Note that the creation and distribution of these data sets is an important contribution, because prior to this study, it was difficult to obtain even one such data set. – We have offered a baseline result that can serve as a challenge problem for SE researchers: how to find more relevant papers after reviewing fewer papers. We have placed in the public domain (github.com/fastread/src) software tools that let others compare our approach with alternative methods. – We created a new reading-assistant tool called FASTREAD. To the best of our knowledge, FASTREAD’s combination of methods has not been previously explored. – Using FASTREAD, we decreased the number of studies to be reviewed by 20-50% (comparing to the prior state-of-the-art). As a result of the above we can: – Offer much assistance to any future SLR. – Offer a cautionary tale to SE researchers who use data miners. Specifically: do not be content with off-the-shelf solutions developed by other communities. SE has nuanced 20 Zhe Yu et al. differences to other domains so our methods need to be tuned to our data. Even within the SE community there may be variations, so the framework provided by this paper is a good example to find the best method for a specific task on specific data. 11 Future Work This study has several limitations as described in Section 8. We consider the limitations as open challenges and plan to address those in future work. Specific problems and plans for the future are listed below. – Conclusions are drawn from three synthetic SLR datasets and one Kitchenham dataset. Validate the generalizability of the results on different datasets, including datasets from evidence-based medicine and e-discovery. – Experiment results are evaluated by WSS@95, which assumes a stop rule of reaching 95% recall. How to stop at 95% recall without first knowing the number “relevant” studies in the pool is an interesting topic. We are exploring this topic actively. – The size and prevalence of data can affect performance of FASTREAD. With the capability of cost reduction from FASTREAD, it is reasonable to ask whether we need the narrow initial search. An interesting future research would be to use every paper on, say Scopus, database as candidates and allow user to just using some simple search to initiate and guide the selection. As a result, the recall is no longer restricted by the initial search string thus may yield higher recall with reasonable cost. – About 10% to 20% efforts are spent on random selection step and most of the variances are also introduced in this step. To speed up the random selection step, external expert knowledge will be introduced while unsupervised learning methods such as VTM, LDA, word2vec, or t-SNE will also be considered in future work. – Some magic parameters are arbitrarily chosen, which may affect the performance. However, parameter tuning is not a good fit for human-in-the-loop primary study selection because a) parameters should be tuned for the data working on; b) but the effect of applying different parameters can not be tested since querying extra label incurs extra cost. Therefore, novel methods should be explored for parameter selection; e.g. better criterion for when to switch from uncertainty sampling to certainty sampling (instead of the “30” relevant examples rule applied now). Works from Borg [4] and Fu [21] will be considered as candidate solutions to this problem. – Current scenario is restricted to having only one reviewer, which is impractical in practice. Problems including how to assign review tasks to multiple reviewers and how to utilize reviewers with different cost and different capability will be explored in the future. – Currently, we assume that reviewers never make mistakes. In future work, we will explore concept drift (reviewers disagree with themselves, at some later time) and how to settle disagreements (reviewers disagree with each other). – This study focuses only on primary study selection. Assistance on other steps of SLR such as searching, data extraction, and protocol development can also help reduce total effort of SLRs. The potential of combining VTM, snowballing, and other tools with FASTREAD needs to be explored as well. We invite other researchers to join us in the exploring the above. Finding Better Active Learners for Faster Literature Reviews 21 Acknowledgement The authors thank Barbara Kitchenham for her attention to this work and for sharing with us the “Kitchenham” dataset used in our experiments. References 1. Adeva, J.G., Atxa, J.P., Carrillo, M.U., Zengotitabengoa, E.A.: Automatic text classification to support systematic reviews in medicine. Expert Systems with Applications 41(4), 1498–1508 (2014) 2. Bezerra, Y.M., Pereira, T.A.B., da Silveira, G.E.: A systematic review of software product lines applied to mobile middleware. In: Information Technology: New Generations, 2009. ITNG’09. Sixth International Conference on, pp. 1024–1029. IEEE (2009) 3. Blei, D.M., Ng, A.Y., Jordan, M.I.: Latent dirichlet allocation. Journal of machine Learning research 3(Jan), 993–1022 (2003) 4. Borg, M.: Tuner: a framework for tuning software engineering tools with handson instructions in r. Journal of Software Evolution and Process 28(6), 427–459 (2016) 5. Bowes, D., Hall, T., Beecham, S.: Slurp: a tool to help large complex systematic literature reviews deliver valid and rigorous results. In: Proceedings of the 2nd international workshop on Evidential assessment of software technologies, pp. 33–36. ACM (2012) 6. Carver, J.C., Hassler, E., Hernandes, E., Kraft, N.A.: Identifying barriers to the systematic literature review process. In: 2013 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, pp. 203–212. IEEE (2013) 7. Cohen, A.M.: An effective general purpose approach for automated biomedical document classification. In: AMIA Annual Symposium Proceedings, vol. 2006, p. 161. American Medical Informatics Association (2006) 8. Cohen, A.M.: Performance of support-vector-machine-based classification on 15 systematic review topics evaluated with the wss@ 95 measure. Journal of the American Medical Informatics Association 18(1), 104–104 (2011) 9. Cohen, A.M., Ambert, K., McDonagh, M.: A prospective evaluation of an automated classification system to support evidence-based medicine and systematic review. In: AMIA Annual Symposium Proceedings, vol. 2010, p. 121. American Medical Informatics Association (2010) 10. Cohen, A.M., Hersh, W.R., Peterson, K., Yen, P.Y.: Reducing workload in systematic review preparation using automated citation classification. Journal of the American Medical Informatics Association 13(2), 206–219 (2006) 11. Cormack, G.V., Grossman, M.R.: Evaluation of machine-learning protocols for technology-assisted review in electronic discovery. In: Proceedings of the 37th international ACM SIGIR conference on Research & development in information retrieval, pp. 153–162. ACM (2014) 12. Cormack, G.V., Grossman, M.R.: Autonomy and reliability of continuous active learning for technologyassisted review. arXiv preprint arXiv:1504.06868 (2015) 13. Cortes, C., Vapnik, V.: Support-vector networks. Machine learning 20(3), 273–297 (1995) 14. Dyba, T., Kitchenham, B.A., Jorgensen, M.: Evidence-based software engineering for practitioners. IEEE Software 22(1), 58–65 (2005). DOI 10.1109/MS.2005.6 15. Feldt, R., Magazinius, A.: Validity threats in empirical software engineering research-an initial survey. In: SEKE, pp. 374–379 (2010) 16. Felizardo, K.R., Andery, G.F., Paulovich, F.V., Minghim, R., Maldonado, J.C.: A visual analysis approach to validate the selection review of primary studies in systematic reviews. Information and Software Technology 54(10), 1079–1091 (2012) 17. Felizardo, K.R., Mendes, E., Kalinowski, M., Souza, É.F., Vijaykumar, N.L.: Using forward snowballing to update systematic reviews in software engineering. In: Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, p. 53. ACM (2016) 18. Felizardo, K.R., Nakagawa, E.Y., Feitosa, D., Minghim, R., Maldonado, J.C.: An approach based on visual text mining to support categorization and classification in the systematic mapping. In: Proc. of EASE, vol. 10, pp. 1–10 (2010) 19. Felizardo, K.R., Nakagawa, E.Y., MacDonell, S.G., Maldonado, J.C.: A visual analysis approach to update systematic reviews. In: Proceedings of the 18th International Conference on Evaluation and Assessment in Software Engineering, EASE ’14, pp. 4:1–4:10. ACM, New York, NY, USA (2014). DOI 10.1145/2601248.2601252 20. Fernández-Sáez, A.M., Bocco, M.G., Romero, F.P.: SLR-Tool: A tool for performing systematic literature reviews. In: ICSOFT (2), pp. 157–166 (2010) 22 Zhe Yu et al. 21. Fu, W., Menzies, T., Shen, X.: Tuning for software analytics: Is it really necessary? Information and Software Technology 76, 135–146 (2016) 22. Grossman, M.R., Cormack, G.V.: The grossman-cormack glossary of technology-assisted review with foreword by john m. facciola, u.s. magistrate judge. Federal Courts Law Review 7(1), 1–34 (2013) 23. Hall, T., Beecham, S., Bowes, D., Gray, D., Counsell, S.: A systematic literature review on fault prediction performance in software engineering. IEEE Transactions on Software Engineering 38(6), 1276–1304 (2012) 24. Hassler, E., Carver, J.C., Hale, D., Al-Zubidy, A.: Identification of SLR tool needs — results of a community workshop. Information and Software Technology 70, 122–129 (2016) 25. Hassler, E., Carver, J.C., Kraft, N.A., Hale, D.: Outcomes of a community workshop to identify and rank barriers to the systematic literature review process. In: Proceedings of the 18th International Conference on Evaluation and Assessment in Software Engineering, p. 31. ACM (2014) 26. Hernandes, E., Zamboni, A., Fabbri, S., Thommazo, A.D.: Using gqm and tam to evaluate start-a tool that supports systematic review. CLEI Electronic Journal 15(1), 3–3 (2012) 27. Jalali, S., Wohlin, C.: Systematic literature studies: database searches vs. backward snowballing. In: Proceedings of the ACM-IEEE international symposium on Empirical software engineering and measurement, pp. 29–38. ACM (2012) 28. Joachims, T.: Training linear svms in linear time. In: Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 217–226. ACM (2006) 29. Keele, S.: Guidelines for performing systematic literature reviews in software engineering. In: Technical report, Ver. 2.3 EBSE Technical Report. EBSE (2007) 30. Kitchenham, B., Brereton, P.: A systematic review of systematic review process research in software engineering. Information and software technology 55(12), 2049–2075 (2013) 31. Kitchenham, B., Pretorius, R., Budgen, D., Brereton, O.P., Turner, M., Niazi, M., Linkman, S.: Systematic literature reviews in software engineering–a tertiary study. Information and Software Technology 52(8), 792–805 (2010) 32. Kitchenham, B.A., Dyba, T., Jorgensen, M.: Evidence-based software engineering. In: Proceedings of the 26th international conference on software engineering, pp. 273–281. IEEE Computer Society (2004) 33. Krishna, R., Yu, Z., Agrawal, A., Dominguez, M., Wolf, D.: The bigse project: lessons learned from validating industrial text mining. In: Proceedings of the 2nd International Workshop on BIG Data Software Engineering, pp. 65–71. ACM (2016) 34. Le, Q., Mikolov, T.: Distributed representations of sentences and documents. In: Proceedings of the 31st International Conference on Machine Learning (ICML-14), pp. 1188–1196 (2014) 35. Liu, J., Timsina, P., El-Gayar, O.: A comparative analysis of semi-supervised learning: The case of article selection for medical systematic reviews. Information Systems Frontiers (2016). DOI 10.1007/ s10796-016-9724-0. URL https://doi.org/10.1007/s10796-016-9724-0 36. Malheiros, V., Hohn, E., Pinho, R., Mendonca, M., Maldonado, J.C.: A visual text mining approach for systematic reviews. In: First International Symposium on Empirical Software Engineering and Measurement (ESEM 2007), pp. 245–254. IEEE (2007) 37. Marshall, C., Brereton, P.: Tools to support systematic literature reviews in software engineering: A mapping study. In: 2013 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, pp. 296–299. IEEE (2013) 38. Marshall, C., Brereton, P., Kitchenham, B.: Tools to support systematic reviews in software engineering: A feature analysis. In: Proceedings of the 18th International Conference on Evaluation and Assessment in Software Engineering, EASE ’14, pp. 13:1–13:10. ACM (2014) 39. Marshall, C., Brereton, P., Kitchenham, B.: Tools to support systematic reviews in software engineering: A cross-domain survey using semi-structured interviews. In: Proceedings of the 19th International Conference on Evaluation and Assessment in Software Engineering, p. 26. ACM (2015) 40. Miwa, M., Thomas, J., OMara-Eves, A., Ananiadou, S.: Reducing systematic review workload through certainty-based screening. Journal of biomedical informatics 51, 242–253 (2014) 41. Molléri, J.S., Benitti, F.B.V.: Sesra: A web-based automated tool to support the systematic literature review process. In: Proceedings of the 19th International Conference on Evaluation and Assessment in Software Engineering, EASE ’15, pp. 24:1–24:6. ACM, New York, NY, USA (2015). DOI 10.1145/ 2745802.2745825 42. Nguyen, A.T., Wallace, B.C., Lease, M.: Combining crowd and expert labels using decision theoretic active learning. In: Third AAAI Conference on Human Computation and Crowdsourcing (2015) 43. Olorisade, B.K., Brereton, P., Andras, P.: Reproducibility of studies on text mining for citation screening in systematic reviews: Evaluation and checklist. Journal of Biomedical Informatics 73, 1 (2017) 44. Olorisade, B.K., de Quincey, E., Brereton, P., Andras, P.: A critical analysis of studies that address the use of text mining for citation screening in systematic reviews. In: Proceedings of the 20th International Conference on Evaluation and Assessment in Software Engineering, p. 14. ACM (2016) Finding Better Active Learners for Faster Literature Reviews 23 45. Ouzzani, M., Hammady, H., Fedorowicz, Z., Elmagarmid, A.: Rayyan—a web and mobile app for systematic reviews. Systematic Reviews 5(1), 210 (2016). DOI 10.1186/s13643-016-0384-4. URL http://dx.doi.org/10.1186/s13643-016-0384-4 46. OMara-Eves, A., Thomas, J., McNaught, J., Miwa, M., Ananiadou, S.: Using text mining for study identification in systematic reviews: a systematic review of current approaches. Systematic reviews 4(1), 5 (2015) 47. Paynter, R., Bañez, L.L., Berliner, E., Erinoff, E., Lege-Matsuura, J., Potter, S., Uhl, S.: Epc methods: an exploration of the use of text-mining software in systematic reviews. Research white paper (prepared by the Scientific Resource Center and the Vanderbilt and ECRI Evidence-based Practice Centers under contract nos. HHSA290201200004C (SRC), HHSA290201200009I (Vanderbilt), and HHSA290201200011I (ECRI). (2016). URL http://www.effectivehealthcare.ahrq.gov/reports/final/ cfm 48. Radjenović, D., Heričko, M., Torkar, R., Živkovič, A.: Software fault prediction metrics: A systematic literature review. Information and Software Technology 55(8), 1397–1418 (2013) 49. Roegiest, A., Cormack, G.V., Grossman, M., Clarke, C.: Trec 2015 total recall track overview. Proc. TREC-2015 (2015) 50. Ros, R., Bjarnason, E., Runeson, P.: A machine learning approach for semi-automated search and selection in literature studies. In: Proceedings of the 21st International Conference on Evaluation and Assessment in Software Engineering, pp. 118–127. ACM (2017) 51. Settles, B.: Active learning literature survey. University of Wisconsin, Madison 52(55-66), 11 (2010) 52. Settles, B.: Active learning. Synthesis Lectures on Artificial Intelligence and Machine Learning 6(1), 1–114 (2012) 53. Shemilt, I., Khan, N., Park, S., Thomas, J.: Use of cost-effectiveness analysis to compare the efficiency of study identification methods in systematic reviews. Systematic reviews 5(1), 140 (2016) 54. Thomas, J., Brunton, J., Graziosi, S.: Eppi-reviewer 4.0: software for research synthesis (2010). URL http://eppi.ioe.ac.uk/CMS/Default.aspx?alias=eppi.ioe.ac.uk/cms/er4 55. Tredennick, J.: TAR for Smart People. Catalyst (2015) 56. Wahono, R.S.: A systematic literature review of software defect prediction: research trends, datasets, methods and frameworks. Journal of Software Engineering 1(1), 1–16 (2015) 57. Wallace, B.C., Dahabreh, I.J., Moran, K.H., Brodley, C.E., Trikalinos, T.A.: Active literature discovery for scoping evidence reviews: How many needles are there. In: KDD workshop on data mining for healthcare (KDD-DMH) (2013) 58. Wallace, B.C., Dahabreh, I.J., Schmid, C.H., Lau, J., Trikalinos, T.A.: Modernizing the systematic review process to inform comparative effectiveness: tools and methods. Journal of comparative effectiveness research 2(3), 273–282 (2013) 59. Wallace, B.C., Small, K., Brodley, C.E., Lau, J., Trikalinos, T.A.: Deploying an interactive machine learning system in an evidence-based practice center: abstrackr. In: Proceedings of the 2nd ACM SIGHIT International Health Informatics Symposium, pp. 819–824. ACM (2012) 60. Wallace, B.C., Small, K., Brodley, C.E., Trikalinos, T.A.: Active learning for biomedical citation screening. In: Proceedings of the 16th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 173–182. ACM (2010) 61. Wallace, B.C., Small, K., Brodley, C.E., Trikalinos, T.A.: Who should label what? instance allocation in multiple expert active learning. In: SDM, pp. 176–187. SIAM (2011) 62. Wallace, B.C., Trikalinos, T.A., Lau, J., Brodley, C., Schmid, C.H.: Semi-automated screening of biomedical citations for systematic reviews. BMC bioinformatics 11(1), 1 (2010) 63. Wohlin, C.: Guidelines for snowballing in systematic literature studies and a replication in software engineering. In: Proceedings of the 18th international conference on evaluation and assessment in software engineering, p. 38. ACM (2014) 64. Wohlin, C.: Second-generation systematic literature studies using snowballing. In: Proceedings of the 20th International Conference on Evaluation and Assessment in Software Engineering, p. 15. ACM (2016) 65. Zhang, H., Babar, M.A., Bai, X., Li, J., Huang, L.: An empirical assessment of a systematic search process for systematic reviews. In: Evaluation & Assessment in Software Engineering (EASE 2011), 15th Annual Conference on, pp. 56–65. IET (2011) 66. Zhang, H., Babar, M.A., Tell, P.: Identifying relevant studies in software engineering. Information and Software Technology 53(6), 625–637 (2011)
2cs.AI
Mining Supervisor Evaluation and Peer Feedback in Performance Appraisals arXiv:1712.00991v1 [cs.CL] 4 Dec 2017 Girish Keshav Palshikar, Sachin Pawar, Saheb Chourasia, Nitin Ramrakhiyani TCS Research, Tata Consultancy Services Limited, 54B Hadapsar Industrial Estate, Pune 411013, India. {gk.palshikar, sachin7.p, saheb.c, nitin.ramrakhiyani}@tcs.com Abstract. Performance appraisal (PA) is an important HR process to periodically measure and evaluate every employee’s performance vis-avis the goals established by the organization. A PA process involves purposeful multi-step multi-modal communication between employees, their supervisors and their peers, such as self-appraisal, supervisor assessment and peer feedback. Analysis of the structured data and text produced in PA is crucial for measuring the quality of appraisals and tracking actual improvements. In this paper, we apply text mining techniques to produce insights from PA text. First, we perform sentence classification to identify strengths, weaknesses and suggestions of improvements found in the supervisor assessments and then use clustering to discover broad categories among them. Next we use multi-class multi-label classification techniques to match supervisor assessments to predefined broad perspectives on performance. Finally, we propose a short-text summarization technique to produce a summary of peer feedback comments for a given employee and compare it with manual summaries. All techniques are illustrated using a real-life dataset of supervisor assessment and peer feedback text produced during the PA of 4528 employees in a large multi-national IT company. 1 Introduction Performance appraisal (PA) is an important HR process, particularly for modern organizations that crucially depend on the skills and expertise of their workforce. The PA process enables an organization to periodically measure and evaluate every employee’s performance. It also provides a mechanism to link the goals established by the organization to its each employee’s day-to-day activities and performance. Design and analysis of PA processes is a lively area of research within the HR community [13], [22], [10], [20]. The PA process in any modern organization is nowadays implemented and tracked through an IT system (the PA system) that records the interactions that happen in various steps. Availability of this data in a computer-readable database opens up opportunities to analyze it using automated statistical, datamining and text-mining techniques, to generate novel and actionable insights / patterns and to help in improving the quality and effectiveness of the PA process [15], [19], [1]. Automated analysis of large-scale PA data is now facilitated 2 by technological and algorithmic advances, and is becoming essential for large organizations containing thousands of geographically distributed employees handling a wide variety of roles and tasks. A typical PA process involves purposeful multi-step multi-modal communication between employees, their supervisors and their peers. In most PA processes, the communication includes the following steps: (i) in self-appraisal, an employee records his/her achievements, activities, tasks handled etc.; (ii) in supervisor assessment, the supervisor provides the criticism, evaluation and suggestions for improvement of performance etc.; and (iii) in peer feedback (aka 360◦ view), the peers of the employee provide their feedback. There are several business questions that managers are interested in. Examples: 1. For my workforce, what are the broad categories of strengths, weaknesses and suggestions of improvements found in the supervisor assessments? 2. For my workforce, how many supervisor comments are present for each of a given fixed set of perspectives (which we call attributes), such as FUNCTIONAL EXCELLENCE, CUSTOMER FOCUS, BUILDING EFFECTIVE TEAMS etc.? 3. What is the summary of the peer feedback for a given employee? In this paper, we develop text mining techniques that can automatically produce answers to these questions. Since the intended users are HR executives, ideally, the techniques should work with minimum training data and experimentation with parameter setting. These techniques have been implemented and are being used in a PA system in a large multi-national IT company. The rest of the paper is organized as follows. Section 2 summarizes related work. Section 3 summarizes the PA dataset used in this paper. Section 4 applies sentence classification algorithms to automatically discover three important classes of sentences in the PA corpus viz., sentences that discuss strengths, weaknesses of employees and contain suggestions for improving her performance. Section 5 considers the problem of mapping the actual targets mentioned in strengths, weaknesses and suggestions to a fixed set of attributes. In Section 6, we discuss how the feedback from peers for a particular employee can be summarized. In Section 7 we draw conclusions and identify some further work. 2 Related Work We first review some work related to sentence classification. Semantically classifying sentences (based on the sentence’s purpose) is a much harder task, and is gaining increasing attention from linguists and NLP researchers. McKnight and Srinivasan [12] and Yamamoto and Takagi [23] used SVM to classify sentences in biomedical abstracts into classes such as INTRODUCTION, BACKGROUND, PURPOSE, METHOD, RESULT, CONCLUSION. Cohen et al. [3] applied SVM and other techniques to learn classifiers for sentences in emails into classes, which are speech acts defined by a verb-noun pair, with verbs such as request, propose, amend, commit, deliver and nouns such as meeting, document, committee; see also [2]. 3 Khoo et al. [9] uses various classifiers to classify sentences in emails into classes such as APOLOGY, INSTRUCTION, QUESTION, REQUEST, SALUTATION, STATEMENT, SUGGESTION, THANKING etc. Qadir and Riloff [17] proposes several filters and classifiers to classify sentences on message boards (community QA systems) into 4 speech acts: COMMISSIVE (speaker commits to a future action), DIRECTIVE (speaker expects listener to take some action), EXPRESSIVE (speaker expresses his or her psychological state to the listener), REPRESENTATIVE (represents the speaker’s belief of something). Hachey and Grover [7] used SVM and maximum entropy classifiers to classify sentences in legal documents into classes such as FACT, PROCEEDINGS, BACKGROUND, FRAMING, DISPOSAL; see also [18]. Deshpande et al. [5] proposes unsupervised linguistic patterns to classify sentences into classes SUGGESTION, COMPLAINT. There is much work on a closely related problem viz., classifying sentences in dialogues through dialogue-specific categories called dialogue acts [21], which we will not review here. Just as one example, Cotterill [4] classifies questions in emails into the dialogue acts of YES NO QUESTION, WH QUESTION, ACTION REQUEST, RHETORICAL, MULTIPLE CHOICE etc. We could not find much work related to mining of performance appraisals data. Pawar et al. [16] uses kernel-based classification to classify sentences in both performance appraisal text and product reviews into classes SUGGESTION, APPRECIATION, COMPLAINT. Apte et al. [1] provides two algorithms for matching the descriptions of goals or tasks assigned to employees to a standard template of model goals. One algorithm is based on the co-training framework and uses goal descriptions and self-appraisal comments as two separate perspectives. The second approach uses semantic similarity under a weak supervision framework. Ramrakhiyani et al. [19] proposes label propagation algorithms to discover aspects in supervisor assessments in performance appraisals, where an aspect is modelled as a verb-noun pair (e.g. conduct training, improve coding). 3 Dataset In this paper, we used the supervisor assessment and peer feedback text produced during the performance appraisal of 4528 employees in a large multi-national IT company. The corpus of supervisor assessment has 26972 sentences. The summary statistics about the number of words in a sentence is: min:4 max:217 average:15.5 STDEV:9.2 Q1:9 Q2:14 Q3:19. 4 Sentence Classification The PA corpus contains several classes of sentences that are of interest. In this paper, we focus on three important classes of sentences viz., sentences that discuss strengths (class STRENGTH), weaknesses of employees (class WEAKNESS) and suggestions for improving her performance (class SUGGESTION). The strengths or weaknesses are mostly about the performance in work carried out, but sometimes they can be about the working style or other personal 4 qualities. The classes WEAKNESS and SUGGESTION are somewhat overlapping; e.g., a suggestion may address a perceived weakness. Following are two example sentences in each class. STRENGTH: – Excellent technology leadership and delivery capabilities along with ability to groom technology champions within the team. – He can drive team to achieve results and can take pressure. WEAKNESS: – Sometimes exhibits the quality that he knows more than the others in the room which puts off others. – Tends to stretch himself and team a bit too hard. SUGGESTION: – X has to attune himself to the vision of the business unit and its goals a little more than what is being currently exhibited. – Need to improve on business development skills, articulation of business and solution benefits. Several linguistic aspects of these classes of sentences are apparent. The subject is implicit in many sentences. The strengths are often mentioned as either noun phrases (NP) with positive adjectives (Excellent technology leadership) or positive nouns (engineering strength) or through verbs with positive polarity (dedicated) or as verb phrases containing positive adjectives (delivers innovative solutions). Similarly for weaknesses, where negation is more frequently used (presentations are not his forte), or alternatively, the polarities of verbs (avoid) or adjectives (poor) tend to be negative. However, sometimes the form of both the strengths and weaknesses is the same, typically a standalone sentiment-neutral NP, making it difficult to distinguish between them; e.g., adherence to timing or timely closure. Suggestions often have an imperative mood and contain secondary verbs such as need to, should, has to. Suggestions are sometimes expressed using comparatives (better process compliance). We built a simple set of patterns for each of the 3 classes on the POS-tagged form of the sentences. We use each set of these patterns as an unsupervised sentence classifier for that class. If a particular sentence matched with patterns for multiple classes, then we have simple tie-breaking rules for picking the final class. The pattern for the STRENGTH class looks for the presence of positive words / phrases like takes ownership, excellent, hard working, commitment, etc. Similarly, the pattern for the WEAKNESS class looks for the presence of negative words / phrases like lacking, diffident, slow learner, less focused, etc. The SUGGESTION pattern not only looks for keywords like should, needs to but also for POS based pattern like “a verb in the base form (VB) in the beginning of a sentence”. 5 We randomly selected 2000 sentences from the supervisor assessment corpus and manually tagged them (dataset D1). This labelled dataset contained 705, 103, 822 and 370 sentences having the class labels STRENGTH, WEAKNESS, SUGGESTION or OTHER respectively. We trained several multi-class classifiers on this dataset. Table 1 shows the results of 5-fold cross-validation experiments on dataset D1. For the first 5 classifiers, we used their implementation from the SciKit Learn library in Python (scikit-learn.org). The features used for these classifiers were simply the sentence words along with their frequencies. For the last 2 classifiers (in Table 1), we used our own implementation. The overall accupredictions , where the denominator racy for a classifier is defined as A = #correct #data points is 2000 for dataset D1. Note that the pattern-based approach is unsupervised i.e., it did not use any training data. Hence, the results shown for it are for the entire dataset and not based on cross-validation. Table 1. Results of 5-fold cross validation for sentence classification on dataset D1. Classifier Logistic Regression Multinomial Naive Bayes Random Forest AdaBoost Linear SVM SVM with ADWSK [16] Pattern-based 4.1 STRENGTH P R F 0.715 0.719 0.681 0.522 0.718 0.789 0.825 0.759 0.723 0.688 0.888 0.698 0.847 0.687 0.736 0.721 0.685 0.657 0.708 0.817 0.749 WEAKNESS P R F 0.309 0.246 0.286 0.265 0.357 0.491 0.976 0.204 0.155 0.039 0.087 0.194 0.262 0.494 0.246 0.190 0.068 0.131 0.252 0.342 0.656 SUGGESTION P R F 0.788 0.672 0.730 0.825 0.744 0.844 0.835 0.749 0.790 0.734 0.618 0.759 0.871 0.828 0.768 0.723 0.732 0.707 0.751 0.857 0.832 A 0.674 0.646 0.638 0.604 0.651 0.771 0.698 Comparison with Sentiment Analyzer We also explored whether a sentiment analyzer can be used as a baseline for identifying the class labels STRENGTH and WEAKNESS. We used an implementation of sentiment analyzer from TextBlob1 to get a polarity score for each sentence. Table 2 shows the distribution of positive, negative and neutral sentiments across the 3 class labels STRENGTH, WEAKNESS and SUGGESTION. It can be observed that distribution of positive and negative sentiments is almost similar in STRENGTH as well as SUGGESTION sentences, hence we can conclude that the information about sentiments is not much useful for our classification problem. 4.2 Discovering Clusters within Sentence Classes After identifying sentences in each class, we can now answer question (1) in Section 1. From 12742 sentences predicted to have label STRENGTH, we extract 1 https://textblob.readthedocs.io/en/dev/ 6 Table 2. Results of TextBlob sentiment analyzer on the dataset D1 Sentence Class Positive Negative Neutral STRENGTH 544 44 117 WEAKNESS 44 24 35 SUGGESTION 430 52 340 Table 3. 5 representative clusters in strengths. Strength cluster Count motivation expertise knowledge talent skill 1851 coaching team coach 1787 professional career job work working training practice 1531 opportunity focus attention success future potential impact result change 1431 sales retail company business industry marketing product 1251 nouns that indicate the actual strength, and cluster them using a simple clustering algorithm which uses the cosine similarity between word embeddings2 of these nouns. We repeat this for the 9160 sentences with predicted label WEAKNESS or SUGGESTION as a single class. Tables 3 and 4 show a few representative clusters in strengths and in weaknesses, respectively. We also explored clustering 12742 STRENGTH sentences directly using CLUTO [8] and Carrot2 Lingo [14] clustering algorithms. Carrot2 Lingo3 discovered 167 clusters and also assigned labels to these clusters. We then generated 167 clusters using CLUTO as well. CLUTO does not generate cluster labels automatically, hence we used 5 most frequent words within the cluster as its labels. Table 5 shows the largest 5 clusters by both the algorithms. It was observed that the clusters created by CLUTO were more meaningful and informative as compared to those by Carrot2 Lingo. Also, it was observed that there is some correspondence between noun clusters and sentence clusters. E.g. the nouns cluster motivation expertise knowledge talent skill (Table 3) corresponds to the CLUTO sentence cluster skill customer management knowledge team (Table 5). But overall, users found the nouns clusters to be more meaningful than the sentence clusters. 2 3 We used 100 dimensional word vectors trained on Wikipedia 2014 and Gigaword 5 corpus, available at: https://nlp.stanford.edu/projects/glove/ We used the default parameter settings for Carrot2 Lingo algorithm as mentioned at: http://download.carrot2.org/head/manual/index.html Table 4. 5 representative clusters in weaknesses and suggestions. Weakness cluster Count motivation expertise knowledge talent skill 1308 market sales retail corporate marketing commercial industry business 1165 awareness emphasis focus 1165 coaching team coach 1149 job work working task planning 1074 7 Table 5. Largest 5 sentence clusters within 12742 STRENGTH sentences Algorithm Cluster #Sentences performance performer perform years team 510 skill customer management knowledge team 325 CLUTO role delivery work place show 289 delivery manage management manager customer 259 knowledge customer business experience work 250 manager manage 1824 team team 1756 Carrot2 delivery management 451 manage team 376 customer management 321 5 PA along Attributes In many organizations, PA is done from a predefined set of perspectives, which we call attributes. Each attribute covers one specific aspect of the work done by the employees. This has the advantage that we can easily compare the performance of any two employees (or groups of employees) along any given attribute. We can correlate various performance attributes and find dependencies among them. We can also cluster employees in the workforce using their supervisor ratings for each attribute to discover interesting insights into the workforce. The HR managers in the organization considered in this paper have defined 15 attributes (Table 6). Each attribute is essentially a work item or work category described at an abstract level. For example, FUNCTIONAL EXCELLENCE covers any tasks, goals or activities related to the software engineering life-cycle (e.g., requirements analysis, design, coding, testing etc.) as well as technologies such as databases, web services and GUI. In the example in Section 4, the first sentence (which has class STRENGTH) can be mapped to two attributes: FUNCTIONAL EXCELLENCE and BUILDING EFFECTIVE TEAMS. Similarly, the third sentence (which has class WEAKNESS) can be mapped to the attribute INTERPERSONAL EFFECTIVENESS and so forth. Thus, in order to answer the second question in Section 1, we need to map each sentence in each of the 3 classes to zero, one, two or more attributes, which is a multi-class multi-label classification problem. We manually tagged the same 2000 sentences in Dataset D1 with attributes, where each sentence may get 0, 1, 2, etc. up to 15 class labels (this is dataset D2). This labelled dataset contained 749, 206, 289, 207, 91, 223, 191, 144, 103, 80, 82, 42, 29, 15, 24 sentences having the class labels listed in Table 6 in the same order. The number of sentences having 0, 1, 2, or more than 2 attributes are: 321, 1070, 470 and 139 respectively. We trained several multi-class multi-label classifiers on this dataset. Table 7 shows the results of 5-fold cross-validation experiments on dataset D2. Precision, Recall and F-measure for this multi-label classification are computed using a strategy similar to the one described in [6]. Let Pi be the set of 8 Table 6. Strengths, Weaknesses and Suggestions along Performance Attributes Performance Attributes #Strengths #Weaknesses #Suggestions FUNCTIONAL EXCELLENCE 321 26 284 BUILDING EFFECTIVE TEAMS 80 6 89 INTERPERSONAL EFFECTIVENESS 151 16 97 CUSTOMER FOCUS 100 5 76 INNOVATION MANAGEMENT 22 4 53 EFFECTIVE COMMUNICATION 53 17 124 BUSINESS ACUMEN 39 10 103 TAKING OWNERSHIP 47 3 81 PEOPLE DEVELOPMENT 31 8 57 DRIVE FOR RESULTS 37 4 30 STRATEGIC CAPABILITY 8 4 51 WITHSTANDING PRESSURE 16 6 16 DEALING WITH AMBIGUITIES 4 8 12 MANAGING VISION AND PURPOSE 3 0 9 TIMELY DECISION MAKING 6 2 10 Table 7. Results of 5-fold cross validation for multi-class multi-label classification on dataset D2. Classifier Precision P Recall R Logistic Regression 0.715 0.711 Multinomial Naive Bayes 0.664 0.588 Random Forest 0.837 0.441 AdaBoost 0.794 0.595 Linear SVM 0.722 0.672 Pattern-based 0.750 0.679 F 0.713 0.624 0.578 0.680 0.696 0.713 predicted labels and Ai be the set of actual labels for the ith instance. Precision and recall for this instance are computed as follows: P recisioni = |Pi ∩ Ai | |Pi ∩ Ai | , Recalli = |Pi | |Ai | It can be observed that P recisioni would be undefined if Pi is empty and similarly Recalli would be undefined when Ai is empty. Hence, overall precision and recall are computed by averaging over all the instances except where they are undefined. Instance-level F-measure can not be computed for instances where either precision or recall are undefined. Therefore, overall F-measure is computed using the overall precision and recall. 6 Summarization of Peer Feedback using ILP The PA system includes a set of peer feedback comments for each employee. To answer the third question in Section 1, we need to create a summary of all the 9 peer feedback comments about a given employee. As an example, following are the feedback comments from 5 peers of an employee. 1. vast knowledge on different technologies 2. His experience and wast knowledge mixed with his positive attitude, willingness to teach and listen and his humble nature. 3. Approachable, Knowlegeable and is of helping nature. 4. Dedication, Technical expertise and always supportive 5. Effective communication and team player The individual sentences in the comments written by each peer are first identified and then POS tags are assigned to each sentence. We hypothesize that a good summary of these multiple comments can be constructed by identifying a set of important text fragments or phrases. Initially, a set of candidate phrases is extracted from these comments and a subset of these candidate phrases is chosen as the final summary, using Integer Linear Programming (ILP). The details of the ILP formulation are shown in Table 8. As an example, following is the summary generated for the above 5 peer comments. humble nature, effective communication, technical expertise, always supportive, vast knowledge Following rules are used to identify candidate phrases: – An adjective followed by in which is followed by a noun phrase (e.g. good in customer relationship) – A verb followed by a noun phrase (e.g. maintains work life balance) – A verb followed by a preposition which is followed by a noun phrase (e.g. engage in discussion) – Only a noun phrase (e.g. excellent listener) – Only an adjective (e.g. supportive) Various parameters are used to evaluate a candidate phrase for its importance. A candidate phrase is more important: – if it contains an adjective or a verb or its headword is a noun having WordNet lexical category noun.attribute (e.g. nouns such as dedication, sincerity) – if it contains more number of words – if it is included in comments of multiple peers – if it represents any of the performance attributes such as Innovation, Customer, Strategy etc. A complete list of parameters is described in detail in Table 8. There is a trivial constraint C0 which makes sure that only K out of N candidate phrases are chosen. A suitable value of K is used for each employee depending on number of candidate phrases identified across all peers (see Algorithm 1). Another set of constraints (C1 to C10 ) make sure that at least one phrase is selected for each of the leadership attributes. The constraint C11 makes sure that multiple phrases sharing the same headword are not chosen at a time. Also, 10 single word candidate phrases are chosen only if they are adjectives or nouns with lexical category noun.attribute. This is imposed by the constraint C12 . It is important to note that all the constraints except C0 are soft constraints, i.e. there may be feasible solutions which do not satisfy some of these constraints. But each constraint which is not satisfied, results in a penalty through the use of slack variables. These constraints are described in detail in Table 8. The objective function maximizes the total importance score of the selected candidate phrases. At the same time, it also minimizes the sum of all slack variables so that the minimum number of constraints are broken. Data: N : No. of candidate phrases Result: K: No. of phrases to select as part of summary if N ≤ 10 then K ← ⌊N ∗ 0.5⌋; else if N ≤ 20 then K ← ⌊ getN oOf P hrasesT oSelect(10) + (N − 10) ∗ 0.4⌋; else if N ≤ 30 then K ← ⌊ getN oOf P hrasesT oSelect(20) + (N − 20) ∗ 0.3⌋; else if N ≤ 50 then K ← ⌊ getN oOf P hrasesT oSelect(30) + (N − 30) ∗ 0.2⌋; else K ← ⌊ getN oOf P hrasesT oSelect(50) + (N − 50) ∗ 0.1⌋; end if K < 4 and N ≥ 4 then K←4 else if K < 4 then K←N else if K > 20 then K ← 20 end Algorithm 1: getN oOf P hrasesT oSelect (For determining number of phrases to select to include in summary) 6.1 Evaluation of auto-generated summaries We considered a dataset of 100 employees, where for each employee multiple peer comments were recorded. Also, for each employee, a manual summary was generated by an HR personnel. The summaries generated by our ILP-based approach were compared with the corresponding manual summaries using the ROUGE [11] unigram score. For comparing performance of our ILP-based summarization algorithm, we explored a few summarization algorithms provided by the Sumy package4. A common parameter which is required by all these 4 https://github.com/miso-belica/sumy 11 Table 8. Integer Linear Program (ILP) formulation Parameters: N : No. of phrases K: No. of phrases to be chosen for inclusion in the final summary F req: Array of size N , F reqi = no. of distinct peers mentioning the ith phrase Adj: Array of size N , Adji = 1 if the ith phrase contains any adjective V erb: Array of size N , V erbi = 1 if the ith phrase contains any verb N umW ords: Array of size N , N umW ordsi = 1 no. of words in the ith phrase N ounCat: Array of size N , N ounCati = 1 if lexical category (WordNet) of headword of the ith phrase is noun.attribute – InvalidSingleN oun: Array of size N , InvalidSingleN ouni = 1 if the ith phrase is single word phrase which is neither an adjective nor a noun having lexical category (WordNet) noun.attribute – Leadership, T eam, Innovation, Communication, Knowledge, Delivery, Ownership, Customer, Strategy, P ersonal: Indicator arrays of size N each, representing whether any phrase corresponds to a particular performance attribute, e.g. Customeri = 1 indicates that ith phrase is of type Customer – S: Matrix of dimensions N × N , where Sij = 1 if headwords of ith and j th phrase are same – – – – – – – Variables: – X: Array of N binary variables, where Xi = 1 only when ith phrase is chosen to be the part of final summary – S1 , S2 , · · · S12 : Integer slack variables Objective: P Maximize N ounCati + Adji + V erbi + 1) · F reqi · N umW ordsi · Xi ) i=1 ((NP −10000 · 12 j=1 Sj Constraints: P C0 : N i=1 Xi = K (Exactly K phrases should be chosen) P C1 : N (Leadershipi · Xi ) + S1 ≥ 1 Pi=1 C2 : N (T eami · Xi ) + S2 ≥ 1 i=1 P C3 : N (Knowledgei · Xi ) + S3 ≥ 1 i=1 P C4 : N (Deliveryi · Xi ) + S4 ≥ 1 Pi=1 C5 : N (Ownershipi · Xi ) + S5 ≥ 1 Pi=1 C6 : N (Innovationi · Xi ) + S6 ≥ 1 Pi=1 C7 : N (Communicationi · Xi ) + S7 ≥ 1 Pi=1 C8 : N (Customeri · Xi ) + S8 ≥ 1 Pi=1 C9 : N (Strategyi · Xi ) + S9 ≥ 1 Pi=1 C10 : N i=1 (P ersonali · Xi ) + S1 0 ≥ 1 (At least one phrase should be chosen to represent each leadership attribute) P PN C11 : N i=1 j=1,s.t.i6=j (Sij · (Xi + Xj − 1)) + S11 <= 0 (No duplicate phrases should be chosen) P C12 : N i=1 (InvalidSingleN ouni · Xi ) − S12 <= 0 (Single word noun phrases are not preferred if they are not noun.attribute) 12 algorithms is number of sentences keep in the final summary. ILP-based summarization requires a similar parameter K, which is automatically decided based on number of total candidate phrases. Assuming a sentence is equivalent to roughly 3 phrases, for Sumy algorithms, we set number of sentences parameter to the ceiling of K/3. Table 9 shows average and standard deviation of ROUGE unigram f1 scores for each algorithm, over the 100 summaries. The performance of ILP-based summarization is comparable with the other algorithms, as the two sample t-test does not show statistically significant difference. Also, human evaluators preferred phrase-based summary generated by our approach to the other sentence-based summaries. Table 9. Comparative performance of various summarization algorithms ROUGE unigram F1 Average Std. Deviation LSA 0.254 0.146 TextRank 0.254 0.146 LexRank 0.258 0.148 ILP-based summary 0.243 0.15 Algorithm 7 Conclusions and Further Work In this paper, we presented an analysis of the text generated in Performance Appraisal (PA) process in a large multi-national IT company. We performed sentence classification to identify strengths, weaknesses and suggestions for improvements found in the supervisor assessments and then used clustering to discover broad categories among them. As this is non-topical classification, we found that SVM with ADWS kernel [16] produced the best results. We also used multi-class multi-label classification techniques to match supervisor assessments to predefined broad perspectives on performance. Logistic Regression classifier was observed to produce the best results for this topical classification. Finally, we proposed an ILP-based summarization technique to produce a summary of peer feedback comments for a given employee and compared it with manual summaries. The PA process also generates much structured data, such as supervisor ratings. It is an interesting problem to compare and combine the insights from discovered from structured data and unstructured text. Also, we are planning to automatically discover any additional performance attributes to the list of 15 attributes currently used by HR. References 1. M. Apte, S. Pawar, S. Patil, S. Baskaran, A. Shrivastava, and G.K. Palshikar. Short text matching in performance management. In Proceedings of the 21st International 13 Conference on Management of Data (COMAD 2016), pages 13–23, 2016. 2. Vitor R. Carvalho and William W. Cohen. Improving ”email speech acts” analysis via n-gram selection. In Proceedings of the HLT-NAACL 2006 Workshop on Analyzing Conversations in Text and Speech, ACTS ’09, pages 35–41, 2006. 3. W.W. Cohen, V.R. Carvalho, and T.M. Mitchell. Learning to classify email into ”speech acts”. In Proc. Empirical Methods in Natural Language Processing (EMNLP-2004), pages 309–316, 2004. 4. Rachel Cotterill. Question classification for email. In Proc. Ninth Int. Conf. Computational Semantics (IWCS 2011), 2011. 5. S. Deshpande, G.K. Palshilkar, and G Athiappan. An unsupervised approach to sentence classification. In Proc. Int. Conf. on Management of Data (COMAD 2010), pages 88–99, 2010. 6. Shantanu Godbole and Sunita Sarawagi. Discriminative methods for multi-labeled classification. In PAKDD 2004, pages 22–30, 2004. 7. B. Hachey and C. Grover. Sequence modelling for sentence classification in a legal summarisation system. In Proc. 2005 ACM Symposium on Applied Computing, 2005. 8. George Karypis. Cluto-a clustering toolkit. Technical report, DTIC Document, 2002. 9. A. Khoo, Y. Marom, and D. Albrecht. Experiments with sentence classification. In Proc. 2006 Australasian Language Technology Workshop (ALTW2006), pages 18–25, 2006. 10. P.E. Levy and J.R. Williams. The social context of performance appraisal: a review and framework for the future. Journal of Management, 30(6):881–905, 2004. 11. Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out: Proceedings of the ACL-04 workshop, volume 8. Barcelona, Spain, 2004. 12. L. McKnight and P. Srinivasan. Categorization of sentence types in medical abstracts. In Proc. American Medical Informatics Association Annual Symposium, pages 440–444, 2003. 13. K.R. Murphy and J. Cleveland. Understanding Performance Appraisal: Social, Organizational and Goal-Based Perspective. Sage Publishers, 1995. 14. Stanislaw Osinski, Jerzy Stefanowski, and Dawid Weiss. Lingo: Search results clustering algorithm based on singular value decomposition. In Intelligent Information Processing and Web Mining, Proceedings of the International IIS: IIPWM’04 Conference held in Zakopane, Poland, May 17-20, 2004, pages 359–368, 2004. 15. G.K. Palshikar, S. Deshpande, and S. Bhat. Quest: Discovering insights from survey responses. In Proceedings of the 8th Australasian Data Mining Conf. (AusDM09), pages 83–92, 2009. 16. S. Pawar, N. Ramrakhiyani, G. K. Palshikar, and S. Hingmire. Deciphering review comments: Identifying suggestions, appreciations and complaints. In Proc. 20th Int. Conf. on Applications of Natural Language to Information Systems (NLDB 2015), LNCS 9103, pages 204–211, 2015. 17. Ashequl Qadir and Ellen Riloff. Classifying sentences as speech acts in message board posts. In Proc. Empirical Methods in Natural Language Processing (EMNLP2011), 2011. 18. N. Ramrakhiyani, S. Pawar, and G.K. Palshikar. A system for classification of propositions of the indian supreme court judgements. In Proc. 5th 2013 Forum on Information Retrieval Evaluation (FIRE 2013), pages 1–4, 2013. 14 19. N. Ramrakhiyani, S. Pawar, G.K. Palshikar, and M. Apte. Aspects from appraisals: A label propagation with prior induction approach. In Proceedings of the 21st International Conference on Applications of Natural Language to Information Systems (NLDB 2016), volume LNCS 9612, pages 301–309, 2016. 20. M. Schraeder, J. Becton, and R. Portis. A critical examination of performance appraisals. The Journal for Quality and Participation, (spring):20–25, 2007. 21. Andreas Stolcke, Klaus Ries, Noah Coccaro, Elizabeth Shriberg, Rebecca Bates, Daniel Jurafsky, Paul Taylor, Rachel Martin, Carol Van Ess-Dykema, and Marie Meteer. Dialogue act modeling for automatic tagging and recognition of conversational speech. Computational Linguistics, 26(3), 2000. 22. C. Viswesvaran. Assessment of individual job performance: a review of the past century and a look ahead. In N. Anderson, D.S. Ones, H.K. Sinangil, and C. Viswesvaran, editors, Handbook of Industrial, Work and Organizational Psychology. Sage Publishers, 2001. 23. Y. Yamamoto and T. Takagi. A sentence classification system for multi biomedical literature summarization. In Proc. 21st International Conference on Data Engineering Workshops, pages 1163–1168, 2005.
2cs.AI
arXiv:1212.2341v1 [cs.PL] 11 Dec 2012 Semantics and Security Issues in JavaScript Sémantique et problèmes de sécurité en JavaScript Deliverable Resilience FUI 12: 7.3.2.1 Failles de sécurité en JavaScript / JavaScript security issues Stéphane Ducasse, Nicolas Petton, Guillermo Polito, Damien Cassou Version 1.2 - December 2012 Resilience Inria Copyright © 2012 by S. Ducasse, N. Petton, G. Polito, D. Cassou. The contents of this deliverable are protected under Creative Commons Attribution-NoncommercialShareAlike 3.0 Unported license. You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial. You may not use this work for commercial purposes. Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. • For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page: creativecommons.org/licenses/ by-sa/3.0/ • Any of the above conditions can be waived if you get permission from the copyright holder. • Nothing in this license impairs or restricts the author’s moral rights. Your fair dealing and other rights are in no way affected by the above. This is a human-readable summary of the Legal Code (the full license): http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode 2 Resilience Inria Deliverable: 7.3.2.1 Failles de sécurité en Javascript Title: Semantics and Security Issues in JavaScript Titre: Sémantique et problèmes de sécurité en JavaScript Version: 1.2 Authors: Stéphane Ducasse, Nicolas Petton, Guillermo Polito, Damien Cassou Description de la tâche 7.3.2.1 / Task 7.3.2.1 Description: Les environnements d’exécution Javascript comportent des failles de sécurité liées à la sémantique d’ECMAScript ainsi qu’à la présence de certains constructeurs. D’autres failles sont liées à la mise en oeuvre pratique d’ECMAScript par les navigateurs. L’objectif de cette tâche est d’identifier et classer les types de failles de sécurité dans le monde Javascript. On consultera notamment les travaux de Miller autour de Caja et ainsi que les approches proposées par Seaside un framework pour le développement d’applications sécurisées en Smalltalk. L’objectif de la tâche est de formaliser les mécanismes de sécurité en Javascript de façon à augmenter la connaissance des partenaires et des utilisateurs de Javascript sur ce sujet. 3 Resilience Inria Contents 1 . . . . 2 2 3 3 4 . . . . . . . . 5 5 6 7 7 8 9 9 10 . . . . . . . . 12 12 12 13 15 16 18 19 20 4 JavaScript programming practices 4.1 Defining prototypes . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Closures and ‘functional’ inheritance . . . . . . . . . . . . . . . . 23 23 26 5 ECMAScript 5 5.1 Object creation . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Defining object properties . . . . . . . . . . . . . . . . . . . . . . 28 28 29 6 Key Bibliography Elements 32 7 Conclusion 33 2 3 Web architecture basics 1.1 Client-Server basics . . . . . . . . . 1.2 Web Browser window insfrastructure 1.3 Cookies . . . . . . . . . . . . . . . 1.4 AJAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . JavaScript object model in a nutshell 2.1 Objects: the basic building block of JavaScript . 2.2 Property access . . . . . . . . . . . . . . . . . 2.3 Functions: behavioral units . . . . . . . . . . . 2.4 Programmatic function evaluation . . . . . . . 2.5 Object methods . . . . . . . . . . . . . . . . . 2.6 Higher-order functions . . . . . . . . . . . . . 2.7 Object constructors . . . . . . . . . . . . . . . 2.8 Object core properties . . . . . . . . . . . . . . Key subtle JavaScript points 3.1 Variables and scope . . . . . . . . . . . 3.2 The window object . . . . . . . . . . . 3.3 this: an overly dynamic pseudo-variable 3.4 Object constructors misuse . . . . . . . 3.5 Lexical closures and unbound variables 3.6 The with statement . . . . . . . . . . . 3.7 Lifted Variable Definitions . . . . . . . 3.8 Type coercion . . . . . . . . . . . . . . 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Abstract There is a plethora of research articles describing the deep semantics of JavaScript. Nevertheless, such articles are often difficult to grasp for readers not familiar with formal semantics. In this report, we propose a digest of the semantics of JavaScript centered around security concerns. This document proposes an overview of the JavaScript language and the misleading semantic points in its design. The first part of the document describes the main characteristics of the language itself. The second part presents how those characteristics can lead to problems. It finishes by showing some coding patterns to avoid certain traps and presents some ECMAScript 5 new features. Resilience Inria Chapter1. Web architecture basics In this chapter we present some basics principles of common web architecture and in which JavaScript applications are deployed. 1.1 Client-Server basics The web is based on the client-server architectural pattern: • the client role is played by a web browser with limited resources and technologies – often HTML, CSS and JavaScript. Its usual main responsibilities are user interface and interaction as well as data validation. • the server role is fulfilled by a program implemented in a wide variety of technologies, with a controlled set of resources. Its usual responsibilities are to serve pages to web-browsers, enforce business rules, and persist and validate data. The client and server processes communicate though the HTTP protocol [Mog02]: the client makes HTTP requests and, for each, the server answers with an HTTP response, as illustrated in Figure 1.1. When the response arrives, the web browser normally discards the current content and loads the new one, causing a full refresh of the user interface. Since HTTP is a stateless protocol – requests are independent from each others – several mechanisms were built to maintain state between a client and a server (e.g., cookies, see section 1.3). As computers running web browsers become more and more powerful, there is a tendency to move responsibilities from the server to the client (e.g., page creation and business rules enforcement). These new responsibilites are mostly implemented in JavaScript and JavaScript-based languages. 1. Request Web Browser HTTP Server 2. Response Figure 1.1: An HTTP request and response between a web browser and a web server 2 Resilience Inria frames * window parent 1 1 document cookie Figure 1.2: The JavaScript model of a web page 1.2 Web Browser window insfrastructure A web page is composed of several html widgets including frames and iframes, which insert an existing web page into the current one. Frames and iFrames are considered web pages by themselves, therefore having the ability to contain other ones, following the composite design pattern [GHJV95]. While loading a web page, a web browser generates an internal structure of JavaScript objects. Each web page is represented as a window object referencing its parent and children through the parent and frames properties. Each web page also references a document object, which is the root of the DOM – Document Object Model – representation of the web page tags. Web browser JavaScript implementation differences As each web browser has its own implementation of the DOM and JavaScript, one of the hardest tasks of JavaScript development is to build browser-agnostic applications. There exist several libraries to reduce the difficulty of this task such as extJS1 ,jQuery2 and scriptaculous.3 1.3 Cookies A cookie is a string that is exchanged between the client and the server [MFF01]. Cookies are normally stored on the client machines to let web application state survive after the client process is stopped (i.e., the browser or the browsing tab is closed). Cookies are key-value pairs associated with the equals character ’=’ and separated from each other with a semi colon (e.g.,, "name=john;expires=2013-011 http://www.sencha.com/products/extjs/ http://jquery.com/ 3 http://script.aculo.us/ 2 3 Resilience Inria 15T21:47:38Z"). The expiration date tells the browser when to delete it. A cookie can contain other properties like domain and path, that tells the browser in which requests it should be exchanged, which by default are the current domain and path. Cookies can be changed from JavaScript code accessing the cookie property of the current document object. Cookies can contain sensible data (e.g., emails and passwords) and must be studied for a security analysis. 1.4 AJAX AJAX stands for Asynchronous JavaScript and XML: it is a mechanism to send XMLHttpRequest requests to a web server. XMLHttpRequest is used to retrieve data from a URL without reloading the complete web page [MvD07]. The request is sent by the client through a JavaScript API and handled asynchronously. Formerly, AJAX was used to exchange information in XML format, but XMLHttpRequest can be used to transfer any kind of data. Nowadays, one of the most used formats is JSON,4 which stands for JavaScript Object Notation. Illustrated in Example 1.1, the "test.json" service is requested to the server via AJAX, and a function is used to determine how the response will be handled at the time it arrives. $.ajax({ url: "http://www.webcompany.com/api/test.json", }).done( // Function is evaluated after the json service responds: function() { // adds a 'class' attribute to current HTML node $(this).addClass("done"); }); Example 1.1: AJAX request performed with JQuery Library AJAX is becoming more and more popular as the client machines become more powerful and can perform heavier processing tasks. 4 http://www.json.org 4 Resilience Inria Chapter2. JavaScript object model in a nutshell In this chapter we present key aspects of ECMAScript 3 and 51 to provide a common context. This document has been written in the context of the Resilience project. This study is focused on the semantic aspects of JavaScript in the context of securing untrusted third party JavaScript code in a web browser. In this context, one of the key aspects is to forbid the access to the window object (the global object of the web browser frame, see 3.2). Accessing the window object of the frame would lead to possible page-data leak (window is the root of the DOM of the page), sensitive information leak (from the window object private information in cookies can be accessed), and even user actions sniffing (having access to DOM elements means that one can add listeners to DOM events2 ). In the next deliverable we will describe the state of the art of JavaScript sandboxing. One of the different aspects in JavaScript sandboxing is to securely forbid access to potentially sensitive objects, including window, the root object. 2.1 Objects: the basic building block of JavaScript JavaScript is a loosely-typed dynamic programming language where everything is an object. Each object contains a set of properties (also named slots) that represent data (other objects) and operations (function objects). These properties are always public and can be accessed and modified using the dot or squaredbracket notation: // We create a new empty object var person = new Object(); // Write a property person.age = 5; person['age'] = 5; // equivalent // Read a property and store it into some variable var theAge = person.age; var theAge = person['age']; // equivalent Example 2.1: Property access In this script we create a new object that we assign to the variable person. Then the expression person.age = 5 adds a property to the newly created object and stores the value 5 into it. Note that objects are hash tables. The expression {a: 1 2 ECMAScript is the standard JavaScript is based on. Adding event listeners to DOM objects allows an attacker to catch user interactions and inputs. 5 Resilience Inria 0} thus creates an object with one property named a with value 0. Because of this, properties can be accessed and set using both the person[’age’] and person.age notations. 2.2 Property access ECMAScript’s property lookup is done at runtime (see Example 2.2) and never throws errors. Example 2.2 defines an object object containing two properties a and b with values 10 and 5 respectively. The function get is then defined. This function takes as argument a property’s name and returns the corresponding property’s value of the object. In the last line of Example 2.2, the function get is called twice to access the values of the properties a and b. var object = {a : 10, b: 5}; var get = function(property) { return object[property] }; get("a") + get("b"); // answers 15 Example 2.2: Property lookup at runtime If a property does not exist, the undefined object is returned, as shown in Example 2.3. var object = {a: 1, b: 2}; object.c // answers 'undefined' Example 2.3: Property access for nonexistent properties Example 2.4 shows how to update, create and delete properties. The first instruction sets 10 to the property a of object {a: 0}. Therefore the expression returns an object with the property a with 10 as a value. The second instruction shows that if a property does not exist then it will be created automatically. Hence, {a: 0}[b]=10 returns an object with two properties a and b. Finally, the third instruction removes the property b of the object using the delete keyword. // Updating a property {a: 0}[a] = 10; // answers {a: 10} // Creating a new property using the same syntax {a: 0}[b] = 10; // answers {a: 0, b: 10} 6 Resilience Inria // Deleting a property delete {a: 0, b: 5}[b]; // answers {a: 0} Example 2.4: Updating, creating and deleting properties 2.3 Functions: behavioral units Functions are the behavioral units of JavaScript. A function performs a side effect (e.g., alters an object) and/or returns a value. Functions can be defined via a function declaration or a function expression. A function declaration defines a function at compile time, as seen in Example 2.5. A function expression creates a new function at runtime. Function expressions are also called anonymous functions, since they are not associated with any name. The creation of a function from a function expression is illustrated in Example 2.6. function sum(a, b){ return a + b; } Example 2.5: A function declaration has a name var sum = function (a, b){ return a + b; } Example 2.6: An anonymous function that is assigned to a variable A function can be called by passing arguments between parenthesis as shown in Example 2.7. sum(1, 2); someFunctionWithNoArguments(); Example 2.7: Calling a function Functions are important because they constitute the basic building block of code execution in a JavaScript program. 2.4 Programmatic function evaluation The built-in call() and apply() functions are two methods of the Function object.3 These functions are thus called on other functions and execute them. These 3 In JavaScript, the words ’method’ and ’function’ are equivalent. The former is particularly used when the function is owned by an object as one of its properties. 7 Resilience Inria functions both take the receiver of the function to execute as first parameter and arguments of the function to execute as the other parameters. When using these methods, the pseudo-variable this in the function to execute is bound to the first parameter of call() and apply(). call() receives the arguments of the function to execute as comma-separated values whereas apply() receives an array (see Example 2.8). function someGlobalFunction(value1, value2){ this.value1 = value1; this.value2 = value2; } // The regular invocation binds 'this' to the global object as // we will see later on someGlobalFunction(5,6); window.value1 // answers 5 var someObject = new Object(); someGlobalFunction.call(someObject, 5, 6); someObject.value1 // answers 5 someGlobalFunction.apply(someObject, [5, 6]); // equivalent Example 2.8: The apply() and call() methods Turning text into function at runtime. Using the eval() built-in function, it is possible to evaluate a string at runtime. eval() makes static analysis of programs difficult [RHBV11]: at runtime a string can be composed and evaluated without restriction in the global environment and scope. var a = 2; eval('a++'); a // answers 3 Example 2.9: Evaluating code from a string 2.5 Object methods In JavaScript, methods are just functions attached to an object as can be seen in Example 2.10. var person = new Object(); person.name = 'John'; person.surname = 'Foo'; 8 Resilience Inria person.getFullName = function (){ return this.name + ' ' + this.surname; } Example 2.10: Adding methods to an object In a method, a developer can refer to the owner object using the this keyword. We will see later that this has a different semantics than in Java or Smalltalk since depending on how the function is accessed this can be bound to the object owner of the property or any other object (see section 3.3). 2.6 Higher-order functions Functions in JavaScript, as first class citizens, can be passed as parameters to functions and returned from functions. Higher-order functions are most commonly seen when implementing filtering, selection and sorting algorithms to make them independent of their content. In Example 2.11, we define a new property inherited by all arrays that is a function to filter elements of the receiver array according to a given criteria. Then, we define a function isEven that will play the role of the criteria and an array of numbers. The last statement calls the new filter property function on array with the isEven criteria. Array.prototype.filter = function (criteria){ newArray = new Array(); for (var i = 0; i < this.length; i++) { // we keep the elements of the array that respects // a certain criteria if (criteria(this[i])) newArray.push(this[i]); } return newArray; } var isEven = function(elem) { return (elem % 2) == 0; }; var array = new Array(9, 58, 42, 12, 1001, 1000); array.filter(isEven); // answers [58, 42, 12, 1000] Example 2.11: Extending Arrays with a higher-order filter function 2.7 Object constructors Constructors are used to structure object creation in ECMAScript 3[MMT08, GSK10]. A constructor is a standard function object whose name is by convention capitalized to indicate to the programmer that the function must not be directly called. The new keyword is used to invoke a function as a constructor. Using the 9 Resilience Inria new keyword instantiates an object and executes the constructor on that object, binding the pseudo-variable this to the newly created object. var Animal = function (name) { this.name = name; this.describe = function() { return this.name + ', an animal'; } }; //Invoking the constructor with the 'new' keyword var animal = new Animal("pilou"); animal.name; // 'pilou' animal.describe() // 'pilou, an animal' Example 2.12: The new keyword 2.8 Object core properties There are three properties that are key to the execution of any JavaScript application: • constructor is a property that contains the reference to the function that was used to create the object using the new keyword. In Figure 2.1, the animal object has a property constructor containing a reference to the Animal constructor that was used to create animal. • prototype is a property that is used by constructors to initialize the inheritance chain (modeled by the __proto__ property) of objects they create. This property only makes sense on function objects that are used as constructors. In Figure 2.1, the Animal constructor has a property prototype containing a reference to an object (with an isAnAnimal property) that will be the parent of all objects Animal creates. • __proto__ is a property that contains a reference to an object (the parent) where properties will be looked up when not present in the receiver. When an object is created, the value of its __proto__ property is initialized to the prototype property of the constructor function used to create this object. In Figure 2.1, the animal object has as parent the object whose only property is isAnAnimal: this object is the prototype of the Animal constructor. Attention: this property is not always visible from a developer’s point of view depending on the JavaScript implementation: you should avoid manipulating __proto__ if you want to write portable code. 10 Resilience Inria constructor Function constructor {isAnAnimal: true} prototype Animal __proto__ function () {} constructor __proto__ undef prototype animal {name: 'pilou'} Figure 2.1: The 3 core properties of objects (constructor, prototype, __proto__). Boxes in gray represent objects created by the code of Example 2.13 whereas boxes in white represent objects provided by JavaScript. Example 2.13 demonstrates that the __proto__ property is initialized to the constructor’s prototype property value. First, a function is defined and assigned to a new variable Animal. The prototype of new functions is always an empty object. In this case, we add the property isAnAnimal to this empty object. All objects created from the Animal function will then inherit the isAnAnimal property. The variable animal is then set to a new Animal. The rest of the statements describe the relationship between animal and its constructor Animal. var Animal = function (name) { this.name = name; }; Animal.prototype.isAnAnimal = true; var animal = new Animal("pilou"); animal.constructor == Animal; // answers true animal.__proto__ == animal.constructor.prototype; // answers true animal.isAnAnimal; // answers true Animal.isAnAnimal; // answers false, 'isAnAnimal' is not a property of // the constructor but of objects it constructs Example 2.13: Defining a constructor so that Figure 2.1 can show the core properties involved 11 Resilience Inria Chapter3. Key subtle JavaScript points In the following we present the subtle aspects of JavaScript that have an impact on security such as unbound variables [MMT08, Dav06]. 3.1 Variables and scope All objects inside a web browser frame share the same environment without any restriction. This is a security problem because it allows dynamic modifications of the program and full access to all the objects defined inside this environment. To declare a variable local in a particular scope such as a function scope the var keyword is needed, as illustrated in Example 3.1. Here the variable myLocalVariable is local and only accessible from within the body of the function myFunction. function myFunction(arg) { var myLocalVariable = arg + 5; return myLocalVariable; } Example 3.1: declaring a variable local to the function Not using var causes our program to create a global variable (see Example 3.2) [MMT08, Dav06, GSK10]. (function () { globalVar = 'setting global'; })() window.globalVar // answers 'setting global' Example 3.2: using a global variable In this example, globalVar becomes a property of the global environment window. 3.2 The window object The window object represents the window of the current HTML document. Each web browser’s tab, frame, or window has its own window object. The window object is the global object of the JavaScript environment. Each function that is not attached to another object is attached to window, as illustrated in Example 3.3. This behavior combined with the dynamic binding of the this pseudovariable (see 3.3) can have deep side effects on security of your applications. 12 Resilience Inria window.ping // answers 'undefined' var ping = function (string) { return string; }; window.ping; // answers the ping function window.ping('foo'); // answers 'foo' Example 3.3: A function not attached to an object is attached to window The example starts by checking that the window object has no property named ping. Then we define a new function at the top level, which is automatically added to the window object. Accessing window.ping returns the ping function. We check that we can effectively execute it. 3.3 this: an overly dynamic pseudo-variable While at first sight, this may look like the pseudo-variable in Java, C# and Smalltalk (named self in this case), in JavaScript this has a special semantics. this is a dynamically bound builtin pseudo-variable of JavaScript. When used inside a function scope, the value of the pseudo-variable this is determined by the syntactic shape of the function invocation [MMT08, GSK10]. By syntactic shape, we mean that this is bound to a different object depending on the way the invocation expression is written. In Example 3.4, while the same function is shared between two different objects, depending on the function invocation, this is bound to a different object. var o = new Object(); // A new function is attached to 'o' on property 'f' o.f = function() {return this;}; // f is invoked from o o.f(); // answers o, so 'this' was bound to 'o' var o2 = new Object(); // o2.f and o.f point to the same function object o2.f = o.f; // f is invoked from o2 o2.f(); // answers o2, so 'this' was bound to 'o2' Example 3.4: Function invoking The behavior described by the previous example looks natural and similar to the one of Java and C# where this is bound to the receiver. However, the semantics 13 Resilience Inria behind this is more complex. Thus, depending on the way the function is invoked, this may not refer to the object which defines the function but to the global object window. As explained in section 3.2, every object not attached to another object is implicitly attached to the global object window. The following example illustrates this behavior. First, a simple object, named o, with a method yourself is created that simply returns this. When the expression o.yourself is executed, o is returned as expected. Then the variable yourselfFunction is defined in the context of the global environment and its value is set to the method yourself. Now when yourselfFunction is executed, the global object window is returned instead of the object o, which defines the method. We see that assigning a pointer to a function and invoking this function via this pointer changes what this is bound to inside the function. // Creates a new object with a 'yourself' method var o = { yourself: function() { return this; } }; o.yourself() // answers o //We attach o.yourself to window var yourselfFunction = o.yourself; yourselfFunction() // answers the 'window' object Example 3.5: this and window interplay As can be seen in Example 3.5 taken from [GSK10], one of the dangerous side effects of the this semantics is the ability to retrieve the window object from a function. In this example, an object, named obj, is created with a property x and a method named setX: which mutates x. The return value of the expression window.x shows that window does not have a property x. Then the expression obj.setX(10) sets the value of the property x of obj to 10. Then the variable named f points to the mutator method of object obj. Executing the mutator via the reference through f with 90 as a value will add a variable x to window and assign it 90. Here the syntax of the method invocation binds this to the global object window instead of obj. The value returned from the expression obj.x shows that the property x did not change and is still holding 10. Finally, the value returned from the expression window.x shows that the object window got a new property x holding the value 90. 14 Resilience Inria var obj = { "x" : 0, "setX": function(val) { this.x = val } }; window.x // answers 'undefined' obj.setX(10); obj.x // answers 10 var f = obj.setX; f(90); obj.x // answers 10 (obj.x was not updated) window.x // answers 90 (window.x was created) Example 3.6: this and window This section has shown that this is dynamically bound and that its binding depends on the syntactic expression from which a function is invoked. In particular, imprecise use of this may lead to a security breach granting access to the top-level object window (and thus any object of the web browser frame). 3.4 Object constructors misuse Constructors used without new. When invoked without the new keyword, the function gets evaluated in the global context. this is then bound to the window object as seen in Example 3.7. var Person = function (name, surname, age) { this.name = name; this.surname = surname; this.age = age; }; // Invoking the constructor as a simple function var person = Person('John', 'Foo', 27); person // answers 'undefined' person.age // raises an error window.surname // answers 'Foo' Example 3.7: Not using the new keyword Note that in Example 3.7, person is undefined since the constructor does not return the object. In addition window gets an additional surname property as shown by the last statement of the example. Objects created using the same constructor will not share functions and data set in the constructor. Each object will have its own copy of the initialization values. Sharing can be achieved using the prototype as will be shown in section 4.1. 15 Resilience Inria Constructors returning objects. Example 3.8 shows that values returned by functions invoked as constructors (with the new operator) are ignored by the compiler. var Dog = function () { this.name = 'milou'; return 3; // this statement is ignored by the compiler } var dog = new Dog(); dog; // answers {name: 'milou'} as expected Example 3.8: Returning a primitive type from a constructor function Example 3.9 shows that when the returned object of a constructor function is not a primitive one, the constructor actually returns it. This behavior is unspecified by ECMAScript 5 and leads to misleading results. Constructor functions should never explicitly return anything. The new keyword takes care of returning the newly created object. var Dog = function () { this.name = 'milou'; return {name: 'tintin'}; // this statement is not ignored } var dog = new Dog(); dog; // unexpectedly answers {name: 'tintin'} Example 3.9: Returning a non-primitive type from a constructor function 3.5 Lexical closures and unbound variables JavaScript functions are lexical closures [MMT08, Dav06, GSK10]. Each lexical environment depends on its outer context. The closure scope grants access to the function arguments (accessed by value), as well as all variables accessible from the outer context scope, including all global variables. In the Example 3.10, we show how a function has access to its outer scope’s variables. outerFunction is a function which returns another function whose role is to increment a private variable localToOuterFunction and set the value to an object’s property someProperty. We can see that innerFunction has access to the localToOuterFunction variable defined in outerFunction. We can also see that the two functions returned by the two calls to outerFunction have access to two different copies of localToOuterFunction. 16 Resilience Inria function outerFunction(obj){ var localToOuterFunction = 0; var innerFunction = function(){ localToOuterFunction++; obj.someProperty = localToOuterFunction; } return innerFunction; } o = new Object(); returnedFunction = outerFunction(o); returnedFunction(); returnedFunction(); o.someProperty // answers 2 o2 = new Object(); returnedFunction = outerFunction(o2); returnedFunction(); o2.someProperty // answers 1 o.someProperty // answers 2 Example 3.10: A function and its outer scope A naive use of closures may lead to issues as described in Example 3.11 where all handlers will unexpectedly always return the value 10. var handlers = []; for(var i=0; i < 10; i++) { handlers[i] = function() { return i; }; }; handlers[3](); // answers 10 Example 3.11: Variable scopes in closures #1 In the for loop we iterate over i from 0 to 10. In each iteration of the loop a closure is created and stored into the handlers array. When one of these closures is evaluated (the fourth one here), the value returned by the closure is the current value of i, not the value of i at the time of the closure creation. The Example 3.12 illustrates how to use closures to solve the issue described before. This example is the same as the previous one, only surrounding the closure creation with an additional closure capturing the value of i inside the for loop. When one of the closures is evaluated, the expected number is returned. var handlers = []; for(var i=0; i < 10; i++) { (function (j) { handlers[j] = function() { return j; }; 17 Resilience Inria })(i); }; handlers[3](); // answers 3 Example 3.12: Variable scopes in closure #2 3.6 The with statement As described in ECMAScript 3, the JavaScript with statement adds all properties of an object to the scope of the with statement as shown in Example 3.13. var someGlobal = 'pilou'; var obj = new Object(); obj.propertyA = 1; with (obj) { someGlobal = propertyA; }; someGlobal; // answers 1 Example 3.13: Mixing scopes The scope of the with statement includes all the variables of its outer scope (including global variables) and the object properties, overriding outer scope variables as shown in Example 3.14. In this example, inside the with statement, there is potentially two targets for the propertyA name: this name could be referring to either the global variable (with value ’property’) or to the property of obj (with value 1). When using with, properties of the object passed as parameter to with always take precedence. var propertyA = 'property'; var someGlobal = 'pilou'; var obj = new Object(); obj.propertyA = 1; with (obj) { someGlobal = propertyA; // 'propertyA' is the property of obj }; someGlobal; // answers 1 Example 3.14: Overriding outer scope variables Using with is not recommended and is even forbidden in ECMAScript 5 strict mode. The recommended alternative is to assign the object’s wanted properties to a temporary variable. 18 Resilience Inria The dynamic nature of JavaScript combined with scope mixture lowers the predictability of JavaScript programs. 3.7 Lifted Variable Definitions Local variables are automatically lifted to the top of the function in which they appear. For example in the following function foo(), the return statement has access to the variable x that was defined inside the if branch. function foo() { if (true) { var x = 10; } return x; } foo(); // answers 10 This happens because Javascript automatically rewrite the previous code to something like the following: function foo() { var x; if (true) { x = 10; } return x; } foo(); // answers 10 Such behavior can lead to unintuitive results as demonstrated in the following example. function foo(x) { return function() { var x = x; return x; } } foo(200)(); // answers undefined The function returned by the function foo does not return the value passed to foo but undefined (the value of unaffected variables). In this last example we might expect the x on the right-hand side of var x = x to reference the argument x of foo. 19 Resilience Inria Nevertheless, due to lifting, all bound occurrences of x in the nested function refer to the local variable x as is made clear in the following rewrite: function foo(x) { return function() { var x; // JavaScript splits "var x = x" in two statements x = x; return x; } } foo(200)(); // answers undefined The expression var x = x reads and writes back the initial value of x (i.e., undefined). var x = x works as var x; x = x; hence the right-hand x of the assignment refer to the local variable x. 3.8 Type coercion JavaScript performs type coercion (implicit type conversion) over objects on, for example, comparisons and if statements checks. The automatic type coercions performed by JavaScript are well known causes of bugs which lower the robustness of JavaScript applications. The basic rules about type coercion are [ECM11]: Boolean coercion. When expecting a boolean value, as in the if statements, JavaScript transforms the result of our expression automatically into a boolean value. Values equivalent to false are null, undefined, false, +0, -0, NaN and the empty string. The rest of the JavaScript objects are coerced to true. var falsyValue = false; if(!"") { falsyValue = true; } falsyValue // Answers true falsyValue = false; if(0) { falsyValue = true; } falsyValue // Answers false Equality coercion. When two objects are compared (as via the equality operator ==), depending on their types, none, one or both objects are coerced before being compared. After coercion, if both operands have the same type, the comparison is 20 Resilience Inria finally resolved by the strict equality operator. Depending on the type, valueOf() or toString() may be implicitely performed on the compared objects. In addition, when performing an equality comparison, the following objects are considered as false: null, 0, false, ” and NaN. false == 0 // answers true 0 == false // answers true "" == 0 // answers true false == "" // answers true {} == {} // answers false var n = { valueOf: function () { return 1; }, toString: function () { return "2"; } }; n == 1; // answers true n == "2"; // answers false var n = { toString: function () { return "2"; } }; n == 1; // answers false n == "2"; // answers true [ [ [ 42 ] ] ] == 42; // answers true. valueOf() an array with one element answers its element true + 3; // answers 4 Example 3.15: Some unintuitive examples of type coercion Strict equality coercion. The strict equality operator === compares both type and value of the operands, without performing type coercions. It only resolves to true, when both operands have the same type and value. The only exception are non-primitive objects, which are strictly equal if they are the same object. 21 Resilience Inria false === 0 // answers false 0 === false // answers false "" === 0 // answers false false === "" // answers false 1 === 1 // answers true {} === {} // answers false 22 Resilience Inria Chapter4. JavaScript programming practices This section presents different coding practices in JavaScript development (ECMAScript 3) that result in robust, extensible and understandable sofware. In particular, we stress the semantics of the new constructor and its impact on inheritance [Dou08]. 4.1 Defining prototypes JavaScript as defined in ECMAScript 3 is a prototype-based object-oriented language where each object has a prototype (referenced in the __proto__ core property). The object inherits all properties from it. Since the prototype is also an object, the prototype chain inheritance is similar to a class hierarchy in classbased object-oriented languages. Constructors structure object creation and initialize properties. Each time an object is created, a different copy of each attribute specified in the constructor is assigned to the object. When sharing is needed between objects, the shared properties must be defined in the constructor’s prototype as can be seen in Example 4.1 and Figure 4.1. var Cat = function (color, name) { this.color = color; this.name = name || 'default name'; } Cat.prototype.numberOfLegs = 4; var garfield = new Cat('red', 'Garfield'); var azrael = new Cat('black', 'Azrael'); garfield.color; // answers 'red' garfield.numberOfLegs; // answers 4 azrael.color; // answers 'black' azrael.numberOfLegs; // answers 4 Cat.prototype.numberOfLegs = 5; garfield.numberOfLegs; // answers 5 azrael.numberOfLegs; // answers 5 azrael.color = 'grey'; garfield.color; // answers 'red' 23 Resilience Inria __proto__ {numberOfLegs: 5} __proto__ prototype Cat constructor garfield {color: 'red', name: 'Garfield'} azrael {color: 'black', name: 'Azrael'} Figure 4.1: Sharing a property between objects (see Example 4.1) azrael.color; // answers 'grey' Example 4.1: Sharing a value between objects through their prototype (see Figure 4.1) When a new object is created by calling a constructor, its __proto__ core property is initialized to the constructor’s prototype property value. In Example 4.2 we set the prototype of function Dog to be an object created from function Animal (see Figure 4.2). Note that we have to set the constructor of the prototype to be the function Dog. Then when an object created from the function Dog is asked for a property that it does not define locally, the lookup is performed following the prototype chain (i.e.,, looking inside the __proto__ core property value). Here the property isAnAnimal is found in the prototype of Dog which is an object created from the Animal constructor. var Animal = function () { }; Animal.prototype.isAnAnimal = true; var animal = new Animal(); var Dog = function () {}; // The prototype of Dog is set to a new Animal, // so that future Dog objects will inherit from Animal.prototype Dog.prototype = new Animal(); // We need to manually change Dog.prototype.constructor so that // future Dog objects will have Dog as constructor 24 Resilience Inria {isAnAnimal: true} prototype Animal constructor __proto__ __proto__ animal prototype {isADog: true} __proto__ constructor Dog dog Figure 4.2: Prototypical inheritance (see Example 4.2) // (instead of Animal). Dog.prototype.constructor = Dog; // All Dog objects must share this property Dog.prototype.isADog = true; var dog = new Dog(); dog.isAnAnimal; // answers true dog.isADog; // answers true Example 4.2: Inheritance in JavaScript prototypical programming (see Figure 4.2) Accessing overridden functions. Other object-oriented languages have a message resend mechanism, often implemented as super sends. To perform super sends in JavaScript, the lookup must be explicitly forwarded to the prototype (see Example 4.3 and Figure 4.3). // 'Object' being a function, we add a new method to all objects Object.prototype.superSend = function (selector, args) { // We use 'inheritsFrom' to reference the prototype and we search // the property in variable 'selector' from this prototype: return this.inheritsFrom[selector].apply(this, args); }; var Animal = function () { }; Animal.prototype.say = function (string) { return 'hello ' + string; }; 25 Resilience Inria Object prototype {superSend: ... } __proto__ Animal prototype {say: ... } inheritsFrom __proto__ Dog constructor prototype new Animal() {say: ...} __proto__ constructor new Dog() Figure 4.3: Message resending – super sends (see Example 4.3) var Dog = function () { }; Dog.prototype = new Animal(); // We add our own property to retain inheritance // without using the not standard __proto__ Dog.prototype.inheritsFrom = Dog.prototype.constructor.prototype; Dog.prototype.constructor = Dog; new Dog().inheritsFrom === new Dog().__proto__.__proto__; // answers true Dog.prototype.say = function (string) { return this.superSend('say',['wouf wouf']); }; new Dog().say("I'm a dog"); // answers 'hello wouf wouf' Example 4.3: Message resending – super sends (see Figure 4.3) The dynamic capabilities of JavaScript allow the usage of this mechanism to extend existing objects like Arrays, Numbers, and Functions, through the addition of properties and methods to their prototype constructors. 4.2 Closures and ‘functional’ inheritance We’ve previously shown an example of how to provide an inheritance-like relation in JavaScript using prototypes, allowing us to share properties and methods between our objects. Unfortunately, the builtin inheritance mechanism of ECMAScript 3 has several drawbacks: (1) it depends on many implementation details that could lead to several mistakes, (2) it does not provide any access protection 26 Resilience Inria between objects, their prototypes, and the outer scope. In Example 4.4 a JavaScript idiom appears showing how we can use closures to support visibility principles such as private attributes and inheritance [Dou08] instead of the typical prototype relationship we just described. The main idea is to create functions that create and initialize an object – declared as that in the example – with default values and methods. The values set in the object’s properties will be public values. We can also define and use variables and functions with the var keyword to make them private to our object. To customize the initialization, we can also pass an object as a parameter to this function as a spec hash-table. var animal = function (spec) { // We take either the parameter or the empty object if // spec is null spec = spec || {}; var that = {}; // Initialization that.isAnAnimal = true; // Private var name = spec.name || 'unnamed'; // Public that.getName = function() { return name; }; return that; }; var dog = function (spec) { spec = spec || {}; var that = animal(spec); // makes dog inherits from animal that.isADog = true; return that; }; var aDog = dog({name: 'milou'}); aDog.isAnAnimal; // answers 'true' aDog.isADog; // answers 'true' aDog.getName(); // answers 'milou' aDog.name; // answers 'undefined' Example 4.4: Using closures to support access visibility to properties 27 Resilience Inria Chapter5. ECMAScript 5 We also present an overview of the features of ECMAScript 5 [ECM97, ECM11]. Released in June 2011, ECMAScript 5 defines the latest standarized version of the JavaScript language. This release includes improvements and clarifications compared to ECMAScript 4. In this section we propose a survey of two important aspects of ECMAScript 5: object creation and properties access. These aspects improve object encapsulation, giving a finer-grained object-property definition and thus improving security. 5.1 Object creation ECMAScript 5 offers a new way to instantiate objects with the ability to specify the new object’s prototype and properties. var objOld = new Object(); var objNew = Object.create(null); // new function from ECMAScript 5 // a.isPrototypeOf(b) checks if 'a' is in the __proto__ inheritance // chain of b (i.e., b is derived from a) Object.prototype.isPrototypeOf(objOld); // answers true Object.prototype.isPrototypeOf(objNew); // answers false objOld.toString; // answers a function objNew.toString; // answers 'undefined' Example 5.1: Creating an object with null as prototype Example 5.1 shows how to create a new object named objNew that has no prototype and no inherited property. When passed an argument, Object.create sets the __proto__ property of the object to the argument. As a result, new Object() is equivalent to Object.create(Object.prototype). Object.create also optionally accept a second argument that is an object whose properties serve to initialize the new object. In Example 5.2, the object obj inherits all standard properties from Object.prototype and defines a new property foo whose value is the string "hello". var obj = Object.create(Object.prototype, { foo: { writable: true, configurable: true, value: "hello" }, }); obj.__proto__ === Object.prototype; // answers true obj.toString; // answers a function 28 Resilience Inria obj.foo; // answers "hello" Example 5.2: Creating an object with prototype and a property The keys writable and configurable are described below. 5.2 Defining object properties Security wise, ECMAScript 3 doesn’t have any concept of private properties.1 All object properties are publicly visible, inherited and modifiable at will. ECMAScript 5 improves the situation by introducing a fine-grain protocol to define object properties. Object.defineProperty is one of the core changes to JavaScript defined in EC- MAScript 5. This function takes three parameters: the object on which the property is defined, a string (name of the new property) and a descriptor object. The descriptor object can be a data descriptor or a getter/setter descriptor. A descriptor object can have the following optional keys: • enumerable: if true, the property shows up during enumeration of the properties of the receiver; • configurable: if true, the property can be deleted, and the descriptor can be changed afterwards. In case of an accessor descriptor, two keys get and set can be used to define accessor methods to the property. In case of a data descriptor, two keys value and writable can be used to respectively set an initial value and specify if the property can be written. var dog = {}; Object.defineProperty(dog, 'name', { enumerable: true, configurable: false, value: 'Pilou', writable: false }); dog.name; // answers 'Pilou', the default value dog.name = 'another name'; // tries to set a new value dog.name; // answers 'Pilou' as the property is not writable delete dog.name; // tries to remove the property from the object 1 We call private properties object properties that are neither enumerable nor writable. 29 Resilience Inria dog.name; // answers 'Pilou' as the property is not configurable Example 5.3: Defining properties Example 5.3 shows how to use Object.defineProperty. First an empty object dog is created. A property ’name’ is added to dog and set a default value of ’Pilou’. This property is neither configurable nor writable. As a result, trying to change the value of the property dog.name or trying to delete it both fail. Object.preventExtensions. ECMAScript 5 introduces two important functions regarding object extensions: preventExtensions and isExtensible, both available from Object. As seen in Example 5.4 preventExtensions takes an object as argu- ment and prevents any further addition of properties. Existing properties may still be deleted though. isExtensible is a testing function answering a boolean value that indicates whether properties can be added or not. var dog = {}; Object.defineProperty(dog, 'name', { enumerable: true, configurable: false, value: 'Pilou', writable: false }); Object.isExtensible(dog); // answers true Object.preventExtensions(dog); Object.isExtensible(dog); // answers false dog.age = 5; // tries to add a new property to 'dog' dog.age // anwers undefined because 'dog' is not extensible Example 5.4: Preventing object extensions ECMAScript 5 also introduces full immutability of objects through Object.freeze, and can be tested with Object.isFrozen, and seen in Example 5.5. var dog = {}; Object.defineProperty(dog, 'name', { enumerable: true, configurable: false, value: 'Pilou', writable: false }); Object.isFrozen(dog); // answers false Object.freeze(dog); 30 Resilience Inria Object.isFrozen(dog); // answers true dog.age = 5; // tries to add a new property to 'dog' dog.age // anwers undefined because 'dog' is not extensible delete dog.name // answers false dog.name // answers 'Pilou' Example 5.5: Object immutability By adding the functions mentioned in this section (notably create, defineProperty, preventExtensions and freeze), ECMAScript 5 makes it possible for developers to secure their objects. 31 Resilience Inria Chapter6. Key Bibliography Elements Here we present the key and limited articles that we encourage you to read if you want to get deeper into the semantics of JavaScript. • Sergio Maffeis, John C. Mitchell, and Ankur Taly. An operational semantics for javascript. In Proceedings of the 6th Asian Symposium on Programming Languages and Systems, APLAS ’08, pages 307-325, Berlin, Heidelberg, 2008. Springer-Verlag. The paper presents a 30-page operational semantics, based directly on the JavaScript specification. The semantics covers most of JavaScript directly, but does omit a few syntactic forms. They discuss various differences between the standard and implementations. • Arjun Guha, Claudiu Saftoiu, and Shriram Krishnamurthi. The essence of javascript. In Proceedings of the 24th European Conference on ObjectOriented Programming, ECOOP’10, pages 126-150, Berlin, Heidelberg, 2010. Springer-Verlag. In this article a core calculus is defined. Based on it, several aspects of JavaScript are described. Some badly designed features of Javascript are described. • ECMAScript version 3.0 specification (188 pages). http://www.ecma-international. org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December% 201999.pdf • ECMAScript version 5.1 specification (255 pages). http://www.ecma-international. org/publications/files/ECMA-ST-ARCH/ECMA-262%205th%20edition%20December% 202009.pdf 32 Resilience Inria Chapter7. Conclusion This deliverable has introduced an overall picture of JavaScript as defined in ECMAScript 3 and ECMAScript 5, focusing on security aspects of its semantics. We offered a detailed review of JavaScript subtle points concerning security and application predictability. We have seen that the window object is key to data privacy protection. Nevertheless, we have pointed out how JavaScript exposes window to the entire environment constraining any security approach. We have described scoping issues and the possible resulting security leaks. For example, the this pseudo variable is bound to a different object depending on the way the function invocation expression is written (syntactic shape of the function invocation in which this is used). This dynamic behavior can be exploited by an attacker to leak private objects. As another example, the fact that JavaScript lifts variable definitions inside functions (i.e., moves to the top) leads to unsuspected variable shadowing, dramatically lowering behavior predictability. In the last chapter, we have proposed a description of ECMAScript 5 features regarding object declaration and property access that improve encapsulation, therefore securing exposure of objects. In the following deliverable, we will leverage this knowledge, detailing existing sandboxing techniques, and for each of them, we will review its advantages and weaknesses in different contexts. 33 Resilience Inria Bibliography [Dav06] Flanagan David. JavaScript: The Definitive Guide. O’Reilly Media, Inc., fifth edition, 2006. [Dou08] Crockford Douglas. JavaScript: The Good Parts. O’Reilly Media, Inc., 2008. [ECM97] ECMA, editor. ECMAScript Language Specification. European Computer Machinery Association, June 1997. [ECM11] ECMA, editor. ECMAScript Language Specification version 5. European Computer Machinery Association, July 2011. [GHJV95] Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional, 1995. [GSK10] Arjun Guha, Claudiu Saftoiu, and Shriram Krishnamurthi. The essence of javascript. In Proceedings of the 24th European conference on Object-oriented programming, ECOOP’10, pages 126–150, Berlin, Heidelberg, 2010. Springer-Verlag. [MFF01] Lynette I. Millett, Batya Friedman, and Edward Felten. Cookies and web browser design: toward realizing informed consent online. In Proceedings of the SIGCHI conference on Human factors in computing systems, CHI ’01, pages 46–52, New York, NY, USA, 2001. ACM. [MMT08] Sergio Maffeis, John C. Mitchell, and Ankur Taly. An operational semantics for javascript. In Proceedings of the 6th Asian Symposium on Programming Languages and Systems, APLAS ’08, pages 307– 325, Berlin, Heidelberg, 2008. Springer-Verlag. [Mog02] Jeffery C. Mogul. Clarifying the fundamentals of http. In Proceedings of the 11th international conference on World Wide Web, WWW ’02, pages 25–36, New York, NY, USA, 2002. ACM. [MvD07] Ali Mesbah and Arie van Deursen. Migrating multi-page web applications to single-page ajax interfaces. In Proceedings of the 11th European Conference on Software Maintenance and Reengineering, CSMR ’07, pages 181–190, Washington, DC, USA, 2007. IEEE Computer Society. 34 Resilience Inria [RHBV11] Gregor Richards, Christian Hammer, Brian Burg, and Jan Vitek. The eval that men do: A large-scale study of the use of eval in javascript applications. In Proceedings of Ecoop 2011, 2011. 35
6cs.PL
A Literature Based Approach to Define the Scope of Biomedical Ontologies: A Case Study on a Rehabilitation Therapy Ontology Mohammad K. Halawani 1 , 3∗, Rob Forsyth 2 and Phillip Lord 1 1 arXiv:1709.09450v1 [cs.IR] 27 Sep 2017 School of Computing Science Newcastle University, UK 2 Institute of Neuroscience Newcastle University, UK 3 Department of Information Systems Umm Al-Qura University, Saudi Arabia ABSTRACT In this article, we investigate our early attempts at building an ontology describing rehabilitation therapies following brain injury. These therapies are wide-ranging, involving interventions of many different kinds. As a result, these therapies are hard to describe. As well as restricting actual practice, this is also a major impediment to evidence-based medicine as it is hard to meaningfully compare two treatment plans. Ontology development requires significant effort from both ontologists and domain experts. Knowledge elicited from domain experts forms the scope of the ontology. The process of knowledge elicitation is expensive, consumes experts’ time and might have biases depending on the selection of the experts. Various methodologies and techniques exist for enabling this knowledge elicitation, including community groups and open development practices. A related problem is that of defining scope. By defining the scope, we can decide whether a concept (i.e. term) should be represented in the ontology. This is the opposite of knowledge elicitation, in the sense that it defines what should not be in the ontology. This can be addressed by pre-defining a set of competency questions. These approaches are, however, expensive and time-consuming. Here, we describe our work toward an alternative approach, bootstrapping the ontology from an initially small corpus of literature that will define the scope of the ontology, expanding this to a set covering the domain, then using information extraction to define an initial terminology to provide the basis and the competencies for the ontology. Here, we discuss four approaches to building a suitable corpus that is both sufficiently covering and precise. 1 INTRODUCTION Rehabilitation therapies, unlike pharmacologic therapies, are difficult to define precisely both qualitatively and quantitatively (van Heugten et al., 2012) and many approaches have been taken to trying to parse them. It is recognised that traditional approaches to designation (e.g. “dressing practice”) are flawed as two professionals’ rehabilitation sessions both targeting difficulties in dressing could differ in pertinent active ingredients (e.g. actions, chemicals, devices, or forms of energy) as experienced by the patient. Assumptions that rehabilitation content can be inferred from ∗ To whom correspondence [email protected] should be addressed: the targeted impairment (e.g. “balance training”) as flawed: no one would consider it appropriate to consider bariatric surgery, calorierestricted diets and exercise programmes together as equivalent forms of “obesity therapy” (Whyte et al., 2014). This lack of a shared terminology makes it difficult to describe, measure and meaningfully compare rehabilitation therapies and treatments. Building a taxonomy for rehabilitation treatments could lead to a better shared understanding of rehabilitation interventions (Dijkers, 2014). Hence, a rehabilitation treatment ontology (RTO) of rehabilitation terms, as the terms represent the concepts and knowledge of the domain (Sowa, 2000), should ease the dissemination of treatments to communicate about them clearly and effectively, through a shared understanding. To enable building the RTO, we need to define both the terms that we wish to be in the ontology and those that should not. Some ontologies have extremely well-defined scopes, such as the Karyotype ontology (Warrender and Lord, 2013), which is an ontological representation of a previously defined informal specification. Others, such as the mitochondrial disease ontology (Warrender, 2015) relate to a specific area of knowledge, or like the Gene Ontology(GO) (Ashburner et al., 2000) to a broad area, but at a specific granularity. For the RTO, unfortunately, the breadth of the area means that we lack this clear statement of scope. Of course, there has been significant research on ontology learning, enabling either automation or semi-automation of the ontology construction process (Buitelaar et al., 2005). For the RTO, we aim to use a semi-automated approach, combined with a highly programmatic, pattern-driven ontology construction methodology that we have pioneered previously with the mitochondrial disease ontology (Warrender and Lord, 2015): this separates terms out into a scaffold generated automatically, often from a pre-existing structured source such as a database. This is followed by manual refinement using the vocabulary provided this scaffold. With the RTO, we plan to extend this ontology construction methodology: first, we will build a corpus of appropriate literature that will define the scope of the ontology; then we can use this to extract a set of representative terms and phrases; finally, we will use these terms and phrases as the basis for our ontological scaffold (Warrender and Lord, 2015). This should provide both coverage and scope for our ontology, which we can then refine and build further either manually or through the addition of further scaffolded terms, identified during the first phase of development. We have previously used a similar methodology to ensure good 1 Halawani et al coverage and define the scope of MITAP, a minimum information model (Lord et al., 2016). This leaves us with the problem of defining an appropriate corpus of literature for the RTO. This corpus needs to cover the domain adequately; at the same time, we would like this corpus to be reflective of opinions of a wider community than the experts involved it its construction. This is a common problem with ontology development: if the scope is too narrow, the ontology will fulfil the needs of only a few; if it is too broad, the ontology will either get large or only have general terms. The aim of this article is to investigate different semi-automated methods and search strategies to retrieve a corpus with a high level of accuracy and coverage with respect to the communities needs for the RTO. The accuracy and coverage of a corpus are its precision and recall, respectively, in relation to the scope of rehabilitation. We describe four different techniques that we have used all based around use of PubMed, and describe their advantages and disadvantages. 2 METHODS For this work, we have used PubMed exclusively to define our corpus. As a corpus, PubMed is far from ideal. While it contains many papers about rehabilitation, they are mostly written from an academic perspective and may make a different use of vocabulary from the clinicians. A significant percentage of the papers in PubMed have only abstracts accessible (although, under UK law, we may be able to access full text by other means (gre, 2014)). However, it has other significant advantages: it is freely available; there are no patient confidentiality restrictions as there would be with medical records; finally, it has a good API and is easy to access computationally. We use two additional features of PubMed in this paper. First, papers are annotated with Medical Subject Headings (MeSH). MeSH is a thesaurus organised into a hierarchy; searches with a single term, also search the transitive closure of that term. Curators can also define a MeSH annotation as the “major term” or MAJR. Secondly, PubMed provides a similar articles functionality (PMSA), based on text similarity ( U.S. National Library of Medicine (NLM), 2017). Currently, this functionality only allows retrieving MEDLINE records (i.e. PubMed citation) similar to a single userselected record. We discuss this limitation later. Additional search functionality described in this paper was implemented using Python, exploiting the Entrez module of BioPython (Cock et al., 2009). 2.1 Forming a Corpus The simplest approach to generating a suitable corpus is a keyword search. We tried this for RTO, searching with the term “rehabilitation”. This naive approach does not work well, as it misses many papers which contain the same stem but with a different ending (such as “rehabilitate” or “rehabilitator”). Moreover, it retrieves many less relevant results (for example, those relating to drug rehabilitation). Our next approach is to use MeSH or MAJR terms. PubMed’s search engine automatically searches the transitive closure of any MeSH term given, therefore searches with “Rehabilitation” will also search “Physical Therapy Modalities”, as can be seen in figure 1. 2 Fig. 1. “Rehabilitation” MeSH term with some of its narrower terms Clearly searching for “Rehabilitation” as the MAJR term will produce a result which is an exact subset of searching for the equivalent MeSH term. In fact, the simple search approach automatically incorporates MeSH search, as PubMed’s search engine translates search terms to its equivalent MeSH term if it exists. For example, the term “Physiotherapy” is translated to the “Physical Therapy Modalities” MeSH term. MeSH search approach also runs the risk of missing papers which have not been annotated at all, or have been annotated with alternative terms from MeSH. To address this latter problem, we have tried query expansion. Here, we expand the transitive closure of the MeSH term, then add alternative endings manually. Sub-terms, more specifically narrower terms, of “rehabilitation” were extracted using “MeSH SPARQL” tool 1 . The following SPARQL query was used: PREFIX r d f s : <http://www.w3.org/2000/01/rdf- schema#> PREFIX meshv : <http://id.nlm.nih.gov/mesh/vocab#> PREFIX mesh : <http://id.nlm.nih.gov/mesh/> SELECT ? l a b e l FROM <http://id.nlm.nih.gov/mesh> WHERE { ? t e r m meshv : b r o a d e r D e s c r i p t o r + mesh : D012046 . ? term r d f s : l a b e l ? l a b e l . } We collected and filtered general terms used in other domains such as “Yoga” and “Massage” by inspection. These are mostly the ones without medical words such as rehabilitation or therapy. Synonyms of the term “rehabilitation” were defined by consultation with a domain expert: specifically, “restoration” and “recovery”. Multiple variations of these words were determined manually using a dictionary. Variations of the words “therapy”, “rehabilitation” include “therapies”, “therapist” and “rehabilitant”. rehabilitated, and were injected in the query. Finally, the collected general terms were combined into a MeSH approach query, the rest of the terms were combined into a query that is disjunctive between noun phrases and their variants. For example, the term “physical therapy” was converted to: P h y s i c a l t h e r a p y OR P h y s i c a l AND ( t h e r a p y OR t h e r a p i e s OR t h e r a p i s t OR t h e r a p i s t s OR t h e r a p e u t i c OR . . . OR r e h a b i l i t a t i o n OR r e h a b i l i t a t e OR r e h a b i l i t a t o r OR . . . OR r e s t o r a t i o n OR r e s t o r e OR . . . OR r e c o v e r y OR . . . ) The two queries were combined to form the expanded query.The result of this approach subsumes the results of the two previous approaches. Thus, this approach provides the most coverage. In fact, we retrieved around 2.9 million MEDLINE records using the 1 MeSH SPARQL is available at https://id.nlm.nih.gov/mesh/query Using Literature to Define Biomedical Ontologies’ Scope query expansion approach. Table 1 shows the search terms for each approach along with the number of retrieved records. Search Strategy Query Search Term(s) Simple MeSH MAJR Query expansion Rehabilitation Rehabilitation [MeSH] Rehabilitation [MAJR] The expanded query (as explained in the example) Number of retrieved records 512,901 258,541 156,038 2,880,858 Table 1. Search terms and the number of retrieved MEDLINE records for each of the three search approaches The query expansion search approach provides a significant increase in the number of records. We tested the accuracy of the approach by random selection of papers, followed by expert analysis to determine whether the papers were in scope. Unfortunately, the accuracy of this approach appears fairly low, with around 5% of the papers considered in scope. Finally, we have pioneered a relative similarity measure. This builds on PubMed’s existing article similarity score, and allows us to define similarity to a set of articles. Retrieved records are ranked with a relatively score which is calculated as follows: relativity score(a) = #similar articles(a) that are in s max(#s, #similar articles(a)) where s : seed set, a : article (i.e. M EDLIN E record) From this equation, for a record to have a relativity score of 1.0, all of its similar records need to cover all of the records in the seed set. In other words, a record can only have a relativity score of 1.0 if its set of similar records is equivalent to the seed set. If it has a similar record that is not in the seed set or if there is a record in the seed set that is not similar to it, the relativity score will be less than 1.0. Thus, for higher scores, a record not only must be similar to more records in the seed set, but also needs to have fewer similar records out of the seed set. Figure 2 shows an example of this approach. There are 3 seed MEDLINE records (i.e. records). The relativity score for the node D is 1.0 , as all of its similar records are in the seed set. Below are some of the other records scores: 1 3 2 relativity score(G) = 3 3 relativity score(K) = 8 Although K, like D, is similar to all the records in the seed set, unlike D, its score is lower than that of G as it has more similarity with other records out of the seed set. Records with higher scores can be considered as more relatively similar to the seed set. A significant advantage of this approach is that the result is continuous and can be thresholded according to contain more or less papers as required. Fig. 2. An example for relatively similar records approach. The green nodes represent the seed set of MEDLINE records (i.e. records), the yellow ones represent similar records, the red ones represent records similar to the yellow nodes records and the edges represent PubMed’s similarity relation, which is symmetric. After achieving a maximal set of citations covering the topic, a minimal accurate set was provided by a domain expert. The expert set of articles was provided as an EndNote library file. We converted the articles in the library file to PMIDs. We can test the coverage of the maximal set by checking whether it subsumes the minimal set. In fact, all of the articles provided by the expert were included in the maximal set. Now, we can use this approach to retrieve relatively similar articles from the experts seed set, i.e. the minimal set. The retrieved articles that are not included in the maximal set are filtered to restrict similar articles that are out of the maximal set’s scope. The expert, then, can set a threshold score to select the most related articles. The articles above the threshold, or ones chosen by the expert, can then be added to the seed set to perform the process again. This process can be repeated iteratively with the help of the expert until the results are satisfying or until they converge. The choice of the threshold might partly depend on the required number of retrieved articles, especially in the final stages. This process is depicted in Figure 3. relativity score(E) = Fig. 3. The process of retrieving a suitable corpus that is relatively similar to a seed corpus provided by the expert in EndNote library format. 3 CONCLUSION In this article, we described four complementary search strategies to retrieve an accurate and covering corpus of PubMed records for the 3 Halawani et al topic of rehabilitation. We use this approach to ensure that we have a covering and unbiased corpus. Of the approaches tried, the simple search and MeSH based strategies were too restrictive, the expanded query too broad. To address these issues, we have developed a new measure for paper similarity which enables us to select papers similar to a group of papers. This approach enables us to threshold arbitrarily and define for ourselves the “Goldilocks” zone. The key advantage of this technique is that it requires relatively little from the domain expert, beyond a set of references to appropriate papers, something that most researchers will have through their normal bibliography management facilities. Operationally, this technique is also straight-forward as it works on PubMed similarity (although it generalises to any similarity measure), and can operate directly over PubMed’s normal search facilities. This avoids the necessity of performing bespoke analysis over the whole of PubMed locally. A significant advantage of this technique is that it works on PubMed similarity (although it could work on any pair-wise similarity metric), which makes it easy to perform. We can envisage perhaps richer techniques that generalize the current over PubMed’s similar articles approach. However, until and unless these are directly supported by PubMed, they would require warehousing PubMed locally. For the next step, we plan to use this corpus to define a covering set of terms for the Rehabilitation Therapy Ontology, using inverse document frequency statitics that we have previously used to define the scope of a minimum information model (Lord et al., 2016). We note that this approach is largely independent of domain. We do not require a suitable MeSH term, or a pre-existing set of keywords that can be used for querying. It raises the possibility of moving the initial knowledge capture stage of ontology development away from expert user groups and competency questions, toward 4 an approach which is more data-driven, embedding ontology development in the explosion of interest in big data analytics that have characterised the last few years. REFERENCES (2014). Exceptions to copyright - gov.uk. Ashburner, M., Ball, C. A., Blake, J. A., Botstein, D., Butler, H., Cherry, J. M., Davis, A. P., Dolinski, K., Dwight, S. S., Eppig, J. T., et al. (2000). Gene ontology: tool for the unification of biology. Nature genetics, 25(1), 25. Buitelaar, P., Cimiano, P., and Magnini, B. (2005). Ontology learning from text: methods, evaluation and applications, volume 123. IOS press. Cock, P. J., Antao, T., Chang, J. T., Chapman, B. A., Cox, C. J., Dalke, A., Friedberg, I., Hamelryck, T., Kauff, F., Wilczynski, B., et al. (2009). Biopython: freely available python tools for computational molecular biology and bioinformatics. Bioinformatics, 25(11), 1422–1423. Dijkers, M. P. (2014). Rehabilitation treatment taxonomy: establishing common ground. Archives of physical medicine and rehabilitation, 95(1), S1–S5. Lord, P., Spiering, R., Aguillon, J. C., Anderson, A. E., Appel, S., Benitez-Ribas, D., ten Brinke, A., Broere, F., Cools, N., Cuturi, M. C., et al. (2016). Minimum information about tolerogenic antigen-presenting cells (mitap): a first step towards reproducibility and standardisation of cellular therapies. PeerJ, 4, e2300. Sowa, J. F. (2000). Ontology, metadata, and semiotics. In International Conference on Conceptual Structures, pages 55–81. Springer. U.S. National Library of Medicine (NLM) (2017). Pubmed tutorial - similar articles. van Heugten, C., Wolters Gregório, G., and Wade, D. (2012). Evidence-based cognitive rehabilitation after acquired brain injury: a systematic review of content of treatment. Neuropsychological rehabilitation, 22(5), 653–673. Warrender, J. D. (2015). The consistent representation of scientific knowledge: investigations into the ontology of karyotypes and mitochondria. Warrender, J. D. and Lord, P. (2013). The karyotype ontology: a computational representation for human cytogenetic patterns. arXiv preprint arXiv:1305.3758. Warrender, J. D. and Lord, P. (2015). Scaffolding the mitochondrial disease ontology from extant knowledge sources. arXiv preprint arXiv:1505.04114. Whyte, J., Dijkers, M. P., Hart, T., Zanca, J. M., Packel, A., Ferraro, M., and Tsaousides, T. (2014). Development of a theory-driven rehabilitation treatment taxonomy: conceptual issues. Archives of physical medicine and rehabilitation, 95(1), S24–S32.
2cs.AI
Improving and extending the testing of distributions for shape-restricted properties arXiv:1609.06736v1 [cs.CC] 21 Sep 2016 Eldar Fischer∗ Oded Lachish † Yadu Vasudev ‡ September 23, 2016 Abstract Distribution testing deals with what information can be deduced about an unknown distribution over {1, . . . , n}, where the algorithm is only allowed to obtain a relatively small number of independent samples from the distribution. In the extended conditional sampling model, the algorithm is also allowed to obtain samples from the restriction of the original distribution on subsets of {1, . . . , n}. In 2015, Canonne, Diakonikolas, Gouleakis and Rubinfeld unified several previous results, and showed that for any property of distributions satisfying a “decomposability” criterion, there exists an algorithm (in the basic model) that can distinguish with high probability distributions satisfying the property from distributions that are far from it in the variation distance. We present here a more efficient yet simpler algorithm for the basic model, as well as very efficient algorithms for the conditional model, which until now was not investigated under the umbrella of decomposable properties. Additionally, we provide an algorithm for the conditional model that handles a much larger class of properties. Our core mechanism is a way of efficiently producing an interval-partition of {1, . . . , n} that satisfies a “fine-grain” quality. We show that with such a partition at hand we can directly move forward with testing individual intervals, instead of first searching for the “correct” partition of {1, . . . , n}. 1 Introduction 1.1 Historical background In most computational problems that arise from modeling real-world situations, we are required to analyze large amounts of data to decide if it has a fixed property. The amount of data involved is usually too large for reading it in its entirety, both with respect to time and storage. In such situations, it is natural to ask for algorithms that can sample points from the data and obtain a significant estimate for the property of interest. The area of property testing addresses this issue by studying algorithms that look at a small part of the data and then decide if the object that generated the data has the property or is far (according to some metric) from having the property. There has been a long line of research, especially in statistics, where the underlying object from which we obtain the data is modeled as a probability distribution. Here the algorithm is only ∗ Faculty of Computer Science, Israel Institute of Technology (Technion), Haifa, Israel. [email protected] Birkbeck, University of London, London, UK. [email protected] ‡ Faculty of Computer Science, Israel Institute of Technology (Technion), Haifa, Israel. [email protected] † 1 allowed to ask for independent samples from the distribution, and has to base its decision on them. If the support of the underlying probability distribution is large, it is not practical to approximate the entire distribution. Thus, it is natural to study this problem in the context of property testing. The specific sub-area of property testing that is dedicated to the study of distributions is called distribution testing. There, the input is a probability distribution (in this paper the domain is the set {1, 2, . . . , n}) and the objective is to distinguish whether the distribution has a certain property, such as uniformity or monotonicity, or is far in ℓ1 distance from it. See [Can15] for a survey about the realm of distribution testing. Testing properties of distributions was studied by Batu et al in [BFR+ 00], where they gave a sublinear query algorithm for testing closeness of distributions supported over the set {1, 2, . . . , n}. They extended the idea of collision counting, which was implicitly used for uniformity testing in the work of Goldreich and Ron ([GR00]). Consequently, various properties of probability distributions were studied, like testing identity with a known distribution ([BFF+ 01, VV14, ADK15, DK16]), testing independence of a distribution over a product space ([BFF+ 01, ADK15]), and testing k-wise independence ([AAK+ 07]). In recent years, distribution testing has been extended beyond the classical model. A new model called the conditional sampling model was introduced. It first appeared independently in [CRS15] and [CFGM13]. In the conditional sampling model, the algorithm queries the input distribution µ with a set S ⊆ {1, 2, . . . , n}, and gets an index sampled according to µ conditioned on the set S. Notice that if S = {1, 2, . . . , n}, then this is exactly like in the standard model. The conditional sampling model allows adaptive querying of µ, since we can choose the set S based on the indexes sampled until now. Chakraborty et al ([CFGM13]) and Canonne et al ([CRS15]) showed that testing uniformity can be done with a number of queries not depending on n (the latter presenting an optimal test), and investigated the testing of other properties of distributions. In [CFGM13], it is also shown that uniformity can be tested with poly(log n) conditional samples by a non-adaptive algorithm. In this work, we study the distribution testing problem in the standard (unconditional) sampling model, as well as in the conditional model. A line of work which is central to our paper, is the testing of distributions for structure. The objective is to test whether a given distribution has some structural properties like being monotone ([BKR04]), being a k-histogram ([ILR12, DK16]), or being log-concave ([ADK15]). Canonne et al ([CDGR15]) unified these results to show that if a property of distributions has certain structural characteristics, then membership in the property can be tested efficiently using samples from the distribution. More precisely, they introduced the notion of L-decomposable distributions as a way to unify various algorithms for testing distributions for structure. Informally, an L-decomposable distribution µ supported over {1, 2, . . . , n} is one that has an interval partition I of {1, 2, . . . , n} of size bounded by L, such that for every interval I, either the weight of µ on it is small or the distribution over the interval is close to uniform. A property C of distributions is L-decomposable if every distribution µ ∈ C is L-decomposable (L is allowed to depend on n). This generalizes various properties of distributions like being monotone, unimodal, log-concave etc. In this setting, their result for a set of distributions C supported over {1, 2, . . . , n} translates to the following: if every distribution µ from C is L-decomposable, then there is an efficient algorithm for testing whether a given distribution belongs to the property C. To achieve their results, Canonne et al ([CDGR15]) show that if a distribution µ supported over [n] is L-decomposable, then it is O(L log n)-decomposable where the intervals are of the form [j2i + 1, (j + 1)2i ]. This presents a natural approach of computing the interval partition in a 2 recursive manner, by bisecting an interval if it has a large probability weight and is not close to uniform. Once they get an interval partition, they learn the “flattening” of the distribution over this partition, and check if this distribution is close to the property C. The term “flattening” refers to the distribution resulting from making µ conditioned on any interval of the partition to be uniform. When applied to a partition corresponding to a decomposition of the distribution, the learned flattening is also close to the original distribution. Because of this, in the case where there is a promise that µ is L-decomposable, the above can be viewed as a learning algorithm, where they obtain an explicit distribution that is close to µ. Without the promise it can be viewed as an agnostic learning algorithm. For further elaboration of this connection see [Dia16]. 1.2 Results and techniques In this paper, we extend the body of knowledge about testing L-decomposable properties. We improve upon the previously known bound on the sample complexity, and give much better bounds when conditional samples are allowed. Additionally, for the conditional model, we provide a test for a broader family of properties, that we call atlas-characterizable properties. Our approach differs from that of [CDGR15] in the manner in which we compute the interval partition. We show that a partition where most intervals that are not singletons have small probability weight is sufficient to learn the distribution µ, even though it is not the original Ldecomposition of µ. We show that if a distribution µ is L-decomposable, then the “flattening” of µ with respect to a this partition is close to µ. It turns out that such a partition can be obtained in “one shot” without resorting to a recursive search procedure. We obtain a partition as above using a method of partition pulling that we develop here. Informally, a pulled partition is obtained by sampling indexes from µ, and taking the partition induced by the samples in the following way: each sampled index is a singleton interval, and the rest of the partition is composed of the maximal intervals between sampled indexes. Apart from the obvious simplicity of this procedure, it also has the advantage of providing a partition with a significantly smaller number of intervals, linear in L for a fixed ǫ, and with no dependency on n unless L itself depends on it. This makes our algorithm more efficient in query complexity than the one of [CDGR15] in the unconditional sampling model, and leads to a dramatically small sampling complexity in the (adaptive) conditional model. Another feature of the partition pulling method is that it provides a partition with small weight intervals also when the distribution is not L-decomposable. This allows us to use the partition in a different manner later on, in the algorithm for testing atlas characterizable properties using conditional samples. The main common ground between our approach for L-decomposable properties and that of [CDGR15] is the method of testing by implicit learning, as defined formally in [DLM+ 07] (see [Ser10]). In particular, the results also provide a means to learn a distribution close to µ if µ satisfies the tested property. We also provide a test under the conditional query model for the extended class of atlas characterizable properties that we define below, which generalizes both decomposable properties and symmetric properties. A learning algorithm for this class is not provided; only an “atlas” of the input distribution rather than the distribution itself √ is learned. Our result for unconditional testing (Theorem 7.4) gives a nL/poly(ǫ) query algorithm in the standard (unconditional) sampling model for testing an L-decomposable property of distributions. Our method of finding a good partition for µ using pulled partitions, that we explained above, avoids the log n factor present in Theorem 3.3 of [CDGR15]. We also avoid the additional O(L2 ) 3 additive term present there. The same method enables us to extend our results to the conditional query model, which we present for both adaptive and non-adaptive algorithms. Table 1 summarizes our results and compares them with known lower bounds1 . Table 1: Summary of our results L-decomposable Unconditional Adaptive conditional Non-adaptive conditional k-characterized by atlases Adaptive conditional 2 Result (testing and learning) √ nL/poly(ǫ) L/poly(ǫ) L · poly(log n, 1/ǫ) (testing) k · poly(log n, 1/ǫ) Known lower bound √ Ω( n/ǫ2 ) for L = 1 [Pan08] Ω(L) for some fixed ǫ [CFGM13] Ω(log n) for L = 1 and some fixed ǫ [ACK15] √ Ω( log log n) for k = 1, and some fixed ǫ [CFGM13] Preliminaries We denote the set {1, . . . , n} by [n]. We study the problem of testing properties of probability distributions supported over [n], when given samples from the distribution. For two distributions µ and χ, we say that µ is ǫ-far from P χ if they are far in the ℓ1 norm, that is, d(µ, χ) = i∈[n] |µ(i) − χ(i)| > ǫ. For a property of distributions C, we say that µ is ǫ-far from C if for all χ ∈ C, d(µ, χ) > ǫ. Outside the ℓ1 norm between distributions, we also use the ℓ∞ norm, kµ−χk∞ = maxi∈[n] |µ(i)− χ(i)|, and the following measure for uniformity. Definition 2.1. For a distribution µ over a domain I, we define the bias of µ to be bias(µ) = maxi∈I µ(i)/ mini∈I µ(i) − 1. The following observation is easy and will be used implicitly throughout. Observation 2.2. For any two distributions µ and χ over a domain I of size m, d(µ, χ) ≤ 1 mkµ − χk∞ . Also, kµ − UI k∞ ≤ m bias(µ), where UI denotes the uniform distribution over I. Proof. Follows from the definitions. We study the problem, both in the standard model, where the algorithm is given indexes sampled from the distribution, as well as in the model of conditional samples. The conditional model was first studied in the independent works of Chakraborty et al ([CFGM13]) and Canonne et al ([CRS15]). We first give the definition of a conditional oracle for a distribution µ. 1 The lower bounds for unconditional and non-adaptive conditional testing of L-decomposable properties with L = 1 are exactly the lower bounds for uniformity testing; the lower bound for adaptive conditional testing follows easily from the proved existence of properties that have no sub-linear complexity adaptive conditional tests; finally, the lower bound for properties k-characterized by atlases with k = 1 is just a bound for a symmetric property constructed there. About the last one, we conjecture that there exist properties with much higher lower bounds. 4 Definition 2.3 (Conditional oracle). A conditional oracle to a distribution µ supportedP over [n] is a black-box that takes as input a set A ⊆ [n], samples a point i ∈ A with probability µ(i)/ j∈A µ(j), and returns i. If µ(j) = 0 for all j ∈ A, then it chooses i ∈ A uniformly at random. Remark. The behaviour of the conditional oracle on sets A with µ(A) = 0 is as per the model of Chakraborty et al [CFGM13]. However, upper bounds in this model also hold in the model of Canonne et al [CRS15], and most lower bounds can be easily converted to it. Now we define conditional distribution testing algorithms. We will define and analyze both adaptive and non-adaptive conditional testing algorithms. Definition 2.4. An adaptive conditional distribution testing algorithm for a property of distributions C, with parameters ǫ, δ > 0, and n ∈ N, with query complexity q(ǫ, δ, n), is a randomized algorithm with access to a conditional oracle of a distribution µ with the following properties: • For each i ∈ [q], at the ith phase, the algorithm generates a set Ai ⊆ [n], based on j1 , j2 , · · · , ji−1 and its internal coin tosses, and calls the conditional oracle with Ai to receive an element ji , drawn independently of j1 , j2 , · · · , ji−1 . • Based on the received elements j1 , j2 , · · · , jq and its internal coin tosses, the algorithm accepts or rejects the distribution µ. If µ ∈ C, then the algorithm accepts with probability at least 1 − δ, and if µ is ǫ-far from C, then the algorithm rejects with probability at least 1 − δ. Definition 2.5. A non-adaptive conditional distribution testing algorithm for a property of distributions C, with parameters ǫ, δ > 0, and n ∈ N, with query complexity q(ǫ, δ, n), is a randomized algorithm with access to a conditional oracle of a distribution µ with the following properties: • The algorithm chooses sets A1 , . . . , Aq (not necessarily distinct) based on its internal coin tosses, and then queries the conditional oracle to respectively obtain j1 , . . . , jq . • Based on the received elements j1 , . . . , jq and its internal coin tosses, the algorithm accepts or rejects the distribution µ. If µ ∈ C, then the algorithm accepts with probability at least 1 − δ, and if µ is ǫ-far from C, then the algorithm rejects with probability at least 1 − δ. 2.1 Large deviation bounds The following large deviation bounds will be used in the analysis of our algorithms through the rest of the paper. Lemma 2.6 (Chernoff P bounds). Let X1 , X2 , . . . , Xm be independent random variables taking values in {0, 1}. Let X = i∈[m] Xi . Then for any δ ∈ (0, 1], we have the following bounds.   2 −δ E[X] . 1. Pr[X > (1 + δ)E[X]] ≤ exp 3 2. Pr[X < (1 − δ)E[X]] ≤ exp  −δ2 E[X] 2  . 5 When δ ≥ 1, we have Pr[X ≥ (1 + δ)E[X]] < exp( −δE[X] ). 3 Lemma 2.7 (Hoeffding bounds [Hoe]). LetP X1 , X2 , . . . , Xm be independent random variables such   1 − E[X]| > ǫ ≤ 2 exp −2mǫ2 X . Then Pr |X that 0 ≤ Xi ≤ 1 for i ∈ [m], and let X = m i∈[m] i 2.2 Basic distribution procedures The following is a folklore result about learning any distribution supported over [n], that we prove here for completeness. Lemma 2.8 (Folklore). Let µ be a distribution supported over [n]. Using n+log(2/δ) unconditional 2ǫ2 ′ samples from µ, we can obtain an explicit distribution µ supported on [n] such that, with probability at least 1 − δ, d(µ, µ′ ) ≤ ǫ. samples from µ, and for each i ∈ [n], let mi be the number of times i Proof. Take m = n+log(2/δ) 2ǫ2 was sampled. Define µ′ (i) = mi /m. Now, we show that maxS⊆[n] |µ(S) − µ′ (S)| ≤ ǫ/2. The lemma follows from this since the ℓ1 distance is equal to twice this amount. For any set S ⊆ [n], let X1 , X2 , . . . , Xm be random variables such that Xj = 1 if the j th sample 1 P was in S, and otherwise Xj = 0. Let X = m j∈[m] Xj . Then, X = µ′ (S) and E[X] = µ(S). 2 By Lemma 2.7, Pr[|X − E[X]| > ǫ/2] ≤ 2e−2mǫ . Substituting for m, we get that Pr[|µ′ (S) − µ(S)| > ǫ/2] ≤ 2e−n−log(2/δ) . Taking a union bound over all sets, with probability at least 1 − δ, |µ′ (S) − µ(S)| ≤ ǫ/2 for every S ⊆ [n]. Therefore, d(µ, µ′ ) ≤ ǫ. We also have the following simple lemma about learning a distribution in ℓ∞ distance. Lemma 2.9. Let µ be a distribution supported over [n]. Using log(2n/δ) unconditional samples from 2ǫ2 µ, we can obtain an explicit distribution µ′ supported on [n] such that, with probability at least 1− δ, kµ − µ′ k∞ ≤ ǫ. samples from µ, and for each i ∈ [n], let mi be the number of times i Proof. Take m = log(2n/δ) 2ǫ2 was sampled. For each i ∈ [n], define µ′ (i) = mi /m. th sample For an index i ∈ [n], let X1 , X2 , . . . , X m be random variables such that Xj = 1 if the j P 1 ′ is i, and otherwise Xj = 0. Let X = m j∈[m] Xj . Then X = µ (i) and E[X] = µ(i). By Lemma 2 2.7, Pr[|X − E[X]| > ǫ] ≤ 2e−2mǫ . Substituting for m, we get that Pr[|µ(i) − µ′ (i)| > ǫ] ≤ δ/n. By a union bound over [n], with probability at least 1 − δ, |µ(i) − µ′ (i)| ≤ ǫ for every i ∈ [n]. 3 Fine partitions and how to pull them We define the notion of η-fine partitions of a distribution µ supported over [n], which are central to all our algorithms. Definition 3.1 (η-fine interval partition). Given a distribution µ over [n], an η-fine interval partition of µ is an interval-partition I = (I1 , I2 , . . . , Ir ) of [n] such that for all j ∈ [r], µ(Ij ) ≤ η, excepting the case |Ij | = 1. The length |I| of an interval partition I is the number of intervals in it. 6 Algorithm 1: Pulling an η-fine partition Input: Distribution µ supported over [n], parameters η > 0 (fineness) and δ > 0 (error probability)   3 3 1 Take m = η log ηδ unconditional samples from µ 2 3 4 5 6 7 Arrange the indices sampled in increasing order i1 < i2 < · · · < ir without repetition and set i0 = 0 for each j ∈ [r] do if ij > ij−1 + 1 then add the interval {ij−1 + 1, . . . , ij − 1} to I Add the singleton interval {ij } to I if ir < n then add the interval {ir + 1, . . . , n} to I return I The following Algorithm 1 is the pulling mechanism. The idea is to take independent unconditional samples from µ, make them into singleton intervals in our interval-partition I, and then take the intervals between these samples as the remaining intervals in I. Lemma 3.2. Let µ be a distribution that is supported over [n], and η, δ > 0, and suppose that these are fed to Algorithm 1. Then, with probability at least 1− δ, the  set  of intervals I returned 1 1 by Algorithm 1 is an η-fine interval partition of µ of length O η log ηδ . Proof. Let I the set of intervals returned by Algorithm 1. The guarantee on the length of I follows from the number of samples taken in Step 1, noting that |I| ≤ 2r − 1 = O(m). Let J be a maximal set of pairwise disjoint minimal intervals I in [n], such that µ(I) ≥ η/3 for every interval I ∈ J . Note that every i for which µ(i) ≥ η/3 necessarily appears as a singleton interval {i} ∈ J . Also clearly |J | ≤ 3/η. We shall first show that if an interval I ′ is such that µ(I ′ ) ≥ η, then it fully contains some interval I ∈ J . Then, we shall show that, with probability at least 1 − δ, the samples taken in Step 1 include an index from every interval I ∈ J . By Steps 2 to 6 of the algorithm and the above, this implies the statement of the lemma. Let I ′ be an interval such that µ(I ′ ) ≥ η, and assume on the contrary that it contains no interval from J . Clearly it may intersect without containing at most two intervals Il , Ir ∈ J . Also, µ(I ′ ∩ Il ) < η/3 because otherwise we could have replaced Il with I ′ ∩ Il in J , and the same holds for µ(I ′ ∩ Ir ). But this means that µ(I \ (Il ∪ Ir )) > η/3, and so we could have added I \ (Il ∪ Ir ) to J , again a contradiction. Let I ∈ J . The probability that an index from I is not sampled is at most (1−η/3)3 log(3/ηδ)/η ≤ δη/3. By a union bound over all I ∈ J , with probability at least 1 − δ the samples taken in Step 1 include an index from every interval in J . The following is a definition of a variation of a fine partition, where we allow some intervals of small total weight to violate the original requirements. Definition 3.3 ((η, γ)-fine partitions). Given a distributionPµ over [n], an (η, γ)-fine interval partition is an interval partition I = (I1 , I2 , . . . , Ir ) such that I∈HI µ(I) ≤ γ, where HI is the set of violating intervals {I ∈ I : µ(I) > η, |I| > 1}. 7 In our applications, γ will be larger than η by a factor of L, which would allow us through the following Algorithm 2 to avoid having additional log L factors in our expressions for the unconditional and the adaptive tests. Algorithm 2: Pulling an (η, γ)-fine partition Input: Distribution µ supported over [n], parameters η, γ > 0 (fineness) and δ > 0 (error probability)   3 5 1 Take m = η log γδ unconditional samples from µ 2 3 Perform Step 2 through Step 6 of Algorithm 1. return I Lemma 3.4. Let µ be a distribution that is supported over [n], and γ, η, δ > 0, and suppose that these are fed to Algorithm 2. Then, with probability at least 1 − δ, the set  ofintervals I returned 1 1 . by Algorithm 2 is an (η, γ)-fine interval partition of µ of length O η log γδ Proof. Let I the set of intervals returned by Algorithm 2. The guarantee on the length of I follows from the number of samples taken in Step 1. As in the proof of Lemma 3.2, Let J be a maximal set of pairwise disjoint minimal intervals I in [n], such that µ(I) ≥ η/3Sfor every interval I ∈ J . Here, also define the set J ′ to be the set of maximal intervals in [n] \ I∈J I. Note now that J ∪ J ′ is an interval partition of [n]. Note also that between every two consecutive intervals of J ′ lies an interval of J . Finally, since J is maximal, all intervals in J ′ are of weights less than η/3. Recalling the definition H = {I ∈ I : µ(I) > η, |I| > 1}, as in the proof of Lemma 1 every I ′ ∈ H must fully contain an interval from J from which no point was sampled. Moreover, I ′ may not fully contain intervals from J from which any points were sampled. Note furthermore that the weight of such an I ′ is not more than 5 times the total weight of the intervals in J that it fully contains. To see this, recall that the at most two intervals from J that intersect I ′ without containing it have intersections of weight not more than η/3. Also, there may be the intervals of J ′ intersecting I ′ , each of weight at most η/3. However, because there is an interval J between any two consecutive intervals of J ′ , the number of intervals from J ′ intersecting I ′ is at most 1 more than the number of intervals of J fully contained in I ′ . Thus the number of intersecting intervals from J ∪ J ′ is not more than 5 times the number of fully contained intervals from J , and together with their weight bounds we get the bound on µ(I ′ ). Let I ∈ J . The probability that an index from I is not sampled is at most (1−η/3)3 log(5/γδ)/η ≤ δγ/5. By applying the Markov bound over all I ∈ J (along with their weights), with probability at least 1 − δ the samples taken in Step 1 include an index from every interval P in J but at most a subset of them of total weight at most γ/5. By the above this means that I∈H µ(I) ≤ γ. 4 Handling decomposable distributions The notion of L-decomposable distributions was defined and studied in [CDGR15]. They showed that a large class of properties, such as monotonicity and log-concavity, are L-decomposable. We now formally define L-decomposable distributions and properties, as given in [CDGR15]. 8 Definition 4.1 ((γ, L)-decomposable distributions [CDGR15]). For an integer L, a distribution µ supported over [n] is (γ, L)-decomposable, if there exists an interval partition I = (I1 , I2 , . . . , Iℓ ) of [n], where ℓ ≤ L, such that for all j ∈ [ℓ], at least one of the following holds. 1. µ(Ij ) ≤ γ L. 2. maxi∈Ij µ(i) ≤ (1 + γ) mini∈Ij µ(i). The second condition in the definition of a (γ, L)-decomposable distribution is identical to saying that bias(µ ↾Ij ) ≤ γ. An L-decomposable property is now defined in terms of all its members being decomposable distributions. Definition 4.2 (L-decomposable properties, [CDGR15]). For a function L : (0, 1] × N → N, we say that a property of distributions C is L-decomposable, if for every γ > 0, and µ ∈ C supported over [n], µ is (γ, L(γ, n))-decomposable. Recall that part of the algorithm for learning such distributions is finding (through pulling) what we referred to as a fine partition. Such a partition may still have intervals where the conditional distribution over them is far from uniform. However, we shall show that for L-decomposable distributions, the total weight of such “bad” intervals is not very high. The next lemma shows that every fine partition of an (γ, L)-decomposable distribution has only a small weight concentrated on “non-uniform” intervals and thus it will be sufficient to deal with the “uniform” intervals. Lemma 4.3. Let µ be a distribution supported over [n] which is (γ, L)-decomposable. For every γ/L-fine interval partition I ′ = (I1′ , I2′ , . . . , Ir′ ) of µ, the following holds. X µ(Ij′ ) ≤ 2γ. j∈[r]:bias(µ↾I ′ )>γ j Proof. Let I = (I1 , I2 , . . . , Iℓ ) be the L-decomposition of µ, where ℓ ≤ L. Let I ′ = (I1′ , I2′ , . . . , Ir′ ) be an interval partition of [n] such that for all j ∈ [r], µ(Ij′ ) ≤ γ/L or |Ij′ | = 1. Any interval Ij′ for which bias(µ ↾Ij′ ) > γ, is either completely inside an interval Ik such that µ(Ik ) ≤ γ/L, or intersects more than one interval (and in particular |Ij′ | > 1). There are at most L − 1 intervals in I ′ that intersect more than one interval in I. The sum of the weights of all such intervals is at most γ. For any interval Ik of I such that µ(Ik ) ≤ γ/L, the sum of the weights of intervals from I ′ that lie completely inside Ik is at most γ/L. Thus, the total weight of all such intervals is bounded by γ. Therefore, the sum of the weights of intervals Ij′ such that bias(µ ↾Ij′ ) > γ is at most 2γ. In order to get better bounds, we will use the counterpart of this lemma for the more general (two-parameter) notion of a fine partition. Lemma 4.4. Let µ be a distribution supported over [n] which is (γ, L)-decomposable. For every (γ/L, γ)-fine interval partition I ′ = (I1′ , I2′ , . . . , Ir′ ) of µ, the following holds. X µ(Ij′ ) ≤ 3γ. j∈[r]:bias(µ↾I ′ )>γ j 9 Proof. Let I = (I1 , I2 , . . . , Iℓ ) be the L-decomposition of µ, where ℓ ≤ L. Let I ′ = (I1′ , I2′ , . . . , Ir′ ) be an interval partition of [n] such that for a set HI of total weight at most γ, for all Ij′ ∈ I \ HI , µ(Ij′ ) ≤ γ/L or |Ij′ | = 1. Exactly as in the proof of Lemma 4.3, the total weight of intervals Ij′ ∈ I \ HI for which bias(µ ↾Ij′ ) > γ is at most 2γ. In the worst case, all intervals in HI are also such that bias(µ ↾Ij′ ) > γ, adding at most γ to the total weight of such intervals. As previously mentioned, we are not learning the actual distribution but a “flattening” thereof. We next formally define the flattening of a distribution µ with respect to an interval partition I. Afterwards we shall describe its advantages and how it can be learned. Definition 4.5. Given a distribution µ supported over [n] and a partition I = (I1 , I2 , . . . , Iℓ ), of [n] to intervals, the flattening of µ with respect to I is a distribution µI , supported over [n], such that for i ∈ Ij , µI (i) = µ(Ij )/|Ij |. The following lemma shows that the flattening of any distribution µ, with respect to any interval partition that has only small weight on intervals far from uniform, is close to µ. Lemma 4.6. Let µ be aPdistribution supported on [n], and let I = (I1 , I2 , . . . , Ir ) be an interval partition of µ such that j∈[r]:d(µ↾I ,UI )≥γ µ(Ij ) ≤ η. Then d(µ, µI ) ≤ γ + 2η. j j Proof. We split the sum d(µ, µI ) into parts, one for Ij such that d(µ ↾Ij , UIj ) ≤ γ, and one for the remaining intervals. For Ij s such that d(µ ↾Ij , UIj ) ≤ γ, we have X i∈Ij µ(i) − X µ(Ij ) 1 = µ(Ij ) µ ↾Ij (i) − = µ(Ij )d(µ ↾Ij , UIj ) ≤ γµ(Ij ). |Ij | |Ij | (1) i∈Ij For Ij such that d(µ ↾Ij , UIj ) > γ, we have X i∈Ij µ(i) − X 1 µ(Ij ) = µ(Ij ) µ ↾Ij (i) − ≤ 2µ(Ij ) |Ij | |Ij | (2) i∈Ij We know that the sum of µ(Ij ) over all Ij such that d(µ ↾Ij , UIj ) ≥ γ is at most η. Using Equations 2 and 1, and summing up over all the sets Ij ∈ I, the lemma follows. The good thing about a flattening (for an interval partition of small length) is that it can be efficiently learned. For this we first make a technical definition and note some trivial observations: Definition 4.7 (coarsening). Given µ and I, where |I| = ℓ, we define the coarsening of µ according to I the distribution µ̂I over [ℓ] as by µ̂I (j) = µ(Ij ) for all j ∈ [ℓ]. Observation 4.8. Given a distribution µ̂I over [ℓ], define µI over [n] by µ(i) = µ̂I (ji )/|Iji |, where ji is the index satisfying i ∈ Iji . This is a distribution, and for any two distributions µ̂I and χ̂I we have d(µI , χI ) = d(µ̂I , χ̂I ). Moreover, if µ̂I is a coarsening of a distribution µ over [n], then µI is the respective flattening of µ. Proof. All of this follows immediately from the definitions. 10 The following lemma shows how learning can be achieved. We will ultimately use this in conjunction with Lemma 4.6 as a means to learn a whole distribution through its flattening. Lemma 4.9. Given a distribution µ supported over [n] and an interval partition I = (I1 , I2 , . . . , Iℓ ), , we can obtain an explicit distribution µ′I , supported over [n], such that, with using 2(ℓ+log(2/δ)) ǫ2 probability at least 1 − δ, d(µI , µ′I ) ≤ ǫ. Proof. First, note that an unconditional sample from µ̂I can be simulated using one unconditional sample from µ. To obtain it, take the index i sampled from µ, and set j to be the index for which i ∈ Ij . Using Lemma 2.8, we can now obtain a distribution µ̂′I , supported over [ℓ], such that with probability at least 1 − δ, d(µ̂I , µ̂′I ) ≤ ǫ. To finish, we construct and output µ′I as per Observation 4.8. 5 Weakly tolerant interval uniformity tests To unify our treatment of learning and testing with respect to L-decomposable properties to all three models (unconditional, adaptive-condition and non-adaptive-conditional), we first define what it means to test a distribution µ for uniformity over an interval I ⊆ [n]. The following definition is technical in nature, but it is what we need to be used as a building block for our learning and testing algorithms. Definition 5.1 (weakly tolerant interval tester). A weakly tolerant interval tester is an algorithm T that takes as input a distribution µ over [n], an interval I ⊆ [n], a maximum size parameter m, a minimum weight parameter γ, an approximation parameter ǫ and an error parameter δ, and satisfies the following. 1. If |I| ≤ m, µ(I) ≥ γ, and bias(µ ↾I ) ≤ ǫ/100, then the algorithm accepts with probability at least 1 − δ. 2. If |I| ≤ m, µ(I) ≥ γ, and d(µ ↾I , UI ) > ǫ, then the algorithm rejects with probability at least 1 − δ. In all other cases, the algorithm may accept or reject with arbitrary probability. For our purposes we will use three weakly tolerant interval testers, one for each model. First, a tester for uniformity which uses unconditional samples, a version of which has already appeared implicitly in [GR00]. We state below the tester with the best dependence on n and ǫ. We first state it in its original form, where I is the whole of [n], implying that m = n and γ = 1, and δ = 1/3. Lemma 5.2 ([Pan08]). For the input (µ, [n], n, 1, ǫ, 1/3), there is a weakly tolerant interval tester √ using O( n/ǫ2 ) unconditional samples from µ. The needed adaptation to our purpose is straightforward. Lemma 5.3. For the input (µ, I, m, γ, ǫ, δ), there is a weakly tolerant interval tester which uses √ O( m log(1/δ)/γǫ2 ) unconditional samples from µ. 11 Proof. To adapt the tester of Lemma 5.2 to the general m and γ, we just take samples according to µ and keep from them those samples lie in I. This simulates samples from µ ↾I , over which √ we employ the original tester. This gives a tester using O( m/γǫ2 ) unconditional samples and providing an error parameter of, say, δ = 2/5 (the extra error is due to the probability of not getting enough samples from I even when µ(I) ≥ γ). To move to a general δ, we repeat this O(1/δ) times and take the majority vote. Next, a tester that uses adaptive conditional samples. For this we use the following tester from [CRS15] (see also [CFGM13]). Its original statement does not have the weakly tolerance (acceptance for small bias) guarantee, but it is easy to see that the proof there works for the stronger assertion. This time we skip the question of how to adapt the original algorithm from I = [n] and δ = 2/3 to the general parameters here. This is since γ does not matter (due to using adaptive conditional samples), the query complexity is independent of the domain size to begin with, and the move to a general δ > 0 is by standard amplification. Lemma 5.4 ([CRS15], see also [CFGM13]). For the input (µ, I, m, γ, ǫ, δ), there is a weakly tolerant interval tester that adaptively takes log(1/δ)poly(log(1/ǫ))/ǫ2 conditional samples from µ. Finally, a tester that uses non-adaptive conditional samples. For this to work, it is also very important that the queries do not depend on I as well (but only on n and γ). We just state here the lemma, the algorithm itself is presented and analyzed in Section 8. Lemma 5.5. For the input (µ, I, m, γ, ǫ, δ), there is a weakly tolerant interval tester that nonadaptively takes poly(log n, 1/ǫ) log(1/δ)/γ conditional samples from µ, in a manner independent of the interval I. 6 Assessing an interval partition Through either Lemma 3.2 or Lemma 3.4 we know how to construct a fine partition, and then through either Lemma 4.3 or Lemma 4.4 respectively we know that if µ is decomposable, then most of the weight is concentrated on intervals with a small bias. However, eventually we would like a test that works for decomposable and non-decomposable distributions alike. For this we need a way to asses an interval partition as to whether it is indeed suitable for learning a distribution. This is done through a weighted sampling of intervals, for which we employ a weakly tolerant tester, The following is the formal description, given as Algorithm 3. Algorithm 3: Assessing a partition Input: A distribution µ supported over [n], parameters c, r, an interval partition I satisfying |I| ≤ r, parameters ǫ, δ > 0, a weakly tolerant interval uniformity tester T taking input values (µ, I, m, γ, ǫ, δ). 1 for s = 20 log(1/δ)/ǫ times do 2 Take an unconditional sample from µ and let I ∈ I be the interval that contains it 3 Use the tester T with input values (µ, I, n/c, ǫ/r, ǫ, δ/2s) 4 if test rejects then add I to B 5 if * then |B| > 4ǫsreject else *accept 12 To analyze it, first, for a fine interval partition, we bound the total weight of intervals where the weakly tolerant tester is not guaranteed a small error probability; recall that T as used in Step 3 guarantees a correct output only for an interval I satisfying µ(I) ≥ ǫ/r and |I| ≤ n/r. Observation 6.1. SDefine NI = {I ∈ I : |I| > n/r or µ(I) < ǫ/r}. If I is (η, γ)-fine, where cη + γ ≤ ǫ, then µ( I∈NI I) ≤ 2ǫ. Proof. Intervals in NI must fall into at least one of the following categories. • Intervals in HI , whose total weight is bounded by γ by the definition of a fine partition. • Intervals whose weight is less than ǫ/r. Since there are at most r such intervals (since |I| ≤ r) their total weight is bounded by ǫ. • Intervals whose size is more than n/c and are not in HI . Every such interval is of weight bounded by η (by the definition of a fine partition) and clearly there are no more than c of those, giving a total weight of cη. Summing these up concludes the proof. The following “completeness” lemma states that the typical case for a fine partition of a decomposable distribution, i.e. the case where most intervals exhibit a small bias, is correctly detected. Lemma 6.2.SSuppose that I is (η, γ)-fine, where cη + γ ≤ ǫ. Define GI = {i : I : bias(µ ↾I ) ≤ ǫ/100}. If µ( I∈GI ) ≥ 1 − ǫ, then Algorithm 3 accepts with probability at least 1 − δ. Proof. Note by Observation 6.1 that the total weight of GI \ NI is at least 1 − 3ǫ. By the Chernoff bound of Lemma 2.6, with probability at least 1 − δ/2 all but at most 4ǫs of the intervals drawn in Step 2 fall into this set. Finally, note that if I as drawn in Step 2 belongs to this set, then with probability at least 1 − δ/2s the invocation of T in Step 3 will accept it, so by a union bound with probability at least 1 − δ/2 all sampled intervals from this set will be accepted. All events occur together and make the algorithm accept with probability at least 1 − δ, concluding the proof. The following “soundness” lemma states that if too much weight is concentrated on intervals where µ is far from uniform in the ℓ1 distance, then the algorithm rejects. Later we will show that this is the only situation where µ cannot be easily learned through its flattening according to I. Lemma S 6.3. Suppose that I is (η, γ)-fine, where cη + γ ≤ ǫ. Define FI = {i : I : d(µ ↾I , UI ) > ǫ}. If µ( I∈FI ) ≥ 7ǫ, then Algorithm 3 rejects with probability at least 1 − δ. Proof. Note by Observation 6.1 that the total weight of FI \ NI is at least 5ǫ. By the Chernoff bound of Lemma 2.6, with probability at least 1 − δ/2 at least 4ǫs of the intervals drawn in Step 2 fall into this set. Finally, note that if I as drawn in Step 2 belongs to this set, then with with probability at least 1 − δ/2s the invocation of T in Step 3 will reject it, so by a union bound with probability at least 1 − δ/2 all sampled intervals from this set will be rejected. All events occur together and make the algorithm reject with probability at least 1 − δ, concluding the proof. 13 Finally, we present the query complexity of the algorithm. It is presented as generally quadratic in log(1/δ), but this can be made linear easily by first using the algorithm with δ = 1/3, and then repeating it O(1/δ) times and taking the majority vote. When we use this lemma later on, both r and c will be linear in the decomposability parameter L for a fixed ǫ, and δ will be a fixed constant. Lemma 6.4. Algorithm 3 requires O(q log(1/δ)/ǫ) many samples, where q = q(n/c, ǫ/r, ǫ, δ/2s) is the number of samples that the invocation of T in Step 3 requires. In particular, Algorithm 3 can be implemented either as an unconditional sampling algorithm p taking r n/c log2 (1/δ)/poly(ǫ) many samples, an adaptive conditional sampling algorithm taking r log2 (1/δ)/poly(ǫ) many samples, or a non-adaptive conditional sampling algorithm taking r log2 (1/δ)poly(log n, 1/ǫ) many samples. Proof. A single (unconditional) sample is taken each time Step 2 is reached, and all other samples are taken by the invocation of T in Step 3. This makes the total number of samples to be s(q + 1) = O(q log(1/δ)/ǫ). The bound for each individual sampling model follows by plugging in Lemma 5.3, Lemma 5.4 and Lemma 5.5 respectively. For the last one it is important that the tester makes its queries completely independently of I, as otherwise the algorithm would not have been non-adaptive. 7 Learning and testing decomposable distributions and properties Here we finally put things together to produce a learning algorithm for L-decomposable distribution. This algorithm is not only guaranteed to learn with high probability a distribution that is decomposable, but is also guaranteed with high probability to not produce a wrong output for any distribution (though it may plainly reject a distribution that is not decomposable). This is presented in Algorithm 4. We present it with a fixed error probability 2/3 because this is what we use later on, but it is not hard to move to a general δ. Algorithm 4: Learning an L-decomposable distribution Input: Distribution µ supported over [n], parameters L (decomposability), ǫ > 0 (accuracy), a weakly tolerant interval uniformity tester T taking input values (µ, I, m, γ, ǫ, δ) 1 Use Algorithm 2 with input values (µ, ǫ/2000L, ǫ/2000, 1/9) to obtain a partition I with |I| ≤ r = 105 L log(1/ǫ)/ǫ 2 Use Algorithm 3 with input values (µ, L, r, I, ǫ/20, 1/9, T) 3 if Algorithm 3 rejected then reject 4 Use Lemma 4.9 with values (µ, I, ǫ/10, 1/9) to obtain µ′I 5 return µ′I First we show completeness, that the algorithm will be successful for decomposable distributions. Lemma 7.1. If µ is (ǫ/2000, L)-decomposable, then with probability at least 2/3 Algorithm 4 produces a distribution µ′ so that d(µ, µ′ ) ≤ ǫ. Proof. By Lemma 3.4, withPprobability at least 8/9 the partition I is (ǫ/2000L, ǫ/2000)-fine, which means by Lemma 4.4 that j∈[r]:bias(µ↾ ′ )>ǫ/2000 µ(Ij′ ) ≤ 3ǫ/2000. When this occurs, by Lemma 6.2 I j with probability at least 8/9 Algorithm 3 will accept and so the algorithm will move past Step 3. 14 In this situation, in particular by Lemma 4.6 we have that d(µI , µ) ≤ 15ǫ/20 (in fact this can be bounded much smaller here), and with probability at least 8/9 (by Lemma 4.9) Step 4 provides a distribution that is ǫ/10-close to µI and hence ǫ-close to µ. Next we show soundness, that the algorithm will with high probability not mislead about the distribution, whether it is decomposable or not. Lemma 7.2. For any µ, the probability that Algorithm 4 produces (without rejecting) a distribution µ′ for which d(µ, µ′ ) > ǫ is bounded by δ. Proof. Consider the interval partition I. By Lemma 3.4, with P probability at least 8/9 it is (ǫ/2000L, ǫ/2000)-fine. When this happens, if I is such that j:d(µ↾I ,UI ) µ(Ij ) > 7ǫ/20, then j j by Lemma 6.3 with probability at least 8/9 the algorithm will reject in Step 3, and we are done (recall that here a rejection is an allowable P outcome). On the other hand, if I is such that j:d(µ↾I ,UI ) µ(Ij ) ≤ 7ǫ/20, then by Lemma 4.6 we have that j j d(µI , µ) ≤ 15ǫ/20, and with probability at least 8/9 (by Lemma 4.9) Step 4 provides a distribution that is ǫ/10-close to µI and hence ǫ-close to µ, which is also an allowable outcome. And finally, we plug in the sample complexity bounds. Lemma 7.3. Algorithm 4 requires O(L log(1/ǫ)/ǫ + q/ǫ + L log(1/ǫ)/ǫ3 ) many samples, where the value q = q(n/L, ǫ2 /105 L log(1/ǫ), ǫ/20, 2000/ǫ) is a bound on the number of samples that each invocation of T inside Algorithm 3 requires. In particular, Algorithm 4 can be implemented either as an unconditional sampling algorithm √ taking nL/poly(ǫ) many samples, an adaptive conditional sampling algorithm taking L/poly(ǫ) many samples, or a non-adaptive conditional sampling algorithm taking Lpoly(log n, 1/ǫ) many samples. Proof. The three summands in the general expression follow respectively from the sample complexity calculations of Lemma 3.4 for Step 1, Lemma 6.4 for Step 2, and Lemma 4.9 for Step 4 respectively. Also note that all samples outside Step 2 are unconditional. The bound for each individual sampling model follows from the respective bound stated in Lemma 6.4. Let us now summarize the above as a theorem. Theorem 7.4. Algorithm 4 is capable of learning an (ǫ/2000, L)-decomposable distribution, giving with probability at least 2/3 a distribution that is epsilon-close to it, such that for no distribution will it give as output a distribution ǫ-far from it with probability more than 1/3.√ It can be implemented either as an unconditional sampling algorithm taking nL/poly(ǫ) many samples, an adaptive conditional sampling algorithm taking L/poly(ǫ) many samples, or a nonadaptive conditional sampling algorithm taking Lpoly(log n, 1/ǫ) many samples. Proof. This follows from Lemmas 7.1, 7.2 and 7.3 respectively. Let us now move to the immediate application of the above for testing decomposable properties. The algorithm achieving this is summarized as Algorithm 5 15 Algorithm 5: Testing L-decomposable properties. Input: Distribution µ supported over [n], function L : (0, 1] × N → N (decomposability), parameter ǫ > 0 (accuracy), an L-decomposable property C of distributions, a weakly tolerant interval uniformity tester T taking input values (µ, I, m, γ, ǫ, δ). 1 Use Algorithm 4 with input values (µ, L(ǫ/4000, n), ǫ/2, T) to obtain µ′ 2 if * then Algorithm 4 accepted and µ′ is ǫ/2-close to C accept else *reject Theorem 7.5. Algorithm 5 is a test (with error probability 1/3) for the L-decomposable property C. For √ L = L(ǫ/4000, n), It can be implemented either as an unconditional sampling algorithm taking nL/poly(ǫ) many samples, an adaptive conditional sampling algorithm taking L/poly(ǫ) many samples, or a non-adaptive conditional sampling algorithm taking Lpoly(log n, 1/ǫ) many samples. Proof. The number and the nature of the samples are determined fully by the application of Algorithm 4 in Step 1, and are thus the same as in Theorem 7.4. Also by this theorem, for a distribution µ ∈ C, with probability at least 2/3 an ǫ/2-close distribution µ′ will be produced, and so it will be accepted in Step 2. Finally, if µ is ǫ-far from C, then with probability at least 2/3 Step 1 will either produce a rejection, or again produce µ′ that is ǫ/2-close to µ. In the latter case, µ′ will be ǫ/2-far from C by the triangle inequality, and so Step 2 will reject in either case. 8 A weakly tolerant tester for the non-adaptive conditional model Given a distribution µ, supported over [n], and an interval I ⊆ [n] such that µ(I) ≥ γ, we give a tester that uses non-adaptive conditional queries to µ to distinguish between the cases bias(µ ↾I ) ≤ ǫ/100 and d(µ ↾I , UI ) > ǫ, using ideas from [CFGM13]. A formal description of the test is given as Algorithm 6. It is formulated here with error probability δ = 1/3. Lemma 5.5 is obtained from this the usual way, by repeating the algorithm O(1/δ) times and taking the majority vote. We first make the observation that makes Algorithm 6 suitable for a non-adaptive setting. Observation 8.1. Algorithm 6 can be implemented using only non-adaptive conditional queries to the distribution µ, that are chosen independently of I. Proof. First, note that the algorithm samples elements from µ at three places. Initially, it samples unconditionally from µ in Step 1, and then it performs conditional samples from the sets Uk in Steps 10 and 13. In Steps 10 and 13, the samples are conditioned on sets Uk , where k depends on I. However, observe that we can sample from all sets Uk , for all 0 ≤ k ≤ log n, at the beginning, and then use just the samples from the appropriate Uk at Steps 10 and 13. This only increases the bound on the number of samples by a factor of log n. Thus we have only non-adaptive queries, all of which are made at the start of the algorithm, independently of I. The following lemma is used in Step 6 of our algorithm. Lemma 8.2. Let µ be a distribution supported over [n] and I ⊆ [n] be an interval such that µ(I) ≥ γ. Using t = 4(|I|+log(2/δ)) unconditional queries to µ, we can construct a distribution µ′ ǫ2 γ over I such that, with probability at least 1 − δ, d(µ ↾I , µ′ ) ≤ ǫ (in other cases µ′ may be arbitrary). 16 Algorithm 6: Non-adaptive weakly tolerant uniformity tester Input: Distribution µ supported over [n], interval I ⊆ [n], weight bound γ, accuracy ǫ > 0. 4(log10 n+3) 1 Sample t = elements from µ. ǫ2 γ 2 for k ∈ {0, . . . , log n} do 3 Set pk = 2−k . 4 Choose a set Uk ⊆ [n], where each i ∈ [n] is in Uk with probability pk , independently of other elements in [n]. 5 6 7 8 9 10 11 12 if |I| ≤ log10 n then Use Lemma 8.2, using the t unconditional samples from µ, to construct a distribution µ′ if * then d(µ′ , UI ) ≤ ǫ/2 accept, else * reject. else for Uk such that k ≤ log 14 15 16 17 18 |I| 2 log8 n  , and |I ∩ Uk | ≥ log8 n do Sample log3 n elements from µ ↾Uk . if the same element from I ∩ Uk has been sampled twice then reject. 2 3 n log(3 log n) ǫ2 γ Choose an index k such that 16 13  log8 n ≤ |I|pk < 4 3 log8 n. elements from µ ↾Uk , for a large constant C. Sample mk = C log if |I ∩ Uk | > 2|I|pk or the number of samples in I ∩ Uk is less than γmk /40 then reject. else Use Lemma 2.9 with the samples received from I ∩ Uk , to construct µ′ , supported on ǫ with probability at least 9/10. I ∩ Uk , such that kµ′ − µ ↾I∩Uk k∞ ≤ 80|I∩U k| 3ǫ ′ if * then kµ − UI∩Uk k∞ ≤ 80|I∩Uk | accept, else * reject. 17 unconditional samples. Let tI be the number of samples that belong Proof. Take t = 4(|I|+log(2/δ)) ǫ2 γ to I. Then, E[tI ] = tµ(I) ≥ tγ. Therefore, by Hoeffding bounds, with probability at least 1 − exp(−tµ(I)/4), tI ≥ tµ(I)/2 ≥ tγ/2. The tI samples are distributed according to µ ↾I . By the choice of t, with probability at least 1 − δ/2, tI ≥ 2(|I| + log(2/δ))/ǫ2 . Therefore, by Lemma 2.8, we can obtain a distribution µ′ , supported over I, such that with probability at least 1 − δ, d(µ ↾I , µ′ ) ≤ ǫ. If we did not obtain sufficiently many samples (either because µ(I) < γ or due to a low probability event) then we just output an arbitrary distribution supported on I. Lemma 8.3 (Completeness). If µ(I) ≥ γ and bias(µ ↾I ) ≤ ǫ/100, then Algorithm 6 accepts with probability at least 2/3. Proof. First note that if |I| ≤ log10 n, then we use Lemma 8.2 to test the distance of µ ↾I to uniform with probability at least 9/10 in Step 7. For the remaining part of the proof, we will assume that |I| > log10 n. For a set Uk chosen by the algorithm, and any i ∈ I ∩ Uk , the probability that it is sampled  2 3  µ(i) twice in Step 11 is at most log2 n µ(U . Since µ(Uk ) ≥ µ(I ∩ Uk ), the probability of sampling k) 2  3  µ(i) . By Observation 2.2 bias(µ ↾I ) ≤ ǫ/100 implies twice in Step 11 is at most log2 n µ(I∩U k) ǫ kµ ↾I −UI k∞ ≤ 100|I| , so we have ǫ  µ(I)  ǫ  µ(I)  1− ≤ µ(i) ≤ 1+ . |I| 100 |I| 100 From Equation 3 we get the following for all Uk . ǫ  |I ∩ Uk |µ(I)  ǫ  |I ∩ Uk |µ(I)  1− ≤ µ(I ∩ Uk ) ≤ 1+ . |I| 100 |I| 100 (3) (4) Therefore, the probability that the algorithm samples the same element in I ∩ Uk at Step 11 twice is bounded as follows.  3  X log3 n  µ(i) 2 log n maxi∈I∩Uk µ(i)2 ≤ |I ∩ Uk | 2 2 µ(I ∩ Uk ) µ(I ∩ Uk )2 i∈I∩Uk  3   log n 1 + ǫ/100 2 1 ≤ |I ∩ Uk | 1 − ǫ/100 2 Since |I ∩ Uk | ≥ log8 n for the k chosen in Step 9, we can bound the sum as follows.   X log3 n  µ(i) 2 1 1 + ǫ/100 2 ≤ . µ(I ∩ Uk ) 2 log2 n 1 − ǫ/100 i∈I∩Uk Therefore, with probability at least 1 − o(1), the algorithm does not reject at Step 11. To show that the algorithm accepts with probability at least 2/3 in Step 18, we proceed as follows. Combining Equations 3 and 4, we get the following.     1 1 − ǫ/100 1 + ǫ/100 1 ≤ µ ↾I∩Uk (i) ≤ |I ∩ Uk | 1 + ǫ/100 |I ∩ Uk | 1 − ǫ/100 18 ǫ . From this it follows that kµ ↾I∩Uk −UI∩Uk k∞ ≤ 40|I∩U k| We now argue that in this case, the test does not reject at Step 14, for the k chosen in Step 12. Observe that E[µ(I ∩ Uk )] ≥ pk γ. Also, the expected size of the set I ∩ Uk is pk |I|. Since the k chosen in Step 12 is such that |I|pk ≥ 32 log8 n, with probability at least 1 − exp(−O(log8 n)), pk |I|/2 ≤ |I ∩ Uk | ≤ 2pk |I| (and in particular Step 14 does not reject). Therefore from Equation 4, we get that, with probability at least 1 − exp(−O(log8 n)), µ(I ∩ Uk ) ≥ pk γ/3. Since E[µ(Uk )] = pk , we can conclude using Markov’s inequality that, with probability at least 9/10, µ(Uk ) ≤ 10pk . The expected number of samples from I∩Uk among the mk samples used in Step 17 is mk µ(I∩Uk )/µ(Uk ). Therefore, with probability at least 9/10, the expected number of samples from I ∩ Uk among the mk samples is at least mk γ/30. Therefore, with probability, at least 9/10 − o(1), at least mk γ/40 elements of I ∩ Uk are sampled, and the tester does not reject at Step 14. The indexes that are sampled in Step 13 that lie in I ∩ Uk are distributed according to µ ↾I∩Uk and we know that |I ∩ Uk | ≤ 2|I|pk ≤ 83 log8 n. Therefore, with probability at least 9/10, we get a distribution µ′ such ǫ in Step 17. that kµ′ − µ ↾I∩Uk k∞ ≤ 80|I∩U k| Therefore, the test correctly accepts in Step 18 for the k chosen in Step 12. Now we prove the soundness of the tester mentioned above. First we state a lemma from Chakraborty et al [CFGM13]. Lemma 8.4 ([CFGM13], adapted for intervals). Let µ be a distribution, and I ⊆ [n] be an interval such that d(µ ↾I , UI ) ≥ ǫ. Then the following two conditions hold. o n such that |B1 | ≥ ǫ|I|/2. 1. There exists a set B1 = i ∈ I | µ ↾I (i) < 1+ǫ/3 |I| o n log |I| , and a set Bj of cardinality at least 2. There exists an index j ∈ 3, . . . , log(1+ǫ/3) such that (1+ǫ/3)j−1 |I| ≤ µ ↾I (i) < (1+ǫ/3)j |I| ǫ2 |I| , 96(1+ǫ/3)j log |I| for all i ∈ Bj . Now we analyze the case where d(µ ↾I , UI ) > ǫ. Lemma 8.5 (Soundness). Let µ be a distribution supported on [n], and let I ⊆ [n] be an interval such that µ(I) ≥ γ. If d(µ ↾I , UI ) ≥ ǫ, then Algorithm 6 rejects with probability at least 2/3. Proof. Observe that when |I| ≤ log10 n, the algorithm rejects with probability at least 9/10 in Step 7. For the remainder of the proof, we will assume that |I| > log10 n. We analyze two cases according to the value of j given by Lemma 8.4. 1. Suppose that j > 2 is such that |Bj | ≥ ǫ2 |I| , 96(1+ǫ/3)j log |I| and (1 + ǫ/3)j ≤ log6 n. The expected number of elements from this set that is chosen in Uk is at least of k made in Step 12, we have |I|pk ≥ 2 3 ǫ2 |I|pk . 96(1+ǫ/3)j log |I| For the choice 8 log n. The probability that no index from Bj is chosen 8 n ǫ |I|/(1+ǫ) log |I| . Since (1 + ǫ/3)j ≤ log6 n, which is at most (1 − 2 log 3|I| )  2  log n this is at most exp − ǫ 144 . Therefore, with probability 1 − o(1), at least one element i is chosen from Bj . in Uk is (1 − pk )|Bj | 2 j Since |B1 | ≥ ǫ|I|/2, the probability that no element from B1 is chosen in Uk is at most (1 − pk )ǫ|I|/2 . Substituting for pk , we can conclude that, with probability 1 − o(1), at least one element i′ is chosen from the set B1 . 19 Now, µ ↾I (i) ≥ (1 + ǫ/3)µ ↾I (i′ ). Hence, µ ↾I∩Uk (i) ≥ (1 + ǫ/3)µ ↾I∩Uk (i′ ). This implies ǫ that kµ ↾I∩Uk −UI∩Uk k∞ ≥ 20|I∩U . The algorithm will reject with high probability in Step k| 18, unless it has already rejected in Step 14. 2 ǫ |I| , and (1 + 2. Now, we consider the case where j > 2 is such that |Bj | ≥ 96(1+ǫ/3) j log |I| n   o |I| ǫ/3)j > log6 n. Let k = max 0, ⌊log 4(1+ǫ/3) j log 2 n ⌋ . Then, for this value of k, pk ≥ n o n o 2 j log n 4(1+ǫ/3)j log2 n min 1, 2(1+ǫ/3) . Also, for this value of k, p ≤ min 1, . With probak |I| |I| bility at least 1 − exp(−O(log5 n)), |Uk ∩ I| ≥ log8 n, for this value of k. Furthermore, the probability that Bj ∩ Uk is empty is (1 − pk )|Bj | . Substituting the values of |Bj | and pk , we get that Pr[Bj ∩ Uk = ∅] ≤ exp(−ǫ2 log n/48). Therefore, with probability at least 1 − exp(−ǫ2 log n/48), Uk contains an element of Bj . Let i ∈ Bj ∩ Uk . Since i ∈ Bj , from Lemma 8.4 we know that µ ↾I (i) = j−1 µ(i) µ(I) ≥ (1+ǫ)j−1 . |I| µ(I) From this bound, we get that µ ↾Uk (i) ≥ (1+ǫ) |I|µ(Uk ) . The expected value of µ(Uk ) is pk . By Markov’s inequality, with probability at least 9/10, µ(Uk ) ≤ 10pk . Therefore, µ ↾Uk (i) ≥ (1+ǫ)j−1 γ γ 10|I|pk ≥ 40(1+ǫ/3) log2 n . The probability that i is sampled at most once in this case is at  log3 (n)−1 γ most log3 (n) 1 − 40(1+ǫ/3) . Therefore, with probability at least 1 − o(1), i is 2 log n sampled at least twice and the tester rejects at Step 11. Proof of Lemma 5.5. Given the input values (µ, I, m, γ, ǫ, δ), we iterate Algorithm 6 O(1/δ) independent times with input values (µ, I, γ, ǫ) (we may ignore m here), and take the majority vote. The sample complexity is evident from the description of the algorithm. If indeed µ(I) ≥ γ then Lemma 8.3 and Lemma 8.5 provide that every round gives the correct answer with probability at least 2/3, making the majority vote correct with probability at least 1 − δ. 9 Introducing properties characterized by atlases In this section, we give a testing algorithm for properties characterized by atlases, which we formally define next. We will show in the next subsection that distributions that are L-decomposable are, in particular, characterized by atlases. First we start with the definition of an inventory. Definition 9.1 (inventory). Given an interval I = [a, b] ⊆ [n] and a real-valued function ν : [a, b] → [0, 1], the inventory of ν over [a, b] is the multiset M corresponding to (ν(a), . . . , ν(b)). That is, we keep count of the function values over the interval including repetitions, but ignore their order. In particular, for a distribution µ = (p1 , . . . , pn ) over [n], the inventory of µ over [a, b] is the multiset M corresponding to (pa , . . . , pb ). Definition 9.2 (atlas). Given a distribution µ over [n], and an interval partition I = (I1 , . . . , Ik ) of [n], the atlas A of µ over I is the ordered pair (I, M), where M is the sequence of multisets (M1 , . . . , Mk ) so that Mj is the inventory of µ over Ij for every j ∈ [k]. In this setting, we also say that µ conforms to A. 20 We note that there can be many distributions over [n] whose atlas is the same. We will also denote by an atlas A any ordered pair (I, M) where I is an interval partition of [n] and M is a sequence of multisets of the same length, so that the total sum of all members of all multisets is 1. It is a simple observation that for every such A there exists at least one distribution that conforms to it. The length of an atlas |A| is defined as the shared length of its interval partition and sequence of multisets. We now define what it means for a property to be characterized by atlases, and state our main theorem concerning such properties. Definition 9.3. For a function k : R+ × N → N, we say that a property of distributions C is k-characterized by atlases if for every n ∈ N and every ǫ > 0 we have a set A of atlases of lengths bounded by k(ǫ, n), so that every distribution µ over [n] satisfying C conforms to some A ∈ A, while on the other hand no distribution µ that conforms to any A ∈ A is ǫ-far from satisfying C. Theorem 9.4. If C is a property of distributions that is k-characterized by atlases, then for any ǫ > 0 there is an adaptive conditional testing algorithm for C with query complexity k(ǫ/5, n) · poly(log n, 1/ǫ) (and error probability bound 1/3). 9.1 Applications and examples We first show that L-decomposable properties are in particular characterized by atlases. Lemma 9.5. If C is a property of distributions that is L-decomposable, then C is k-characterized by atlases, where k(ǫ, n) = L(ǫ/3, n). Proof. Every distribution µ ∈ C that is supported over [n] defines an atlas in conjunction with the interval partition of the L-decomposition of µ for L = L(γ, n). Let A be the set of all such atlases. We will show that C is L(3γ, n)-characterized by A. Let µ ∈ C. Since µ is L-decomposable, µ conforms to the atlas given by the L-decomposition and it is in A as defined above. Now suppose that µ conforms to an atlas A ∈ A, where I = (I1 , . . . , Iℓ ) is the sequence of intervals. By the construction of A, there exists a distribution χ ∈ C that conforms with A. Now, for each j ∈ [ℓ] such that µ(Ij ) ≤ γ/L, we have (noting that χ(Ij ) = µ(Ij )) X i∈Ij |µ(i) − χ(i)| ≤ X µ(i) + X i∈Ij i∈Ij χ(i) ≤ 2µ(Ij ) ≤ 2γ . ℓ (5) Noting that µ and χ have the same maximum and minimum over Ij (as they have the same inventory), for each j ∈ [ℓ] and i ∈ Ij , we know that |µ(i) − χ(i)| ≤ maxi∈Ij µ(i) − mini∈Ij µ(i). Therefore, for all j ∈ [ℓ] such that maxi∈Ij µ(i) ≤ (1 + γ) mini∈Ij µ(i), |µ(i) − χ(i)| ≤ γ mini∈Ij µ(i). Therefore, X |µ(i) − χ(i)| ≤ |Ij |γ min µj (i) ≤ γµj (Ij ). (6) i∈Ij i∈Ij Finally, recall that since A came from an L-decomposition of χ, all intervals are covered by the above cases. Summing up Equations 5 and 6 for all j ∈ {1, 2, . . . , ℓ}, we obtain d(µ, χ) ≤ 3γ. 21 Note that atlases characterize also properties that do not have shape restriction. The following is a simple observation. Observation 9.6. If C is a property of distributions that is symmetric over [n], then C is 1characterized by atlases. It was shown in Chakraborty et al [CFGM13] that such properties are efficiently testable with conditional queries, so Theorem 9.4 in particular generalizes this result. Also, the notion of characterization by atlases provides a natural model for tolerant testing, as we will see in the next subsection. 10 Atlas characterizations and tolerant Testing We now show that for all properties of distributions that are characterized by atlases, there are efficient tolerant testers as well. In [CDGR15], it was shown that for a large property of distribution properties that have “semi-agnostic” learners, there are efficient tolerant testers. In this subsection, we show that when the algorithm is given conditional query access, there are efficient tolerant testers for the larger class of properties that are characterized by atlases, including decomposable properties that otherwise do not lend themselves to tolerant testing. The mechanism presented here will also be used in the proof of Theorem 9.4 itself. First, we give a definition of tolerant testing. We note that the definition extends naturally to algorithms that make conditional queries to a distribution. Definition 10.1. Let C be any property of probability distributions. An (η, ǫ)-tolerant tester for C with query complexity q and error probability δ, is an algorithm that samples q elements x1 , . . . , xq from a distribution µ, accepts with probability at least 1−δ if d(µ, C) ≤ η, and rejects with probability at least 1 − δ if d(µ, C) ≥ η + ǫ. In [CDGR15], they show that for every α > 0, there is an ǫ > 0 that depends on α, such that there is an (ǫ, α − ǫ)-tolerant tester for certain shape-restricted properties. On the other hand, tolerant testing using unconditional queries for other properties, such as the (1-decomposable) property of being uniform, require Ω (n/ log n) many samples ([VV10]). We prove that, in the presence of conditional query access, there is an (η, ǫ)-tolerant tester for every η, ǫ > 0 such that η + ǫ < 1 for all properties of probability distributions that are characterized by atlases. We first present a definition and prove an easy lemma that will be useful later on. Definition 10.2. Given a partition I = (I1 , . . . , Ik ) of [n], we say that a permutation σ : [n] → [n] is I-preserving if for every 1 ≤ j ≤ k we have σ(Ij ) = Ij . Lemma 10.3. Let χ and χ′ be two distributions, supported on [n], both of which conform to an atlas A = (I, M). If A′ = (I, M′ ) is another atlas with the same interval partition as A, such that χ is ǫ-close to conforming to A′ , then χ′ is also ǫ-close to conforming to A′ . Proof. It is an easy observation that there exists an I-preserving permutation σ that moves χ to χ′ . Now let µ be the distribution that conforms to A′ such that d(µ, χ) ≤ ǫ, and let µ′ be the distribution that results from having σ operate on µ. It is not hard to see that µ′ conforms to A′ (which has the same interval partition as A), and that it is ǫ-close to χ′ . 22 For a property C of distributions that is k-characterized by atlases, let Cη be the property of distributions of being η-close to C. The following lemma states that Cη is also k-characterized by atlases. This lemma will also be important for us outside the context of tolerant testing per-se. Lemma 10.4. Let C be a property of probability distributions that is k(ǫ, n)-characterized by atlases. For any η > 0, let Cη be the set of all probability distributions µ such that d(µ, C) ≤ η. Then, there is a set Aη of atlases, of length at most k, such that every µ ∈ Cη conforms to at least one atlas in Aη , and every distribution that conforms to an atlas in Aη is η + ǫ-close to C, and is ǫ-close to Cη . Proof. Since C is k-characterized by atlases, there is a set of atlases A of length at most k(ǫ, n) such that for each µ ∈ C, there is an atlas A ∈ A to which it conforms, and any χ that conforms to an atlas A ∈ A is ǫ-close to C. Now, let Aη be obtained by taking each atlas A ∈ A, and adding all atlases, with the same interval partition, corresponding to distributions that are η-close to conforming to A. First, note that the new atlases that are added have the same interval partitions as atlases in A, and hence have the same length bound k(ǫ, n). To complete the proof of the lemma, we need to prove that every µ ∈ Cη conforms to some atlas in Aη , and that no distribution that conforms to Aη is η + ǫ-far from C. Take any µ ∈ Cη . There exists some distribution µ′ ∈ C such that d(µ, µ′ ) ≤ η. Since C is k-characterized by atlases, there is some atlas A ∈ A such that µ′ conforms with A. Also, observe that µ is η-close to conforming to A through µ′ . Therefore, there is an atlas A′ with the same interval partition as A that was added in Aη , which is the atlas corresponding to the distribution µ. Hence, there is an atlas in Aη to which µ conforms. Conversely, let χ be a distribution that conforms with an atlas A′ ∈ Aη . From the construction of Aη , we know that there is an atlas A ∈ A with the same interval partition as A′ , and there is a distribution χ′ that conforms to A′ and is η-close to conforming to A. Therefore, by Lemma 10.3 χ is also η-close to conforming to A. Let µ′ be the distribution conforming to A such that d(χ, µ′ ) ≤ η. Since µ′ conforms to an atlas A ∈ A, d(µ′ , C) ≤ ǫ. Therefore, by the triangle inequality, d(χ, C) ≤ η + ǫ. This also implies that d(χ, Cη ) ≤ ǫ by considering χ̃ = (ηχ+ǫµ̃)/(ǫ+η) where µ̃ is the distribution in C that is ǫ + η-close to χ. Note that χ̃ is η-close to µ̃ and ǫ-close to χ. Using Lemma 10.4 we get the following corollary of Theorem 9.4 about tolerant testing of distributions characterized by atlases. Corollary 10.5. Let C be a property of distributions that is k-characterized by atlases. For every η, ǫ > 0 such that η+ǫ < 1, there is an (η, ǫ)-tolerant tester for C that takes k(ǫ/5, n)·poly(log n, 1/ǫ) conditional samples and succeeds with probability at least 2/3. 11 Some useful lemmas about atlases and characterizations We start with a definition and a lemma, providing an alternative equivalent definition of properties k-characterizable by atlases Definition 11.1 (permutation-resistant distributions). For a function k : R+ × N → N, a property C of probability distributions is k-piecewise permutation resistant if for every n ∈ N, every ǫ > 0, and every distribution µ over [n] in C, there exists a partition I of [n] into up to k(ǫ, n) intervals, 23 so that every I-preserving permutation of [n] transforms µ into a distribution that is ǫ-close to a distribution in C. Lemma 11.2. For k : R+ × N → N, a property C of probability distributions over [n] is k-piecewise permutation resistant if and only if it is k-characterized by atlases. Proof. If C is k-piecewise permutation resistant, then for each distribution µ ∈ C, there exists an interval partition I of [n] such that every I-preserving permutation of [n] transforms µ into a distribution that is ǫ-close to C. Each distribution µ thus gives an atlas over I, and the collection of these atlases for all µ ∈ C characterizes the property C. Therefore, C is k-characterized by atlases. Conversely, let C be a property of distributions that are k-characterized by atlases and let A be the set of atlases. For each µ ∈ C, let Aµ be the atlas in A that characterizes µ and let Iµ be the interval partition corresponding to this atlas. Now, every Iµ -preserving permutation σ of µ gives a distribution µσ that has the same atlas Aµ . Since C is k-characterized by atlases, µσ is ǫ-close to C. Therefore, C is k-piecewise permutation resistant as well. We now prove the following lemma about ǫ/k-fine partitions of distributions characterized by atlases, having a similar flavor as Lemma 4.3 for L-decomposable properties. Since we cannot avert a poly(log n) dependency anyway, for simplicity we use the 1-parameter variant of fine partitions. Lemma 11.3. Let C be a property of distributions that is k(ǫ, n)-characterized by atlases through A. For any µ ∈ C, any ǫ/k-fine interval partition I ′ of µ, and the corresponding atlas A′ = (I ′ , M′ ) for µ (not necessarily in A), any distribution µ′ that conforms to A′ is 3ǫ-close to C. Proof. Let A = (I, M) be the atlas from A to which µ conforms, and let I ′ = (I1′ , I2′ , . . . , Ir′ ) be an ǫ/k-fine interval partition of µ. Let P ⊆ I ′ be the set of intervals that more than one S intersect ′ ′ interval in I. Since I is ǫ/k-fine, and the length of A is at most k, µ( I ′ ∈P Ij ) ≤ ǫ (note that P S j cannot contain singletons). Also, since µ′ conforms to A′ , we have µ′ ( I ′ ∈P Ij′ ) ≤ ǫ. j Let µ̃ be a distribution supported over [n] obtained as follows: For each interval Ij′ ∈ P, µ̃(i) = µ(i) for every i ∈ Ij′ . For each interval Ij′ ∈ I ′ \ P, µ̃(i) = µ′ (i) for every i ∈ Ij′ . Note that that the inventories of µ̃ and µ are identical over any Ij′ in I ′ \ P. From this it follows that µ̃ also conforms to A, and in particular µ̃ is a distribution. To see this, for any Ij in I partition it to its intersection with the members of I ′ \ P contained in it, and all the rest. For the former we use that µ and µ′ have the same inventories, and for the latter we specified that µ̃ has the same values as µ. Since µ′ and µ̃ are identical at all points except those in P, we have d(µ′ , µ̃) ≤ 2ǫ. Furthermore, d(µ̃, C) ≤ ǫ since µ̃ conforms to A ∈ A. Therefore, by the triangle inequality, d(µ′ , C) ≤ 3ǫ. The main idea of our test for a property of distributions k-characterized by atlases, starts with a γ/k-fine partition I obtained by through Algorithm 1. We then show how to compute an atlas A with this interval partition such that there is a distribution µI that conforms to A that is close to µ. We use the ǫ-trimming sampler from [CFGM13] to obtain such an atlas corresponding to I. To test if µ is in C, we show that it is sufficient to check if there is some distribution conforming to A that is close to a distribution in C. 12 An adaptive test for properties characterized by atlases Our main technical lemma, which we state here and prove in Section 13, is the following possibility of “learning” an atlas of an unknown distribution for an interval partition I, under the conditional 24 sampling model. Lemma 12.1. Given a distribution µ supported over [n], and a partition I = (I1 , I2 , . . . , Ir ), using r · poly(log n, 1/ǫ, log(1/δ)) conditional samples from µ we can construct, with probability at least 1 − δ, an atlas for some distribution µI that is ǫ-close to µ. First, we show how this implies Theorem 9.4. To prove it, we give as Algorithm 7 a formal description of the test. Algorithm 7: Adaptive conditional tester for properties k-characterized by atlases Input: A distribution µ supported over [n], a function k : (0, 1] × N → N, accuracy parameter ǫ > 0, a property C of distributions that is k-characterized by the set of atlases A 1 Use Algorithm 1 with input values (µ, ǫ/5k(ǫ/5, n), 1/6) to obtain a partition I with |I| ≤ 20k(ǫ/5, n) log(n) log(1/ǫ)/ǫ 2 Use Lemma 12.1 with accuracy parameter ǫ/5 and error parameter 1/6 to obtain an atlas AI ′ corresponding to I ′ 3 if * then there exists χ ∈ C that is ǫ/5-close to conforming to AI ′ accept else reject Lemma 12.2 (completeness). Let C be a property of distributions that is k-characterized by atlases, and let µ be any distribution supported over [n]. If µ ∈ C, then with probability at least 2/3 Algorithm 7 accepts. Proof. In Step 2, with probability at least 5/6 > 2/3, we get an atlas AI ′ such that there is a distribution µI ′ that is ǫ/5-close to µ. Step 3 then accepts on account of χ = µ. Lemma 12.3 (soundness). Let C be a property of distributions that is k-characterized by atlases, and let µ be any distribution supported over [n]. If d(µ, C) > ǫ, then with probability at least 2/3 Algorithm 7 rejects. Proof. With probability at least 2/3, for k = k(ǫ/5, n) we get an ǫ/5k-fine partition I ′ in Step 1, as well as an atlas AI ′ in Step 2 such that there is a distribution µI ′ conforming to it that is ǫ/5-close to µ. Suppose that the algorithm accepted in Step 3 on account of χ ∈ C. Then there is a χ′ that is ǫ/5-close to χ and conforms to AI ′ . By Lemma 10.4, the property of being ǫ/5-close to C is itself k-characterized by atlases. Let Aǫ/5 be the collection of atlases characterizing it. Using Lemma 11.3 with χ′ and Aǫ/5 , we know that χ′ is 3ǫ/5-close to some χ, which is in Cǫ/5 and thus ǫ/5-close to C. Since χ′ is also ǫ/5-close to µ, we obtain that µ is ǫ-close to C by the triangle inequality, contradicting d(µ, C) > ǫ. Proof of Theorem 9.4. Given a distribution µ, supported on [n], and a property C of distributions that is k-characterized by atlases, we use Algorithm 7. The correctness follows from Lemmas 12.2 and 12.3. The number of samples made in Step 1 is clearly dominated by the number of samples in Step 2, which is k(ǫ/5, n) · poly(log n, 1/ǫ). 25 13 Constructing an atlas for a distribution Before we prove Lemma 12.1, we will define the notion of value-distances and prove lemmas that will be useful for the proof of the theorem. Definition 13.1 (value-distance). Given two multisets A,B of real numbers, both of the same size (e.g. two inventories over an interval [a, b]), the value-distance between them is the minimum ℓ1 distance between a vector that conforms to A and a vector that conforms to B. The following observation gives a simple method to calculate the value-distances between two multisets A and B. Observation 13.2. The value-distance between A and B is equal to the ℓ1 distance between the two vectors conforming to the respective sorting of the two multisets. Proof. Given two vectors v and w corresponding to A and B achieving the value-distance, first assume that the smallest value of A is not larger than the smallest value of B. Assume without loss of generality (by permuting both v and w) that v1 is of the smallest value among those of A. It is not hard to see that, in this case, one can make w1 to be of the smallest value among those of B without increasing the distance (by swapping the two values), and from here one can proceed by induction over |A| = |B|. We now prove two lemmas that will be useful for the proof of Lemma 12.1. Lemma 13.3. Let A and B be two multisets of the same size, both with members whose values range in {0, α1 , . . . , αr }. Let mj be the number of appearances of αj in A, and nj the corresponding number Pr in B. If mj ≤ nj for every 1 ≤ j ≤ r, then the value-distance between A and B is bounded by j=1 (nj − mj )αj . Proof. Let vA = {a1 , . . . , al } and vB = {b1 , . . . , bl } be two vectors such that a1 = · · · = am1 = α1 , am1 +1 = · · · = an1 = 0 and b1 = · · · = bn1 = α1 , and similarly for j ∈ {1, . . . , r − 1}, anj +1 = · · · = anjP +mj+1 = αj+1 , anj +mj+1 +1 = · · · = anj +nj+1 = 0 and bnj +1 = · · · = bnj +nj+1 = αj+1 . For k > rj=1 nj , we set ak = bk = 0. The vectors vA and vB P conform to the multisets A and B respectively, and the ℓ1 distance between the two vectors is rj=1 (nj − mj )αj , so the lemma follows. Lemma 13.4. Let µ be a probability distribution over {1, . . . , n},Pand let µ̃ be a vector of size n where each entry is a real number in the interval [0, 1], such that P i∈[n] |µ(i) − µ̃(i)| ≤ ǫ. Let µ̂ be a Pprobability distribution over {1, . . . , n} defined as µ̂(i) = µ̃(i)/ i∈[n] µ̃(i) for all i ∈ [n]. Then i∈[n] |µ(i) − µ̂(i)| ≤ 5ǫ. P P P Proof. We have | i∈[n] µ(i) − i∈[n] µ̃(i)| ≤ ǫ. Therefore, 1 − ǫ ≤ i∈[n] µ̃(i) ≤ 1 + ǫ. If P i∈[n] µ̃(i) < 1, then µ̂(i) ≤ µ̃(i)/(1 P− ǫ) and µ̂(i) > µ̃(i). Therefore, µ̂(i) ≤ (1 + 2ǫ)µ̃(i) and hence 0 ≤ µ̂(i) − µ̃(i) ≤ 2ǫµ̃(i). If i∈[n] µ̃(i) ≥ 1, then µ̂(i) ≥ µ̃(i)/(1 + ǫ) ≥ (1 − ǫ)µ̃(i) and µ̂(i) ≤ µ̃(i). Therefore 0 ≤ µ̃(i) − µ̂(i) ≤ ǫµ̃(i). Therefore |µ̃(i) − µ̂(i)| ≤ 2ǫµ̃(i), in all cases, for all i. P P P P Now, i∈[n] |µ(i) − µ̂(i)| ≤ i∈[n] |µ(i) P P − µ̃(i)| + i∈[n] |µ̃(i) − µ̂(i)|. Since i∈[n] |µ̃(i) − µ̂(i)| ≤ 2ǫ i∈[n] µ̃(i) ≤ 2ǫ(1 + ǫ), we get that i∈[n] |µ(i) − µ̂(i)| ≤ 5ǫ. Now we recall the definition of an ǫ-trimming sampler from [CFGM13]. 26 Definition 13.5 (ǫ-trimming sampler). An ǫ-trimming sampler with s samples for a distribution µ supported over [n], is an algorithm that has conditional query access to the distribution µ and returns s pairs of values (r, µ(r)) (for r = 0, µ(r) is not output) from a distribution µ supported on P {0}∪[n], such that i∈[n] |µ(i)−µ(i)| ≤ 4ǫ, and each r is independently drawn from µ. Furthermore, there is a set P of poly(log n, 1/ǫ) real numbers such that for all i either µ(i) = 0 or µ(i) ∈ P . The existence of an ǫ-trimming sampler with a small set of values was proved in [CFGM13]. Let us formally state this lemma. Lemma 13.6 ([CFGM13]). Given conditional query access to a distribution µ supported on [n], there is an ǫ-trimming sampler that makes 32s · ǫ−4 · log5 n · log(sδ−1 log n) many conditional queries to µ, and returns, with probability at least 1 − δ, a sequence of s samples from a distribution µ, i−1 where P = { (1+ǫ)n ǫ | 1 ≤ i ≤ k − 1} for k = log n log(ǫ−1 )/ log2 (1 + ǫ). 13.1 Proving the main lemma The proof of Lemma 12.1 depends on the following technical lemma. Lemma 13.7. Let µ be a distribution supported over [n], and let P = (P0 , P1 , P2 , . . . , Pr ) be a partition of [n] into r + 1 subsets with the following properties. 1. For each Pk ∈ P, µ(i) = pk for every i ∈ Pk , where p1 , . . . , pr (but not p0 ) are known. 2. Given an i ∈ [n] sampled from µ, we can find the k such that i ∈ Pk .  r µ, with probability at least 1 − δ, we can find m1 , . . . , mr such Using s = 6r ǫ2 log δ samples from P that mk ≤ |Pk | for all k ∈ [r], and k∈[r] pk (|Pk | − mk ) ≤ 4ǫ. Proof. Take s samples from µ. For each k ∈ [r], let sk be the number of samples in Pk , each with probability pk . We can easily see that E[sk ] = spk |Pk |. If pk |Pk | ≥ 1/r, then by Chernoff bounds, we know that, Pr [(1 − ǫ)E[sk ] ≤ sk ≤ (1 + ǫ)E[sk ]] ≥ 1 − 2e−ǫ 2 E[s k ]/3 By the choice of s, with probability at least 1 − δ/r, (1 − ǫ)pk |Pk | ≤ ssk ≤ (1 + ǫ)pk |Pk |. On the other hand, if pk |Pk | < 1/r, then by Chernoff bounds we have,   Pr pk |Pk | − rǫ ≤ ssk ≤ pk |Pk | + rǫ =   h    i ǫ2 s Pr 1 − rpkǫ|Pk | spk |Pk | ≤ sk ≤ 1 + rpkǫ|Pk | spk |Pk | ≥ 1 − 2 exp − 2 r pk |Pk | ≥ 1 − 2e−ǫ 2 s/3r By the choice of s, with probability at least 1 − δ/r, pk |Pk | − rǫ ≤ ssk ≤ pk |Pk | + rǫ . With probability at least 1 − δ, we get an estimate αk = sk /s for every k ∈ [r] such that αk ≤ max {pk |Pk | + ǫ/r, pk Pk (1 + ǫ)}, and αk ≥ min {pk |Pk | − ǫ/r, (1 − ǫ)pk |Pk |}. From now on we assume that αk satisfies the above bounds, and define α′k = min {αk − ǫ/r, αk /(1 + ǫ)}. Notice that α′k ≤ pk |Pk |. Furthermore, α′k ≥ min {pk |Pk | − 2ǫ/r, (1 − 2ǫ)pk |Pk |}. Set mk = ⌈α′k /pk ⌉. Since α′k /pk ≤ |Pk | ∈ Z, we have mk ≤ |Pk | for all k. 27 P P Now, k∈[r] pk (|Pk | − mk ) ≤ k∈[r] (pk |P | − α′k ). Under the above assumption on the value of αk , for every k such that pk |Pk | < 1/r, we have α′k ≥ pk |Pk | − 2ǫ/r. Hence, this difference is at most 2ǫ/r. For every k such that pk |Pk | ≥ 1/r, α′k ≥ (1 − 2ǫ)pk |Pk |. For any such k, the difference P pk |Pk | − α′k is at most 2ǫpk |Pk |. Therefore, k∈[r] pk (|Pk | − mk ) is at most 4ǫ. Proof of Lemma 12.1. Given a distribution µ and an interval partition I = (I1 , I2 , . . . , Ir ), let µ be the distribution presented by the ǫ/8-trimming sampler in Lemma 13.6. Let Ij,k ⊆ [n] be the set k−1 ǫ . Thus, each interval Ij in I is now split into of indexes i such that i ∈ Ij and µ(i) = (1+ǫ/8) 8n subsets Ij,0 , Ij,1 , Ij,2 , . . . , Ij,ℓ , where ℓ ≤ log n log(8/ǫ)/ log 2 (1 + ǫ/8) and Ij,0 is the set of indexes in Ij such that µ(i) = 0. Using Lemma 13.6, with s = r · poly(log n, 1/ǫ, log(1/δ)) samples from the distribution µ, we can estimate, with probability at least 1 − δ, the values mj,k such that mj,k ≤ |Ij,k | for all k > 0, and the following holds. X (1+ǫ/8)k−1 ǫ (Ij,k − mj,k ) ≤ ǫ/10. 8n j,k:k>0 P For every j, let MIj be the inventory provided by mj,1 , . . . , mj,ℓ and mj,0 = |Ij |− k∈[ℓ] mj,k . Thus, we have a inventory sequence M̃I = (MI1 , MI2 , . . . , MIr ) that is ǫ/10-close in value-distance to the corresponding atlas of µ (where we need to add the interval {0} to the partition to cover its entire support). Corresponding to M̃I , there is a vector µ̃ that is ǫ/10-close to µ. Using Lemma 13.4, we have a distribution µ̂ that is ǫ/2-close to µ. Since the [n] portion of µ is ǫ/2-close to µ, by the triangle inequality, µ̂ is ǫ-close to µ. Thus A = (I, MI ), where MI is obtained by multiplying all members of M̃I by the same factor used to produce µ̂ from µ̃, is an atlas for a distribution that is ǫ-close to µ. We need s · poly(log n, log s, 1/ǫ, log(1/δ) conditional samples from µ to get s samples from µ. Therefore, we require r ·poly(log n, 1/ǫ, log(1/δ)) conditional samples to construct the atlas AI . References [AAK+ 07] Noga Alon, Alexandr Andoni, Tali Kaufman, Kevin Matulef, Ronitt Rubinfeld, and Ning Xie, Testing k-wise and almost k-wise independence, Proceedings of the Thirtyninth Annual ACM Symposium on Theory of Computing, STOC ’07, ACM, 2007, pp. 496–505. [ACK15] Jayadev Acharya, Clément L. Canonne, and Gautam Kamath, A chasm between identity and equivalence testing with conditional queries, Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2015, August 24-26, 2015, Princeton, NJ, USA, 2015, pp. 449–466. [ADK15] Jayadev Acharya, Constantinos Daskalakis, and Gautam Kamath, Optimal testing for properties of distributions, Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada (Corinna Cortes, Neil D. Lawrence, Daniel D. Lee, Masashi Sugiyama, and Roman Garnett, eds.), 2015, pp. 3591–3599. [BFF+ 01] Tugkan Batu, Lance Fortnow, Eldar Fischer, Ravi Kumar, Ronitt Rubinfeld, and Patrick White, Testing random variables for independence and identity, 42nd Annual 28 Symposium on Foundations of Computer Science, FOCS 2001, 14-17 October 2001, Las Vegas, Nevada, USA, 2001, pp. 442–451. [BFR+ 00] Tugkan Batu, Lance Fortnow, Ronitt Rubinfeld, Warren D. Smith, and Patrick White, Testing that distributions are close, 41st Annual Symposium on Foundations of Computer Science, FOCS 2000, 12-14 November 2000, Redondo Beach, California, USA, IEEE Computer Society, 2000, pp. 259–269. [BKR04] Tugkan Batu, Ravi Kumar, and Ronitt Rubinfeld, Sublinear algorithms for testing monotone and unimodal distributions, Proceedings of the 36th Annual ACM Symposium on Theory of Computing, Chicago, IL, USA, June 13-16, 2004 (László Babai, ed.), ACM, 2004, pp. 381–390. [Can15] Clément L. Canonne, A survey on distribution testing: Your data is big. but is it blue?, Electronic Colloquium on Computational Complexity (ECCC) 22 (2015), 63. [CDGR15] Clément L. Canonne, Ilias Diakonikolas, Themis Gouleakis, and Ronitt Rubinfeld, Testing shape restrictions of discrete distributions, CoRR abs/1507.03558 (2015). [CFGM13] Sourav Chakraborty, Eldar Fischer, Yonatan Goldhirsh, and Arie Matsliah, On the power of conditional samples in distribution testing, Innovations in Theoretical Computer Science, ITCS ’13, Berkeley, CA, USA, January 9-12, 2013, 2013, pp. 561–580. [CRS15] Clément L. Canonne, Dana Ron, and Rocco A. Servedio, Testing probability distributions using conditional samples, SIAM J. Comput. 44 (2015), no. 3, 540–616. [Dia16] Ilias Diakonikolas, Learning structured distributions, Handbook of Big Data (2016), 267. [DK16] Ilias Diakonikolas and Daniel M. Kane, A new approach for testing properties of discrete distributions, CoRR abs/1601.05557 (2016). [DLM+ 07] Ilias Diakonikolas, Homin K. Lee, Kevin Matulef, Krzysztof Onak, Ronitt Rubinfeld, Rocco A. Servedio, and Andrew Wan, Testing for concise representations, 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2007), October 20-23, 2007, Providence, RI, USA, Proceedings, 2007, pp. 549–558. [GR00] Oded Goldreich and Dana Ron, On testing expansion in bounded-degree graphs, Electronic Colloquium on Computational Complexity (ECCC) 7 (2000), no. 20. [Hoe] Wassily Hoeffding, Probability inequalities for sums of bounded random variables, Journal of the American Statistical Association 58, no. 1963, 13–30. [ILR12] Piotr Indyk, Reut Levi, and Ronitt Rubinfeld, Approximating and testing k-histogram distributions in sub-linear time, Proceedings of the 31st ACM SIGMOD-SIGACTSIGART Symposium on Principles of Database Systems, PODS 2012, Scottsdale, AZ, USA, May 20-24, 2012, 2012, pp. 15–22. [Pan08] Liam Paninski, A coincidence-based test for uniformity given very sparsely sampled discrete data, IEEE Transactions on Information Theory 54 (2008), no. 10, 4750–4755. 29 [Ser10] Rocco A. Servedio, Testing by implicit learning: A brief survey, Property Testing Current Research and Surveys [outgrow of a workshop at the Institute for Computer Science (ITCS) at Tsinghua University, January 2010], 2010, pp. 197–210. [VV10] Gregory Valiant and Paul Valiant, A CLT and tight lower bounds for estimating entropy, Electronic Colloquium on Computational Complexity (ECCC) 17 (2010), 179. [VV14] , An automatic inequality prover and instance optimal identity testing, 55th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2014, Philadelphia, PA, USA, October 18-21, 2014, 2014, pp. 51–60. 30
8cs.DS
AngularJS in the Wild: A Survey with 460 Developers Miguel Ramos Marco Tulio Valente arXiv:1608.02012v3 [cs.SE] 27 Sep 2016 UFMG, Brazil {miguel,mtov}@dcc.ufmg.br Ricardo Terra Gustavo Santos UFLA, Brazil [email protected] RMoD Team, INRIA, France [email protected] Abstract To implement modern web applications, a new family of JavaScript frameworks has emerged, using the MVC pattern. Among these frameworks, the most popular one is A NGU LAR JS, which is supported by Google. In spite of its popularity, there is not a clear knowledge on how A NGULAR JS design and features affect the development experience of Web applications. Therefore, this paper reports the results of a survey about A NGULAR JS, including answers from 460 developers. Our contributions include the identification of the most appreciated features of A NGULAR JS (e.g., custom interface components, dependency injection, and two-way data binding) and the most problematic aspects of the framework (e.g., performance and implementation of directives). Categories and Subject Descriptors D.3.3 [Frameworks] Keywords JavaScript, AngularJS, MVC frameworks. 1. Introduction JavaScript is a fundamental piece of modern Web applications. It was initially designed as a scripting language to extend web pages with small executable code. However, the language is used nowadays to construct a variety of complex systems (Kienle 2010; Silva et al. 2015). As a result, we are observing the birth of new technologies and tools—including JavaScript libraries and frameworks—to solve common problems faced in the development of such applications. For example, frameworks following the ModelView-Controller (MVC) architecture pattern (or variations of it) are widely used nowadays, including systems such as A NGULAR JS, BACKBONE . JS, and E MBER . JS. Among these frameworks, A NGULAR JS is probably the most popular one. This fact is evidenced by comparing the number of Google searches (the most queried framework since 2013), the num- ber of contributors in GitHub and the increasing number of questions and answers in Stack Overflow (the framework with more Q&A since mid-2013). However, despite the increasing practical interest on A N GULAR JS, there is no clear knowledge on how the design and features proposed by this framework affect the development experience of JavaScript software. More specifically, it is not clear what are the most appreciated features of A N GULAR JS, what are the main problems faced by developers when using the framework, and which aspects of A N GULAR JS can be improved. Answers to these questions are important to different developers. First, developers who use A NGULAR JS can learn how to improve this usage and also how to avoid bad A NGULAR JS programming practices. Second, developers who do not use JavaScript MVC frameworks can understand the benefits and problems related to these frameworks, by reviewing the case of A NGULAR JS. Third, MVC framework builders can use our results to design more powerful and usable frameworks. This paper reports the results of a survey with 460 developers, when we collected their perceptions about A NGU LAR JS. We reveal the relevant features of the framework, e.g., custom components, dependency injection, and twoway data binding. We also shed light on the most frequent problems faced by A NGULAR JS developers, e.g., due to the complexity of the API to declare directives. The remainder of the paper is organized as follows. Section 2 introduces A NGULAR JS. Section 3 documents the survey design and Section 4 presents the survey results. Threats to validity are presented in Section 5. Section 6 discusses related work and Section 7 concludes. 2. AngularJS in a Nutshell In this section, we briefly describe the key components of A NGULAR JS. A basic understanding of these components is important to interpret our survey results. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, contact the Owner/Author(s). Request permissions from [email protected] or Publications Dept., ACM, Inc., fax +1 (212) 869-0481. Modules: An A NGULAR JS application is a set of modules, which act as containers to the different parts of the application. Modules can also depend on other modules. PLATEAU ’16, November 01 2016, Amsterdam, Netherlands Copyright © 2016 held by owner/author(s). Publication rights licensed to ACM. ACM 978-1-4503-4638-2/16/11. . . $15.00 DOI: http://dx.doi.org/10.1145/3001878.3001881 Services: A NGULAR JS services are objects that encapsulate code related with a specific concern. They are instantiated 1 2 3 4 5 6 7 8 9 10 < html lang = " en " ng-app = " todomvc " > ... < header id = " header " > <h1 > todos </ h1 > < form ng-submit = " addTodo () " > < input placeholder = " What needs to be done ? " ng-model = " newTodo " / > </ form > </ header > ... </ html > Listing 1. Template sample only once by factories or constructor functions. The created singleton object is shared by the components that depend on it (e.g., controllers, directives, filters, and other services). Typically, A NGULAR JS services are stateless objects with a set of methods that deal with specific concerns, such as server requests, manipulation of arrays, asynchronous operations, etc. A NGULAR JS also provides built-in services to deal with common concerns in Web applications, such as $http, $filter, and $timeout. Templates: In Web applications, HTML documents are parsed to generate the DOM (Document Object Model), which is the data structure that models the final document presented to users. A NGULAR JS supports DOM-based templates, which are written in HTML and contain proprietary elements and attributes to render the dynamic interface of web applications. Listing 1 shows a sample template. It includes the definition of the document (html element in line 1) and the markup for the main input of the application, which is represented by the form element (line 5). Directives: Directives are specific HTML markers used in templates to define the UI behavior. In Listing 1, the ng-app attribute (line 1) is an A NGULAR JS directive that specifies the root node of the application. When directives are executed by A NGULAR JS they can modify the DOM structure and also register event handlers. During the compilation process, A NGULAR JS traverses the DOM and searches for all directives. The directives are executed in order of priority generating the final DOM presented to users. Directives can (1) use the same scope of the parent element; (2) create a scope that inherits from the scope of the parent element; or (3) create a completely new scope. It is also possible to create custom directives. Expressions: A NGULAR JS expressions are delimited by double curly brackets ({{expression}}) or are the values of some directive attributes. Literals (e.g., arrays ([]), objects ({})), operators, and variables are examples of elements that can be used in expressions. Expressions are evaluated using a context represented by an object, called scope. Variables and functions used in expressions must be defined in the scope object. During the template compilation, when the ng-app directive is parsed, A NGULAR JS creates an object representing the main application scope, which is referenced as the $rootScope. Since directives can define different scopes from $rootScope, expressions from different parts of the template may be evaluated under different scopes. When the value of an expression changes, A NGULAR JS updates the view accordingly. Controllers: A NGULAR JS controllers are used to initialize the state of an application and provide an interface to update it. Controllers are used with the ngController directive. When this directive is used in a template, it receives the name of a controller and the scope created by the directive is passed as a parameter to the specified controller. The controller must populate the scope object with properties and methods that are used when evaluating expressions. Digest Cycle: A NGULAR JS constantly maintains in sync the state of the application with the view presented to the final user. The framework provides this synchronization by comparing the current value of all variables in the scope referenced by the template expressions with their previous values. When a change is detected, the framework adequately updates the DOM, in a process known as digest cycle. 3. Survey Design First, we performed a Mapping Study (Section 3.1) to gather information about A NGULAR JS. We relied on the results of this first study to construct the survey. The survey participants were selected among Stack Overflow users (Section 3.2). 3.1 Mapping Study We use a mapping study to gather information about the use of A NGULAR JS. A mapping study is more flexible than a systematic review and it is recommended for studying emergent fields or technologies (Wohlin et al. 2012). For example, information about A NGULAR JS is primarily found in blogs, forums, and Q&A sites. Therefore, using the Google search engine, we initially focused on finding documents reporting the benefits and disadvantages of A NGULAR JS. To this purpose, we used search queries such as “the best features of AngularJS” or “the bad parts of AngularJS”. We also used two other strategies to reach more sources of information. First, we recursively accessed the references in the sites already reviewed (a practice called “snowballing”). Second, we performed additional search queries for frequently mentioned topics. As an example, we searched for “transclusion directives”, due to the frequency of references to this topic as a complex A NGULAR JS concept. During the revision of blogs, we only considered well-written posts, by authors with experience in software development. A complete list of the posts we consider is available in a companion website.1 Finally, these documents were analyzed and classified by identifying topic trends, which were used for the survey design. 1 https:// github.com/ aserg-ufmg/ angularjs-survey Figure 1. Selecting the survey participants 3.2 Survey Construction and Participants As a result of the mapping study, we built a 15-minute survey with 25 questions, organized in seven sections: (1) background of the participants, (2) key characteristics of A NGU LAR JS, (3) problems with A NGULAR JS templates, (4) debugging and testing, (5) development practices, (6) complex concepts and features, and (7) A NGULAR JS 2.0. To avoid unreliable responses, we asked developers to skip the questions they did not feel confident to answer. All the scales used in the survey have an even number of points, to force participants to make a choice. In multiple choice questions, when the respondents could provide a response not included in the set of answers, we included an Other option. To find participants, we used the Stack Exchange API2 to search for A NGULAR JS developers in the Stack Overflow community. As illustrated in Figure 1, we retrieved all existing tags with the substring “angularjs”. We retrieved 120,696 questions and 153,689 answers containing these tags. Next, we extracted data about three types of users: users who own a question (QO); users who own an answer (AO); or users who edited a question or answer (E). In this way, we collected a total of 74,005 users. To find their e-mail address, we matched each user nickname at StackOverflow with an equivalent nickname at GitHub. In this way, we obtained a total of 20,695 matched users (28%). However, only 8,084 users (10.9%) had public contact information at GitHub. In a last step, 7,157 users were marked as potential participants in the survey, because they have valid e-mail address and at least one operation with the collected answers that is not a simple edition. These users were ranked considering the number of A NGULAR JS-related questions and answers at Stack Overflow. Each user received the following score: S = QO +3∗AO, where QO is number of questions owned by the user and AO is the number of answers he owns. We gave an additional weight to answers since users who pro2 https:// api.stackexchange.com vide answers tend to have more experience than those who are looking for them. We randomly selected 30 users from the middle of the rank, with scores between 9 and 24, to run a pilot survey. Their feedback helped us to correct typographical errors and ambiguities in some questions. However, the most important change was in the structure of some questions. In the initial survey version, we used ranking questions, when survey respondents have to rank a list of items in order of importance. After this pilot study, we decided to change to rating questions (when respondents just have to rank each item in a scale ranging from 1 to 4) because some participants complained about the time to answer ranking questions. Due to these changes in the survey, the responses obtained during the pilot phase were discarded. The final version of the survey—which is also available in our companion website—was first sent to a group of 60 users. This time, we received complete responses and an improved response rate. Therefore, we extended the invitation to the rest of the users by daily emailing groups of nearly 700 users from the top of the ranking. At one point, we decided to stop due to replies from developers saying that they had a limited experience with A NGULAR JS. In total, we sent the survey to 3,060 users with score between 3 and 831. We received 460 complete responses, representing a response rate of 15%. The survey was open during approximately one month (from early November to early December 2015). 4. Survey Results 4.1 Background Figure 2 reveals the participants background. The majority of the respondents (97.6%) have at least one year of experience in JavaScript (Figure 2(a)), and 74.8% have one to three years of experience with A NGULAR JS (Figure 2(b)). For 37.4% of the developers, the largest application implemented with A NGULAR JS has more than 10 KLOC (Fig- (a) JavaScript experience (b) AngularJS experience (c) Largest application Custom interface components 452 (98%) Dependency injection 452 (98%) Two−way data binding 451 (98%) Behavior specified in HTML 440 (96%) Predefined components 439 (95%) Templates directly in HTML 447 (97%) One solution to many problems 434 (94%) Modeling with POJOs 443 (96%) Ease of tests 428 (93%) Google support 445 (97%) 40 20 0 1 (not valuable) 20 40 Percentage 2 3 60 80 Number of answers Figure 2. Respondents’ background 100 4 (very valuable) Figure 3. Key features and characteristics of AngularJS ure 2(c)). Therefore, we can conclude that at least the participants are not novice A NGULAR JS developers. 6. Ease of writing tests: A NGULAR JS provides the ngMock module to simulate logging operations, HTTP reqs, etc. 4.2 7. Two-way data binding: A NGULAR JS provides synchronization between data in the view and in the model. Key Characteristics and Features of AngularJS We asked developers about the the following features: 1. Pre-defined components for code organization: A NGU LAR JS has different components to modularize code, which may help in separation of concerns. 2. Dependency injection: This design pattern is used by A NGULAR JS to manage dependencies between components, to reduce coupling and increase testability. 3. Use of POJOs in model components: In A NGULAR JS, models are implemented using Plain Old JavaScript Objects (POJOs). There is no need to extend proprietary classes, for example, to provide accessor methods. 4. Templates in HTML: A NGULAR JS uses DOM-based templates to simplify data binding operations, event mapping, and updating of large interface components. 5. Support to custom components: Custom directives can be used as a DSL to define reusable UI components. 8. Use of HTML to declare UI behavior: The UI, including its behavior, is defined in standard HTML documents. 9. One solution to manage many problems: A NGULAR JS is an “opinionated framework”, meaning that its design handles common decisions related with Web apps. 10. Supported by Google: This support may guarantee the evolution and constant maintenance of the project. Figure 3 reports the value given by developers to these characteristics and features, ranging from not valuable (score 1) to very valuable (score 4). At the right of the charts, we include the number of answers of each item. Each individual item was rated by at least 93% of the participants. The top-3 features with more positive scores are the support to custom components, the use of dependency injection, and the support for two-way data binding. The characteristic 439 (95%) Dump/Debug problems 449 (98%) Modularity and SOC loss 434 (94%) Low readability of HTML 448 (97%) 80 70 60 50 40 1 (never) 30 20 10 Percentage 2 3 0 10 20 30 Number of answers Silent failures 40 4 (very often) Figure 4. How often these items represent a real problem caused by using code in A NGULAR JS templates? with the lowest number of positive answers is Google support, with 45.2% of the respondents seeing it as having no value (score 1) or limited value (score 2). 4.3 Code in HTML Templates In the mapping study, we detected four possible problems related to placing code in A NGULAR JS templates: 1. Silent failures: In A NGULAR JS, when undefined functions or objects are used in templates no exceptions are raised. As a consequence, applications might fail silently. 2. Code hard to debug: Since the code used in A NGULAR JS templates is not pure JavaScript, it is not possible, for example, to define break points. 3. Low readability: A NGULAR JS code might be spread all over the HTML document, hindering readability. 4. Modularity and Separation of Concerns: The use of large amount of JavaScript code in HTML is often seen as bad smell (Nguyen et al. 2012), which might hinder separation of concerns. We asked developers whether these issues are real problems in their daily development. In this case, the score 1 means the issue was never a problem and a score 4 means it is a very frequent problem. As shown in Figure 4, none of the issues have a major detrimental impact, according to the respondents; they have at least 60% of the answers in the low part of the scale (scores 1 or 2). In a separate question, we asked if the developers had at least once used large amounts of logic in HTML templates and 26.3% of them answered positively. Since this is not a recommended practice, we asked them to indicate possible reasons for their decision The two most voted reasons are A NGULAR JS design (54.8%) and the lack of experience in A NGULAR JS (43.5%). Lack of experience in Web architecture and in JavaScript were also voted (20.9% and 4.3%, respectively). We also gave the respondents the possibility to indicate other reasons, which were provided by 31 developers. These reasons include, for example, tight deadlines, special cases, easiness or laziness, prototyping purposes, etc. 4.4 Testing First, we asked the participants to rate the frequency they make use of mocking (provided by the ngMock module) when testing their systems. From 441 answers, 72.8% indicated they never or rarely use this module (scores 1 or 2). Possible reasons for this result include limited usefulness of ngMock features, unfamiliarity with the module, and few developers putting testing into practice. We also asked the participants to rank how complex is testing A NGULAR JS components, from very easy to very difficult. As presented in Figure 5, services, filters, controllers, and providers received the higher number of answers with scores 1 and 2. The reason is that these components are very common and usually do not include complex code or code that deals with complex APIs. For example, most code in filters only make string transformations. By contrast, the two components more difficult to test are transclusion directives and directives with external templates. Probably, developers find these directives more difficult to test because they demand a deeper understanding of A NGULAR JS concepts. For example, when creating directives, there are different types of transclusion, different types of scopes, and different ways to interact with the DOM API. 4.5 Complex Concepts and Features We asked the participants to evaluate several characteristics of A NGULAR JS, which were originally identified in the 337 (73%) Directives with external templates 350 (76%) Simple HTML directives 371 (81%) Providers 361 (78%) Controllers 386 (84%) Filters 369 (80%) Services 381 (83%) 80 60 40 1 (very easy) 20 0 Percentage 2 3 20 40 Number of answers Transclusion directives 60 4 (very difficult) Performance degradation details 413 (90%) Transclusion directives API 397 (86%) Directive scopes 424 (92%) Compile, link and controller functions 424 (92%) Correct use of $scope.$apply 425 (92%) Dependency registration methods 419 (91%) Scopes prototypal inheritance 414 (90%) External components integration 416 (90%) Dependency injection methods 419 (91%) 80 60 40 1 (very simple) 20 0 20 Percentage 2 3 40 60 Number of answers Figure 5. How difficult is it to test these A NGULAR JS components? 80 4 (very complex) Figure 6. How complex are the the following A NGULAR JS aspects and features? mapping study as complex concepts. The following characteristics were proposed: (1) use of different scopes in directives; (2) use of prototypes to simulate scope inheritance; (3) different types of entities to register dependencies; (4) compile, link, and controller functions (necessary to implement DOM-related directives); (5) transclusion directives; (6) correct use of $scope.$apply to manually trigger the digest cycle; (7) tackling of performance degradation details; (8) integration with external components and plug-ins; and (9) correct usage of the syntax to inject dependencies (in order to avoid unexpected results when minifying the code). Figure 6 summarizes the developers’ classification from very simple concept (score 1) to very complex one (score 4). Tackling all the details that can lead to performance degradation was rated by 76% of the participants as a complex task. The next three items in terms of complexity are transclusion directives, the different scopes that can be used when building directives, and the correct use of the functions compile, link, and controller. All these items are somehow re- Integration with ES6 modules New API for UI components definition Component router New mechanism for change detection New mobile features Server rendering New template syntax New API for dependency injection No more $scope.$apply Execution time measurement service Other 0 10 20 30 40 50 60 70 Percent of developers Figure 7. Most expected A NGULAR JS 2.0 features lated with the implementation of directives. The remaining items were rated as more simple than complex, mainly the integration with external components and the use of the correct syntax to inject dependencies. In a separate question, we asked the developers about the frequency they create directives. As a result, 83.5% of the participants answered they often or very often create their own directives. Despite this fact, many tasks and features related to the implementation of directives are usually considered complex by the survey participants. 4.6 • The two problems that arise more frequently regarding the use of code in A NGULAR JS templates are the emergence of silent failures and the difficulty to dump/debug the variables referenced in the HTML. New debug tools and techniques can then be developed to alleviate these problems faced by developers. AngularJS 2.0 To reveal the most expected features or improvements in A NGULAR JS 2.0, we selected the following features that appeared in the mapping study: (1) the new API to define the main UI building blocks; (2) Zone.js (no more $scope.$apply()); (3) server rendering; (4) the new logging service, called diary.js; (5) new mobile features (e.g. support for touch event gestures); (6) the new template syntax; (7) the new change detection mechanism; (8) the new API for injecting dependencies; (9) integration with ECMAScript 6 (ES6) modules; (10) component router, which allows asynchronous loading. Figure 7 indicates that the most expected feature is the integration with ES6 modules (68.3%). The second most expected feature is the new API to create UI components, which is expected because the current API is perceived by most developers as difficult to use and understand (see Section 4.5). The third most expected feature is the component router, which allows the dynamic loading of UI components, followed by the new change detection mechanism. 4.7 ponents by means of custom directives, the use of dependency injection, and the ease to set up two-way data binding. Therefore, JavaScript MVC framework builders can embrace these characteristics and improve them by offering a more simple interface to build reusable UI components (without exposing final users to internal concepts and decisions) and by using better mechanisms to detect changes in the model (i.e., mechanisms that reduce the number of details to be considered). Key Findings and Implications The main findings of our survey are as follows: • Three characteristics of A NGULAR JS excel by the value that developers give to them: the ability to create UI com- • The two main reasons for placing large amounts of logic in templates are the lack of experience in A NGULAR JS and the design of the framework. This shows the importance of correctly training developers before they start to use A NGULAR JS on complex applications. It also reveals an opportunity for framework builders to investigate new framework designs. • The components that are more difficult to test in A NGU LAR JS are directives, mainly the ones using transclusion; the remaining components (i.e., controllers, services, filters, etc.) are mostly considered easy to test. 5. Threats to Validity The first threat to validity relates to the execution of the mapping study. Due to the large amount of information on the Internet about A NGULAR JS, it is possible that literature addressing more specific topics about the framework or presenting different points of view was not included. Regarding the construction of the questionnaire, the main threat is the insertion of ambiguous and leading questions. We made our best to avoid this problem by constantly reviewing and improving the proposed questions. Additionally, we ran a pilot survey to identify and correct this type of questions. In some questions, we also gave the participants the opportunity to respond with an answer different from the proposed ones by adding an “Other” option. Furthermore, with the exception of the background questions, no question was mandatory. Therefore, participants were not forced to provide answers when they did not want or when they were not sure about their answers. There are also two threats related to the method used to retrieve the participants’ e-mails. The first one is related with the match between the Stack Overflow profile and the GitHub profile of the participants. It is possible that a Stack Overflow user has been matched with a homonym user in GitHub (i.e., users who have exactly the same login name, but who are different people). Additionally, it is possible that the heuristic used to assess and rank the expertise of the selected developers does not reflect the reality. There are also some aspects that limit the generalization of our results (external validity). First, the sample for the survey was selected only from the Stack Overflow community. Therefore, it is possible that the findings in this study do not apply to a different population. Moreover, constant and rapid changes in Web development environments, including new technologies and new versions of A NGULAR JS, can lead to different results if the study is repeated in the future. Finally, we have to mention threats related to human behavior. For instance, we can mention the ordering of the questions since one may provide context for the next one. Another threat is the attitude of the participants towards the topic of research. Their responses can introduce bias to make A NGULAR JS appear in a positive or negative light. We can mention the case of one participant who declared that he is a contributor of the A NGULAR JS project. Ocariza et al. (2015) proposed two types of inconsistencies that can be found in A NGULAR JS applications: (i) when identifiers used in one layer are undefined in the lower layer; and (ii) when values assigned to a variable, or returned by a function, do not match their type in the view. According to the authors, both inconsistencies are not easily caught during development and might cause bugs. However, in our survey, only 39% of the respondents considered that silent failures, corresponding to identifier inconsistency, are real problems in their daily development. Moreover, 84.5% of the respondents considered two-way data binding, which relates to type consistency, as a valuable feature. Both results shed light over real problems developers face when they use A NGULAR JS. 7. Conclusion This paper reported an empirical study about different aspects of A NGULAR JS based on opinions and experiences of developers. Our main contributions include the identification of the most appreciated features of A NGULAR JS (e.g., custom interface components, dependency injection, and twoway data binding) and the most problematic aspects of the framework (e.g., performance degradation and implementation of directives). Future work includes an analysis of the results using statistical tests. Interviews with A NGULAR JS developers can also contribute to strengthen our findings. Acknowledgments Our research is supported by FAPEMIG and CNPq. We also deeply thank the 460 developers who answered the survey. References B. Dobing and J. Parsons. How UML is used. Commununications of the ACM, 49(5):109–113, 2006. H. M. Kienle. It’s about time to take JavaScript (more) seriously. IEEE Software, 27(3):60–62, 2010. 6. Related Work Some works have been focusing on practitioners’ use of known technologies. Dobing and Parsons (2006) conducted the first survey on how UML diagrams are used by practitioners and their clients. The authors gathered 182 responses from analysts with average experience of 4.7 years in UML. Class diagrams are being used regularly by the majority of the respondents, followed by Sequence and Use Case diagrams. Some of the reasons why a UML diagram is not used vary from “not well understood by analysts” to “insufficient value to justify the cost”. In another study, Petre (2013) reported two years of interviews with practitioners. Most of them (35 out of 50) currently do not use UML at all, due to notation overhead, lack of context, etc. Both work highlight the complexity of UML. They also suggest that more tooling is needed for both newcomers and professionals in order to use the language more effectively. H. V. Nguyen, H. A. Nguyen, T. T. Nguyen, A. T. Nguyen, and T. N. Nguyen. Detection of embedded code smells in dynamic web applications. In 27th International Conference on Automated Software Engineering (ASE), pages 282–285, 2012. F. Ocariza, K. Pattabiraman, and A. Mesbah. Detecting inconsistencies in JavaScript MVC applications. In 37th International Conference on Software Engineering (ICSE), pages 325–335, 2015. M. Petre. UML in practice. In 35th International Conference on Software Engineering (ICSE), pages 722–731, 2013. L. Silva, M. Ramos, M. T. Valente, N. Anquetil, and A. Bergel. Does Javascript software embrace classes? In 22nd International Conference on Software Analysis, Evolution and Reengineering (SANER), pages 73–82, 2015. C. Wohlin, P. Runeson, M. Höst, M. C. Ohlsson, B. Regnell, and A. Wesslén. Experimentation in software engineering. Springer, 2012.
6cs.PL
A Framework in CRM Customer Lifecycle: Identify Downward Trend and Potential Issues Detection 1 2 1 2 2 Kun Hu , Zhe Li , Ying Liu , Luyin Cheng , Qi Yang , and Yan Li 2 Abstract Customer retention is one of the primary goals in the area of customer relationship management. A mass of work exists in which machine learning models or business rules are established to predict churn. However, targeting users at an early stage when they start to show a downward trend is a better strategy. In downward trend prediction, the reasons why customers show a downward trend is of great interest in the industry as it helps the business to understand the pain points that customers suffer and to take early action to prevent them from churning. A commonly used method is to collect feedback from customers by either aggressively reaching out to them or by passively hearing from them. However, it is believed that there are a large number of customers who have unpleasant experiences and never speak out. In the literature, there is limited research work that provides a comprehensive and scientific approach to identify these “silent suffers”. In this study, we propose a novel two-part framework: developing the downward prediction process and establishing the methodology to identify the reasons why customers are in the downward trend. In the first prediction part, we focus on predicting the downward trend, which is an earlier stage of the customer lifecycle compared to churn. In the second part, we propose an approach to figuring out the cause (of the downward trend) based on a causal inference method and semi-supervised learning. The proposed approach is capable of identifying potential silent sufferers. We take bad shopping experiences as inputs to develop the framework and validate it via a marketing A/B test in the real world. The test readout demonstrates the effectiveness of the framework by driving 88.5% incremental lift in purchase volume. Keywords Customer Relationship Management, Semi-supervised learning, Customer Retention, Downward Prediction 1 eBay Research & Engineering, Shanghai, China eBay e-Commerce, Shanghai, China Email Address: [email protected] (Kun Hu), [email protected] (Zhe Li), [email protected] (Ying Liu), [email protected] (Luyin Cheng), [email protected] (Qi Yang), [email protected] (Yan Li) 1 2 1. Introduction Customer retention is always one of the primary goals of the customer relationship management (CRM) field, because it brings direct value to the business (Chen and Popovich, 2003). However, in the customer lifecycle, some of the users churn for various reason. It is reasonable to try to “rescue” these churned customers since it is expensive to acquire new customers. An ideal approach to save customers is in the early stage, when they first shows a downward trend. To achieve this goal, two steps should be considered. The first one is to predict the propensity of the downward trend of a customer after a target length of time. Next, for a customer with a high propensity of a downward trend, we need to understand the cause of the issue. Depending on the cause, it is possible to execute personalized “rescue” plans – for instance, sending marketing messages, or providing incentives and relevant merchandise recommendations via multiple marketing channels. There is some of the existing work using machine-learning methods which predict churned customers who stop doing business with a company for a certain period of time (Kamalraj and Malathi, 2013; Almana and Aksoy et al., 2014). Support vector machines are applied in the churn prediction of newspaper subscribers (Coussement and Van den Poel, 2008). Churn prediction is also widely used in telecommunication industry (Wei and Chiu, 2002; Lee and Lee et al., 2017), e-commerce retailers (Subramanya and Somani, 2017), social network (Óskarsdóttir and Bravo et al., 2017) and online new media (Yuan and Bai et al., 2017). In addition, methods are proposed to improve prediction accuracy; for instance, handling of imbalanced data, which usually happens in the customer relationship management field due to lack of positive cases (Burez and Van den Poel, 2009; Xie and Li et al., 2009). Although a large amount of research exists which concentrates on user churn, customer downward trend prediction is quite different as the customers are still active. Currently, no widely accepted definition exists that identifies the targeted customers with a downward trend. Lack of existing research design drives a necessity to develop a method for exploring the cause of downward trend. In this work, we propose a framework to find the target population and causes, and making it possible for a company to address the issues implicitly or explicitly in their communication. We propose a scientific framework leveraging machine-learning methodology to manage the downward trend. To illustrate and demonstrate the methodology, we take an example of an e-commerce company. The framework consists of three parts. First, a methodology is proposed to identify customers who are in the downward trend. Second, supervised learning models are built to identify the customers who are in a downward trend. Finally, we leverage semi-supervised machine learning to learn the potential causes, which later we call “levers” of the downward trend, and find silent sufferers. We will use one common lever - bad customer experience (BCE) to develop and demonstrate the method. Traditionally, if there are enough samples labeled as BCE sufferers and non-BCE sufferers, the issue is easy to handle with supervised learning method. However, not all of the customers are willing to express their BCE and thus they are silent sufferers. Meanwhile, BCE counts can be high if the user has more activities, and it is hard to establish the correlation between BCE and downward trend. Proposing a 2 correct solution is crucial to rescuing these customers. In addition, we perform an A/B test to verify the performance of the model. 2. Methodology 2.1 Definition of Downward Trend In this section, we will introduce the definition of a downward trend of the customer lifecycle. A customer typically shows a downward trend in several aspects. In an e-commerce company, gross merchandise volume (GMV), bought item count (BI) and purchase days (PD) all are meaningful metrics to track customer status. For each of these metrics, we define the downward flag respectively by the norm box method. Fig 1. Downward Definition Take the GMV as an example. Since consumption varies among customers, it is more appropriate to observe the GMV trend per user, rather than observing the GMV trend of the all customers. Hence, for each user, we first compute the average of the GMV 𝜇 in the past 12 months along with its standard deviation 𝑠 before a specified target time when we plan to communicate with the customer. In the next month, if the GMV of the customer is under the lower bound, 𝜇 − 𝛼𝑠 then we flag the user as being in a downward trend. 𝛼 determines the sensitivity of the definition, i.e. a large 𝛼 indicates that we are less likely to classify a user as in the downward trend; 𝛼 should be tuned to match the business case and it is reasonable to use different 𝛼 values for different customer groups. Figure 1 illustrates the method used to define the downward flag. The dashed line is the average GMV of a customer in the past 12 months. The orange box is the norm box corresponding to the upper bound 𝜇 + 𝛼𝑠 and the lower bound th 𝜇 − 𝛼𝑠. If the user’s GMV in the 13 month is lower than the lower bound, then the user is in a downward trend. 3 2.2 Modelling the Downward Propensity Gradient Boosting Machine (GBM) is a widely used machine learning method for both regression and classification problems (Friedman, 2001). It shows strong performance in solving a wide range of practical applications (Natekin and Knoll, 2013). In this work, we leverage GBM to build binary classifiers to predict the downward trend of customers in the next month. If the user is in a downward trend per our definition, the class label is 1 (positive case); otherwise it is 0 (negative case). As mentioned in the previous section, three models are built for different downward detection goals, including GMV, BI and PD. The methodology is similar for the three metrics. Based on the purchase pattern of the customers, we divide the customers into frequent buyers (FB) and infrequent buyers (IB). We choose different norm box parameters 𝛼 to define the downward for FB and IB. Event rate is the percentage of the positive case and obviously is decided by the 𝛼. Generally, a proper 𝛼 should be choose to make the event rate fit with the specific business case. Table 1. Model Parameters Model Event Rate 𝛼 (FB) 𝛼 (IB) GMV BI PD 9.65% 5.45% 7.32% 1 1.5 1.25 0.75 1 1 We have around 200 candidate predictors belonging to multiple categories. We list some of them here:  Transaction: purchase date, item price, category seasonality, condition, quantity, shipping methods.  Bad buying experience history.  Contact frequency and engagement  Site behaviors: browse, bid, offer, watch, messages, cart, search, and dwell time.  Demographics, acquisition channel We first train rough GBM models using 200 trees and use a max depth of 5 for the 3 aspects. Based on the variable importance, we finalize the GBM model with 13 variables for each model in order to reduce the computing resource of the features while retaining acceptable prediction power. Table 2-4 shows the variables selected in each model. Table 2. Variable Importance of GMV Variable Description Importance Whether last month’s GMV is less than 0.75 std of previous 11 months’ GMV 1 Recent 30 days’ GMV ratio to past year 0.4221 Purchase days during past year 0.3543 Recent 180 days’ GMV ratio to past year 0.1746 Average of gap between purchase days in last month 0.0972 Last 30 days’ buying transactions ratio to past year 0.0961 Last 90 days’ GMV ratio to past year 0.0937 4 Medium of gap between purchase days 0.0928 Last 60 days’ GMV ratio to past year 0.0845 Standard deviation of gap between purchase days 0.0549 Whether last 3 months’ GMV is less than 0.75 std of previous 9 months GMV 0.0517 User country 0.0506 Whether last 2 months’ GMV is less than 0.75 std of previous 10 months GMV 0.0361 Table 3. Variable Importance of BI Variable Description Whether last month’s bought items is less than 1 std of previous 11 months’ bought items Importance 1 Average of gap between purchase days in last month 0.4387 Medium of gap between purchase days 0.3253 Standard deviation of gap between purchase days 0.2705 Last 180 days’ items purchased ratio to past year 0.2588 Purchase days during past year 0.2407 Last 30 days’ items purchased ratio to past year 0.2164 Last 90 days’ items purchased ratio to past year 0.204 Last year’s items purchased count 0.1049 Whether last 3 months’ bought items is less than 1 std of previous 9 months’ bought items 0.0776 Last 30 days’ buying transactions ratio to past year 0.0757 Last 60 days’ items purchased ratio to past year 0.0708 User country 0.0431 Table 4. Variable Importance of PD Variable Description Importance Purchase days during past year 1 Medium of gap between purchase days 0.64 Whether last month’s purchase days is less than 1 std of previous 11 months’ 0.6221 purchase days Average of gap between purchase days in last month 0.3376 Standard deviation of gap between purchase days 0.1687 Last 30 days’ buying transactions ratio to past year 0.1175 Medium of purchase days difference in last month 0.1003 User country 0.1001 Standard deviation of purchase days difference 0.0921 Whether last month’s bought items is less than 1 std of previous 11 months’ 0.0908 bought items Last 180 days’ buying transactions ratio to past year 0.0837 Average of purchase days difference 0.0572 Last 90 days’ buying transactions ratio to past year 0.0386 With the selected variables, we build GBM model for the three aspects using depths of 5 5 and 10. The detailed performance of the models can be found in Table 5. The performance is decent: the AUC is beyond 0.90 for all of these models. Figure 3 shows the log loss of GMV model along with the number of trees. 150 trees are efficient enough for prediction as the log loss no longer decreases dramatically. Comparing the 5-depth and 10-depth model, an obvious over-fitting issue can be observed in Figure 3 as the gap between the training and validation group. Meanwhile, there is no significant improvement with the 10-depth model. Thus, depth 5 model is selected as the final model. It is similar for the BI and PD models. Figure 3 shows the ROC curve and Precision-Recall (PR) Curve of the three final models. (a) Depth 5 (b) Depth 10 Figure 2. Log Loss of the GMV Model In order to use the output of each model in practice, it is suggested to split the users into buckets according to the deciles or percentiles of the prediction score rather than set a fixed cut-off to assign positive or negative flags to the population. If bucket information is available, then it is feasible to combine these three models into one ensemble model to predict the downward trend. Each customer gets three buckets of the models output respectively, say 𝑦𝐺𝑀𝑉 , 𝑦𝐵𝐼 , 𝑦𝑃𝐷 . If the goal is to find as many downward customers as possible, the 𝑚𝑎𝑥(𝑦𝐺𝑀𝑉 , 𝑦𝐵𝐼 , 𝑦𝑃𝐷 ) can be selected as the final bucket of that customer. Table 5. Model Performance Metrics Model # Tree depth AUC max f1 max min per class accuracy GMB 150 5 0.90 0.47 0.82 BI 150 10 0.90 0.47 0.82 6 150 5 0.91 0.36 0.83 PD 150 10 0.91 0.37 0.83 150 5 0.90 0.42 0.82 150 10 0.91 0.42 0.82 (a) ROC Curve (b) Precision-Recall Curve Figure 2. Propensity Model ROC Curve and PR Curve 2.3 Issue Detection In this section, we will propose a methodology to identify one or more downward levers, which result in a downtrend trend. Generally, multiple causes lead a customer to a downward trend. To illustrate the method, we mainly focus on the BCE issue as an example, but it is convenient to apply the methodology to address other issues. There are difficulties when considering some of the levers. Indeed, BCE issues are not negatively correlated with a downward trend in the whole population. The reason is that active customers tend to meet more BCE issues. The more transactions, the more chance a customer will have a BCE. Moreover, some of the customers are not bothered by the reported BCE because either the seller or customer service resolved the issue. Therefore, it is challenging but also crucial to find the real sufferers who behave downward due to a BCE. In addition, apart from customers who are willing to report their issues, there are a large group of BCE sufferers who choose not to speak out. Traditional business rules are not able to target them. 7 Fig 3. General Procedure of the Lever Detection Framework In order to accomplish the goal, we need to resolve two questions. The first question is how to find the genuine sufferers from the BCE reporters. We name the genuine sufferer group as the golden set. Casual inference is applied to establish the golden set. The second question is how to detect the silent sufferers given the golden set; we use a semi-supervised learning method to deal with this. Figure 3 shows the general procedure of the proposed approach. 2.3.1 Casual Inference and Golden Set To solve the first problem, we need to find a subset of the downward model population. The downward trend (GMV/BI/PD) of the customers in this subset is due to a BCE. Causal Inference is the theory of judging the relationship between two continuous variables. It helps to identify the cause or causes of a phenomenon (Shaughnessy and Zechmeister, 1985). For example, the method is used to detect casual signals within collections of static images (Lopez-Paz and Nishihara et al., 2016). In this work, we use the method to decide whether the BCE is the cause of the downward trend. First, per business knowledge and sense, we start from a small customer sample who are in downward score decile 7-10 and had a BCE on their last purchase day; we assume that they are real sufferers. Second, we try to demonstrate causality. Let X be the cumulative BCE count in the past; Y be the model decile (higher decile, higher likelihood to be downward). We do causal inference separately corresponding to the customer type, as the transactional behaviors of FB 8 and IB are quite different. It is expected to observe asymmetry where X can cause Y but Y cannot cause X. Table 6. Casual Inference Frequent Buyer Relationship 𝑌 ← 𝑓(𝑋) + 𝑒 𝑋 ← 𝑔(𝑌) + 𝑒 Coefficient 0.008 0.53 With CL 𝛂 = 𝟎. 𝟎𝟎𝟏 Pass Fail Infrequent Buyer Relationship 𝑌 ← 𝑓(𝑋) + 𝑒 𝑋 ← 𝑔(𝑌) + 𝑒 Coefficient 0.03 0.007 With CL 𝛂 = 𝟎. 𝟎𝟎𝟏 Pass Fail We list the linear regression results in the Table 6. It indicates that the asymmetry exists and the initial sample can be considered as Golden Set. For FB, with the confidence level 0.001, the casual inference suggests that the BCE is the cause of the downward trend; but the BCE reports is not the consequence of the downward trend. Similar conclusion can be induced for IB. 2.3.2 Semi-supervised Learning and Look-like Model We conclude that the customers in the Golden Set are the ones who suffered from BCE by causal inference. However, there must be additional customers who suffered from BCE but they did not report the issue. We here name them as silent sufferers. In this section, semisupervised learning theory is applied to find the silent sufferers. In some of the cases, labeled data is not enough to build a supervised learning model and handling the situation semisupervised learning is a potential solution (Zhu, 2005). For our case, we have a limited golden set; the rest are unknown labeled customers. An expectation–maximization (EM) algorithm is used in this work (Liu and Lee et al., 2002). The label of the Golden Set in a supervised learning fashion can be positive (i.e. 1). However, for the remainder of the users, we do not know their labels. Some of them are silent sufferers who should be also labeled as 1, while others are “normal” users and their labels should be 0. In order to label these unknown customers, semi-supervised learning technique is used in this section to solve the problem. 9 Fig 4. Initialize the Semi-supervised Learning Algorithm 1 Initialize parameters. Set label 𝑦𝑖 of golden set 𝐺 = {(𝑥𝑖 , 𝑦𝑖 )} as 1; mixed data set 𝑀 = {(𝑥𝑖 , 𝑦𝑖 )} as 0. Set the stop criteria 𝜃. Set the change rate 𝛽 = 1. Set the maximum iteration 𝑁. While 𝛽 > 𝜃 and 𝑘 < 𝑁 1 Randomly picking a subset 𝐺′ ⊂ 𝐺 set as spies. 2 Build binary classifier 𝑓𝑘 (𝑥) on the dataset 𝑀′ = 𝐺′ ∪ 𝑀. 3 Scoring the combined dataset 𝑀′ and update the labels on 𝑀′ . 4 Send the spies back to golden set and re-labeled them as 1. 5 𝑀 = 𝑀′\𝐺′ 6 Compute the label change rate 𝛽 on 𝑀. 7 𝑘 = 𝑘 + 1 Figure 4 illustrates the one iteration step of the learning procedure. In step 1, the Golden Set and the remainder of the unknown dataset are mixed without labels. We then set the initial labels of the unlabeled customers as all 0s. In step 2, we randomly select part of the positive samples as spies and combine with the mixed part. It is now feasible to train a supervised learning model to get a binary classifier, although it is biased due to the unknown labels of the mixed dataset. In step 3, send all the spies back to the Golden Set. For the remaining mixed part, use the binary classifiers to re-label all the samples utilizing a specified cut-off. Notice that after re-labeling, some of the samples change their labels. The overall label change rate can be referred as stop criteria. When the change rate is lower than the threshold, stop the iteration procedure. The detailed algorithm is organized in the To build the binary classifier in step 3, the variables are from the following aspects: BCE reports, customer service (call, online chat, email), help & FAQ page behaviors, buyer’s feedback to sellers, survey data, and behavioral features. The cut-off is selected by the max 10 𝐹1 scores in Step 3. F-score is used to trade off the precision and recall. It is possible to choose other cut-off such as 𝐹0.5 , 𝐹2 to fit with a different application (Li and Wang et al., 2008). 2.3.3 Evaluation It is difficult to tell the model performance on the mixed dataset since the true labels are all unknown. Nonetheless, the performance on the Golden Set still can be observed as a reasonable reference. In an ideal case, the model should classify all customers in the golden set as positive cases. We divide the golden set into two parts: one part is combined with the mixed set as a training set; the other is a holdout validation set. We check the accuracy on the hold out validation set via the binary classifier built in each iteration. We consider the accuracy as recall since it is similar to the original meaning of the concept. It is expected that the recall improves along with iteration. In addition, the label change rate on the mixed dataset should be stable after a sufficient number of iterations. (b) Recall of Validation Set on Max F1 of each iterative (a) Label change rate of the unknown dataset model Fig 6. Iteration Procedure of Trust Lever Figure 6 shows the iteration of the algorithm. As the recall tends to be stable and the label change rate is near to zero, we can conclude that iteration 11 is an ideal choice as the final model. In Table 7, we list the top five variables of the selected binary classifier. Table 7. Top five variables in the Trust Lever Semi-supervised Learning Model Variable Name Variable Type # of days since last defect Defect rate of pre 7 days(without late delivery) Defect rate of pre 1 year(without late delivery) BCE count of pre 1 year BCE BCE BCE BCE 11 # of days since last purchase Transaction 3. Model Performance In this section, we set up test to verify the correctness of the population selected by our framework and influence of the model in real business case. As the model targets the downward users caused by BCE, it is reasonable to reach them with an apology message about the customer experience. We launched an A/B campaign test in US and UK in Sep. 2017. Using the labels from model prediction, we chose 1,012 customers who were in the Golden Set or Silent Sufferers set. Next, we randomly separated those into test and control groups. For the test group, we sent each one an email to apologize. Details of the population can be found in Table 8. Table 8. Settings of the Campaign Control Test Grand Total # Golden Set 143 572 715 # Silent Suffers 55 242 297 Grand Total 198 814 1,012 After the campaign run date, the lift of GMV in the test group is 88.5% comparing with the control group. Through a two-sample t-test, which is used to determine if the means of two groups are equal (Jones, 1994), it suggests that the improvement of the test group comparing with the control group is significant with the confidence level α = 0.05. The decent lift indicates that we targeted the right population and got their positive feedback. 4. Discussion In this work, we propose a scientific framework to focus on the downward trend customers in the business, leveraging multiple machine-learning techniques. We first propose a method to define and detect the propensity of downward trend of customers, which becomes the foundation for the following step. Next, casual inference and semi-supervised learning are applied to find golden set and silent sufferers. In an A/B campaign test, we verify the performance of the model and ensure the effectiveness of the model. The casual inference and semi-supervised learning part are adapted to other stages of customer lifecycle as well, including churn, early churn and one-and-only-one-transaction cases. For lever detection in this study, we build and test the frame on the BCE lever. However, other levers such as spend capacity are also worth efforts. Moreover, we introduce the methodology in an e-commerce business background. It is effortless to apply in other business areas. For instance, in the telecommunication industry, we can use the variables such as call quality, device type, and count of the text message sent among others to develop the 12 framework. We will focus on improving performance and extend to other CRM application scenarios. 13 References: Almana, A. M. and M. S. Aksoy, et al. (2014). "A survey on data mining techniques in customer churn analysis for telecom industry." Journal of Engineering Research and Applications 4 (5): 165-171. Burez, J. and D. Van den Poel (2009). "Handling class imbalance in customer churn prediction." Expert Systems with Applications 36 (3): 4626-4636. Chen, I. J. and K. Popovich (2003). "Understanding customer relationship management (CRM) People, process and technology." Business process management journal 9 (5): 672-688. Coussement, K. and D. Van den Poel (2008). "Churn prediction in subscription services: An application of support vector machines while comparing two parameter-selection techniques." Expert systems with applications 34 (1): 313-327. Friedman, J. H. (2001). "Greedy function approximation: a gradient boosting machine." Annals of statistics: 1189-1232. Kamalraj, N. and A. Malathi (2013). "A survey on churn prediction techniques in communication sector." International Journal of Computer Applications 64 (5). Lee, E. and E. Lee, et al. (2017). "Predicting customer churn in mobile industry using data mining technology." Industrial Management & Data Systems 117 (1): 90-109. Li, X. and Y. Wang, et al. (2008). Learning query intent from regularized click graphs. Proceedings of the 31st annual international ACM SIGIR conference on Research and development in information retrieval, ACM. Liu, B. and W. S. Lee, et al. (2002). Partially supervised classification of text documents. ICML. Lopez-Paz, D. and R. Nishihara, et al. (2016). "Discovering causal signals in images." arXiv preprint arXiv:1605.08179. Natekin, A. and A. Knoll (2013). "Gradient boosting machines, a tutorial." Frontiers in neurorobotics 7. Óskarsdóttir, M. and C. Bravo, et al. (2017). "Social network analytics for churn prediction in telco: Model building, evaluation and network architecture." Expert Systems with Applications 85: 204-220. Shaughnessy, J. J. and E. B. Zechmeister (1985). Research methods in psychology., Alfred A. Knopf. Subramanya, K. B. and A. Somani (2017). Enhanced feature mining and classifier models to predict customer churn for an E-retailer. Cloud Computing, Data Science & Engineering-Confluence, 2017 7th International Conference on, IEEE. Wei, C. and I. Chiu (2002). "Turning telecommunications call details to churn prediction: a data mining approach." Expert Systems with Applications 23 (2): 103-112. Xie, Y. and X. Li, et al. (2009). "Customer churn prediction using improved balanced random forests." Expert Systems with Applications 36 (3): 5445-5449. Yuan, S. and S. Bai, et al. (2017). Customer Churn Prediction in the Online New Media Platform: A Case Study on Juzi Entertainment. Platform Technology and Service (PlatCon), 2017 International Conference on, IEEE. Zhu, X. (2005). "Semi-supervised learning literature survey.". 14
2cs.AI
Spatially Controlled Relay Beamforming: 2-Stage Optimal Policies arXiv:1705.07463v1 [math.OC] 21 May 2017 Dionysios S. Kalogerias and Athina P. Petropulu May 2017 Abstract The problem of enhancing Quality-of-Service (QoS) in power constrained, mobile relay beamforming networks, by optimally and dynamically controlling the motion of the relaying nodes, is considered, in a dynamic channel environment. We assume a time slotted system, where the relays update their positions before the beginning of each time slot. Modeling the wireless channel as a Gaussian spatiotemporal stochastic field, we propose a novel 2-stage stochastic programming problem formulation for optimally specifying the positions of the relays at each time slot, such that the expected QoS of the network is maximized, based on causal Channel State Information (CSI) and under a total relay transmit power budget. This results in a schema where, at each time slot, the relays, apart from optimally beamforming to the destination, also optimally, predictively decide their positions at the next time slot, based on causally accumulated experience. Exploiting either the Method of Statistical Differentials, or the multidimensional Gauss-Hermite Quadrature Rule, the stochastic program considered is shown to be approximately equivalent to a set of simple subproblems, which are solved in a distributed fashion, one at each relay. Optimality and performance of the proposed spatially controlled system are also effectively assessed, under a rigorous technical framework; strict optimality is rigorously demonstrated via the development of a version of the Fundamental Lemma of Stochastic Control, and, performance-wise, it is shown that, quite interestingly, the optimal average network QoS exhibits an increasing trend across time slots, despite our myopic problem formulation. Numerical simulations are presented, experimentally corroborating the success of the proposed approach and the validity of our theoretical predictions. Keywords. Spatially Controlled Relay Beamforming, Mobile Relay Beamforming, Network Mobility Control, Network Utility Optimization, QoS Maximization, Motion Control, Distributed Cooperative Networks, Stochastic Programming. The Authors are with the Department of Electrical & Computer Engineering, Rutgers, The State University of New Jersey, 94 Brett Rd, Piscataway, NJ 08854, USA. e-mail: {d.kalogerias, athinap}@rutgers.edu. This work is supported by the National Science Foundation (NSF) under Grants CCF-1526908 & CNS-1239188. Also, this work constitutes an extended preprint of a two part paper (soon to be) submitted for publication to the IEEE Transactions on Signal Processing in Spring/Summer 2017. 1 Contents 1 Introduction 2 2 System Model 6 3 Spatiotemporal Wireless Channel Modeling 3.1 Large Scale Gaussian Channel Modeling in the dB Domain . . . . . . . . . . . . . . 3.2 Model Justification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Extensions & Some Technical Considerations . . . . . . . . . . . . . . . . . . . . . . 7 8 10 11 4 Spatially Controlled Relay Beamforming 15 4.1 Joint Scheduling of Communications & Controls . . . . . . . . . . . . . . . . . . . . 15 4.2 2-Stage Stochastic Optimization of Beamforming Weights and Relay Positions: Base Formulation & Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.3 SINR Maximization at the Destination . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.3.1 Approximation by the Method of Statistical Differentials . . . . . . . . . . . 23 4.3.2 Brute Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4 Theoretical Guarantees: Network QoS Increases Across Time Slots . . . . . . . . . . 28 5 Numerical Simulations & Experimental Validation 33 6 Conclusions 36 7 Acknowledgments 36 8 Appendices 8.1 Appendix A: Proofs / Section 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 Proof of Lemma 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.2 Proof of Theorem 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 Appendix B: Measurability & The Fundamental Lemma of Stochastic Control . . 8.2.1 Random Functions & The Substitution Rule for Conditional Expectations 8.2.2 A Base Form of the Lemma . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.3 Guaranteeing the Existence of Measurable Optimal Controls . . . . . . . 8.2.4 Fusion & Derivation of Conditions C1-C6 . . . . . . . . . . . . . . . . . . 8.3 Appendix C: Proofs / Section 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.1 Proof of Theorem 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.2 Proof of Lemma 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.3 Proof of Theorem 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.3.4 Proof of Theorem 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . 37 37 37 38 39 40 45 53 55 56 56 62 63 63 Introduction Distributed, networked communication systems, such as relay beamforming networks [1–7] (e.g., Amplify & Forward (AF)) are typically designed without explicitly considering how the positions of the networking nodes might affect the quality of the communication. Optimum physical placement of assisting networking nodes, which could potentially improve the quality of the communication, 2 does not constitute a clear network design aspect. However, in most practical settings in physical layer communications, the Channel State Information (CSI) observed by each networking node, per channel use, although (modeled as) random, it is both spatially and temporally correlated. It is, therefore, reasonable to ask if and how system performance could be improved by controlling the positions of certain network nodes, based on causal side information, and exploiting the spatiotemporal dependencies of the wireless medium. Recently, autonomous node mobility has been proposed as an effective means to further enhance performance in various distributed network settings. In [8], optimal transmit AF beamforming has been combined with potential field based relay mobility control in multiuser cooperative networks, in order to minimize relay transmit power, while meeting certain Quality-of-Service (QoS) constraints. In [9], in the framework of information theoretic physical layer security, decentralized jammer motion control has been jointly combined with noise nulling and cooperative jamming, maximizing the network secrecy rate. In [10], optimal relay positioning has been studied in systems where multiple relays deliver information to a destination, in the presence of an eavesdropper, with a goal of maximizing or achieving a target level of ergodic secrecy. In the complementary context of communication aware (comm-aware) robotics, node mobility has been exploited in distributed robotic networks, in order to enhance system performance, in terms of maintaining reliable, in-network communication connectivity [11–14], and optimizing network energy management [15]. Networked node motion control has also been exploited in special purpose applications, such as networked robotic surveillance [16] and target tracking [17]. In [8–10], the links among the nodes of the network (or the related statistics) are assumed to be available in the form of static channel maps, during the whole motion of the jammers/relays. However, this is an oversimplifying assumption in scenarios where the channels change significantly in time and space [18–20]. In this paper, we try to overcome this major limitation, and we consider the problem of optimally and dynamically updating relay positions in one source/destination relay beamforming networks, in a dynamic channel environment. Different from [8–10], we model the wireless channel as a spatiotemporal stochastic field ; this approach may be seen as a versatile extension of a realistic, commonly employed “log-normal” channel model [20]. We then propose a 2-stage stochastic programming problem formulation, optimally specifying the positions of the relays at each time slot, such that the Signal-to-Interference+Noise Ratio (SINR) or QoS at the destination, at the same time slot, is maximized on average, based on causal CSI, and subject to a total power constraint at the relays. At each time slot, the relays not only beamform to the destination, but also optimally, predictively decide their positions at the next time slot, based on their experience (causal actions and channel observations). This novel, cyber-physical system approach to relay beamforming is termed as Spatially Controlled Relay Beamforming. Exploiting the assumed stochastic channel structure, it is first shown that the proposed optimal motion control problem is equivalent to a set of simpler, two dimensional subproblems, which can be solved in a distributed fashion, one at each relay, without the need for intermediate exchange of messages among the relays. However, each of the objectives of the aforementioned subproblems involves the evaluation of a conditional expectation of a well defined ratio of almost surely positive random variables, which is impossible to perform analytically, calling for the development of easily implementable approximations to each of the original problems. Two such heuristics are considered. The first is based on the so-called Method of Statistical Differentials [21], whereas the second constitutes a brute force approach, based on the multidimensional Gauss-Hermite Quadrature Rule, a readily available routine for numerical integration. In both cases, the original problem objective is 3 replaced by the respective approximation, which, in both cases, is shown to be easily computed via simple, closed form expressions. The computational complexity of both approaches is also discussed and characterized. Subsequently, we present an important result, along with the respective detailed technical development, characterizing the performance of the proposed system, across time slots (Theorems 6 and 7). In a nutshell, this result states that, although our problem objective is itself myopic at each time slot, the expected network QoS exhibits an increasing trend across time slots (in other words, the expected QoS increases in time, within a small positive slack), under optimal decision making at the relays. Lastly, we present representative numerical simulations, experimentally confirming both the efficacy and feasibility of the proposed approach, as well as the validity of our theoretical predictions. During exposition of the proposed spatially controlled relay beamforming system, we concurrently develop and utilize a rigorous discussion concerning the optimality of our approach, and with interesting results (Section 8.2 / Appendix B). Clearly, our problem formulation is challenging; it involves a variational stochastic optimization problem, where, at each time slot, the decision variable, a function of the so far available useful information in the system (also called a policy, or a decision rule), constitutes itself the spatial coordinates, from which every network relay will observe the underlying spatiotemporal channel field, at the next time slot. In other words, our formulation requires solving an (myopic, in particular) optimal spatial field sampling problem, in a dynamic fashion. Such a problem raises certain fundamental questions, not only related to our proposed spatially controlled beamforming formulation, but also to a large class of variational stochastic programs of similar structure. In this respect, our contributions are partially driven by assuming an underlying complete base probability space of otherwise arbitrary structure, generating all random phenomena considered in this work. Under this general setting, we explicitly identify sufficient conditions, which guarantee the validity of the so-called substitution rule for conditional expectations, specialized to such expectations of random spatial (in general) fields/functions with an also random spatial parameter, relative to some σ-algebra, which makes the latter parameter measurable (fixed) (Definition 6 & Theorem 8). General validity of the substitution rule, without imposing additional, special conditions, traces back to the existence of regular conditional distributions, defined directly on the sample space of the underlying base probability space. Such regular conditional distributions cannot be guaranteed to exist, unless the sample space has nice topological properties, for instance, if it is Polish [22]. In the context of our spatially controlled beamforming application, such structural requirements on the sample space, which, by assumption, is conceived as a model of “nature”, and generates the spatiotemporal channel field sampled by the relays, are simply not reasonable. Considering this, our first contribution is to show that it is possible to guarantee the validity of the form of the substitution rule under consideration by imposing conditions on the topological structure of the involved random field, rather than that of the sample space (a part of its domain). This results in a rather generally applicable problem setting (Theorem 8). In this work, the validity of the substitution rule is ascertained by imposing simple continuity assumptions on the random functions involved, which, in some cases, might be considered somewhat restrictive. Nevertheless, those assumptions can be significantly weakened, guaranteeing the validity of the substitution rule for vastly discontinuous random functions, including, for instance, cases with random discontinuities, or random jumps. The development of this extended analysis, though, is out of the scope of this paper, and will be presented elsewhere. The validity of the substitution rule is vitally important in the treatment of a wide class of variational stochastic programs, including that involved in the proposed spatially controlled beamforming 4 approach. In particular, leveraging the power of the substitution rule, we develop a version of the so-called Fundamental Lemma of Stochastic Control (FLSC) [23–28] (Lemma 3), which provides sufficient conditions that permit interchange of integration (expectation) and max/minimization in general variational (stochastic) programming settings. The FLSC allows the initial variational problem to be exchanged by a related, though pointwise (ordinary) optimization problem, thus efficiently reducing the search over a class of functions (initial problem) to searching over constants, which is, of course, a standard and much more handleable optimization setting. In slightly different ways, the FLSC is evidently utilized in relevant optimality analysis both in Stochastic Programming [25, 26], and in Dynamic Programming & Stochastic Optimal Control [23, 24, 27, 28]. A very general version of the FLSC is given in ([25], Theorem 14.60), where unconstrained variational optimization of integrals of extended real-valued random lower semicontinuous functions [26], or, by another name, normal integrands [25], with respect to a general σ-finite measure, is considered. Our version of the FLSC may be considered a useful variation of Theorem 14.60 in [25], and considers constrained variational optimization problems involving integrals of random functions, but with respect to some base probability measure (that is, expectations). In our result, via the tower property of expectations, the role of the normal integrand in ([25], Theorem 14.60) is played by the conditional expectation of the random function considered, relative to a σ-algebra, which makes the respective decision variable of the problem (a function(al)) measurable. Assuming a base probability space of arbitrary structure, this argument is justified by assuming validity of the substitution rule, which, in turn, is ascertained under our previously developed sufficient conditions. Different from ([25], Theorem 14.60), in our version of the FLSC, apart from natural Borel measurability requirements, no continuity assumptions are directly imposed on the structure on either the random function, or the respective conditional expectation. In this respect, our result extends ([25], Theorem 14.60), and is of independent interest. On the other hand, from the strongly related perspective of Stochastic Optimal Control, our version of the FLSC may be considered as the basic building block for further development of Bellman Equation-type, Dynamic Programming solutions [27, 28], under a strictly Borel measurability framework, sufficient for our purposes. Quite differently though, in our formulation, the respective cost (at each stage of the problem) is itself a random function (a spatial field), whose domain is the Cartesian product of a base space of arbitrary topology, with another, nicely behaved Borel space, instead of the usual Cartesian product of two Borel spaces (the spaces of state and controls), as in the standard dynamic programming setting [27, 28]. Essentially, our formulation is “one step back” as compared to the basic dynamic programming model of [27, 28], in the sense that the cost considered herein refers directly back to the base space. As a result, different treatment of the problem is required; essentially, the validity of the substitution rule for our cost function bypasses the requirement for existence of conditional distributions, and exploits potential nice properties of the respective conditional cost (in our case, joint Borel measurability). Emphasizing on our particular problem formulation, our functional assumptions, which guarantee the validity of the substitution rule, combined with the FLSC, result in a total of six sufficient conditions, under which strict optimality via problem exchangeability is guaranteed (conditions C1-C6 in Lemma 4). Those conditions are subsequently shown to be satisfied specifically for the spatially controlled beamforming problem under consideration (verification Theorem 3), ensuring strict optimality of a solution obtained by exploiting problem exchangeability. Finally, motivated by the need to provide performance guarantees for the proposed myopic stochastic decision making scheme (our spatially controlled beamforming network), we introduce the concept of a linear martingale difference generator spatiotemporal field. We then rigorously 5 show that, when such fields are involved in the objective of a myopic stochastic sampling scheme, stagewise myopic stochastic exploration of the involved field is, under conditions, either monotonic, or quasi-monotonic (that is, monotonic within some small positive slack), either under optimal sampling decision making, or when retaining the same policy next. This result is the basis for providing performance guarantees for the proposed spatially controlled relay beamforming system, as briefly stated above. Notation (some and basic): Matrices and vectors will be denoted by boldface uppercase and boldface lowercase letters, respectively. Calligraphic letters and formal script letters will denote sets and σ-algebras, respectively. The operators (·)T and (·)H , λmin (·) and λmax (·) will denote transposition, conjugate transposition, minimum and maximum eigenvalue, respectively. The `p P 1/p norm of x ∈ Rn is kxkp , ( ni=1 |x (i)|p ) , for all N 3 p ≥ 1. For any N 3 N ≥ 1, SN , SN +, SN ++ will denote the sets of symmetric, symmetric positive semidefinite and symmetric positive definite matrices, respectively. √The finite N -dimensional identity operator will be denoted as IN . + Additionally, we define J , −1, N+ , {1, 2, . . .}, N+ n , {1, 2, . . . , n}, Nn , {0} ∪ Nn and + + Nm n , Nn \ Nm−1 , for positive naturals n > m. 2 System Model On a compact, square planar region W ⊂ R2 , we consider a wireless cooperative network consisting of one source, one destination and R ∈ N+ assistive relays, as shown in Fig. 2.1. Each entity of the network is equipped with a single antenna, being able for both information reception and broadcasting/transmission. The source and destination are stationary and located at pS ∈ W and pD ∈ W, respectively, whereas the relays are assumed to be mobile; each relay i ∈ N+ R moves along a trajectory pi (t) ∈ S ⊂ W − {pS , pD } ⊂ W, where, in general, t ∈ R+ , and where S is compact. h iT We also define the supervector p (t) , pT1 (t) pT2 (t) . . . pTR (t) ∈ S R ⊂ R2R×1 . Additionally, we assume that the relays can cooperate with each other, either by exchanging local messages, or by communicating with a local fusion center, through a dedicated channel. Hereafter, as already stated above, all probabilistic arguments made below presume the existence of a complete base probability space of otherwise completely arbitrary structure, prespecified by a triplet (Ω, F , P). This base space models a universal source of randomness, generating all stochastic phenomena in our considerations. Assuming that a direct link between the source and the destination does not exist, the role of the relays is determined to be assistive to the communication, operating in a classical, two phase AF relaying mode. Fix a T > 0, and divide the time interval [0, T ] into NT time slots, with t ∈ N+ NT n o 2 denoting the respective time slot. Let s (t) ∈ C, with E |s (t)| ≡ 1, denote the symbol to be transmitted at time slot t. Also, assuming a flat fading channel model, as well as channel reciprocity and quasistaticity in each time slot, let the sets {fi (t) ∈ C}i∈N+ and {gi (t) ∈ C}i∈N+ contain the R R random, spatiotemporally varying source-relay and relay-destination channel gains, respectively. These are further assumed to be evaluations of the separable random channel fields or maps f (p, t) and g (p, t), respectively, that is, fi (t) ≡ f (pi (t) , t) and gi (t) ≡ g (pi (t) , t), for all i ∈ N+ R and for all t ∈ N+ . Then, if P > 0 denotes the transmission power of the source, during AF phase 1, the 0 NT signals received at the relays can be expressed as p ri(t), P0 fi(t) s(t) + ni(t) ∈ C, (2.1) 6 Source pS f( f p j ) , t) t ( pi (t)  ,t g (p i pi (t) g pj pj (t) (t) , Destination t)  t (t) , pD S⊂W W ⊂ R2 Figure 2.1: A schematic of the system model considered. n o + 2 for all i ∈ N+ and for all t ∈ N , where n (t) ∈ C, with E |n (t)| ≡ σ 2 , constitutes a zero i i R NT mean observation noise process at the i-th relay, independent across relays. During AF phase 2, all relays simultaneously retransmit the information received, each modulating their received signal by a weight wi (t) ∈ C, i ∈ N+ R . The signal received at the destination can be expressed as p X y (t), P0 wi(t) gi(t) ri(t) + i∈NR ≡ X p X P0 wi(t) gi(t) fi(t) s(t) + wi(t) gi(t) ni(t) + nD (t) ∈ C, | + i∈NR {z signal (transformed) } + i∈NR | {z interference + reception noise (2.2) } n o + 2 2 for all i ∈ N+ ≡ σD , constitutes a zero mean, R and t ∈ NNT , where nD (t) ∈ C, with E |nD (t)| spatiotemporally white noise process at the destination. In the following, it is assumed that the channel fields f (p, t) and g (p, t) may be statistically dependent both spatially and temporally, and that, as usual, the processes s (t), [f (p, t) g (p, t)], ni (t) for all i ∈ N+ R , and nD (t) are mutually independent. Also, we will assume that, at each time slot t, CSI {fi (t)}i∈N+ and {gi (t)}i∈N+ is known exactly to all relays. This may be achieved through R R pilot based estimation. 3 Spatiotemporal Wireless Channel Modeling This section introduces a general stochastic model for describing the spatiotemporal evolution of the wireless channel. For the benefit of the reader, a more intuitive justification of this general model is also provided. Additionally, some extensions to the model are briefly discussed, highlighting its versatility, along with some technical considerations, which will be of importance later, for analyzing the theoretical consistency of the subsequently proposed techniques. 7 3.1 Large Scale Gaussian Channel Modeling in the dB Domain At each space-time point (p, t) ∈ S × N+ NT , the source-relay channel field may be decomposed as the product of three space-time varying components [29], as f (p, t) ≡ f P L(p) f SH (p, t) f M F (p, t) eJ | {z } | {z } | {z } path loss shadowing 2π kp−pS k 2 λ , (3.1) fading √ where J , −1 denotes the imaginary unit, λ > 0 denotes the wavelength employed for the communication, and: −`/2 1. f P L (p) , kp − pS k2 loss exponent. is the path loss field, a deterministic quantity, with ` > 0 being the path 2. f SH (p, t) ∈ R is the shadowing field, whose square is, for each (p, t) ∈ S × N+ NT , a base-10 log-normal random variable with zero location. 3. f M F (p, t) ∈ C constitutes the multipath fading field, a stationary process with known statistics. The same decomposition holds in direct correspondence for the relay-destination channel field, g (p, t). Additionally, if “⊥ ⊥” means “is statistically independent of”, it is assumed that [20] h i h i f M F (p, t) g M F (p, t) ⊥⊥ f SH (p, t) g SH (p, t) and (3.2) f M F (p, t) ⊥⊥ g M F (p, t) . (3.3) In particular, if the phase of f M F (p, t) is denoted as φf (p, t) ∈ [−π, π], is further assumed that f M F (p, t) ⊥⊥ φf (p, t) , (3.4) and the same for for g M F (p, t). It also follows that h i h i f M F (p, t) g M F (p, t) ⊥⊥ f SH (p, t) g SH (p, t) . (3.5) We are interested in the magnitudes of both fields f (p, t) and g (p, t). Instead of working with the multiplicative model described by (3.1), it is much preferable to work in logarithmic scale. We may define the log-scale magnitude field F (p, t) , αS (p) ` + σS (p, t) + ξS (p, t) , (3.6) where we define −αS (p) , 10 log10 (kp − pS k2 ) ,  2 σS (p, t) , 10 log10 f SH (p, t) 2 (3.7) and ξS (p, t) , 10 log10 f M F (p, t) − ρ, with   2 ρ , E 10 log10 f M F (p, t) , 8 (3.8) (3.9) (3.10) for all (p, t) ∈ S ×N+ NT . It is then trivial to show that the magnitude of f (p, t) may be reconstructed via the bijective formula   log (10) ρ/20 |f (p, t)| ≡ 10 exp F (p, t) , (3.11) 20 for all (p, t) ∈ S × N+ NT , a “trick” that will prove very useful in the next section. Regarding g (p, t), the log-scale field G (p, t) is defined in the same fashion, but replacing the subscript “S” by “D”. For each relay i ∈ N+ R , let us define the respective log-scale channel magnitude processes Fi (t) , F (pi (t) , t) and Gi (t) , G (pi (t) , t), for all t ∈ N+ NT . Of course, we may stack all the Fi (t)’s defined in (3.6), resulting in the vector additive model F (t) , αS (p (t)) ` + σ S (t) + ξ S (t) ∈ RR×1 , (3.12) where αS (t), σ S (t) and ξ S (t) are defined accordingly. We can also define G (t) , αD (p (t)) ` + σ D (t) + ξ D (t) ∈ RR×1 , with each quantity in direct correspondence with (3.12). We may also i define, in the same manner, the log-scale shadowing and multipath fading processes σS(D) (t) , i + σS(D) (pi (t) , t) and ξS(D) (t) , ξS(D) (pi (t) , t), for all t ∈ NNT , respectively. Next, let us focus on the spatiotemporal dynamics of {|fi (t)|}i and {|gi (t)|}i , which are modeled through those of the shadowing components of {Fi (t)}i and {Gi (t)}i . It is assumed that, for any NT and any deterministic ensemble of positions of the relays in N+ NT , say {p (t)}t∈N+ , the random vector NT h iT F T (1) GT (1) . . . F T (NT ) GT (NT ) ∈ R2RNT ×1 (3.13) is jointly Gaussian with known means and   known covariance matrix.  More specifically, on a per i.i.d. i.d. 2 i 2 + i node basis, we let ξS(D) (t) ∼ N 0, σξ and σS(D) (t) ∼ N 0, η , for all t ∈ N+ NT and i ∈ NR [20, 30]. In particular, extending Gudmundson’s model [31] in a straightforward way, we propose defining the spatiotemporal correlations of the shadowing part of the channel as ! n o pi (k) − pj (l) 2 |k − l| i j 2 E σS (k) σS (l) , η exp − − , (3.14) β γ and correspondingly for n o i σD (t) + i∈NR , and additionally,   n o n o kpS − pD k2 i j i j E σS (k) σD (l) , E σS (k) σS (l) exp − , δ (3.15) + + + 2 for all (i, j) ∈ N+ R × NR and for all (k, l) ∈ NNT × NNT . In the above, η > 0 and β > 0 are called the shadowing power and the correlation distance, respectively [31]. In this fashion, we will call γ > 0 and δ > 0 the correlation time and the BS (Base Station) correlation, respectively. For later reference, let us define the (cross)covariance matrices n o ΣSD (k, l) , E σ S (k) σ TD (l) + 1{S≡D} 1{k≡l} σξ2 IR ∈ SR , (3.16) as well as Σ (k, l) ,   ΣSS (k, l) ΣSD (k, l) ∈ S2R , ΣSD (k, l) ΣDD (k, l) 9 (3.17) Source f( t) , ) t pi( pS cl a t bs O l e ca i s y Destination Ph pi (t) g pj pj (t)  t (t) , pD W ⊂ R2 Figure 3.1: A case where source-relay and relay-destination links are likely to be correlated. + for all (k, l) ∈ N+ NT × NNT . Using these definitions, the covariance matrix of the joint distribution describing (3.13) can be readily expressed as   Σ (1, 1) Σ (1, 2) . . . Σ (1, NT )  Σ (2, 1) Σ (2, 2) . . . Σ (2, NT )    2RNT Σ, . (3.18) ∈S .. .. .. . .   . . . . Σ (NT , 1) Σ (NT , 2) · · · Σ (NT , NT ) Of course, in order for Σ to be a valid covariance matrix, it must be at least positive semidefinite, 2RN that is, in S+ T . If fact, for nearly all cases of interest, Σ is guaranteed to be strictly positive 2RN definite (or in S++ T ), as the following result suggests. Lemma 1. (Positive (Semi)Definiteness of Σ) For all possible deterministic trajectories of the 2RNT 2RNT 2 relays on S R × N+ . In NT , it is true that Σ ∈ S++ , as long as σξ 6= 0. Otherwise, Σ ∈ S+ other words, as long as multipath (small-scale) fading is present in the channel response, the joint Gaussian distribution of the channel vector in (3.13) is guaranteed to be nonsingular. Proof of Lemma 1. See Appendix A. 3.2  Model Justification As already mentioned, the spatial dependence among the source-relay and relay-destination channel magnitudes (due to shadowing) is described via Gudmundson’s model [31] (position related component in (3.14)), which has been very popular in the literature and also experimentally verified 10 [20, 31, 32]. Second, the Laplacian type of temporal dependence among the same groups of channel magnitudes also constitutes a reasonable choice, in the sense that channel magnitudes are expected to be significantly correlated only for small time lags, whereas, for larger time lags, such dependence should decay at a fast rate. For an experimental justification of the adopted model, see, for instance, [33, 34]. Also note that, this exponential temporal correlation model may result as a reformulation of Gudmundson’s model, as well. Of course, one could use any other positive (semi)definite kernel, multiplying the spatial correlation exponential kernel, without changing the statement and proof of Lemma 1. Third, the incorporation of the spherical/isotropic BS correlation term in our proposed general model (in (3.15)) can be justified by the the existence of important cases where the source and destination might be close to each other and yet no direct link may exist between them. See, for instance, Fig. (3.1), where a “large” physical obstacle makes the direct communication between the source and the destination impossible. Then, relay beamforming can be exploited in order to enable efficient communication between the source and the destination, making intelligent use of the available resources, in order to improve or maintain a certain QoS in the network. In such cases, however, it is very likely that the shadowing parts of the source-relay and relay-destination links will be spatially and/or temporally correlated among each other, since shadowing is very much affected by the spatial characteristics of the terrain, which, in such cases, is common for both beamforming phases. Of course, by taking the BS station correlation δ → 0, one recovers the generic/trivial case where the source-relay and relay-destination links are mutually independent. 3.3 Extensions & Some Technical Considerations It should be also mentioned that our general description of the wireless channel as a spatiotemporal Gaussian field, does not limit the covariance matrix Σ to be formed as in (3.18); other choices for Σ will work fine in our subsequent developments, as long as, for each fixed t ∈ N+ NT , some mild conditions on the spatial interactions of the fields σS(D) (p, t) and ξS(D) (p, t), are satisfied. In what follows, we consider only the source-relay fields σS (p, t) and ξS (p, t). The same arguments hold for the relay-destination fields σD (p, t) and ξD (p, t), in direct correspondence. Fix t ∈ N+ NT . Recall that, so far, we have defined the statistical behavior of both σS (p, t) and ξS (p, t) only on a per-node basis. However, since the spatiotemporal statistical model introduced in Section 3.1 is assumed to be valid for any possible trajectory of the relays in S R × N+ NT , each relay is allowed to be anywhere in S, at each time slot t. This statistical construction induces the statistical structure (the laws) of both fields σS (p, t) and ξS (p, t) on S. As far as σS (p, t) is concerned, it is straightforward to see that it constitutes a Gaussian process with zero mean, and a continuous and isotropic covariance kernel Σσ : R2 → R, defined as   kτ k2 2 Σσ (τ ) , η exp − , (3.19) β where τ , p − q ≥ 0, for all (p, q) ∈ S 2 , which agrees with the model introduced in (3.14), for k ≡ l (Gudmundson’s model). Thus, σS (p, t) is a well defined random field. However, this is not the case with ξS (p, t). Under no additional restrictions, ξS (p, t) and ξS (q, t) are implicitly assumed to be independent for all (p, q) ∈ S 2 , such that p 6= q. Thus, we are led to consider ξS (p, t) as a zero-mean white process in continuous space. However, it is well known that such a process is technically problematic in a measure theoretic framework. Nevertheless, we may observe that it is not actually essential to characterize the covariance structure of ξS (p, t) for all (p, q) ∈ S 2 , with p 6= q. This is due to the fact that, at each time slot t ∈ N+ NT , it is physically 11 impossible for any two relays to be arbitrarily close to each other. We may thus make the following simple assumption on the positions of the relays, at each time slot t ∈ N+ NT . Assumption 1. (Relay Separation) There exists an εM F > 0, such that, for all t ∈ N+ NT and any ensemble of relay positions at time slot t, {pi (t)}i∈N+ , it is true that R inf + + (i,j)∈NR ×NR with i6=j pi (t) − pj (t) 2 > εM F . (3.20) Assumption 1 simply states that, at each t ∈ N+ NT , all relays are at least εM F distance units apart from each other. If this constraint is satisfied, then, without any loss of generality, we may define ξS (p, t) as a Gaussian field with zero mean, and with any continuous, isotropic (say) covariance kernel Σξ : R2 → R, which satisfies ( σξ2 , if τ ≡ 0 Σξ (τ ) , , (3.21) 0, if kτ k2 ≥ εM F and is arbitrarily defined otherwise. A simple example is the spherical, compactly supported kernel with width εM F , defined as [35]     3 kτ k2 1 kτ k2 3 Σo (τ ) 1 − + , if kτ k2 < εM F . (3.22) , 2 εM F 2 εM F 2  σξ 0, if kτ k2 ≥ εM F Of course, across (discrete) time slots, ξS (p, t) inherits whiteness without any technical issue. We should stress that the above assumptions are made for technical reasons and will be transparent in the subsequent analysis, as long as the mild constraint (3.20) is satisfied; from the perspective of the relays, all evaluations of ξS (p, t), at each time slot, will be independent to each other. And, of course, εM F may be chosen small enough, such that (3.20) is satisfied virtually always, assuming that the relays are sufficiently far apart from each other, and/or that, at each time slot t, their new positions are relatively close to their old positions, at time slot t − 1. Based on the explicit statistical description of σS (p, t) and ξS (p, t) presented above, we now additionally demand that both are spatial fields with (everywhere) continuous sample paths. Equivalently, we demand that, for every ω ∈ Ω, σS (ω, p, t) ∈ C (S) and ξS (ω, p, t) ∈ C (S) , where C (A) denotes the set of continuous functions on some qualifying set A. Sample path continuity of stationary Gaussian fields may be guaranteed under mild conditions on the respective lag-dependent covariance kernel, as the following result suggests, however in a, slightly weaker, almost everywhere sense. Theorem 1. (a.e.-Continuity of Gaussian Fields [36–38]) Let X (s), s ∈ RN , be a real-valued, zero-mean, stationary Gaussian random field with a continuous covariance kernel ΣX : RN → R. Suppose that there exist constants 0 < c < +∞ and ε, ζ > 0, such that 1− for all τ ∈ n ΣX (τ ) c ≤ , ΣX (0) |log (kτ k2 )|1+ε (3.23) o x ∈ RN kxk2 < ζ . Then, X (s) is P-almost everywhere sample path continuous, or, equivalently, P − a.e.-continuous, on every compact subset K ⊂ RN and, therefore, on RN itself. Additionally, X (s) is bounded, P-almost everywhere, as well. 12 Utilizing Theorem 1 and generically assuming that Σξ , Σo , it is possible to show that both fields σS (p, t) and ξS (p, t) satisfy the respective conditions and thus, that both fields are a.e.continuous on S. For σS (p, t), the reader is referred to ([37], Example 2.2). Of course, instead of Σσ , any other kernel may be considered, as long as the condition Theorem 1 is satisfied. As far as ξS (p, t) is concerned, let us choose ε ≡ 1 and ζ ≡ 1 . We thus need to show that, for every τ , kτ k2 ∈ [0, 1), it holds that 1− Σo (τ ) c , ≤ Σo (0) (log (kτ k2 ))2 or, equivalently, 1− 3 τ 1 1− + 2 εM F 2  τ εM F 3 ! (3.24) 1{τ <εM F } ≤ c (log (τ ))2 , (3.25) for some finite, positive constant c. We first consider the case where 1 > τ ≥ εM F > 0 (whenever εM F < 1, of course). We then have 1≤ (log (εM F ))2 2 (log (τ )) , c1 (log (τ ))2 , (3.26) easily verifying the condition required by Theorem 1. Now, when 0 ≤ τ < min {εM F , 1}, it is easy to see that there exists a finite c2 > 0, such that c2 τ≤ (log (τ ))2 . (3.27) If τ ≡ 0, then the inequality above holds for any choice of c2 . If τ > 0, define a function h : (0, 1) → R+ , as h (τ ) , τ (log (τ ))2 . (3.28) By a simple first derivative test, it follows that h (τ ) ≤ max h (τ ) τ ∈(0,1) ≡ h (exp (−2)) ≡ 4 exp (−2) , ∀τ ∈ (0, 1) . (3.29) Consequently, (3.27) is (loosely) satisfied for all τ ∈ [0, min {εM F , 1}) ⊆ (0, 1), by choosing c2 ≡ 4 exp (−2). Now, observe that 3 τ 1 − 2 εM F 2  τ εM F 3 < 3 τ 3c2 ≤ . 2 εM F 2εM F (log (τ ))2 (3.30) Finally, simply choose   3c2 c ≡ max c1 , 2εM F   2 6 exp (−2) ≡ max (log (εM F )) , < +∞, εM F 13 (3.31) which immediately implies (3.25). Therefore, we have shown that, if we choose Σξ ≡ Σo , then, for any fixed, but arbitrarily small εM F > 0, the spatial field ξS (p, t) will also be almost everywhere sample path continuous. Observe that, via the analysis above, sample path continuity of the involved fields can be ascertained, but only in the only almost everywhere sense. Nevertheless, it easy to show that there always exist everywhere sample path continuous fields σ eS (p, t) and ξeS (p, t), which are indistinguishable from σS (p, t) and ξS (p, t), respectively [39]. Therefore, there is absolutely no loss of generality if we take both σS (p, t) and ξS (p, t) to be sample path continuous, everywhere in Ω, and we will do so, hereafter. Sample path continuity of all fields σS(D) (p, t) and ξS(D) (p, t) will be essential in Section 4, where we rigorously discuss optimality of the proposed relay motion control framework, with special focus on the relay beamforming problem. We close this section by discussing, in some more detail, the temporal properties of the evaluations of the fields σS (p, t) and σD (p, t) at any deterministic set of N (say) positions {pi ∈ S}i∈N+ , N same across all NT time slots. This results in the zero-mean, stationary temporal Gaussian process h iT C (t) , {σS (pi , t)}i∈N+ {σD (pi , t)}i∈N+ ∈ R2N ×1 , t ∈ N+ (3.32) NT , N N with matrix covariance kernel ΣC : Z → S2N + , defined, under the specific spatiotemporal model considered, as   |ν| e ΣC (ν) , exp − ΣC ∈ S2N (3.33) + , γ + where ν , t − s, for all (t, s) ∈ N+ NT × NNT ,   1 κ b C ∈ S2N e 4Σ ΣC , + , κ 1   kpS − pD k2 κ , exp − < 1, δ  b C (i, j) , Σσ pi − pj , ∀ (i, j) ∈ N+ × N+ , Σ N N (3.34) (3.35) (3.36) and with “4” denoting the operator of the Kronecker product. Then, the following result is true. Theorem 2. (C (t) is Markov) For any deterministic, time invariant set of points {pi ∈ S}i∈N+ , N the vector process C (t) ∈ R2N ×1 , t ∈ N+ NT , as defined in (3.32)-(3.36), may be represented as a stable order-1 vector autoregression, satisfying the linear stochastic difference equation X (t) ≡ ϕX (t − 1) + W (t) , t ∈ N+ NT , (3.37) where ϕ , exp (−1/γ) < 1,   eC X (0) ∼ N 0, Σ and     i.i.d. eC , W (t) ∼ N 0, 1 − ϕ2 Σ In particular, C (t) is Markov. 14 (3.38) (3.39) ∀t ∈ N+ NT . (3.40) Proof of Theorem 2. The proof is a standard exercise in time series; see Appendix A.  From a practical point of view, Theorem 2 is extremely valuable. Specifically, the Markovian representation of C (t) may be employed in order to efficiently simulate the spatiotemporal paths of the communication channel on any finite, but arbitrarily fine grid. This is important, since it allows detailed numerical evaluation of all methods developed in this work. Theorem 2 also reveals that the channel model we have considered actually agrees with experimental results presented in, for instance, [33, 34], which show that autoregressive processes constitute an adequate model for stochastically describing temporal correlations among wireless communication links. Remark 1. Unfortunately, to the best of our knowledge, the channel process along a specific relay trajectory, presented in Section 3.1, where the positions of the relays are allowed to vary across time slots is no longer stationary and may not be shown to satisfy the Markov Property. Therefore, in our analysis presented hereafter, we regard the aforementioned process as a general, nonstationary Gaussian process. All inference results presented below are based on this generic representation.  Remark 2. For simplicity, all motion control problems in this paper are formulated on the plane (some subset of R2 ). This means that any motion of the relays of the network along the third dimension of the space is indifferent to our channel model. Nevertheless, under appropriate (based on the requirements discussed above) assumptions concerning 3D wireless channel modeling, all subsequent arguments would hold in exactly the same fashion when fully unconstrained motion in R3 is assumed to affect the quality of the wireless channel.  4 Spatially Controlled Relay Beamforming In this section, we formulate and solve the spatially controlled relay beamforming problem, advocated in this paper. The beamforming objective adopted will be maximization of the Signal-toInterference+Noise Ratio (SINR) at the destination (measuring network QoS), under a total power budget at the relays. For the single-source single-destination setting considered herein, the aforementioned beamforming problem admits a closed form solution, a fact which will be important in deriving optimal relay motion control policies, in a tractable fashion. But first, let us present the general scheduling schema of the proposed mobile beamforming system, as well as some technical preliminaries on stochastic programming and optimal control, which will be used repeatedly in the analysis to follow. 4.1 Joint Scheduling of Communications & Controls At each time slot t ∈ N+ NT and assuming the same carrier for all communication tasks, we employ a basic joint communication/decision making TDMA-like protocol, as follows: 1. The source broadcasts a pilot signal to the relays, which then estimate their respective channels relative to the source. 2. The same procedure is carried out for the channels relative to the destination. 3. Then, based on the estimated CSI, the relays beamform in AF mode (assume perfect CSI estimation). 15 Relay Motion Channel Estimation ... ... ∆τt−1 t−1 t Beamforming Figure 4.1: Proposed TDMA-like joint scheduling protocol for communications and controls. 4. Based on the CSI received so far, strategic decision making is implemented, motion controllers of the relays are determined and relays are steered to their updated positions. The above sequence of actions is repeated for all NT time slots, corresponding to the total operational horizon of the system. This simple scheduling protocol is graphically depicted in Fig. 4.1. Concerning relay kinematics, it is assumed that the relays obey the differential equation ṗ (τ ) ≡ u (τ ) , ∀τ ∈ [0, T ] , (4.1) where u , [u1 . . . uR ]T ∈ S R , with ui : [0, T ] → S being the motion controller of relay i ∈ N+ R. Apparently, relay motion is in continuous time. However, assuming the relays may move only after their controls have been determined and up to the start of the next time slot, we can write Z p (t) ≡ p (t − 1) + ut−1 (τ ) dτ, ∀t ∈ N2NT , (4.2) ∆τt−1 with p (1) ≡ pinit , and where ∆τt ⊂ R and ut : ∆τt → S R denote the time interval that the relays + are allowed P to move in and the respective relay controller, in each time slot t ∈ NNT −1 . It holds that u (τ ) ≡ t∈N+ ut (τ ) 1∆τt (τ ), where τ belongs in the first NT − 1 time slots.Of course, at each NT −1 time slot t, the length of ∆τt , |∆τt |, must be sufficiently small such that the temporal correlations of the CSI at adjacent time slots are sufficiently strong. These correlations are controlled by the correlation time parameter γ, which can be a function of the slot width. Therefore, the velocity of the relays must be of the order of (|∆τt |)−1 . In this work, though, we assume that the relays are not explicitly resource constrained, in terms of their motion. Now, regarding the form of the relay motion controllers ut−1 (τ ) , τ ∈ ∆τt−1 , given a goal position vector at time slot t, po (t) , it suffices to fix a path in S R , such that the points po (t) and p (t − 1) are 16 connected in at most time |∆τt−1 |. A generic choice for such a path is the straight line1 connecting poi (t) and pi (t − 1), for all i ∈ N+ R . Therefore, we may choose the relay controllers at time slot + t − 1 ∈ NNT −1 as 1 uot−1 (τ ) , (po (t) − p (t − 1)) , ∀τ ∈ ∆τt−1 . (4.3) ∆τt−1 As a result, any motion control problem considered hereafter can now be formulated in terms of specifying the goal relay positions at the next time slot, given their positions at the current time slot (and the observed CSI). In the following, let C (Tt ) denote the set of channel gains observed by the relays, along the paths of their point trajectories Tt , {p (1) . . . p (t)}, t ∈ N+ NT . Then, Tt may be recursively updated as + Tt ≡ Tt−1 ∪ {p (t)}, for all t ∈ NNT , with T0 , ∅. In a technically precise sense, {C (Tt )}t∈N+ will NT also denote the filtration generated by the CSI observed at the relays, along Tt , interchangeably. In other words, in case the trajectories of the relays are themselves random, then C (Tt ) denotes the σ-algebra generated by both the CSI observed up to and including time slot t and p (1) . . . p (t), for all t ∈ N+ NT . Additionally, we define C (T0 ) ≡ C ({∅}) as C (T0 ) , {∅, Ω}, that is, as the trivial σ-algebra, and we may occasionally refer to time t ≡ 0, as a dummy time slot, by convention. 4.2 2-Stage Stochastic Optimization of Beamforming Weights and Relay Positions: Base Formulation & Methodology At each time slot t ∈ N+ NT , given the current CSI encoded in C (Tt ), we are interested in determining o w (t) , [w1 (t) w2 (t) . . . wR (t)]T , as an optimal solution to a beamforming optimization problem, as a functional of C (Tt ). Let the optimal value (say infimum) of this problem be the process Vt ≡ V (p (t) , t), a functional of the CSI encoded in C (Tt ), depending on the positions of the relays at time slot t. Suppose that, at time slot t − 1, an oracle reveals C (Tt ≡ Tt−1 ∪ {p (t)}), which also determines the channels corresponding to the new positions of the relays at the next time slot t. Then, we could further consider optimizing Vt with respect to p (t), representing the new position of the relays. But note that, C (Tt ) is not physically observable and in the absence of the oracle, optimizing Vt with respect to p (t) is impossible, since, given C (Tt−1 ), the channels at any position of the relays are nontrivial random variables. However, it is reasonable to search for the best decision on the positions of the relays at time slot t, as a functional of the available information encoded in C (Tt−1 ), such that Vt is optimized on average. This procedure may be formally formulated as a 2-stage stochastic program [26], minimize E {V (p (t) , t)} p(t) subject to p (t) ≡ M (C (Tt−1 )) ∈ C (po (t−1)) , , for some M : R4R(t−1) → R2R (4.4) 2R to be solved at each t−1 ∈ N+ ⇒ R2R is a multifunction, with C (po (t − 1)) ⊆ S R NT −1 , where C : R representing a physically feasible spatial neighborhood around the point po (t − 1) ∈ S R , the decision vector selected at time t − 2 ∈ NNT −2 (recall that t ≡ 0 denotes a dummy time slot). Note that, in 1 Caution is needed here, due to the possibility of physical collisions among relays themselves, or among relays and other physical obstacles in the workspace, S. Nevertheless, for simplicity, we assume that either such events never occur, or that, if they do, there exists some transparent collision avoidance mechanism implemented at each relay, which is out of our direct control. 17 2nd Stage Problem at t − 1 Beamforming Optimization {fi , gi }: CSI at (po (t − 1) , t − 1) C(Tt−2 ) · ∪ {·} w∗ (t − 1) po (t) and uot−1 (τ ) , τ ∈ ∆τt−1 1st Stage Problem at t Relay Controller C(Tt−1 ) Optimization @ Time Slot t − 1 Figure 4.2: 2-Stage optimization of beamforming weights and spatial relay controllers. The variables wo (t − 1), uot−1 and po (t) denote the optimal beamforming weights and relay controllers at time slot t − 1, and the optimal relay positions at time slot t, respectively. general, the decision selected at t − 2, po (t − 1), may not be an optimal decision for the respective problem solved at t − 2 and implemented at t − 1. To distinguish po (t − 1) from an optimal decision at t − 2, the latter will be denoted as p∗ (t − 1), for all t ∈ N2NT . Also note that, in order for (4.4) to be well defined, important technical issues, such as measurability of Vt and existence of its expectation at least for each feasible decision p (t), should be precisely resolved. Problem (4.5), together with the respective beamforming problem with optimal value Vt (which will focus on shortly) are referred to as the first-stage problem and the second-stage problem, respectively [26]. Hereafter, aligned with the literature, any feasible choice for the decision variable p (t) in (4.5), will be interchangeably called an (admissible) policy. A generic block representation of the proposed 2-stage stochastic programming approach is depicted in Fig. 4.2. Mainly due to the arbitrary structure of the function M, (4.4) is too general to consider, within a reasonable analytical framework. Thus, let us slightly constrain the decision set of (4.4) to include only measurable decisions, resulting in the formulation minimize E {V (p (t) , t)} p(t) o subject to p (t) ≡ M (C (T  t−1 )) ∈ C(p (t−1)) ,  , −1 4R(t−1) 2R M (A) ∈ B R , ∀A ∈ B R (4.5) provided, of course, that the stochastic program (4.5) is well defined. The second constraint in (4.5) is equivalent to M being Borel measurable, instead of being any arbitrary function, as in (4.4). Provided its well definiteness, the stochastic program (4.5) is difficult to solve, most importantly because of its variational character ; the decision variable p (t) is constrained to be a functional of the CSI observed up to and including time t − 1. A very powerful tool, which will enable us to both make (4.5) meaningful and overcome the aforementioned difficulty, is the Fundamental Lemma of Stochastic Control [23–28], which in fact refers to a family of technical results related to the interchangeability of integration (expectation) and minimization in general stochastic programming. Under the framework of the Fundamental Lemma, in Appendix B, we present a detailed discussion, best suited for the purposes of this paper, which is related to the important technical issues, arising when one wishes to meaningfully define and tractably simplify “hard”, variational problems of the form of (4.5). 18 In particular, Lemma 4, presented in Section 8.2.4 (Appendix B), identifies six sufficient technical conditions (conditions C1-C6, see statement of Lemma 4), under which the variational problem (4.5) is exchangeable by the structurally simpler, pointwise optimization problem minimize E {V (p (t) , t) |C (Tt−1 ) } p(t) subject to p (t) ∈ C (po (t−1)) , (4.6) to be solved at each t − 1 ∈ N+ NT −1 . Observe that, in (4.6), the decision variable p (t) is constant, as opposed to (4.5), where the decision variable p (t) is itself a functional of the observed information at time slot t − 1, that is, a policy. Provided that CSI C (Tt−1 ) and po (t−1) are known and that the involved conditional expectation can be somehow evaluated, (4.6) constitutes an ordinary, nonlinear optimization problem. If Lemma 4 is in power, exchangeability of (4.5) by (4.6) is understood in the sense that the optimal value of (4.5), which is a number, coincides with the expectation of optimal value of (4.6), which turns out to be a measurable function of C (Tt−1 ). In other words, minimization is interchangeable with integration, in the sense that ( ) inf p(t)∈Dt E {V (p (t) , t)} ≡ E info p(t)∈C (p (t−1)) E {V (p (t) , t) |C (Tt−1 ) } , (4.7) for all t ∈ N2NT , where Dt denotes the set of feasible decisions for (4.5). What is more, under the aforementioned technical conditions of Lemma 4, exchangeability implies that, if there exists an admissible policy of (4.5), say p∗ (t), which solves (4.6), then p∗ (t) is also optimal for (4.5). Additionally, Lemma 4 implies existence of at least one optimal solution to (4.6), which is simultaneously feasible and, thus, optimal, for the original stochastic program (4.5). If, further, (4.6) features a unique optimal solution, say p∗ (t), then p∗ (t) must be an optimal solution to (4.5). In the next subsection, we will specify the optimal value of the second-stage subproblem, Vt , for each time t ∈ N+ NT . That is, we will consider a fixed criterion for implementing relay beamforming (recourse actions) at each t, after the predictive decisions on the positions of the relays have been made (at time t − 1) and the relays have moved to their new positions, implying that the CSI at time at time t has been revealed. Of course, one of the involved challenges will be to explicitly show that Conditions C1-C6 are satisfied for each case considered, so that we can focus on solving the ordinary nonlinear optimization problem (4.6), instead of the much more difficult variational problem (4.5). The other challenge we will face is actually solving (4.6). Remark 3. It would be important to note that the pointwise problem (4.5) admits a reasonable and intuitive interpretation: At each time slot t − 1, instead of (deterministically) optimizing Vt with respect to p (t) in C (po (t−1)), which is, of course, impossible, one considers optimizing a projection of V (p, t), p ∈ S R onto the space of all measurable functionals of C (Tt−1 ), which corresponds to the information observed by the relays, up to t − 1. Provided that, for every p ∈ S R , V (p, t) is in the Hilbert space of square-integrable, real-valued functions relative to P, L2 (Ω, F , P; R), it is then reasonable to consider orthogonal projections, that is, the Minimum Mean Square Error (MMSE) estimate, or, more accurately, prediction of V (p, t) given C (Tt−1 ). This, of course, coincides with the conditional expectation E {V (p, t) |C (Tt−1 ) }. One then optimizes the random utility E {V (p, t) |C (Tt−1 ) }, with respect to p in the random set C (po (t−1)), as in (4.6). Although there is nothing technically wrong with actually starting with (4.6) as our initial problem formulation, and essentially bypassing the technical difficulties of (4.5), the fact that the 19 objective of (4.6) depends on C (Tt−1 ) does not render it a useful optimality criterion. This is because the objective of (4.6) quantifies the performance of a single decision, only conditioned on C (Tt−1 ), despite the fact that an optimal solution to (4.6) (provided it exists) constitutes itself a functional of C (Tt−1 ). In other words, the objective of (4.6) does not quantify the performance of a policy (a decision rule); in order to do that, any reasonable performance criterion should assign a number to each policy, ranking its quality, and not a function depending on C (Tt−1 ). The expected utility E {Vt } of the variational problem (4.5) constitutes a suitable such criterion. And by the Fundamental Lemma, (4.5) may be indeed reduced to (4.6), which can thus be regarded as a proxy for solving the former. There are two main reasons justifying our interest in policies, rather than individual decisions. First, one should be interested in the long-term behavior of the beamforming (in our case) system, in the sense that it should be possible to assess system performance if the system is used repeatedly over time, e.g., periodically (every hour, day) or on demand. For example, consider a beamforming system (the “experiment”), which operates for NT time slots and dependently restarts its operation at time slots kNT +1, for k in some subset of N+ . This might be practically essential for maintaining system stability over time, saving on resources, etc. It is then clear that merely quantifying the performance of individual decisions is meaningless, from an operational point of view; simply, the random utility approach quantifies performance only along a specific path of the observed information, C (Tt−1 ), for t ∈ N+ NT . This issue is more profound when channel observations taking specific values correspond to events of zero measure (this is actually the case with the Gaussian channel model introduced in Section 3). On the contrary, it is of interest to jointly quantify system performance when decisions are made for different outcomes of the sample space Ω. This immediately results in the need for quantifying the performance of different policies (decision rules), and this is only possible by considering variational optimization problems, such as (4.5). Additionally, because decisions are made in stages, it is of great interest to consider how the system performs across time slots, or, in other words, to discover temporal trends in performance, if such trends exist. In particular, for the beamforming problem considered in this paper, we will be able to theoretically characterize system behavior under both suboptimal and optimal decision making, in the average (expected) sense (see Section 4.4), across all time slots; this is impossible to do for each possible outcome of the sample space, individually, when the random utility approach is considered. The second main reason for considering the variational program (4.5) as our main objective, instead of (4.6), is practical, and extremely important from an engineering point of view. The expected utility approach assigns, at each time slot, a number to each policy, quantifying its quality. Simulating repeatedly the system and invoking the Law of Large Numbers, one may obtain excellent estimates of the expected performance of the system, quantified by the chosen utility. Therefore, the systematic experimental assessment of a particular sequence of policies (one for each time slot) is readily possible. Apparently, such experimental validation approach is impossible to perform by adopting the random (conditional) utility approach, since the performance of the system will be quantified via a real valued (in general) random quantity.  Remark 4. The stochastic programming methodology presented in this subsection is very general and can support lots of choices in regard to the structure of the second-stage subproblem, Vt . As shown in the discussion developed in Appendix B, the key to showing the validity of the Fundamental Lemma is the set of conditions C1-C6. If these are satisfied, it is then possible to convert the original, variational problem into a pointwise one, while strictly preserving optimality.  20 4.3 SINR Maximization at the Destination The basic and fundamentally important beamforming criterion considered in this paper is that of enhancing network QoS, or, in other words, maximizing the respective SINR at the destination, subject to a total power budget at the relays. At each time slot t ∈ N+ NT , given CSI encoded in T C (Tt ) and with w (t) , [w1 (t) . . . wR (t)] , this may be achieved by formulating the constrained optimization problem [1, 4] E { PS (t)| C (Tt )} E { PI+N (t)| C (Tt )} maximize w(t) , (4.8) subject to E { PR (t)| C (Tt )} ≤ Pc where PR (t), PS (t) and PI+N (t) denote the random instantaneous power at the relays, that of the signal component and that of the interference plus noise component at the destination (see (2.2)), respectively and where Pc > 0 denotes the total available relay transmission power. Using the mutual independence assumptions regarding CSI related to the source and destination, respectively, (4.8) can be reexpressed analytically as [1] maximize w(t) wH (t) R (p (t) , t) w (t) 2 σD + wH (t) Q (p (t) , t) w (t) , subject to w H (4.9) (t) D (p (t) , t) w (t) ≤ Pc where, dropping the dependence on (p (t) , t) or t for brevity, h iT  2 2 2 D , P0 diag |f1 | |f2 | . . . |fR | + σ 2 IR ∈ SR ++ , T R , P0 hhH ∈ SR and + , with h , [f1 g1 f2 g2 . . . fR gR ] h  iT Q , σ 2 diag |g1 |2 |g2 |2 . . . |gR |2 ∈ SR ++ . (4.10) (4.11) (4.12) Note that the program (4.9) is always feasible, as long as Pc is nonnegative. It is well known that the optimal value of (4.9) can be expressed in closed form as [1]   −1 2 −1/2 −1/2 −1/2 −1/2 Vt ≡ V (p (t) , t) , Pc λmax σD IR + Pc D QD D RD , (4.13) for all t ∈ N+ NT . Exploitting the structure of the matrices involved, Vt may also be expressed analytically as [4] Vt ≡ , X + i∈NR X + i∈NR Pc P0 |f (pi (t) , t)|2 |g (pi (t) , t)|2 2 2 P0 σ D |f (pi (t) , t)|2 + Pc σ 2 |g (pi (t) , t)|2 + σ 2 σD VI (pi (t) , t) , ∀t ∈ N+ NT . 21 (4.14) Adopting the 2-stage stochastic optimization framework presented and discussed in Section 4.2, we are now interested, at each time slot t − 1 ∈ N+ NT −1 , in the program maximize E p(t)   X      VI (pi (t) , t)   + i∈NR o subject to p (t) ≡ M (C (T  t−1 )) ∈ C(p (t−1)) ,  M−1 (A) ∈ B R4R(t−1) , ∀A ∈ B R2R , (4.15) where po (1) ∈ S R is a known constant, representing the initial positions of the relays. But in order to be able to formulate (4.15) in a well defined manner fully and and simplify it by exploitting the Fundamental Lemma, we have to explicitly verify Conditions C1-C6 of Lemma 4 in Section 8.2.4 of Appendix B. To this end, let us present a definition. Definition 1. (Translated Multifunctions) Given nonempty sets H ⊂ RN , A ⊆ RN and any fixed h ∈ H, D : RN ⇒ RN is called the (H, h)-translated multifunction in A, if and only if n o N D (y) , { x ∈ A| x − y ∈ H}, for all y ∈ A − h , x ∈ R x + h ∈ A . Note that translated multifunctions, in the sense of Definition 1, are always unique and nonempty, whenever y ∈ A − h. We also observe that, if y ∈ / A − h, D (y) is undefined; in fact, outside A − h, D may be defined arbitrarily, and this will be irrelevant in our analysis. The following assumption on the structure of the compact-valued multifunction C : R2R ⇒ R2R is adopted hereafter, and for the rest of this paper. Assumption 2. (C is Translated) Given any arbitrary compact set 0 ∈ G, C constitutes the corresponding (G, 0)-translated, compact-valued multifunction in S R . Then, the following important result is true. Theorem 3. (Verification Theorem / SINR Maximization) Suppose that, at time slot t−1 ∈ o o N+ NT −1 , the selected decision at t − 2, p (t − 1) ≡ p (ω, t − 1), is measurable relative to C (Tt−2 ). Then, the stochastic program (4.15) satisfies conditions C1-C6 and the Fundamental Lemma applies (see Appendix B, Section 8.2.4, Lemma 4). Additionally, as long as the pointwise program maximize p X + i∈NR E { VI (pi , t)| C (Tt−1 )} (4.16) o subject to p ∈ C (p (t−1)) has a unique maximizer p∗ (t), and po (t) ≡ p∗ (t), then po (t) is C (Tt−1 )-measurable and the condition of the theorem is automatically satisfied at time slot t. Proof of Theorem 3. See Appendix C.  As Theorem 3 suggests, in order for conditions C1-C6 to be simultaneously satisfied for all t ∈ N2NT , it is sufficient that the program (4.16) has a unique optimal solution, for each t. Although, in general, such requirement might not be particularly appealing, for the problems of interest in this paper, the event where (4.16) does not have a unique optimizer is extremely rare, almost never 22 occurring in practice. Nevertheless, uniqueness of the optimal solution to (4.16) does not constitute a necessary condition for C (Tt−1 )-measurability of the optimal decision at time slot t − 1. For instance, p∗ (t) will always be C (Tt−1 )-measurable when the compact-valued, closed multifunction C : R2R ⇒ R2R is additionally finite-valued, and po (t) ≡ p∗ (t). This choice for C is particularly useful for practical implementations. In any case, as long as conditions C1-C6 are guaranteed to be satisfied, we may focus exclusively on the pointwise program (4.16), whose expected optimal value, via the Fundamental Lemma, coincides with the optimal value of the original problem (4.15). By definition, we readily observe that the problem (4.16) is separable. In fact, given that, for each t ∈ N+ NT −1 , decisions taken and CSI collected so far are available to all relays, (4.16) can be solved in a completely distributed fashion at the relays, with the i-th relay being responsible for solving the program maximize E { VI (p, t)| C (Tt−1 )} p , (4.17) subject to p ∈ Ci (po (t−1)) 2 2 + at each t − 1 ∈ N+ NT −1 , where Ci : R ⇒ R denotes the corresponding part of C, for each i ∈ NR . Note that no local exchange of intermediate results is required among relays; given the available information, each relay independently solves its own subproblem. It is also evident that apart from the obvious difference in the feasible set, the optimization problems at each of the relays are identical. The problem, however, with (4.17) is that its objective involves the evaluation of a conditional expectation of a well defined ratio of almost surely positive random variables, which is impossible to perform analytically. For this reason, it is imperative to resort to the development of well behaved approximations to (4.17), which, at the same time, would facilitate implementation. In the following, we present two such heuristic approaches. 4.3.1 Approximation by the Method of Statistical Differentials The first idea we are going to explore is that of approximating the objective of (4.17) by truncated Taylor expansions. Observe that VI can be equivalently expressed as VI (p, t) ≡ 1 2 σD Pc −2 |g (p, t)| 2 2 σ 2 σD σ + |f (p, t)|−2 + |f (p, t)|−2 |g (p, t)|−2 P0 Pc P0 , 1 , VII (p, t) (4.18) 2 for all (p, t) ∈ S × N+ NT . Then, for t ∈ NNT , we may locally approximate E { VI (p, t)| C (Tt−1 )} around the point E { VII (p, t)| C (Tt−1 )} (see Section 3.14.2 in [21]; also known as the Method of Statistical Differentials) via a first order Taylor expansion as E { VI (p, t)| C (Tt−1 )} ≈ or via a second order Taylor expansion as E { VI (p, t)| C (Tt−1 )} ≈ 1 , E { VII (p, t)| C (Tt−1 )} n o E (VII (p, t))2 C (Tt−1 ) (E { VII (p, t)| C (Tt−1 )})3 (4.19) , where it is straightforward to show that the square on the numerator can be expanded as !2 2 2 σ 2 σD σ 2 σD 2 −4 −4 (VII (p, t)) ≡ |f (p, t)| |g (p, t)| + 2 |f (p, t)|−2 |g (p, t)|−2 Pc P0 Pc P0 23 (4.20) !2 2 σD σ2 σ2 |f (p, t)|−4 |g (p, t)|−2 + 2 +2 P0 Pc P0 !2 !2 2 σ2 σD + |f (p, t)|−4 + |g (p, t)|−4 . P0 Pc 2 σD Pc !2 |f (p, t)|−2 |g (p, t)|−4 (4.21) The approximate formula (4.20) may be in fact computed in closed form at any point p ∈ S, thanks to the following technical, but simple, result. Lemma 2. (Big Expectations) Under the wireless channel model introduced in Section 3, it is true that, at any p ∈ S,   F,G [F (p, t) G (p, t)]T C (Tt−1 ) ∼ N µF,G (p) , Σ (p) , (4.22) t|t−1 t|t−1 for all t ∈ N2NT , and where we define h iT F G µF,G (p), µ (p) µ (p) , t|t−1 t|t−1 t|t−1 (4.23)  µFt|t−1 (p),αS (p) ` + cF1:t−1 (p) Σ−1 1:t−1 m1:t−1 −µ1:t−1 ∈ R,  −1 µGt|t−1 (p),αD (p) ` + cG 1:t−1 (p) Σ1:t−1 m1:t−1 −µ1:t−1 ∈ R and   " " # #T kp −p k 2 2 2 − S δD 2 F F η + σ η e c (p) c (p) ξ 1:t−1   − 1:t−1 ΣF,G Σ−1 ∈ S2++ , 1:t−1 G kp −p k t|t−1 (p), cG (p) c (p) 2 − S δD 2 2 2 1:t−1 1:t−1 η e η + σξ (4.24) (4.25) (4.26) with h iT m1:t−1 , F T (1) GT (1) . . . F T (t − 1) GT (t − 1) ∈ R2R(t−1)×1 , µ1:t−1 ,[αS (p (1)) αD (p (1)) . . . αS (p (t − 1)) αD (p (t − 1))]T ` ∈ R2R(t−1)×1 , h i cF1:t−1 (p), cF1 (p) . . . cFt−1 (p) ∈ R1×2R(t−1) , h i G G 1×2R(t−1) cG , 1:t−1 (p), c1 (p) . . . ct−1 (p) ∈ R  n n oo oo n n j F j ck (p), E σS (p, t) σS (k) E σS (p, t) σD (k) , ∀k ∈ N+ t−1 + + j∈NR j∈NR n n  oo n n oo j cG E σD (p, t) σSj (k) E σ (p, t) σ (k) , ∀k ∈ N+ t−1 and k (p), D + + D j∈NR j∈NR   Σ (1, 1) ··· Σ (1, t − 1)   2R(t−1) .. .. .. Σ1:t−1 ,  ,  ∈ S++ . . . (4.27) (4.28) (4.29) (4.30) (4.31) (4.32) (4.33) Σ (t − 1, 1) · · · Σ (t − 1, t − 1) for all (p, t) ∈ S × N2NT . Further, for any choice of (m, n) ∈ Z × Z, the conditional correlation of the fields |f (p, t)|m and |g (p, t)|n relative to C (Tt−1 ) may be expressed in closed form as E { |f (p, t)|m |g (p, t)|n | C (Tt−1 )} 24  T   2  T  ! log (10) log (10) m m m ≡10(m+n)ρ/20 exp µF,G (p)+ ΣF,G (p) , (4.34) t|t−1 t|t−1 n n n 20 20 at any p ∈ S and for all t ∈ N2NT . Proof of Lemma 2. See Appendix C.  Since, by exploitting Lemma 2 and (4.21), formula (4.20) can be evaluated without any particular difficulty, we now propose the replacement of the original pointwise problem of interest, (4.17), with either of the heuristics 1 maximize p E { VII (p, t)| C (Tt−1 )} (4.35) o subject to p ∈ Ci (p (t−1)) and maximize p n o E (VII (p, t))2 C (Tt−1 ) (E { VII (p, t)| C (Tt−1 )})3 , (4.36) o subject to p ∈ Ci (p (t−1)) + to be solved at relay i ∈ N+ R , at each time t − 1 ∈ NNT −1 , depending on the order of approximation employed, respectively. Observe that Jensen’s Inequality directly implies that the objective of (4.35) is always lower than or equal than that of (4.36) and that of the original program (4.17), conditioned, of course, on identical information. As a result, (4.35) is also a lower bound relaxation to (4.17). On the other hand, the objective of (4.35) might be desirable in practice, since it is easier to compute. Both approximations are technically well behaved, though, as made precise by the next theorem. Theorem 4. (Behavior of Approximation Chains I / SINR Maximization) Both heuristics (4.35) and (4.36) each feature at least one measurable maximizer. Therefore, provided that any of the two heuristics is solved at each time slot t − 1 ∈ N+ NT −1 , that the selected one features a unique ∗ ∗ o e (t), and that p e (t) ≡ p (t), for all t ∈ N2NT , the produced decision chain is measurable maximizer, p and condition C2 is satisfied at all times. Proof of Theorem 4. See Appendix C.  Theorem 4 implies that, at each time slot t ∈ N+ NT −1 and under the respective conditions, the chosen heuristic constitutes a well defined approximation to the original problem, (4.17) and, in turn, to (4.15), in the sense that all conditions C1-C4 are satisfied. At this point, it will be important to note that, for each p ∈ S, computation of the conditional mean and covariance in (4.22) of Lemma 2 require execution of matrix operations, which are of expanding dimension in t ∈ N2NT ; observe that, for instance, the covariance matrix Σ1:t−1 is of size 2R (t − 1), which is increasing in t ∈ N2NT . Fortunately, however, the increase is linear in t. Additionally, the reader may readily observe that the inversion of the covariance matrix Σ1:t−1 constitutes the computationally dominant operation in the long formulas of Lemma 2. The computational complexity of this matrix inversion, which takes place at each time slot t − 1 ∈ N+ NT −1 , is,   3 3 in general, of the order of O R t elementary operations. Fortunately though, we may exploit the 25 Matrix Inversion Lemma, in order to reduce the computational complexity of the aforementioned  3 2 matrix inversion to the order of O R t . Indeed, by construction, Σ1:t−1 may be expressed as Σ1:t−1 where  Σ1:t−2 ≡ T (Σc1:t−2 )  Σc1:t−2 , Σ (t − 1, t − 1) (4.37) Σc1:t−2 , [Σ (1, t − 1) . . . Σ (t − 2, t − 1)]T ∈ R2R(t−2)×2R . Invoking the Matrix Inversion Lemma, we obtain the recursive expression   T −1 −1 c −1 c −1 −1 c −1 Σ + Σ1:t−2 Σ1:t−2 St−1 (Σ1:t−2 ) Σ1:t−2 −Σ1:t−2 Σ1:t−2 St−1  1:t−2 , Σ−1 1:t−1 = T c −1 −1 −S−1 (Σ ) Σ S t−1 1:t−2 1:t−2 t−1 c 2R St−1 , Σ (t − 1, t − 1) − (Σc1:t−2 ) Σ−1 1:t−2 Σ1:t−2 ∈ S++ , T (4.38) with (4.39) (4.40) where St−1 is the respective Schur complement. From (4.39) and (4.40), it can be easily verified  c 3 2 . that the most computationally demanding operation involved is Σ−1 Σ , of order O R t 1:t−2 1:t−2     Since the inversion of St−1 is of the order of O R3 , we arrive at a total complexity of O R3 t2 elementary operations of the recursive scheme presented above, and implemented at each time slot t−1. The achieved reduction in complexity is important. In most scenarios, R, the number of relays, will be relatively small and fixed for the whole operation of the system, whereas t, the time slot index, might generally take large values, since it is common for the operational horizon of the system, NT , to be large. Additionally, the reader may readily observe that the aforementioned covariance matrix is independent of the position at which the channel is predicted, p. As a result, its inversion may be performed just once in each time slot, for all evaluations of the mean and covariance of the Gaussian density in (4.22), for all different choices of p on a fixed grid (say). Consequently, if the total number of such evaluations is P ∈ N+ , and recalling that the complexity for a matrixvector multiplication is quadratic in the dimension of the quantities involved, then, at worst, the   2 2 3 2 total computational complexity for channel prediction is of the order of O P R t + R t , at each t − 1 ∈ N+ would have to be able NT −1 . This means that a potential actual computational system   to execute matrix operations with complexity at most of the order of O P R2 NT2 + R3 NT2 , which constitutes the worst case complexity, over all NT time slots. The analysis above characterizes the complexity for solving either of the heuristics (4.35) and (4.36), if the feasible set Ci is assumed to be finite, for all i ∈ N+ R . Of course, if the quantity RNT is considered a fixed constant, implying that computation of the mean and covariance in (4.22) is considered the result of a black box with fixed (worst) execution time and with input p, then, at each t − 1 ∈ N+ NT −1 , the total computational complexity for channel prediction is of the order of O (P ) function evaluations, that is, linear in P . 4.3.2 Brute Force The second approach to the solution of (4.17), considered in this section, is based on the fact that the objective of the aforementioned program can be evaluated rather efficiently, relying on the multidimensional Gauss-Hermite Quadrature Rule [40], which constitutes a readily available routine for numerical integration. It is particularly effective for computing expectations of complicated functions of Gaussian random variables [41]. This is indeed the case here, as shown below. 26 Leveraging Lemma 2 and as it can also be seen in the proof of Theorem 3 (condition C6), the objective of (4.17) can be equivalently represented, for all t ∈ N2NT , via a Lebesgue integral as Z   F,G r (x) N x; µF,G (p) , Σ (p) dx, (4.41) E { VI (p, t)| C (Tt−1 )} = t|t−1 t|t−1 2 R for any choice of p ∈ S, where N (·; µ, Σ) : R2 → R++ denotes the bivariate Gaussian density, with 2 mean µ ∈ R2×1 and covariance Σ ∈ S2×2 + , and the function r : R → R++ is defined exploitting the trick (3.11) as r (x) ≡ r (x1 , x2 ) , Pc P0 102ρ/10 [exp (x1 + x2 )] 2 P0 σD [exp (x1 )] log(10) 10 + Pc σ 2 [exp (x2 )] log(10) 10 log(10) 10 2 + 10−ρ/10 σ 2 σD , (4.42) for all x ≡ (x1 , x2 ) ∈ R2 . Exploitting the Lebesgue integral representation (4.41), it can be easily shown that the conditional expectation may be closely approximated by the double summation formula (see Section IV in [41]) q  X X F,G F,G E { VI (p, t)| C (Tt−1 )} ≈ $l 1 $l 2 r Σ t|t−1(p)q (l1 ,l2 ) + µ t|t−1(p) , (4.43) + l1 ∈NM + l2 ∈NM  T where M ∈ N+ denotes the quadrature resolution, q (l1 ,l2 ) , ql1 ql2 ∈ R2×1 denotes the (l1 , l2 )-th  T quadrature point and $ (l1 ,l2 ) , $l1 $l2 ∈ R2×1 denotes respective weighting coefficient, for all + (l1 , l2 ) ∈ N+ M × NM . Both sets of quadrature points and weighting coefficients are automatically selected apriori and independently in each dimension, via the following simple procedure [41, 42]. Let us define a matrix J ∈ RM ×M , such that r  min {i, j} , |j − i| ≡ 1 + , ∀ (i, j) ∈ N+ (4.44) J (i, j) , 2 M × NM .  0, otherwise That is, J constitutes a hollow, tridiagonal, symmetric matrix. Let the sets {λi (J ) ∈ R}i∈N+ M n o M ×1 and v i (J ) ∈ R contain the eigenvalues and normalized eigenvectors of J , respectively. + i∈NM Then, simply, quadrature points and the respective weighting coefficients are selected independently in each dimension j ∈ {1, 2} as √ qlj ≡ 2λlj (J ) and (4.45)  2 $lj ≡ v lj (J ) (1) , ∀lj ∈ N+ (4.46) M. In (4.46), v lj (J ) (1) denotes the first entry of the involved vector. Under the above considerations, in this subsection, we propose, for a sufficiently large number of quadrature points M , the replacement of the original pointwise problem (4.17) with the heuristic  q X F,G F,G maximize $l1 $l2 r Σ t|t−1(p)q (l1 ,l2 ) + µ t|t−1(p) p + + , (4.47) (l1 ,l2 )∈NM ×NM subject to p ∈ Ci (po (t−1)) 27 + to be solved at relay i ∈ N+ R , at each time t − 1 ∈ NNT −1 . As in Section 4.3.1 above, the following result is in power, concerning the technical consistency of the decision chain produced by considering the approximate program (4.47), for all t ∈ N2NT . Proof is omitted, as it is essentially identical to that of Theorem 4. Theorem 5. (Behavior of Approximation Chains II / SINR Maximization) Consider the the heuristic (4.47). Then, under the same circumstances, all conclusions of Theorem 4 hold true. Since the computations in (4.45) and (4.46) do not depend on p or the information collected so far, encoded in C (Tt−1 ), for t ∈ N2NT , quadrature points and the respective weights can be determined offline and stored in memory. Therefore, the computational burden of (4.43) concentrates solely  on  the computation of an inner product, whose q computational complexity  is of the order of 2 2 F,G F,G O M , as well as a total of M evaluations of r Σ t|t−1(p)q (l1 ,l2 ) +µ t|t−1(p) , for each value of F,G p. Excluding temporarily the computational burden of µF,G t|t−1 (p) and Σ t|t−1 (p), each of the latter evaluations is of fixed complexity, since each involves elementary operations among matrices and vectors in R2×2 and R2×1 , respectively and, additionally, the involved matrix square root can be evaluated in closed form, via the formula [43] r   F,G Σ t|t−1(p) + det ΣF,G (p) I2 q t|t−1 2×2 s ΣF,G ∈ S+ , (4.48) (p) ≡ r t|t−1     F,G tr ΣF,G t|t−1 (p) + 2 det Σ t|t−1 (p) where we have taken into account that ΣF,G t|t−1 (p) is always a (conditional) covariance matrix and, thus, (conditionally) positive semidefinite. As a result and considering the last paragraph of Section 4.3.1, if (4.43) is evaluated on a finite grid of possible locations, say P ∈ N+ , then, at each t − 1 ∈ N+ complexity of the Gauss-Hermite Quadrature Rule outlined above NT −1 , the total computational   is of the order of O P M 2 + P R2 t2 + R3 t2 elementary operations / function evaluations. This will be the total, worst case computational complexity for solving (4.47), if the feasible set Ci is assumed to be finite, for all i ∈ N+ R . As noted above, a finite feasible set greatly simplifies implementation, since a trial-and-error approach may be employed for solving the respective optimization problem. If M is considered a fixed constant (e.g., M ≡ 103 ), and the same holds for Rt ≤ RNT , then, in each time slot, the total complexity of the Gauss-Hermite Quadrature Rule is of the order of O (P ) evaluations of (4.43), that is, linear in P . In that case, the whole numerical integration routine is considered a black box of fixed computational load, which, in each time slot, takes p as its input. Observe that, whenever M ≈ RNT , the worst case complexity of the brute force method, described in this subsection, over all NT time slots, is essentially the same as that of the Taylor approximation method, presented earlier in Section 4.3.1. 4.4 Theoretical Guarantees: Network QoS Increases Across Time Slots The proposed relay position selection approach presented in Section 4.3 enjoys a very important and useful feature, initially observed via numerical simulations: Although a 2-stage stochastic programming procedure is utilized independently at each time slot for determining optimal relay positioning and beamforming weights at the next time slot, the average network QoS (that is, the achieved 28 SINR) actually increases, as a function of time (the time slot). Then, it was somewhat surprising to discover that, additionally, this behavior of the achieved SINR can be predicted theoretically, in an indeed elegant manner and, as it will be clear below, under mild and reasonable assumptions on the structure of the spatially controlled beamforming problem under consideration. But first, it would be necessary to introduce the following definition. Definition 2. (L.MD.G Fields) On (Ω, F , P), an integrable stochastic field Ξ : Ω × RN × N → R is said to be a Linear Martingale Difference (MD) Generator, relative to a filtration {Ht ⊆ F }t∈N , and with scaling factor µ ∈ R, or, equivalently, L.MD.G♦ (Ht , µ), if and only if, for each t ∈ N+ , there exists a measurable set Ωt ⊆ Ω, with P (Ωt ) ≡ 1, such that, for every x ∈ RN , it is true that E { Ξ (x, t)| Ht−1 } (ω) ≡ µE { Ξ (x, t − 1)| Ht−1 } (ω) , (4.49) for all ω ∈ Ωt . Remark 5. A fine detail in the definition of a L.MD.G♦(Ht , µ) field is that, for each t ∈ N, the event Ωt does not depend on the choice of point x ∈ RN . Nevertheless, even if the event where (4.49) is satisfied is indeed dependent on the particular x ∈ RN , let us denote it as Ωx,t , we may leverage the fact that conditional expectations are unique almost everywhere, and arbitrarily define E { Ξ (x, t)| Ht−1 } (ω) , µE { Ξ (x, t − 1)| Ht−1 } (ω) , (4.50)  for all ω ∈ Ωcx,t , where P Ωcx,t ≡ 0. That is, we modify both, or either of the random elements E { Ξ (x, t − 1)| Ht−1 } and E { Ξ (x, t)| Ht−1 }, on the null set Ωcx,t , such that (4.49) is satisfied. Then, it may be easily verified that both such modifications result in valid versions of the conditional expectations of Ξ (x, t − 1) and Ξ (x, t) relative to Ht−1 , respectively and satisfy property (4.49), everywhere with respect to ω ∈ Ω. In Definition 2, invariance of Ωt with respect to x ∈ RN , in conjunction with the power of the substitution rule for conditional expectations (Section 8.2.1), will allow the development of strong conditional arguments, when x is replaced by a random element, measurable relative to Ht−1 .  Remark 6. There are lots of examples of L.MD.G stochastic fields, satisfying the technical properties of Definition 2. For completeness, let us present two such examples. Employing generic notation, consider an integrable real-valued stochastic field n Y (x, t), x ∈ RN , to∈ N. Let the natural filtration associated with Y (x, t) be {Yt }t∈N , with Yt , σ Y (x, t) , x ∈ RN , for all t ∈ N. Also, consider another, for simplicity temporal, integrable real-valued process W (t) , t ∈ N. Suppose, further, that Y (x, t) is a martingale with respect to t ∈ N (relative to {Yt }t∈N ), and that W (t) + is a zero mean process, independent of Y (x, t). In particular,   we assume  that,  for every t ∈ N , Y there exist events ΩYt ⊆ Ω and ΩW ≡ 1 and P ΩW ≡ 1, such that, for t ⊆ Ω, satisfying P Ωt t all x ∈ RN , E { Y (x, t)| Yt−1 } (ω) ≡ Y (ω, x, t − 1) and (4.51) E { W (t)| Yt−1 } (ω) ≡ 0, (4.52)  T W T W for all ω ∈ ΩYt Ωt , where, apparently, P ΩYt Ωt ≡ 1. Our first, probably most basic example of a L.MD.G field is simply the martingale Y (x, t) itself. Of course, in order to verify this statement, we need to show that it satisfies the technical 29 requirements of Definition 2, relative to a given filtration; in particular, let us choose {Yt }t∈N to be that filtration. Then, for every (x, t) ∈ RN × N+ , it is trivial to see that E { Y (x, t)| Yt−1 } (ω) ≡ Y (ω, x, t − 1) ≡ E { Y (x, t − 1)| Yt−1 } (ω) , (4.53) for all ω ∈ ΩYt , where Y (x, t − 1) is chosen as our version of E { Y (x, t − 1)| Yt−1 }, everywhere in Ω. As a result, the martingale Y (x, t) is itself a L.MD.G♦ (Yt , 1), as expected. The second, somewhat more interesting example of a L.MD.G field is defined as X (x, t) , %Y (x, t) + W (t) , (4.54) for all (x, t) ∈ RN × N, where, say, 0 < % ≤ 1. In order to verify the technical requirements of Definition 2, let us again choose {Yt }t∈N as our filtration. Then, for every (x, t) ∈ RN × N+ , there  Y,W exists a measurable set ΩY,W x,t ⊆ Ω, with P Ωx,t ≡ 1, such that, for all ω ∈ ΩY,W x,t , E { X (x, t)| Yt−1 } (ω) ≡ %Y (ω, x, t − 1) + E {W (t)} ≡ %Y (ω, x, t − 1) . (4.55) Therefore, we may choose our version for E { X (x, t)| Yt−1 } as E { X (x, t)| Yt−1 } (ω) ≡ %Y (ω, x, t − 1) , ∀ω ∈ Ω. (4.56) In exactly the same fashion, we may choose, for every (x, t) ∈ RN × N+ , E { X (x, t − 1)| Yt−1 } (ω) ≡ %Y (ω, x, t − 1) , ∀ω ∈ Ω. (4.57) Consequently, for every (x, t) ∈ RN × N+ , it will be true that E { X (x, t)| Yt−1 } (ω) ≡ %Y (ω, x, t − 1) ≡ E { X (x, t − 1)| Yt−1 } (ω) , for all ω ∈ Ω, showing that the field X (x, t) is also L.MD.G♦ (Yt , 1). (4.58)  Leveraging the notion of a L.MD.G field, the following result may be proven, characterizing the temporal (in discrete time) evolution of the objective of myopic stochastic o programs of the form n ↑ of (4.5). In order to introduce the result, let us consider the family Pt , with Pt↑ being + t∈NN the limit σ-algebra generated by all admissible policies at time slot t, defined as    [  Pt↑ , σ σ {p (t)} ⊆ C (Tt−1 ) , ∀t ∈ N+ NT ,   T (4.59) p(t)∈Dt with P1↑ being the trivial σ-algebra; recall that p (1) ∈ S R is assumed to be a constant. Also, for every t ∈ N+ NT , let us define the class n  o Dt ≡ p : Ω → S R p−1 (A) ∈ Pt↑ , for all A ∈ B S R . The result now follows. 30 (4.60) Theorem 6. (L.MD.G Objectives Increase over Time) Consider, for each t ∈ N2NT , the maximization version of the 2-stage stochastic program (4.5), for some choice of the second-stage optimal value V (p, t), p ∈ S R , t ∈ N2NT . Suppose that conditions C1-C6 are satisfied at all times and let p∗ (t) denote an optimal solution to (4.5), decided at t − 1 ∈ N+ NT −1 . Suppose, further, that, for every t ∈ N+ , NT n o • V (p, t) is L.MD.G♦ (Ht , µ), for a filtration Ht ⊇ Pt↑ and some µ ∈ R, and that + t∈NN T • V (·, ·, t) is both SP ♦CHt and SP ♦CHt−1 , with Dt ⊆ CHt ⊆ IHt (Remark 11 / Section 8.2.1). Then, for any admissible policy po (t − 1), it is true that µE {V (po (t − 1) , t − 1)} ≡ E {V (po (t − 1) , t)} and     µE V p∗ (t − 1) , t − 1 ≤ E V p∗ (t) , t , ∀t ∈ N2NT . (4.61) (4.62) In particular, if µ ≡ 1, the objective: • does not decrease by not updating the decision variable, and • is nondecreasing over time, under optimal decision making. Proof of Theorem 6. See Appendix C.  Of all possible choices for µ, the one where µ ≡ 1 is of special importance and practical relevance, as we will see in the next. In particular, in this case, and provided that the respective assumptions are fulfilled, Theorem 6 implies that optimal myopic exploration of the random field V (p, t) is monotonic, either under optimal decision making, or by retaining the same policy next. In the case where µ 6= 1, things can be quite interesting as well. For instance, suppose that one focuses on the maximization counterpart of the stochastic program (4.5). In this case, it is of interest to sequentially, myopically and feasibly sample the field V (p, t), such that it is maximized on average. Let us also refer to V (p, t) as the reward of the sampling process. Additionally, suppose that V (p, t) is a L.MD.G field, with parameter µ ≡ 0.9 < 1. Assuming that the respective assumptions are satisfied, Theorem 6 implies that, for any admissible sampling policy po (t − 1), E{V (po (t − 1) , t)}≡0.9E{V (po (t − 1) , t − 1)} and     E V p∗ (t) , t ≥0.9E V p∗ (t − 1) , t − 1 , (4.63) (4.64) for all t ∈ N2NT . In other words, either performing optimal decision making, or retaining the same policy next, will result in an at most 10% loss of performance. This means that the performance of optimal sampling at the next time step cannot be worse than 90% of that at the current time slot. Of course, this is important, because, in a sense, the risk of (non-)maintaining the average reward achieved up to the current time slot is meaningfully quantified. Remark 7. When the stochastic program under study is separable, that is, when the objective is of the form X V (p (t) , t) ≡ Vi (pi (t) , t) (4.65) + i∈NM (and the respective constraints of the problem decoupled), then, in order to reach the conclusions of Theorem 6 for V , it suffices for Theorem 6 to hold individually for each Vi , i ∈ N+ M . This is true, for instance, for the spatially controlled beamforming problem (4.15).  31 We may now return to the beamforming problem under consideration, namely (4.15). By Remark 7 and Theorem 6, it would suffice if we could show that the field VI (p, t) is a linear MD generator, relative to a properly chosen filtration. Unfortunately, though, this does not seem to be the case; the statistical structure of VI (p, t) does not match that of a linear MD generator exactly, relative to any reasonably chosen filtration. Nevertheless, under the channel model of Section 3, it is indeed possible to show that VI (p, t) is approximately L.MD.G♦ (C (Tt−1 ) , 1), a fact that explains, in an elegant manner, why our proposed spatially controlled beamforming framework is expected to work so well, both under optimal and suboptimal decision making. To show that VI (p, t) is approximately L.MD.G♦ (C (Tt−1 ) , 1), simply consider projecting VI (p, t − 1) onto C (Tt−2 ), via the conditional expectation E { VI (p, t − 1)| C (Tt−2 )}. Of course, and based on what we have seen so far, E { VI (p, t − 1)| C (Tt−2 )} can be written as a Lebesgue integral of VI (p, t − 1) expressed in terms of the vector field [F (p, t − 1) G (p, t − 1)]T , times its conditional density relative to C (Tt−2 ). It then easy to see that this conditional density will be, of course, Gaussian, and will be of exactly the same form as the conditional density of [F (p, t) G (p, t)]T relative to C (Tt−1 ), as presented in Lemma 2, but with t replaced by t − 1. Likewise, E { VI (p, t)| C (Tt−2 )} is of the same form as E { VI (p, t − 1)| C (Tt−2 )}, but with all terms       1 2 t−2 exp − , exp − , . . . , exp − (4.66) γ γ γ simply replaced by  2 exp − γ   3 , exp − γ for all t ∈ N3NT . Of course, if t ≡ 2, we have   t−1 , . . . , exp − γ  , E { VI (p, 2)| C (T0 )} ≡ E {VI (p, 2)} ≡ E {VI (p, 1)} ≡ E { VI (p, 1)| C (T0 )} . Now, for γ sufficiently large, we may approximately write     x x+1 ≈ exp − , exp − γ γ ∀x > 1, (4.67) (4.68) (4.69) and, therefore, due to continuity, it should be true that E { VI (p, t)| C (Tt−2 )} ≈ E { VI (p, t − 1)| C (Tt−2 )} , (4.70) for all t ∈ N2NT (and everywhere with respect to ω ∈ Ω). As a result, we have shown that, at least approximately, VI (p, t) is L.MD.G♦ (C (Tt−1 ) , 1). We may then invoke Theorem 6 in an approximate manner, leading to the following important result. Hereafter, for x ∈ R and y ∈ R, x . y will imply that x is approximately smaller or equal than y, in the sense that x ≤ y + ε, where ε > 0 is some small slack. Theorem 7. (QoS Increases over Time Slots) Consider the separable stochastic program (4.15). For γ sufficiently large, and for any admissible policy po (t − 1), it is true that E {VI (poi (t − 1) , t − 1)} ≈ E {VI (poi (t − 1) , t)} ,     E VI p∗i (t − 1) , t − 1 . E VI p∗i (t) , t , ∀i ∈ N+ R 32 (4.71) (4.72) E {V (po (t − 1) , t − 1)} ≈ E {V (po (t − 1) , t)}     E V p∗ (t − 1) , t − 1 . E V p∗ (t) , t , and (4.73) (4.74) for all t ∈ N2NT . In other words, approximately, the average network QoS: • does not decrease by not updating the positions of the relays and • is nondecreasing across time slots, under (per relay) optimal decision making. Theorem 7 is very important from a practical point of view, and has the following additional implications. Roughly speaking, under the conditions of Theorem 7, that is, if the temporal interactions of the channel are sufficiently strong, the average network QoS is not (approximately) expected to, at least abruptly, decrease if one or more relays stop moving at some point. Such event might indeed happen in an actual autonomous network, possibly due to power limitations, or a failure in the motion mechanisms of some network nodes. In the same framework, Theorem 7 implies that the relays which continue moving contribute (approximately) positively to increasing the average network QoS, across time slots. Such behavior of the proposed spatially controlled beamforming system may be also confirmed numerically, as discussed in Section 5. For the record, and as it will be also shown in Section 5, relatively small values for the correlation time γ, such as γ ≡ 5, are sufficient in order to practically observe the nice system behavior promised by Theorem 7. This fact makes the proposed spatially controlled beamforming system attractive in terms of practical feasibility, and shows that such an approach could actually enhance system performance in a well-behaved, real world situation. 5 Numerical Simulations & Experimental Validation In this section, we present synthetic numerical simulations, which essentially confirm that the proposed approach, previously presented in Section 4, actually works, and results in relay motion control policies, which yield improved beamforming performance. All synthetic experiments were conducted on an imaginary square terrain of dimensions 30 × 30 squared units of length, with W ≡ [0, 30]2 , uniformly divided into 30 × 30 ≡ 900 square regions. The locations of the source and destination are fixed as pS ≡ [15 0]T and pD ≡ [15 30]T . The beamforming temporal horizon is chosen as T ≡ 40 and the number of relays is fixed at R ≡ 8. The wavelength is chosen as λ ≡ 0.125, corresponding to a carrier frequency of 2.4 GHz. The various parameters of the assumed channel model are set as ` ≡ 3, ρ ≡ 20, σξ2 ≡ 20, η 2 ≡ 50, β ≡ 10, γ ≡ 5 and δ ≡ 1. The variances of 2 the reception noises at the relays and the destination are fixed as σ 2 ≡ σD ≡ 1. Lastly, both the transmission power of the source and the total transmission power budget of the relays are chosen as P ≡ Pc ≡ 25 (≈ 14dB) units of power. The relays are restricted to the rectangular region S ≡ [0, 30] × [12, 18]. Further, at each time instant, each of the relays is allowed to move inside a 9-region area, centered at each current position, thus defining its closed set of feasible directions Ci , for each relay i ∈ N+ R . Basic collision and out-of-bounds control was also considered and implemented. In order to assess the effectiveness of our proposed approach, we compare both heuristics (4.35) and (4.36) against the case where an agnostic, purely randomized relay control policy is adopted; in this case, at each time slot, each relay moves randomly to a new available position, without taking previously observed CSI into consideration. For simplicity, we do not consider the brute force method presented earlier in Section 4.3.2. For reference, we also consider the performance + of an oracle control policy at the relays, where, at each time slot t − 1 ∈ N+ NT −1 , relay i ∈ NR 33 10 8 6 5 10 15 20 25 30 35 40 5 10 15 20 25 30 35 40 12 10 8 6 Figure 5.1: Comparison of the proposed strategic relay planning schemes, versus an agnostic, randomized relay motion policy. updates its position by noncausally looking into the future and choosing the position pi , which maximizes directly the quantity VI (pi , t), over Ci (pi (t − 1)). Of course, the comparison of all controlled systems is made under exactly the same communication environment. Fig. 5.1 shows the expectation and standard deviation of the achieved QoS for all controlled systems, approximated by executing 4000 trials of the whole experiment. As seen in the figure, there is a clear advantage in exploiting strategically designed relay motion control. Whereas the agnostic system maintains an average SINR of about 4 dB at all times, the system based on the proposed 2nd order heuristic (4.36) is clearly superior, exhibiting an increasing trend in the achieved SINR, with a gap starting from about 0.5 dB at time slot t ≡ 2, up to 3 dB at time slots t ≡ 10, 11, . . . , 40. The 1st order heuristic (4.35) comes second, with always slightly lower average SINR, and which also exhibits a similar increasing trend as the 2nd order heuristic (4.36). Additionally, it seems to converge to the performance achieved by (4.36), across time slots. The existence of an increasing trend in the achieved average network QoS has already been predicted by Theorem 6 for a strictly optimal policy, and our experiments confirm this behavior for both heuristics (4.35) and (4.36), as well. This shows that both heuristics constitute excellent approximations to the original problem (4.17). Consequently, it is both theoretically and experimentally verified that, although the proposed stochastic programming formulation is essentially myopic, the resulting system performance is not, and this is dependent on the fact that the channel exhibits non trivial temporal statistical interactions. We should also comment on the standard deviation of all systems, which, from Fig. 5.1, seems somewhat high, relative to the range of the respective average SINR. This is exclusively due to the wild variations of the channel, which, in turn, are due to the effects of shadowing and multipath fading; it is not due to the adopted beamforming technique. This is reasonable, since, when the channel is not actually in deep fade at time t (an event which might happen with positive 34 R ≡ 8, # of Trials: 4000 7 R ≡ 8, # of Trials: 4000 Random Failures iff t ∈ [12, 15] Random Failures iff t ∈ [5, 6] 6.5 Expected SINR (dB) Expected SINR (dB) 6.5 Strategic: 0 failures Strategic: 1 failures Strategic: 3 failures Strategic: 5 failures Agnostic (0 failures) 6 5.5 6 Strategic: 0 failures Strategic: 1 failures Strategic: 3 failures Strategic: 5 failures Agnostic (0 failures) 5.5 5 5 4.5 4.5 0 2 4 6 8 10 12 14 16 18 20 0 2 6 8 10 12 Time Slot (t) (a) (b) R ≡ 8, # of Trials: 4000, with γ ≡ 15 7.5 14 16 18 20 18 20 R ≡ 8, # of Trials: 4000, γ ≡ 15 7 Random Failures iff t ∈ [12, 15] Random Failures iff t ∈ [5, 6] 7 6.5 Expected SINR (dB) Expected SINR (dB) 4 Time Slot (t) 6.5 Strategic: 0 failures Strategic: 1 failures Strategic: 3 failures Strategic: 5 failures Agnostic (0 failures) 6 5.5 5 6 5.5 Strategic: 0 failures Strategic: 1 failures Strategic: 3 failures Strategic: 5 failures Agnostic (0 failures) 5 4.5 4.5 4 4 0 2 4 6 8 10 12 14 16 18 20 0 2 4 6 8 10 12 Time Slot (t) Time Slot (t) (c) (d) 14 16 Figure 5.2: Performance of the proposed spatially controlled system, at the presence of motion failures. probability), the relays, at time t − 1, are predictively steered to locations, which, most probably, incur higher network QoS. As clearly shown in Fig. 5.1, for all systems under study, including that implementing the oracle policy, an increase in system performance also implies a proportional increase in the respective standard deviation. Next, we experimentally evaluate the performance of the system at the presence of random motion failures in the network. Hereafter, we work with the 2nd order heuristic (4.36), and set T ≡ 20. Random motion failures are modeled by choosing, at each trial, a random sample of a fixed number of relays and a random time when the failures occur, that is, at each time, the selected relays just stop moving; they continue to beamform staying still, at the position each of them visited last. Two cases are considered; in the first case, motion failures happen if and only if t ∈ [12, 15] (Figs. 5.2a and 5.2c), whereas, in the second case, t ∈ [5, 6] (Figs. 5.2b and 5.2d). In both cases, 35 zero, one, three and five relays (chosen at random, at each trial) stop moving. Two cases for γ are considered, γ ≡ 5 (Figs. 5.2a and 5.2b) and γ ≡ 15 (Figs. 5.2c and 5.2d). Again, the results presented in Fig. 5.2 pleasingly confirm our predictions implied by Theorem 6 (note, however, that Theorem 6 does not support randomized motion failures; on the other hand, our simulations are such in order to stress test the proposed system in more adverse motion failure cases). In particular, Fig. 5.2a clearly demonstrates that a larger number of motion failures induces a proportional, relatively (depending on γ) slight decrease in performance; this decrease, though, is smoothly evolving, and is not abrupt. This behavior is more pronounced in Fig. 5.2c, where the correlation time parameter γ has been increased to 15 (recall that, in Theorem 6, γ is assumed to be sufficiently large). We readily observe that, in this case, over the same horizon, the operation of the system is smoother, and decrease in performance, as well as its slope, are significantly smaller than those in Fig. 5.2a, for all cases of motion failures. Now, in Figs. 5.2b and 5.2d, when motion failures happen early, well before the network QoS converges to its maximal value, we observe that, although some relays might stop moving at some point, the achieved expected network QoS continues exhibiting its usual increasing trend. Of course, the performance of the system converges values strictly proportional to the number of failures in each of the cases considered. This means that the relays which continue moving contribute positively to increasing network QoS. This has been indeed predicted by Theorem 6, as well. 6 Conclusions We have considered the problem of enhancing QoS in time slotted relay beamforming networks with one source/destination, via stochastic relay motion control. Modeling the wireless channel as a spatiotemporal stochastic field, we proposed a novel 2-stage stochastic programming formulation for predictively specifying relay positions, such that the future expected network QoS is maximized, based on causal CSI and under a total relay power constraint. We have shown that this problem can be effectively approximated by a set of simple, two dimensional subproblems, which can be distributively solved, one at each relay. System optimality was tediously analyzed under a rigorous mathematical framework, and our analysis resulted in the development of an extended version of the Fundamental Lemma of Stochastic Control, which constitutes a result of independent interest, as well. We have additionally provided strong theoretical guarantees, characterizing the performance of the proposed system, and showing that the average QoS achieved improves over time. Our simulations confirmed the success of the proposed approach, which results in relay motion control policies yielding significant performance improvement, when compared to agnostic, randomized relay motion. 7 Acknowledgments Dionysios Kalogerias would like to kindly thank Dr. Nikolaos Chatzipanagiotis for very fruitful discussions in the very early stages of the development of this work, and Ioannis Manousakis and Ioannis Paraskevakos for their very useful comments and suggestions, especially concerning practical applicability, implementation of the proposed methods, as well as simulation issues. 36 8 Appendices 8.1 8.1.1 Appendix A: Proofs / Section 3 Proof of Lemma 1 In the following, we will rely on an incremental construction of Σ. Initially, consider the matrix  e e (1, 2) . . . Σ e (1, NT )  Σ (1, 1) Σ  Σ e (2, 1) e (2, 2) . . . Σ e (2, NT )  Σ  RN e , Σ (8.1)   ∈ S T, .. .. .. ..   . . . . e (NT , 1) Σ e (NT , 2) · · · Σ e (NT , NT ) Σ + R e where, for each combination (k, l) ∈ N+ NT × NNT , Σ (k, l) ∈ S , with  e (k, l) (i, j) , Σ e pi (k) , pj (l) Σ pi (k) − pj (l) , η exp − β 2 2 ! , (8.2) + e for all (i, j) ∈ N+ R × NR . By construction, Σ is positive semidefinite, because the well known 2 2 e exponential kernel Σ : R × R → R++ defined above is positive (semi)definite. Next, define the positive definite matrix   1 κ , with (8.3) K, κ 1   kpS − pD k2 κ , exp − <1 (8.4) δ e and consider the Tracy-Singh type of product of K and Σ  e (1, 1) e (1, 2) . . . K 4 Σ e (1, NT )  K4Σ K4Σ  K4Σ e (2, 1) e (2, 2) . . . K 4 Σ e (2, NT )  K4Σ  2RNT eK , K ◦ Σ e , Σ ,  ∈S . . . . . . . .   . . . . e (NT , 1) K 4 Σ e (NT , 2) · · · K 4 Σ e (NT , NT ) K4Σ (8.5) + where “4” denotes the operator of the Kronecker product. Then, for each (k, l) ∈ N+ NT × NNT , we have " # e (k, l) κΣ e (k, l) Σ 2R e (k, l) ≡ K4Σ (8.6) e (k, l) Σ e (k, l) ∈ S . κΣ e K is positive semidefinite, that is, in S2RNT . First, via a simple inductive It is easy to show that Σ + argument, it can be shown that, for compatible matrices A, B, C, D, (AB) ◦ (CD) ≡ (A ◦ C) (B ◦ D) . (8.7) e are symmetric, Also, for compatible A, B, it is true that (A ◦ B)T ≡ AT ◦ BT . Since K and Σ T T e ≡ U e Λ e U e . Given the identities consider their spectral decompositions K ≡ UK ΛK UK and Σ Σ Σ Σ stated above, we may write     eK ≡ K ◦ Σ e ≡ UK ΛK UTK ◦ U e Λ e UTe Σ Σ Σ Σ 37   UTK ◦ UTΣ e   T ≡ UK ◦ UΣ ΛK ◦ ΛΣ UK ◦ UΣ , (8.8) e e e       T T T where UK ◦ UΣ UK ◦ UTΣ ≡ U U ◦ U U e e e e ≡ I2 ◦IRNT ≡ I2RNT , and where the matrix K K Σ Σ ΛK ◦ΛΣ e is easily shown to be diagonal and with nonnegative elements. Thus, since (8.8) constitutes e K , it follows that Σ e K ∈ S2RNT . a valid spectral decomposition for Σ + As a last step, let E ∈ SNT , such that   |k − l| , (8.9) E (k, l) , exp − γ ≡ UK ◦ UΣ e  ΛK ◦ ΛΣ e + for all (k, l) ∈ N+ NT × NNT . Again, E is positive semidefinite, because the well known Laplacian kernel is positive (semi)definite. Consider the matrix e E , (E 4 12R×2R ) Σ e K ∈ S2RNT , Σ (8.10) where “ ” denotes the operator of the Schur-Hadamard product. Of course, since the matrix 12R×2R is rank-1 and positive semidefinite, E 4 12R×2R will be positive semidefinite as well. Consequently, e E will also be positive semidefinite. Finally, observe that by the Schur Product Theorem, Σ 2RN e E + σξ2 I2RN , Σ≡Σ T from where it follows that Σ ∈ S++ T , whenever σξ2 6= 0. Our claims follow. 8.1.2 (8.11)  Proof of Theorem 2 Obviously, the vector process X (t) is Gaussian with mean zero. This is straightforward to show. Therefore, what remains is, simply, to verify that the covariance structure of X (t) is the same as that of C (t), that is, we need to show that n o n o E X (s) X T (t) ≡ E C (s) C T (t) , (8.12) + for all (s, t) ∈ N+ NT × NNT . First, consider the case where s ≡ t. Then, we have n o n o E X (s) X T (t) ≡ E X (t) X T (t) n o   e C. = ϕ2 E X (t − 1) X T (t − 1) + 1 − ϕ2 Σ Observe, though, that, similarly to the scalar order-1 autoregressive model, the quantity n o e C ≡ E X (0) X T (0) Σ (8.13) (8.14) n o is a fixed point of the previously stated recursion for E X (t) X T (t) . Therefore, it is true that n o n o e C ≡ ΣC (0) ≡ E C (t) C T (t) , E X (t) X T (t) ≡ Σ 38 (8.15) which the desired result. Now, consider the case where s < t. Then, it may be easily shown that n o n o n o E X (s) X T (t) ≡ ϕ2 E X (s − 1) X T (t − 1) + ϕE W (s) X T (t − 1) . (8.16) Let us consider the second term on the RHS of (8.16). Expanding the recursion, we may write n o n  o ϕE W (s) X T (t − 1) ≡ ϕE W (s) ϕX T (t − 2) + W T (t − 1) n o ≡ ϕ2 E W (s) X T (t − 2) .. . n o ≡ ϕt−s E W (s) W T (s)   e C. ≡ ϕt−s 1 − ϕ2 Σ (8.17) We observe that this term depends only on the lag t − s. Thus, it is true that n o n o   eC E X (s) X T (t) ≡ ϕ2 E X (s − 1) X T (t − 1) + ϕt−s 1 − ϕ2 Σ n o     e C 1 + ϕ2 = ϕ2·2 E X (s − 2) X T (t − 2) + ϕt−s 1 − ϕ2 Σ .. . n o   X  2 s−1 T t−s 2 e ≡ ϕ E X (0) X (t − s) + ϕ 1 − ϕ ΣC ϕ 2s i∈Ns−1 n o   e C. = ϕ2s E X (0) X T (t − s) + ϕt−s 1 − ϕ2s Σ n o Further, we may expand E X (0) X T (t − s) in similar fashion as above, to get that n o e C. E X (0) X T (t − s) ≡ ϕt−s Σ (8.18) (8.19) Exactly the same arguments may be made for the symmetric case where t < s. Therefore, it follows that n o eC E X (s) X T (t) ≡ ϕ|t−s| Σ   |t − s| e ≡ exp − ΣC γ ≡ ΣC (t − s) (8.20) + for all (s, t) ∈ N+ NT × NNT , and we are done. 8.2  Appendix B: Measurability & The Fundamental Lemma of Stochastic Control In the following, aligned with the purposes of this paper, a detailed discussion is presented, which is related to important technical issues, arising towards the analysis and simplification of variational problems of the form of (4.5). 39 At this point, it would be necessary to introduce some important concepts. Let us first introduce the useful class of Carathéodory functions [26, 44]2 . Definition 3. (Carathéodory Function [26, 44]) On (Ω, F ), the mapping H : Ω × RN → R is called Carathéodory, if and only if H (·, x) is F -measurable for all x ∈ RN and H (ω, ·) is continuous for all ω ∈ Ω. Remark 8. As the reader might have already observed, Carathéodory functions and random fields with (everywhere) continuous sample paths are essentially the same thing. Nevertheless, the term “Carathéodory function” is extensively used in our references [25, 26, 44]. This is the main reason why we still define and use the term.  In the analysis that follows, we will exploit the notion of measurability for closed-valued multifunctions. Definition 4. (Measurable Multifunctions [25,26]) On the measurable space (Ω, F ), a closedvalued multifunction X : Ω ⇒ RN is F -measurable if and only if, for all closed A ⊆ RN , the preimage n o \ X −1 (A) , ω ∈ Ω X (ω) A = 6 ∅ (8.21) is in F . If F constitutes a Borel σ-algebra, generated by a topology on Ω, then an F -measurable X will be equivalently called Borel measurable. We will also make use of the concept of a closed multifunction (Remark 28 in [26], p. 365), whose definition is also presented below, restricted to the case of Euclidean spaces, of interest in this work. Definition 5. (Closed Multifunction [26]) A closed-valued multifunction X : RM ⇒ RN (a function from RM to closed sets in RN ) is closed if and only if, for all sequences {xk }k∈N and {y k }k∈N , such that xk −→ x, y k −→ y and xk ∈ X (y k ), for all k ∈ N, it is true that x ∈ X (y). k→∞ 8.2.1 k→∞ Random Functions & The Substitution Rule for Conditional Expectations Given a random function g (ω, x), a sub σ-algebra Y , another Y -measurable random element X, and as long as E { g (·, x)| Y } exists for all x in the range of X, we would also need to make extensive use of the substitution rule E { g (·, X)| Y } (ω) ≡ E { g (·, X (ω))| Y } (ω) ≡ E { g (·, x)| Y } (ω)|x≡X(ω) , P − a.e., (8.22) which would allow us to evaluate conditional expectations, by essentially fixing the quantities that are constant relative to the information we are conditioning on, carry out the evaluation, and then let those quantities vary in ω again. Although the substitution rule is a concept readily taken for granted when conditional expectations of Borel measurable functions of random elements (say, from products of Euclidean spaces to R) are considered, it does not hold, in general, for arbitrary random functions. As far as our general formulation is concerned, it is necessary to consider random 2 Instead of working with the class of Carathéodory functions, we could also consider the more general class of random lower semicontinuous functions [26], which includes the former. However, this might lead to overgeneralization and, thus, we prefer not to do so; the class of Carathéodory functions will be perfectly sufficient for our purposes. 40 functions, whose domain is a product of a well behaved space (such as RN ) and the sample space, Ω, whose structure is assumed to be and should be arbitrary, at least in regard to the applications of interest in this work. One common way to ascertain the validity of the substitution rule is by exploiting the representation of conditional expectations via integrals with respect to the relevant regular conditional distributions, whenever the latter exist. But because of the arbitrary structure of the base space (Ω, F , P), regular conditional distributions defined on points in the sample space Ω cannot be guaranteed to exist and, therefore, the substitution rule may fail to hold. However, as we will see, the substitution rule will be very important for establishing the Fundamental Lemma. Therefore, we may choose to impose it as a property on the structures of g and/or X instead, as well as establish sufficient conditions for this property to hold. The relevant definition follows. Definition 6. (Substitution Property (SP )) On (Ω, F , P), consider a random element Y : Ω → RM , the associated sub σ-algebra Y , σ {Y } ⊆ F , and a random function g : Ω × RN → R, such that E {g (·, x)} exists for all x ∈ RN . Let CY be any functional class, such that3  ) ( −1 (A) ∈ Y , for all A ∈ B RN N X CY ⊆ IY , X : Ω → R . (8.23) E {g (·, X)} exists We say that g possesses the Substitution Property within CY , or, equivalently, that g is SP ♦CY , if and only if there exists a jointly Borel measurable function h : RM × RN → R, with h (Y (ω) , x) ≡ E { g (·, x)| Y } (ω), everywhere in (ω, x) ∈ Ω × RN , such that, for any X ∈ CY , it is true that E { g (·, X)| Y } (ω) ≡ h (Y (ω) , X (ω)) , (8.24) almost everywhere in ω ∈ Ω with respect to P. Remark 9. Observe that, in Definition 6, h is required to be the same for all X ∈ CY . That is, h should be determined only by the structure of g, relative to Y , regardless of the specific X within CY , considered each time. On the other hand, it is also important to note that the set of unity measure, where (8.24) is valid, might indeed be dependent on the particular X.  Remark 10. Another detail of Definition 6 is that, because E {g (·, x)} is assumed to exist for all x ∈ RN , E { g (·, x)| Y } also exists and, as an extended Y -measurable random variable, for every x ∈ RN , there exists a Borel measurable function hx : RM → R, such that hx (Y (ω)) ≡ E { g (·, x)| Y } (ω) , ∀ω ∈ Ω. (8.25) One may then readily define a function h : RM ×RN → R, such that h (Y (ω), x)≡E { g (·, x)| Y } (ω), uniformly for all points, ω, of the sample space, Ω. This is an extremely important fact, in regard to the analysis that follows. Observe, however, that, in general, h will be Borel measurable only in its first argument; h is not guaranteed to be measurable in x ∈ RN , for each Y ∈ RM , let alone jointly measurable in both its arguments.  Remark 11. (Generalized SP ) Definition 6 may be reformulated in a more general setting. In particular, Y may be assumed to be any arbitrary sub σ-algebra of F , but with the subtle difference that, in such case, one would instead directly demand that the random function h : Ω×RN → R, with 3 Hereafter, statements of type “E {g (·, X)} exists” will implicitly imply that g (·, X) is an F -measurable function. 41   h (ω, x) ≡ E { g (·, x)| Y } (ω), everywhere in (ω, x) ∈ Ω × RN , is jointly Y ⊗ B RN -measurable and such that, for any X ∈ CY (with CY defined accordingly), it is true that E { g (·, X)| Y } (ω) ≡ h (ω, X (ω)) , P − a.e.. (8.26) Although such a generalized definition of the substitution property is certainly less enlightening, it is still useful. Specifically, this version of SP is explicitly used in the statement and proof of Theorem 6, presented in Section 4.4.  Keeping (Ω, F , P) of arbitrary structure, we will be interested in the set of g’s which are SP ♦IY . The next result provides a large class of such random functions, which is sufficient for our purposes. Theorem 8. (Sufficient Conditions for the SP ♦IY ) On (Ω, F , P), consider a random element Y : Ω → RM , the associated sub σ-algebra Y , σ {Y } ⊆ F , and a random function g : Ω×RN → R. Suppose that: • g is dominated by a P-integrable function; that is, ∃ψ ∈ L1 (Ω, F , P; R) , such that sup |g (ω, x)| ≤ ψ (ω) , N x∈R ∀ω ∈ Ω, (8.27) • g is Carathéodory on Ω × RN , and that • the extended real valued function E { g (·, x)| Y } is Carathéodory on Ω × RN . Then, g is SP ♦IY . Proof of Theorem 8. Under the setting of the theorem, consider any Y -measurable random element X : Ω → RN , for which E {g (·, X)} exists. Then, E { g (·, X)| Y } exists. Also, by domination of g by ψ, for all x ∈ RN , E { g (·, x)| Y } exists and constitutes a P-integrable, Y -measurable random variable. By Remark 10, we know that E { g (·, x)| Y } (ω) ≡ h (Y (ω) , x) , ∀ (ω, x) ∈ Ω × RN , (8.28) where h : RM ×RN → R is Borel measurable in its first argument. However, since E { g (·, x)| Y } (ω) N M N ≡ h (Y (ω) , x) is Carathéodory    on Ω × R , h is Carathéodory on R × R , as well. Thus, h will be jointly B RM ⊗ B RN -measurable (Lemma 4.51 in [44], along with the fact that R is metrizable). We claim that, actually, h is such that E { g (·, X)| Y } ≡ h (Y, X) , P − a.e.. (8.29) Employing a common technique, the result will be proven in steps, starting from indicators and building up to arbitrary measurable functions, as far as X is concerned. Before embarking with the core of the proof, note that, for any x1 and x2 in RN and any A ∈ F , the sum g (·, x1 ) 1A + g (·, x2 ) 1Ac is always well defined, and E {g (·, x1 ) 1A } and E {g (·, x2 ) 1Ac } both exist and are finite by domination. This implies that E {g (·, x1 ) 1A } + E {g (·, x2 ) 1Ac } is always well-defined, which in turn implies the validity of the additivity properties (Theorem 1.6.3 and Theorem 5.5.2 in [45]) E {g (·, x1 ) 1A + g (·, x2 ) 1Ac } ≡ E {g (·, x1 ) 1A } + E {g (·, x2 ) 1Ac } ∈ R, 42 and (8.30) E { g (·, x1 ) 1A + g (·, x2 ) 1Ac | Y } ≡ E { g (·, x1 ) 1A | Y } + E { g (·, x2 ) 1Ac | Y } , P − a.e.. (8.31) Hence, under our setting, any such manipulation is technically justified. e 1A (ω), for some x e ∈ RN and some A ∈ Y . Then, by ([45], Suppose first that X (ω) ≡ x Theorem 5.5.11 & Comment 5.5.12), it is true that e ) 1A + g (·, 0) 1Ac | Y } E { g (·, X)| Y } ≡ E { g (·, x e ) 1A | Y } + E { g (·, 0) 1Ac | Y } ≡ E { g (·, x e )| Y } + 1Ac E { g (·, 0)| Y } ≡ 1A E { g (·, x e ) + 1Ac h (Y, 0) ≡ 1A h (Y, x e 1A ) ≡ h (Y, x ≡ h (Y, X) , P − a.e., (8.32) e i 1Ai (ω) , x (8.33) proving the claim for indicators. Consider now simple functions of the form X (ω) ≡ X + i∈NI T S e i ∈ RN , Ai ∈ Y , for all i ∈ N+ where x Aj ≡ ∅, for i 6= j and i∈N+ Ai ≡ Ω. Then, we I , with Ai I again have     X  e i ) 1Ai Y E { g (·, X)| Y } ≡ E g (·, x    +  i∈NI X  e i ) 1Ai Y ≡ E g (·, x + i∈NI ≡ ≡ X + i∈NI X + i∈NI  e i )| Y } 1Ai E { g (·, x ei) 1Ai h (Y, x   X  e i 1Ai  ≡ h Y, x + i∈NI ≡ h (Y, X) , P − a.e., (8.34) and the proved is claimed for simple functions. To show that our claims are true for any arbitrary random function g, we take advantage of the continuity of both h and gnin x. First, o we know that h is Carathéodory, which means that, for N every ω ∈ Ω, if any sequence xn ∈ R is such that xn −→ x (for arbitrary x ∈ RN ), it is true that n→∞ n∈N h (Y (ω) , xn ) ≡ E { g (·, xn )| Y } (ω) −→ E { g (·, x)| Y } (ω) ≡ h (Y (ω) , x) . n→∞ 43 (8.35) Second, weoknow that g is Carathéodory as well, also implying that, for every ω ∈ Ω, if any sequence n is such that xn −→ x, it is true that xn ∈ RN n→∞ n∈N n o Next, let Xn : Ω → RN g (ω, xn ) −→ g (ω, x) . (8.36) n→∞ n∈N be a sequence of simple Borel functions, such that, for all ω ∈ Ω, Xn (ω) −→ X (ω) . (8.37) n→∞ Note that such a sequence always exists (see 1.5.5 (b) in [45]). Consequently, for each  Theorem  N ω ∈ Ω, we may write (note that g is F ⊗ B R -measurable; see ([44], Lemma 4.51)) g (ω, Xn (ω)) −→ g (ω, X (ω)) , (8.38) n→∞ that is, the sequence {g (·, Xn )}n∈N converges to g (·, X), everywhere in Ω. Now, let us try to apply the Dominated Convergence Theorem for conditional expectations (Theorem 5.5.5 in [45]) to the aforementioned sequence of functions. Of course, we have to show that all members of the sequence {g (·, Xn )}n∈N are dominated by another integrable function, uniformly in n ∈ N. By assumption, there exists an integrable function ψ : Ω → R, such that ∀ (ω, x) ∈ Ω × RN . |g (ω, x)| ≤ ψ (ω) , (8.39) In particular, it must also be true that |g (ω, Xn (ω))| ≤ ψ (ω) , ∀ (ω, n) ∈ Ω × N, (8.40) verifying the domination requirement. Thus, Dominated Convergence implies the existence of an  event ΩΠ1 ⊆ Ω, with P ΩΠ1 ≡ 1, such that, for all ω ∈ ΩΠ1 , E { g (·, Xn )| Y } (ω) −→ E { g (·, X)| Y } (ω) . n→∞ Also, for every ω ∈ Ω T (8.41) ΩΠ1 ≡ ΩΠ1 , (8.35) yields h (Y (ω) , Xn (ω)) −→ h (Y (ω) , X (ω)) . (8.42) n→∞ However, by what we have shown above, because the sequence {Xn }n∈N consists of simple functions, then, for every n ∈ N, there exists ΩΠn ⊆ Ω, with P (ΩΠn ) ≡ 1, such that, for all ω ∈ ΩΠn , E { g (·, Xn )| Y } (ω) ≡ h (Y (ω) , Xn (ω)) . (8.43)  Since N is countable, there exists a “global” event ΩΠ2 ⊆ Ω, with P ΩΠ2 ≡ 1, such that, for all ω ∈ ΩΠ2 , E { g (·, Xn )| Y } (ω) ≡ h (Y (ω) , Xn (ω)) , ∀n ∈ N. (8.44)  T Now define the event ΩΠ3 , ΩΠ1 ΩΠ2 . Of course, P ΩΠ3 ≡ 1. Then, for every ω ∈ ΩΠ3 , (8.41), (8.42) and (8.44) all hold simultaneously. Therefore, for every ω ∈ ΩΠ3 , it is true that (say) h (Y (ω) , Xn (ω)) −→ E { g (·, X)| Y } (ω) n→∞ 44 and (8.45) h (Y (ω) , Xn (ω)) −→ h (Y (ω) , X (ω)) , (8.46) n→∞ which immediately yields E { g (·, X)| Y } (ω) ≡ h (Y (ω) , X (ω)) , P − a.e., (8.47) showing that g is SP ♦IY .  Remark 12. We would like to note that the assumptions of Theorem 8 can be significantly weakened, guaranteeing the validity of the substitution rule for vastly discontinuous random functions, including, for instance, cases with random discontinuities, or random jumps. This extended analysis, though, is out of the scope of the paper and will be presented elsewhere.  8.2.2 A Base Form of the Lemma We will first state a base, very versatile version of the Fundamental Lemma, treating a general class of problems, which includes the particular stochastic problem of interest, (4.5), as a subcase. Lemma 3. (Fundamental Lemma / Base Version) On (Ω, F , P), consider a random element Y : Ω → RM , the sub σ-algebra Y , σ {Y } ⊆ F , a random function g : Ω × RN → R, such that E {g (·, x)} exists for all x ∈ RN , a Borel measurable closed-valued multifunction X : RN ⇒ RN , with dom (X ) ≡ RN , as well as another Y -measurable random element ZY : Ω → RN , with ZY (ω) ≡ Z (Y (ω)), for all ω ∈ Ω, for some Borel Z : RM → RN . Consider also the decision set ) ( X (ω) ∈ X (ZY (ω)) , a.e. in ω ∈ Ω  Y N FX (ZY ) , X : Ω → R , (8.48) X −1 (A) ∈ Y , for all A ∈ B RN containing all Y -measurable selections of X (ZY ). Then, FXY (ZY ) is nonempty. Suppose that: • E {g (·, X)} exists for all X ∈ FXY (ZY ) , with inf X∈F Y X (ZY ) E {g (·, X)} < +∞, and that • g is SP ♦FXY (ZY ) . Then, if Y denotes the completion of Y relative to the restriction P|Y , then the optimal value function inf x∈X (ZY ) E { g (·, x)| Y } , ϑ is Y -measurable and it is true that inf Y X∈FX (Z ) Y E {g (·, X)} ≡ E  inf x∈X (ZY ) E { g (·, x)| Y }  ≡ E {ϑ} . (8.49) In other words, variational minimization over FXY (ZY ) is exchangeable by pointwise (over constants) minimization over the random multifunction X (ZY ), relative to Y . Remark 13. Note that, in the statement of Lemma 3, assuming that the infimum of E {g (·, X)} over FXY (ZY ) is less than +∞ is equivalent to assuming the existence of an X in FXY (ZY ) , such that E {g (·, X)} is less than +∞.  Before embarking with the proof of Lemma 3, it would be necessary to state an old, fundamental selection theorem, due to Mackey [46]. 45 Theorem 9. (Borel Measurable Selections [46]) Let (S1 , B (S1 )) and (S2 , B (S2 )) be Borel spaces and let (S2 , B (S2 )) be standard. Let µ : B (S1 ) → [0, ∞] be a standard measure on (S1 , B (S1 )).  Suppose that A ∈ B (S1 ) ⊗ B (S2 ), such that, for each y ∈ S1 , there exists xy ∈ S2 , so that y, xy ∈ A. Then, there exists a Borel subset O ∈ B (S1 ) with µ (O) ≡ 0, as well as a Borel measurable function φ : S1 → S2 , such that (y, φ (y)) ∈ A, for all y ∈ S1 \ O. Remark 14. Theorem 9 refers to the concepts of a Borel space, a standard Borel space and a standard measure. These are employed as structural assumptions, in order for the conclusions of the theorem to hold true. In this paper, except for the base probability space (Ω, F , P), whose structure may be arbitrary, all other spaces and measures considered will satisfy those assumptions by default. We thus choose not to present the respective definitions; instead, the interested reader is referred to the original article, [46].  We are now ready to prove Lemma 3, as follows. Proof of Lemma 3. As usual with such results, the proof will rely on showing a double sided inequality [23–25, 27, 28, 47]. There is one major difficulty, though, in the optimization setting considered, because all infima may be potentially unattainable, within the respective decision sets. However, it is immediately evident that, because g is assumed to be SP ♦FXY (ZY ) , and via a simple application of the tower property, it will suffice to show that   inf E {h (Y, X)} ≡ E inf h (Y, x) . (8.50) Y x∈X (ZY ) X∈FX (Z ) Y This is because it is true that, for any Y -measurable selection of X (ZY ), say X : Ω → RN , for which E {g (·, X)} exists, E { g (·, X)| Y } (ω) ≡ h (Y (ω) , x)|x=X(ω) , ∀ω ∈ ΩΠX ,  where the event ΩΠX ∈ F is such that P ΩΠX ≡ 1 and h is jointly Borel, satisfying E { g (·, x)| Y } ≡ h (Y (ω) , x) , (8.51) (8.52) everywhere in (ω, x) ∈ Ω × RN . For the sake of clarity in the exposition, we will break the proof into a number of discrete subsections, providing a tractable roadmap to the final result. Step 1. FXY (ZY ) is nonempty. It suffices to show that there exists at least one Y -measurable selection of X (ZY ), that is, a Y -measurable random variable, say X : Ω → RN , such that X (ω) ∈ X (ZY (ω)), for all ω in the domain of X (ZY ). We first show that the composite multifunction X (ZY (·)) : Ω ⇒ RN is Y -measurable. Recall from Definition 4 that it suffices to show that n o \ X ZY−1 (A) , ω ∈ Ω X (ZY (ω)) A = 6 ∅ ∈Y, (8.53) for every closed A ⊆ RN  . Since the closed-valued multifunction X is Borel measurable, it is true −1 N that X (A) ∈ B R , for all closed A ⊆ RN . We also know that ZY is Y -measurable, or that 46     ZY−1 (B) ∈ Y , for all B ∈ B RN . Setting B ≡ X −1 (A) ∈ B RN , for any arbitrary closed A ⊆ RN , it is true that   n o Y 3 ZY−1 X −1 (A) ≡ ω ∈ Ω ZY (ω) ∈ X −1 (A) n o \ ≡ ω ∈ Ω X (ZY (ω)) A = 6 ∅ ≡ X ZY−1 (A) , (8.54) and, thus, the composition X (ZY (·)) is Y -measurable, or, in other words, measurable on the measurable (sub)space (Ω, Y ). Now, since the closed-valued multifunction X (ZY ) is measurable on (Ω, Y ), it admits a Castaing Representation (Theorem 14.5 in [25] & Theorem 7.34 in [26]). Therefore, there exists at least one Y -measurable selection of X (ZY ), which means that FXY (ZY ) contains at least one element. F Step 2. ϑ is Y -measurable. To show the validity of this statement, we first demonstrate that, for any chosen h : RM × RN → R, as in Definition 6, the function ξ : RM → R, defined as ξ (y) , inf x∈X (Z(y)) h (y, x) , ∀y ∈ RM , (8.55)     is measurable relative to B RM , the completion of B RM relative to the pushforward PY . This follows easily from the following  facts.  First,  the  graph of the measurable multifunction X (Z (·)) M N is itself measurable and in B R ⊗B R (Theorem 14.8 in [25]), and, therefore, analytic (Appendix A.2 in [27]). Second, h is jointly Borel measurable and, therefore, a lower semianalytic function (Appendix A.2 in [27]). As a result, ([28], Proposition 7.47) implies that ξ is also lower semianalytic, and, consequently, universally measurable (Appendix A.2 in [27]). Being universally   M measurable, ξ is also measurable relative to B R , thus proving our claim. We also rely on the   definitions of both Y and B RM , stated as (Theorem 1.9 in [48]) [ B ∈ Y ⇐⇒ B ≡ C D C ∈ Y and D ⊆ O ∈ Y , with P|Y (O) ≡ 0 and (8.56)       [ B ∈ B RM ⇐⇒ B ≡ C D C ∈ B RM and D ⊆ O ∈ B RM , with PY (O) ≡ 0. (8.57) Now, specifically, to show that ϑ is measurable relative to Y , it suffices to show that, for every  Borel A ∈ B R , ϑ−1 (A) , { ω ∈ Ω| ϑ (ω) ∈ A} ∈ Y . (8.58) Recall, that,  by definition of ξ, it is true that ξ (Y (ω)) ≡ ϑ (ω), for all ω ∈ Ω. Then, for every A ∈ B R , we may write ϑ−1 (A) ≡ ξY −1 (A) ≡ { ω ∈ Ω| ξ (Y (ω)) ∈ A} n o ≡ ω ∈ Ω| Y (ω) ∈ ξ −1 (A) 47   , Y −1 ξ −1 (A) . (8.59)   S But ξ −1 (A) ∈ B RM , which, by (8.57), equivalently means that ξ −1 (A) ≡ GA HA , for some     GA ∈ B RM and some HA ⊆ EA ∈ B RM , with PY (EA ) ≡ 0. Thus, we may further express any A-preimage of ϑ as  [  ϑ−1 (A) ≡ Y −1 GA HA [ ≡ Y −1 (GA ) Y −1 (HA ) . (8.60) Now, because GA is Borel and Y is a random element, it is true that Y −1 (GA ) ∈ Y . On the other hand, HA ⊆ EA , which implies that Y −1 (HA ) ⊆ Y −1 (EA ), where   P|Y Y −1 (EA ) ≡ PY (EA ) ≡ 0. (8.61)  Therefore, we have shown that, for every A ∈ B R , ϑ−1 (A) may always be written as a union of an element in Y and some subset of a P|Y -null set, also in Y . Enough said. F Step 3. For every X ∈ FXY (ZY ) , it is true that h (Y, X) ≥ inf x∈X (ZY ) h (Y, x) ≡ ϑ. For each ω ∈ Ω (which also determines Y ), we may write ϑ (ω) ≡ ≡ inf x∈X (Z(Y (ω))) h (Y (ω) , x) inf M(Y (ω))∈X (ZY (ω)) h (Y (ω) , M (Y (ω))) , (8.62) where M : RM → RN is of arbitrary nature. Therefore, ϑ may be equivalently regarded as the result of infimizing h over the set of all, measurable or not, functionals of Y , which are also selections of X (ZY ). This set, of course, includes FXY (ZY ) . Now, choose an X ≡ MX (Y ) ∈ FXY (ZY ) , as above, for some Borel measurable MX : RM → RN . Then, it must be true that ϑ (ω) ≤ h (Y (ω) , MX (Y (ω))) ≡ h (Y (ω) , X (ω)) , everywhere in ω ∈ Ω. (8.63) F Step 4. It is also true that inf Y X∈FX (Z ) Y E {h (Y, X)} ≥ E  inf x∈X (ZY )  h (Y, x) . (8.64) From Step 3, we know that, for every X ∈ FXY (ZY ) , we have h (Y, X) ≥ ϑ. (8.65) At this point, we exploit measurability of ϑ, proved in Step 2. Since, by assumption, inf Y X∈FX (Z ) Y E {h (Y, X)} ≡ inf Y X∈FX (Z ) Y 48 E {g (·, X)} < +∞, (8.66) it follows that there exists XF ∈ FXY (ZY ) , such that E {h (Y, XF )} < +∞ (recall that the integral E {g (·, XF )} exists anyway, also by assumption). Since (8.65) holds for every X ∈ FXY (ZY ) , it also holds for XF ∈ FXY (ZY ) and, consequently, the integral of ϑ exists, with E {ϑ} < +∞. Then, we may take expectations on both sides of (8.65) (Theorem 1.5.9 (b) in [45]), yielding E {h (Y, X)} ≥ E {ϑ} , ∀X ∈ FXY (ZY ) . (8.67) Infimizing additionally both sides over X ∈ FXY (ZY ) , we obtain the desired inequality. We may also observe that, if inf X∈F Y E {h (Y, X)} ≡ −∞, then X (ZY inf Y X∈FX (Z ) Y ) E {h (Y, X)} ≡ E {ϑ} ≡ −∞, (8.68) and the conclusion of Lemma 3 holds immediately. Therefore, in the following, we may assume that inf X∈F Y E {h (Y, X)} > −∞. F X (ZY ) Step 5. For every ε > 0, n ∈ N and every y ∈ RM , there exists x ≡ xy ∈ X (Z (y)), such that  h y, xy ≤ max {ξ (y) , −n} + ε. (8.69) This simple fact may be shown by contradiction; replacing the universal with existential quantifiers and vice versa in the above statement, suppose that there exists ε > 0 , n ∈ N, and y ∈ RM such that, for all x ∈ X (Z (y)), h (y, x) > max {ξ (y) , −n} + ε. There are two cases: 1) ξ (y) > −∞. In this case, max {ξ (y) , −n} ≥ ξ (y), which would imply that, for all x ∈ X (Z (y)), h (y, x) > ξ (y) + ε, (8.70) contradicting the fact that ξ (y) is the infimum (the greatest lower bound) of h (y, x) over X (Z (y)), since ε > 0. 2) ξ (y) ≡ −∞. Here, max {ξ (y) , −n} ≡ −n, and, for all x ∈ XZ (y), we would write h (y, x) > −n + ε ∈ R, (8.71) which, again, contradicts the fact that −∞ ≡ ξ (y) is the infimum of h (y, x) over X (Z (y)). Therefore, in both cases, we are led to a contradiction, implying that the statement preceding and including (8.69) is true. The idea of using the maximum operator, so that ξ (y) may be allowed to take the value −∞, is credited to and borrowed from ([25], proof of Theorem 14.60). F M Step 6. There exists a Borel measurable function ξe : R → R, such that  where Rξ ∈ B RM  ξe(y) ≡ ξ (y) , is such that PY ∀y ∈ Rξ ⊇ Rξ , (8.72)     Rξ ≡ 1, and Rξ ∈ B RM is such that P Y Rξ ≡ 1, where P Y denotes the completion of the pushforward PY .   From ([48], Proposition 2.12), we know that, since ξ is B RM -measurable, there exists a   B RM -measurable function ξe : RM → R, such that ξe(y) ≡ ξ (y) , 49 ∀y ∈ Rξ , (8.73)    where Rξ is an event in B RM , such that P Y Rξ ≡ 1. However, from Step 2 (see (8.57)),     S E E M and P Y Rξ ≡ 0. Then, it may be easily we know that Rξ ≡ Rξ Rξ , where Rξ ∈ B R     shown that P Y Rξ ≡ P Y Rξ ≡ 1 and, since P Y and PY agree on the elements of B RM ,  PY Rξ ≡ 1, as well. F Step 7. There exists a (P, ε, n)-optimal selector Xnε ∈ FXY (ZY ) : For every ε > 0 and for every n ∈ N, there exists Xnε ∈ FXY (ZY ) , such that   ε h (Y, Xn ) ≤ max inf h (Y, x) , −n + ε, P − a.e.. (8.74) x∈X (ZY ) This is the most crucial property of the problem that needs to be established, in order to reach to the final conclusions of Lemma 3. In this step, we make use of Theorem 9. Because Theorem 9 works on Borel spaces, in the following, it will be necessary to work directly on the state space of the random element Y , equipped with its Borel σ-algebra, and the pushforward PY . In the following, we will also make use of the results proved in Step 5 and Step 6. Recall the definition of   ξ in the statement of Lemma 3. We may readily show that the multifuncM tion X (Z (·)) is B R -measurable. This may be shown in exactly the same way as in Step 1, exploiting the hypotheses that the multifunction X and the function Z are both Borel measurable. Borel measurability of X (Z (·)) will be exploited shortly. Compare the result of Step 5 with what we would like to prove here; the statement preceding and including (8.69) is not enough for our purposes; what we would actually like is to be able to generate a selector, that is, a function of y such that (8.69) would hold at least almost everywhere with respect to PY . This is why we need Theorem 9. The idea of using Theorem 9 into this context is credited to and borrowed from [49].   From Step 2 and Step 6, we know that ξ is B RM -measurable and that there exists a Borel measurable function ξe : RM → R, such that ξe(y) ≡ ξ (y) , everywhere in y ∈ Rξ , where     Rξ ∈ B RM is such that PY Rξ ≡ P Y Rξ ≡ 1. Then, it follows that ξe(y) ≡ inf x∈X (Z(y)) h (y, x) , (8.75) for all y ∈ Rξ . Define, for brevity, XZ (y) , X (Z (y)), for all y ∈ RM . Towards the application of Theorem 9, fix any ε > 0 and any n ∈ N and consider the set   x ∈ Xn (Z (y)) o     , if y ∈ Rξ ε,n M N e ΠXZ ≡ (y, x) ∈ R × R h (y, x) ≤ max ξ (y) , −n + ε . (8.76)    c  x ∈ X (Z (y)) , if y ∈ Rξ     We will show that Πnε constitutes a measurable set in B RM ⊗ B RN . Observe that Πε,n XZ ≡ T ε,n S ΠXZ (Π Πrem ), where we define n o ΠXZ , (y, x) ∈ RM × RN x ∈ X (Z (y)) , (8.77) 50 n n o o Πε,n , (y, x) ∈ RM × RN y ∈ Rξ , h (y, x) ≤ max ξe(y) , −n + ε and (8.78) o n (8.79) Πrem , (y, x) ∈ RM × RN y ∈ Rcξ .     Clearly, it suffices to show that both ΠXZ and Πε,n are in B RM ⊗ B RN . First, the set ΠXZ is the graph of the multifunction XZ , and, because XZ is measurable, it follows from ([25],     Theorem 14.8) that ΠXZ ∈ B RM ⊗ B RN . Second, because g is SP ♦FXY (ZY ) , h is jointly ε,n Borel measurable. Additionally, Rξ is Borel and ξe is Borel as well. Consequently,   Π  can  be M N written as the intersection of two measurable sets, implying that it is in B R ⊗ B R , as     well. And third, Πrem ∈ B RM ⊗ B RN , since Rcξ is Borel, as a complement of a Borel set.     M Therefore, Πε,n ∈ B R ⊗ B RN . XZ Now, we have to verify the selection property, set as a requirement in the statement of Theorem 9. Indeed, for every y ∈ Rξ , there exists xy ∈ X (Z (y)), such that (8.69) holds, where ξ (y) ≡ ξe(y) (see Step 6 and above), while, for every y ∈ Rcξ , any xy ∈ X (Z (y)) will do. Thus, for every  y ∈ RM , there exists xy ∈ RN , such that y, xy ∈ Πε,n XZ . As a result, Theorem 9 applies and c ε,n implies that there exists a Borel subset RΠ of PY -measure 0, as well as a Borel measurable XZ ε,n . In other words, the Borel selector Sεn : RM → RN , such that, (y, Sεn (y)) ∈ Πε,n XZ , for all y ∈ RΠ XZ measurable selector Sεn is such that Sεn (y) ∈ X (Z n(y)) ando h (y, Sεn (y)) ≤ max ξe(y) , −n + ε, ∀y ∈ Rξ T RΠε,n , RξΠε,n , XZ (8.80) XZ   T where, of course, PY Rξ RΠε,n ≡ 1. Additionally, (8.80) must be true at y = Y (ω), as long as XZ ω is such that the values of Y are restricted to RξΠε,n . Equivalently, we demand that ω∈  XZ ω ∈ Ω| Y (ω) ∈ RξΠε,n X Z  ≡Y −1   ξ RΠε,n , Ωεn . XZ (8.81)   But RξΠε,n ∈ B RM and Y is a random element and, hence, a measurable function for Ω to RM . XZ This means that Ωεn ∈ Y and we are allowed to write Z ε ! P (dω) P (Ωn ) ≡ Y = Z −1 ξ ε,n ΠX Z R ( ≡ PY M y∈R  y∈R RξΠε,n X Z ξ ε,n ΠX Z  )P Y (dy) ≡ 1. (8.82) Therefore, we may pull (8.80) back to the base space, and restate it as Sεn (Y (ω)) ∈ X (ZY (ω)) and h (Y (ω) , Sεn (Y (ω))) ≤ max {ξ (Y (ω)) , −n} + ε, 51 ∀ω ∈ Ωεn , (8.83) where Ωεn ⊆ Ω is an event, such that P (Ωεn ) ≡ 1. Then, by construction, Sεn (Y ) ∈ FXY (ZY ) . As a result, for any choice of ε > 0 and n ∈ N, the selector Xnε , Sεn (Y ) ∈ FXY (ZY ) is such that E { g (·, Xnε )| Y } (ω) ≤ max {ϑ (ω) , −n} + ε, P − a.e.. (8.84) We are done. F Step 8. It is true that inf Y X∈FX (Z ) Y E {h (Y, X)} ≤ E  inf x∈X (ZY )  Define the sequence of random variables $n : Ω → R  h (Y, x) . n∈N as (see the RHS of (8.74)) ∀ (ω, n) ∈ Ω × N. $n (ω) , max {ϑ (ω) , −n} , (8.85) (8.86) Also, recall that E {ϑ} < +∞. Additionally, observe that ∀ (ω, n) ∈ Ω × N, $n (ω) ≤ max {ϑ (ω) , 0} ≥ 0, (8.87) where it is easy to show that E {max {ϑ, 0}} < +∞. Thus, all members of {$n }n∈N are bounded by an integrable random variable, everywhere in ω and uniformly in n, whereas it is trivial that, for every ω ∈ Ω, $n (ω) & ϑ (ω) . n→∞ Consider now the result of Step 7, where we showed that, for every ε > 0 and for every n ∈ N, there exists a selector Xnε ∈ FXY (ZY ) , such that h (Y, Xnε ) ≤ $n + ε, P − a.e.. (8.88) We can then take expectations on both sides (note that all involved integrals exist), to obtain E {h (Y, Xnε )} ≤ E {$n } + ε. (8.89) Since Xnε ∈ FXY (ZY ) , it also follows that inf Y X∈FX (Z ) Y E {h (Y, X)} ≤ E {$n } + ε. (8.90) It is also easy to see that $n fulfills the requirements of the Extended Monotone Convergence Theorem ([45], Theorem 1.6.7 (b)). Therefore, we may pass to the limit on both sides of (8.90) as n → ∞, yielding inf E {h (Y, X)} ≤ E {ϑ} + ε. (8.91) Y X∈FX (Z ) Y But ε > 0 is arbitrary. F Finally, just combine the statements of Step 4 and Step 8, and the result follows, completing the proof of Lemma 3.  Remark 15. Obviously, Lemma 3 holds also for maximization problems as well, by defining g ≡ −f , for some random function f : Ω × RN → R, under the corresponding setting and assumptions. Note that, in this case, we have to assume that supX∈F Y E {f (·, X)} > −∞.  X (ZY 52 ) Remark 16. Lemma 3 may be considered a useful variation of Theorem 14.60 in [25], in the following sense. First, it is specialized for conditional expectations of random functions, which are additionally SP ♦FXY (ZY ) , in the context of stochastic control. The latter property allows these conditional expectations to be expressed as (Borel) random functions themselves. This is in contrast to ([25], Theorem 14.60), where it is assumed that the random function, whose role is played by the respective conditional expectation in Lemma 3, is somehow provided apriori. Second, Lemma 3 extends ([25], Theorem 14.60), in the sense that the decision set FXY (ZY ) confines any solution to the respective optimization problem to be a Y -measurable selection of a closed-valued measurable multifunction, while at the same time, apart from natural (and important) measurability requirements, no continuity assumptions are imposed on the structure of the random function induced by the respective conditional expectation; only the validity of the substitution property is required. In ([25], Theorem 14.60), on the other hand, it is respectively assumed that the involved random function is a normal integrand, or, in other words, that it is random lower semicontinuous.  Remark 17. In Lemma 3, variational optimization is performed over some subset of functions measurable relative to Y ≡ σ {Y }, where Y is some given random element. Although we do not pursue such an approach here, it would most probably be possible to develop a more general version of Lemma 3, where the decision set would be appropriately extended to include Y -measurable random elements, as well. In such case, the definition of the substitution property could be extended under the framework of lower semianalytic functions and universal measurability, and would allow the development of arguments showing existence of everywhere ε-optimal and potentially everywhere optimal policies (decisions), in the spirit of [27, 28].  8.2.3 Guaranteeing the Existence of Measurable Optimal Controls Although Lemma 3 constitutes a very useful result, which enables the simplification of a stochastic variational problem, by essentially replacing it by an at least structurally simpler, pointwise optimization problem, it does not provide insight on the existence of a common optimal solution, within the respective decision sets. On the one hand, it is easy to observe that, similarly to ([25], Theorem 14.60), if there exists an optimal selection X ∗ ∈ FXY (ZY ) , such that X ∗ ∈ arg min E { g (·, x)| Y } = 6 ∅, x∈X (ZY ) P − a.e., (8.92) and Lemma 3 applies, then, exploiting the fact that g is SP ♦FXY (ZY ) , we may write inf Y X∈FX (Z ) Y E {g (·, X)} ≡ E {ϑ} ≡ E {ξ (Y )}   = E h Y, X ∗    = E E g ·, X ∗ Y   ≡ E g ·, X ∗ , (8.93) implying that the infimum of E {g (·, X)} over X ∈ FXY (ZY ) is attained by X ∗ ; therefore, X ∗ is also an optimal solution to the respective variational problem. Conversely, if X ∗ attains  the infimum  of E {g (·, X)} over X ∈ FXY (ZY ) and the infimum is greater than −∞, then both E g ·, X ∗ and 53   E {ϑ} are finite, which also implies that E g ·, X ∗ Y and ϑ are finite P − a.e.. As a result, and recalling Step 3 in the proof of Lemma 3, we have    E E g ·, X ∗ Y − ϑ ≡ 0 and (8.94)  ∗ E g ·, X Y − ϑ ≥ 0, P − a.e.. (8.95)   and, consequently, ϑ ≡ E g ·, X ∗ Y , P − a.e.. Unfortunately, it is not possible to guarantee existence of such an X ∗ ∈ FXY (ZY ) , in general. However, at least for the purposes of this paper, it is both reasonable and desirable to demand the existence of an optimal solution X ∗ , satisfying (8.92) (in our spatially controlled beamforming problem, we need to make a feasible decision on the position of the relays at the next time slot). Additionally, such an optimal solution, if it exists, will not be available in closed form, and, consequently, it will be impossible to verify measurability directly. Therefore, we have to be able to show both existence and measurability of X ∗ indirectly, and specifically, by imposing constraints on the structure of the stochastic optimization problem under consideration. One way to do this, emphasizing on our spatially controlled beamforming problem formulation, is to restrict our attention to pointwise optimization problems involving Carathéodory objectives, over closed-valued multifunctions, which are additionally closed -see Definition 5. Focusing on Carathéodory functions is not particularly restrictive, since it is already clear that, in order to guarantee the validity of the substitution rule (the SP Property), similar continuity assumptions would have to be imposed on both random functions g and E { g (·, ·)| Y } ≡ h, as Theorem 8 suggests. At the same time, restricting our attention to optimizing Carathéodory functions over measurable multifunctions, measurability of optimal values and optimal decisions is preserved, as the next theorem suggests. Theorem 10. (Measurability under Partial Minimization) On the base subspace (Ω, Y , P|Y ), where Y ⊆ F , let the random function H : Ω × RN → R be Carathéodory, and consider another random element Z : Ω → RN , as well as any compact-valued multifunction X : RN ⇒ RN , with dom (X ) ≡ RN , which is also closed. Additionally, define H ∗ : Ω → R as the optimal value to the optimization problem minimize H (ω, x) x , ∀ω ∈ Ω. (8.96) subject to x ∈ X (Z (ω)) Then, H ∗ is Y -measurable and attained for at least one Y -measurable minimizer X ∗ : Ω → RN . If the minimizer X ∗ is unique, then it has to be Y -measurable. Proof of Theorem 10. From ([26], pp. 365 - 367 and/or [25], Example 14.32 & Theorem 14.37), we may immediately deduce that H ∗ is Y -measurable and attained for at least one Y -measurable minimizer X ∗ , as long as the compact (therefore closed, as well)-valued multifunction X (Z (·)) : Ω ⇒ RN is measurable relative to Y . In order to show that the composition X (Z (·)) is Y measurable, we use the assumption that the compact-valued multifunction X : RN ⇒ RN is closed and, therefore, Borel measurable (Remark 28 in [26], p. 365). Then, Y -measurability of X (Z (·)) follows by the same arguments as in Step 1, in the proof of Lemma 3.  Remark 18. It would be important to mention that if one replaces RN with any compact (say) subset H ⊂ RN in the statement of Theorem 10, then the result continues to hold as is. No modification is necessary. In our spatially controlled beamforming problem, this compact set H is specifically identified either with the hypercubic region S R , or with some compact subset of it.  54 8.2.4 Fusion & Derivation of Conditions C1-C6 Finally, combining Theorem 8, Lemma 3 and Theorem 10, we may directly formulate the following constrained version of the Fundamental Lemma, which is of central importance regarding the special class of stochastic problems considered in this work and, in particular, (4.5). Lemma 4. (Fundamental Lemma / Fused Version) On (Ω, F , P), consider a random element Y : Ω → RM , the sub σ-algebra Y , σ {Y } ⊆ F , a random function g : Ω × RN → R, such that E {g (·, x)} exists for all x ∈ RN , a multifunction X : RN ⇒ RN , with dom (X ) ≡ RN and , as well as another function ZY : Ω → RN . Assume that: C1. X is compact-valued and closed, and that C2. ZY is a Y -measurable random element. Consider also the nonempty decision set FXY (ZY ) . Additionally, suppose that: C3. E {g (·, X)} exists for all X ∈ FXY (ZY ) , with inf X∈F Y X (ZY ) E {g (·, X)} < +∞, C4. g is dominated by a P-integrable function, uniformly in x ∈ RN , C5. g is Carathéodory on Ω × RN , and that C6. E { g (·, x)| Y } ≡ h (Y, x) is Carathéodory on Ω × RN . Then, the optimal value function inf x∈X (ZY ) E { g (·, x)| Y } , ϑ is Y -measurable, and it is true that inf Y X∈FX (Z Y )   E {g (·, X)} ≡ E {ϑ} ≡ E g ·, X ∗ , (8.97) for at least one X ∗ ∈ FXY (ZY ) , such that X ∗ (ω) ∈ arg minx∈X (ZY ) E { g (·, x)| Y } (ω), everywhere in ω ∈ Ω. If there is only one minimizer attaining ϑ, then it has to be Y -measurable. Proof of Lemma 4. We just carefully combine Theorem 8, Lemma 3 and Theorem 10. First, if conditions C4-C6 are satisfied, then, from Theorem 8, it follows that g is SP ♦IY . Then, since FXY (ZY ) ⊆ IY , g is SP ♦FXY (ZY ) , as well. Consequently, with C1-C3 being true, all assumptions of Lemma 3 are satisfied, and the first equivalence of (8.97) from the left is true. Additionally, from Theorem 10, it easily follows that the optimal value ϑ is Y -measurable, attained by an at least one Y -measurable X ∗ , which, of course, constitutes a selection of X (Z (Y )) ≡ X (ZY ), or, equivalently, X ∗ ∈ FXY (ZY ) . Then, because g is SP ♦FXY (ZY ) , we may write ϑ≡ ≡ inf E { g (·, x)| Y } inf h (Y, x) x∈X (ZY ) x∈X (ZY ) ∗ ≡ h Y, X   ≡ E g ·, X ∗ Y , P − a.e.,   which yields the equivalence E {ϑ} ≡ E g ·, X ∗ . The proof is complete. 55 (8.98)  Remark 19. Note that, because, in Lemma 4, X ∗ (ω) ∈ X (ZY (ω)), everywhere in ω ∈ Ω, it is true that X ∗ is actually a minimizer of the slightly more constrained problem of infimizing E {g (·, X)} over the set of precisely all Y -measurable selections of X (ZY ). Denoting this decision set as ,E Y FXY (Z ) ⊆ FX (ZY ) , the aforementioned statement is true since, simply, Y inf Y ,E (ZY X∈FX =⇒ ) inf Y ,E (ZY X∈FX ) E {g (·, X)} ≥ inf Y X∈FX (Z ) Y   E {g (·, X)} ≡ E g ·, X ∗   E {g (·, X)} ≡ E g ·, X ∗ . (8.99) (8.100) ,E where we have used the fact that X ∗ ∈ FXY (Z . This type of decision set is considered, for simplicity, Y) in (4.5), which corresponds to the original formulation of the spatially controlled beamforming problem.  Lemma 4 is of major importance, as it directly provides us with conditions C1-C6, which, being relatively easily verifiable, at least for our spatially controlled beamforming setting, ensure strict theoretical consistency of the methods developed in this paper. At this point, our discussion concerning the Fundamental Lemma has been concluded.  8.3 8.3.1 Appendix C: Proofs / Section 4 Proof of Theorem 3 Since, in the following, we are going to verify conditions C1-C6 of Lemma 4 in Section 8.2.4 (Appendix B) for the 2-stage problem (4.15), it will be useful to first match it to the setting of Lemma 4, term-by-term. Table 1 shows how the components of (4.15) are matched to the respective components of the optimization problem considered in Lemma 4. For the rest of the proof, we consider this variable matching automatic. Keep t ∈ N2NT fixed. As in the statement of Theorem 3, suppose that, at time slot t − 1 ∈ N+ NT −1 , po (t − 1) ≡ po (ω, t − 1) is measurable relative to C (Tt−2 ). Then, condition C2 is automatically verified. F Next, let us verify C1. For this, we will simply show directly that closed-valued translated multifunctions, in the sense of Definition 1, are also closed. Given two closed sets H ⊂ RN , A ⊆ RN and a fixed reference h ∈ H, let D : RN ⇒ RN be (H, h)-translated in A and consider any two arbitrary sequences {xk ∈ A}k∈N and {y k ∈ A − h}k∈N , (8.101) such that xk −→ x, y k −→ y and xk ∈ D (y k ), for all k ∈ N. By Definition 1, xk ∈ D (y k ) if k→∞ k→∞ and only if xk − y k ∈ H, for all k ∈ N. But xk − y k −→ x − y and H is closed. Therefore, it is k→∞ true that x − y ∈ H, as well, showing that D is closed. By Assumption 2, C : R2R ⇒ R2R is the (G, 0)-translated multifunction in S R , for some compact and, hence, closed, G ⊂ S R . Consequently, the restriction of C in S R is closed and C3 is verified. F 2 Condition C5 is also easily verified; it suffices to show that both functions |f (·, ·, t)| and |g (·, ·, t)|2 are Carathéodory on Ω × S, or, in other words, that the fields |f (p, t)|2 and |g (p, t)|2 are everywhere sample path continuous. Indeed, if this holds, VI (·, ·, t) will be Carathéodory, as a 56 Problem of Lemma 4 2-Stage Problem (4.15) All relay positions and channel observations, up to (current) time slot t − 1 σ-Algebra C (Tt−1 ), jointly generated by the above random vector Optimal value of the second-stage problem, V (·, ·, t − 1) : Ω × S R → R++ Spatially feasible motion region C : S R ⇒ S R , with dom (C) ≡ S R Selected motion policy at time slot t − 2, po (·, t − 1) : Ω → S R Decision set Dt ,E (precisely matched with FXY (Z )) Random element Y : Ω → RM σ-Algebra Y , σ {Y } Random Function g : Ω × RN → R Multifunction X : RN ⇒ RN , with dom (X ) ≡ RN Function ZY : Ω → RN Decision set FXY (ZY ) Y Table 1: Variable matching for (4.15) and the respective problem considered in Lemma 4. continuous functional of |f (·, ·, t)|2 and |g (·, ·, t)|2 , and since h iT  X T T V p1 . . . pR , t ≡ VI (pi , t) , (8.102) + i∈NR it readily follows that V (·, ·, t) is Carathéodory on Ω × S R . In order to show (everywhere) sample path continuity of |f (p, t)|2 (respectively |g (p, t)|2 ) on S, we may utilize (3.11). As a result, sample path continuity of |f (p, t)|2 is equivalent to sample path continuity of F (p, t) ≡ αS (p) ` + σS (p, t) + ξS (p, t) , ∀p ∈ S. (8.103) Of course, αS is a continuous function of p. As long as the fields σS (p, t) and ξS (p, t) are concerned, these are also sample path continuous; see Section 3.3. Enough said. F We continue with C3. Since we already know that V (·, ·, t) is Carathéodory, it follows from   ([44], Lemma 4.51) that V (·, ·, t) is also jointly measurable relative to F ⊗ B S R . Next, let p (t) ≡ p (ω, t) ∈ S R be any random element, measurable with respect to C (Tt−1 ) and, thus, F , too. Then, from ([44], Lemma 4.49), we know that the pair (p (t, ω) , (t, ω)) is also F -measurable. Consequently, |V (·, p (·, t) , t)|2 must be F -measurable, as a composition of measurable functions. Additionally, V (·, ·, t) is, by definition, nonnegative. Thus, its expectation exists (Corollary 1.6.4 in [45]), and we are done. F Conditions C4 and C6 need slightly more work, in order to be established. To verify C4, we have to show existence of a function in L1 (Ω, F , P; R), which dominates V (·, ·, t), uniformly in p ∈ S R . Everywhere in Ω, again using (3.11), and with ς , log (10) /10 for brevity, we may write h iT  X Pc P0 |f (pi , t)|2 |g (pi , t)|2 T T V p1 . . . pR , t ≡ 2 2 2 2 2 2 + P0 σD |f (pi , t)| + Pc σ |g (pi , t)| + σ σD i∈NR ≤ P0 X σ 2 + i∈NR |f (pi , t)|2 57 ≤ ≡ ≡ ≡ P0 X σ2 10ρ/10 P0 R σ2 σ2 σ2 ≤ P0 R 10 σ2 ! exp ς sup αS (p) ` + χS (p, t) p∈S P0 R ! exp ς sup αS (p) ` + σS (p, t) + ξS (p, t) p∈S σ2 ρ/10 ! exp ς sup F (p, t) p∈S 10ρ/10 P0 R 10 sup exp (ςF (p, t)) p∈S 10ρ/10 P0 R ρ/10 , sup |f (pi , t)|2 + pi ∈S i∈NR ! ! exp ς` sup αS (p) exp ς sup χS (p, t) p∈S , ϕ (ω, t) > 0, ∀ω ∈ Ω. p∈S (8.104) Due to the fact that αS is continuous in p ∈ S and that S is compact, the Extreme Value Theorem implies that the deterministic term supp∈S αS (p) is finite. Consequently, it suffices to show that ( !) E exp ς sup χS (p, t) p∈S < +∞, (8.105) provided, of course, that the expectation is meaningfully defined. For this to happen, it suffices that the function supp∈S χS (p, t) is a well defined random variable. Since both σS (p, t) and ξS (p, t) are sample path continuous, it follows that the sum field σS (p, t) + ξS (p, t) is sample path continuous. It is then relatively easy to see that supp∈S χS (p, t) is a measurable function. See, for instance, Theorem 10, or [38]. Additionally, the Extreme Value Theorem again implies that supp∈S χS (p, t) is finite everywhere on Ω, which in turn means that the field χS (p, t) is at least almost everywhere bounded on the compact set S. Now, in order to prove that (8.105) is indeed true, we will invoke a well known result from the theory of concentration of measure, the Borell-TIS Inequality, which now follows. Theorem 11. (Borell-TIS Inequality [38]) Let X (s), s ∈ RN , be a real-valued, zero-mean, Gaussian random field, P-almost everywhere bounded on a compact subset K ⊂ RN . Then, it is true that   E sup X (s) < +∞ and (8.106) s∈K       u2  n o P sup X (s) − E sup X (s) > u ≤ exp − (8.107) , 2 s∈K s∈K 2 sup E X (s) s∈K for all u > 0. 58 As highlighted in ([38], page 50), an immediate consequence of the Borell-TIS Inequality is that, under the setting of Theorem 11, we may further assert that    2    u − E sup X (s)    s∈K n o  P sup X (s) > u ≤ exp − (8.108) ,   s∈K 2 sup E X 2 (s) s∈K for all u > E {sups∈K X (s)}. To show (8.105), we exploit the Borell-TIS Inequality and follow a procedure similar to ([38], Theorem 2.1.2). First, from the discussion above, we readily see that the field χS (p, t) does satisfy the assumptions Theorem 11. Also, because χS (p, t) is the sum of two independent fields, it is true that n o E χ2S (p, t) ≡ η 2 + σξ2 . (8.109)  As a result, Theorem 11 implies that E supp∈S χS (p, t) is finite and we may safely write ( !) Z ∞ ! ! E exp ς sup χS (p, t) ≡ p∈S ≡ Z0 ∞ 0 P exp ς sup χS (p, t) > x dx p∈S P ! log (x) sup χS (p, t) > dx. ς p∈S In order to exploit (8.108), it must hold that ( ) ( )! log (x) > 0. > E sup χS (p, t) ⇔ x > exp ςE sup χS (p, t) ς p∈S p∈S Therefore, we may break (8.110) into two parts and bound from above, namely, ( !) E exp ς sup χS (p, t) ≡ Z p∈S exp(ςE{supp∈S χS (p,t)}) 0 + ≤ Z Z P ! log (x) sup χS (p, t) > dx ς p∈S ∞ exp(ςE{supp∈S χS (p,t)}) P ! log (x) sup χS (p, t) > dx ς p∈S exp(ςE{supp∈S χS (p,t)}) 0 + Z dx ∞ exp(ςE{supp∈S χS (p,t)})     exp−   ( )!2  log (x)  − E sup χS (p, t)  ς p∈S    dx 2 2  2 η + σξ  59 (8.110) (8.111) ( )! ≤ exp ςE sup χS (p, t) Z p∈S ∞ +ς E{supp∈S χS (p,t)}  ( )!2   u − E sup χS (p, t)  p∈S    exp(ςu) exp− 2 2  2 η + σ ξ     du.   (8.112) Since both terms on the RHS of (8.112) are finite, (8.105) is indeed satisfied. Consequently, it is true that E {ϕ (·, t)} < +∞ ⇔ ϕ (·, t) ∈ L1 (Ω, F , P; R) . (8.113) Enough said; C4 is now verified. F 2 Moving on to C6, the goal here is to show that, for each fixed t ∈ NNT , the well defined random function H : Ω × S R → R, defined as H (ω, p) , E {V (p, t) |C (Tt−1 ) } (ω) , (8.114) is Carathéodory. Observe, though, that we may write X H (ω, p) ≡ HI (ω, pi ), (8.115) + i∈NR where the random function HI : Ω × S → R is defined as ( ) Pc P0 |f (p, t)|2 |g (p, t)|2 HI (ω, p) , E 2 2 C (Tt−1 ) (ω) . P0 σD |f (p, t)|2 + Pc σ 2 |g (p, t)|2 + σ 2 σD (8.116) Because a finite sum of Carathéodory functions (in this case, in different variables) is obviously Carathéodory, it suffices to show that HI is Carathéodory. First, it is easy to see that HI (·, p) constitutes a well defined conditional expectation of a nonnegative random variable, for all p ∈ S. Therefore, what remains is to show that HI (ω, ·) is continuous on S, everywhere with respect to ω ∈ Ω. For this, we will rely on the sequential definition of continuity and the explicit representation of HI as an integral with respect to the Lebesgue measure, which exploits the form of the projective system of finite dimensional distributions of |f (p, t)|2 and |g (p, t)|2 . In particular, because of the trick (3.11), it is easy to show that HI can be equivalently expressed as the Lebesgue integral Z HI (ω, p) = r (x) N (x; µ2 (ω, p) , Σ2 (ω, p)) dx, (8.117) 2 R where the continuous function r : R2 → R++ is defined as (recall that ς ≡ log (10) /10) r (x) ≡ r (x1 , x2 ) , Pc P0 10ρ/10 [exp (x1 + x2 )]ς 2 2 P0 σ D [exp (x1 )]ς + Pc σ 2 [exp (x2 )]ς + 10−ρ/10 σ 2 σD 60 , (8.118) for all x ≡ (x1 , x2 ) ∈ R2 , and N : R2 × S × Ω → R++ , corresponds to the jointly Gaussian conditional density of F (p, t) and G (p, t), relative to C (Tt−1 ), with mean µ2 : (ω, p) → R2×1 and covariance Σ2 : (ω, p) → S2×2 ++ explicitly depending on ω and p as µ2 (ω, p) ≡ µ2 (C (Tt−1 ) (ω) ; p) Σ2 (ω, p) ≡ Σ2 (C (Tt−1 ) (ω) ; p) , and (8.119) ∀ (ω, p) ∈ Ω × S. (8.120) Via a simple change of variables, we may reexpress HI (ω, p) as Z r (x + µ2 (ω, p)) N (x; 0, Σ2 (ω, p)) dx. HI (ω, p) ≡ R 2 (8.121) It is straightforward to verify that both µ2 (ω, ·) and Σ2 (ω, ·) are continuous functions in p ∈ S, for all ω ∈ Ω. This is due to the fact that all functions involving p in the wireless channel model introduced in Section 3 are trivially continuous in this variable. Equivalently, we may assert that the whole integrand r (x + µ2 (ω, ·)) N (x; 0, Σ2 (ω, ·)) is a continuous function, for all pairs (ω, x) ∈ Ω × R2 . Next, fix ω ∈ Ω, and for arbitrary p ∈ S, consider any sequence {pk ∈ S}k∈N , such that pk −→ p. Then, HI (ω, ·) is continuous if and only if HI (ω, pk ) −→ HI (ω, p). We will show this k→∞ k→∞ via a simple application of the Dominated Convergence Theorem. Emphasizing the dependence on p as a superscript for the sake of clarity, we can write   1 T  p −1 exp − x Σ2 x    2 q r x + µp2 N x; 0, Σp2 ≡r x + µp2  2π det Σp2      1 p −1 2 kxk2 exp − λmin Σ2  2 q ≤r x + µp2  2π det Σp2 ! kxk22  exp − 2λmax Σp2 p q ≡r x + µ2  2π det Σp2 ! kxk22  exp − 2λmax Σp2 ς P0 10ρ/10  p q ≤ exp x1 + µ2 (1)  σ2 2π det Σp2   ≤ P0 10ρ/10 σ2 " exp x1 + sup µp2 (1) p∈S !#ς kxk22  p  2sup λmax Σ2 p∈S r  2π inf det Σp2  exp − p∈S , P0 10ρ/10 σ 2 [exp(x1 + p1 )]ς 61 kxk22 2p2 √ 2π p3 exp − ! , ψ (ω, x) , (8.122) where, due to the continuity of µ2 (ω, ·) and Σ2 (ω, ·), the continuity of the maximum eigenvalue and determinant operators, the fact that S is compact, and the power of the Extreme Value Theorem, all extrema involved are finite and, of course, independent of p. It is now easy to verify that the RHS of (8.122) is integrable. Indeed, by Fubini’s Theorem (Theorem 2.6.4 in [45]) ! Z Z kxk22 P0 10ρ/10 exp(ςp1 ) 1 ψ (ω, x) dx= exp(ςx1 ) dx exp − √ 2 p3 2π 2p2 2 σ2 R R ! Z kxk22 P0 10ρ/10 exp(ςp1 )p2 1 ≡ exp(ςx1 ) exp − dx √ p3 2πp2 2p2 2 σ2 R ! Z P0 10ρ/10 exp(ςp1 )p2 1 x21 = exp(ςx1 ) √ dx1 exp − √ p3 2p2 2πp2 σ2 R   P 10ρ/10 exp(ςp1 (ω))p2 (ω) p2 (ω) 2 p = 0 2 exp ς < +∞, ω ∈ Ω. (8.123) 2 p3 (ω) σ That is,     ψ (ω, ·) ∈ L1 R2 , B R2 , L; R , ω ∈ Ω, (8.124) where L denotes the Lebesgue measure. We can now call Dominated Convergence; since, for each x ∈ R2 (and each ω ∈ Ω), r (x + µ2 (ω, pk )) N (x; 0, Σ2 (ω, pk )) −→ r (x + µ2 (ω, p)) N (x; 0, Σ2 (ω, p)) k→∞ (8.125) and all members of this sequence are dominated by the integrable function ψ (ω, ·), it is true that Z r (x + µ2 (ω, pk )) N (x; 0, Σ2 (ω, pk )) dx HI (ω, pk )≡ 2 R Z r (x + µ2 (ω, p)) N (x; 0, Σ2 (ω, p)) dx ≡ HI (ω, p) . (8.126) −→ k→∞ 2 R But {pk }k∈N and p are arbitrary, showing that HI (ω, ·) is continuous, for each fixed ω ∈ Ω. Hence, HI is Carathéodory on Ω × S. F The proof to the second part of Theorem 3 follows easily by direct application of the Fundamental Lemma (Lemma 4; also see Table 1).  8.3.2 Proof of Lemma 2 In the notation of the statement of the lemma, the joint conditional distribution of [F (p, t) G (p, t)]T relative to the σ-algebra C (Tt−1 ) can be readily shown to be Gaussian with mean µF,G t|t−1 (p) and 2 covariance ΣF,G t|t−1 (p), for all (p, t) ∈ S × NNT . This is due to the fact that, in Section 3, we have implicitly assumed that the channel fields F (p, t) and G (p, t) are jointly Gaussian. It is then a F,G typical exercise (possibly somewhat tedious though) to show that the functions µF,G t|t−1 and Σ t|t−1 are of the form asserted in the statement of the lemma. Regarding the proof for (4.34), observe that we can write E { |f (p, t)|m |g (p, t)|n | C (Tt−1 )} 62     log (10) ≡ 10 E exp (mF (p, t) + nG (p, t)) C (Tt−1 ) 20     log (10) T (m+n)ρ/20 [m n] [F (p, t) G (p, t)] ≡ 10 E exp C (Tt−1 ) , 20 (m+n)ρ/20 (8.127) with the conditional expectation on the RHS being nothing else than the conditional moment generating function of the conditionally jointly Gaussian random vector [F (p, t) G (p, t)]T at each p and t, evaluated at the point (log (10) /20) [m n]T , for any choice of (m, n) ∈ Z × Z. Recalling the special form of the moment generating function for Gaussian random vectors, the result readily follows.  8.3.3 Proof of Theorem 4 It will suffice to show that both objectives of (4.35) and (4.36) are Carathéodory in Ω × S. But this statement may be easily shown by analytically expressing both (4.35) and (4.36) using Lemma 2. Now, since both objectives of (4.35) and (4.36) are Carathéodory, we may invoke Theorem 10 (Appendix B), in an inductive fashion, for each t ∈ N2NT , guaranteeing the existence of at least one e ∗ (t), which solves the optimization C (Tt−1 )-measurable decision for either (4.35), or (4.36), say p problem considered, for all ω ∈ Ω. Proceeding inductively gives the result.  8.3.4 Proof of Theorem 6 By assumption, V (p, t) is L.MD.G♦ (Ht , µ), implying, for every t ∈ N+ NT , the existence of an event R Ωt ⊆ Ω, satisfying P (Ωt ) ≡ 1, such that, for every p ∈ S , µE { V (p, t − 1)| Ht−1 } (ω) ≡ E { V (p, t)| Ht−1 } (ω) , ∀ω ∈ Ωt . (8.128) Fix t ∈ N2NT . Consider any admissible policy po (t) at t, implemented at t and decided at o t−1 ∈ N+ NT −1 . By our assumptions, V (·, ·, t) is SP ♦CHt . Additionally, because p (t) is admissible, it will be measurable relative to the limit Pt↑ and, hence, measurable relative to Ht . Thus,  σ-algebra  o o there exists an event Ωpt ⊆ Ω, with P Ωpt o ≡ 1, such that, for every ω ∈ Ωpt , E { V (po (t) , t)| Ht } (ω) ≡ E { V (p, t)| Ht } (ω)|p=po (ω,t) ≡ ht (ω, po (ω, t)) , (8.129)   where the extended real-valued random function ht : Ω×S R → R is jointly Ht ⊗B S R -measurable, with ht (ω, p) ≡ E { V (p, t)| Ht } (ω), everywhere in (ω, p) ∈ Ω × S R . Also by our assumptions, V (·, ·, t) is SP ♦CHt−1 , as well. Similarly to the arguments made ↑ above, if po (t) is assumed to be measurable relative to the limit σ-algebra Pt−1 , or, in other words, admissible at t − 1,  then  it will also be measurable relative to Ht−1 . Therefore, there exists an event o o o Ωp− ⊆ Ω, with P Ωp− ≡ 1, such that, for every ω ∈ Ωp− , t t t E { V (po (t) , t)| Ht−1 } (ω) ≡ E { V (p, t)| Ht−1 } (ω)|p=po (ω,t) ≡ ht− (ω, po (ω, t)) , 63 (8.130)   where the random function ht− : Ω × S R → R is jointly Ht−1 ⊗ B S R -measurable, with ht− (ω, p) ≡ E { V (p, t)| Ht−1 } (ω), everywhere in (ω, p) ∈ Ω × S R . Note that, by construction, po (t) will also be admissible at time t and, therefore, measurable relative to and Ht , as well. Now, we combine the arguments made above. Keep t ∈ N2NT fixed. At time slot t − 2 ∈ NNT −2 , let po (t − 1) ≡ po (ω, t − 1) be a C (Tt−2 )-measurable admissible policy (recall that C1-C6 are satisfied by assumption; also recall that, if t ≡ 2, C (Tt−2 ) ≡ C (T0 ) is the trivial σ-algebra). At o o o the next time slot t − 1 ∈ N+ NT −1 , let us choose p (t) ≡ p (ω, t − 1); in this case, p (t) will also be C (Tt−2 )-measurable and result in the same final position for the relays at time slot t ∈ N2NT . As a result, the relays just stay still. Under these circumstances, at time slot t − 1 ∈ N+ NT −1 , the o expected network QoS will be E {V (p (t − 1) , t − 1)}, whereas, at the next time slot t ∈ N2NT , it will be E {V (po (t − 1) , t)}. Exploiting (8.128), we may write \ o \ o µht−1 (ω, p) ≡ ht− (ω, p) , ∀ (ω, p) ∈ Ωt Ωpt−1 Ωp− × S R , (8.131) t  where, obviously, P Ωt T o Ωpt−1 T o Ωp− ≡ 1. Consequently, it will be true that t µht−1 (ω, po (ω, t − 1)) ≡ ht− (ω, po (ω, t − 1)) , ∀ω ∈ Ωt From (8.129) and (8.130), it is also true that \ o Ωpt−1 \ o Ωp− . t µE { V (po (t − 1) , t − 1)| Ht−1 } (ω) ≡ E { V (po (t − 1) , t)| Ht−1 } (ω) , (8.132) (8.133) almost everywhere with respect to P. This, of course, implies that µE {V (po (t − 1) , t − 1)} ≡ E {V (po (t − 1) , t)} , (8.134) and for all t ∈ N2NT , since t was arbitrary. Since (8.134) holds for all admissible policies decided at time slot t − 2 ∈ NNT −2 , it will also hold for the respective optimal policy, that is,     µE V p∗ (t − 1) , t − 1 ≡ E V p∗ (t − 1) , t , ∀t ∈ N2NT . (8.135) Next, as discussed above, the choice po (t) ≡ p∗ (ω, t − 1) constitutes an admissible policy decided ∗ ∗ at time slot t − 1 ∈ N+ NT −1 ; it suffices to see that p (ω, t − 1) ∈ C p (ω, t − 1) , by definition of our initial 2-stage problem, because “staying still” is always a feasible decision for the relays. Consequently, because the optimal policy p∗ (t) results in the highest network QoS, among all admissible policies, it will be true that     µE V p∗ (t − 1) , t − 1 ≤ E V p∗ (t) , t , ∀t ∈ N2NT , (8.136) completing the proof of Theorem 6.  References [1] V. Havary-Nassab, S. ShahbazPanahi, A. Grami, and Z.-Q. Luo, “Distributed Beamforming for Relay Networks based on Second-Order Statistics of the Channel State Information,” Signal Processing, IEEE Transactions on, vol. 56, no. 9, pp. 4306–4316, Sept 2008. 64 [2] V. Havary-Nassab, S. ShahbazPanahi, and A. Grami, “Optimal distributed beamforming for two-way relay networks,” Signal Processing, IEEE Transactions on, vol. 58, no. 3, pp. 1238– 1250, March 2010. [3] Y. Jing and H. Jafarkhani, “Network beamforming using relays with perfect channel information,” Information Theory, IEEE Transactions on, vol. 55, no. 6, pp. 2499–2517, June 2009. [4] G. Zheng, K.-K. Wong, A. Paulraj, and B. Ottersten, “Collaborative-Relay Beamforming with Perfect CSI: Optimum and Distributed Implementation,” Signal Processing Letters, IEEE, vol. 16, no. 4, pp. 257–260, April 2009. [5] J. Li, A. Petropulu, and H. Poor, “Cooperative transmission for relay networks based on second-order statistics of channel state information,” Signal Processing, IEEE Transactions on, vol. 59, no. 3, pp. 1280–1291, March 2011. [6] Y. Liu and A. Petropulu, “On the sumrate of amplify-and-forward relay networks with multiple source-destination pairs,” Wireless Communications, IEEE Transactions on, vol. 10, no. 11, pp. 3732–3742, November 2011. [7] Y. Liu and A. Petropulu, “Relay selection and scaling law in destination assisted physical layer secrecy systems,” in Statistical Signal Processing Workshop (SSP), 2012 IEEE, Aug 2012, pp. 381–384. [8] N. Chatzipanagiotis, Y. Liu, A. Petropulu, and M. Zavlanos, “Controlling groups of mobile beamformers,” in Decision and Control (CDC), 2012 IEEE 51st Annual Conference on, Dec 2012, pp. 1984–1989. [9] D. S. Kalogerias, N. Chatzipanagiotis, M. M. Zavlanos, and A. P. Petropulu, “Mobile jammers for secrecy rate maximization in cooperative networks,” in Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, May 2013, pp. 2901–2905. [10] D. S. Kalogerias and A. P. Petropulu, “Mobi-cliques for improving ergodic secrecy in fading wiretap channels under power constraints,” in Acoustics, Speech and Signal Processing (ICASSP), 2014 IEEE International Conference on, May 2014, pp. 1578–1591. [11] J. Fink, A. Ribeiro, and V. Kumar, “Robust control of mobility and communications in autonomous robot teams,” IEEE Access, vol. 1, pp. 290–309, 2013. [12] Y. Yan and Y. Mostofi, “Co-optimization of communication and motion planning of a robotic operation under resource constraints and in fading environments,” IEEE Transactions on Wireless Communications, vol. 12, no. 4, pp. 1562–1572, April 2013. [13] J. Fink, A. Ribeiro, and V. Kumar, “Robust control of mobility and communications in autonomous robot teams,” IEEE Access, vol. 1, pp. 290–309, 2013. [14] J. Fink, A. Ribeiro, and V. Kumar, “Robust control for mobility and wireless communication in cyber-physical systems with application to robot teams,” Proceedings of the IEEE, vol. 100, no. 1, pp. 164–178, Jan 2012. 65 [15] Y. Yan and Y. Mostofi, “To go or not to go: On energy-aware and communication-aware robotic operation,” IEEE Transactions on Control of Network Systems, vol. 1, no. 3, pp. 218–231, Sept 2014. [16] A. Ghaffarkhah and Y. Mostofi, “Path planning for networked robotic surveillance,” IEEE Transactions on Signal Processing, vol. 60, no. 7, pp. 3560–3575, July 2012. [17] A. Ghaffarkhah and Y. Mostofi, “Communication-aware motion planning in mobile networks,” IEEE Transactions on Automatic Control, vol. 56, no. 10, pp. 2478–2485, Oct 2011. [18] S.-J. Kim, E. Dall’Anese, and G. Giannakis, “Cooperative spectrum sensing for cognitive radios using kriged kalman filtering,” Selected Topics in Signal Processing, IEEE Journal of, vol. 5, no. 1, pp. 24–36, Feb 2011. [19] E. Dall’Anese, S.-J. Kim, and G. Giannakis, “Channel gain map tracking via distributed kriging,” Vehicular Technology, IEEE Transactions on, vol. 60, no. 3, pp. 1205–1211, March 2011. [20] M. Malmirchegini and Y. Mostofi, “On the Spatial Predictability of Communication Channels,” Wireless Communications, IEEE Transactions on, vol. 11, no. 3, pp. 964–978, March 2012. [21] R. C. Elandt-Johnson and N. L. Johnson, Survival Models and Data Analysis, Wiley, 1999. [22] R. Durrett, Probability: theory and examples, Cambridge university press, 2010. [23] J. L. Speyer and W. H. Chung, Stochastic Processes, Estimation, and Control, vol. 17, Siam, 2008. [24] K. J. Astrom, Introduction to Stochastic Control Theory, vol. 70, New York: Academic Press, 1970. [25] R. T. Rockafellar and R. J. B. Wets, Variational Analysis, vol. 317, Springer Science & Business Media, 2009. [26] A. Shapiro, D. Dentcheva, and A. Ruszczynski, Lectures on Stochastic Programming: Modeling and Theory (MPS-SIAM Series on Optimization), SIAM-Society for Industrial and Applied Mathematics, 1st edition, 2009. [27] D. P. Bertsekas, Dynamic Programming & Optimal Control, vol. II: Approximate Dynamic Programming, Athena Scientific, Belmont, Massachusetts, 4th edition, 2012. [28] D. P. Bertsekas and S. E. Shreve, Stochastic optimal control: The discrete time case, vol. 23, Academic Press New York, 1978. [29] A. Goldsmith, Wireless Communications, Cambridge university press, 2005. [30] S. L. Cotton and W. G. Scanlon, “Higher Order Statistics for Lognormal Small-Scale Fading in Mobile Radio Channels,” Antennas and Wireless Propagation Letters, IEEE, vol. 6, pp. 540–543, 2007. [31] M. Gudmundson, “Correlation Model for Shadow Fading in Mobile Radio Systems,” Electronics Letters, vol. 27, no. 23, pp. 2145–2146, Nov 1991. 66 [32] A. Gonzalez-Ruiz, A. Ghaffarkhah, and Y. Mostofi, “A Comprehensive Overview and Characterization of Wireless Channels for Networked Robotic and Control Systems,” Journal of Robotics, vol. 2011, 2012. [33] A. Kaya, L. Greenstein, and W. Trappe, “Characterizing indoor wireless channels via ray tracing combined with stochastic modeling,” Wireless Communications, IEEE Transactions on, vol. 8, no. 8, pp. 4165–4175, August 2009. [34] C. Oestges, N. Czink, B. Bandemer, P. Castiglione, F. Kaltenberger, and A. J. Paulraj, “Experimental characterization and modeling of outdoor-to-indoor and indoor-to-indoor distributed channels,” IEEE Transactions on Vehicular Technology, vol. 59, no. 5, pp. 2253–2265, Jun 2010. [35] M. G. Genton, “Classes of Kernels for Machine Learning: A Statistics Perspective,” Journal of Machine Learning Research, vol. 2, no. Dec, pp. 299–312, 2001. [36] R. J. Adler, The Geometry of Random Fields, vol. 62, Siam, 2010. [37] P. Abrahamsen, A Review of Gaussian Random Fields and Correlation Functions, Norsk Regnesentral/Norwegian Computing Center, 1997. [38] R. J. Adler and J. E. Taylor, Random Fields & Geometry, Springer Science & Business Media, 2009. [39] L. Aggoun and R. J. Elliott, Measure theory and filtering: Introduction and applications, vol. 15, Cambridge University Press, 2004. [40] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery, Numerical Recipes in C, vol. 2, Cambridge university press Cambridge, 1996. [41] I. Arasaratnam, S. Haykin, and R. J. Elliott, “Discrete-Time Nonlinear Filtering Algorithms Using Gauss-Hermite Quadrature,” Proceedings of the IEEE, vol. 95, no. 5, pp. 953–977, May 2007. [42] G. H. Golub and J. H. Welsch, “Calculation of Gauss Quadrature Rules,” Mathematics of computation, vol. 23, no. 106, pp. 221–230, 1969. [43] B. W. Levinger, “The Square Root of a 2×2 Matrix,” Mathematics Magazine, vol. 53, no. 4, pp. 222–224, 1980. [44] C. D. Aliprantis and K. Border, Infinite Dimensional Analysis: A Hitchhiker’s Guide, Springer Science & Business Media, 2006. [45] R. B. Ash and C. Doleans-Dade, Probability and Measure Theory, Academic Press, 2000. [46] G. W. Mackey, “Borel structure in groups and their duals,” Transactions of the American Mathematical Society, vol. 85, no. 1, pp. 134–165, 1957. [47] L. Meier, R. Larson, and A. Tether, “Dynamic programming for stochastic control of discrete systems,” IEEE Transactions on Automatic Control, vol. 16, no. 6, pp. 767–775, Dec 1971. 67 [48] G. B. Folland, Real Analysis: Modern Techniques and their Applications, John Wiley & Sons, 2nd edition, 1999. [49] R. E. Strauch, “Negative dynamic programming,” The Annals of Mathematical Statistics, vol. 37, no. 4, pp. 871–890, 1966. 68
7cs.IT
1 Optimal Power Management for Failure Mode of AC/DC Microgrids in All-Electric Ships arXiv:1712.02552v3 [cs.SY] 2 Jan 2018 Qimin Xu, Bo Yang, Senior Member, IEEE, Qiaoni Han, Yazhou Yuan, Cailian Chen, Member, IEEE, Xinping Guan, Fellow, IEEE Abstract—Optimal power management of shipboard power system for failure mode (OPMSF) is a significant and challenging problem considering the safety of system and person. Many existing works focused on the transient-time recovery without consideration of the operating cost and the voyage plan. In this paper, we formulate the OPMSF problem considering the long-time scheduling and the faults at bus and generator. For reducing the fault effects, we adopt two-side adjustment methods including the load shedding and the reconfiguration. To address the formulated non-convex problem, we transform the travel equality constraint into an inequality constraint and obtain a convex problem. Then, considering the infeasibility scenario affected by faults, a further relaxation is adopted to obtain a new problem with feasibility guaranteed. Furthermore, we derive a sufficient condition to guarantee that the new problem has the same optimal solution as the original one. Because of the mixedinteger nonlinear feature, we develop an optimal algorithm based on Benders decomposition (BD) to solve the new one. Due to the slow convergence caused by the time-coupled constraints and the tailing-off effect, we also propose a low-complexity near-optimal algorithm based on BD (LNBD). The results verify the effectivity of the proposed methods and algorithms. Index Terms—Shipboard power system, failure mode, load shedding, convex relaxation, Benders decomposition I. I NTRODUCTION A. Motivation Shipboard power system (SPS) is self-powered by distributed electrical power generators operating collectively, which can be considered as an isolated microgrid. From the perspective of electrical design of all-electric ship (AES), there are three architectures of SPS to date, i.e., medium voltage DC (MVDC), medium voltage AC (MVAC), and higher frequency AC (HFAC). As the ever-increasing DC-based loads, it is likely that AES will feature a medium voltage primary distribution system in the future [1]. Due to the intensive coupling and finite inertia feature, the consequences of a minor fault in a system component can be catastrophic. Since the AES mostly targets at military applications, it is highly susceptible to be This work was supported by National Key Research and Development Program of China (2016YFB090190), National Natural Science Foundation of China (61573245, 61521063, and 61633017). This work was also partially supported by Shanghai Rising-Star Program under Grant 15QA1402300. Q. Xu, B. Yang, Q. Han, C. Chen, X. Guan are with the Department of Automation, Shanghai Jiao Tong University, Shanghai 200240, China, Collaborative Innovation Center for Advanced Ship and Deep-Sea Exploration, Shanghai 200240, China, and also with the Key Laboratory of System Control and Information Processing, Ministry of Education of China, Shanghai 200240, China (e-mail: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]). Y. Yuan is with the Institute of Electrical Engineering, Yanshan University, Qinhuangdao, 066004, China (e-mail: [email protected]). damaged. Distinguished from terrestrial systems, the system failure of SPS is more disastrous due to the personal safety on the shipboard. Thus, optimal power management of SPS for failure mode (OPMSF) is essential to guarantee the system safety, while meeting the load demand. The time scales of the OPMSF problem includes transienttime, short-time, and long-time. Most of existing works about OPMSF focused on the recovery at a transient-time scale [2]– [7] or a short-time scale [8]. Their objective is to improve the restored power of loads and guarantee the power balance. However, due to the damaged system structure by faults, the power supply-demand relationship is changed. Consequently, the original operating schedule of generators is not suitable for the remaining voyage owing to the increase of operating cost and the risk of system safety. Hence, the long-time scheduling OPMSF problem is essential and meaningful. The adjustment methods for long-time scheduling can be classified into two categories, i.e., the supply side and the demand side. On the supply side, the generators that are the primary generation equipment cannot operate at original optimal state caused by faults. Additionally, energy storage module compensation (ESMC) is a potential solution for improving the energy efficiency of SPS [9]. Hence, the generation scheduling including ESMC in the remaining voyage has to be reorganized according to faults. On the demand side, the load adjustment also plays a key role in optimal power management. The load of SPS includes the propulsion modules and service loads. The power of propulsion modules constitutes a large proportion of SPS, which dynamically changes with operation mode switching. The propulsion power adjustment (PPA) can achieve significant energy efficiency improvement [10]. However, once the capacity of generators is not enough to cover the load demand in the corresponding zones after faults happening, load shedding of service loads and reconfiguration of power network are required for guaranteeing the system safety and completing the voyage. Hence, it is necessary to consider load shedding and reconfiguration besides PPA on the demand side. To sum up, two-side adjustment methods including load shedding and reconfiguration are meaningful and have significant effects on the OPMSF problem for guaranteeing the system safety, completing the voyage, and reducing the operating cost. B. Literature Review Many efforts have been devoted to study the OPMSF problem [2]–[8], [10]–[18]. In the transient-time scale, their 2 main objective is to maximize the weighted sum of restored loads [2]–[7], [11]–[13]. Additionally, there are other considerations including obtaining the correct order of switching [2], probability-based prediction of fault effects [3], minimizing the number or cost of switching actions [4], [5], real-time management [6], [7], etc. In the short-time scale (warmup time of the backup power sources), the authors in [8] developed a reference governor-based control approach to support the non-critical loads as much as possible while maximizing the battery usage. However, they focused on the recovery of power supply for loads in a transient-time or short-time scale, without consideration of the voyage plan and operating cost after faults in a long-time scale. In the long-time scale, the algorithms based on the particle swarm optimization (PSO) method are developed to solve the optimal power management (OPMS) problem for normal mode in [10], [15], [16]. In the three works, PPA and ESMC are considered for improving energy efficiency. Additionally, energy efficiency operation indicator (EEOI) is taken into account for the limitation of greenhouse gas (GHG) emission. In [17], dynamic programming (DP) algorithm is adopted to solve the same problem. In [18], the authors formulated a multi-objective problem that considers the reduction of fuel consumption and GHG mitigation together. In the above works, they do not consider the failure mode for improving the system safety and reliability. To the best of our knowledge, there is no work focused on the OPMSF problem in a longtime scale. Meanwhile, due to the damaged power network, and the usage of reconfiguration and load shedding, the algorithms in above works cannot be directly adopted to solve the OPMSF problem. C. Challenges The main target of this work is to solve the OPMSF problem in a long-time scale. There are three main challenges to solve this problem. Firstly, since reconfiguration and load shedding are adopted, how to coordinate them with the other adjustment methods for meeting the load demand in the first place. Secondly, considering the non-convex feature of the proposed problem and the infeasibility scenario affected by faults, appropriate relaxation methods have to be developed to make the problem tractable. Thirdly, there are more variables in the two-side adjustment methods for failure mode than that for normal mode. Furthermore, the variables in the travel and ESM constraints of this mixed-integer nonlinear programming (MINLP) problem are coupled in time. Hence reducing the complexity needs to be considered in the algorithm design. D. Contributions In this paper, we deal with OPMSF problem in MVDC SPS to guarantee the system safety, complete the voyage and reduce the operating cost. Two-side adjustment methods including load shedding of service loads and reconfiguration of power network are all considered in this work. To make this problem more tractable, we develop two-step relaxations and obtain a new convex problem. Then, we design an optimal and a nearoptimal low complexity algorithms to solve the new problem. The contributions of this paper are summarized below. With the objective of minimizing the total operating cost that contains the cost of generation, energy storage, and load shedding, we formulate the OPMSF problem based on the analysis of faults. Different from existing works, we add load shedding and reconfiguration into the adjustment methods considering the fault effects. A sufficient condition is established to guarantee that load shedding is adopted only when generator scheduling (GS) and ESMC cannot solve the OPMSF problem. • We firstly relax the non-convex travel constraint in the original problem to obtain a convex problem. Then, considering the non-feasibility scenarios caused by faults, we formulate a new MINLP problem with feasibility guarantee by further relaxing the travel constraint and adding a penalty term in the objective. Lastly, a sufficient condition is derived to guarantee that if the original problem is feasible, the new one has the same optimal solution; if not, the maximum allowed distance can be further obtained to assist rescue mission. • To address the new problem, we design an optimal algorithm based on Benders decomposition (BD) that splits it into two more tractable problems (subproblem and master problem). Due to the slow convergence caused by the time-coupled constraints and the tailing-off effect, we propose a low-complexity near-optimal algorithm based on BD (LNBD) by decomposing the time-coupled constraints in the subproblem and adding the accelerating constraints in the master problem. The paper is organized as follows: in Section II, MVDC SPS and the main modules are introduced, and the OPMS problem is formulated; Section III reformulates the OPMSF problem according to different faults; Section IV details the proposed offline and online algorithms; the performance of the proposed method is evaluated in Section V. Finally, the conclusion is drawn in Section VI. • II. S YSTEM M ODELS AND P ROBLEM F ORMULATION SPS is an integrated power system, which consists of power generators, energy storage modules (ESMs), loads, converters, and transmission power network. In this section, these main models are introduced in detail. Then, the OPMS problem for normal mode is formulated based on these models. Particularly, the main notations used in this work are summarized in Table I. Zone PORT SIDE 2 11 3 4 Vital and Semivital loads G1 MTG AC/DC Redundancy Switch DC/AC AC/DC 9 10 G2 Bus ATG PM Non-vital loads 5 6 7 8 STARBOARD SIDE Fig. 1: MVDC shipboard power system architecture. A. System Structure Overview The classic architecture of MVDC SPS is shown in Fig.1. This architecture adopts a zonal approach with a starboard 3 To keep the safe operation of generators and avoid mechanical damage, the output power has to be bounded. Those constraints are described as follows, ∀t ∈ T , ∀m ∈ M: max min δg,m (t)Pg,m 6 Pg,m (t) 6 δg,m (t)Pg,m , max max − Rg,m 6 Pg,m (t) − Pg,m (t − 1) 6 Rg,m , (1) δg,m (t) − δg,m (t − 1) 6 yg,m (t), (3) 6 δg,m (t) + · · · + δg,m (t + where CG (·) denotes the fuel cost function in arbitrary monetary unit (m.u.), which is determined by the generation power Pg,m (t). The fuel consumption cost of generators can be approximately represented by a quadratic function of produced power Pg,m (t) where ag,m , bg,m , and cg,m are constants determined by technical specifications of generator m. The parameter Css is the unit cost of start-up. C. Energy Storage Module ESM has an important role in the optimal operation of AES, which can also increase safety and reliability. An appropriate ESM can store the excessive energy from the generators or complementarily supply the load, which realizes the optimal adjustment for low-cost operation. Different ESM technologies (e.g., batteries, flywheels, and super capacitors) with different operating characteristics are available nowadays. Batteries could be used in relatively large stationary applications for peak power shaving, and uninterruptible power supply. The third option of ESM location of multi-zone SPS in [19] is employed in each zone, which is shown in Fig. 2. ESM is incorporated with the PB or SB at the longitude bus. There are PCMs, PDMs for power conversation and load management. In this case, ESM can supply power for propulsion modules and service loads. min Tm (2) − 1), (4) where Pg,m (t) denotes the output power of generator m at min max represent the maximum and minand Pg,m time t. Pg,m imum output power of generator m. δg,m (t) the status of Loa d Loa d Loa d Loa d Loa d PCM1 Loa d PDM (AC) ESM MVDC B. Generation Model min yg,m (t)Tm + cg,m δg,m (t), Ctr (yg,m (t)) = yg,m (t)Css , PDM (DC) bus (SB) and a port bus (PB), and the SPS is parted into K electric zones. The generators are classified into two types: main turbine generator (MTG) and auxiliary turbine generator (ATG). The distributed layout of generators contributes to enhancing the overall service capability. In each zone, the service loads are managed by the power control module (PCM) and power distribution module (PDM). The structure is shown in Fig. 2. The DC zones are powered by a set of generators and converters denoted by m ∈ M. The loads are powered by a set of buses which run longitudinally along the PB and SB. Here propulsion modules are considered separately from service loads because of large energy consumption. In this work, we assume that the SPS operates in discrete time with t ∈ T = {1, 2, 3, · · · } and time interval ∆t. CG (Pg,m (t)) = ag,m (Pg,m (t)∆t)2 + bg,m Pg,m (t)∆t PDM (DC) Physical interpretation Set, number and index of generators and converters Set, number and index of DC zones Set, number and indexes of propulsion modules Set, number and index of ESMs Set, number and index of island parts Set, number and index of time Superscript denoting minimum and maximum Output power of generator m at time t Status of generator m, (1/0 = online/offline) Start-up status of generator m, (1/0 = start-up/shut-down) Output power of the ESM in zone z at time t Capacity of the ESM in zone z at time t Propulsion power of the r-th propulsion module Total output power of generators in island part w at time t PE,w (t) Total output power of the ESMs in island part w at time t PP R,w (t) Total output power of the propulsion modules in island part w at time t PL,w (t) Total Load demand in island part w at time t Psv (t) Power demand of vital and semi-vital loads at time t Pno (t) Power demand of non-vital loads at time t ρ(t) Lower bound of the load-shedding amount of Pno (t) V (t) Ship speed at time t C(t) Total operating cost at time t CG (Pg,m (t)) Fuel cost of generator m at time t Ctr (yg,m (t)) Startup/shut-down cost of generator m at time t CE (Pe,n (t)) Operating cost of the ESM z at time t CL (ρ(t)) Load shedding cost at time t Pic,m (t) Input power of converter m at time t Poc,m (t) Output power of converter m at time t SP,z (t) Redundancy switches of PB in zone z at time t SS,z (t) Redundancy switches of SB in zone z at time t D, Dd Travel distance, reduced travel distance PDM (AC) Notation M, M , m Z, Z, z R, R, r N , N, n W, W , w T , T, t max, min Pg,m (t) δg,m (t) yg,m (t) Pe,n (t) Ee,n (t) Ppr,r (t) PG,w (t) max generator m. Rg,m the maximum ramp-rate of generator m. Constraint (2) demonstrates the maximum ramp-rate constraint of Pg,m (t). The start-up state yg,m (t) is a binary variable, which is detected by (3). Eq. (4) describes the minimum operation time of generators m. The fuel consumption cost of generator CG (Pg,m (t)) and start-up/shut-down cost Ctr (yg,m (t)) of generator m at time t are expressed as, ∀m ∈ M: PCM1 TABLE I: Main notations MVDC PCM2 PDM PDM Loa d Loa d Fig. 2: Energy storage module location in zonal power system. The energy capacity and power of ESM should be upper and lower bounded. The minimum energy E min stored in ESM is limited by reliability and reserve adequacy reasons, and the maximum stored energy E max is limited by ESM technical specifications. Also, the power produced or absorbed by the ESM are denoted by the maximum charging and discharging 4 powers Pemax , Pemin , respectively. Hence the ESMs satisfy the following constraints, ∀t ∈ T , ∀n ∈ N ⊆ Z: Pemin 6 Pe,n (t) 6 Pemax , (5) Ee,n (t + 1) = Ee,n (t) + Pe,n (t)∆t 0 6 Ee,n (t) 6 E max , (6) (7) where Ee,n (t) and Pe,n (t) represent residual energy and output power of the ESM in zone z at time t. Pemin is a negative constant. The capital cost of ESM is constant, because it is just relative to E max and P max [20]–[22]. Besides, the charge energy cannot be purchased from the main grid on the voyage. Thus, the capital cost and operating cost of ESM are ignored here. The life-cycle cost of ESM Clc (Pe,n (t)) at each time t is mainly considered, which is modeled as, ∀n ∈ N : CE (Pe,n (t)) = alc Pe,n (t)2 + clc , where alc and clc are positive constants. D. Service Loads In SPS, all the service loads can be divided into three categories by quality of service (QoS) reqirement: vital, semi-vital, and non-vital loads. Vital loads cannot be interrupted, which are always required for normal mode. Semi-vital loads can be interrupted in a short-time scale. In the case of emergencies, non-vital loads can be shed in a long-time scale to maintain power balance. At a certain time, vital and semi-vital loads can be powered by the PB or SB using redundant switches, which is represented by a pair of switches as shown in Fig.1. This redundant topology aims to improve the stability of power supply. The relevant constraint is detailed in subsection II-F. Each non-vital load connects to one bus, PB or SB. In this work, load shedding is considered only for non-vital loads. Thus, the total load demand at time t can be described as: PL (t) = Pvs (t) + (1 − ρ(t))Pno (t), ρ(t) ∈ [0, 1]. (8) To reduce the computation complexity, ρ(t) denotes a continuous variable that indicates the lower bound of the loadshedding amount of all the non-vital loads. The cost of load shedding at each time t is represented by the load-shedding amount Pls (t), which is described as: CL (ρ(t)) = Pls (t) = ρ(t)Pno (t). E. Propulsion Module 1) Ship Speed: The ship speed is determined by the propulsion power which consumes about 70 to 90 percentage of the total power. The relationship between them depends on hull resistance at specific conditions and is formulated as: PP R (t) = αV (t)β , ∀t ∈ T , P power PP R (t) = r∈R Ppr,r (t). Here we consider that the propulsion power is bounded by the respective maximum and minimum ship speed. V min 6 V (t) 6 V max , ∀t ∈ T . (10) 2) Travel Distance: The total travel distance of all the time should almost equal to the travel distance target D. X V (t)∆t = D. (11) t∈T F. Power Network Model 1) Zone Redundant Switch: The redundant design of zonal SPS is used for improving the reliability of vital and semivital loads. Besides, it also improves the feasibility of power supply to reduce the operating cost. In each zone, every vital and semi-vital loads have two paths to be powered. SP,z (t) and SS,z (t) respectively represent the state of the redundant switches connected with the PB and SB in zone z. 0 represents open, and 1 represents close. Thus if SP,z (t) = 1 and SS,z (t) = 0, the vital and semi-vital loads in zone z are powered by PB, and conversely powered by SB. Thus, the redundancy switches satisfy following constraints, ∀t ∈ T , ∀z ∈ Z: SP,z (t) + SS,z (t) = 1, SP,z (t), SS,z (t) ∈ {0, 1}, (12) ys,z (t)Tsmin 6 SP,z (t) + · · · + SP,z (t + Tsmin − 1), (13) where constraint (13) describes the minimum switching time Tsmin to avoid frequently switching. 2) Power Balance: Supply and demand balance is the basic operation requirement. Given the hybrid AC/DC power system, the power equation of the converter is described as: Poc,m (t) = ζPic,m (t), ∀m ∈ M, t ∈ T , (14) where Pic,m (t) and Poc,m (t) represent the input and output power of converter m. Here the power loss of converter is considered as a constant ratio (1 − ζ) with the input power Pic,m (t). Since the generator directly connects to the converter and they are tight coupled, we set Pg,m (t) ≈ Pic,m (t). Thus (14) can be transfered into Poc,m (t) = ζPg,m (t), ∀m ∈ M, t ∈ T . (15) The DC part includes service loads, propulsion module, and ESMs. Due to the tight couple of DC part in SPS, the power loss of transmission line can be ignored. So the power consumption can be represented by the total power of service loads and propulsion modules. The relationship between them is given as, ∀t ∈ T : X X X Poc,m (t) + Pe,n (t) = PL (t) + Ppr,r (t). (16) m∈M n∈N r∈R (9) where V (t) denotes the ship velocity at time t, PP R (t) the total required propulsion power to reach the velocity V (t), α the matching coefficient for propulsion power and velocity, and β a constant which equals to 3 for conventional hull form. Propulsion power is the sum of all the propulsion G. Optimal Power Management of SPS Problem Considering that this work focuses on the OPMSF problem, completing the voyage and guaranteeing the system safety are more important. Thus, GHG emission limitation is not considered here. To address the OPMSF problem, it is necessary 5 to formulate the OPMS problem for the normal mode. First, we define the control vector at time t as binary continuous z }| { z }| { △ u(t) = ( δg,m (t), yg,m (t) Pg,m (t), Pe,n (t), Ppr,r (t), ρ(t)) . In the normal mode, SP,z (t) and SS,z (t) do not need to be reconfigured. Thus, they are not included in u(t). Then, the objective is to minimize the total operating cost in the whole voyage, while ensuring the system safety. Thus, we define the objective function as X △ C(t) = (CG (Pg,m (t)) + Ctr (yg,m (t))) m∈M + ξe X CE (Pe,n (t)) + ξl CL (ρ(t)), ∀t ∈ T , n∈N where the operating cost C(t) at time t include the fuel cost of generators, the start-up/shut-down cost, the operating cost of ESMs, and the load shedding cost. ξe and ξl are the parameters used to tradeoff the costs of generators, ESMs and load shedding. Theorem 1. To meet the load demand firstly, load shedding is adopted only when GS and ESMC cannot solve the OPMSF problem. Thus, ξl has to satisfy that (17) ξl > max{2ag Pgmax + bg , 2ξe alc Pemax },  max , ag = max where Pgmax = max Pg,m  (ag,m ) , bg = max max max (bg,m ) , m ∈ M, Pe = max Pe,n ,n ∈ N. Proof. Please see Appendix A. Hence the OPMS problem for normal mode is described as: X P1 : min C(t) u(t) s.t. t∈T (1) − (13), (15), (16), where the constraints of all the modules which are described in the former subsections are all taken into account. III. P ROBLEM A NALYSIS AND T RANSFORMATION Firstly, we carry out fault preprocessing for generator fault and bus fault. Then, considering the non-convex constraint and the fault effects, we transform the problem to make it more tractable. The problem transformation is illustrated in Fig. 3. P1 (OPMS) Original Problem P4 Relaxed problem FeasibilityFault guaranteed Convex Preprocessing Relaxation Relaxation P2 (OPMSF) P3 Semi-island mode Convex problem Fig. 3: Problem transformation. A. Fault Preprocessing In this subsection, fault preprocessing is introduced in detail, which has two steps: fault analysis and problem reformulation. 1) Fault Analysis: In this work, we focus on two main physical faults: generator fault and bus fault. Based on our analysis, all the faults are divided into three modes, i.e., island fault, semi-island fault, and non-island fault. The examples of latter two are shown in Fig. 4. 1 2 S1 P1 11 Converter MTG 9 SS,1 S7 P7 S4 P4 Sp,1 SS,2 S5 P5 SS,3 S6 5 Zone 1 Sp,4 S8 P8 SS,4 P9 S9 P6 P3 S3 S10 P10 Sp,3 Sp,2 S2 P2 PB 4 3 Semi-Island 10 ATG P12 S12 7 Zone 3 6 Zone 2 12 Converter S11 P11 8 Zone 4 SB Island Fig. 4: Semi-island and island scenario. a) Non-island mode: If faults only happen at one bus (PB or SB), these cases are defined as the non-island mode. In this mode, the system structure has not been significantly changed, and the power balance constraint is also not affected. b) Island mode: Faults that happen at both sides (PB and SB) divide the zones into several independent island parts. In this mode, the redundant switches do not need to be changed. A case is shown in Fig. 4. The DC zone is divided into two parts without any connection: zone (1, 2, 3) and zone 4. c) Semi-island mode: This mode is similar to the island mode, but there are coupled zones between the island parts. For example, in the semi-island mode of Fig. 4, the loads in zone 2 can be powered by different islanding parts. If SS2 = 1 and SP2 = 0, zone 2 is powered by ATG, and conversely powered by MTG. Thus zone 2 is the coupled part, and the SS2 , SP2 are the coupled redundant switches. 2) Problem reformulation : Based on three fault-modes, the OPMS problem is reformulated respectively. a) No-island Mode: In the non-island mode, all the service loads and propulsion modules can be powered by MTGs and ATGs, and the redundant switches are reconfigured to connect to the undamaged bus (PB or SB). Thus, the OPMS problem for this fault mode is P1 with determined redundant switch configuration. Similarly, the OPMS problem in generator fault is P1 with determined state δg,m (t). Thus, the optimization problems in this mode are classified as P1. b) Island Mode: Since the power network is damaged by island-mode faults, the power balance constraint (16) are correspondingly changed. The power capacity of each island part is also different from the normal mode. Each island part is denoted by w ∈ W. Here we reconstruct the power constraint as, ∀t ∈ T , ∀w ∈ W: X X Ppr,r (t) Pvs,z (t) + (1 − ρw (t))Pno,w (t) + r∈Rw z∈Lw = X m∈Mw ζPg,m (t) + X Pe,n (t), (18) n∈Nw where Lw , Rw , Mw , and Nw denote the sets of service loads (vital and semi-vital), propulsion modules, generators, and ESMs in the w-th island part respectively. Pvs,z (t) denotes the vital and semi-vital loads in zone z at time t. Hence the constraint (16) is divided into W constraints in this mode. Let PG,w (t) and PE,w (t) represent the output power of the generators and ESMs in the w-th island part. Let PL,w (t) and PE,w (t) represent the demand of the service loads and 6 propulsion modules in the w-th island part. Then, constraint (18) can be simplified as, ∀t ∈ T , ∀w ∈ W: PL,w (t) + PP R,w (t) = ζPG,w (t) + PE,w (t), (19) where PL,w (t) = PV S,w (t) + (1 − ρw (t))PN O,w (t). PV S,w (t) and PN O,w (t) denote the vital and semi-vital loads, and nonvital loads in island w respectively. Since the system is divided into W island parts and the propulsion modules in one zone practically, P1 is divided into W independent problems. Only one problem needs to adjust PP R,w . Based on the relationship of speed and propulsion power in (9), the speed related constraints (10) and (11) can be transformed as follows, ∀t ∈ T : X (PP R (t)/α)1/β ∆t = D, (20) t∈T α(V min )β 6 PP R (t) 6 α(V max )β . (21) Thus the control vector of each part in island mode at time t can be represented by △ uw (t) =(δg,m (t), yg,m (t), Pg,m (t), Pe,n (t), Ppr,r (t), ρw (t)), m ∈ Mw , n ∈ Nw , r ∈ Rw . The objective function of OPMS problem for this fault mode in each island part wis defined as  X  △ CG (Pg,m (t)) + Ctr (yg,m (t)) Cw (t) = m∈Mw + ξe X CE (Pe,n (t)) + ξl CL (ρw (t)), ∀t ∈ T . z∈Nw c) Semi-island Mode: In semi-island mode, the constraint (16) is also divided into W constraints. The coupled redundant switches SP,x , x ∈ Ωpb,w and SS,y , y ∈ Ωsb,w affect the total power of loads of this mode. Ωpb,w and Ωsb,w denote the sets of coupled redundant switches connected to PB and SB respectively, which belong to the w-th island part. In other words, the coupled redundant switches reconfiguration is to determine which island part supplies the power of vital and semi-vital loads in the coupled zones. Each power balance constraint is related to the SP,x and SS,y in the coupled zones, which can be described as, ∀t ∈ T , ∀w ∈ W: ζPG,w (t) + PE,w (t) =PL,w (t) + PP R,w (t) + X SP,z (t)Pvs,z (t) z∈Ωpb,w + X (22) SS,z (t)Pvs,z (t). z∈Ωsb,w The relationship between the output power of the ESMs in different island parts can be described as, ∀t ∈ T , w ∈ W: min Ee,w min Pe,w max EE,w (t) 6 Ee,w , max PE,w (t) 6 Pe,w , (23) EE,w (t) + PE,w (t) = EE,w (t + 1), (25) 6 6 (24) where Zw denotes the maximum number of the ESMs that canPsupply power to the w-th island part, which min max satifies = Zw Eemin , Ee,w = w∈W Zw = Z. Ee,w max min min max max Zw Ee , Pe,w = Zw Pe and Pe,w = Zw Pe . Hence the control vector of each part in semi-island mode at time t can be represented by △ uw (t) =(δg,m (t), yg,m (t), SP,x (t), SS,y (t), Pg,m (t), Pe,n (t), Ppr,r (t), ρw (t)), m ∈ Mw , z ∈ Zw , (26) n ∈ Nw , r ∈ Rw , x ∈ Ωpb,w , y ∈ Ωsb,w . TABLE II: Differences of the OPMS problem for three modes. Non-island mode Objective function Control variables No. of integer variable No. of continous variable Power balance constraint some determined variables independent between each island part add ρw in each island part Semi-island mode independent between each island part add ρw and redundant switches 2M T 2M T (2M + 2X)T (M + N + 2)T (M + N + W + 2)T (M + N + W + 2)T same with P1 independent between each island part coupled between each island part Island mode same with P1 The OPMS problems for the three fault-modes are different with each other in objective function, control variables, and power balance constraints. The differences are summarized in Table II. X denotes the number of coupled redundant switches at PB. Obviously, the OPMS problem for the semi-island mode is the most complex one due to the added variables ρw (t), SP,x (t), and SS,y (t). Therefore, it is selected as the representative OPMSF problem for further analysis in the following subsection, which is formulated as: P2 : min uw (t) s.t. X X Cw (t) w∈W t∈T (1) − (4), (8), (12), (13), (20) − (24). B. Problem Transformation It is difficult to solve P2 in threefold: travel constrain (20) is non-convex; the feasibility is affected by faults; it is a MINLP long-time scheduling problem. Firstly, we relax the constraint (20) to obtain a convex problem. Secondly, consider that the relaxed problem is infeasible, a further relaxation of travel constraint is developed to guarantee the feasibility. We provide a sufficient condition that if P2 is feasible, the two-step relaxed problem has the same optimal solution; if not, the maximum allowed distance can be further obtained. 1) Convex Relaxation: The OPMSF problem is non-convex due to the constraint (20) with β = 3. Hence we relax it to inequality one: D− X (PP R (t)/α)1/β ∆t 6 0. (27) t∈T Then, P3 is defined as P2 with (27) instead of (20). Theorem 2. The relaxed problem P3 is exact, i.e., an optimal solution of P3 is also optimal for the problem P2, if every of its optimal solutions satisfies (20). Proof. Please see Appendix B. 7 2) Feasibility-guaranteed Relaxation: Considering that there may be no feasible solution of P3 caused by faults, a further relaxed problem P4 is formulated as: a) Subproblem: We define the subproblem as  2 X X  X  (k) (k) (t)∆t P5 : min Csub = ag,m Pg,m (k) uw,s (t) P4 : min uw (t),Dd s.t. X X Cw (t) + hDd t∈T w∈W (28a) + w∈W t∈T D− X (PP R (t)/α)1/β ∆t 6 Dd , (k) bg,m Pg,m (t)∆t (28b) + ξl t∈T (1) − (4), (8), (12), (13), (21) − (25), where Dd is the reduced travel distance that is a positive variable in P4, and h denotes the penalty parameter due to the reduced distance. To guarantee that Dd > 0 only if P3 is infeasible, we derive a sufficient condition as below. Theorem 3. If P3 has feasible solutions, the optimal solution of P4 is also the optimal solution of P3 when the penalty h satisfies: + ξe X (k) CE (Pe,n (t)) n∈N w  (k) (k) CL (ρw (t)) + hDd X w∈W s.t. m∈Mw  (k−1) δg,m (t) = δg,m (t) : λδ,m (t), SP,x (t) = SS,y (t) = (k−1) SP,x (t) (k−1) SS,y (t) (30a) : λP,x (t), (30b) : λS,y (t), (30c) (1), (2), (8), (21) − (25), (28b), (29). (k) The control vector of the subproblem uw,s (t) in each part at time t can be represented by (k) △ h> βα1/β ξl 1/β−1 (PPmax R ) . (29) (k) (k) (k) (k) u(k) w,s (t) =(Pg,m (t), Ppr,r (t), Pe,n (t), ρw (t), Dd ), m ∈ Mw , n ∈ Nw , r ∈ Rw , ∀w, ∀t. (k−1) (k−1) Additionally, if P3 has no feasible solution, D − Dd∗ is the maximum travel distance that can be achieved in time T . Dd∗ is optimal reduced distance that is obtained from P4 with (29). Proof. Please see Appendix C. Remark 1. If there is not any port for repair and maintenance in the range of D − D∗ , the information D − D∗ can be sent to the nearest port for rescue in advance. IV. B ENDERS D ECOMPOSITION D ESIGN BASED A LGORITHM (k−1) The variables δg,m (t), SP,x (t), SS,y (t), and (k−1) Pg,m (t) are fixed as the input data to the subproblem which is computed in the master problem. δg,m (t) controls the constrain (1) and (3). SP,x (t) and SS,y (t) affect the constraint (12), (13), and (22). λδ,m (t), λP,x (t), λS,y (t), and λg,m (t) are defined as θ(t), which is a set of dual variables of uw,m (t). The dual variables provide sensitivties to be used in constructing Benders’ cut µ(k) for the master problem. In each iteration, the master problem is improved by the Benders’ cut µ(k) . The upper bound for the optimal objective value of P4 at iteration k is calculated by    X X  (k) (k−1) (k−1) (t) + cg,m δg,m (t) C = Ctr yg,m t∈T m∈M To solve P4, we design an optimal algorithm based on BD [24]–[26] to optimize the objective over the entire time domain T . P4 is decomposed into a nonlinear programming (NLP) problem (subproblem) with fixed integer variables, and an integer linear programming (ILP) problem (master problem). The subproblem deals with the continuous variables and generates a set of dual variables to add Benders cuts in the master problem. After solving the master problem with Benders cuts, the optimal integer solution in this iteration is passed to subproblem. Hence, the subproblem and master problem are calculated iteratively to obtain the final optimal solution. Then, due to the slow convergence caused by the time-couping and the tailing-off effect [25], we propose an LNBD that decomposes the time-coupled constraints in the subproblem and adds the accelerating constraints in the master problem. + (32) (k) Csub . b) Master problem: The master problem includes the minimization of the start-up/shut-down cost of the generation units and the third term of the fuel consumption cost of generators. Hence, the master problem can be described as: P6 : min C (k) = (k) uw,m (t) X X t∈T w∈W m∈Mw  s.t. X  (k) cg,m δg,m (t) + µ(k) + µ(k) + Ctr   X X (k) (v) > λδ,m (t) δg,m (t) − δg,m (t) m∈M t∈T + X X   (k) (v) λP,x (t) SP,x (t) − SP,x (t) + X X   (k) (v) λS,y (t) SS,y (t) − SS,y (t) y∈Ωsb,y t∈T Based on the predicted data, the optimal algorithm solves P4 over the entire time domain T . The subproblem and the master problem decomposed by BD are described as  (k) yg,m (t) x∈Ωpb,x t∈T A. Optimal Algorithm (31) (v) + Csub ; v ∈ [1, · · · , k − 1], (3), (4), (12), (13). (33a) 8 The control vector of the master problem uw,m (t) in each island part at time t can be represented as (k) △ (k) (k) (k) u(k) w,m (t) =(δg,m (t), yg,m (t), SP,x (t), SS,y (t), (k) ys,x (t)), m ∈ Mw , x ∈ Ωpb,w , y ∈ Ωsb,w . (34) (9). It has to satisfy that ϕ(T ) = 1 to complete the voyage. Thus, the subproblem of P4 is redefined as  2 X  X  (k) (k) (t)∆t P7 : min Csub = ag,m Pg,m (k) uw,s (t) w∈W  X (k) (k) + bg,m Pg,m (t)∆t + ξe CE (Pe,n (t)) The constraints of Benders’ cut µ(k) in P6 are generated in each iteration. C (k) is the lower bound for the objective value of P4. The optimal algorithm is summarized in Algorithm 1. n∈Nw  (k) (k) + ξl CL (ρw (t)) + hDd (0) (1), (2), (8), (21) − (24), (30a) − (30c), (35), (36). s.t. Algorithm 1 Optimal Algorithm of OPMSF problem (0) Input: Initial variables uw,m(t), C = −∞, and C (0) = +∞. Output: Optimal solution uw,s (t) and uw,m (t). 1: Set k ← 1; 2: repeat (k−1) 3: Solve the subproblem P5 based on uw,m (t) 4: if Has feasible solution then (k) 5: Obtain an optimal primal solution uw,s (t) and optimal multipliers θ(k) ; (k) of P4 by (32); 6: Calculate the upper bound C (k) 7: Obtain the optimal solution uw,m (t) and lower bound C (k) by solving the master problem P6. 8: end if 9: Set k ← k + 1; (k) − C (k) < ǫ 10: until C m∈Mw b) Master problem: Two constraints are added to improve the convergence, ∀w ∈ W, ∀t ∈ T : (v) max max PG,w + PE,w > PP R,w (t) + PV S,w (t), (37) min PG,w (k) (38) µ + min PE,w 6 PV S,w (t) + PN O,w (t), > µ, (39) max the term in (37) is defined as PG,w = max δ (t)P and the term in (38) g,m m∈Mw P g,m min min PG,w = m∈Mw δg,m (t)Pg,m . Constraints (37) and (38) guarantee that the range of the generation power covers the power of load demand at each time t. Consequently, a part of invalid solutions can be eliminated. Constraint (39) gives a lower bound on µ(k) to avoid the search for the invalid solution below that bound. Thus, the master problem is redefined as:   X X  (k−1) (t) Ctr yg,m P8 : min C (k) (t) = where P uw,m (t) t∈T m∈M B. Low-complexity Near-optimal Algorithm + However, the optimal algorithm shows a slow convergence caused by the time-coupled constraints and the tailing-off effect. Thus, an LNBD is developed to deal with these problems. a) Subproblem: Here it is needed to decompose the ESM and travel constraints in (25) and (27). Thus, we allocate the power of ESMs by adjusting the upperPbound based on the estimated average load demand P̄L (t). If m∈Mw δg, m(t) > 0, eq. (25) can be replaced by D(t) + Dd − (PP R (t)/α)1/β ∆t 6 0, (36) where the travel distance at time t is calculated by D(t) = 1/β (P̄P R − (1 − ϕ(t))∆PL (t))/α ∆t. P̄P R denotes the average propulsion power to complete the remaining travel distance DR (t) which is updated by DR (t) = DR (t − 1) − D(t) − Dd . Besides, P̄P R (t) can be obtained by DR (t) and + µ(k) s.t. (3), (4), (12), (13), (33a), (37) − (39). The procedure of the LNBD is the same as Algorithm 1, which is omitted here because of space limitation. The structure of two algorithms is shown in Fig. 5. Generation information ESM information Load forecast P6: Master Problem min PE,w (t) 6 min{ϕ(t)∆PL (t), Ew (t) − Ew }, if ∆P > 0; max PE,w (t) 6 max{ϕ(t)∆PL (t), Ew (t) − Ew }, if ∆P < 0, (35) otherwise, there is no other additional constraint. ∆PL (t) = PL (t) − P̄L , and ϕ(t) ∈ [0, 1] denotes the parameter for adjusting the power of ESMs. Besides, based on the P̄L (t), the travel constraint (27) can be decomposed into  (k−1) cg,m δg,m (t) Startup/shutdown & Redundant switch decision ሺ݇ሻ ࢛‫ ݓ‬ǡ݉ ሺ–ሻ Voyage target P8: Master Problem Accelerating constraints Startup/shutdown & Redundant switch decision ሺ݇ሻ ࢛‫ ݓ‬ǡ݉ ሺ–ሻ ሺ݇ሻ ࣂሺ–ሻǡ ‫ ܾݑݏܥ‬ǡ ሺ݇ሻ ሺ݇ሻ ࣂሺ–ሻǡ ‫ܾݑݏܥ‬ Operation cost optimization problem Time-constraint decomposing ࡼܴܲǡ‫ ݓ‬ሺ–ሻ ࢀ operation cost optimization problems P5: Subproblem P7: Subproblem Optimal Algorithm Low complexity suboptimal Algorithm Supply side Generation schedule ESM dispatch Demand side Propulsion schedule Load Shedding Fig. 5: Algorithm structure. P7: Master Problem ሺ݇ሻ ࢛‫ ݓ‬ǡ݉ ሺ–ሻ ሺ݇ሻ ࣂሺ–ሻǡ ‫ ܾݑݏܥ‬ǡ V. S IMULATIONS In this section, an MVDC SPS and the simulation setup are described in detail. Then we test the proposed solution by ሺ–ሻǡ ࢛ ࡼ applying it to the MVDC SPS and discuss the results. ሺ݇ሻ ܴܲǡ‫ݓ‬ 9 A. Simulation Setup A MVDC SPS with Z = N = 6, T = 12 and M = 2 is shown in Fig. 6. There is one ESM in each zone. The propulsion module is located in zone 2. The detail parameters are shown in Table III. This system model is used for validation and analysis of our algorithm. The subproblems are solved using the SDPT3 from the CVX package [27], which operates on an Intel CORE i5 3.4 GHz machine with 8 GB RAM. The master problem is solved by branch and cut. 13 1 2 3 4 5 6 PB Sp, 1 Sp, 2 Sp, 3 Sp, 4 Sp, 5 Sp, 6 SS, 1 SS, 2 SS, 3 SS, 4 SS, 5 SS, 6 8 2 9 3 10 4 11 5 12 SB 6 14 Converter Converter MTG 7 Zone 1 ATG Fig. 6: MVDC SPS model and the fault scenario. TABLE III: Simulation parameters Normal power (MW) Technical maximum (p.u.) Technical minimum (p.u.) Ramp rate limit (p.u./∆t) Cost function parameters Speed & power parameter Speed (kn) MTG 8 1 0.15 ±90% ag,1 = 13.5 bg,1 = 10 cg,1 = 300 Css = 100 Propulsion α = 2.2e−3 V min = 0 ATG 4 1 0.1 ±90% ag,2 = 6 bg,2 = 30 cg,1 = 250 Css = 100 Module β=3 V max = 17 ESMs 0.5 1 0 ±100% alc = 1 aue = 100 clc = 0 ξe = 1 Others min Tm =2 ∆t = 1hour Fig. 8: Power schedule with two-side management. are less than 0.5MW which is the minimum operation bound of the ATG. So the ATG would be damaged if the ATG isn’t shut down during these times. Besides, the total operating cost is increased due to the high load of MTG. Therefore, we need to reorganize the power schedule to guarantee the physical system safety and optimize the total operating cost. First, the redundant switches in zone 4 and 5 need to be reconfigured. Second, the two-side power schedule has to be optimized to reduce the operating cost and guarantee the ATG safety. The schedule with two-side adjustment methods is shown in Fig. 8. It can be observed that the propulsion power is decreased and the ESM power is increased when the power of electrical loads is increased. The detail performance comparison with different adjustment methods is given in the next subsection. To verify the feasibility-guaranteed relaxation, we test our algorithm with different travel distance D. The results is shown in Table The total load-shedding amount is defined P IV. P as PLS = t∈T w∈W ρw (t)PN O,w (t). We can observe that load shedding and reconfiguration are always working. Then, the maximum travel distance 173.46nm can be obtained based on the results of last three rows. Thus, the feasibilityguaranteed relaxation and the two-side adjustment methods are essential for the OPMSF problem. TABLE IV: Two-side management with different distances Cost (103 m.u.) Load-shedding amount (MW) No. of reconfiguring switch Reduced distance (nm) 150 8.95 0.65 1 0 160 10.7 0.65 1 0 Distance 170 13.1 1.59 1 0 D (nm) 180 190 21.6 32.6 6.46 6.46 1 1 6.54 16.54 200 43.6 6.46 1 26.54 C. Performance Analysis of LNBD Fig.scenario 7: Poweris schedule withoutwith two-side management. The a 12-h voyage 150-nm total distance. The system work in an optimal configuration, in which all the loads are powered to their full capacities. Fig. 6 shows the initial switch configuration for normal mode. The forecast service load for the operation 12-h period is plotted in Figs. 7. The scale factors of three grade loads are set as 0.3, 0.5, 0.2. The ship operates in a regular cruise mode with a constant velocity. Thus the propulsion power is constant. To illustrate the performance of the LNBD, we conduct the proposed algorithms under the above scenario, different adjustment methods, and different parameter settings. 1) Performance under different ϕ(t) : Firstly, we test the optimality under different ϕ(t). The results are shown in table V. tc denotes the total computation time. It can be observed that they has a similar performance when ϕ(t) is at the range of 0.7 ∼ 0.9. To adopt ESMC and PPA together, ϕ(t) is set to 0.8. TABLE V: Performance comparison under different ϕ(t) B. Case Study For simplicity, a fault scenario that belongs to the semiisland mode occurs at the begin as shown in Fig. 6. If we don’t change the power schedule of SPS by two-side management, the power of the service loads at 7 ∼ 11 hours in island part 2 Cost 1 tc (102 s) 1 Optimal algorithm 8.95 9.48 Cost unit: 103 m.u. 0.2 9.89 0.64 0.3 9.68 0.65 LNBD with different ϕ(t) 0.5 0.6 0.7 0.8 9.49 9.34 9.20 9.10 0.63 0.67 0.64 0.65 0.9 9.25 0.64 10 Status 2) Optimality and complexity: Then, the verification of the optimality and complexity performance with D = 180nm is shown in Table VI. From the column of the number of variables, it can be observed that the OPMSF problem has more variables than the OPMS for the normal mode. Besides, the operating cost of OPMSF problem with twoside management has been reduced significantly than that of the OPMS problem. Thus, we can observe that two-side management including load shedding and reconfiguration is more suitable for the OPMSF problem. TABLE VI: Performance comparison between two algorithms Methods Normal Only GS Generation side mgmt. Two-side mgmt. Fault Only GS 1 Generation side mgmt. Two-side mgmt. Cost unit: 104 No. Var. (Continuous/Integer) 72 (24/48) 96 (48/48) 108 (60/48) 169 (49/120) 193 (73/120) 205 (85/120) LNBD Diff. (%) Optimal algorithm Diff. tc Cost1 (%) (s) /PLS Cost1 /PLS 1.85 0 12.2 1.85 0 24 1.29 -30.7 11.7 1.32 -30.7 26 1.28 -30.8 30.3 1.31 -30.8 28 10.1 442 254 10.1 442 45 6.60 1.83 /6.5 252 -1.32 910 6.53 1236 1.89 /6.5 252 -1.32 tc (s) 56 65 m.u. Additionally, the LNBD can obtain a near-optimal solution that has a similar operating cost. However, the complexity of LNBD can be reduced significantly. The computation time tc is reduced from 1236s and 65s. There also has a limitation of LNBD that RG has to be larger than the average power of service load and propulsion modules. If not, the subproblem is infeasible at the last time T . VI. C ONCLUSION In this paper, we formulated the OPMSF problem in a longtime scale. Two-side adjustment methods including reconfiguration and load shedding were adopted to guarantee the system safety, complete the voyage, and reduce the operating cost. Since the non-convex constraint and fault effects, we developed two-step relaxations to obtain a new problem by convex relaxation and feasibility guarantee. A sufficient condition was provided to guarantee that if the original problem is feasible, the new one has the same optimal solution; if not, the maximum allowed distance can be further obtained to assist rescue mission. To solve the new problem, we developed an algorithm based on BD to obtain the optimal solution. Considering timecoupled constraints and tailing-off effect, we also proposed an LNBD that decomposes the time-coupled constraints and adds the accelerating constraints. The results illustrated the feasibility and effectivity of the proposed algorithms. The future works include the design of more efficient and lowcomplexity algorithms for real-time management. A PPENDIX A P ROOF OF T HEOREM 1 To meet the load demand before load shedding, the cost of load shedding ∆Pno (t) has to be larger than the corresponding reduced cost of generation power: ξl ∆Pno (t) = ξl CL (ρ̂(t)) − ξl CL (ρ(t)) > CG (P̂g,m (t)) − CG (Pg,m (t)), ξl ∆Pno (t) > ξe (CE (P̂e,n (t)) − CE (Pe,n (t))). (40) (41) where P̂· (t) and P· (t) denote two different arbitrary output power at time t. The (40) and (41) can be simplified as: ξl > ag,m (P̂g,m (t) + Pg,m (t))∆Pno (t) + bg,m ∆Pno (t) ∆Pno (t) = ag,m (P̂g,m (t) + Pg,m (t)) + bg,m , ξl > ξe alc (42) (P̂e,n (t) + Pe,n (t))∆Pno (t) ∆Pno (t) = ξe alc (P̂e,n (t) + Pe,n (t)). (43) The right terms of (42) and (43) can be simplified as: ag,m (P̂g,m (t) + Pg,m (t)) + bg,m < 2ag Pgmax + bg , ξe alc (P̂e,n (t) + Pe,n (t)) < 2ξe alc Pemax , (44) (45)  max where Pgmax = max Pg,m , ag = max  (ag,m ) , bg = max ,n ∈ N. max (bg,m ) , m ∈ M, Pemax = max Pe,n Combining (42)-(45), we have that if ξl satisfies: ξl > 2ag Pgmax + bg , (46) ξl > 2ξe alc Pemax , (47) the Eqs. (40) and (41) can be hold. They can be simplified as: ξl > max{2ag Pgmax + bg , 2ξe alc Pemax }. (48) A PPENDIX B P ROOF OF T HEOREM 2 In order to prove that the relaxation is exact, it is necessary to show that any optimal solution of P3 has equality in (27). One optimal solution is denoted by u∗w (t) which is expressed as ∗ ∗ ∗ ∗ ∗ ∗ u∗w (t)= δg,m (t), yg,m (t), SP,x , SS,y , Pg,m (t), Pe,n (t),  ∗ ∗ Ppr,r (t), ρw (t) . For the sake of contradiction, we assume that u∗w (t) has strict inequality, i.e., X D− (PP∗ R,w (t)/α)1/β ∆t < 0. t∈T Then, we consider another solution ũw (t) which is defined by: ∗ ∗ ∗ δ̃g,m (t) = δg,m (t), ỹg,m (t) = yg,m (t), S̃P,x = SP,x , ∗ ∗ ∗ S̃S,y = SS,y , P̃g,m (t) = Pg,m (t) − ε, P̃e,n (t) = Pe,n (t), ∗ P̃pr,r (t) = Ppr,r (t) − ε, ρ̃w (t) = ρ∗w (t), ∗ where it satisfies that 0 < ε 6 Ppr,r (t)−α(D/T ∆t)1/β . It can be verified that ũw (t) satisfies all the constraints of P3, thus it is a feasible point. However, since P̃g,m (t) = Pg,m (t)∗ − ε, the objective value of ũw (t) is strictly smaller than of uw (t)∗ . This contradicts the assumption that uw (t)∗ is the optimal solution. 11 A PPENDIX C P ROOF OF T HEOREM 3 To guarantee that the optimal solution of P4 is also the optimal solution of P3 if P3 has feasible solutions, the increased cost hDd must be greater than the decreased cost ∆C(t) of generation power caused by the reduced distance, which can hDd > ∆C(t). (49) According to (20) and Theorem 2, the left term of (49) can be transformed into  β1 X X 1 hDd =h (PP R (t)/α) β ∆t, P̂P R (t)/α ∆t − h t∈T t∈T (50) where P̂P R (t) and PP R (t) are the original and reduced power of propulsion modules at time t, respectively. Then, based on Lagrange mean value theorem, we have X t∈T = 1 βα 1 β  β1 X 1 (PP R (t)/α) β ∆t P̂P R (t)/α ∆t −  t∈T  β1 −1 X   PP R (t) P̂P R (t) − PP R (t) ∆t, t∈T m∈M +2alc ξe XX Pemax ∆Pe,n (t)∆t +ξl XX ∆Pno (t)∆t. t∈T n∈N Considering that alc in life-cycle cost function is a small max constant, we have (2ag,m Pg,m +bg,m ) < (2ag Pgmax +bg ) < ξl max and ξl > 2ξe alc Pe . Hence, there holds X X ∆C(t) <(2ag Pgmax + bg ) ∆Pg,m (t)∆t t∈T m∈M +2ξe alc Pemax XX +ξl ∆Pno (t)∆t X (∆PG (t) + ∆PE (t) + ∆Pno (t)) ∆t. t∈T t∈T (51) Thus, combing (53) and (56), we have that 1 h> ′ 1 1 (52) Combing (51) and (52), (50) can be transformed into X 1 h β −1 (PPmax (P̂P R (t) − PP R (t))∆t R ) 1/β βα t∈T X 1 h β −1 P̂G (t) + P̂E (t) + ρ̂(t)Pno (t) = 1/β (PPmax R ) βα t∈T =D − X 1 h β −1 (PPmax (∆PG (t) + ∆PE (t) + ∆Pno (t))∆t, R ) 1/β βα t∈T (53) where P̂P R (t) and PP R (t) are the reduced power of generators and ESMs, respectively. At a deviation ∆PG (t), ∆PE (t), and ∆Pno (t), the change of δg,m (t) gives a additional chance to reduce the operating cost. Hence, the best solution uw (t) with a changed δg,m (t) has a lower operating cost than the one with same δg,m (t). Based on this, we can obtain that  X X X ∆C(t) 6 CG (P̂g,m (t)) − CG (Pg,m (t)) ∆t m∈M CE (P̂e,n (t)) − X  CE (Pe,n (ρt)) ∆t t∈T n∈N n∈N  X + ξl CL (ρ̂(t)) − CL (ρ(t)) ∆t. t∈T . (57) X (PP R,w (t)/α)1/β ∆t 6 0. (58b) t∈T = m∈M 1 β −1 (PPmax R ) Therefore, if h satisfies (57), there hold (49). Consequently, the optimal solution of P4 is also the optimal solution of P3 if P3 has feasible solutions and h satisfies (57). If P3 has no feasible solution, Dd in any feasible solution must be greater than zero. (28b) can rewritten as X D − Dd − (PP R,w (t)/α)1/β ∆t (58a) −  − PG (t) − PE (t) − ρ(t)Pno (t) ∆t X X βα β ξl t∈T hDd > t∈T (56) X t∈T ′ ∆Pe,n (t)∆t t∈T n∈N ′ β −1 . (PP R (t)) β −1 > (PPmax R ) (55) t∈T n∈N <ξl where PP R (t) ∈ (PP R (t), P̂P R (t)). Consider that β > 1, there hold + ξe For simplicity, eq. (54) can be transformed into X X max ∆C(t) < (2ag,m Pg,m + bg,m )∆Pg,m (t)∆t (54) Since there is no Dd in P4 that replaced (28b) with (58b), hDd in the objective (28a) can be removed. Hence, this reformulated problem is similar with P3. The optimal solution u(t)∗ of P4 is also the optimal solution of P3 that replaced (28b) with (58b). Based on the Theorem 2, it can be known that the maximum travel distance that can be achieved in time T is D− = D − Dd∗ . R EFERENCES [1] R. E. Hebner, F. M. Uriarte, A. Kwasinski, A. L. Gattozzi, H. B. Estes, A. Anwar, P. Cairoli, R. A. Dougal, X. Feng, H.-M. Chou, L. J. Thomas, M. Pipattanasomporn, S. Rahman, F. Katiraei, M. Steurer, M. O. Faruque, M. A. Rios, G. A. Ramos, M. J. Mousavi, and T. J. Mccoy, “Technical cross-fertilization between terrestrial microgrids and ship power systems,” J. Modern Power Syst. Clean Energy, pp. 1–19, 2015. [2] S. Das, S. Bose, S. Pal, N. N. Schulz, C. M. Scoglio, and B. Natarajan, “Dynamic reconfiguration of shipboard power systems using reinforcement learning,” IEEE Trans. Power Syst., vol. 28, no. 2, pp. 669–676, 2013. [3] S. K. Srivastava and K. l. Butler-Purry, “Probability-based predictive self-healing reconfiguration for shipboard power systems,” IET Gener., Transm. Distrib., vol. 1, pp. 405–413, 2007. [4] S. Bose, S. Pal, B. Natarajan, C. M. Scoglio, S. Das, and N. N. Schulz, “Analysis of optimal reconfiguration of shipboard power systems,” IEEE Trans. Power Syst., vol. 27, no. 1, pp. 189–197, 2012. 12 [5] Y. Jiang, J. Jiang, and Y. Zhang, “A novel fuzzy multiobjective model using adaptive genetic algorithm based on cloud theory for service restoration of shipboard power systems,” IEEE Trans. Power Syst., vol. 27, no. 2, pp. 612–620, 2012. [6] G. Seenumani, J. Sun, and H. Peng, “Real-time power management of integrated power systems in all electric ships leveraging multi time scale property,” IEEE Trans. Control Syst. Technol., vol. 20, pp. 232–240, 2012. [7] X. Feng, K. L. Butler-Purry, and T. Zourntos, “A multi-agent system framework for real-time electric load management in MVAC all-electric ship power systems,” IEEE Trans. Power Syst., vol. 30, no. 3, pp. 1327– 1336, 2015. [8] G. Seenumani, H. Peng, and J. Sun, “A reference governor-based hierarchical control for failure mode power management of hybrid power systems for all-electric ships,” J. Power Sources, vol. 196, no. 3, pp. 1599–1607, 2011. [9] V. Shagar, S. G. Jayasinghe, and H. Enshaei, “Effect of load changes on hybrid shipboard power systems and energy storage as a potential solution: A review,” Inventions, vol. 2, no. 3, 2017. [10] F. Kanellos, “Optimal power management with GHG emissions limitation in all-electric ship power systems comprising energy storage systems,” IEEE Trans. Power Syst., vol. 29, no. 1, pp. 330–339, 2014. [11] T. Amba, K. L. Butler-Purry, and M. Falahi, “Genetic algorithm based damage control for shipboard power systems,” in Proc. ESTS, Baltimore, MD, USA, Apr. 20-22, 2009, pp. 242–252. [12] M. Nelson and P. E. Jordan, “Automatic reconfiguration of a ship’s power system using graph theory principles,” IEEE Trans. Control Syst. Technol., vol. 51, pp. 2651–2656, 2015. [13] P. Mitra and G. K. Venayagamoorthy, “Implementation of an intelligent reconfiguration algorithm for an electric ship’s power system,” IEEE Trans. Control Syst. Technol., vol. 47, pp. 2292–2300, 2011. [14] S. Mashayekh and K. L. Butler-Purry, “An integrated securityconstrained model-based dynamic power management approach for isolated microgrids in all-electric ships,” IEEE Trans. Power Syst., vol. 30, no. 99, pp. 1–12, 2015. [15] F. Kanellos, A. Anvari-Moghaddam, and J. Guerrero, “Smart shipboard power system operation and management,” Inventions, vol. 1, no. 4, 2016. [16] F. Kanellos, A. Anvari-Moghaddam, and J. Guerrero, “A cost-effective and emission-aware power management system for ships with integrated full electric propulsion,” Electr. Power Syst. Res., vol. 150, pp. 63–75, 2017. [17] F. Kanellos, G. Tsekouras, and N. Hatziargyriou, “Optimal demand-side management and power generation scheduling in an all-electric ship,” IEEE Trans. Sustainable Energy, vol. 5, no. 4, pp. 1166–1175, 2014. [18] C. Shang, D. Srinivasan, and T. Reindl, “Economic and environmental generation and voyage scheduling of all-electric ships,” IEEE Trans. Power Syst., vol. 31, no. 5, pp. 4087–4096, 2016. [19] C. Yan, G. K. Venayagamoorthy, and K. A. Corzine, “Optimal location and sizing of energy storage modules for a smart electric ship power system,” in Proc. IEEE CIASG, Paris, FR, Apr. 11-15, 2011, pp. 1–8. [20] W. Shi, N. Li, C. C. Chu, and R. Gadh, “Real-time energy management in microgrids,” IEEE Trans. Smart Grid, vol. 8, pp. 228–238, Jan 2017. [21] S. Schoenung, “Energy storage systems cost update, a study for the DOE energy storage systems program,” Sandia National Laboratories, no. SAND2011-2730, 2011. [22] H. Khani and M. R. D. Zadeh, “Real-time optimal dispatch and economic viability of cryogenic energy storage exploiting arbitrage opportunities in an electricity market,” IEEE Trans. Smart Grid, vol. 6, pp. 391–401, Jan 2015. [23] Q. Xu, B. Yang, Q. Han, C. Chen, and X. Guan, “Optimal Power Management for Failure Mode of AC/DC Microgrids in All-Electric Ships,” ArXiv e-prints http://adsabs.harvard.edu/abs/2017arXiv171202552X, 2017. [24] C. A. Floudas, “Nonlinear and mixed-integer optimization: fundamentals and applications,” Oxford University Press, 1995. [25] W. S. Sifuentes and A. Vargas, “Hydrothermal scheduling using benders decomposition: Accelerating techniques,” IEEE Trans. Power Syst., vol. 22, pp. 1351–1359, Aug 2007. [26] A. Nasri, S. J. Kazempour, A. J. Conejo, and M. Ghandhari, “Networkconstrained ac unit commitment under uncertainty: A benders’ decomposition approach,” IEEE Trans. Power Syst., vol. 31, pp. 412–422, Jan 2016. [27] M. Grant, S. Boyd, and Y. Ye, “CVX: Matlab software for disciplined convex programming,” 2008.
3cs.SY
arXiv:1803.07369v1 [cs.SY] 20 Mar 2018 Optimal Symbolic Controllers Determinization for BDD storage. Ivan S. Zapreev, Cees Verdier, Manuel Mazo Jr. Center for Systems and Control, Technical University of Delft, The Netherlands (e-mails: [email protected], [email protected], [email protected]) March 21, 2018 Supported by STW-EW as a part of the CADUSY project #13852. The short version of this article has been accepted to ADHS’2018. Abstract Controller synthesis techniques based on symbolic abstractions appeal by producing correct-by-design controllers, under intricate behavioural constraints. Yet, being relations between abstract states and inputs, such controllers are immense in size, which makes them futile for embedded platforms. Control-synthesis tools such as PESSOA, SCOTS, and CoSyMA tackle the problem by storing controllers as binary decision diagrams (BDDs). However, due to redundantly keeping multiple inputs per-state, the resulting controllers are still too large. In this work, we first show that choosing an optimal controller determinization is an NPcomplete problem. Further, we consider the previously known controller determinization technique and discuss its weaknesses. We suggest several new approaches to the problem, based on greedy algorithms, symbolic regression, and (muli-terminal) BDDs. Finally, we empirically compare the techniques and show that some of the new algorithms can produce up to ≈ 85% smaller controllers than those obtained with the previous technique. 1 Introduction Controller synthesis techniques based on symbolic models, such as e.g. [28, 23, 17], are becoming increasingly popular. One of the key advantages of these techniques is that they allow for synthesising correct-by-construction controllers of general nonlinear systems under intricate behavioural requirements. However, the downside of the synthesised controllers is their size as, in essence, they 1 are huge tables mapping abstract state-space elements into input-signal values. Even for toy examples, the produced controllers can reach a size of several megabytes. In real-life applications however, they can be several orders of magnitude larger. The latter prohibits them from being used on embedded microcontrollers which typically have very limited memory resources. In general, this state-space explosion is the consequence of: (1) the number of abstract system states and inputs which are exponential in the number of dimensions and inverse-polynomial in the discretisation values; and (2) storing multiple valid input signals per abstract state. There are numerous tools, implementing or incorporating control synthesis, such as PESSOA, SCOTS, CoSyMA, LTLMoP, TuLiP, see [18], [24], [19], [7], and [32] correspondingly. Internally, they either use an explicit control law representation in a table form or employ Reduced Ordered Binary Decision Diagrams, introduced by [4] and called RO-BDDs or simply BDDs, in an attempt to optimise the memory needed to store the synthesised control law. RO-BDDs are canonical, efficiently manipulable, and in many cases allow for compact data representation. However, their size is strongly dependent on the variables’ ordering and the problem of finding an optimal one is known to be NP-complete, as shown by [3]. To fight that issue, tools such as SCOTS and Pessoa use the state of the art RO-BDD library CUDD, see [26], which implements numerous efficient variable ordering optimisation heuristics. Yet, even when using BDDs, controllers synthesised for practical applications can easily reach hundreds of megabytes. To our knowledge, there have been just a few attempts made to find compact but practical representations of (symbolically produced) control laws. Except for using BDDs, we are only aware of another two approaches. The first one, suggested by [27], uses piece-wise linear functions, also known as linear in segments (LIS) functions, to approximate control functions of the form g : R → R. The approximation is considered for scalar control functions of one argument only. The main motivation for LIS is to reduce the memory footprint of implementing controllers at the cost of some on-line computations, which nonetheless are fast to perform. However, this approach does not directly scale to multiple dimensions or allows to resolve multiple-input’s non-determinism. Another technique to reduce the control-law size, we shall refer to as LA (Local Algorithm), was proposed by [9]. It borrows ideas from algebraic decision diagrams (ADDs), see [1], for compact function representation and exploits the non-determinism inherent to safety controllers. The considered controllers are multi-valued maps g : Rn ⇒ N. The suggested approach attempts to optimise the controller size determinizing the control law by choosing one of the possible control signals for each of the state-space points. In the selection of such unique inputs, LA maximizes the size of state-space neighbourhoods employing the same input with the expected outcome of minimizing an ADD representation of the resulting control function. However, the minimality of the ADD representation cannot be guaranteed in general by this approach, which leads us to investigate if better compression approaches may be viable. In this paper, we first prove that the problem of choosing a size-optimal 2 controller determinization is NP-complete. We do that assuming the BDD controller representation, but the result can be easily generalised. Next, we suggest two new determinization approaches : GA (Global Algorithm) - based on a greedy algorithm for the minimum set-cover selection problem, see [12, 5]; SR - a hybrid of ADD-based and symbolic regression techniques, powered by genetic programming, see [14, 31]. GA attempts to minimise the BDD size by maximising the number of controller states having the same input signal. It differs from LA in that, when choosing a common input for a set of states, it looks at the state-space globally, without considering the actual state positions. SR (Symbolic Regression) aims at bridging the intrinsic limitations of LA and GA by using “arbitrary” (polynomial and sigmoid in our case) functions as controller representations. This way we realise the Kolmogorov’s [16] view on data compression1 . Further, we combine LA and GA into a hybrid approach called LGA (Local-Global Algorithm). The idea here is that the determinization is done as in LA but, if multiple common inputs are possible, the preference is given to the one suggested by GA. In addition, we consider B-prefixed version of LGA (BLGA) which attempts for a better compression by using BDD variable reordering to produce abstract state indexes. We perform an empirical evaluation on a number of examples from the literature. Our results show that compression-wise2 there is no absolute best approach. However, LGA seems, on most cases, to be providing the best compression. The SR approach, while only providing better compressions in few examples, may be most promising when looking at actual embedded deployments, if it could be pushed to remove any use of BDDs, and their overhead on actual implementations. 2 2.1 Preliminaries Minimum set cover The minimum set cover problem (MSC) is formulated as: Problem 2.1 (MSC). Given a set X and a cover {Sj }j∈I , i.e. X ⊆ S where |X|, |I| < ∞, find the smallest subcover I ∗ ⊆ I : X ⊆ j∈I ∗ Sj . S j∈I Sj , Both, the decision and selection versions of (MSC, are known to be NPcomplete. The first approximate poly-nomial-time solution for MSC was given by [12]. Later, [5] suggested an approximate poly-nomial-time solution for the generalized “minimum set weight cover problem” (MWSC); which extends MSC by that each set Sk is assigned a weight sk ≥ 0 and the question is to find the smallest sub-cover with the minimum total weight. According to [6], the Chvátal’s algorithm time complexity is: O (|I| · |X| · min (|I|, |X|)). 1 Instead of storing the control law as an explicit map, we search for a symbolic function that for a given state computes the input value. 2 Up to the found optimal BDD variable reordering. 3 2.2 Symbolic regression Symbolic regression is a type of regression analysis that searches for analytical expressions best fitting a given dataset of numerical data, both in terms of accuracy and simplicity. We apply this technique in order to find the smallest analytical expressions best fitting symbolic-model-based control-law functions, ensuring for the smallest control law representation. One of the most popular means for symbolic regression is genetic programming, see [13] (GP). In this work, similar to [30], we employ grammar guided genetic programming algorithms (GGGP) to find multi-dimensional analytical expressions fitting the controller’s data. In fact, the genetic process follows [29] except for that the realvalue parameter tuning is done with CMA-ES [10]. To speed up the CMA-ES procedure, we use sep-CMA-ES which has a linear time and space complexity [21]. 2.3 Binary Decision Diagrams Binary Decision Diagrams (BDDs), represented with rooted directed acyclic graphs were introduced by [4], as a compact representation for boolean funcn n tions F : {0, 1} → {0, 1}. Given F with a list of arguments {vi }i=0 , also called BDD variables or just variables, the BDD of F results from the Shannon expansion thereof. The order of arguments in the signature of F has clearly no impact on F itself, but it has a drastic impact on the size of the resulting BDD. Finding a size-optimal BDD variable ordering was shown, in [3], to be NP-complete. Yet, there are multiple polynomial heuristics, [25], that can find a semi-optimal variable ordering. One of the most popular thereof is sifting, [22], and its variants. Given a fixed variable order, each BDD has a canonical minimum-size representation, called Reduced Ordered BDD (RO-BDD). Assuming the bottom-up BDD traversal, an RO-BDD can be obtained by the following poynomial-time algorithm, for more details see Section 4.2 of [4]: 1. Combine terminal nodes with equal values 2. Eliminate nodes with equivalent3 children 3. Combine nodes with pairwise equivalent children Multi Terminal BDDs (MTBDDs) extend BDDs in that tree’s terminal nodes allow for arbitrary labels, thus useful to encode functions of the form n F : {0, 1} → U , with |U | < ∞. The BDD reduction algorithm is naturally extendable towards MTBDD which thus have the canonical RO-MTBDD form. For an (MT)BDD M , we define R (.) as a reduction function producing the RO-(MT)BDD R (M ). Algebraic Decision Diagrams (ADDs), introduced by [1], are a synonym of MTBDDs. The current state of the art implementation for RO-(MT)BDDs is provided by the CUDD package [26]. 3 “Equivalent” means: Representing the same binary function. 4 2.4 SCOTS v2.0 SCOTS is an open source software that implements construction of symbolic models, also known as discrete abstractions, of possibly perturbed, nonlinear control systems. The tool natively supports invariance and reachability specifications as well as several control synthesis algorithms. The control laws can be stored in BDD. SCOTS comes in a form of a header-only C++ library that can be easily included in any C/C++ code but also has a MATLAB interface. We base our algorithms on the interfaces provided by the UniformGrid and SymbolicSet classes of the tool. 3 Problem statement Consider a (possibly non-linear) discrete time control system of the form: x(k + 1) = f (x(k), u(k)), x(k) ∈ X ⊆ Rn , u(k) ∈ U ⊆ Rm . Symbolic approaches, see e.g. [28], automatically synthesize controllers in the form of discrete state transition systems. Furthermore, the resulting controllers can often be reduced to a look-up table, see [20], prescribing for each point of the state-space a set of applicable inputs guaranteeing that the control specification is satisfied. Such synthesized controllers usually take the form of the combination of a (finite) set-valued map g : S ⇒ V, and quantization maps qx : X → S, qu : U → V reducing the originally infinite state and input sets to finite sets (usually defining a grid), i.e. S ⊂ X , S ⊂ X , |S| < ∞, |V| < ∞. Moreover, the usual approach is to quantize each dimension of X and U independently, i.e. qx (x) = (q1x (x1 ), . . . , qnx (xn )), qu (u) = (q1u (u1 ), . . . , qnu (un )), where each of the qix : Xi ⊂ R → Si , such that S = S1 × . . . × Sn , and similarly for the input quantizer. This results in controller implementations selecting at each time step u(k) ∈ g (qx (x(k))), see for details of such controllers [20]. Most often, the controllers synthesized do not provide a valid input for some subset S∅ ⊂ S. We define the set Sc := S \ S∅ . We may assume that there is some element nc ∈ V denoting a “no-input”, and thus we can define S∅ := g −1 (nc). A symbolic controller g ⊆ S×V, by indexing the countable sets Si and Vi , can alternatively be interpreted as a relation g ⊂ Z≥0 × Z≥0 . Consider B := {0, 1}, and let us define a fixed-length base-2 bit encoding for non-negative integers bits : K → B b for some K ⊂ Z≥0 , |K| < ∞, and b := dlog2 (max (K))e. For k = (k1 , k2 ) ∈ g ⊂ Z≥0 × Z≥0 , mapping the bit vector (bits (k1 ) , bits (k2 )) to a boolean 1 defines a BDD encoding of g. Similarly, one can construct an MTBDD encoding of g by mapping bits (k1 ) to k2 . Relating elements of S or V with Z≥0 can be done with an indexing function, 5 typically defined as: fb (ka , . . . , kb ) := b X  ki ·  i=a i−1 Y  2|bits(Nj )|  , or (1) j=a fs (ka , . . . , kb ) := b X i=a  ki ·  i−1 Y  Nj  (2) j=a Here, Nj :=|Sj | for j∈1, n, and Nj :=|Vj | for j∈n+1, n+m; |bits (Nj ) | is the data-type size needed to enumerate intervals in j. Equations 2 and 1 are both used in SCOTSv2.0. The former is employed in its interface classes (UniformGrid and SymbolicSet), as it delivers smaller indexes. The latter is used for BDD encoding as it avoids bit sharing between distinct dimension interval indices. In the present we consider the following minimisation problem aimed at finding the smallest controller determinization of a given controller g: Problem 3.1 (OD). Find the best determinization g ∗ of a controller g optimizing: g ∗ = argming̃∈F |enc (g̃)|, where F: = {g̃ : Z≥0 → Z≥0 | ∀s ∈ Dom (g) : ((g̃ (s) ∈ g (s)) ∧ (|g̃ (s) | = 1))} , enc (.) encodes controllers into RO-(MT)BDDs, and |.| provides the (MT)BDD size. In theoretical derivations, as in [15], we define |.| to be the number of (MT)BDD nodes. In practice, |.| is the number of bits used to store the (MT)BDD by the CUDD package in the best-found, variable reordering. 4 LA on MTBDDs [9] suggests a controller-size minimisation technique, which we call LA, that uses ideas from MTBDDs to represent the controller function in the form of a binary tree. The approach does dimension-wise binary splitting of the controller’s state-space bounding box. The areas with no-inputs are considered to allow for any input. For the areas with common inputs possible a single input is selected non-deterministically. A branch in the tree represents a state-space area with all states having common inputs (stored in terminal nodes). The determinization aims at choosing single inputs in a way minimising the depth of the tree branches. The latter is equivalent to reductions as in steps (1) and (2) of the RO-BDD construction (c.f. Section 2.3), but not (3). [9] showed that LA can lead to drastic size reductions, e.g., for “the simple thermal model of a two-room building” example the original controller required 1.000.000 data units, whereas in the tree format it went down to 27. Yet, in its original form this approach: (i) does not preserve the controller’s domain – neglecting basic 6 x1 x2 {1, 5} x2 {4, 3} {1, 2} {0, 3} Figure 1: An example MTBDD data of safe initial states; (ii) employs a fixed state-space splitting algorithm – not using controller’s structural features; (iii) uses simple binary trees which are less efficient than MTBDDs, due to the latter compression abilities by variable reordering and their canonical reduced form. This motivates extending the approach towards MTBDDs. LA can be adapted to quantised state-spaces, since: (i) For dimension i∈1, n and si ∈Si , the bit sequence bits (si ), defines a binarytree path to si in Si . (ii) For s∈S, the alternating bit sequence obtained from bits (s1 ) , . . . , bits (sn ) defines a binary-tree path to s in S. The latter, using bounded-length bit sequences as in Section 3, allows to encode the LA’s binary tree as an MTBDD. The size reductions obtained for the original LA are then a subset of those we get using MTBDDs4 , as we can: (i) obtain RO-MTBDDs, utilising all the reduction steps (ii) find a more efficient variable ordering. Let us now show that, however good, LA does not allow to utilise the full power of the MTBDD reductions due to its pure spacial orientation. Consider an MTBDD encoding of some LA’s binary tree, in its original variable ordering, see Figure 1. LA traverses an MTBDD trying to find common inputs, stored in terminal nodes, for all of its sub-trees. A sub-tree with a common input can then be trivially reduced to a single terminal node. In this case however, there are no non-trivial sub-trees with common inputs, so LA has to non-deterministically choose one (arbitrary) input value per terminal node. This results in 16 possible determinization variants, most of which would not be reducible, see e.g. Figure 2, but a few would allow for reductions; the best one is in Figure 3. In this paper, we suggest alternatives and hybrid approaches to overcome this potential shortcoming of LA, see Section 6. Furthermore, to preserve information on safe initial states, we shall consider a modification of LA which forbids assignment of “any input” to “no-input” grid cells. 5 NP-completeness of determinization Theorem 5.1. The OD problem is NP-complete (NP-C). 4 Even with the original variable ordering. 7 x1 x2 {5} x2 {4} {1} {3} Figure 2: A non-reducible determinization x1 x2 {1} x2 x2 {3} {1} {1} {3} {3} (b) After reduction (a) After determinization Figure 3: A reducible determinization Proof. To show that OD is NP-complete we prove that: (i) OD is NP: Consider a non-deterministic algorithm5 , Algorithm 1, solving the selection OD. To prove that OD is NP, one must show that Algorithm 1 has polynomial time complexity and contains a polynomial number of random guesses, each independent on the problem size. Clearly, all of the Algorithm 1 steps have polynomial time complexity. First of all, iterating over Q ∈ 0, . . . , |M |, checking for |M 00 | == Q, and reducing R (M 0 ), see Section 2.3, are polynomial time. Further, let us show that “guessing M 0 from M ” can also be done in polynomial time with a polynomial number of Bernoulli trials. First, to visit M ’s terminal nodes requires O (|M |) steps. Second, for a node, having at most |U| inputs, to randomly choose one input requires O (dlog2 (|U|)e) Bernoulli trials. So we conclude that6 OD is NP. (ii) MSC is polynomial-time/space convertible to OD: For an MSC with X := N K {xi }i=1 , S := {Sj }j=1 , ∀j ∈ 1, K : Sj ⊆ X, and N, K < ∞, consider the next three proving steps: a) Encode MSC as an MTBDD M : Take a binary tree with N terminal nodes, l indexed by i ∈ 1, N . For each terminal  node  i add a low (left) ti and a hhight  h l (right) ti children, such that val ti := j ∈ 1, K|xi ∈ Sj and val ti := {K + i}. Here, val (.) is terminals’ labelling function; the low terminals encode the MSC sets; and the high terminals prevent all but low-terminals’ reductions. The resulting binary tree T is a polynomial-space encoding of MSC as7 : |T | = 4× 5 I.e. it has a non-deterministic step which always makes a “proper” (relative to the algorithm’s goal) guess, see e.g. [2]. 6 All the missed auxiliary operations, e.g.: counting node inputs, removing the non-chosen inputs, and etc. are also polynomial time. 7 Remember that we have 2 × N terminal nodes. 8 Input: M - Controller’s MTBDD Result: Size-optimal determinization of M for Q ∈ 0, . . . , |M | do Guess M 0 - a determinization of M M 00 ← R (M 0 ); if |M 00 | == Q then return M 00 end end Algorithm 1: NP algorithm for selection OD N − 1. Also, this is a polynomial-time encoding, as is realisable by Algorithm 2, of time complexity O (N ). To convert this binary tree into an MTBDD M , we shall interpret its non-terminal nodes as decision nodes, and its terminal nodes t as value nodes, labeled with val (t). This trivial conversion can also be done in polynomial time and space. b) Solving OD for M solves MSC : For the given M encoding of MSC, R (M 0 ), in Algorithm 1, can only re-combine low terminals of M 0 as high-terminal and thus non-terminal node reductions are prevented by the distinct high terminal node idexes. The high and non-terminals will stay intact and Algorithm 1 will effectively minimise the number of low terminals. The set I of low-terminal labels of M 00 then yields the solution for MSC as: (a) I defines a sub-cover of S; (b) |I| is minimal. The former is clear as each xi of X is related to a low-terminal. The latter can be proved by contradiction. First, fix low-terminal node values of M to those of I to get an MTBDD MI for which |R (MI ) | = 3 × N − 1 + |I|. Let us assume that I is not a solution of MSC then there exists a sub-cover I 0 , such that |I 0 | < |I|. Similarly, for MI 0 we have |R (MI 0 ) | = 3 × N − 1 + |I 0 |, and thus R (MI 0 ) < R (MI ). The latter contradicts the fact that Algorithm 1 solves OD. c) Decoding MSC solution from OD solution: Decoding of the MSC solution from M 00 is straightforward: one needs to go through all of the low-terminal nodes and collect their labels. This requires linear time and space algorithm. Finally, since MSC is NP-C, (i)&(ii), imply that OD is NP-C. 6 Determinization algorithms The newly suggested determinization algorithms have various underlying ideas: GA tries to maximise the number of states with the same input, and minimise the number of different inputs as a whole, both in an attempt to maximise the chances for (MT)BDD reductions; LGA combines complementary ideas of LA and GA to reduce the number of non-deterministic choices to be taken in the former one; SR attempts to find an analytical expression fitting the controller points on the largest part of its domain to reduce the number of distinct control mode 9 N Input: X = {xi } - Set elements K Input: S = {Sj }j=1 - Set cover Result: The MTBDD encoding for MSC Node root ← null if N > 0 then QueuehNodei terms (N ) ← empty uint cnt ← 1 root ← new Node () terms.push back (root) while cnt 6= N do Node term ← terms.pop f ront () terms.push back (term.low ← new Node ()) terms.push back (term.high ← new Node ()) tcnt ← cnt + 1 end uint idx ← 1 while terms 6= empty do Node term ← terms.pop f ront () term.low ← new Node ( get set ids(xidx , S )) term.high ← new Node ( {K + idx} ) idx ← idx + 1 end end return root; Algorithm 2: Encode MSC as OD 10 areas to be stored; 6.1 Global Approach The GA approach is summarised in Algorithm 3, where: (i) inputs to states (.) creates C – the set of domain state indexes, I – the set of input indexes, and {Cj }j∈I – the sets of states for the given inputs; (ii) get min set cover(.) implements the MSC solution algorithm for unit set weights8 , see Section 2.1; (iii) determinize (.) iterates over I ∗ and for each state with the input removes all other inputs. Input: M - the controller’s MTBDD Result: The determinized MTBDD   C, I, {Cj }j∈I ← inputs to states(M )   Vector I ∗ ← get min set cover C, I, {Cj }j∈I M 0 ← determinize (M, I ∗ ) return R (M 0 ); Algorithm 3: The GA approach GA differs from LA by looking at the state-space globally regardless of its’ elements location. It maximizes the number of terminal nodes with identical labels, generally leading to a reduction in the number of used labels, which should facilitate MTBDD reductions. 6.2 Local-Global Approach Recall the MTBDD-based LA algorithm discussed in Section 4. We showed that such determinization procedure can suffer from sub-optimal non-deterministic resolutions when multiple input choices are available in some regions. LGA combines LA with GA in an attempt to improve the resulting reductions by minimising this uncertainty. In essence, the LGA approach proceeds as LA up to the moment a non-trivial set of inputs, common for a grid area, is found; then the input is chosen according to the priority-descending order of inputs, as pre-computed by the get min set cover (.) function, see Algorithm 3. 6.3 BDD-index based Local-Global Approach RO-(MT)BDDs achieve significant size reductions only if a “good” variable ordering is found, see Section 2.3. Given the (MT)BDD encoding, see Equation 1 8 The function returns a vector of inputs, ordered in the same way they were added to I ∗ , with the more common inputs coming first. 11 (a) SCOTSv2.0 grid-cell index encoding (b) RO-BDD grid-cell index encoding Figure 4: DC motor: controller function of Section 3, the variable reordering swaps grid-cell index bits realising a limited9 form of cell re-indexing. Figure 4 shows the effects thereof on the g ⊂ Z≥0 ×Z≥0 function for an LGA-determinized BDD controller of the DC motor case study, see Section 7.1. The horizontal and vertical axes of the plots correspond to the state- and input-space element indexes respectively. The distinct vertical lines on Figures 4a and 4b are the 1.000 point marks. According to Section 3, the BDD’s range of S indexes is wider than that of SCOTSv2.0. Comparing g (.) in RO-BDD and SCOTSv2.0 indexes, the former exhibits better data clustering. To use this to our benefit, we suggest a version of LGA, called BLGA, using the RO-BDD indexes. 6.4 Symbolic Regression For the SR algorithm, a set of candidate controllers is evolved using a combination of GGGP and sep-CMA-ES, c.f. references in Section 2.2, using imax individuals (i.e. candidate solutions) for N generations. GGGP is used to evolve the functional structure of the controller based on a grammar and sep-CMA-ES to optimize the parameters. Given a candidate controller gSR : Rn → Rm , the fitness function F with respect to a finite set S is defined as: F (gSR , Sc ) = |{s ∈ Sc | qu (gSR (s)) ∈ g(s)}| . |Sc | In order to reduce the computation time, the set of states Sc is down-sampled to a set with a maximum of λ elements. The reproduction involves selecting individuals based on tournament selection and the genetic operators crossover and mutation, in which parts of the individuals are exchanged or randomly altered respectively. More in depth descriptions of the used GGGP and sepCMA-ES algorithms can be found in [29] and [21] respectively. After a maximum amount of generations the individual with the highest fitness is selected. For the resulting controller, it is verified for which states s ∈ Sc it holds that qu (gSR (s)) ∈ g(s). For the remaining states the inputs are determinized using GA, LA or LGA. Finally, all states and corresponding new input indexes are again stored in a BDD. 9 Swapping bits affects all indexes; bits can not change value. 12 For our experiments we used the parameters in Table 1. Table 2 shows the grammar employed to determine in which space analytical expressions to fit the controllers were selected. Here sgn denotes the signum function and Random Real ∈ [−1, 1] creates a random real within the specified interval. The used starting symbol is hstrti. Table 1: SR parameters parameters λ N M d (cc , cm ) σ0 NES value 1000 50 32 7 (0.5, 0.5) 1 10 explanation Cardinality of down-sampled Sc Max. number of GGGP generations. Maximum number of individuals. Maximum tree depth of genotypes. Crossover and mutation chance. Initial standard deviation. Max. number of CMA-ES generations. Table 2: Production rules P Nonterminal hstrti ::= hexpri ::= hlini ::= hpoli ::= hmoni ::= hvari ::= hconsti ::= 7 7.1 Rules hconsti + hexpri | hconsti · hexpri | hconsti + hconsti · hexpri hlini | hpoli | 0.5sgn(hlini) + 0.5 + hexpri | 0.5sgn(hpoli) + 0.5 + hexpri hconsti · x1 + . . . hconsti · xn hpoli + hpoli | hconsti × hmoni hvari | hvari × hmoni x1 | · · · | xn Random Real ∈ [−1, 1] Empirical evaluation Case studies All of the considered case-studies, but the last one, are taken from the standard distribution of SCOTSv2.0: Aircraft - a DC9-30 aircraft landing maneuver, see [20]; Vehicle - a path planning problem for an autonomous vehicle, see [33] and [20]; DCDC - a boost DC-DC converter with a reach-and-stay voltage specification, see [8]; DCDC rec 1/2 - the same as DCDC but enforces a recurrence specification for two targets; DCM - a DC motor with a reach-and-stay velocity specification, see [18].The symbolic BDD controller sizes were varied by modifying the models’ input-/state-space discretisation parameters. 13 7.2 Software details For the evaluation, we have realised the following software: • A C++11 based LibLink library10 for Mathematica 11, see [11], allowing to load and store BDD-based symbolic controllers of SCOTSv2.0. • A C++11 based application implementing LA, GA, LGA, and BLGA. Our code is single-threaded as constrained by CUDD. • A Mathematica 11 package implementing the SR approach. This realisation is natively multi-threaded and allows for a best utilisation of the CPU cores. 7.3 Experimental setup We have measured: (i) determinization run-time in seconds as reported by the tools; (ii) size of the determinized controllers in bytes, when stored to the file system. SR is probabilistic and therefore each of its experiments was repeated 5 times. All other approaches are deterministic and thus their experiments were repeated only once. Overall, we have considered the algorithms on various size models, varying the discretization parameters, and thus changing: 1. The number of model inputs: (a) GA, LA, LGA, BLGA (b) SR on LGA determinized controllers 2. The number of model states: (a) GA, LA, LGA, BLGA SR was only done on LGA determinized controllers because it: (i) did not scale well with the growing number of inputs; (ii) if feasible, shall be capable of reducing deterministic controllers. The experiments were done on two machines: (A) MacBook Pro with: Intel i5 CPU (4 cores) 2.9 GHz; 8 GB 2133 Mhz RAM; MacOS v10.12.6; (B) PC with: Intel Xeon CPU (8 cores) E5−1660 v3 3.00GHz; 32 GB 2133 MHz RAM; Ubuntu 16.04.3 LTS. The type (1.a) experiments ran on machine (A); (1.b) and (2) on (B). Given, a significant difference in software realization (Mathematica v.s. C++11, multi v.s. single threaded), running SR on faster multicore machine, and that controllers’ determinization is an offline job, our run-time data: (i) is only dedicated to show the approaches’ feasibility; (ii) can only hint the actual performance differences between SR and others. This is why also the run-time for LA, GA, LGA, and BLGA is not averaged over multiple re-runs. 10 We preferred LibLink over WSTP due to faster data-exchange. 14 7.4 Results Table 3 presents the core experimental data for models obtained by varying the number of inputs. Here, column: “SCOTS” lists information for the original controllers; “Time” is the algorithm’s run-time in seconds; “A-SR” and “M-SR”stand for the average and maximum SR values over 5 repetitions; and “Fit %” is the fitness percentage of the SR controller’s symbolic part. To compare the compressing power of the approaches, for an algorithm ω and a case study ν we define size compression as: Cων :=(1 − |Bων |/|B ν |)∗100, where B ν and Bων stand for the original and ω-determinized BDD sizes. Comparing algorithms “ω1 v.s. ω2 ” is done by computing a difference ∆νω1 ,ω2 :=Cων 1 − Cων 2 . Clearly, ∆νω1 ,ω2 > 0 means ω1 being better than ω2 on ν. Taking into account the A-SR ν experiment repetitions, we define11 : CA-SR := E [CSRν ]. Figure 5 contains two compression comparison sets: (i) GA, LGA, BLGA v.s. LA; and (ii) A-SR, M-SR v.s. LGA12 . The plot features mean compressions and the standard deviation thereof. We conclude the next compression ranking of the algorithms: 1. LGA, 2. BLGA, 3. LA, 4. GA, 5. M-SR 6. A-SR. Figure 6 summarises the execution times for the set-up of Table 3. Relative to LA, on average: GA is ≈ 0.8 times faster; LGA is comparable; BLGA is ≈ 1.1 times slower; A-SR is ≈ 180 times slower but has a huge deviation of ≈ 174. The latter is due to probabilistic nature of SR. Note that, A-SR is multi-threaded and was run on a faster machine than the single-threaded LA. So the actual performance difference between the algorithms is more significant. Additionally, we compared GA, LGA, BLGA and LA on up to 52 Mb size BDD controllers, obtained by varying the number of system states. These experiments only strengthened the algorithms’ ranking conclusions implied by Figure 5. We omit further detail on that, to save space. To conclude, we present Figure 7 summarising the compression of LGA relative to LA on all of the 67 considered BDD controllers. Per case-study ν the ν ν ν compression is computed as: CLGA, LA :=(1 − |BLGA |/|BLA |) ∗ 100. The plot on the ν left of Figure 7 shows the discretized distribution of CLGA, LA , the plot on the right shows its mean and standard deviation. Notice that, on average, LGA produces ≈ 14% smaller controllers than LA, in the best case LGA was capable of delivering up to ≈ 85% smaller controllers. 8 Conclusions In this work, we have considered the problem of size-optimal BDD controllers determinisation (OD), which we show to be NP-complete. Up until now, the only heuristic approach to solve OD was proposed by [9] and was based on representing the controller function as a binary tree. We have shown how that such an approach, which we call LA, can be extended to use the more size-efficient RO(MT)BDDs data structure. In addition, we have identified examples where LA 11 The mean value over 5 experiment repetitions of SR on ν. SR was applied to the LGA-determinized controllers. 12 Since 15 Table 3: Core experimental data DCDC r1 DCDC DCM Vehicle Aircraft SCOTS DCDC r2 LGA A-SR #inputs #Bytes #Bytes LA Time #Bytes Time Fit % 20 57 112 49 169 441 729 1087 2001 10001 20001 30001 40001 50001 2 45 89 134 178 223 2 45 89 134 178 223 2 45 89 134 178 223 2878481 9563407 8533274 21972 28537 54692 52447 60757 4951 11957 24206 19161 13772 12921 4532 5218 5350 5272 5266 5300 4247 6009 5615 5768 5781 5714 2243 3685 3638 3565 3531 3549 150459 193590 236753 10462 11956 19430 18435 18939 830 1000 1166 1306 1308 1252 786 1025 1030 1036 1036 1037 773 915 921 936 936 936 791 934 939 949 949 950 121.81 159.61 183.62 1.38 1.79 2.86 3.41 4.04 2.04 13.3 34.65 63.45 94.00 143.13 0.75 1.57 2.38 3.31 4.11 5.09 0.78 1.48 2.15 2.96 3.64 4.48 0.73 2.15 3.66 4.98 6.43 8.13 150316 193055 235273 9821 11047 17357 15793 16338 371 420 410 441 449 448 786 1025 1030 1035 1035 1036 773 915 921 930 930 930 828 937 943 949 949 950 1065, 50 1547, 92 1949, 12 572, 77 614, 85 770, 81 954, 53 1455, 87 458, 61 639, 11 742, 10 951, 10 975, 50 1121, 98 431, 15 440, 99 351, 11 450, 36 368, 17 426, 01 448, 00 417, 70 422, 11 359, 65 409, 91 428, 49 439, 04 428, 78 395, 83 361, 49 456, 36 408.70 48.56 43.55 40.58 32.31 27.15 13.96 18.14 24.82 33.14 33.14 24.43 33.14 19.82 33.14 94.19 94.19 94.18 94.17 94.15 93.55 97.35 97.35 97.35 97.35 97.35 95.13 95.08 94.51 95.12 94.99 94.82 92.91 16 M-SR 10 Deviation Average Compression deltas 5 0 -5 -10 -15 -20 GA v.s. LA LGA v.s. LA BLGA v.s. LA A-SR v.s. LGA M-SR v.s. LGA Figure 5: Plotting ∆νGA,LA , ∆νLGA,LA , ∆νBLGA,LA , ∆νA-SR,LGA , ∆νM-SR,LGA Deviation Average 1.4 600 1.3 356 1.2 182 1.1 1 0.9 0.8 0.7 7 0.6 GA v.s. LA LGA v.s. LA BLGA v.s. LA Figure 6: Execution times ratio relative to LA 17 A-SR v.s. LA 0.35 Distribution 100 Deviation Average 84.79 80 0.3 0.25 Compression Probability 60 0.2 0.15 40 0.1 13.79 0.05 0 -5.46 0 0) -1 5, [-1 ) -5 0, [-1 ) ,0 [-5 ] ,0 [0 ] ,5 (0 0] ,1 (5 5] ,1 0 (1 5, (1 ] 20 ] 25 0, (2 ] 30 5, (2 ] ] ] ] ] ] ] ] ] ] ] ] 35 40 45 50 55 60 65 70 75 80 85 90 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, (3 (4 (4 (5 (5 (6 (6 (7 (7 (8 (8 (3 Compression ranges -20 LGA ν Figure 7: CLGA, LA distribution, deviation and average is sub-optimal due to only considering controller’s local properties. A global approach (GA), based on the minimum set cover problem solution algorithm, was proposed to remedy this. Further, a hybrid of GA and LA, called LGA, was suggested to incorporate the strengths of both approaches. To exploit the clustering of internal BDD indexes, we have come up with a BDD-index based version of LGA, called BLGA. Finally, we made an attempt of substituting the BDD-based control-law representations by functions generated using the symbolic regression (genetic-algorithm powered) approach, we refer to as SR. All of the devised approaches were compared in compressing power and runtime by means of an extended empirical evaluation. The compression ranking of the algorithms turns out to be: 1. LGA, 2. BLGA, 3. LA, 4. GA, 5. SR. The run times of LA, GA, LGA, and BLGA are of the same order but SR is at least one to two orders of magnitude slower. In principle, SR could allow us to eliminate BDDs completely, leading to potentially smaller functional expressions and prevent using BDD-data accessing code that, as for CUDD, is difficult (and size expensive) to port to embedded hardware. We did not manage to achieve that due to: (i) our SR realization not being powerful enough, see low fitness values in Table 3; (ii) using BDDs for storing the controller’s support, due to a decision to preserve controller’s domain. For now, we shall note that SR still looks promising for getting small and practical controllers. However, symbolic controllers seem to have structure that is not easy for SR to achieve a 100% fitness on. So more research is needed to be done in this direction. 18 References [1] R. Iris Bahar, Erica A. Frohm, Charles M. Gaona, Gary D. Hachtel, Enrico Macii, Abelardo Pardo, and Fabio Somenzi. Algebraic decision diagrams and their applications. In Proceedings of the 1993 IEEE/ACM International Conference on Computer-aided Design, ICCAD ’93, pages 188–191, Los Alamitos, CA, USA, 1993. IEEE Computer Society Press. [2] S. K. Basu. Non-deterministic Algorithms, page 133. PHI Learning Private Limited, New Delhi, India, 2008. [3] Beate Bollig and Ingo Wegener. Improving the variable ordering of obdds is np-complete. IEEE Trans. Comput., 45(9):993–1002, September 1996. [4] Randal E. Bryant. Graph-based algorithms for boolean function manipulation. IEEE Trans. Comput., 35(8):677–691, August 1986. [5] V. Chvatal. A greedy heuristic for the set-covering problem. Mathematics of Operations Research, 4(3):233–235, 1979. [6] Thomas H. Cormen, Clifford Stein, Ronald L. Rivest, and Charles E. Leiserson. Introduction to Algorithms. McGraw-Hill Higher Education, 2nd edition, 2001. [7] Cameron Finucane, Gangyuan Jing, and Hadas Kress-Gazit. Ltlmop: Experimenting with language, temporal logic and robot control. In IEEE/RSJ Int’l. Conf. on Intelligent Robots and Systems, pages 1988 – 1993, Taipei, Taiwan, October 2010. [8] Antoine Girard. Controller synthesis for safety and reachability via approximate bisimulation. Automatica, 48(5):947 – 953, 2012. [9] Antoine Girard. Low-complexity switching controllers for safety using symbolic models*. IFAC Proceedings Volumes, 45(9):82 – 87, 2012. [10] Nikolaus Hansen and Andreas Ostermeier. Completely derandomized selfadaptation in evolution strategies. Evol. Comput., 9(2):159–195, June 2001. [11] Wolfram Research, Inc. Mathematica, Version 11.1, 2017. Champaign, IL. [12] Richard M. Karp. Reducibility among combinatorial problems. In Raymond E. Miller and James W. Thatcher, editors, Proceedings of a symposium on the Complexity of Computer Computations, held March 20-22, 1972, at the IBM Thomas J. Watson Research Center, Yorktown Heights, New York., The IBM Research Symposia Series, pages 85–103. Plenum Press, New York, 1972. [13] John R. Koza. Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press, Cambridge, MA, USA, 1992. 19 [14] John R. Koza. Genetic programming as a means for programming computers by natural selection. Statistics and Computing, 4(2):87–112, 1994. [15] Marta Kwiatkowska, Gethin Norman, and David Parker. Symmetry Reduction for Probabilistic Model Checking, pages 234–248. Springer Berlin Heidelberg, Berlin, Heidelberg, 2006. [16] Ming Li and Paul M.B. Vitnyi. An Introduction to Kolmogorov Complexity and Its Applications. Springer Publishing Company, Incorporated, 3 edition, 2008. [17] Jun Liu, Necmiye Ozay, Ufuk Topcu, and Richard M. Murray. Synthesis of reactive switching protocols from temporal logic specifications. IEEE Trans. Automat. Contr., 58(7):1771–1785, 2013. [18] Manuel Mazo, Anna Davitian, and Paulo Tabuada. PESSOA: A Tool for Embedded Controller Synthesis, pages 566–569. Springer Berlin Heidelberg, Berlin, Heidelberg, 2010. [19] Sebti Mouelhi, Antoine Girard, and Gregor Gössler. Cosyma: A tool for controller synthesis using multi-scale abstractions. In Proceedings of the 16th International Conference on Hybrid Systems: Computation and Control, HSCC ’13, pages 83–88, New York, NY, USA, 2013. ACM. [20] Gunther Reissig, Alexander Weber, and Matthias Rungger. Feedback Refinement Relations for the Synthesis of Symbolic Controllers. IEEE Trans. Automat. Control, 62(4):1781–1796, apr 2016. [21] Raymond Ros and Nikolaus Hansen. A simple modification in cma-es achieving linear time and space complexity. In Parallel Problem Solving from Nature – PPSN X: 10th International Conference, Dortmund, Germany, September 13-17, 2008. Proceedings, pages 296–305, Berlin, Heidelberg, 2008. Springer Berlin Heidelberg. [22] Richard Rudell. Dynamic variable ordering for ordered binary decision diagrams. In Proceedings of the 1993 IEEE/ACM International Conference on Computer-aided Design, ICCAD ’93, pages 42–47, Los Alamitos, CA, USA, 1993. IEEE Computer Society Press. [23] Matthias Rungger, Manuel Mazo, Jr., and Paulo Tabuada. Specificationguided controller synthesis for linear systems and safe linear-time temporal logic. In Proceedings of the 16th International Conference on Hybrid Systems: Computation and Control, HSCC ’13, pages 333–342, New York, NY, USA, 2013. ACM. [24] Matthias Rungger and Majid Zamani. SCOTS: A tool for the synthesis of symbolic controllers. In Proceedings of the 19th International Conference on Hybrid Systems: Computation and Control, HSCC, pages 99–104, 2016. 20 [25] Christoph Scholl, Bernd Becker, and Andreas Brogle. Solving the multiple variable order problem for binary decision diagrams by use of dynamic reordering techniques. Technical report, Albert-Ludwigs-University, Freiburg, D 79110 Freiburg im Breisgau, Germany, 1999. [26] Fabio Somenzi. CUDD: CU Decision Diagram Package, 2015. Electronically available at: http://vlsi.colorado.edu/~fabio/CUDD/. [27] V. Staudt. Compact representation of mathematical functions for control applications by piecewise linear approximations. Electrical Engineering, 81(3):129–134, 1998. [28] Paulo Tabuada. Verification and Control of Hybrid Systems: A Symbolic Approach. Springer Publishing Company, Incorporated, 1st edition, 2009. [29] C.F. Verdier and M. Mazo. Formal controller synthesis via genetic programming. IFAC-PapersOnLine, 2017. (To Appear). [30] Peter A Whigham et al. Grammatically-based genetic programming. In The workshop on genetic programming: from theory to real-world applications, pages 33–41, 1995. [31] M. J. Willis, H. G. Hiden, P. Marenbach, B. McKay, and G. A. Montague. Genetic programming: an introduction and survey of applications. In International Conference On Genetic Algorithms In Engineering Systems: Innovations And Applications, pages 314–319, Sep 1997. [32] Tichakorn Wongpiromsarn, Ufuk Topcu, Necmiye Ozay, Huan Xu, and Richard M. Murray. Tulip: A software toolbox for receding horizon temporal logic planning. In Proceedings of the 14th International Conference on Hybrid Systems: Computation and Control, HSCC ’11, pages 313–314, New York, NY, USA, 2011. ACM. [33] Majid Zamani, Giordano Pola, Manuel Mazo Jr., and Paulo Tabuada. Symbolic models for nonlinear control systems without stability assumptions. IEEE Trans. Automat. Contr., 57(7):1804–1809, 2012. 21
3cs.SY
June 7, 2017 CANONICAL CORRELATION COEFFICIENTS OF HIGH-DIMENSIONAL GAUSSIAN VECTORS: FINITE RANK CASE By Zhigang Bao∗ , Jiang Hu† , Guangming Pan‡ and Wang Zhou§ arXiv:1704.02408v3 [math.ST] 6 Jun 2017 Hong Kong University of Science and Technology Northeast Normal University Nanyang Technological University and National University of Singapore Consider a Gaussian vector z = (x0 , y0 )0 , consisting of two subvectors x and y with dimensions p and q respectively. With n independent observations of z, we study the correlation between x and y, from the perspective of the Canonical Correlation Analysis. We investigate the high-dimensional case: both p and q are proportional to the sample size n. Denote by Σuv the population crosscovariance matrix of random vectors u and v, and denote by Suv the sample counterpart. The canonical correlation coefficients between x and y are known as the square roots of the nonzero eigenvalues −1 of the canonical correlation matrix Σ−1 xx Σxy Σyy Σyx . In this paper, we focus on the case that Σxy is of finite rank k, i.e. there are k nonzero canonical correlation coefficients, whose squares are denoted by r1 ≥ · · · ≥ rk > 0. We study the sample counterparts of ri , i = 1, . . . , k, i.e. the largest k eigenvalues of the sample canon−1 −1 ical correlation matrix Sxx Sxy Syy Syx , denoted by λ1 ≥ · · · ≥ λk . We show that there exists a threshold rc ∈ (0, 1), such that for each i ∈ {1, . . . , k}, when ri ≤ rc , λi converges almost surely to the right edge of the limiting spectral distribution of the sample canonical correlation matrix, denoted by d+ . When ri > rc , λi possesses an almost sure limit in (d+ , 1], from which we can recover ri ’s in turn, thus provide an estimate of the latter in the high-dimensional scenario. We also obtain the limiting distribution of λi ’s under appropriate normalization. Specifically, λi possesses Gaussian type fluctuation if ri > rc , and follows Tracy-Widom distribution if ri < rc . Some applications of our results are also discussed. 1. Introduction. In multivariate analysis, the most general and favorable method to investigate the relationship between two random vectors x and y, is the Canonical Correlation Analysis (CCA), which was raised in the seminal work of Hotelling [27]. CCA aims at finding two sets of basis vectors, such that the correlations between the projections of the variables x and y onto these basis vectors are mutually maximized, namely, seeking vectors a = a1 and b = b1 to maximize the correlation coefficient Cov(a0 x, b0 y) p ρ ≡ ρ(a, b) := p . Var(a0 x) · Var(b0 y) (1.1) Conventionally, ρ1 := ρ(a1 , b1 ) is called the first canonical correlation coefficient. Having obtained the first m canonical correlation coefficients ρi , i = 1, . . . , m and the corresponding vector ∗ Z.G. Bao was supported by a startup fund from HKUST J. Hu was partially supported by CNSF 11301063 ‡ G.M. Pan was partially supported by the Ministry of Education, Singapore, under grant # ARC 14/11 § W. Zhou was partially supported by the Ministry of Education, Singapore, under grant MOE2015-T2-2039(R-155-000-171-112). MSC 2010 subject classifications: 62H20, 60B20,60F99 Keywords and phrases: Canonical correlation analysis, Random Matrices, MANOVA ensemble, Highdimensional data, finite rank perturbation, largest eigenvalues † 1 2 Z.G. BAO ET AL. pairs (ai , bi ), i = 1 . . . , m, one can proceed to seek vectors (am+1 , bm+1 ) maximizing ρ subject to the constraint that (a0m+1 x, b0m+1 y) is uncorrelated with (a0i x, b0i y) for all i = 1, . . . , m. Analogously, we call ρi the ith canonical correlation coefficient if it is nonzero. Denoting by Σuv the population cross-covariance matrix of arbitrary two random vectors u and v, it is well known that ri := ρ2i is the ith largest eigenvalue of the (population) canonical correlation matrix −1 Σ−1 xx Σxy Σyy Σyx . Let zi = (x0i , yi0 )0 , i = 1, . . . , n be n independent observations of the vector z := (x0 , y0 )0 ∼ N (µ, Σ) with mean vector µ and covariance matrix   Σxx Σxy Σ= , Σyx Σyy We can study the canonical correlation coefficients via their sample counterparts. To be specific, we employ the notation Suv to represent the sample cross-covariance matrix for arbitrary two random vectors u and v, where the implicit sample size of (u0 , v0 )0 is assumed to be n, henceforth. Then the square of the ith sample canonical correlation coefficient is defined as the ith largest eigenvalue of the sample canonical correlation matrix (CCA matrix in short) −1 −1 Sxx Sxy Syy Syx , denoted by λi in the sequel. Let p and q be the dimensions of the sub-vectors x and y, respectively. In the classical low-dimensional setting, i.e., both p and q are fixed but n is large, one can safely use λi to estimate ri , considering the convergence of the sample cross-covariance matrices towards their population counterparts. However, nowadays, due to the increasing demand in the analysis of high-dimensional data springing up in various fields such as genomics, signal processing, microarray, finance and proteomics, putting forward a theory on high-dimensional CCA is much needed. So far, there are only a handful of works devoted to this topic. Fujikoshi in [20] derived the asymptotic distributions of the canonical correlation coefficients when q is fixed while p is proportional to n. Oda et al. in [39] considered the problem of testing for redundancy in high dimensional canonical correlation analysis. Recently, with certain sparsity assumption, the theoretical results and potential applications of high-dimensional sparse CCA have been discussed in [23, 22]. In the null case, i.e., x and y are independent, the Tracy-Widom law for the largest canonical correlation coefficients has been studied in [32, 26, 25], when p, q, n are proportional. Recently, in [34] Johnstone and Onatski derived the asymptotics of the likelihood ratio processes of CCA corresponding to the null hypothesis of no spikes and the alternative of a single spike. In this paper, we will work with the following high-dimensional setting. Assumption 1.1 (On the dimensions). p/n = c1 → y1 ∈ (0, 1), We assume that p := p(n), q := q(n), and q/n = c2 → y2 ∈ (0, 1), as n → ∞, s.t. y1 + y2 ∈ (0, 1). Without loss of generality, we always work with the additional assumption p > q, thus c1 > c2 . Observe that here y1 and y2 are asymptotic parameters, while c1 and c2 are non-asymptotic parameters. Hence, in general, a c1 , c2 -dependent random variable X(c1 , c2 ) can not serve as a limiting target of a random sequence Xn (c1 , c2 ), n ≥ 1. Nevertheless, to ease the presentation, from time to time, we still write Xn (c1 , c2 ) → X(c1 , c2 ), if Xn (c1 , c2 ) − X(c1 , c2 ) → 0, where the convergence could be in distribution, in probability or a.s., etc. HIGH-DIMENSIONAL CCA 3 Let x̄ and ȳ be the sample means of n samples {xi }ni=1 and {yi }ni=1 respectively, and use the notation x̊i := xi − x̄ and ẙi := yi − ȳ for i = 1, . . . , n. We can then write n Sab = 1 X åi b̊0i , n−1 a, b = x or y i=1 It is well known that there exist n − 1 i.i.d. Gaussian vectors z̃i = (x̃0i , ỹi0 )0 ∼ N (0, Σ), such that n−1 Sab = 1 X ãi b̃0i , n−1 a, b = x or y. i=1 For simplicity, we recycle the notation xi and yi to replace x̃i and ỹi , and work with n instead of n − 1, noticing that such a replacement on sample size is harmless to Assumption 1.1. Hence, we can and do assume that z is centered in the sequel and denote n Sab 1X = ai b0i , n a, b = x or y. i=1 Furthermore, for brevity, we introduce the notation −1 −1 Cxy := Sxx Sxy Syy Syx , (1.2) for the CCA matrix, and Cyx can be analogously defined via switching the roles of x and y in (1.2). Notice that Cxy and Cyx possess the same non-zero eigenvalues. By our assumption p > q, there are at most q non-zero canonical correlations, either population ones or sample ones. An elementary fact is that λi , ri ∈ [0, 1] for all i = 1, . . . , q. Note that λi , i = 1, . . . , q are also eigenvalues of the q × q matrix Cyx , whose empirical spectral distribution (ESD) will be denoted by q 1X Fn (x) := 1{λi ≤x} . q (1.3) i=1 We use the following notations for the data matrices X := Xn = (x1 , . . . , xn ), Y := Yn = (y1 , . . . , yn ). Let vec(X ) = (x01 , . . . , x0n )0 be the vectorization of the matrix X , and define vec(Y ) be the analogously. We see that vec(X ) ∼ N (0, In ⊗ Σxx ) and vec(Y ) ∼ N (0, In ⊗ Σyy ). Our aim, in this work,√is to study the asymptotic behavior of a few largest sample canonical correlation √ coefficients λi ’s, and try to get the information about the population ones ρi = ri from the sample ones. We will focus on the case of finite rank, i.e., there is some fixed nonnegative integer k, such that r1 ≥ . . . ≥ rk ≥ rk+1 = . . . = rq = 0. Specifically, we make the following assumption throughout the work. Assumption 1.2 (On the rank of the population matrix). We assume that rank(Σxy ) ≤ k for some fixed positive integer k. Furthermore, setting r0 = 1, we denote by k0 the nonnegative integer satisfying 1 = r0 ≥ . . . ≥ rk0 > rc ≥ rk0 +1 ≥ . . . rk ≥ rk+1 = 0, (1.4) where rc ≡ rc (c1 , c2 ) := r c1 c2 . (1 − c1 )(1 − c2 ) (1.5) In Section 1.2 we will state our main results. Before that, we introduce in Section 1.1 some known results in the null case, i.e. k = 0, which will be the starting point of our discussion. 4 Z.G. BAO ET AL. 1.1. The null case: MANOVA ensemble. At first, we introduce some known results on the limiting behavior of {λi }qi=1 in the null case, i.e. x and y are independent, or else, ri = 0 for all i = 1, . . . , q. It is elementary to see that the canonical correlation coefficients are invariant under the block diagonal transformation (xi , yi ) → (Axi , Byi ), for any p × p matrix A and q × q matrix B, as long as both of them are nonsingular. Hence, without loss of generality, in this section, we tentatively assume that Σxx = Ip and Σyy = Iq . Under our high-dimensional setting, i.e. Assumption 1.1, it is known that λi ’s do not converge to 0 even in the null case, instead, they typically spread out over an interval contained in [0, 1]. Specifically, we have the following theorem on Fn (x) (c.f. (1.3)), which is essentially due to Wachter [45]. Theorem 1.3. When x and y are independent Gaussian and Assumption 1.1 holds, almost surely, Fn converges weakly to a deterministic probability distribution F (x) with density p (d+ − x)(x − d− ) 1 f (x) = 1(d− ≤ x ≤ d+ ), (1.6) 2πc2 x(1 − x) where d± = p c1 (1 − c2 ) ± p 2 c2 (1 − c1 ) (1.7) Remark 1.4. In the null case, the convergence of the ESD of the CCA matrix actually holds under a more general distribution assumption, see [48]. Conventionally, we call F (x) in Theorem 1.3 the limiting spectral distribution (LSD) of Cyx . One might note that F (x) is also the LSD of the so-called MANOVA ensemble with appropriately chosen parameters, which is widely studied in the Random Matrix Theory (RMT). Actually, when x and y are Gaussian and independent, the CCA matrix Cyx is exactly a MANOVA matrix. To see this, we note that Px := X 0 (X X 0 )−1 X is a projection matrix independent of Y . Hence, we can write Cyx = (Y (I − Px )Y 0 + Y Px Y 0 )−1 Y Px Y 0 . Using Cochran’s theorem, we see that Y (I − Py )Y 0 and Y Px Y 0 are independent Wishart, Y (I − Px )Y 0 ∼ Wq (Iq , n − p), Y Px Y 0 ∼ Wq (Iq , p). Hereafter, we use the notation Wm (·, ·) to denote the Wishart distribution Wishartm (·, ·) for short. Consequently, λi , i = 1, . . . , q are known to possess the following joint density function, pn (λ1 , . . . , λq ) = Cn q Y i<j |λi − λj | q Y (p−q−1)/2 (1 − λi )(n−p−q−1)/2 λi 1(λi ∈ [0, 1]), i=1 where Cn is the normalizing constant, see Muirhead [38], page 112, for instance. Or else, one can refer to [32], for more related discussions. In the context of RMT, the point process possessing the above joint density is also called Jacobi ensemble. Throughout the paper, we will say that an n-dependent event A ≡ A(n) holds with overwhelming probability, if for any given positive number `, there exists a constant C` such that P(A) ≥ 1 − C` n−` . K Especially, for any fixed integer K ≥ 0, we have ∩ni=1 Ai holds with overwhelming probability if Ai holds with overwhelming probability individually with the common C` ’s. The next known result concerns the convergence of the largest eigenvalues. HIGH-DIMENSIONAL CCA Theorem 1.5. 5 When x and y are independent and Assumption 1.1 holds, we have a.s. λi − d+ −→ 0, (1.8) for any fixed positive integer i. Moreover, for any small constant ε > 0, λ1 ≤ d+ + ε (1.9) holds with overwhelming probability. Remark 1.6. The estimate (1.9), is actually implied by some existing results in the literature directly. For example, one can refer to the small deviation estimate of the largest eigenvalue of the Jacobi ensemble in [36] . Moreover, (1.8) is a direct consequence of (1.9) and Theorem 1.3. Remark 1.7. As we mentioned in Introduction , on the fluctuation level, λ1 possesses a Type 1 Tracy-Widom limit after appropriate normalization. Such a result has been established recently in [32, 26, 25]. 1.2. Finite rank case. We now turn to the case we are interested in: the finite rank case. To wit, Assumption 1.2 holds. It will be clear that the CCA matrix in such a finite rank case can be viewed as a finite rank perturbation of that in the null case. Consequently, the global behavior, especially the LSD, turns out to coincide with the null case. However, finite rank perturbation may significantly alter the behavior of the extreme eigenvalues, when the perturbation is strong enough. Similar problems have been studied widely for various random matrix models, not trying to be comprehensive, we refer to the spiked sample covariance matrices [31, 6, 41, 4, 5, 19], the deformed Wigner matrices [12, 42, 18, 13, 37], the deformed unitarily invariant matrices [9, 35], and some other deformed models [11, 10, 46]. In this work, for our CCA matrix Cxy , we study the limits and the fluctuations of its largest eigenvalues, i.e. squares of the largest sample canonical correlation coefficients, under Assumption 1.2. Our main results are the following three theorems. Let γi := ri (1 − c1 + c1 ri−1 )(1 − c2 + c2 ri−1 ). (1.10) Recall rc and d+ defined in (1.5) and (1.7), respectively. It is easy to check that γi ≥ d+ if ri ≥ rc . Theorem 1.8 (Limits). Under Assumptions 1.1 and 1.2, the squares of the largest canonical correlation coefficients exhibit the following convergence as n → ∞. (i): (Outliers) For 1 ≤ i ≤ k0 , we have a.s. λi − γi −→ 0. (ii): (Sticking eigenvalues) For each fixed i ≥ k0 + 1, we have a.s. λi − d+ −→ 0. The next two results are on fluctuations of λi ’s. We need the following definition. Definition 1.9. For two (possibly) n-dependent numbers a(n), b(n) ∈ C, we say a(n) is well separated from b(n), if there exists a small positive constant ε such that |a(n) − b(n)| ≥ ε for sufficiently large n. The next theorem is on the fluctuations of the outliers. 6 Z.G. BAO ET AL. Theorem 1.10 (Fluctuations of the outliers). Suppose that Assumptions 1.1 and 1.2 hold. Let l0 be the cardinality of the set Γ := {r1 , . . . , rk0 } (not counting multiplicity), and denote by r1 = r(1) > · · · > r(l0 ) = rk0 the l0 different values in Γ. Set n0 = 0 and denote by nl the Pl P multiplicity of r(l) in Γ for 1 ≤ l ≤ l0 . Let Jl = [ l−1 i=0 ni ] ∩ Z for 1 ≤ l ≤ l0 . If r(`) i=0 ni + 1, is well separated from rc , 1, r(`−1) and r(`+1) , the nl -dimensional random vector n √n(λ − γ ) o j j , j ∈ Jl ξ(rj ) converges weakly to the distribution of the ordered eigenvalues of an nl -dimensional symmetric Gaussian random matrix G = (gij ) with independent (up to symmetry) entries gij ∼ N (0, 1+δij ). Here    (1 − rj )2 2(1 − c1 )(1 − c2 )rj + c1 + c2 − 2c1 c2 (1 − c1 )(1 − c2 )rj2 − c1 c2 ξ 2 (rj ) := . (1.11) rj2 Remark 1.11. The assumption that r` is away from rc , 1, r(`−1) and r(`+1) by a constant distance ε > 0 (well separated) is not necessary. It is possible to reduce ε to some n-dependent distance n−α for sufficiently small α. But we do not pursue this direction here. Our last theorem is on the fluctuation of the sticking eigenvalues. Theorem 1.12 (Fluctuations of the sticking eigenvalues). Suppose that Assumptions 1.1 and 1.2 hold. In addition, we assume that rc is well separated from rk0 and rk0 +1 . There exists a CCA matrix in the null case with the same parameters p, q, n, whose nonzero eigenvalues are denoted by λ̊1 > λ̊2 . . . > λ̊q , such that for any fixed positive integer m and any small constant ε > 0, we have max |λk0 +i − λ̊i | ≤ n−1+ε 1≤i≤m (1.12) in probability. This implies 2 n 3 (λk0 +1 − d+ ) =⇒ F1 , ξtw (1.13) where F1 is the Type 1 Tracy-Widom distribution and d2+ (1 − d+ )2 3 ξtw =p . c1 c2 (1 − c1 )(1 − c2 ) Remark 1.13. From (1.12), it is easy to conclude (1.13), by using the Tracy-Widom limit of λ̊1 derived in [32, 26, 25]. Observe that in these references, the Tracy Widom law is stated for the logit transform of λ̊1 , i.e., log(λ̊1 /(1 − λ̊1 )). Using a Taylor expansion, it is elementary 2 to check that that n 3 (λ̊1 − d+ )/ξtw =⇒ F1 from the Tracy-Widom law for the logit transform of λ̊1 (see Theorem 1 and Section 2.1.1.in [32] for more details). Remark 1.14. Similarly to Remark 1.11, the assumption that rc is away from rk0 and rk0 +1 by a constant distance can be weakened. But we do not pursue this direction here. To illustrate the result in Theorems 1.8, 1.10 and 1.12, we did some numerical simulations. The different limiting behavior of λi in (i) and (ii) of Theorem 1.8 can be observed in Figure 1. The fluctuation for λi in Theorem 1.10 and Theorem 1.12 can be seen from Figures 2 and 1. 7 HIGH-DIMENSIONAL CCA 120 100 80 60 40 20 0 0.48 0.5d r 0.52 0.54 γ 3 0.56 0.58 γ 2 0.6 0.62 0.64 0.66 γ 1 0.68 Fig 1. We chose a Gaussian vector z = (x0 , y0 )0 with p = 500 and q = 1000. The sample size is n = 5000. Hence, c1 = 0.1, c2 = 0.2. Then rc ≈ 0.17 and d+ = 0.5. We chose k = 4 and (r1 , r2 , r3 , r4 ) = (0.5, 0.4, 0.3, 0.16). Then γ1 ≈ 0.66, γ2 ≈ 0.6, γ3 ≈ 0.54 and γ4 ≈ 0.50 . The above simulation result is based on 1000 replications. The abscises of the vertical segments represent d+ and {γ1 , γ2 , γ3 }. The four histograms represent the distributions of the largest four eigenvalues of the CCA matrix respectively. 1.3. Organization and notations. Our paper is organized as follows. In Section 2, we display some applications of our results. We introduce in Section 3 some necessary preliminaries. In Section 4, we will reformulate the sample canonical correlation matrix in the finite rank case as a perturbation of that in the null case, thereby obtaining a determinant equation for the largest eigenvalues. By solving the limiting counterpart of the determinant equation, we can get the limits of the largest eigenvalues in Section 5, i.e. prove Theorem 1.8. In Section 6 we derive the fluctuations of the outliers (Theorem 1.10), and in Section 7, we study the fluctuations of the sticking eigenvalues (Theorem 1.12). Sections 8 and 9 are then devoted to proving some technical lemmas used in previous sections. Throughout the paper, the notation C represents some generic constants whose values which may vary from line to line. The notation 0k×` is used to denote the k by ` null matrix, which will be abbreviated to 0k if k = `, and from time to time we also use the abbreviation 0 if the dimension k × ` is clear from the context. For any matrix A, its (i, j)th entry will be written as Aij . When A is square, we denote by Spec(A) its spectrum. For a function f : C → C and an Hermitian matrix A with spectral decomposition UA ΛA U∗A , we define f (A) as usual, in the sense of functional calculus, to wit, f (A) = UA f (ΛA )U∗A , where f (ΛA ) is the diagonal matrix obtained via maping the eigenvalues of A to their images under f . We will conventionally use the notations kAk and kAkHS to represent the operator norm and Hilbert-Schmidt norm of a matrix A, respectively, while kbk stands for the Euclidean norm of a vector b. Throughout this paper, we use op (1) to denote a scalar negligible (in probability) or a fixed-dimensional random matrix with negligible (in probability) entries. And the notations oa.s (1), Op (1) and Oa.s. (1) are used in a similar way. For brevity, we further introduce the notations $ := c1 c2 , ϑ := (1 − c1 )(1 − c2 ). (1.14) 2. Applications. In this section, we discuss three applications of our results Theorems 1.8, 1.10 and 1.12 in hypothesis testing, estimation of the number and the values of the canonical correlation coefficients (CCC for short). At the end, we present an experiment on a real rain forest data. 8 Z.G. BAO ET AL. Fig 2. We chose a Gaussian vector z = (x0 , y0 )0 with p = 500 and q = 1000. The sample size is n = 5000. Hence, c1 = 0.1, c2 = 0.2. Then rc ≈ 0.17 and d+ = 0.5. We chose k = 4 and (r1 , r2 , r3 , r4 ) = (0.5, 0.4, 0.4, 0.16). Then γ1 ≈ 0.66 and γ2 = γ3 ≈ 0.6. This result is based on 1000 replications. The upper panel shows that the frequency histogram of λ1 compared to its Gaussian limits (dashed lines). The lower panels show that the contour plots of empirical joint density function of λ2 and λ3 (left plot, after centralisation and scaling) and contour plots of their limits (right plot). The empirical joint density function is displayed by using the two-dimensional kernel density estimates. 2.1. Application 1: Power of testing for the independence of two high dimensional normal vectors. Testing for the independence of random vectors is a very classical problem. For two normal random vectors x and y with dimensions p and q respectively, we consider the test H0 : Σxy = 0p×q v.s. H1 : not H0 . Currently, for high dimensional cases, there are three kinds of widely discussed test procedures: (i) Corrected likelihood ratio tests (see [29, 30]); (ii) Trace tests (see [29, 49, 28, 47, 8]); (iii) Largest eigenvalue tests (see [32, 33, 26]). It has been shown by numerical results in [8, 26] that if Σxy is sparse, the corrected likelihood ratio tests and trace tests fail and the largest eigenvalue tests works well. In the following, we propose a statistic based on the CCC of x and y, and show that it is powerful against finite rank case. It is well known that testing for the independence of two high dimensional normal vectors equals to testing their first canonical correlation coefficient being zero or not, i.e., H0 : r1 = 0 v.s. H1 : r1 > 0. Therefore, a natural test statistic is the first eigenvalue λ1 of the sample canonical correlation matrix Cxy . Then according to Section 2.1.1.in [32] and Theorem 2.1 in [26], under the null hypothesis and Assumption 1.1 we have n2/3 (λ1 − d+ ) =⇒ F1 . ξtw (2.1) λ1 > n−2/3 qα ξtw + d+ , (2.2) Therefore, we reject H0 if where qα is the 1 − α quantile of Tracy-Widom distribution F1 . If the sample is under the Assumption 1.2 and r1 > rc , then this test will be able to detect the alternative hypothesis with a power tending to one as the dimension tends to infinity. 9 HIGH-DIMENSIONAL CCA Theorem 2.1 (Power function). Suppose that the assumptions in Theorems 1.10 and 1.12 hold with r1 > rc . Then as n → ∞, the power function of the test procedure (2.2) ! √ √ n(λ1 − γ1 ) n−1/6 qα ξtw n(d+ − γ1 ) → 1. P ower = P > + ξ(r1 ) ξ(r1 ) ξ(r1 ) −1/6 Proof. Under the conditions in Theorems 1.10 and 1.12, for any α, we have n ξ(rq1α)ξtw → 0. From the√conclusion of Theorem 1.8 and r1 > rc , we have limn→∞ (d√+ − γ1 ) < 0, which implies + −γ1 ) 1 −γ1 ) limn→∞ n(d → −∞. In addition, by applying Theorem 1.10, n(λ converges weakly ξ(r1 ) ξ(r1 ) to the distribution of the largest eigenvalue of a symmetric Gaussian random matrix. Therefore, combining the above results, we then complete the proof of Theorem 2.1. 2.2. Application 2: Estimating the number of the population CCC. As a fundamental problems in CCA, the estimation of the number and the values of the population CCC are widely investigated. In this subsection, we first apply our results to determine the number of the outliers of high dimensional population CCC (not counting multiplicity). Actually, due to the threshold √ in our results, we cannot detect the population CCC which are smaller than rc . To the best of our knowledge, there is no effective method in general to successfully detect the population spikes below the threshold when the dimension is large, even for the simpler spike PCA problem. The reason can be find in the recent work [3] for instance. We propose our estimator of the number of the outliers of population CCC k0 by the number of eigenvalues of the sample canonical correlation matrix which are larger than d+ : k̂0 := max{i : λi ≥ d+ + n }, (2.3) √ where n is a sequence of positive number only depending on n and satisfying n n → 0 and n n2/3 → ∞. Then the estimator k̂0 is weakly consistent according to the following theorem. Theorem 2.2 (Weak consistency of k̂0 ). Suppose that the assumptions in Theorems 1.10 and 1.12 hold. As n → ∞, the estimator k̂0 in (2.3) is weakly consistent for the number of the outliers of population CCC k0 , that is P(k̂0 = k0 ) → 1. (2.4) Proof. According to the definition of k̂0 in (2.3), we have that  P(k̂0 = k0 ) =P λk0 ≥ d+ + n , λk0 +1 < d+ + n ≥1 − P(λk0 < d+ + n ) − P(λk0 +1 ≥ d+ + n ). √ By Theorem 1.10 and n n → 0, we obtain that  √ √ P(λk0 < d+ + n ) = P n(λk0 − γk0 ) < n(d+ − γk0 + n ) → 0. (2.5) (2.6) Analogously, from Theorem 1.12 and n n2/3 → ∞, we also have  P(λk0 +1 ≥ d+ + n ) = P n2/3 (λk0 +1 − d+ ) ≥ n2/3 n → 0, which together with (2.5) and (2.6) implies (2.4). Therefore, we complete the proof. √ Remark 2.3. Although in theory, any sequence n which satisfies the conditions n n → 0 and n n2/3 → ∞ is applicable, we have to choose one in practice. Thus, it is worth to notice that the smaller n one chooses, the easier one overestimates k0 and vice versa. In the simulation, based on the idea in the paper [40, 46], we choose n to be log log(n)/n2/3 , which makes our estimator conservative. 10 Z.G. BAO ET AL. In the following, we report a short simulation result to illustrate the performance of our estimator. For comparison, we also show the result of other three estimators in [21] by using the following model selection criteria: AIC, BIC and Cp respectively, which are k̂A = arg min AICj , k̂B = arg min BICj , k̂C = arg min CPj . j∈{0,1,...,q} j∈{0,1,...,q} j∈{0,1,...,q} Here for j ∈ {1, . . . , q}, AICj = −n log q h Y i (1 − λi ) − 2(p − j)(q − j), i=j+1 BICj = −n log q h Y i (1 − λi ) − log(n)(p − j)(q − j), i=j+1 CPj = n q X i=j+1 λi − 2(p − j)(q − j) 1 − λi and AIC0 = BIC0 = CP0 = 0. According to the results in Table 1 and Table 2, we can find that the performance of our estimator is much better than AIC, BIC and Cp estimators when the dimensions are big. If the dimensions are small and the sample size is big enough, then besides our estimator, the AIC and Cp estimators perform well, but BIC estimator performs badly. That coincides with the conclusion in [21], which showed if q is fixed and p/n → c1 > 0 but small, AIC and Cp estimators are weakly consistent but BIC estimator is not. p=10, rc = 0.0071 p=60, rc = 0.0445 p=110, rc = 0.0854 k̂0 k̂A k̂B k̂C k̂0 k̂A k̂B k̂C k̂0 k̂A k̂B k̂C ≤2 0 0 0 0 0 0 375 0 0 0 1000 0 3 0 0 0 0 90 0 625 0 95 0 0 0 4 1000 937 1000 935 1000 846 0 463 905 488 0 0 5 0 63 0 65 0 151 0 465 0 458 0 26 ≥6 0 0 0 0 0 3 0 72 0 54 0 974 p=160, rc = 0.1305 p=210, rc = 0.1809 p=260, rc = 0.2379 ≤2 0 0 1000 0 0 0 1000 0 61 0 1000 0 3 714 0 0 0 27 0 0 0 939 0 0 0 4 286 62 0 0 793 0 0 0 0 0 0 0 5 0 349 0 0 0 1 0 0 0 0 0 0 ≥6 0 589 0 1000 0 999 0 1000 0 1000 0 1000 Table 1 We fix (r1 , r2 , r3 , r4 ) = (0.8, 0.6, 0.4, 0.2), r5 = · · · rq = 0, p/q = 2, n = 1000, and let {p, q} vary. The results are obtained based on 1000 replications with centered normal distributions. The tuning parameter n is chosen to be log log(n)/n2/3 . We present the counting numbers of AIC, BIC, Cp estimators proposed in [21] and our estimator which are equal to the values in the first column. The correct numbers for the estimators are marked bold. Notice that as rc changes along with {p, q}, the true value of k0 are different. 2.3. Application 3: Estimating the values of the population CCC. As a measure to detect the correlation level between two random vectors, the population CCC are also important. Traditionally, one uses the sample CCC to estimate the population ones directly, since under 11 HIGH-DIMENSIONAL CCA p=10, q = 5, n = 100 p=60, q = 30, n = 600 p=110, q = 55, n = 1100 k̂0 k̂A k̂B k̂C k̂0 k̂A k̂B k̂C k̂0 k̂A k̂B k̂C ≤2 44 0 88 0 0 0 1000 0 0 0 1000 0 3 877 65 732 39 186 2 0 0 22 0 0 0 4 79 871 180 876 814 744 0 118 978 559 0 2 5 0 64 0 85 0 238 0 525 0 400 0 51 ≥6 0 0 0 0 0 16 0 357 0 41 0 947 p=160, q = 80, n = 1600 p=210, q = 105, n = 2100 p=260, q = 130, n = 2600 ≤2 0 0 1000 0 0 0 1000 0 0 0 1000 0 3 6 0 0 0 3 0 0 0 0 0 0 0 4 994 426 0 0 1000 289 0 0 1000 188 0 0 5 0 482 0 0 0 547 0 0 0 546 0 0 ≥6 0 92 0 1000 0 164 0 1000 0 266 0 1000 Table 2 We fix (r1 , r2 , r3 , r4 ) = (0.8, 0.6, 0.4, 0.2), r5 = · · · rq = 0, c1 = 0.1, c2 = 0.05, rc = 0.077, k0 = 4, and let {p, q, n} change. The results are obtained based on 1000 replications with centered normal distributions. The tuning parameter n is chosen to be log log(n)/n2/3 . We present the counting numbers of AIC, BIC, Cp estimators proposed in [21] and our estimator which are equal to the values in the first column. The correct numbers are marked bold. the traditional assumption that p, q are fixed and n → ∞, the sample CCC tend to the population ones almost surely (see Chapter 12 in [1]). However, it has been noticed that sample CCC suffer from inflation, which occurs when the number of observations is not sufficient (see [43, 15, 50]). But the good news is that now we can easily explain the reason of the inflation properties of the sample CCC by our Theorem 1.8. In this subsection, we will give an approach to estimate the √ population CCC which are bigger than rc . Solving the equation (1.10) via replacing γi by λi , we have two solutions p 2c1 c2 − c1 − c2 + λi ± (λi − d− )(λi − d+ ) r̂i := . (2.7) 2(c1 c2 − c1 − c2 + 1) Notice that the product of two solutions equals to c1 c2 /[(1 − c1 )(1 − c2 )] = rc2 . Therefore, according to the fact that λi > d+ and r̂i → ri > rc when n → ∞, we should choose a plus sign in (2.7). Hence, the estimator of ri is chosen to be p 2c1 c2 − c1 − c2 + λi + (λi − d− )(λi − d+ ) r̂i := φ(λi ) = , (2.8) 2(c1 c2 − c1 − c2 + 1) Then according to Theorem 1.8, we have the following theorem. Theorem 2.4. almost surely Under the same conditions of Theorem 1.8, for any 1 ≤ i ≤ k0 , we have r̂i → ri . Next, we display a short simulation result in Table 3 and Table 4, which are the sample means and standard deviations (s.d.) of the estimators r̂i . In the simulation, we first estimate k0 by (2.3) with the tuning parameter n = log log(n)/n2/3 , and then for i ≤ k̂0 , we obtain the estimators r̂i by (2.8). According to the results we find that our estimator is excellent, especially when the population CCC are not equal to each other. If the multiplicity of some CCC is bigger 12 Z.G. BAO ET AL. r̂1 r̂2 r̂3 r̂4 mean s.d. mean s.d. mean s.d. mean s.d. p=10, q = 5, n = 100 0.798 0.036 0.588 0.066 0.362 0.072 0.241 0.033 p=60, q = 30, n = 600 0.800 0.016 0.598 0.027 0.392 0.035 0.190 0.029 p=110, q = 55, n = 1100 0.799 0.012 0.599 0.020 0.397 0.025 0.189 0.026 p=160, q = 80, n = 1600 0.800 0.010 0.598 0.017 0.397 0.020 0.191 0.023 p=210, q = 105, n = 2100 0.800 0.008 0.600 0.014 0.397 0.019 0.194 0.020 p=260, q = 130, n = 2600 0.800 0.008 0.599 0.013 0.399 0.017 0.194 0.018 Table 3 We fix (r1 , r2 , r3 , r4 ) = (0.8, 0.6, 0.4, 0.2), r5 = · · · rq = 0, c1 = 0.1, c2 = 0.05, rc = 0.077, k0 = 4, and let {p, q, n} vary. The results are obtained based on 1000 replications with centered normal distributions. The tuning parameter n is chosen to be log log(n)/n2/3 . r̂1 r̂2 r̂3 r̂4 mean s.d. mean s.d. mean s.d. mean s.d. p=10, q = 5, n = 100 0.800 0.037 0.594 0.061 0.409 0.066 0.288 0.051 p=60, q = 30, n = 600 0.799 0.015 0.599 0.027 0.419 0.029 0.356 0.031 p=110, q = 55, n = 1100 0.799 0.011 0.599 0.020 0.417 0.021 0.370 0.021 p=160, q = 80, n = 1600 0.800 0.010 0.600 0.015 0.415 0.018 0.376 0.018 p=210, q = 105, n = 2100 0.800 0.008 0.600 0.014 0.413 0.015 0.381 0.016 p=260, q = 130, n = 2600 0.800 0.007 0.600 0.014 0.412 0.014 0.383 0.015 Table 4 We fix (r1 , r2 , r3 , r4 ) = (0.8, 0.6, 0.4, 0.4), r5 = · · · rq = 0, c1 = 0.1, c2 = 0.05, rc = 0.077, k0 = 4, and let {p, q, n} vary. The results are obtained based on 1000 replications with centered normal distributions. The tuning parameter n is chosen to be log log(n)/n2/3 . 13 HIGH-DIMENSIONAL CCA than one, as the results shown in Table 4, there should be some r̂i ’s close to each other. In this case, although ri = ri+1 for certain multiple population CCC, the estimator r̂i may differ from r̂i+1 by a certain amount since our λi ’s are ordered. Suppose now we can determine ri = ri+1 from the information in the CCA matrix, we may then use the average of r̂i and r̂i+1 to get more precise estimate of both ri and ri+1 . Hence, determining if there are multiple ri ’s would be important for the estimate of ri as well, although sometimes directly using r̂i is sufficient. In the following, we propose a statistic to test the hypothesis: H0 : rj0 −1 > rj0 = rj0 +1 = · · · = rj0 +j1 −1 > rj0 +j1 v.s. H1 : not H0 , (2.9) where j0 ≥ 1, j0 + j1 − 1 ≤ k0 and P r0 = 1. If this test is not rejected, we then estimate j0 +j1 −1 −1 r̂i . Under the null hypothesis in (2.9), using rj0 = rj0 +1 = · · · = rj0 +j1 −1 by j1 i=j0 Theorem 1.10, we know that the j1 -dimensional random vector n √n(λ − γ ) o j j , j ∈ {j0 , . . . , j1 − 1} ξ(rj0 ) converges weakly to the distribution of the ordered eigenvalues of j1 -dimensional symmetric Gaussian random matrix G. Thus we can naturally use the testing statistics √ n(λj0 − λj0 +j1 −1 ) Tn := , ξ(r̂j0 ) where r̂j0 = j1−1 Pj0 +j1 −1 i=j0 r̂i , to test the hypothesis (2.9). We have the following theorem. Theorem 2.5. Suppose that the assumptions in Theorem 1.10 hold. Under the null hypothesis of (2.9), we have for any x ∈ R, G |P(Tn ≤ x) − P(λG 1 − λj1 ≤ x)| → 0, G where λG 1 and λj1 are the largest and smallest eigeivalues of j1 -dimensional symmetric Gaussian random matrix G (defined in Theorem 1.10) respectively. In addition, if the alternative hypothesis H1 is: there exists some j2 ∈ [0, j1 − 2] ∩ Z such that rj0 +j2 and rj0 +j2 +1 are well separated (c.f. Definition 1.9), we have the power function P ower = P(Tn > qα (j1 )) → 1, G where qα (j1 ) is the 1 − α quantile of the distribution λG 1 − λ j1 . This theorem can be easily obtained by using Skorohod strong representation theorem and Theorem 1.10, thus we omit the proof here. For convenient application, under the null hypothesis G the 95% empirical quantile of the distribution λG 1 − λj1 is shown in Table 5 with some different j1 by 108 bootstrap replicates. q5% (j1 ) j1 = 2 3.462 j1 = 3 4.593 j1 = 4 5.459 j1 = 5 6.191 j1 = 6 j1 = 7 j1 = 8 j1 = 9 j1 = 10 6.838 7.424 7.964 8.468 8.942 Table 5 G The 5% empirical quantile of the distribution λG 1 − λj1 with 4 digits. ··· ··· Finally, we give a procedure of estimating the population CCC. The algorithm is shown in Table 6. 14 Z.G. BAO ET AL. Step 1: {λ1 ≥ · · · ≥ λq } = Eigenvalue(Cyx ); Step 2: Test whether r1 = 0. If not reject, then continue; Step 3: k̂0 := max{i : λi ≥ d+ + n }; Step 4: r̂i = φ(λi ), i = 1, . . . , k̂0 ; Step 5: If there exists some {j0 , . . . , j0 + j1 − 1}, √ n(λj0 −λj0 +j1 −1 ) ξ(r̂j0 ) ≤ q5% (j1 ), Pj0 +j1 −1 r̂i . then reset r̂j0 = · · · = r̂j0 +j1 −1 = j1−1 i=j 0 √ Step 6: ρ̂i = r̂i . Table 6 Algorithm for estimating the population CCC. such that 2.4. The limestone grassland community data. To illustrate the application of canonical correlation, we apply our result to a limestone grassland community data which can be obtained from Table A-2 of [24]. This data records eight species (x, p = 8) and six soil variables (y, q = 6) from forty-five (n = 44) 10m × 10m stands in a limestone grassland community in Anglesey, North Wales. This experiment concerns relationships between the abundances of several plant species and associated soil characteristics. More explanations can be found in Chapter 7 of [24]. Notice that although the dimensions p, q and the sample size n are not so “large”, from the simulations (some results are not reported in this manuscript), we can already observe the high-dimensional effect when the dimensions are bigger than 5 and sample sizes are bigger than 20, i.e., the classical estimates are already not reliable. The eigenvalues of Cyx are as follows: λ1 = 0.829, λ2 = 0.520, λ3 = 0.359, λ4 = 0.107, λ5 = 0.094, λ6 = 0.038. 3 = 0.468. Then we use (2.1) to test the hypothesis In addition, we have d+ = 0.533 and ξtw r1 = 0, and obtain the p-value to be 3.71 × 10−5 . Thus we have strong evidence to reject the null hypothesis, which suggests the existence of a linear relationship between x and y. Since there is only one eigenvalue √ of Cyx which is bigger that d+ , we can only determine the existence of the first CCC ρ̂1 = r̂1 = 0.864, which is estimated by (2.8). For the rest CCC, we have no enough evidence to ensure their existence. 3. Preliminaries. In this section, we introduce some basic notions and known technical results escorting our proofs and calculations in the subsequent sections. For any given probability distribution σ(λ), its Stieltjes transform is known as Z 1 sσ (z) := dσ(λ), z ∈ C+ := {ω ∈ C : =ω > 0}. λ−z From the definition, we can immediately get the fact that =sσ (z) > 0 for z ∈ C+ . Actually, the definition of sσ (z) can be extended to the domain C \ supp(σ), by setting sσ (z̄) = sσ (z), where supp(σ) represents the support of σ(λ). Then sσ (z) is holomorphic on C \ supp(σ). In the sequel, we will also need the Stieltjes transform of the MANOVA matrices A(A + B)−1 and A(A + B)−1 , where A ∼ Wp (Ip , q), B ∼ Wp (Ip , n − q), A ∼ Wq (Iq , p), B ∼ Wq (Iq , n − p) From [2], we know that the Stieltjes transform of A(A + B)−1 converges (a.s.) to p z − c1 − c2 − (z − d− )(z − d+ ) 1 − , š(z) := 2c1 z(z − 1) z (3.1) 15 HIGH-DIMENSIONAL CCA and the Stieltjes transform of A(A + B)−1 converges to p z − c1 − c2 − (z − d− )(z − d+ ) 1 − . s̃(z) := 2c2 z(z − 1) z (3.2) Note that s̃(z) is the Stieltjes transform of the distribution given in (1.6), according to the discussions in Section 1.1. Throughout the paper, we will often use the well known large deviation result of the extreme eigenvalues of Wishart matrices. Assume that S ∼ Wn1 (In1 , n2 ) for some n1 := n1 (n) and n2 := n2 (n) satisfying n1 /n → a1 ∈ (0, 1), n2 /n → a2 ∈ (0, 1) as n tends to infinity, and −1 a := a1 /a2 ∈ (0, 1). Denoting λ1 (n−1 2 S) and λn1 (n2 S) the largest and the smallest eigenvalues of n−1 2 S respectively, it is well known that for any given positive number ε > 0, √ √ 2 −1 (1 + a)2 + ε ≥ λ1 (n−1 (3.3) 2 S) ≥ λn1 (n2 S) ≥ (1 − a) − ε holds with overwhelming probability ( see Theorem 2.13 of [14]) 4. Determinant equation. In this section, we derive a determinant equation for the eigenvalues of Cxy which are not in the spectrum of the null case. We will see that the canonical correlation matrix in the finite rank case can be viewed as a finite rank perturbation of that in the null case. As mentioned above, the canonical correlation coefficients are invariant under the block diagonal transformation (xi , yi ) → (Axi , Byi ), for any p × p matrix A and q × q matrix B, as long as both of them are nonsingular. Hence, to study λi , we can start with the following setting     Ip T X 1/2 = Σ V, Σ = , T 0 Iq Y where V is a (p + q) × n matrix with i.i.d. N (0, 1) entries, and √ √ T = diag( r1 , . . . , rk ) ⊕ 0(p−k)×(q−k) , e.g. see Muirhead [38], page 530, formula (7). Apparently, there exists a Gaussian matrix W independent of Y such that     W + TY X . (4.1) = Y Y Here  vec(W ) ∼ N 0, In ⊗ (Ip − T T 0 ) . Hence, W is a p × n matrix with independent entries. More specifically, wij ∼ N (0, 1 − ri ). According to the above definitions, we have Σxx = Ip , Σyy = Iq , Σxy = T, Σyx = T 0 . For brevity, from now on, we use symbols W, X, Y to denote the scaled data matrices, i.e., 1 W := √ W , n 1 X := √ X , n 1 Y := √ Y . n (4.2) Correspondingly, we introduce the notations Sww = W W 0 , Swy = W Y 0 , Syw = Y W 0 , Syy = Y Y 0 . (4.3) 16 Z.G. BAO ET AL. In light of (4.1), we have Sxx = Sww + T Syw + Swy T 0 + T Syy T 0 , Sxy = Swy + T Syy , Syx = Syw + Syy T 0 . (4.4) Hence, due to the assumption that rank(T ) = k, Cxy can be regarded as a finite rank perturbation of Cwy . Note that, with probability 1, the eigenvalues of Cxy are the solutions for λ of the characteristic equation −1 det(D) := det(Sxy Syy Syx − λSxx ) = 0. (4.5) In light of (4.4), it is equivalent to −1 det(Swy Syy Syw − λSww + (1 − λ)(T Syw + Swy T 0 + T Syy T 0 )) = 0. Denote by Py = Y 0 (Y Y 0 )−1 Y. (4.6) Then both Py and In − Py are projections with rank(Py ) = q and rank(In − Py ) = n − q almost surely. Further, we decompose the matrix W and T as follows,     W1 T1 W = , T = , (4.7) W2 0 where W1 (resp. T1 ) is a k × n (resp. k × q) matrix composed by the first k rows of W (resp. T ). Correspondingly, we can introduce the notations like Syw2 = Y W20 , Sw2 w2 = W2 W20 , analogously to (4.3). Applying the decompositions in (4.7), we can rewrite (4.5) in the following form   D11 D12 det(D) = det =0 (4.8) D21 D22 where D11 ≡ D11 (λ) := W1 Py W10 − λW1 W10 + (1 − λ)(T1 Y W10 + W1 Y 0 T10 + T1 Y Y 0 T10 ), D12 ≡ D12 (λ) := W1 Py W20 − λW1 W20 + (1 − λ)T1 Y W20 , D21 ≡ D21 (λ) := W2 Py W10 − λW2 W10 + (1 − λ)W2 Y 0 T10 (4.9) and D22 ≡ D22 (λ) := W2 Py W20 − λW2 W20 = Sw2 w2 (Cw2 y − λ), (4.10) where Cw2 y is defined analogously to (1.2). In case D22 is invertible, we have the equation −1 det(D) = det(D22 ) det(D11 − D12 D22 D21 ) = 0, which implies −1 det(D11 (λ) − D12 (λ)D22 (λ)D21 (λ)) = 0. (4.11) Apparently, the sufficient condition of D22 (λ) being invertible is that λ is not an eigenvalue of Cw2 y . Notice that since k is fixed and W2 is independent of Y , we can apply the results in Theorems 1.3 and 1.5 to the matrix Cw2 y as well. Hence, if we want to investigate the eigenvalues which are not in Spec(Cw2 y ), it suffices to solve (4.11) and find the properties of the limits of its solutions. For brevity, we introduce the notation −1 Mn (z) := D11 (z) − D12 (z)D22 (z)D21 (z) (4.12) 17 HIGH-DIMENSIONAL CCA which is a well defined k × k matrix-valued function for all z ∈ C \ Spec(Cw2 y ). using (4.9), (4.10) and the fact Y Py = Y , we can write Mn (z) = Z1 A (z)Z10 , (4.13) where Z1 = W1 + T1 Y, A (z) = (Py − z) − (Py − z)W20 W2 (Py − z)W20 −1 W2 (Py − z). (4.14) Hereafter, we often use z to represent zI in short when the dimension of the identity matrix is clear. 5. Limits. In this section, we provide the proof of Theorem 1.8 based on several lemmas, whose proofs will be postponed. Our discussion consists of two parts, aimed at (i) and (ii) in Theorem 1.8, respectively: (1) For the outliers, we locate them by deriving the limits of the solutions to the equation (4.11); (2) For the eigenvalues sticking to d+ , we simply use Cauchy’s interlacing property to get the conclusion. • The outliers To locate the outliers, we start with the equation (4.11), i.e., det Mn (z) = 0. Intuitively, if Mn (z) is close to some deterministic matrix-valued function M (z) in certain sense, it is reasonable to expect that the solutions of (4.11) are close to those of the equation det[M (z)] = 0. Such an implication can be explicitly formulated in the location lemma given later, see Lemma 5.2. To state the result, we introduce more notations. Set for any positive constant δ the domain  D ≡ D(δ) := z ∈ C : d+ + δ < <z ≤ 2, |=z| ≤ 1 . (5.1) Define the functions s(z), mi (z) : D → C as follows: p z − c1 − c2 − (z − d− )(z − d+ ) s(z) := . 2(z − 1)   1−z mi (z) := c2 − (1 + c1 )z − (1 − z)s(z) (1 − ri ) + (1 − z) 1 − s(z) ri , c2 (5.2) (5.3) where the square root is specified as the one with positive imaginary part in case z ∈ C+ , and s(z̄) = s(z). It is elementary to see that s(z) and mi (z)’s are all holomorphic on C \ [d− , d+ ] and thus also on D. In addition, from the definition (5.2), s(z) satisfies the following equation (z − 1)s2 (z) + (c1 + c2 − z)s(z) − c1 c2 = 0. (5.4) Recall š(z) and s̃(z) from (3.1) and (3.2). We see that š(z) = 1 1 s(z) − , c1 z z s̃(z) = 1 1 s(z) − . c2 z z (5.5) Further, we define the diagonal matrix  M (z) := diag m1 (z), . . . , mk (z) . Recall δ in the definition of D in (5.1). We introduce the following event n δo Ξ1 ≡ Ξ1 (n, δ) := kCw2 y k ≤ d+ + , 2 (5.6) Note that, Theorem 1.5 tells us that Ξ1 holds with overwhelming probability. Hence, we have k(Cw2 y − z)−1 k = O(1) for all z ∈ D with overwhelming probability. This also implies that, in Ξ1 , Mn (z) is holomorphic on D almost surely. Our main technical task for the limits part is the following lemma. 18 Z.G. BAO ET AL. Lemma 5.1. For any given δ > 0, and any sufficiently small ε > 0, sup sup |(Mn )ij (z) − Mij (z)| ≤ n−ε z∈D i,j=1,...,k holds almost surely. The proof of Lemma 5.1 will be postponed to Section 8. The following location lemma is a direct consequence of Lemma 5.1. At first, we remark here, it will be clear that the solutions of the equation det(M (z)) = 0 can only be real. Lemma 5.2 (The location lemma). For any given and sufficiently small δ > 0, let z1 > · · · > zκ be the solutions in (d+ + δ, 1) of the equation det(M (z)) = 0, with multiplicities n1 , . . . , nκ respectively. Then for any fixed η > 0 and each i ∈ {1, . . . , κ}, almost surely, Pκi there exists zn,i,1 > · · · > zn,i,κi with multiplicities mi,1 , . . . , mi,κi respectively, satisfying j=1 mi,j = ni , such that sup |zn,i,j − zi | ≤ η, (5.7) j=1...,κi and ∪si=1 {zn,i,j , j = 1, . . . , κi } is the collection of all solutions (multiplicities counted) of the equation det Mn (z) = 0 in (d+ + δ, 1). Proof of Lemma 5.2 with Lemma 5.1 granted. At first, as mentioned above, in Ξ1 , Mn (z) is holomorphic on D. Moreover, according to (3.3), both Y and W are bounded by some constant in operator norm with overwhelming probability. In addition, we know that Ξ1 holds with overwhelming probability. Hence, according to the definition of Mn (z) in (4.12), one sees that kMn (z)k is bounded uniformly on D with overwhelming probability. Therefore, the entries of Mn (z) are all bounded in magnitude with overwhelming probability as well. In addition, it is clear that M (z) is holomorphic and its entries are also bounded in magnitude on D. Hence, Lemma 5.1 implies that almost surely, sup det(Mn (z)) − det(M (z)) ≤ n−ε , z∈D taking into account the fact that the determinant is a multivariate polynomial of the matrix entries. It is obvious that det[Mn (z)] only has real roots since the equation (4.5) does. Then by Rouche’s theorem, we can immediately get (5.7). Now, with the aid of Lemma 5.2, we prove (i) of Theorem 1.8. Proof of (i) of Theorem 1.8. According to Lemma 5.2, it suffices to solve det(M (z)) = 0 in (d+ + δ, 1] to get zi , for sufficiently small δ > 0. By the definition of M (z), we shall solve the equation mi (z) = 0. (5.8) It will be clear that there is a unique simple solution for the above equation. We denote it by γi in the sequel. First, if ri = 1, we get from the definition (5.3) that   1 − γi mi (γi ) = (1 − γi ) 1 − s(γi ) = 0. c2 It is elementary to check that the only solution is γi = 1. If ri < 1, we introduce the shorthand notation ri . (5.9) ti = 1 − ri HIGH-DIMENSIONAL CCA 19 According to the definition in (5.3), we see that (5.8) is equivalent to q γi2 + 2(2c1 c2 − c1 − c2 )γi + (c1 − c2 )2 (c2 − ti γi + ti ) = ti γi2 + (ti (c2 − c1 − 1) + c2 − 2c1 c2 )γi + (c1 − c2 )ti + c1 c2 − c22 . (5.10) Notice that if γi ∈ (d+ , 1], we have γi2 + 2(2c1 c2 − c1 − c2 )γi + (c1 − c2 )2 = (γi − d− )(γi − d+ ) > 0 and c2 − ti γi + ti > 0. Thus under the restriction that ti γi2 + (ti (c2 − c1 − 1) + c2 − 2c1 c2 )γi + (c1 − c2 )ti + c1 c2 − c22 ≥ 0, (5.11) solving (5.10), we get γi = −1 (1 + t−1 i c1 )(1 + ti c2 ) = ri (1 − c1 + c1 ri−1 )(1 − c2 + c2 ri−1 ). −1 1 + ti Applying (5.9) and (5.12), it is elementary to check that (5.11) is equivalent to r c1 c2 . ri ≥ rc = (1 − c1 )(1 − c2 ) (5.12) (5.13) Note that γi = c1 (1 − c2 ) + c2 (1 − c1 ) + ri (1 − c1 )(1 − c2 ) + ri−1 c1 c2 p ≥ c1 (1 − c2 ) + c2 (1 − c1 ) + 2 c1 c2 (1 − c1 )(1 − c2 ) = d+ (5.14) Moreover, equality holds in the second step of (5.14) only if ri = rc . Hence, (5.8) has solution in (d+ , ∞) only if ri > rc , with the solution γi given by (5.12). Now, what remains is to check γi < 1. It again follows from (5.13) by elementary calculation. Then by (5.7) in Lemma 5.1, we get that a.s. λi − γi −→ 0, for i = 1, . . . , k0 . Hence, we conclude the proof of (i) of Theorem 1.8. Now, we proceed to the proof of (ii) . • The Sticking eigenvalues Proof of (ii) of Theorem 1.8. At first, according to the proof of (i) of Theorem 1.8, we see that with overwhelming probability, there are exactly k0 largest eigenvalues (multiplicities counted) of Cxy in the interval (d+ + δ, 1], for any sufficiently small δ > 0. Hence, we see that lim supn→∞ λi ≤ d+ + δ for all i ≥ k0 + 1 almost surely. Moreover, by the Cauchy’s interlacing property and (1.8), we always have lim inf n→∞ λi ≥ d+ − δ almost surely for any fixed i. Since a.s. δ can be arbitrarily small, we get the conclusion that λi − d+ −→ 0 for any fixed i ≥ k0 + 1. Hence, we complete the proof. 20 Z.G. BAO ET AL. 6. Fluctuations of the outliers. For the fluctuations of the outliers, we first derive a CLT for the entries of Mn , which together with (4.11) will imply a CLT for the outliers. Recall from Lemma 5.2 the notations n1 , . . . , nκ as the multiplicities of the solutions of det[M (z)] = 0. Set Jl = l−1 nX ni + 1, . . . , i=1 l X o ni . i=1 √ We derive the central limit theorem for the nl -packed sample eigenvalues { n(λj − γj ), j ∈ Jl }. Note that γj ’s are all the same for j ∈ Jl , and they are l-th largest solution of equation det[M (z)] = 0 with multiplicity nl . Actually, from Lemma 5.1 and Lemma 5.2, for j ∈ Jl , it would not be difficult to conclude that for any sufficiently small ε > 0, (Mn )αβ (λj ) − Mαβ (γj ) ≤ n−ε sup (6.1) 1≤α,β≤k almost surely. However, for Theorem 1.10, we need to take a step further to consider the fluctuation of the difference in (6.1). We split the task into three steps, and the results are collected in Lemmas 6.1-6.3. The first lemma is to expand Mn (λj ) around Mn (γj ). Recall the notations ϑ, $ defined in (1.14). Lemma 6.1. Suppose that the assumptions in Theorem 1.10 hold. Especially, j ∈ {1, . . . , k0 } such that rj is well separated from rc and 1. As n → ∞, we have  √ √ n[Mn (λj ) − Mn (γj )] = − n(λj − γj ) ∆ + op (1) , where ∆ is a diagonal matrix defined as ∆= (1 − c1 )ϑrj2 + c21 c2 ϑrj2 − $ Ik − T1 T10  + (1 − c1 )ϑrj3 + c1 (3c1 c2 − c1 − 2c2 + 1)rj − 2c21 c2 rj (ϑrj2 − $) T1 T10 , and op (1) represents a generic k × k matrix with negligible (in probability) entries. Recall A (z) defined in (4.14). We further introduce the following matrices M1 ≡ M1 (z) := W1 A (z)W10 , M2 ≡ M2 (z) := T1 Y A (z)W10 , M3 ≡ M3 (z) := T1 Y A (z)Y 0 T10 . (6.2) According to the definitions in (4.12), (4.9) and (4.10), it is easy to check that Mn (z) = M1 + M2 + M20 + M3 . (6.3) Y = Uy Λy Vy . (6.4) We denote the SVD of Y by It is well known that Uy and Vy are Haar distributed, and Uy , Λy , Vy are mutually independent (see (3.9) of [16] for instance). Then we see that Py = Vy0 Λ0y Λy Λ0y −1 Λy Vy . (6.5) is independent of Uy . With the above notations, we introduce B ≡ B(z) := Λy Vy A (z), D ≡ D(z) := Λy Vy A (z)Vy0 Λ0y . (6.6) 21 HIGH-DIMENSIONAL CCA Therefore, we can write M1 = W1 A W10 , M2 = T1 Uy BW10 , M3 = T1 Uy DUy0 T10 . (6.7) Set M(γj ) :=  1 1 tr A (γj ) · Ik − T1 T10 + tr D(γj ) · T1 T10 n q The next lemma depicts the fluctuation of Mn (γj ) around M(γj ). Lemma 6.2. Suppose that the assumptions in Theorem 1.10 hold. For any j ∈ {1, . . . , k0 } such that rj is well separated from rc and 1, we have that  √  n Mn (γj ) − M(γj ) converges weakly to a k × k symmetric Gaussian matrix R with independent (up to symmetry) mean zero entries and the variance of Rαβ is 2 2  1 + δαβ  (1 − c1 )rj + c1 ϑrj − $ (1 − c2 )rj2 + c2 (1 − rα )(1 − rβ ) 2 2 rj (ϑrj − $) 2 2 + (1 − c2 ) (1 − c1 )rj + c1 (1 − rj )2 ϑrj − $ (rα (1 − rβ ) + rβ (1 − rα ))  2 2  + (1 − c1 )rj + c1 ϑrj − $ (1 − c2 )rj2 + 2c1 (1 − c2 )rj + c1 (1 − 2c2 ) rα rβ . (6.8) Finally, we claim that the difference between M(γj ) and M (γj ) is of order op ( √1n ). Lemma 6.3. Suppose that the assumptions in Theorem 1.10 hold. For any j ∈ {1, . . . , k0 } such that rj is well separated from rc and 1, we have that  √ n M(γj ) − M (γj ) = op (1), where op (1) represents a generic k × k matrix with negligible (in probability) entries. The proofs of Lemmas 6.1-6.3 will be postponed to Section 9. With the aid of these lemmas, we can now prove Theorem 1.10. Proof of Theorem 1.10. Note that det Mn (λj ) = 0, and M (γj ) is a diagonal matrix with diagonal elements mi (γj ), i = 1, . . . , k (c.f. (5.3)). In addition, for any l = 1, . . . , l0 , mi (γj ) is zero if i ∈ Jl and nonzero otherwise. Therefore by Lemmas 6.1-6.3, the definition of T1 and Skorohod strong representation theorem, we conclude that there exists a random matrix R defined in Lemma 6.2, such that for any j, α, β ∈ Jl ,  √  √ n (Mn )αβ (λj ) − Mαβ (γj ) = −δαβ ∆jj n(λj − γj )(1 + op (1)) + Rαβ + op (1). (6.9) (l) (l) Let N (l) be a k × k diagnoal matrix with Njj = n1/4 if j ∈ Jl and Njj = 1 otherwise. Apparently we have det[N (l) ] = nnl /4 6= 0. Combining Theorem 1.8 with Lemmas 6.1-6.3, we conclude that  √ N (l) Mn (λj )N (l) = M (γj ) + n(Mn )αβ (λj )1(j, α, β ∈ Jl ) k×k + op (1). Notice that M (γj ) is a diagonal matrix with Jl diagonal elements being zeros and  √ n(Mn )αβ (λj )1(j, α, β ∈ Jl ) k×k 22 Z.G. BAO ET AL. is a null matrix except the Jl × Jl block. According to det(N (l) Mn (λj )N (l) ) = 0 and (6.9), we obtain that   √ (6.10) n(λj − γj )(Inl + op (1)) + R(Jl × Jl )/∆(j, j) = 0, det − lim n→∞ √ where R(Jl × Jl ) represents the Jl × Jl block of R. From (6.10), we see that limn→∞ n(λj − γj ) is the eigenvalue of R(Jl × Jl )/∆jj . Since the eigenvalues of Cyx are simple almost surely, we √ see that the nl random variables { n(λj − γj ), j ∈ Jl } converge in probability to the set of eigenvalues of the matrix R(Jl × Jl )/∆jj . The variance in (1.11) can be obtained from the definition of ∆ in Lemma 6.1, and also (6.8). Therefore, we complete the proof of Theorem 1.10. 7. Fluctuations of the sticking eigenvalues. In this section, we prove Theorem 1.12. When k = 1, the main idea is to compare the eigenvalues of Cxy with those of Cw2 y directly. Then we use the Tracy-Widom law for the largest eigenvalues of Cw2 y to conclude the fluctuation of the sticking eigenvalues of Cxy . For more general k, we use the argument for the case k = 1 recursively. Our proof strategy is inspired by the work [10]. e1 ≥ λ e2 ≥ · · · ≥ λ eq the ordered For the comparison, throughout this section, we denote by λ eigenvalues of Cyw2 , while use λ1 ≥ λ2 ≥ · · · ≥ λq to denote the ordered eigenvalues of Cyx as before. Our aim is to show the following proposition. Proposition 7.1. Suppose that the assumptions in Theorem 1.12 holds. Then for any small positive constant ε and any fixed integer i ≥ 1, the following holds in probability ei | ≤ n−1+ε . |λk0 +i − λ (7.1) With the aid of Proposition 7.1, we can prove Theorem 1.12 below. Proof of Theorem 1.12. Let X̂ := W + T Ŷ , (7.2) where Ŷ is a i.i.d. copy of Y and Ŷ is independent of Y . Denote by Cyx̂ via replacing X by X̂ in Cyx . Then Cyx is a CCA matrix in the null case. We first compare the eigenvalues of ei . Applying Proposition 7.1 to the case Cyx̂ , denoted by λ̊i ’s, with the eigenvalues of Cyw2 , i.e., λ e r1 = · · · = rk = 0, we can get max1≤i≤m |λ̊i − λi | ≤ n−1+ε in probability. This together with (7.1) implies (1.12). This together with Remark 1.13 completes the proof of Theorem 1.12. To prove Proposition 7.1. We will need the following lemmas. Lemma 7.2. For any i = 0, . . . , q, and j = 1, . . . , k, the diagonal entry (Mn )jj (z) is a ei+1 , λ ei ), where λ e0 = ∞ and λ eq+1 = −∞. decreasing function in z ∈ (λ Proof. Recall (4.13) and (4.14). It is elementary to check that ∂A (z) = −Q(z)(Q(z))T , ∂z where Q(z) := I + (Py − z)W20 W2 (Py − z)W20 −1 W2 HIGH-DIMENSIONAL CCA Note that, as long as z 6∈ Spec(Cw2 y ), Hence, ∂A (z) ∂z 23 is a well-defined negative semi-definite matrix.  ∂A (z)  ∂ ≤0 (Mn )jj (z) = Z1 Z10 ∂z ∂z jj ei+1 , λ ei ) for any i = 0, . . . , q, which means that (Mn )jj (z) is decreasing. in the interval (λ Let m ≥ 1 be any fixed integer. For any small constants ε, δ > 0, we introduce the following random domain n o e1 + n−1+ε , d+ + δ) ∪ ∪m (λ ei+1 + n−1+ε , λ ei − n−1+ε ) Ω ≡ Ω(m, ε, δ) := (λ (7.3) i=1 We also need the following lemma. Lemma 7.3. With the above notations, we have the following: (i): If i 6= j, for any small ε, δ > 0, there exists some positive constant c > 0, such that sup |(Mn )ij (z)| ≤ n−c z∈Ω holds with overwhelming probability. (ii): For any small ε > 0 and any small ε0 > 0, there exists a sufficiently small δ, such that sup |(Mn )ii (z) − mi (d+ )| ≤ ε0 z∈Ω holds with overwhelming probability. The proof of Lemma 7.3 is postponed to Appendix B. In the sequel, we first show the proof of Proposition 7.1 in the case of k = 1. At the end of this section, we will extend the discussion to general k case. Note that when k = 1, We have k0 = 1 or k0 = 0, which means r1 > rc or r1 < rc , respectively. We restate Proposition 7.1 for k = 1 in the following proposition. Proposition 7.4. Suppose that k = 1. We have the following (i): If r1 > rc , then for any fixed integer m ≥ 1, and any ε > 0, we have em | ≤ n−1+ε |λm+1 − λ in probability. (ii): If r1 < rc , then for any fixed integer m ≥ 1, and any ε > 0, we have em | ≤ n−1+ε |λm − λ in probability. With Lemma 7.2 and Lemma 7.3, we prove Proposition 7.4. Proof of Proposition 7.4. Since k = 1, we have det Mn = Mn (z) = M11 (z). Applying Lemma 7.3 with k = 1, we see that for any small ε0 , there is a sufficiently small δ > 0 such that sup | det Mn (z) − m1 (d+ )| ≤ ε0 (7.4) z∈Ω with overwhelming probability. Since we assume that r1 is well separated from rc , it is easy to check from the definition (5.3) that |m1 (d+ )| ≥ c for some positive constant c. Hence, choosing 24 Z.G. BAO ET AL. ε0 in (7.4) sufficiently small, we see that | det Mn (z)| = 6 0 uniformly on Ω, with overwhelming probability. That means, with overwhelming probability, there is no eigenvalue of Cxy in Ω. Let wi , i = 1, . . . , p be the rows of W . Note that, in case of k = 1, we have w1 = W1 . Moreover, Pw is the projection onto the subspace spanned by {w1 + T1 Y, w2 , · · · , wp }, and Pw2 is the projection onto the subspace spanned by {w2 , · · · , wp }. Then, by Cauchy interlacing, we know that Spec(Pw Py Pw ) and Spec(Pw2 Py Pw2 ) are interlacing. This implies that e 1 ≥ λ2 ≥ · · · ≥ λ eq−1 ≥ λq ≥ λ eq , λ1 ≥ λ (7.5) since the nonzero eigenvalues of Cwy (resp. Cw2 y ) are the same as those of Pw Py Pw (resp. Pw2 Py Pw2 ). In case (i): r1 > rc , from Theorem 1.8 we know that λ1 → γ1 > d+ + δ almost surely, for any sufficiently small δ > 0. Since λi ’s are solutions to det Mn (z) = 0, and m1 (d+ ) 6= 0, we see from (7.4) and (7.5) that ei+1 , λ ei+1 + n−1+ε ] ∪ [λ ei − n−1+ε , λ ei ], λ i ∈ [λ i = 2, . . . , m. in probability. In case (ii): r1 < rc , from Theorem 1.8 we know that λ1 → d+ in probability. Hence, we have e1 , λ e1 + n−1+ε ], λ1 ∈ [λ ei+1 , λ ei+1 + n−1+ε ] ∪ [λ ei − n−1+ε , λ ei ], λi ∈ [λ i = 2, . . . , m. Therefore, to prove Proposition 7.4, it suffices to check that for all i = 2, · · · , m, λi is in ei+1 , λ ei+1 + n−1+ε ] or [λ ei − n−1+ε , λ ei ]. Note that det Mn (z) = (Mn )11 (z) is decreasing in the in[λ + −c1 −c2 e e terval (λi+1 , λi ), according to Lemma 7.2. Furthermore, since s(d+ ) = d2(d , it is elementary + −1) to check mj (d+ ) > 0, if rj > rc , mj (d+ ) < 0, if rj < rc . ei+1 + n−1+ε , λ ei − n−1+ε ). Therefore, if r1 > rc , according to (7.4), we have det Mn (z) > 0 on (λ By the monotonicity of det Mn (z), we see that det Mn (z) = 0 can only be achieved if z ∈ ei − n−1+ε , λ ei ]. Hence, in case of r1 > rc , we have λi ∈ [λ ei − n−1+ε , λ ei ] for all i = 2, . . . , m. In [λ −1+ε e e contrast, when r1 < rc , we have λi ∈ [λi+1 , λi+1 + n ] for all i = 2, . . . , m. This concludes the proof of Proposition 7.4. Now, we prove Proposition 7.1. Proof of Proposition 7.1. For general k, we need more notations. For 1 ≤ a ≤ k, let     w1 t1     .. W1a :=  ...  , T1a :=  . 0  wa ta be the a × n matrices composed of the first a rows of W and T , respectively, and we write     W1a T1a W = , T = . W2a T2a We take the above as the definitions of W2a and T2a . Further, we denote Xa := W2a + T2a Y. 25 HIGH-DIMENSIONAL CCA Denote the eigenvalues of Cxa y by λ1,a ≥ λ2,a ≥ · · · (7.6) ei = λi,k and λi = λi,0 . Our aim is compare Especially, with the above notations, we have λ λi,a−1 ’s with λi,a ’s. First of all, by Cauchy interlacing, we have λi−1,a ≥ λi,a−1 ≥ λi,a . (7.7) Further, if λi,a−1 6∈ Spec(Cxa y ), then λi,a−1 is a solution to the equation za−1 Pa z0a−1 = 0, (7.8) where za−1 := wa−1 + ta−1 ya−1 , and Pa (z) := (Py − z) − (Py − z)Xa0 (Xa (Py − z)Xa0 )−1 Xa (Py − z). We start with the case a = k − 1 and compare λi,a−1 ’s with λi,a ’s. This is equivalent to discuss the case k = 2. Hence, we can set k = 2 and a = 1. We recall the decomposition of D in (4.8). By Schur complement, we have D −1  = D11 D12 D21 D22 −1  = (Mn )−1 ∗ ∗ ∗  , (7.9) where ∗’s represent other blocks, whose explicit expressions are irrelevant to us. Observe that Mn (c.f. (4.12)) is 2×2 by the assumption k = 2. On the other hand, using a different decomposition, we can also get by Schur complement that D−1 =  z1 (Py − z)z01 z1 (Py − z)X2 X20 (Py − z)z01 X2 (Py − z)X20 −1  = (z1 P2 z01 )−1 ∗ ∗ ∗  . (7.10) From (7.9) and (7.10), we obtain z1 P2 z01 = 1 . (Mn−1 )11 (7.11) Then, we first consider the eigenvalues of Cx1 y , which is a perturbation of Cw2 y . Recall the notations introduced in (7.6). Using Proposition 7.4, we see that the following statements hold in probability: (i): If r2 > rc , we have for any fixed integer m ≥ 0 em | ≤ n−1+ε . |λm+1,1 − λ (7.12) (ii): If r2 < rc , we have for any fixed integer m ≥ 0, em | ≤ n−1+ε . |λm,1 − λ (7.13) According to the assumption r1 ≥ r2 , it suffices to consider the following three cases: (i)0 : r1 ≥ r2 > rc , (ii)0 : r1 > rc > r2 , (iii)0 : rc > r1 > r2 . 26 Z.G. BAO ET AL. First, we consider case (i)’. Applying Theorem 1.8, we see that λ1,0 → γ1 , λ2,0 → γ2 , λm,0 → d+ almost surely. Recall Cauchy interlacing formula (7.7). We see that λm,1 ≥ λm+1,0 ≥ λm+1,1 . We first show em + n−1+ε , λ em−1 − n−1+ε ) λm+1,0 6∈ (λ (7.14) in probability. Then according to (7.12), we have λm+1,0 6∈ (λm+1,1 + 2n−1+ε , λm,1 − 2n−1+ε ) (7.15) in probability. To see (7.14), we use (7.11), which together with Lemma 7.3 implies sup |z1 P2 (z)z01 − m1 (d+ )| ≤ ε0 . z∈Ω Hence, (7.14) and (7.15) follow. Further, similarly to Lemma 7.2, we can show that z1 P2 (z)z01 is decreasing in (λm,1 , λm+1,1 ). Then, by the sign of m1 (d+ ) and the fact that λi,0 is the solution to the equation z1 P2 (z)z01 = 0, we see that |λm+1,0 − λm,1 | ≤ 2n−1+ε (7.16) in probability. This together with (7.12) further implies that em−1 | ≤ 3n−1+ε . |λm+1,0 − λ (7.17) Then we get the conclusion for case (i)’, by slightly modifying ε. For case (ii)’, it suffices to go em−1 , λ em ) replaced by (λ em , λ em+1 ) in (7.14) and (7.18). For through the above discussion, with (λ e e e e case (iii)’, we first need replace (λm−1 , λm ) by (λm , λm+1 ) in (7.14) and (7.18). Then, instead of (7.16), we have |λm+1,0 − λm+1,1 | ≤ 2n−1+ε since the sign of m1 (d+ ) changed. This together with (7.13) further implies that em+1 | ≤ 3n−1+ε . |λm+1,0 − λ (7.18) The above discussion on the case k = 2 simply gives the result for λi,k−1 for general k. Then, we apply the above argument again to compare λi,k−3 ’s with λi,k−2 ’s. This is equivalent to consider the eigenvalues of Cxy with k = 3. Using the argument recursively, we can finally get the result for λi ’s for general k. This concludes the proof. 8. Proof of Lemma 5.1. To ease the presentation, we introduce the following notations −1 Φ ≡ Φ(z) := D22 (z) = (W2 (Py − z)W20 )−1 , Υ ≡ Υ(z) := (Y (Pw2 − z)Y 0 )−1 , (8.1) Observe that rank(Pw2 ) = p − k and rank(Py ) = q almost surely. For any m × ` rectangle matrix A, using SVD, it is easy to check the identity A(A0 A − zI` )−1 A0 = AA0 (AA0 − zIm )−1 = Im + z(AA0 − zIm )−1 . (8.2) 27 HIGH-DIMENSIONAL CCA Moreover, we can write 1 1 − ew y − z)−1 Sw−22w2 , Φ(z) = Sw22w2 (C 2 (8.3) where we introduced the symmetric matrix 1 1 ew y := Sw−22w2 Sw y S −1 Syw Sw−22w2 . C yy 2 2 2 (8.4) Using (8.3) and (8.2), it is not difficult to check −1/2 1/2 1/2 −1/2 = Iq + zSyy ΥSyy , Syy Syw2 ΦSw2 y Syy (8.5) from which we immediately get Syw2 ΦSw2 y = Syy + zSyy ΥSyy . (8.6) Further, we introduce the following notations for Wishart matrices E := W2 Py W20 , E := Y Pw2 Y 0 , H := W2 (I − Py )W20 , H := Y (I − Pw2 )Y 0 . (8.7) By Cochran’s Theorem, we know that E and H are independent, so are E and H. In addition, in light of (4.2), we have nE ∼ Wp−k (Ip−k , q), nE ∼ Wq (Iq , p − k), nH ∼ Wp−k (Ip−k , n − q), nH ∼ Wq (Iq , n − p + k). (8.8) Observe that Sw2 w2 = E + H, Syy = E + H, −1 −1 Cw2 y = E + H E, Cyw2 = E + H E, (8.9) where Cw2 y and Cyw2 are defined analogously to (1.2). From (8.9), we can also write −1 Φ(z) = ((1 − z)E − zH)−1 Υ(z) = (1 − z)E − zH . (8.10) Therefore, we have Syy ΥSyy = (E + H) (1 − z)E − zH −1 (E + H) = (1 − z)−1 E − z −1 H + (z(1 − z))−1 (1 − z)H−1 − zE −1 −1 (8.11) Following from (8.6) and (8.11) we obtain (1 − z)Syw2 ΦSw2 y = E + (1 − z)H−1 − zE −1 −1 . (8.12) In the sequel, we use the notation Ψ ≡ Ψn (z) := (1 − z)H−1 − zE −1 −1 . (8.13) Then, we can write (1 − z)Syw2 ΦSw2 y = E + Ψ. (8.14) Recall the SVD in (6.4). Note that W1 , W2 , Uy , Λy , Vy are mutually independent. According to the definitions of A , B, D in (4.14) and (6.6) the, definition of Φ in (8.1), and (6.5), we see that  W1 , Uy is independent of A , B, D. Hence, we can condition on W2 , Λy , Vy and thus condition on A , B, D and use the randomness of W1 , Uy in the sequel. Our first step is to use a k ×q Gaussian matrix to approximate T1 Uy . For simplicity, we denote √ √ T := diag( r1 , . . . , rk ). Apparently, T 2 = T1 T10 . More specifically, we claim the following lemma. 28 Z.G. BAO ET AL. Lemma 8.1. With the above notations, there exists a k × q Gaussian matrix G1 with i.i.d. N (0, 1q ) entries, such that for any sufficiently large K > 0, M2 = T G1 BW10 + O( (log n)K ), n  1 (log n)K M3 = T G1 DG01 T − tr D · T G1 G01 − I T + O( ), q n (8.15) K hold uniformly in z ∈ D, with overwhelming probability. Here O( (lognn) ) represents a generic K k × k random matrix with all entries of order O( (lognn) ). The proof of Lemma 8.1 will be postponed to Appendix. In the sequel, we condition on A , B, D, and use the randomness of W1 and G1 only. First, we introduce the following wellknown large deviation inequalities for Gaussian which will be frequently used in the sequel. Lemma 8.2. Assume that x, y ∈ Rn are two i.i.d. N (0, n−1 In ) vectors. Let A ∈ Cn×n and b ∈ Rn be independent of x and y. The following three statements hold with overwhelming probability for any sufficiently large constant K > 0: 1 (log n)K tr A ≤ kAkHS , n n (log n)K (iii) : |x0 b| ≤ √ kbk2 . n (i) : x0 Ax − (ii) : |x0 Ay| ≤ (log n)K kAkHS , n With the aid of Lemma 8.2, we can derive the following. Lemma 8.3. For any given δ > 0 in the definition of D (c.f. (5.1)), and any sufficiently large constant K > 0, the following inequalities hold uniformly on D, with overwhelming probability,   (log n)K 1 ≤ √ sup (M1 )ij − δij (1 − ri ) c2 − (1 + c1 )z − (1 − z) tr EΦ , n n i,j sup (M2 )ij ≤ i,j (log n)K √ , n 1 (log n)K sup (M3 )ij − δij ri (1 − z) tr (H − Ψ) ≤ √ . q n i,j (8.16) For simplicity, we denote by wi = (wi1 , . . . , win ) and bi := (bi1 , . . . , biq ) the i-th rows of W1 and G1 , respectively. Proof of Lemma 8.3. In light of the definitions in (8.7) and (4.14), and also (8.10), it is elementary to check that  1 q 1 tr A = − z − tr Φ((1 − z)2 E + z 2 H) n n n  q p 1 = − z − z − (1 − z) tr EΦ . n n n (8.17) In addition, using the fact that kW2 k ≤ C with overwhelming probability (c.f. (3.3)), it is not difficult to see that for all z ∈ D,  kA k2HS ≤ Cn + kΦk2 . (8.18) with overwhelming probability. In addition, we have kΦk ≤ k(Cw2 y − z)−1 kkSw−12 w2 k = O(1) (8.19) HIGH-DIMENSIONAL CCA 29 with overwhelming probability, where we used the fact that the event Ξ1 holds with overwhelming √ probability, and also (3.3). Hence, kA kHS ≤ C n holds with overwhelming probability on D. Then, conditioning on the matrix A and use the randomness of wi ’s only, the first statement in (8.16) follows from Lemma 8.2 (i), (ii) immediately. For the second estimate in (8.16), we condition on B, and use the randomness of wi ’s and bi ’s. Then the conclusion follows from Lemma 8.2 (ii) and the fact that √ kBkHS ≤ C n (8.20) holds uniformly on D, with overwhelming probability. To see (8.20), we recall the definition of B from (6.6). Similarly to (8.18),  kBk2HS ≤ Cn 1 + kΦk2 . Using (8.19) again, we see that (8.20) holds. For the third estimate, we use the randomness of bi ’s and condition on the D. Then the conclusion again follows from Lemma 8.2 (i), (ii), the fact  1−z 1 1−z  tr D = tr Syy − (1 − z)Syw2 ΦSw2 y = tr (H − Ψ) (8.21) q q q and the fact that √ kDkHS ≤ C n (8.22) holds with overwhelming probability. The proof of (8.22) is similar to that of (8.20). We thus omit the details. This completes the proof of Lemma 8.3. Recall s(z) in (5.2). For brevity, we further introduce the following function 1−z s(z) − c1 . (8.23) c2 Hence, what remains is to estimate the normalized traces of EΦ, H and Ψ. We collect the results in the following lemma, whose proof will be postponed to Appendix A. %(z) := Lemma 8.4. For any given z ∈ D, we have the following estimates: 1 n−p 1 1 1 tr H = + op ( √ ), tr EΦ(z) = s(z) + op ( √ ), q n n n n 1 1 tr Ψ(z) = %(z) + op ( √ ). q n (8.24) Further, for any sufficiently small constant ε > 0, we have the uniform estimate 1 1 sup tr EΦ(z) − s(z) = Oa.s. (n−ε ), sup tr Ψ(z) − %(z) = Oa.s. (n−ε ). z∈D n z∈D q With the aid of Lemmas 8.3 and 8.4, we can now prove Lemma 5.1. Proof of Lemma 5.1. According to the decomposition in (6.3), we see from Lemmas 8.3 and 8.4 that (Mn )ij (z) = (M1 )ij (z) + (M2 )ij (z) + (M2 )ji (z) + (M3 )ij (z)    = δij c2 − (1 + c1 )z − (1 − z)s(z) (1 − ri ) + (1 − z)(1 − c1 − %(z))ri + Oa.s. (n−ε ) = δij mi (z) + Oa.s. (n−ε ) uniformly in z ∈ D and i, j. Here in the last step we used the definitions in (5.3) and (8.23). This completes the proof of Lemma 5.1. 30 Z.G. BAO ET AL. 9. Proofs of Lemma 6.1-6.3. In this section we prove Lemmas 6.1-6.3. First, from (1.7), (1.10) and (1.14), it is easy to check q ϑrj2 − $ (γj − d− )(γj − d+ ) = . rj This further implies s(γj ) = − $ , ϑrj − $ s0 (γj ) = $ϑrj2 2 . ϑrj − $ ϑrj2 − $ (9.1) Moreover, we need the following lemma whose proof is postponed to Appendix A. Lemma 9.1. Suppose that the assumptions in Theorem 1.10 hold. For any j ∈ {1, . . . , k0 } such that rj is well separated from rc and 1, we have the following estimates −c1 + (1 − γj )s(γj ) 1 + op (1), tr HΦ(γj ) = n γj γj (1 − γj )2 s0 (γj ) + (γj2 − 1)s(γj ) + c1 1 tr (HΦ(γj )HΦ(γj )) = + op (1), n γj2 1 tr (EΦ(γj )HΦ(γj )) = (1 − γj )s0 (γj ) − s(γj ) + op (1), n 1 tr (EΦ(γj )EΦ(γj )) = γj s0 (γj ) + s(γj ) + op (1). n Then, recall the definitions of E and H in (8.7), Ψ in (8.13). We have the following lemma whose proof is also postponed to Appendix A. Lemma 9.2. Suppose that the assumptions in Theorem 1.10 hold. For any j ∈ {1, . . . , k0 } such that rj is well separated from rc and 1, we have the following results: sup Ψαβ (γj ) − δαβ %(γj ) = op (1), α,β  sup Ψ(γj )(H−1 + E −1 )Ψ(γj ) αβ − δαβ %0 (γj ) = op (1). α,β 9.1. Proof of Lemma 6.1. Recall the decomposition of Mn in (6.3). In the sequel, we consider M1 , M2 and M3 separately. Recall M1 in (6.2), A (z) in (4.14) and Φ(z) in (8.10). Using the identity Φ(z1 ) − Φ(z2 ) = (z1 − z2 )Φ(z1 )W2 W20 Φ(z2 ), (9.2) it is not difficult to write √ n(M1 (λj ) − M1 (γj )) = √ n(λj − γj ) 4 X W1 Aa W10 . (9.3) a=0 where A0 := −In , A1 := −Py W20 Φ(γj )W2 W20 Φ(λj )W2 Py , A2 = A03 := Py W20 Φ(λj )W2 + γj Py W20 Φ(γj )W2 W20 Φ(λj )W2 , A4 := −(λj + γj )W20 Φ(λj )W2 − γj2 W20 Φ(γj )W2 W20 Φ(λj )W2 . (9.4) HIGH-DIMENSIONAL CCA 31 Since W1 W10 → (Ik − T1 T10 ) almost surely, we have W1 A0 W10 = −(Ik − T1 T10 ) + op (1). The equation (9.2) together with Theorem 1.8, (8.19) and the fact that the event Ξ1 in (5.6) holds with overwhelming probability implies that kΦ(λj )k = Op (1), kΦ(λj ) − Φ(γj )k = op (1). (9.5) By (9.5), Lemma 8.2 and Lemma 9.1, we have  1 tr Py W20 Φ(γj )W2 W20 Φ(γj )W2 Py · (Ik − T1 T10 ) + op (1) n = − s0 (γj )(Ik − T1 T10 ) + op (1). W1 A1 W10 = − Here we used the definition of E = W2 Py W20 , and the cyclicity of trace. Analogously, we obtain for a = 2, 3  W1 Aa W10 = s(γj ) + γj s0 (γj ) (Ik − T1 T10 ) + op (1). and  W1 A4 W10 = c1 − s(γj ) − γj s0 (γj ) (Ik − T1 T10 ) + op (1). Combining the above estimate yields √ n(M1 (λj ) − M1 (γj ))    √ = n(λj − γj ) c1 − 1 + s(γj ) + (γj − 1)s0 (γj ) (Ik − T1 T10 ) + op (1) . (9.6) Analogously, for M2 , using Lemma 8.2, we will get √ √ n(M2 (λj ) − M2 (γj )) = n(λj − γj )op (1), (9.7) At the end, we consider M3 (c.f. (6.2)). By (8.14), we can write  M3 ≡ M3 (z) := (1 − z)T1 H − Ψ T10 . Notice that by definition in (8.13), we have Ψ = HΥE. (9.8) And we also have the expansion   Ψ(z1 ) − Ψ(z2 ) = (z1 − z2 )Ψ(z2 ) H−1 + E −1 Ψ(z1 ) = (z1 − z2 )HΥ(z2 )Y Y 0 Υ(z1 )E. (9.9) Furthermore, analogously to (8.19), we have −1 kΥk ≤ k(Cyw2 − z)−1 kkSyy k = O(1) (9.10) with overwhelming probability, for z ∈ D. Hence, from (9.8)-(9.10), we also have the analogues of (8.19) and (9.5) kΨ(γj )k = Op (1), kΨ(λj )k = Op (1), kΨ(λj ) − Ψ(γj )k = op (1). Then approximating Φ(λj ) by Φ(γj ), and using Lemma 9.2, we obtain √ n(M3 (λj ) − M3 (γj )) 32 Z.G. BAO ET AL. √ = − n(λj − γj )T1 (H − Ψ(λj ) + (1 − γj )Ψ(λj )(H−1 + E −1 )Ψ(γi ))T10    √ = − n(λj − γj ) 1 − c1 − %(γj ) + (1 − γj )%0 (γj ) T1 T10 + op (1)   √ (1 − γj )s(γj ) (1 − γj )2 s0 (γj )  = − n(λj − γj ) 1 − 2 + T1 T10 + op (1) , c2 c2 (9.11) where in the second step we used the fact Hij = δij (1 − c1 ) + op (1), and in the last step we used the definition (8.23). Therefore, combining (9.1) with the equations (9.6), (9.7) and (9.11), we can conclude the proof of Lemma 6.1 by elementary calculation. 9.2. Proof of Lemma 6.2. In this subsection, we prove Lemma 6.2. Recall the matrices defined in (6.6). Let 1 D̊ := D − tr D · I. q In according to (6.3), (6.7) and Lemma 8.1, we can write     A B0 1 1 W10 2  Mn − tr D · T = W1 T G1 + op ( √ ). 0 B D̊ T G1 q n (9.12) In the sequel, we condition on A , B, D, and use the randomness of W1 and G1 only. Recall the notation wi = (wi1 , . . . , win ) as the i-th rows of W1 and further denote by di := (di1 , . . . , diq ) the i-th row of T G1 . According to (9.12), we see that    √  1 1 n Mn ij (γj ) − δij (1 − ri ) tr A + ri tr D n q  √   √  1 = n wi A wj0 − δij (1 − ri ) tr A + n di Bwj0 + wi B 0 d0j n √ + ndi D̊d0j + op (1) =: Qij + op (1). Let E0 be the conditional expectation w.r.t. A , B, D. Set  X  fc (t) := exp it cij Qij , φc (t) := E0 fc (t) (9.13) (9.14) i≤j for any collection of fixed numbers c := (cij )i≤j . It suffices to show that for some deterministic s ≡ s(c), φ0c (t) = −s2 tφc (t) + op (1). 2 2 From (9.15) one can solve φc (t) = exp(− s 2t + op (1)), which further implies Efc (t) = Eφc (t) → exp(− s2 t2 ). 2 This is known as Tikhomirov’s method for CLT [44]. To establish (9.15), we start with the definitions in (9.13) and (9.14). Then we have q    √ X X   1 φ0c (t) = i n cij E0 wi` A wj0 ` fc (t) − δij (1 − ri ) tr A φc (t) n i≤j `=1 (9.15) HIGH-DIMENSIONAL CCA 33 q     √ X X cij E0 wj` di B ` + wi` B 0 d0j ` fc (t) +i n i≤j √ X cij +i n i≤j `=1 q X    E0 di` D̊d0j ` fc (t) . (9.16) `=1 Using integration by parts formula for Gaussian Egh(g) = σ 2 Eh0 (g), g ∼ N (0, σ 2 ), (9.17) we see that   1  ∂Q  X   it αβ E0 wi` A wj0 ` fc (t) = δij (1 − ri )A`` φc (t) + (1 − ri ) cαβ E0 A wj0 ` fc (t) n n ∂wi` α≤β     E0 wj` di B ` + wi` B 0 d0j ` fc (t)     ∂Qαβ ∂Qαβ it X = cαβ E0 (1 − rj ) di B ` + (1 − ri ) B 0 d0j ` fc (t) . n ∂wj` ∂wi` α≤β    1  ∂Q   it X αβ E0 di` D̊d0j ` fc (t) = δij ri D̊`` φc (t) + cαβ ri E0 D̊d0j ` fc (t) . (9.18) q q ∂di` α≤β Plugging (9.18) into (9.16) yields   φ0c (t) = −tE0 Zfc (t) , (9.19) where X  ∂Qαβ 1 X X (1 − ri ) A wj0 ` cij cαβ Z := √ ∂wi` n i≤j + (1 − rj ) α≤β `    n ∂Qαβ  ∂Qαβ ∂Qαβ di B ` + (1 − ri ) B 0 d0j ` + ri D̊d0j ` . ∂wj` ∂wi` q ∂di` (9.20) Now, note that     √  √  ∂Qαβ = δαi n A wβ0 ` + (B 0 d0β )` + δβi n wα A ` + (dα B)` , ∂wi`     √  √  ∂Qαβ = δαi n Bwβ0 ` + D̊d0β ` + δβi n wα B 0 ` + dα D̊ ` . ∂di` (9.21) Substituting (9.21) into (9.20), and using Lemma 8.2, together with the bounds kA k, kBk, kDk ≤ C with overwhelming probability on D, it is not difficult to get  X 1 1 Z= c2ij (1 + δij ) (1 − ri )(1 − rj ) tr A 2 + (ri (1 − rj ) + rj (1 − ri )) tr BB 0 n q i≤j  n + 2 ri rj tr D̊ 2 + op (1) =: s2n + op (1). (9.22) q Plugging (9.22) into (9.19) , we get φ0c (t) = −ts2n φc (t) + op (1). (9.23) This implies that Qij ’s (c.f. (9.13)) are asymptotically independent Gaussians (up to symmetry), and the limiting variance of Qij is given by the limit of 1 1 n (1 − ri )(1 − rj ) tr A 2 + (ri (1 − rj ) + rj (1 − ri )) tr BB 0 + 2 ri rj tr D̊ 2 . n q q Hence, in the sequel, it suffices to estimate the normalized traces of A 2 , BB 0 , and D̊ 2 . The result is formulated in the following lemma, whose proof will be also postponed to Appendix A. 34 Z.G. BAO ET AL. Lemma 9.3. Suppose that the assumptions in Theorem 1.10 hold. For any j ∈ {1, . . . , k0 } such that rj is well separated from rc and 1, we have 1 tr A 2 = −(1 − γj )2 s(γj ) + γj (1 − γj )2 s0 (γj ) + γj2 (1 − c1 ) + (1 − 2γj )c2 + op (1), n   γj (1 − γj ) 0 1 1 s (γj ) + op (1), tr BB 0 = (1 − γj )2 1 − s(γj ) + q c2 c2   (γj − 1)2 (2c2 − 1) 1 c1 − c2  + γj + s(γj ) tr D̊ 2 = (1 − γj )2 − c1 + c2 + q c2 c2 c2   1 + (c2 − 1)γj (1 − γj ) 2 γj (1 − γj )2 0 − s (γ ) + s (γ ) + op (1). (9.24) j j c2 c22 With the above lemma and (9.23), we conclude the proof of Lemma 6.2. 9.3. Proof of Lemma 6.3. It is equivalent to show the following lemma. Lemma 9.4. Suppose that the assumptions in Theorem 1.10 hold. For any j ∈ {1, . . . , k0 } such that rj is well separated from rc and 1, we have 1 1 tr A (γj ) = c2 − (1 + c1 )γj − (1 − γj )s(γj ) + op ( √ ), n n 1 1 tr D(γj ) = (1 − γj )(1 − c1 − %(γj )) + op ( √ ). q n (9.25) Proof. The results follows from Lemma 8.4, (8.17) and (8.21) immediately. With Lemma 9.4, we can conclude the proof of Lemma 6.3 easily from the definitions in (5.3) and (8.23). 35 HIGH-DIMENSIONAL CCA APPENDIX A In this appendix, we prove Lemma 8.1, Lemma 8.4, Lemma 9.1, Lemma 9.2, and Lemma 9.3. Proof of Lemma 8.1. Let ui ’ be the i-th row of Uy . We only state the details for the proof of the case k = 2. For general fixed k, the proof is just a straightforward extension. It is well known that a Haar orthogonal matrix can be obtained from a Gaussian matrix with i.i.d. entries via Gram-Schmidt orthogonalization. Especially, there exists a pair of i.i.d. Gaussian vectors g1 , g2 ∈ Rq with i.i.d. N (0, 1q ) entries, such that  g g2 − hg2 , g1 i kgg11k2  1 , . (u1 , u2 ) = kg1 k kg2 − hg2 , g1 i kgg11k2 k (A.1) K Using Lemma 8.2, it is elementary to see that kgi k2 − 1 = O( (lognn) ) and kgi k = 1 −  1 (log n)K kgi k2 − 1 + O( ), 2 n g1 Ag20 = O( (log n)K √ ) n (A.2) hold with overwhelming probability, for any q × q matrix A independent of gi ’s with kAkHS ≤ √ C n. Hence, for any d ∈ Rq independent of ui ’s, with kdk ≤ C, we have  1 (log n)K  (log n)K 2 ui d = 1 − kgi k − 1 + O( ) gi d0 = gi d0 + O( ), 2 n n 0  (A.3) with overwhelming probability. This proves the first approximation in Lemma 8.1 if we regard the columns of BW10 as d0 above. For the second approximation in Lemma 8.1 , we again use (A.1) and (A.2) to see that   1 (log n)K 2 ui Du0i = 1 − kgi k2 − 1 + O( ) gi Dgi0 , 2 n (log n)K (log n)K u1 Du2 = (1 + O( √ ))g1 Dg20 − (1 + O( √ ))g1 g20 g1 Dg10 . n n (A.4) Hence, with overwhelming probability, we have 1 (log n)K tr D + O( ), q n 1 (log n)K u1 Du2 = g1 Dg20 − g1 g20 tr D + O( ). q n ui Du0i = gi Dgi0 − kgi k2 − 1 This proves the second approximation in Lemma 8.1 in case of k = 2. For more general fixed k, it suffices to write (u1 , . . . , uk ) in terms of (g1 , . . . , gk ), using GramSchmidt orthogonalization. The proof is analogous. We omit the details. Hence, we completed the proof of Lemma 8.1 . Proof of Lemma 8.4. Recall (8.8). It is elementary to check the first estimate of (8.24). For the second estimate, we use the fact  −1 ΦE = (E + H)−1 E − z (E + H)−1 E = (Cw2 y − z)−1 Cw2 y , (A.5) from which we have 1 1 1 1 tr EΦ = tr (Cw2 y − z)−1 Cw2 y = c1 + z tr (Cw2 y − z)−1 + O( ). n n n n (A.6) 36 Z.G. BAO ET AL. Recall š(z) defined in (5.5). Now we claim that for any small constant ε > 0, 1 šn (z) := tr (Cw2 y − z)−1 = š(z) + Op (n−1+ε ). p (A.7) for any z ∈ D. This together with (5.5) and (A.6) implies that 1 tr EΦ = s(z) + Op (n−1+ε ) n (A.8) for any z ∈ D. Hence, what remains is to show (A.7). To this end, we first focus on a sub domain of D: n o 1 D+ ≡ D+ (δ) := z ∈ C : d+ + δ < <z ≤ 2, ≤ |=z| ≤ 1 n Note that for z ∈ D+ , the imaginary part of z is away from 0 by at least trivial bound sup z∈D+ 1 n. Then, we have the (Cw2 y − z)−1 ≤ n, (A.9) deterministically. Further, since the event Ξ1 (c.f. (5.6)) holds with overwhelming probability, it is easy to see that sup (Cw2 y − z)−1 ≤ C, (A.10) z∈D with overwhelming probability. The deterministic bound and the high probability event (A.10) together implies that sup E (Cw2 y − z)−1 ` ≤ C` (A.11) z∈D+ for some positive constant C` , for any given ` ∈ N. Further, we introduce a smooth cutoff function  1  1 (A.12) Q ≡ Q(E, H) = χ tr (E + H)−1 = χ tr Sw−12 w2 , p p where χ(x) = 1 if 0 ≤ x ≤ nε , while χ(x) = 0 if x ≥ nε + 1, and |χ0 (x)| ≤ C for all x ∈ [nε , nε + 1]. From (3.3), we see that p1 tr Sw−12 w2 = O(1) with overwhelming probability. Hence, Q = 1 with overwhelming probability. In turn, we see that Q = 1 implies deterministically that kSw−12 w2 k = O(n1+ε ). Now, to prove (A.7) for a given z ∈ D+ , it suffices to show the following two Var(šn (z)Q) = O( 1 ), n2 1 E(šn (z)Q) = š(z) + o( √ ) n (A.13) since Q = 1 with overwhelming probability. We first show the variance bound above. We write E = XX∗ , H = YY∗ , X = (xij )p−k,q , Y = (yij )p−k,n−q , and all xij ’s and yij ’s are i.i.d. N (0, n1 ). We then regard šn (z)Q = p1 tr EΦQ as a function of the Gaussian variables xij ’s and yij ’s. Using Poincaré inequality for Gaussian, we have   1 1 1  X ∂ p tr EΦ(z) Q 2 X ∂ p tr EΦ(z) Q 2  Var(šn (z)) ≤ E + . (A.14) n ∂xij ∂yαβ i,j α,β 37 HIGH-DIMENSIONAL CCA Observe that  ∂ ( p1 tr EΦ)Q ∂xij    1 (XΦ)ji + (ΦX)ij + z XΦEΦ ji + z ΦEΦX ij Q p    1   1 + Sw−22 w2 X − 2 tr EΦχ0 tr Sw−12 w2 X∗ Sw−22 w2 p p ij ji = Then it is not difficult to see that 1 3   1  X ∂ p tr EΦ(z) 2  C  X E ≤ 2E kEkα kΦkα+1 Q2 n ∂xij n α=1 i,j    2  1 1 C + 2 E kEk2 kSw−12 w2 k4 ( tr EΦ)χ0 tr Sw−12 w2 n p p (A.15) for some positive constant C. Note that Q = 6 0 only when p1 tr Sw−12 w2 ≤ nε + 1, and similarly   χ0 p1 tr Sw−12 w2 6= 0 only if p1 tr Sw−12 w2 ∈ [nε , nε + 1]. Hence, if the random variables in two expectations are nonzero, we have the bound kSw−12 w2 k = O(n1+ε ). In addition, we also know from (3.3) that kSw−12 w2 k = O(1) holds with overwhelming probability. These facts imply that EkSw−12 w2 ka Qb = O(1), for any fixed a, b > 0. The same bound holds if we replace Q by χ0 is well known that EkEk` = O(1) (A.16)  1 −1 p tr Sw2 w2  . Furthermore, it (A.17) for any given ` > 0. Then combining the first inequality in (8.19), with (A.11), (A.16) and (A.17), we can obtain from (A.15) that  1 3   1  X ∂ p tr EΦ(z) Q 2  C  X 1 E ≤ 2E kEkα kΦkα+1 Q2 = O( 2 ) n ∂xij n n i,j α=1 uniformly in z ∈ D+ . For the second term in (A.14), we can get the same bound analogously. This completes the proof of the variance estimate in (A.13). The estimate of mean in (A.13) was obtained in [2] for all  z ∈ w : <w ∈ [d− − c, d+ + c], =w ≥ c for any small positive constant c. The proof in [2] take the advantages of the lower bound =z ≥ c, which guarantees an order 1 upper bound of k(Cw2 y − z)−1 k. Here for z ∈ D+ , we have (A.11) instead. This high order moment bound is sufficient for us to extend the discussion in [2] to the region D+ easily. Hence we omit the proof of (A.13), and refer to [2] for the interested readers. Furthermore, using Chebyshev’s inequality, (A.13) and the fact that Q = 1 with overwhelming probability, we see that for any z ∈ D+  −2+2ε P |šn (z) − š(z)| ≥ n−ε = O(n ). Now, we define the lattice S+ = D ∩ (n−ε Z × n−ε iZ), where Z = {±1, ±2, . . .}. Then apparently ](S+ ) = O(n2ε ). This implies that    −2+4ε P ∪z∈S+ |šn (z) − š(z)| ≥ n−ε = O(n ). 38 Z.G. BAO ET AL. In addition, for any z ∈ D, one can find a z 0 ∈ S+ such that |z − z 0 | = O(n−ε ). Then by continuity of šn (z) and š(z) on D, i.e., |š0n (z)|, |š0 (z)| ≤ η −2 , we can easily get    P ∪z∈D |šn (z) − š(z)| ≥ Cn−ε = O(n−2+4ε ). By choosing ε sufficiently small, we can then show that the second estimate in (8.24) holds uniformly in D if we replace op ( √1n ) by Oa.s. (n−ε ). Next, we show the third estimate in (8.24). Recall (8.8). We write H = X X ∗, E = YY ∗ , X = (x̃ij )q,n−p+k , Y = (ỹij )q,p−k (A.18) and all x̃ij ’s and ỹij ’s are i.i.d. N (0, n1 ). Analogously to the proof of the second estimate in (8.24), we can prove the result for any fixed z ∈ D+ at first, then extend the proof to whole D by continuity. For a fixed z ∈ D+ , we again split the proof into two parts 1  1 Var tr Ψ(z)Q̃ = O( 2 ), q n (A.19) 1 1 E tr Ψ(z)Q̃ = %(z) + o( √ ), q n (A.20) 1  1  −1 Q̃(E, H) = χ tr (E + H)−1 = χ tr Syy . q q (A.21) and where e = 1 with overwhelming probability. The proof of (A.19) Similarly, here we used the fact that Q can be obtained by Poincaré inequality again. We omit the details. In the sequel, we show how to derive (A.20) by integration by parts formula of Gaussian measures. To ease the presentation, −1 k = O(1) determinwe get rid of the factor Q̃ in the discussion, and do the reasoning as if kSyy istically. The rigorous justification of the following derivation requires one to put Q̃ back into each step. Using the integration by parts formula for Gaussian variables (c.f. (9.17)), we arrive at q n−p+k q n−p+k ∗  1 1X X 1 X X ∂ X ΥE ∗ Etr Ψ(z) = Ex̃ij X ΥE ji = E q q qn ∂xij i=1 = i=1 ji j=1 q n−p+k       1 X X  E ΥE ii + z X ∗ ΥX jj ΥE ii + z X ∗ Υ ji X ∗ ΥE ji qn i=1 = j=1  j=1     n−p+k z z Etr EΥ + Etr HΥ tr EΥ + Etr HΥEΥ . qn qn qn (A.22) Note that for any z ∈ D+ , one has  z 1 Etr HΥEΥ = O( ). qn n (A.23) Similarly to the variance bound in (A.13), it is not difficult to show Var  1 1 tr HΥ = O( 2 ), p n Var  1 1 tr EΥ = O( 2 ). p n (A.24) 39 HIGH-DIMENSIONAL CCA To be precise, in order to obtain (A.23) and (A.24), the tracial quantities shall be multiplied by Q̃. But as we mentioned before, we omit it from the presentation. Combining (A.22)- (A.24), we have    1 n−p+k z 1 Etr Ψ(z) = Etr EΥ + Etr HΥ Etr EΥ + O( ) q qn qn n     1  n−p+k 1 Etr EΥ + = (1 − z)Etr EΥ − q Etr EΥ + O( ) qn qn n n − p + k    1 1−z 1 2 = Etr EΥ − Etr EΥ + + O( ) qn n qn n where we used the fact   zEtr HΥ = (1 − z)Etr EΥ − q. Analogously to (A.13), we can show −1  z 1 1 Etr EΥ = Etr Cyw2 − zIq + 1 = zs̃(z) + 1 + o( √ ), q q n where s̃(z) is defined in (3.2). Then by (5.5), we have  1 1 1 Etr EΥ = s(z) + o( √ ). q c2 n (A.25) Combining the above results we can conclude that for any given z ∈ D+ (1 − c1 − c2 )s(z) + (1 − z)s2 (z) 1 1 1 Etr Ψ(z) = + o( √ ) = %(z) + o( √ ). q c2 n n where we used (5.4). The extension of the result to the whole D and the proof for the uniform bound are the same as the second estimate in (8.24). We thus omit the details. This completes the proof of Lemma 8.4. Proof of Lemma 9.1. Using the fact ((1 − z)E − zH)Φ(z) = I and the second estimate of Lemma 8.4, we see that  1 − γj −c1 + (1 − γj )s(γj ) p−k 1 1 tr HΦ(γj ) = tr EΦ − = + op ( √ ). n γj n γj n γj n (A.26) Now, observe that   ∂ 1 1 tr HΦ(z) = tr HΦ(γj )W2 W20 Φ(γj ) ∂z n n z=γj 1 1 =− tr HΦ(γj ) + tr HΦ(γj )EΦ(γj ) γj n γj n 1 1 1 =− tr HΦ(γj ) + tr HΦ(γj )HΦ(γj ). 1 − γj n γj n (A.27) Hence, to prove the second and third estimate in Lemma 9.1, it suffices to consider the LHS of (A.27). Although the limit and differentiation cannot be exchanged in general, here we can indeed obtain from (A.26) that  ∂ 1 tr HΦ(z) ∂z n z=γj = d 1−z s(z) dz z 1 z=γj + Op (n− 4 ). (A.28) 40 Z.G. BAO ET AL. To see this, it suffices to consider the non-limiting ratio   − 14 1  ) − Φ(γj )) 1 1 n tr H(Φ(γj + n = tr HΦ(γj )W2 W20 Φ(γj ) + Op (n− 4 ), − 41 n n (A.29) which follows by using the expansion (9.2) twice. Applying the estimate in (A.26) to the LHS of (A.29) leads to (A.28). Therefore, combining (A.26), (A.27) and (A.28) yields the second and the third estimates in Lemma 9.1. To prove the last estimate in Lemma 9.1, we can consider the derivative of n1 tr EΦ instead of n1 tr HΦ and go through the above procedure. We omit the details. This concludes the proof of Lemma 9.1. Proof of Lemma 9.2. From the identity (8.14), we have Ψ = (1 − z)Syw2 ΦSw2 y − E. Analogously to the proof of the third estimate in (8.16), we can use the spectral decomposition (6.4). Then we write Syw2 ΦSw2 y = Uy Λy Vy W20 ΦW2 Vy0 Λ0y Uy0 . Again, similarly to the Gaussian approximation used in (8.1), we can approximate the α-th row and β-th column of Uy by Gaussian vectors. Then Lemma 8.2 leads us to the estimates 1 (log n)K (log n)K Ψαβ (γj ) = δαβ tr Ψ(γj ) + Op ( √ ) = %(γj ) + Op ( √ ). q n n where the last step follows from Lemma 8.4. Next, for the second estimate in Lemma 9.2, we first notice that  ∂ ∂  Ψ(γj )(H−1 + E −1 )Ψ(γj ) = Ψ(z) = (1 − z)Syw2 ΦSw2 y ∂z ∂z z=γj = −Syw2 ΦSw2 y + (1 − z)Syw2 ΦSw2 w2 ΦSw2 y . Again, applying the SVD of Y , we can derive   1 ∂ Ψ(γj )(H−1 + E −1 )Ψ(γj ) tr Ψ(z) = δαβ q ∂z αβ Then similarly to (A.28), we have   Ψ(γj )(H−1 + E −1 )Ψ(γj ) αβ (A.30) z=γj 1 z=γj + Op (n− 2 +ε ) = δαβ %0 (γj ) + op (1). This concludes the proof of Lemma 9.2. Proof of Lemma 9.3. First, we estimate 1 2 n tr A . From the definition in (4.14), we have 2 1 2 1 1 tr (A (γj ))2 = tr Py − γj + tr (Py − γj )2 W20 Φ(γj )W2 n n n  2 − tr (Py − γj )3 W20 Φ(γj )W2 . n It is easy to check 2 1 tr Py − γj = (1 − 2γj )c2 + γj2 + op (1). n (A.31) HIGH-DIMENSIONAL CCA 41 For the second term of (A.31), using Lemma 9.1 we obtain 2 2 1 1 tr (Py − γj )2 W20 Φ(γj )W2 = tr (1 − γj )2 Φ(γj )E + γj2 Φ(γj )H n n = (1 − γj )(1 − 3γj )s(γj ) + γj (1 − γj )2 s0 (γj ) + γj2 c1 + op (1). Similarly, we have  1  1 tr (Py − γj In )3 W20 Φ(γj )W2 = tr (1 − γj )3 Φ(γj )E − γj3 Φ(γj )H n n = (1 − γj )(1 − 2γj )s(γj ) + γj2 c1 + op (1). Substituting the above results to (A.31), we get the first estimate in (9.24). Next, we investigate 1q tr BB 0 . From the definition in (6.6), it is elementary to check   tr BB 0 = (1 − γj )2 tr Syy − Syw2 ΦSw2 y + (γj − γj2 )Syw2 ΦSw2 w2 ΦSw2 y . (A.32) Recall (8.14). Then, with overwhelming probability, we have  c1 + %(γj ) 1 1 1 tr Syw2 Φ(γj )Sw2 y = tr E + Ψ(γj ) = + op (1), q 1 − γj q 1 − γj (A.33) by (8.8) and Lemma 8.4. Observe that Syw2 Φ(z)Sw2 w2 Φ(z)Sw2 y = ∂ ∂ Syw2 Φ(z)Sw2 y = zSyy Υ(z)Syy , ∂z ∂z (A.34) where in the last step we used (8.6). Using (8.11) and (8.13), we see that  ∂ ∂  z 1 zSyy Υ(z)Syy = E −H+ Ψ(z) ∂z ∂z 1 − z 1−z  1 1 1 = E+ Ψ(z) + Ψ(z) E −1 + H−1 Ψ(z). 2 2 (1 − z) (1 − z) 1−z (A.35) Furthermore, from Lemma 9.2 we have 1 1 tr E = c1 + op (1), tr Ψ(γj ) = %(γj ) + op (1), q q  1 tr Ψ(γj ) E −1 + H−1 Ψ(γj ) = %0 (γj ) + op (1). q (A.36) Combining (A.34), (A.35) and (A.36) yields c1 + %(γj ) %0 (γj ) 1 tr Syw2 Φ(γj )Sw2 w2 Φ(γj )Sw2 y = + + op (1). q (1 − γj )2 1 − γj (A.37) Therefore, we get the second estimate in (9.24) by substituting (A.33) and (A.37) into (A.32). At the end, we prove the last estimate in Lemma 9.3. Note that 2 1 1  tr Dn2 = (1 − γj2 ) tr Syy − (1 − γj )Syw2 ΦSw2 y q q 1  2 1 2 1 = (1 − γj )2 tr H − Ψ = (1 − γj )2 tr H2 − tr HΨ + tr Ψ2 . q q q q (A.38) 42 Z.G. BAO ET AL. First, it is not difficult to check  1 c2  p (1 − c1 )2 = (1 − c1 + c2 )(1 − c1 ). tr H2 −→ 1 + q 1 − c1 (A.39) We further claim that 1 1 1 − c1 − c1 c2 (1 − γj )s(γj ) + (1 − γj )2 s2 (γj ) − c1 (1 − c1 ) + op (1), tr HΨ = q c2 c2   γ (γ − 1) 1 − c1 − c2 1 j j − 2c1 (1 − γj ) + (1 − 2γj ) s(γj ) tr Ψ2 = q c2 c2 2 (1 − γj )(2 − 3γj ) 2 γj (1 − γj ) 0 + s (γj ) + s (γj ) − (1 − c1 − c2 )c1 + op (1). c2 c2 (A.40) The proof of (A.40) will be postponed to the end. Consequently, we have    γj (γj − 1) 1 1 − c1 − c2  2 2 − 2(1 − γj ) − s(γj ) tr Dn = (1 − γj ) 1 − c1 + c2 + q c2 c2  γj (1 − γj ) 2 γj (1 − γj )2 0 − s (γj ) + s (γj ) + op (1). c2 c2 In addition, we see that    1 − γj 1 1 tr Dn = (1 − γj ) tr H − Ψ = (1 − γj ) 1 − s(γj ) + op (1). q q c2 Then, by definition, we get the last estimate in (9.3). Hence, what remains is to prove (A.40). Analogously to the proof of Lemma 8.4, by continuity, we can work with γ̃j = γj + i 1 ∈ D+ n instead of γj . Recall Q̃ defined in (A.21). Similarly to (A.13), also (A.19) and (A.20), we can split the tasks into two steps: first, we show that  1  1     1 1 Var tr HΨ(γ̃j ) Q̃ = O( 2 ), Var tr Ψ2 (γ̃j ) Q̃ = O( 2 ) (A.41) q n q n     and then we estimate E 1q tr HΨ(γ̃j ) Q̃ and E 1q tr Ψ2 (γ̃j ) Q̃ . The proof of (A.41) is analogous to the proof  of  (A.13). Hence, we omit  it. In the sequel, we briefly state the estimates of E 1q tr HΨ(γ̃j ) Q̃ and E 1q tr Ψ2 (γ̃j ) Q̃ , using integration by parts formula for Gaussian measure. Again, for brevity, we get rid of the factor Q̃ in the discussion, and do the reasoning −1 k = O(1) deterministically. A rigorous justification of the following derivation requires as if kSyy one to put Q̃ back into each step. To ease the presentation, we omit γ̃j from the notations in the following discussions. First, from (9.8) we have 1 1 tr HΨ = tr H2 ΥE, q q 2 1 1 tr Ψ2 = tr HΥE . q q We use integration by parts (c.f. (9.17)) again. Recall (A.18). We have  1 1X Etr H2 ΥE = Exαβ X 0 HΥE βα q q α,β HIGH-DIMENSIONAL CCA = 43      1 X  E HΥE αα + X 0 βα X 0 ΥE βα + X 0 X ββ ΥE αα qn α,β     + γj X 0 HΥ βα (X 0 ΥE)βα + X 0 HΥX ββ ΥE αα  n−p+k1 1 1 1 Etr HΥE + Etr H tr EΥ + γj Etr H2 Υ tr EΥ + O( ) n q qn qn n  1 1 1 n−p+k1 Etr HΥE + Etr H Etr EΥ + γj Etr H2 Υ Etr EΥ + O( ), = n q qn qn n = where the last step follows from the variance bounds O( n12 ) for all the normalized tracial quantities above. The proofs of these variance bounds are again similar to the proof of the first bound in (A.13). Now, note that three terms on the RHS above can be computed easily. More specifically, we first recall (A.25). Then, we also note that  1 1 Etr HΥE = Etr Ψ(γj ) = %(γj ) + o(1) q q (A.42) and 1 − γj 1 1 Etr H2 Υ(γj ) = Etr HΥ(γj )(γj H − (1 − γj )E) + Etr HΥ(γj )E n γj n γj n 1 − γj c2 (c1 − 1) 1 − γj 1 Etr H + Etr Ψ(γj ) = + c2 %(γj ) + o(1). =− γj n γj n γj γj Hence, we have  1 1 Etr H2 ΥE = (1 − c1 ) + (1 − γj )s(γj ) %(γj ) + O( ) q n 1 − c1 − c1 c2 1 = (1 − γj )s(γj ) + (1 − γj )2 s2 (γj ) − c1 (1 − c1 ) + o(1). c2 c2 Analogously, after a tedious calculation using integration by parts, we will get   1 1X Etr Ψ2 = Exαβ X 0 ΥEHΥE q q βα α,β 1 1 n−p+k1 Etr HΥEΥE + Etr HΥE Etr EΥ + z Etr HΥ Etr HΥEΥE = n q qn qn 1 1 + z Etr HΥHΥE Etr EΥ + O( ). qn n (A.43) The tracial quantities on the RHS can now be computed. For example, the terms like HΥEΥE can be obtained via taking derivative of HΥE. More specifically, we have  ∂ 1 1 Etr HΥ(z)E = Etr HΥ(γj ) E + H Υ(γj )E ∂z q q z=γj 1 1 1 1 = Etr HΥ(γj )E + Etr HΥ(γj )HΥ(γj )E 1 − γj q 1 − γj q 1 1 1 1 =− Etr HΥ(γj )E + Etr HΥ(γj )EΥ(γj )E. γj q γj q From the above and (A.42), we get 1 Etr HΥ(γj )HΥ(γj )E = (1 − γj )%0 (γj ) − %(γj ) + o(1) q 44 Z.G. BAO ET AL. =− (1 − γj )2 0 2(1 − γj ) s(γj ) + s (γj ) + c1 + o(1), c2 c2 1 Etr HΥ(γj )EΥ(γj )E = γj %0 (γj ) + %(γj ) + o(1) q γj (1 − γj ) 0 1 − 2γj s(γj ) + s (γj ) − c1 + o(1). = c2 c2 Further, we recall (A.25), from which we also have  1 − γj 1 1 s(γj ) + o(1). Etr HΥ = − + q γj c2 γj Plugging all these estimates into (A.43), we get 1 − c − c  γj (1 − γj )2 2(1 − γj )(1 − 2γj ) 2 1 1 2 s (γj ) + γj (1 − γj ) + 2 s(γj ) s0 (γj ) Etr Ψ2 (γj ) = q c2 c2 c2   1 − c1 − c2 + − 2c1 (1 − γj ) + (1 − 2γj ) s(γj ) + o(1). (A.44) c2 Taking the derivative for (5.4), one can derive 2(γj − 1)s(γj )s0 (γj ) = −s2 (γj ) + s(γj ) − (c1 + c2 − γj )s0 (γj ) (A.45) Using (A.45) to (A.44), we obtain the second estimate in (A.40). This completes the proof of Lemma 9.3. APPENDIX B In this section, we prove Lemma 7.3. First, from Lemma 5.1, (Mn )ij (z) can be approximated by δij mi (z) up to an error O(n−ε ) if z ∈ D. We now claim that this approximation also holds e we set for any τ > 0, ε0 the domain in the following domain D: n o e ≡ D(δ, e ε0 ) := z = x + iη : d+ − δ ≤ x ≤ 1 − δ, n−1+ε0 ≤ η ≤ 1 . D Lemma B.1. For any small positive constants and δ and ε0 , there exists some positive constant c > 0, such that sup |(Mn )ij (z) − δij mi (z)| ≤ n−c sup e i,j=1,...,k z∈D in probability. For simplicity, in the sequel, we denote η0 = n−1+ε0 . To prove Lemma B.1, we need a local law for the Stieltjes transform of MANOVA matrix. Recall š(z) from (3.1). We also recall the Stieltjes transform šn (z) from (A.7). Lemma B.2 (Local law of MONOVA at the right edge). we have For any small δ > 0 and ε0 > 0, 0 Nε šn (z) − š(z) ≤ Nη e with overwhelming probability, for any small constant ε0 > 0. uniformly on D (B.1) 45 HIGH-DIMENSIONAL CCA Proof. Observe that ((E + H)−1 E − z)−1 = ((1 − z)H −1 E − zI)−1 (I + H −1 E) −1 z 1 1 −1 H E − I + I. = 2 (1 − z) 1−z 1−z Hence, by (8.9) and (A.7) we have šn (z) = 1 z  1 1 ŝ + + O( ), n (1 − z)2 1−z 1−z n (B.2) where −1 1 ŝn (ω) := tr H −1 E − ω p z ) ∼ =z when <z ∈ [d+ − is the Stieltjes transform of the F matrix H −1 E. Observe that =( 1−z −1 δ, 1 − δ]. A local law for ŝn (ω) at the right edge of H E with =ω ≥ η0 has been proved in [26] (see Theorem 7.1 therein). Then by (B.2), Lemma B.2 follows immediately. Denoting by γ ei ≡ γ en,i the i-th largest n-quantile of f (x) in (1.6), i.e., Z γ ei f (x)dx = d− n−i+1 . n Corollary B.3 (Rigidity of eigenvalues near the right edge). B.2, there exists some c ≡ c(δ) ∈ (0, 1) such that 2 1 0 ei − γ λ ei ≤ nε n− 3 i− 3 , (B.3) For any small δ in Lemma ∀i = 1, . . . , bcnc. (B.4) holds with overwhelming probability, for any small constant ε0 > 0 Proof. Denoting by λ̂1 ≥ λ̂2 ≥ · · · λ̂p−k the ordered eigenvalues of the F matrix H −1 E. Observe that Cw2 y = (E + H)−1 E = H −1 E(H −1 E + I)−1 . Hence, we have ei = λ λ̂i 1 + λ̂i . Further we set γ̂i to be the solution to γ ei = 2 γ̂i . 1 + γ̂i 0 In [26], it is proved that |λ̂1 − γ̂1 | ≤ n− 3 +ε with overwhelming probability. This implies directly that 2 0 e1 − γ λ e1 ≤ n− 3 +ε . (B.5) with overwhelming probability. The rigidity for general i then follows from (B.5), Lemma B.2, and the square root decay of the density function in (1.6). The proof is standard, we omit the details. For interested readers, we refer to the proof of Theorem 2.2 in [17]. With the aid of Lemma B.2, we are now at the stage to prove Lemma B.1. 46 Z.G. BAO ET AL. Proof of Lemma B.1. Here we only need to argue that the proof of Lemma 5.1 still works e It suffices to go through the proofs of Lemmas 8.1, 8.3 and 8.4 again, with the well for z ∈ D. aid of Lemma B.2 and Corollary B.3. First, analogously to Lemma 8.1, we will show that 1 1 M2 = T G1 BW10 + O(n− 2 +2ε0 ), M3 = T G1 DG01 T10 + O(n− 2 +2ε0 ), (B.6) e Here the second term on the RHS of the second hold with overwhelming probability on D. 1 equation in (8.15) has been absorbed into the error term O(n− 2 +2ε0 ). Similarly to the proof of Lemma 8.1, we only show the details for the case of k = 2. Recall (A.3) and (A.4). Denote by w` the `-th column of W1 . It suffices to show that with overwhelming probability, g1 D(z)g10 = O(nε0 ), g1 D(z)g20 = O(nε0 ), gi0 B(z)wj = O(nε0 ) (B.7) e We only show the proof for the first two estimates above. The last one can be hold for z ∈ D. checked analogously. We use Lemma 8.2 again. For the first two estimates in (B.7), it suffices to show that 1 tr D(z) = O(nε0 ), n ε0 1 1 kD(z)k2HS = 2 tr D(z)(D(z))∗ = O(n− 2 ) 2 n n (B.8) e We start with the first estimate in (B.8). From the hold with overwhelming probability on D. first equation of (8.21) and (8.3), we have 1 1 1 | tr D(z)| ≤ |1 − z|| tr Syy | + |1 − z|2 | tr Syw2 Φ(z)Sw2 y | n n n  1 ew y − z| ≤ C 1 + tr |C 2 n ew y has the same eigenwith overwhelming probability, where we also used (3.3). Observe that C 2 e values as Cw2 y . Hence, we have on D, p−k X 1 1 ew y − z| = 1 tr |C = O((log n)K ) 2 e n n |λi − z| (B.9) i=1 with overwhelming probability, for some sufficiently large K > 0. The proof of (B.9) from Corollary B.3 is standard. We refer to the proof of (3.43) in [7] for a similar argument. For the second estimate, we have 1 1 1 tr D(z)(D(z))∗ ≤ |1 − z|| 2 tr Syy (D(z))∗ | + |1 − z|2 | 2 tr Syw2 Φ(z)Sw2 y (D(z))∗ | 2 n n n By Von Neumann’s trace inequality, we can easily get 1 1 C tr Syy (D(z))∗ ≤ 2 tr Syy k(D(z))∗ kop ≤ = Cn−ε0 2 n n nη0 with overwhelming probability. Analogously, using (3.3), (8.3) and (B.9), we have ε 1 C ∗ ew y − z| ≤ n− 20 tr S Φ(z)S (D(z)) | ≤ tr | C yw w y 2 2 2 n2 n2 η 0 with overwhelming probability. e Specifically, we shall Next, we shall check that an analogue of Lemma 8.3 holds as well on D. e show, that on D, the following estimates hold with overwhelming probability.   ε0 1 sup (M1 )ij − δij c2 − (1 + c1 )z − (1 − z) tr EΦ ≤ n− 8 , n i,j 47 HIGH-DIMENSIONAL CCA ε0 1 sup (M3 )ij − δij t2i (1 − z) tr (H − Ψ) ≤ n− 8 . q i,j ε0 sup (M2 )ij ≤ n− 8 , i,j (B.10) Similarly to the proof of Lemma 8.3, we start with (6.7) and (B.6) and use the large deviation inequality in Lemma 8.2. It suffices to show that ε0 1 kA k2HS ≤ n− 2 , 2 n ε0 1 kBk2HS ≤ n− 2 , 2 n ε0 1 kDk2HS ≤ n− 2 2 n (B.11) e with overwhelming probability. Note that the last estimate of (B.11) has already holds on D been proved in (B.8). The first two can be proved analogously. We thus omit the details. e as well. Apparently, At the end, we show that an analogue of Lemma 8.4 holds on the domain D the first estimate in (8.24) still holds. In the sequel, we will show that ε0 1 sup | tr EΦ(z) − s(z)| ≤ n− 2 , e n z∈D ε0 1 sup | tr Ψ(z) − %(z)| ≤ n− 2 . e q z∈D (B.12) with overwhelming probability. Note that the first estimate in (B.12) follows from (A.6) and Lemma B.2 by choosing ε0 = ε20 therein. Fo the second estimate in (B.12), we first define P ≡ P(z) := 1 1 tr Syy Υ(z)Syy − tr Υ(z)Syy . n n (B.13) Our aim is to show that 1 sup |P(z)| ≤ Cn− 2 (B.14) e z∈D with overwhelming probability. We postpone the proof of (B.14) to the end, and show how to prove the second estimate in (B.12) with the aid of (B.14). First, from (8.6), (8.9) and (8.14), we can write Ψ(z) = z(1 − z)Syy ΥSyy + (1 − z)H − zE. Hence, from (B.13) and (B.14), we have 1 1 1 1 1 tr Ψ(z) = z(1 − z) tr Υ(z)Syy + (1 − z) tr H − z tr E + O(n− 2 ) q q q q (B.15) e with overwhelming probability. It is elementary to see that on D, 1 1 tr H = 1 − c1 + O(n− 2 +ε ), q 1 1 tr E = c1 + O(n− 2 +ε ) q (B.16) with overwhelming probability. Furthermore, according to (8.9) and (8.10), we can write −1 1 1 tr Υ(z)Syy = tr Cyw2 − z =: s̃n (z). q q (B.17) Since Cw2 y and Cyw2 share the same nonzero eigenvalues, in light of (A.7), we have c1 c2 − c1 1 šn (z) = s̃n (z) + . c2 c2 z (B.18) 48 Z.G. BAO ET AL. From (5.5), we also have c2 − c1 1 c1 š(z) = s̃(z) + . c2 c2 z (B.19) Hence, combining (B.1), (B.18) and (B.19) yields 0 sup s̃n (z) − s̃(z) ≤ e z∈D Nε . N η0 (B.20) Plugging (B.17), (B.20) and (B.16) into (B.15), we can get (B.12) easily by choosing ε0 = ε20 . Hence, what remains is to prove (B.14). It suffices to show the one point estimate for any e The uniform bound follows from the continuity and the definition of overwhelming given z ∈ D. probability. More specifically, similarly to the proof of Lemma 8.4, we introduce the lattice e ∩ (n−3 Z × n−3 Z). According to the definition of with overwhelming probability, we see Se := D 1 that if we can prove |P(z)| ≤ n− 2 for any z ∈ Se with overwhelming probability individually, we 1 also have the uniform bound supz∈Se |P(z)| ≤ n− 2 with overwhelming probability. Moreover, for e there is one z ∈ Se such that |z − z 0 | ≤ n−3 . Further, we have the following bound any z 0 ∈ D, e uniformly in all z ∈ D |P0 (z)| ≤ CkΥ0 (z)k = O( 1 ) = O(n2 ), η02 (B.21) −1 k ≤ C, which itself holds with overwhelming probability. conditioning on the event kSyy k, kSyy By the continuity in (B.21), we can further obtain (B.14) from (B.21). 1 e For brevity, Therefore, in the sequel, we only show the proof of |P(z)| ≤ n− 2 for one z ∈ D. we omit z from the notation. We estimate the high order moments of P. To this end, we set H(m1 , m2 ) = Pm1 P m2 . With this notation, we can write 1 1 EH(m, m) = E tr Syy ΥSyy H(m − 1, m) − E tr ΥSyy H(m − 1, m). n n (B.22) We apply the Gaussian integral by parts (c.f. (9.17)) to the first term above. Then we get 1  1X    E tr Syy ΥSyy H(m − 1, m) = E yij Y 0 ΥSyy ji H(m − 1, m) n n i,j    = E c1 H(m − 1, m) + E c2 H(m − 2, m) + E c3 H(m − 1, m − 1) (B.23) where 0 1 X ∂ Y ΥSyy c1 = 2 n ∂yij  ji , i,j c2 =  P 1 X 0 Y ΥS , yy ji ∂y n2 ij i,j  P 1 X 0 c3 = 2 Y ΥSyy ji . n ∂yij i,j The estimates of c2 and c3 all nearly the same. We thus focus on the former. By elementary calculation, it is not difficult to derive  1 X c1 = 2 (ΥSyy )ii − (Y 0 Υ)ji (Pw2 − z)Y 0 ΥSyy ji n i,j 49 HIGH-DIMENSIONAL CCA  − Y 0 ΥY (Pw2 − z) jj (ΥSyy )ii + (Y 0 Υ)ji yij + (Y 0 ΥY )jj  1 1 = tr ΥSyy − 2 tr ΥY (Pw2 − z)Y 0 ΥSyy n n 1 1 q − 2 tr ΥY (Pw2 − z)Y 0 tr ΥSyy + 2 tr ΥSyy + 2 tr ΥSyy n n n 1 = tr ΥSyy . n (B.24) where in the last step we used the definition of Υ in (8.1). Similarly, we can derive c2 = 2 2 2 tr Syy ΥSyy Υ = 3 tr Syy (Cyw2 − z)−2 3 n n (B.25) Further, substituting (B.23) and (B.24) into (B.22), we have   EH(m, m) = E c2 H(m − 2, m) + E c3 H(m − 1, m − 1) Now, by Young’s inequality, we have EH(m, m) ≤  2(m − 1) (log n)m 1 E|c2 |m + E|c3 |m + m EH(m, m). m m (log n) m−1 This implies that EH(m, m) ≤ C  (log n)m E|c2 |m + E|c3 |m . m (B.26) Using (B.25), we see that 1 E|c2 |m ≤ (EkSyy k2m ) 2 (E( 1 2 tr |Cyw2 − z|−2 )2m ) 2 . 3 n (B.27) Applying (B.20) and the fact s̃(z) = O(1), we observe that 1 1 1 c2 tr |Cyw2 − z|−2 = 2 =tr (Cyw2 − z)−1 = 2 =s̃n (z) = O(n−1−ε0 ) n3 n ηn n η (B.28) e with overwhelming probability. Moreover, we also have the deterministic bound on D 1 1 tr |Cyw2 − z|−2 = O( 2 2 ) = O(n−2ε0 ). 3 n n η0 Hence, we have (E( ε0 1 1 tr |Cyw2 − z|−2 )2m ) 2 ≤ n−m(1+ 2 ) 3 n (B.29) Using (3.3), we also have 1 (EkSyy k2m ) 2 ≤ K m (B.30) for some positive constant K. Plugging (B.29) and (B.30) into (B.27), we obtain ε0 E|c2 |m ≤ n−m(1+ 4 ) . The same bound holds for c3 . Hence, we obtain from (B.26) that E|P|2m = EH(m, m) ≤ n−m . 1 Since m can be arbitrary fixed positive integer, we get |P(z)| ≤ n− 2 with overwhelming probae bility for any z ∈ D. This completes the proof of Lemma B.1. 50 Z.G. BAO ET AL. With the aid of Lemma B.1, Lemma B.2, and Corollary B.3, we prove Lemma 7.3. Proof of Lemma 7.3. For any z ∈ Ω, we set z0 = z + iη0 , where η0 = n−1+ε0 . Our strategy is to compare Mn (z) with Mn (z0 ), and use Lemma B.1 to conclude Lemma 7.3. We first show that sup |(Mn )ij (z0 ) − (Mn )ij (z)| ≤ n−c (B.31) z∈Ω with overwhelming probability. To see this, we first observe from (4.13) that  Mn (z0 ) − Mn (z) = Z1 A (z0 ) − A (z) Z1 . For i = 0, . . . , 4, let Ai (z0 , z) be the matrices obtained via replacing (λj , γj ) by (z0 , z) in Ai defined in (9.4). Similarly to (9.3), we have Mn (z0 ) − Mn (z) = iη0 4 X Z1 Aa (z0 , z)Z1 . a=0 Since A0 (z0 , z) = −In , apparently we have η0 Z1 A0 (z0 , z)Z1  ij = O(n−1+ε0 ) with overwhelming probability, by simply using the definition of Z1 in (4.14) and Lemma 8.2. Hence, it suffices to show the estimate the entries of η0 Z1 Aa (z0 , z)Z1 for a = 1, . . . , 4. In the sequel, we only present the details for a = 1. The others can be handled similarly. From the definitions of Z1 (c.f. (4.14)) and A1 (z0 , z), it suffices to estimate the entries of η0 W1 A1 (z0 , z)W10 , η0 T1 Y A1 (z0 , z)W10 , η0 T1 Y A1 (z0 , z)Y 0 T10 . (B.32) For the first term, observe that W1 is independent of A1 (z0 , z), and also the event Ω. Hence, by Lemma 8.2, we have η0 W1 A1 (z0 , z)W10  ij =  δij (1 − ri ) (log n)K tr A (z , z) + O kA (z , z)k 1 0 1 0 HS 2−ε 2−ε n 0 n 0 uniformly on Ω, with overwhelming probability. Note that by the definition of the domain Ω in (7.3), we see that supz∈Ω kCw2 y − zk ≤ n1−ε . This together with (3.3), (8.3) and (B.9) implies that 1 n2−ε0 |tr A1 (z0 , z)| = ≤ 1 n2−ε0 1 |tr Py W20 Φ(z)W2 W20 Φ(z0 )W2 Py | K ew y − z0 |−1 = O( (log n) ) tr |C 2 1−ε +ε 0 n nε−ε0 holds with overwhelming probability, where in the second step we bounded all the matrices ew y − z0 )−1 by their operator norms. Similarly, we have except (C 2 (log n)2K (log n)2K 2 kA (z , z)k ≤ C kΦ(z)k2 tr Φ(z0 )Φ(z0 ) 1 0 HS 4−2ε 0 n n4−2ε0 K (log n)2K ew y − z0 |−2 = O( (log n) ) ≤ C 2−2ε0 +2ε tr |C 2 n n2ε−3ε0 with overwhelming probability, where in the last step we used (B.28). Choosing ε > 3ε0 (say), we obtain  η0 W1 A1 (z0 , z)W10 ij = O(n−ε0 ) (B.33) HIGH-DIMENSIONAL CCA 51 with overwhelming probability. For the entries of the last two matrices in (B.32), we first do the approximation by choosing ε > 3ε0 (say) η0 T1 Y A1 (z0 , z)W10 = η0 T G1 Λy Vy A1 (z0 , z)W10 + O(n−ε0 ), η0 T1 Y A1 (z0 , z)Y 0 T10 = η0 T G1 A1 (z0 , z)G01 T + O(n−ε0 ). (B.34) The proof of the above estimates is similar to (B.6). We omit the details. The estimates of the entries of the first term on the RHS of two equations in (B.34) can be derived in the same way as (B.33), using Lemma 8.2. We thus omit the details. Furthermore, the estimates of the entries of η0 Z1 Aa (z0 , z)Z1 for a = 2, 3, 4 are similar. Hence, we completed the proof of (B.31). Observe that for any sufficiently small δ > 0, Ω ⊂ [d+ − δ, d+ + δ] ⊂ [d+ − δ, 1 − δ] almost surely, in light of (1.8). Hence, (B.31) together with Lemma B.1 implies that sup sup |(Mn )ij − δij mi (z)| ≤ n−c z∈Ω i,j in probability, by using the continuity of the function mi (z). Further, when δ is sufficiently small, we also have sup sup |mi (z) − mi (δ+ )| ≤ ε0 z∈Ω i in probability, by the continuity of mi (z). This concludes the proof of Lemma 7.3. REFERENCES [1] T. Anderson. (2003). An introduction to multivariate statistical analysis. Third Edition. Wiley New York. [2] Z. D. Bai, J. Hu, G.M. Pan, W. Zhou. (2015). Convergence of the empirical spectral distribution function of Beta matrices. Bernoulli, 21(3), 1538-1574. [3] Z. Bai, Y. Fujikoshi, and K. P. Choi. High-dimensional consistency of AIC and BIC for estimating the number of significant components in principal component analysis. The Annals of Statistics, Accepted. [4] Z. D. Bai, J. Yao. (2008). Central limit theorems for eigenvalues in a spiked population model. Ann. Inst. Henri Poincar, Probab. Stat. Gauthier-Villars, 44(3), 447. [5] J. Baik, G. Ben Arous, S. Péché. (2005). Phase transition of the largest eigenvalue for nonnull complex sample covariance matrices. Ann. Probab., 1643-1697. [6] J. Baik, J. W. Silverstein. (2006). Eigenvalues of large sample covariance matrices of spiked population models. J. Multivariate Anal., 97(6), 1382-1408. [7] Z.G. Bao, G.M. Pan, W. Zhou. (2013). Local density of the spectrum on the edge for sample covariance matrices with general population. Preprint. Available at http://www. ntu. edu. sg/home/gmpan/publications. html. [8] Z.G. Bao, J. Hu, G. Pan, and W. Zhou. (2017). Test of independence for high-dimensional random vectors based on freeness in block correlation matrices. Electron. J. Statist., 11(1):1527–1548. [9] S. T. Belinschi, H. Bercovici, M. Capitaine, and M. Février. (2012) Outliers in the spectrum of large deformed unitarily invariant models. Preprint. [10] F. Benaych-Georges, A. Guionnet, M. Maida. (2011). Fluctuations of the extreme eigenvalues of finite rank deformations of random matrices. Electron. J. Probab., 16(60), 1621-1662. [11] F. Benaych-Georges, N. R. Rao. (2011). The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices. Adv. Math., 227(1), 494-521. [12] M. Capitaine, C. Donati-Martin, D. Féral. (2009). The largest eigenvalues of finite rank deformation of large Wigner matrices: convergence and nonuniversality of the fluctuations. Ann. Probab., 1-47. [13] M. Capitaine, C. Donati-Martin, D. Féral. (2009). Central limit theorems for eigenvalues of deformations of Wigner matrices. Ann. Inst. Henri Poincar, Probab. Stat., 48(1), 107-133. [14] K. R. Davidson, S. J. Szarek. (2001). Local operator theory, random matrices and Banach spaces. Handbook of the geometry of Banach spaces, 1 (317-366): 131. [15] P. Dutilleul, B. Pelletier, and G. Alpargu. (2008). Modified tests for assessing the multiple correlation between one spatial process and several others. Journal of Statistical Planning and Inference, 138(5):1402–1415. 52 Z.G. BAO ET AL. [16] A. Edelman, N. R. Rao. (2005). Random matrix theory. Acta Numerica, 14, 233-297. [17] L. Erdös, H.-T. Yau, J. Yin. (2012). Rigidity of eigenvalues of generalized Wigner matrices. Adv. Math., 229(3): 1435-1515. [18] D. Féral, S. Péché. (2007). The largest eigenvalue of rank one deformation of large Wigner matrices. Comm. Math. Phys., 272(1), 185-228. [19] D. Féral, S. Péché. (2009). The largest eigenvalues of sample covariance matrices for a spiked population: diagonal case. J. Math. Phys., 50 (7), 073302. [20] Y. Fujikoshi. (2016). High-Dimensional Asymptotic Distributions of Characteristic Roots in Multivariate Linear Models and Canonical Correlation Analysis. Technical report. [21] Y. Fujikoshi and T. Sakurai. (2016). High-dimensional consistency of rank estimation criteria in multivariate linear model. Journal of Multivariate Analysis, 149:199–212. [22] C. Gao, Z. Ma, Z. Ren, HH Zhou. (2015). Minimax estimation in sparse canonical correlation analysis. The Annals of Statistics. 43(5), 2168-97. [23] C. Gao, Z. Ma, HH Zhou. (2014). Sparse CCA: Adaptive estimation and computational barriers. arXiv preprint arXiv:1409.8565. [24] R. Gittins. (1985). Canonical Analysis, volume 12 of Biomathematics. Springer Berlin Heidelberg, Berlin, Heidelberg. [25] X. Han, G. Pan, Q. Yang. (2016). A unified matrix model including both CCA and F matrices in multivariate analysis: the largest eigenvalue and its applications . arXiv:1606.04417. [26] X. Han, G. Pan, and B. Zhang. (2016). The Tracy-Widom law for the largest eigenvalue of F type matrices. Annals of Statistics, 44 (4): 1564–1592, [27] H. Hotelling. (1936). Relations between two sets of variates. Biometrika, 321-377. [28] M. Hyodo, N. Shutoh, T. Nishiyama, and T. Pavlenko. (2015). Testing block-diagonal covariance structure for high-dimensional data. Statistica Neerlandica, 69(4):460–482. [29] D. Jiang, Z. Bai, and S. Zheng. (2013). Testing the independence of sets of large-dimensional variables. Science China Mathematics, 56(1):135–147. [30] T. Jiang and F. Yang. (2013). Central limit theorems for classical likelihood ratio tests for high-dimensional normal distributions. The Annals of Statistics, 41(4):2029–2074. [31] I. M. Johnstone. (2001). On the distribution of the largest eigenvalue in principal components analysis. Annals of statistics, 295-327. [32] I. M. Johnstone. (2008). Multivariate analysis and Jacobi ensembles: Largest eigenvalue, Tracy-Widom limits and rates of convergence. Ann. Statist., 36(6): 2638. [33] I. M. Johnstone. (2009). Approximate null distribution of the largest root in multivariate analysis. The Annals of Applied Statistics, 3(4):1616–1633. [34] I.M. Johnstone, A. Onatski. (2015). Testing in high-dimensional spiked models. arXiv:1509.07269. [35] V. Kargin. (2015). Subordination for the sum of two random matrices. Ann. Probab. 43 (4): 2119-2150. [36] B. Katz-Moses. (2012). Small Deviations for the beta-Jacobi Ensemble. PhD thesis. [37] A. Knowles, J. Yin. (2013). The isotropic semicircle law and deformation of Wigner matrices. Comm. Pure Appl. Math., 66(11),1663-1749. [38] R. J. Muirhead. (1982). Aspects of Multivariate Statistical Theory. Wiley, New York. [39] R. Oda, H. Yanagihara and Y. Fujikoshi (2016). Asymptotic non-null distributions of test statistics for redundancy in the high-dimensional canonical correlation analysis. Technical report. [40] D. Passemier and J. Yao. (2012). On determining the number of spikes in a high-dimensional spiked population model. Random Matrices: Theory and Applications, 01(01):1150002. [41] D. Paul. (2007). Asymptotics of sample eigenstructure for a large dimensional spiked covariance model. Statist. Sinica, 17 (4), 1617-1642. [42] S. Péché. (2006). The largest eigenvalue of small rank perturbations of Hermitian random matrices. Probab. theory and related fields, 134(1), 127-173. [43] A. C. Rencher and F. C. Pun. (1980). Inflation of R2 in Best Subset Regression. Technometrics, 22(1):49 [44] A.N. Tikhomirov.(1981). On the convergence rate in the central limit theorem for weakly dependent random variables. Theory Probab. Appl., 25(4): 790-809. [45] K. W. Wachter. (1980). The limiting empirical measure of multiple discriminant ratios. Ann. Statist., 937-957. [46] Q. Wang and J. Yao. (2017). Extreme eigenvalues of large-dimensional spiked Fisher matrices with application. The Annals of Statistics, 45(1):415–460. [47] Y. Yamada, M. Hyodo, and T. Nishiyama. (2017). Testing block-diagonal covariance structure for highdimensional data under non-normality. Journal of Multivariate Analysis, 155(4):305–316. [48] Y. R. Yang, G. M. Pan. (2012) The convergence of the empirical distribution of canonical correlation coefficients. Electron. J. Probab., 17, 64. HIGH-DIMENSIONAL CCA 53 [49] Y. Yang and G. Pan. (2015). Independence test for high dimensional data based on regularized canonical correlation coefficients. The Annals of Statistics, 43(2):467–500. [50] S. Zheng, D. Jiang, Z. Bai, and X. He. (2014) Inference on multiple correlation coefficients with moderately high dimensional data. Biometrika, 101(3):748–754. Department of Mathematics, Hong Kong University of Science and Technology, Hong Kong E-mail: [email protected] Division of Mathematical Sciences, Nanyang Technological University, Singapore 637371 E-mail: [email protected] KLASMOE and School of Mathematics & Statistics Northeast Normal University P. R. China 130024 E-mail: [email protected] Department of Statistics and Applied Probability, National University of Singapore, Singapore 117546 E-mail: [email protected] URL: http://www.sta.nus.edu.sg/ stazw/
10math.ST
Distance-sensitive hashing∗ Martin Aumüller1 , Tobias Christiani1 , Rasmus Pagh1 , and Francesco Silvestri2 1 2 IT University of Copenhagen, Denmark, {maau, tobc, pagh}@itu.dk University of Padova, Italy, [email protected] arXiv:1703.07867v1 [cs.DS] 22 Mar 2017 Abstract We initiate the study of distance-sensitive hashing, a generalization of locality-sensitive hashing that seeks a family of hash functions such that the probability of two points having the same hash value is a given function of the distance between them. More precisely, given a distance space (X, dist) and a “collision probability function” (CPF) f : R → [0, 1] we seek a distribution over pairs of functions (h, g) such that for every pair of points x, y ∈ X the collision probability is Pr[h(x) = g(y)] = f (dist(x, y)). Locality-sensitive hashing is the study of how fast a CPF can decrease as the distance grows. For many spaces f can be made exponentially decreasing even if we restrict attention to the symmetric case where g = h. In this paper we study how asymmetry makes it possible to achieve CPFs that are, for example, increasing or unimodal. Our original motivation comes from annulus queries where we are interested in searching for points at distance approximately r from a query point, but we believe that distance-sensitive hashing is of interest beyond this application. 1998 ACM Subject Classification H.3.3 Information Search and Retrieval Keywords and phrases locality-sensitive hashing, annulus queries, recommender systems. Digital Object Identifier 10.4230/LIPIcs... 1 Introduction High-dimensional nearest neighbor search in a point set P is a building block in a variety of applications. A classical application is recommender systems: Suppose you have shown interest in a particular item, for example a news article x. The semantic meaning of a piece of text can be represented as a high-dimensional feature vector, for example computed using latent semantic indexing [16]. In order to recommend other news articles we might search the set P of article feature vectors for articles that are similar to x. But in general it is not clear that it is desirable to recommend the most similar articles. Indeed, it might be desirable to recommend articles that are on the same topic but are not too aligned with x, and may provide a different perspective. For many applications of nearest neighbor search it is acceptable to approximate distances such that the points reported are only approximately as close to x as the true set of closest points. Locality-sensitive hashing (LSH), first defined by Indyk and Motwani [19], is a powerful framework for approximate nearest neighbor search (ANN) in high dimensions that achieves sublinear query time. However, existing LSH techniques do not allow us to search for points that are “close, but not too close”. In a nutshell: LSH provides a sequence of hash ∗ The research leading to these results has received funding from the European Research Council under the European Union’s 7th Framework Programme (FP7/2007-2013) / ERC grant agreement no. 614331. Silvestri has also been supported by MIUR of Italy under project AMANDA. © Martin Aumüller, Tobias Christiani, Rasmus Pagh, and Francesco Silvestri; licensed under Creative Commons License CC-BY Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany XX:2 Distance-sensitive hashing functions h1 , h2 , . . . such that if x and y are close we have hi (x) = hi (y) for some i with high probability, while if x and y are distant we have that hi (x) 6= hi (y) for all i with high probability. In this paper we seek techniques that allow us to refine the first requirement: If x and y are “too close” we would like collisions to occur only with very small probability. At first sight this seems impossible because we will, by definition, have a collision when x = y. However, this objection is overcome by switching to an asymmetric setting where we work with pairs of functions (hi , gi ) and are concerned with collisions of the form hi (x) = gi (y). More generally, we initiate the study of the following question: In the asymmetric setting, what is the class of functions f for which it is possible to achieve Pr[h(x) = g(y)] = f (dist(x, y)), where the probability is over the choice of (h, g) and dist(x, y) is the distance between x and y. We refer to such a function as a collision probability function (CPF). More formally: I Definition 1. A distribution D over pairs of functions h, g : X → R is called distancesensitive for the space (X, dist) with collision probability function (CPF) f : R → [0, 1] if for each pair x, y ∈ X and (h, g) sampled according to D we have Pr[h(x) = g(y)] = f (dist(x, y)). 1.1 Our results On a high level our results go into two different directions. First, we show that distancesensitive hash families with certain CPFs allow us to reuse the standard LSH data structure [19] to solve problems where standard LSH families do not yield satisfactory solutions. Second, we describe constructions of distance-sensitive hash families that achieve certain CPFs and study lower bounds on distance-sensitive hash families with monotonically increasing CPFs. We consider a standard RAM model of computation with word size Θ(log n) bits where n = |P | is the size of the set of points. For simplicity we also assume that a point in (X, dist) can be stored using d words and that the time complexity is O(d) for performing distance computations, as well as sampling and evaluating functions from a distance-sensitive family (if this is not the case, the space and time bounds can be adjusted accordingly). Applications. Approximate annulus search is the problem of finding a point in the set P of data points with distance in an interval [r− , r+ ] from a query point. Having access to a distance-sensitive hash family with a CPF that peaks inside [r− , r+ ] and is significantly smaller at the ends of the interval gives an LSH-like solution to this problem. I Theorem 2. Suppose we have a set P of n points, an interval [r− , r+ ], a distance r ∈ [r− , r+ ], and assume we are given a distance-sensitive family with CPF f such that f (r0 ) ≤ 1/n for all r0 ∈ / [r− , r+ ]. Then there exists a data structure that, given a query q for which there exists x ∈ P with dist(q, x) = r, returns x0 ∈ P with dist(q, x0 ) ∈ [r− , r+ ] with ∗ probability at least 1/2. The data structure uses space O(n1+ρ /f (r) + dn) and has query ∗ time O(dnρ ), where ρ∗ = log(1/f (r))/ log n. Obtaining a CPF that peaks inside of [r− , r+ ] can be achieved by combining a standard locality-sensitive hash family with a distance-sensitive family that has an increasing CPF. On the d-dimensional unit sphere under inner product similarity, our strongest construction for solving the annulus search problem, described in section 2.2, allows us to search a point set P of unit vectors for a vector approximately orthogonal to a query vector q in time 2 ∗ dnρ +o(1) for ρ∗ = 1−α 1+α2 , where we guarantee to return a vector x with hx, qi ∈ [−α, α] if an orthogonal vector exists (a special case of Theorem 28). Approximate spherical range reporting [1] aims to report all points in P within distance r M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri from a query point. CPFs that have a (roughly) fixed value in [0, r] and then decrease rapidly to zero yield data structures with good output sensitivity. I Theorem 3. Suppose we have a set P of n points and two distances r < r+ . Assume we are given a distance-sensitive family with CPF f where f (r0 ) ≤ 1/n for all r0 ≥ r+ , and let fmin = inf t∈[0,r] f (t), fmax = supt∈[0,r] f (t). Then there exists a data structure that, given a query q, returns S ⊆ {x ∈ P | dist(q, x) ≤ r+ } such that for each x ∈ P with dist(q, x) ≤ r, ∗ Pr[x ∈ S] > 1/2. The data structure uses space O(n1+ρ + dn) and the query has expected ∗ running time O(dnρ + d|S|fmax /fmin ), where ρ∗ = log(1/fmin )/ log(1/f (r+ )). In particular, if we have a constant bound on fmax /fmin the output sensitivity is optimal in the sense that the time to report an additional close point is O(d) which is the time it takes to verify its distance to the query point. CPFs with this property are implicit in the linear space extremes of the space-time tradeoff techniques for similarity search [4, 13], but a better value of ρ∗ could possibly be obtained by allowing a higher space usage. We note that the assumption f (r+ ) ≤ 1/n in both theorems is not critical: the standard technique of powering (see Lemma 6) allows us to work with the CPF f (x)k for integer k, where k is the smallest integer such that f (x)k ≤ 1/n. The proofs of the theorems, which follow strictly along the lines of proofs for the standard LSH data structure in [19], are sketched in Appendix A for completeness. Constructions and lower bound. Section 2 presents our constructions of distancesensitive hash families. As a warm-up we consider a simple construction of a distance-sensitive hash family with an increasing CPF for Hamming space building upon the well-known bitsampling approach from [19]. While bit-sampling is in a certain sense optimal [26] as a locality-sensitive hash family with decreasing CPF w.r.t. the gap of collision probabilities at distance r and cr, it turns out that it is possible to find distance-sensitive hash families with CPFs that have a larger gap between the collision probabilities at distances r and r/c. We describe two such families. The central tool in both constructions is the projection of vectors x ∈ Rd to R by taking the inner product hx, zi where z ∼ N d (0, 1). This is a well-known technique in the locality-sensitive hashing literature and it has been used in many constructions of locality-sensitive families [15, 4, 13]. In our first construction, we consider an asymmetric version of the classical E2LSH family [15] for Euclidean space, namely sampling pairs (h, g) with j k j k h : x 7→ ha,xi+b , g : x 7→ ha,xi+b + k, (1) w w where b ∈ [0, w] is uniformly random and a ∼ N d (0, 1) is a d-dimensional random Gaussian vector. We show that this method, for suitable choice of parameters w ∈ R and k ∈ N, provide a near-optimal gap of 1/c2 + o(1) in the ratio of the logarithms of collision probabilities between close points at distance r and very close points at distance r/c. This is surprising, since the classical E2LSH is not optimal as an LSH for Euclidean space [3]. In order to find a lower bound for the gap in the collision probabilities, we consider vectors x, y ∈ {0, 1}d that are random and α-correlated, i.e., for each i ∈ {1, . . . , d} we have 2 Pr[xi = yi ] = 1+α 2 independently. The expected Euclidean squared distance is E[||x − y||2 ] = (1 − α)d/2, and by applying a Chernoff bound we have that for large d the distance is within a factor 1 + od (1) of the expectation with high probability. We show the following lower bound: I Theorem 4. Let D be a distribution over pairs of functions h, g : {0, 1}d → R, and define fˆ: [−1, 1] → [0, 1] by fˆ(α) = Pr[h(x) = g(y)] where x, y are randomly α-correlated and (h, g) 1+α is sampled according to D. Then for every 0 ≤ α < 1 we have that fˆ(α) ≥ fˆ(0) 1−α . XX:3 XX:4 Distance-sensitive hashing That is, the collision probability for α-correlated vectors cannot be too much smaller than the collision probability for random (0-correlated) vectors, a statement dual to standard (symmetric) LSH to Euclidean p lower bounds [22, 6, 26]. Since correlation 0 corresponds p distance r = d/2 and correlation α to Euclidean distance r/c = (1 − α)d/2 it follows that the lower bound on the collision probability can also be stated in terms of Euclidean √ distance with approximation factor c = 1/ 1 − α. Then the exponent of the bound is 2 2−1/c 1+α 2 1−α = 1/c2 = 2c − 1. This matches the exponent shown for (1) in section 2.1 up to a constant factor, but a gap remains. Using our second construction that is based on the recently-discovered concept of locality-sensitive filters [7] and takes ideas from [4] and [13], it turns out that the lower bound can be matched up to a lower-order term in the exponent on the unit sphere. I Theorem 5. Let ε > 0 be constant. For every t > 0 there exists a family D− of distancesensitive functions for (Sd−1 , h·, ·i) with CPF f such that for α ∈ [−1 + ε, 1 − ε] we have that ln(1/f (α)) = 1+α t2 1−α 2 + Θ(log t) The complexity of sampling, storing, and evaluating (h, g) ∈ D is O(dt4 et (2) 2 /2 ). Note that this shows the exponent in Theorem 4 is tight up to an additive ot (1) term. Finally, in section 2.3 we consider the following natural question: Let P (t) be a polynomial. Does there exist a distance-sensitive hash family with CPF f (t) = P (t)? We present two general approaches of constructing CPFs for the unit sphere and Hamming space that cover a wide range of such polynomials. 1.2 Related work A substantial literature has been devoted to the study of locality-sensitive hashing (LSH). Here we review only selected results, and refer to [36] for a comprehensive survey. For simplicity we consider only LSH constructions that are isometric in the sense that the probability of a hash collision depends only on the distance dist(x, y). In other words, there exists a collision probability function (CPF) f : R → [0, 1] such that Pr[h(x) = h(y)] = f (dist(x, y)). Almost all LSH constructions whose collision probability has been rigorously analyzed are isometric. Notable exceptions are recent data dependent LSH methods such as [5] where the LSH distribution, and thus the collision probabilities, depends on the structure of data. ρ-values. Much attention has been given to optimal ρ-values of locality-sensitive hash functions, where we consider non-increasing CPFs. Suppose we are interested in hash collisions when dist(x, y) = r1 but want to avoid hash collisions when dist(x, y) ≥ r2 , for some r2 > r1 . The ρ-value of this setting is the real number in [0, 1] such that f (r1 ) = f (r2 )ρ ; it measures the gap between collision probabilities f (r1 ) and f (r2 ). The ρ-value determines the performance of LSH-based data structures for the (r1 , r2 )-approximate near neighbor problem: Assume that it takes O(d) time to sample and evaluate a locality-sensitive hash function and compute a distance between two points. Then we can preprocess a point set P of n points in time O(d n1+ρ ) such that for a query point q from which there exists a point in P within distance r1 , you can return x ∈ P within distance r2 of q in time O(dnρ ). In many spaces a good upper bound on ρ can be given in terms of the ratio c = r2 /r1 , but in general the smallest possible ρ can depend on r1 , r2 , f (r1 ), as well as the number of dimensions d. In this paper we consider collision probabilities of the form Pr[h(x) = g(y)]; as stated in Theorem 2 and Theorem 3 it remains relevant to compare collision probabilities using M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri 0.25 0.25 0.20 0.20 0.15 0.15 0.10 0.10 0.05 0.05 5 10 15 20 XX:5 5 10 15 20 Figure 1 Composing several unimodal CPFs (left) to form a plateau CPF (red curve on the right) using Lemma 6. Such a CPF is particularly interesting when applying Theorem 3. ρ-values, but we are not limited to non-increasing CPFs so the design space is significantly larger. LSHable functions. Charikar [10] gave a necessary condition that all CPFs in the symmetric setting must fulfill, namely, dist(x, y) = 1 − Pr[h(x) = h(y)] must be the distance measure of a metric, and more specifically this metric must be isometrically embeddable in `1 . In the asymmetric setting this condition no longer holds as can be seen, for example, by noting that we can obtain dist(x, x) = 1 − Pr[h(x) = g(x)] > 0. Chierichetti and Kumar [11, Lemma 7] considered transformations that can be used to create new CPFs. Though they are considered in a symmetric setting, the same constructions apply in an asymmetric setting and give the following result: I Lemma 6. Let {Di }ni=1 be a collection of n distance-sensitive families with CPFs {fi }ni=1 . Qn (a) There exists a distance-sensitive family Dconcat with CPF f (x) = i=1 fi (x). (b) Given a probability distribution {pi }ni=1 over {Di }, there exists a distance-sensitive family Pn Dp with CPF f (x) = i=1 pi fi (x). Figure 1 shows an example application of Lemma 6. For completeness we present a proof of Lemma 6 in Appendix B.1. Interestingly, at least in the symmetric setting, the application of this lemma to a single CPF yields all transformations that are guaranteed to map a CPF to a CPF. Chierichetti et al. [12] recently extended the study of CPFs in the symmetric setting to allow approximation, i.e., allowing the collision probability to differ from a target function by a given approximation factor. Asymmetric locality-sensitive hashing. Motivated by applications in machine learning, Vijayanarasimhan et al. [35] presented asymmetric LSH methods for Euclidean space where the collision probability is a decreasing function of |hx, yi|. Shrivastava and Li [31] also explored how asymmetry can be used to achieve new CPFs (increasing), in settings where the inner product of vectors is used to measure closeness. Neyshabur and Srebro [24] extended this study by showing that the extra power obtained by asymmetry hinges on restrictions on the vector pairs for which we consider collisions: If vectors are not restricted to a bounded region of Rd , no nontrivial CPF (as a function of inner product) is possible. On the other hand, if one vector is normalized (e.g. a query vector), the performance of known asymmetric LSH schemes can be matched with a symmetric method. But in the case where vectors are bounded but not normalized, asymmetric LSH is able to obtain CPFs that are impossible for symmetric LSH. Ahle et al. [2] showed further impossibility results for asymmetric LSH applied to inner products, and that symmetric LSH is possible in a bounded domain even without normalization if we just allow collision probability 1 when vectors coincide. XX:6 Distance-sensitive hashing In section 3.2 we show that asymmetry does not help us when attempting to distinguish between random and positively correlated points in the Hamming cube using distance-sensitive hashing. Stated in terms of the ρ-value we get that ρ ≥ 1/(2c−1)−od (1) for distance-sensitive hashing, matching tight lower bounds from the symmetric LSH setting [22, 6]. We note that the asymmetric lower bound also follows implicitly from recent space-time tradeoff lower bounds [4, 13]. Indyk [17] showed how asymmetry can be used to enable new types of embeddings. More recently asymmetry has been used in the context of locality-sensitive filters [4, 13] and maps [14]. The idea is to map each point x to a pair of sets (h(x), g(x)) such that Pr[h(x) ∩ g(y) 6= ∅] is constant if x and y are close, and very small if x and y are far from each other. This yields a similarity search data structure that adds for each vector x ∈ P the elements of h(x) to a hash table; a query for a vector q proceeds by looking up each key in g(q) in the hash table. One can transform such methods into asymmetric LSH methods by using min-wise hashing [8, 9] to sample a single element from each of the sets h(x) and g(x) (see [13, Theorem 1.4]). Recommender systems. Returning to our motivating example we are not the first to address the topic of getting “interesting” recommendations using similarity search methods. Indyk et al. [18] build a similarity search data structure on a core-set of P to guarantee diverse query results. However, this method effectively discards much of the data set, so may not be suitable in all settings. Pagh et al. [27] consider the type of annulus queries that is interesting for recommendation, but their solution does not use the LSH framework and is limited to Euclidean space. 2 Constructions Bit sampling [19] is one of the simplest LSH families for Hamming space, yet gives optimal ρ-values in terms of the approximation factor [26]. Its CPF is f (t) = 1 − t, where t is the relative Hamming distance. By using a function pair (x 7→ xi , x 7→ 1 − xi ) where i ∈ {1, . . . , d} is random, we get a simple asymmetric distance-sensitive family for Hamming space whose CPF f (t) = t, is monotonically increasing in the relative Hamming distance. We refer to increasing CPFs as anti-LSH, and the specific family as anti bit-sampling (because it gives a collision exactly when bit-sampling would not). Formally we have the family Hab = {(hi , gi ) | 1 ≤ i ≤ d, hi , gi : {0, 1}d → {0, 1}, hi : x 7→ xi , gi : x 7→ 1 − xi }, which has CPF f (t) = t. Anti-LSH is relevant since by concatenating an anti-LSH with a standard LSH, multiplying the CPFs (cf. Lemma 6(b)), we get unimodal CPFs that can be used to answer annulus queries. Let us set r− = r/c and r+ = cr for some r > 0 and c > 1. Let f + and f − denote the CPFs of the LSH and anti-LSH families. Then, by Theorem 2, the annulus problem can be solved with ρ∗ ≤ ρ+ + ρ− , where ρ+ = log(f + (r))/ log(f + (cr)) and ρ− = log(f − (r))/ log(f − (r/c)). For anti bit-sampling, we get that ρ− = Θ(1/ log c) as soon as r (normalized in [0, 1]) is a constant factor from 1, and hence ρ∗ = Θ(1/ log c). Perhaps surprisingly, this anti-LSH approach is not optimal and a better result, with ρ∗ = O(1/c), follows by using an anti-LSH construction for Euclidean space proposed in section 2.1 and an anti-LSH based on filters for the unit sphere proposed in section 2.2, both yielding ρ− = O(1/c2 ). It is natural to wonder if more advanced CPFs can be obtained. We provide some results in this direction by describing in Section 2.3 two constructions yielding a wide class of CPFs. M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri 2.1 XX:7 An Anti-LSH construction in Euclidean Space A simple and elegant distance-sensitive hash family in Euclidean space is given by a natural extension of the locality-sensitive hash family introduced by Datar et al. [15], where we project a point onto a line and split this line up into buckets. Let k and w be two suitable parameters to be chosen below. Consider the family of pairs of functions (h, g) with     ha, xi + b ha, yi + b h : x 7→ , g : y 7→ + k, w w indexed by a uniform real number b ∈ [0, w] and a d-dimensional random Gaussian vector a ∼ N d (0, 1). We have the following result: I Theorem 7. Let r− and r be two real values such that 0 < r− < r, and let c = r/r− . We have that log(1/f (r)) 1 ρ− = = 2 + oc,k (1). log(1/f (r− )) c Proof. For the sake of simplicity we assume r = 1 in the analysis (otherwise it is enough to scale down vectors accordingly). Let x and y be two points in Rd with distance ∆. We know that for a ∼ N d (0, 1) the inner product ha, (x − y)i is distributed as N (0, ∆). A necessary but not sufficient condition to have a collision between x and y is that ha, (x − y)i lies in the interval [(k − 1)w, (k + 1)w]. Now, if t := ha, (x − y)i ∈ [(k − 1)w, kw], then the random offset b must lie in an interval of length t − (k − 1)w, putting ha, xi and ha, yi − (k − 1)w into different buckets. For the interval [kw, (k + 1)w] similar observations show that b has √ 2 to be chosen in an interval of length (k + 1)w − t. Let φ(t) = 1/ 2πe−t /2 be the density function of a standard normal random variable. Similarly to the calculations in [15], the collision probability at distance ∆ can be calculated as follows:      ha, yi + b ha, xi + b f (∆) = Pr − =k w w     Z kw Z (k+1)w φ(t/∆) t φ(t/∆) t φ(kw/∆) = − (k − 1) dt + k+1− dt − ∆ w ∆ w ∆ (k−1)w kw !     Z Z kw (k+1)w (kw)2 t2 t2 1 t t − 2∆ − − 2 =√ e − (k − 1) dt + e 2∆2 k + 1 − dt − e 2∆2 . w w 2π∆ (k−1)w kw We now proceed to upper bound ρ− by finding an upper bound on f (1/c) and a lower bound on f (1). Simple calculations give an upper bound of 2 2wc f (1/c) ≤ √ e−(c(k−1)w) /2 . 2π (3) For the lower bound, we only look at the interval t ∈ [kw, (k + 1/2)w] and obtain the bound:   Z (k+1/2)w 2 2 1 t w − t2 f (1) ≥ √ k+1− dt ≥ √ e−((k+1/2)w) /2 . e (4) w 2π kw 4 2π Now we multiply the ratio of the logarithms of the right-hand sides of (3) and (4) with c2 and look at the limit behavior for c → ∞. We obtain that     2 2 1 log 4√w2π e−((k+1/2)w) /2 2 log 4√w2π e− 8 (2kw+w) )   c2 = − lim , 2 /2 c→∞ 2wc (k − 1)2 w2 −(c(k−1)w) log √2π e XX:8 Distance-sensitive hashing 1.5 1.5 1.5/c^2 1.5/c^2 1.0 Limit Behavior 1.0 Limit Behavior Rho Upper Rho Exact 0.5 1.5 2.0 2.5 3.0 3.5 Rho Upper Rho Exact 0.5 4.0 1.5 2.0 2.5 3.0 3.5 4.0 Figure 2 Graph depicting differences between the upper and exact bounds on the ρ− value of the Euclidean space anti-LSH. The ρ− value is depicted on the y-axis, the approximation factor c on the x-axis. The graph also shows the behavior of f (∆) in the limit when k and w go to ∞, and the function 1.5/c2 . Left: Parameter setting k = 4, w = 1; right: parameter setting k = 9, w = 1. and notice that the right-hand side goes to 1 for k → ∞ and arbitrary w > 0. This shows the claimed result. J The result of Theorem 7 only holds for large k. For fixed k, ρ− behaves asymptotically as + oc,w (1). For example, numerical calculations for k = 9 and w = 1 give an upper − bound on the ρ− value of 1.5 c2 . Figure 2 compares the exact ρ value and our upper bound for two choices of parameters. (2k+1)2 4c2 (k−1)2 2.2 Optimal monotonic distance-sensitive hashing for the unit sphere In this section we will show how to construct distance-sensitive hash families with monotonically increasing and decreasing CPFs for the unit sphere under inner product similarity that match the lower bounds shown in section 3. In particular we will prove Theorem 5 by showing the existence of a family D− with a CPF f− : [−1, 1] → [0, 1] that is monotonically decreasing in the similarity between points sim(x, y) = hx, yi. The construction of D− follows as a corollary from the construction of a family D+ with a CPF f+ that is monotonically increasing in the similarity, and in fact, we have that f+ (α) = f− (−α) when D+ and D− are parameterized in the same way. As an application of these families we show how they can be combined to yield powerful solutions to the approximate annulus search problem for a large, natural class of annuli. This application is further described in Appendix D. The main new contribution compared to existing filter approaches [4, 13] is to make use of the asymmetry granted by (h, g) ∼ D− to show the existence of a family with a monotonically decreasing CPF. Furthermore, our analysis makes use of powerful tail bounds for the bivariate normal distribution [30] that allows us to provide guarantees for D− , D+ that span the entire range of similarities. The distance-sensitive families. We begin by describing the family D+ . The family takes as parameter a real number t > 0 and an integer m that we will later set as a function of t. We sample a pair of functions (h, g) from D+ by sampling m vectors z1 , . . . , zm where zi ∼ N d (0, 1). The functions h, g map a point x ∈ Sd−1 to the index i of the first projection zi where hzi , xi ≥ t. If no such projection is found, then we ensure that h(x) 6= g(x) by mapping them to different values. Formally, we set h+ (x) = min({i | hzi , xi ≥ t} ∪ {m + 1}), g+ (x) = min({i | hzi , xi ≥ t} ∪ {m + 2}). The collision probability for (h, g) ∼ D+ depends only on the similarity α = hx, yi between M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri the pair of points being evaluated and is given by f+ (α) = Pr[h(x) = g(y)] = Pr[h(x) ≤ m ∧ g(y) ≤ m] Pr[hz, xi ≥ t ∧ hz, yi ≥ t] . Pr[hz, xi ≥ t ∨ hz, yi ≥ t] The only way the family D− differs from D+ is in the definition of g− (x) where we replace the condition as follows: g− (x) = min({i | hzi , xi ≤ −t} ∪ {m + 2}). The collision probability f− (α) of D− follows analogously. We observe the following connection between D+ and D− . I Lemma 8. Given D+ and D− with identical parameters we have that f+ (α) = f− (−α). with correlation α can be represented as a Proof. A bivariate normally distributed variable √ pair (X, Y ) with X = Z1 and Y = αZ1 + 1 − α2 Z2 where Z1 , Z2 are i.i.d. standard normal. By the symmetry of the standard √ normal distribution around zero it√is straightforward to verify that Pr[Z1 ≥ t ∧ αZ1 + 1 − α2 Z2 ≥ t] = Pr[Z1 ≥ t ∧ −αZ1 + 1 − α2 Z2 ≤ −t]. J Bounding the CPF. We use tail bounds for the standard normal distribution and the tail bounds by Savage [30] for the bivariate standard normal distribution in order to obtain the following lemma, the details of which are provided in Appendix C. We remark that this lemma provides also bounds for f− (α) through the observation in Lemma 8. I Lemma 9. For every t > 0 and α ∈ (−1, 1) the family D+ satisfies   1 t + 1 (1 + α)2 1 − α t2 ¯ √ f+ (α) < f+ (α) := √ , exp − 1+α 2 2π t2 1 − α2   (2 − α)(1 + α) 1 t ¯ f+ (α) > 1 − f+ (α) − 2 exp(−t3 ). 2 1−α t t+1 The complexity of sampling, storing, and evaluating a pair of functions (h, g) ∈ D+ is 2 O(dt4 et /2 ). Results. Combining the above ingredients show Theorem 5. We also note that a similar statement holds for D+ : I Corollary 10. Theorem 5 holds for D+ with the CPF bound ln(1/f (α)) = 1 − α t2 + Θ(log t). 1+α 2 Results on the unit sphere can be extended to `s -spaces for 0 < s ≤ 2 through the embedding result by Rahimi and Recht [29] as shown in [13]. A more careful analysis of the collision probabilities is required in order to combine the families D− and D+ to form a unimodal family that can be used to solve the annulus search problem, see Theorem 2. These results are stated in Appendix D. 2.3 General constructions So far we have focused our attention on anti-LSH constructions, which just represent one kind of distance-sensitive functions. We now overview general constructions targeting wider classes of CPFs. XX:9 XX:10 Distance-sensitive hashing Angular similarity functions We say that sim : [−1, 1] → [0, 1] is an LSHable angular similarity function if there exists a distance-sensitive hash family S with collision probability function sim(hx, yi) for each x, y ∈ Sd−1 . For example, the function sim(t) = 1 − arccos(t)/π is LSHable using the SimHash construction of Charikar [10]. P d Valiant [34] described a pair of mappings ϕP RD , where D = O(dk ), such 1 , ϕ2 : R → P k P P that ϕ1 (x) · ϕ2 (y) = P (hx, yi), for any polynomial P (t) = i=0 ai ti . By leveraging this construction, it is possible to derive the following result (see Appendix B.2 for the proof). I Theorem 11. Suppose that sim is an LSHable angular similarity function and that the Pk Pk polynomial P (t) = i=0 ai ti satisfies i=0 |ai | = 1. Then there exists a distribution over pairs (h, g) of functions such that for all x, y ∈ S d−1 , Pr[h(x) = g(y)] = sim(P (hx, yi)). The computational cost of a naïve implementation of the proposed scheme may be prohibitive when dk is large. However, by using the so-called kernel approximation methP ods [28], we can in near-linear time compute approximations ϕ̂P 1 (x) and ϕ̂2 (y) that satisfy P ϕ̂P 1 (x) · ϕ̂2 (y) = P (hx, yi) ± ε with high probability for a given approximation error ε > 0. Hamming distance functions For Hamming space, it is natural to wonder which CFPs can be expressed as a function of the relative Hamming distance dh (x, y). A first positive answer follows by using the anti bit-sampling approach mentioned at the beginning of this section together with Lemma 6. Pk Pk This gives a scheme for matching any polynomial P (t) = i=0 ai ti that satisfies i=0 ai = 1 and ai > 0 for each i. In this section, we provide another construction that matches, up to a scaling factor ∆, any polynomial P (t) having no roots with a real part in (0, 1). The scaling factor depends only on the roots of the polynomial. We have the following result that is proven in Appendix B.3: Pk I Theorem 12. Let P (t) = i=0 ai ti , Z be the multiset of roots of P (t), and ψ ≤ k be the number of roots with negative real part. Then there exists a distance-sensitive hash family Q with collision probability Pr(h(x) = g(y)) = P (dh (x, y)) /∆ with ∆ = ak 2ψ z∈Z,|z|>1 |zi |. Q The construction exploits the factorization P (t) = ak z∈Z (t − z) and consists of a combination of |Z| variations of bit-sampling and anti bit-sampling. We refer to Theorem 12 in Appendix B.3 for the construction. Although the proposed scheme may not reach the ρ value given by the polynomial P (t), it can be used for estimating P (dH (x, y)) since the scaling factor is constant and only depends on the polynomial. We remark that a scaling factor ∆ is unavoidable in the general case. Otherwise, it would be possible to match the CFP 1 − t2 for Hamming space, which implies ρ ≤ 1/c2 in contradiction with the lower bound 1/c in [26]. However, it is an open question to provide better bounds on ∆. Finally, we observe that our scheme can be used to approximate any function f (t) that can be represented with a Taylor series: indeed, it is sufficient to truncate the series to the term that gives the desired approximation, and then to apply our construction to the resulting truncated polynomial. 3 Lower bound In this section we will show lower bounds on the CPFs of distance-sensitive families in Hamming space under relative Hamming distance. These results extend to the unit sphere M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri XX:11 and Euclidean space through standard embeddings. Our primary focus will be to obtain a lower bound for the case of a CPF that is increasing with the distance, i.e., decreasing in the similarity. As with our upper bounds for the unit sphere, re-applying the same techniques also yields a lower bound for the case of an increasing CPF in the similarity. The proof combines the (reverse) small-set expansion theorem by O’Donnell [25] with techniques inspired by the LSH lower bound of Motwani et al. [22]. The reverse small-set expansion theorem lower bounds the probability that random α-correlated points (x, y) end up in a pair of subsets A, B of the Hamming cube, as a function of the size of the subsets. The main contribution here is to extend this lower bound for pairs of subsets of Hamming space to our object of interest: distributions over pairs of functions that partition space. We begin by introducing the required tools from [25]. I Definition 13. For 0 ≤ α ≤ 1 we say that (x, y) are α-correlated if x is chosen uniformly at random from {0, 1}d and y is constructed by rerandomizing each bit from x independently at random with probability 1 − α. In the following we refer to the volume of A ⊂ {0, 1}d as |A|/2d . I Theorem 14 (Reverse Small-Set Expansion). Let 0 ≤ α ≤ 1. Let A, B ⊆ {0, 1}d have volumes exp(−a2 /2), exp(−b2 /2), respectively, where a, b ≥ 0. Then we have that   1 a2 + 2αab + b2 Pr [x ∈ A, y ∈ B] ≥ exp − . 2 1 − α2 (x,y) α-corr. We define a probabilistic version of the probability collision function that we will state results for. Later we will apply concentration bounds on the similarity between α-correlated pairs of points in order to make statements about the actual CPF. We will use R to denote the range of a family of functions which, without loss of generality, we can assume to be finite. I Definition 15 (Probabilistic CPF). Let D be a distribution over pairs h, g : {0, 1}d → R and 0 ≤ α < 1. Then we define the probabilistic CPF fˆ: [0, 1] → [0, 1] by fˆ(α) = Pr [h(x) = g(y)]. (h,g)∼D (x, y) α-corr. We are now ready to state our main lemma that lower bounds fˆ(α) in terms of fˆ(0). This immediately implies Theorem 4. I Lemma 16. For every distribution D over pairs of functions h, g : {0, 1}d → R and every 1+α 0 ≤ α < 1 we have that fˆ(α) ≥ fˆ(0) 1−α . d Proof. For a function h : {0, 1}d → R define its inverse h−1 : R → 2{0,1} by h−1 (i) = {x ∈ {0, 1}d | h(x) = i}. For a pair of functions (h, g) ∈ D and i ∈ R we define ah,i , bg,i ≥ 0 such that |h−1 (i)|/2d = exp(−a2h,i /2) and |g −1 (i)|/2d = exp(−b2g,i /2). For fixed (h, g) define fˆh,g (α) = Pr(x, y) α-corr. [h(x) = g(y)]. We obtain a lower bound on fˆ(α) in the following XX:12 Distance-sensitive hashing way: " fˆ(α) = # X E (h,g)∼D i∈R Pr [h(x) = g(y) = i] (x, y) α-corr. " 1 a2h,i + 2αah,i bg,i + b2g,i ≥ E exp − 2 1 − α2 (h,g)∼D i∈R " !# X 1 a2h,i + b2g,i ≥ E exp − 2 1−α (h,g)∼D X !# (5) (6) i∈R ≥ E (h,g)∼D 1+α fˆh,g (0) 1−α  ≥ E (h,g)∼D 1+α  1−α ˆ fh,g (0) (7) (8) 1+α = fˆ(0) 1−α Inequality (5) is due to Theorem 14. Inequality (6) follows from the simple fact that a2 + α(a2 + b2 ) + b2 ≥ a2 + 2αab + b2 . Inequality (7) follows from the result of an optimization problem further described in Appendix E.1. Finally, inequality (8) follows from a standard application of Jensen’s Inequality. J 3.1 Bounding the CPF We will use Lemma 16 to a show a lower bound for distance-sensitive families that have the opposite properties of locality-sensitive hash families. Our lower bound holds for “similarity”sensitive hash families, where we replace the distance function in the space (X, dist) in Definition 1 by a space (X, sim) equipped with similarity measure sim : X × X → [0, 1]. The following definition covers both standard locality-sensitive hash families and families having the opposite behavior from a similarity perspective. I Definition 17 (Similarity-[in]sensitive hash families). Let D be a similarity-sensitive family for (X, sim) with CPF f . We say that D is (α− , α+ , f− , f+ )-[in]sensitive if it satisfies: For α ≤ α− we have that f (α) ≤ f− [f (α) ≥ f− ]. For α ≥ α+ we have that f (α) ≥ f+ [f (α) ≤ f+ ]. We state our results in the natural similarity-version of Hamming space that also corresponds to embedding Hamming space into the unit sphere, namely the space ({0, 1}d , simH ) where simH (x, y) = 1 − 2 kx − yk1 /d. In the following theorem we extend the lower bound from Lemma 16 that considers the relation between fˆ(0) and fˆ(α) to a wider range of parameters 0 < α− < α+ < 1 and we consider the relation between f (α− ) and f (α+ ). The proof has been deferred to Appendix E.2. I Theorem 18. Let 0 < α− < α+ < 1 be constants. Then every (α− , α+ , f− , f+ )-insensitive family D for ({0, 1}d , simH ) must satisfy p log(1/f− ) 1 − α+ ≥ − O( log(1/f+ )/d). log(1/f+ ) 1 + α+ − 2α− I Remark. In the statement of Theorem 18 we may replace the properties from Definition 17 that hold for every α ≤ α− and every α ≥ α+ with less restrictive versions that hold in an ε-interval around α− , α+ for some ε = od (1). M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri I Remark. If we rewrite the bound in terms of relative Hamming distances δ and δ/c where δ, c are constants, we obtain a lower bound of 1/(2c − 1) − od (1) — an expression that is familiar from known LSH lower bounds [22, 6]. 3.2 The other direction We can re-apply the techniques behind Lemma 16 and Theorem 18 to state similar results in the other direction where for α− < α+ we are interested in upper bounding f (α+ ) as a function of f (α− ). This is similar to the well-studied problem of constructing LSH lower bounds and our results match known LSH bounds [22, 6], indicating that the asymmetry afforded by D does not help us when we wish to construct similarity-sensitive families with monotonically increasing CPFs. Implicitly, this result already follows from the space-time tradeoff lower bounds for similarity search shown independently by Andoni et al. [4] and Christiani [13]. As with Lemma 16, the following theorem by O’Donnell [25] is the foundation of our lower bounds. I Theorem 19 (Generalized Small-Set Expansion). Let 0 ≤ α ≤ 1. Let A, B ⊆ {0, 1}d have volumes exp(−a2 /2), exp(−b2 /2) and assume 0 ≤ αb ≤ a ≤ b. Then,   1 a2 + 2αab + b2 . Pr [x ∈ A, y ∈ B] ≥ exp − 2 1 − α2 (x,y) α-corr. I Lemma 20. For every distribution D over pairs of functions h, g : {0, 1}d → R and every 1−α 0 ≤ α < 1 we have that fˆ(α) ≤ fˆ(0) 1+α . I Remark. The restriction from Theorem 19 that 0 ≤ αb ≤ a ≤ b can be ignored when attempting to upper bound fˆ in the proof of Lemma 20 as further asymmetry does not increase the probability of collision. The solution to the optimization problem underlying the lower bound in Lemma 20 has a = b regardless. We are now ready to state the corresponding result for similarity-sensitive families. I Theorem 21. Let 0 < α− < α+ < 1 be constants. Then every (α− , α+ , f− , f+ )-sensitive family D for ({0, 1}d , simH ) must satisfy p log(1/f+ ) 1 − α+ ≥ − O( log(1/f− )/d). log(1/f− ) 1 + α+ − 2α− 4 Conclusion We have initiated the study of distance-sensitive hashing, an asymmetric class of LSH methods that considerably extend the capabilities of standard LSH. We proposed some applications and described different constructions of such hash families. Though we settled some basic questions regarding what is possible using distance-sensitive hashing, many questions remain. Ultimately, one would like for a given space a complete characterization of the CPFs that can be achieved, with emphasis on extremal properties. For example: For a CPF that has f (x) = Θ(ε) for x ∈ [0, r], how small a value ρ(c) = log(f (r))/ log(f (cr)) is possible outside of this range? Additionally, our solution to the annulus problem works by combining an LSH and an anti-LSH family to obtain a unimodal family. While we know lower bounds for both, it is not clear whether combining them yields optimal solutions for this problem. Moreover, it is also of interest to consider other applications in approximation algorithms. For example, CPFs appear relevant for efficient kernel density estimation, see, e.g. [20]. Acknowledgement. We thank Thomas D. Ahle for insightful conversations. XX:13 XX:14 Distance-sensitive hashing References 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Thomas D. Ahle, Martin Aumüller, and Rasmus Pagh. Parameter-free locality sensitive hashing for spherical range reporting. In Proceedings of 28th Symposium on Discrete Algorithms (SODA), pages 239–256, 2017. doi:10.1137/1.9781611974782.16. Thomas Dybdahl Ahle, Rasmus Pagh, Ilya P. Razenshteyn, and Francesco Silvestri. On the complexity of inner product similarity join. In Proceedings of 35th ACM Symposium on Principles of Database Systems (PODS), pages 151–164, 2016. doi:10.1145/2902251. 2902285. Alexandr Andoni and Piotr Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. In Proceedings of 47th Annual Symposium on Foundations of Computer Science (FOCS), pages 459–468, 2006. doi:10.1109/FOCS.2006.49. Alexandr Andoni, Thijs Laarhoven, Ilya P. Razenshteyn, and Erik Waingarten. Optimal hashing-based time-space trade-offs for approximate near neighbors. In Proceedings of 28th Annual Symposium on Discrete Algorithms (SODA), pages 47–66, 2017. doi:10.1137/1. 9781611974782.4. Alexandr Andoni and Ilya P. Razenshteyn. Optimal data-dependent hashing for approximate near neighbors. In Proceedings of 47th Annual Symposium on Theory of Computing (STOC), pages 793–801, 2015. doi:10.1145/2746539.2746553. Alexandr Andoni and Ilya P. Razenshteyn. Tight lower bounds for data-dependent localitysensitive hashing. In Proceedings of 32nd International Symposium on Computational Geometry (SoCG), pages 9:1–9:11, 2016. doi:10.4230/LIPIcs.SoCG.2016.9. Anja Becker, Léo Ducas, Nicolas Gama, and Thijs Laarhoven. New directions in nearest neighbor searching with applications to lattice sieving. In Proceedings of the 27th Symposium on Discrete Algorithms (SODA), pages 10–24, 2016. doi:10.1137/1. 9781611974331.ch2. Andrei Z Broder. On the resemblance and containment of documents. In Proceedings of Compression and Complexity of Sequences, pages 21–29. IEEE, 1997. Andrei Z Broder, Steven C Glassman, Mark S Manasse, and Geoffrey Zweig. Syntactic clustering of the web. Computer Networks and ISDN Systems, 29(8-13):1157–1166, 1997. Moses Charikar. Similarity estimation techniques from rounding algorithms. In Proceedings of 34th ACM Symposium on Theory of Computing (STOC), pages 380–388, 2002. Flavio Chierichetti and Ravi Kumar. Lsh-preserving functions and their applications. Journal of the ACM (JACM), 62(5):33, 2015. Flavio Chierichetti, Alessandro Panconesi, Ravi Kumar, and Erisa Terolli. The distortion of locality sensitive hashing. In Proceedings of ACM Conference on Innovations in Theoretical Computer Science (ITCS), 2017. Tobias Christiani. A framework for similarity search with space-time tradeoffs using localitysensitive filtering. In Proceedings of 28th Symposium on Discrete Algorithms (SODA), pages 31–46, 2017. Tobias Christiani and Rasmus Pagh. Set similarity search beyond minhash. In Proceedings of 49th Annual Symposium on Theory of Computing (STOC), to appear, 2017. Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab S. Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In Proceedings of the 20th Annual Symposium on Computational Geometry (SoCG), pages 253–262. ACM, 2004. Scott Deerwester, Susan T Dumais, George W Furnas, Thomas K Landauer, and Richard Harshman. Indexing by latent semantic analysis. Journal of the American Society for Information Science, 41(6):391, 1990. Piotr Indyk. Better algorithms for high-dimensional proximity problems via asymmetric embeddings. In Proceedings of 14th Symposium on Discrete Algorithms (SODA), pages 539–545, 2003. M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri 18 Piotr Indyk, Sepideh Mahabadi, Mohammad Mahdian, and Vahab S Mirrokni. Composable core-sets for diversity and coverage maximization. In Proceedings of 33rd Symposium on Principles of Database Systems (PODS), pages 100–108. ACM, 2014. 19 Piotr Indyk and Rajeev Motwani. Approximate nearest neighbors: Towards removing the curse of dimensionality. In Proceedings of 30th Annual ACM Symposium on the Theory of Computing (STOC), pages 604–613, 1998. 20 C. G. Lambert, S. E. Harrington, C. R. Harvey, and A. Glodjo. Efficient on-line nonparametric kernel density estimation. Algorithmica, 25(1):37–57, 1999. doi:10.1007/PL00009282. 21 M. Mitzenmacher and E. Upfal. Probability and computing. Cambridge University Press, New York, NY, 2005. 22 R. Motwani, A. Naor, and R. Panigrahy. Lower bounds on locality sensitive hashing. SIAM J. Discrete Math., 21(4):930–935, 2007. 23 Rajeev Motwani and Prabhakar Raghavan. Randomized algorithms. Chapman & Hall/CRC, 2010. 24 Behnam Neyshabur and Nathan Srebro. On symmetric and asymmetric lshs for inner product search. In Proceedings 32nd Conference on Machine Learning (ICML), pages 1926–1934, 2015. 25 Ryan O’Donnell. Analysis of Boolean Functions. Cambridge University Press, 2014. 26 Ryan O’Donnell, Yi Wu, and Yuan Zhou. Optimal lower bounds for locality-sensitive hashing (except when q is tiny). ACM Transactions on Computation Theory (TOCT), 6(1):5, 2014. 27 Rasmus Pagh, Francesco Silvestri, Johan Sivertsen, and Matthew Skala. Approximate furthest neighbor with application to annulus query. Information Systems, 64:152–162, 2017. 28 Ninh Pham and Rasmus Pagh. Fast and scalable polynomial kernels via explicit feature maps. In Proceedings of 19th International Conference on Knowledge Discovery and Data Mining (KDD), pages 239–247. ACM, 2013. 29 Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Proceedings of 21st Annual Conference on Neural Information Processing Systems (NIPS), pages 1177–1184, 2007. URL: http://papers.nips.cc/paper/ 3182-random-features-for-large-scale-kernel-machines. 30 I. R. Savage. Mill’s ratio for multivariate normal distributions. Jour. Res. NBS Math. Sci., 66(3):93–96, 1962. 31 Anshumali Shrivastava and Ping Li. Asymmetric LSH (ALSH) for sublinear time maximum inner product search (MIPS). In Proceedings of 27th Annual Conference on Neural Information Processing Systems (NIPS), pages 2321–2329, 2014. 32 S. J. Szarek and E. Werner. A nonsymmetric correlation inequality for gaussian measure. Journal of Multivariate Analysis, 68(2):193–211, 1999. 33 F. Topsœ. Some Bounds for the Logarithmic Function, volume 4, pages 137–151. Nova Science, 2007. 34 Gregory Valiant. Finding correlations in subquadratic time, with applications to learning parities and the closest pair problem. Journal of the ACM (JACM), 62(2):13, 2015. 35 Sudheendra Vijayanarasimhan, Prateek Jain, and Kristen Grauman. Hashing hyperplane queries to near points with applications to large-scale active learning. IEEE Trans. Pattern Anal. Mach. Intell., 36(2):276–288, February 2014. doi:10.1109/TPAMI.2013.121. 36 J. Wang, H. T. Shen, J. Song, and J. Ji. Hashing for similarity search: A survey. CoRR, abs/1408.2927, 2014. URL: http://arxiv.org/abs/1408.2927. XX:15 XX:16 Distance-sensitive hashing A A.1 Applications Unimodal CPFs for annulus queries Suppose we are given a distance-sensitive hash family with CPF f (t). In this section we prove Theorem 2 by using a simple adaptation of the standard construction of a near neighbor data structure with LSH. We observe that this data structure improves the trivial scanning solution when ρ∗ = log(1/f (r))/ log(1/n) < 1, that is when f (r) > f (r− ) and f (r) > f (r+ ). This is satisfied by unimodal distance-sensitive hash families, that is when the CPF has a single maximum at t∗ and is decreasing for both t ≤ t∗ and t ≥ t∗ : as soon as t∗ lies in the interval (r− , r+ ) we obtain a data structure with sublinear query time. Proof of Theorem 2. The data structure is a straight-forward adaptation of the construction of a near neighbor data structure using LSH. Associate with each data point x and query point y the hash values h(x) and g(y), where (h, g) are independently sampled from the distance-sensitive family. Store all points x ∈ S according to h(x) in a hash table. Let y be the query point and let x be a point at distance r. Compute g(y) and retrieve all the points from S that have the same hash value. If a point within distance [r− , r+ ] is among the points, output one such point. We expect max{f (r− )n, f (r+ )n} ≤ 1 collisions with points at distance at most r− or at least r+ . The probability of finding x is at least f (r). ∗ Thus, L = 1/f (r) ≤ nρ repetitions suffice to retrieve x with constant probability 1/e. If the algorithm retrieves more than 8L points, none of which is in the interval [r− , r+ ], the algorithm terminates. By Markov’s inequality, the probability that the algorithm retrieves 8L points, none of which is in the interval [r− , r+ ], is at most 1/8. J A.2 Plateau CPFs for spherical range reporting A common problem with LSH-based solutions for reporting all close points is that the CPF is monotonically decreasing starting with collision probability very close to 1 for points that are very close to the query point. On the other hand, many repetitions are necessary to find points at the target distance r. This means that the algorithm retrieves many duplicates for solving range reporting problems. The state-of-the-art data structure for range reporting queries [1] requires O ((1 + |S ∗ |)(n/|S ∗ |)ρ ), where S ∗ is the set of points at distance at most r+ . The following Theorem 3 provides a better analysis of the performance of a standard LSH data structure that takes into account the gap between fmin and fmax . Proof of Theorem 3. We assume that we build a standard LSH data structure as in the proof of Theorem 2 above. We use 1/fmin repetitions such that each point within distance r is found with constant probability. Each repetition will contribute O (1 + |S ∗ |fmax ) points in expectation. Thus, the total cost will be O ((1 + |S ∗ |fmax )/fmin ) from which the statement follows. J In particular, if we have a constant bound on fmax /fmin the output sensitivity is optimal. A technique for getting a CPF with a small fmax /fmin gap is to average several unimodal functions: given k such families, we randomly select one of them with probability 1/k. A graphical example is given in Figure 1. For a more concrete example in Hamming space, consider the scheme given by selecting with probability 1/2 a standard bit-sampling (f1 (t) = 1 − t), and with probability 1/2 a scheme consisting of bit-sampling and anti bit-sampling (f2 (t) = t(1 − t)). The resulting CPF is f (t) = (1 − t2 )/2, the gap is fmax /fmin = 1/(1 − t2 ). CPFs with constant bounds are implicit in the linear space extremes of the time-space M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri XX:17 0.8 0.60 0.7 0.55 0.6 0.5 0.50 0.4 0.45 0.3 0.40 -1.0 0.5 -0.5 1.0 -1.0 0.5 -0.5 1.0 Figure 3 Examples of collision probability functions obtained using Theorem 11. The polynomials used are t2 , −t2 , (−t3 + t2 − t)/3 (left), and (2t2 − 1)/3, (4t3 − 3t)/7, (8t4 − 8t2 + 1)/17, (16t5 − 20t3 + 5t)/41 (right). trade-off-aware techniques for similarity search [14], but a better value of ρ∗ could possibly be obtained by allowing a higher space usage. Since we use a standard LSH data structure for spherical range reporting, we get the following adaptive variant by using Algorithm 1 from [1]. I Corollary 22. Suppose we have a set P of n points and two distances r < r+ . Assume we have access to a distance-sensitive hash family with CPF f with fmin = inf t∈[0,r] f (t). Then Theorem 5.1 from [1] holds for " # X −k Wsingle = min fmin (1 + f (dist(q, x)) . 0≤k≤K B x∈S Distance-sensitive constructions B.1 Proof of Lemma 6 Proof. Let x, y be two arbitrary points from X. Part (a): Sample a pair (hi , gi ) from Di for each i ∈ {1, . . . , n} and set h(x) = (h1 (x), . . . , hn (x)) and g(y) = (g1 (y), . . . , gn (y)). We observe that Pr(h(x) = g(y)) = n Y Pr(hi (x) = gi (y)) = i=1 n Y fi (dist(x, y)). i=1 Part (b): Pick an integer i ∈ {1, . . . , n} according to {pi } at random. Then sample a pair (hi , gi ) from Di . The hash function pair (h, g) is given by (i, hi (x)) and (i, gi (y)). We observe that Pr(h(x) = g(y)) = n X i=1 pi Pr (h(x) = g(y)) = (h,g)∼Di n X pi fi (dist(x, y)). i=1 J B.2 Angular similarity function This section shows how to derive a distance sensitive scheme with collision probability Pk sim(P (hx, yi)), when i=0 |ai | = 1. Figure 3 gives some examples of functions that can be obtained from Theorem 11 using SimHash [10]. XX:18 Distance-sensitive hashing Proof of Theorem 11. Valiant [34] has shown how, for any real degree-k polynomial p, to construct a pair of mappings ϕp1 , ϕp2 : Rd → RD , where D = O(dk ), such that ϕp1 (x) · ϕp2 (y) = P (hx, yi). For completeness we outline the argument here: First consider the monomial P (t) = ak tk . For x ∈ Rd , let x(k) denote the vector of dimension dk indexed by vectors Qk (k) i = (i1 , . . . , ik ) ∈ [d]k , where xi = j=1 xij . It is easy to verify that hx(k) , y(k) i = (hx, yi)k p for all x, y ∈pRd . With this notation in place we can define ϕp1 (x) = |ai | x(k) and p p p ϕ2 (y) = (ai / |ai |) y(k) which satisfy ϕ1 (x) · ϕ2 (x) = ai (hx, y, )ik . The asymmetry of the mapping is essential to allow a negative coefficient ak . To handle an arbitrary real polynomial Pk P (t) = i=0 ai ti we simply concatenate vectors corresponding to each monomial, obtaining Pk a vector of dimension i=0 di = O(dk ). 2 Observe that ||x(k) ||22 = hx(k) , x(k) i = (hx, x, )ik = ||x||2k 2 . This means that for ||x||2 = 1 Pk p 2 Pk p 2 we have ||ϕ1 (x)|| = i=0 |ai | = 1, using i=0 |ai | = 1. Similarly, for p the assumption Pk Pk ||y||22 = 1 we have ||ϕp2 (y)||2 = i=0 (ai / |ai |)2 = i=0 |ai | = 1. Thus, ϕp1 and ϕp2 map S d−1 to S D−1 . Our family F samples a function s from the distribution S corresponding to sim and constructs the function pair (h, g) with h(x) = s(ϕp1 (x)), g(y) = s(ϕp2 (y)). Using the properties of the functions involved we have Pr[h(x) = g(y)] = sim(hϕp1 (x), ϕp2 (y)i) = sim(P (hx, yi)) . J B.3 Hamming distance functions Proof of Theorem 12. We initially assume that a0 6= 0 (i.e., 0 is not a root of P (t)), and then remove this assumption at the end of the proof. We recall that a root of P (t) can appear with multiplicity larger than 1 and that, by the complex conjugate root theorem, if z = a + bi is a complex root then so is its conjugate z 0 = a − bi. We let Z be the multiset containing the k roots of P (t), with Zr+ and Zr− being the multiset of positive and negative real roots, respectively, and with Zc being the multiset consisting of pairs of conjugate complex roots. By factoring P (t), we get: Y Y Y Y P (t) = ak (t − z) = |ak | (z − t) (t + |z|) (t2 − 2at + a2 + b2 ), (9) z∈Z z∈Zr+ z∈Zr− Q z=a+bi∈Zc Q where in the last step we exploited that ak z∈Zr+ (z − t) = |ak | z∈Zr+ (t − z) > 0. Indeed, P (t) is positive in (0, 1) and the multiplicative terms associated with complex and negative real roots are positive in this range; this implies that the remaining terms are positive as well. We need to introduce scaled and biased variations of bit-sampling or anti bit-sampling. Anti-bit sampling with scaling factor α ∈ [0, 1] and bias β ∈ [0, 1] has the CPF f (t) = β/2 + αt/2 and is given by randomly selecting one of following two schemes: (1) with probability 1/2, the scheme is a standard hashing that maps data and query points to 0 with probability β, and otherwise to 0 and 1 respectively; (2) with probability 1/2, the scheme is anti bit-sampling where the sampled bit is set to 0 with probability 1 − α on both data and query points, or kept unchanged otherwise. Similarly, bit-sampling with scaling factor α ∈ [0, 1] has the CPF f (t) = (1 − αt) and is given by using bit-sampling, where the sampled bit is set to 0 with probability 1 − α on both data and query points. (We do not need a biased version of bit-sampling.) We now assign to each multiplicative term of (9) a scaled and biased version of bit-sampling or anti bit-sampling as follows: M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri z is real and z < −1. We assign to z an anti bit-sampling with bias 1 and scaling factor 1/|z| ≤ 1: the CPF is S1 (t, z) = (1/2 + t/(2|z|)), and we have (t + |z|) = 2|z|S1 (t, z). z is real and −1 ≤ z < 0. We assign to z an anti bit-sampling with bias |z| ≤ 1 and scaling factor 1: the CPF is S2 (t, z) = |z|/2 + t/2, and we have (t + |z|) = 2S2 (t, z). z is real and z ≥ 1. We assign to z a bit-sampling with scaling factor 1/z ≤ 1: the CPF is S3 (t, z) = (1 − t/z), and we have (t − z) = zS3 (t, z). (z, z 0 ) are conjugate complex roots and bi and z 0 = a − bi.  Real(z) < −1. Let z = a+ 2 2 2 x The assigned scheme has CPF S4 (t, z) = 4(a2b+b2 ) + a2a+b2 2|a| and is obtained + 12 as follows: with probability b2 /(a2 + b2 ), the scheme maps data and query points to 0 and 0 with probability 1/4, or to 0 and 1 with probability 3/4; with probability a2 /(a2 + b2 ), the schemes consists of the concatenation of two anti bit-sampling with bias 1 and scaling factor 1/|a|. Note that t2 − 2at + a2 + b2 = 4(a2 + b2 )S4 (t, z). (z, z 0 ) are conjugate complex roots and Real(z) ≥ 1. The scheme is similar to the previous one where we use two bit-sampling scaling factor 1/a instead of  with 2  2 2 the anti bit-sampling. The CPF is S5 (t, z) = a2b+b2 + a2a+b2 1 − xa , and we get t2 − 2at + a2 + b2 = (a2 + b2 )S5 (t, z). (z, z 0 ) are conjugate complex roots, −1 ≤ Real(z) ≤ 0, and |z| = a2 +b2 ≥ 1. 2 1 We assign the following scheme with CPF S6 (t, z) = 4(a2x+b2 ) + 2(a|a|x 2 +b2 ) + 4 : with probability 1/4 the scheme maps data and query points to 0; with probability 1/2, the scheme consists of anti bit-sampling with bias 0 and scaling factor |a|/(a2 + b2 ) ≤ 1; with probability 1/4 the scheme consists of two anti bit-sampling with bias 0 and scaling factor √ a2 + b2 each. We have t2 − 2at + a2 + b2 = 4(a2 + b2 )S6 (t, z). (z, z 0 ) are conjugate complex roots, −1 ≤ Real(z) ≤ 0, and |z| = a2 + b2 < 1. We use the previous point with different parameters, giving CPF S7 (t, z) =  the scheme of  x2 4 2 2 a +b + |a|x . The scheme is the following: with probability 1/4, the scheme is a 2 + 4 standard hashing scheme where data points are always mapped to 0 and where a query point is mapped to 0 with probability a2 + b2 and to 1 with probability 1 − a2 + b2 ; with probability 1/2, the scheme consists of anti bit-sampling with bias 0 and scaling factor |a| ≤ 1; with probability 1/4, the scheme consists of two anti bit-sampling with bias 0 and scaling factor 1 each. We have t2 − 2at + a2 + b2 = 4S7 (t, z). Consider the scheme obtained by concatenating the above ones for each real root and Q6 Q each pair of conjugate roots. Its CPF is S(t) = i=1 z∈Zi Si (t, z), where Zi contains root with CPF Si . Then, by letting ψ denote the number of roots with negative real part, we get from Equation 9:   Y P (t) = 2ψ |ak | |z| S(t) = ∆S(t). z∈Z,|Real(z)|>1 Consider now ak = 0 and let ` be the largest value such that P (t) = t` P 0 (x) with P (0) 6= 0. We get the claimed result by concatenating ` anti bit-sampling, which gives a CPF of x` , and the scheme for P 0 (t) obtained by the procedure described above. J 0 C CPF bounds for the unit sphere Gaussian tail bounds. We will make use the following tail bounds for the univariate and bivariate normal distribution. XX:19 XX:20 Distance-sensitive hashing I Lemma 23 (Follows Szarek & Werner [32]). Let Z be a standard normal random variable. Then, for every t ≥ 0 we have that 1 −t2 /2 1 1 1 −t2 /2 √ e ≤ Pr[Z ≥ t] ≤ √ e . 2π t + 1 2π t I Lemma 24 (Savage [30]). Let α ∈ (−1, 1) and let Z1 , Z2 ∼ N (0, 1). Define X1 = Z1 and X2 = αZ1 + (1 − α2 )Z2 . Then, for every t > 0 we have that   1 (1 + α)2 t2 √ Pr[X1 ≥ t ∧ X2 ≥ t] < exp − , 2πt2 1 − α2 1+α     1 (1 + α)2 t2 (2 − α)(1 + α) 1 √ exp − Pr[X1 ≥ t ∧ X2 ≥ t] > 1 − . 1−α t2 2πt2 1 − α2 1+α I Corollary 25. The above bounds apply to Pr[X1 ≥ t∧X2 ≤ −t] if we replace all occurrences of α with −α. Bounding the CPF. We proceed by deriving upper and lower bounds on the collision probability. Pr[hz, xi ≥ t ∧ hz, yi ≥ t] Pr[hz, xi ≥ t]   1 t + 1 (1 + α)2 1 − α t2 √ ≤√ exp − . 1+α 2 2π t2 1 − α2 f+ (α) ≤ We derive the lower bound in stages. Pr[h(x) = g(y)] ≥ Pr[hz, xi ≥ t ∧ hz, yi ≥ t] − Pr[h(x) > m ∨ g(y) > m]. 2 Pr[hz, xi ≥ t] The first part is lower bounded by Pr[hz, xi ≥ t ∧ hz, yi ≥ t] ≥ 2 Pr[hz, xi ≥ t]     1 − α t2 1 1 (1 + α)2 (2 − α)(1 + α) 1 √ √ exp − . 1− 1−α t2 2 2π t 1 − α2 1+α 2 The probability of not being captured by a projection depends on the number of projections m. In order to make this probability negligible we can set m = dt3 /p0 e where p0 denotes the lower bound from Lemma 23. Pr[h(x) > m ∨ g(y) > m] ≤ 2(1 − Pr[hz, xi ≥ t])m 3 ≤ 2(1 − p0 )t /p0 3 ≤ 2e−t . D Annulus search on the unit sphere We will construct a distance sensitive family D for solving the approximate annulus search problem. Let D+ be parameterized by t+ and let D− be parameterized by t− . To sample a pair of functions (h, g) from D we independently sample a pair (h+ , g+ ) from D+ and (h− , g− ) from D− and define (h, g) by h(x) = (h+ (x), h− (x)) and g(x) = (g+ (x), g− (x)). Let f (α) denote the CPF of D. We would like to be able to parameterize D such that f (α) is somewhat symmetric around a unique maximum value of α. It can be verified from M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri XX:21 the definition of D+ that p+ (−1) = 0 which implies that f (−1) = f (1) = 0. If we ignore lower order terms and define γ > 0 by t− = γt+ , then we can see that ln(1/f (α)) ≈ 1 + α γ 2 t2+ 1 − α t2+ + . 1+α 2 1−α 2 For simplicity, temporarily define a(α) = (1 − α)/(1 + α) > 0. Given a fixed γ, the equation a + γ 2 /a is minimized (corresponding to approximately maximizing f (α)) when setting a = γ. Let αmax ∈ (−1, 1) and set γ = amax = (1 − αmax )/(1 + αmax ). To find values α− < αmax < α+ where ln(1/f (α− )) ≈ ln(1/f (α+ )) note that this condition holds for every s > 1 when we set a− = samax and a+ = (1/s)amax . We therefore parameterize D by αmax ∈ (−1, 1) and t > 0 and set t+ = t and t− = (1 − αmax )/(1 + αmax )t+ . By combining our bounds from Lemma 9 with the above observations we are able to obtain the following theorem which immediately yields a solution to the approximate annulus search problem. I Theorem 26. For every choice of t > 0 and constant αmax ∈ (−1, 1) the family D satisfies the following: For every choice of constant s > 1 consider the interval [α− , α+ ] defined to 1−αmax 1−α max contain every α such that 1s 1−α 1+αmax ≤ 1+α ≤ s 1+αmax , then 2 max t For α ∈ [α− , α+ ] we have that f (α) = Ω((1/t2 ) exp(−(s + 1/s) 1−α 1+αmax 2 )). 2 max t For α ∈ / [α− , α+ ] we have that f (α) = O((1/t2 ) exp(−(s + 1/s) 1−α 1+αmax 2 )). The complexity of sampling, storing, and evaluating a pair of functions (h, g) ∈ D is 2 O(dt4 et /2 ). α 0.25 0.50 0.75 1.00 See Figure 4 for a visual representation of the annulus for given parameters αmax and s. -0.75 -0.50 -0.25 0.25 -1.00 -0.75 -0.50 -0.25 -1.00 0.50 0.75 1.00 s=2 s=3 s=4 α max Figure 4 Annuli as defined in Theorem 26 for every value of αmax and s = 2, 3, 4. We define an approximate annulus search problem for similarity spaces and proceed by applying Theorem 26 to provide a solution for the unit sphere, resulting in Theorem 28. XX:22 Distance-sensitive hashing I Definition 27. Let β− < α− ≤ α+ < β+ be given real numbers. For a set P of n points in a similarity space (X, sim) a solution to the ((α− , α+ ), (β− , β+ ))-annulus search problem is a data structure that supports a query operation that takes as input a point x ∈ X and if there exists a point y ∈ P such that α− ≤ sim(x, y) ≤ α+ then it returns a point y0 ∈ P such that β− ≤ sim(x, y0 ) ≤ β+ . I Theorem 28. For every choice of constants −1 < β− < α− < α+ < β+ < 1 such 1−β− 1−β+ − 1−α+ that 1−α 1+α− 1+α+ = 1+β− 1+β+ we can solve the ((α+ , α− ), (β+ , β− ))-annulus problem for (Sd−1 , h·, ·i) with space usage dn + n1+ρ+o(1) words and query time dnρ+o(1) where ρ= cα + 1/cα 2 ≤ cβ + 1/cβ c + 1/c and we define 1 < cα < cβ by cα = E q 1−α−  1−α+ 1+α− 1+α+ , cβ = q 1−β−  1−β+ 1+β− 1+β+ , and c = cβ /cα . Details of the lower bound E.1 Optimal partition pair problem The lower bound in Lemma 16 relies on the following lemma which we prove by showing that the pair of partitions induced by (h, g) ∈ D minimizes a convex function of the probability of the parts, under the additional constraint that Pr[h(x) = g(y)] = p, when all parts are of equal volume and as small as possible. I Lemma 29. For every 0 ≤ α < 1, every pair of functions h, g : {0, 1}d → R must satisfy 1  1−α  X i∈R  Pr [h(x) = g(y) = i] (x,y) 0-corr. 1+α  1−α  ≥ X Pr [h(x) = g(y) = i] . (x,y) i∈R 0-corr. Proof. For i ∈ R define Ai = |h−1 (i)|/2d and Bi = |g −1 (i)|/2d . Given some value of 1 P P p = i Ai Bi we would like to choose the partition to minimize i (Ai Bi ) 1−α . In order to avoid complications due to integrality constraints on the number of partitions, we define a weighted version of the problem with the property that its solution never exceeds the solution of the original problem. minimize X subject to X wi ,Ai ,Bi 1 wi (Ai Bi ) 1−α i wi Ai Bi = p, i X i wi Ai = 1, X wi Bi = 1. i To ease notation and due to symmetry we will suppress different values i, i0 ∈ R in what M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri XX:23 follows. The Lagrangian for this problem and its first order partial derivatives are given by X X 1 wi Ai − 1) L(wi , Ai , Bi , λA , λB , λp ) = wi (Ai Bi ) 1−α − λA ( i i X X − λB ( wi Bi − 1) − λp ( wi Ai Bi − p), i ∂L ∂wi ∂L ∂Ai ∂L ∂Bi ∂L ∂λA i 1 1−α = (Ai Bi ) − λ A Ai − λ B B i − λ p Ai B i ,   α 1 1−α = wi (Ai Bi ) Bi − λA − λp Bi , 1−α   α 1 1−α = wi (Ai Bi ) Ai − λA − λp Ai , 1−α X = wi Ai − 1, i X ∂L = wi Bi − 1, ∂λB i X ∂L wi Ai Bi − p. = ∂λp i We will proceed by deriving necessary conditions for a solution by manipulating the first order conditions that all the partial derivatives are equal to zero. Consider the following sum: X  ∂L  X X 1 X wi (Ai Bi ) − λA wi Ai − λp wi Ai Bi . Ai = ∂Ai 1−α i i i i Setting this equal to the corresponding sum for Bi allows us to conclude that λA = λB . ∂L ∂L Setting ∂A Ai = ∂B Bi allows us to conclude that wi Ai = wi Bi . Consider now an i for i i which wi 6= 0 which implies that Ai = Bi . Further assume that Ai = 6 0 since the case of ∂L Ai = Bi = 0 will not affect the problem. Setting the first order conditions ∂w = 0 and i ∂L = 0 equal to each other we get ∂Ai 2 Ai1−α − 2λA Ai − λp A2i = 1+α 1 Ai1−α − λA − λp Ai . 1−α This allows us to conclude that λA = − 1+α α Ai1−α , 1−α λp = 2α 1 + α 1−α Ai . 1−α Because the same derivation holds for every i, for i 6= j and under the assumptions that wi , Ai 6= 0 and wj , Aj 6= 0 it must hold that Ai = Aj . We can therefore restrict our attention to the case of a single wi and Ai = Bi since all other solutions will result in the same value in the optimum. From the first order conditions we have that wi Ai = 1 and wi A2i = p and it is therefore easy to see that an optimal solution is w1 = 1/p, A1 = B1 = p with everything else set to zero. In the unweighted, original formulation of the problem, this corresponds to the partitions induced by h, g each consisting of 1/p equal parts of volume p. J XX:24 Distance-sensitive hashing E.2 Lower bounding the CPF in Hamming space Here we prove Theorem 18 for Hamming space, using the concept of a (r, c, p, q)-insensitive family. I Definition 30 (Anti Locality-Sensitive Hashing). A distribution A over pairs of functions h, g : X → R is (r, c, p, q)-insensitive for (X, dist) if for all pairs of points x, y and (h, g) sampled randomly from A we have that: If dist(x, y) ≥ r then Pr[h(x) = g(y)] ≥ p. If dist(x, y) ≤ r/c then Pr[h(x) = g(y)] ≤ q. We prove the following theorem, which can easily be converted to Theorem 18 in the main text. I Theorem 31. For every constant ε > 0, every (r, c, p, q)-insensitive family A for {0, 1}d under Hamming distance with r ≤ (1 − ε)d/2 must satisfy ρ(A) = p log 1/p 1 ≥ − O( (c/r) log(1/q)). log 1/q 2c − 1 ˆ Proof. Given A we define a distribution  over pairs of functions ĥ, ĝ : {0, 1}d → R where dˆ ≤ d remains to be determined. We sample a pair of functions (ĥ, ĝ) from  by sampling (h, g) from H and setting ĥ(x) = h(x ◦ 1) and similarly ĝ(x) = g(x ◦ 1) where 1 denotes the ˆ (d − d)-dimensional all-ones vector. We will now turn to the process of relating p to p̂ = fˆ(0) ˆ and q to q̂ = f (α) for Â. Let 0 < εp < 1 and set dˆ = d2r/(1 − εp )e. Then by applying standard Chernoff bounds we get ! ε2p r . Pr [dist(x, y) ≤ r] ≤ exp − 1 − εp 2 (x,y) 0-corr.   ε2p r For convenience, define δp = exp − 1−ε . We now have p̂ ≥ (1 − δp )p. 2 p In order to tie q̂ to q we consider the probability of α-correlated points having distance greater than r/c. The expected Hamming distance of α-correlated (x, y) in dˆ dimensions is ˆ − α)/2. We would like to set α such that the probability of the distance exceeding r/c is d(1 small. Let X denote dist(x, y), then the standard Chernoff bound states that: Pr[X ≥ (1 + ε)µ] ≤ e−ε 2 µ/3 . For a parameter 0 < εq < 1 we set α such that the following is satisfied: (1 + εq )µ ≥ (1 + εq ) 2r 1 − α ≥ r/c. 1 − εp 2 This results in a value of α = 1 − δq ≤ exp(−ε2q µ/3) ≤ exp(− It follows that q̂ ≤ (1 − δq )q + δq . 1−εp 1 1+εq c and we observe that ε2q r ). 1 + εq 3c M. Aumüller, T. Christiani, R. Pagh, and F. Silvestri XX:25 Let us summarize what we know so far: p̂ ≥ (1 − δp )p q̂ ≤ (1 − δq )q + δq ≤ q(1 + δq /q) 0 < εp , εq < 1 ε2p r δp ≤ exp − 1 − εp 2 ! ε2q r δq ≤ exp − 1 + εq 3c α=1− ! 1 − εp 1 1 + εq c 1+α q̂ ≥ p̂ 1−α . We assume that 0 < q < p < 1 and furthermore, without loss of generality we can assume that q ≤ 1/e due to the powering technique. In our derivations we also assume that δp ≤ 1/2 and δq ≤ 1/(2e) such that δq /q ≤ 1/2. This will later be implicit in the statement of the result in big-Oh notation. From our assumptions and standard bounds on the natural logarithm we are able to derive the following: ln(1 − δp ) ln(1/p̂) ln(1/p) ≥ ln(1/q) ln(1/q) ln(1/p̂) ≥ − 2δp ln(1/q) ln(1/p̂) − 2δp ≥ ln(1 + δq /q) + ln(1/q̂)   ln(1 + δq /q) ln(1/p̂) 1− − 2δp ≥ ln(1/q̂) ln(1/q̂) ln(1/p̂) ln(1 + δq /q) ≥ − − 2δp ln(1/q̂) ln(1/(1 + δq /q)q) ln(1/p̂) − 2δq /q − 2δp . ≥ ln(1/q̂) (10) In equation (10) we use the statement itself combined with our assumptions on p and q to deduce that 1> ln(1/p) ln(1/p̂) ≥ . ln(1/q) ln(1/q̂) We proceed by lower bounding ρ̂. Temporarily define 1 − ε0 = ln(1/p̂) 1−α ≥ ln(1/q̂) 1+α (1 − ε0 )/c = 2 − (1 − ε0 )/c 1 ε0 ε0 ≥ − − . 2c − 1 (2c − 1)2 2c − 1 We have that ε0 = 1 − 1 − εp 1 + εq − (1 − εp ) = ≤ εq + εp , 1 + εq 1 + εq 1−εp 1+εq and observe that XX:26 Distance-sensitive hashing and combining these bounds results in ln(1/p) 1 ≥ − 2(εq + εp − δq /q − δp ). ln(1/q) 2c − 1 p We can now set εq = εp = K · (c/r) ln(1/q) for some universal constant K to obtain Theorem 18. J E.3 Tools For completeness we here state some standard technical lemmas used in our derivation of the lower bound. I Lemma 32 (Chernoff [21, Theorems 4.4 and 4.5]). Let X1 , . . . , Xn be independent Poisson Pn trials and define X = i=1 Xi and µ = E[X]. Then, for 0 < ε < 1 we have 2 - Pr[X ≥ (1 + ε)µ] ≤ e−ε µ/3 . 2 - Pr[X ≤ (1 − ε)µ] ≤ e−ε µ/2 . Bounding the natural logarithm and approximating the exponential function: I Lemma 33 ([33]). For x > −1 we have that x 1+x ≤ ln(1 + x) ≤ x. I Lemma 34 ([23, Prop. B.3]). For all t, n ∈ R with |t| ≤ n we have that et (1 − (1 + nt )n ≤ et . t2 n) ≤
8cs.DS
A Model for Donation Verification Bin Fu1 , Fengjuan Zhu2 , and John Abraham1 arXiv:1708.07973v1 [cs.DS] 26 Aug 2017 1 Department of Computer Science University of Texas Rio Grande Valley [email protected], [email protected] 2 Department of Law Shaoxing University, Shaoxin, P. C. China [email protected] August 29, 2017 Abstract In this paper, we introduce a model for donation verification. A randomized algorithm is developed to check if the money claimed being received by the collector is (1 − ǫ)-approximation to the total amount money contributed by the donors. We also derive some negative results that show it is impossible to verify the donations under some circumstances. Keywords: Donation, Verification Model, Approximation Algorithm, Randomization 1. Introduction Worldwide billions of dollars are donated for charities. For example, United States alone gave over 335 billion dollars for philanthropy in 2013. When this much money is involved there would also be fraudsters who take advantage of ones generosity. Recognizing fraudulent practices, US Federal Trade Commission has given a number of things to check before giving to charity. The efficiency of a charitable organization is currently determined by the percentage of fund actually end up being used for intended purpose. CharityWatch [http://www.charitywatch.org/criteria.html] concludes 60% or greater spent on charitable programs and the remaining spent on overhead is acceptable. However, currently no algorithms are available to detects errors in reporting of monies donated. Donors merely trust the data provided by the charitable organizations or charts published by organizations such as Charity Navigator [http://www.charitynavigator.org]. Some research regarding charity donations and their management have been conducted in the academic community [1, 2, 3, 4, 5]. We have not seen any existing research about how donors check the amount of money received by the collector. It is essential to develop some algorithm that the donors and charitable organizations use to trust each other. With the development of charity donations in the modern society, it becomes a more and more important social problem about charity donation system. In addition to establishing related laws, it is also essential to build up efficient auditing systems about charity donations, and apply big data technology to manage them. The progression in this direction will bring efficient and accurate methods for charity donations, which will improve our social reliability. In this paper we develop a method that would allow us to verify monies received by charitable organizations. It would be difficult for every donor to verify each philanthropic organization. Our 1 a D(a)=100 ✯ ✟✟ ✟ ✟ ❍❍ ❨ ❍❍ b c D(b)=6 ✟ ✟✯ ✟✟ d D(d)=1 D(c)=94 ❍❍ ❨ ❍❍ e ✟ ✟✯ ✟✟ f D(e)=5 D(f)=10 ❍❍ ❨ ❍❍ g D(g)=84 Figure 1: Donation Tree with D(.) Values method is based on a randomized model thereby reducing the number of verifications. Using our algorithm, even if only a small percentage of the donors participate in the verification process, incorrect data given by the philanthropic organizations (cheating) can be detected. With just few steps a donor can verify if the money is used for intended purpose with a high degree of probability. 2. Models Assume that there are n people who donated money. Person i donates si . In this model, we assume that each person checks his donation with probability 1 − e−λs if he donated s amount money, where λ is fixed. This model means that a person will have larger chance to check his donation if he contributes more money. We define a donation tree. Definition 1. We define a donation tree. For each leaf L in a donation tree, its donation value is defined to be D(L). For node N in a tree T , define D(N ) to be the sum of values D(.) in its leaves of the subtree with root at N . For each node D, function V (N ) is the amount money that the collector claims from the donors at the leaves of the subtree with root at N . An error path from a leaf to the root has a node N with V (N ) < V (N1 ) + · · · + V (Nk ), where N1 , · · · , Nk are the children of N in T , and V (N ) be the vale saved in node N . A donation tree without cheating should be the case D(N ) = V (N ) for all nodes in the tree. We have the donation tree without cheating at Figure 1. Let k be an integer at least 2. A k-donation tree is a donation tree such that each internal node has at most k children. The money donated from one donor is at a leaf. For every node saves N , the total money D(N ) of leave below it, and a value V (N ) ≤ D(N ) to represents the amount of money the collector claiming to have received from the leaves. In the case V (N ) < D(N ), it is considered a cheating from the collector. 3. Algorithm and Its Analysis In this section, we develop an algorithm for this problem. Lemma 2. For each integer k ≥ 2, A k-donation tree can be built in O(n) time offline with depth O(log n). It also supports an O(log n) time for both insertion and deletion. Proof: A divide and conquer method can be used to build a donation tree of depth O(log n) with O(n) time offline (the input of donations from n people are given). If it based on the structure of B+-tree, then it can support O(log n) time for both insertion and deletion. Protocol 2 a V(a)=100 ✯ ✟✟ ✟ ✟ ❍❍ ❨ ❍❍ b c V(b)=6 ✟ ✟✯ ✟✟ d V(d)=1 V(c)=94 ❍❍ ❨ ❍❍ e ✟ ✟✯ ✟✟ f V(e)=5 ❍❍ ❨ ❍❍ V(f)=10 g V(g)=84 Figure 2: Donation Tree without Cheating Collector: Generate a file F that a donation tree. Publish the file F . donor mi : Check if his donation (D(mi ) = V (mi )). For each node N on the path from mi to the tree root m0 , check if V (N ) = V (N1 ) + · · · + V (Nk ), where N1 , · · · , Nk are all children of N . Report error path if at least one of the two checks fails. End of Protocol Lemma 3. Assume that the root N of the donation tree T has a value V (N ) < D(N ). There are leaves m1 , · · · , mk in the tree that all have error paths to root, and D(m1 ) + · · · + D(mk ) ≥ D(N ) − V (N ). Proof: We prove it by induction. It is trivial when the depth is 0. Assume that the statement is true for the depth at most d. Consider the depth d + 1. Let N be a node of depth d + 1 and has children N1 , · · · , Nk . Case 1. V (N ) < V (N1 ) + · · · + V (Nk ), then every leaf has a error path. Case 2. V (N ) ≥ V (N1 ) + · · · + V (Nk ). Let Ni1 , · · · , Nit be all of the nodes of N1 , · · · , Nk such that V (Nis ) < D(Nis ). We have t X (D(Nij ) − V (Nij )) ≥ k X (D(Na ) − V (Na )) (1) a=1 j=1 ≥ D(N ) − V (N ). (2) We note that for each a ∈ {1, 2, · · · , k} − {i1 , · · · , it }, D(Na ) − V (Na ) ≤ 0. By induction hypothesis, for each ij , there are leave lij ,1 , · · · , lij ,u under the subtree with root at Let Hj = {lij ,1 , · · · , lij ,u } for j = 1, 2, · · · , t. Nij such that D(lij ,1 )+· · ·+D(lij ,u ) ≥ D(Nij )−V (Nij ). P Let H be the set of all leave mi ∈ H1 ∪ · · · Ht , we have mi ∈H D(mi ) ≥ D(N ) − V (N ). 3.1. Random Verification with Exponential Distribution In this section, we consider the case that donor join the verification by following exponential distribution. The people who donate more money have higher probability to do the verification than the people who donate less money. 3 Theorem 4. Assume integer k ≥ 2 and there are n donors. Each verify takes O(kh steps, and reports error if it is not an (1 − ǫ)-approximation in the report with probability at least 1 − δ, where δ = O(e−λǫM ) and h is the depth of the tree. Proof: Let M = D(R) where R is the root of the donation tree. Assume that there is at least ǫM error (D(R) − V (R) ≥ ǫD(R)). P Let m1 , m2 , · · · , mt be nodes with error paths to root of the tree, and have ti=1 mi ≥ ǫM by Lemma 3. If one of m1 , m2 , · · · , mt checks its path to the root, then an error (or cheating ) can be detected. Therefore, this problem becomes to compute the probability that none of m1 , m2 , · · · , mt does his verification. The probability that none of them checks is at most e−λm1 · e−λm2 · · · e−λmt ≤ e−λǫM . 3.2. An Implementation with B-Tree A donation tree can be implemented with a B-tree that supports O(log n) time for searching, insertion, and deletion. When an new leave is inserted, we can update all V (N ) for node N affected in O(log n) time. Similarly, When an new leave is deleted, we can update all V (N ) for node N affected in O(log n) time. 3.3. Uniform Random Verification In this section, we consider the case that donor join the verification by following uniform distribution. Theorem 5. Assume that each person donates the money in the range [1, a], each donor participates in the verification with probability at least δ. Then it takes O(logk n) steps, and reports error with eM probability at least 1 − (1 − δ)⌈ a ⌉ . Proof: Assume that M is the total amount of money donated by all the people. If it is not  ǫMan (1 − ǫ)-approximation, then there are at least ǫM a error paths corresponding to at least k = a ǫM donors. With probability at most (1 − δ)k = (1 − δ)⌈ a ⌉ , none of them will attend the verification. eM Therefore, with probability at least 1 − (1 − δ)⌈ a ⌉ , the error of the report will be detected. 3.4. Multiple Verification Regions In this section, we show the verification in several region. If each person donates amount in the range [a0 , a]. The interval is partitioned into [a0 , a1 ), [a1 , a2 ), · · · , [ak−1 , ak ]. We assume people different region have different probability to participate the verification. Theorem 6. Assume that [a0 , a1 ), [a1 , a2 ), · · · , [ak−1 , ak ] form a partition for [a0 , a] with ai + 1 ≤ ai (1 + δ) for i = 0, 1, 2, · · · , k − 1. Let Ij = [aj , aj+1 ) if j < k, and Ik = [ak−1 , ak ]. Let pj be the probability that a person with donation range in Ij verifies. Then there is a verification protocol Pk−1 such that with probability at most j=0 (1 − pj )ǫMj /(1+δ) to fail to check 1 − ǫ approximation, where Mj is the total amount of donation with each donation in Ij . Furthermore, the verification time is O(log n + k). Proof: Use one verification tree Tj for each Ij . Form a tree T by linking T1 , · · · , Tk−1 as children. It follows from Theorem 5. 4 a V(a)=96 ✯ ✟✟ ✟ ✟ ❍❍ ❨ ❍❍ b c V(b)=6 ✟ ✟✯ ✟✟ d V(d)=1 V(c)=90 ❍❍ ❨ ❍❍ e ✟ ✟✯ ✟✟ f V(e)=5 V(f)=10 ❍❍ ❨ ❍❍ g V(g)=84 Figure 3: Donation Tree with Cheating. Both nodes f and g can find the cheating problem at their paths to the root. For example, at node c, V (c) < V (f ) + V (g). 4. Impossibilities of Verification In this section, we show that it is impossible to use uniform probability to do donation verification. We also prove that it is impossible to do verification if negative items are allowed. Theorem 7. There is no randomized algorithm fail to detect the cheating from collector with probability at most δ if every donor checks his donation with probability at most δ. Proof: Let k = 9. Imagine the collector receives M amount money with M k from one donor A. He releases a document that includes all the money from the others except A. If A does not verify it, it should be all correct without any error. Therefore, with probability at most δ, the verification fails. Theorem 8. There is no randomized algorithm fail to detect the cheating with negative donation allowed from collector with probability at most δ if one donor checks his donation with probability at most δ. Proof: Let the sum of n − 2 donors m1 , · · · , mn−2 be equal to M . Let the donor n − 1 contributes 1 or 0, and donor n contributes −M . Consider the first case that donor n − 1 contributes 1. The total is equal to 1. Consider the second case that donor n − 1 contributes 0. The total is equal to 0. If that donor n − 1 takes probability at most δ to do verification, then we have probability at most δ to make the difference of the two cases. 5. Conclusions In this paper, we develop a protocol for the donation verification under some probabilistic assumption. It only expects the donors follow certain probabilistic distribution to attend verification, and takes O(log n) steps for each donor. References [1] Adam Wociechowski, Models of Charity Donations and Project Funding in Social Networks, Lecture Notes in Computer Science 5872, pp. 454-463, 2009. [2] Robert Cooter, and Brian J Broughman, Charity, Publicity, and the Donation Registry, The Economists’ Voice. Volume 2, Issue 3, pp. 1553-3832, 2005. 5 [3] Sampath Kumar Ranganathan and Walter H. Henley, Determiniants of charitable donation intentions: a structural equation model, International Journal of Nonprofit and Voluntary Sector Marketing, DOI: 10.1002/nvsm.297, 2007. [4] G. Dougla Olsen, John W. Pracejus, and Norman R. Brown, When profit equals price: consumer confusion about donation amounts in cause-related marketing. Journal of Public Policy & Marketing: Vol. 22, No. 2, pp. 170-180, 2003. [5] Rogers Bennett, Factors influencing donation switching behaviour among charity supporters: an empirical investigation, Journal of Customer Behaviour, Volume 8, Number 4, pp. 329-345, 2009. 6
8cs.DS
Graph Clustering using Effective Resistance arXiv:1711.06530v1 [cs.DS] 17 Nov 2017 Vedat Levi Alev∗ Nima Anari † Lap Chi Lau‡ Shayan Oveis Gharan§ Abstract We design a polynomial time algorithm that for any weighted undirected graph G = (V, E, w) and sufficiently large δ > 1, partitions V into subsets V1 , . . . , Vh for some h ≥ 1, such that • at most δ −1 fraction of the weights are between clusters, i.e. w(E − ∪hi=1 E(Vi )) . w(E) ; δ • the effective resistance diameter of each of the induced subgraphs G[Vi ] is at most δ 3 times the average weighted degree, i.e. max Reff G[Vi ] (u, v) . δ 3 · u,v∈Vi |V | w(E) for all i = 1, . . . , h. In particular, it is possible to remove one percent of weight of edges of any given graph such that each of the resulting connected components has effective resistance diameter at most the inverse of the average weighted degree. Our proof is based on a new connection between effective resistance and low conductance sets. We show that if the effective resistance between two vertices u and v is large, then there must be a low conductance cut separating u from v. This implies that very mildly expanding graphs have constant effective resistance diameter. We believe that this connection could be of independent interest in algorithm design. 1 Introduction Graph decomposition is a useful algorithmic primitive with various applications. The general framework is to remove few edges so that the remaining components have nice properties, and then specific problems are solved independently in each component. Several types of graph decomposition results have been studied in the literature. The most relevant to this work are low diameter graph decompositions and expander decompositions. We refer the reader to Section 2 for notation and definitions. ∗ Supported by the David R. Cheriton Graduate Scholarship. E-mail: [email protected] [email protected] ‡ Supported by NSERC Discovery Grant 2950-120715 and NSERC Accelerator Supplement 2950-120719. [email protected] § Supported by NSF Career Award and ONR Young Investigator Award, Email: [email protected] † Email: 1 E-mail: Low Diameter Graph Decompositions: Given a weighted undirected graph G = (V, E, w) and a parameter ∆ > 0, a low diameter graph decomposition algorithm seeks to partition the vertex set V into sets V1 , . . . , Vh with the following two properties: • Each component G[Vi ] has bounded shortest path diameter, i.e. maxu,v∈Vi distw (u, v) ≤ ∆, where distw (u, v) is the shortest path distance between u and v using the edge weight w. Sh • There are not too many edges between the sets Vi , i.e. E − i=1 E(Vi ) ≤ D(G) ∆ · |E|, where D(G) is the “distortion” that depends on the input graph. This widely studied [LS93, KPR93, Bar96, LS10, AGG+ 14] primitive (and its generalization to decomposition into padded partitions) has been very useful in designing approximation algorithms [CCC+ 98, CKR01, FHRT03, FHL08, KR11, BFK+ 11, LOT14]. This approach is particularly effective when the input graph is of bounded genus g or Kr -minor free, in which case D(G) = O(log g) [LS10] and D(G) = O(r) [AGG+ 14]. For these special graphs, this primitive can be used to proving constant flow-cut gaps [KPR93], proving tight bounds on the Laplacian spectrum [BLR10, KLPT09], and obtaining constant factor approximation algorithms for NP-hard problems [BFK+ 11, AL17]. However, there are graphs for which D(G) is necessarily Ω(log n) where n is the number of vertices, and this translates to a Ω(log n) factor loss in applying this approach to general graphs. For example, in a hypercube, if we only delete a small constant fraction of edges, some remaining components will have diameter Ω(log n). Expander Decompositions: Given an undirected graph G = (V, E) and a parameter φ > 0, an expander decomposition algorithm seeks to partition the vertex set V into sets V1 , . . . , Vh with the following two properties. • Each component G[Vi ] is a φ-expander, i.e. Φ(G[Vi ]) ≥ φ, where Φ(G[Vi ]) is the conductance of the induced subgraph G[Vi ]; see Section 2 for the definition of conductance. Sh • There are not too many edges between the sets Vi , i.e. E − i=1 E(Vi ) ≤ δ(G, φ) · |E|, where δ(G, φ) is a parameter depending on the graph G and φ. This decomposition is also well studied [KVV04, ST11, ABS10, OT14], and is proved useful in solving Laplacian equations, approximating Unique Games, and designing clustering algorithms. It is of natural interest to minimize the parameter δ(G, φ). Similar to the low diameter partitioning case, there are graphs where δ(G, φ) ≥ Ω(φ · log(n)). For example, in a hypercube, if we delete a small constant fraction of edges, some remaining components will have conductance O(1/ log n). Motivations: In some applications, we could not afford to have an Ω(log n) factor loss in the approximation ratio. One motivating example is the Unique Games problem. It is known that Unique Games can be solved effectively in graphs with constant conductance [AKK+ 08] and more generally in graphs with low threshold rank [Kol11, GS11, BRS11], and in graphs with constant diameter [GT06]. Some algorithms for Unique Games on general graphs are based on graph decomposition results that remove a small constant fraction of edges so that the remaining components are of low threshold rank [ABS10] or of low diameter [AL17], but the Ω(log n) factor loss in the decomposition is the bottleneck of these algorithms. This leads us to the question of finding a property that is closely related to low diameter and high expansion, so that every graph admits a decomposition into components with such a property without an Ω(log n) factor loss. 2 Effective Resistance Diameter: The property that we consider in this paper is having low effective resistance diameter. We interpret the graph G = (V, E, w) as an electrical circuit by viewing every edge e ∈ E as a resistor with resistance 1/w(e). The effective resistance distance Reff(u, v) between the vertices u and v is then the potential difference between u and v when injecting a unit of electric flow into the circuit from the vertex u and removing it out of the circuit from the vertex v. We define Rdiam (G) := max Reff(u, v) u,v∈V as the effective resistance diameter of G. Both the properties of low diameter and of high expansion have the property of low effective resistance diameter as a common denominator: The effective resistance distance Reff(u, v) is upper bounded by the shortest path distance for any graph, and so every low diameter component has low effective resistance diameter. Also, a d-regular graph with constant expansion has effective resistance diameter O(1/d) [BK89, CRR+ 97], and so an expander graph also has low effective resistance diameter. See Section 2 for more details. In this paper, we study the connection between effective resistance and graph conductance. Roughly speaking, we show if all sets have mild expansion (see Theorem 1), then the effective resistance diameter is small. We use this observation to design a graph partitioning algorithm to decompose a graph into clusters with effective resistance diameter at most the inverse of the average degree (up to constant losses) while removing only a constant fraction of edges. This shows that although we cannot partition a graph into Ω(1)-expanders by removing a constant fraction of edges, we can partition it into components that satisfy the “electrical properties” of expanders. Applications of Effective Resistance: Besides the motivation from the Unique Games problem, we believe that effective resistance is a natural property to be investigated on its own. The effective resistance distance between two vertices u, v ∈ V has many useful probabilistic interpretations, such as the commute time [CRR+ 97], the cover time [Mat88], and the probability of an edge being in a random spanning tree [Kir47]. See Section 2 for more details. Recently, the concept of effective resistance has found surprising applications in spectral sparsification [SS11], in computing maximum flows [CKM+ 11], in finding thin trees [AO15], and in generating random spanning trees [KM09, MST15, DKP+ 17]. The recent algorithms in generating a random spanning tree are closely related to our work. Madry and Kelner [KM09] showed how e · √n) where m is the number of edges, faster than the worst to sample a random spanning tree in time O(m e case cover time O(m · n) (see Section 2). A cruicial ingredient of their algorithm is the low diameter graph decomposition technique, which they use to ensure that the resulting components have small cover time. In subsequent work, Madry, Straszak and Tarnawski [MST15] have improved the time complexity of their e 4/3 ) by working with the effective resistance metric instead of the shortest path metric. algorithm to O(m Indeed, their technique of reducing the effective resistance diameter is similar to our technique – even though it cannot recover our result. 1.1 Our Results Our main technical result is the following connection between effective resistance and graph partitioning. Theorem 1. Let G = (V, E) be a weighted graph with weights w ∈ RE ≥0 . Suppose for any set S ⊆ V with vol(S) ≤ vol(G)/2 we have c Φ(S) ≥ (mild expansion) vol(S)1/2−ε 3 for some c > 0 and 1/2 ≥ ε ≥ 0. Then, for any pair of vertices s, t ∈ V , we have   1 1 1 Reff(s, t) . · + , deg(s)2ε deg(t)2ε ε · c2 P where deg(v) = u:uv∈E w(u, v) is the weighted degree of v. (resistance bound) In [CRR+ 97], Chandra et al. proved that a d-regular graph with constant expansion has effective resistance diameter O(1/d). They also proved that the effective resistance diameter of a d-dimensional grid is O(1/d) when d > 2 even though it is a poor expander. Theorem 1 can be seen as a common generalization of these two results, using the mild expansion condition as a unifying assumption. Chandra et al. [CRR+ 97] also √ √ showed that the effective resistance diameter of a 2-dimensional grid is Θ(log n). Note that for a n × n grid, Φ(S) ≈ 1/ vol(S)1/2 for any k × k square. This shows that the mild expansion assumption of the theorem cannot be weakened in the sense that if ε = 0 for some sets S, then Reff(s, t) may grow as a function of |V |. The proof of Theorem 1 also provides an efficient algorithm to find such a sparse cut. The high-level idea is to prove that if all level sets of the st electric potential vector satisfy the mild expansion condition, then the potential difference between s and t must be small, i.e., Reff(s, t) is small. Combining with a fast Laplacian solver [ST14], we show that the existence of a pair of vertices u, v ∈ V with high effective resistance distance implies the existence of a sparse cut which can be found in nearly linear time. Corollary 2. Let G = (V, E, w) be a weighted undirected graph. If deg(v) ≥ 1/α for all v ∈ V , then for any 0 < ε < 1/2, there is a subset of vertices U ⊆ V such that αε · vol(U )ε−1/2 . Φ(U ) . √ Rdiam · ε    w(E) e m · log . Furthermore, the set U can be found in time O mine w(e) Using Corollary 2 repeatedly, we can prove the following graph decomposition result. Theorem 3 (Main). Given a weighted undirected  graph G= (V, E, w),  and a large enough parameterSδ > 1, h w(E) e m · n · log there is an algorithm with time complexity O that finds a partition V = i=1 Vi mine w(e) satisfying ! h [ w(E) E(Vi ) . w E− (loss bound) δ i=1 and Rdiam (G[Vi ]) . δ 3 · n w(E) (resistance bound) for all i = 1, . . . , h. Let G be a d-regular unweighted graph. Theorem 3 implies that it is possible to remove a constant fraction of the edges of G and decompose G into components with effective resistance diameter at most O(1/d). Note that d-regular Ω(1)-expanders with Rdiam = O(1/d) have the least effective resistance diameter among all d-regular graphs. So, even though it is impossible to decompose d-regular graphs into graphs with Ω(1)expansion while removing only a constant fraction of edges, we can find a decomposition with analogous “electrical properties”. 4 We can also view Theorem 3 as a generalization of the following result: Any d-regular graph can be decomposed into Ω(d)-edge connected subgraphs by removing only a constant fraction of edges. This is because if the effective resistance diameter of an unweighted graph G is ǫ, then G must be 1/ǫ-edge connected. Recall that a graph is k-edge connected, if the size of every cut in that graph is at least k. 2 Preliminaries In this section, we will first define the notations used in this paper, and then we will review the background in effective resistances, Laplacian solvers, and graph expansions in the following subsections. Given an undirected graph G = (V, E) and a subset of vertices U ⊆ V , we use the notation EG (U ) for the set of edges with both endpoints in U , i.e. EG (U ) = {{u, v} ∈ E(G) : u, v ∈ U }. We write U c for the complement of U with respect to V (G), i.e. U c = V \U . The variables n and m stand for the number of vertices and the edges of the graph respectively, i.e. n = |V | and m = |E|. We use the notation ∂G U for the edge boundary of U ⊆ V , i.e. ∂G U = EG (U, U c ) = {{u, v} ∈ E : u ∈ U, v ∈ U c }. For a graph G = (V, E) P with weights w ∈ RE w(u, v) for the weighted degree of v. For S ⊆ V , the ≥0 , we write degG (v) = u:uv∈E P volume volG (S) of S is defined to be volG (S) = s∈S deg(s). When the graph is clear in the context we may drop the subscript in all aforementioned notation. Scalar functions and vectors are typed in bold, i.e. x ∈ RV , or w ∈ RE . For a subset A ⊆ E, the notation P w(A) stands for the sum of the weights of all edges in A, i.e. w(A) = e∈A w(e). The j-th canonical basis vector is denoted by ej ∈ RV . Matrices are typed in serif, i.e. A ∈ RV ×V . e (n)) to hide polylogarithmic Time complexities are given in asymptotic notation. We employ the notation O(f e factors in n, i.e. O(f (n)) = O(f (n) · polylog(n)). We use the notation f . g for asymptotic inequalities, i.e. f = O(g); and the notation f ≍ g for asymptotic equalities, i.e. f = Θ(g). 2.1 Electric Flow, Electric Potential, and Effective Resistance Let G = (V, E) be a given graph with non-negative edge weights w ∈ RE ≥0 . The notion of an electric flow arises when one interprets the graph G as an electrical network where every edge e ∈ E represents a resistor with resistance 1/w(e). We fix an arbitrary orientation E ± of the edges E and define a unit st flow in this network as a function ± ± f ∈ RE we define f (e) = −f (−e)) satisfying the following: ≥0 (where for e 6∈ E   if v = s 1  X X f (vw) − f (uv) = −1 if v = t (flow conservation)   w∈δ + (v) u∈δ − (v) 0 otherwise, where δ + (v) is the set of edges having v as the head in our orientation, and δ − (v) is the set of edges having v as tail. Let e = uv ∈ E ± be an oriented edge. The flow f has to obey Ohm’s law f (e) = w(e) · ∆e p = w(e) · (p(u) − p(v)) (Ohm’s law) for some vector p ∈ RV which we call the potential vector. The electrical flow between the vertices s and t is the unit st flow that satisfies flow conservation and Ohm’s law. 5 The electrical energy E(f ) of a flow f is defined as the following quantity, X f (e)2 . w(e) ± E(f ) = (electrical energy) e∈E It is known that the electric flow between s and t is the unit st flow with minimal electrical energy. The effective resistance Reff(s, t) between the vertices s and t is the potential difference between the vertices s and t induced by this flow, i.e. Reff(s, t) = p(s) − p(t). It is known that the potential difference between s and t equals the energy E(f st ) of this flow. This is often referred as Thomson’s principle. The electric potential vector and the effective resistance are known to have the following closed form expressions: Let W ∈ RV ×V be the weighted adjacency matrix of G, i.e. the matrix satisfying W (u, v) = 1[uv ∈ E] · w(u, v), and D ∈ RV ×V the weighted degree matrix, i.e. the diagonal matrix satisfying D(v, v) = P deg(v) = u:uv∈E w(u, v). The (weighted) Laplacian LG ∈ RV ×V is defined to be the matrix LG = D − W. (weighted Laplacian) It is well-known that this is a symmetric positive semi-definite matrix. We will take LG = n X λi v i v ⊤ i i=2 as the spectral decomposition of LG , where λ1 = 0 ≤ λ2 ≤ · · · ≤ λn are the eigenvalues of LG sorted in increasing order. It is easy to verify LG 1 = 0 and further it can be shown that this is the only vector (up to scaling) satisfying this when G is connected. This means if G is connected, the matrix LG is invertible in the subspace perpendicular to 1. This inversion will be done by the matrix L†G , the so-called Moore-Penrose pseudo-inverse of LG defined by L†G = n X 1 vi v⊤ i . λ j j=2 (pseudo-inverse of LG ) Let f ⋆ ∈ RE be the st unit electric flow vector. It can be verified that the st electric potential p⋆ – i.e. the vector satisfying w(uv) · (p⋆ (u) − p⋆ (v)) = f ⋆ (uv) for all uv ∈ E ± – satisfies the equation LG p⋆ = es − et ⇐⇒ p⋆ = L†G (es − et ). (2.1) In particular, this implies the following closed form expression for Reff(s, t) Reff(s, t) = hes − et , L†G (es − et )i. (st effective resistance) It can be verified that this defines a (ℓ22 ) metric on the set vertices V of G [KR93], as we have 1. Reff(u, v) = 0 if and only if u = v. 2. Reff(u, v) = Reff(v, u) for all u, v ∈ V . 3. Reff(u, v) + Reff(v, w) ≥ Reff(u, w) for all u, v, w ∈ V . 6 Further, by routing the unit st flow along the st shortest path we see that the shortest path metric dominates the effective resistance metric, i.e. Reff(u, v) ≤ dist(u, v) for all the pairs of vertices u, v ∈ V . It is known that the commute time distance κ(u, v) between u and v – the expected number of steps a random walk starting from the vertex u needs to visit the vertex v and then return to u – is vol(G) times the effective resistance distance Reff(u, v) [CRR+ 97]. Also, the effective resistance Reff(u, v) of an edge uv ∈ E corresponds to the probability of this edge being contained in a uniformly sampled random spanning tree [Kir47]. A well-known result of Matthews [Mat88] relates the effective resistance diameter to the cover time of the graph – the expected number of steps a random walk needs to visit all the vertices of G. Aldous [Ald90] and Broder [Bro89] have shown that simulating a random walk until every vertex has been visited allows one to sample a uniformly random spanning tree of the graph. 2.2 Solving Laplacian Systems For our algorithmic results, it will be important to be able to compute electric potentials, and effective resistances quickly. We will do this by appealing to Equation (2.1) and the definition of the st effective resistance. Both of these equations require us to solve a Laplacian system. Fortunately, it is known that these systems can be solved in nearly linear time [ST14, KMP10, KMP11, KOSA13, CKM+ 14, KS16]. Lemma 4 (The Spielman-Teng Solver, [ST14]). Let a (weighted) Laplacian matrix L ∈ RV ×V , a right-hand side vector b ∈ RV , and an accuracy parameter ζ > 0 be given. Then, there is a randomized algorithm which e b that satisfies takes time O(m · log(1/ζ)) and produces a vector x b − L† b x L ≤ ζ · kL† bkL (accuracy guarantee) with constant probability, where kxk2A = hx, Axi. For our purposes it will suffice to pick ζ inversely polynomial in the size of the graph in the unweighted case, and 1/ poly(w(E)/ mine w(e), 1/m) in the weighted case. Extending the ideas of Kyng and Sachdeva [KS16], Durfee et al. [DKP+ 17] show that it is possible to compute approximations for effective resistances between a set of given pairs S ⊆ V × V efficiently. Lemma 5. Let G = (V, E, w) be a weighted graph, β > 0 an accuracy parameter, and S ⊆ V × V . There is e an O(m + (n + |S|)/β 2 )-time algorithm which returns numbers A(u, v) for all (u, v) ∈ V satisfying e−β Reff(u, v) ≤ A(u, v) ≤ eβ Reff(u, v). This lemma will aid us in computing fast approximations for furthest points in the effective resistance metric. For our purposes, we only need to pick β as a small enough constant, i.e. β = ln(3/2). Similar guarantees can also be obtained using the ideas of Spielman and Srivastava [SS11]. 2.3 Conductance For a graph G = (V, E) with non-negative edge weights w ∈ RE ≥0 , we define the conductance of a set S ⊆ V as w(∂S) . (conductance of a set) Φ(S) = vol(S) 7 The conductance of the graph G is then defined as Φ(G) = min{Φ(S) : S ⊆ V and 2 vol(S) ≤ vol(G)}. (conductance of a graph) It is well-known [Che70, AM85] that the conductance of the graph G is controlled by the spectral gap (second smallest eigenvalue) λ̃2 of the normalised Laplacian matrix D−1/2 LG D−1/2 , i.e. q (Cheeger’s inequality) λ̃2 . Φ(G) . λ̃2 . Appealing to the closed form formula for the st effective resistance it can be verified that the spectral gap λ2 of the (unnormalised) Laplacian controls the effective resistance distance, i.e. max Reff(s, t) . s,t∈V 1 . λ2 By an easy application of Cheeger’s inequality we see that the expansion controls the effective resistance as well, i.e. 1 . max Reff(s, t) . s,t∈V Φ(G)2 Indeed, Theorem 1 and Corollary 2 will improve upon this bound. 3 From Well Separated Points to Sparse Cuts In this section, we are going to prove Theorem 1 and Corollary 2. As previously mentioned, we will prove that if all the level sets of the potential vector have mild expansion, the effective resistance cannot be high. Theorem 1. Let G = (V, E) be a weighted graph with weights w ∈ RE ≥0 . Suppose for any set S ⊆ V with vol(S) ≤ vol(G)/2 we have c (mild expansion) Φ(S) ≥ vol(S)1/2−ε for some c > 0 and 1/2 ≥ ε ≥ 0. Then, for any pair of vertices s, t ∈ V , we have   1 1 1 · Reff(s, t) . + , deg(s)2ε deg(t)2ε ε · c2 P where deg(v) = u:uv∈E w(u, v) is the weighted degree of v. (resistance bound) Proof. In the following let f ∈ RE be a unit electric flow from s to t, and p ∈ RV be the corresponding vector of potentials where we assume without loss of generality that p(t) = 0. We direct our attention to the following threshold sets Sp = {v ∈ V : p(v) ≥ p}. Then, we have X e∈∂Sp |f (e)| = 1. Using Ohm’s law, we can rewrite this into X e∈∂Sp w(e) · |∆e p| = 1, 8 (3.1) where ∆e p is the potential difference along the endpoints of the edge e. Normalizing this, we get X e∈∂Sp w(e) 1 · |∆e p| = . w(∂Sp ) w(∂Sp ) (3.2) Now, set µ(e) = w(e)/w(∂Sp ). Restricted over the set of edges ∂Sp , µ is a probability distribution and the LHS of (3.2) corresponds to the expected potential drop when edges e ∈ ∂Sp are sampled with respect to the probability distribution µ, i.e. we have Eµ |∆e p| = 1 . w(∂Sp ) Then, by Markov’s inequality, we get a set F ⊆ ∂Sp such that • all edges f ∈ F satisfy |∆f p| ≤ • Pµ (e ∈ F ) ≥ 1/2, equivalently w(F ) = X w(e) = e∈F X e∈F 2 ; w(∂Sp ) w(∂Sp ) · µ(e) = w(∂Sp ) · µ(F ) ≥ w(∂Sp ) . 2 Using the observation that the endpoint of an edge f ∈ F that is not contained in Sp should have potential at least p − 2/w(∂Sp ), we obtain vol(Sp−2/w(∂Sp ) ) ≥ vol(Sp ) + w(F ) ≥ vol(Sp ) + w(∂Sp ) . 2 Assuming vol(∂Sp ) ≤ vol(G)/2, using the mild expansion property, we have w(∂Sp ) ≥ c vol(Sp )1/2+ε . So, from above we get vol(Sp−2/c vol(Sp )1/2+ε ) ≥ vol(Sp−2/w(∂Sp ) ) ≥ vol(Sp ) + c vol(Sp )1/2+ε , 2 where in the first inequality we also used that vol(Sp ) increases as p decreases. Now, iterating this procedure 2 vol(Sp )1/2−ε /c times we obtain !   vol Sp− 4 c2 vol(Sp )2ε = vol S p− 2 c vol(Sp )1/2+ε · 2 vol(Sp )1/2−ε c ≥ 2 vol(Sp ), (3.3) as vol(Sp ) increases as p decreases. We set p0 = p(s), then vol(Sp0 ) = deg(s). Inductively define pk+1 = pk − 4 . c2 vol(Spk )2ε Then, using the inequality (3.3), we have vol(Spk+1 ) ≥ 2 · vol(Spk ). (3.4) Note that we can run the above procedure as long as vol(Sp ) ≤ vol(G)/2. Therefore, for some k ⋆ . log vol(G) deg(s) , we must have vol(G) ≥ 2 · vol(Spk⋆ ) ≥ vol(G)/2. 9 Therefore, ⋆ p0 − pk ⋆ ≤ 4 · k X j=0 c2 1 . vol(Spi )2ε Using (3.4) we get ⋆ p0 − pk ⋆ k X 1 1 1 . 2 · . , 2ε 2jε 2ε c vol(S0 ) 2 deg(s) · c2 · ε j=0 where the last inequality is a geometric sum with ratio ≈ 1/(1 + ǫ). By a similar argument (sending flow from t to s), we see that more than half of the vertices have potential smaller than 1 1 · . deg(t)2ε ε · c2 Combining these two bounds, we obtain Reff(s, t) = p(s) .  1 1 + 2ε deg(s) deg(t)2ε  · 1 , ε · c2 where the equality follows since the flow is a unit flow. Remark 6. For our proof to go through, we do not need the mild expansion condition to be satisfied by all cuts. It suffices to have this condition satisfied by electric potential threshold cuts (Sp , Spc ) only. For computational purposes, it will be important to show that our argument is robust to small perturbations in the potentials, i.e. we need to show that the proof will still go through when we are working with threshold cuts with respect to a vector ˆp which is close to the electric potential vector p, rather than working with the potential vector p directly. We will show this in Appendix A, Theorem 13. 3.1 Finding the Sparse Cuts Algorithmically Next we prove Corollary 2. Corollary 2. Let G = (V, E, w) be a weighted undirected graph. If deg(v) ≥ 1/α for all v ∈ V , then for any 0 < ε < 1/2, there is a subset of vertices U ⊆ V such that αε Φ(U ) . √ · vol(U )ε−1/2 . Rdiam · ε    w(E) e m · log Furthermore, the set U can be found in time O . mine w(e) Proof. First, we prove the existence of U . Let u, v ∈ V such that (3.5) Reff(u, v) = Rdiam . The choice of c≍ s 1 deg(u)2ε + 1 deg(v)2ε Reff(u, v) · ε ensures Reff(u, v) > 10  1 1 + 2ε deg(s) deg(t)2ε  · 1 . ε · c2 (3.6) Then, by Theorem 1, there must be a threshold set Sp of the potential vector p corresponding to sending one unit of electrical flow from u to v such that Φ(U ) . c αε √ · vol(U )ε−1/2 , . vol(U )1/2−ε ε · Rdiam where the last inequality follows from our assumption that deg(v) ≥ 1/α for all v ∈ V . This proves the first part of the corollary. It remains to devise a near linear time algorithm to find the set U . First, suppose that we are given the optimum pair of vertices u, v satisfying (3.5). Using the Spielman-Teng solver (Lemma 4), we can compute the   potential  vector p corresponding to sending one unit of electrical flow from to u to v in time w(E) e e O m · log mine w(e) . We can then sort the vertices by their potential values in time O(n log n) = O(m). Finally, we simply go over the sorted list and find the least expanding level set. This can be done in O(m) time in total, since getting ∂Sp(vi ) from ∂Sp(vi+1 ) (resp. vol(Sp(vi ) ) from vol(Sp(vi+1 ) )) can be done by considering the deg(vi ) edges e ∈ ∂(vi ) incident to vi . It remains to find such an optimal pair of vertices u, v satisfying (3.5). Instead, we find a pair of vertices u′ , v ′ such that Reff(u′ , v ′ ) ≥ Rdiam /3, which is enough for our purposes as this only causes a constant factor loss in the conductance of U . e Lemma 7. Let G be a weighted graph. In time O(m), one can compute a pair of vertices u, v ∈ V satisfying Reff(u, v) ≥ Rdiam /3. Proof. By the triangle inequality for effective resistances, we have the following inequality for any u ∈ V : Rdiam ≤ 2 max Reff(u, v). v∈V (3.7) Thus, we fix a u ∈ V . Appyling Lemma 5 (with S = {u} × V ), we get the numbers A(u, v) which multiplicatively approximate Reff(u, v) within a factor eβ . Let v ∗ = arg maxv∈V A(u, v). By combining the inequality (3.7) with max Reff(u, v) ≤ eβ max A(u, v) = eβ A(u, v ∗ ) ≤ e2β Reff(u, v ∗ ), v∈V v∈V ∗ we obtain Reff(u, v ) ≥ Rdiam /3 for some β = Θ(1). The algorithm consists of an application of Lemma 5 with |S| = n, and a linear scan for finding the maximum. Hence, the time bound follows. So, Corollary 2 follows by first using Lemma 7 to find u′ , v ′ with Reff(u′ , v ′ ) ≥ R/3, and then apply Theorem 1 with the choice of c as described in (3.6). Remark 8. We have avoided treating the issues caused by working with an approximate potential vector for the sake of clarity. This issue is addressed in Appendix A, Corollary 14. 4 Low Effective Resistance Diameter Graph Decomposition In this section we prove Theorem 3. 11 Theorem 3 (Main). Given a weighted undirected  graph G= (V, E, w),  and a large enough parameterSδ > 1, h w(E) e m · n · log there is an algorithm with time complexity O that finds a partition V = i=1 Vi mine w(e) satisfying ! h [ w(E) E(Vi ) . w E− (loss bound) δ i=1 and Rdiam (G[Vi ]) . δ 3 · n w(E) (resistance bound) for all i = 1, . . . , h. Proof. Let R be the target effective resistance diameter and W be the target sum of the weights of edges that we are going to cut. We will write the algorithm in terms of R, W , and we will optimize for these parameters later in the proof. Note that n = |V | is the number of vertices of the original graph G, and it is fixed throughout the execution of the following algorithm. Algorithm 9 (Effective Resistance Partitioning). Intput A graph H, and parameters R, W, n. Output A partition P = {Vi | i = 1, . . . , h} of V (H). 1. If there is a vertex v ∈ V (H) such that degH (v) ≤ W/(2n), then delete all the edges incident to v. Repeat this step until there are no such vertices in the remaining graph H. 2. Use Lemma 7 to find vertices u, v such that Reff(u, v) ≥ Rdiam (H)/3. 3. If Reff(u, v) ≤ R, return {V (H)}. 4. Otherwise, find the cut (U, U c ) with ΦH (U ) . minimum degree at least W/(2n) and ε = 1/4. (n/W )ε √ ε·R · volH (U )ε−1/2 by invoking Corollary 2, with 5. Call the algorithm recursively on H[U ] and H[U c ]. 6. Return the union of the outputs of both recursive calls. First of all, by construction, every set Vi in the output partition satisfies Rdiam (G[Vi ]) ≤ 3R. It is not hard e · m · log(w(E)/ mine w(e))), as the most expensive of the above algorithm to see that the running time is O(n e takes time O(m · log(w(E)/ mine w(e))), and we make at most n recursive calls. It remains to calculate the sum of the weights of all edges that we cut. Note that we cut edges either when a vertex has a low degree or when we find a low conductance set U . We classify the cut edges into two types as follows: i) Edges e where e is cut as an incident edge of a vertex v with degH (v) ≤ W/2n. ii) The rest of the edges, i.e., edges e where e ∈ ∂H (U ) for some U where ΦH (U ) . (n/W )ε √ ε·R volH (U )ε−1/2 . We observe that we are going to remove edges of type (i) for at most n times, because each such removal isolates a vertex of G. So, the sum of the weights of edges of type (i) that we cut is at most n · W/2n ≤ W/2. It remains to bound the sum of the weight of edges of type (ii) that we cut. 12 We use an amortization argument: Let Ψ(e) stand for the tokens charged from an edge. We assume that for each edge e ∈ E, the number of tokens Ψ(e) is initially set to 0. Every time we make a cut of type (ii), we assume without loss of generality that volH (U ) ≤ vol(H)/2 and we modify the number of tokens as follows ( w(∂H U) Ψ(e) + w(E if e ∈ EH (U ) H (U)) Ψ(e) := (4.1) Ψ(e) otherwise. By definition, after the termination of the algorithm, we have w(set of cut edges of type (ii)) = X e∈E Ψ(e) · w(e). (4.2) Therefore, to bound the total weight of type (ii) edges that are cut, it is enough to show that no edge is charged with too many tokens provided R is large enough. 4 R·W/8n−1 Claim 10. If R & n/(εW ), we will have Ψ(e) . √ algorithm. for all edges e ∈ E after the termination of the Proof. Fix an edge e ∈ E. Let ∆ Ψ(e) be the increment of Ψ(e) due to a cut (U, U c ). We have ∆ Ψ(e) = w(∂H U ) w(∂H U ) =2· =2· w(EH (U )) volH (U ) − w(∂H U ) 1 1 ΦH (U) −1 . 2c , volH (U )1/2−ε − c (4.3) where c is chosen as in (3.6) in the proof of Corollary 2 so that Φ(U ) ≤ c/ vol(U )1/2−ε for the last inequality to hold. Since the minimum degree is at least W/2n by Step (1) of the algorithm, we have (2n/W )ε . c≍ √ ε·R The minimum degree condition also implies that volH (U ) ≥ W/(2n). Note that the denominator of the rightmost term of (4.3) is non-negative as long as volH (U )1/2−ǫ ≥ (W/2n)1/2−ε ≥ c, which holds when R & n/(εW ). Let U0 ⊆ V (H0 ) be the set for which e was charged for the last time, and in general Uk ⊆ V (Hk ) be the k-th last set for which e was charged. We write ∆k Ψ(e) to denote the increment in Ψ(e) due to Uk . Note that by (4.1) we have e ∈ EHi (Ui ) for all i. Furthermore, since volHi (Ui ) ≤ vol(Hi )/2 ≤ volHi+1 (Ui+1 )/2 for all i, we have (4.4) volHk (Uk ) ≥ 2k volH0 (U0 ) for all k ≥ 0. Therefore, using (4.3) and (4.4), we can write Ψ(e) = X k≥0 ∆k Ψ(e) ≤ X k≥0 X 2c volHi (Ui )1/2−ε − c 2c 1/2−ε − c k vol (U (2 0 )) H0 k≥0 X 2c 1 ≤ · , 1/2−ε − c k≥0 (21/2−ε )k volH0 (U0 ) ≤ 13 where the last inequality assumes that ε < 1/2. As argued before, the minimum degree condition implies that every vertex is of degree at least W/2n and thus volH0 (U0 ) ≥ W/(2n). Therefore, by the geometric sum formula, we have 2 1 Ψ(e) ≤ 1 . · 1/2−ε − 1 1 − 2ε−1/2 c (W/2n) Plugging the value of c and setting ε = 1/4 < 1/2, we conclude that 2 4 Ψ(e) . p ≤p . ε · R · W/2n − 1 R · W/8n − 1 Setting R ≍ δ 2 · n/W for a sufficiently large δ 2 > 1 so that the assumption of Claim 10 is satisfied, it follows from (4.2) that the sum of the weights of all cut edges is at most W/2 + X e Ψ(e) · w(e) . W/2 + w(E) . δ Setting W = w(E)/δ proves the theorem. This completes the proof of Theorem 3. 5 Conclusions and Open Problems We have shown that we can decompose a graph into components of bounded effective resistance diameter while losing only a small number of edges. There are few questions which arise naturally from this work. 1. Can the decomposition in Theorem 3 be computed in near linear time? Is this decomposition useful in generating a random spanning tree? 2. For the Unique Games Conjecture, Theorem 3 implies that we can restrict our attention to graphs with bounded effective resistance diameter. Can we solve Unique Games instances better in such graphs? More generally, are there some natural and nontrivial problems that can be solved effectively in graphs of bounded effective resistance diameter? 3. Is there a generalization of Theorem 1 to multi-partitioning, i.e. does the existence of k-vertices with high pairwise effective resistance distance help us in finding a k-partitioning of the graph where every cut is very sparse? 4. Theorem 1 says that a small-set expander has bounded effective resistance diameter. Is it possible to strengthen Theorem 3 to show that every graph can be decomposed into small-set expanders? This may be used to show that the Small-Set Expansion Conjecture and the Unique Games Conjecture are equivalent, depending on the quantitative bounds. Acknowledgements We would like to thank Hong Zhou for helpful discussions and anonymous referees for their useful suggestions. 14 References [ABS10] Sanjeev Arora, Boaz Barak, and David Steurer. Subexponential algorithms for unique games and related problems. In 51th Annual Symposium on Foundations of Computer Science, pages 563–572, 2010. [AGG+ 14] Ittai Abraham, Cyril Gavoille, Anupam Gupta, Ofer Neiman, and Kunal Talwar. Cops, robbers, and threatening skeletons: padded decomposition for minor-free graphs. In 46th Annual Symposium on Theory of Computing, pages 79–88, 2014. [AKK+ 08] Sanjeev Arora, Subhash Khot, Alexandra Kolla, David Steurer, Madhur Tulsiani, and Nisheeth K. Vishnoi. Unique games on expanding constraint graphs are easy. In 40th Annual Symposium on Theory of Computing, pages 21–28, 2008. [AL17] Vedat Levi Alev and Lap Chi Lau. Approximating unique games using low diameter graph decomposition. In APPROX/RANDOM 2017, pages 18:1–18:15, 2017. [Ald90] David Aldous. The random walk construction of uniform spanning trees and uniform labelled trees. SIAM J. Discrete Math., 3(4):450–465, 1990. [AM85] Noga Alon and V. D. Milman. lambda1 , isoperimetric inequalities for graphs, and superconcentrators. J. Comb. Theory, Ser. B, 38(1):73–88, 1985. [AO15] Nima Anari and Shayan Oveis Gharan. Effective-resistance-reducing flows, spectrally thin trees, and asymmetric TSP. In 56th Annual Symposium on Foundations of Computer Science, pages 20–39, 2015. [Bar96] Yair Bartal. Probabilistic approximations of metric spaces and its algorithmic applications. In 37th Annual Symposium on Foundations of Computer Science, pages 184–193, 1996. [BFK+ 11] Nikhil Bansal, Uriel Feige, Robert Krauthgamer, Konstantin Makarychev, Viswanath Nagarajan, Joseph Naor, and Roy Schwartz. Min-max graph partitioning and small set expansion. In 52nd Annual Symposium on the Theory of Computation, pages 17–26. IEEE, 2011. [BK89] Andrei Z Broder and Anna R Karlin. Bounds on the cover time. Journal of Theoretical Probability, 2(1):101–120, 1989. [BLR10] Punyashloka Biswal, James R. Lee, and Satish Rao. Eigenvalue bounds, spectral partitioning, and metrical deformations via flows. J. ACM, 57(3):13:1–13:23, 2010. [Bro89] Andrei Z. Broder. Generating random spanning trees. In 30th Annual Symposium on Foundations of Computer Science, pages 442–447, 1989. [BRS11] Boaz Barak, Prasad Raghavendra, and David Steurer. Rounding semidefinite programming hierarchies via global correlation. In 52nd Annual Symposium on Foundations of Computer Science, pages 472–481, 2011. [CCC+ 98] Moses Charikar, Chandra Chekuri, To-Yat Cheung, Zuo Dai, Ashish Goel, Sudipto Guha, and Ming Li. Approximation algorithms for directed steiner problems. In 9th Annual Symposium on Discrete Algorithms, pages 192–200, 1998. 15 [Che70] Jeff Cheeger. A lower bound for the smallest eigenvalue of the laplacian. Problems in analysis, pages 195–199, 1970. [CKM+ 11] Paul Christiano, Jonathan A. Kelner, Aleksander Madry, Daniel A. Spielman, and Shang-Hua Teng. Electrical flows, laplacian systems, and faster approximation of maximum flow in undirected graphs. In 43rd Symposium on Theory of Computing, pages 273–282, 2011. [CKM+ 14] Michael B Cohen, Rasmus Kyng, Gary L Miller, Jakub W Pachocki, Richard Peng, Anup B Rao, and Shen Chen Xu. Solving sdd linear systems in nearly m log 1/2 n time. In 46th Annual Symposium on Theory of Computing, pages 343–352, 2014. [CKR01] Gruia Călinescu, Howard J. Karloff, and Yuval Rabani. Approximation algorithms for the 0extension problem. In 12th Annual Symposium on Discrete Algorithms, pages 8–16, 2001. [CRR+ 97] Ashok K. Chandra, Prabhakar Raghavan, Walter L. Ruzzo, Roman Smolensky, and Prasoon Tiwari. The electrical resistance of a graph captures its commute and cover times. Computational Complexity, 6(4):312–340, 1997. [DKP+ 17] David Durfee, Rasmus Kyng, John Peebles, Anup B. Rao, and Sushant Sachdeva. Sampling random spanning trees faster than matrix multiplication. In 49th Annual Symposium on Theory of Computing, pages 730–742, 2017. [FHL08] Uriel Feige, MohammadTaghi Hajiaghayi, and James R. Lee. Improved approximation algorithms for minimum weight vertex separators. SIAM J. Comput., 38(2):629–657, 2008. [FHRT03] Jittat Fakcharoenphol, Chris Harrelson, Satish Rao, and Kunal Talwar. An improved approximation algorithm for the 0-extension problem. In 14th Annual Symposium on Discrete Algorithms, pages 257–265, 2003. [GS11] Venkatesan Guruswami and Ali Kemal Sinop. Lasserre hierarchy, higher eigenvalues, and approximation schemes for graph partitioning and quadratic integer programming with PSD objectives. In 52nd Annual Symposium on Foundations of Computer Science, pages 482–491, 2011. [GT06] Anupam Gupta and Kunal Talwar. Approximating unique games. In 17th AnnualSymposium on Discrete Algorithms, pages 99–106, 2006. [Kir47] Gustav Kirchhoff. Ueber die auflösung der gleichungen, auf welche man bei der untersuchung der linearen vertheilung galvanischer ströme geführt wird. Annalen der Physik, 148(12):497–508, 1847. [KLPT09] Jonathan A. Kelner, James R. Lee, Gregory N. Price, and Shang-Hua Teng. Higher eigenvalues of graphs. In 50th Annual Symposium on Foundations of Computer Science, pages 735–744, 2009. [KM09] Jonathan A. Kelner and Aleksander Madry. Faster generation of random spanning trees. In 50th Annual Symposium on Foundations of Computer Science, pages 13–21, 2009. [KMP10] Ioannis Koutis, Gary L. Miller, and Richard Peng. Approaching optimality for solving SDD linear systems. In 51th Annual Symposium on Foundations of Computer Science, pages 235–244, 2010. 16 [KMP11] Ioannis Koutis, Gary L. Miller, and Richard Peng. A nearly-m log n time solver for SDD linear systems. In 52nd Annual Symposium on Foundations of Computer Science, pages 590–598, 2011. [Kol11] Alexandra Kolla. Spectral algorithms for unique games. Computational Complexity, 20(2):177– 206, 2011. [KOSA13] Jonathan A. Kelner, Lorenzo Orecchia, Aaron Sidford, and Zeyuan Allen Zhu. A simple, combinatorial algorithm for solving SDD systems in nearly-linear time. In 45th Annual Symposium on Theory of Computing, pages 911–920, 2013. [KPR93] Philip Klein, Serge A Plotkin, and Satish Rao. Excluded minors, network decomposition, and multicommodity flow. In Proceedings of the twenty-fifth annual ACM symposium on Theory of computing, pages 682–690. ACM, 1993. [KR93] Douglas J Klein and Milan Randić. Resistance distance. Journal of mathematical chemistry, 12(1):81–95, 1993. [KR11] Robert Krauthgamer and Tim Roughgarden. Metric clustering via consistent labeling. Theory of Computing, 7(1):49–74, 2011. [KS16] Rasmus Kyng and Sushant Sachdeva. Approximate gaussian elimination for laplacians - fast, sparse, and simple. In 57th Annual Symposium on Foundations of Computer Science, pages 573–582, 2016. [KVV04] Ravi Kannan, Santosh Vempala, and Adrian Vetta. On clusterings: Good, bad and spectral. J. ACM, 51(3):497–515, 2004. [LOT14] James R. Lee, Shayan Oveis Gharan, and Luca Trevisan. Multiway spectral partitioning and higher-order cheeger inequalities. J. ACM, 61(6):37:1–37:30, 2014. [LS93] Nathan Linial and Michael E. Saks. Low diameter graph decompositions. Combinatorica, 13(4):441–454, 1993. [LS10] James R. Lee and Anastasios Sidiropoulos. Genus and the geometry of the cut graph. In 21st Annual Symposium on Discrete Algorithms, pages 193–201, 2010. [Mat88] Peter Matthews. Covering problems for brownian motion on spheres. The Annals of Probability, pages 189–199, 1988. [MST15] Aleksander Madry, Damian Straszak, and Jakub Tarnawski. Fast generation of random spanning trees and the effective resistance metric. In 26th Annual ACM-SIAM Symposium on Discrete Algorithms, pages 2019–2036, 2015. [OT14] Shayan Oveis Gharan and Luca Trevisan. Partitioning into expanders. In 25th Annual ACMSIAM Symposium on Discrete Algorithms, pages 1256–1266, 2014. [SS11] Daniel A. Spielman and Nikhil Srivastava. Graph sparsification by effective resistances. SIAM J. Comput., 40(6):1913–1926, 2011. [ST11] Daniel A. Spielman and Shang-Hua Teng. Spectral sparsification of graphs. SIAM J. Comput., 40(4):981–1025, 2011. 17 [ST14] A Daniel A. Spielman and Shang-Hua Teng. Nearly linear time algorithms for preconditioning and solving symmetric, diagonally dominant linear systems. SIAM J. Matrix Analysis Applications, 35(3):835–885, 2014. Robustness of the Proof of Theorem 1 We avoided the issue of picking the accuracy parameter ǫ > 0 for the Laplacian solver we used in Corollary 2. Here, we want to show that the proof is robust enough to small perturbations in the potential vector, i.e. using a Laplacian solver to estimate s-t potential vector p ∈ RV by the vector p̂, additively within an accuracy of η, we can still recover our sparse cut. We first start by noting that |p(v) − p̂(v)| ≤ η is implied by the stronger inequality, kp̂ − pk2 ≤ η 2 . (A.1) We will show that if η is polynomially small in the input data, we can still find a sparse cut. Our plan is as follows. • We will figure out how small we should set the Laplacian solver accuracy ǫ to ensure (A.1) (Lemma 12). • We will show that using the mild-expansion of the threshold sets Tp̂ of the vector p̂, we can still prove upper bounds on the effective resistance (Theorem 13). • Analogously to Corollary 2, we will show that by way of contraposition the existence of a pair with large effective resistance distance means one of the threshold sets Tp̂ does not satisfy the mild expansion property (Corollary 14). A.1 Eigenvalue Bound We start with a simple eigenvalue bound that will be used to bound the accurancy needed. Claim 11. For any connected weighted graph G = (V, E, w), we have 2  mine w(e) . λ2 (G) & min w(e) · e w(E) (A.2) Proof. For any connected weighted graph G = (V, E, w), we have the following conductance bound,   mine w(e) |∂(S)| : vol(S) ≤ vol(G)/2 = Φ(G) ≥ , min vol(S) w(E) which implies mine w(e) . w(E) by Cheeger’s inequality. Note that q λ̃2 (G) λ2 (G) = min u⊥1 ⇐⇒ λ̃2 (G) &  mine w(e) w(E) 2 hD−1/2 v, LD−1/2 vi hu, Lui = min hu, ui v⊥D1/2 1 hD−1/2 v, D−1/2 vi 18 (A.3) where the last equality follows by a change of variables u = D−1/2 v. This implies that λ2 (G) = min v⊥D1/2 1 hv, L̃vi hv, L̃vi 1 ≥ min ≥ · λ̃2 (G). hv, D−1 vi v⊥D1/2 1 kD−1 k · hv, vi kD−1 k (A.4) Using kD−1 k−1 = minv deg(v) ≥ mine w(e), we obtain λ2 (G) ≥ mine w(e) · λ̃2 (G). Combining everything, we get 2  mine w(e) (A.5) λ2 (G) & min w(e) · e w(E) hence proving the claim. A.2 Picking the Laplacian Solver Accuracy For b = es − et , the Spielman Teng Solver in Lemma 4 produces a vector p̂ such that kp̂ − L† bkL ≤ ζ · kL† bkL . Letting p be the s-t electric potential vector, this becomes kp̂ − pkL ≤ ζ · kpkL . Using the definition of the L-norm, we have hp̂ − p, L(p̂ − p)i ≤ ζ 2 hp, Lpi = ζ 2 · Reff(s, t). Since we are working on the space orthogonal to the nullspace, both p̂, p ⊥ 1 and thus (p̂ − p) ⊥ 1. It follows from the definition of λ2 (G) that λ2 (G) · kp̂ − pk2 ≤ ζ 2 · Reff(s, t). By the eigenvalue bound in (A.2), we have kp̂ − pk2 . ζ 2 · Reff(s, t) · Using the trivial bound Reff(s, t) ≤ m mine w(e) w(E)2 . (mine w(e))3 in a connected graph, we get kp̂ − pk2 . ζ 2 · m · Therefore, we can set ζ≍ w(E)2 . (mine w(e))4 η · (mine w(e))2 √ w(E) · m to get the desired accuracy in (A.1). The above argument is summarized in the following lemma. Lemma 12. Given a connected weighted graph G = (V, E, w), it is possible to compute an estimate p̂ of the s-t electric potential vector p within an additive accuracy of η using the Spielman-Teng solver with accuracy ζ≍ η · (mine w(e))2 √ . w(E) · m 19 A.3 How Small Should We Pick η? In the proof of Theorem 1, we used the actual potential vector to bound the effective resistance. This is too expensive for algorithmic purposes. We now show that we can use the estimate p̂ and the potential sets Tp̂ = {v ∈ V : p̂(v) ≥ p̂} at a small cost. We will show that the mild-expansion of these cuts allows us to bound the effective resistance from above, just as in Theorem 1. Theorem 13. Let p̂ be an additive η-approximation of the electric potential vector p between s and t, i.e. |p̂(u) − p(u)| ≤ η ∀u ∈ V. If all the threshold cuts Tp̂ satisfy the mild expansion condition, w(∂Tp̂ ) ≥ c · vol(Tp̂ )1/2+ε Then, we have Reff(s, t) . 1 η(48m1/2−ε log n + 2c) 1 + + . εc2 deg(s)2ε εc2 deg(t)2ε c Proof. The proof will be very similar to that of Theorem 1, we will just highlight the differences and carry out the relevant computations. To follow the proof of Theorem 1, we need an upper bound on the quantity X X X w(e) · |∆e p| + 2η · w(∂Tp̂ ). w(e) · (|∆e p| + 2η) = w(e) · |∆e p̂| ≤ e∈∂Tp̂ (A.6) e∈∂Tp̂ e∈∂Tp̂ where for the first inequality we have used the triangle inequality |∆e p̂| = |p̂(e+ ) − p̂(e− )| ≤ |p(e+ ) − p(e− )| + |p(e+ ) − p̂(e+ )| + |p(e− ) − p̂(e− )| ≤ |∆e p| + 2η. Bounding the RHS of (A.6) is certainly possible by bounding X w(e) · |∆e p̂|. (A.7) e∈∂Tp̂ In Theorem 1, we used the Equation (3.1) to bound the analogous term, i.e. X X w(e) · |∆e p| = 1. |f (e)| = e∈∂Sp e∈∂Sp We were allowed to do this because Sp is a threshold set, i.e. the st electric flow flows in one direction: from P Sp to Spc . This means that flow conservation insures e∈∂(Sp ) |f (e)| = 1, as s has a flow deficit of a unit, and t has a flow surplus of a unit. This is no longer true for Tp̂ since Tp̂ is no longer a threshold set of the P true potential vector p, i.e. we do not necessarily have e∈∂(Tp̂ ) |f (e)| = 1. Before we go on further, we adopt the following convention of taking uv ∈ ∂Tp̂ to be an edge with u ∈ Tp̂ and v 6∈ Tp̂ . 20 In our case the conservation of flow still implies, X (A.8) f (e) = 1. e∈∂Tp̂ We will take P − to be the set of edges uv ∈ ∂(Tp̂ ) with p(u) < p(v), and P + to be the set of edges uv ∈ ∂(Tp̂ ) with p(u) ≥ p(v). Now, note that (A.8) rewrites into, X uv∈P + w(uv) · |∆uv p| − X uv∈P − w(uv) · |∆uv p| = 1. In particular, we can manipulate this to obtain X X X X w(uv)·|∆uv p| = w(u, v)·|∆uv p|+ w(u, v)·|∆uv p| = 1 + 2 w(u, v)·|∆uv p|. (A.9) uv∈P − uv∈∂Tp̂ uv∈P − uv∈P − We see now, proving an upper bound on (A.6) boils down to upper bounding |∆uv p| for uv ∈ P − . This can be done by noting p̂(u) > p̂(v) (as uv ∈ ∂(Tp̂ )) and p ≈ p̂. Formally, we have p(u) + η ≥ p̂(u) ≥ p̂ > p̂(v) ≥ p(v) − η, which means, we must either have p(u) ≥ p(v) or it must be the case that we have p(u) < p(v) and |∆uv p| ≤ 2η. This readily implies the following inequality, X w(e) · |∆e p| ≤ 2η · w(∂Tp ). (A.10) e∈P − Plugging this in (A.9), we get X X X w(e) · |∆e p| = w(e) · |∆e p| + w(e) · |∆e p| ≤ 1 + 4η · w(∂Tp̂ ). e∈∂Tp̂ e∈P − e∈P + Combining this with (A.6) yields, X e∈∂Tp̂ w(e) · |∆e p̂| ≤ 1 + 6η · w(∂Tp̂ ). (A.11) With this bound, we can proceed as in the proof of Theorem 1. Normalizing (A.11) we obtain, X e∈∂Tp̂ w(e) 1 · |∆e p̂| ≤ + 6η. w(∂Tp̂ ) w(∂Tp̂ ) Since µ(e) = w(e)/w(∂Tp̂ ) is a probability distribution, analogously as in the proof of Theorem 1, we obtain a set F ⊆ ∂Tp̂ by Markov’s inequality such that • all edges f ∈ F satisfy |∆f p̂| ≤ 2 w(∂Tp̂ ) + 12η • the set F is “large”, i.e. w(F ) = µ(F ) · w(∂Tp̂ ) ≥ 21 1 2 · w(∂Tp̂ ). Now, analogously as in the proof of Theorem 1, we get vol(Tp̂− 2 −12η w(∂Tp̂ ) Using mild expansion of Tp̂ , this implies  2 vol Tp̂− c vol(Tp̂ )1/2+ε ) ≥ vol(Tp̂ ) + −12η  1 · w(∂Tp̂ ). 2 c vol(Tp̂ )1/2+ε . 2 ≥ vol(Tp̂ ) + Iterating this for ( 2c vol(Tp̂ )1/2−ε )-times, we obtain vol T 2 p̂− c2 vol(T 2ε p̂ ) − 24η·vol(Tp̂ )1/2−ε c ! (A.12) ≥ 2 vol(Tp̂ ). Now, similarly we set p̂0 = p̂(s) and inductively extend this to p̂k for k > 0 by 24η · vol(Tp̂ )1/2−ε 2 − . c2 vol(Tp̂ )2ε c p̂k+1 = p̂k − Since s ∈ Tp̂0 , we know vol(Tp̂0 ) ≥ deg(s), and by (A.12) vol(Tp̂k ) ≥ 2k deg(s). There exists some k ⋆ . log n satisfying, vol(G) ≥ 2 vol(Tp̂k⋆ ) ≥ vol(G)/2. (A.13) It follows that ⋆ p̂k⋆ − p̂0 = k X j=0 k⋆ X 24η · vol(Tp̂ )1/2−ε 2 + . 2 2ε c vol(Tp̂ ) c j=0 Using the bound vol(Tp̂k ) ≥ 2k deg(s) and the geometric sum formula, we have ⋆ p̂ k⋆ − p̂0 . k X j=0 k⋆ k⋆ X 24η · vol(Tp̂ )1/2−ε X 24η · vol(Tp̂ )1/2−ε 1 2 + + ≤ 2 . 2 j2ε 2ε 2ε c 2 deg(s) c εc deg(s) c j=0 j=0 Using the naive bounds vol(Tp̂ ) ≤ m and k ⋆ . log n, we obtain p̂k⋆ − p̂0 . 24η · m1/2−ε log n 1 + . εc2 deg(s)2ε c Using similar arguments (sending flow from t to s), we see that more than half the volume of the vertices has p̂ potential difference at least 1 24η · m1/2−ε log n + εc2 deg(t)2ε c to the vertex t. Therefore, we can prove the following potential difference upper-bound with respect to p̂, p̂(s) − p̂(t) ≤ 1 εc2 deg(s)2ε + 1 εc2 deg(t)2ε + 48η · m1/2−ε log n . c Using the triangle inequality, p(s) − p(t) ≤ p̂(s) − p̂(t) + |p̂(s) − p(s)| + |p̂(t) − p(t)| ≤ p̂(s) − p̂(t) + 2η. 22 We can conclude that p(s) − p(t) ≤ = εc2 1 1 48η · m1/2−ε log n + 2 + + 2η 2ε 2ε deg(s) εc deg(t) c εc2 1 1 η(48m1/2−ε log n + 2c) + 2 + . 2ε 2ε deg(s) εc deg(t) c Noting that p(s) − p(t) = Reff(s, t) completes the proof. We use the above result to complete the proof of our algorithmic result, in which we will choose η. Corollary 14. Let G = (V, E, w) be a connected weighted graph. If deg(v) ≥ 1/α for all v ∈ V , then for any 0 < ǫ < 1/2, there is a cut (U, U c ) such that αε · vol(U )ε−1/2 . Φ(U ) . √ Rdiam · ε    w(E) e m · log Further, the set U can be found in time O . mine w(e) Proof. The proof will be the same as that of Corollary 2. For Corollary 2, we used Theorem 1 to get our non-expanding cut, here we will use Theorem 13. By Lemma 7, we can compute vertices u, v ∈ V which satisfies, Reff(u, v) ≥ Rdiam /3 e in time O(m). As in Corollary 2, we pick c≍ s 1 deg(u)2ε + 1 deg(v)2ε Rdiam · ε . To contradict the bound from Theorem 13 asymptotically, we need to pick η to satisfy   1 η · (48 · m1/2−ε log n + 2c) 1 1 ≥ · + . εc2 deg(u)2ε deg(v)2ε c This will allow us to ignore the additional error term we get in the proof of Theorem 13, by settling for a bigger constant that will be hidden in the .-notation. By the AM-GM inequality, the choice η := 1 · ε·c  1 1 + deg(u)2ε deg(v)2ε 23  1 ·p 96 · m1/2 log n certainly satisfies this. Note that η = & ≍ & ≥   1 1 1 1 ·p + · ε·c deg(u)2ε deg(v)2ε 96 · m1/2 log n 1 1 1 ·p · 1/2 ε · c3/2 w(E)2ε m log n !3/4 1 1 Rdiam · ε 1 · ·p · 1 1 2ε 1/2 log n ε w(E) + 2ε 2ε m deg(u) deg(v) 3/4 1 1 1  · ·p · Rdiam · ε · (min w(e))2ε 2ε 1/2 e ε w(E) m log n 3 Rdiam 4 · (mine w(e))3ε/2 1 ·p . 1/2 w(E)2ε m log n Since the smallest possible Rdiam is when all the edges act as parallel resistors between two vertices, we have Rdiam ≥ P 1 e∈E w(e) = 1 . w(E) Plugging this into the above computation, we get η& (mine w(e))3ε/2 1 ·p . 3/4+2ε 1/2 w(E) m log n (A.14) Using this with Lemma 12, we see that we need to pick ζ≍ η · (mine w(e))2 1 (mine w(e))2+3ε/2 √ ·p & . 3/2 w(E) · m w(E)7/4+2ε m log n as the accuracy for the Spielman-Teng solver. In particular, this means that the Laplacian solver will take time       w(E) w(E) e e m · polylog(m) + m · log e m · log O(m · log(1/ζ)) = O =O . mine w(e) mine w(e) The rest of the proof follows as in Corollary 2. 24 (A.15)
8cs.DS
Optimal Key Consensus in Presence of Noise∗ Zhengzhong Jin† Yunlei Zhao‡ arXiv:1611.06150v4 [cs.IT] 6 Oct 2017 Abstract In this work, we abstract some key ingredients in previous LWE- and RLWE-based key exchange protocols, by introducing and formalizing the building tool, referred to as key consensus (KC) and its asymmetric variant AKC. KC and AKC allow two communicating parties to reach consensus from close values obtained by some secure information exchange. We then discover upper bounds on parameters for any KC and AKC, which bounds what could or couldn’t be done for the various parameters involved. KC and AKC are fundamental to lattice based cryptography, in the sense that a list of cryptographic primitives based on LWR, LWE and RLWE (including key exchange, public-key encryption, and more) can be modularly constructed from them. As a conceptual contribution, this much simplifies the design and analysis of these cryptosystems in the future. We then design and analyze both general and almost optimal KC and AKC schemes, which are referred to as OKCN and AKCN respectively for presentation simplicity. Based on KC and AKC, we present generic constructions of key exchange from LWR, LWE and RLWE. The generic construction allows versatile instantiations with our OKCN and AKCN schemes, for which we elaborate on evaluating and choosing the concrete parameters in order to achieve an optimally-balanced performance among security, computational cost, bandwidth efficiency, error rate, and operation simplicity. • We propose the first construction of key exchange based on the learning with rounding (LWR) problem, to the best of our knowledge. The rounding in LWR much reduces the bandwidth. We provide a delicate approach to calculating the error rate accurately, which avoids introducing some cumbersome inequalities in the traditional ways of error rate estimation. The accuracy of error rate allows us to choose tight parameters. Our LWR-based key exchange costs 16.39 kilo-bytes (kB) with error rate 2−35 at the level of at least 128-bit quantum security. • When applied to LWE-based cryptosystems, OKCN and AKCN can directly result in more practical schemes of key exchange and CPA-secure public-key encryption. To further save bandwidth, we make a thorough analysis of the variant where some least significant bits of LWE samples are cut off. For instance, on recommended parameters our LWE-based protocol (resp., Frodo) has 18.58kB (resp., 22.57kB) bandwidth, 887.15kB (resp., 1060.32kB) matrix, at least 134-bit (resp., 130-bit) quantum security, and error rate 2−39 (resp., 2−38.9 ). • When applied to RLWE-based cryptosystems, we make a key observation by proving that the errors in different positions in the shared-key are essentially independent. Based upon this observation, we present an extremely simple and fast code, referred to as single-error correction (SEC) code, to correct at least one bit error. By equipping OKCN/AKCN with the SEC code, we achieve the simplest RLWE-based key exchange (up to now) with negligible error rate for much longer shared-key size; for instance, 837-bit shared-key with bandwidth of about 0.4kB and error rate 2−69 . ∗ This research was supported in part by NSFC Grant No. U1536205. School of Mathematical Sciences, Fudan University, Shanghai, China. [email protected]. ‡ School of Computer Science, Fudan University, Shanghai, China. [email protected] † 1 Contents 1 Introduction 1.1 Our Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Subsequent or Concurrent Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 5 6 2 Preliminaries 2.1 The LWE, LWR, and RLWE problems . . . . . . . . . . . . . . . . . . . . . . . . . 7 7 3 Key Consensus with Noise 3.1 Efficiency Upper Bound of KC . . . . . . . . . . . . . . . 3.2 Construction and Analysis of OKCN . . . . . . . . . . . . 3.2.1 Correctness and Security of OKCN . . . . . . . . . 3.2.2 Special Parameters, and Performance Speeding-Up 4 Asymmetric Key Consensus with Noise 4.1 Construction and Analysis of AKCN . . . . . . . 4.1.1 Correctness and Security of AKCN . . . . 4.1.2 A Simplified Variant of AKCN for Special 4.2 On KC/AKC vs. Fuzzy Extractor . . . . . . . . 5 LWR-Based Key Exchange from KC 5.1 Correctness Analysis . . . . . . . . . 5.2 Security Proof . . . . . . . . . . . . . 5.3 Parameter Selection and Evaluation 5.3.1 Discrete Distribution . . . . . 5.3.2 Proposed Parameters . . . . . 5.3.3 Security Estimation . . . . . and AKC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 . 9 . 11 . 11 . 12 . . . . . . . . . . . . . . Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 16 16 17 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 19 21 25 25 26 26 6 LWE-Based Key Exchange from KC and AKC 6.1 Noise Distributions and Correctness . . . . . . . . 6.1.1 Binary Distribution . . . . . . . . . . . . . 6.1.2 Discrete Distributions . . . . . . . . . . . . 6.1.3 Instantiations, and Comparisons with Frodo 6.1.4 Security Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 29 30 31 32 32 7 Hybrid Construction of Key Exchange from LWE and LWR in the Public-Key Setting 33 7.1 Security and Error Rate Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 7.2 Parameter Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 8 RLWE-Based Key Exchange from KC and AKC 8.1 RLWE-Based Key Exchange with Negligible Error Rate 8.2 On the Independence of Errors in Different Positions . . 8.3 Reducing Error Rate with Single-Error Correction Code 8.3.1 Single-Error Correction Code . . . . . . . . . . . 8.3.2 AKC and KC with SEC code . . . . . . . . . . . 9 Performance Comparison: Benchmark 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 37 38 40 40 41 43 10 More Applications and Future Works 11 ZarZar: RLWE-Based Key Exchange 11.1 E8 and its Encoding and Decoding . 11.2 Parameters and Implementation . . 11.2.1 Parameters . . . . . . . . . . 11.2.2 Noise distribution . . . . . . 11.2.3 Benchmark . . . . . . . . . . 11.3 Error Rate Analysis . . . . . . . . . 45 from KC and AKC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 46 48 49 49 50 50 A Consensus Mechanism of Frodo 57 B Consensus Mechanism of NewHope 57 C Security Analysis of LWE-Based Key Exchange 58 D Construction and Analysis of AKCN-4:1 61 D.1 Overview of NewHope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 D.2 Construction and Analysis of AKCN-4:1 . . . . . . . . . . . . . . . . . . . . . . . . 62 E Implementing HxT in SEC with Simple Bit Operations 63 F A Note on Lizard 64 3 1 Introduction Most public-key cryptosystems currently in use, based on the hardness of solving (elliptic curve) discrete logarithm or factoring large integers, will be broken, if large-scale quantum computers are ever built. The arrival of such quantum computers is now believed by many scientists to be merely a significant engineering challenge, and is estimated by engineers at IBM to be within the next two decades or so. Historically, it has taken almost two decades to deploy the modern public key cryptography infrastructure. Therefore, regardless of whether we can estimate the exact time of the arrival of the quantum computing era, we must begin now to prepare our information security systems to be able to resist quantum computing [NIS]. In addition, for the content we want to protect over a period of 15 years or longer, it becomes necessary to switch to post-quantum cryptography today. This has been recognized not only by the cryptography research community, but also by standardization bodies and leading information companies, for example, NSA [NSA], NIST [NIS], U.K. CESG [CESG], the Tor project [Nic], and Google [Mat]. As noted in [ADPS16,AJS16], in the majority of contexts the most critical asymmetric primitive to upgrade to post-quantum security is ephemeral key exchange (KE). KE plays a central role in modern cryptography, which bridges public-key cryptography and symmetric-key cryptography and can, in turn, be used to build CPA-secure public-key encryption (PKE) as well as CCA-secure PKE in the random oracle (RO) model via the FO-transformation [FO13,Pei14,TU15], and more. U.K. CESG has also expressed their preference for post-quantum algorithms (in particular, postquantum KE schemes) over quantum technologies “such as Quantum Key Distribution” to counter the threat of quantum computing [CESG]. Lattice-based cryptography is among the major mathematical approaches to achieving security resistant to quantum attacks. For cryptographic usage, compared with the classic hard lattice problems such as SVP and CVP, the learning with errors (LWE) problem is proven to be much more versatile [Reg09]. Nevertheless, LWE-based cryptosystems are usually less efficient, which was then resolved by the introduction of the ring-LWE (RLWE) problem [LPR13a]. In recent years, large numbers of impressive works are developed from LWE and RLWE, with (ephemeral) key exchange and public-key encryption being the study focus of this work [JD12, Pei14, BCNS15, ADPS16, BCD+ 16, Reg09, GPV08, LP10, LPR13a, LPR13b, PG13]. For an excellent survey of lattice-based cryptography, the reader is referred to [Pei16]. Some celebrating progresses on achieving practical LWE- and RLWE-based key exchange are made in recent years. The performance of RLWE-based key exchange is significantly improved with NewHope [ADPS16], which achieves 256-bit shared-key with error rate about 2−61 . The negligible error rate of NewHope is achieved by decoding the four-dimensional lattice D̃4 . Decoding the 24-dimensional Leech lattice is also recently considered in [Pop16]. But decoding the four-dimensional lattice D̃4 has already been relatively complicated and computationally less efficient. Compared to LWE, the additional ring structure of RLWE helps to improve the efficiency of cryptosystems, but the concrete hardness of RLWE remains less clear. The work [BCD+ 16] proposes a key exchange protocol Frodo only based on LWE, and demonstrates that LWE-based key exchange can be practical as well. Nevertheless, bandwidth of Frodo is relatively large, as Frodo uses about 22kB bandwidth for its recommended parameter set. In addition, Frodo has relatively large error rates, and cannot be directly used for PKE. Whether further improvements on LWE- and RLWE-based key exchange, as well as CPA-secure PKE, can be achieved remains an interesting question of practical significance. 4 One of the main technical contributions in the works [ADPS16,BCD+ 16,PG13], among others, is the improvement and generalization of the key reconciliation mechanisms [Pei14, JD12].1 But the key reconciliation mechanisms were only previously used and analyzed, for both KE and PKE, in a non-black-box way. This means, for new key reconciliation mechanisms developed in the future to be used for constructing lattice-based cryptosystems, we need to make analysis from scratch. Also, for the various parameters involved in key reconciliation, the bounds on what could or couldn’t be achieved are unclear. 1.1 Our Contributions In this work, we abstract some key ingredients in previous LWE- and RLWE-based key exchange protocols, by introducing and formalizing the building tool, referred to as key consensus (KC) and its asymmetric variant AKC. KC and AKC allow two communicating parties to reach consensus from close values obtained by some secure information exchange, such as exchanging their LWE/RLWE samples. We then discover upper bounds on parameters for any KC and AKC, and make comparisons between KC/AKC and fuzzy extractor [DORS08]. KC and AKC are fundamental to lattice based cryptography, in the sense that a list of cryptographic primitives based on LWE or RLWE (including key exchange, public-key encryption, and more) can be modularly constructed from them. As a conceptual contribution, this much simplifies the design and analysis of these cryptosystems in the future. We then design and analyze both general and highly practical KC and AKC schemes, which are referred to as OKCN and AKCN respectively for presentation simplicity. Our OKCN and AKCN schemes are optimal in a sense of achieving optimal balance among security, (computational and bandwidth) efficiency, and operation simplicity. Firstly, the correctness constraints on parameters are almost the same as the upper bounds we discovered. Secondly, the generality of our schemes allows us to take optimal balance among parameters in order to choose parameters towards different goals. Thirdly, the operations involved are simple. Based on KC and AKC, we present generic constructions of key exchange from LWR,LWE and RLWE with delicate analysis of error rates. Then, for the instantiations of these generic constructions with our OKCN and AKCN schemes, we elaborate on evaluating and choosing the concrete parameters in order to achieve an optimally-balanced performance among security, computational efficiency, bandwidth efficiency, error rate, and operation simplicity. • We propose the first construction of key exchange based on the learning with rounding (LWR) problem, to the best of our knowledge. The rounding in LWR much reduces the bandwidth. We provide a delicate approach to calculating the error rate accurately, which avoids introducing some cumbersome inequalities in the traditional ways of error rate estimation. The accuracy of error rate allows us to choose tight parameters. Our LWR-based key exchange costs 16.39kB with error rate 2−35 at the level of at least 128-bit quantum security. • When applied to LWE-based cryptosystems, OKCN and AKCN can directly result in more practical or well-balanced schemes of key exchange and CPA-secure public-key encryption. To further save bandwidth, we make a thorough analysis of the variant where some least 1 To our knowledge, the key reconciliation mechanism in [Pei14] is the first that fits our KC definition (the mechanism in [JD12] requires the distance be of special types). The Lindner-Peikert mechanism implicitly presented for PKE [LP10] is the first that fits our AKC definition. The reader is referred to [ADPS16b] for a detailed survey on key exchange from LWE and RLWE. 5 significant bits of LWE samples are cut off. We remark that cutting off some least bits of LWE samples can only improve the actual security guarantee in reality, but complicates the analysis of error rates. For instance, on recommended parameters our LWE-based protocol (resp., Frodo) has 18.58kB (resp., 22.57kB) bandwidth, 887.15kB (resp., 1060.32kB) matrix, at least 134-bit (resp., 130-bit) quantum security, and error rate 2−39 (resp., 2−38.9 ). • When applied to RLWE-based cryptosystems, to the best of our knowledge, AKCN can lead to more (bandwidth) efficient schemes of CPA-secure PKE and AKC-based KE with negligible error rate. In order to achieve 256-bit shared-key with negligible error rate, we use the technique of NewHope by encoding and decoding the four-dimensional lattice D̃4 , which results in a protocol named AKCN-4:1 that is (slightly) better than NewHopesimple [ADPS16b] in bandwidth expansion. However, encoding and decoding D̃4 is relatively complicated and computationally less efficient. In this work, we make a key observation on RLWE-based key exchange, by proving that the errors in different positions in the shared-key are almost independent. Based upon this observation, we present an super simple and fast code, referred to as single-error correction (SEC) code, to correct at least one bit error. By equipping OKCN/AKCN with the SEC code, we achieve the simplest (up to now) RLWE-based key exchange, from both OKCN and AKCN, with negligible error rate for much longer shared-key size; for instance, 837-bit shared-key with bandwidth of about 0.4kB and error rate 2−69 . Finally, we briefly discuss the applications of OKCN and AKCN to public-key encryption, authenticated key exchange, key transport, and TLS. As a fundamental building tool for latticebased cryptographic schemes, we suggest OKCN, AKCN and the various KE protocols based on them are of independent value. They may possibly find more applications in more advanced cryptographic primitives (e.g., oblivious transfer, IBE, ABE, FHE) from LWR, LWE and RLWE, by simplifying their design and analysis with versatile performance optimization or balance. All the main protocols developed in this work are implemented. The code and scripts, together with those for evaluating concrete security and error rates, are available from Github http: //github.com/OKCN. 1.2 Subsequent or Concurrent Works A PKE scheme, named Lizard, is recently presented in [CKLS16]. It is easy to see that the underlying key consensus mechanism of Lizard is just instantiated from our AKCN scheme presented in Algorithm 4 (see more details in Appendix F).2 Recently, we notice that an AKC-based variant of NewHope, named NewHope-simple, was presented in a note [ADPS16b]. In comparison, NewHope-simple is still slightly inferior to AKCN4:1RLWE in bandwidth expansion (specifically, 256 vs. 1024 bits), and our SEC-equipped protocols are simpler, have lower error rates and much longer shared-key sizes. 2 AKCN was introduced at the second Asian PQC Forum (APQC 2016) on November 28, 2016, in Seoul, Korea, and was filed and publicly available even earlier. The original version of Lizard was also presented at APQC 2016. But we note that, according to the video presentation available from http://www.pqcforum.org/, the underlying key consensus mechanism of Lizard presented as APQC 2016 was based on the Lindner-Peikert mechanism [LP10], not our AKCN mechanism as appeared in the later ePrint report [CKLS16]. 6 2 Preliminaries A string or value α means a binary one, and |α| is its binary length. For any real number x, bxc denotes the largest integer that less than or equal to x, and bxe = bx + 1/2c. For any positive integers a and b, denote by lcm(a, b) the least common multiple of them. For any i, j ∈ Z such that i < j, denote by [i, j] the set of integers {i, i + 1, · · · , j − 1, j}. For any positive integer t, we let Zt denote Z/tZ. The elements of Zt are represented, by default, as [0, t − 1]. Nevertheless, sometimes, Zt is explicitly specified to be represented as [−b(t − 1)/2c, bt/2c]. If S is a finite set then |S| is its cardinality, and x ← S is the operation of picking an element uniformly at random from S. For two sets A, B ⊆ Zq , define A + B , {a + b|a ∈ A, b ∈ B}. For an addictive group (G, +), an element x ∈ G and a subset S ⊆ G, denote by x + S the set containing x + s for all s ∈ S. For a set S, denote by U(S) the uniform distribution over S. For any discrete random variable X over R, denote Supp(X) = {x ∈ R | Pr[X = x] > 0}. We use standard notations and conventions below for writing probabilistic algorithms, experiments and interactive protocols. If D denotes a probability distribution, x ← D is the operation of picking an element according to D. If α is neither an algorithm nor a set then x ← α is a simple assignment statement. If A is a probabilistic algorithm, then A(x1 , x2 , · · · ; r) is the result of running A on inputs x1 , x2 , · · · and coins r. We let y ← A(x1 , x2 , · · · ) denote the experiment of picking r at random and letting y be A(x1 , x2 , · · · ; r). By Pr[R1 ; · · · ; Rn : E] we denote the probability of event E, after the ordered execution of random processes R1 , · · · , Rn . We say that a function f (λ) is negligible, if for every c > 0 there exists an λc such that f (λ) < 1/λc for all λ > λc . Two distribution ensembles {X(λ, z)}λ∈N,z∈{0,1}∗ and {Y (λ, z)}λ∈N,z∈{0,1}∗ are computationally indistinguishable, if for any probabilistic polynomial-time (PPT) algorithm D, and for sufficiently large λ and any z ∈ {0, 1}∗ , it holds | Pr[D(λ, z, X) = 1] − Pr[D(λ, z, Y ) = 1]| is negligible in λ. 2.1 The LWE, LWR, and RLWE problems √ Given positive continuous α > 0, define the real Gaussian function ρα (x) , exp(−x2 /2α2 )/ 2πα2 for x ∈ R. Let DZ,α denote the one-dimensional discrete Gaussian distribution over Z, which is determined by its probability density function DZ,α (x) , ρα (x)/ρα (Z), x ∈ Z. Finally, let DZn ,α denote the n-dimensional spherical discrete Gaussian distribution over Zn , where each coordinate is drawn independently from DZ,α . Given positive integers n and q that are both polynomial in the security parameter λ, an integer vector s ∈ Znq , and a probability distribution χ on Zq , let Aq,s,χ be the distribution over Znq × Zq obtained by choosing a ∈ Znq uniformly at random, and an error term e ← χ, and outputting the pair (a, b = aT s + e) ∈ Znq × Zq . The error distribution χ is typically taken to be the discrete Gaussian probability distribution DZ,α defined previously; However, as suggested in [BCD+ 16] and as we shall see in Section 6.1, other alternative distributions of χ can be taken. Briefly speaking, the (decisional) learning with errors (LWE) assumption [Reg09] says that, for sufficiently large security parameter λ, no probabilistic polynomial-time (PPT) algorithm can distinguish, with non-negligible probability, Aq,s,χ from the uniform distribution over Znq × Zq . This holds even if A sees polynomially many samples, and even if the secret vector s is drawn randomly from χn [ACPS09]. The LWR problem [BPR12] is a “derandomized” variant of the LWE problem. Let D be some distribution over Znq , and s ← D. For integers q ≥ p ≥ 2 and any x ∈ Zq , denote bxep = b pq xe. Then, for positive integers n and q ≥ p ≥ 2, the LWR distribution An,q,p (s) over Znq × Zp is 7     obtained by sampling a from Znq uniformly at random, and outputting a, aT s p ∈ Znq × Zp . The search LWR problem is to recover the hidden secret s given polynomially many samples of An,q,p (s). Briefly speaking, the (decisional) LWR assumption says that, for sufficiently large security parameter, no PPT algorithm A can distinguish, with non-negligible probability, the distribution An,q,p (s) from the distribution (a ← Znq , buep ) where u ← Zq . This holds even if A sees polynomially many samples. An efficient reduction from the LWE problem to the LWR problem, for super-polynomial large q, is provided in [BPR12]. Let B denote the bound for any component in the secret s. It is recently shown that, when q ≥ 2mBp (equivalently, m ≤ q/2Bp), the LWE problem can be reduced to the (decisional) LWR assumption with m independently random samples [BGM+ 16]. Moreover, the reduction from LWE to LWR is actually independent of the distribution of the secret s. For the positive integer m that is polynomial in the security parameter λ, let n , ϕ(m) denote the totient of m, and K , Q(ζm ) be the number field obtained by adjoining an abstract element ζm satisfying Φm (ζm ) = 0, where Φm (x) ∈ Z[x] is the m-th cyclotomic polynomial of degree n. Moreover, let R , OK be the ring of integers in K. Finally, given a positive prime q = poly(λ) such that q ≡ 1 (mod m), define the quotient ring Rq , R/qR. We briefly review the RLWE problem, and its hardness result [LPR13a,LPR13b,DD12]. As we shall see, it suffices in this work to consider a special case of the original ring-LWE problem defined in [LPR13a]. Let n ≥ 16 be a power-of-two and q = poly(λ) be a positive prime such that q ≡ 1 (mod 2n). Given s ← Rq , a sample drawn from the RLWE distribution An,q,α,s over Rq × Rq is generated by first choosing a ← Rq , e ← DZn ,α , and then outputting (a, a · s + e) ∈ Rq × Rq . Roughly speaking, the (decisional) RLWE assumption says that, for sufficiently large security parameter λ, no PPT algorithm A can distinguish, with non-negligible probability, An,q,α,s from the uniform distribution over Rq × Rq . This holds even if A sees polynomially many samples, and even if the secret s is drawn randomly from the same distribution of the error polynomial e [DD12, ACPS09]. Moreover, as suggested in [ADPS16], alternative distributions for the error polynomials can be taken for the sake of efficiency while without essentially reducing security. 3 Key Consensus with Noise Before presenting the definition of key consensus (KC) scheme, we first introduce a new function | · |t relative to arbitrary positive integer t ≥ 1: |x|t = min{x mod t, t − x mod t}, ∀x ∈ Z, where the result of modular operation is represented in {0, ..., (t − 1)}. For instance, | − 1|t = min{−1 mod t, (t+1) mod t} = min{t−1, 1} = 1. In the following description, we use |σ1 −σ2 |q to measure the distance between two elements σ1 , σ2 ∈ Zq . In this work, such a distance is caused by small noises, and is relatively small compared to q. 8 Alice σ1 ∈ Zq (k1 , v) ← Con(σ1 , params) ≈ Bob σ2 ∈ Zq v k2 ← Rec(σ2 , v, params) Figure 1: Brief depiction of KC, where k1 , k2 ∈ Zm , v ∈ Zg and |σ1 − σ2 |q ≤ d. Definition 3.1. A key consensus scheme KC = (params, Con, Rec), briefly depicted in Figure 1, is specified as follows. • params = (q, m, g, d, aux) denotes the system parameters,3 where q, m, g, d are positive integers satisfying 2 ≤ m, g ≤ q, 0 ≤ d ≤ b 2q c (which dominate security, correctness and bandwidth of the KC scheme), and aux denotes some auxiliary values that are usually determined by (q, m, g, d) and could be set to be a special symbol ∅ indicating “empty”. • (k1 , v) ← Con(σ1 , params): On input of (σ1 ∈ Zq , params), the probabilistic polynomial-time conciliation algorithm Con outputs (k1 , v), where k1 ∈ Zm is the shared-key, and v ∈ Zg is a hint signal that will be publicly delivered to the communicating peer to help the two parties reach consensus. • k2 ← Rec(σ2 , v, params): On input of (σ2 ∈ Zq , v, params), the deterministic polynomialtime reconciliation algorithm Rec outputs k2 ∈ Zm . Correctness: A KC scheme is correct, if it holds k1 = k2 for any σ1 , σ2 ∈ Zq such that |σ1 − σ2 |q ≤ d. Security: A KC scheme is secure, if k1 and v are independent, and k1 is uniformly distributed over Zm , whenever σ1 ← Zq (i.e., σ1 is taken uniformly at random from Zq ). The probability is taken over the sampling of σ1 and the random coins used by Con. 3.1 Efficiency Upper Bound of KC For fixed q, g, d, we expect the two communicating parties to reach as more consensus bits as possible, so the range of consensus key m can be regarded as an indicator of efficiency. The following theorem reveals an upper bound on the range of consensus key of a KC with parameters q, g (parameterize bandwidth), and d (parameterize correctness). Its proof also divulges some intrinsic properties of any correct and secure KC scheme. Theorem 3.1. If KC = (params, Con, Rec) is a correct and secure key consensus scheme, and params = (q, m, g, d, aux), then   1 . 2md ≤ q 1 − g Remark: Some comments are in order. Theorem 3.1 divulges an efficiency upper bound on the system parameters of KC schemes, and allows us to take balance on these parameters according to different priorities among security, computational efficiency and bandwidth consumption. When 3 In practice, the system parameters are usually set by the higher-level protocol that calls KC. 9 balancing these parameters, we are mainly concerned with the parameters (q, d, m), with a focus on the parameter q that dominates the security and efficiency of the underlying KC scheme. The parameter g is mainly related to bandwidth. But the bandwidth reduction with a smaller g can be overtaken by the overall efficiency gains with a smaller q. Before proceeding to prove Theorem 3.1, we first prove the following propositions. Proposition 3.1. Given params = (q, m, g, d, aux) for a correct and secure KC scheme. For any arbitrary fixed σ1 ∈ Zq , if Con(σ1 , params) outputs (k1 , v) with positive prabability, then the value k1 is fixed w.r.t. the (v, σ1 ). That is, for any random coins (r, r0 ), if Con(σ1 , params, r) = (k1 , v) and Con(σ1 , params, r0 ) = (k10 , v), then k1 = k10 . Proof. Let σ2 = σ1 , then |σ1 − σ2 |q = 0 ≤ d. Then, according to the correctness of KC, we have that k1 = k2 = Rec(σ2 , v) = Rec(σ1 , v). However, as Rec is a deterministic algorithm, k2 is fixed w.r.t. (σ1 , v). As a consequence, k1 is also fixed w.r.t. (σ1 , v), no matter what randomness is used by Con. Proposition 3.2. Given params = (q, m, g, d, aux) for a KC scheme, for any v ∈ Zg , let Sv be the set containing all σ1 such that Con(σ1 , params) outputs v with positive probability. Specifically,    Sv = σ1 ∈ Zq | Pr (k1 , v 0 ) ← Con(σ1 , params) : v 0 = v > 0 . Then, there exists v0 ∈ Zg such that |Sv0 | ≥ q/g. Proof. For each σ1 ∈ Zq , we run Con(σ1 , params) and get a pair (k1 , v) ∈ Zm × Zg satisfying σ1 ∈ Sv . Then, the proposition is clear by the pigeonhole principle. Proof of Theorem 3.1. From Proposition 3.2, there exists a v0 ∈ Zg such that |Sv0 | ≥ q/g. Note that, for any σ1 ∈ Sv0 , Con(σ1 , params) outputs v0 with positive probability. For each i ∈ Zm , let Ki denote the set containing all σ1 such that Con(σ1 , params) outputs (k1 = i, v = v0 ) with positive probability. From Proposition 3.1, Ki ’s form a disjoint partition of Sv0 . From the independence between k1 and v, and the uniform distribution of k1 , (as we assume the underlying KC is secure), we know Pr[k1 = i | v = v0 ] = Pr[k1 = i] > 0, and so Ki is non-empty for each i ∈ Zm . Now, for each i ∈ Zm , denote by Ki0 the set containing all σ2 ∈ Zq such that Rec(σ2 , v0 , params) = i. As Rec is deterministic, Ki0 ’s are well-defined and are disjoint. From the correctness of KC, for every σ1 ∈ Ki , |σ2 − σ1 |q ≤ d, we have σ2 ∈ Ki0 . That is, Ki + [−d, d] ⊆ Ki0 . We shall prove that Ki + [−d, d] contains at least |Ki | + 2d elements. If Ki + [−d, d] = Zm , then m = 1, which is a contradiction (we exclude the case of m = 1 in the definition of KC as it is a trivial case). If there exists an x ∈ Zm such that x ∈ / Ki + [−d, d], we can see Zm as a segment starting from the point x by arranging its elements as x, (x + 1) mod m, (x + 2) mod m, . . . , (x + m − 1) mod m. Let l be the left most element in Ki + [−d, d] on the segment, and r be the right most such element. Then Ki + [−d, d] contains at least |Ki | elements between l and r inclusively on the segment. Since l + [−d, 0] and r + [0, d] are subset of Ki + [−d, d], and are not overlap (because x ∈ / Ki + [−d, d]), the set Ki + [−d, d] contains at least |Ki | + 2d elements. Now we have |Ki | + 2d ≤ |Ki0 |. When we add up on both sides for all i ∈ Zm , then we derive |Sv0 | + 2md ≤ q. By noticing that |Sv0 | ≥ q/g, the theorem is established. 10 3.2 Construction and Analysis of OKCN The key consensus scheme, named “optimally-balanced key consensus with noise (OKCN)”, is presented in Algorithm 1, followed with some explanations for implementation details. 0 = ασ +e. Note that it always holds σ 0 < q 0 . However, in some rare cases, σ 0 could Define σA 1 A A be a negative value; for example, for the case that σ1 = 0 and e ∈ [−b(α − 1)/2c, −1]. Setting 0 mod q 0 , in line 4, is to ensure that σ is always a non-negative value in Z 0 , which σA = σA A q 0 < 0 then set σ = σ 0 + q 0 , otherwise set σ = σ 0 . can be simply implemented as follows: if σA A A A A 0 is negative or Considering potential timing attacks, conditional statement judging whether σA 0 . In specific, suppose σ 0 not can be avoided by a bitwise operation extracting the sign bit of σA A 0 + ((σ 0 >> 15)&1) ∗ q 0 in C is a 16-bit signed or unsigned integer, then one can code σA = σA A language. The same techniques can also be applied to the calculation in line 11. In lines 5 and 6, (k1 , v 0 ) can actually be calculated simultaneously by a single command div in assembly language. In line 11, the floating point arithmetic can be replaced by integer arithmetic. If m is small enough, such as 2 or 3, the slow complex integer division operation can be replaced by relative faster conditional statements. Algorithm 1 OKCN: Optimally-balanced KC with Noise 1: params = (q, m, g, d, aux), aux = {q 0 = lcm(q, m), α = q 0 /q, β = q 0 /m} 2: procedure Con((σ1 , params)) 3: e ← [−b(α − 1)/2c, bα/2c] 4: σA = (ασ1 + e) mod q 0 5: k1 = bσA /βc ∈ Zm 6: v 0 = σA mod β 7: v = bv 0 g/βc 8: return (k1 , v) 9: end procedure 10: procedure Rec(σ2 , v, params) 11: k2 = bασ2 /β − (v + 1/2)/ge mod m 12: return k2 13: end procedure . σ1 ∈ [0, q − 1] . v ∈ Zg . σ2 ∈ [0, q − 1] The value v + 1/2, in line 11, estimates the exact value of v 0 g/β. Such an estimation can be more accurate, if one chooses to use the average value of all v 0 g/β’s such that bv 0 g/βc = v. Though such accuracy can improve the bound on correctness slightly, the formula calculating k2 becomes more complicated. 3.2.1 Correctness and Security of OKCN Recall that, for arbitrary positive integer t ≥ 1 and any x ∈ Z, |x|t = min{x mod t, t − x mod t}. Then, the following fact is direct from the definition of | · |t . Fact 3.1. For any x, y, t, l ∈ Z where t ≥ 1 and l ≥ 0, if |x − y|q ≤ l, then there exists θ ∈ Z and δ ∈ [−l, l] such that x = y + θt + δ.   Theorem 3.2. Suppose that the system parameters satisfy (2d + 1)m < q 1 − g1 where m ≥ 2 and g ≥ 2. Then, the OKCN scheme is correct. 11 Proof. Suppose |σ1 − σ2 |q ≤ d. By Fact 3.1, there exist θ ∈ Z and δ ∈ [−d, d] such that σ2 = σ1 + θq + δ. From line 4 and 6 in Algorithm 1, we know that there is a θ0 ∈ Z, such that ασ1 + e + θ0 q 0 = σA = k1 β + v 0 . And from the definition of α, β, we have α/β = m/q. Taking these into the formula of k2 in Rec (line 11 in Algorithm 1), we have k2 = bασ2 /β − (v + 1/2)/ge mod m = bα(θq + σ1 + δ)/β − (v + 1/2)/ge mod m   1 αδ 1 0 0 = m(θ − θ ) + (k1 β + v − e) + − (v + 1/2) mod m β β g     0 e v + 1/2 αδ v − + mod m − = k1 + β g β β (1) (2) (3) (4) Notice that |v 0 /β − (v + 1/2)/g| = |v 0 g − β(v + 1/2)|/βg ≤ 1/2g. So  0  v v + 1/2 e αδ α 1 − − + + (d + 1/2). ≤ β g β β 2g β From the assumed condition (2d + 1)m < q(1 − g1 ), we get that the right-hand side is strictly smaller than 1/2; Consequently, after the rounding, k2 = k1 . Theorem 3.3. OKCN is secure. Specifically, when σ1 ← Zq , k1 and v are independent, and k1 is uniform over Zm , where the probability is taken over the sampling of σ1 and the random coins used by Con. Proof. Recall that q 0 = lcm(q, m), α = q 0 /q, β = q 0 /m. We first demonstrate that σA is subject to uniform distribution over Zq0 . Consider the map f : Zq × Zα → Zq0 ; f (σ, e) = (ασ + e) mod q 0 , where the elements in Zq and Zα are represented in the same way as specified in Algorithm 1. It is easy to check that f is an one-to-one map. Since σ1 ← Zq and e ← Zα are subject to uniform distributions, and they are independent, σA = (ασ1 + e) mod q 0 = f (σ1 , e) is also subject to uniform distribution over Zq0 . In the similar way, defining f 0 : Zm × Zβ → Zq0 such that f 0 (k1 , v 0 ) = βk1 + v 0 , then f 0 is obviously a one-to-one map. From line 6 of Algorithm 1, f 0 (k1 , v 0 ) = σA . As σA is distributed uniformly over Zq0 , (k1 , v 0 ) is uniformly distributed over Zm ×Zβ , and so k1 and v 0 are independent. As v only depends on v 0 , k1 and v are independent. 3.2.2 Special Parameters, and Performance Speeding-Up The first and the second line of Con (line 3 and 4 in Algorithm 1) play the role in transforming a uniform distribution over Zq to a uniform distribution over Zq0 . If one chooses q, g, m to be power of 2, i.e., q = 2q̄ , g = 2ḡ , m = 2m̄ where q̄, ḡ, m̄ ∈ Z, then such transformation is not necessary. In this case Con and Rec can be simplified as follows: 12 Algorithm 2 OKCN power 2 1: params : q = 2q̄ , g = 2ḡ , m = 2m̄ , d, aux = {(β = q/m = 2q̄−m̄ , γ = β/g = 2q̄−m̄−ḡ )} 2: procedure Con(σ1 , params) 3: k1 = bσ1 /βc 4: v = b(σ1 mod β)/γc 5: return (k1 , v) 6: end procedure 7: procedure Rec(σ2 , v, params) 8: k2 = bσ2 /β − (v + 1/2)/ge mod m 9: return k2 10: end procedure Since the random noise e used in calculating σA in Algorithm 1 is avoided, the correctness constraint on parameters can be relaxed, and we have the following corollary.   Corollary 3.1. If q and m are power of 2, and d, g, m satisfy 2md < q 1 − g1 , then the KC scheme described in Algorithm 2 is both correct and secure. Proof. For correctness, as no additional noise e is added, one can take e = 0 into Formula 4, and then the correctness of Algorithm 2 directly follows from the proof of Theorem 3.2. For security, as a variation of the generic structure of Algorithm 1, the security of Algorithm 2 inherits from that of Algorithm 1. If we take ḡ + m̄ = q̄, Algorithm 2 can be further simplified into the variant depicted in Algorithm 3, with the constraint on parameters is further relaxed. Corollary 3.2. If m, g are power of 2, q = m · g, and 2md < q, then the KC scheme described in Algorithm 3 is correct and secure. Notice that the constraint on parameters is further simplified to 2md < q in this case. Proof. For correctness, supposing |σ1 − σ2 |q ≤ d, by Fact 3.1, there exist θ ∈ Z and δ ∈ [−d, d] such that σ2 = σ1 + θq + δ. Taking this into line 8 of Algorithm 3, i.e., the formula computing k2 , we have k2 = b(σ1 − v + θq + δ)/ge mod m = (k1 + θm + bδ/ge) mod m. If 2md < q, then |δ/g| ≤ d/g < 1/2, so that k2 = k1 mod m = k1 . For security, as a special case of generic scheme described in Algorithm 1, the security of Algorithm 3 follows directly from that of Algorithm 1. 13 Algorithm 3 OKCN simple 1: params : q = 2q̄ , g = 2ḡ , m = 2m̄ , d, where ḡ + m̄ = q̄ 2: procedure Con(σ1 , params) j k σ1 3: k1 = g 4: v = σ1 mod g 5: return (k1 , v) 6: end procedure 7: procedure j Rec(σ m 2 , v, params) σ2 −v 8: k2 = mod m g 9: return k2 10: end procedure 4 Asymmetric Key Consensus with Noise Alice σ1 k1 ∈ Zm v ← Con(σ1 , k1 , params) ≈ Bob σ2 v k2 ← Rec(σ2 , v, params) Figure 2: Brief depiction of AKC When OKCN is used as the building tool in constructing key exchange (KE) protocols, the party who sends the hint signal v actually plays the role of the responder. When cast into secure transport protocols in the client/server setting, e.g., the next generation of TLS 1.3 [Res], the client (corresponding to Bob) plays the role of the initiator, and the server (corresponding to Alice) plays the role of the responder. For OKCN-based key exchange, both the initiator and the responder play a symmetric role in outputting the shared-key, in the sense that no one can predetermine the session-key before the KE protocol run. Specifically, the responder can calculate the session-key only after receiving the ephemeral message from the initiator (unless the message from the initiator is public or static). However, in some application scenarios particularly in the client/server setting like those based upon TLS1.3, it is desirable to render the server asymmetric power in predetermining session-keys before the protocol run, e.g., in order to balance workloads and security or to resist the more and more vicious DDoS attacks. For example, this can much reduce the online burden faced by the server, by offline or parallel computing the following ciphertexts or MACs with the pre-determined session-keys. Another motivation is that OKCN-based key exchange, with negligible failure probability, cannot be directly transformed into a CPA-secure public-key encryption (PKE) scheme without additionally employing a CPA-secure symmetric-key encryption (SKE) scheme. These motivate us to introduce asymmetric key consensus with noise (AKCN), as depicted in Figure 2 and specified below. Definition 4.1. An asymmetric key consensus scheme AKC = (params, Con, Rec) is specified as follows: 14 • params = (q, m, g, d, aux) denotes the system parameters, where q, 2 ≤ m, g ≤ q, 1 ≤ d ≤ b 2q c are positive integers, and aux denotes some auxiliary values that are usually determined by (q, m, g, d) and could be set to be empty. • v ← Con(σ1 , k1 , params): On input of (σ1 ∈ Zq , k1 ∈ Zm , params), the probabilistic polynomialtime conciliation algorithm Con outputs the public hint signal v ∈ Zg . • k2 ← Rec(σ2 , v, params): On input of (σ2 , v, params), the deterministic polynomial-time algorithm Rec outputs k2 ∈ Zm . Correctness: An AKC scheme is correct, if it holds k1 = k2 for any σ1 , σ2 ∈ Zq such that |σ1 − σ2 |q ≤ d. Security: An AKC scheme is secure, if v is independent of k1 whenever σ1 is uniformly distributed over Zq . Specifically, for arbitrary ṽ ∈ Zg and arbitrary k̃1 , k̃10 ∈ Zm , it holds that Pr[v = ṽ|k1 = k̃1 ] = Pr[v = ṽ|k1 = k̃10 ], where the probability is taken over σ1 ← Zq and the random coins used by Con. When AKC is used as a building tool for key exchange, k1 is taken uniformly at random from Zq . However, when AKC is used for public-key encryption, k1 can be arbitrary value from the space of plaintext messages. For the efficiency upper bound of AKC, the following theorem divulges bounds on bandwidth (parameterized by g), consensus range (parameterized by m), and correctness (parameterized by d) for any AKC scheme. Theorem 4.1. Let AKC = (params, Con, Rec) be an asymmetric key consensus scheme with params = (q, m, d, g, aux). If AKC is correct and secure, then   m 2md ≤ q 1 − . g Comparing the formula 2md ≤ q(1 − m/g) in Theorem 4.1 with the formula 2md ≤ q(1 − 1/g) in Theorem 3.1, we see that the only difference is a factor m in g. This indicates that, on the same values of (q, m, d), an AKC scheme has to use a bigger bandwidth parameter g compared to KC. Before proving Theorem 4.1, we first adjust Proposition 3.2 to the AKC setting, as following. Proposition 4.1. Given params = (q, m, g, d, aux) for an correct and secure AKC scheme, then there exists v0 ∈ Zg such that |Sv0 | ≥ mq/g. Proof. If k1 is taken uniformly at random from Zm , AKC can be considered as a special KC scheme by treating k1 ← Zm ; v ← Con(σ1 , k1 , params) as (k1 , v) ← Con(σ1 , params). Consequently, Propo4 sition 3.1 holds for this case. Denote Sv0 = {(σ1 , k1 ) ∈ Zq × Zm | Pr [v 0 ← Con(σ1 , k1 , params) : v 0 = v] > 0}. Then, Sv defined in Proposition 3.2 equals to the set containing all the values of σ1 appeared in (σ1 , ·) ∈ Sv0 . We run Con(σ1 , k1 , params) for each pair of (σ1 , k1 ) ∈ Zq × Zm . By the pigeonhole principle, there must exist a v0 ∈ Zg such that |Sv0 0 | ≥ qm/g. For any two pairs (σ1 , k1 ) and (σ10 , k10 ) in Sv0 0 , if σ1 = σ10 , from Proposition 3.1 we derive that k1 = k10 , and then (σ1 , k1 ) = (σ10 , k10 ). Hence, if (σ1 , k1 ) and (σ10 , k10 ) are different, then σ1 6= σ10 , and so |Sv0 | = |Sv0 0 | ≥ mq/g. Proof of Theorem 4.1. By viewing AKC, with k1 ← Zq , as a special KC scheme, all the reasoning in the proof of Theorem 3.1 holds true now. At the end of the proof of Theorem 3.1, we derive |Sv0 | + 2md ≤ q. By taking |Sv0 | ≥ mq/g according to Proposition 4.1, the proof is finished. 15 4.1 Construction and Analysis of AKCN Algorithm 4 AKCN: Asymmetric KC with Noise 1: params = (q, m, g, d, aux), where aux = ∅. 2: procedure Con(σ1 , k1 , params) 3: v = bg (σ1 + bk1 q/me) /qe mod g 4: return v 5: end procedure 6: procedure Rec(σ2 , v, params) 7: k2 = bm(v/g − σ2 /q)e mod m 8: return k2 9: end procedure . σ1 ∈ [0, q − 1] . σ2 ∈ [0, q − 1] The AKC scheme, referred to as asymmetric KC with noise (AKCN), is depicted in Algorithm 4. We note that, in some sense, AKCN could be viewed as the generalization and optimization of the consensus mechanism proposed in [LPR13a] for CPA-secure public-key encryption. For AKCN, we can offline compute and store k1 and gbk1 q/me in order to accelerate online performance. 4.1.1 Correctness and Security of AKCN  Theorem 4.2. Suppose the parameters of AKCN satisfy (2d + 1)m < q 1 − AKCN scheme described in Algorithm 4 is correct. m g  . Then, the Proof. From the formula generating v, we know that there exist 1 , 2 ∈ R and θ ∈ Z, where |1 | ≤ 1/2 and |2 | ≤ 1/2, such that    k1 q g σ1 + + 1 + 2 + θg v= q m Taking this into the formula computing k2 in Rec, we have k2 = bm(v/g − σ2 /q)e mod m    1 2 σ2 = m (σ1 + k1 q/m + 1 ) + +θ− mod m q g q   m m m = k1 + (σ1 − σ2 ) + 1 + 2 mod m q q g By Fact 3.1 (page 11), there exist θ0 ∈ Z and δ ∈ [−d, d] such that σ1 = σ2 + θ0 q + δ. Hence,   m m m k2 = k1 + δ + 1 + 2 mod m q q g Since |mδ/q + m1 /q + m2 /g| ≤ md/q + m/2q + m/2g < 1/2, k1 = k2 . Theorem 4.3. The AKCN scheme is secure. Specifically, v is independent of k1 when σ1 ← Zq . Proof. For arbitrary ṽ ∈ Zg and arbitrary k̃1 , k̃10 ∈ Zm , we prove that Pr[v = ṽ|k1 = k̃1 ] = Pr[v = ṽ|k1 = k̃10 ] when σ1 ← Zq . 16 For any (k̃, ṽ) in Zm × Zg , the event (v = ṽ | k1 = k̃) is equivalent to the event that there exists σ1 ∈ Zq such that ṽ = bg(σ1 + bk̃q/me)/qe mod g. Note that σ1 ∈ Zq satisfies ṽ = bg(σ1 + bk̃q/me)/qe mod g, if and only if there exist  ∈ (−1/2, 1/2] and θ ∈ Z such that ṽ = g(σ1 +bk̃q/me)/q+−θg. That is, σ1 = (q(ṽ−)/g−bk̃q/me) mod q, for some  ∈ (−1/2, 1/2]. Let Σ(ṽ, k̃) = {σ1 ∈ Zq | ∃ ∈ (−1/2, 1/2] s.t.  σ1 = (q(ṽ − )/g  − bk̃q/me) mod q}. Defining the map φ : Σ(ṽ, 0) → Σ(ṽ, k̃), by setting φ(x) = x − bk̃q/me mod q. Then φ is obviously a oneto-one map. Hence, the cardinality of Σ(ṽ, k̃) is irrelevant to k̃. Specifically, for arbitrary ṽ ∈ Zg and arbitrary k̃1 , k̃10 ∈ Zm , it holds that Σ(ṽ, k̃1 ) = Σ(ṽ, k̃10 ) = |Σ(ṽ, 0)| Now,h for arbitrary ṽ ∈ Zg iand arbitrary k̃ ∈ Zm , when σ1 ← Zq we have that Pr[v = ṽ | k1 = k̃] = Pr σ1 ∈ Σ(ṽ, k̃) | k1 = k̃ = |Σ(ṽ, k̃)|/q = |Σ(ṽ, 0)|/q. The right-hand side only depends on ṽ, and so v is independent of k1 . 4.1.2 A Simplified Variant of AKCN for Special Parameters We consider the parameters q = g = 2q̄ , m = 2m̄ for positive integers q̄, m̄. Then the two rounding operations in line 3 of Con (in Algorithm 4) can be directly eliminated, since only integers are involved in the computation. We have the following variant described in Algorithm 5. Note that, in Algorithm 5, the modular and multiplication/division operations can be implemented by simple bitwise operations. Algorithm 5 AKCN power 2 1: params : q = g = 2q̄ , m = 2m̄ , aux = {G = q/m} 2: procedure Con(σ1 , k1 , params) 3: v = (σ1 + k1 · G) mod q, where k1 · G can be offline computed 4: return v 5: end procedure 6: procedure Rec(σ2 , v, params) 7: k2 = b(v − σ2 )/Ge mod m 8: return k2 9: end procedure For the protocol variant presented in Algorithm 5, its correctness and security can be proved with a relaxed constraint on the parameters of (q, d, m), as shown in the following corollary. Corollary 4.1. If q and m are power of 2, and d, m and q satisfy 2md < q, then the AKCN scheme described in Algorithm 5 is correct and secure. Proof. For correctness, suppose |σ1 − σ2 |q ≤ d, then there exit δ ∈ [−d, d] and θ ∈ Z such that σ2 = σ1 +θq+δ. From the formula calculating v, there exists θ0 ∈ Z such that v = σ1 +k1 2q̄−m̄ +θ0 q. Taking these into the formula computing k2 , line 7 of Rec in Algorithm 5, we have k2 = b(v − σ1 − δ − θq) /2q̄−m̄ e mod m = b(k1 2q̄−m̄ − δ)/2q̄−m̄ e mod m  = k1 − bδ/2q̄−m̄ e mod m If 2md < q, then |δ/2q̄−m̄ | < 1/2, so that k1 = k2 . For security, as a special case of the generic AKCN scheme in Algorithm 4, the security of the AKCN scheme in Algorithm 5 directly follows from that of Algorithm 4. 17 4.2 On KC/AKC vs. Fuzzy Extractor Our formulations of KC and AKC are abstractions of the core ingredients of previous constructions of KE and PKE from LWE/RLWE. As we shall see in the subsequent sections, the design and analysis of KE and PKE from LWE, LWR and RLWE can be reduced to KC and AKC. We also note that KC and AKC are similar to fuzzy extractor proposed in [DORS08], which extracts shared-keys from biometrics and noisy data. In this section, we make some discussions on the relationship between KC/AKC and fuzzy extractor. The differences between the definitions of KC/AKC and that of fuzzy extractor lie mainly in the following ways. Firstly, AKC was not considered within the definitional framework of fuzzy extractor. Secondly, the metric | · |q we use in defining KC and AKC was not considered for fuzzy extractor. Thirdly, in the definitions of KC and AKC, the algorithm Rec (corresponding Rep for fuzzy extractor) is mandated to be deterministic, while in the formulation of fuzzy extractor it is probabilistic. Fourthly, in the formulation of fuzzy extractor [DORS08], w, R and P (corresponding σ1 , k and v in KC/AKC) are binary strings; while in the definitions of KC/AKC, the corresponding values σ1 ∈ Zq , k ∈ Zm and v ∈ Zg have more structured ranges, which are helpful in deriving the exact upper bound. Finally, for the security of KC and AKC, we require that the signal value v be independent of the shared-key k1 (that can be subject to arbitrary distribution for AKC); roughly speaking, in the definition of fuzzy extractor [DORS08], it is required that the joint distribution (R, P ) be statistically close to (Ul , P ) where R ∈ {0, 1}l and Ul is the uniform distribution over {0, 1}l . A generic upper bound on the length of key extracted by fuzzy extractor is proposed in [DORS08, Appendix C]. In comparison, the upper bounds for KC and AKC proved in this work are more versatile and precise w.r.t. the metric | · |q . For example, the effect of the length of the signal v, i.e., the bandwidth parameter g, is not considered in the upper bound for fuzzy extractor, but is taken into account in the upper bounds for KC and AKC. A generic construction of fuzzy extractor from secure sketch, together with a generic construction of secure sketch for transitive metric spaces, is proposed in [DORS08]. We note that (Zq , | · |q ) can be naturally seen as a transitive matric space. Compared to the secure sketch based generic constructions of fuzzy extractor, our constructions of KC and AKC are direct and more efficient. In spite of some similarities between KC/AKC and fuzzy extractors, we remark that before our this work the relation between fuzzy extractor and KE from LWR and its variants is actually opaque. Explicitly identifying and formalizing KC/AKC and reducing lattice-based KE to KC/AKC in a black-box modular way, with inherent bounds on what could or couldn’t be done, cut the complexity of future design and analysis of these cryptosystems. 5 LWR-Based Key Exchange from KC and AKC In this section, we present the applications of OKCN and AKCN to key exchange protocols based on LWR. The LWR-based key exchange (KE) is depicted in Figure 3. Denote by (n, lA , lB , q, p, KC, χ) the system parameters, where p|q, and p and q are chosen to be power of 2. Let KC = (params = (p, m, g, d, aux), Con, Rec) be a correct and secure key consensus scheme, χ be a small noise distribution over Zq , and Gen be a pseudo-random generator (PRG) generating the matrix A from a small seed. For presentation simplicity, we assume A ∈ Zn×n to be square matrix. The length q of the random seed, i.e., κ, is typically set to be 256. 18 Initiator seed ← {0, 1}κ A = Gen(seed) ∈ Zn×n q X1 ← χn×lA Y1 = ⌊AX1 ⌉p Responder A seed, Y1 ∈ Zn×l p A = Gen(seed) X2 ← χn×lB Y2 = ⌊AT X2 ⌉p ϵ ← [−q/2p, q/2p − 1]n×lA Σ2 = Y1T X2 + ⌊ϵT X2 ⌉p (K2 , V) ← Con(Σ2 , params) B Y2 ∈ Zn×l , V ∈ ZlgA ×lB p Σ1 = XT1 Y2 K1 ← Rec(Σ1 , V, params) lA ×lB and |K | = Figure 3: LWR-based key exchange from KC and AKC, where K1 , K2 ∈ Zm 1 |K2 | = lA lB |m|. The actual session-key is derived from K1 and K2 via some key derivation function KDF . For presentation simplicity, the functions Con and Rec are applied to matrices, meaning that they are applied to each of the coordinates respectively. We shall see that the corresponding elements of Σ1 and Σ2 are close to each other. Then Con and Rec are applied to them to reach consensus bits K1 and K2 . For presentation simplicity, we describe the LWR-based key exchange protocol from a KC scheme. But it can be trivially adapted to work on any correct and secure AKC scheme. In this case, the responder user Bob simply chooses K2 ← ZlmA ×lB , and the output of Con(Σ2 , K2 , params) is simply defined to be V. For presentation simplicity, in the following security definition and analysis we also simply assume that the output of the PRG Gen is truly random (which is simply assumed to be a random oracle in [ADPS16]). 5.1 Correctness Analysis In this subsection, we analyze the correctness (specifically, the error probability) of the LWRbased KE protocol. For any integer x, let {x}p denote x − pq bxep , where bxep = b pq xe. Then, for any integer x, {x}p ∈ [−q/2p, q/2p − 1], hence {x}p can be naturally regarded as an element in Zq/p . In fact, {x}p is equal to x mod q/p, where the result is represented in [−q/2p, q/2p − 1]. When the notation {·}p is applied to a matrix, it means {·}p applies to every element of the matrix respectively. We have Σ2 = Y1T X2 +bT X2 ep = bAX1 eTp X2 +bT X2 ep = pq (AX1 −{AX1 }p )T X2 +bT X2 ep . And Σ1 = XT1 Y2 = XT1 bAT X2 ep = pq (XT1 AT X2 − XT1 {AT X2 }p ). Hence, Σ2 − Σ1 = p T (X {AT X2 }p − {AX1 }Tp X2 ) + bT X2 ep q 1 19 mod p   p T T T T = (X {A X2 }p − {AX1 }p X2 +  X2 ) q 1 mod p The general idea is that X1 , X2 , , {AT X2 }p and {AX1 }p are small enough, so that Σ1 and Σ2 are close. If |Σ1 − Σ2 |p ≤ d, the correctness of the underlying KC guarantees K1 = K2 . For given concrete parameters, we numerically derive the probability of |Σ2 −Σ1 |p > d by numerically calculating the distribution of XT1 {AT X2 }p − ({AX1 }Tp X2 − T X2 ) for the case of lA = lB = 1, then applying the union bound. The independency between variables indicated by the following Theorem 5.1 can greatly simplify the calculation. Let Inv(X1 , X2 ) denote the event that there exist invertible elements of ring Zq/p in both vectors X1 and X2 . Inv(X1 , X2 ) happens with overwhelming probability in our application. Lemma 5.1. Consider the case of lA = lB = 1. For any a ∈ Zq/p , x ∈ Znq/p , denote Sx,a = {y ∈ Znq/p | xT y mod (q/p) = a}. For any fixed a ∈ Zq/p , conditioned on Inv(X1 , X2 ) and XT1 AT X2 mod (q/p) = a, the random vectors {AT X2 }p and {AX1 }p are independent, and are subjected to uniform distribution over SX1 ,a , SX2 ,a respectively. Proof. Under the condition of Inv(X1 , X2 ), for any fixed X1 and X2 , define the map φX1 ,X2 : Zn×n → Znq/p × Znq/p , such that A 7→ ({AX1 }p , {AT X2 }p ). q We shall prove that the image of φX1 ,X2 is S = {(y1 , y2 ) ∈ Znq/p × Znq/p | XT2 y1 = XT1 y2 T and y = (y , y0T )T . Without loss of generality, we mod (q/p)}. Denote X1 = (x1 , X0T 2 2 1 ) 2 assume x1 is invertible in the ring Zq/p . For any (y1 , y2 ) ∈ S, we need to find an A such that φX1 ,X2 (A) = (y1 , y2 ). From the condition Inv(X1 , X2 ), we know that there exists an A0 ∈ Z(n−1)×n such that 0T 0 0T 0 {A X2 }p = y20 . Then, we let a1 = x−1 1 (y1 − A X1 ) mod (q/p), and A = (a1 , A ). Now we check that φX1 ,X2 (A) = (y1 , y2 ).     x1 0T = {x1 a1 + A0T X01 }p = y1 {AX1 }p = a1 A x01 p   −1 T  T    T  a1 a1 X2 A)X2 x1 (y1 − X0T T 1 = {A X2 }p = X2 = A0 X2 A0 A0 X2 p p p     −1 T 0T 0 y2 x1 (X1 y2 − X1 y2 ) = = y2 = 0 y y20 2 p p Hence, if we treat Zn×n and S as Z-modules, then φX1 ,X2 : Zqn×n → S is a surjective homoq morphism. Then, for any fixed (X1 , X2 ), ({AX1 }p , {AT X2 }p ) is uniformly distributed over S. This completes the proof. Theorem 5.1. Under the condition Inv(X1 , X2 ), the following two distributions are identical: • (a, X1 , X2 , {AX1 }p , {AT X2 }p ), where A ← Zqn×n , X1 ← χn , X2 ← χn , and a = XT1 AT X2 mod (q/p). • (a, X1 , X2 , y1 , y2 ), where a ← Zq/p , X1 ← χn , X2 ← χn , y1 ← SX2 ,a , and y2 ← SX1 ,a . Proof. For any ã ∈ Zq/p , X̃1 , X̃2 ∈ Supp(χn ), ỹ1 , ỹ2 ∈ Znq/p , we have Pr[a = ã, X1 = X̃1 , X2 = X̃2 , {AX1 }p = ỹ1 , {AT X2 }p = ỹ2 | Inv(X1 , X2 )] = Pr[{AX1 }p = ỹ1 , {AT X2 }p = ỹ2 | a = ã, X1 = X̃1 , X2 = X̃2 , Inv(X1 , X2 )] Pr[a = ã, X1 = X̃1 , X2 = X̃2 | Inv(X1 , X2 )] 20 From Lemma 5.1, the first term equals to Pr[y1 ← SX̃2 ,ã ; y2 ← SX̃1 ,ã : y1 = ỹ1 , y2 = ỹ2 | a = ã, X1 = X̃1 , X2 = X̃2 , Inv(X1 , X2 )]. For the second term, we shall prove that a is independent of (X1 , X2 ), and is uniformly distributed over Zq/p . Under the condition of Inv(X1 , X2 ), the map Zn×n → Zq/p , such that q T T A 7→ X1 A X2 mod (q/p), is a surjective homomorphism between the two Z-modules. Then, Pr[a = ã | X1 = X̃1 , X2 = X̃2 , Inv(X1 , X2 )] = p/q. Hence, under the condition of Inv(X1 , X2 ), a is independent of (X1 , X2 ), and is distributed uniformly at random. So the two ways of sampling result in the same distribution. We design and implement the following algorithm to numerically calculate the distribution of Σ2 − Σ1 efficiently. For any c1 , c2 ∈ Zq , a ∈ Zq/p , we numerically calculate Pr[XT1 {AT X2 }p = c1 ] and Pr[{AX1 }Tp X2 − T X2 = c2 , XT1 AT X2 mod (q/p) = a], then derive the distribution of Σ2 − Σ1 . As Inv(X1 , X2 ) occurs with overwhelming probability, for any event E, we have | Pr[E] − Pr[E|Inv(X1 , X2 )]| < negl. For simplicity, we ignore the effect of Inv(X1 , X2 ) in the following calculations. By Theorem 5.1, Pr[XT1 {AT X2 }p = c1 ] = Pr[X1 ← χn , y2 ← Znq/p ; XT1 y2 = c1 ]. This probability can be numerically calculated by computer programs. The probability Pr[{AX1 }Tp X2 − T X2 = c2 , XT1 AT X2 mod (q/p) = a] can also be calculated by the similar way. Then, for arbitrary c ∈ Zq , = Pr[Σ1 − Σ2 = c] = Pr[XT1 {AT X2 }p − {AX1 }Tp X2 + T X2 = c] X Pr[XT {AT X2 }p =c1 ,{AX1 }T X2 −T X2 =c2 |XT AT X2 mod (q/p)=a]· p 1 c1 −c2 =c a∈Zq/p X = c1 −c2 =c a∈Zq/p X = T T T Pr[XT 1 {A X2 }p =c1 |X1 A X2 mod (q/p)=a]· T T T T T Pr[{AX1 }p X2 − X2 =c2 |X1 A X2 mod (q/p)=a] Pr[XT 1 A X2 mod (q/p)=a] Pr[XT1 {AT X2 }p = c1 , c1 mod (q/p) = a] Pr[{AX1 }Tp X2 − T X2 = c2 , XT1 AT X2 mod (q/p) = a] Pr[XT1 AT X2 mod (q/p) = a] a∈Zq/p c1 −c2 =c X = 1 T Pr[XT 1 A X2 mod (q/p)=a] Pr[XT1 {AT X2 }p = c1 ] Pr[{AX1 }Tp X2 − T X2 = c2 , XT1 AT X2 mod (q/p) = a] a∈Zq/p c1 −c2 =c c1 mod (q/p)=a Pr[XT1 AT X2 mod (q/p) = a] By Theorem 5.1, conditioned on Inv(X1 , X2 ) and XT1 AT X2 mod (q/p) = a, XT1 {AT X2 }p is independent of {AX1 }Tp X2 − T X2 , which implies the second equality. Our code and scripts are available from Github http://github.com/OKCN. 5.2 Security Proof Definition 5.1. A KC or AKC based key exchange protocol from LWR is secure, if for any sufficiently large security parameter λ and any PPT adversary A, Pr[b0 = b] − 21 is negligible, as defined w.r.t. game G0 specified in Algorithm 22.4 For presentation simplicity, we simply assume K02 ← ZlmA ×lB when the key exchange protocol is implemented with AKC. However, when the AKC-based protocol is interpreted as a public-key encryption scheme, K02 and K12 correspond to the plaintexts, which are taken independently at random from the same (arbitrary) distribution over ZlmA ×lB . 4 21 Algorithm 6 Game G0 1: A ← Zn×n q 2: X1 ← χn×lA 3: Y1 = bAX1 ep 4: X2 ← χn×lB 5:  ← {−q/2p . . . q/2p − 1}n×lA 6: Y2 = bAT X2 ep q 7: Σ2 = b( p Y1 + )T X2 ep  8: K02 , V ← Con(Σ2 , params) lA ×lB 9: K12 ← Zm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , Y2 , Kb2 , V) . Σ2 = Y1T X2 + bT X2 ep = b( pq Y1 + )T X2 ep Before starting to prove the security, we first recall some basic properties of the LWR assumption. The following lemma is derived by a hybrid argument, similar to that of LWE [PVW08, BCD+ 16]. Lemma 5.2 (LWR problem in the matrix form). For positive integer parameters (λ, n, q ≥ 2, l, t), where n, q, l, t all are polynomial in λ satisfying p|q, and a distribution χ over Zq , denote by (l,t) n×l and outputting Lχ the distribution over Zt×n × Zt×l generated by taking A ← Zt×n q p q ,S ← χ (A, bASep ). Then, under the assumption on indistinguishability between Aq,s,χ (with s ← χn ) and U(Znq × Zp ) within t samples, no PPT distinguisher D can distinguish, with non-negligible (l,t) probability, between the distribution Lχ and U(Zt×n × Zt×l q p ) for sufficiently large λ. Theorem 5.2. If (params, Con, Rec) is a correct and secure KC or AKC scheme, the key exchange protocol described in Figure 3 is secure under the (matrix form of ) LWR assumption. Proof. The proof is analogous to that in [Pei14, BCD+ 16]. The general idea is that we construct a sequence of games: G0 , G1 and G2 , where G0 is the original game for defining security. In every move from game Gi to Gi+1 , 0 ≤ i ≤ 1, we change a little. All games Gi ’s share the same PPT adversary A, whose goal is to distinguish between the matrices chosen uniformly at random and the matrices generated in the actual key exchange protocol. Denote by Ti , 0 ≤ i ≤ 2, the event that b = b0 in Game Gi . Our goal is to prove that Pr[T0 ] < 1/2 + negl, where negl is a negligible function in λ. For ease of readability, we re-produce game G0 below. For presentation simplicity, in the subsequent analysis, we always assume the underlying KC or AKC is correct. The proof can be trivially extended to the case that correctness holds with overwhelming probability (i.e., failure occurs with negligible probability). 22 Algorithm 8 Game G1 1: A ← Zqn×n 2: X1 ← χn×lA A 3: Y1 ← Zn×l p n×l B 4: X2 ← χ 5:  ← {−q/2p . . . q/2p − 1}n×lA 6: Y2 = bAT X2 ep q 7: Σ2 = b( p Y1 + )T X2 ep  8: K02 , V ← Con(Σ2 , params) lA ×lB 9: K12 ← Zm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , Y2 , Kb2 , V) Algorithm 7 Game G0 1: A ← Zn×n q 2: X1 ← χn×lA 3: Y1 = bAX1 ep 4: X2 ← χn×lB 5:  ← {−q/2p . . . q/2p − 1}n×lA 6: Y2 = bAT X2 ep q 7: Σ2 = b( p Y1 + )T X2 ep  8: K02 , V ← Con(Σ2 , params) lA ×lB 9: K12 ← Zm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , Y2 , Kb2 , V) (l ,n) and U(Zqn×n × (l ,n) from U(Zn×n × q Lemma 5.3. | Pr[T0 ]−Pr[T1 ]| < negl, under the indistinguishability between Lχ A A ). Zn×l p Proof. Construct a distinguisher D, in Algorithm 25, who tries to distinguish Lχ A A ). Zn×l p Algorithm 9 Distinguisher D 1: procedure D(A, B) 2: Y1 = B 3: X2 ← χn×lB 4:  ← {−q/2p . . . q/2p − 1}n×lA 5: Y2 = bAT X2 ep 6: Σ2 = b( pq Y1 + )T X2 ep  7: K02 , V ← Con(Σ2 , params) lA ×lB 8: K12 ← Zm 9: b ← {0, 1} 10: b0 ← A(A, Y1 , Y2 , Kb2 , V) 11: if b0 = b then 12: return 1 13: else 14: return 0 15: end if 16: end procedure (l ,n) If (A, B) is subjected to Lχ A A . A ∈ Zn×n , B ∈ Zn×l p q h   i (l ,n) , then D perfectly simulates G0 . Hence, Pr D Lχ A =1 = Pr[T0 ]. On the other hand, if (A, B) is chosen uniformly at random from Zqn×n × Zpn×lA , which is denoted as (AU , BU ), then D perfectly simulates G1 . So Pr[D(AU , BU ) = 1] = Pr[T1 ]. Hence, (l ,n) |Pr[T0 ] − Pr[T1 ]| = Pr[D(Lχ A ) = 1] − Pr[D(AU , BU ) = 1] < negl. 23 Algorithm 10 Game G1 1: A ← Zn×n q 2: X1 , E1 ← χn×lA A 3: Y1 ← Zn×l q n×l B 4: X2 ← χ 5:  ← {−q/2p . . . q/2p − 1}n×lA 6: Y2 = bAT X2 ep q 7: Σ2 = b( p Y1 + )T X2 ep  8: K02 , V ← Con(Σ2 , params) lA ×lB 9: K12 ← Zm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , Y2 , Kb2 , V) Algorithm 11 Game G2 1: A ← Zqn×n 2: X1 , E1 ← χn×lA A 3: Y1 ← Zn×l q n×l B 4: X2 ← χ 5:  ← {−q/2p . . . q/2p − 1}n×lA B 6: Y2 ← Zn×l p 7: Σ2 ← ZlpA ×lB  8: K02 , V ← Con(Σ2 , params) lA ×lB 9: K12 ← Zm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , Y2 , Kb2 , V) (l ,n+lA ) Lemma 5.4. | Pr[T1 ] − Pr[T2 ]| < negl, under the indistinguishability between Lχ B (n+l )×n (n+l )×l U(Zq A × Zp A B ). and Proof. As Y1 and  are subjected to uniform distribution in G1 , pq Y1 +  is subjected to uniform A . Based on this observation, we construct the following distinguisher D 0 . distribution over Zn×l q A ), where First observe that Y10 = ( pq Y1 + ) ∈ Zqn×lA follows the uniform distribution U(Zn×l q (l ,n+l ) (n+l )×n A A and  ← [−q/2p, q/2p − 1]n×lA . If (A0 , B) is subject to L B Y1 ← Zn×l , A0 ← Zq A χ q corresponds to A ← Zn×n and Y10 = pq Y1 +  in G1 ; And S ← χn×lB in generating (A0 , B) q corresponds to X2 ← χn×lB in G1 . In this case, we re-write  T   A 0 B = bA Sep = X2 Y10T p     bAT X2 ep Y2 = = bY10T X2 ep Σ2  i h  (l ,n+lA ) = 1 = Pr[T1 ]. Hence Pr D0 Lχ B (n+l )×n (n+l )×l On the other hand, if (A0 , B) is subject to uniform distribution U(Zq A × Zp A B ), 0 0 then A, Y1 , Y2 , Σ2 all are also uniformly random; So, the view of D in this case is the same as that in game G2 . Hence, Pr [D0 (A0 , B) = 1] = Pr[T2 ] in this case. Then, | Pr[T1 ] − Pr[T2 ]| = (l ,n+lA ) (n+l )×n (n+l )×l | Pr[D0 (Lχ B ) = 1] − Pr[D0 (U(Zq A × Zp A B )) = 1]| < negl. 24 Algorithm 12 Distinguisher D0 (n+lA )×n 0 procedure D0 (A0 , B) where  A ∈ Zq T A Denote A0 = Y10T   Y2 Denote B = Σ2  K02 , V ← Con(Σ2 , params) lA ×lB K12 ← Zm b ← {0, 1} b0 ← A(A, bY10 ep , Y2 , Kb2 , V) if b0 = b then return 1 else return 0 end if end procedure 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: (n+lA )×lB , B ∈ Zp . A ∈ Zn×n , Y10T = ( pq Y1 + )T ∈ ZlqA ×n q B , Σ ∈ ZlA ×lB . Y2 ∈ Zn×l 2 p p Lemma 5.5. If the underlying KC or AKC is secure, Pr[T 2] = 21 .  Proof. Note that, in Game G2 , for any 1 ≤ i ≤ lA and 1 ≤ j ≤ lB , K02 [i, j], V[i, j] only depends on Σ2 [i, j], and Σ2 is subject to uniform distribution. By the security of KC, we have that, for each pair (i, j), K02 [i, j] and V[i, j] are independent, and K02 [i, j] is uniform distributed. Hence, K02 and V are independent, and K02 is uniformly distributed, which implies that Pr[T2 ] = 1/2. This finishes the proof of Theorem C.1. 5.3 Parameter Selection and Evaluation In this subsection, the concrete parameters for key exchange protocol from LWR are evaluated and chosen. 5.3.1 Discrete Distribution It is suggested in [ADPS16, BCD+ 16] that rounded Gaussian distribution can be replaced by discrete distribution that is very close to rounded Gaussian in the sense of Rényi divergence [BLL+ 15]. Definition 5.2 ( [BLL+ 15]). For two discrete distributions P, Q satisfying Supp(P ) ⊆ Supp(Q), their a-order Rényi divergence, for some a > 1, is  Ra (P ||Q) =  X x∈Supp(P ) P (x)a Q(x)a−1   1 a−1 . Lemma 5.6 ( [BLL+ 15]). Letting a > 1, P and Q are two discrete distributions satisfying Supp(P ) ⊆ Supp(Q), then we have 25 Multiplicativity: Let P and Q be two distributions of random variable (Y1 , Y2 ). For i ∈ {1, 2}, let Pi and Qi be the margin distribution of Yi over P and Q respectively. If Y1 and Y2 , under P and Q respectively, are independent, then Ra (P ||Q) = Ra (P1 ||Q1 ) · Ra (P2 ||Q2 ). Probability Preservation: Let A ⊆ Supp(Q) be an event, then a Q(A) ≥ P (A) a−1 /Ra (P ||Q). Note that, when the underlying key derivation function KDF is modelled as a random oracle (as in [BCD+ 16, ADPS16]), an attacker is considered to be successful only if it can recover the entire consensus bits. Denote by E the event that a PPT attacker can successfully and entirely recover the bits of K1 = K2 . By Lemma 5.6, we have that Prrounded Gaussian [E] > n·(l +l )+l ·l Prdiscrete [E]a/(a−1) /Ra A B A B (χ||φ̄), where φ̄ is the rounded Gaussian distribution, and χ is the discrete distribution. 5.3.2 Proposed Parameters dist. bits var. DR DP 16 16 1.70 1.40 0 19572 21456 probability of ±1 ±2 ±3 14792 6383 1570 15326 5580 1033 ±4 220 97 ±5 17 4 order divergence 500.0 500.0 1.0000396 1.0000277 Table 1: Discrete distributions of every component in the LWR secret. We choose the standard variances large enough to prevent potential combinational attacks. Recommended Paranoid n 680 832 q 215 215 p 212 212 l 8 8 m 24 24 g 28 28 distr. DR DP bw. 16.39 20.03 err. 2−35 2−34 |K| 256 256 Table 2: Parameters for LWR-Based key exchange. “bw.” refers to the bandwidth in kilo-bytes. “err.” refers to the overall error probability that is calculated by the algorithm developed in Section 5.1. “|K|” refers to the length of consensus bits. 5.3.3 Security Estimation Similar to [ADPS16, BCD+ 16, CKLS16], we only consider the primal and dual attacks [CN11, SE94] adapted to the LWR problem. The dual attack tries to distinguish the distribution of LWE samples and the uniform distribution. Suppose (A, b = As + e) ∈ Zm×n × Zm q q is a LWE sample, where s and e are 2 2 drawn from discrete Gaussian of variance σs and σe respectively. Then we choose a positive real c ∈ R, 0 < c ≤ q, and construct Lc (A) = (x, y/c) ∈ Zm × (Z/c)n | xT A = yT mod q , which is a lattice with dimension m + n and determinant (q/c)n . For a short vector (x, y) ∈ Lc (A) found by the BKZ algorithm, we have xT b = xT (As + e) = c · yT s + xT e mod q. If (A, b) is an LWE sample, the distribution of the right-hand side will be very close to a Gaussian of 26 p standard deviation c2 kyk2 σs2 + kxk2 σe2 , otherwise the distribution will be uniform. k(x, y)k n is aboutqδ0m+n (q/c) m+n , where δ0 is q the root Hermite factor. We heuristically assume that kxk = m m+n k(x, y)k, and kyk = n m+n k(x, y)k. Then we can choose c = σe /σs that min- T imizes the standard deviation of xT b. The padvantage of distinguishing x b from uniform distri2 2 2 2 2 2 2 bution is  = 4 exp(−2π τ ), where τ = c kyk σs + kxk σe /q. This attack must be repeated R = max{1, 1/(20.2075b 2 )} times to be successful. The primal attack reduces the LWE problem to the unique-SVP problem. Let Λw (A) = {(x, y, z) ∈ Zn × (Zm /w) × Z | Ax + wy = zb mod q}, and a vector v = (s, e/w, 1) ∈ Λw (A). Λw (A) is a lattice of d = m + n + 1 dimensions, and its determinant is (q/w)m . From geometry series assumption, we can derive kb∗i k ≈ δ0d−2i−1 det(Λw (A))1/d . We heuristically assume that the lengthqof projection of v onto q the vector space spanned by the last b Gram-Schmidt vectors (nσs2 + mσe2 /w2 + 1). If this length is shorter than kb∗d−b k, q b 2 2 2 this attack can be successful. Hence, the successful condition is d (nσs + mσe /w + 1) ≤ m/d δ02b−d−1 wq . We know that the optimal w balancing the secret s and the noise e is about σe /σs . We aim at providing parameter sets for long term security, and estimate the concrete security in a more conservative way than [APS15] from the defender’s point of view. We first consider the attacks of LWE whose secret and noise have different variances. Then, we treat the LWR problem as a special LWE problem whose noise is uniformly distributed over [−q/2p, q/2p − 1]. In our security estimation, we simply ignore the difference between the discrete distribution and the rounded Gaussian, on the following grounds: the dual attack and the primal attack only concern about the standard deviation, and the Rényi divergence between the two distributions is very small. is about b d k(s, e/w, 1)k ≈ b d Scheme Recommended Paranoid Attack Primal Dual Primal Dual m0 667 631 768 746 b 461 458 584 580 C 143 142 180 179 Q 131 130 164 163 P 104 103 130 129 Table 3: Security estimation of the parameters described in Table 2. “C, Q, P” stand for “Classical, Quantum, Plausible” respectively. Numbers under these columns are the binary logarithm of running time of the corresponding attacks. Numbers under “m0 , b” are the best parameters for the attacks. 6 LWE-Based Key Exchange from KC and AKC In this section, following the protocol structure in [Pei14,ADPS16,BCD+ 16], we present the applications of OKCN and AKCN to key exchange protocols based on LWE. Denote by (λ, n, q, χ, KC, lA , lB , t) the underlying parameters, where λ is the security parameter, q ≥ 2, n, lA and lB are positive integers that are polynomial in λ (for protocol symmetry, lA and lB are usually set to be equal and are actually small constant). To save bandwidth, we cut off t least significant bits of Y2 before sending it to Alice. Let KC = (params, Con, Rec) be a correct and secure KC scheme, where params is set to be (q, g, m, d). The KC-based key exchange protocol from LWE is depicted in Figure 4, and the 27 Initiator seed ← {0, 1}κ A = Gen(seed) ∈ Zn×n q X1 , E1 ← χn×lA Y1 = AX1 + E1 Responder A seed, Y1 ∈ Zn×l q A = Gen(seed) X2 , E2 ← χn×lB Y2 = AT X2 + E2 Eσ ← χlA ×lB Σ2 = Y1T X2 + Eσ (K2 , V) ← Con(Σ2 , params) lA ×lB B Y2′ = ⌊Y2 /2t ⌋ ∈ Zn×l ⌈q/2t ⌉ , V ∈ Zg Σ1 = XT1 (2t Y2′ + 2t−1 1) K1 ← Rec(Σ1 , V, params) Figure 4: LWE-based key exchange from KC and AKC, where K1 , K2 ∈ ZlmA ×lB and |K1 | = |K2 | = lA lB |m|. 1 refers to the matrix which every elements are 1. actual session-key is derived from K1 and K2 via some key derivation function KDF . There, for presentation simplicity, the Con and Rec functions are applied to matrices, meaning they are applied to each of the coordinates separately. Note that 2t Y20 + 2t−1 1 is an approximation of Y2 , so we have Σ1 ≈ XT1 Y2 = XT1 AT X2 +XT1 E2 , Σ2 = Y1T X2 +Eσ = XT1 AT X2 +ET1 X2 +Eσ . As we choose X1 , X2 , E1 , E2 , Eσ according to a small noise distribution χ, the main part of Σ1 and that of Σ2 are the same XT1 AT X2 . Hence, the corresponding coordinates of Σ1 and Σ2 are close in the sense of | · |q , from which some key consensus can be reached. The failure probability depends upon the number of bits we cut t, the underlying distribution χ and the distance parameter d, which will be analyzed in detail in subsequent sections. In the following security definition and analysis, we simply assume that the output of the PRG Gen is truly random. For presentation simplicity, we have described the LWE-based key exchange protocol from a KC scheme. But it can be straightforwardly adapted to work on any correct and secure AKC scheme, as clarified in Section 5. By a straightforward adaption (actually simplification) of the security proof of LWR-based key exchange protocol in Section 5.2, we have the following theorem. The detailed proof of Theorem 6.1 is presented in Appendix C. Theorem 6.1. If (params, Con, Rec) is a correct and secure KC or AKC scheme, the key exchange protocol described in Figure 4 is secure under the (matrix form of ) LWE assumption [PVW08, BCD+ 16]. The correctness of the protocol depends upon the underlying error distributions, which are discussed in the next subsection. 28 6.1 Noise Distributions and Correctness For a correct KC with parameter d, if the distance of corresponding elements of Σ1 and Σ2 is less than d in the sense of | · |q , then the scheme depicted in Figure 4 is correct. Denote (Y2 ) = 2t bY2 /2t c + 2t−1 1 − Y2 . Then Σ1 − Σ2 = XT1 (2t Y20 + 2t−1 1) − Y1T X2 − Eσ = XT1 (Y2 + (Y2 )) − Y1T X2 − Eσ = XT1 (AT X2 + E2 + (Y2 )) − (AX1 + E1 )T X2 − Eσ = XT1 (E2 + (Y2 )) − ET1 X2 − Eσ We consider each pair of elements in matrix Σ1 , Σ2 separately, then derive the overall error rate by union bound. Now, we only need to consider the case lA = lB = 1. In this case, Xi , Ei , Yi , (i = 1, 2) are column vectors in Znq , and Eσ ∈ Zq . If Y2 is independent of (X2 , E2 ), then we can directly calculate the distribution of σ 1 − σ 2 . But now Y2 depends on (X2 , E2 ). To overcome this difficulty, we show that Y2 is independent of (X2 , E2 ) under a condition of X2 that happens with very high probability. Theorem 6.2. For any positive integer q, n, and a column vector s ∈ Znq , let φs denote the map Znq → Zq : φs (x) = xT s. If there exits a coordinate of s which is not zero divisor in ring Zq , then map φs is surjective. Proof. Let us assume one coordinate of s, say s, has no zero divisor in ring Zq . Then the Zq → Zq map between the two Zq -modules deduced by s: x 7→ sx, is injective, and thus surjective. Hence, φs is surjective. For a column vector s composed by random variables, denote by F (s) the event that φs is surjective. The following theorem gives a lower bound of probability of F (s), where s ← χn . In our application, this lower bound is very close to 1. Theorem 6.3. Let p0 be the probability that e is a zero divisor in ring Zq , where e is subject to χ. Then Pr[s ← χn : F (s)] ≥ 1 − pn0 Proof. From Theorem 6.2, if φs is not surjective, then all coordinates of s are zero divisors. Then Pr[s ← χn : ¬F (s)] ≤ pn0 , and the proof is finished. Theorem 6.4. If s, e ← χn , A ← Zn×n , y = As + e ∈ Znq , then under the condition F (s), y is q independent of (s, e), and is uniformly distributed over Znq . Proof. For all ỹ, s̃, ẽ, Pr[y = ỹ | s = s̃, e = ẽ, F (s)] = Pr[As̃ = ỹ − ẽ | s = s̃, e = ẽ, F (s)]. Let A = (a1 , a2 , . . . , an )T , ỹ − ẽ = (c1 , c2 , . . . , cn )T , where ai ∈ Znq , and ci ∈ Zq , for every 1 ≤ i ≤ n. Since φs is surjective, the number of possible choices of ai , satisfying aTi ·s̃ = ci , is |Kerφs | = q n−1 . 2 Hence, Pr[As̃ = ỹ − ẽ | s = s̃, e = ẽ, F (s)] = (q n−1 )n /q n = 1/q n . Since the right-hand side is the constant 1/q n , the distribution of y is uniform over Znq , and is irrelevant of (s, e). We now begin to analyze the error probability of the scheme presented in Figure 4. Denote by E the event |XT1 (E2 +(Y2 ))−ET1 X2 −Eσ |q > d. Then Pr[E] = Pr[E|F (S)] Pr[F (S)]+ Pr[E|¬F (S)] Pr[¬F (S)]. From Theorem 6.4, we replace Y2 = AT X2 + E2 in the event E|F (S) 29 with uniformly distributed Y2 . Then, Pr[E] = Pr[Y2 ← Znq : E|F (S)] Pr[F (S)] + Pr[E|¬F (S)] Pr[¬F (S)] = Pr[Y2 ← Znq : E|F (S)] Pr[F (S)] + Pr[Y2 ← Znq : E|¬F (S)] Pr[¬F (S)] + Pr[E|¬F (S)] Pr[¬F (S)] − Pr[Y2 ← Znq : E|¬F (S)] Pr[¬F (S)] = Pr[Y2 ← Znq : E] +  where || ≤ Pr[¬F (S)]. In our application, p0 is far from 1, and n is very large, by Theorem 6.3,  is very small, so we simply ignore . If Y2 is uniformly distributed, then (Y2 ) is a centered uniform distribution. Then, the distribution of XT1 (E2 + (Y2 )) − ET1 X2 − Eσ can be directly computed by programs. As noted in [ADPS16,BCD+ 16], sampling from rounded Gaussian distribution (i.e., sampling from a discrete Gaussian distribution to a high precision) constitutes one of major efficiency bottleneck. In this work, for LWE-based key exchange, we are mainly concerned with the following two kinds of efficiently sampleable distributions. 6.1.1 Binary Distribution Binary-LWE is a variation of LWE, where the noise distribution is set to be χ = U({0, 1}). With respect to m = n · (1 + Ω(1/ log n)) samples and large enough polynomial q ≥ nO(1) , the hardness of binary-LWE is established in [MP13], with a reduction from some approximation lattice problem in dimension Θ(n/ log n). Concrete error probability can be calculated on the concrete parameters by the method in previous section. For KC-based key exchange from binary-LWE, we have the following theorem, which means that it is correct when the underlying parameter d satisfies d ≥ n + 1. For LWE-based KE from OKCN, where 2md < q, we get that it is correct when q > 2m(n + 1). Actually, this theorem has already been implied in the above analysis. Theorem 6.5. If χ = U({0, 1}), and (params, Con, Rec) is a correct KC or AKC scheme where d ≥ n + 1, the key exchange protocol described in Algorithm 4 is correct. Proof. We prove that, for any (i, j), 1 ≤ i ≤ lA and 1 ≤ j ≤ lB , |Σ1 [i, j] − Σ2 [i, j]|q ≤ d holds true. Denote X1 = (X̂1 , X̂2 , . . . , X̂lA ), E1 = (Ê1 , Ê2 , . . . , ÊlA ), and X2 = (X̂01 , X̂02 , . . . , X̂0lB ), E2 = (Ê01 , Ê02 , . . . , Ê0lB ), where X̂i , X̂0i , Êi , Ê0i ∈ {0, 1}n . Then |Σ1 [i, j] − Σ2 [i, j]|q = X̂Ti Ê0j − ÊTi X̂0j − Eσ [i, j] ≤ X̂Ti Ê0j − ÊTi X̂0j q q + |Eσ [i, j]|q ≤n + 1 ≤ d However, cautions should be taken when deploying key exchange protocols based upon binaryLWE. By noting that any Binary-LWE sample satisfies a quadric equation, if no less than n2 samples can be used for an adversary, the secret and noise can be recovered easily. The work √ 2 [AG11] proposes an algorithm for binary-LWE with time complexity 2Õ(αq) . If αq = o( n), 2 this algorithm is subexponential, but it requires 2Õ((αq) ) samples. When m log q/(n + m) = n/2+o(n) o(n/ log n), [KF15] proposes a distinguishing attack with time complexity 2 ln (m log q/(n+m)−1) , which results in a subexponential-time algorithm if m grows linearly in n. 30 6.1.2 Discrete Distributions In this work, for LWE-based key exchange, we use the following two classes of discrete distributions, which are specified in Table 4 and Table 5 respectively, where “bits” refers to the number of bits required to sample the distribution and “var.” means the standard variation of the Gaussian distribution approximated. We remark that the discrete distributions specified in Table 5 are just those specified and used in [BCD+ 16] for the LWE-based Frodo scheme. dist. D1 D2 D3 D4 D5 dist. bits var. 8 12 12 16 16 1.10 0.90 1.66 1.66 1.30 bits var. 8 12 12 16 1.25 1.00 1.75 1.75 0 94 1646 1238 19794 22218 probability of ±1 ±2 ±3 62 17 2 992 216 17 929 393 94 14865 6292 1499 15490 5242 858 ±4 ±5 12 200 67 1 15 2 probability of order divergence 15.0 75.0 30.0 500.0 500.0 1.0015832 1.0003146 1.0002034 1.0000274 1.0000337 order divergence 25.0 40.0 100.0 500.0 1.0021674 1.0001925 1.0003011 1.0000146 0 ±1 ±2 in±3 ±5 and ±6 their Rényi divergences. Table 4: Discrete distributions proposed this±4 work, D̄1 D̄2 D̄3 D̄4 88 1570 1206 19304 61 990 919 14700 20 248 406 6490 3 24 104 1659 1 15 245 1 21 1 Table 5: Discrete distributions for Frodo [BCD+ 16], and their Rényi divergences q Challenge Classical Recommended Paranoid Paranoid-512 210 211 214 214 212 n 334 554 718 818 700 l m 8 8 8 8 16 21 22 24 24 22 g OKCN 29 29 210 210 210 d Frodo 2 2 2 2 2 OKCN 255 255 511 511 511 Frodo 127 127 255 255 255 dist. D1 D2 D3 D4 D̄4 error probability OKCN Frodo 2−47.9 2−14.9 2−39.4 2−11.5 2−37.9 2−10.2 2−32.6 2−8.6 2−33.6 2−8.3 bw. (kB) |A| (kB) |K| 6.75 12.26 20.18 22.98 33.92 139.45 422.01 902.17 1170.97 735.00 64 128 256 256 512 Table 6: Parameters proposed for OKCN-LWE when t = 0 (i.e., without cutting off least significant bits). “distr.” refers to the discrete distributions proposed in Table 4 and Table 5. “bw.” means bandwidth in kilo-bytes (kB). “|A|” refers to the size of the matrix. |K| = l2 log m denotes the length of consensus bits. q Challenge Classical Recommended Paranoid 211 212 215 215 n 352 592 752 864 l m 8 8 8 8 21 22 24 24 g OKCN 22 22 23 23 d Frodo 2 2 2 2 OKCN 383 383 895 895 Frodo 255 255 511 511 dist. D̄1 D̄2 D̄3 D̄4 error probability OKCN Frodo 2−80.1 2−41.8 2−70.3 2−36.2 2−105.9 2−38.9 2−91.9 2−33.8 bw. (kB) OKCN Frodo 7.76 7.75 14.22 14.22 22.58 22.57 25.94 25.93 |A| (kB) |K| 170.37 525.70 1060.32 1399.68 64 128 256 256 Table 7: Parameters of Frodo, and comparison with OKCN-LWE when t = 0. Here, “distr.” refers to the discrete distributions specified in Table 5. Note that, on the parameters of Frodo, OKCNLWE achieves significantly lower error probability, which are negligible and are thus sufficient for building CPA-secure public-key encryption schemes. 31 OKCN-T2 OKCN-T1 q 214 214 n 712 712 l 8 8 m 24 24 g 28 28 t 2 1 d 509 509 dist. D5 D5 err. 2−39.0 2−52.3 bw. (kB) 18.58 19.29 |A| (kB) 887.15 887.15 |K| 256 256 Table 8: Parameters proposed for OKCN-LWE with t least significant bits cut off. 6.1.3 Instantiations, and Comparisons with Frodo The comparisons, between the instantiations of our LWE-based KE protocol and Frodo, are summarized in the following tables 6, 7 and 8. Note that, for presentation simplicity, we take lA = lB = l for the sets of parameters under consideration. Also, for presentation simplicity, we use OKCN to denote OKCN-LWE in these tables. For both “OKCN simple” proposed in Algorithm 3 and “AKCN power 2” proposed in Algorithm 5, they achieve a tight parameter constraint, specifically, 2md < q. In comparison, the parameter constraint achieved by Frodo is 4md < q. As we shall see, such a difference is one source that allows us to achieve better trade-offs among error probability, security, (computational and bandwidth) efficiency, and consensus range. In particular, it allows us to use q that is one bit shorter than that used in Frodo. Beyond saving bandwidth, employing a one-bit shorter q also much improves the computational efficiency (as the matrix A becomes shorter, and consequently the cost of generating A and the related matrix operations are more efficient), and can render stronger security levels simultaneously. Note that, when being transformed into PKE schemes, smaller matrix A means shorter public-key size. Put in other words, on the same parameters of (q, m), OKCN allows a larger error distance d than Frodo, resulting in significantly lower error probability. Here, we briefly highlight one performance comparision: OKCN-T2 (resp., Frodo-recommended) has 18.58kB (resp., 22.57kB) bandwidth, 887.15kB (resp., 1060.32kB) matrix A, at least 134-bit (resp., 130-bit) quantum security, and error probability 2−39 (resp., 2−38.9 ). h i The error probability for OKCN-LWE in these tables are derived by computing Pr |Σ1 [i, j] − Σ2 [i, j]|q > d , for any 1 ≤ i ≤ lA and 1 ≤ j ≤ lB , and then applying the union bound. The concrete failure probabilities are gotten by running the code slightly adjusted, actually simplified, from the open source code of Frodo. The simplified code are available from Github http://github.com/OKCN. 6.1.4 Security Estimation For security evaluation, similar to [ADPS16, BCD+ 16], we only consider the resistance to two kinds of BKZ attacks, specifically primal attack and dual attack [CN11] [SE94], with respect to the core-SVP hardness. The reader is referred to [ADPS16, BCD+ 16] for more details. The concrete security levels are calculated by running the same code of Frodo. The evaluated security levels are summarized in the following tables. 32 Scheme Challenge Classical Recommended Paranoid Paranoid-512 OKCN-T2 Attack Primal Dual Primal Dual Primal Dual Primal Dual Primal Dual Primal Dual m0 327 310 477 502 664 661 765 743 643 681 638 640 Rounded Gaussian b C Q 275 – – 272 – – 444 138 126 439 137 125 500 155 141 496 154 140 586 180 164 582 179 163 587 180 164 581 179 163 480 149 136 476 148 135 P – – 100 99 112 111 130 129 131 129 108 107 Post-reduction C Q P – – – – – – 132 120 95 131 119 94 146 133 105 145 132 104 179 163 130 178 162 129 180 164 130 178 162 129 148 135 107 147 134 106 Table 9: Security estimation of the parameters described in Table 6 and Table 8. “C, Q, P” stand for “Classical, Quantum, Plausible” respectively. Numbers under these columns are the binary logarithm of running time of the corresponding attacks. Numbers under “m0 , b” are the best parameters for the attacks. “Rounded Gaussian” refers to the ideal case that noises and errors follow the rounded Gaussian distribution. “Post-reduction” refers to the case of using discrete distributions as specified in Table 4. Scheme Challenge Classical Recommended Paranoid Attack Primal Dual Primal Dual Primal Dual Primal Dual m0 338 331 549 544 716 737 793 833 Rounded Gaussian b C Q 266 – – 263 – – 442 138 126 438 136 124 489 151 138 485 150 137 581 179 163 576 177 161 P – – 100 99 110 109 129 128 Post-reduction C Q P – – – – – – 132 120 95 130 119 94 145 132 104 144 130 103 178 162 129 177 161 128 Table 10: Security estimation of the parameters proposed for Frodo in [BCD+ 16], as specified in Table 7. 7 Hybrid Construction of Key Exchange from LWE and LWR in the Public-Key Setting By composing a CPA-secure symmetric-key encryption scheme, the LWE-based key exchange protocols presented Section 6 can be used to construct public-key encryption (PKE) schemes, by treating (A, Y1 ) (resp., X1 ) as the static public key (resp., secret key). Moreover, AKC-based key-exchange protocol can be directly used as a CPA-secure PKE scheme. To further improve the efficiency of the resultant PKE scheme, the observation here is we can generate the ephemeral Y2 in the ciphertext with LWR samples. This results in the following hybrid construction of key 33 Initiator seed ← {0, 1}κ A ← Znq B ×nA sk = X1 ← χnA ×lA E1 ← χnB ×lA Y1 = AX1 + E1 ∈ Znq B ×lA Responder pk = (A, Y1 ) A = Gen(seed) X2 ← χnB ×lB Y2 = ⌊AT X2 ⌉p Σ2 = ⌊Y1T X2 ⌉p V ← Con(Σ2 , K2 , params) Y2 ∈ Znp A ×lB , V ∈ ZlgA ×lB Σ2 = XT1 Y2 mod p K1 ← Rec(Σ1 , V, params) Figure 5: AKC-based key exchange from LWE and LWR in the public-key setting, where pk = (A, Y1 ) is fixed once and for all, K1 , K2 ∈ ZlmA ×lB and |K1 | = |K2 | = lA lB |m|. exchange from LWE and LWR in the public-key setting. For applications to PKE, we focus on the AKC-based protocol construction. Denote by (nA , nB , lA , lB , q, p, KC, χ) the system parameters, where p|q, and we choose p and q to be power of 2. The AKC-based protocol from LWE and LWR is presented in Figure 5. The hybird construction of key exchange from LWE and LWR is similar to the underlying protocol in Lizard [CKLS16]. The Lizard PKE scheme uses our AKCN as the underlying reconciliation mechnism (see more details in Appendix F), while our protocol is a general structure that can be implemented with either KC or AKC. In order to improve efficiency, Lizard [CKLS16] is based on the variants, referred to as spLWE and spLWR, of LWE and LWR with sparse secret. We aim at providing parameter sets for long term security, and estimate the concrete security in a more conservative way than [CKLS16] from the defender’s point of view. 7.1 Security and Error Rate Analysis The security proof is very similar to LWE-basd and LWR-based key exchanges in previous sections, and is omitted here. For the error probability, we have  p  p T X1 AT X2 − {AT X2 }p = XT1 AT X2 − XT1 {AT X2 }p q q  p T T  T  p T T Y1 X2 − {Y1 X2 }p = (X1 A X2 + ET1 X2 − {Y1T X2 }p ) Σ2 = Y1 X2 p = q q  p T Σ2 − Σ1 = E1 X2 + XT1 {AT X2 }p − {ET1 X2 + XT1 AT X2 }p = bET1 X2 + XT1 {AT X2 }p ep q Σ1 = XT1 Y2 = 34 We can see that the distribution of Σ2 − Σ1 can be derived from the distribution of E1 X2 + From Theorem 6.4, we know that for almost all (with overwhelm probability) given X2 , the distribution of {AT X2 }p is the uniform distribution over [−q/2p, q/2p)nA . The concrete error probability can then be derived numerically by computer programs. The codes and scripts are available on Github http://github.com/OKCN. XT1 {AT X2 }p . 7.2 Parameter Selection For simplicity, we use the Gaussian distribution of the same variance (denote as σs2 ) for the noise E1 , secrets X1 and X2 . We consider the weighted dual attack and weighted primal attack in Section 5.3. Recommended Paranoid σs2 2.0 2.0 nA 712 864 nB 704 832 q 215 215 p 212 212 l 8 8 m 24 24 g 28 28 pk 10.56 12.24 cipher 8.61 10.43 err. 2−63 2−52 |K| 256 256 Table 11: Parameters for the hybrid construction of key exchange from LWE and LWR. “err.” refers to the overall error probability. “|K|” refers to the length of consensus bits. “pk” refers to the kilo-byte (kB) size of the public key pk = (A, Y1 ). “cipher” refers to the kB size of (Y2 , V). Scheme Recommended Paranoid Attack Primal Dual Primal Dual m0 699 672 808 789 b 464 461 590 583 LWE C 144 143 181 179 Q 131 131 165 163 P 105 104 131 130 m0 664 665 856 765 b 487 483 585 579 LWR C 151 150 180 178 Q 138 137 164 162 P 109 109 130 129 Table 12: Security estimation of the parameters described in Table 11. 35 8 RLWE-Based Key Exchange from KC and AKC Initiator seed ← {0, 1}κ a = Gen(seed) ∈ Rq x1 , e1 ← DZn ,α y1 = a · x1 + e1 Responder seed, y1 ∈ Rq a = Gen(seed) x2 , e2 ← DZn ,α y2 = a · x2 + e2 eσ ← DZn ,α σ 2 = y1 · x2 + eσ ∈ Rq (k2 , v) ← Con(σ 2 , params) y2 ∈ R q , v ∈ R g σ 1 = y2 · x1 ∈ R q k1 ← Rec(σ 1 , v, params) Figure 6: RLWE-based key exchange from KC and AKC, where K1 , K2 ∈ Rq . The protocol instantiated with OKCN specified in Algorithm 1 (resp., AKCN in Algorithm 4) is referred to as OKCN-RLWE (resp., AKCN-RLWE). Denote by (λ, n, q, α, KC) the system parameters, where λ is the security parameter, q ≥ 2 is a positive prime number, α parameterizes the discrete Gaussian distribution DZn ,α , n denotes the degree of polynomials in Rq , and Gen a PRG generating a ∈ Rq from a small seed. Let KC = (params, Con, Rec) be a correct and secure KC scheme, where params = (q, g, m, d). The KC-based key exchange protocol from RLWE is depicted in Figure 6, where the actual session-key is derived from K1 and K2 via some key derivation function KDF . There, for presentation simplicity, the Con and Rec functions are applied to polynomials, meaning they are applied to each of the coefficients respectively. Note that σ 1 = y2 · x1 = a · x2 · x1 + e2 · x1 , σ 2 = y1 · x2 + eσ = a · x1 · x2 + e1 · x2 + eσ . As we choose x1 , x2 , e1 , e2 , eσ according to a small noise distribution DZn ,α , the main part of σ 1 and that of σ 2 are the same a · x1 · x2 . Hence, the corresponding coordinates of σ 1 and σ 2 are close in the sense of | · |q , from which some key consensus can be reached. The error probability depends upon the concrete value of α and the distance parameter d. As discussed in Section 5, a KC-based key exchange protocol can be trivially extended to work on any correct and secure AKC scheme. As the bandwidth of RLWE-based KE protocol has already been low, we do not apply the technique of cutting off some least significant bits of each element of the polynomial y2 . On security analysis. The security definition and proof of the RLWE-based key exchange protocol can be straightforwardly adapted from those for the KE protocol based on LWE or LWR. Briefly speaking, from Game G0 to Game G1 , we replace y1 with a uniformly random polynomial in Rq . From Game G1 to Game G2 , we replace y2 and σ 2 with uniformly random polynomials. Then, from the security of the underlying KC or AKC, we get that for any i, 1 ≤ i ≤ n, K2 [i] and v[i] are independent, and so the protocol is secure. 36 On implementations of RLWE-based KE. The protocol described in Figure 6 works on any hard instantiation of the RLWE problem. But if n is power of 2, and prime q satisfies q mod 2n = 1, then number-theoretic transform (NTT) can be used to speed up polynomial multiplication. The performance can be further improved by using the Montgomery arithmetic and AVX2 instruction set [ADPS16], and by carefully optimizing performance-critical routines (in particular, NTT) in ARM assembly [AJS16]. For all the implementations considered in this work for RLWE-based KE, we use the same parameters and noise distributions proposed for NewHope in [ADPS16], as described in Table 13. They achieve about 281-bit (resp., 255-, 199-) security against classic (resp., quantum, plausible) attacks. The reader is referred to [ADPS16] for details. In particular, the underlying noise distribution is the centered binomial distribution Ψ16 (rather than rounded Gaussian distribution √ with the standard deviation 8), which can be rather trivially sampled in hardware and software with much better protection against timing attacks. 8.1 RLWE-Based Key Exchange with Negligible Error Rate When implemented with the same parameters proposed in [ADPS16] for NewHope, as shown in Table 13 OKCN-RLWE and AKCN-RLWE reach 1024 consensus bits, with a failure probability around 2−40 that, we suggest, suffices for most applications of key exchange. In order for reaching a negligible error probability, particularly for achieving a CPA-secure PKE scheme, we need to further lower the error probability. A straightforward approach to reducing the error probability is to use the technique of NewHope by encoding and decoding the four-dimensional lattice D̃4 . With such an approach, the error probability can be lowered to about 2−61 , but the shared-key size is reduced from 1024 to 256. AKCN-RLWE equipped with this approach, referred to as AKCN-4:1, is presented and analyzed in Appendix D. We note that, in comparison with NewHope-simple recently proposed in [ADPS16b], AKCN-4:1 still has (slight) performance advantage in bandwidth expansion; specifically expanding 256 bits by AKCN-4:1 vs. 1024 bits by NewHope-simple compared to that of NewHope.5 Decoding the 24-dimensional Leech lattice is also recently considered in [Pop16]. But decoding the 4-dimensional lattice D̃4 has already been relatively complicated and computationally less efficient. Another approach is to employ error correction code (ECC). Unfortunately, in general, the ECC-based approach can be more inefficient and overburdened than NewHope’s approach. In this work, we make a key observation on RLWE-based key exchange, by proving that the errors in different positions in the shared-key are independent when n is large. Based upon this observation, we present a super simple and fast code, referred to as single-error correction (SEC) code, to correct at least one bit error. By equipping OKCN/AKCN with the SEC code, we achieve the simplest RLWE-based key exchange from both OKCN and AKCN, referred to as OKCN-SEC and AKCN-SEC respectively, with negligible error probability for much longer shared-key size. The comparisons among these RLWE-based protocols are summarized in Table 13. We note that for RLWE-based KE with negligible error probability, in general, AKC-based protocols are relatively simpler than KC-based protocols. 5 The bandwidth expansion, for both AKCN-4:1 and NewHope-simple, can be further compressed but at the price of losing operation simplicity. 37 SKCN-RLWE SKCN-RLWE AKCN-RLWE AKCN-RLWE SKCN-SEC SKCN-SEC SKCN-SEC AKCN-SEC AKCN-SEC NewHope AKCN-4:1-RLWE g 24 26 24 26 22 23 23 24 24 22 22 |K| 1024 1024 1024 1024 765 765 837 765 837 256 256 d 2879 3023 2687 2975 2303 2687 2687 2687 2687 - bw.(B) 4128 4384 4128 4384 3904 4032 4021 4128 4128 3872 3904 per. 2−48 2−52 2−42 2−51 2−31 2−42 2−42 2−42 2−42 2−69 2−69 nH 4 4 5 4 5 - err. 2−38 2−42 2−32 2−41 2−48 2−70 2−69 2−70 2−69 2−61 2−61 Table 13: Comparisons with NewHope. All schemes in the table use the same noise distribution Ψ16 used in [ADPS16], i.e. the sum of 16 independent centered binomial variables. And all schemes in the table share the parameter (q = 12289, n = 1024, m = 21 ). |K| refers to the total binary length of consensus bits. bw. (B) refers to the bandwidth in bytes. err. refers to failure probability. “nH ” refers to the dimension of SEC code used. “per” refers to the per bit error rate before applying the SEC code. “err.” refers to overall error rate. 8.2 On the Independence of Errors in Different Positions Suppose f (x), g(x) are two polynomials of degree n, whose coefficients are drawn independently from Gaussian. Let h(x) = f (x) · g(x) ∈ R[x]/(xn + 1). We show that for every two different integers 0 ≤ c1 , c2 < n, the joint distribution of (h[c1 ], h[c2 ]) will approach to the two-dimensional Gaussian when n tends to infinity. Hence, for the basic construction of RLWE-based key exchange from KC and AKC presented in Figure 6, it is reasonable to assume that the error probability of any two different positions are independent when n is sufficiently large. For representation simplicity, for any polynomial f , let f [i] denote the coefficient of xi . Lemma 8.1. Suppose f (x), g(x) ∈ R[x]/(xn + 1) are two n-degree polynomials whose coefficients are drawn independently from N (0, σ 2 ). Let h(x) = f (x) · g(x) ∈ R[x]/(xn + 1), where h(x) is represented as an n-degree polynomial. For any two different integers 0 ≤ c1 , c2 < n, the characteristic function of the two-dimensional random vector (h[c1 ], h[c2 ]) ∈ R2 is   − 1 h i n−1 Y 2 2k + 1 i(t1 h[c1 ]+t2 h[c2 ]) 4 2 2 φc1 ,c2 (t1 , t2 ) = E e = 1 + σ t1 + t2 + 2t1 t2 cos π(c1 − c2 ) n k=0 (5) Proof. One can observe that  X t1 h[c1 ] + t2 h[c2 ] = t1  f [i]g[j] − i+j=c1  X  f [i]g[j] + t2  i+j=c1 +n = t1 f T Ac1 g + t2 f T Ac2 g = f T (t1 Ac1 + t2 Ac2 )g 38  X i+j=c2 f [i]g[j] − X i+j=c2 +n f [i]g[j] Where f = (f [0], f [1], . . . , f [n − 1])T , g = (g[0], g[1], . . . , g[n − 1])T , and the notations Ac1 , Ac2 are defined by   1    ...    1    Ac =  −1     . .   . −1 The value 1 in the first row is in the c-th column. As t1 Ac1 + t2 Ac2 is symmetric, it can be orthogonally diagonalize as PT ΛP, where P is orthogonal, and Λ is diagonal. Hence, φc1 ,c2 (t1 , t2 ) = E[exp(i(Pf )T Λ(Pg))]. Since P is orthogonal, it keeps the normal distribution unchanged. Hence, (Pf )T Λ(Pg) equals to the sum of n scaled products of two independent one-dimensional Gaussian. Suppose λ1 , λ2 , . . . , λn are the eigenvalues of t1 Ac1 +t2 Ac2 , and φ is the characteristic function of the product of two independent one-dimensional standard Gaussian. Then we have n−1 Y φc1 ,c2 (t1 , t2 ) = φ(σ 2 λk ) (6) k=0 From [Sim02], φ(t) = (1 + t2 )−1/2 . For λk , we further observe that (t1 Ac1 + t2 Ac2 )2 = (t21 + t22 )I + t1 t2 (Ac1 Ac2 + Ac2 Ac1 ) = (t21 + t22 )I + t1 t2 (Gc2 −c1 + Gc1 −c2 ), where     G=   −1  1 1 .. .      1 The characteristic polynomial of G is xn + 1. Hence, λk satisfies   2k + 1 2 2 2 λk = t1 + t2 + 2t1 t2 cos π(c1 − c2 ) n By taking this into Equation 6, we derive the Equation 5. Theorem 8.1.  For any fixed integers 0 ≤ c1 , c2 < n, c1 6= c2 , when n tends to infinity, the dis] h[c2 ] √1 √ tribution of σh[c converges (in distribution) to the two-dimensional normal distribution 2 n , σ2 n N (0, I2 ). 39 Proof. Let φ(t1 , t2 ) denote the characteristic function of the random vector for fixed t1 , t2 ,  h[c1 ] h[c2 ] √ , √ σ2 n σ2 n     n−1 1X 2k + 1 1 2 2 ln(φ(t1 , t2 )) = − t + t2 + 2t1 t2 cos π(c1 − c2 ) ln 1 + 2 n 1 n k=0    n−1   1X 1 2 2k + 1 2 =− t + t2 + 2t1 t2 cos π(c1 − c2 ) + rk 2 n 1 n  . Then, (7) (8) k=0 n−1 =−  1X 1 2 t1 + t22 − rk , 2 2 (9) k=0 where rk is the Lagrange remainders. So, |rk | ≤ λ4k /2n2 . Since λ2k ≤ (|t1 | + |t2 |)2 , we have |rk | ≤ (|t1 | + |t2 |)4 /2n2 . When n tends to infinity, φ(t1 , t2 ) converges pointwise to exp(−(t21 + t22 )/2), which is the characteristic function of the two-dimensional normal distribution N (0, I2 ). From Lévy’s convergence   h[c1 ] h[c2 ] theorem, we derive that the random vector σ2 √n , σ2 √n converges in distribution to the normal distribution N (0, I2 ). 8.3 Reducing Error Rate with Single-Error Correction Code Note that, for the basic protocol construction of RLWE-based key exchange from KC and AKC presented in Figure 6, it has already achieved per-bit error probability of about 2−42 . The observation here is that, by Theorem 8.1 on the independence of error in different positions when n is large, if we can correct one bit error the error probability will be greatly lowered to be negligible. Towards this goal, we present an variant of the Hamming code, referred to as single-error correction (SEC) code, which can correct one-bit error in a very simple and fast way. 8.3.1 Single-Error Correction Code All the arithmetic operations in this section are over Z2 . For a positive integer nH , denote NH = 2nH , and define the matrix H as following, where for any i, 1 ≤ i ≤ NH − 1, the i-th column of H just corresponds to the binary presentation of i.   1 0 1 0 1 0 1 ··· 0 1 0 1 0 1 1 0 0 1 1 · · · 0 0 1 1    0 0 0 1 1 1 1 · · · 1 1 1 1 HnH ×(NH −1) =      ··· 0 0 0 0 0 0 0 ··· 1 1 1 1 H −1 For arbitrary x = (x1 , . . . , xNH −1 ) ∈ ZN , let pT = HxT . It is easy to check that the j-th 2 element of p is the exclusive-or of all xi ’s satisfying the j-th least significant bit of i is 1, where 1 ≤ j ≤ nH and 1 ≤ i ≤ NH − 1. Specifically, the first element of p is the exclusive-or of all xi that the least significant bit of i is 1, and the second element of p is the exclusive-or of all xi that the second least significant bit of i is 1, and so on. Denote p = (p1 , p2 , . . . , pnH ). We can combine the bits in p into a binary number p = 20 p1 + 21 p2 + . . . 2nH −1 pnH . The construction of H directly leads to the following proposition. 40 Proposition 8.1. If pT = HxT , and the Hamming weight of x is 1, then p is the subscript index of the only 1 in x. The single-error correction code C is defined by n o nH NH −1 T T H −1 C = (x0 , x, p) ∈ Z2 × ZN × Z | x = ⊕ x , p = Hx 0 i 2 2 i=1 The encoding algorithm is straightforward and depicted in Algorithm 13. We now show that C can correct one bit error. Suppose x is encoded into c = (x0 , x, p). For some reasons, such as the noise in communication channel, the message c may be changed into c0 = (x00 , x0 , p0 ). We only need to consider the case that at most one bit error occurs. If x00 equals to the parity bit of x0 , then no error occurs in x0 and x. Otherwise, there is one bit error in x00 or x0 , but p0 = p (as we assume there exists at most one bit error that has already occurred in x00 or x0 ). We calculate p00 = Hx0T ⊕ p0T . In fact, p00 = Hx0T ⊕ pT = H(x0T ⊕ xT ). If the one-bit error occurs in x0 , by Proposition 8.1, p00 is the subscript index of the error bit. If the one-bit error occurs on x00 , then x0 = x, and p00 = H0 = 0. Hence, p00 always equals to the subscript index of the error bit. The decoding algorithm is depicted in Algorithm 14. Note that, according to the special form of H, the matrix multiplication HxT in both encoding and decoding can be done with simple bit operations like bit shifts and bitwise exclusive-or (such an implementation is given in Appendix E). Moreover, for AKCN-SEC and OKCN-SEC, the calculations in Lines 2-4 in Algorithm 14 are executed only with probability around 2−40 , so the decoding is extremely fast. Algorithm 13 EncodeC (x = (x1 , . . . , xNH −1 )) Algorithm 14 (x1 , . . . , xNH −1 ), p) 1: H −1 x0 = ⊕N i=1 xi 2: pT = HxT 3: c = (x0 , x, p) 4: return c 1: 2: 3: 4: 5: 6: 8.3.2 H −1 p = ⊕N i=0 xi if p = 1 then i = HxT ⊕ p xi = xi ⊕ 1 end if return x DecodeC (x0 , x = . bitwise exclusive-or AKC and KC with SEC code We divide the n-bit string k1 into bn/(NH + nH )c blocks, then apply our SEC code in each block. Note that this approach can also correct more than one bit errors, if at most one bit error occurs in each block. 41 Alice σ 1 ∈ Znq k1 = EncodeC (k′1 ) v ← Con(σ 1 , k1 , params) Bob σ 2 ∈ Znq ≈ v k2 ← Rec(σ 2 , v, params) k′2 = DecodeC (k2 ) H +nH Figure 7: Depiction of AKC with SEC code, where k1 , k2 ∈ ZN , |k01 | = |k02 | = NH − 1. If 2 0 0 the Hamming distance between k1 and k2 is at most 1, then k1 = k2 . Figure 7 depicts the AKC scheme equipped with the SEC code. Note that EncodeC can be calculated off-line. Suppose the per bit error probability of k1 and k2 is p, then under the assumption that the errors in different positions are independent, we can estimate that the overall 2 heuristic error probability of k01 and k02 is no larger than b NH n+nH cCN p2 . H +nH Alice H +nH σ 1 ∈ ZN q ≈ Bob H +nH σ 2 ∈ ZN q (k1 , v) ← Con(σ 1 , params) Denote k1 as (x0 , x = (x1 , . . . , xNH −1 ), p) v0 = EncodeC (x) ⊕ k1 v, v0 ∈ V k2 ← Rec(σ 2 , v, params) Denote k2 as (x00 , x0 = (x01 , . . . , x0NH −1 ), p0 ) x0 = DecodeC (k2 ⊕ v0 ) Figure 8: Depiction of application of SEC code to KC, where k1 , k2 ∈ Z2NH +nH . If k1 and k2 have at most one different bit, then x = x0 . For KC equipped with the SEC code, we propose the algorithm depicted in Figure 8. Note that Alice only needs to send nH + 1 bits of v0 , as the second to NH th elements of v0 are all zeros. Bob calculates x0 = DecodeC (k2 ⊕ v0 ). In fact, k2 ⊕ v0 = EncodeC (x) ⊕ (k1 ⊕ k2 ). Hence, if the Hamming distance between k1 and k2 is 1, then x0 = x. To prove security of the algorithm in Figure 8, we need the following theorem. L L H −1 H +nH Theorem 8.2. Let V = Z2 × {0 ∈ ZN } × Zn2 H , then ZN =C V, where denotes 2 2 direct sum. Proof. For any k1 = (x0 , x = (x1 , . . . , xNH −1 ), p) ∈ Z2NH +nH , let c = EncodeC (x) and v0 = c ⊕ k1 . We have the decomposition k1 = c ⊕ v0 , where c ∈ C and v0 ∈ V. Next, we prove V ∩ C = 0. If k = (x0 , x, p) ∈ V ∩ C, then x = 0, which implies x0 = 0 and pT = H0 = 0. Hence, k = 0. When k1 is subjected to uniform distribution, then by Theorem 8.2, after the decomposition k1 = c ⊕ v0 where c ∈ C and v0 ∈ V, c and v0 are subjected to uniform distribution in C and V respectively. And c and v0 are independent. As both Z2NH −1 → C and x 7→ EncodeC (x) 42 are one-to-one correspondence, we derive that x and v0 are independent, and x is uniformly distributed. On the desirability of OKCN-SEC and AKCN-SEC. OKCN-SEC and AKCN-SEC are desirable on the following grounds: • To our knowledge, OKCN-SEC and AKCN-SEC are the simplest RLWE-based KE protocols with negligible error probability, which are better suitable for hardware or software implementations than encoding and decoding the four-dimensional lattice D̃4 . Note that SEC can be implemented with simple bit operations. Moreover, with probability about 1 − 2−40 , the decoding only involves the XOR operations in Line-1 of Algorithm 13, which is extremely simple and fast. • AKCN-SEC can be directly transformed into a CPA-secure PKE scheme for encrypting 837-bit messages with error probability about 2−69 , while AKCN4:1-RLWE and NewHopesimple are for encrypting 256-bit messages with error probability about 2−61 . • It is desirable to have KE protocols that directly share or transport keys of larger size, on the following grounds. Firstly, it is commonly expected that, in the post-quantum era, symmetric-key cryptographic primitives like AES need larger key sizes, in view of the quadratic speedup by Grover’s search algorithm and the possibility of more sophisticated quantum attacks [KM10, KLL15] against symmetric-key cryptography. Secondly, in some more critical application areas than public commercial usage, larger key size actually has already been mandated nowadays. Thirdly, when KE being used within TLS, actually a pair of keys (KCS , KSC ), and even more, is needed, where KCS (resp., KSC ) is for generating messages from client (resp., server) to server (resp., client). (KCS , KSC ) is usually derived via a key-derivation function (KDF) from the session-key output by the KE protocol. With a KE protocol of larger shared-key size, the KDF can be waived, which simplifies the software or hardware implementations (particularly at the client side) and strengthens security simultaneously. • As clarified, the SEC approach fails only when there are more than one bit errors in some block, and is versatile in the sense: the smaller (resp., larger) is the block size nH , the lower the error probability (resp., bandwidth expansion) will be. The performances for some instantiations of OKCN-SEC and AKCN-SEC are summarized in Table 13. 9 Performance Comparison: Benchmark The work [SM16] introduces the Open Quantum Safe Project. liboqs is one part of this project. liboqs provides the interface for adding new key exchange schemes, benchmark, and an easy way to integrate to OpenSSL. We fork the liboqs on Github and add our OKCN-LWR-Recommended and OKCN-LWERecommended. Most of the source codes are modified from Frodo-Recommended provided in liboqs. 43 time(us) stdev RLWE BCNS15 Alice 0 1006.497 10.909 Bob 1623.353 14.045 Alice 1 201.335 1.268 RLWE NewHope Alice 0 81.430 26.947 Bob 123.714 4.504 Alice 1 26.631 1.878 LWE Frodo recommended Alice 0 1443.915 10.990 Bob 1940.616 12.809 Alice 1 170.109 3.655 LWR OKCN recommended Alice 0 1161.154 11.839 Bob 1722.525 12.401 Alice 1 133.984 3.980 LWE OKCN recommended Alice 0 1335.453 13.460 Bob 1753.240 14.293 Alice 1 146.162 3.528 cycle stdev bw. (B) 2309859 3725552 461976 24996 32220 2805 4096 4244 - 186797 283841 61048 61827 10279 4173 1824 2048 - 3313704 4453734 390331 25236 29439 8317 11280 11288 - 2664789 3953182 307404 27129 28400 9065 9968 8224 - 3064789 4023632 335380 30871 32851 8035 9968 8608 - Table 14: Benchmark of liboqs integrated with OKCN-LWE-Recommended. “time(us)” refers to mean time that spent on each iteration. “cycle” refers to mean number of cpu cycles. “stdev” refers to population standard deviation of time or cpu cycles. “bw. (B)” refers to bandwidth, counted in bytes. We run benchmark of liboqs on Ubuntu Linux 16.04, GCC 5.4.0, Intel Core i7-4712MQ 2.30GHz, with hyperthreading and TurboBoost disabled, and the CPU frequency fixed to 2.30GHz (by following the instructions on http://bench.cr.yp.to/supercop.html). The benchmark result (Table 14) shows that OKCN-LWR-Recommended and OKCN-LWE-Recommended are faster than Frodo, and use smaller bandwidth. We modify the source code of NewHope. We only change the reconciliation part of NewHope to our OKCN/AKCN, and keep other parts (e.g. NTT) unchanged. The benchmark of our RLWE-AKCN-SEC and RLWE-OKCN-SEC are shown in Table 15. The environment is the same as above. We can see that the simplicity of our reconciliation mechanisms result in significant improvement of this part in the key exchange scheme. con rec median average median average AKCN-SEC 8032 8169 7420 7625 OKCN-SEC 12020 12093 7356 7369 NewHope 15276 15448 10548 10498 Table 15: Benchmark of AKCN/OKCN-SEC and NewHope. Numbers in the table are median and average of cpu cycles. 44 10 More Applications and Future Works The composition of a secure KE protocol (with negligible error probability) and a CPA-secure symmetric-key encryption scheme (SKE) yields a CPA-secure PKE scheme. And any CPA-secure PKE can be transformed into a CCA-secure one via the FO-transformation [FO13, FO99, Pei14, TU15] in the quantum random oracle model. If we view 2−60 to be negligible, then OKCN-LWE and AKCN-LWE (on the same parameters of Frodo), AKCN-4:1-RLWE (on the same parameters of NewHope), and OKCN-SEC and AKCN-SEC can be used to build CPA-secure PKE schemes. Moreover, AKCN-LWE, AKCN-4:1-RLWE, and AKCN-SEC can be used directly for CPA-secure PKE scheme (without composing SKE). One particularly important application of public-key cryptography is key transport (i.e., public-key encryption of a random symmetric key), which is in particular demanded by the Tor project [Nic] and NIST [NIS]. We note that our AKC-based KE protocols can just be used for key transport. Any secure KE protocol can be transformed, in a black-box way, into an authenticated key exchange (AKE) protocol by additionally using a secure signature scheme via the SIGMA paradigm [Kra03]. SIGMA is just the basis of authentication mechanism for the secure transport protocol TLS in the client/server setting. Recently, the next generation of TLS, specifically TLS1.3, is now under development [Res]; And developing post-quantum secure TLS protocol is now receiving more and more efforts or attention both from research community and from standardization agencies. Compared to the currently deployed TLS1.2 standard, one salient change (among others) made in TLS1.3 is that the server now plays the role of the responder. The heavy workload in the server, particularly at peak time, is one of the major sources that causes slower server responsiveness or causes the server an easy target of more and more vicious DDoS attacks. We suggest that the predicament faced by the server can be mitigated with AKC-based KE protocols like AKCN-LWE, AKCN-4:1-RLWE, and AKCN-SEC, by taking advantage of the session-key predetermination and online/offline parallel computability enjoyed by them. The integration of the developed protocols into TLS is left to future works. Finally, as a fundamental building tool for lattice-based cryptography, we suggest OKCN, AKCN, and the various KE protocols based on them, are of independent value. They may possibly find more applications in more advanced cryptographic primitives (e.g., oblivious transfer, IBE, ABE, FHE) from LWR, LWE and RLWE, by simplifying their design and analysis with versatile performance optimization or balance. 11 ZarZar: RLWE-Based Key Exchange from KC and AKC Previously, [ADPS16] proposes practical RLWE key exchange NewHope, whose reconciliation mechanism uses lattice D2 . [ADPS16b] proposes a variant NewHope-Simple, which simplifies the reconciliation mechanism of NewHope. However, the slowest part of NewHope and NewHopesimple is the 1024-dimension Number Theoretic Transform (NTT). Hence, the simplification of the reconciliation mechanism does not bring much improvement of the overall efficiency. [ADPS16] also provides JarJar, which is a key exchange based on 512-dimension RLWE, and its reconciliation mechanism is based on D2 . However, JarJar can only provide 118-bit security on best known quantum attack from [ADPS16]. In this section, we propose a lightweight RLWE key exchange named ZarZar. ZarZar uses lattice E8 , which is in higher dimension and thus denser than D2 . This allows us to choose smaller dimension of RLWE with larger noise. NTT of 512-dimension in ZarZar costs nearly half of that 45 of NewHope. Although the dimension of E8 is higher than D2 , based on the structure of E8 , we propose fast encoding and decoding algorithms. To improve the efficiency of sampling noise of large variance, we propose a fast sample method. In our parameter set, n = 512. We divide the 512 coefficients of the polynomial σ 1 and σ 2 into 64 groups, where each group is composed by 8 coefficients. In specific, denote R = Z[x]/(x8 + 1), Rq = R/qR, K = Q[x]/(x8 + 1) and KR = K ⊗ R ' R[x]/(x8 + 1). Then the polynomial σ 1 can be represented as σ 1 (x) = σ0 (x64 ) + σ1 (x64 )x + · · · + σ63 (x64 )x63 , where σi (x) ∈ Rq for i = 0, 1, . . . 63. σ 2 can be divided in the same way. Then we only need to construct the reconciliation mechanism for each σi (x), and finally combine the keys together. To do this, we first need to introduce the lattice E8 and its encoding and decoding. 11.1 E8 and its Encoding and Decoding We construct lattice E8 from the Extended Hamming Code in dimension 8, H8 . H8 refers to the 4-dimension linear subspace of 8-dimension linear space Z82 . H8 = {c ∈ Z82 | c = zH mod 2, z ∈ Z4 } where  1 0 H= 0 0 1 0 0 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0  0 0  1 1 The encoding algorithm is straightforward: given a 4-bit string k1 , calculate k1 H. This operation can be done efficiently by bitwise operations. We combine this encoding with AKCN. The complete algorithm is shown in Algorithm 15. Algorithm 15 Con with encoding in E8 1: procedure Con(σ 1 ∈ Z8q , k1 ∈ Z42 , params) j  m 2: v = gq σ 1 + q−1 (k H mod 2) mod g 1 2 3: return v 4: end procedure The decoding algorithm finds the solution of the closest vector problem (CVP) for the lattice E8 . For any given x ∈ R8 , CVP asks which lattice point in E8 is closest to x. Based on the structure of E8 , we propose an efficient decoding algorithm. Let C = {(x1 , x1 , x2 , x2 , x3 , x3 , x4 , x4 ) ∈ Z82 | x1 + x2 + x3 + x4 = 0 mod 2}. In fact, C is spanned by the up most three rows of H. Hence, E8 = C ∪ (C + c), where c = (0, 1, 0, 1, 0, 1, 0, 1) is the last row of H. For a given x ∈ R8 , to solve CVP of x in E8 , we solve CVP of x and x − c in C, and then choose the one that has smaller distance. Algorithm 16 Rec with decoding in E8 1: procedure Rec(σ 2 ∈ Z8q , v ∈ Z8g , params) j m  2: k2 = DecodeE8 gq v − σ 2 3: return k2 4: end procedure 46 Algorithm 17 Decoding in E8 and C 1: procedure DecodeE8 (x ∈ Z8q ) 2: for i = 0 . . . 7 do 3: costi,0 = |xi |2q 2 4: costi,1 = |xi + q−1 2 |q 5: end for 6: (k00 , TotalCost00 ) ← Decode00 C (costi∈0...7,b∈{0,1} ) 01 01 01 7: (k , TotalCost ) ← DecodeC (costi∈0...7,b∈{0,1} ) 8: if TotalCost00 < TotalCost01 then 9: b=0 10: else 11: b=1 12: end if 13: (k0 , k1 , k2 , k3 ) ← k0b 14: k2 = (k0 , k1 ⊕ k0 , k3 , b) 15: return k2 16: end procedure b b 17: procedure DecodeC0 1 (costi∈0...7,b∈{0,1} ∈ Z8×2 ) 18: mind = +∞ 19: mini = 0 20: TotalCost = 0 21: for j = 0 . . . 3 do 22: c0 ← cost2j,b0 + cost2j+1,b1 23: c1 ← cost2j,1−b0 + cost2j+1,1−b1 24: if c0 < c1 then 25: ki ← 0 26: else 27: ki ← 1 28: end if 29: TotalCost ← TotalCost + cki 30: if c1−ki − cki < mind then 31: mind ← c1−ki − cki 32: mini ← i 33: end if 34: end for 35: if k0 + k1 + k2 + k3 mod 2 = 1 then 36: kmini ← 1 − kmini 37: TotalCost ← TotalCost + mind 38: end if 39: k = (k0 , k1 , k2 , k3 ) 40: return (k, TotalCost) 41: end procedure 47 Then we consider how to solve CVP in C. For an x ∈ R8 , we choose (x1 , x2 , x3 , x4 ) ∈ Z42 , such that (x1 , x1 , x2 , x2 , x3 , x3 , x4 , x4 ) is closest to x. However, x1 + x2 + x3 + x4 mod 2 may equal to 1. In such cases, we choose the 4-bit string (x01 , x02 , x03 , x04 ) such that (x01 , x01 , x02 , x02 , x03 , x03 , x04 , x04 ) is secondly closest to x. Note that (x01 , x02 , x03 , x04 ) has at most one-bit difference from (x1 , x2 , x3 , x4 ). The detailed algorithm is depicted in Algorithm 17. Considering potential timing attack, all the “if” conditional statements can be implemented by constant time bitwise operations. In practice, 01 Decode00 C and DecodeC are implemented as two subroutines. For algorithm 17, in DecodeE8 , we calculate costi,b , where i = 0, 1, . . . , 7, b ∈ {0, 1}, which refer to the contribution to the total 2-norm when xi = b. Decode00 C solves the CVP in lattice C, and Decode01 solves the CVP in lattice C + c. Then we choose the one that has smaller distance. C q−1 b0 b1 DecodeC calculates the ki , i = 0, 1, 2, 3 such that 2 (k0 ⊕ b0 , k0 ⊕ b1 , k1 ⊕ b0 , k1 ⊕ b1 , k2 ⊕ b0 , k2 ⊕ b1 , k3 ⊕ b0 , k3 ⊕ b1 ) is closest to x. We use mind and mini to find the second closest vector. Finally, we check the parity to decide which one should be returned. The following theorem gives a condition of success of the encoding and decoding algorithm in Algorithm 15 and Algorithm 16. For simplicity, for any σ = (x0 , x1 , . . . , x7 ) ∈ Z8q , we define P kσk2q,2 = 7i=0 |xi |2q .  √  Theorem 11.1. If kσ 1 − σ 2 kq,2 ≤ (q − 1)/2 − 2 gq + 1 , then k1 and k2 calculated by Con and Rec are equal. Proof. The minimal Hamming distance of r the Extended Hamming code H8 is 4. Hence, the  2 q−1 × 4 = (q − 1)/2. minimal distance in the lattice we used is 21 2 We can find , 1 ∈ [−1/2, 1/2]8 , θ ∈ Z8 such that       q q g q−1 q v − σ2 = v +  − σ2 = σ1 + k1 H +  + θg + 1 − σ 2 g g g q 2 q−1 q = (σ 1 − σ 2 ) + k1 H +  + 1 + θq 2 g √ Hence, the bias from q−1 k1 H is no larger than kσ 1 − σ 2 kq,2 + gq kk + 2 ≤ kσ 1 − σ 2 kq,2 + 2  √ q 2 g + 1 . If this value is less than the minimal distance (q − 1)/2, the decoding will be correct, which implies k1 = k2 . 11.2 Parameters and Implementation We shall explain why our key exchange based on E8 outperforms JarJar, which uses D2 in [ADPS16]. E8 is densitest in 8-dimension, and it is denser than D2 . Specifically, when E√8 is embeded into Z8q , the minimal distance of 2q E8 is 2q , while the minimal distance of qD2 is 42 q. Both E8 and D2 can extract 256-bit key from polynomial whose degree is 512. As we shall see in Figure 9, the logarithm of probability is almost propotional to the square of the distance between σ 1 and σ 2 . Hence, the smaller minimal distance allows us to choose Gaussian of larger deviation in secrets and noises, which garantees at least 128-bit post-quantum safty of the protocol. Encoding and decoding in E8 may be more slower than D2 , but we half the time of numerical theoretic transform (NTT) compared to NewHope by setting n = 512. Note that the efficiency of NTT dominates the overall efficiency. Hence, the trade off is worthwhile. 48 11.2.1 Parameters We choose the parameter (q = 12289, n = 512, σ 2 = 22). See Table 16 for the security estimation. The attack time estimation of NewHope seems much larger than our ZarZar. However, as NewHope only reach 256-bit shared key. The post-quantum attacker may attack its symmetric encryption in 128-bit time. In addition, the security level is estimated in a very conservative way. The number 129 in column Q does not mean best known attack can achieve 2129 time. Primal Dual m 646 663 b 491 489 C 143 143 Q 130 129 P 101 101 Table 16: Security estimation for ZarZar. 11.2.2 Noise distribution NewHope uses the centered binary distribution Ψ16 as the secrete and noise distribution. However, √ the deviation in our parameter set (σ = 22) is much larger than NewHope, this method requires too many random bits. Note that the generation of random bits costs a lot of time. Frodo uses a table to generate a discrete distribution that is very close to the rounded Gaussian. However, in our parameter set, the table will be too large to sample efficiently. Hence, we propose the distribution B a,b , where a and b are two integers. Algorithm 18 Sample r from B a,b Pb Pa 1: r ← i=1 getOneRandomBit() − i=1 getOneRandomBit() + 2 ∗ a 2  +b The variation of r in Algorithm 18 is a4 + b, and the expect value of r is 0. By the central limit theorem, the distribution of r is close to a discrete Gaussian. In our implementation, we choose a = 24, b = 16, and the summation of the random bits are calculated by fast bit counting. ZarZar NewHope n 512 1024 a 30 9 P B 24,16 Ψ16 σ2 22 8 Ra (P ||Q) 1.0016 1.00063 Ra (P ||Q)5n 65.71 26 Table 17: Comparison of Renyi divergence. Q refers to the rounded Gaussian of variance σ 2 . The closeness of B 24,16 and the rounded Gaussian of variance 22 is measured in Table 17. Recall that the Renyi divergence increase as a increase. Hence, B 24,16 and rounded Gaussian of variance 22 are more close compared to Ψ16 and rounded Gaussian of variance 8. We use a larger a than NewHope so that the potential security decline can be smaller, although no attacks known make use of the information of different noise distributions. 49 11.2.3 Benchmark NTT NTT−1 sample noise con/HelpRec rec Alice0 bandwidth (B) Bob0 bandwidth (B) Alice1 median average median average median average median average median average median average median average median average ZarZar 26864 27449 28368 28447 20876 20909 5760 5786 10920 10990 133646 135550 928 196478 197840 1280 48248 48332 NewHope 56056 56255 59356 59413 33100 33112 15180 15165 10516 10515 249476 250264 1824 386248 387104 2048 84880 84940 Table 18: Benchmark of ZarZar and NewHope. Numbers in the table are median and average of cpu cycles. We run benchmark of ZarZar and NewHope on Ubuntu Linux 16.04, GCC 5.4.0, Intel Core i7-4712MQ 2.30GHz, with hyperthreading and TurboBoost disabled. The benchmark result (Table 18) shows that ZarZar essentially outperforms NewHope. 11.3 Error Rate Analysis In this section, we propose a delicate analysis of the error probability. From the depiction of the protocol, we know that σ 1 − σ 2 = y2 x1 − (y1 x2 + eσ ) = e2 x1 − e1 x2 − eσ . Claim 11.1. If e is a real random variable subjected to Gaussian of variance σ 2 , then Pr[|e | > 10σ] < 2−70 . We can bound the last term eσ by the Claim 11.1. For other terms, we divide the 512 coefficients of the polynomial σ 1 and σ 2 into 64 groups by the same way in Section 11. From Theorem 11.1, we only need to calculate the distribution of k(e2 x1 − e1 x2 )k kq,2 for every k. We shall make use of the symmetry of multidimensional continual Gaussian to derive a simple form of the distribution of k(e2 x1 − e1 x2 )k k2q,2 , and then calculate the distribution numerically by computer programs. One may assume n is large enough to use the central limit theorem. The comparison of our numerical method result and the error probability obatined by central limit theorem is shown in Figure 9. 50 Figure 9: Comparison of the probability estimated by our method and the error probability obtained by central limit theorem. Theorem 11.2. For two polynomials f (x), g(x) ∈ Zq [x]/(x512 + 1), we can represent f (x) as f (x) = f0 (x64 ) + f1 (x64 )x + · · · + f63 (x64 )x63 , where fi (x)(i = 0, 1, . . . , 63) are in R. g(x) can be represented in the same way as g(x) = g0 (x64 )+g1 (x64 )x+· · ·+g63 (x64 )x63 . Let h(x) = f (x)g(x), and h(x) is represented as h(x) = h0 (x64 ) + h1 (x64 )x + · · · + h63 (x64 )x63 . Then we have X X hk (x) = fi (x)gj (x) + fi (x)gj (x)x (10) i+j=k i+j=k+64 P Proof. We have f (x)g(x) = i,j fi (x64 )gj (x64 )xi+j . For each (i, j) such that i + j < 64, the term fi (x64 )gj (x64 ) is added into hi+j (x64 ). For each (i, j) such that i + j ≥ 64, we have i + j − 64 < 64, 64 64 64 )x64 is added and fi (x64 )gj (x64 )xi+j = fi (x64 )gj (x64 )xi+j−64 the term P x . Hence, P fi (x )gj (x 64 64 64 64 64 into hi+j−64 (x ). Now we derive hk (x ) = i+j=k fi (x )gj (x )+ i+j=k+64 fi (x )gj (x64 )x64 . By applying Theorem 11.2 to the polynomial e2 x1 − x2 e1 , we know that for every fixed k, there are ai (x), bi (x) ∈ R, i = P1, 2, . . . , 128 whose coefficients are subjected to rounded Gaussian, such that (e2 x1 − x2 e1 )k = 128 i=1 ai (x)bi (x). Theorem 11.3. If ai (x), bi (x), i = 1, 2, . . . , 128 are polynomials in KR whose coefficients are drawn from continues Gaussian of variance σ 2 independently, then the following two distributions are identical. 51 • 2 P128 in i=1 ai (x)bi (x) , where the 2-norm 2 R8 , and take the 2-norm in R8 . here refers to treat the polynomials in KR as a vector P • 4σ 4 4i=1 xi yi , where xi are drawn from chi-square distribution χ2 (256) independently, and yi are drawn from χ2 (2) independently. To prove this theorem, we introduce the canonical embedding, which is a commonly used tool in ideal lattice analysis. The canonical embedding σ is a map from KR to C8 , defined as i ), and ω 16 σ(f ) = (σi (f ))i∈Z∗16 , where σi (f ) = f (ω16 16 ∈ C is the root of equation x − 1 = 0. Note that σ(f ) is essentially the Fourier transformation of the coefficients of the polynomial f . Let denote the component-wise multiplication over C8 . Then σ is a ring homomorphism. In addition, one half of σi is the complex conjugation of the other half, i.e. σi (f ) = σ16−i (f ). If we constrain σ on the first half, i.e. (σi )i∈Z∗16 ,i≤8 ∈ C4 , and regard C4 as a real space R8 , then σ is a scaled rotation. Proof of Theorem 11.3. From the scaling property and the homomorphism property of σ, we have 128 X i=1 2 ai (x)bi (x) 128 X 1 σ = ai (x)bi (x) 8 ! i=1 1 = 4 X 128 X σj (ai ) 2 128 1 X = σ(ai ) 8 2 σ(bi ) (11) i=1 2 σj (bi ) (12) j∈Z∗16 ,i≤8 i=1 The last equality comes from the complex conjugation property of σj . As σ is a rotation, it transforms a Gaussian to a Gaussian. Hence, σj (ai ), j ∈ Z∗16 are subjected to Gaussian of deviation 2σ, and are indepedent. P128 σj (bi ) is subjected to a 2-dimensional Then, conditioned on bP i , i = 1...128, i=1 σj (ai ) 2 . This deviation is subjected to (2σ)4 χ2 (256). Note that |σ (b )| Gaussian of variance (2σ)2 128 i=1 j i the Gaussian of variance (2σ)4 χ2 (256) can be generated by multiplying the standard deviation 2 P128 to the standard Gaussian. Hence, σj (bi ) is subjected to (2σ)4 xj yj , where xj i=1 σj (ai ) are subjected to χ2 (256) independently, and yj are the squared norm of the Gaussian, which are subjected to χ2 (2). P By Theorem 11.3, we only need to numerically calculate the distribution of 4i=1 xi yi , where xi ’s are subjected to χ2 (256) and yi ’s are taken from χ2 (2) independently. We design a numerical algorithm to calculate the distribution. In detail, we use discretization to transform the χ2 -distribution into discrete distribution. Then we represent the discrete distributions as dictionaries, which are denote as distr1 , distr2 and distr in the following. • discretization(m, s) outputs a dictionary that represent the distribution of sbχ2 (m)/se. • multiply(distr1 , distr2 ) outputs a dictionary that represent the distribution of x · y, where x is subjected to distribution distr1 and y is subjected to distribution distr2 . • add(distr1 , distr2 ) outputs a dictionary that represent the distribution of x + y, where x is subjected to distribution distr1 and y is subjected to distribution distr2 . 52 • merge(distr, s) outputs a dictionary that represent the distribution of sbx/se, where x is subjected to the discrete distribution distr. This subroutine is used to reduce the number of entries in the dictionary distr, and thus speeds up the calculation. This four subroutines are straightforwardly implemented. discretization need to uses the cumulative function of the distribution of χ2 . This function can be numerically calculated preciously and is provided by many open libraries. Algorithm 19 Calculate the distribution of 1: distrχ2 (256) ← discretization(256, 0.1) 2: distrχ2 (2) ← discretization(2, 0.02) 3: distr ← multiply(distrχ2 (2) , distrχ2 (256) ) 4: distr ← merge(distr, 4) 5: distr ← add(distr, distr) 6: distr ← add(distr, distr) P4 i=1 xi yi Theorem 11.4. P4Let distr be the distribution outputed by Algorithm 19. For every positive real number T , Pr[ i=1 xi yi > T ] < Pr[distr > T − 64]. Proof. We analyze the errors of each of the four operations. multiply and add have no truncation errors. For discretization and merge, we have |x − sbx/se| = s|x/s − bx/se| < s/2. Let edxi , edyi be the errors produced by discretization, and em k be the errors produced by merge. Then we have 3 X ((xi + i=0 edxi )(yi + edyi ) + em k ) − 3 X i=0 x i yi ≤ 3 X i=0 |edxi |yi + |edyi |xi + |edxi edyi | + |em k | In our Algorithm 19, we have |edyi | < 0.01 and |edxi | < 0.1. In addition, Pr[xi > 600] < 2−180 and Pr[yi > 150] < 2−190 . So we can simply assume xi < 600 and yi < 150. Hence, the right hand side is less than 4 · (600 · 0.01 + 150 · 0.05 + 0.01 · 0.05 + 2) < 64. Claim 11.2. For n = 512, σ 2 = 22, g = 26 , the over all error probability of the scheme is less than 2−58 . Proof. From Claim 11.1 and √ Theorem 11.1, we need to calculate the probability of k(e2 x1 − e1 x2 )k kq,2 > (q P− 1)/2 − 2(q/g − 1) − 10σ > 5824. From Theorem 11.3, this equals to the probability of 3i=0 xi yi > 58242 /(4 · 222 ) = 17520. From Theorem 11.4, this probability is less than Pr[distr > 17520 − 64 = 17456]. The computer program numerically calculates Pr[distr > 17456] < 2−64.6 . We use the union bound to derive the over all error probability is less than 64 · 2−64.6 < 2−58 . References [ACPS09] Benny Applebaum, David Cash, Chris Peikert, and Amit Sahai. Fast Cryptographic Primitives and Circular-Secure Encryption Based on Hard Learning Problems. CRYPTO 2009: 595-618. 53 [ADPS16] Erdem Alkim, Léo Ducas, Thomas Pöppelmann, and Peter Schwabe. Post-quantum Key Exchange — A New Hope. 25th USENIX Security Symposium (USENIX Security 16), pages 327–343. [ADPS16b] Erdem Alkim, Léo Ducas, Thomas Pppelmann, and Peter Schwabe. NewHope without Reconciliation. Cryptology ePrint Archive, Report 2016/1157, 2016. http: //eprint.iacr.org/2016/1157 [AG11] Sanjeev Arora and Rong Ge. New Algorithms for Learning in Presence of Errors. ICALP 2011: 403-415. [AJS16] Erdem Alkim, Philipp Jakubeit, and Peter Schwabe. A New Hope on ARM CortexM. Cryptology ePrint Archive, Report 2016/758, 2016. http://eprint.iacr.org/ 2016/758. [APS15] Martin R. Albrecht, Rachel Player and Sam Scott. On the Concrete Hardness of Learning with Errors. Journal of Mathematical Cryptology, Volume 9, Issue 3, pages 169-203, 2015. [BGM+ 16] Andrej Bogdanov, Siyao Guo, Daniel Masny, Silas Richelson, and Alon Rosen. On the Hardness of Learning with Rounding over Small Modulus. TCC 2016: 209-224. [BCD+ 16] Joppe Bos, Craig Costello, Lo Ducas, Ilya Mironov, Michael Naehrig, Valeria Nikolaenko, Ananth Raghunathan, and Douglas Stebila. Frodo: Take off the Ring! Practical, Quantum-Secure Key Exchange from LWE. ACM CCS 2016: 1006-1018. [BCNS15] Joppe W. Bos, Craig Costello, Michael Naehrig, and Douglas Stebila. Post-Quantum Key Exchange for the TLS Protocol from the Ring Learning with Errors Problem. IEEE Symposium on Security and Privacy 2015, pages 553-570. [BLL+ 15] Shi Bai, Adeline Langlois, Tancrède Lepoint, Damien Stehlé, and Ron Steinfeld. Improved Security Proofs in Lattice-Based Cryptography: Using the Rényi Divergence rather than the Statistical Distance. ASIACRYPT 2015: 3-24. [BPR12] Abhishek Banerjee and Chris Peikert and Alon Rosen. Pseudorandom Functions and Lattices. EUROCRYPT 2012: 719-737. [CESG] CESG. Quantum key distribution: A CESG white paper, 2016. https://www.cesg. gov.uk/white-papers/quantum-key-distribution. [CN11] Yuanmi Chen and Phong Q. Nguyen. BKZ 2.0: Better Lattice Security Estimates. ASIACRYPT 2011: 1-20. [CKLS16] J.H. Cheon, D. Kim, Joohee Lee, and Y. Song. Lizard: Cut Off the Tail! Practical Post-Quantum Public-Key Encryption from LWE and LWR. Cryptology ePrint Archive, Report 2016/1126, 2016. http://eprint.iacr.org/2016/1126. [CW90] Don Coppersmith and Shmuel Winograd. Matrix Multiplication via Arithmetic Progressions. Journal of Symbolic Computation, volume 9, issue 3, pages 251-280, 1990. [DD12] Léo Ducas and Alain Durmus. Ring-LWE in Polynomial Rings. PKC 2012: 34-51. 54 [DTV15] Alexandre Duc, Florian Tramèr, and Serge Vaudenay. Better Algorithms for LWE and LWR. EUROCRYPT 2015: 173-202. [DORS08] Yevgeniy Dodis, Rafail Ostrovsky, Leonid Reyzin, and Adam Smith Fuzzy Extractors: How to Generate Strong Keys from Biometrics and Other Noisy Data. SIAM Journal on Computing, volume 38, issue 1, pages 97-139, 2008. [FO99] Eiichiro Fujisaki and Tatsuaki Okamoto. How to Enhance the Security of Public-Key Encryption at Minimum Cost. IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences Volume 83, Issue 1, pages 24-32, 1999. [FO13] Eiichiro Fujisaki and Tatsuaki Okamoto. Secure Integration of Asymmetric and Symmetric Encryption Schemes. Journal of Cryptology, Volume 26, Issue 1, pages 80-101, 2013. [GPV08] Craig Gentry, Chris Peikert, and Vinod Vaikuntanathan. Trapdoors for Hard Lattices and New Cryptographic Constructions. ACM STOC 2008: 197-206. [GS16] Shay Gueron and Fabian Schlieker. Speeding Up R-LWE Post-Quantum Key Exchange. Cryptology ePrint Archive, Report 2016/467, 2016. http://eprint.iacr. org/2016/467. [JD12] Xiaodong Lin Jintai Ding, Xiang Xie. A Simple Provably Secure Key Exchange Scheme Based on the Learning with Errors Problem. Cryptology ePrint Archive, Report 2012/688, 2012. http://eprint.iacr.org/2012/688. [KLL15] M. Kaplan, G. Leurent, A. Leverrier and M. Naya-Plasencia. Quantum Differential and Linear Cryptanalysis. ArXiv Preprint: 1510.05836, 2015. http://arxiv.org/ abs/1510.05836. [KF15] Paul Kirchner and Pierre-Alain Fouque. An Improved BKW Algorithm for LWE with Applications to Cryptography and Lattices. CRYPTO 2015: 43-62. [Kra03] Hugo Krawczyk. SIGMA: The ‘SIGn-and-MAc’ Approach to Authenticated DiffieHellman and Its Use in the IKE Protocols CRYPTO 2003: 400-425. [KM10] H. Kuwakado and M. Morii. Quantum Distinguisher between the 3-round Feistel Cipher and the Random Permutation. IEEE ISIT 2010: 2682-2685. [LP10] Richard Lindner and Chris Peikert. Better Key Sizes (and Attacks) for LWE-Based Encryption. CT-RSA 2011: 319-339. Also available from http://eprint.iacr.org/ 2010/613. [LPR13a] Vadim Lyubashevsky, Chris Peikert, and Oded Regev. On Ideal Lattices and Learning with Errors over Rings. EUROCRYPT 2010: 1-23. [LPR13b] Vadim Lyubashevsky, Chris Peikert, and Oded Regev. A Toolkit for Ring-LWE Cryptography. EUROCRYPT 2013: 35-54. [Mat] Braithwaite Matt. Experimenting with Post-Quantum Cryptography. Posting on the Google Security Blog, 2016. https://security.googleblog.com/2016/07/ experimenting-with-post-quantum.html. 55 [MP13] Daniele Micciancio and Chris Peikert. Hardness of SIS and LWE with Small Parameters. CRYPTO 2013: 21-39. [Nic] Mathewson Nick. Cryptographic Directions in Tor. Slides of a talk at Real-World Crypto 2016, 2016. https://people.torproject.org/~nickm/slides/ nickm-rwc-presentation.pdf. [NIS] NIST. Post-Quantum Crypto Project. 2016. http://csrc.nist.gov/groups/ST/ post-quantum-crypto/index.html. [NSA] NSA. NSA Suite B Cryptography. https://www.nsa.gov/ia/programs/suiteb_ cryptography. [Pei14] Chris Peikert. Lattice Cryptography for the Internet. PQCrypto 2014: 197-219. [Pei16] Chris Peikert. A Decade of Lattice Cryptography. In Foundations and Trends in Theoretical Computer Science, Volume 10, Issue 4, pages 283-424, 2016. [PVW08] Chris Peikert, Vinod Vaikuntanathan, and Brent Waters. A Framework for Efficient and Composable Oblivious Transfer. CRYPTO 2008: 554-571. [PG13] Thomas Pöppelmann and Tim Güneysu. Towards Practical Lattice-Based Public-Key Encryption on Reconfigurable Hardware. SAC 2013: 68-85. [Pop16] Alex van Poppelen, Cryptographic Decoding of the Leech Lattice. Cryptology ePrint Archive, Report 2016/1050, 2016. http://eprint.iacr.org/2016/1050. [Reg09] Oded Regev. On Lattices, Learning with Errors, Random Linear Codes, and Cryptography. Journal of the ACM (JACM), Volume 56, Issue 6, pages 34, 2009. [Res] Eric Rescorla. The Transport Layer Security (TLS) Protocol Version 1.3. [SE94] C. P. Schnorr and M. Euchner. Lattice Basis Reduction: Improved Practical Algorithms and Solving Subset Sum Problems. Mathematical Programming, Volume 66, Issue 2, pages 181-199, Springer, 1994. [Sim02] Marvin K. Simon. Probability Distributions Involving Gaussian Random Variables : A Handbook for Engineers and Scientists. Springer, 2012. [Str69] Volker Strassen. Gaussian Elimination is not Optimal. Numerische Mathematik, Volume 13, Issue 4, pages 354-356, Springer, 1969. [SM16] Douglas Stebila and Michele Mosca. Post-Quantum Key Exchange for the Internet and the Open Quantum Safe Project. Cryptology ePrint Archive, Report 2016/1017, 2016. http://eprint.iacr.org/2016/1017. [TU15] E. E. Targhi and D. Unruh. Quantum Security of the Fujisaki-Okamoto and OAEP Transforms. Cryptology ePrint Archive, Report 2015/1210, 2015. http://eprint. iacr.org/2015/1210. 56 A Consensus Mechanism of Frodo Let the modulo q be power of 2, which can be generalized to arbitrary modulo using the techniques in [Pei14]. Let integer B be a power of 2. B < (log q) − 1, B̄ = (log q) − B (note that m = 2B in our notations). The underlying KC mechanism implicitly in Frodo is presented in Figure 20. Algorithm 20 Key consensus scheme in Frodo 1: procedure j Con(σ k 1 , params) − B̄+1 2: v= 2 σ1 mod 2 j m 3: k1 = 2−B̄ σ1 mod 2B 4: return (k1 , v) 5: end procedure 6: procedure Rec(σ2 , v, params) j k 7: find x ∈ Zq closest to σ2 s.t. 2−B̄+1 x mod 2 = v j m 8: k2 = 2−B̄ x mod 2B 9: return k2 10: end procedure . σ1 ∈ [0, q) . σ2 ∈ [0, q) Claim A.1 ( [BCD+ 16], Claim 3.2). If |σ1 − σ2 |q < 2B̄−2 , then Rec(σ2 , v) = k1 . i.e. the scheme in Algorithm 20 is correct. This claim is equivalence to require 4md < q. B Consensus Mechanism of NewHope Note that, for the consensus mechanism of NewHope, the rec procedure is run both in Con and in Rec, and a random bit b is used in Con corresponding to the dbl trick in [Pei14]. 57 Algorithm 21 NewHope Consensus Mechanism 1: procedure Decode(x ∈ R4 /Z4 ) . Return a bit k such that kg is closest to x + Z4 2: v = x − bxe 3: return k = 0 if kvk1 ≤ 1, and 1 otherwise 4: end procedure 5:  r  2 6: HelpRec(x, b) = CVPD̃ (x + bg) mod 2r . b corresponds to the dbl trick [Pei14] q 4    7: rec x ∈ Z4q , v ∈ Z42r = Decode 1q x − 21r Bv 8: 9: 10: 11: 12: 13: 14: procedure Con(σ 1 ∈ Z4q , params) b ← {0, 1} v ← HelpRec(σ 1 , b) k1 ← rec(σ 1 , v) return (k1 , v) end procedure 15: procedure Rec(σ 2 ∈ Z4q , v ∈ Z42r , params) 17: k2 ← rec(σ 2 , v) 18: end procedure 16: 19: C Security Analysis of LWE-Based Key Exchange Definition C.1. A KC or AKC based key exchange protocol from LWE is secure, if for any sufficiently large security parameter λ and any PPT adversary A, Pr[b0 = b] − 12 is negligible, as defined w.r.t. game G0 specified in Algorithm 22. Algorithm 22 Game G0 1: A ← Zn×n q 2: X1 , E1 ← χn×lA 3: Y1 = AX1 + E1 4: X2 , E2 ← χn×lB 5: Y2 = AT X2 + E2 6: Eσ ← χlA ×lB 7: Σ2 = Y1T X2 + Eσ  8: K02 , V ← Con(Σ2 , params) lA ×lB 9: K12 ← Zm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , bY2 /2t c, Kb2 , V) Before starting to prove the security, we first recall some basic properties of the LWE assumption. The following lemma is derived by a direct hybrid argument [PVW08, BCD+ 16]. Lemma C.1 (LWE in the matrix form). For positive integer parameters (λ, n, q ≥ 2, l, t), where (l,t) n, q, l, t all are polynomial in λ, and a distribution χ over Zq , denote by Lχ the distribution over t×n t×l t×n n×l t×l Zq × Zq generated by taking A ← Zq , S ← χ , E ← χ and outputting (A, AS + E). 58 Then, under the standard LWE assumption on indistinguishability between Aq,s,χ (with s ← χn ) and U(Znq × Zq ), no PPT distinguisher D can distinguish, with non-negligible probability, between (l,t) the distribution Lχ and U(Zt×n × Zt×l q q ) for sufficiently large λ. Theorem C.1. If (params, Con, Rec) is a correct and secure KC or AKC scheme, the key exchange protocol described in Figure 4 is secure under the (matrix form of ) LWE assumption. Proof. The proof is similar to, but actually simpler than, that in [Pei14, BCD+ 16]. The general idea is that we construct a sequence of games: G0 , G1 and G2 , where G0 is the original game for defining security. In every move from game Gi to Gi+1 , 0 ≤ i ≤ 1, we change a little. All games Gi ’s share the same PPT adversary A, whose goal is to distinguish between the matrices chosen uniformly at random and the matrices generated in the actual key exchange protocol. Denote by Ti , 0 ≤ i ≤ 2, the event that b = b0 in Game Gi . Our goal is to prove that Pr[T0 ] < 1/2 + negl, where negl is a negligible function in λ. For ease of readability, we re-produce game G0 below. For presentation simplicity, in the subsequent analysis, we always assume the underlying KC or AKC is correct. The proof can be trivially extended to the case that correctness holds with overwhelming probability (i.e., failure occurs with negligible probability). Algorithm 23 Game G0 1: A ← Zn×n q 2: X1 , E1 ← χn×lA 3: Y1 = AX1 + E1 4: X2 , E2 ← χn×lB 5: Y2 = AT X2 + E2 6: Eσ ← χlA ×lB 7: Σ2 = Y1T X2 + Eσ  8: K02 , V ← Con(Σ2 , params) lA ×lB 9: K12 ← Zm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , bY2 /2t c, Kb2 , V) Algorithm 24 Game G1 1: A ← Zn×n q 2: X1 , E1 ← χn×lA A 3: Y1 ← Zn×l q 4: X2 , E2 ← χn×lB 5: Y2 = AT X2 + E2 6: Eσ ← χlA ×lB 7: Σ2 = Y1T X2 + Eσ  8: K02 , V ← Con(Σ2 , params) A ×lB 9: K12 ← Zlm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , bY2 /2t c, Kb2 , V) (l ,n) Lemma C.2. | Pr[T0 ]−Pr[T1 ]| < negl, under the indistinguishability between Lχ A A ). Zn×l q (l ,n) Proof. Construct a distinguisher D, in Algorithm 25, who tries to distinguish Lχ A A ). Zn×l q 59 and U(Zn×n × q from U(Zn×n × q Algorithm 25 Distinguisher D 1: procedure D(A, B) 2: Y1 = B 3: X2 , E2 ← χn×lB 4: Y2 = AT X2 + E2 5: Eσ ← χlA ×lB 6: Σ2 = Y1T X2 + Eσ 7: K02 , V ← Con(Σ2 , params) lA ×lB 8: K12 ← Zm 9: b ← {0, 1} 10: b0 ← A(A, Y1 , bY2 /2t c, Kb2 , V) 11: if b0 = b then 12: return 1 13: else 14: return 0 15: end if 16: end procedure (l ,n) If (A, B) is subject to Lχ A A . A ∈ Zn×n , B ∈ Zn×l q q h   i (l ,n) , then D perfectly simulates G0 . Hence, Pr D Lχ A =1 = Pr[T0 ]. On the other hand, if (A, B) is chosen uniformly at random from Zn×n ×Zqn×lA , which are q denoted as (AU , BU ), then D perfectly simulates G1 . So, Pr[D(AU , BU ) = 1] = Pr[T1 ]. Hence, (l ,n) |Pr[T0 ] − Pr[T1 ]| = Pr[D(Lχ A ) = 1] − Pr[D(AU , BU ) = 1] < negl. Algorithm 26 Game G1 1: A ← Zn×n q 2: X1 , E1 ← χn×lA A 3: Y1 ← Zn×l q 4: X2 , E2 ← χn×lB 5: Y2 = AT X2 + E2 6: Eσ ← χlA ×lB 7: Σ2 = Y1T X2 + Eσ  8: K02 , V ← Con(Σ2 , params) lA ×lB 9: K12 ← Zm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , bY2 /2t c, Kb2 , V) Algorithm 27 Game G2 1: A ← Zqn×n 2: X1 , E1 ← χn×lA A 3: Y1 ← Zn×l q 4: X2 , E2 ← χn×lB B 5: Y2 ← Zn×l q l ×l A B 6: Eσ ← χ l ×l 7: Σ2 ← ZqA B  8: K02 , V ← Con(Σ2 , params) lA ×lB 9: K12 ← Zm 10: b ← {0, 1} 11: b0 ← A(A, Y1 , bY2 /2t c, Kb2 , V) (l ,n+lA ) Lemma C.3. | Pr[T1 ] − Pr[T2 ]| < negl, under the indistinguishability between Lχ B (n+l )×n (n+l )×l U(Zq A × Zq A B ). and (l ,l ) Proof. As Y1 is subject to uniform distribution in G1 , (Y1T , Σ2 ) can be regarded as an Lχ B A sample of secret X2 and noise Eσ . Based on this observation, we construct the following distinguisher D0 . 60 Algorithm 28 Distinguisher D0 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: (n+lA )×n procedure D0 (A0 , B) where A0 ∈ Zq  T A Denote A0 = Y1T   Y2 Denote B = Σ2  K02 , V ← Con(Σ2 , params) lA ×lB K12 ← Zm b ← {0, 1} b0 ← A(A, Y1 , bY2 /2t c, Kb2 , V) if b0 = b then return 1 else return 0 end if end procedure (l ,n+l ) (n+lA )×lB , B ∈ Zq . A ∈ Zqn×n , Y1T ∈ ZlqA ×n . Y2 ∈ Zqn×lB , Σ2 ∈ ZlqA ×lB (n+l )×n A A and Y1 ← Zn×l If (A0 , B) is subject to Lχ B , A0 ← Zq A corresponds to A ← Zn×n q q in G1 ; and S ← χn×lB (resp., E ← χ(n+lA )×lB ) in generating (A0 , B) corresponds to X2 ← χn×lB (resp., E2 ← χn×lB and Eσ ← χlA ×lB ) in G1 . In this case, we have    T  E2 A X + B = A0 S + E = 2 Eσ Y1T  T    A X 2 + E2 Y2 = = T Y1 X2 + Eσ Σ2  i h  (l ,n+lA ) = 1 = Pr[T1 ]. Hence Pr D0 Lχ B (n+l )×n (n+l )×l On the other hand, if (A0 , B) is subject to uniform distribution U(Zq A × Zq A B ), then A, Y1 , Y2 , Σ2 all are also uniformly random; So, the view of D0 in this case is the same as that in game G2 . Hence, Pr [D0 (A0 , B) = 1] = Pr[T2 ] in this case. Then | Pr[T1 ] − Pr[T2 ]| = (l ,n+lA ) (n+l )×n (n+l )×l | Pr[D0 (Lχ B ) = 1] − Pr[D0 (U(Zq A × Zq A B )) = 1]| < negl. Lemma C.4. If the underlying KC or AKC is secure, Pr[T 2] = 12 .  Proof. Note that, in Game G2 , for any 1 ≤ i ≤ lA and 1 ≤ j ≤ lB , K02 [i, j], V[i, j] only depends on Σ2 [i, j], and Σ2 is subject to uniform distribution. By the security of KC, we have that, for each pair (i, j), K02 [i, j] and V[i, j] are independent, and K02 [i, j] is uniform distributed. Hence, K02 and V are independent, and K02 is uniformly distributed, which implies that Pr[T2 ] = 1/2. This finishes the proof of Theorem C.1. D D.1 Construction and Analysis of AKCN-4:1 Overview of NewHope By extending the technique of [PG13], in NewHope the coefficients of σ 1 (i.e., the polynomial of degree n) are divided into n/4 groups, where each group contains four coordinates. On the input 61 of four coordinates, only one bit (rather than four bits) consensus is reached, which reduces the error probability to about 2−61 which is viewed to be negligible in practice. Specifically, suppose Alice and Bob have σ 1 and σ 2 in Z4q respectively, and they are close to each other. One can regard the two vectors as elements in R4 /Z4 , by treating them as 1q σ 1 and 1q σ 2 . Consider the matrix B = (u0 , u1 , u2 , g) ∈ R4×4 , where ui , 0 ≤ i ≤ 2, is the canonical unit vector whose i-th coordinate is 1, and g = (1/2, 1/2, 1/2, 1/2)T . Denote by D̃4 the lattice generated by B. Note that Z4 ⊂ D̃4 ⊂ R4 . Denote by V the close Voronoi cell of the origin in D̃4 . In fact, V is the intersection of the unit ball in norm 1 and the unit ball in infinity norm (the reader is referred to NewHope [ADPS16, Appendix C] for details). The following procedure CVPD̃4 (x) returns the vector v such that Bv is closest to x, i.e., x ∈ Bv + V, where the distance is measured in the Euclidean norm. Algorithm 29 CVPD̃4 in NewHope [ADPS16] 1: 2: 3: 4: 5: 6: 7: procedure CVPD̃4 (x ∈ R4 ) v0 = bxe v1 = bx − ge k = 0 if kx − v0 k1 < 1 and 1 otherwise (v0 , v1 , v2 , v3 )T = vk return v = (v0 , v1 , v2 , k)T + v3 · (−1, −1, −1, 2)T end procedure If σ 1 is in the Voronoi cell of g, then the consensus bit is set to be 1, and 0 otherwise. Hence, Alice finds the closest lattice vector of σ 1 by running the CVPD̃4 procedure described in Algorithm 29, and calculates their difference which is set to be the hint signal v. Upon receiving v, Bob subtracts the difference from σ 2 . Since σ 1 and σ 2 are very close, the subtraction moves 1 q σ 2 towards a lattice point in D̃4 . Then Bob checks whether or not the point after the move is in the Voronoi cell of g, and so the consensus is reached. Furthermore, to save bandwidth, NewHope chooses an integer r, and discretizes the Voronoi cell of g to 24r blocks, so that only 4r bits are needed to transfer the hint information. To make the distribution of consensus bit uniform, NewHope adds a small noise to σ 1 , similar to the dbl trick used in [Pei14]. The Con and Rec procedures, distilled from NewHope, are presented in Algorithm 21 in Appendix B. D.2 Construction and Analysis of AKCN-4:1 For any integer q and vector x = (x0 , x1 , x2 , x3 )T ∈ Z4q , denote by kxkq,1 the sum |x0 |q + |x1 |q + |x2 |q +|x3 |q . For two vectors a = (a0 , a1 , a2 , a3 )T , b = (b0 , b1 , b2 , b3 )T ∈ Z4 , let a mod b denote the vector (a0 mod b0 , a1 mod b1 , a2 mod b2 , a3 mod b3 )T ∈ Z4 . The scheme of AKCN-4:1 is presented in Algorithm 30. Compared with the consensus mechanism of NewHope presented in Appendix B, AKCN-4:1 can be simpler and computationally more efficient. In specific, the uniformly random bit b used in NewHope (corresponding the dbl trick in [Pei14]) is eliminated with AKCN-4:1, which saves 256 (resp., 1024) random bits in total when reaching 256 (resp., 1024) consensus bits. In addition, as k1 , as well as k1 (q + 1)g, can be offline computed and used (e.g., for encryption, in parallel with the protocol run), AKCN-4:1 enjoys online/offline speeding-up and parallel computing.   Theorem D.1. If kσ 1 − σ 2 kq,1 < q 1 − g1 − 2, then the AKCN-4:1 scheme depicted in Algorithm 30 is correct. 62 Proof. Suppose v0 = CVPD̃4 (g(σ 1 + k1 (q + 1)g)/q). Then, v = v0 mod (g, g, g, 2g), and so there exits θ = (θ0 , θ1 , θ2 , θ3 ) ∈ Z4 such that v = v0 + g(θ0 , θ1 , θ2 , 2θ3 )T . From the formula calculating v0 , we know there exits  ∈ V, such that g(σ 1 + k1 (q + 1)g)/q =  + Bv0 . Hence, Bv0 = g(σ 1 + k1 (q + 1)g)/q − . From the formula computing x in Rec, we have x = Bv/g − σ 2 /q = Bv0 /g − σ 2 /q + B(θ0 , θ1 , θ2 , 2θ3 )T = k1 g + k1 g/q − /g + (σ 1 − σ 2 )/q + B(θ0 , θ1 , θ2 , 2θ3 )T . Note that the last term B(θ0 , θ1 , θ2 , 2θ3 )T ∈ Z4 , and in line 7 of Algorithm 30 we subtract bxe ∈ Z4 from x, so the difference between x − bxe and k1 g in norm 1 is no more than 2/q + 1/g + kσ 1 − σ 2 kq,1 /q < 1. Hence, k2 = k1 . Algorithm 30 AKCN-4:1 1: procedure Con(σ 1 ∈ Z4q , k1 ∈ {0, 1}, params) 2: v = CVPD̃4 (g(σ 1 + k1 (q + 1)g)/q) mod (g, g, g, 2g)T 3: return v 4: end procedure 5: procedure Rec(σ 2 ∈ Z4q , v ∈ Z3g × Z2g , params) 6: x = Bv/g − σ 2 /q 7: return k2 = 0 if kx − bxek1 < 1, 1 otherwise. 8: end procedure Theorem D.2. AKCN-4:1 depicted in Algorithm 30 is secure. Specifically, if σ 1 is subject to uniform distribution over Z4q , then v and k1 are independent. Proof. Let y = (σ 1 + k1 (q + 1)g) mod q ∈ Z4q . First we prove that y is independent of k1 , when σ 1 ← Z4q . Specifically, for arbitrary ỹ ∈ Z4q and arbitrary k̃1 ∈ {0, 1}, we want to prove that Pr[y = ỹ | k1 = k̃1 ] = Pr[σ 1 = (ỹ − k1 (q + 1)g) mod q | k1 = k̃1 ] = 1/q 4 . Hence, y and k1 are independent. For simplicity, denote by G the vector (g, g, g, 2g). Map φ : Z4 → Z3g × Z2g is defined by φ(w) = CVPD̃4 (gw/q) mod G. We shall prove that, for any θ ∈ Z4 , φ(w + qθ) = φ(w). By definition of φ, φ(w+qθ) = CVPD̃4 (gw/q+gθ) mod G. Taking x = gw/q+gθ into Algorithm 29, we have CVPD̃4 (gw/q + gθ) = CVPD̃4 (gw/q) + B−1 (gθ). It is easy to check that the last term B−1 (gθ) always satisfies B−1 (gθ) mod G = 0. From the above property of φ, we have φ(y) = φ((σ 1 + k1 (q + 1)g) mod q) = φ(σ 1 + k1 (q + 1)g) = v. As k1 is independent of y, and v only depends on y, k1 and v are independent. E Implementing HxT in SEC with Simple Bit Operations uint16_t getCode ( uint16_t x ) { uint16_t c , p ; c = ( x >> 4) ^ x ; c = ( c >> 2) ^ c ; p = (( c >> 1) ^ c ) & 1; x = ( x >> 8) ^ x ; c = ( x >> 2) ^ x ; 63 p x p x p = = = = = ((( c >> 1) ^ c ) & 1) | ( p << 1) ; ( x >> 4) ^ x ; ((( x >> 1) ^ x ) & 1) | ( p << 1) ; ( x >> 2) ^ x ; ( x & 1) | ( p << 1) ; return p ; } Listing 1: An implementation of HxT with C language F A Note on Lizard We note that the CPA-secure PKE scheme, Lizard, proposed in [CKLS16] is actually instantiated from our AKCN scheme presented in Algorithm 4, where the two close values are derived from generating and exchanging spLWE and spLWR samples in an asymmetric way. Specifically, the public key is generated with spLWE samples, while ciphertext is generated with spLWR samples. However, the underlying AKC mechanism in the spLWE/spLWR based PKE scheme analyzed in [CKLS16] is actually an instantiation of our AKCN scheme for the special case of m|g|q, where g (resp., m) in AKCN corresponds to p (resp., t) in [CKLS16]. Let Xn,ρ,θ denote the set containing all n dimension vectors that have exactly θ non-zero components, and each non-zero component is in {±1, ±2, . . . , ±ρ}. spLWE problem is the LWE problem whose secret vector is drawn uniformly randomly from the set Xn,ρ,θ . 64
7cs.IT
A semidefinite program for unbalanced multisection in the stochastic block model Amelia Perry∗1 and Alexander S. Wein†1 arXiv:1507.05605v2 [cs.DS] 2 Dec 2016 1 Massachusetts Institute of Technology, Department of Mathematics December 5, 2016 Abstract We propose a semidefinite programming (SDP) algorithm for community detection in the stochastic block model, a popular model for networks with latent community structure. We prove that our algorithm achieves exact recovery of the latent communities, up to the informationtheoretic limits determined by Abbe and Sandon [AS15a]. Our result extends prior SDP approaches by allowing for many communities of different sizes. By virtue of a semidefinite approach, our algorithms succeed against a semirandom variant of the stochastic block model, guaranteeing a form of robustness and generalization. We further explore how semirandom models can lend insight into both the strengths and limitations of SDPs in this setting. ∗ Email: [email protected]. Email: [email protected]. This research was conducted with Government support under and awarded by DoD, Air Force Office of Scientific Research, National Defense Science and Engineering Graduate (NDSEG) Fellowship, 32 CFR 168a. † 1 Introduction 1.1 Community detection The stochastic block model is among the most actively studied models for networks with latent community structure. Such models lend themselves to the statistical task of recovering the community structure given a single such graph, a task known as community detection. This task manifests itself as that of finding human communities in social networks, and that of determining sets of proteins that function together in protein–protein interaction networks; more generally, community detection is the analogue of clustering for network data. Since the introduction of the stochastic block model by Holland [HLL83], a wide range of algorithmic approaches have been deployed. Such algorithms are generally compared through the range of model parameters in which they succeed in recovering information; whether they achieve exact recovery of the underlying community structure, or only partial recovery of community structure correlated with the truth; and their computational efficiency. In recent years, the block model has received a surge of interest as a meeting point of machine learning, algorithms, and statistical mechanics. A series of conjectures by Decelle et al. [DKMZ11] predicted a sharp threshold, separating a range of model parameters in which partial recovery is possible from a range in which it is impossible, using non-rigorous techniques from statistical physics. Some of these threshold effects have been proven [MNS14, Mas14], along with analogues for exact recovery [ABH16, AS15a], and among the first algorithms to achieve exact recovery all the way up to these thresholds were those based on the powerful algorithmic tools of semidefinite programming (SDP). Indeed, the maximum likelihood estimation problems for block models amount to cut problems on graphs, which have a rich history of study through SDPs (for example [GW95, FJ94]); it is natural for these to appear among the most powerful tools for community detection. In recent work of Abbe and Sandon [AS15a], alternative methods of spectral clustering and local refinement have taken the lead in exact recovery, providing very general and sharp algorithmic results. It is natural to wonder how well SDP approaches can match these results, particularly in the light of strong robustness properties that convex programs enjoy. In this paper, we extend the frontier of optimal results on SDPs for exact recovery to the case of multiple communities of unequal sizes. We further address the relationship of SDPs to semirandom models, highlighting their robustness as an advantage over spectral techniques, but also exposing how this same robustness can pose fundamental limits to SDP approaches. 1.2 1.2.1 Models Stochastic block model The stochastic block model is a generative model for graphs, in which we suppose a vertex set of size n has been partitioned into r disjoint ‘communities’ S1 , . . . , Sr . An undirected graph is randomly generated from this hidden partition as follows: every unordered pair (u, v) of distinct vertices is independently connected by an edge with probability Qij where u, v belong to communities i, j respectively. Here Q is a symmetric r × r matrix. Given a graph sampled from this model, the goal is to recover the underlying partition. Many papers specialize to the planted partition model, the case where Qii = p for all i and Qij = q for all i 6= j. We will largely work with this specialization, and occasionally discuss the more general model. 1 1.2.2 Semirandom models Much work in community detection focuses on the Erdős–Rényi-style random models defined above. These models are mathematically convenient, owing to the independence of edges, yet most realworld networks do not take this form. Moreover, there is cause for concern that some algorithms developed for the models above are highly brittle and do not generalize to other graph models: as illustrated in [RJM16], one spectral method with strong theoretical guarantees degrades very rapidly when a sparse planted partition model is perturbed by adding small cliques, which are otherwise very infrequent in this random model, but do occur frequently in many real-world graphs. Extending beyond the random models above, Blum and Spencer [BS95] introduced the notion of semirandom models for graph problems, as an intermediate model between average-case and worst-case performance. The idea, extended by Feige and Kilian [FK01], is to generate a preliminary graph according to a random model, but then allow a monotone adversary to make unbounded, arbitrarily structured changes of a nature that should only help the algorithm by further revealing the ground truth. Although these changes may seem to make the problem easier, they may significantly alter the distribution of observations revealed to the algorithm, breaking statistical assumptions made about the observations. Semirandom models are thus a means of penalizing brittle algorithms that are over-tuned to particular random models. Semirandom models are no easier than their random counterparts, as the adversary may opt to make no changes. Following [FK01], we define the semirandom planted partition model as follows. A graph is first generated according to the planted partition model, and then a monotone adversary may arbitrarily add edges within communities, and remove edges between communities. The semirandom model can simulate aspects of real-world graphs and other graph models, such as a wide range of degree or subgraph profiles, while ensuring that the true community structure remains present in the graph. Thus the semirandom model aims to capture the unpredictable nature of real data. An algorithm is called robust to monotone adversaries if, whenever it succeeds on a sample from the random model, it also succeeds after arbitrary monotone changes to that sample. Algorithms based on semidefinite programming (SDP) are typically robust, or can be modified to be robust, and essentially all known robust algorithms are based on convex programs such as SDPs. This property guarantees some ability of such algorithms to generalize to other models; by contrast, algorithms that over-exploit precise statistics of a random model will typically fail against similar random models with different statistics, and will also typically fail against a semirandom model. 1.2.3 Regimes The stochastic block model admits two major regimes of study, along with other variants. The main distinction is between partial recovery, in which the goal is only to recover a partition that is reliably correlated with the true partition better than random guessing, versus exact recovery, in which the partition must be recovered perfectly. In partial recovery, one tends to take the withincommunity edge probability p and the between-community edge probability q to be Θ(1/n), whereas in exact recovery one takes them to be Θ(log n/n). In these asymptotic regimes one observes a sharp threshold behavior: within some range of parameters p and q, the problem is statistically impossible, and outside of that range one can find algorithms that succeed with high probability. For partial recovery, this is established in [MNS14, MNS13, Mas14], and for exact recovery, the most general result on this threshold is established in [AS15a]. This paper concerns the case of exact recovery. Thus we take probabilities p = p̃ log n/n, q = q̃ log n/n, and we suppose that the vertex set is partitioned into r communities S1 , . . . , Sr of sizes si = |Si |. We write πi = si /n, the proportion of vertices lying in community i. More precisely, 2 we only require si /n → πi as n → ∞; for instance, each vertex could be independently randomly assigned to a community, with community i chosen with probability πi . We hold r, p̃, q̃, and πi constant as n → ∞ – these are the parameters for the problem – and we aim to exactly recover the communities Si (up to permutation) with high probability, by which we mean probability 1 − o(1) as n → ∞, within as broad a range of parameters as possible. We specialize to the assortative planted partition model, where p > q; some techniques may transfer to the dissortative p < q case, by judicious negations, but we do not elaborate on this. There remains one more distinction to make: we have not yet specified whether the parameters r, p̃, q̃, and πi are hidden or known to the recovery algorithm. We present algorithms for two cases: the known sizes case, where the community proportions πi are known but p̃ and q̃ are potentially unknown; and the unknown sizes case, where the πi are unknown but p̃, q̃, and the number r of communities are known. Even the case of fully unknown parameters is tractable [AS15b], but there are fundamental barriers that prevent robust approaches such as ours from achieving this. We elaborate on this in Section 4. 1.3 Contributions and prior work The main result of this paper is that two variants of a certain SDP achieve exact recovery, up to the information-theoretic threshold, against the planted partition model with multiple communities of potentially different sizes. These SDPs are furthermore robust to monotone adversaries. There has been considerable prior work on the development of algorithms and lower bounds for the stochastic block model, with algorithms making use of a wide range of techniques; see for instance the introduction to [ABH16] and works cited there. The use of semidefinite programming for exact recovery originated with [FK01], who achieved robust exact recovery in the case of two communities of equal sizes, falling slightly short of the optimal performance threshold. More recently, semidefinite algorithms have been found especially effective on sparse graphs [CSX12, ABH16], and have been proven to match lower bounds for the planted partition model in the case of two equal-sized communities [Ban15, HWX15a], two different-sized communities [HWX15b], and multiple equal-sized communities [HWX15b, ABKK15], but the case of recovering multiple communities of different sizes through SDPs remained unresolved until now. The SDP that we consider in this paper has appeared before in the literature [GV15, ABKK15], and in fact Agarwal et al. [ABKK15] conjectured that it achieves exact recovery up to the threshold; the main result of this paper resolves this conjecture affirmatively. Abbe and Sandon [AS15a] established the information-theoretic threshold for the general stochastic block model with individual community-pair probabilities Qij , which we visit in Section 3. In addition to proving a sharp lower bound, they analyzed an algorithm that succeeds with high probability up to their lower bound, thus precisely determining the statistical limits for exact recovery. Their result may appear strictly more general than ours, applying to the general stochastic block model rather than the more specific planted partition model. However, their algorithm involves a highly-tuned spectral clustering step that is likely not robust to monotone adversaries or other forms of perturbation (see Section 4 for discussion), and so our work can be seen as an improvement from the robustness standpoint. In fact, there are barriers against more general semirandom results. We show in Section 4 that no algorithm robust to monotone adversaries can handle the case of fully unknown parameters, nor can it extend from the planted partition model to the slightly more general strongly assortative block model. Thus our SDP-based approach is already essentially as general as one could hope for without compromising the strength of its robustness. Although we are primarily interested in the exact recovery regime, we will take a brief detour 3 and survey the parallel line of work on partial recovery. In contrast to exact recovery, none of the partial recovery algorithms that succeed down to the information-theoretic threshold are based on SDPs, and they have no robustness guarantees. There are robust SDP methods known [GV15, MPW16, MMV16] but they fall short of the threshold; this is essential, as it has been shown that no algorithm can robustly achieve the partial recovery threshold [MPW16]. Although robust algorithms for partial recovery cannot reach the threshold, there is an SDP that is conjectured to come quite close [JMR16] and is known to achieve the threshold in the limit of large average degree [MS16]; however, this analysis does not come with a robustness guarantee. By contrast, this paper shows that robust recovery is efficiently achievable up to the threshold in the exact recovery setting. Community detection in semirandom models was previously discussed in [FK01, CSX14, AL14], and further since the first appearance of this paper, in [MPW16, MMV16, HWX15a]. Other works [CL15, MMV16] discuss robustness to some quantity of corruptions or outlier nodes. 1.4 Overview of techniques In this section we summarize the arguments by which we prove that our SDPs achieve exact recovery against the semirandom planted partition model. More precisely, we show that with high probability, the unique SDP optimum is a matrix that exactly encodes the correct community structure; in contrast to some SDP-based algorithms (both for community detection and otherwise), there is no ‘rounding’ or post-processing procedure required. The first step is to show robustness in the sense that if the SDP succeeds against a particular graph, then it will continue to succeed if that graph is modified by monotone changes. This follows from a simple argument in [FK01] which essentially observes that the SDP optimizes over a space of solutions, and monotone changes improve the objective value of the true solution more than they improve the objective value of any other solution. In light of the above argument, it suffices to show that our SDP succeeds with high probability against the random model. As in previous work on SDPs for exact recovery, our proof proceeds by constructing a dual certificate. The idea here is that the SDP is a maximization problem for which the true solution is feasible; what we need to show is that no other solution has a larger objective value than the true one, which can be done by finding a matching solution to the dual SDP. This “dual certificate” that we construct depends on the random graph and can be shown to be dual-feasible with high probability. As is typical, the construction of the dual certificate is guided by complementary slackness, which provides a set of necessary conditions. However, these necessary conditions are not enough to uniquely determine the dual certificate and so some creativity is necessary here in order to find an optimal certificate that gets all the way to the threshold. Part of what makes the general problem harder than the special cases considered previously [HWX15b] is that the general case has more dual variables that are not automatically determined by complementary slackness but that nonetheless need to be chosen carefully. The crucial step in the construction of our dual certificate is that by making a change of variables we are able to find a connection between the complementary slackness conditions and the nonnegativity of differences of certain binomial random variables, which in turn are closely related to the information-theoretic threshold. It then becomes clear which parts of the dual solution need to crucially be set a particular way, and which ones have “wiggle room.” As is typical, showing that our dual matrix is positive semidefinite relies in part on the spectral concentration of the adjacency matrix, e.g. Theorem 5.2 in [LR15]. 4 1.5 Organization of this paper In Section 2 we present our two closely-related semidefinite programs for exact recovery. In Section 3 we discuss the information-theoretic threshold determined in [AS15a]. In Section 4 we show that our SDPs are robust to the semirandom model, and we give some impossibility results for robust algorithms. In Section 5 we prove our main result: our SDPs achieve exact recovery up to the information-theoretic threshold. 2 Semidefinite algorithms and results In this section we derive semidefinite programs for exact recovery, by taking convex relaxations of maximum likelihood estimators. Throughout we will use the letters u, v for vertices and the letters i, j for communities. 2.1 Maximum likelihood estimators Given an observed n-vertex graph, a natural statistical approach to recovering the community structure is to compute a maximum-likelihood estimate (MLE). We begin by stating the log-likelihood of a candidate partition into communities: X X X X log L = log p + log q + log(1 − p) + log(1 − q) u∼v same community u∼v diff community u6∼v same community u6∼v diff community Here ∼ denotes adjacency in the observed graph. We can represent a partition by its n×n partition matrix ( 1 if u and v are in the same community, Xuv = 0 otherwise. In terms of X and the observed (0, 1)-adjacency matrix A, we can write 2 log L(X) = hA, Xi log p + hA, J − Xi log q + hJ − I − A, Xi log(1 − p) + hJ − I − A, J − Xi log(1 − q) where I is the identity matrix, J is the all-ones matrix, and h·, ·i denotes the Frobenius (entry-wise) inner product of matrices. Expanding, and discarding terms that do not depend on X, including hX, Ii = n: 2 log L(X) + const = αhA, Xi − βhJ, Xi r X s2i , = αhA, Xi − β i=1 where α = log p(1 − q) , q(1 − p) β = log 1−q . 1−p The assumption p > q implies that α and β are positive. At this stage it is worth distinguishing the two cases of known and unknown sizes. In the first form, the block sizes si are known; then the second term above is a constant, and the MLE amounts to a minimum fixed-sizes multisection problem, and is NP-hard for worst-case A. 5 Program 1 (Known sizes MLE). maximize over hA, Xi partition matrices X with community sizes s1 , . . . , sr . In the second form of the problem, the block sizes si are unknown (but r is known). Now the MLE requires knowledge of p and q, and the resulting regularized minimum multisection problem is also likely computationally hard in general. Program 2 (Unknown sizes MLE). maximize over where ω= hA, Xi − ωhJ, Xi all partition matrices X on r communities, β log(1 − q) − log(1 − p) = . α log p + log(1 − q) − log q − log(1 − p) (1) Although it is not obvious from the definition, we can think of ω as a sort of average of p and q; the proof is deferred to Appendix A: Lemma 1. For all 0 < q < p < 1, we have q < ω < p. In order to compute either MLE in polynomial time, we will pass to a relaxation and show that the computation succeeds with high probability. 2.2 Semidefinite algorithms The seminal work of [GW95] began a successful history of semidefinite relaxations for cut problems. Proceeding roughly in this vein to write a convex relaxation for the true feasible region of partition matrices of given sizes, one might reasonably arrive at the following relaxation of the known-sizes MLE: Program 3 (Known sizes, primal, weak form). maximize hA, Xi subject to hJ, Xi = ∀u Xuu = 1, X s2i , i X ≥ 0, X  0. Here X ≥ 0 indicates that X is entry-wise nonnegative, and X  0 indicates that X is positive semidefinite (and, in particular, symmetric). This SDP appears in [AL14] (under the name SDP-2’). Under the assumption of equal-sized communities, a stronger form involving row sum constraints appears in [AL14, HWX15b, ABKK15], and the latter two papers find that this strengthening achieves exact recovery up to the informationtheoretic lower bound in the case of equal-sized communities. In the case of unequal community sizes, it is more difficult to pursue this line of strengthening. The authors have analyzed the weaker SDP above for multiple unbalanced communities, and found 6 that it does achieve exact recovery within some parameter range in the logarithmic regime, but its threshold for exact recovery is strictly worse than the information-theoretic threshold. (We have opted to omit these proofs from this paper, in view of our stronger results on the programs below.) Instead, we revisit the somewhat arbitrary decision to encode the partition matrix with entries 0 and 1. Indeed, SDPs for the unbalanced two-community case tend to use entries −1 and 1 [FK01, ABH16, HWX15b], with success up to the information-theoretic lower bound [HWX15b]. Some choices of entry values will result in a non-PSD partition matrix, so we opt for the choice of entries for which the partition matrix is only barely PSD: namely, we define the centered partition matrix ( 1 if u and v are in the same community, Xuv = −1 otherwise. r−1 Recall that r is the number of communities. This matrix is PSD as it is a Gram matrix: if we geometrically assign to each community a vector pointing to a different vertex of a centered regular simplex in Rr−1 , the resulting Gram matrix is precisely the centered partition matrix. Aiming to recover this matrix, we reformulate our SDP as follows: Program 4 (Known sizes, primal, strong form). maximize hA, Xi subject to hJ, Xi = r X 2 1 si − n2 , r−1 r−1 i ∀u Xuu = 1, −1 , X≥ r−1 X  0. This SDP bears a strong similarity to classical SDPs for maximum r-cut [FJ94], and [ABKK15] conjectured that it achieves exact recovery for unbalanced multisection up to the informationtheoretic lower bound. Our main result resolves this conjecture affirmatively. Other than the natural motivation of following classical approaches to r-cut problems, the change from partition matrices to centered partition matrices buys us something mathematically concrete: the intended primal solution now has rank r − 1 instead of rank r, which through complementary slackness will entail one less constraint on a candidate dual optimum. We can write down a very similar relaxation for the MLE in the case of unknown sizes but known p and q: Program 5 (Unknown sizes, primal, strong form). maximize subject to hA, Xi − ωhJ, Xi ∀u Xuu = 1, −1 , X≥ r−1 X  0. Here ω is as defined in (1). Our main assertion is that these SDPs achieve exact recovery up to the lower bounds in [AS15a]: 7 Theorem 2. Given input from the planted partition model with parameters (p̃, q̃, π), Programs 4 (known sizes) and 5 (unknown sizes) recover the true centered partition matrix as the unique optimum, with probability 1 − o(1) over the random graph, within the information-theoretically feasible range of parameters described by Theorem 3. To reiterate, the known sizes (Program 4) requires knowledge of the sum of squares of PSDP 2 community sizes (equivalently i πi ) and the number r of communities, but p and q can be unknown; the unknown sizes SDP (Program 5) requires knowledge of p, q, and r (or at least ω and r), but the community proportions π can be unknown. Program 5 can tolerate some mis-specification in the value of ω, though this tolerance may shrink to zero as the problem parameters approach the information-theoretic threshold. This tolerance is implicit in the proof of Theorem 2. 3 Lower bounds In this section we visit the general information-theoretic lower bounds established by [AS15a], and we specialize them to the planted partition model, recovering bounds that directly generalize those of [HWX15b] for the case of two unequal communities. Meanwhile, we recall operational interpretations of the lower bounds, which will be our main concrete handle on them. Consider the general stochastic block model (probabilities Qij ) in the regime where community sizes are si = πi n and probabilities are Qij = Q̃ij log n/n, with π and Q̃ constant as n → ∞. The threshold for exact recovery is as follows: Theorem 3 ([AS15a]). For i 6= j define the Chernoff–Hellinger divergence X def πk (t Q̃ik + (1 − t)Q̃jk − Q̃tik Q̃1−t D+ (i, j) = sup jk ). (2) t∈[0,1] k Then exact recovery is information-theoretically solvable if ∀i 6= j D+ (i, j) > 1. (3) Within this range, there exist efficient algorithms that succeed with probability 1 − o(1). Conversely, exact recovery is impossible if there exists a pair (i, j) with D+ (i, j) < 1. Within this range, any estimator for the community structure (even knowing the model parameters) will fail with probability 1 − o(1). [AS15a] also shows that the borderline case D+ (i, j) = 1 remains solvable; for simplicity we neglect this case. As mentioned in [AS15a], if we specialize as far as the planted partition model with two equalsized communities, then the CH-divergence is obtained at t = 12 , and one recovers the threshold √ √ √ p̃ − q̃ ≥ 2, as seen in [ABH16] and other works. In Appendix B, we compute the following generalization: Proposition 4. For the planted partition model with parameters (p̃, q̃, π), the CH-divergence is given by   πj p̃ τ (πi − πj ) + γ 1 · , D+ (i, j) = πi q̃ + πj p̃ − γ + τ (πi − πj ) log 2 πi q̃ τ (πj − πi ) + γ q γ = τ 2 (πi − πj )2 + 4πi πj p̃q̃, τ= p̃ − q̃ . log p̃ − log q̃ 8 Note that in our regime (logarithmic average degree), we have ω = τ log n/n + o(log n/n). (4) The divergence expression in Proposition 4 strongly resembles the lower bound proven in [HWX15b] for the case of two communities of different sizes. Indeed, in the notation of Lemma 2 of [HWX15b], we recognize our expression as g (πi , πj , p̃, q̃, τ (πj − πi )) . From that lemma, the following operational definition of the CH-divergence is immediate for the planted partition model: Lemma 5. Let i 6= j be communities, and let v be a vertex in community i. Let E(v, j) denote the number of edges from v to vertices in community j. Suppose that T (n) = τ (πi − πj ) log n + o(log n). The probability of the tail event E(v, i) − E(v, j) ≤ T (n) is n−D+ (i,j)+o(1) . By a naive union bound, when D+ (i, j) > 1 for all pairs i, j, then we can assert with high probability that none of these tail events occur, over all vertices and communities. A similar operational interpretation is given directly in [AS15a], phrased in terms of hypothesis testing between multivariate Poisson distributions. This result keeps more complete track of the o(1) term, so as to guarantee the union bound even when D+ (i, j) = 1. Lastly we note the following monotonicity property of the divergence, with a proof deferred to Appendix C: Proposition 6. In the planted partition model, the CH-divergence D+ (i, j) is monotone increasing in πi and πj (for any fixed p̃, q̃). Thus, when determining whether exact recovery is feasible in the planted partition model for some set of parameters, it suffices to check the CH-divergence between the two smallest communities. 4 Semirandom robustness and its consequences 4.1 The semirandom model Let X̂ be the ground truth partition of the vertices into communities. Definition 1. Following [FK01] we define a monotone adversary to be a process which takes as input a graph (for instance, a random graph sampled from the stochastic block model with ground truth X̂) and makes any number of monotone changes of the following types: • The adversary can add an edge between two vertices in the same community of X̂. • The adversary can remove an edge between two vertices in different communities of X̂. These monotone changes appear to only strengthen the presence of the true community structure X̂ in the observed graph, yet they may destroy statistical properties of the random model. The semirandom model is designed to penalize brittle algorithms that over-rely on specific stochastic models. It does not intend to mimic any real-world adversarial scenario, but it does intend to model the inherent unpredictability of real-world data. It may help to consider examples of how such an adversary could break an algorithm: 9 • Many algorithms perform PCA on the adjacency matrix [LR15]. The adversary could plant a slightly denser sub-community structure in a community, thus splitting one cluster of vertices into several nearby sub-clusters in the PCA, and introducing doubt as to which granularity of clustering is appropriate. • An adversary could introduce a noise distribution that changes the shape of clusters of vertices in the PCA or spreads them out, resulting in either a failure to cluster correctly, or else a failure in subsequent steps of estimating parameters and improving the community structure (as in [AS15b]). These are extreme examples, but they correspond to realistic concerns: • Real community structure is sometimes hierarchical, e.g. tight friend groups within a larger social community. • Many real networks have hubs, or a degree distribution that is nowhere near Gaussian, so hypothesis tests designed for distributions of roughly Gaussian shape may have trouble generalizing. 4.2 Robustness In this section, we establish that our SDPs are robust to monotone adversaries. We first elaborate on the definitions discussed in the introduction. Definition 2. Suppose f is a (deterministic) algorithm for recovery in the stochastic block model, namely f takes in an adjacency matrix A and outputs a partition f (A) of the vertices. We say f is robust to monotone adversaries if: for any A such that f (A) = X̂, we have f (A′ ) = X̂ for any A′ obtained from A via a sequence of monotone changes. We modify this definition slightly for SDPs in order to deal with the fact that an SDP may not have a unique optimum. By abuse of notation, let X̂ also refer to the centered partition matrix corresponding to the partition X̂. Definition 3. Suppose PA is a semidefinite program which depends on the adjacency matrix A (for instance, Program 4 or Program 5). We say PA is robust to monotone adversaries if: for any A such that X̂ is the unique optimum to PA , we have that X̂ is the unique optimum to PA′ for any A′ obtained from A via a sequence of monotone changes. SDPs tend to possess such robustness properties. We will now show that our SDPs are no exception, following roughly the same type of argument as [FK01]. Proposition 7. Programs 4 (known sizes) and 5 (unknown sizes) are robust to monotone adversaries. Proof. Let PA be either Program 4 or Program 5 (the proof is identical for both cases). Suppose the true centered partition matrix X̂ is the unique optimum for PA . By induction it is sufficient to show that X̂ is the unique optimum for PA′ where A′ is obtained from A via a single monotone change. Note that PA and PA′ have the same feasible region because A only affects the objective function. Let PA (X) denote the objective value of a candidate solution X for PA , namely PA (X) is hA, Xi for Program 4 and hA, Xi − ωhJ, Xi for Program 5. First consider the case where A′ is obtained from A via a single monotone edge-addition step. Since the added edge lies within a community of X̂ we have PA′ (X̂) = PA (X̂) + 2. For any matrix X feasible for PA (equivalently, feasible for 10 PA′ ), we have PA′ (X) ≤ PA (X) + 2; this follows from X ≤ 1 (entry-wise), which is implied by the constraints Xvv = 1 and X  0. If X 6= X̂ we have PA′ (X̂) = PA (X̂) + 2 > PA (X) + 2 ≥ PA′ (X) and so X̂ is the unique optimum of PA′ . Similarly, for the case where A′ is obtained from A via a 2 2 and PA′ (X) ≤ PA (X) + r−1 (using single monotone edge-removal, we have PA′ (X̂) = PA (X̂) + r−1 −1 the constraint X ≥ r−1 ) and the result follows. Recall that in the semirandom planted partition model, a random graph is generated according to the random (planted partition) model and then a monotone adversary is allowed to make monotone changes. Once we have established our main result (Theorem 2) on the success of our SDPs against the random model, it is an immediate corollary of robustness that our SDPs also succeed against the semirandom model. Proposition 8. Programs 4 (known sizes) and 5 (unknown sizes) achieve exact recovery against the semirandom planted partition model, with probability 1 − o(1), up to the information-theoretic threshold for the random model (given in Theorem 3). 4.3 BM-ordering and strongly assortative block models Let SBM(n, Q̃, π) and PPM(n, p̃, q̃, π) denote the stochastic block model and planted partition model, respectively. Given input from a stochastic block model SBM(n, Q̃, π), we can simulate certain other stochastic block models SBM(n, Q̃′ , π), by adding edges within communities independently at random, and likewise removing edges between communities. Specifically, we can simulate any block model for which Q̃′ii ≥ Q̃ii and Q̃′ij ≤ Q̃ij , for all communities i 6= j; in this case, following [AL14], we say that SBM(n, Q̃′ , π) dominates SBM(n, Q̃, π) in block model ordering (BM-ordering). In the case when the original model is a planted partition model, this simulation step can be thought of as a specific monotone adversary. Block models that dominate a planted partition model will fall among the strongly assortative class: those for which Q̃ii > Q̃jk whenever j 6= k, i.e. all intra-community probabilities exceed all inter-community probabilities. The following is immediate from Proposition 8: Proposition 9. Programs 4 and 5 achieve exact recovery with high probability against any strongly assortative block model that dominates a planted partition model lying within the informationtheoretically feasible range. Extrapolating slightly, we can assert that this extension to the strongly assortative block model tends to be automatic for semidefinite approaches because they tend to be robust. This has been previously noted by [AL14] through essentially the same arguments. By taking p̃ = mini Q̃ii and q̃ = maxj6=k Q̃jk , we could obtain from Proposition 4 a more explicit description of this sufficient condition for exact recovery. 4.4 Difficulties with general block models Most natural SDPs tend to be robust to monotone adversaries. This strength of semidefinite approaches – their ability to adapt to other random models following BM-ordering – can be used to also reveal their limitations. We will show in this section that it is impossible for an algorithm robust to monotone changes to match the information-theoretic lower bound of [AS15a] in general, and even for strongly assortative block models. 11 As an example, define   a b c+ǫ Q̃1 =  b a c , c+ǫ c a   a b c Q̃2 =  b a c  . c c a For a suitable setting of ǫ > 0 and a, b, c, π, it is possible for SBM(n, Q̃1 , π) to be informationtheoretically feasible for exact recovery while SBM(n, Q̃2 , π) is not. The following values provide an explicit example: a = 31.4, b = 15, c = 10, ǫ = 1, π = (1/3, 1/3, 1/3). However, Q̃1 dominates Q̃2 in BM-ordering. As our SDPs cannot hope to recover against SBM(n, Q̃2 , π), it follows that they fail also against SBM(n, Q̃1 , π), even though this model is information-theoretically feasible. This example shows how monotone changes become subtly unhelpful in the strongly assortative block model: the first two communities become harder to distinguish under these monotone changes because their interactions with the third community become more similar. Arguably this makes the semirandom model inappropriate for such a general block model. Nonetheless, monotone robustness is a property of our SDPs, and also of all prior SDPs in the community detection literature (at least after minor strengthening), and so the limitations below apply at least to these specific SDPs. Thus we are able to learn about the limitations of these SDPs by studying their robustness properties. The argument above applies to any algorithm that is robust to the semirandom model; this means no robust algorithm can achieve the threshold. This motivates us to conjecture a different “monotone threshold” for general block models, which we believe captures the information-theoretic limits in the general semirandom model. Define the monotone divergence X m πk (t Q̃ik + (1 − t)Q̃jk − Q̃tik Q̃1−t D+ (i, j) = sup jk ). t∈[0,1] k∈{i,j} m (i, j) is simply the value of D (i, j) after setting Q = Q / {i, j}; this Note that D+ + ik jk for all k ∈ is a change in model that the monotone adversary can simulate (for instance set Qik = Qjk = 0), and it is in fact the best change-in-model that the adversary can simulate if it wants to decrease m (i, j) < 1 for some D+ (i, j) as much as possible for a specific (i, j) pair. It follows that if D+ i 6= j then there does not exist a robust algorithm achieving exact recovery. We conjecture that m (i, j) ≥ 1 for all i 6= j, and if the block model is furthermore weakly assortative conversely, if D+ (Qii > Qij for all i 6= j), then there exists a robust algorithm achieving exact recovery against this block model. 4.5 Difficulties with unknown parameters Non-semidefinite techniques in [AS15b] achieve exact recovery up to the threshold without knowing any of the model parameters. One might ask whether it is possible for a robust algorithm (such as our SDPs) to achieve this; we now argue that this is not possible in general even in the planted partition model. Consider for example a strongly assortative block model SBM(n, Q̃, π), on four communities, where   a b c c  b a c c   Q̃ =   c c a b  c c b a 12 and a > b > c. This model may be simulated by a monotone adversary acting on either of the planted partition models PPM(n, a, b, π) and PPM(n, b, c, π ′ ), where π ′ = (π1 +π2 , π3 +π4 ). Suppose that we had a robust algorithm for exact recovery in the planted partition model without knowing any of the parameters. For a suitable setting of a, b, c, π, such an algorithm should be able to achieve exact recovery against the two planted partition models listed above. By robustness, it will still recover the same partition, with high probability, when presented with the strongly assortative block model SBM(n, Q̃, π). But now we have a contradiction: the algorithm allegedly recovers both partitions (corresponding to π and π ′ ) with high probability. In effect, these two planted partition models have zero “monotone total variation distance”, though we do not formalize this notion here. It is necessary to know some model parameters in advance in order for robust algorithms to distinguish such models. A few approaches are available to overcome this drawback: • One could statistically estimate some or all of the parameters before running the SDP, as in Appendix B of [HWX15b]. However, this statistical approach relies on the specific random model and spoils our robustness guarantees. • One could try running the SDP several times on a range of possible input parameters, ignoring any returned solutions that are not partition matrices. A close reading of Section 5 reveals that, when running Program 5 (unknown sizes), mis-guessing the parameter ω by any 1− o(1) factor does not affect whether one succeeds with high probability. This approach may return several valid solutions. In the example above, this approach will recover both of the given planted partition models, with high probability. In general this approach recovers the type of hierarchical community structure that the above example exhibits. 5 Proof of exact recovery In this section we prove our main result (Theorem 2) which states that our SDPs achieve exact recovery against the planted partition model, up to the information-theoretic limit. Specifically, we show that if the divergence condition (3) holds, then with high probability, the true centered partition matrix X̂ is the unique optimum for our SDPs. The main idea of the proof is to construct a solution to the dual SDP in order to bound the value of the primal. 5.1 Notation Recall that we use the letters u, v for vertices and the letters i, j for communities. We let 1 denote the all-ones vector, 1i denote the indicator vector of Si , I denote the identity matrix, and J denote the all-ones matrix. When M is any matrix, MSi Sj will denote the submatrix indexed by Si × Sj , and we abbreviate MSi Si by MSi . Let A be the adjacency matrix of the observed graph and write E(i, j) = 1⊤ i A1j ; when i 6= j this is the number of edges between communities i and j, and when i = j this is twice the number of edges within community i. All asymptotic notation refers to the limit n → ∞, with parameters p̃, q̃, and π held fixed. Throughout, we say an event occurs “with high probability” if its probability is 1 − o(1). 13 5.2 Weak duality Following the standard dual certificate approach, we begin by writing down duality and complementary slackness for our SDP. This will lead us to a set of sufficient conditions, outlined in Proposition 10 below. We first write down the dual of Program 5: Program 6 (Dual, unknown sizes). minimize subject to X νv + v def 1 hJ, Γi r−1 Λ = diag(ν) + ωJ − A − Γ  0, Γ≥0 symmetric. Here the n-vector ν and the n × n matrix Γ (both indexed by vertices) are dual variables, and ω is as defined in (1). We can now state weak duality in this context: hA, Xi − ωhJ, Xi = hA − ωJ, Xi = hdiag(ν) − Γ − Λ, Xi X = νv − hΓ, Xi − hΛ, Xi v = X νv + v 1 1 hJ, Γi − hΓ, X + Ji − hΛ, Xi. r−1 r−1 P 1 hJ, Γi (the primal objective value is This implies weak duality hA, Xi − ωhJ, Xi ≤ v νv + r−1 1 1 at most the dual objective value) because hΓ, X + r−1 Ji ≥ 0 (since Γ ≥ 0, X + r−1 J ≥ 0) and hΛ, Xi ≥ 0 (since Λ  0, X  0). 5.3 Complementary slackness From above we have the following complementary slackness conditions. If X is primal feasible and 1 (ν, Γ) is dual feasible then X and (ν, Γ) have the same objective value if and only if hΓ, X+ r−1 Ji = 0 and hΛ, Xi = 0. Since Λ and X are PSD, hΛ, Xi = 0 is equivalent to ΛX = 0 (this can be shown using the rank-1 decomposition of PSD matrices), which in turn is equivalent to colspan(X) ⊆ ker(Λ). Although we have only considered Program 5 so far, everything we have done also applies to Program 4. The dual of Program 4 is identical to Program 6, except that ω is replaced by a dual variable, and there is a corresponding term in the objective. By deterministically choosing this dual variable to take the value ω, we arrive at a dual program with the same feasible region and complementary slackness conditions as Program 6. From this point onward, the same arguments apply to both Programs 4 and 5. −1 ) entries. The following proposition Let X̂ be the true centered partition matrix with (1, r−1 gives a sufficient condition for X̂ to be the unique optimum for Programs 4 and 5. Proposition 10. Suppose there exists a dual solution (ν, Γ) satisfying: • Λ  0, • ΓSi = 0 for all i, • ΓSi Sj > 0 (entry-wise) for all i 6= j, 14 • ker(Λ) = span{1i − 1j }i,j . Then X̂ is the unique optimum for Programs 4 and 5. (Here Λ is defined as Λ = diag(ν)+ωJ −A−Γ as in Program 6.) Proof. The first three assumptions imply that (ν, Γ) is dual feasible. The column span of X̂ is span{r 1i −1}i = span{1i −1j }i,j so the fourth assumption is that colspan(X̂) = ker(Λ), which is one 1 Ji = 0 of our two complementary slackness conditions. The assumption ΓSi = 0 implies hΓ, X̂ + r−1 1 because X̂ + r−1 J is supported on the diagonal blocks. This is the other complementary slackness condition, so complementary slackness holds, certifying that X̂ is primal optimal (ν, Γ) is dual optimal. To show uniqueness, suppose X is any optimal primal solution. By complementary slackness, 1 colspan(X) ⊆ ker(Λ) = span{1i − 1j }i,j and hΓ, X + r−1 Ji = 0. Since ΓSi Sj > 0, this means −1 XSi Sj = r−1 J for all i 6= j. But since every column of X is in span{1i − 1j }i,j , we must now have XSi = J and so X = X̂. We note that Proposition 10 is not novel in that all the arguments we have made so far are standard in the dual certificate approach. 5.4 Construction of dual certificate – overview We now explore the space of dual certificates that will satisfy the conditions of Proposition 10, so as to sound out how to construct such a certificate. The main result of this section is to rewrite the problem in terms of a new set of variables γu . We believe this change of variables is novel, and it is crucial to our approach because it will allow us to make a connection between between complementary slackness and certain differences of binomial variables that are closely related to the information-theoretic threshold (see Lemma 5). The condition span{1i − 1j } ⊆ ker(Λ) is equivalent to ∀u, ∀i 6= j e⊤ u Λ(1i − 1j ) = 0. Using the definition Λ = diag(ν) + ωJ − A − Γ, this can be rewritten as the two equations X ∀i 6= j, ∀u ∈ Si νu + ω(si − sj ) − E(u, i) + E(u, j) + Γuv = 0 (5) v∈Sj and ∀i 6= j, ∀u ∈ / Si , u ∈ / Sj ω(si − sj ) − E(u, i) + E(u, j) − X v∈Si Γuv + X Γuv = 0. (6) v∈Sj We can disregard the equations (6) because they are implied by the equationsP (5) via subtraction. From (5) we have that, for any fixed u ∈ Si , the quantity ωsj − E(u, j) − v∈Sj Γuv must be independent of j (for j 6= i). Hence let us define X γu = ωsj − E(u, j) − Γuv ∀j 6= i for u ∈ Si . (7) v∈Sj Rewrite (5) as νu = E(u, i) − ωsi + γu for u ∈ Si , (8) and rewrite (7) as Ruj = ωsj − E(u, j) − γu 15 for u ∈ / Sj , (9) P where Ruj is shorthand for the row sum v∈Sj Γuv . Since Γ is symmetric, Ruj must be equal to P the column sum v∈Sj Γvu , so we need for any i 6= j, X Ruj = u∈Si X Rvi , X [ωsi − E(v, i) − γv ], v∈Sj or equivalently: X u∈Si [ωsj − E(u, j) − γu ] = v∈Sj or equivalently: ωsi sj − E(i, j) − X u∈Si γu = ωsi sj − E(i, j) − X γv , v∈Sj or equivalently, there needs to exists a constant c such that X γu = c ∀i. (10) u∈Si To recap, it remains to do the following. First choose c. Then choose γu satisfying (10). Defining Ruj by (9), we are now guaranteed that {Ruj }u∈Si and {Rvi }v∈Sj are valid row and column sums respectively for ΓSi Sj (for i 6= j). Then define νu by (8), which guarantees span{1i − 1j } ⊆ ker(Λ). It remains to construct ΓSi Sj explicitly from its row and column sums such that ΓSi Sj > 0. It also remains to show Λ  0 and ker(Λ) ⊆ span{1i − 1j }. Note that we have not actually chosen any values for dual variables yet, other than what is required by complementary slackness; we have merely rewritten the complementary slackness conditions in terms of the new variables γu and Ruj . 5.5 Intervals for γv In this section we find necessary bounds for γv , which will guide our choice of these dual variables and of c. This is where the crucial connection between γv and the information-theoretic threshold will become apparent. Let v ∈ Si . For a lower bound on γv , we have that Λ  0 implies Λvv ≥ 0 implies νv + ω ≥ 0 which by (8) implies γv ≥ ω(si − 1) − E(v, i). For an upper bound, for any j 6= i we must have that ΓSi Sj > 0 implies Rvj > 0 which by (9) implies γv < ωsj − E(v, j). Therefore, γv must lie in the interval γv ∈ [ω(si − 1) − E(v, i) , min ωsj − E(v, j)). j6=i Our approach in choosing γv will be to first make a preliminary guess γv′ and then add an adjustment term to ensure that (10) holds. In order to absorb this adjustment, we will aim for γv′ to lie in the slightly smaller interval (11) γv′ ∈ [αv , βv ] where αv = ω(si − 1) − E(v, i) + ǫ1 and βv = min ωsj − E(v, j) − ǫ2 j6=i for v ∈ Si . Here ǫ1 and ǫ2 are small o(log n) error terms which we will choose later. The non-emptiness of these intervals is the crux of the proof, and provides the connection to the information-theoretic threshold: 16 Lemma 11. If the divergence condition (3) holds, then αv < βv , for all v, with high probability. Proof. For v ∈ Si , we have βv − αv = min ((E(v, j) − E(v, i)) − ω(sj − si ) − ǫ1 − ǫ2 ) j6=i = min(E(v, j) − E(v, i)) − ω(sj − si ) − o(log n) j6=i (4) = min(E(v, j) − E(v, i)) − τ (πj − πi ) log n − o(log n). j6=i By Lemma 5, for each v ∈ Si and all j 6= i, the probability of the tail event (E(v, j) − E(v, i)) − τ (πj − πi ) log n − o(log n) ≤ 0 is n−D+ (i,j)+o(1) . Thus, when D+ (i, j) > 1 for all pairs (i, j), we can take a union bound over all n(r − 1) such events, to find that βv − αv ≥ 0 with probability 1 − o(1). By summing (11) over all v ∈ Si (roughly following (10), although γv and γv′ are slightly different), we obtain a target interval for c: c ∈ [αi , βi ] ∀i where αi = X v∈Si βi = X v∈Si (12) αv = ωsi (si − 1) − E(i, i) + si ǫ1 βv = X v∈Si min [ωsj − E(v, j) − ǫ2 ]. j6=i The endpoints of the interval (12) for c will turn out to be highly concentrated near a pair of deterministic quantities, namely: ᾱi = (ω − p)si (si − 1) + si ǫ1 and β̄i = (ω − q)si smin6=i − si ǫ2 (13) where smin6=i = minj6=i sj . 5.6 Choice of c and γv We have now made the key insight that c and γv must lie in certain intervals in order to get all the way to the information-theoretic threshold. However, as long as we fulfill these requirements, we have some “wiggle room” in choosing the dual variables. We will make what seems to be the simplest choices. We can deterministically take 1 c = (ω − q)smin s2ndmin , 2 (14) where smin , s2ndmin are the sizes of the two smallest communities (which may be equal). Then for sufficiently large n we have, for all i, ᾱi < 0 < c < β̄i , using the definitions (13) of ᾱi , β̄i along with the facts ǫ1 , ǫ2 = o(log n) and q < ω < p (Lemma 1). Our specific choice of c is not crucial; we can in fact pick any deterministic 0 < c < β̄i provided that c = Θ(n log n) and β̄i − c = Θ(n log n) for all i. 17 Recall thatPour goal is to choose each γv to lie in (or close to) the interval [αv , βv ] subject to the condition v∈Si γv = c required by (10). To achieve this, define the deterministic quantity κi = c − ᾱi ∈ (0, 1). β̄i − ᾱi (15) Note that we expect c to lie roughly κi fraction of the way through the interval [αi , βi ] (which is the sum over v ∈ Si of the intervals [αv , βv ]). Mirroring this, we make a rough initial choice γv′ (for v ∈ Si ) that is κi fraction of the way through the interval [αv , βv ]: γv′ = (1 − κi )αv + κi βv (16) P However, these do not satisfy v∈Si γv′ = c on the nose – rather, there is some error that is on the order of the difference between αi and ᾱi . We thus introduce an additive correction term δi chosen P to guarantee v∈Si γv = c. For v ∈ Si , γv = γv′ + δi ,   X 1  c− γv′  . δi = si v∈Si Recall that our goal was for γv to lie within some o(log n) error from the interval [αv , βv ]. By construction we have γv′ ∈ [αv , βv ] and so we will have succeeded if we can show δi = o(log n). This will be one of the goals of the next section. 5.7 High-probability bounds for random variables In this section we establish bounds on various variables in the dual certificate that will hold with high probability 1 − o(1). We can treat the failure of these bounds as a low-probability failure event for the algorithm. First recall the following version of the Bernstein inequality: Lemma 12 (Bernstein inequality). If X1 , . . . , Xk are independent zero-mean random variables with |Xi | ≤ 1, then for any t > 0, ! " # X − 12 t2 . Pr Xi ≥ t ≤ exp P 1 Var[X ] + t i i 3 i Note that by replacing Xi with −Xi we get the same bound for Pr [ For each vertex v, let ∆v = max |E(v, j) − E[E(v, j)]| j P i Xi ≤ −t ]. (17) where j ranges over all communities, including that of v. Recall that for v ∈ / Sj , E(v, j) ∼ Binom(sj , q) and so E[E(v, j)] = sj q; and for v ∈ Sj , E(v, j) ∼ Binom(si − 1, p) and so E[E(v, j)] = (si − 1)p. 18 Our motivation for defining the quantity ∆v is its appearance in the following bounds: ᾱi = |p(si − 1) − E(v, i)| ≤ ∆v si β̄i βv − = min [ωsj − E(v, j)] − (ω − q)smin6=i ≤ ∆v j6=i si c c γv′ − = (1 − κi )αv + κi βv − si si β̄v c ᾱv + ∆v + κi − ≤ (1 − κi ) si si si (15) = ∆v αv − (18) where the third bound makes use of the first two. Toward bounding ∆v , note that we can apply Bernstein’s inequality (Lemma 12) to bound each E(v, j) − E[E(v, j)], and take a union bound to obtain ! − 12 t2 . Pr[∆v ≥ t] ≤ 2r exp np + 13 t Taking t = log n log log n and union bounding over all v, we see that, with high probability, ∆v ≤ log n log log n for all v. But this will not quite suffice for the bounds we need. Instead, taking t = log n/(log log n)2 , we see that ∆v ≤ log n/(log log n)2 for most values of v, with a 5 number of exceptions that, with high probability, does not exceed n1−1/(log log n) ; for these exceptions, we fall back to the bound of log n log log n above. Above we have used the following consequence of Markov’s inequality: if there are n bad events, each occurring with probability ≤ p, then Pr[at least k bad events occur] ≤ np k . For the sake of quickly abstracting away this two-tiered complication, we make the following three computations up front: X ∆2v ≤ n1−1/(log log n) log2 n (log log n)2 + n v u,v log n (log log n)2 ∆v ≤ n1−1/(log log n) log n log log n + n v X 5 X = O(n log n/(log log n)2 ), 5 log2 n (log log n)4 = O(n log2 n/(log log n)4 ), 5 (∆u + ∆v )2 ≤ 8n · n1−1/(log log n) log2 n (log log n)2 + 4n2 log2 n (log log n)4 (19) (20) (21) = O(n2 log2 n/(log log n)4 ), where the sums range over all vertices u,v. Note that in each case, the non-exceptional vertices dominate the bound. (One can easily compare two terms in the above calculations by computing the logarithm of each.) Now we can show that δi , the correction term from the previous section, is small. For any i we 19 have |δi | = X 1 (c − γv′ ) si (22) v∈Si (18) ≤ X c 1 1 X ∆v (c − ) + si si si v∈Si v∈Si 1 X = ∆v si v∈Si (19) = O(log n/(log log n)2 ). We will be interested in defining the quantity ∆′v = ∆v +|δi | (where v ∈ Si ) due to its appearance in the following bounds: (18) c γv = γv′ + δi = ± O(∆′v ), si Rvj = ωsj − E(v, j) − γv c = (ω − q)sj − ± O(∆′v ). si (23) (24) Using the identity (x + y)2 ≤ 2(x2 + y 2 ) along with (20), (21) and (22), we have with high probability X (∆′v )2 = O(n log2 n/(log log n)4 ), (25) v X (∆′u u,v 5.8 + ∆′v )2 = O(n2 log2 n/(log log n)4 ). (26) Bounds on νv and Rvj We can now prove two key results that we will need later: with high probability, νv ≥ log n log log n ∀v (27) and Rvj > 0 ∀j, ∀v ∈ / Sj . (28) These results should not come as a surprise because they were more or less the motivation for defining the interval [αv , βv ] for γv in the first place. Since the νv values lie on the diagonal of Λ, the bound on νv is important for proving Λ  0 which we need for dual feasibility. Since Rvj are the row sums of Γ, the bound on Rvj is important for achieving ΓSi Sj > 0 which we need for Proposition 10. The specific quantity logloglogn n is not critical – anything would suffice that is o(log n) yet large enough to dominate some error terms in a later calculation. In the previous section we showed (22) we showed |δi | = o(log n) with high probability, and so we can choose the error terms ǫ1 , ǫ2 from the definition of αv , βv (which, recall, are required to be 20 o(log n)) to absorb δi . Specifically, let log n = o(log n) log log n ǫ2 = max |δi | + 1 = o(log n). ǫ1 = max |δi | + ω + i i Recall that by Lemma 11 the intervals [αv , βv ] are all nonempty with high probability, and by construction we have γv′ ∈ [αv , βv ]. Now we will show (27): νv ≥ logloglogn n . For v ∈ Si we have νv = E(v, i) − ωsi + γv = E(v, i) − ωsi + γv′ + δi ≥ E(v, i) − ωsi + αv + δi ≥ E(v, i) − ωsi + ω(si − 1) − E(v, i) + ǫ1 − δi log n ≥ , log log n using the choice of ǫ1 . Now we show (28): Rvj > 0. For v ∈ Si and j 6= i we have Rvj = ωsj − E(v, j) − γv = ωsj − E(v, j) − γv′ − δi ≥ ωsj − E(v, j) − βv − δi = ωsj − E(v, j) − min [ωsk − E(v, k)] + ǫ2 − δi k6=i ≥1>0 using the choice of ǫ2 . 5.9 Choice of Γ We have shown how to choose strictly positive row sums Ruj and column sums Rvi of ΓSi Sj (for i 6= j). There is still considerable freedom in choosing the individual entries, but we will make what seems to be the simplest choice: we take ΓSi Sj to be the unique rank-one matrix satisfying these row and column sums, namely Ruj Rvi (ΓSi Sj )uv = Tij where Tij is the total sum of all entries of ΓSi Sj , Tij = X Ruj = u∈Si X Rvi . (29) v∈Sj We showed earlier that this last equality is guaranteed by (10). As the row sums Ruj are all positive with high probability (28), it follows that ΓSi Sj > 0. 21 5.10 PSD calculation for Λ We have already shown that if we choose νv and Rvj according to (8) and (9) respectively, then we have span{1i − 1j } ⊆ ker(Λ). In order to show Λ  0 with ker(Λ) = span{1i − 1j }, we need to show x⊤ Λx > 0 ∀x ⊥ span{1i − 1j }. = {z ∈ Rn : The orthogonal complement of span{1i − 1j } is spanned by block 0-sum vectors Z q P P 1 P 1 P 1 y′ ′ v∈Si zv = 0 ∀i} plus the additional vector y = i si 1i . Let y = ky ′ k = i si . Fix i si 1i / p x ⊥ span{1i − 1j } with kxk = 1 and write x = βy + 1 − β 2 z for β ∈ [0, 1] and z ∈ Z with kzk = 1. We have p (30) x⊤ Λx = β 2 y ⊤ Λy + 2β 1 − β 2 z ⊤ Λy + (1 − β 2 )z ⊤ Λz. We will bound the three terms in (30) separately. In particular, we will show that (with high probability): y ⊤ Λy = Ω(log n), (31) ⊤ 2 |z Λy| = O(log n/(log log n) ), z ⊤ Λz = Ω(log n/ log log n). Once we have this, we can (for sufficiently large n) rewrite (30) as x⊤ Λx ≥ β 2 C1 log n − 2β p 1 − β 2 C2 log n log n + (1 − β 2 ) C3 2 (log log n) log log n for some positive constants C1 , C2 , C3 . For sufficiently large n we have  2   log n log n (C1 log n) C3 , > C2 log log n (log log n)2 which implies x⊤ Λx > 0 for all β ∈ [0, 1], completing the proof that Λ  0 with ker(Λ) = span{1i − 1j }. It remains to show the three bounds in (31). 5.10.1 Compute y ⊤ Λy y ′⊤ Λy ′ = y ′⊤ (diag(ν) + ωJ − A − Γ)y ′ X X E(i, j) X Tij − = νv yv2 + ωr 2 − s s si sj i j v i,j i,j X 1 X X E(i, i) X E(i, j) X E(i, j) c − (ω − − ) = νv + ωr 2 − − 2 2 si sj si sj si sj si si i i (a) v∈Si i6=j i6=j X 1 X E(i, i) X 1 = (E(i, i) − ωs2i + c) + ωr 2 − − ωr(r − 1) + c 2 2 si sj si si i i i6=j X 1 X 1 2 + ωr − ωr(r − 1) + c = −ωr + c si sj s2i i i6=j !2 X 1 =c si (b) i 22 where (a) expands fore P i,j Tij using (29),(9),(10), and (b) expands y ⊤ Λy = X 1 1 ′⊤ ′ y Λy = c . ky ′ k2 si P v∈Si νv using (8),(10). There(32) i Since in (14) we chose c to be Θ(n log n), we have 5.10.2 y ⊤ Λy = Θ(log n) as desired. Lower bound for z ⊤ Λy For v ∈ Si , (Λy ′ )v = X E(v, j) X Rvj νv + ωr − − si sj sj j = j6=i X E(v, j) X 1 1 (E(v, i) − ωsi + γv ) + ωr − − (ωsj − E(v, j) − γv ) si sj sj j j6=i X 1 = γv si i and so 1 (Λy)v = ′ (Λy ′ )v = γv ky k Let (Λy)Z s X 1 . si i denote the projection of the vector Λy onto the subspace Z. For v ∈ Si we have s s X 1 (10) X 1 1 X c Z (Λy)v = (γv − γv ) . = (γv − ) si si si si i v∈Si i Now we have s c 2 X 1 (γv − ) z Λy ≥ −k(Λy) k = − si si i v∈Si i s sX X X 1 (23) O(∆′v )2 ≥ − si ⊤ sX X Z i v∈Si i (25) = −O(log n/(log log n)2 ) 5.10.3 Lower bound for z ⊤ Λz Note that J, EA + pI and EΓ are block-constant and so the quadratic forms z ⊤ Jz, z ⊤ (EA + pI)z and z ⊤ (EΓ)z are zero for z ∈ Z. Then z ⊤ Λz = z ⊤ (diag(ν) + ωJ − A − Γ)z = z ⊤ diag(ν)z − z ⊤ (A − EA)z + pz ⊤ Iz − z ⊤ (Γ − EΓ)z ≥ min νv + p − kA − EAk − kΓ − EΓk. v Earlier we showed (27) min νv ≥ log n/ log log n v with high probability and we have p = Θ( logn n ) = o(log n/ log log n). It remains to bound kA − EAk and kΓ − EΓk. The next two sections show that each of these two terms is o(log n/ log log n) with high probability. It then follows that z ⊤ Λz = Ω(log n/ log log n), as desired. 23 5.10.4 Upper bound for kA − EAk Strong bounds for the spectral norm kA− EAk have already appeared in the block model literature. Specifically, Theorem 5.2 of [LR15] is plenty stronger than we need; it follows immediately that p kA − EAk ≤ O( log n) = o(log n/ log log n). 5.10.5 Upper bound for kΓ − EΓk Recall that ΓSi Sj has row sums Ruj and total sum (of all entries) Tij = X u∈Si Ruj (9,10) = ωsi sj − E(i, j) − c. By applying Bernstein’s inequality (Lemma 12) to E(i, j) we get a high-probability bound for Tij : Tij = ωsi sj − E(i, j) − c √ = (ω − q)si sj − c ± O( n log n). (33) We now compute EΓ. This is block-constant, by symmetry under permuting vertices within each community, and this constant must be E[Γuv ] = (ω − q)si sj − c 1 E[Tij ] = , si sj si sj where u ∈ Si , v ∈ Sj , i 6= j. We can now compute Ruj Rvi (ω − q)si sj − c − Tij si sj si sj Ruj Rvi − ((ω − q)si sj − c)Tij = si sj Tij 2 ′ ′ 2 ′ ′ (a) ±O(n log n(∆u + ∆v ) + n ∆u ∆v ) = 3 si sj ((ω − q)si sj − c) + o(n log n) 2 ′ ′ 2 ′ ′ (b) ±O(n log n(∆u + ∆v ) + n ∆u ∆v ) = Θ(n3 log n) = ±O((∆′u + ∆′v )/n + ∆′u ∆′v /(n log n)), Γuv − EΓuv = where in step (a), we appeal to the bounds (24), (33), causing cancellations in the high-order terms; and in (b) we have used the choice of c (14) to check that the denominator is Θ(n3 log n). We will bound the spectral norm of Γ − EΓ by its Frobenius norm. While this bound is often 24 weak, it will suffice here as Γ has constant rank, so that we only expect to lose a constant factor. kΓ − EΓk ≤ kΓ − EΓkF sX (Γuv − EΓuv )2 = u,v v uX  ′ 2 ′ ∆′ ′ u ∆ ∆ + ∆ u u v v =t + O n n log n u,v v v  ′ u uX  ′ ′ 2  ′ 2 (a) uX u ∆ + ∆ ∆u ∆v u v O O ≤t +t n n log n u,v u,v v ! ! u sX X X u 1 1 2 t O (∆′u + ∆′v ) + (∆′v )2 (∆′u )2 O ≤ n u,v n log n v u (b) = O(log n/(log log n)2 ) = o(log n/ log log n), where (a) uses the triangle inequality for the Euclidean norm and (b) uses the high-probability bounds (25),(26) for expressions involving ∆′v . This completes the proof that Λ  0 with ker(Λ) = span{1i − 1j }. We have now satisfied all conditions of Proposition 10, and so we may conclude Theorem 2: Programs 4 and 5 achieve exact recovery with probability 1 − o(1). 6 Acknowledgements The authors are indebted to Ankur Moitra for suggesting the problem, for providing guidance throughout the project, and for several enlightening discussions on semirandom models. We would also like to thank David Rolnick for a helpful discussion on MLEs for the block model, and Roxane Sayde for comments on a draft of this paper. References [ABH16] E. Abbe, A. S. Bandeira, and G. Hall. Exact recovery in the stochastic block model. IEEE Transactions on Information Theory, 62(1):471–487, 2016. [ABKK15] N. Agarwal, A. Bandeira, K. Koiliaris, and A Kolla. Multisection in the Stochastic Block Model using Semidefinite Programming. arXiv:1507.02323, July 2015. [AL14] A. Amini and E. Levina. arXiv:1406.5647, June 2014. On semidefinite relaxations for the block model. [AS15a] E. Abbe and C. Sandon. Community detection in general stochastic block models: fundamental limits and efficient recovery algorithms. In 56th Annual IEEE Symposium on Foundations of Computer Science (FOCS), 2015. [AS15b] E. Abbe and C. Sandon. Recovering communities in the general stochastic block model without knowing the parameters. Advances in Neural Information Processing Systems 28 (NIPS), 2015. 25 [Ban15] A. S. Bandeira. Random laplacian matrices and convex relaxations. arXiv preprint arXiv:1504.03987, 2015. [BS95] Avrim Blum and Joel Spencer. Coloring random and semi-random k-colorable graphs. Journal of Algorithms, 19(2):204–234, 1995. [CL15] T. Cai and X. Li. Robust and computationally feasible community detection in the presence of arbitrary outlier nodes. Ann. Statist., 43(3):1027–1059, June 2015. [CSX12] Y. Chen, S. Sanghavi, and H. Xu. Clustering sparse graphs. In Advances in neural information processing systems, pages 2204–2212, 2012. [CSX14] Yudong Chen, Sujay Sanghavi, and Huan Xu. Improved graph clustering. IEEE Transactions on Information Theory, 60(10):6440–6455, 2014. [DKMZ11] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Physical Review E, 84(6):066106, December 2011. [FJ94] A. Frieze and M. Jerrum. Improved approximation algorithms for MAX k-CUT and MAX BISECTION. Technical Report ECS-LFCS-94-292, University of Edinburgh, 1994. [FK01] U. Feige and J. Kilian. Heuristics for semirandom graph problems. Journal of Computing and System Sciences, 63:639–671, 2001. [GV15] O. Guédon and R. Vershynin. Community detection in sparse networks via Grothendieck’s inequality. Probability Theory and Related Fields, 2015. [GW95] M.X. Goemans and D.P. Williamson. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. J. ACM, 42(6):1115– 1145, November 1995. [HLL83] P. W. Holland, K. B. Laskey, and S. Leinhardt. Stochastic blockmodels: First steps. Social networks, 5(2):109–137, 1983. [HWX15a] B. Hajek, Y. Wu, and J. Xu. Achieving exact cluster recovery threshold via semidefinite programming. In 2015 IEEE International Symposium on Information Theory (ISIT), pages 1442–1446, June 2015. [HWX15b] B. Hajek, Y. Wu, and J. Xu. Achieving Exact Cluster Recovery Threshold via Semidefinite Programming: Extensions. arXiv:1502.07738, February 2015. [JMR16] A. Javanmard, A. Montanari, and F. Ricci-Tersenghi. Phase transitions in semidefinite relaxations. Proceedings of the National Academy of Sciences of the United States of America, 113(16):E2218–23, 2016. [LR15] J. Lei and A. Rinaldo. Consistency of spectral clustering in stochastic block models. Ann. Statist., 43(1):215–237, February 2015. [Mas14] L. Massoulié. Community detection thresholds and the weak Ramanujan property. Proceedings of the 46th Annual ACM Symposium on Theory of Computing (STOC ’14), pages 694–703, 2014. 26 [MMV16] K. Makarychev, Y. Makarychev, and A. Vijayaraghavan. Learning communities in the presence of errors. In 29th Annual Conference on Learning Theory, pages 1258–1291, 2016. [MNS13] E. Mossel, J. Neeman, and A. Sly. A Proof Of The Block Model Threshold Conjecture. arXiv:1311.4115, November 2013. [MNS14] E. Mossel, J. Neeman, and A. Sly. Reconstruction and estimation in the planted partition model. Probability Theory and Related Fields, pages 1–31, 2014. [MPW16] A. Moitra, W. Perry, and A. S. Wein. How robust are reconstruction thresholds for community detection? In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, pages 828–841. ACM, 2016. [MS16] A. Montanari and S. Sen. Semidefinite programs on sparse random graphs and their application to community detection. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, pages 814–827. ACM, 2016. [RJM16] F. Ricci-Tersenghi, A. Javanmard, and A. Montanari. Performance of a community detection algorithm based on semidefinite programming. In Journal of Physics: Conference Series, volume 699, pages 12015–12025. IOP Publishing, 2016. A Proof of Lemma 1 In this appendix we verify, for all 0 < q < p < 1, that q < ω < p, where ω= log(1 − q) − log(1 − p) . log p − log q + log(1 − q) − log(1 − p) The proof is an elementary computation using the bound: both inequalities strict unless x = 1. For the lower bound, we proceed as follows: x−1 x ≤ log x ≤ x − 1 for all x > 0, with log pq 1 =1+ 1−q ω log 1−p <1+ p q 1−q ( 1−p and for the upper bound, we proceed similarly: −1 1  1−q = , q − 1) ( 1−p ) log pq 1 =1+ 1−q ω log 1−p >1+ p/q−1 p/q 1−q 1−p − 1 so that the result follows by taking reciprocals. 27 = 1 , p B Proof of Proposition 4 In this appendix, we establish a closed form for the CH-divergence in the planted partition model. The CH-divergence is defined in [AS15a] as X πk (tQ̃ik + (1 − t)Q̃jk − Q̃tik Q̃1−t D+ (i, j) = sup jk ), t∈[0,1] k summing over all communities k including i and j. (The limits on t are unimportant: one can show that the supremum over t ∈ R always lies in [0, 1].) Note that if Q̃ik = Q̃jk then the k term of this sum vanishes. In the planted partition model, we have Q̃ii = Q̃jj = p̃, Q̃ij = Q̃ji = q̃, and Q̃ik = q̃ = Q̃jk for all other k. In particular, only the i and j terms of the sum will contribute. Thus: D+ (i, j) = sup tp̃πi + (1 − t)q̃πi + tq̃πj + (1 − t)p̃πj − πi p̃t q̃ 1−t − πj p̃1−t q̃ t t = sup t(p̃ − q̃)(πi − πj ) + πi q̃(1 − (p̃/q̃)t ) + πj p̃(1 − (p̃/q̃)−t ). t Substituting u = t/(log p̃ − log q̃), we obtain D+ (i, j) = sup uτ (πi − πj ) + πi q̃(1 − eu ) + πj p̃(1 − e−u ) u≥0 where τ is as defined in Proposition 4. As the supremand is smooth and concave in u, we can set the derivative in u equal to zero in order to maximize it: 0 = τ (πi − πj ) − πi q̃eu + πj p̃e−u , which is quadratic in eu , and can be solved via the quadratic formula: p τ (πi − πj ) + τ 2 (πi − πj )2 + 4πi πj p̃q̃ u . e = 2πi q̃ To obtain the simplest possible form for D+ , it is worth also solving for e−u : p −τ (π − π ) + τ 2 (πi − πj )2 + 4πi πj p̃q̃ i j e−u = . 2πj p̃ Dividing these two expressions, we obtain e2u = πj p̃ τ (πi − πj ) + γ , πi q̃ τ (πj − πi ) + γ p where γ = τ 2 (πi − πj )2 + 4πi πj p̃q̃. We now express u as half the log of this quantity. Substituting back into the divergence, we obtain   πj p̃ τ (πi − πj ) + γ 1 · , D+ (i, j) = πi q̃ + πj p̃ − γ + τ (πi − πj ) log 2 πi q̃ τ (πj − πi ) + γ thus proving the proposition. 28 C Proof of Proposition 6 In Proposition 4, we found that D+ (i, j) = η(p̃, q̃, πi , πj ) for a certain explicit function η. We wish to see that η is monotone increasing in its third and fourth parameters. This implies, for example, that when checking whether exact recovery is possible in the planted partition model, it suffices to check that the divergence is at least 1 between the two smallest communities. Note that η(a, b, αc, αd) = αη(a, b, c, d), and that η(a, b, c, d) = η(a, b, d, c), so it suffices to show that η(p̃, q̃, s, 1) is monotone in s. ∂ η ≥ 0. We will show this, in turn, by showing that As η is smooth, we will show that ∂s 2 ∂ ∂ lims→0 ∂s η ≥ 0 and that ∂s2 η ≥ 0. • We first compute: p 1 h ∂ 2q̃s − ω 2 (s − 1)2 + 4p̃q̃s η(p̃, q̃, s, 1) = ∂s 2s !!# p p̃ −τ (s − 1) + τ 2 (s − 1)2 + 4p̃q̃s p , +τ 1 − s + s log q̃s τ (s − 1) + τ 2 (s − 1)2 + 4p̃q̃s p τ 2 (1 + s)2 + 2p̃q̃s − τ (1 + s) τ 2 (s − 1)2 + 4p̃q̃s ∂2 p . η(p̃, q̃, s, 1) = ∂s2 2s2 τ 2 (s − 1)2 + 4p̃q̃s • To see that the second partial is non-negative, it suffices to see that the numerator is nonnegative: p ? τ 2 (1 + s)2 + 2p̃q̃s ≥ τ (1 + s) τ 2 (s − 1)2 + 4p̃q̃s Both sides are non-negative, so it is equivalent to compare their squares: ? τ 4 (1 + s)4 + 4p̃q̃sτ 2 (1 + s)2 + 4p̃2 q̃ 2 s2 ≥ τ 2 (1 + s)2 (τ 2 (s − 1)2 + 4p̃q̃s) which is evidently true when s ≥ 0. • To see that the limit lims→0 ∂ ∂s η is non-negative, we first compute it: q̃ p̃ −p̃q̃ p̃ log τ − q̃ log τ ∂ η= + . lim s→0 ∂s τ log p̃ − log q̃ We now divide through through by q̃, and set α = p̃ q̃ and β = τq̃ , noting that 1 ≤ β ≤ α: 1 ∂ 1 1 lim η = α(1 − ) + β log s→0 q̃ ∂s β β 1 1 ≥ α(1 − ) − β(1 − ) β β 1 = (α − β)(1 − ) ≥ 0. β This proves the proposition. 29
8cs.DS
Spreadsheet Debugging Yirsaw Ayalew Department of Computer Science Addis Ababa University P.O.Box 1176 Addis Ababa, Ethiopia [email protected] Roland Mittermeir Institut of Informatics-Systems University of Klagenfurt Universitätsstr. 65-67, A-9020, Klagenfurt, Austria [email protected] ABSTRACT Spreadsheet programs, artifacts developed by non-programmers, are used for a variety of important tasks and decisions. Yet a significant proportion of them have severe quality problems. To address this issue, our previous work presented an interval-based testing methodology for spreadsheets. Interval-based testing rests on the observation that spreadsheets are mainly used for numerical computations. It also incorporates ideas from symbolic testing and interval analysis. This paper addresses the issue of efficiently debugging spreadsheets. Based on the interval-based testing methodology, this paper presents a technique for tracing faults in spreadsheet programs. The fault tracing technique proposed uses the dataflow information and cell marks to identify the most influential faulty cell(s) for a given formula cell containing a propagated fault. Keywords: spreadsheet debugging, fault tracing, spreadsheets, end-user programming 1. INTRODUCTION Spreadsheet systems are widely used and highly popular end-user systems. They are used for a variety of important tasks such as mathematical modeling, scientific computation, tabular and graphical data presentation, data analysis and decision-making. Many business applications are based on the results of spreadsheet computations and consequently important decisions are made based on spreadsheet results. As we cannot assume professionalism of spreadsheet developers in writing and testing their spreadsheet programs, we cannot assume professionalism in debugging. Therefore, this paper presents an approach to help users in identifying cells containing actually faulty entries. The unifying property of spreadsheet applications is that they involve numeric computations. Numeric computations constitute the primary turf of spreadsheets, in spite of the fact that the spreadsheet model finds derived applications in other areas too. These are as diverse as information visualization [7], concurrent computation [22, 23], or user interface specifications [10], to name just a few. There is also a trend towards using the spreadsheet model as a general model for end-user programming [14]. Despite their popularity due to their ease of use and suitability for numerical computations, a significant proportion of spreadsheet programs have severe quality problems. In recent years, there has been an increased awareness of the potential impact of faulty spreadsheets on business and decision-making. A number of experimental studies and field audits [5, 9, 15, 16, 17, 18, 19, 20] have shown the serious impact spreadsheet errors have on business and on decisions made on the basis of results computed by spreadsheets. In contrast to the professional use of the results computed by spreadsheets, the development of these results is less professional. The developers of spreadsheets are mainly end users who are not expected to follow a formal process of software development although the sheets they produce are of the nature of regular programs and quite often reach the complexity of typical data processing application software1 . Nevertheless, spreadsheet developers rather uncritically rely on the initial correctness of their programs. To address this problem, our previous work [3, 4, 13, 24] presented an interval-based testing methodology for spreadsheets. The interval-based testing methodology was proposed based on the premise that spreadsheet developers are not software professionals. The approach takes into account inherent characteristics of spreadsheets as well as the conceptual models of spreadsheet programmers. It also incorporates ideas from symbolic testing and interval analysis. Interval-based testing focuses on the functionality of spreadsheet formulas instead of the internal structure of a spreadsheet program (i.e., it is not based on a traditional code coverage criterion). With interval testing, cells containing suspicious values are identified. But as with conventional programming, the spot where a wrong value figures is not necessarily the location of the fault in the program. This might be some step in the algorithm that has been executed on the way to the respective output statement. Since with spreadsheets, basically all intermediate results of computations are visible on the user interface (exceptions are only computations within a cell and computations in hidden cells), the issue of directing spreadsheet users from the cell containing a wrong result to the cell containing the wrong formula becomes specifically important. Based on the interval-based testing methodology, this paper presents a technique for tracing faults in a spreadsheet program. Cells whose value is outside a computed interval (see section 2) are referred to as cells containing a symptom of fault. The issue is, given a formula cell with a symptom of fault which depends directly and/or indirectly on other cells which have symptoms of faults, how to identify the most influential faulty cell. If we can identify the most influential faulty cell, then correcting that cell may correct many of the cells showing incorrect values, which are dependent on it thereby simplifying the debugging process. The fault tracing approach uses information from the interval-based testing system about the verification status of the cells, dataflow information, and priority values of cells. 1 For this reason, we refer to the system of interlinked data and formula cells of a spreadsheet also as “spreadsheet program” This paper is organized as follows: Section 2 briefly describes the interval-based testing methodology. Section 3 discusses the general problem of fault tracing in relation to conventional software debugging techniques and spreadsheet debugging. Section 4 discusses the fault tracing strategy supported by the tool developed to support intervalbased spreadsheet analysis. While tracing for faults, there is a need for minimizing the search region. This requires the identification of those faulty cells, which have a higher likelihood of containing the most influential faulty cell(s). This is presented in Section 4.1. An example and a fault tracing algorithm are described in this same section. Finally, the main points of the fault tracing approach are summarized in Section 5. 2. INTERVAL-BASED TESTING Generally, the main task in testing a program is to be able to detect the existence of symptoms of faults in the program. By running the program with test cases and comparing the result with the expected outcome described in the specification or generated by a test oracle, the existence of a fault can be detected. However, in spreadsheet programming most spreadsheet programmers do not have the expertise to design and execute effective test cases. In the absence of a specification and automated test oracle, the user plays the role of a test oracle and provides the expected outcome during testing. The root of spreadsheet programming lies in the definition of formulas. In spreadsheets, users want to make sure that their spreadsheet formulas are correct with respect to the actual data that they need for their applications instead of arbitrary data chosen for testing purposes (this does not include those who develop templates). Hence, the reasonableness of the computed value is used to judge the validity of the formula. Users usually have a gut feeling of the range of reasonable values for each given cell. Interval-based testing is proposed to check the existence of symptoms of faults in formulas, which are defined for numerical computations. Spreadsheets are mainly used for numerical computations by end users. Hence, we require from the user a vision of the ranges of possible values of formula computations. Interval-based testing requires the user to specify for a given spreadsheet on a mirror image of the sheet intervals expected for the desired input and formula cells respectively. For numeric input cells, the user specifies the range of reasonable values in the form of intervals, which serve as input domains. For formula cells, the user specifies the expected outcome of the formula again in the form of intervals. The prototype system developed in the context of [3], an add on to spreadsheet packages like MS-Excel, allows also for selective specification of such expected intervals. It mirrors the user’s sheet by means of an interval-value sheet containing boundaries within which the spreadsheet user expects the result of a formula to be. Further, an interval-formula sheet where such boundaries are derived based on the formulas of the users actual sheet by means of interval arithmetic applied to the intervals given for input cells is established by the system. The attached intervals will be stored as strings (since the spreadsheet system used with the prototype neither supports interval data types nor allows user defined data types) in a behind-thescene spreadsheet using the same cell coordinates as the cells in the ordinary spreadsheet. Figure 1: Architecture of the prototype supporting the interval-based testing methodology In figure 1, Ordinary spreadsheet is the usual spreadsheet defined by the user in which computation is based on discrete values. Expected spreadsheet is a behind-the scene spreadsheet which contains expected intervals for input and formula cells as given by the user. For a formula defined at the ordinary spreadsheet, the formula is evaluated based on the interval values stored in the expected spreadsheet and the resulting interval will be stored as an interval string in the respective cell in the bounding spreadsheet. In some cases, a user may not attach input and expected intervals for some input and formula cells. In such situations, the discrete values of the cells from the ordinary spreadsheet are used during interval computation as intervals of width zero. The bounding spreadsheet, which is a behind-the-scene spreadsheet, contains computed bounding interval values. A bounding interval is an interval computed by the formulas in the users regular spreadsheet with the operators in formula cells replaced by the respective interval operators. It is used to check the reasonableness of the expected interval specified by the user. Once the necessary values are available from the three sources, namely, spreadsheet computation, user expectation, and interval computation, the comparator may determine the existence of symptoms of faults. Whenever there is a discrepancy between spreadsheet computation, user expectation and interval computation, the comparator marks those cells with symptoms of faults and those which seem to be correct in different colors. Finally, among those cells with symptoms of faults which contribute to a faulty cell, the most influential cell is identified using the fault tracer. A discussion of the fault tracer is the main subject of this paper. 3. FAULT TRACING BACKGROUND Once symptoms of faults are detected, the next task is to find the location of the actual faults. A testing system cannot exactly indicate the location of faults; it rather provides a hint or a symptom of a fault. However, a testing system can facilitate the search for the location of faults by providing testing information about the possible paths that lead to the likely fault location. A symptom of fault is a signal indicating the existence of a possible fault. A symptom of fault is generated whenever there is a discrepancy between the expected behavior of a program and its actual behavior. Fault tracing is the process of identifying the location of faults in a program. In the following sections, we discuss the process of debugging conventional software and spreadsheet debugging. 3.1 Debugging conventional software Generally, fault tracing in conventional software debugging involves program slicing techniques to minimize the search for the potential faults [1, 2, 8, 11]. The first important information needed in fault tracing is to compute a static backward slice. It contains all variables that may affect the variable at which a symptom of fault is detected at a given statement. Since a symptom of fault is generated based on a particular test case, those variables, which are directly and/or indirectly involved in the current computation will contain the statement producing the faulty variable provided that the fault is not due to missing statements. This requires the computation of dynamic backward slices. In order to reach the potential faulty variables, further reduction of the dynamic backward slice should be made using the technique of dicing. Dicing is carried out by removing the sub-slice corresponding to correct variables. However, the use of dicing imposes some preconditions to be satisfied in order for the resulting dice to contain the fault [12]. For example, dicing assumes that only one faulty variable exists in the dynamic backward slice. In addition, it assumes that if a variable is faulty then all variables in the dynamic forward slice of that variable are faulty. This misses situations where faults compensate within the slice. Hence, the general process of fault tracing in conventional software can be described as follows. Static slice → Dynamic slice → Dice → Potential location of fault 3.2 Spreadsheet debugging The problem in spreadsheet debugging is: given a formula cell with a symptom of fault but not having a fault in the formula, how to identify the faulty cell among those cells on which the given cell directly and/or indirectly depends. Since this analysis shows only cells with deviations between discrete and interval computations, we can only cautiously speak of symptoms of faults. The deviating cells might well result from propagations. In some cases, a symptom of fault can be generated even though there is no fault in the formula. This happens when the user expectation is specified incorrectly and due to propagation of faulty values. As the conceptual view of a spreadsheet program is based on data dependency relations, spreadsheets can be considered as dataflow driven. On the other hand the conceptual view of a procedural program is control flow-driven. In spite of this difference, a similar procedure to conventional software debugging can be used for fault tracing in spreadsheets. Therefore, the notion of a slice is not directly applicable. We have rather a set of cells linked just by dataflow connection. Nevertheless, for the sake of comparison, we refer to this set as slice. However, in our approach we do not impose the requirement that the dynamic backward slice contains only one faulty cell. There can be several cells in the dynamic backward slice of a faulty cell which are marked as faulty. Cell marking is performed based on the result of the comparison made by the comparator as described in section 2. The fault tracing procedure uses the backward slice and the cell marks recorded by the interval-based testing system. The fault localization technique, proposed by DeMillo et al. [8], was based on the analysis of the steps used by programmers experienced in debugging. Following a similar procedure, the spreadsheet fault tracing process contains the following steps: 1. Determine the cells (directly and/or indirectly) involved in the computation of an incorrect formula (i.e., look backward) 2. Select suspicious cells 3. Form hypotheses about suspicious cells Step 1 requires the computation of ”backward slices” with respect to a faulty cell for which we want to locate the source of the fault. Step 2 requires the identification of those cells, which have a likelihood of propagating faults through the data flow. These cells are marked by the comparator during the verification process. The comparator determines the existence of a symptom of a fault for a formula cell by comparing the usual spreadsheet computation, user expectation, and interval computation (see figure 1). Step 3 requires reasoning about the most influential cell. In other words, this step involves the computation of the priority values for the suspicious cells and the identification of the one, which has the highest likelihood of contributing to the faulty cells in the dynamic backward slice. If the fault is local, i.e., either the formula or the expected interval of the given cell is specified incorrectly, then the fault can be fixed by examining the faulty cell itself. If the fault is not local, we are looking for the most influential cell. The assumption in this approach is that if the most influential faulty cell is found, then correcting this cell may correct many of the dependent faulty cells in the data dependency graph, thereby reducing the remaining task of the spreadsheet debugging process. To address this problem, we propose an approach using priority setting based on the number of incorrect precedents and dependents. To do so, we rely on the dynamic backward slice of a given faulty cell as we are dealing with propagated faults. A similar approach was proposed by Reichwein et al. [21] for debugging Form/3 programs. In this approach, a user marks cells as correct and incorrect and based on the all-uses dataflow test adequacy criterion, the degree of testedness of formulas is compu- ted. Cells are given different colors based on their degree of testedness. Fault tracing is performed based on the degree of testedness of cells and by computing the fault likelihood of cells. Fault likelihood is computed based on the number of correct and incorrect dependents of a cell. During the fault localization process, for the cell under consideration, the cells in the dynamic backward slice will be highlighted in different colors based on their degree of testedness. The further process of fault localization is carried out by performing testing using additional test cases. This approach requires the user to provide different test cases to localize the faulty cell. The work proposed by Chen and Chan [6] presented a model for spreadsheet debugging. This work described the cognitive aspects of spreadsheet debugging and provided the essential episodes, which could be applied to the debugging process in spreadsheets. Our approach does not require the user to provide different test cases since we cannot assume a sufficient testing discipline. As users are working on actual data that they need for their applications, it is likely that they need to know the correctness of their spreadsheets based on the actual data instead of arbitrary data chosen just for testing purposes. The fault tracing approach presented here requires the computation of priority values based on the verification status of precedent cells. If this is not sufficiently discriminating the priority values are also based on dependent cells. 4. FAULT TRACING STRATEGY This section describes how the fault tracing approach works and presents an example to illustrate the approach. Finally, a fault tracing algorithm is provided. The fault tracing strategy proposed uses information from different sources to locate the most influential faulty cell. The first information that we need is the dataflow information. This information is already available since it is used by the spreadsheet system during the evaluation of formulas. For example, in Microsoft Excel, this information is used by its built-in auditing tool to show the backward and forward slices of cells of interest one level at a time. While traversing the backward slice, we need a mechanism of selecting the cells, which have a likelihood of being the most influential faulty cells. This information can be obtained from the testing system as cells are marked with different colors depending on the existence of symptoms of faults. Hence, cell marks are used to guide the search process. During traversing the backward slice, the verification status of cells is used to guide the search to the path where the most influential faulty cell may be located 4.1 Search for the most influential faulty cell During the verification process, cells in a spreadsheet are categorized into three groups. These are cells with symptoms of faults, cells without symptoms of faults, and cells, which are unchecked. Those cells with symptoms of faults are of interest during the process of identifying the most influential faulty cell(s). The search for the most influential faulty cell(s) of a given cell is based on the number of faulty precedents and the contribution of the faulty precedents to incorrect dependents. A cell, which has many faulty precedents, is more likely to contain the most influential cell(s) than the one with few faulty precedents. In addition, a faulty cell, which has more incorrect dependents, is more influential than the one with few incorrect dependents. Furthermore, those faulty cells, which are at a higher level of the data dependency graph (i.e., near the input cells) are more influential than those at the lower level of the data dependency graph. Therefore, correcting faulty cells at the highest level of the data dependency graph may correct cells showing incorrect values (without being actually faulty), which are dependent on the corrected cell thereby reducing the effort of the debugging process. 4.2 An example Let us consider the cost calculation spreadsheet shown in figure 2(a). Figure 2(e) depicts the spreadsheet with those cells, which have symptoms of faults highlighted. Those cells, which have symptoms of faults, are shaded red by the interval-based testing system (dark in this paper) and those without symptoms of faults are shaded yellow (light grey in this paper). For a demonstration purpose, intervals were attached only for cells in column D and hence verification is done only for this column. Suppose the user wants to trace the most influential faulty cell for the final result of the computation in cell D9. Actually, the first thing to examine is the faulty cell itself. If the formula and the expected interval attached are correct, then the fault is due to referencing a faulty cell. In such cases, we need to trace the source of the fault. In the example given, the task in column D was to compute the personal cost based on the fixed amount given in cell D4 for each location. However, the user made a referencing error. Cell D4 should have been used as an absolute reference in the formula of D5 as it is copied downward. An error of referencing will have an effect on the copies and not on the source. As a result, the cells D6, D7, and D9 are marked as faulty. The direct precedents of cell D9 are cells D5, D6, and D7 (see figure 3). The direct precedents fall into the two categories: correct (those without symptoms of faults) and faulty. The faulty category, which contains cells D6 and D7, is the candidate for further investigation. The next task is to identify which one of D6 and D7 contains the most influential faulty cell. Since they have equal verification status, we check the number of their faulty direct precedents and dependents. D6 has no faulty precedents but D7 has one faulty precedent, D6. Therefore, the path to D7 should be followed to locate the most influential faulty cell. Next, we check the faulty precedents of D7. It has only one precedent cell, D6, which is marked as faulty. Among the precedents of D6, there is no faulty precedent. Therefore, cell D6 is considered to be the most influential faulty cell and as a result, whenever the user requests for the most influential faulty cell for cell D9, the system highlights the cell D6. However, if two or more faulty cells have equal number of faulty direct precedents, then we need to consider also the number of their direct dependents. While using the number of faulty direct dependents, there are two possibilities to consider. • the number of faulty direct dependents combined with the number of faulty direct precedents • the number of faulty direct dependents when the number of faulty direct precedents are equal (a) Cost computation (b) Formula view (c) Expected spreadsheet (d) Bounding spreadsheet (e) A spreadsheet with symptom of faults Figure 2: Interval-based testing in action Figure 3: Data dependency graph for cell D9 If we use the first choice, we may find the most influential cell without going far in the data dependency graph. This influential cell may not be the most influential for the faulty cell under consideration but it contributes to many other faulty dependent cells. Therefore, correcting this cell may also correct many other cells, which are not in the dynamic backward slice of the cell under consideration. This option identifies the most influential cell in terms of the number of incorrect dependents of a cell. If we use the second choice, then we can reach to the most influential cell with respect to the cell under consideration, which is at a higher level in the data dependency graph. Therefore, correcting this cell may correct many cells in the dynamic backward slice of the cell under consideration. Though both options provide the possibility of correcting many cells, we prefer to locate the most influential cell using the second option as this identifies the most influential cell for the cells in the dynamic backward slice. In the case where two or more faulty cells have equal number of faulty precedents and dependents, one of them will be chosen arbitrarily. 4.3 Fault tracing algorithm The algorithm for identifying the most influential faulty cell is presented in algorithm 1 for propagated faults. Let Ce be the erroneous cell we are interested in to identify it’s most influential faulty cell(s). Algorithm 1: Algorithm to identify the most influential faulty cell 1: 2: 3: 4: 5: 6: 7: 8: 9: GE = {Ci|Ci is a direct precedent of Ce and Ci has a symptom of fault}. If GE =∅, then Ce is the most influential faulty cell and stop. Compute the faulty direct precedents of elements of GE. GEEi = {Cij| Cij is a direct precedent of Ci and Cij has a symptom of fault}. Extract precedents with maximal number of second order precedents GGEE = {Ci such that |GEEi| is maximal}. If GGEE is singleton, repeat from step 1 with Ce ∈ GGEE. If |GGEE| > 1 compute the faulty direct dependents of Ci. GEDi = {Dij |Dij depends on Ci and Dij has a symptom of fault}. Extract precedents with maximal number of second order precedents and maximum number of dependents GED = {Ci|Ci ∈ GGEE and |GEDi| is maximal} If GED is singleton, repeat from steps 1 with Ce ∈ GED. If |GED| > 1 take arbitrarily Ci ∈ GED and repeat from step 1. Thus, departing from erroneous cell Ce, first a section of the backward slice is computed in such a way that at each step, one aims to reduce a branching slice to the most promising singleton (steps 1 to 5). If this attempt terminates in a situation where the algorithm cannot decide which cell in a set of faulty candidates is most influential, it changes direction and computes the forward slice from the respective dependents, assuming that the root having most dependents is the one the user should look at first. 5. CONCLUSION Debugging involves the identification of the location of the actual faults and fixing the faults given testing revealed some incorrect values. Since most spreadsheets are not produced by software professionals, this process calls for machine support. In spreadsheets, the identification of cells with symptoms of faults and those without symptoms of faults is carried out by the testing system (i.e., interval-based testing). As spreadsheets are dataflow-driven, faults are propagated in the direction of the dataflow. Therefore, we need a mechanism of identifying the most influential faulty cell in the data dependency graph against the direction of the data flow, so that correcting it may correct many cells in the data dependency graph thereby simplifying the debugging process. In this paper, we have presented a technique for the identification of the most influential faulty cell(s) for a given faulty cell, which has a propagated fault. Unlike conventional software fault localization techniques, which apply dicing, we do not limit the number of faulty cells in the dynamic backward slice of the cell under consideration to one. Several cells with symptoms of faults can appear in the analog of a dynamic backward slice of a given faulty cell. For the identification of the most influential faulty cells, the fault tracing strategy uses the dataflow information, which is available from the spreadsheet language and the cell marks obtained from the testing system. Path selection is based on the number of faulty precedent and dependent cells. 6. REFERENCES [1] H. Agrawal, R. A. DeMillo, and E. H. Spafford. Debugging with Dynamic Slicing and Backtracking. Software Practice & Experience, 23(6):589–616, June 1993. [2] H. Agrawal, J. R. Horgan, S. London, and W. E. Wong. Fault Localization using Execution Slices and Dataflow Tests. Proceedings of the 6th International Symposium on Software Reliability Engineering, pages 143–151, October 1995 [3] Y. Ayalew. Spreadsheet Testing Using Interval Analysis. PhD thesis, Klagenfurt University, November 2001. [4] Y. Ayalew, M. Clermont, and R. T. Mittermeir. Detecting Errors in Spreadsheets. Proceedings of EuSpRIG 2000 Symposium Spreadsheet Risks, Audit & Development Methods, pages 51–62, July 2000. [5] P. S. Brown and J. D. Gould. An Experimental Study of People Creating Spreadsheets. ACM Transactions on Office Information Systems , 5(3):258–272, July 1987. [6] Y. Chen and H. C. Chan. An Exploratory Study of Spreadsheet Debugging Processes. The 4th Pacific Asia Conference on Information Systems, pages 143–155, 2000. [7] E. H. Chi. A Framework for Information Visualization Spreadsheets. PhD thesis, University of Minnesota, March 1999. [8] R. A. DeMillo, H. Pan, and E. H. Spafford. Critical Slicing for Software Fault Localization. International Symposium on Software Testing and Analysis, pages 121–134, January 1996. [9] M. Clermont, C. Hanin, and R. Mittermeir. A Spreadsheet Auditing Tool Evaluated in an Industrial Context. Proc. Spreadsheet Risks, Audit and Development Methods, vol 3, pages 35 – 46, EUSPRIG, July 2002. [10] S. E. Hudson. User Interface Specification Using an Enhanced Spreadsheet Model. ACM Transactions on Graphics, pages 209–239, 1994. [11] B. Korel and J. Rilling. Application of Dynamic Slicing in Program Debugging. Proceedings of the 3rd International Workshop on Automatic Debugging, pages 43– 57, May 1997. [12] J. R. Lyle and M. Weiser. Automatic program bug location by program slicing. Proceedings of the 2nd International Conference on Computers and Applications, pages 877–883, June 1987. [13] R. Mittermeir, M. Clermont, and Y. Ayalew. User-Centered Approaches for Improving Spreadsheet Quality. Technical Report ISYS-MCA-2000-01, Institute for Informatics-Systems, University of Klagenfurt, August 2000. [14] B. A. Nardi and J. R. Miller. The Spreadsheet Interface: A Basis for End User Programming.Technical Report HPL-90-08, Hewlett-Packard Software Technology Laboratory, March 1990. [15] R. R. Panko. What we Know About Spreadsheet Errors. Journal of End User Computing: Special issue on Scaling Up End User Development, 10(2):15–21, 1998. [16] R. R. Panko. Applying code inspection to spreadsheet testing. Journal of Management Information Systems, 16(2):159–176, 1999. [17] R. R. Panko. Spreadsheet Errors: What We Know.What We Think We Can Do. Proceedings of EuSpRIG Symposium Spreadsheet Risks, Audit & Development Methods, pages 7–14, July 2000. [18] R. R. Panko. Two Corpuses of Spreadsheet Errors.Proceedings of the 33rd Hawaii International Conference on System Sciences, 2000. [19] R. R. Panko and R. P. Halverson. Spreadsheets on Trial: A Survey of Research on Spreadsheet Risks.Proceedings of the 29th Hawaii International Conference on System Sciences, pages 326–335, January 1996. [20] R. R. Panko and R. H. Sprague. Hitting the wall: Errors in developing and code inspecting a ’simple’ spreadsheet model. Decision Support Systems , 22(4):337–353, April 1998. [21] J. Reichwein, G. Rothermel, and M. Burnett. Slicing Spreadsheets: An Integrated Methodology for Spreadsheet Testing and Debugging. Proceedings of the 2nd Conference on Domain Specific Languages, pages 25–38, October 1999. [22] A. G. Yoder and D. L. Cohn. Architectural Issues in Spreadsheet Languages. International Conference on Programming Languages and System Architectures, March 1993. [23] A. G. Yoder and D. L. Cohn. Real Spreadsheets for Real Programmers. International Conference on Computer Languages, pages 20–30, May 1994. [24] Y. Ayalew and R. Mittermeir. Interval-based Testing for Spreadsheets, Proceedings of International Arab Conference on Information Technology, pages 414 – 422, December, 2002.
6cs.PL
arXiv:1508.04753v1 [cs.PL] 18 Aug 2015 Cold Object Identification in the Java Virtual Machine Kim T. Briggs∗, Baoguo Zhou†, Gerhard W. Dueck‡ August 20, 2015 Abstract Many Java applications instantiate objects within the Java heap that are persistent but seldom if ever referenced by the application. Examples include strings, such as error messages, and collections of value objects that are preloaded for fast access but they may include objects that are seldom referenced. This paper describes a stack-based framework for detecting these “cold” objects at runtime, with a view to marshaling and sequestering them in designated regions of the heap where they may be preferentially paged out to a backing store, thereby freeing physical memory pages for occupation by more active objects. Furthermore, we evaluate the correctness and efficiency of stack-based approach with an Access Barrier. The experimental results from a series of SPECjvm2008 benchmarks are presented. For submission to ‘Software: Practice and Experience’ 1 Introduction Long-running Java applications [7], such as web servers and network security monitors, may preload and retain large numbers of objects within the Java heap [10] in order to allow fast application access at runtime. In many cases, some of these objects are infrequently referenced by the application. We refer to these objects, which are persistent in the Java heap but seldom referenced, as cold objects. The presence of cold objects in the heap is problematic insofar as they may be collocated in virtual memory [12] with more active objects. Any page of virtual memory that contains all or part of a cold object may also contain parts of more active objects, and application references to the active objects will prevent the ∗ IBM Canada, 770 Palladium Drive, Ottawa, ON, Canada, E-mail: [email protected] of Computer Science, University of New Brunswick, Fredericton, E3B 5A3, N.B., Canada, E-mail: [email protected] ‡ Faculty of Computer Science, University of New Brunswick, Fredericton, E3B 5A3, N.B., Canada, E-mail: [email protected] † Faculty 1 page from being swapped out of virtual memory. As a result, large applications that commit most or all of the available physical memory may experience undue memory pressure. Additionally, active objects and cold objects are co-located, when active objects are accessed, both active objects and cold objects might be loaded into cache at the same time, actually cold objects will not be accessed. Therefore, cold objects will degrade the cache-hit performance. If cold objects are collected and moved to cold regions, both page fault and cache-miss performance could be decreased. Furthermore, cold regions can be excluded from Garbage Collection (GC) [10], if they contain only leaf objects and primitive arrays. Therefore, pause times caused by the GC can be reduced as well. As the cold area becomes populated with cold objects, operating system primitives such as madvise() [11] may be used to inform the operating system that pages mapped to the cold area may preferentially be swapped out of resident memory, thereby freeing those pages for occupation by more active objects. The cold area can then be monitored, for example, with continuous reference sampling and periodic calls to mincore(), to detect when presumed cold objects become active and to take appropriate action. Management of cold objects is most relevant in the context of long-running applications with large heap requirements. For that reason, the balanced garbage collection [2, 1, 15] (GC) framework was selected as a basis for investigating cold object management. The balanced collector improves application performance by partitioning the heap into a large number of regions of equal size and limiting the number of regions that are included for collection in partial GC cycles. This reduces the frequency of more time-consuming global GC cycles, which involve all heap regions. In this paper, we present a stack-based framework to identify cold objects. Cold objects have been identified and harvested successfully in many SPECjvm2008 [16, 17] applications. At the same time, we evaluate the correctness and efficiency of stack-based solution with an Access Barrier mechanism [14]. All experiments are performed on IBM’s J9 Virtual Machine (JVM) [3]. 2 Stack-Based Cold Object Identification Framework A stack-based framework is used to identify and harvest cold objects. The framework supports identification and collection of cold objects. The main idea of the measurement of cold objects is to periodically walk thread-local stacks and mark active references. Whenever a Java method is invoked, a new stack frame will be generated. Since local variables and passed arguments [7] will be stored in the stack frame, object references corresponding to local variables and passed arguments in the current stack frame are considered to be active. After a period of time when no new active objects are being discovered, subtraction of the collection of objects found to be active from the collection of live objects 2 reveals the collection of live, inactive (cold) objects. Once they have been identified, cold objects can be harvested form the main heap and sequestered in a designated cold area. 2.1 Cold Region Reservation and Instrumentation When the JVM [10] starts, a preset number of contiguous regions are reserved for the cold area. Cold regions are excluded from copy forward and compaction during partial GC [15] cycles, except to receive objects that have been identified as cold and copied from pinned regions, as described below. In order to preclude the need to traverse cold regions during mark/sweep [9, 18] actions, only arrays of primitive data (eg, char[]) and leaf objects (objects with no reference-valued fields) are considered as collectible cold objects. This constraint, in conjunction with the leaf object optimization feature available in the IBM Java virtual machine [3], ensures that objects within cold regions can be correctly marked but not touched by the marking scheme. This constraint can be relaxed to include Java objects that contain only primitive-valued fields. Objects that have been sequestered in cold regions are monitored for reference activity. To that end, each cold region is instrumented with an activity map containing one bit per potential object location within the region, as for the collector’s mark map. The stacks of all mutator threads are periodically walked to collect active heap references. Any mutator reference to an object within a cold region is marked by setting the corresponding bit in the activity map. The number and total size of objects that are sequestered in the cold area and the incidence of activity involving these objects are the main outcomes of interest for this paper. 2.2 Pinned Region Selection and Instrumentation When marking active objects on the heap, since objects might be moved by copyforward or compaction [5] of the GC, some regions are selected to be pinned. Pinned regions are excluded from partial GC collection sets [10] sets. That means objects in the pinned region will not move, which facilitates tracking and marking active objects. The balanced garbage collector [1] assigns a logical age to each heap region, which reflects the number of GC cycles that the contained objects have survived. Allocations of new objects occur in the youngest regions (age 0), and persistent objects are progressively copied forward into increasingly older regions until they are copied into tenured regions (age 24). In the balanced GC, tenured regions are excluded from partial GC collection sets. In order to enable detection of cold objects, a number of tenured regions are first pinned so that they are excluded from partial GC collection sets [15] cycles. This ensures that objects contained within pinned regions maintain a fixed location within the mutator address space. Pinned regions are also instrumented with activity maps to record which objects have been sampled 3 from mutator stacks. Cold objects can be identified within a pinned region, after a preset amount of time Tcold has elapsed since the most recent setting (0 → 1) of an activity bit, by subtracting the activity map from the mark map. 2.2.1 Pinned Region Selection. The region pinning framework partitions the regions of the balanced GC heap into four collections: 1. Young regions (age < 24) 2. Unpinned regions (age 24, not pinned) 3. Pinned regions (age 24, pinned) 4. Cold regions (the cold area) Unpinned regions are considered for pinning at the end of each partial GC cycle. They are selectable if they have an allocation density d (ratio of allocated bytes to region size R) exceeding a preset threshold Dhi . Additionally, the total size of potentially collectible cold objects contained in the region must be greater than 0.01R. Selectable regions are ranked at the end of each partial GC cycle according to the region pinning metric value P that reflects the volume of activity in each region: P = mma(r) ∗ d (1) where r is the number of mutator references to contained objects since the end of the previous partial GC cycle, r reflects the object activity in the region since any reference that is found on the stack frame is considered to be active. The mma(r) is the modified moving average of r with a smoothing factor of 0.875: (7 ∗ mma(rn−1 ) + rn ) ,n > 0 (2) 8 The maximum number of regions that may be pinned at any time is determined by a preset parameter Pmax . At the end of every partial GC cycle, if the number of currently pinned regions n is less than Pmax , up to Pmax n selectable regions may be pinned. Two strategies for selecting regions for pinning were implemented. The pinning strategy is determined by a JVM parameter that is interpreted when the JVM starts and remains fixed while the mutator runs. With selective pinning, only the most active selectable regions are pinned. An active selectable region must satisfy mma(r) > r > 0 and sum(r) > R, where sum(r) is the sum of r over all previous partial GC cycles. The average pinning metric value Pavg from the collection of all selectable regions with non-zero pinning metric value is computed and only regions satisfying P > Pavg are selectable for pinning. The activity maps for these regions should converge more quickly and cold object identification should be more accurate after a period (Tcold ) of quiescence. mma(r0 ) = 0; mma(rn ) = 4 The alternative pinning strategy, unselective pinning, pins in decreasing order of pinned metric value selectable tenured regions up to a preset maximum (Pmax ). Cold objects will be found only in tenured regions that persist in the heap. Unselective pinning should converge to a pinned region collection that contains all of these regions. In either case, pinned regions are unpinned, at the end of every partial GC cycle, if their density falls below a preset low density threshold Dlo , the total mass of eligible objects (primitive arrays) falls below 0.01R, or they survive a period of inactivity > Tcold and the contained collectible cold objects are moved into the cold area. All pinned regions are unpinned at the start of a global GC cycle, or when the cold area becomes full. Pinning is resumed after the global GC completes or when space becomes available in the cold area. 2.2.2 Pinned Region Instrumentation. When a region is pinned, it is instrumented with an activity map to track reference activity within the region. The activity map contains an activity bit for each mark bit. Activity bits are initially 0 and are set when a reference to the corresponding object is sampled. The region is also walked to assess the number of marked objects nmarked , the number of marked collectible objects ncollectible , and the respective total sizes mmarked and mcollectible of these collections. Three timestamps are maintained to record the time tpinned at which the region was pinned, the time tinactive of the most recent setting of an activity bit, and the time twalked that the region was most recently walked. Pinned regions are walked, and twalked is updated to the current time t, whenever t − twalked > Tcold /4. Current values for nmarked , mcollectible , mmarked , mcollectible , and d are obtained each time the region is walked. Over time, the rate at which activity bits are set will diminish, until a period of time > Tcold has elapsed with no new activity bits set. The collectible cold objects in this region can then be identified and copied into the cold area. 2.2.3 Mutator Thread Instrumentation. The primary sources for reference collection are the mutator stacks, which are periodically walked down from the top-most frame until a frame that has not been active since the most recent stack walk. Frame equality is determined on the basis of the frame base pointer and a hash of the stack contents between the frame base and stack pointers. Each mutator thread is instrumented with a fixed-length buffer for reference collection and two arrays of stack frame traces– one to hold traces from the most recent stack walk and one to hold traces from the current stack walk. References from each active frame are added to the mutator’s reference buffer. Stack walks are discontinued if the reference buffer overflows (collected references are retained for activity map updates). If the stack frame buffer for the current stack overflows, the mutator continues to walk the stack and collect 5 references while matching current frame base pointer and hash against the previous stack until a match is found. The next previous stack is then composed from the head of the current stack and the tail of the previous stack. Any missing frames between these stack segments are of little consequence–if the next stack walk continues past the end of the head segment it will fall through to the tail segment and eventually find a match, and setting the activity bits for redundant samples collected from frames with missing traces is idempotent. In addition, two timestamps wstart and wend are maintained for each mutator thread to record the start and end times of the most recent stack walk. References collected from stack walks started before the most recent GC cycle are discarded. 2.2.4 Activity Sampling Daemon. When the JVM is initialized, a thread activity sampling daemon is started to control reference activity sampling when mutator threads are executing and to harvest references collected by mutator threads. The daemon thread remains in a paused state during GC cycles. Between GC cycles the daemon interacts with mutator threads by polling each active mutator thread at approximately 1 millisecond intervals. During each polling cycle, the daemon instruments each previously uninstrumented mutator thread and signals it to start a stack walk. It harvests collected reference samples from previously instrumented mutator threads that have completed a stack walk and signals these threads to start a new stack walk. Mutator threads receive these signals and commence the stack walk at their safe point [8]. For each harvested reference sample the daemon increments the reference activity counter r for the containing region (young, pinned, unpinned, or cold). Additionally, if the referenced object is contained in a pinned or cold region, the daemon sets the corresponding bit in the region’s activity map. No explicit synchronization is required to set or test the activity bits, since they are set only on the daemon thread and tested only on the master GC thread, and these threads never access region activity maps concurrently. 2.2.5 Cold Object Collection. The region pinning framework attempts to pin a collection of tenured regions that contains as much of the mutator’s active working set as possible. This may seem counterintuitive, given that we are attempting to identify persistent objects that are almost never in the working set. Cold object identification is like looking for shadows in a windowless room—they are easier to see when the lights are turned on. Pinning the most active regions is expected to reduce the likelihood of identifying as cold objects that are actually just dormant in the context of current mutator activity. For pinned regions that are receiving few active references all or most objects would be identified as cold under a fixed Tcold threshold. 6 In the presence of high reference activity, the activity map of a pinned region can be expected to converge more quickly to a stable state where no new activity bits are being set. After a fixed time Tcold has elapsed since the last change to the state of the activity map, the pinned region will be included in the copy forward collection set for the next partial GC cycle, if the pinned region has an accurate remembered set card list and no critical regions in use. When a pinned region is included in the copy forward collection set, collectible cold objects are copied into the next available cold region while all other objects are copied into other unpinned regions. After all objects have been copied out the region is unpinned. Cold regions are instrumented as for pinned regions in order to allow reference activity to be tracked. At present, all objects that are copied to cold regions remain in the cold area, without compaction or copying, until they are collected as garbage or the mutator terminates. 3 JVM PROFILING CONFIGURATIONS All JVMs were compiled with gcc version 4.4.7 with optimization enabled (-O3). Two JVMs were produced for profiling: 1. linux: generic JVM with no reference sampling. 2. ssd-stack: stack sampling enabled. The JVM run configurations are shown in (Table 1). Table 1: Running parameters JVM linux ssd-stack ssd-stack Pinning strategy none selective unselective JIT enabled enabled enabled Run time(s) 9600 x 2 9600 x 2 9600 x 2 Tcold(s) 900 900 900 The linux and ssd-stack JVMs were each run twice with the Just-in-Time [4, 6] compiler (JIT) enabled. The only data of interest from the second runs were the SPECjvm2008 benchmark scores, which were the basis for comparison of overall performance of the linux versus ssd-stack JVMs. The ssd stack JVM was run in two modes – selective or unselective pinning – in order to permit comparison of cold object identification between these region pinning strategies. Four SPECjvm2008 [16] benchmarks (compiler.compiler, derby, xml.transform, xml.validation) were selected for profiling. The linux JVM was executed twice for each benchmark. The ssd-stack JVMs ran each benchmark twice with selective pinning and twice with unselective pinning. Each profiling run executed a single iteration of one benchmark for 9600 seconds. Sampling interval is 1 ms, and Tcold is 15 minutes. 7 All profiling runs were performed on a 1.8GHz 8 Core/16 Thread (Xeon) server running CentOS version 6.4. No other user applications were active during any of the profiling runs. 4 RESULTS The first three JVM run configurations from Table 1 (linux, ssd-stack/selective pinning, ssd-stack/unselective pinning) were used to determine the runtime heap characteristics of each SPECjvm2008 benchmark and to allow performance comparisons between the linux and ssd-stack JVMs. Heap characteristics most salient to cold object identification with activity tracking are the numbers of tenured regions and the distributions of mutator activity within young, unpinned, and pinned regions. 4.1 SPECjvm2008 Scores versus Linux Runtime performance of the ssd-stack JVMs (selective and unselective pinning) versus the linux JVM was assessed using SPECjvm2008 [16] scores for two runs of each benchmark: compiler.compiler, derby, xml.transform, and xml.validation. The resulting benchmark scores are plotted in Figure 1. (a) Compiler.compiler score (b) Derby score (c) xml.transform score (d) xml.validate score Figure 1: Running performance of the ssd-stack JVMs Performance degradation was calculated as the ratio of the difference between the linux and ssd-stack scores to the linux score. The overall average performance degradation for the ssd stack JVMs was 0.04 (4%). Performance 8 degradation ratios versus linux for all runs of the ssd stack JVMs are listed in Table 2. Table 2: Overhead caused by the feature of cold objects Pinning strategy Benchmark run compiler.compiler derby xml.transform xml.validation 4.2 1 0.02 0.04 0.06 0.04 selective 2 0.05 0.02 0.06 0.03 1 0.02 0.03 0.05 0.06 unselective 2 0.06 0.03 0.07 0.03 Garbage Collection Metrics versus Linux Summary garbage collector metrics are shown in Table 3 for all benchmark runs with the linux JVM and the ssd-stack JVM with unselective and selective pinning. Compaction times were significantly lower for all of the ssd-stack JVM runs with the compiler.compiler benchmark. Considering the average total GC times for each pair of runs, compiler.compiler had slightly better total GC times for ssd-stack unselective and selective pinning compared to linux (4% and 2% lower, respectively), as did xml.transform (4% and 5%). Average total GC times were slightly worse for derby (4% and <1% higher than linux) and xml.validation (2%, 2%). Much of the ssd stack GC overhead is incurred in compiling pinned region and cold collection statistics and streaming them to a printable log file. These statistics are informative only and can be suppressed to reduce overhead. 4.3 Region Age and Activity Figures 2a-2b represent the relative region counts (greyscale, left axis, percentage of total marked region count) and reference counts (colored lines, right axis, proportion of total reference count) for the young, unpinned, and pinned parts of the heap after each partial GC cycle. Plots are presented for unselective and selective pinning for each benchmark executed with the ssd stack JVM, using data collected from the first of two runs. Partial GC cycle counts are represented on the horizontal axes. The compiler.compiler benchmark (Figures 2a, 2b) was atypical in that it showed a predominance of young regions (over 90% of marked regions) that receive a relatively high proportion (almost 0.2) of reference activity. The other benchmarks (Figures 3a − 5b) all showed a predominance of unpinned and pinned regions that receive almost all reference activity. Regardless of pinning strategy, they also showed a tendency for an initially high concentration of reference activity within pinned regions that diminished over time. This is not surprising since both pinning strategies favor selection of regions receiving high reference activity. The activity maps of pinned regions with high reference activity tend to converge relatively quickly. Most regions are pinned early in the mutator lifecycle and remain pinned until they are cold collected, their contents 9 Table 3: GC metrics (in ms) compile.compile linux-r1 linux-r2 unselective-r1 unselective-r2 selective-r1 selective-r2 derby linux-r1 linux-r2 unselective-r1 unselective-r2 selective-r1 selective-r2 xml.transform linux-r1 linux-r2 unselective-r1 unselective-r2 selective-r1 ssd-selective-r2 xml.validation linux-r1 linux-r2 unselective-r1 unselective-r2 selective-r1 selective-r2 Compact 244 339 31 99 35 37 Compact 12,147 8,252 12,998 13,222 10,879 10,000 Compact 37 31 30 31 31 39 Compact 35 97 33 36 30 35 Copyforward 3,517,715 3,442,073 3,401,260 3,314,364 3,445,347 3,405,924 Copyforward 587,707 581,722 608,385 598,226 570,283 598,301 Copyforward 375,820 376,827 362,166 357,149 359,097 353,823 Copyforward 707,832 726,825 742,721 725,050 730,070 725,577 Glb. mrk 33 38 35 31 38 33 Glb. mrk 40 35 36 34 38 44 Glb. mrk 40 39 35 32 32 34 Glb. mrk 33 38 41 29 39 36 Incr. mark 1,166,619 1,157,656 1,112,495 1,088,048 1,128,614 1,112,630 Incr. mark 2,884 2,916 2,856 2,768 3,030 2,860 Incr. 761 773 799 814 847 813 Incr. mark 872 952 611 786 958 907 Sweep 54,731 55,105 52,078 51,770 52,869 51,835 Sweep 2,552 2,051 2,569 2,507 2,483 2,217 Sweep 342 327 328 360 362 372 Sweep 283 306 236 269 292 274 Total 4,739,401 4,655,271 4,565,965 4,454,374 4,626,962 4,570,519 Total 605,641 595,282 627,179 617,069 587,038 613,744 Total 377,126 378,127 363,486 358,513 360,498 355,211 Total 709,135 728,299 743,722 726,251 731,468 726,909 become dereferenced, or the mutator ends. When they are cold collected the remaining objects, active or not collectible, are redistributed to other unpinned regions, so that active objects tend to become more diffusely scattered over time. Most of the abrupt drops in reference activity in Figures 3a and 3b coincide with cold collection, while increases tend to be associated with region pinning events. For the compiler.compiler benchmark most of the variability in region counts involved young regions. For the other benchmarks most of the variability involved unpinned regions. For all benchmarks the pinned region count was relatively stable, although more replacement occurred with unselective pinning. Ideally, pinned regions selection should result in a higher proportion of reference activity within pinned regions. Also, this should be realized by pinning as few regions as possible. By that measure, selective pinning outperformed unselective pinning for the compiler.compiler and xml.validation benchmarks and slightly underperformed for derby and xml.transform. The compiler.compiler workload mainly involves younger regions. It pro- 10 (a) Compiler.compiler, Pinning Unselective (b) Compiler.compiler, Selective Pinning Figure 2: Compiler.compiler Activity duced on average about 49 tenured regions, and most of these persisted for the duration of the run. With unselective pinning (Figure 2a) about 32 regions were typically pinned and they received about 33% of reference activity on average. With selective pinning (Figure 2b) only 2 regions were typically pinned and they received about 45% of reference activity on average. (a) Derby, Unselective Pinning (b) Derby, Selective Pinning Figure 3: Derby Activity The derby benchmark produced a greater and more stable population of tenured regions, with a large number (>500) persisting over the course of the run. This is not surprising since derby loads an entire database into the heap before the benchmarking iteration starts and retains these objects for the duration of the run. With unselective pinning (Figure 3a) the maximum number Pmax of regions (256) were typically pinned at any time and they received about 69% of reference activity on average. With selective pinning (Figure 3b) only 5 - 6 regions were typically pinned and they received about 53% of reference 11 activity on average. If the Pmax limit had been removed for unselective pinning the number of pinned region would have risen to include more of the regions containing portions of the derby database content. This in turn would have reduced the number of unpinned regions available for compaction and tail filling, forcing allocation of new regions to receive aging heap objects. Selective pinning performed almost as well for derby with at most 6 pinned regions. (a) xml.transform, Unselective Pinning (b) xml.transform, Selective Pinning Figure 4: xml.transform Activity The xml.transform benchmark used an average of about 290 tenured regions, of which only about 40 persisted throughout the run. With unselective pinning (Figure 4a) about 23 regions were pinned, on average, and they received about 38% of reference activity on average. With selective pinning (Figure 4b) only 6 regions were typically pinned and they received about 31% of reference activity on average. (a) xml.validate, Unselective Pinning (b) xml.validate, Selective Pinning Figure 5: xml.validate Activity The xml.validation benchmark used about 200 tenured regions, with about 12 13 persisting for the duration of the run. With unselective pinning (Figure 5a) only about 7 regions were pinned at any time, and they received about 72% of reference activity on average. With selective pinning (Figure 5b) only 2 regions were typically pinned and they received about 78% of reference activity on average. 4.4 Cold Object Collection Cold objects are collected into the cold area when their containing pinned regions pass a time (Tcold ) where no new references into the region are sampled. The number and total size of cold objects collected into the cold area, and the number of references into the cold area, are summarized in Table 4 for all runs of each SPECjvm2008 [16] benchmark profiled. The statistics for cold references include the total reference count and the number of distinct objects referenced. For all benchmark runs unselective pinning produced the greatest collection of cold objects, but it also tended to result in a higher count of references into the cold area, especially for xml.transform. In all cases, the number of distinct objects referenced was small, regardless of pinning strategy. Table 4: The number and the size of cold objects compiler.compiler unselective, run1 unselective, run2 selective, run1 selective, run2 derby unselective, run1 unselective, run2 selective, run1 selective, run2 xml.transform unselective, run1 unselective, run2 selective, run1 selective, run2 xml.validation unselective, run1 unselective, run2 selective, run1 selective, run2 Cold Objects Cold Bytes Cold References 24,452 15,717 0 0 4,498,952 8,009,752 0 0 3 0 0 0 79,383 40,861 9,039 3,284 6,868,440 10,958,816 1,379,888 279,736 0 1 0 0 27,603 29,995 14,486 12,961 16,749,392 17,394,688 8,928,248 5,734,144 716,850 635,768 0 0 16,188 14,926 3,698 4,889 2,910,520 2,733,280 474,904 582,880 0 0 0 16 2 1 3 2 3 Figures 6a- 6b show the cold collections for the first runs with unselective 13 and selective pinning for each benchmark. The left axes represent total byte count; the right axes represent object count. Partial GC cycle counts at the time of cold collection are represented on the horizontal axes. (a) Compiler.compiler, Pinning Unselective (b) Compiler.compiler, Selective Pinning Figure 6: Compiler.compiler, Cold objects Unselective pinning for compiler.compiler resulted in a collection of over 30 pinned regions, six of which were cold collected. Three references to two cold objects were subsequently sampled. Selective pinning resulted in two regions that remained pinned for most of the compiler.compiler benchmark run. One of these went cold (no new activity for > Tcold seconds) about halfway through the run and remained cold until the end but was not collectible because it’s remembered card set was in a persistent overflow state. (a) Derby, Unselective Pinning (b) Derby, Selective Pinning Figure 7: Derby, Cold objects Unselective pinning for derby resulted in a maximal collection of pinned regions (256 regions) and 15 cold collections. No activity was recorded in the cold area. Selective pinning pinned only six very active regions, two of which were cold collected early in the run. There was no activity in the cold area. Unselective pinning for xml.transform resulted in a collection of about 23 pinned regions, 19 of which were cold collected. However, there were a high number of references to three objects in the cold area. Selective pinning pinned at most six active regions at any time but eight regions were cold collected. There was no subsequent activity in the cold area. 14 (a) xml.transform, Unselective Pinning (b) xml.transform, Selective Pinning Figure 8: xml.transform, Cold objects (a) xml.validate, Unselective Pinning (b) xml.validate, Selective Pinning Figure 9: xml.validate, Cold objects Unselective pinning for xml.validation resulted in a collection of about seven pinned regions, five of which were cold collected. There were no references to objects in the cold area. Selective pinning pinned at most two active regions at any time and cold collected one region. There was no subsequent activity in the cold area. 5 Evaluation of the Stack-Based Solution with an Access Barrier Since stack sampling is intermittent, with each mutator thread walking its stack about once per millisecond, and can only occur at safe points only, there is a concern that the reference sampling rate may not be high enough to support reliable cold object identification. An Access Barrier can capture all read/write access operations when Java runs interpreting mode. Since the Access Barrier does not miss any access information, it will be used as benchmark to evaluate the correctness and efficiency of stack-based solution. 5.1 Evaluation Metrics Two key metrics are used to evaluate stack-based solution. F alseInactivity is used to verify the reliability of stack-based solution. ConvergenceT ime is used 15 to evaluate the efficiency of stack-based solution. • F alseInactivity is the number of objects that are considered inactive with the stack-based solution, but are marked active with the Access Barrier. For example, because of non-continuous sampling, the stack-based solution misses some objects’ activities, and these objects are considered to be inactive. However, these objects’ activities are captured by the Access Barrier. The F alseInactivity reflects the missing of some active objects. Smaller values mean better stack-based solutions. The F alseInactivity is a ratio described in the following formula. F alseInactivity = N umbers of f alse inactive objects N umbers of all inactive objects (3) • ConvergenceT ime is the time span that a region is pinned before it is determined to have identified all active objects. ConvergenceT ime reflects the speed that a pinned region is found to collect cold objects. The lower the ConvergenceT ime is, the more efficient the identification of cold objects is. 5.2 Experiments Two evaluation experiments are performed with Java executing in interpreting mode instead of Just-in-Time mode. 5.3 Case 1 - SPECjvm2008 Derby Running parameters are as follows. 1. Running period: 60 hours 2. Cold threshold: 6 hours 3. Sampling interval: 100 ms Benchmark Derby was run for 60 hours, active objects were identified with stack-based and Access Barrier at the same time. Experimental results are presented in Table 5. It is not surprising that the Access Barrier can harvest more cold objects than the stack-based solution, because the Access Barrier can capture all read/write access to objects, while stack sampling is intermittent. For example, the number of collectible pinned regions in Access Barrier is 5 times larger than in stack-based solution; the number of cold objects in Access Barrier is 11.78 times larger than that in stack-based solution; and the size of cold objects is 10.42 times larger in Access Barrier than that in stack-based solution. 16 Table 5: Evaluation with SPECjvm2008 Derby Items Collectible pinned regions CovergenceTime(in Second) All Objects Active Objects Cold Objects Size of All Objects(in Byte) Size of Active Objects(in Byte) Size of Cold Objects(in Byte) 5.3.1 AccessBarrier 85 27,721.62 1,485,531 673,272 812,259 172,021,784 129,221,416 42,800,368 stack-based 17 69,497.71 72,290 3,350 68,940 32,882,056 28,773,560 4,108,496 Ratio 5: 1 1:2.50 11.78:1 10.42:1 Reliability of the stack-based solution. The F alseInactivity ratio is 1.62% (see Table 4), which is quite low. It reflects the fact that there are few objects that are incorrectly classified as cold. The data supports the hypothesis that cold objects can be identified by the stackbased approach, which is encouraging. Table 6: F alseInactivity Results Inactive objects 68,940 5.3.2 F alseInactivity Objects 1,117 F alseInactivity Ratio 1.62% Efficiency of the stack-based marking approach. The Access Barrier has found 85 collectible pinned regions, while the stackbased solution has 17 collectible pinned regions. Although the Access Barrier has more collectible pinned regions than the stack-based solution, 17 collectible pinned regions in the stack-based solution are completely included in the Access Barrier collectible pinned regions. Figure 10 shows a convergence time comparison between stack-based solution and the Access Barrier. The X-axis represents 17 common collectible pinned regions, the Y-axis represents convergence time. In the Access Barrier, the maximum convergence time is less than 500 minutes, while in stack-based solution, the maximum convergence time reaches more than 2500 minutes. 5.4 Case 2 - SPECjvm2008 Compiler.compiler Running parameters are as follows. 1. Running period: 12 hours 17 Figure 10: Convergence time in Derby 2. Cold threshold: 72 minutes 3. Sampling interval: 15 ms After Compiler.compiler has run by 12 hours, the results shown in Table 7 are obtained. The Access Barrier still harvests more cold objects than the stack-based solution. Table 7: Evaluation with Compiler.compiler Items Collectible pinned regions AverageColdDuration (in Seconds) All Objects Active Objects Cold Objects Size of All Object (in Bytes) Size of Active Object (in Bytes) Size of Cold Object (in Bytes) 5.4.1 AccessBarrier 64 4440.64 1,390,739 141,772 1,248,967 3.32 20,090,576 109,475,216 stack-based 28 6311.96 376,824 279 376,545 53,923,840 1,280,616 52,643,224 Ratio 2.29 : 1 1 : 1.42 3.32 : 1 2.08 : 1 Reliability of stack-based solution. The falseInactivity ratio is 0.32% (see Table 8), which is still quite low. The data confirms that cold objects can be identified by the stack-based approach. 18 Table 8: F alseInactivity Inactive objects 376,545 5.4.2 F alseInactivity Objects 1,191 falseInactivity Ratio 0.32% Convergence time analysis. The Access Barrier has 64 collectible pinned regions. The stack-based solution has 28 collectible pinned regions. Although the Access Barrier has more collectible pinned regions than the stack-based solution, 28 collectible pinned regions in the stack-based solution are completely included in the Barrier-based collectible pinned regions. Figure 11 shows a convergence time comparison between stack-based solution and Access Barrier. In the Access Barrier, the maximum convergence time is less than 100 minutes. While in stack-based solution, the convergence time in the majority of collectible pinned regions is less than 100 minutes as well, only 3 collectible pinned regions have a high convergence time. Figure 11: Convergence time in Compiler.compiler 6 DISCUSSION During the ssd-stack JVM benchmarking runs, mutator threads walked their stacks to harvest heap references once every 1-2 ms on average. For cold object identification to be reliable and effective, the rate of reference sampling must be such that any active object within a pinned region is likely to appear on a mutator stack at a stack walking safe point at least once while the region is pinned. The F alseInactivity experimental results in Derby and Compiler.compiler show 19 that the sampling frequency with 1-2 ms can satisfy the requirement of cold object identification. A very small number of cold objects were referenced during any of the ssdstack JVM runs, and with the exception of xml.transform cold objects were referenced very infrequently. Most benchmark runs collected a few tens of thousands of cold objects. In the exceptional case of compiller.compiler with selective pinning, one pinned region went cold after 1,757 partial GC cycles but was not collectible due to a persistently overflowed remembered set; none of the 3,354 objects that were cold at that point received references for the remainder of the benchmark run (for 8,055 subsequent partial GC cycles). The ssd-stack JVM, with selective or unselective pinning, consistently resulted in increased memory pressure, timeslicing, and kernel CPU usage compared to the linux JVM. The singleton thread activity sampling daemon minimizes writes to pinned region activity maps but must test the activity bit for every sampled reference into a pinned region, making activity maps high running candidates for available cache lines. Although cache misses were not profiled for these runs, it is likely that high frequency access to pinned region activity maps from the thread activity sampling daemon had a significant effect on memory bandwidth. Since the daemon thread is bound to a specific node this effect may be limited, especially in larger multicore systems. However, the daemon does present a multicore scalability problem since it must handle proportionately larger loads as the number of available cores increases. Most of the ssd-stack benchmarking runs yielded a few tens of megabytes in the cold area and consumed 4-6% of the available CPU bandwidth, which is a relatively high price to pay for the amount of cold data collected. In this paper, only primitive arrays and leaf objects are considered as cold objects. If cold objects are not limited to primitive arrays and leaf objects, the amount of cold data collected should be increased, but the possibility of object references from cold objects to active objects would then require that marking should traverse into the cold area, which is undesirable. The region pinning framework attempts to pin the most active regions because they highlight mutator activity and allow cold objects to be identified more quickly and with greater confidence. Selective pinning sets a high bar on the activity metric for selectable regions and tends to pin only a few regions, without replacement. It tended to collect a relatively small but very stable set of cold objects. Unselective pinning attempts to maximize the number of pinned regions and selects the most active regions in batches, but tends to unpin and replace these over time. This strategy produced more substantial cold collections and the cold area typically received a small amount of reference activity that was confined to a small number of distinct objects. 7 CONCLUSION In this paper, we show the stack-based cold object identification framework, which samples the mutator thread stack, marks the active objects, and harvests 20 the cold objects. stack-based reference sampling was effective in identifying inactive objects for the SPECjvm2008 [16] benchmarks studied here, as evidenced by the stability of the cold areas established during the benchmark runs. A few tens of megabytes of cold objects have been identified and harvested into cold regions. Furthermore, we evaluate the correctness and efficiency of stack-based solution with an Access barrier implementation, the results support that the stack-based solution is an acceptable cold object identification approach. The runtime overhead for walking mutator stacks and maintaining pinned activity maps offset any gains that accrued from establishing the cold area and marshalling cold objects out of resident memory, but there is still space to reduce overhead by optimization. 8 FUTURE WORK The focus of this effort so far has been on cold object identification and sequestration. If further development is extended, a mechanism for managing frequently active objects in the cold area should be developed. For example, if madvise() [13] is used to sequester pages in the cold area, pages containing parts of active objects can be excluded. This would be effective if these objects are relatively rare and simpler than providing specialized methods to copy active cold objects back into tenured regions. Only limited amount of work has been done to verify that the JVM and GC do not reference objects in the cold area. Some JIT and GC (concurrent mark) activity in cold areas was detected by erecting a partial memory protection (read/write) barrier around the cold area between GC cycles. A similar mechanism can be used to detect GC incursions into the cold area during GC cycles, but this has not been investigated to date. The sources of these incursions will need to be modified to suppress activity in the cold area. For example, objects being marked in the root set, where the leaf marking optimization is not available, can be tested for inclusion in cold regions and treated as leaf objects in that case. The JIT peeks into cold regions to determine the length of arrays but it may be possible to apply defaults or forego optimizations for arrays located within the cold area. Acknowledgement The authors would like to acknowledge the funding support provided by IBM and the Atlantic Canada Opportunities Agency (ACOA) through the Atlantic Innovation Fund (AIF) program. Furthermore, we would also like to thank the New Brunswick Innovation Fund for contributing to this project. Finally, we would like to thank the Centre for Advanced Studies - Atlantic for access to the resources for conducting our research. 21 References [1] Balanced garbage collection policy. http://www-01.ibm.com/support/ knowledgecenter/SSYKE2_7.0.0/com.ibm.java.aix.70.doc/diag/ understanding/mm_gc_balanced.html. Accessed: 2015-05-12. [2] IBM Garbage Collection policies. http://www-01.ibm.com/support/ knowledgecenter/SSYKE2_7.0.0/com.ibm.java.zos.71.doc/diag/ appendixes/cmdline/xgcpolicy.html?lang=en. Accessed date: 201505-12. [3] J9 Virtual Machine (JVM). https://www-01.ibm.com/support/ knowledgecenter/#!/SSYKE2_7.0.0/com.ibm.java.win.70.doc/user/ java_jvm.html. Accessed: 2015-05-12. [4] JIT compiler overview. https://www-01.ibm.com/support/ knowledgecenter/#!/SSYKE2_7.0.0/com.ibm.java.lnx.70.doc/diag/ understanding/jit_overview.html. Accessed: 2015-05-12. [5] Diab Abuaiadh, Yoav Ossia, Erez Petrank, and Uri Silbershtein. An efficient parallel heap compaction algorithm. In OOPSLA, pages 224–236, 2004. [6] Ali-Reza Adl-Tabatabai, MichalCierniak, Guei-Yuan Lueh, Vishesh M. Parikh, and James M. Stichnoth. Fast, effective code generation in a justin-time java compiler. SIGPLAN Not., 33(5):280–290, May 1998. [7] James Gosling, Bill Joy, Guy L. Steele, Jr., Gilad Bracha, and Alex Buckley. The Java Language Specification, Java SE 7 Edition. Addison-Wesley Professional, 1st edition, 2013. [8] Richard E. Jones and Andy C. King. A fast analysis for thread-local garbage collection with dynamic class loading. In 5th IEEE International Workshop on Source Code Analysis and Manipulation (SCAM), pages 129– 138, Budapest, September 2005. [9] Toshiaki Kurokawa. A new fast and safe marking algorithm. Lisp Bull., (3):9–35, December 1979. [10] Tim Lindholm and Frank Yellin. Java Virtual Machine Specification. Addison-Wesley Longman Publishing Co., Inc., 1999. [11] Robert Love. Linux System Programming: Talking Directly to the Kernel and C Library. O’Reilly Media, Inc., 2007. [12] Jeremy Manson, William Pugh, and Sarita V. Adve. The java memory model. SIGPLAN Not., 40(1):378–391, January 2005. [13] Marshall Kirk Mckusick and Michael J. Karels. A new virtual memory implementation for Berkeley UNIX. In EUUG Conference Proceedings, pages 451–458, 1986. 22 [14] Pekka P. Pirinen. Barrier techniques for incremental tracing. SIGPLAN Not., 34(3):20–25, October 1998. [15] Ryan Sciampacone, Peter Burka, and Aleksandar Micic. Garbage collection in websphere application server v8, part 2: Balanced garbage collection as a new option. In IBM WebSphere Developer Technical Journal., 2011. [16] Kumar Shiv, Kingsum Chow, Yanping Wang, and Dmitry Petrochenko. Specjvm2008 performance characterization. In Proceedings of the 2009 SPEC Benchmark Workshop on Computer Performance Evaluation and Benchmarking, pages 17–35, 2009. [17] Kumar Shiv, Kingsum Chow, Yanping Wang, and Dmitry Petrochenko. Specjvm2008 performance characterization. In Proceedings of the 2009 SPEC Benchmark Workshop on Computer Performance Evaluation and Benchmarking, pages 17–35, Berlin, Heidelberg, 2009. Springer-Verlag. [18] David Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. SIGSOFT Softw. Eng. Notes, 9(3):157–167, April 1984. 23
6cs.PL
Enhancing human color vision by breaking binocular redundancy Bradley S. Gundlach1, Michel Frising1,2, Alireza Shahsafi1, Gregory Vershbow3, Chenghao Wan1,4, Jad Salman1, Bas Rokers5,6, Laurent Lessard1, Mikhail A. Kats1,4,6* 1 Department of Electrical and Computer Engineering, University of Wisconsin-Madison, Madison, WI 2 Department of Mechanical and Process Engineering, ETH Zurich, Zurich, Switzerland 3 Department of Art, University of Wisconsin-Madison, Madison, WI 4 Department of Materials Science and Engineering, University of Wisconsin-Madison, Madison, WI 5 Department of Psychology, University of Wisconsin-Madison, Madison, WI 6 McPherson Eye Research Institute, University of Wisconsin-Madison, Madison, WI To see color, the human visual system combines the response of three types of cone cells in the retina – a compressive process that discards a significant amount of spectral information. Here, we present an approach to enhance human color vision by breaking its inherent binocular redundancy, providing different spectral content to each eye. We fabricated and tested a set of optical filters that “splits” the response of the short-wavelength cone between the two eyes in individuals with typical trichromatic vision, simulating the presence of approximately four distinct cone types (“tetrachromacy”). Such an increase in the number of simulated cone types can reduce the prevalence of metamers – pairs of distinct spectra that resolve to the same perceived color. This technique may result in an enhancement of spectral perception, with applications ranging from camouflage detection and anti-counterfeiting to new types of artwork and data visualization. In the typical human eye, the three cone types – labeled “S” for short wavelengths, “M” for medium, and “L” for long – are primarily sensitive to light with wavelengths in the 390 - 530 nm, 400 670 nm, and 400 - 700 nm bands, respectively [1–4]. When excited by light, a signal from the cones is relayed though retinal ganglion cells, to the optic nerve, and then the brain, where it is further processed to produce a color sensation [5, 6]. This process can be understood as a type of lossy compression from an N- 1 dimensional spectrum, where N is the number of wavelength bins necessary to sufficiently approximate a continuous spectrum, into a color, which is a three-dimensional object (Fig. 1). A manifestation of this Nto-three compression is metamerism, a phenomenon in which different spectra appear as the same color. The number of cone types and the widths and separations of their spectral sensitivities govern the degree to which metamerism is a limitation of the visual system; for example, a hypothetical increase in the number of distinct cone types should result in a decrease in the prevalence of metamers. Cast in a signal processing perspective, an increase in the sampling rate of a spectrum (i.e., the number of cones) improves the ability to detect sharp features in the spectrum, even for non-uniform sampling [7, 8]. Figure 1: (a) A sample spectrum generated by a cathode ray tube (CRT) monitor displaying a purple color. The filled rectangle represents a single spectral bin, if the continuous spectrum is divided into N bins. (b) (i) Normalized spectral sensitivity of the cone types for a typical trichromatic observer ( = 3). (ii) Normalized spectral sensitivity of the effective cone types for a typical trichromatic observer enhanced using our device ( =  4). (c) A representation of the perceived color of the spectrum in (a). The case with  =  4 cannot be displayed, but extra spectral information would be present compared to the  = 3 case. Several studies have reported that a small percentage of humans, primarily women, express a mutated L cone in addition to the standard one, resulting in a total of four cone types, which may enable 2 vision with four color dimensions (tetrachromacy) [9-11]. Reports suggest that a few of these individuals can utilize this fourth photopigment type, and thus “perceive significantly more chromatic appearances” compared to typical, healthy humans with three cone types (trichromats) [12, 13]. More broadly, it is reasonable to infer that an additional cone type would enhance spectral perception, provided subsequent neural processing can capitalize on its presence. Figure 2: (a) Simplified schematic of an optical filter comprising several thin-film layers. (b) Measured transmission spectra of fabricated Filters 1 (black) and 2 (blue). (c) Magnified portion of the transmission spectrum from (b), including angle dependence with angle of incidence (AOI) from 0 to 15°. (d) Colors of an example metameric pair (1, 2) and D65 broadband white light (3), as perceived by a typical trichromat. The traces in each box are the underlying unfiltered spectra (arbitrary units), taken from our experiments, as described in Fig. 3. (e, f) Rendered monocular colors of the spectra in (d) after passing through Filter 1 and Filter 2, respectively. Note that e(1) and e(2), f(1) and f(2) are substantially distinct, while e(3) and f(3) are similar in color due to the white-balance constraint enforced in our design. 3 Here, we aim to simulate tetrachromatic (and possibly higher-dimensional) color vision in typical trichromatic humans by increasing the number of effective (simulated) cone types in the visual system comprising the two eyes and a passive optical device. This approach breaks the binocular redundancy of the two eyes, where the visual fields of each eye are overlapping, providing different spectral content to each eye via a wearable passive multispectral device comprising two optical transmission filters (Fig. 2). A number of existing vision-assistive devices or techniques operate by breaking binocular redundancy, though usually in the spatial rather than spectral domain. Examples include hemianopia (partial blindness in the left or right visual field) treatment using spectacles with a monocular sector prism that selectively relocates the visual field in one eye, leaving the other eye unaffected, and thus conferring an additional 20° of visual-field sensitivity for binocular vision [14, 15], and the treatment of presbyopia by correcting one eye for near vision and the other for distance vision [16]. The binocular redundancy can be broken spectrally by using filters that selectively attenuate different wavelength bands to yield effective cone sensitivities (i.e., the products of the cone sensitivities and the filter transmission spectra) that are different between the two eyes. This increases the number of effective cone types while preserving most spatial information. In this vein, the use of two simple bandpass filters was previously demonstrated to increase the dimensionality of color vision in dichromatic individuals (i.e., those with two functioning cone types) [17]. Conversely, the goal here is to enhance the dimensionality of a trichromat’s visual system to beyond that of a typical human. Such an approach was briefly suggested by Cornsweet in 1970 [18], but to our knowledge no specific design has been proposed or realized. We note that the use of even a single filter positioned in front of both eyes can help distinguish certain metamers [18], with the caveat that previously distinguishable spectra can become metamers when viewed through the filter; that is, a similar number of metamers are created as are destroyed. In contrast, the 4 use of two filters might be used to decrease the overall number of possible metamers; if at least one of the two filters can be used to differentiate a pair of spectra, we consider the pair to no longer be metamers. To design the set of filters, we used a standard psychophysical model to determine the perceived (monocular) colors corresponding to particular spectra [2, 19]. Here, colors are calculated using the International Commission on Illumination (CIE) 1931 standard observer matching functions. CIE LAB is our preferred color space, as it is more perceptually uniform than other color spaces; the coordinates in LAB space ([L, a, b]) correspond to the luminance (L) and hue (a & b) [20]. We calculate differences in monocular colors (e.g., between color 1 and color 2) in the LAB space using (see the supplementary information for further details) [2]: ∆E12 = ( L2 − L1 ) 2 + (a2 − a1 ) 2 + (b2 − b1 ) 2 (1) The filters are designed to enhance the ability of a typical trichromatic viewer to discriminate spectra while limiting adverse effects such as color clashing. For simplicity, we focused on a design that splits the response of the S cone, thus transforming the trichromatic visual system into one that emulates tetrachromatic vision. The responsivity of the S cone has relatively little overlap with those of the M and L cones (Fig. 1b(i)), so it can be attenuated while minimizing the impact on the effective responsivity of other two cone types. To provide parity between eyes, we partitioned the S cone responsivity such that each eye retains approximately half of the original response spectrum (Fig. 1b(ii)). We also imposed a “white-balance” constraint, ensuring that the transmission of broadband white light (defined using CIE illuminant D65 [21]) through the two filters results in a similar color. This constraint was put in place to minimize potential color clashing between the eyes when the device is used in daylight [22]. The detailed filter design process is presented in the supplementary information, briefly summarized here. The final device comprises a 450 nm long-pass filter (Filter 1) and a 450-500 nm, 6305 680 nm double-band-stop filter (Filter 2) (Fig. 2b-c). The 450 nm transition between Filters 1 and 2 is at the peak sensitivity of the S cone, and partitions it in half. However, due to the non-zero sensitivity of the M and L cones in the 450-500 nm region (Fig. 1b(i)), the M and L cones are also (unintentionally) attenuated by Filter 2. The 630-680 nm stopband was introduced to attenuate the effective responsivity of the M and L cones to broadband white light to preserve color balance. This double-band-pass filter was optimized by varying the stopband/passband positions and transmittances using simulated annealing methods to minimize the CIE ΔE color difference of D65 white light passing through Filters 1 and 2. Note that the design presented here is a proof of concept, and is not a unique or globally optimal solution. The optimized transmission function of Filter 2 was implemented using conventional thin-film technology [23], with alternating layers of silicon oxide (SiO2 , n = 1.46) and tantalum oxide (Ta2O5, n = 2.15) (Fig. 2a-b)). The required film thicknesses were determined by conventional thin-film optimization methods, including gradual evolution [24] and needle optimization [25] (see the supplementary information for further details), to implement the target transmission function. The final stack was constrained to be less than 75 total layers, and each layer between 10 and 500 nm thick. The filter was optimized such that the transmission would not change significantly for incident angles up to 5° away from the normal. The films were deposited using ion-assisted sputtering onto an NBK7 glass substrate at a thin-film foundry (Iridian). To reduce cost, Filter 1 was approximated by an off-the-shelf component (450LP RapidEdge, Omega Optical). The two filters were then characterized by angle-dependent transmission spectroscopy, demonstrating that the transmission spectra are robust to incidence angles up to 5° away from the normal (Fig. 2c). Following fabrication, the filters were constructed into a pair of glasses. 6 Figure 3: (a) Schematic of our metamer generation setup. Images from two monitors, an LCD and a CRT display, are combined using a 50/50 beam splitter (i), to be viewed at location (ii). The two monitors use different emission mechanisms, and thus generate different spectra for the same color. (b) Photograph taken at position (ii) in the schematic. (c) Measured emission spectra from the LCD (solid) and CRT (dashed) monitors while displaying the same purple color. Spectra are shown with arbitrary units. (d) Rendered colors of the spectra in (c) viewed through no filter, Filter 1, and Filter 2, respectively, showing that the metamers can be distinguished using either filter. See the supplementary information for discussion of the difference between rendered colors in (d) and those in the photograph in (b). To test the performance of this design, we constructed a setup that generates metameric spectra using a liquid crystal display (LCD, True HD-IPS display on LG G3 smartphone) and a cathode ray tube (CRT, Dell E770P) monitor (Fig. 3a-b). The displays use different emission mechanisms, and thus produce distinct spectra when displaying the same color [26, 27]. In our experiment, pairs of metamers were presented side by side using a 50/50 beam splitter (Edmund Optics), allowing color comparisons to be made. The colors of each monitor were individually adjusted until no perceivable color difference was present. The spectra of light generated by the monitors with and without filters were acquired using a freespace spectrometer (Ocean Optics FLAME VIS-NIR with cosine corrector), and color difference calculations were performed to ensure the colors were indistinguishable given a standard observer. A 7 threshold value of 2.3 for the CIE ΔE “just noticeable difference” was used to define which spectra were indistinguishable (i.e., ΔE < 2.3) [28]. One representative example using a pair of metamers that appear purple is shown in Fig. 3b-d. Without the use of either filter, the two different spectra appeared as nearly identical patches of color. However, when observed through either of the filters, the two can be easily differentiated. Subjectively, we observed that, by looking at a particular patch through both filters simultaneously (i.e., Filter 1 over the left eye, Filter 2 over the right), a “meta-color” can be observed, which appears to be different from the color perceived through either filter individually or with no filter. This meta-color may be a manifestation of the approximately four effective cone types created by the pair of filters. We note that a related study involving dichromats demonstrated an increase in color dimensionality using band-pass filters, though the authors suggest the effect could be related to binocular lustre [17], which may also be responsible for the effect we observed. We emphasize that our experiment does not probe to what degree the neuronal processing system of a trichromat can take advantage of this extra information. Broadly stated, the number of cone types and their frequency-dependent responsivities determines the extent to which metamerism is a limitation to the visual system. Our method increases the number of effective/simulated cone types, which decreases the number of potential metamers, provided the subsequent neuronal processing can adapt appropriately (which seems to occur in the case of spatial multiplexing used for vision-assistive devices [14, 15]). In general, quantitatively determining the decrease in the metamer frequency is difficult because the set of possible metamers is not bounded. Nevertheless, various metrics can be applied to roughly estimate this quantity. As described in detail in the supplementary information, we estimated the ratio of metamer frequency reduction by linearizing the mapping between a discretized spectrum and the LAB space. Counting the number of metamers for a particular LAB reference point [Lo, ao, bo] amounts to counting the number of different spectra ( ) that map to tristimulus values that are within a sphere in LAB space of 8 radius Δ = 2.3 of the reference point. We discretized spectra using N samples to avoid working in infinite-dimensional space (Fig. 1a), bounding the set of possible spectra by considering D65 light reflected from (or transmitted through) an arbitrary object. Using the linearized mapping, the set of metamers in Ndimensional spectrum space is a high-dimensional ellipsoid. The volume of the ellipsoid describes the number of possible metamers for the unfiltered case. To estimate the number of metamers using the twofilter device presented here, the approximate volume of overlapping ellipsoids (corresponding to the two separately filtered spectra) bounded by box constraints (corresponding to the D65 illuminant, as discussed above) was used [29]. The ratio of metamer reduction for a given LAB reference point was calculated by the ratio of the volumes of metameric spectra between the unfiltered and filtered cases. To roughly sample the space of possible colors, we repeated the computation for 500 different reference points [Lo, ao, bo], selected by choosing discretized spectra uniformly at random and mapping them to LAB tristimulus values. Using this metric, we estimate a decrease in metamer frequency by one-to-two orders of magnitude when using our passive multispectral device (see Table 1 in the supplementary information). By the same metric, a single-filter system designed to improve vision in color-vision-deficient individuals [30] seems to provide no decrease in the frequency of apparent metamers. By breaking the inherent chromatic redundancy in binocular vision, our method provides the user with more spectral information than he/she would otherwise receive. In the present design, the S cone is partitioned using a pair of filters that results in photoreceptor responses consistent with a visual system that utilizes approximately four cone types (tetrachromacy). Although the current demonstration splits the S cone, which is more selectively sensitive to blue-colored objects, it is possible to use similar methods to design filters that more-strongly affect metamers that appears as green and red, that are more prevalent in nature [31]. While the possibility of natural tetrachromacy in a fraction of the population has received both academic and popular interest [11–13], the technology demonstrated here has the potential to provide 9 tetrachromatic vision to anyone with typical, healthy trichromatic vision. The extent to which observes can (or can learn) to take advantage of the additional spectral information is yet to be determined. Given two eyes and three types of cones, it should be possible to increase the number of effective cones up to six using our approach, and potentially even more with spatial or temporal multiplexing. It may also be possible to generate personalized designs to improve color discrimination for individuals with colorvision deficiencies. This technology can be integrated in a simple pair of eyeglasses or sunglasses, and could have immediate applications in camouflage detection, quality control, and anti-counterfeiting. More broadly, the ability to see many more colors has intriguing opportunities for design and artwork, and for data representation with extra color channels. Funding. B. Gundlach is supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-1256259. This work was supported by startup funds from UW Madison. Acknowledgment. We thank Middleton Spectral Vision for access to their hyperspectral imaging systems. 10 REFERENCES 1. J. L. Schnapf, T. W. Kraft, and D. A. Baylor, "Spectral sensitivity of human cone photoreceptors," Nature 325, 439–441 (1987). 2. G. Wyszecki and W. S. Stiles, Color Science: Concepts and Methods, Quantitative Data and Formulae, 2 edition (Wiley-Interscience, 2000). 3. A. Stockman and L. T. Sharpe, "The spectral sensitivities of the middle- and long-wavelengthsensitive cones derived from measurements in observers of known genotype," Vision Res. 40, 1711–1737 (2000). 4. J. D. Mollon, "Color vision: Opsins and options," Proc. Natl. Acad. Sci. 96, 4743–4745 (1999). 5. W. Backhaus, R. Kliegl, and J. S. Werner, Color Vision: Perspectives from Different Disciplines (Walter de Gruyter, 1998). 6. L. Hurvich and D. Jameson, "An Opponent-Process Theory of Color Vision," Psychol. Rev. 64, 384–404 (1957). 7. H. B. Barlow, "What causes trichromacy? A theoretical analysis using comb-filtered spectra," Vision Res. 22, 635–643 (1982). 8. F. Marvasti, Nonuniform Sampling - Theory and Practice (Springer, 2001). 9. J. Neitz, M. Neitz, and G. H. Jacobs, "More than three different cone pigments among people with normal color vision," Vision Res. 33, 117–122 (1993). 10. J. Neitz and G. H. Jacobs, "Polymorphism in normal human color vision and its mechanism," Vision Res. 30, 621–636 (1990). 11. A. L. Nagy, D. I. A. MacLeod, N. E. Heyneman, and A. Eisner, "Four cone pigments in women heterozygous for color deficiency," JOSA 71, 719–722 (1981). 12. K. A. Jameson, S. M. Highnote, and L. M. Wasserman, "Richer color experience in observers with multiple photopigment opsin genes," Psychon. Bull. Rev. 8, 244–261 (2001). 13. G. Jordan and J. D. Mollon, "A study of women heterozygous for colour deficiencies," Vision Res. 33, 1495–1508 (1993). 14. E. Peli, "Vision Multiplexing: an Engineering Approach to Vision Rehabilitation," Optom. Vis. Sci. 78, 304–315 (2001). 15. E. Peli, "Treating with Spectacle Lenses: A Novel Idea!?," Optom. Vis. Sci. 79, 569–580 (2002). 16. D. Chernyak, "Binocular optical treatment for presbyopia," U.S. patent US20050261752 A1 (November 24, 2005). 17. K. Knoblauch and M. J. McMahon, "Discrimination of binocular color mixtures in dichromacy: evaluation of the Maxwell-Cornsweet conjecture," J. Opt. Soc. Am. A Opt. Image Sci. Vis. 12, 2219–2229 (1995). 18. T. N. Cornsweet, Visual Perception (Academic Press, 1970). 19. Colorimetry -- Part 1: CIE Standard Colorimetric Observers (2007). 20. Colorimetry -- Part 4: CIE 1976 L*a*b* Colour Space (2008). 21. Colorimetry -- Part 2: CIE Standard Illuminants (2007). 22. D. J. Polzella and D. A. Montgomery, "Dimensions of color harmony," Bull. Psychon. Soc. 31, 423–425 (1993). 23. A. MacLeod, Thin-Film Optical Filters, Fourth Edition (2010). 11 24. A. V. Tikhonravov, M.K. Trubetskov, T. V. Amotchkina, M. A. Kokarev, Proc. SPIE. 5250, Advances in Optical Thin Films 312 (2004). 25. A. V. Tikhonravov, M. K. Trubetskov, and G. W. DeBell, "Optical coating design approaches based on the needle optimization technique," Appl. Opt. 46, 704-710 (2007). 26. R. S. Berns, R. J. Motta, and M. E. Gorzynski, "CRT colorimetry. part I: Theory and practice," Color Res. Appl. 18, 299–314 (1993). 27. G. Sharma, "LCDs versus CRTs-color-calibration and gamut considerations," Proc. IEEE 90, 605–622 (2002). 28. G. Sharma and R. Bala, Digital Color Imaging Handbook (CRC Press, 2002). 29. E. K. Yang and J. W. Tolle, "A class of methods for solving large, convex quadratic programs subject to box constraints," Math. Program. 51, 223–228 (1991). 30. A. W. Schmeder and D. M. McPherson, "Multi-band color vision filters and method by lpoptimization," U.S. patent US20140233105 A1 (August 21, 2014). 31. M. E. Bulina, K. A. Lukyanov, I. V. Yampolsky, D. M. Chudakov, D. B. Staroverov, A. S. Shcheglov, N. G. Gurskaya, and S. Lukyanov, "New class of blue animal pigments based on Frizzled and Kringle protein domains," J. Biol. Chem. 279, 43367–43370 (2004). 12 Supplementary Information Enhancing human color vision by breaking binocular redundancy Bradley S. Gundlach1, Alireza Shahsafi1, Michel Frising1,2, Gregory Vershbow3, Chenghao Wan1,4, Jad Salman1, Bas Rokers5,6, Laurent Lessard1, Mikhail A. Kats1,4,6* 1 Department of Electrical and Computer Engineering, University of Wisconsin-Madison, Madison, WI 2 Department of Mechanical and Process Engineering, ETH Zurich, Zurich, Switzerland 3 Department of Art, University of Wisconsin-Madison, Madison, WI 4 Department of Materials Science and Engineering, University of Wisconsin-Madison, Madison, WI 5 Department of Psychology, University of Wisconsin-Madison, Madison, WI 6 McPherson Eye Research Institute, University of Wisconsin-Madison, Madison, WI Narrative explanation of the filter design process The filters in this work were designed using a white-balance condition that ensures that broadband “white light” that passes through the two filters is perceived similarly, to prevent significant color clashing between the two eyes under typical viewing conditions. Simultaneously, the filters are designed to be sufficiently distinct, which results in each eye receiving different spectral information. We used a design approach where each revision increased in complexity, building intuition at each design stage. For the first revision, a brick-wall longpass filter and a band-stop filter were used to split the blue cone response without significantly affecting the other cone types (Fig. S1). The filters were constrained such that the longpass filter cut-on wavelength was equal to the band-stop filter cut-off wavelength, which ensured that at least one eye was sensitive to every region of the visible wavelengths (i.e., no wavelength was attenuated by both filters). The band-stop filter cut-on wavelength was chosen to be 450 nm to minimize the effect of the filters on the M and L cone responses; thus, we were left to decide the longpass cut-on and band-stop cut-off wavelengths (which are enforced to be equal), and which must be below 450nm. With these constraints, the position of the cut-on/cut-off wavelength was optimized in order to minimize the CIE Δ color difference between D65 white light passing through each filter. Figure S1(a) shows the result of this optimization, with a minimum Δ color difference of 0.596 with the cut-on/cut-off wavelength at 437 nm. A Δ color difference less than 2.3 typically means that the colors are indistinguishable. The resulting optimized filters are: a longpass filter (Filter 1) with a 437 nm transition wavelength, and a band-stop filter (Filter 2) with a stopband of 437 - 450 nm. Figure S1(c) shows the rendered color of D65 white light through 13 each filter, and demonstrates the excellent white-balance between filters, because the color samples are indistinguishable. However, the band-stop width of the resulting Filter 2 is only 13 nm, quite low in comparison to the ~300 nm range of the visible wavelengths. In order to effectively differentiate spectral features, which are typically quite broad (>10 - 20 nm), the band-stop width must be larger. (a) (b) (c) Filter 1 ΔE = 0.596 Filter 2 Figure S1: (a) Plot showing the CIE ΔE color difference between filters 1 and 2 when transmitting CIE D65 white light versus cut-on/cut-off wavelength. (b) Optimized transmission response for filters 1 and 2 after the first design revision, with a band-stop region between 437 – 450 nm. (c) Rendered colors for CIE D65 white light transmitted through each filter from (b), with an optimized ΔE color difference of 0.596. Because this initial design produced a filter set with good white-balance, the same general approach was used in the following design revision. A similar optimization was performed as above, but the bandstop width of Filter 2 was constrained to be larger than 25 nm; this width was chosen such that it was larger than many typical spectral features found in nature, which could therefore be resolved with these filters. Instead of minimizing just the Δ color difference between the filters, a modified merit function (MF) was used that also accounted for the filter width:  = Δ ⁄ . A brute-force optimization was performed, which varied the cut-on and cut-off wavelengths of the two filters (again with the longpass cuton and bandstop cut-off wavelengths being equal). The transmission spectra of the optimized filters are given in Figure S2: a longpass filter (Filter 1) with a 450 nm cut-on wavelength, and a bandstop filter (Filter 2) with a stopband of 450 – 500 nm. The resulting filter set has a Δ color difference of 14.15, significantly above the 2.3 just noticeable difference threshold. Therefore, it is clear that for the simple design using a longpass and single-bandstop filter, there is a tradeoff between white-balance and width of the band stop region. 14 (b) (a) Filter 1 ΔE = 14.15 Filter 2 Figure S2: (a) Optimized transmission response for filters 1 and 2 after the second design revision, with a bandstop region of 450 - 500 nm. (b) Rendered colors for CIE D65 white light transmitted through each filter from (b), with an optimized ΔE color difference of 14.15 By considering the cone responses (Figure 1(b)), it is clear why this filter design results in worse white balance. Beyond 450 nm, the longpass filter allows all wavelengths of visible light through; the M and L cones have very little response below 450 nm. However, the band-stop filter attenuates wavelengths between 450 and 500 nm, where the M and L cones have significant sensitivity. Therefore, the two filters affect the M and L cones very differently, which results in poor color balance. In particular, the band-stop filter (Filter 2) introduces a slight red tint compared to the longpass filter (Filter 1), which is also clear from the rendered colors in figure S2. Therefore, in order to maintain the high band-stop width of Filter 2 while improving the white balance of the filter pair, a second stopband was introduced to Filter 2 in order to soften the “red response” of the previous design. In this design, the shorter wavelength band-stop region of Filter 2 splits the S cone, whereas the longer wavelength band-stop region improves the white balance of the filter pair. In the final design revision that was implemented and described in the main text, the response of the longpass filter (Filter 1) was not optimized any further; in fact, the transmission response of a commercially available 450 nm longpass filter was used to define Filter 1. This was done to decrease manufacturing costs, such that only Filter 2 required custom design and manufacturing. The shortwavelength band-stop region of the Filter 2 was also used from before (allowed to change only slightly during optimization), and a preliminary long wavelength band-stop region was added between 600 and 700 nm, to be optimized further. An error function was also implemented to smooth the transition regions; in 15 the previous design revisions, the transition regions had a sharp vertical slope, which is difficult to achieve in practice. The smoothness of the filters can be adjusted by changing the proportionality constant (a) of the error function:   erf"#. Unlike the previous revisions, Filter 2 was optimized using a more rigorous method compared to the brute force method used above. A constrained optimization by linear approximation (COBYLA) method was implemented in a stochastic basin-hopping algorithm to optimize the position of the cut-on/cut-off wavelengths, transmission of the pass and stop-bands, and slope of the transition regions. The transition regions of the filter’s short-wavelength band-stop region was constrained within +/- 10 nm of their previous values; this was done to maintain the overall shape of the previous design while allowing some room for color balance optimization. The transmittance was constrained between 5 and 15% in the stopbands, and between 80 and 95% in the passbands, to allow for high throughput and relative ease of manufacturing. The error function proportionality constant was constrained between 0.25 and 1. The long-wavelength stopband region was constrained between 600 – 700 nm, but the band-stop width was not constrained; this was done to prevent attenuation of the M and L cones at their peak sensitivities (~550nm, ~580 nm respectively), while also preventing needless optimization beyond the visible wavelengths (> 700 nm). With these constraints in place, Filter 2 was optimized in order to minimize the modified merit function: Δ ⁄ , where Δ is the color difference between Filter 1 and Filter 2 when transmitting D65 white light and Widthbandstop is the spectral width of the short-wavelength band-stop region of Filter 2. This procedure yielded an optimized response for Filter 2 with stopbands at 450 - 500 nm and 630 - 680 nm, and (a) (b) Filter 1 ΔE = 5.21 (i) Filter 2 (ii) (ii) Figure S3: (a) Optimized transmission response for filters 1 and 2 after the third design revision, with band-stop regions between 450 – 500 nm (i) and 630 – 680 nm (ii). Region (i) splits the short-wavelength cone, region (ii) improves the white-balance of the filter pair (b) Rendered colors for CIE D65 white light transmitted through each filter from (a), with a ΔE color difference of 5.21. 16 stopband/passband transmittance of 10% and 90%, respectively (Figure S3(a)). The rendered color of transmitted D65 white light through the filters is given in Figure S3(b), with a Δ color difference of 5.21. Methodology for counting metamers: In this section, we describe the technique by which we estimated the reduction of the occurrence of metamerism using our vision enhancement device. Each spectrum   is mapped to LAB tristimulus values [%, ", '] via the CIE matching functions described earlier in the supplementary. Counting the number of metamers for a particular LAB reference point [%) , ") , ') ] amounts to counting the number of different spectra   that map to tristimulus values that are within a sphere in LAB space of radius ΔE of the reference point. The number of metameric spectra is infinite, so we instead compute a surrogate quantity. Roughly, we discretize each spectrum by wavelength so each spectrum can be abstracted as a point in a finite-dimensional space. We then count metamers by computing the volume that they occupy in this space. The details of the computation are described below. 1. Represent spectra by using  equally spaced samples in wavelength. For example,   is represented as a vector [+ , , , … , . ], which corresponds to the intensities at the wavelengths [ +, , , … , . ]. 2. The map [+ , … , . ] → [%, ", '] from the discretized spectrum to LAB tristimulus values is smooth and nonlinear. Since the map is only being evaluated in a local neighborhood of the reference point, the map is well approximated by its first order Taylor expansion. This allows us to replace the nonlinear map with an affine function 0+ , … , .   [%, ", ']. 3. Let 1)  2 [%, ", '] | (% − %) ), + (" − ") ), + (' − ') ), ≤ Δ , 7 be the set of tristimulus values indistinguishable from the reference point. The set of metameric spectra is given by the image of 1) under the inverse map 08+ . 4. Since the inverse map 08+ is affine and the set 1) is a sphere in LAB space, the image 08+ (1) ) is an ellipsoid in the discretized spectrum space [S1]. Note that this ellipsoid is degenerate; it will be infinite in the directions corresponding to the kernel of 0. 5. We assume that we are counting “reflection metamers” or “transmission metamers” under a certain illuminant. That is, we are excluding metamers generated by active emissive sources for the sake of this calculation, since including unbounded emissive sources complicates this calculation further. Under this assumption, the allowed intensities are not infinite, since every admissible spectrum has intensities bounded by the corresponding intensities of the illuminant. More formally, 17 define the set of admissible spectra as 9) = : [+ , … , . ] ; 0 ≤ = ≤ =>?@ for B = 1, … , D, where =>?@ is the intensity at = of the D65 illuminant. 6. The volume of metameric spectra is therefore the volume of the set 08+ (1) ) ∩ 9). If the spectrum is filtered through a filter F( ), the map 0 must be replaced by a map 0G that accounts for the filter F. The derivation is otherwise identical; metameric spectra are given by the set 0G8+ (1) ) ∩ 9). If the spectrum is filtered through F+ ( ) for one eye and F, ( ) for the other eye, spectra are only counted if (1) ) ∩ 0G8+ (1) ) ∩ 9) . they are metameric for both eyes. This results in the set 0G8+ H I We can compare configurations (e.g. natural human vision versus vision augmented by our device, or vision augmented by two different filters sets) by comparing the volumes of their respective metameric spectra. For example, to compare the unfiltered case (natural human vision) to the case of vision modified by our two-filter passive multispectral device, we would compute the ratio: J= Vol(08+ (1) ) ∩ 9) ) (1) ) ∩ 0G8+ (1) ) ∩ 9) N VolM0G8+ H I A ratio of J = 20 would signify that metameric spectra are 20 times less abundant when the two-filter passive multispectral device is used as compared to the unfiltered case. Specifically, if spectra are sampled from a uniform distribution on intensities, a spectrum is 20 times less likely to be metameric. Computing the ratio J is challenging because the volumes involved have irregular shapes; they are intersections of degenerate (high-dimensional) ellipsoids with box constraints. In order to approximate the ratio J, we approximate each volume by the volume of its max-volume inscribed ellipsoid. An illustration of a max-volume inscribed ellipsoid is shown below (Fig. S4). Figure S4: The shaded region is the intersection of ellipsoids and box constraints. The area is approximated by the max-area inscribed ellipsoid (dotted curve). 18 It turns out the max-volume inscribed ellipsoid can be efficiently computed using semidefinite programming techniques. See for example [S2]. We approximated the ratio J by using the inner ellipsoid approximation for both the numerator and denominator. Volume approximation ratios were computed using CVX, a package for specifying and solving convex programs [S3]. We computed approximate volume ratios for the two-filter case as well as the one-filter case, using the transmission spectrum of a filter sold by EnChroma for alleviating some of the adverse effects of red-green color vision deficiency (EnChroma filter [S4]). In each case, we tried several different discretization samples  and we repeated the computation for 500 different reference points [%) , ") , ') ]. The reference points were selected by choosing discretized spectra uniformly at random and mapping them to LAB tristimulus values. A summary of the results is shown in Table S1. Using two filters results in a dramatic decrease in metamers, roughly consistent over the range of tested discretizations. In contrast, using a single filter (EnChroma in this case) has little effect on the number of metamers. Discretization samples () 7 9 12 14 16 18 Two filters, mean 22.977 115.823 120.580 160.634 178.020 111.243 Two filters, median 17.251 80.690 57.4080 85.885 77.153 41.369 EnChroma, mean 0.945 0.887 1.090 0.944 1.125 1.086 EnChroma, median 0.945 0.870 1.082 0.944 0.924 1.017 Table S1 – Results of the metamer ratio approximation. Mean and median J values are computed over 500 randomly generated spectra for each discretization. Using two filters reduces the frequency of metamers by a factor of about 50 on average, while using a single EnChroma filter has a negligible effect on the frequency of metamers Thin-film filter design The filter response design goal (Fig. S3(a)) used in this work is realized by conventional thin-film design methods. A commercial thin-film design software (Optilayer) was used to optimize a two-material thin-film stack to adequately meet the design goal. Tantalum oxide (Ta2O5) was chosen as the high index (n = 2.15) material and silicon dioxide (SiO2) was chosen as the low index (n = 1.46) material, as they are both easily deposited. The substrate was NBK7, a common optical glass. The final stack was constrained 19 to be less than 75 total layers to keep costs down, and each layer between 10 – 500 nm to prevent stress cracks in thick films. Using these constraints in tandem with the provided filter design goal, the thin-film stack was optimized for incident angles between 0 - 10°. A representative stack design produced by Optilayer for the design of Filter 2 is given in Fig. S5. The actual design for the device experimentally demonstrated in the main text was slightly modified from that of Fig. S5 by a thin-film foundry (Iridian), and the final design cannot be shared due to a non-disclosure agreement. Nevertheless, the specifics of the design are not critical as long as it implements the desired transmission spectrum (Fig. 2(b)). Figure S5: Thin-film filter stack design for filter 2 (Fig. S3(a)), using Ta2O5 (n = 2.15, blue) and SiO2 (n = 1.46, red) dielectric layers. Comparison of CRT and LCD monitors: The displays used in this work to generate metameric spectra were a True HD-IPS liquid crystal display (LCD) on a LG G3 smartphone and a conventional cathode ray tube (CRT) monitor (Dell E770P). These displays use very different mechanisms to generate colors, which results in significantly different spectra when displaying the same color (i.e. metamers). The LCD display uses a backlight, typically a white LED, which is transmitted through color filter arrays (red, green and blue color filters) to produce its color response. Therefore, the emitted spectrum is the product of the LCD backlight and color filter transmission response. The CRT monitor uses an electron gun, and relies on a phosphorescent screen to control its spectrum in the visible wavelength range. Because the two display types use significantly different methods to generate colors, the two emission technologies have different spectral features for the individual red, 20 green and blue color channels. The distinct features of the two displays are demonstrated in Figure S6(a), which shows the measured emitted spectrum of white light from each display (RGB = [255, 255, 255]). Figures S6(b, c) show the spectrum of each pure color channel (red, green and blue) for the LCD and CRT display, respectively. Figure S6: (a) Measured emission spectra of the LCD and CRT displays used in this work, displaying a white color (RGB = 255, 255, 255). (b, c) Measured emission spectra of each individual color channel (R, G, B) for the LCD and CRT display, respectively. For blue curves, the displayed color was RGB = (0, 0, 255), red curves RGB = (255, 0, 0), and green curves RGB = (0, 255, 0) Color accuracy of photographs: In this work, we used digitally generated color samples from spectroscopic data to demonstrate the splitting of a metameric pair using an LCD and CRT monitor (Fig. 3). This method was used because, due to the difference in spectral response between a camera sensor and the human eye, it is difficult to obtain a precisely color-accurate photograph. This difficulty is shown in Figure S7, which shows the original photograph of the experimental setup in Fig. 3(c), an edited photograph that better approximates the actual color, and a digitally rendered color sample showing the “actual color”. The colors are rendered using CIE matching functions, as described above; the [X,Y,Z] values calculated using the matching functions and the measured spectrum can then be converted to the sRGB color space, which is the working color space of most computers. Though the sRGB values will be the same across all display devices, the actual displayed color depends on the calibration of the monitor used. Therefore, the rendered color is Fig. S7(c) only represents the perceived color seen in the experiment when the monitor used to view the image has a perfect color calibration. It is clear that Fig. S7(a) is significantly different than the generated color sample in Fig. S7(c), even though the camera used in S7(a) and the spectrometer used to acquire the sample that generated the color in S8(c) sampled the same light. Fig. S7(b) is the figure used in the main text (Fig. 3(b)), and was edited to more closely represent the color in S8(c) to prevent confusion. The rendered color samples using spectroscopic data represent the perceived colors of both monitors much more accurately. 21 Figure S7: (a) Photograph of the setup shown in Fig. 3(c) of the main text, taken using a Sony α7R II camera. (b) The edited photograph that appears in Fig. 3(b) of the main text, which was modified to appear close in color to the rendered colors. This manipulation was performed to prevent confusion in the main text. (c) The actual color displayed during the experiment, rendered using spectra acquired using a grating spectrometer and cosine corrector. Hyperspectral images To demonstrate the utility of our wearable passive multispectral device in a more natural setting, we acquired a hyperspectral image of a complex scene, and applied the filters digitally (Fig. S8). The scene included a variety of blue and violet objects, including patches of color made using paints and pastels, plants, and a Morpho butterfly featuring a structural blue color [S5]. The image was obtained using a Middleton Spectral Vision MSV-500 High Sensitivity VNIR hyperspectral camera. The enlarged images in Fig. S8d show the butterfly wing next to six similarly colored samples made using oil pastels, with no filters applied. In Fig. S8e and Fig. S8f, filters 2 and 1, respectively, are applied to these enlarged images. The numbers in each panel represent the CIE ΔE color difference between the oil pastel color and the butterfly wing, averaged over a small area to reduce pixel noise. Using filter 2 (Fig. S8e), the appearance of the butterfly wing becomes more dissimilar to the pastel samples compared to no filter (i.e., the butterfly “blue” becomes easier to distinguish from the pastel “blue” using the filter). This again demonstrates the effect of partitioning the S cone to provide more spectral information. The improvement is absent for filter 1 (Fig. S8f), demonstrating the need for both filters in the design. We note that each filter creates a new set of metamers that may have been distinguishable before; by using two filters, the set of overlapping newly created metamers becomes significantly smaller. Therefore, as long as 22 at least one filter creates an increase in contrast, more spectral information can be communicated to the visual system while decreasing the overall number of possible metamers. Although a slight yellow/green tint is applied to both filtered images, Fig. S8b and Fig. S8c have similar “white-balance” due to the whitebalance condition enforced during the design process. Fig. S8: (a) RGB rendering of a hyperspectral image with natural and artificially colored objects, with no filter applied. (b) The render with filter 2 applied, and (c) the render with filter 1 applied. (d) Magnified view of butterfly wing and paint samples (outlined in green in (a)). (e) and (f) are the same samples as in (d), with filters 2 and 1 applied, respectively. The numbers inside each paint sample are the ΔE color difference, rounded to the nearest integer, between the paint sample and the butterfly wing with each respective filter applied. Supplementary References S1. Giuseppe C, Ghaoui LE (2014) Optimization Models (Cambridge University Press). S2. Boyd S, Vandenberghe L (2004) Convex optimization (Cambridge University Press). S3. Grant M, Boyd S CVX: Matlab software for disciplined convex programming, version 2.1, http://cvxr.com/cvx, October 2016. S4. Schmeder AW, McPherson DM (2014) Multi-band color vision filters and method by lp-optimization. S5. P. Vukusic, J. R. Sambles, C. R. Lawrence, R. J. Wootton, Quantified interference and diffraction in single Morpho butterfly scales. Proc. R. Soc. Lond. B Biol. Sci. 266, 1403–1411 (1999). 23
1cs.CV
Estimation under group actions: recovering orbits from invariants arXiv:1712.10163v1 [math.ST] 29 Dec 2017 Afonso S. Bandeira∗1,2 , Ben Blum-Smith†1 , Amelia Perry‡3 , Jonathan Weed§3 , and Alexander S. Wein¶k3 1 Department of Mathematics, Courant Institute of Mathematical Sciences, New York University, New York NY, USA 2 Center for Data Science, New York University, New York NY, USA 3 Department of Mathematics, Massachusetts Institute of Technology, Cambridge MA, USA January 1, 2018 Abstract Motivated by geometric problems in signal processing, computer vision, and structural biology, we study a class of orbit recovery problems where we observe noisy copies of an unknown signal, each acted upon by a random element of some group (such as Z/p or SO(3)). The goal is to recover the orbit of the signal under the group action. This generalizes problems of interest such as multi-reference alignment (MRA) and the reconstruction problem in cryo-electron microscopy (cryo-EM). We obtain matching lower and upper bounds on the sample complexity of these problems in high generality, showing that the statistical difficulty is intricately determined by the invariant theory of the underlying symmetry group. In particular, we determine that for cryo-EM with noise variance σ 2 and uniform viewing directions, the number of samples required scales as σ 6 . We match this bound with a novel algorithm for ab initio reconstruction in cryo-EM, based on invariant features of degree at most 3. We further discuss how to recover multiple molecular structures from heterogeneous cryo-EM samples. 1 Introduction Many computational problems throughout the sciences exhibit rich symmetry and geometry, especially in fields such as signal and image processing, computer vision, and microscopy. This is exemplified in cryoelectron microscopy (cryo-EM) [ADLM84, SS11, Nog16], an imaging technique in structural biology that was recently awarded the 2017 Nobel Prize in Chemistry. This technique seeks to estimate the structure of a large biological molecule, such as a protein, from many noisy tomographic projections (2-dimensional images) of the molecule from random unknown directions in 3-dimensional space. In cryo-EM, our signal of interest is the density θ of the molecule, considered as an element of the vector space of functions on R3 . We have access to observations of the following form: our microscopy sample contains many rotated copies Ri θ of the molecule, where Ri ∈ SO(3) are random, unknown 3D ∗ E-mail address: [email protected]. Supported in part by NSF grant DMS-1712730 and NSF grant DMS-1719545. Part of this work was done while ASB was visiting the Simons Institute for the Theory of Computing, this visit was partially supported by the DIMACS/Simons Collaboration on Bridging Continuous and Discrete Optimization through NSF grant #CCF-1740425. † E-mail address: [email protected]. ‡ E-mail address: [email protected]. Supported in part by NSF CAREER Award CCF-1453261 and a grant from the MIT NEC Corporation. § E-mail address: [email protected]. Supported in part by NSF Graduate Research Fellowship DGE-1122374. ¶ E-mail address: [email protected]. k Authors are ordered alphabetically, please direct correspondence to [email protected]. 1 rotations, and we observe the noisy projections Π(Ri θ) + ξi , where Π denotes tomographic projection (in a fixed direction) and ξi is a large noise contribution, perhaps Gaussian. This specific problem motivates the following general abstraction. Fix a compact group G acting (by orthogonal transformations) on a vector space V . Throughout, the vector space will be taken to be Rp and the group can be thought of as a subgroup of O(p), the orthogonal group1 . Let θ ∈ V be the signal we want to estimate. We receive noisy measurements of its orbit as follows: for i = 1, . . . , n we observe a sample of the form yi = gi · θ + ξi where gi is drawn randomly (in Haar measure2 ) from G and ξi ∼ N (0, σ 2 I) is noise. The goal is to recover the orbit of θ under the action of G. We refer to this task as the orbit recovery problem. This abstraction, already a rich object of study, neglects the tomographic projection in cryo-EM; we will also study a generalization of the problem which allows such a projection. We will also consider the additional extension of heterogeneity [Jon16, LS16, LS17, BBLS17], where mixtures of signals are allowed: we have K signals θ1 , . . . , θK , and each sample yi = gi · θki + ξi comes from a random choice 1 ≤ ki ≤ K of which signal is observed. This extension is of paramount importance for cryo-EM in practice, since the laboratory samples often contain one protein in multiple conformations, and understanding the range of conformations is key to understanding the function of the protein. 1.1 Prior work Several special cases of the orbit recovery problem have been studied for their theoretical and practical interest. Besides cryo-EM, another such problem is multi-reference alignment (MRA) [BCSZ14, BRW17, PWB+ 17], a problem from signal processing [ZvdHGG03, PZAF05] with further relevance to structural biology [Dia92, TS12]. In this problem, one observes noisy copies of a signal θ ∈ Rp , each with its coordinates permuted by a random cyclic shift. This is an example of the orbit recovery problem when G is taken to be the cyclic group Z/p acting by cyclic permutations of the coordinates. Since the cyclic group Z/p is simpler than SO(3), understanding MRA has been seen as a useful stepping stone towards a full statistical analysis of cryo-EM. Many prior methods for orbit recovery problems employ the so-called synchronization approach where the unknown group elements gi are estimated based on pairwise comparison of the samples yi . If the samples were noiseless, one would have gi gj−1 yj = yi ; thus noisy samples still give some weak information about gi gj−1 . Synchronization is the problem of using such pairwise information to recover all the group elements gi (up to a global right-multiplication by some group element). Once the group elements gi are known, the underlying signal can often be easily recovered. The synchronization approach to cryo-EM can be summarized as follows [VG86, VH87, SS11]. By the Fourier projection–slice theorem, the Fourier transforms of the tomographic projections are 2D slices of the Fourier transform of the molecule density. Given a hypothesis as to the angles of two slices, we can predict a 1D line of intersection along which those slices should agree. By measuring correlation along that common line, we obtain some weak information by which to confirm or refute our hypothesized angles. Indeed, this test only depends on the relative angle of the slices, thus providing weak information about the value of gi gj−1 . We then use a synchronization algorithm to recover the gi using this information. Methods to solve the synchronization problem over various groups include spectral methods [Sin11, SS11], semidefinite programming [Sin11, SS11, BCSZ14, BCS15, Ban15, BZS15], and approximate message passing (AMP) [PWBM16a]. A general Gaussian model for synchronization problems over any compact group is studied in [PWBM16b, PWBM16a]; ideas from statistical physics suggest that for this model, AMP is 1 We alert the reader to the fact that we will use O(p) to refer to the group of orthogonal matrices in dimension p and O(g(n)) as the standard big-O notation: f (n) = O(g(n)) if and only if there exists a constant C such that f (n) ≤ Cg(n) for all n sufficiently large. It will be clear from context which one is meant. 2 We note that any distribution of g can be reduced to Haar by left multiplying y by a Haar-distributed group element. i i However, as illustrated in [ABL+ 17], it is sometimes possible to exploit deviations from Haar measure. 2 optimal among all efficient algorithms [PWBM16a]. However, the model does not capture the underlying signal θ and instead assumes that for every pair i, j of samples, independent noisy measurements of the relative group elements gi gj−1 are observed. This independence does not correctly capture problems like MRA and cryo-EM, which have independent noise on each sample, rather than on each pairwise comparison of samples. The synchronization approach has proven to be effective both in theory and practice when the noise is sufficiently small. However, once the noise level is large, no consistent estimation of the group elements gi is possible [ADBS16]. Moreover, it is the high-noise regime that is the practically relevant one for many applications, including cryo-EM, where the presence of large noise is a primary obstruction to current techniques [Sig16]. As a result, recent work has focused on approaches to cryo-EM and MRA which provably succeed even in the large-noise limit. One striking finding of this line of work is that the sample complexity of the statistical estimation problem increases drastically as the noise level increases. For instance, for the multi-reference alignment problem with noise variance σ 2 , consistent estimation of typical signals requires Ω(σ 6 ) samples [BRW17, APS17], with significantly worse rates for atypical signals. By contrast, when σ 2 is smaller than some threshold, only O(σ 2 ) samples are required. Moreover, in contrast with the O(σ 2 ) rate—which would hold even in the absence of a group action—the Ω(σ 6 ) bound obtained in previous works depends on particular properties of the cyclic group. In this work, we significantly extend this prior work by determining the sample complexity of the estimation problem in the high-noise regime for general groups. The leading theoretical framework for the high-noise regime is the invariant features approach [BRW17, BBM+ 17, PWB+ 17, BBLS17, LBB+ 17]. This approach has a long history in the signal processing literature [Kam80, Sad89, SG92] and is analogous to the well known “method of moments” in statistics [vdV98]. In brief, the invariant features approach bypasses entirely the problem of estimating the group elements and focuses instead on estimating features of the signal which are preserved by the action of the group. So long as these invariant features uniquely specify the orbit of the original signal, the invariants are sufficient statistics for the problem of recovering the orbit of the original signal. This simple approach yields optimal dependence of the sample complexity on the noise level for the multi-reference alignment problem [BRW17, PWB+ 17]. The application of invariant features to cryo-EM dates back to 1980 with the work of Kam [Kam80], who partially solved cryo-EM by means of degree-2 invariant features, reducing the unknown molecule structure to a collection of unknown orthogonal matrices. Subsequent work has explored methods to estimate these orthogonal matrices [BZS15], including recent work showing how two noiseless tomographic projections suffice to recover these orthogonal matrices [LBB+ 17]. Our work can be viewed as a degree-3 extension of Kam’s method that fully solves cryo-EM while circumventing the orthogonal retrieval issue, and without requiring any noiseless projections. Our approach is ab initio, i.e. it does not require an initial guess of what the molecule looks like and thus cannot suffer from model bias, which is a documented phenomenon [Coh13] where the initial guess can have a significant effect on the result. Ab initio estimates are particularly useful to serve as a model-free starting point for popular iterative refinement algorithms such as RELION [Sch12]. Throughout, we focus on the case where the group elements are Haar-distributed. In the basic orbit recovery problem (projection), any distribution of gi can be reduced to Haar by left-multiplying each sample yi by a Haar-distributed group element. However, as illustrated in [ABL+ 17], it is sometimes possible to exploit deviations from Haar measure. The situation is different when we add projection to the problem setup, as is the case with Cryo-EM; if the viewing direction is not distributed uniformly then there may exist parts of the molecule that are systematically imaged less than others, which can cause serious difficulties in reconstruction. The present paper connects the orbit recovery problem to the invariant theory of groups, a classical and well-developed branch of algebra (see for example [Kač94, Dol03, Stu08, DK15]). Invariant theory’s traditional goal is to describe the ring of all polynomial functions on a vector space that are invariant under the action of a group – the invariant algebra. Since the 19th century, culminating in the pioneering work of David Hilbert [Hil90, Hil93], it has been known that the invariant algebra is finitely generated in many cases of interest, and so a fundamental problem has been to bound the degrees of the generators. In 2002, Derksen and Kemper [DK15] introduced the notion of a separating algebra – a subring of the invariant algebra that separates all orbits of the group action which are separated by the full invariant algebra. Our connection 3 to orbit recovery motivates the question of bounding the degree required to generate a separating algebra (see Section 4.4), a problem which has been recently studied [KK10, Dom16]. Our work also motivates the question of bounding the degree at which the field of invariant rational functions is generated as a field (see Section 4.3), which does not appear to have been the focus of research attention before. 1.2 Our contributions In this paper we extend the results of [BRW17] and show that the method of moments yields optimal sample complexity for orbit recovery problems over any compact group. Specifically, we show that optimal sample complexity is achieved by an algorithm that estimates the moments from the samples and then solves a polynomial system of equations in order to find a signal θ that would produce such moments. As the sample complexity depends on the number of moments used, this gives rise to the algebraic question of how many moments suffice to determine the orbit of θ. Using tools from invariant theory and algebraic geometry, we investigate this question for various success criteria and obtain sharp results in a number of settings. Our main focus is on the case where the signal is assumed to be generic and the goal is to output a finite list of signals, one of which is the truth. In this case we give a simple efficient algorithm for determining the number of moments required for any given orbit recovery problem. The main step of the algorithm is to compute the rank of a particular Jacobian matrix. We note that ours is an information-theoretic result rather than a computational one because even with knowledge of the number of moments required, estimating the original signal still requires solving a particular polynomial system of equations and we do not attempt to give a computationally-efficient method for this. There are fast non-convex heuristic methods to solve these systems in practice [BBLS17] but we leave for future work the question of analyzing such methods rigorously and exploring whether or not they reach the information-theoretic limits determined in this paper. For the case of finite groups, another efficient method for solving the polynomial system is via tensor decomposition, which has been analyzed for MRA [PWB+ 17]. Concrete results for problems such as MRA and cryo-EM are in Section 5. 1.3 Motivating examples In addition to the examples of MRA and cryo-EM, it is helpful to have the following motivating examples in mind: 1. Learning a “bag of numbers”: let G be the symmetric group Sp , acting on V = Rp by permutation matrices. Thus we observe random rearrangements of the entries of a vector, plus noise. 2. Learning a rigid body: let G be the rotation group SO(p), acting on the matrix space V = Rp×m by left-multiplication. We imagine the columns of our matrix as vertices defining a rigid body; thus we observe random rotations of this rigid body (with vertices labeled) plus noise. 3. S 2 registration: Let S 2 ⊆ R3 be the unit sphere. Let V be the finite-dimensional vector space of functions on S 2 → R that are band-limited, i.e. linear combinations of spherical harmonics up to some fixed degree (spherical harmonics are the appropriate “Fourier basis” for functions on the sphere); let θ ∈ V be such a function S 2 → R. Let G = SO(3), acting on the sphere by 3-dimensional rotation; this induces an action on V via (g · θ)(x) = θ(g −1 · x). Thus we observe many noisy copies of a fixed function on the sphere, each rotated randomly. 1.4 Problem statement Throughout, we consider a compact (topological) group G acting linearly, continuously, and orthogonally on a finite-dimensional real vector space V = Rp . In other words, G acts on V via a linear representation ρ : G → O(V ), and ρ itself is a continuous function. Here O(V ) denotes the space of real orthogonal p × p matrices. Let Haar(G) denote Haar measure (i.e., the “uniform distribution”) on G. We define the orbit recovery problem as follows. 4 Problem 1.1 (orbit recovery). Let V = Rp and let θ ∈ V be the unknown signal. Let G be a compact group that acts linearly, continuously, and orthogonally on V . For i ∈ [n] = {1, 2, . . . , n} we observe yi = gi · θ + ξi where gi ∼ Haar(G) and ξi ∼ N (0, σ 2 Ip×p ), all independently. The goal is to estimate θ. Note that we can only hope to recover θ up to action by G; thus we aim to recover the orbit {g · θ : g ∈ G} of θ. In practical applications, σ is often known in advance and, when it is not, it can generally be estimated accurately on the basis of the samples. We therefore assume throughout that σ is known and do not pursue the question of its estimation in this work. Our primary goal is to study the sample complexity of the problem: how must the number of samples n scale with the noise level σ (as σ → ∞ with G and V fixed) in order for orbit recovery to be statistically possible? All of our results will furthermore apply to a generalized orbit recovery problem (Problem 2.3) allowing for projection and heterogeneity (see Section 1.6). Our work reveals that it is natural to consider several different settings in which to state the orbit recovery problem. We consider the following two decisions: 1. Do we assume that θ is a generic signal, or do we allow for a worst-case signal? (Here generic means that there is a measure-zero set of disallowed signals.) 2. Do we want to output a θ′ such that θ′ (approximately) lies in the orbit of θ (unique recovery), or simply a finite list θ1 , . . . , θs of candidates such that one of them (approximately) lies in the orbit of θ (list recovery)? The terminology “list recovery” is borrowed from the idea of list decoding in the theory of error-correcting codes [Eli57]. By taking all combinations of the two options above, there are four different recovery criteria. Strikingly, these different recovery criteria can be very different in terms of sample complexity, as the following examples show (see Section 5 for more details): 1. Multi-reference alignment (MRA): Recall that this is the case G = Z/p acting on V = Rp by cyclic shifts. It is known [PWB+ 17] that if θ is generic then unique recovery is possible with O(σ 6 ) samples. However, for a worst-case θ, many more samples are required (even for list recovery); as shown in [BRW17], there are some very particular infinite families of signals that cannot be distinguished without Ω(σ 2p ) samples. This illustrates a large gap in difficulty between the generic and worst-case problems. 2. Learning a rigid body: Let G be the rotation group SO(p) acting on the matrix space Rp×m by left multiplication. We imagine the columns of our matrix as vertices defining a rigid body; thus we observe random rotations of this rigid body (with vertices labeled) plus noise. With O(σ 4 ) samples it is possible to recover the rigid body up to reflection, so that list recovery (with a list of size 2) is possible. However, unique recovery (even for a generic signal) requires drastically more samples: Ω(σ 2p ). We will address all four recovery criteria but our main focus will be on the case of generic list recovery, as it is algebraically the most tractable to analyze. For the following reasons we also argue that it is perhaps the most practically relevant case. Clearly real-world signals are generic. Also, unique recovery is actually impossible in some practical applications; for instance, in cryo-EM it is impossible to determine the chirality of the molecule. Furthermore, one could hope to use application-specific clues to pick the true signal out from a finite list; for instance, in cryo-EM we might hope that the spurious solutions in our finite list do not look like “reasonable” molecules and can be thrown out. 1.5 Method of moments Our techniques rely on estimation of the following moments: Definition 1.2 (moment tensor). The order-d moment tensor is Td (θ) := Eg [(g · θ)⊗d ] where g ∼ Haar(G). 5 Pn We can estimate Td (θ) from the samples by computing n1 i=1 yi⊗d plus a correction term to cancel bias from the noise terms (see Section 7 for details). The moments Td (θ) are related to polynomials that are invariant under the group action, which brings us to the fundamental object in invariant theory: Definition 1.3 (invariant ring). Let x = (x1 , . . . , xp ) be a set of coordinate functions on V = Rp , i.e. a basis for the dual V ∗ , so that R[x] := R[x1 , . . . , xp ] is the ring of polynomial functions V → R. We have an action of G on R[x] given by (g · f )(·) = f (g −1 (·)). (If we fix a basis for V , we can think of x as indeterminate variables corresponding to the entries of θ ∈ V .) The invariant ring R[x]G ⊆ R[x] is the ring consisting of polynomials f that satisfy g · f = f for all g ∈ G. An element of the invariant ring is called an invariant polynomial (or simply an invariant ). Invariant polynomials can be equivalently characterized as polynomials of the form Eg [g · f ] where f ∈ R[x] is any polynomial and g ∼ Haar(G). The two objects above are equivalent in the following sense. The moment tensor Td (θ) contains the same information as the set of evaluations f (θ) for all f ∈ R[x]G that are homogeneous of degree d. In particular, for any such polynomial f , f (θ) is a linear combination of the entries of Td (θ). The following algebraic question will be of central importance: when do the values of invariant polynomials (of degree ≤ d) of θ determine the orbit of θ (in the appropriate sense)? As we see below, the sample complexity of the statistical problem is completely characterized by the answer to this question. 1.5.1 Warm up: hypothesis testing Consider for now the simple problem of distinguishing between two fixed hypotheses θ = τ1 and θ = τ2 , where τ1 and τ2 are two fixed vectors in V . One method is to find an invariant polynomial f for which f (τ1 ) 6= f (τ2 ) and to estimate f (θ) using the samples. The sample complexity of this procedure depends on the degree of f because if f has degree d, we need O(σ 2d ) samples to accurately estimate f (θ). We will prove the following (see Section 3). Theorem 1.4 (distinguishing upper bound). Fix τ1 , τ2 ∈ V . If there exists a degree-d invariant polynomial f ∈ R[x]G with f (τ1 ) 6= f (τ2 ) then, using O(σ 2d ) samples, it is possible to distinguish between θ = τ1 and θ = τ2 with type-I and type-II error probabilities each at most 1/3. Here, O(· · · ) hides factors that depend on G (and its action on V ), τ1 , and τ2 , but not σ; we are most interested in how the sample complexity scales as σ becomes large (with everything else held fixed). The error probability 1/3 is arbitrary and can be boosted by taking more samples (see Theorem 3.2). Furthermore, we have a matching lower bound to show that the method of moments is optimal: the sample complexity is driven by the minimum degree of an invariant polynomial that separates τ1 and τ2 . Theorem 1.5 (distinguishing lower bound). Fix τ1 , τ2 ∈ V . Let d∗ be the smallest positive integer d for ∗ which Td (τ1 ) 6= Td (τ2 ). Then Ω(σ 2d ) samples are required to distinguish between θ = τ1 and θ = τ2 with type-I and type-II error probabilities each at most 1/3. See Section 3 for more details. 1.5.2 Recovery We now address the problem of recovering the signal θ from the samples. Our goal is to recover the orbit of θ, defined as follows. G G Definition 1.6. For θ1 , θ2 ∈ V , define an equivalence relation ∼ by letting θ1 ∼ θ2 if there exists g ∈ G G such that g · θ1 = θ2 . The orbit of θ (under the action of G) is the equivalence class of θ under ∼, i.e. the set {g · θ : g ∈ G}. Denote by V /G the set of orbits of V , that is, the equivalence classes of V modulo the G relation ∼. We need the following definitions to capture the notion of approximately recovering the orbit of θ. 6 Definition 1.7. For θ1 , θ2 ∈ V , let dG (θ1 , θ2 ) = min kθ1 − g · θ2 k2 . g∈G This pseudometric induces a metric on the quotient space V /G in the obvious way, so we can write dG (o1 , o2 ) for o1 , o2 ∈ V /G. By slight abuse of notation, we write dG (θ1 , o2 ) for dG (o1 , o2 ), where o1 is the orbit of θ1 . Theorem 1.5 already shows that if the orbit of θ is not determined by knowledge of the first d − 1 moment tensors, then at least Ω(σ 2d ) samples are required to recover the orbit of θ. We are now ready to (informally) state our main result on recovery (see Section 3 for more details), which provides a matching upper bound. Theorem 1.8 (recovery upper bound, informal). Fix θ ∈ V . If the moments T1 (θ), · · · , Td (θ) uniquely b ≤ε determine the orbit of θ, then using O(σ 2d ) samples, we can produce an estimator θb such that dG (θ, θ) with high probability. The analogous result holds for list recovery (see Section 3): if the moments determine a finite number of possibilities for the orbit of θ then we can output a finite list of estimators, one of which is close to the orbit of θ. Thus, we have reduced to the algebraic question of determining how many moments are necessary to determine the orbit of θ (either uniquely or in the sense of list recovery). In Section 4 we will use tools from invariant theory and algebraic geometry in order to address these questions. 1.6 Extensions: projection and heterogeneity We now consider some extensions to the basic orbit recovery problem (Problem 1.1), motivated by the application of cryo-EM: 1. Projection: In cryo-EM, we do not observe a noisy 3-dimensional model of the rotated molecule; we only observe a 2-dimensional projection of it. We will model this projection by a linear map Π : Rp → Rq that maps a 3-dimensional model to its 2-dimensional projection (from a fixed viewing direction). The samples are then given by yi = Π(gi · θ) + ξi where ξi ∼ N (0, σ 2 I). 2. Heterogeneity: In cryo-EM we observe images of many different copies of the same molecule, each rotated differently. However, if our sample is not pure, we may have a mixture of different molecules and want to recover the structure of all of them. We will model this by taking K different unknown signals θ1 , . . . , θK along with positive mixing weights w1 , . . . , wK which sum to 1. Each sample takes the form yi = gi · θki + ξi where ki is chosen at random according to the mixing weights. In Section 2 we will formally define a generalization of the orbit recovery problem that allows for either (or both) of the above extensions. All of our methods will apply to this general case. 1.7 Organization of the remainder of the paper In Section 2, we define a generalization of Problem 1.1 which encompasses projection and heterogeneity, and specify the basic algebraic objects which relate to our generalized problem. In Section 3, we formally state statistical upper and lower bounds for the generalized orbit recovery problem in terms of invariants. In Section 4, we establish our basic algebraic results and specify the algebraic criteria that correspond to the different recovery criteria defined in Section 1.4. We also give an efficient algorithm to decide the algebraic criterion corresponding to generic list recovery. Finally, in Section 5, we apply our work to several examples of the orbit recovery problem, including MRA and cryo-EM. We conclude in Section 6 with questions for future work. Sections 7–9 contain proofs of results from preceding sections. Appendix A contains an account of the invariant theory of SO(3), and Appendix B contains a proof (using Galois theory) of generic unique recovery in a particular special case of the orbit recovery problem (the regular representation of a finite Abelian group). 7 2 General problem statement Our results will apply not only to the basic orbit recovery problem (Problem 1.1) but to a generalization (Problem 2.3 below) that captures the projection and heterogeneity extensions discussed in Section 1.6. We first define mixing weights for heterogeneous problems. PK Definition 2.1 (mixing weights). Let w = (w1 , . . . , wK ) ∈ ∆K := {(z1 , . . . , zK ) : zk ≥ 0 ∀k, k=1 zk = 1}. w Let k ∼ [K] indicate that k is sampled from [K] = {1, . . . , K} such that k = ℓ with probability wℓ . We will sometimes instead parametrize the mixing weights by w k = wk − 1/K so that w lies in the vector space PK ∆ := {(z1 , . . . , zK ) : k=1 zk = 0}. In a heterogeneous problem with K different signals, we can only hope to recover the signals up to permutation. To formalize this, our compound signal will lie in a larger vector space V and we will seek to recover its orbit under a larger group G. Definition 2.2 (setup for heterogeneity). Let G̃ be a compact group acting linearly, continuously, and orthogonally on Ṽ = Rp . Let V = Ṽ ⊕K ⊕ ∆K , so that θ ∈ V encodes K different signals along with mixing weights: θ = (θ1 , . . . , θK , w). We let an element (g1 , . . . , gK , π) of the Cartesian product set G̃K × SK act on V as follows: first, each gk acts on the corresponding θk , and then π permutes the θk and the coordinates of w. Note that this action is linear and orthogonal (where ∆ uses the usual inner product inherited from RK ). There is a natural group structure G on the set G̃K × SK such that the action just described is actually a group action by G: the semidirect product G = G̃K ⋊ϕ SK , where ϕ denotes the action of SK on G̃K by permutations of the factors. This is also called the wreath product of G̃ by SK and written G̃ ≀ SK . The product topology on G̃K × SK makes G a topological group; it is compact with respect to this topology since all the factors are compact, and the action described above is continuous. Of course, by taking K = 1 we recover the basic setup (without heterogeneity) as a special case. We are now ready to give the general problem statement. Problem 2.3 (generalized orbit recovery). Let Ṽ = Rp and W = Rq . Let G̃ be a compact group acting linearly, continuously, and orthogonally on Ṽ . Let Π : Ṽ → W be a linear map. Let θ = (θ1 , . . . , θK , w) ∈ V := Ṽ ⊕K ⊕ ∆K be an unknown collection of K signals with mixing weights w ∈ ∆K . For i ∈ [n] = {1, 2, . . . , n} we observe yi = Π(gi · θki ) + ξi w where gi ∼ Haar(G̃), ki ∼ [K], ξi ∼ N (0, σ 2 Iq×q ), all independently. The goal is to estimate the orbit of θ under G := G̃K ⋊ SK . Note that this serves as a reduction from the heterogeneous setup to the basic setup in the sense that we are still only concerned with recovering the orbit of a vector θ under the action of some compact group. As discussed previously, we apply the method of moments. The moments are now defined as follows. Definition 2.4 (moment tensor). For the generalized orbit recovery problem (Problem 2.3), the order-d w moment tensor is Td (θ) := Eg,k [(Π(g · θk ))⊗d ] where g ∼ Haar(G̃) and k ∼ [K]. Equivalently, Td (θ) = PK ⊗d ]. k=1 wk Eg [(Π(g · θk )) The invariant ring is defined as in Definition 1.3 but now for the larger group G acting on the larger V : Definition 2.5 (invariant ring). Note that dim(V ) = Kp + K − 1 and let x = (x1 , . . . , xdim(V ) ) be a basis for V ∗ ; here the last K − 1 variables correspond to ∆, e.g. they can correspond to w 1 , . . . , w K−1 . We then let R[x]G ⊆ R[x] be the polynomials in x that are invariant under the action of G (as in Definition 1.3). Recall that in the basic orbit recovery problem, Td (θ) corresponds precisely to the homogeneous invariant polynomials of degree d; now Td (θ) corresponds to a subspace of the homogeneous invariant polynomials of degree d. Specifically, the method of moments gives us access to the following polynomials (evaluated at θ): 8 Definition 2.6. Let UdT be the subspace (over R) of the invariant ring R[x]G consisting of all R-linear T combinations of entries of Td (x). Let U≤d = U1T ⊕ · · · ⊕ UdT ⊆ R[x]G . Here we write Td (x) for the collection of polynomials (one for each entry of Td (θ)) that map θ to Td (θ). T We will be interested in whether the subspace U≤d contains enough information to uniquely determine the orbit of θ (or determine a finite list of possible orbits) in the following sense. Definition 2.7. A subspace U ⊆ R[x]G resolves θ ∈ V if there exists a unique o ∈ V /G such that f (θ) = f (o) for all f ∈ U . Similarly, U list-resolves θ if there are only finitely many orbits o1 , . . . , os such that f (θ) = f (oi ) for all f ∈ U . Here we have abused notation by writing f (o) to denote the (constant) value that f takes on every θ ∈ o. The following question is of central importance. T Question 2.8. Fix θ ∈ V . How large must d be in order for U≤d to uniquely resolve θ? How large must d T be in order for U≤d to list-resolve θ? The answer depends on G and V but also on whether θ is a generic or worst-case signal, and whether we ask for unique recovery or list recovery. Our statistical results in Section 3 will show that the sample complexity of the generalized orbit recovery problem is Θ(σ 2d ) where d is the minimal d from Question 2.8. More specifically, the recovery procedure that obtains this bound is based on estimating the moments T1 (θ), . . . , Td (θ) and solving a system of polynomial equations to (approximately) recover θ. Our algebraic results in Section 4 will give general methods to answer Question 2.8 for any G and V . 3 Statistical results In this section, we state upper and lower bounds on the performance of optimal estimators for the orbit recovery problem. Proofs are deferred to Section 7. Our approach will be the method of moments introduced in Section 1.5. We assume for normalization purposes that there exists a constant c ≥ 1 such that c−1 ≤ kθk ≤ c, so that σ captures entirely the signal-to-noise ratio of the problem. We denote by Θ the subset of V consisting of vectors satisfying this requirement. Denote by Pθ the distribution of a sample arising from the generalized orbit recovery problem (Problem 2.3) with parameter θ. Definition 3.1. Given θ ∈ Θ, the order-d matching set for θ, Mθ,d, is the set consisting of all τ ∈ V such T . that f (τ ) = f (θ) for all f ∈ U≤d T T list-resolves θ when resolves θ exactly when Mθ,d contains a single orbit, and U≤d We note that U≤d Mθ,d is the union of a finite number of orbits. We are now ready to state a formal theorem justifying Theorems 1.4 and 1.8, above. The following theorem establishes that we can approximately learn the order-d matching set for θ with probability at least 1 − δ on the basis of O(σ 2d log(1/δ)) samples. Denote by Mεθ,d the ε-fattening of Mθ,d, i.e., the set of all φ ∈ Θ such that minτ ∈Mθ,d kφ − τ k ≤ ε. Theorem 3.2. For any positive integer n, noise level σ ≥ maxθ∈Θ kθk, and accuracy parameter δ > 0, there cn = M cn (y1 , . . . , yn ) ⊆ V such that, for any positive constant ε, if y1 , . . . , yn ∼ Pθ i.i.d. exists an estimator M and n ≥ cθ,ε,d log(1/δ)σ 2d , then with probability at least 1 − δ, cn ⊆ Mεθ,d . Mθ,d ⊆ M The constant cθ,ε,d in Theorem 3.2 can be replaced by cθ,d ε−2 in the unique recovery setting if θ is suitably generic, but the dependence on ε can be worse in general. What is key is that cθ,ε,d does not depend on σ, so that Theorem 3.2 captures the behavior of the sample complexity in the large σ limit. 9 Theorem 3.2 essentially follows from the observation that, since the variance of yi is O(σ 2 ), a degree-d T polynomial in the entries of yi has variance O(σ 2d ). This implies that for any f ∈ U≤d , the evaluation f (θ) 2d can be accurately estimated on the basis of O(σ ) samples. By inverting a suitable polynomial system, we can thereby identify Mθ,d , at least approximately. A full proof of Theorem 3.2 appears in Section 7. Theorem 3.2 captures the behavior described in both Theorem 1.4 and Theorem 1.8. Indeed, if τ1 and τ2 differ on some f ∈ UdT , then Mτ1 ,d is separated from Mτ2 ,d , and Theorem 3.2 implies that we can therefore distinguish between the two distributions when ε is sufficiently small. Moreover, as the following corollary cn allows us to recover or list-recover the orbit of θ. shows, Theorem 3.2 implies that the confidence set M Corollary 3.3. Suppose that Mθ,d is the union of M orbits o1 , . . . , oM , where M is finite. There exists an εθ such that, for ε < εθ , if n ≥ cθ,ε,d log(1/δ)σ 2d , then on the basis of n i.i.d. samples from Pθ we can produce M estimators θb1 , . . . θbM such that, with probability at least 1 − δ, there exists a permutation π : [M ] → [M ] satisfying dG (θbi , oπ(i) ) ≤ ε for all i ∈ [N ]. Proof. Since G is a compact group acting continuously on V , the orbits are compact. By assumption Mθ,d , is a union of a finite number of orbits, so there exists an εθ such that dG (oi , oj ) ≥ 4εθ for any i 6= j. For cn as in Theorem 3.2. Theorem 3.2 implies the any ε < εθ , let N be an ε/2-net of V /G, and construct M existence of a constant cθ,ε,d such that as long as n ≥ cθ,ε,d log(1/δ)σ 2d , with probability at least 1 − δ, cn ⊆ Mε/2 . Mθ,d ⊆ M θ,d cn ) ≤ ε/2. With probability 1 − δ, any element Consider the set C consisting of o ∈ N such that dG (o, M of C is within ε of oi for some i ∈ [M ], and for each oi there exists an o ∈ C that is at most ε away. By assumption, distinct orbits in Mθ,d are separated by more than 4ε, so if any two elements of C are separated by at most 2ε, then they are close to the same element of Mθ,d . As a result, it is possible to partition C into M sets C1 , . . . , CM such that dG (o, o′ ) ≤ 2ε if o, o′ are in the same set, and dG (o, o′ ) > 2ε if o and o′ are in different sets. For i ∈ [M ], let θbi be any element of V such that the orbit of θbi lies in Ci . The claim follows. The constant εθ in the statement of Corollary 3.3 will not be known in general. However, a weaker cn under the projection V 7→ V /G. statement still holds when ε ≥ εθ . Indeed, consider the image of the set M There exists a finite partition of the resulting set such that any two orbits in the same cluster are closer than any two orbits in different clusters. (Note that the clustering into a single set always satisfies this requirement.) If we are able to choose this partition such that the diameter of each set is at most ε′ , then by choosing a representative from each cluster, we obtain a finite set of estimators, at least one of which is guaranteed to be ε′ -close to θ with high probability. Corollary 3.3 implies that this partition can be taken to consist of at most M clusters for ε′ arbitrarily small, as long as n ≥ Cε′ σ 2d . We now prove a lower bound showing that the dependence on σ in Theorem 3.2 is tight. We show that T if U≤d−1 fails to resolve (or list-resolve) θ, then Ω(σ 2d ) samples are necessary to recover (or list-recover) the orbit of θ. Together with Theorem 3.2, this lower bound implies that if d∗ is the smallest positive integer ∗ for which UdT∗ resolves (or list-resolve) θ, then Θ(σ 2d ) samples are required to recover (or list-recover) the orbit of θ. We make this lower bound precise in Theorem 3.4. Theorem 3.4. For any positive integer d, there exists a constant cd such that if τ1 and τ2 are elements in Mθ,d−1 lying in different orbits, then no procedure can distinguish between Pnτ1 and Pnτ2 with probability greater than 2/3 if n ≤ cd σ 2d . Note that via Le Cam’s method [LeC73], Theorem 3.4 translates into lower bounds for the problem of recovering θ. The proof of Theorem 3.4 relies on a tight bound for the Kullbeck-Leibler divergence between the distributions Po1 and Po2 established in [BRW17]. More details appear in Section 7. 10 4 Algebraic results In this section, we will consider the four recovery criteria defined in Section 1.4, and give algebraic characterizations of each case. The results of Section 3 imply that it suffices to focus our attention on deciding when a subspace U resolves (or list-resolves) a parameter θ. We show below how to answer this question by purely algebraic means. Moreover, for generic list recovery, we show how this question can be answered algorithmically in polynomial time. For generic and worst-case unique recovery, we also give algorithms to decide the corresponding algebraic condition; however, these algorithms are not efficient. Throughout, we assume the setup defined in Section 2 for the generalized orbit recovery problem. In particular, G is a compact group acting linearly and continuously on a finite-dimensional real vector space V (although we do not require in this section that the action be orthogonal). We have the invariant ring T R[x]G corresponding to the action of G on V , and a subspace U ⊆ R[x]G (e.g. U≤d ) of invariants that we have access to. We are interested in whether the values f (θ) for f ∈ U determine the orbit of θ ∈ V under T G. The specific structure of G and U≤d (as defined in Section 2) will be largely unimportant and can be abstracted away. 4.1 Invariant theory basics We will often need the following basic operator that averages a polynomial over the group G. Definition 4.1 (Reynolds operator). The Reynolds operator R : R[x] → R[x]G is defined by R(f ) = E [g · f ]. g∼Haar(G) Note that the Reynolds operator is a linear projection from R[x] to R[x]G that preserves the degree of homogeneous polynomials (i.e. a homogeneous polynomial of degree d gets mapped either to a homogeneous polynomial of degree d or to zero). Observation 4.2. Let R[x]G d denote the vector space consisting of homogeneous invariants of degree d. We can obtain a basis for R[x]G d by applying R to each monomial in R[x] of degree d. (This yields a spanning set which can be pruned to a basis if desired.) In our setting, we have the following basic fact from invariant theory. Theorem 4.3 (e.g. [Kač94] Theorem 4.1-3). The invariant ring R[x]G is finitely generated as an R-algebra. In other words, there exist generators f1 , . . . , fm ∈ R[x]G such that R[f1 , . . . , fm ] = R[x]G . Furthermore, there is an algorithm to find a generating set; see Section 8.1. Another basic fact from invariant theory implies that the entire invariant ring is sufficient to determine the orbit of θ. (This is not always true for non-compact groups; see Example 2.3.1 in [DK15].) Theorem 4.4 ([Kač94] Theorem 6-2.2). The full invariant ring R[x]G resolves every θ ∈ V . Proof. Let o1 , o2 ∈ V /G be distinct (and therefore disjoint) orbits. Since G is compact and acts continuously, o1 and o2 are compact subsets of V . Thus by Urysohn’s lemma there exists a continuous function f˜ : V → R such that f˜(τ ) = 0 ∀τ ∈ o1 and f˜(τ ) = 1 ∀τ ∈ o2 . The Stone–Weierstrass theorem states that a continuous function on a compact domain can be uniformly approximated to arbitrary accuracy by a polynomial. This means there is a polynomial f ∈ R[x] with f (τ ) ≤ 1/3 ∀τ ∈ o1 and f (τ ) ≥ 2/3 ∀τ ∈ o2 . It follows that h = R(f ) is an invariant polynomial that separates the two orbits: h(o1 ) ≤ 1/3 and h(o2 ) ≥ 2/3. Thus, in order to determine the orbit of θ it is sufficient to determine the values of all invariant polynomials. (This condition is clearly also necessary in the sense that if the orbit is uniquely determined then so are the values of all invariants.) 11 Remark 4.5. In what follows we will be discussing algorithms that take the problem setup as input (includT ing G̃ and its action on Ṽ , along with Π, K) and decide whether or not U≤d (for some given d) is capable of a particular recovery task (e.g. list recovery of a generic θ ∈ V ). We will always assume that these algorithms have a procedure to compute a basis for UdT (for any d) in exact symbolic arithmetic. This is non-trivial in some cases because Td (x) (and thus UdT ) involves integration over the group (and may involve irrational values), but we will not worry about these details here. For the important case of SO(3), it is possible to write down a basis for the invariants in closed form (see Appendix A). Remark 4.6. We will draw from various references for algorithmic aspects of invariant theory. The case of finite groups is treated by [Stu08]. Although the invariant ring is sometimes taken to be C[x]G instead of R[x]G , this is unimportant in our setting because the two are essentially the same: since our group action is real, a basis for R[x]G (over R) is a basis for C[x]G (over C). The case of infinite groups is covered by [DK15]. Here the group is assumed to be a reductive group over C (or another algebraically-closed field). This means in particular that the group is a subset of complex-valued matrices that is defined by polynomial constraints. Although compact groups such as SO(3) do not satisfy this, the key property of a reductive group is the existence of a Reynolds operator satisfying certain properties; since this exists for compact groups (Definition 4.1), some (but not all) results still hold in our setting. 4.2 Generic list recovery We will see that the case of list recovery of a generic signal is governed by the notion of algebraic independence. Definition 4.7. Polynomials f1 , . . . , fm ∈ R[x] are algebraically dependent if there exists a nonzero polynomial P ∈ R[y1 , . . . , ym ] such that P (f1 , . . . , fm ) = 0 (i.e. P (f1 (x), . . . , fm (x)) is equal to the zero polynomial). Otherwise, they are algebraically independent. Definition 4.8. The transcendence degree of a subspace U ⊆ R[x], denoted trdeg(U ) is the maximum value of m for which there exist algebraically independent f1 , . . . , fm ∈ U . A set of trdeg(U ) such polynomials is called a transcendence basis of U . We now present our algebraic characterization of the generic list recovery problem. Theorem 4.9 (generic list recovery). Let U ⊆ R[x]G be a finite-dimensional subspace. If trdeg(U ) = trdeg(R[x]G ) then there exists a set S ⊆ V of full measure such that if θ ∈ S then U list-resolves θ. Conversely, if trdeg(U ) < trdeg(R[x]G ) then there exists a set S ⊆ V of full measure such that if θ ∈ S then U does not list-resolve θ. The proof is deferred to Sections 8.2 and 8.3. A set has full measure if its complement has measure zero. The intuition behind Theorem 4.9 is that trdeg(R[x]G ) is the number of degrees of freedom that need to be pinned down in order to learn the orbit of θ, and so we need this many algebraically independent constraints (invariant polynomials). Note that we have not yet given any bound on how large the finite list might be; we will address this in Section 4.3. In order for Theorem 4.9 to be useful, we need a way to compute the transcendence degree of both R[x]G and U . In what follows, we will discuss methods for both of these: in Section 4.2.1 we show how to compute trdeg(R[x]G ) analytically, and in Section 4.2.2 we give an efficient algorithm to compute trdeg(U ) T for a subspace U . By taking U = U≤d this yields an efficient algorithm to determine the smallest degree d T at which U≤d list-resolves a generic θ (thereby answering Question 2.8 for the case of generic list recovery). 4.2.1 Computing the transcendence degree of R[x]G . Intuitively, the transcendence degree of R[x]G is the number of parameters required to describe an orbit of G. For finite groups, this is simply the dimension of V : Proposition 4.10 ([Stu08] Proposition 2.1.1). If G is a finite group, trdeg(R[x]G ) = dim(V ). 12 For infinite groups, the situation may be slightly different. For instance, if SO(3) acts on V = R3 in the standard way (rotations in 3 dimensions), then a generic orbit is a sphere, with dimension two. This means there is only one parameter to learn, namely the 2-norm, and we expect R[x]G to have transcendence degree 1 accordingly. On the other hand, if SO(3) acts on a rich class of functions S 2 → R (as in the S 2 registration problem; see Section 5.4) then each orbit resembles a copy of SO(3) which has dimension 3. This is formalized in the following. Proposition 4.11 ([Dol03] Corollary 6.2). If G is an algebraic group, then trdeg(R[x]G ) = dim(V ) − dim(G) + min dim(Gv ), v∈V where Gv is the stabilizer at v of the action of G (that is, the subgroup of all g ∈ G fixing v). An alternate approach to the transcendence degree of R[x]G uses a central object in invariant theory: the Hilbert series (see e.g. [DK15]). G Definition 4.12. Let R[x]G consisting of homogeneous invariants of d be the subspace (over R) of R[x] G degree d. The Hilbert series of R[x] is the formal power series H(t) := ∞ X d dim(R[x]G d )t . d=0 For a given G acting on V , there is an explicit formula (Molien’s formula) for the Hilbert series: Proposition 4.13 ([Kač94] Remark 3-1.8). Let ρ : G → GL(V ) be the representation by which G acts on V . Then for |t| < 1, H(t) converges and we have H(t) = E g∼Haar(G) det(I − t ρ(g))−1 . This formula is tractable to compute, even for complicated groups; see Section 5.4 for details in the case of SO(3). Once we have the Hilbert series, it is easy to extract trdeg(R[x]G ) as follows. Proposition 4.14. The order of the pole at t = 1 of H(t) is equal to trdeg(R[x]G ). The proof comes from [DK15]; see Section 8.4 for more details. For heterogeneous problems (K > 1), the transcendence degree can be computed easily from the transcendence degree of the corresponding homogeneous (K = 1) problem. Proposition 4.15. Let G̃ be a compact group acting linearly and continuously on Ṽ , and let G = G̃K ⋊ SK act on V = Ṽ ⊕K ⊕ ∆K as in Definition 2.2. Let R[x]G be the invariant ring corresponding to the action of G on V , and let R[x̃]G̃ be the invariant ring corresponding to the action of G̃ on Ṽ (i.e. the K = 1 problem). Then trdeg(R[x]G ) = K · trdeg(R[x̃]G̃ ) + K − 1. The proof can be found in Section 8.5. Note, however, that the result is intuitively reasonable by counting parameters. We know trdeg(R[x̃]G̃ ) is the number of parameters required to describe an orbit of G̃ acting on Ṽ . Thus, in the heterogeneity problem we have trdeg(R[x̃]G̃ ) parameters for each of the K signals, plus an additional K − 1 parameters for the K mixing weights (since they sum to 1). 4.2.2 Algorithm for transcendence basis of U . In this section we prove the following. Theorem 4.16. There is an efficient algorithm to perform the following task. Given a basis {u1 , . . . , us } for a finite-dimensional subspace U ⊆ R[x], output a transcendence basis for U . 13 Our first ingredient is the following simple classical test for algebraic independence (see, e.g., [ER93, BMS13] for a proof). Definition 4.17 (Jacobian). Given polynomials f1 , . . . , fm ∈ R[x] = R[x1 , . . . , xp ], we define the Jacobian matrix Jx (f1 , . . . , fm ) ∈ (R[x])m×p by (Jx (f1 , . . . , fm ))ij = ∂xj fi where ∂xj denotes formal partial derivative with respect to xj . Proposition 4.18 (Jacobian criterion for algebraic independence). Polynomials f = (f1 , . . . , fm ) are algebraically independent if and only if the Jacobian matrix Jx (f ) has full row rank (over the field R(x)). It suffices to test the rank of the Jacobian at a generic point x. Corollary 4.19. Fix f = (f1 , . . . , fm ). Let z ∼ N (0, Ip×p ). If f is algebraically dependent then Jx (f )|x=z does not have full row rank. If f is algebraically independent then Jx (f )|x=z has full row rank with probability 1. Proof. An m × p matrix has deficient row rank if and only if either m > p or every maximal square submatrix has determinant zero. Every such determinant of Jx (f ) is a polynomial in x; if this polynomial is not identically zero then plugging in generic values for x will not cause it to vanish. Remark 4.20. In practice we may choose to plug in random rational values for x so that the rank computation can be done in exact symbolic arithmetic. The Jacobian test will still succeed with overwhelming probability (provided we use a fine enough mesh of rational numbers). Also note that if we find any value of x for which the Jacobian has full row rank, this constitutes a proof of algebraic independence. Remark 4.21. In some cases (e.g. if the polynomials involve irrational values) it may be slow to compute the Jacobian rank in exact symbolic arithmetic. We can alternatively compute the singular values numerically and count how many are reasonably far from zero. This method works reliably in practice (i.e., it is extremely clear how to separate the zero and nonzero singular values) but does not constitute a rigorous proof of algebraic independence. Curiously, although the Jacobian criterion gives an efficient test for algebraic dependence, it is much harder (#P -hard) to actually find the algebraic dependence (i.e., the polynomial relation) when one exists [Kay09]. The Jacobian criterion implies the well-known fact that the collection of algebraically independent subsets of R[x] form a matroid ; this is called an algebraic matroid (see e.g. [Sch03]). In particular, we have the following exchange property: Proposition 4.22. Let I, J be finite subsets of R[x], each algebraically independent. If |I| < |J| then there exists f ∈ J r I such that I ∪ {f } is algebraically independent. We next note that in the task from Theorem 4.16, a transcendence basis can always be taken from the basis {u1 , . . . , us } itself. Lemma 4.23. Let U be a finite-dimensional subspace of R[x] with basis B = {u1 , . . . , us }. If U contains r algebraically independent elements, then so does B. Proof. Let B ′ ⊆ B be a maximal set of algebraically independent elements of B. If |B| < r then by the exchange property (Proposition 4.22) there exists v ∈ U r B ′ such that B ′ ∪ {v} is algebraically independent. Ps Write v = i=1 αi ui . Since B ′ is maximal, we have from the Jacobian criterion (Proposition 4.18) that for all 1 P ≤ i ≤ s, the row vector Jx (ui ) lies in the R(x)-span of B := {Jx (b)}b∈B ′ . But this means that Jx (v) = si=1 αi Jx (ui ) lies in the R(x)-span of B. By the Jacobian criterion this contradicts the fact that B ′ ∪ {v} is algebraically independent. Proof of Theorem 4.16. Let {u1 , . . . , us } be a basis (or spanning set) for U . From above we have that the transcendence degree of U 14 is the row rank of the Jacobian Jx (u1 , . . . , us ) evaluated at a generic point x. A transcendence basis for U is the set of ui corresponding to a maximal linearly independent set of rows We can use the following simple greedy algorithm to construct a transcendence basis. As input, receive a list of polynomials {u1 , . . . , us }. Initialize I = ∅. For i = 1, . . . , s, add {ui } to I if I ∪ {ui } is algebraically independent, and do nothing otherwise. (Note that this condition can be efficiently tested by Corollary 4.19.) Output the resulting set I. We now show correctness. Let Ii be the set after item ui has been considered (and possibly added), and set I0 = ∅. It suffices to show that for each i ∈ {0, . . . , s}, Ii is a maximal independent subset of {u1 , . . . , ui }. We proceed by induction. The claim is vacuously true when i = 0. Assume it holds for i − 1. If Ii is not a maximal independent subset of {u1 , . . . , ui }, then there exists an independent set J ⊆ {u1 , . . . , ui } with |J| > |I|, so by the exchange property (Proposition 4.22) there exists a uj with j ≤ i such that uj ∈ / Ii and Ii ∪ {uj } is independent. In particular, the subset Ij−1 ∪ {uj } of Ii ∪ {uj } is independent. But the fact that uj was not added at the (j − 1)th step implies that Ij−1 ∪ {uj } is not independent, a contradiction. So Ii is indeed maximal. We obtain that I = Is is a maximal independent subset of {u1 , . . . , us }, and hence by Lemma 4.23 a transcendence basis of U . 4.3 Generic unique recovery For list recovery problems, the following gives an explicit upper bound on the size of the list. Theorem 4.24. Let U be a subspace of the invariant ring R[x]G . Let FG be the field of fractions of R[x]G . If [FG : R(U )] = D < ∞ then there exists a set S ⊆ V of full measure such that for any θ ∈ S, U list-resolves θ with a list of size ≤ D. The proof is deferred to Section 8.2. Here R(U ) is the smallest subfield of FG containing both R and U , and [FG : R(U )] denotes the degree of a field extension; see Section 8.2 for more details. Since [FG : R(U )] = 1 is equivalent to R(U ) = FG , we have the following criterion for unique recovery. Corollary 4.25 (generic unique recovery). If R(U ) = FG then there exists a set S ⊆ V of full measure such that if θ ∈ S then U resolves θ. The intuition here is that we want to be able to learn every invariant polynomial by adding, multiplying, and dividing polynomials from U (and scalars from R). We need θ to be generic so that we never divide by zero in the process. Theorem 4.26. For a finite-dimensional subspace U ⊆ R[x]G , there is an algorithm to compute the degree of the field extension from Theorem 4.24. As input, the algorithm requires a basis for U and the ability to compute the Reynolds operator (Definition 4.1). We give the algorithm and the proof in Section 8.6. The algorithm uses Gröbner bases and is unfortunately inefficient to run in practice. Additionally, in Appendix B we present a method for proving field generation using Galois theory. There we use it to show generic unique recovery in the case where G is a finite Abelian group and V is its regular representation (over R). These ideas may be helpful for proving generic unique recovery in other settings. 4.4 Worst-case unique recovery We give a sufficient algebraic condition for worst-case unique recovery: Theorem 4.27 (worst-case unique recovery). Let U ⊆ R[x]G be a finite-dimensional subspace with basis {f1 , . . . , fm }. If U generates R[x]G as an R-algebra (i.e. R[f1 , . . . , fm ] = R[x]G ) then U resolves every θ ∈ V . Proof. Every element of R[x]G can be written as a polynomial in the fi (with coefficients in R). This means the values f1 (θ), . . . , fm (θ) uniquely determine all the values f (θ) for f ∈ R[x]G and so the result follows because R[x]G resolves every θ ∈ V (Theorem 4.4). 15 Theorem 4.28. There is an algorithm to test whether or not U generates R[x]G as an R-algebra. As input, the algorithm requires a basis for U and the ability to compute the Reynolds operator (Definition 4.1). We give the algorithm and the proof in Section 8.6. The algorithm uses Gröbner bases and is unfortunately inefficient to run in practice. If G is a finite group, it is known that R[x]G has a generating set for which all elements have degree at most |G| (this is Noether’s degree bound ; see Theorem 2.1.4 in [Stu08]). It follows that R[x]G ≤|G| resolves every θ ∈ V . Recall (from Section 1.4) that this is tight for MRA: degree |G| is necessary for worst-case signals. A precise characterization of when U resolves every θ ∈ V is (by definition) that U should be a separating set or (equivalently) should generate a separating algebra (see [DK15] Section 2.4). The notions of generating and separating sets do not always coincide, as illustrated by Example 2.4.2 in [DK15]. Furthermore, generating sets may require strictly higher maximum degree [Dom16]. 4.5 Worst-case list recovery We give a sufficient algebraic condition for worst-case list recovery: Theorem 4.29 (worst-case list recovery). Let U ⊆ R[x]G be a subspace with finite basis {f1 , . . . , fm }. If R[x]G is finitely generated as a R[f1 , . . . , fm ]-module, then U list-resolves every θ ∈ V . In other words, this condition says that there exists a basis g1 , . . . , gs ∈ R[x]G such that every element of R[x]G can be written as a linear combination of g1 , . . . , gs with coefficients from R[f1 , . . . , fm ]. It is sufficient to take U to be a set of primary invariants from a Hironaka decomposition (see Section 8.4). Proof. Since R[x]G finitely generated as an R-algebra (Theorem 4.3), if R[x]G is finitely generated as a R[f1 , . . . , fm ]-module then it follows that (see [Sha94] Section 5.3) every h ∈ R[x]G satisfies a monic polynomial hk + ck−1 hk−1 + · · · + c1 h + c0 = 0 with ci ∈ R[f1 , . . . , fm ]. Letting h1 , . . . , hs be generators for R[x]G (as an R-algebra), we have that the values f1 (θ), . . . , fm (θ) determine a finite set of possible values for h1 (θ), . . . , hs (θ), each of which determines (at most) one orbit for θ. 5 Examples In this section we work out some specific examples, determining the degree at which generic list recovery is possible using the methods of Section 4.2. (We focus on generic list recovery because our algorithms for the other recovery criteria are unfortunately too slow even for quite small examples.) We obtain several recovery theorems for problems such as MRA and cryo-EM within finite ranges of parameters where we have verified the Jacobian criterion using a computer, and beyond these parameter ranges, we state conjectural patterns. The following themes emerge in the examples studied in this section. First, we see that many problems are possible at degree 3, which is promising from a practical standpoint. Second, we do not encounter any unexpected algebraic dependencies, and so we are able to show that heuristic parameter-counting arguments are correct. In particular, we see that if there are enough linearly independent invariants, there are also enough algebraically independent invariants. 5.1 Learning a bag of numbers Let G be the symmetric group Sp acting on V = Rp by permutation matrices. The invariant ring consists of the symmetric polynomials, which are generated by the elementary symmetric polynomials e1 , . . . , ep where ei has degree i. Worst-case unique recovery is possible at degree p since R[x]G ≤p generates the full invariant ring. Furthermore, degree p is actually required, even for generic list recovery. This is because any invariant 16 of degree ≤ p − 1 can be expressed as a polynomial in e1 , . . . , ep−1 and thus trdeg(R[x]G ≤p−1 ) = p − 1. So this problem has a steep sample complexity of order σ 2p . 5.2 Learning a rigid body Let G be the rotation group SO(p) acting on the matrix space Rp×m by left multiplication. We imagine the columns of our matrix as vertices defining a rigid body; thus we observe random rotations of this rigid body (with vertices labeled) plus noise. Let U ∈ Rp×m be such a matrix signal. With O(σ 4 ) samples, we can estimate the degree-2 Gram matrix U ⊤ U ; taking a Cholesky factorization, we recover U up to left action by an element of the larger group O(p). Thus we recover the rigid body up to a reflection ambiguity, demonstrating list recovery (with a list of size 2). Surprisingly, assuming m ≥ p, we do not uniquely resolve a generic signal until degree p, where with O(σ 2p ) samples we can estimate a p × p minor of U , which is a degree-p invariant that changes sign under reflection. The impossibility of unique recovery until degree p is a consequence of the “first fundamental theorem” for the special orthogonal group SO(p), which asserts that the invariant ring is generated by the entries of the Gram matrix U ⊤ U together with the p × p minors of U (see for instance [Kač94]); thus the invariants of degree 3, . . . , p − 1 carry no information in addition to the degree-2 invariants. 5.3 Multi-reference alignment (MRA) Recall that this is the case of G = Z/p acting on V = Rp by cyclic shifts. It is already known that for the basic MRA problem (without projection or heterogeneity), generic unique recovery is possible at degree 3 for any p [BRW17]. The methods of Section 4.2 confirm the weaker result that generic list recovery is possible at degree 3 (at least for the values of p that we tested). Note the stark contrast in difficulty from the case of the full symmetric group G = Sp above. Remark 5.1. This result for MRA is actually a special case of a more general phenomenon. Let G be any finite group and let V be the regular representation i.e. the space of functions f : G → R with the action (g · f )(h) = f (g −1 h). (Note that for G = Z/p this is precisely the MRA problem.) It is known [Kak09] that for this setup, the triple correlation (a collection of degree-3 invariants) is sufficient to resolve a generic signal, and thus generic unique recovery is possible at degree 3. In Appendix B we give a short proof for the special case where the group is Abelian; our proof illustrates a method based on Galois theory which may be useful to prove generic unique recovery in other settings. We can also verify that for MRA with p ≥ 3, generic list recovery is impossible at degree 2. This follows from Theorem 4.9 because trdeg(R[x]G ) = p (since G is finite) but the number of algebraically independent invariants of degree ≤ 2 is at most ⌊p/2⌋+1. We can see this as follows. A basis for the invariants of degree ≤ 2 is {R(x1 ), R(x21 ), R(x1 x2 ), R(x1 x3 ), . . . , R(x1 xs )} with s = ⌊p/2⌋+1. Here R denotes the Reynolds operator, which averages over cyclic shifts of the variables. For instance, R(x1 x2 ) = p1 (x1 x2 +x2 x3 +x3 x4 +· · ·+xp x1 ). Note that the basis above has size ⌊p/2⌋ + 2 but there is an algebraic dependence within it because R(x1 )2 can be written in terms of the other basis elements. The claim now follows. Generic list recovery is possible at degree 1 for p = 1 and at degree 2 for p = 2. (This is true even for worst-case unique recovery; recall from Section 4.4 that degree |G| is always sufficient for this.) We now move on to variants of the MRA problem. 5.3.1 MRA with projection We now consider MRA with a projection step. We imagine that the coordinates of the signal are arranged in a circle so that G acts by rotating the signal around the circle. We then observe a projection of the circle onto a line so that each observation is the sum of the two entries lying “above” it on the circle. This is intended to resemble the tomographic projection in cryo-EM. We formally define the setup as follows. 17 Problem 5.2 (MRA with projection). Let p ≥ 3 be odd. Let V = Rp and G = Z/p acting on V by cyclic shifts. Let q = (p − 1)/2 and W = Rq . Let Π : V → W be defined by Π(v1 , . . . , vp ) = (v1 + vp , v2 + vp−1 , . . . , v(p−1)/2 + v(p+3)/2 ). We call the associated generalized orbit recovery problem (Problem 2.3) MRA with projection. (We consider the homogeneous case K = 1.) Note that since p is odd, there is one entry v(p+1)/2 which is discarded by Π. The reason we consider the odd-p case rather than the seemingly more elegant even-p case is because generic list recovery is actually impossible in the even-p case. This is because the signals θ and θ + (c, −c, c, −c, . . .) cannot be distinguished from the samples, even if there is no noise. Restricting now to odd p, note that we cannot hope for generic unique recovery because it is impossible to tell whether the signal is wrapped clockwise or counterclockwise around the circle. In other words, reversing the signal via (θ1 , . . . , θp ) 7→ (θp , . . . , θ1 ) does not change the distribution of samples. We can still hope for generic list recovery, hopefully with a list of size exactly 2. This degeneracy is analogous to the chirality issue in cryo-EM: it is impossible to determine the chirality of the molecule (i.e. if the molecule is reflected about some 2-dimensional plane through the origin, this does not change the distribution of samples). It appears that, as in the basic MRA problem, generic list recovery is possible at degree 3. We proved this for p up to 21 by checking the Jacobian criterion (see Section 4.2) on a computer, and we conjecture that this trend continues. Conjecture 5.3. For MRA with projection, for any odd p ≥ 3, generic list recovery is possible at degree 3. Note that generic list recovery is impossible at degree 2 because the addition of the projection step to basic T MRA can only make it harder for U≤d to list-resolve θ. 5.3.2 Heterogeneous MRA We now consider heterogeneous MRA, i.e. the generalized orbit recovery problem (Problem 2.3) with G̃ = Z/p acting on Ṽ = Rp by cyclic shifts, K ≥ 2 heterogeneous components, and no projection (i.e., Π is the identity). We will see that generic list recovery is possible at degree 3 provided that p is large enough compared to K. First note that the number of degrees of freedom to be recovered is trdeg(R[x]G ) = Kp + K − 1 (see Propositions 4.10 and 4.15). Let us now count the number of distinct entries of Td (x) for d ≤ 3. Note that Td (x) is symmetric (under permutations of indices) but we also have additional symmetries given by cyclic shifts, e.g. (T3 (x))i,j,k = (T3 (x))i+c,j+c,k+c where c is an integer and the sums i + c, j + c, k + c are computed modulo p. One can compute that T1 (x) has 1 distinct entry, T2 (x) has ⌊p/2⌋ + 1 distinct entries, and T3 (x) has p + ⌈(p − 1)(p − 2)/6⌉ distinct entries. The total number of distinct entries is U := p + 2 + ⌊p/2⌋ + ⌈(p − 1)(p − 2)/6⌉. By Theorem 4.9, list recovery is impossible when U < Kp + K − 1. By testing the Jacobian condition, we observe that the converse also appears to hold. We tested this up to K = 15 and up to the corresponding critical p value. Conjecture 5.4. For heterogeneous (K ≥ 2) MRA, generic list recovery is possible at degree 3 precisely if U ≥ Kp + K − 1. This condition on U can be stated more explicitly as follows: • K = 2 requires p ≥ 1. • K = 3 requires p ≥ 12. • K = 4 requires p ≥ 18. • Each K ≥ 5 requires p ≥ 6K − 5. 18 Recent work [BBLS17] also studies the heterogeneous MRA problem. Similarly to the present work, they apply the method of moments and solve a polynomial system of equations in order to recover the signals. To solve the system they use an efficient heuristic method that has no provable guarantees but appears to work well in practice. Their experiments suggest that if the signals have i.i.d. Gaussian entries, this method √ succeeds only when (roughly) K ≤ p instead of the condition (roughly) K ≤ p/6 that we see above (and that [BBLS17] also identified based on parameter-counting). Exploring this discrepancy is an interesting direction for future work. One question of particular interest is whether this example evinces a statistical-computational gap, √ whereby all polynomial-time methods fail to succeed once K exceeds p. Some evidence for why we might expect this is as follows. Recent work on tensor decomposition [MSS16] gives a polynomial-time algorithm PN p to decompose a third order tensor of the form i=1 a⊗3 i + E where ai ∈ R are i.i.d. from the unit sphere 1.5 and E is noise, provided N ≤ p (up to factors of log p). The heterogeneous MRA problem can be cast as such a tensor decomposition problem with N = Kp components ai ; the components are the p cyclic shifts of each of the K signals. Although these ai are not independent, we expect that if the signals are random then the ai are “random enough” for the same tensor decomposition result to hold, which exactly yields the √ condition K ≤ p (up to factors of log p). 5.4 S 2 registration Recall that this is the case where the signal θ is a real-valued function defined on the unit sphere S 2 in R3 . The formal setup is as follows. Let G = SO(3). For each ℓ = 0, 1, 2, . . . there is an irreducible representation Vℓ of SO(3) of dimension 2ℓ + 1. These representations are of real type, i.e. they can be defined over the real numbers so that Vℓ = R2ℓ+1 . Let F be a finite subset of {0, 1, 2, . . .} and consider the orbit recovery problem in which G acts on V = ⊕ℓ∈F Vℓ . As intuition for the above setup, Vℓ is a basis for the degree-ℓ spherical harmonic functions S 2 → R defined on the surface of the unit sphere S 2 ⊆ R3 . The spherical harmonics are a complete set of orthogonal functions on the sphere and can be used (like a “Fourier series”) to represent a function S 2 → R. Thus the signal θ ∈ V can be thought of as a function on the sphere, with SO(3) acting on it by rotating the sphere. See Appendix A for details on spherical harmonics. The primary case of interest is F = {1, . . . , F } for some F (the number of “frequencies”). We will see that generic list recovery is possible at degree 3 so long as F ≥ 10. We will see that it is convenient to not include 0 ∈ F , but we now justify why this is without loss of generality. V0 is the trivial representation, i.e. the 1-dimensional representation on which every group element acts as the identity. In the interpretation of spherical harmonics, the V0 -component is the mean value of the function over the sphere. We claim that the S 2 registration problem with 0 ∈ F can be easily reduced to the problem with F ′ = F r {0}. This is because the V0 -component is itself a degree-1 invariant; given the value of this invariant, one can subtract it off and reduce to the case without a V0 -component (i.e. the case where the function on the sphere is zero-mean). Thus we have that e.g. generic list recovery is possible (at a given degree) for F if and only if it is possible for F ′ . Using Proposition 4.11 we compute that trdeg(R[x]G ) = p − p′ , where X p = dim(V ) = (2ℓ + 1) ℓ∈F and   0 ℓmax = 0 2 ℓmax = 1 where ℓmax = max ℓ. p′ = ℓ∈F  3 ℓmax ≥ 2 After all, V0 is the trivial representation on the 1-dimensional vector space, with 3-dimensional stabilizer SO(3), and V1 is the standard 3-dimension representation of SO(3) on R3 by rotations, which yields a onedimensional SO(2) stabilizer at each nonzero point. When ℓmax ≥ 2, the representation V is known to have zero-dimensional stabilizer at some points (see e.g. [Ete96]). 19 In the following we restrict to the case 0 ∈ / F for simplicity (but recall that this is without loss of G generality). There are therefore no degree-1 invariants, i.e. R[x]G 1 is empty. By Theorem 4.9, if dim(R[x]2 ) + G G dim(R[x]3 ) < trdeg(R[x] ) then generic list recovery is impossible at degree 3; this rules out generic list recovery for F = {1, 2, . . . , F } when F ≤ 9. (We will see below how to compute dim(R[x]G d ).) Beyond this threshold, the situation is more hopeful: Theorem 5.5. If F = {1, 2, . . . , F } and 10 ≤ F ≤ 16 then the degree-3 method of moments achieves generic list recovery. This theorem is based on computer verification of the Jacobian criterion for 10 ≤ F ≤ 16 using exact arithmetic in a finite extension of Q. This result lends credence to the following conjecture. Conjecture 5.6. Consider the S 2 registration problem with 0 ∈ / F . We conjecture the following. G G • Generic list recovery is possible at degree 3 if and only if dim(R[x]G 2 ) + dim(R[x]3 ) ≥ trdeg(R[x] ) G G (where trdeg(R[x] ) is computed above and dim(R[x]d ) can be computed from Proposition 5.7 below). • In particular, if F = {1, 2, . . . , F } then generic list recovery is possible at degree 3 if and only if F ≥ 10. The reason it is convenient to exclude the trivial representation is because it simplifies the parametercounting: if we use the trivial representation then we have a degree-1 invariant f and so there is an algebraic relation between the degree-2 invariant f 2 and the degree-3 invariant f 3 . We now discuss how to compute dim(R[x]G d ). Using the methods in Section 4.6 of [DK15], we can give a formula for the Hilbert series of R[x]G ; see Section 9.1. However, if one wants to extract a specific coefficient dim(R[x]G d ) of the Hilbert series, we give an alternative (and somewhat simpler) formula: Proposition 5.7. Consider S 2 registration with frequencies F . Let χd (φ) : R → R be defined recursively by χ0 (φ) = 1, χ1 (φ) = X ℓ∈F " 1+2 ℓ X m=1 # cos(m φ) , and d χd (φ) = Then we have dim(R[x]G d) = 1X χ1 (iφ)χd−i (φ). d i=1 1 π Z π 0 (1 − cos φ)χd (φ) dφ. We give the proof in Section 9.2. Additionally, in Appendix A.6 we give explicit formulas for the invariants (up to degree 3), which yields a combinatorial analogue of Proposition 5.7 (up to degree 3). 5.5 Cryo-EM We adapt the following simple model for the cryo-EM reconstruction problem. We will use properties of the 3-dimensional Fourier transform, including the projection-slice theorem; see e.g. [Osg07] for a reference. The signal is a 3-dimensional molecule, which we can think of as encoded by a density function f : R3 → R. The 3-dimensional Fourier transform of f is fb : R3 → C given by Z ∞Z ∞Z ∞ b f (kx , ky , kz ) = e−2πi(xkx +yky +zkz ) f (x, y, z) dx dy dz. (1) −∞ −∞ −∞ It is sufficient to learn fb because we can then recover f using the inverse Fourier transform. SO(3) acts on the molecule by rotating it in 3-dimensional space (keeping the origin fixed). When f is rotated in 20 (x, y, z) coordinates, fb is also rotated in (kx , ky , kz )-coordinates by the same rotation. Each observation is a 2-dimensional image obtained by first rotating f by a random element of SO(3) and then projecting f parallel to the z axis. Specifically, the projection of f is fproj : R2 → R given by Z ∞ fproj(x, y) = f (x, y, z) dz. −∞ By the projection-slice theorem, the 2-dimensional Fourier transform of fproj is equal to the slice fbslice : R2 → C given by fbslice (kx , ky ) = fb(kx , ky , 0). Thus we think of fb as our unknown signal with SO(3) acting by rotation, and with post-projection which reveals only the slice of fb lying in the plane kz = 0. This does not yet conform to our definition of a (generalized) orbit recovery problem because the signal needs to lie in a finite-dimensional real vector space. Instead of thinking of fb as a function on R3 , we fix a finite number S of nested spherical shells in R3 , each of different radius and all centered at the origin. We consider only the restriction of fb to these shells. We fix a finite number F of frequencies and on each shell we expand fb (restricted to that shell) in the basis of spherical harmonics, truncated to 1 ≤ ℓ ≤ F . (As in S 2 registration, we can discard the trivial representation ℓ = 0 without loss of generality, and it is convenient to do so.) Being the Fourier transform of a real-valued function, fb satisfies fb(−kx , −ky , −kz ) = fb(kx , ky , kz ) (2) (see (1)) and so we can use a particular basis Hℓm of spherical harmonics for which the expansion coefficients are real; see Appendix A. We have now parametrized our signal by a finite number of real values θsℓm with 1 ≤ s ≤ S, 1 ≤ ℓ ≤ F , and −ℓ ≤ m ≤ ℓ. In particular, the restriction of fb to shell s has expansion X X θsℓm Hℓm . 1≤ℓ≤F −ℓ≤m≤ℓ SO(3) acts on each shell by 3-dimensional rotation; see Section A for the details of how SO(3) acts on spherical harmonics. The projection Π reveals only the values on the equator z = 0 (or in spherical coordinates, θ = π/2) of each shell. Using again the property (2), the output of Π on each shell has an expansion with real coefficients in a particular finite basis hm ; see Section A.4. Remark 5.8. There are various other choices one could make for the basis in which to represent the (Fourier transform of the) molecule. Each of our basis functions is the product of a spherical harmonic and a radial delta function (i.e. a delta function applied to the radius, resulting in a spherical shell). Another common basis is the Fourier–Bessel basis (used in e.g. [LBB+ 17]) where each basis function is the product of a spherical harmonic and a radial Bessel function. More generally we can take the product of spherical harmonics with any set of radial basis function. It turns out that the choice of radial basis is unimportant because the resulting problem will be isomorphic to our case (spherical shells) and so the same results hold. We now present our results on the above cryo-EM model. We focus on identifying the regime of parameters for which generic list recovery is possible at degree 3. Again using Proposition 4.11, we have for F ≥ 2: trdeg(R[x]G ) = dim(V ) − 3 = S F X ℓ=1 (2ℓ + 1) − 3 = S(F 2 + 2F ) − 3 (3) where again we have a zero-dimensional stabilizer. T In Appendix A we give an explicit construction of the invariant polynomials in U≤3 . By testing the Jacobian criterion in exact arithmetic on small examples, we arrive at the following theorem: Theorem 5.9. Consider the homogeneous (K = 1) cryo-EM problem with S shells and F frequencies. 21 • If S = 1 then for any F ≥ 2, generic list recovery is impossible at degree 3. • If 2 ≤ S ≤ 4 and 2 ≤ F ≤ 6, the degree-3 method of moments achieves generic list recovery. The first assertion results from a simple counting argument: there are fewer invariants at degree ≤ 3 than degrees of freedom. The second part is by confirming that the Jacobian of the invariants has rank equal to trdeg(R[x]G ), through computer-assisted exact arithmetic over an appropriate finite extension of Q. In floating-point arithmetic, we have further verified that the Jacobian appears to have appropriate rank for 2 ≤ S ≤ 10 and 2 ≤ F ≤ 10, leading us to conjecture the following: Conjecture 5.10. If S ≥ 2 then the degree-3 method of moments achieves generic list recovery (regardless of F ). T Intuitively, when there is a single shell (S = 1) there are simply not enough invariants in U≤3 . However, when S ≥ 2, the number of invariants increases dramatically due to cross-terms that involve multiple shells. 5.5.1 Heterogeneous cryo-EM We now consider heterogeneous cryo-EM (K ≥ 2). By combining (3) with Proposition 4.15 we can compute trdeg(R[x]G ). Based on testing the Jacobian criterion on small examples, we conjecture that the degree-3 method of moments achieves generic list recovery if and only if dim(U2T ) + dim(U3T ) ≥ trdeg(R[x]G ). In T other words, we expect no unexpected algebraic dependencies among U≤3 . (Recall that there are no degree-1 invariants since we are not using the trivial representation ℓ = 0). In Section A.6 we give a conjectured formula for the exact value of dim(U2T )+dim(U3T ) for all S ≥ 1, F ≥ 2. As a result we can determine for any given S ≥ 1 and F ≥ 2, the exact condition on K for which we believe generic list recovery is possible. For S and F large, this condition is approximately K ≤ S 2 /4. 6 Open questions We leave the following as directions for future work. 1. Our methods require testing the rank of the Jacobian on a computer for each problem size. It would be desirable to have analytic results for e.g. (variants of) MRA in any dimension p. 2. We have given an efficient test for whether generic list recovery is possible, but have not given a similarly efficient test for generic unique recovery. In cases where unique recovery is impossible, it would be nice to give a tight bound on the size of the list; for instance, for MRA with projection, we conjecture that the list has size exactly 2 (due to “chirality”), but we lack a proof for this fact. Our algorithms for testing generic unique recovery are based on Gröbner bases, the calculation of which is known to be computationally hard in the worst case [Huỳ86]. Unfortunately, the algorithms we have proposed are also extremely slow in practice, though a faster implementation may be possible. 3. Our procedure for recovering θ from the samples involves solving a polynomial system of equations. While solving polynomial systems is NP-hard in general, the fact that the polynomials used in the orbit recovery problem have special structure leaves open the possibility of finding an efficient (polynomial time) method with rigorous guarantees. Possible methods include tensor decomposition [PWB+ 17] and non-convex optimization [BBLS17]. 4. We have addressed the statistical limits of orbit recovery problems. However, prior work has indicated the presence of statistical-to-computational gaps in related synchronization problems [PWBM16a], and we expect such gaps to appear in orbit recovery problems too. As discussed in Section 5.3.2, the results of [BBLS17] suggest a possible gap of this kind for heterogeneous MRA. 22 7 Proofs for Section 3: statistical results We first prove Theorem 3.2. This theorem in fact holds for more general mixture problems, not merely those arising from the orbit recovery problems defined in Problem 2.3. For convenience, we will state and prove the theorem in its general form. Problem 7.1 (mixture recovery). Let V = Rp , and let Θ ⊂ V be compact. For θ ∈ Θ, let µθ be a measure on Rp whose support is contained in the unit ball, and assume the map θ 7→ µθ is continuous with respect to the weak topology. Let D be a known distribution on R with finite moments of all orders, and let σ ≥ 1. For i ∈ [n] = {1, 2, . . . , n}, we observe yi = xi + σξi , where xi ∼ µθ and the entries of ξi are independently drawn from D. The goal is to estimate θ. Write Pθ for the distribution arising from the parameter θ, and let Eθ be expectation with respect to this distribution. We denote by Enθ the expectation taken with respect to n i.i.d. samples from Pθ . Where there is no confusion, we also write Eθ for expectation with respect to the distribution µθ . We require that µθ have bounded support; the requirement that it be supported in the unit ball is for normalization purposes only. We assume throughout that σ ≥ 1. The following definiton gives the generalization of Definition 3.1 to the mixture recovery problem. Definition 7.2. Given a positive integer d and θ ∈ V , the order-d matching set Mθ,d is the set consisting of all φ ∈ V such Eθ [x⊗k ] = Eφ [x⊗k ] for k = 1, . . . , d, where Eζ represents expectation with respect to x ∼ µζ . Problem 7.1 generalizes Problem 2.3 by allowing the random vector xi to arise from more general mixtures than those arising from group actions. Note that when the mixtures do arise from a generalized orbit recovery problem, i.e., when xi = Π(gi · θki ), where gi and ki are distributed as in Problem 2.3, then Definition 7.2 reduces to Definition 3.1. Having made these definitions, our goal in this section is to show that Theorem 3.2 holds word-for-word in the setting of mixture recovery. To do so, we show that entries of the moment tensors Eθ [x⊗k ] can be estimated on the basis of O(σ 2k ) samples from Pθ . 7.1 Estimation of moments Our estimators will be based on a system of orthogonal univariate polynomials under the measure corresponding to D. Let H0 (x) = 1, and for k ≥ 1, define Hk (x) = xk − k−1 X Eξ∼D [ξ k Hj (ξ)] j=0 Eξ∼D [Hj (ξ)2 ] Hj (x) . It is easy to check that these polynomials are orthogonal under the inner product given by hf, gi = Eξ∼D [f (ξ)g(ξ)] and that the polynomials H0 , . . . , Hk form a basis for the space of polynomials of degree at most k. We denote them by Hk because they coincide with the classic Hermite polynomials when D is Gaussian. Like the Hermite polynomials, they satisfy the identity Eξ∼D [Hk (x + ξ)] = xk . Indeed, we can expand Hk (x + ξ) in the basis of the orthogonal polynomials as Hk (x + ξ) = k X j=0 23 αj (x)Hj (ξ) , (4) where αj (x) is a polynomial in x of degree at most k−j. Since Hj (ξ) has zero mean for j ≥ 1 by construction, we obtain E[Hk (x + ξ)] = α0 (x) , and since Hk is a monic polynomial of degree k, we must have α0 (x) = xk . We briefly review multi-index notation. Definition 7.3. Q A p-dimensional multi-index is a tuple α = (α1 , . . . , αp ) of nonnegative integers. For α p x ∈ Rp , let xα = j=1 xj j . Pp For any multi-index α, we write |α| = j=1 αj . Given independent samples y1 , . . . , yn from Pθ , consider the estimate for Ex∼µθ [xα ] given by n α := xf α is unbiased. We first show that xf p 1 X Y αj σ Hαj (σ −1 yi ) . n i=1 j=1 α ] = E [xα ]. Lemma 7.4. For all θ ∈ Θ, Enθ [xf θ α is a sum of i.i.d. terms, it suffices to prove the claim for a single sample. By (4), Proof. Since xf Eθ p hY j=1 h i σ αj Hαj (σ −1 yi ) = E x∼µθ = E x∼µθ = E x∼µθ E ξ1 ,...,ξp ∼D p hY E ξj ∼D j=1 p hY  p Y j=1 i σ αj Hαj (σ −1 (xj + σξj )) x i σ αj Hαj (σ −1 xj + ξj ) x i σ αj (σ −1 xj )αj = Eθ [xα ] . j=1 It remains to bound the variance. α] ≤ Proposition 7.5. For any multi-index α, there exists a constant cα such that for all θ ∈ Θ, Varθ [xf −1 2|α| cα n σ . α is a sum of i.i.d. terms, it suffices to prove the claim for n = 1. Given a multi-index α, let Proof.QSince xf p cα = j=1 supxj ∈[−1,1] Eξj ∼D [Hαj (xj + ξj )2 ], and note that cα is independent of σ. We obtain α] ≤ Varθ [xf E x∼µθ ≤ p hY sup E ξ ∼D j=1 j p Y E  x:kxk≤1 j=1 ξj ∼D ≤ cα σ 2|α| , i σ 2αj Hαj (σ −1 xj + ξj )2 x   2αj σ Hαj (σ −1 xj + ξj )2 as claimed. Finally, we apply the “median-of-means” trick [NY83] to show that we can combine the estimators defined above to obtain estimates for the moment tensors Eθ [x⊗k ] for k ≤ d which are close to their expectation with high probability. 24 Proposition 7.6. Let y1 , . . . , yn be i.i.d. samples from Pθ . For any degree d and accuracy parameter δ, α = x α (y , . . . , y ) for all α with |α| ≤ d such that with probability at least 1 − δ, c there exist estimators xc 1 n r log(p/δ) α d α c max |Eθ [x ] − x | ≤ cd σ , α:|α|≤d n for some constant cd . Proof. Split the samples into m subsamples of equal size, for some m to be specified, and for each α construct α, . . . , x α on the basis of the m subsamples. (We assume for convenience that m divides f the m estimators xf m 1 α, . . . , x α α. c f n.) Let x be the median of xf m 1 Chebyshev’s inequality together with Proposition 7.5 implies that there exists a constant cd such that, for each j = 1, . . . , m and multi-index α, r i h m α d α Pr |xf ≤ 1/4 , j − Eθ [x ]| > cd σ n α, . . . , x α are independent, a standard concentration argument shows that f and since the estimators xf m 1 r i h m α − E [xα ]| > c σ d ≤ e−m/4 . Pr |xc θ d n  By a “stars-and-bars” counting argument [Fel68], there are p+d multi-indices α satisfying |α| ≤ d, so taking d a union bound over all choices of α yields r m cα | ≤ cd σ d max |Eθ [xα ] − x α:|α|≤d n   −m/4 with probability at least 1 − p+d . Choosing m = 4 log( p+d d e d /δ) and taking cd sufficiently large in the statement of the theorem yields the claim. Note that the constant cd in the statement of Proposition 7.6 can be made explicit, given knowledge of the distribution D. 7.2 Robust solutions to polynomial systems We now show that approximate knowledge of the moment tensors Eθ [x⊗k ] for k = 1, . . . , d suffices to approximately recover θ. Lemma 7.7. For all θ ∈ Θ and ε > 0, there exists a ε′ > 0 such that, if φ ∈ Θ satisfies maxk≤d kEθ [x⊗k ] − Eφ [x⊗k ]k∞ < ε′ , then there exists a τ ∈ Mθ,d such that kφ − τ k < ε. Proof. We employ a simple compactness argument. Consider the set F = {φ ∈ Θ : ∀ τ ∈ Mθ,d kφ − τ k ≥ ε}. Since Θ is compact, so is F . Set ε′ = min max kEθ [x⊗k ] − Eφ [x⊗k ]k∞ . φ∈F k≤d ⊗k ⊗k Clearly if maxk≤d kEθ [x ] − Eφ [x ]k∞ < ε′ for some φ ∈ Θ, then there exists a τ ∈ Mθ,d such that kφ − τ k < ε, so it remains to check that ε′ > 0. Since θ 7→ µθ is continuous with respect to the weak topology and µθ is supported on a compact set for all θ ∈ Θ, the moment map θ 7→ Eθ [x⊗k ] is also continuous for all k ≤ d. If φ ∈ F , then in particular φ∈ / Mθ,d, so there exists a k ≤ d for which Eθ [x⊗k ] 6= Eφ [x⊗k ]. Therefore ε′ > 0, as desired. Lemma 7.7 is simply stating that the function φ 7→ minτ ∈Mθ,d kφ − τ k is continuous at θ with respect to the topology induced by the moment maps. Note that, for generic θ when µθ arises from an orbit recovery problem, the moment map will be continuously differentiable with a nonsingular Jacobian, so the inverse function theorem implies ε′ can be taken to be Ω(ε). In general, however, the dependence could be worse. 25 7.3 Proof of Theorem 3.2 cα as in Proposition 7.6, and let Construct the estimators x ( ) r log(p/δ) α | ≤ c σd cn = φ ∈ Θ : max |Eφ [xα ] − xc M d n α:|α|≤d cn and that, for all Applying Proposiiton 7.6, we have with probability at least 1 − δ that Mθ,d ⊆ M c φ ∈ Mn , r log(p/δ) ⊗k ⊗k α α d . max kEφ [x ] − Eθ [x ]k = max |Eφ [x ] − Eθ [x ]| ≤ 2cd σ k≤d n α:|α|≤d q By Lemma 7.7, there exists an ε′θ,ε such that, as long as 2cd σ d log(p/δ) < ε′θ,ε , then with probability at n cn ⊆ Mε . least 1 − δ, we have the desired inclusion M θ,d Therefore taking n > (2cd /ε′θ,ε )2 log(p/δ)σ 2d = cθ,ε,d log(1/δ)σ 2d suffices. 7.4 Information geometry of gaussian mixtures In this section, we establish an upper bound on the Kullbeck-Leibler divergence between different gaussian mixtures, which we denote by D(· k ·). The proof follows the outline used in [BRW17], based off a technique developed in [LNS99, CL11]. Proposition 7.8. Let θ, φ ∈ Θ, let the distribution D be N (0, 1) for some σ ≥ 1, and let d be any positive integer. There exist universal constants C and c such that if Eθ [x⊗k ] = Eφ [x⊗k ] for k ≤ d − 1, then D(Pθ k Pφ ) ≤ C (cσ)−2d . d! Proof. We first establish the claim when d = 1. Note that the condition on the moment tensors is vacuous in this case. By the convexity of the divergence, D(Pθ k Pφ ) ≤ 2 ′ 2 E D(N (x, σ ), N (x , σ )) = x∼µ θ x′ ∼µφ E x∼µ θ x′ ∼µφ kx − x′ k2 ≤ 2σ −2 , 2σ 2 where in the last step we used the fact that x and x′ lie in the unit ball almost surely. Now, assume d > 1, so in particular Eθ [x] = Eφ [x]. Denote their common mean by v. For ζ ∈ {θ, φ} denote by µζ the distribution of x − v when x ∼ µζ , and let Pζ denote distribution of y when y = x + ξ for x ∼ µζ and ξ ∼ N (0, σ 2 I). Since this transformation is a deterministic bijection, the data processing inequality implies D(Pθ k Pφ ) = D(Pθ k Pφ ). Note that Eµθ [x] = Eµθ [x] = 0 and Eµθ [x⊗k ] = Eµφ [x⊗k ] for k ≤ d − 1. Hence without loss of generality we can reduce to the case where µθ and µφ are both centered and are supported in a ball of radius 2. We bound the χ2 -divergence between Pθ and Pφ . Let f be the density of a standard p-dimensional Gaussian and for ζ ∈ Θ, let fζ be the density of Pζ , which can be written explicitly as 1 fζ (y) = Ex∼µζ σ −p f (σ −1 (y − x)) = σ −p f (σ −1 y)Ex∼µζ e− 2σ2 (x 2 −2y ⊤ x) . Since kxk ≤ 2 almost surely with respect µζ , Jensen’s inequality implies that 1 fζ (y) ≥ σ −p f (σ −1 y)e− 2σ2 (4−2y ⊤ Eζ x) Recall that the χ2 divergence is defined by χ2 (Pθ , Pφ ) = Z (fθ (y) − fφ (y))2 dy . fθ (y) 26 2 = σ −p f (σ −1 y)e− σ2 . (5) Applying (5) to the denominator, expanding the definitions of fθ and fφ , and applying a change of variables yields Z 2 ⊤ 2 ⊤ 1 1 2 χ2 (Pθ , Pφ ) ≤ e2/σ (Eθ e− 2σ2 (x −2y x) − Eφ e− 2σ2 (x −2y x) )2 σ −p f (σ −1 y) dy Z ⊤ −1 −1 2 ⊤ −1 −1 2 1 1 2/σ2 =e (Eθ ey (σ x)− 2 kσ xk − Eφ ey (σ x)− 2 kσ xk )2 f (y) dy 2 = e2/σ E(Eθ eg ⊤ (σ−1 x)− 12 kσ−1 xk2 − Eφ eg ⊤ (σ−1 x)− 12 kσ−1 xk2 2 g ∼ N (0, I) . ) , (6) Given ζ, ζ ′ ∈ Θ, let x ∼ µζ and x′ ∼ µζ ′ be independent. Then interchanging the order of expectation and using the expression for the moment generating function of a standard Gaussian random variable, we obtain x⊤ x′ ⊤ −1 ′ −1 2 −1 ′ 2 1 Eζ,ζ ′ Eg eg (σ (x+x ))− 2 (kσ xk +kσ x k ) = Eζ,ζ ′ e σ2 . Applying this expression to (6) after expanding the square produces  2  χ2 (Pθ , Pφ ) ≤ e2/σ  E e x∼µ x⊤ x′ σ2 θ −2 E e x∼µ θ x′ ∼µθ x′ ∼µφ x⊤ x′ σ2 + E e x⊤ x′ σ2 x∼µφ x′ ∼µφ   , where in each expectation the random variables x and x′ are independent. Since µθ and µφ are compactly supported, Fubini’s theorem implies we can expand each term as a power series and interchange expectation and summation to produce   ∞ −2k 2 X σ  E (x⊤ x′ )k − 2 E (x⊤ x′ )k + E (x⊤ x′ )k  χ2 (Pθ , Pφ ) ≤ e2/σ x∼µφ x∼µθ x∼µθ k! ′ ′ ′ k=0 = e2/σ = e2/σ = e2/σ 2 2 2 ∞ X k=0 ∞ X k=0 ∞ X k=d x ∼µφ x ∼µθ σ −2k k! x ∼µp hi  hEθ x⊗k , Eθ x⊗k i − 2hEθ x⊗k , Exφ x⊗k i + hEφ x⊗k , Eφ x⊗k i σ −2k kEθ [x⊗k ] − Eφ [x⊗k ]k2HS k! σ −2k kEθ [x⊗k ] − Eφ [x⊗k ]k2HS , k! where h·, ·i denotes the Frobenius inner product between tensors and k · kHS denotes the Hilbert-Schmidt norm. Since under both µθ and µφ , kxk ≤ 2 almost surely, we have for all k ≥ 2, kEθ [x⊗k ] − Eφ [x⊗k ]k2HS ≤ 2kEθ [x⊗k ]k2HS + 2kEφ [x⊗k ]k2HS ≤ 4k+1 . Therefore χ2 (Pθ , Pφ ) ≤ 4e2/σ 2 2 ∞ d −2d X 2 4 σ 4k σ −2k ≤ 4e6/σ , k! d! k=d and applying the inequality D(Pθ k Pφ ) ≤ χ (Pθ , Pφ ) [Tsy09] proves the claim. 7.5 Proof of Theorem 3.4 If τ1 and τ2 are both in Mθ,d−1, then by Proposition 7.8, the corresponding distributions Pτ1 and Pτ2 satisfy D(Pτ1 k Pτ2 ) ≤ (cσ)C2d d! . By the Neyman-Pearson lemma, for any test ψ using n samples, s r 1 Cn n n Pr(ψ = 2) + Pr(ψ = 1) ≥ 1 − dTV (Pτ1 , Pτ2 ) ≥ 1 − D(Pnτ1 k Pnτ2 ) = 1 − , τ2 τ1 2 2(cσ)2d d! 27 where we have applied Pinsker’s inequality and the chain rule for divergence. Therefore, to achieve an error probability of at most 1/3, we must have n ≥ 2(cσ)2d d!/(9C) = cd σ 2d , as claimed. 8 8.1 Proofs for Section 4: algebraic results Algorithm for generators of R[x]G We know that R[x]G is finitely generated as an R-algebra (Theorem 4.3). There are various algorithms to compute a finite set of generators for R[x]G [Stu08, DK15]. However, some require the group to be finite or to be reductive over an algebraically-closed field. One algorithm that certainly works in our context (compact groups) is Algorithm 2.2.5 in [Stu08]. As input it requires the Hilbert series of R[x]G (which can be computed by Proposition 4.13) and a procedure to compute a basis for R[x]G d (which can be done with the Reynolds operator by Observation 4.2). The idea is as follows. We keep a set of proposed generators f1 , . . . , fm . At each step we compare the Hilbert series of R[x]G with the Hilbert series of R[f1 , . . . , fm ] (which can be computed using Gröbner bases). If these series differ at the td term, this means we are missing an invariant at degree d. To remedy this, we create a new homogeneous invariant of degree d using the Reynolds operator, and add it to our set of proposed generators. We repeat until the Hilbert series match. 8.2 Bounding the list size for generic signals In this section we prove Theorem 4.24 and the first part of Theorem 4.9 (see Section 8.3 for the second part). Recall the following basic definitions and facts from field theory. Definition 8.1. If F2 is a subfield of F1 , we write F1 /F2 and call this a field extension. The degree of the extension, denoted [F1 : F2 ], is the dimension of F1 as a vector space over F2 . Proposition 8.2. Let R ⊆ F2 ⊆ F1 with F1 finitely generated (as a field) over R. Let r be the transcendence degree of F1 (over R). The field extension F1 /F2 has finite degree if and only if F1 contains r algebraically independent elements. Proof. This is a basic fact of field theory. If F1 contains r algebraically independent elements then the extension F1 /F2 is algebraic and finitely generated, and therefore has finite degree. Otherwise, the extension is transcendental and has infinite degree. In light of the above (and using the fact that R[x]G is finitely generated), Theorem 4.24 implies the first part of Theorem 4.9 and so it remains to prove Theorem 4.24 (i.e. list size is bounded by D := [FG : R(U )]). Proof of Theorem 4.24. Write FU := R(U ). In characteristic zero, every algebraic extension is separable, so by the primitive element theorem, FG = FU (α) for some α ∈ FG . Since α generates a degree-D extension, α is the root of a degree-D polynomial αD + bD−1 αD−1 + · · · + b1 α + b0 (7) with coefficients bi ∈ FU . Furthermore, every element of FG can be expressed as c0 + c1 α + · · · + cD−1 αD−1 with ci ∈ FU . In particular, let g1 , . . . , gk be generators for R[x]G (as an R-algebra) and write (i) (i) (i) gi = c0 + c1 α + · · · + cD−1 αD−1 . (8) (i) Let S ⊆ V be the subset for which α and all the (finitely-many) coefficients bi , cj have nonzero denominators; S is a non-empty Zariski-open set and thus has full measure. Now fix θ ∈ S. Given the values f (θ) for all f ∈ U , each bi takes a well-defined value in R and so from (7) there are at most D possible values that α(θ) can take. From (8), each value of α(θ) uniquely determines all the values gi (θ) and thus uniquely determines all the values f (θ) for f ∈ R[x]G . Since R[x]G resolves θ (Theorem 4.4), this completes the proof. 28 8.3 Generic list recovery converse In this section we prove the second part of Theorem 4.9 (the converse). Let p = dim(V ), trdeg(U ) = q, and trdeg(R[x]G ) = r so that q < r ≤ p. Let f = {f1 , . . . , fm } be a basis for U , and let g = {g1 , . . . , gr } be a transcendence basis for R[x]G . Let S ⊆ V be the set of points θ for which the Jacobian Jx (f )|x=θ has row rank q and the Jacobian Jx (g)|x=θ has row rank r; by the Jacobian criterion (see Corollary 4.19), S is a non-empty Zariski-open set and thus has full measure. Fix θ ∈ S. For a sufficiently small open neighborhood X ⊆ S containing θ we have the following. The Jacobian criterion on f implies that {τ ∈ X : f (τ ) = f (θ)} has dimension p − q. The Jacobian criterion on g implies that every z ∈ g(X) has a preimage g−1 (z) := {τ ∈ X : g(τ ) = z} of dimension p − r. Since p − q > p − r it follows that there are infinitely many θ1 , θ2 , . . . ∈ X such that f (θi ) = f (θ) but the values g(θ1 ), g(θ2 ), . . . are all distinct (and thus the θi belong to distinct orbits). Therefore U does not list-resolve θ. 8.4 Hilbert series and Hironaka decomposition In this section we prove Proposition 4.14 on extracting the transcendence degree from the Hilbert series (as the pole order at t = 1). While this is a general property of finitely generated algebras over a field, there is an easy proof for invariant rings stemming from a key structural property of such rings called the Cohen-Macaulay property or Hironaka decomposition. Theorem 8.3 ([DK15] Section 2.6). The invariant ring R[x]G has the following structure. There exist homogeneous primary invariants f1 , . . . , fr ∈ R[x]G and homogeneous secondary invariants g1 , . . . , gs ∈ R[x]G such that • {f1 , . . . , fr } are algebraically independent, and • any element of R[x]G can be written uniquely as a linear combination of g1 , . . . , gs with coefficients from R[f1 , . . . , fr ]. The proof can be found in Section 2.6 of [DK15]; note that the only property of the group that is used is the existence of a Reynolds operator (and so the proof is valid for compact groups). Proof of Proposition 4.14. The Hironaka decomposition above implies that the Hilbert series takes the form Ps tdeg(gj ) Qr j=1 deg(f ) i ) i=1 (1 − t (this is equation (2.7.3) in [DK15]). It is now clear that the order of the pole at t = 1 is precisely r. But we can see as follows that f1 , . . . , fr is a transcendence basis for R[x]G and so r = trdeg(R[x]G ). As in the proof of Theorem 4.29, since R[x]G is a finitely generated R[f1 , . . . , fr ]-module, every h ∈ R[x]G satisfies a polynomial with coefficients in R[f1 , . . . , fr ], which is an algebraic dependence among {f1 , . . . , fr , h}. 8.5 Transcendence degree for heterogeneity In this section we prove Proposition 4.15. To recall the setup, we have G̃ acting on Ṽ with associated variables x̃. We also have G = G̃K ⋊ SK acting on V = Ṽ ⊕K ⊕ ∆K with associated variables x. Let us also introduce an intermediate group: G′ = G̃K , acting on V (with associated variables x). (k) (k) Partition the variables x as follows. For k = 1, . . . , K, let x(k) = (x1 , . . . , xp ) be the variables corresponding to signal k. Let z = (z1 , . . . , zK−1 ) be the variables corresponding to the mixing weights PK−1 w 1 , . . . , w K−1 . Whenever we refer to zK , this is just shorthand for − k=1 zk . We first prove a simpler version of the result without the action of SK . 29 Lemma 8.4. Let r̃ = trdeg(R[x̃]G̃ ) and let r = K r̃ + K − 1. Then ′ trdeg(R[x]G ) = r. ′ Proof. To show ‘≥’ we need to exhibit r algebraically independent elements of R[x]G . Letting f1 , . . . , fr̃ be a transcendence basis for R[x̃]G̃ , it suffices to take I := {fi (x(k) )}1≤i≤r̃,1≤k≤K ∪ {z1 , . . . , zK−1 }. ′ To show ‘≤’ we first recall that we can obtain a spanning set for the subspace R[x]G d by applying the Reynolds operator R (for G′ ) to each degree-d monomial (in the variables x). Such a monomial takes the form K Y mk (x(k) ) m(x) = M (z) k=1 where M, mk are monomials. Applying the Reynolds operator yields R(m(x)) = E g1 ,...,gk ∼G̃ M (z) K Y k=1 mk (gk · x(k) ) = M (z) K Y (k) E mk (gk · x ). k=1 gk ∼G̃ Note that R(m(x)) is the product of pure invariants, i.e. invariants that only involve variables from a single one of the blocks x(1) , . . . , x(K) , z. It is clear that I (from above) is a maximal set of algebraically independent pure invariants. It is now easy to show using the Jacobian criterion (Proposition 4.18) that if any R(m(x)) is added to I, it will no longer be algebraically independent. The result now follows using basic properties of algebraic independence (Proposition 4.22 and Lemma 4.23). Proof of Proposition 4.15. ′ Since R[x]G ⊆ R[x]G , it is clear (in light of the above) that trdeg(R[x]G ) ≤ r. Thus we need only to show trdeg(R[x]G ) ≥ r by demonstrating r algebraically independent invariants. Let e1 , . . . , eK be the elementary symmetric functions in K variables. With fi as above, we take the invariants {ek (fi (x(1) ), . . . , fi (x(K) ))}1≤i≤r̃,1≤k≤K ∪ {e2 (z1 , . . . , zK ), . . . , eK (z1 , . . . , zK )}. Note that e1 (z1 , . . . , zK ) is not included because it is equal to 0. The fact that ek (fi (x(1) ), . . . , fi (x(K) )) are algebraically independent can be seen because {e1 , . . . , eK } is algebraically independent and {fi (x(k) )}i,k is algebraically independent. We can see that {ek (z1 , . . . , zK )}k≥2 are algebraically independent as follows. An algebraic dependence would be a polynomial P such that P (e2 (z2 , . . . , zK ), . . . , eK (z1 , . . . , zK )) (now P treating zK as a separate variable) has a root zK = − K−1 k=1 zk and thus has e1 (z1 , . . . , zK ) as factor. But this contradicts the fact that any symmetric polynomial has a unique representation in terms of the elementary symmetric polynomials. 8.6 Gröbner bases In this section we show how to use Gröbner bases to test various algebraic conditions. In particular, we prove Theorems 4.26 and 4.28. The ideas from this section are mostly standard in the theory of Gröbner bases; see e.g. [CLO07] for a reference. Definition 8.5. A monomial order on R[x] is a well-ordering on the set M of all (monic) monomials, satisfying M ≤ N ⇔ M P ≤ N P for all M, N, P ∈ M. We will say that a monomial order favors a variable xi if the monomial xi is larger (with respect to the monomial order) than any monomial not involving xi . We write LM(f ) to denote the leading monomial of a polynomial f , i.e. the monomial occurring in f that is largest (with respect to the monomial order); LM(f ) does not include the coefficient. 30 Definition 8.6. A Gröbner basis of an ideal I ⊆ R[x] is a finite subset B ⊆ I such that for every f ∈ I there exists b ∈ B such that LM(f ) is a multiple of LM(b). We call B a reduced Gröbner basis if all its elements are monic and it has the additional property that for every pair of distinct b, b′ ∈ B, no monomial occurring in b is a multiple of LM(b′ ). The following basic facts about Gröbner bases are proved in [CLO07]. A Gröbner basis is indeed a basis, in that it generates the ideal. Every ideal I ⊆ R[x] has a Gröbner basis, and has a unique reduced Gröbner basis. Buchberger’s algorithm computes the reduced Gröbner basis of an ideal I = hf1 , . . . , fm i, given a list of generators fi . (It is not a polynomial-time algorithm, however.) Suppose we are interested in the relations between polynomials f1 , . . . , fm ∈ R[x]. Introduce additional variables t = (t1 , . . . , tm ) and consider the ideal I := hf1 (x) − t1 , . . . , fm (x) − tm i ⊆ R[x, t]. Given f1 , . . . , fm there is an algorithm to compute a Gröbner basis for the elimination ideal J := hf1 (x) − t1 , . . . , fm (x) − tm i ∩ R[t]. In fact, the algorithm is simply to compute a Gröbner basis for I using a particular monomial order and then keep only the elements that depend only on t (see Chapter 3 of [CLO07]). The elimination ideal consists precisely of the polynomial relations among f1 , . . . , fm : Lemma 8.7. For any polynomial P ∈ R[t] we have: P ∈ J if and only if P (f1 (x), . . . , fm (x)) ≡ 0. Proof. The direction ‘⇒’ is clear because if we let ti = fi (x) for all i then the generators of I vanish and so every element of I vanishes. To show the converse, it suffices to show that for any polynomial P ∈ R[t], P (f1 (x), . . . , fm (x)) − P (t1 , . . . , tm ) ∈ I. This can be shown inductively using the following key idea: x1 x2 − t1 t2 = 1 1 (x1 − t1 )(x2 + t2 ) + (x2 − t2 )(x1 + t1 ) 2 2 and so x1 x2 − t1 t2 ∈ hx1 − t1 , x2 − t2 i. Generation as an R-algebra. Suppose we want to know whether fm ∈ R[f1 , . . . , fm−1 ]. This is equivalent to asking whether there exists P ∈ J of the form P (t) = tm − Q(t1 , . . . , tm−1 ) (9) for some Q ∈ R[t1 , . . . , tm−1 ]. Suppose that J contains an element P of the form (9). Compute a Gröbner basis B for J with respect to a monomial order that favors tm . The leading monomial of P is tm so by the definition of a Gröbner basis there must be an element b ∈ B whose leading monomial divides tm . Since 1 ∈ / J (by Lemma 8.7), the leading monomial of b is exactly tm and so b takes the form (9). Therefore, fm ∈ R[f1 , . . . , fm−1 ] if and only if B contains an element of the form (9). We can now prove Theorem 4.28: to test whether R[f1 , . . . , fm ] = R[x]G , compute generators g1 , . . . , gs for R[x]G (see Section 8.1) and use the above to test whether each gi is in R[f1 , . . . , fm ]. Generation as a field. Suppose we want to know whether fm ∈ R(f1 , . . . , fm−1 ). This is equivalent to asking whether fm can be expressed as a rational function of f1 , . . . , fm−1 (with coefficients in R), which is equivalent (by multiplying through by the denominator) to asking whether there exists P ∈ J of the form P (t) = tm Q1 (t1 , . . . , tm−1 ) − Q2 (t1 , . . . , tm−1 ) with Q1 ∈ / J. (10) Suppose that J contains an element P of the form (10). Compute a reduced Gröbner basis B for J with respect to a monomial order that favors tm . It is a basic property of Gröbner bases that P can be written as X pi (t)bi (t) P (t) = i where pi ∈ R[t] and bi ∈ B with LM(pi ) ≤ LM(P ) and LM(bi ) ≤ LM(P ). If no bi involves the variable tm then Q1 ∈ J, a contradiction. Therefore some bj must have degree 1 in tm . Since B is a reduced Gröbner basis it cannot contain any element of the form (10) with Q1 ∈ J. This completes the proof that fm ∈ R(f1 , . . . , fm−1 ) if and only if B contains an element of the form (10). 31 Degree of field extension. Consider the setup from Theorem 4.24: given a finite set U = {f1 , . . . , fm } ⊆ R[x]G , we want to compute [FG : FU ] where FU = R(U ) and FG is the field of fractions of R[x]G . We can assume [FG : FU ] is finite (since we can efficiently test whether this is the case using Proposition 8.2 and the methods of Section 4.2). Let d be such that R[x]G ≤d generates FG as a field (over R). (It is sufficient G for R[x]G to generate R[x] as an R-algebra; such a d can be computed via Section 8.1. If G is finite then ≤d d = |G| is sufficient; see Section 4.4.) A generic element of R[x]G ≤d will generate the field extension: Lemma 8.8. For all but a measure-zero set of α ∈ R[x]G ≤d , FG = FU (α). This fact is related to the primitive element theorem. We include a proof for completeness. Proof. The field extension FG /FU is finite and separable (since we’re in characteristic zero), so by the fundamental theorem of Galois theory, there are only finitely many intermediate fields. (Take the normal closure of FG /FU ; then the intermediate fields are in bijection with a finite group, and only some of them lie inside FG .) Let L be the collection of intermediate fields of FG /FU that are proper subfields of FG . We know R[x]G ≤d is a subspace of FG that generates FG and therefore is not contained by any field in L. This G means each field L ∈ L intersects R[x]G ≤d at a proper subspace VL of R[x]≤d . The finite union ∪L∈L VL is a measure-zero subset of R[x]G ≤d , and any α outside of it satisfies FG = FU (α). Let α be a generic element of R[x]G ≤d . In light of the above, [FG : FU ] is equal to the smallest positive integer D for which there exists a relation QD (f1 , . . . , fm )αD + · · · + Q1 (f1 , . . . , fm )α + Q0 (f1 , . . . , fm ) ≡ 0 for polynomials Qi with QD (f1 , . . . , fm ) 6≡ 0. This can be tested similarly to field generation. Compute a reduced Gröbner basis B for the elimination ideal J ⊆ R[t1 , . . . , tm , τ ] consisting of the relations among f1 , . . . , fm , α; use a monomial order that favors τ . Then [FG : FU ] is equal to the smallest positive integer D for which B contains an element of degree D in τ (or ∞ if B contains no element that involves τ ). This proves Theorem 4.26. Remark 8.9. An alternative to using Gröbner bases for the above tasks is to solve a (very large) linear system in order to find the minimal relation among a set of polynomials. There are bounds on the maximum possible degree of such a relation (if one exists) [Kay09]. 9 Proofs for S 2 registration 9.1 Formula for Hilbert series of R[x]G We can derive the Hilbert series of R[x]G for S 2 registration using the methods in Section 4.6 of [DK15]. Proposition 9.1. Consider S 2 registration with frequencies F . For |t| < 1, the Hilbert series of R[x]G is given by X H(t) = Res(f, z) z∈P where f (z) = z 1 − 21 (z + 1/z) −z N −2(1 − z)2 hQ i = Q Qℓ Qℓ ℓ m m m 2 ℓ∈F ℓ∈F m=−ℓ (1 − tz ) m=0 (1 − tz ) m=1 (z − t) Q P with N = 12 ℓ∈F ℓ(ℓ + 1). Here Res(f, z) denotes the residue (from complex analysis) of the function f at the point z, and P is the set of poles of f (z) inside the unit circle (in C). Namely, P contains t1/m e2πik/m for all m ∈ {1, 2, . . . , maxℓ∈F ℓ} and for all k ∈ {0, 1, . . . , m − 1}. If N ≤ 1, P also contains 0. 32 Proof. Recall Molien’s formula (Proposition 4.13): H(t) = E g∼Haar(G) det(I − t ρ(g))−1 . Note that det(I − t ρ(g)) depends only on the conjugacy class of g. In SO(3), two elements are conjugate if and only if they rotate by the same angle φ. When g ∼ Haar(SO(3)), the angle φ = φ(g) is distributed with density function π1 (1 − cos φ) on [0, π] (see e.g. [Sal79]). If g has angle φ, the matrix ρℓ (g) by which it acts on the irreducible representation Vℓ has eigenvalues e−iℓφ , e−i(ℓ−1)φ , . . . , eiℓφ (see e.g. [Vve01]). The matrix ρ(g) by which g acts on V = ⊕ℓ∈F Vℓ is block diagonal with blocks ρℓ (g). Using the above we write an expression for the Hilbert series: H(t) = 1 π Z π 0 1 1 − cos φ dφ = Qℓ imφ ) 2π ℓ∈F m=−ℓ (1 − te Q Z 0 2π 1 − 21 (eiφ + e−iφ ) dφ. Qℓ imφ ) ℓ∈F m=−ℓ (1 − te Q Now write this as a complex contour integral around the unit circle in C and apply the residue theorem from complex analysis to arrive at the result. 9.2 Formula for dimension of R[x]G d The dimension of R[x]G can be extracted as the coefficient of td in the Hilbert series from the previous section, but here we give a different formula based on character theory from representation theory. The character of a representation ρ : G → GL(V ) (where V is a finite-dimensional real vector space) is the function χV : G → R defined by χV (g) = tr(ρ(g)). In our case, using the eigenvalues of ρℓ (g) from the previous section, we have χVℓ (g) = 1 + 2 ℓ X cos(m φ(g)) m=1 P where φ(g) is the angle of rotation of g. For V = ⊕ℓ∈F Vℓ we then have χV (g) = ℓ∈F χVℓ (g). As a representation of G = SO(3), R[x]d is (isomorphic to) the dth symmetric power of V , denoted S d (V ). (This is using the fact that a real representation is isomorphic to its dual.) There is a recursive formula for the character of S d (V ): d χS d (V ) (g) = 1X χV (g i )χS d−i (V ) (g). d i=1 This comes from the Newton–Girard formula for expressing complete homogeneous symmetric polynomials in terms of power sum polynomials. The representation R[x]d = S d (V ) decomposes as the direct sum of irreducible representations Vℓ . The subspace of R[x]d consisting of all copies of the trivial representation V0 (the 1-dimensional representation G on which every group element acts as the identity) is precisely R[x]G d . Thus, dim(R[x]d ) is the number of copies of the trivial representation in the decomposition of R[x]d . This can be computed using characters: dim(R[x]G d ) = hχS d (V ) , χV0 i = hχS d (V ) , 1i where hf1 , f2 i := Eg∼Haar(G) [f1 (g)f2 (g)]. Since characters are class functions (i.e. they are constant on conjugacy classes), we can compute this inner product by integrating over the angle φ (as in the previous section). This yields the formula stated in Proposition 5.7. Acknowledgements ASW is grateful for feedback given by several members of the audience when he presented a preliminary version of these results at a workshop dedicated to multi-reference alignment, organized as part of the Simons Collaboration on Algorithms & Geometry. 33 References [ABL+ 17] Emmanuel Abbe, Tamir Bendory, William Leeb, João Pereira, Nir Sharon, and Amit Singer. Multireference alignment is easier with an aperiodic translation distribution. arXiv preprint arXiv:1710.02793, 2017. [ADBS16] Cecilia Aguerrebere, Mauricio Delbracio, Alberto Bartesaghi, and Guillermo Sapiro. Fundamental limits in multi-image alignment. IEEE Trans. Signal Process., 64(21):5707–5722, 2016. [ADLM84] Marc Adrian, Jacques Dubochet, Jean Lepault, and Alasdair W McDowall. Cryo-electron microscopy of viruses. Nature, 308(5954):32–36, 1984. [APS17] Emmanuel Abbe, Joao Pereira, and Amit Singer. Sample complexity of the boolean multireference alignment problem. arXiv preprint arXiv:1701.07540, 2017. [Ban15] Afonso S. Bandeira. Convex Relaxations for Certain Inverse Problems on Graphs. PhD thesis, Princeton University, June 2015. [BBLS17] Nicolas Boumal, Tamir Bendory, Roy R. Lederman, and Amit Singer. Heterogeneous multireference alignment: a single pass approach. arXiv preprint arXiv:1710.02590, 2017. [BBM+ 17] Tamir Bendory, Nicolas Boumal, Chao Ma, Zhizhen Zhao, and Amit Singer. Bispectrum inversion with application to multireference alignment. arXiv preprint arXiv:1705.00641, 2017. [BCS15] Afonso S. Bandeira, Yutong Chen, and Amit Singer. Non-unique games over compact groups and orientation estimation in cryo-EM. arXiv preprint arXiv:1505.03840, 2015. [BCSZ14] Afonso S. Bandeira, Moses Charikar, Amit Singer, and Andy Zhu. Multireference alignment using semidefinite programming. In Proceedings of the 5th conference on Innovations in theoretical computer science, pages 459–470. ACM, 2014. [BFB97] Miguel A Blanco, M Flórez, and M Bermejo. Evaluation of the rotation matrices in the basis of real spherical harmonics. Journal of Molecular Structure: Theochem, 419(1):19–27, 1997. [BMS13] Malte Beecken, Johannes Mittmann, and Nitin Saxena. Algebraic independence and blackbox identity testing. Information and Computation, 222:2–19, 2013. [Böh13] Arno Böhm. Quantum mechanics: foundations and applications. Springer Science & Business Media, 2013. [BRW17] Afonso Bandeira, Philippe Rigollet, and Jonathan Weed. Optimal rates of estimation for multi-reference alignment. arXiv preprint arXiv:1702.08546, 2017. [BZS15] Tejal Bhamre, Teng Zhang, and Amit Singer. Orthogonal matrix retrieval in cryo-electron microscopy. In Biomedical Imaging (ISBI), 2015 IEEE 12th International Symposium on, pages 1048–1052. IEEE, 2015. [CL11] T. Tony Cai and Mark G. Low. Testing composite hypotheses, Hermite polynomials and optimal estimation of a nonsmooth functional. Ann. Statist., 39(2):1012–1041, 2011. [CLO07] David Cox, John Little, and Don O’Shea. Ideals, varieties, and algorithms: an introduction to computational algebraic geometry and commutative algebra. Springer New York, 2007. [Coh13] J. Cohen. Is high-tech view of hiv too good to be true? Science, 6145(341):443–444, 2013. [Dia92] R. Diamond. On the multiple simultaneous superposition of molecular structures by rigid body transformations. Protein Science, 1(10):1279–1287, October 1992. 34 [DK15] Harm Derksen and Gregor Kemper. Computational invariant theory. Springer, 2015. [Dol03] Igor Dolgachev. Lectures on invariant theory, volume 296. Cambridge University Press, 2003. [Dom16] M. Domokos. Degree bounds for separating invariants of abelian groups. arXiv preprint arXiv:1602.06597, 2016. [Eli57] Peter Elias. List decoding for noisy channels. Technical Report 335, Research Laboratory of Electronics, Massachusetts Institute of Technology, 1957. [ER93] Richard Ehrenborg and Gian-Carlo Rota. Apolarity and canonical forms for homogeneous polynomials. European Journal of Combinatorics, 14(3):157–181, 1993. [Ete96] Gábor Etesi. Spontaneous symmetry breaking in the SO(3) gauge theory to discrete subgroups. Journal of Mathematical Physics, 37(4):1596–1601, 1996. [Fel68] W. Feller. An Introduction to Probability Theory and Its Applications, volume 1. Wiley, 1968. [Hil90] David Hilbert. Über die Theorie der algebraischen Formen. Mathematische Annalen, 36:473– 531, 1890. [Hil93] David Hilbert. Über die vollen Invariantensysteme. Mathematische Annalen, 42:313–370, 1893. [Huỳ86] Dũng T. Huỳnh. A superexponential lower bound for Gröbner bases and Church-Rosser commutative Thue systems. Inform. and Control, 68(1-3):196–206, 1986. [Jon16] Slavica Jonić. Cryo-electron microscopy analysis of structurally heterogeneous macromolecular complexes. Computational and structural biotechnology journal, 14:385–390, 2016. [Kač94] Victor Kač. Invariant theory [lecture notes]. https://people.kth.se/~laksov/notes/invariant.pdf, 1994. [Kak09] Ramakrishna Kakarala. Completeness of bispectrum on compact groups. arXiv preprint arXiv:0902.0196, 1, 2009. [Kam80] Zvi Kam. The reconstruction of structure from electron micrographs of randomly oriented particles. Journal of Theoretical Biology, 82(1):15–39, 1980. [Kay09] Neeraj Kayal. The complexity of the annihilating polynomial. In 24th Annual IEEE Conference on Computational Complexity (CCC’09), pages 184–193. IEEE, 2009. [KK10] Martin Kohls and Hanspeter Kraft. Degree bounds for separating invariants. arXiv preprint arXiv:1001.5216, 2010. [LBB+ 17] Eitan Levin, Tamir Bendory, Nicolas Boumal, Joe Kileel, and Amit Singer. 3D ab initio modeling in cryo-EM by autocorrelation analysis. arXiv preprint arXiv:1710.08076, 2017. [LeC73] L. LeCam. Convergence of estimates under dimensionality restrictions. Ann. Statist., 1:38–53, 1973. [LNS99] O. Lepski, A. Nemirovski, and V. Spokoiny. On estimation of the Lr norm of a regression function. Probab. Theory Related Fields, 113(2):221–253, 1999. [LS16] Roy R. Lederman and Amit Singer. A representation theory perspective on simultaneous alignment and classification. arXiv preprint arXiv:1607.03464, 2016. [LS17] Roy R Lederman and Amit Singer. Continuously heterogeneous hyper-objects in cryo-EM and 3-D movies of many temporal dimensions. arXiv preprint arXiv:1704.02899, 2017. 35 [MSS16] Tengyu Ma, Jonathan Shi, and David Steurer. Polynomial-time tensor decompositions with sum-of-squares. In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on, pages 438–446. IEEE, 2016. [Nog16] Eva Nogales. The development of cryo-EM into a mainstream structural biology technique. Nature methods, 13(1):24–27, 2016. [NY83] A. S. Nemirovsky and D. B. and Yudin. Problem complexity and method efficiency in optimization. A Wiley-Interscience Publication. John Wiley & Sons, Inc., New York, 1983. Translated from the Russian and with a preface by E. R. Dawson, Wiley-Interscience Series in Discrete Mathematics. [Osg07] Brad Osgood. Chapter 8: n-dimensional Fourier Transform. Lecture Notes for EE 261: The Fourier Transform and its Applications. https://see.stanford.edu/materials/lsoftaee261/book-fall-07.pdf, 2007. [PWB+ 17] Amelia Perry, Jonathan Weed, Afonso Bandeira, Philippe Rigollet, and Amit Singer. The sample complexity of multi-reference alignment. arXiv preprint arXiv:1707.00943, 2017. [PWBM16a] Amelia Perry, Alexander S Wein, Afonso S. Bandeira, and Ankur Moitra. Message-passing algorithms for synchronization problems over compact groups. arXiv preprint arXiv:1610.04583, 2016. [PWBM16b] Amelia Perry, Alexander S. Wein, Afonso S. Bandeira, and Ankur Moitra. Optimality and sub-optimality of PCA for spiked random matrices and synchronization. arXiv:1609.05573, 2016. [PZAF05] R. G. Pita, M. R. Zurera, P. J. Amores, and F. L. Ferreras. Using multilayer perceptrons to align high range resolution radar signals. In Artificial Neural Networks: Formal Models and Their Applications - ICANN 2005, pages 911–916. Springer Berlin Heidelberg, 2005. [Ros57] Morris E Rose. Elementary theory of angular momentum. Physics Today, 10:30, 1957. [Sad89] B. M. Sadler. Shift and rotation invariant object reconstruction using the bispectrum. In Workshop on Higher-Order Spectral Analysis, pages 106–111, Jun 1989. [Sal79] Eugene Salamin. Application of quaternions to computation with rotations. Technical report, Working Paper, 1979. [Sch03] Alexander Schrijver. Combinatorial optimization: polyhedra and efficiency. Springer Science & Business Media, 2003. [Sch12] S. H. W. Scheres. RELION: implementation of a bayesian approach to cryo-EM structure determination. J. Struct. Biol., 180(3):519–530, 2012. [SG92] Brian M Sadler and Georgios B Giannakis. Shift-and rotation-invariant object reconstruction using the bispectrum. JOSA A, 9(1):57–69, 1992. [Sha94] Igor R. Shafarevich. Basic algebraic geometry. Springer, 1994. [Sig16] Fred J. Sigworth. Principles of cryo-EM single-particle image processing. Microscopy, 65(1):57– 67, 2016. [Sin11] Amit Singer. Angular synchronization by eigenvectors and semidefinite programming. Applied and computational harmonic analysis, 30(1):20–36, 2011. 36 [SS11] Amit Singer and Yoel Shkolnisky. Three-dimensional structure determination from common lines in cryo-EM by eigenvectors and semidefinite programming. SIAM Journal on Imaging Sciences, 4(2):543–572, 2011. [Stu08] Bernd Sturmfels. Algorithms in invariant theory. Springer Science & Business Media, 2008. [TS12] D. L. Theobald and P. A. Steindel. Optimal simultaneous superpositioning of multiple structures with missing data. Bioinformatics, 28(15):1972–1979, 2012. [Tsy09] Alexandre B. Tsybakov. Introduction to nonparametric estimation. Springer Series in Statistics. Springer, New York, 2009. Revised and extended from the 2004 French original, Translated by Vladimir Zaiats. [vdV98] A. W. van der Vaart. Asymptotic statistics, volume 3 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, Cambridge, 1998. [VG86] BK Vainshtein and AB Goncharov. Determination of the spatial orientation of arbitrarily arranged identical particles of unknown structure from their projections. In Soviet Physics Doklady, volume 31, page 278, 1986. [VH87] Marin Van Heel. Angular reconstitution: a posteriori assignment of projection directions for 3D reconstruction. Ultramicroscopy, 21(2):111–123, 1987. [Vve01] Dimitri Vvedensky. Chapter 8: Irreducible Representations of SO(2) and SO(3). Group theory course [lecture notes]. http://www.cmth.ph.ic.ac.uk/people/d.vvedensky/groups/Chapter8.pdf, 2001. [ZvdHGG03] J. P. Zwart, R. van der Heiden, S. Gelsema, and F. Groen. Fast translation invariant classification of HRR range profiles in a zero phase representation. Radar, Sonar and Navigation, IEE Proceedings, 150(6):411–418, 2003. A A.1 Spherical harmonics and SO(3) invariants Spherical harmonics We follow the conventions of [BFB97]. Parametrize the unit sphere by angular spherical coordinates (θ, φ) with θ ∈ [0, π] and φ ∈ [0, 2π). (Here θ = 0 is the north pole and θ = π is the south pole.) For integers ℓ ≥ 0 and −ℓ ≤ m ≤ ℓ, define the complex spherical harmonic Yℓm (θ, φ) = (−1)m Nℓm Pℓm (cos θ)eimφ with normalization factor Nℓm = s (2ℓ + 1)(ℓ − m)! 4π(ℓ + m)! where Pℓm (x) are the associated Legendre polynomials Pℓm (x) = 1 2ℓ ℓ! (1 − x2 )m/2 dℓ+m 2 (x − 1)ℓ . dxℓ+m In the S 2 registration problem we are interested in representing a real-valued function on the sphere, in which case we use an expansion (with real coefficients) in terms of the real spherical harmonics:  (−1)m √ m  m > 0,  √2 (Yℓm (θ, φ) + Yℓm (θ, φ)) = 2Nℓm Pℓ (cos θ) cos(mφ) Yℓ0 (θ, φ) = Nℓ0 Pℓ0 (cos θ) m = 0, Sℓm (θ, φ) = √ m  |m|  (−1) √ (Yℓ|m| (θ, φ) − Yℓ|m| (θ, φ)) = 2Nℓ|m| Pℓ (cos θ) sin(|m|φ) m < 0. i 2 37 Here Yℓm is the complex conjugate of Yℓm , which satisfies the identity Yℓm (θ, φ) = (−1)m Yℓ(−m) (θ, φ). (11) −m m = (−1)m Nℓm Pℓm . Above we have also used the identity Pℓ−m = (−1)m (ℓ−m)! (ℓ+m)! Pℓ , which implies Nℓ(−m) Pℓ In the cryo-EM problem we are instead interested in representing the Fourier transform of a real-valued function. Such a function f has the property that if ~r and −~r are antipodal points on the sphere, f (−~r) = f (~r). For this type of function we use an expansion (with real coefficients) in terms of a new basis of spherical harmonics:  1 ℓ+m  Yℓ(−m) (θ, φ)) m > 0,  √2 (Yℓm (θ, φ) + (−1) ℓ i Yℓ0 (θ, φ) m = 0, Hℓm (θ, φ) =   √i (Yℓ|m| (θ, φ) − (−1)ℓ+m Yℓ(−|m|) (θ, φ)) m < 0. 2 One can check that Hℓm (−~r) = Hℓm (~r) using (11) along with the fact Yℓm (−~r) = (−1)ℓ Yℓm (~r) which comes from Pℓm (−x) = (−1)ℓ+m Pℓm (x). A.2 Wigner D-matrices We will mostly work in the basis of complex spherical harmonics Yℓm since the formulas are simpler. The analogous results for the other bases can be worked out by applying the appropriate change of basis. Let Vℓ ≃ C2ℓ+1 be the vector space consisting of degree-ℓ complex spherical harmonics represented P in the basis {Yℓm }−ℓ≤m≤ℓ , i.e. v ∈ C2ℓ+1 encodes the spherical harmonic ℓm=−ℓ vm Yℓm . These Vℓ (for ℓ = 0, 1, 2, . . .) are the irreducible representations of SO(3). Each can also be defined over the real numbers by changing basis to the real spherical harmonics Sℓm . A group element g ∈ SO(3) acts on a (spherical harmonic) function f : S 2 → R via (g · f )(x) = f (g −1 x). The action of g on Vℓ is given by the Wigner D-matrix Dℓ (g) ∈ C(2ℓ+1)×(2ℓ+1) defined as in [BFB97]. We will need the following orthogonality properties of the Wigner D-matrices. First, the standard Schur orthogonality relations from representation theory yield ′ ℓ (g)D ℓ Dmk m′ k′ (g) = E g∼Haar(SO(3)) 1 1ℓ=ℓ′ 1m=m′ 1k=k′ . 2ℓ + 1 We also have [Ros57] ℓ ℓ′ Dmk (g)Dm ′ k′ (g) = ′ ℓ+ℓ X L hℓ m ℓ′ m′ |L (m + m′ )ihℓ k ℓ′ k ′ |L (k + k ′ )iD(m+m ′ )(k+k′ ) (g) L=|ℓ−ℓ′ | where hℓ1 m1 ℓ2 m2 |ℓ mi is a Clebsch-Gordan coefficient. There is a closed-form expression for these coefficients [Böh13]: s (2ℓ + 1)(ℓ + ℓ1 − ℓ2 )!(ℓ − ℓ1 + ℓ2 )!(ℓ1 + ℓ2 − ℓ)! hℓ1 m1 ℓ2 m2 |ℓ mi =1m=m1 +m2 × (ℓ1 + ℓ2 + ℓ + 1)! p (ℓ + m)!(ℓ − m)!(ℓ1 − m1 )!(ℓ1 + m1 )!(ℓ2 − m2 )!(ℓ2 + m2 )! × X (−1)k k k!(ℓ1 + ℓ2 − ℓ − k)!(ℓ1 − m1 − k)!(ℓ2 + m2 − k)!(ℓ − ℓ2 + m1 + k)!(ℓ − ℓ1 − m2 + k)! where the sum is over all k for which the argument of every factorial is nonnegative. 38 A.3 Moment tensor Let F be a multi-set of frequencies from {1, 2, . . .} and consider the action of G = SO(3) on V = ⊕ℓ∈F Vℓ . Recall that we want an explicit formula for Td (x) = Eg [(Π(g · x))⊗d ] with g ∼ Haar(G) (where Π can be the identity in the case of no projection). We have Eg [(Π(g · x))⊗d ] = Π⊗d Eg [ρ(g)⊗d ]x⊗d (where x⊗d is a column vector of length dim(V )d ) and so we need an explicit formula for the matrix Eg [ρ(g)⊗d ]. Here ρ(g) is block diagonal with blocks Dℓ (g) for ℓ ∈ F . There are no degree-1 invariants since we have excluded the trivial representation ℓ = 0. For the degree-2 invariants Eg [ρ(g)⊗2 ], consider a particular block Eg [Dℓ1 (g) ⊗ Dℓ2 (g)] for some pair (ℓ1 , ℓ2 ). The entries in this block can be computed using 0 the above orthogonality relations (and using D00 (g) = 1): Eg [(Dℓ1 (g))m1 k1 (Dℓ2 (g))m2 k2 ] = 1ℓ1 =ℓ2 1m1 =−m2 1k1 =−k2 hℓ1 m1 ℓ2 m2 |0 0ihℓ1 k1 ℓ2 k2 |0 0i = 1ℓ1 =ℓ2 1m1 =−m2 1k1 =−k2 (−1)m1 +k1 2ℓ1 + 1 ℓ1 +m1 √ using the special case hℓ1 m1 ℓ2 m2 |0 0i = 1ℓ1 =ℓ2 1m1 =−m2 (−1) . 2ℓ1 +1 Similarly, for degree 3 we have Eg [(Dℓ1 (g))m1 k1 (Dℓ2 (g))m2 k2 (Dℓ3 (g))m3 k3 ] = 1|ℓ2 −ℓ3 |≤ℓ1 ≤ℓ2 +ℓ3 1m1 +m2 +m3 =0 1k1 +k2 +k3 =0 A.4 (−1)m1 +k1 hℓ2 m2 ℓ3 m3 |ℓ1 (m2 + m3 )ihℓ2 k2 ℓ3 k3 |ℓ1 (k2 + k3 )i. 2ℓ1 + 1 Projection Let V = ⊕ℓ∈F Vℓ with F a subset of {1, 2, . . .}. Let Π : V → W be the projection that takes a complex spherical harmonic function and reveals only its values on the equator θ = π/2. In cryo-EM this projection is applied separately to each shell (see Section 5.5). Letting L = maxℓ∈F ℓ, the functions b−L , b−L+1 , . . . , bL (from the circle S 1 to R) form a basis for W , where bm (φ) = eimφ . The projection Π takes the form Π(Yℓm ) = (−1)m Nℓm Pℓm (0)bm extended by linearity. By taking a binomial expansion of (x2 − 1)ℓ it can be shown that ( 0 (ℓ + m) odd, m  Pℓ (0) = (−1)(ℓ−m)/2 ℓ (ℓ+m)/2 (ℓ + m)! (ℓ + m) even. 2ℓ ℓ! (12) For cryo-EM, if we use the basis Hℓm so that the expansion coefficients are real, the output of the projection can be expressed (with real coefficients) in the basis  1 imφ  + (−1)m e−imφ ) m > 0,  √2 (e 1 m = 0, hm (φ) =   √i (ei|m|φ − (−1)m e−i|m|φ ) m < 0, 2 where the projection Π takes the form |m| Π(Hℓm ) = (−1)m Nℓ|m| Pℓ extended by linearity. 39 (0)hm A.5 Explicit construction of invariants Consider the cryo-EM setup (see Section 5.5) with S shells and F frequencies. We will cover S 2 registration as the special case S = 1 (without projection). Use the basis of complex spherical harmonics, with corresponding variables xsℓm with 1 ≤ s ≤ S, 1 ≤ ℓ ≤ F , and −ℓ ≤ m ≤ ℓ. One can change variables to Sℓm or Hℓm but for our purposes of testing the rank of the Jacobian it is sufficient to just work with Yℓm (since the change of variables has no effect on the rank of the Jacobian). Recall that in Section A.3 we computed expressions for the matrices Eg [Dℓ1 (g)⊗ Dℓ2 (g)] and Eg [Dℓ1 (g)⊗ ℓ2 D (g) ⊗ Dℓ3 (g)], and in particular they are rank-1. Using this we can explicitly compute the entries of Td (x) and thus extract a basis for U2T and U3T . We present the results below. A.5.1 Degree-2 invariants Without projection, the degree-2 invariants are I2 (s1 , s2 , ℓ) = X 1 (−1)k xs1 ℓk xs2 ℓ(−k) 2ℓ + 1 |k|≤ℓ for s1 , s2 ∈ {1, . . . , S} and ℓ ∈ {1, . . . , F }. Swapping s1 with s2 results in the same invariant, so take s1 ≤ s2 to remove redundancies. With projection, the degree-2 invariants are X Nℓm Nℓ(−m) Pℓm (0)Pℓ−m (0)I2 (s1 , s2 , ℓ) P2 (s1 , s2 , m) = (−1)m ℓ≥|m| with s1 , s2 ∈ {1, . . . , S} and m ∈ {−F, . . . , F }. Negating m or swapping s1 with s2 results in the same invariant (up to sign) so take s1 ≤ s2 and m ≥ 0 to remove redundancies. Recall the expression (12) for Pℓm (0). A.5.2 Degree-3 invariants Let ∆(ℓ1 , ℓ2 , ℓ3 ) denote the predicate |ℓ2 − ℓ3 | ≤ ℓ1 ≤ ℓ2 + ℓ3 (which captures whether ℓ1 , ℓ2 , ℓ3 can be the side-lengths of a triangle). Without projection, the degree-3 invariants are I3 (s1 , ℓ1 , s2 , ℓ2 , s3 , ℓ3 ) = 1 2ℓ1 + 1 X (−1)k1 hℓ2 k2 ℓ3 k3 |ℓ1 (−k1 )ixs1 ℓ1 k1 xs2 ℓ2 k2 xs3 ℓ3 k3 k1 +k2 +k3 =0 |ki |≤ℓi for si ∈ {1, . . . , S} and ℓi ∈ {1, . . . , F } satisfying ∆(ℓ1 , ℓ2 , ℓ3 ). There are some redundancies here. First, permuting the three (si , ℓi ) pairs (while keeping each pair in tact) results in the same invariant (up to scalar multiple). Also, some of the above invariants are actually zero; specifically, this occurs when (s1 , ℓ1 ) = (s2 , ℓ2 ) = (s3 , ℓ3 ) with ℓ1 odd, or when (s1 , ℓ1 ) = (s2 , ℓ2 ) 6= (s3 , ℓ3 ) with ℓ3 odd (or some permutation of this case). With projection, the degree-3 invariants are P3 (s1 , m1 , s2 , m2 , s3 , m3 ) = X 1 2 3 (0)Pℓm (0)Pℓm (0)hℓ2 m2 ℓ3 m3 |ℓ1 (−m1 )iI3 (s1 , ℓ1 , s2 , ℓ2 , s3 , ℓ3 ) Nℓ1 m1 Nℓ2 m2 Nℓ3 m3 Pℓm (−1)m1 1 2 3 ℓ1 ,ℓ2 ,ℓ3 : ∆(ℓ1 ,ℓ2 ,ℓ3 ) for si ∈ {1, . . . , S} and mi ∈ {−F, . . . , F } such that m1 + m2 + m3 = 0. There are again redundancies under permutation: permuting the three (si , mi ) pairs results in the same invariant. Negating all three m’s also results in the same invariant. There are additional non-trivial linear relations (see Section A.6 below). 40 A.6 A.6.1 Counting the number of invariants S 2 registration For the case of S 2 registration (S = 1) the above degree-2 and degree-3 invariants without projection (with G redundancies removed as discussed above) form a basis for R[x]G 2 ⊕ R[x]3 (although we have not made this rigorous). Thus, counting these invariants gives a combinatorial analogue of Proposition 5.7. A.6.2 Cryo-EM T In this section we give a formula for trdeg(U≤3 ) for (heterogeneous) cryo-EM (with projection), valid for all K ≥ 1, S ≥ 1 and F ≥ 2. The formula is conjectural but has been tested (via the Jacobian criterion) for various small values of K, S, F . The number of algebraically independent degree-2 invariants turns out to be the number of distinct I2 invariants (i.e. without projection), since the projected invariants P2 are linear combinations of these. The number of such invariants is 21 S(S + 1)F . For degree 3, things are more complicated because the projected invariants P3 have smaller dimension than the I3 . We start by counting the number of distinct (up to scalar multiple) P3 invariants. To this end, let X (S, F ) be the set of equivalence classes of tuples (s1 , m1 , s2 , m2 , s3 , m3 ) with si ∈ {1, . . . , S} and mi ∈ {−F, . . . , F }, modulo the relations (s1 , m1 , s2 , m2 , s3 , m3 ) ∼ (s2 , m2 , s1 , m1 , s3 , m3 ) ∼ (s1 , m1 , s3 , m3 , s2 , m2 ) (s1 , m1 , s2 , m2 , s3 , m3 ) ∼ (s1 , −m1 , s2 , −m2 , s3 , −m3 ) (permutation) (negation). There are some non-trivial linear relations among the distinct P3 invariants, which we must now account for. The number of such relations is E(S) := 2S + 4S(S − 1) + S(S − 1)(S − 2). This can be broken down as follows. For each k ∈ {1, 2, 3} there are 2k relations for each size-3 multisubset {s1 , s2 , s3 } of {1, . . . , S} with exactly k distinct elements. (We do not currently have a thorough understanding of what exactly the linear relations are, but we have observed that the above pattern holds.) We can now put it all together and state our conjecture. We will also use the formula (3) for trdeg(R[x]G ), extended to the heterogeneous case via Proposition 4.15. Conjecture A.1. Consider cryo-EM with F ≥ 2 frequencies. • trdeg(R[x]G ) = K[S(F 2 + 2F ) − 3] + K − 1, • dim(U2T ) = 12 S(S + 1)F , • dim(U3T ) = |X (S, F )| − E(S), • generic list recovery is possible at degree 3 if and only if dim(U2T ) + dim(U3T ) ≥ trdeg(R[x]G ). When S and F are large, the dominant term in dim(U2T ) + dim(U3T ) is |X (S, F )| ≈ S 3 F 2 /4 and so generic list recovery is possible when (roughly) K ≤ S 2 /4. B Unique recovery for the regular representation Let G be a finite abelian group. Let V be the regular representation of G over R, i.e. V = R|G| with basis indexed by the elements of G, and the action of G permutes the basis elements vg according to group multiplication: h · vg = vhg . Note that for the cyclic group G = Z/p, this is precisely the MRA problem. We will show that with this setup, generic unique recovery is possible at degree 3: 41 Theorem B.1. Let G be a finite abelian group and let V be the regular representation of G over R. Then T R(U≤3 ) is equal to the field of fractions of R[x]G . Recall that the equality of the two fields above implies generic unique recovery at degree 3 by Corollary 4.25. Generic unique recovery at degree 3 is actually true in the more general setting where V is the regular representation over R of any finite group [Kak09]. T Proof. It is sufficient to show C(U≤3 ) = C(R[x]G ). Let p = |G| = dim(V ). The polynomial algebra on V gets an action of G in the usual way and the degree-1 component is isomorphic to the regular representation. Over C, the regular representation decomposes as a direct sum of all the characters χ(1) , . . . , χ(p) of G (each of which is a group homomorphism G → C× = C r {0}). (Here we have used the fact that G is finite and abelian, and so its irreducible representations are 1-dimensional.) b = {χ(1) , . . . , χ(p) } be the set of characters. For each χ ∈ G b let yχ ∈ C[V ] be the associated Let G eigenvector (in the degree-1 component of the polynomial algebra) so that g · yχ = χ(g)yχ for all g ∈ G. b forms an abelian group (the character group or Pontryagin dual of G) under pointwise multiplication: G (χ1 χ2 )(g) = χ1 (g)χ2 (g). b yχ yχ−1 is a degree-2 invariant, and for any χ1 , χ2 ∈ G, b yχ1 yχ2 y(χ χ )−1 is a Observe that for any χ ∈ G, 1 2 b we have degree-3 invariant. For each χ ∈ G Y Y yχ′ yχ′−1 = yχp yχ yχ′ y(χχ′ )−1 b χ′ ∈G b χ′ ∈G and so yχp lies in the field generated by the invariants of degree ≤ 3. The field extension C(yχ(1) , . . . , yχ(p) )/C(yχp (1) , . . . , yχp (p) ) is Galois with Galois group H = (Z/p)p ; the generator of the ith copy of Z/p acts by multiplying yχ(i) by a fixed primitive pth root of unity. (Recall that the Galois group is the automorphisms of the larger field that fix the smaller field pointwise.) By the fundamental theorem of Galois theory, intermediate extensions of the above Galois extension are in bijection with subgroups of H. The correspondence maps a field to the group that fixes it (pointwise) and maps a group to the field that it fixes. The field C(R[x]G ) is an intermediate extension with corresponding T group G. The field C(U≤3 ) is also an intermediate extension, and we will show that its corresponding group T is also G, thus proving C(U≤3 ) = C(R[x]G ) as desired. T T Clearly G fixes C(U≤3 ) (since U≤3 are invariants), so it remains to show that there are no other automorT phisms of C(yχ(1) , . . . , yχ(p) ) that fix U≤3 . Let φ ∈ H. As an element of (Z/p)p , we can write φ = (φ1 , . . . , φp ). If χ = χ(i) we will also write φχ for φi . If φ fixes the degree-2 invariant yχ yχ−1 , we must have φχ−1 = φ−1 χ . If . In particular, = φ φ also fixes the degree-3 invariant yχ1 yχ2 y(χ1 χ2 )−1 , we must have φχ1 φχ2 = φ−1 χ χ −1 1 2 (χ1 χ2 ) b → C× given by χ 7→ φχ is a group homomorphism. Thus, any φ fixing U T can be identified the map G ≤3 b b , which is isomorphic to G; in particular there are only p with an element of the Pontryagin double dual G such elements φ, which completes the proof. 42
8cs.DS
arXiv:1711.03912v1 [math.GN] 10 Nov 2017 Zariski-like Topologies for Lattices with Applications to Modules over Commutative Rings * Jawad Abuhlail† Department of Mathematics and Statistics King Fahd University of Petroleum & Minerals 31261 Dhahran, KSA Hamza Hroub‡ Department of Mathematics King Saud University 11451 Riyadh, KSA November 13, 2017 Abstract We study Zariski-like topologies on a proper class X & L of a complete lattice L = (L, ∧, ∨, 0, 1). We consider X with the so called classical Zariski topology (X , τ cl ) and study its topological properties (e.g. the separation axioms, the connectedness, the compactness) and provide sufficient conditions for it to be spectral. We say that L is X -top iff τ := {X \V (a) | a ∈ L}, where V (a) = {x ∈ L | a ≤ x} is a topology. We study the interplay between the algebraic properties of an X -top complete lattice L and the topological properties of (X , τ cl ) = (X , τ ). Our results are applied to several spectra which are proper classes of L := LAT (R M) where M is a left module over an arbitrary associative ring R (e.g. the spectra of prime, coprime, fully prime submodules) of M as well as to several spectra of the dual complete lattice L 0 (e.g. the spectra of first, second and fully coprime submodules of M). * MSC2010: Primary 06A15; Secondary 16D10, 13C05, 13C13, 54B99. Key Words: Topological lattices; Prime Modules, First Submodules, Strongly Hollow Submodules, Zariski Topology, Dual Zariski Topology, Zariski Topology; Dual Zariski Topology † Corresponding Author; Email: [email protected]. The authors would like to acknowledge the support provided by the Deanship of Scientific Research (DSR) at King Fahd University of Petroleum & Minerals (KFUPM) for funding this work through projects No. RG1213-1 & RG1213-2 ‡ The paper is extracted from the Ph.D. dissertation of Dr. Hamza Hroub under the supervision of Prof. Jawad Abuhlail 1 Introduction The spectrum Spec(R) of prime ideals of a commutative ring R attains the so called Zariski topology in which the closed sets are the varieties {V (I) | I ∈ Ideal(R)}, where V (I) = {P ∈ Spec(R) | I ⊆ P}. This topology is compact, T0 but almost never T2 , and the closed points correspond to the maximal ideals. The Zariski topology proved to be very important in two main aspects: in Algebraic Geometry and in Commutative Algebra. In particular, it provided an efficient tool for studying the algebraic properties of a commutative ring R by investigating the corresponding topological properties of Spec(R) [9]. Motivated by this, there were many attempts to define Zariski-like topologies on the spectra of prime-like submodules of a given left module M over a (not necessarily commutative) ring R. This resulted at the first place in several different notions of prime submodules of R M which reduced to the notion of a prime ideal for the special case M = R, a commutative ring (e.g. [21]). The work in this direction was almost limited to studying these prime-like submodules and their duals (the coprime-like submodules) as well as to the families of prime ideals corresponding to them from a purely algebraic point of view. One of the obstacles was that not every module M over a (commutative) ring R has the property that Spec(M) attains a Zariski-like topology: the proposed closed varieties {V (N) | N ∈ LAT (R M)} are not necessarily closed under finite unions. Modules for which this last condition is satisfied were investigated, among others, by R. L. McCasland and P. F. Smith (e.g. [17], [16]) and called top modules. However, even such modules were studied from a purely algebraic point of view and the associated Zariski-like topologies were not well studied till about a decade ago. In [6], Abuhlail introduced a Zariskilike topology on the spectrum of fully coprime subcomodules of a given comodule M of a coring C over an associative ring R and studied the interplay between the algebraic properties of M and the topological properties of that Zariski-like topology (see also [5]). Later, in a series of papers ([3], [4], [2]), Abuhlail introduced and investigated several Zariskilike topologies for a module M over an arbitrary associative ring R. These investigations showed that all the (co)prime spectra considered fall in two main classes with several common properties for the spectra in each class. Moreover, these two classes were dual to each other in some sense. This led Abuhlail and Lomp ([7], [1]) to investigate such topologies for a general complete lattice L := (L, ∧, ∨, 0, 1) and a proper subset X ⊆ L\{1}. Their main work was on characterizing the so called X -top lattices (i.e. L for which the closed varieties V (a) := {x ∈ X | a ≤ x} are closed under finite unions). In addition to the fact that this approach provided a general framework, it allowed obtaining results on the dual lattice L 0 := (L, ∧0 , ∨0 , 00 , 10 ) = (L, ∨, ∧, 1, 0) and X ⊆ L\{0} for free. This paper consists of two sections. After providing some basic definitions and preliminaries, we study in Section 1 Zariski-like topologies for complete lattices using a different approach. Fix a complete lattice L = (L, ∨, ∧, 1, 0), a subset X ⊆ L\{1} and τ := {X \V (a) | a ∈ L}. Inspired by the work of Behboodi and Haddadi [10], [11] on the lattice LAT (R M) of submodules of a given module M over a ring R, and instead of restricting our attention to X -top lattices (i.e. those for which (X , τ ) is a topology), we consider X with the classical Zariski topology (X , τ cl ) which 2 is constructed on X by considering τ as a subbase and the finer patch topology (X , τ fp ) which has a subbase B := {V (a) ∩ X \V (b) | a, b ∈ L}. Indeed, (X , τ cl ) ≤ (X , τ fp ) and (X , τ ) = (X , τ cl ) if and only if L is X -top. In the special case when L is an X -top lattice, we not only apply the results obtained on (X , τ cl ), but obtain also other interesting results especially on the interplay between the algebraic properties of L and the topological properties of (X , τ ). In Proposition 1.22, we prove a stronger version of the converse of [1, Proposition 2.7] and conclude in Corollary 1.23 that in case L is an X -top lattice: A ⊆ X is irreducible if and only if V I(A) := x is (strongly) irreducible in the sublattice (C (L), ∧) of radical elements of L . This x∈A fact was the key in the proofs of several results including Theorem 2.6. It is worth mentioning that Theorem 2.6 recovers several results of Abuhlail on such 1-1 correspondences for L = LAT (R M) (e.g. [2], [3], [4]) and Abuhlail/Lomp [1] as special cases (some of these results are recovered under conditions weaker than those assumed in the original results for the different spectra of modules). In Theorem 1.27, we prove that the class Max(X ) of maximal elements of X coincides with the class of Max(C (L )) of maximal radical elements. This yields, assuming that C (L ) satisfies the so called complete max property, that (X , τ cl ) is discrete if and only if (X , τ cl ) is T1 . This result generalizes [2, Theorem 5.34], [2, Theorem 4.28] and [3, Theorem 3.46]. A topological space T is said to be spectral [15] iff T is homeomorphic to Spec(R), the prime spectrum of a commutative ring R, with the Zariski topology. Hochster [15] characterized such spaces by giving sufficient and necessary conditions on a topological space to be spectral. We observe in Proposition 1.49 that if the finer patch topology (X , τ fp ) is compact, then the classical Zariski topology (X , τ cl ) is spectral. Sufficient conditions for (X , τ fp ) to be compact were provided in Theorems 1.54 and 1.58. Example 1.64 provides several spectra of modules which are shown to be spectral by Theorem 1.54. In Section 2, we restrict our investigations to X -top lattices L = (L, ∨, ∧, 1, 0) where X ⊆ L\{1}. We investigate the interplay between the algebraic properties of L and the topological space (X , τ ) = (X , τ cl ). Several types of compactness and connectedness of (X , τ ) are studied in Theorem 2.3. For examples of such an interplay. The results in Section 1 are applied to the complete lattice LAT (R M) := (L (M), ∩, +, 0, M) of submodules of a left module M over an associative ring R. In a series of examples 2.9 - 2.14, we apply Theorem 2.6 to a number of spectra X ⊆ L (M)\M (or X ⊆ L (M)\{0}). 1 Zariski-like Topologies for Lattices Lattices 1.1. ([14]) A lattice L is a poset (L, ≤) closed under two binary commutative associative and idempotent operations ∧ (meet) and ∨ (join), and we write L = (L, ∧, ∨). We say that a lattice V W (L, ∧, ∨) is a complete lattice iff x and x exist for any H ⊆ L. For two lattices L = x∈H x∈H (L, ∧, ∨) and L ′ = (L′ , ∧′ , ∨′ ), a homomorphism of lattices from L to L ′ is a map ϕ : L −→ L′ 3 that preserves finite meets and finite joins, i.e. ϕ (x ∧ y) = ϕ (x) ∧′ ϕ (y) and ϕ (x ∨ y) = ϕ (x) ∨′ ϕ (y) ∀x, y ∈ L. If L = (L, ∧, ∨, 0, 1) and L ′ = (L′ , ∧′ , ∨′ , 0′ , 1′ ) are complete lattices, then a morphism of complete lattices from L to L ′ is a map ϕ : L −→ L′ that preserves arbitrary meets and arbitrary joins. 1.2. Let L = (L, ∧, ∨) be a lattice. If L has a maximum element 1 and a minimum element 0, then L is called a bounded lattice and we write L = (L, ∧, ∨, 0, 1). An element x ∈ L\{1} is called maximal in L iff y = x or y = 1 whenever x ≤ y; dually, an element x ∈ L\{0} is called minimal iff y = x or y = 0 whenever y ≤ x. Notice that every complete lattice is bounded. We V W x = 0. make the convention that x = 1 and x∈0/ x∈0/ 1.3. For every lattice L = (L, ∧, ∨), there is associated the dual lattice L 0 = (L, ∧0 , ∨0 ) where ∧0 = ∨ and ∨0 = ∧. Indeed, if L = (L, ∧, ∨) is a complete lattice, then the dual lattice L 0 is complete. Moreover, if L = (L, ∧, ∨, 0, 1) is a bounded lattice, then the dual lattice L 0 = (L, ∧0 , ∨0 , 00 , 10 ) is bounded with 00 = 1 and 10 = 0. Example 1.4. Let R be a ring. 1. S = (Ideal(R), ∩, +, R, 0), where Ideal(R) is the set of all (two-sided) ideals of R is a complete lattice. 2. For any left R-module M, the set LAT (M) = (L (M), ∩, +, M, 0) is a complete lattice where L (M) is the class of all R-submodules of M. 1.5. Let L = (L, ∧, ∨, 0, 1) be a complete lattice. 1. An element x ∈ L\{1} is said to be: irreducible [7] iff for any a, b ∈ L with a ∧ b = x, we have a = x or b = x; strongly irreducible [7] iff for any a, b ∈ L with a ∧ b ≤ x, we have a ≤ x or b ≤ x. We denote the set of strongly irreducible elements in L by SI(L ). 2. An element x ∈ L\{0} is said to be: hollow iff whenever for any a, b ∈ L with x = a ∨ b, we have x = a or x = b; strongly hollow [7] iff for any a, b ∈ L with x ≤ a ∨ b, we have x ≤ a or x ≤ b. We denote the set of strongly hollow elements in L by SH(L ). 3. We say that L is a hollow lattice iff 1 is hollow (i.e. for any two elements x, y ∈ L\{1} we have x ∨ y 6= 1); a uniform lattice iff 0 is uniform (i.e. for any two elements x, y ∈ L\{0} we have x ∧ y 6= 0). 4 1.1 X-top Lattices From now on, we assume that L = (L, ∧, ∨, 0, 1) is a complete lattice. 1.6. Let X ⊆ L\{1}. For a ∈ L, we define the variety of a as V (a) := {p ∈ X | a ≤ p} and set V (L ) := {V (a) | a ∈ L}. Indeed, V (L ) is closed under arbitrary intersections (in fact, T W a∈A V (a) = V ( a∈A (a)) for any A ⊆ L). The lattice L is called X -top (or a topological lattice [1]) iff V (L ) is closed under finite unions. The lattice L is called strongly X -top iff X ⊆ SI(L ) [1]. √ V 1.7. Let X ⊆ L\{1}. For any Y ⊆ X , we set I(Y ) := p and a := I(V (a)). We say that a is p∈Y √ an X -radical element iff a = a. The set of X -radical elements of L is √ C X (L) := {a ∈ L | a = a}. When X is clear from the above notation. Notice that C (L ) = √ from the context, we drop it W̃ W W̃ ˜ 0, 1) is a complete lattice, where Y := IV ( (Y )) for any Y ⊆ C (L), i.e. x∈Y x = (C (L), ∧, ∨, qW x. It was proved in [1, Theorem 2.2] that L is an X -top lattice if and only if the map x∈Y √ ˜ 1, 0) −→ (P(X ), ∩, ∪, X , 0), V : (C (L), ∧, ∨, / a 7→ V (a) is an anti-homomorphism of lattices, that is V (a ∧ b) = V (a) ∪V (b) and V (a ∨ b) = V (a) ∩V (b) for all a, b ∈ C (L). The following lemma appeared in [1] except for (2) which is clear. Lemma 1.8. Let X ⊆ L\{1}. For any x, y ∈ L and A, B ⊆ L we have: 1. A ⊆ B ⇒ I(B) ≤ I(A). √ √ √ √ 2. V (x) ⊆ V (y) ⇔ y ≤ x. It follows that V (x) = V (y) ⇔ y = x. √ 3. V (x) = V ( x). 4. T V (x) = V ( x∈A W (x)). x∈A 5. I ◦V ◦ I = I. 6. V ◦ I ◦V = V . 7. L is X -top ⇐⇒ V (x) ∪V (y) = V (x ∧ y) for any x, y ∈ C (L). 1.9. Let X ⊆ L\{1} and set τ := {X \V (a) | a ∈ L}. We define τ cl to be the topology constructed on X by taking τ as a subbase, that is τ cl is the set of all arbitrary unions of finite intersections of elements in τ , and is called the classical Zariski topology on X . Moreover, L is X -top (i.e. τ is closed under finite intersections) if and only if τ cl = τ . 5 1.10. Let Y ⊆ L\{0}. For any a ∈ L, we define the dual variety V 0 (a) := {q ∈ Y | q ≤ a} and set V 0 (L ) = {V 0 (a) | a ∈ L}. We say that L is dual Y -top iff the dual lattice L 0 is a √ 0 W Y -top lattice. For any subset A ⊆ Y , we set H(A) := q∈A q; also we set a := H(V 0 (a)), and H (L ) = C Y (L 0 ). The dual classical Zariski topology τ dcl on Y is constructed by taking τ 0 := {Y \V 0 (a) | a ∈ L} as a subbase for this topology. With this process, one can dualize the results obtained in this section for the (classical) Zariski-topology to results on the dual (classical) Zariski topology. The following lemma recovers [2, 5.14 and 4.10], [3, 3.23] and [4, 3.21]. Lemma 1.11. Let X ⊆ L\{1} and assume that L is an X -top lattice. The closure of any Y ⊆ X is given by Y = V (I(Y )). Proof. Let Y ⊆ X . Notice that Y = V (a) for some a ∈ L, whence a ≤ V p = I(Y ) and so p∈Y V (I(Y )) ⊆ V (a) = Y . On the other hand, Y ⊆ V (I(Y )) and so Y ⊆ V (I(Y )).  1.12. A non-empty topological space (T, τ ) is said to be: 1. connected iff T is not the union of two disjoint non-empty open subsets (equivalently, T is not the union of two disjoint non-empty closed sets). 2. hyperconnected (or irreducible [12]) iff no two non-empty open sets in T are disjoint (equivalently, T is not the union of two closed subsets). 3. ultraconnected [12] iff no two non-empty closed sets in T are disjoint. 1.13. Let (T, τ ) be a topological space. A subset A ⊆ T is called hyperconnected [12] (or irreducible) iff A is so when considered as a topological space w.r.t. the relative topology induced from (T, τ ) (equivalently, A is non-empty and for any two closed subsets F1 , F2 in T with A ⊆ F1 ∪ F2 , we have A ⊆ F1 or A ⊆ F2 ). The empty set is not considered to be irreducible. A closed subset F ⊆ T is said to have a generic point g ∈ T [12] iff {g} = F. The topological space (T, τ ) is called sober iff every closed irreducible subset of T has a unique generic point. 1.14. A subset A ⊆ T is irreducible if and only if the closure A is irreducible. An irreducible component [12] is an irreducible subset of X which is not a proper subset of any irreducible subset of T (hence an irreducible component of T is indeed a closed subset). The following result generalizes [10, 3.2 and 3.3]. Proposition 1.15. Let X ⊆ L\{1} and consider (X , τ cl ). 1. For each p ∈ X , we have {p} = V (p). 2. V (p) is irreducible ∀p ∈ X . 6 3. If Y ⊆ X is closed, then Y = S V (p). p∈Y 4. If L is X -top, then for any closed subset Y ⊆ X we have Y = S V (p) = V ( p∈Y V p). p∈Y Proof. Consider (X , τ cl ). 1. Observe that V (p) is closed in (X , τ cl ), whence {p} ⊆ V (p). On the other hand, suppose T S j=n S j=n that {p} = i∈I ( j=1i (V (xi j ))), where xi j ∈ L. Since p ∈ j=1i (V (xi j )) ∀i ∈ I, it follows S j=ni that V (p) ⊆ {p} = V (p). j=1 (V (xi j )) ∀i ∈ I. Therefore, V (p) ⊆ {p}. Clearly, {p} ⊆ V (p), whence 2. Notice that {p} is irreducible, whence V (p) = {p} is irreducible. 3. Clear. 4. Let Y ⊆ X be closed. It follows from (3) that Y = S p∈Y to be X -top, Y = V (x) for some x ∈ L and so x ≤ Consequently, Y = S p∈Y V (p) = V ( V V (p) ⊆ V ( V p∈Y V p). Since L is assumed p∈Y p, whence V ( V p∈Y p) ⊆ V (x) = Y . p). p∈Y  Example 1.16. Consider the complete ideal lattice L = (Ideal(Z), ∩, +, Z, 0). Consider X = Spec p (Z), the prime spectrum of Z. It is clear that (X , τ ) is a topological space (the usual Zariski topology on the spectrum of the commutative ring Z). Notice that for Y := Spec p (Z)\{0}, we T S have Y = V (I(Y )) = V ( P) = V (0) = X 6= V (p). This example shows that [10, Proposition P∈Y p∈Y 3.1] fails to hold even for domains. However, the proof of Proposition 1.15 provides a correct proof [10, Corollary 2.3] without using [10, Proposition 3.1]. The following result recovers [10, Proposition 3.8], [3, Proposition 3.24 (1)] and [2, Proposition 5.15 (i)]. Proposition 1.17. Let X ⊆ L\{1} and consider (X , τ cl ). 1. X is T0 . 2. Every finite closed irreducible subset of X has a unique generic point. If X is finite, then X is sober. Proof. 1. Let p1 , p2 ∈ X be such that {p1 } = {p2 }, whence V (p1 ) = V (p2 ) and it follows that p1 = p2 , which proves that X is T0 (notice that, in general, (X , τ ) is T0 if and only if {p1 } = {p2 } ⇔ p1 = p2 ). 7 2. In general, If (X , τ ) is T0 , then every finite irreducible closed subset has a unique generic point. To see this, suppose that F is a closed irreducible finite set that has no generic point. 6 F and so there is x2 ∈ F\{x1 }. Observe that {x1 } ∪ {x2 } = 6 F Pick x1 ∈ F, whence {x1 } = as F is irreducible. So, there is x3 ∈ F\({x1 } ∪ {x2 }). by continuing this process, we conclude that F is infinite, a contradiction. The uniqueness of the generic point follows directly from the fact that T0 .  The following observation generalizes [10, Proposition 2.3]. Remark 1.18. Let X ⊆ L\{1}. The following are equivalent for (X , τ cl ) : 1. L = C (L ). 2. For all x1 , x2 ∈ L with V (x1 ) = V (x2 ), we have x1 = x2 . Proof. (1 ⇒ 2) Suppose V (x1 ) = V (x2 ) for some x1 , x2 ∈ L. It follows that x1 ≤ p, ∀p ∈ V (x2 ) √ whence x1 ≤ x2 = x2 . Similarly, x2 ≤√x1 . √ (2 ⇒ 1) ∀x ∈ L we have V (x) = V ( x), whence x = x.  1.19. Let X ⊆ L\{1} and denote by Min(X ) the set of minimal elements of X and by Max(X ) the set of maximal elements of X . We say that X is atomic iff for every p ∈ X there is q ∈ Min(X ) such that q ≤ p; coatomic iff for every element p ∈ X there is q ∈ Max(X ) such that p ≤ q. Remarks 1.20. Let X ⊆ L\{1} and consider (X , τ cl ). 1. If X satisfies the DCC, then X is atomic. 2. If X is atomic, then there is a subset A ⊆ X such that X = p∈A V (p) with V (p) and V (q) are not comparable for any p 6= q ∈ A (e.g. take A = Min(X )). S 3. Let X be atomic and Min(X ) finite. Then X is irreducible if and only if Min(X ) is a S singleton. To see this, observe that X = V (p) with p  q for any p 6= q are in p∈Min(X) Min(X ). Clearly, X is irreducible if and only if Min(X ) is a singleton. Remarks 1.21. Let X ⊆ L\{1} with 0 ∈ X and consider (X , τ cl ). 1. If F ⊆ X is closed and 0 ∈ F, then F = X . To prove this, observe that X = V (0) = {0} ⊆ F. 2. Every non-empty open subset of X contains 0. To see this, let O ⊆ X be open. If 0 ∈ / O, then 0 ∈ F := X \O. By (1), X \O = X , i.e. O = 0. / 3. X is irreducible since Min(X ) = {0}, a singleton (see Remark 1.20 (3)). 8 It was proved in [1, Proposition 2.7], that if L is an X -top lattice and A ⊆ X is such that I(A) is irreducible in (C (L), ∧), then A is irreducible in (X , τ ). The following result proves a stronger version of the converse. Proposition 1.22. Let X ⊆ L\{1} and assume that L is an X -top lattice. If A ⊆ X is irreducible, then I(A) is strongly irreducible in (C (L), ∧). [1, Theorem 2.2] = Proof. Suppose that a∧b ≤ I(A) for some a, b ∈ C (L). Now, A = V (I(A)) ⊆ V (a∧b) V (a) ∪ V (b). Since A is irreducible, A is also irreducible, whence A ⊆ V (a) or A ⊆ V (b). So, a = I(V (a)) ≤ I(A) = I(V (I(A))) = I(A) or b = I(V (b)) ≤ I(A) = I(V (I(A))) = I(A).  Corollary 1.23. Let X ⊆ L\{1} and assume that L is an X -top lattice. The following conditions are equivalent for A ⊆ X : 1. A is irreducible; 2. I(A) is strongly irreducible in (C (L), ∧); 3. I(A) is irreducible in (C (L), ∧). 1.24. A maximal element in L is a maximal element in the poset (L\{1}, ≤). An element x ∈ L is called minimal in L iff x is maximal in L 0 . We denote by Max(L ) (resp. Min(L )) the set of all maximal (resp. minimal) elements in L . The lattice L is called coatomic iff for every element x ∈ L\{1}, there exists y ∈ Max(L ) such that x ≤ y. Dually, L is called atomic iff for every element x ∈ L\{0}, there exists y ∈ Min(L ) such that y ≤ x. V Let A ⊆ L. The lattice L is said to have the complete A-property iff p  q for any p∈A\{q} q ∈ A. The lattice L is said to have the complete max property iff L has the complete Max(L )property. Lemma 1.25. Let L be an X -top lattice. If L is coatomic and Max(L ) ⊆ X , then Max(L ) = Max(X ). Proof. Let p ∈ Max(X ). Since L is coatomic, there is y ∈ Max(L ) such that p ≤ y and so p = y as Max(L ) ⊆ X .  The following result recovers and generalizes [3, Proposition 3.45], [2, Propositions 5.33, 4.27], and [4, Proposition 3.40]. The additional conditions assumed in these results imply that Max(L ) = Max(X ) (or Min(L ) = Min(X ) in the dual cases). Proposition 1.26. Let X ⊆ L\{1}. The following are equivalent for (X , τ cl ) : 1. X is T1 ; 9 2. Max(X ) = X = Min(X ). Proof. X is T1 ⇔ every singleton is closed ⇔ {p} = {p} = V (p) ∀p ∈ X ⇔ Max(X ) = X = Min(X ).  Theorem 1.27. Let X ⊆ L\{1} and consider (X , τ cl ). Then Max(X ) = Max(C (L )). Moreover, the following conditions are equivalent: 1. X is T1 and C (L ) satisfies the complete max property; 2. X is discrete. Proof. Let p ∈ Max(X ). Then p ∈ C (L) and so p ∈ Max(C (L )); otherwise, there is x ∈ C (L)\{1} such that p x. Since x 6= 1, there is q ∈ X such that x ≤ q and so p q (a contradicV tion). For the reverse inclusion, let x ∈ Max(C (L)). Notice that x = p for some 0/ 6= A ⊆ X . Vp∈A Since A ⊆ C (L), it follows by the maximality of x in C (L) that x = p∈A p = q for some q ∈ A, i.e. A is singleton and x ∈ X . Moreover, x ∈ Max(X ) as X ⊆ C (L). (1) ⇒ (2) : Assume that C (L ) satisfies the complete max property. Since Max(X ) = V Max(C (L)), we have p  q for any q ∈ Max(X ). Notice that for any q ∈ X , we p∈Max(X)\{q} have X = V ( V p∈X\{q} p) ∪ {q} and by our assumption q ∈ / V( V p). Hence, every singleton in p∈X\{q} X is open, that is (X , τ cl ) is discrete. (2) ⇒ (1) : Assume that X is discrete and show that C (L ) satisfies the complete max property. To show this, suppose that q ∈ X and let Y = X \{q}. Observe that Y = Y = V (I(Y )) as {q} is open. Hence, I(Y )  q, which completes the proof as X = Max(X ) = Max(C (L )).  The following result generalizes [2, Theorem 5.34], [2, Theorem 4.28] and [3, Theorem 3.46]. Corollary 1.28. Let X ⊆ L\{1} and consider (X , τ cl ). If C (L ) satisfies the complete max property, then the following conditions are equivalent: 1. Max(X ) = X = Min(X ); 2. X is T2 ; 3. X is T1 ; 10 4. X is discrete. Corollary 1.29. Let X ⊆ L\{1} and consider (X , τ cl ). Assume that L satisfies the complete max property, L is coatomic and Max(L ) ⊆ C (L). The following are equivalent: 1. Max(X ) = X = Min(X ); 2. X is T2 ; 3. X is T1 ; 4. X is discrete. Proof. Let p ∈ Max(C (L )). Since L is coatomic, there exists q ∈ Max(L ) such that p ≤ q. By assumption, Max(L ) ⊆ C (L) whence p = q. So, Max(L ) = Max(C (L )) and the result follows by Corollary Theorem 3.16.  A topological space is regular [18] iff any non-empty closed set F and any point x that does not belong to F can be separated by disjoint open neighborhoods. A T3 space is one which is both T1 and regular. In general, regular spaces need not be Hausdorff. However, we have a special situation. Remark 1.30. If (X , τ cl ) is regular, then (X , τ cl ) is T3 . To see this, assume that X is regular and let p 6= q be elements in X . Assume, without loss of generality, that p  q so that is, q ∈ / V (p). Since X is regular, there are two disjoint open sets O1 and O2 in X such that q ∈ O1 and V (p) ⊆ O2 . Therefore, X is T2 . A topological space X is normal [18] iff any two disjoint closed sets of X can be separated by disjoint open neighborhoods. The following example shows that the normality of (X , τ cl ) does not guarantee that it is regular. Example 1.31. Let R be a local ring with |Spec(R)| ≥ 2. Then Spec(R) is normal because it has no disjoint non-empty closed sets. However, Spec(R) is not T1 whence not regular by Remark 1.30. To see this, notice that the assumption |Spec(R)| ≥ 2 implies that there is a prime ideal p of R and a maximal ideal q of R such that p q. Hence, every open set containing q contains p as well. 1.2 Examples Through the rest of this section, R is an associative ring, M is a non-zero left R-module and LAT (M) := (L (M), ∩, +, M, 0) the complete lattice of R-submodules of M. Moreover, we denote by Max(M) (resp. S (M)) the possibly empty set of maximal (resp. simple) R-submodules of M. By L ≤ M, we mean that L is an R-submodule of M. With abuse of notation, we mean by I ≤ R that I is a (two sided) ideal of R. 11 1.32. Let M be a left R-module. We call an R-submodule K ≤ M : prime [13] iff K 6= M and for any N ≤ M and I ≤ R, we have IN ⊆ K ⇒ N ⊆ K or IM ⊆ K. first [1] iff K 6= 0 and for any N ≤ K and I ≤ R, we have IN = 0 ⇒ N = 0 or IK = 0. coprime [2] iff K 6= M and for any I ≤ R, we have IM + K = M or IM ⊆ K. second [2] iff K 6= 0 and for any I ≤ R we have IK = K or IK = 0. By Spec p (M) (resp. Spec f (M), Specc (M), Specs (M)) we denote the spectrum of prime (resp. first, coprime, second) R-submodules of M. 1.33. An R-submodule K of M is said to be fully invariant [3] (and we write L ≤ f .i. M) iff f (L) ⊆ L for all f ∈ S := End(M). If every submodule of M is fully invariant, then M is said to be a duo module [3]. For any L1 , L2 ≤ M, we define L1 ∗ L2 = ∑ f ∈Hom(M,L2 ) f (L1 ) and L1 ⊙M L2 = \ f −1 (L2 ); f ∈S, f (L1 )=0 see [3] and [4]. Notice that if L1 ≤ f .i. M, then L1 ∗ L2 ⊆ L1 ∩ L2 . 1.34. A fully invariant submodule K ≤ f .i. M is: fully prime in M [3] iff K 6= M and for any L1 , L2 ≤ f .i. M, we have L1 ∗ L2 ⊆ K ⇒ L1 ⊆ K or L2 ⊆ K. f .i. fully coprime in M [4] iff K 6= 0 and for any L1 , L2 ≤R M we have K ⊆ L1 ⊙M L2 ⇒ K ⊆ L1 or K ⊆ L2 . By Spec f p (M) (resp. Spec f c (M)) we denote the spectrum of fully prime (resp. fully coprime) R-submodules of M. The following example summarizes some facts about some Zariski-like topologies on several spectra of submodules of a given module. Example 1.35. Consider X1 := Spec p (M), X2 := Specc (M), X3 := Spec f p (M), X4 := Specs (M), X5 := Spec f (M) and X6 := Spec f c (M). Notice that X1 , X2 , X3 ⊆ L (M)\{M} and so one can construct the classical Zariski topology τ cl − on any of them as we did for general complete lattices L = (L, ∧, ∨, 1, 0) and X ⊆ L\{1}. On the other hand, one can construct dual classical Zariski p topologies on τ dcl − only any of X4 , X5 , X6 ⊆ L (M)\{0}. Moreover, M is top -module (resp. a c f p top -module, a top -module) if and only if LAT (M) is X1 -top (resp. X2 -top, X3 -top). On the other hand, M is a tops -module (resp. a top f -module, a top f c-module) iff LAT (M) is dual X4 -top (resp. dual X5 -top, dual X6 -top). The following table summarize some facts about these spaces. 12 Type M∈ / Spec− (M) 0∈ / Spec− (M) Subsets of L X1 = Spec p (M), X2 = Specc (M), X3 = Spec f p (M) X4 = Spec f (M), X5 = Specs (M), X6 = Spec f c (M) Variety V − (N) {P ∈ Spec− (M) | N ≤ P} Subbase τ − {X \V − (N) | N ≤ M} {X \V − (N) | N ≤ M} τ cl τ cl − : the topology generated by τ − τ dc − : the topology generated by τ − L is Xi -top ⇔ τ − = τ cl − L 0 is X j -top ⇔ τ − = τ dcl − or τ dcl (Dual) X -top {P ∈ Spec− (M) | P ≤ N} Table 1: Examples of spectra of submodules of a given module Example 1.36. Let M be a local left module over an arbitrary ring R, i.e. M has a unique maximum proper submodule (e.g. the Z-module Z pk , p is any prime and k is any positive integer). Consider X1 = Spec p (M) and X2 = Specc (M). Then C X1 (LAT (M)) and C X2 (LAT (M)) satisfy the complete max property (notice that any maximal submodule is prime and coprime). Example 1.37. Consider L := LAT (M), X1 = Spec p (M) and X2 = Specc (M). Every maximal submodule of M is a prime and a coprime submodule, i.e. Max(M) ⊆ X1 and Max(M) ⊆ X2 . So, it is enough to assume that R M is a coatomic module satisfying the complete max property to satisfy the equivalent conditions of Corollary 1.29. Moreover, Corollary 1.28 applies if RAD p (M) := C X1 (L ) (resp. RADc (M) := C X2 (L ) ) satisfies the complete max property as a lattice. Example 1.38. Consider L := LAT (M), X4 = Spec f (M) and X5 = Specs (M). Every simple submodule of M is a second and a first submodule of M, i.e. S (M) ⊆ X4 and S (M) ⊆ X5 . So, it is enough to assume that R M is an atomic module with the complete min property to satisfy the equivalent conditions of Corollary 1.29 applied to L 0 . Moreover, Corollary 1.28 applies if C X4 (L 0 ) (resp. C X5 (L 0 )) satisfies the complete min property as a lattice. Remark 1.39. It was proved in [2], that if R M is a coatomic topc-module satisfying the complete max property, then Specc (M) = Max(M) ⇐⇒ X is T2 ⇔ X is T1 ⇔ X is discrete. A similar result was proved for Spec f p (M) assuming that R M is a self projective coatomic duo module (S − PCD). Notice that it was proved in [3, Remark 3.12] that if R M is self projective and 13 duo, then every maximal submodule is fully prime. Other conditions were assumed on M in the dual cases to ensure that S (M) = Min(X ). So, Corollary 1.28 generalizes all the corresponding results in [3] and [2]. 1.3 Spectral Spaces As before, L = (L, ∧, ∨, 0, 1) is a complete lattice. 1.40. A topological space is said to be spectral [15] iff it is homeomorphic to Spec(R), the prime spectrum of a commutative ring R with the Zariski topology. Hochster [15, Proposition 4] characterized such spaces. A topological space (X , τ ) is spectral if and only if all of the following four conditions are satisfied: 1. X is compact; 2. X has a basis of compact open sets closed under finite intersections; 3. X is sober. Remark 1.41. Let X ⊆ L\{1}. If X is finite, then (X , τ cl ) is spectral: By Proposition 1.17, X is T0 and sober. The remaining Hochster’s conditions in 1.40 follow directly from the finiteness of X. Definition 1.42. Let X ⊆ L\{1} and consider (X , τ cl ). Set √ R(L ) := { x | x ∈ L and V (x) is irreducible}. (1) We say that X satisfies the radical condition iff R(L ) ⊆ X . Lemma 1.43. Let X ⊆ L\{1} and consider (X , τ cl ). If X is sober, then X satisfies the radical condition. The converse holds if L is X -top. Proposition 1.15 Proof. Let X be sober. Let x ∈ R(L ). Since = V (p) for some √ X is sober, V (x) = {p} p ∈ X . It follows by Lemma 1.8 (2) that x = p ∈ X . For the converse, assume that L is X -top. Let F be a√closed irreducible subset of X . Since L is X√-top, F = V√(x) for some x ∈ L. By our hypothesis, x ∈ X . By Lemma 1.8 (3), F = V (x) = V ( x) and so x is the unique generic point of F (the uniqueness is obvious). Therefore, X is sober.  Proposition 1.44. Let X ⊆ L\{1} and assume that L is an X -top lattice. If L satisfies the ACC, then every subset of (X , τ ) is compact. 14 Proof. Let A ⊆ X and suppose that O = {X \V (xi )) | xi ∈ L, i ∈ I} is an open cover for A. Since W W L satisfies the ACC, i∈I xi = j∈J x j for some finite subset J ⊆ I. Notice that A⊆ [ i∈I (X \V (xi )) = X \V ( _ i∈I xi )) = X \V ( _ xi )) = i∈I [ i∈J (X \V (x j )), i.e. {X \V (x j ) | j ∈ J} is a finite subcover of O for A.  Proposition 1.45. Let X ⊆ L\{1} and assume that L is an X -top lattice. The following conditions are equivalent: 1. C (L ) satisfies the ACC; 2. Every subset of (X , τ ) is compact; 3. Every open set in (X , τ ) is compact. √ √ ˜ 0, 1). Since V (x) = V ( x) for Proof. (1 ⇒ 2) : Consider the complete lattice √ (C (L), ∧, ∨, ˜ 0, 1) is an X -top lattice. By our assumption, every x ∈ L, we conclude that C := (C (L), ∧, ∨, C satisfies the ACC and so every subset of X is compact by Proposition 1.44. (3 ⇒ 1) : Let a1 ≤ a2 ≤ a3 ≤ · · · be an ascending chain in C (L ). Notice that X \V (a1 ) ⊆ W̃∞ X \V (a2 ) ⊆ X \V (a3 ) ⊆ · · · . Setting b = i=1 ai , we observe that X \V (b) = X \V ( ∞ _ i=1 ai ) = X \ ∞ \ i=1 V (ai ) = ∞ [ i=1 (X \V (ai )). By our assumption, the open set X \V (b) is compact and so X \V (b) = for some n ∈ N, i.e. b = an and the ascending chain stabilizes. n S i=1 X \V (ai ) = X \V (an )  Corollary 1.46. Let X ⊆ L\{1} and L be an X -top lattice such that C (L ) satisfies the ACC. Then (X , τ ) is spectral ⇔ (X , τ ) is sober. Proof. By Proposition 1.17 X is T0 . The result follows now using Proposition 1.45 and Hochster’s characterization for spectral spaces 1.40.  In [11], the so called finer patch topology was used to prove that for any left module M over an associative ring R, and X = Spec p (M), the classical Zariski topology (X , τ cl ) is a spectral space provided that the ACC holds for intersections of prime submodules of M. 1.47. Let X ⊆ L\{1}. The finer patch topology τ fp on X is the one whose subbase is B = {V (x) ∩ X \V (y) | x, y ∈ L}. It is clear that τ cl ⊆ τ fp . So, if τ fp is compact, then τ cl is compact. 15 (2) Example 1.48. Let P be the set of all prime numbers in Z and consider the ring R = ∏ p∈P Z p . Then the finer patch topology associated with Spec(R) is not compact while, trivially, the classical Zariski topology is compact. In general, if R is a ring with zero dimension and Spec(R) is infinite, then the finer patch topology associated with Spec(R) is not compact while, trivially, the classical Zariski topology is compact. Proposition 1.49. Let X ⊆ L\{1}. If (X , τ fp ) is compact, then (X , τ cl ) is spectral. Proof. Assume that (X , τ fp ) is compact. We apply Hochster’s characterizations of spectral spaces to prove that (X , τ cl ) is spectral. Notice that (X , τ cl ) is T0 by Proposition 1.17 and is compact since τ cl ⊆ τ fp . Claim I: (X , τ cl ) is sober. Let Y ⊆ X be a closed irreducible set in (X , τ cl ). Then Y Proposition 1.15 S = V (p). On the other p∈Y hand Y is closed in (X , τ fp ), whence compact in (X , τ fp ) (recall that every closed subset of a compact space is compact). Therefore, the open cover O := {V (p) : p ∈ Y } of Y has a finite subcover {V (p1 ), · · · ,V (pn )}, i.e. Y = i=n S pi . But Y is irreducible, whence Y = V (pk ) for some i=1 k ∈ {1, 2, · · · , n}. Clearly, pk is the unique generic point of Y. Claim II: X has a basis of compact open sets closed under finite intersections. We prove this claim in two steps. Step 1: Every basic open subset of (X , τ cl ) is compact. Let B be a basic open subset of (X , τ cl ), i.e. B = i=n T i=1 X \V (xi ) for some {x1 , · · · , xn } ⊆ L. Observe that X \V (xi ) is closed in (X , τ fp ) ∀i ∈ {1, 2, · · · , n}. So, B is closed in (X , τ ), whence compact in (X , τ fp ). Since τ cl ⊆ τ fp , B is compact in (X , τ cl ). Step 2: The collection of open compact subsets of (X , τ cl ) is closed under arbitrary intersections. mi n T S X \V (xi j ) for some Let U be an open compact set in (X , τ cl ). Then we can write U = i=1 j=1 subset {xi j | j = 1, 2, · · · , mi , i = 1, · · · , n} (the union is finite because of the compactness of U ). Notice that U is closed in (X , τ fp ). So, any intersection of open compact subsets in (X , τ cl ) is closed in (X , τ fp ); so it is compact in (X , τ fp ), whence compact in (X , τ cl ).  Example 1.50. The ring of integers Z is Noetherian and so the finer patch topology on Spec(Z) is compact because the ACC is satisfied on the radical ideals by [11, Theorem 2.2]. This example shows that (X , τ fp ) can be compact although X is infinite. Example 1.51. Let L be infinite and be such that the elements of X := L\{0, 1} are not comparable (notice that for all a 6= b in X we have a ∧ b = 0 and a ∨ b = 1). Notice that (X , τ fp ) is not compact, whereas (X , τ cl ) is compact because it is the cofinite topology on X . Notice also that C (L ) satisfies the ACC and every element in C (L ) can be written as an irredundant meet of elements in X , but this guarantees the compactness for the finer patch topology. Observe that L is not X -top and (X , τ cl ) is not sober and hence not spectral. 16 Proposition 1.52. Let X ⊆ L\{1} and consider (X , τ cl ). If V (x) is reducible for some x ∈ L, then V (x) = n S i=1 V (xi ) for some elements x1 , x2 , · · · , xn ∈ L, where V (xi ) $ V (x) for all i = 1, 2, · · · , n. Proof. Let V (x) be reducible for some x ∈ L, i.e. V (x) = F1 ∪ F2 where both F1 and F2 are T S l T S i V (xi j ) and F2 = l∈L m closed proper subsets of V (x). Suppose that F1 = i∈I nj=1 k=1 V (ylk ) for some {xi j }, {ylk } ⊆ L. Since F1 and F2 are proper subsets of V (x), we have V (x) * for some i0 ∈ I and V (x) * Sml0 Sml0 k=1 V (yl0 k ) for some l0 ∈ L, whence V (x) 6= Sni0 Sni0 j=1 V (xi0 j ) j=1 V (xi0 j ) ∩ V (x) and V (x) 6= k=1 V (yl0 k ) ∩ V (x). Set xr := xi0 r ∨ x for r = 1, 2, · · · , ni0 and xni0 +r = yl0 r ∨ x for S r = 1, 2, · · · , ml0 and let n := ni0 + ml0 . By construction, V (x) = nr=1 V (xr ), where each V (xr ) is a proper subset of V (x).  As a direct consequence of Proposition 1.52, we obtain the following result which recovers [10, Proposition 2.26] proved for the prime spectrum of a module over a ring. Corollary 1.53. Let X ⊆ L\{1} and assume that |X | ≥ 2. If (X , τ cl ) is T2 , then there exist x1 , x2 , · · · , xn ∈ L such that X = n S i=1 V (xi ), while X 6= V (xi ) for all i = 1, 2, · · · , n. The radical condition is automatically satisfied by the spectrum of prime submodules of a given left module over an associative ring by [10, Theorem 3.4, Corollary 3.6]. However, we need to check it when dealing with other cases. The following result generalizes [11, Theorem 3.2]: Theorem 1.54. Let X ⊆ L\{1} and consider (X , τ cl ). If X satisfies the radical condition, then C (L ) satisfies the ACC if and only if (X , τ fp ) is compact. It follows that, If C (L ) satisfies the ACC and X satisfies the radical condition, then (X , τ cl ) is spectral. Proof. Assume that C (L ) satisfies the ACC and that X satisfies the radical condition. We need only to prove that (X , τ fp ) is compact since it will follow then, by Proposition 1.49, that (X , τ cl ) is spectral. Suppose that (X , τ fp ) is not compact, i.e. there is an open cover A in τ fp for X which does not have a finite subcover for X . Let E := {x ∈ C (L) | V (x) is not covered by a finite subcover of A }. √ / Since C (L ) satisfies the ACC, E has a maximal element p. Observe that 0 ∈ E, i.e. E 6= 0. Notice that V (p) 6= 0. / Case 1: p ∈ / X . Since X satisfies the radical condition, V (p) is reducible and it follows by Proposition 1.52 that V (p) = n S i=1 V (xi ) for some x1 , · · · , xn ∈ C (L) (see Lemma 1.8 (3)), where V (xi ) $ V (p), whence p xi , for all i ∈ {1, · · · , n}. Since p is maximal in E and p xi , V (xi ) is covered by a finite subcover of A for all i ∈ {1, · · · , n}. Hence V (p) is covered by a finite subcover of A , a contradiction. 17 Case 2: p ∈ X . It follows that p ∈ O for some O ∈ A and so p ∈ B, where B is a basic open subset of O. Assume that B= n \ (V (xi ) ∩ X \V (yi )) for some subset {x1 , · · · , xn , y1 , · · · , xn } ⊆ L. i=1 Observe that zi := yi ∨ p  p as yi  p ∀ i ∈ {1, 2, · · ·n}. Claim: V (p) ∩ n T i=1 X \V (zi ) ⊆ B. To prove this claim, let q ∈ V (p) ∩ n T i=1 X \V (zi ) for all i ∈ {1, 2, · · · , n}, whence p ≤ q and yi ∨ p  q for all i ∈ {1, 2, · · · , n}. It follows that p ≤ q and yi  q for all i ∈ {1, 2, · · · , n}. But xi ≤ p for all i ∈ {1, 2, · · · , n} whence xi ≤ q and yi  q for all i ∈ {1, 2, · · · , n}, i.e. q ∈ n T i=1 (V (xi ) ∩ X \V (yi )) = B as claimed. Now, notice that for all i ∈ {1, 2, · · · , n}, we have p subcover Ai of A . On the other hand, V (p)\ n S i=1 zi and so V (zi ) is covered by a finite V (zi ) = V (p) ∩ n T i=1 X \V (zi ) ⊆ B ⊆ O. Hence {O} ∪ A1 ∪ A2 ∪ · · · ∪ An is a finite subcover of A for V (p), which is a contradiction. Therefore, (X , τ fp ) is compact. Conversely, assume that (X , τ fp ) is compact. Suppose that C (L ) does not satisfy the ACC. Then there is an infinite strictly increasing chain a1 a2 .... of elements in C (L ). Since (X , τ fp ) is compact, V (a1 ) is compact as it is closed. But one can check that {V (ai )∩(X \V (ai+1 )) | i = 1, 2, ...} ∪ {V ( ∞ W ai )} is an open cover for V (x1 ) which does not have a finite subcover, a con- i=1 tradiction.  Remark 1.55. Let X ⊆ L\{1}. The radical condition in Theorem 1.54 is necessary for (X , τ cl ) to be spectral. Recall that this condition is satisfied if X is sober (see Lemma 1.43). Definition 1.56. Let X ⊆ L\{1}. An element p ∈ X is called minimal in X over x ∈ L iff p = q whenever x ≤ q ≤ p for some q ∈ X . Corollary 1.57. Let X ⊆ L\{1}. Assume that C (L ) satisfies the ACC, and that for any x ∈ C (L)\(X ∪ {1}) with V (x) 6= 0/ there is a completely strongly irreducible minimal element in X over it with respect to (C (L), ∧). Then (X , τ fp ) is compact (and consequently (X , τ cl ) is spectral). Proof. We claim that X satisfies the radical condition. Let x ∈ R(L )\X . In particular, V (x) 6= 0. / V qp Let p be a completely strongly irreducible minimal element in X over x. Then q∈V (x)\{p} (otherwise, q∈V (x)\{p} q ≤ p and the complete strong irreducibility of p would imply that q p V for some q ∈ V (x) contradicting the minimality of p over x). Therefore, V (x) = V ( q∈V (x)\{p} q)∪ V (p) a union of proper closed subsets and so V (x) is reducible, a contradiction. So, X satisfies the radical condition. Now, the hypotheses of Theorem 1.54 are satisfied and it follows that (X , τ fp ) is compact and consequently (X , τ cl ) is spectral. V 18  Theorem 1.58. Let X ⊆ L\{1} and consider (X , τ cl ). Assume that C (L ) satisfies the DCC and that Min(X ) ⊆ SI(C (L )). Then (X , τ fp ) is compact if and only if V (p) is finite ∀p ∈ Min(X ). Proof. Assume that C (L ) satisfies the DCC and that Min(X ) ⊆ SI(C (L )). We show that S (X , τ fp ) is compact. Notice first of all that X = V (p), since C (L ) satisfies the DCC. p∈Min(X) Claim: Min(X ) is finite. To prove this claim, notice that V p= n V i=1 p∈Min(X) pi for some {p1 , p2 , · · · , pn } ⊆ Min(X ) (since C (L ) satisfies the DCC). So, ni=1 pi ≤ p for all p ∈ Min(X ). By assumption, Min(X ) ⊆ SI(C (L )), whence p = pi for some i ∈ {1, 2, · · · , n}. Consequently, Min(X ) is finite. If V (p) is finite ∀p ∈ Min(X ), then X is finite, whence (X , τ fp ) is compact. Conversely, suppose that (X , τ fp ) is compact and that V (p) is infinite for some p ∈ Min(X ). Case 1: V (p) contains an infinite chain p = x1 x2 .... which does not stabilize. Consider V the open cover A := {V (xi ) ∩ (X \V (xi+1 ) | i = 1, 2, ..} ∪ {V ( ∞ W xi )} for V (p). Clearly A has no i=1 finite subcover for V (x1 ), whence (X , τ fp ) is not compact, a contradiction. Case 2: V (p) does not contain any infinite chain. It follows that there is an infinite subset V V A ⊆ V (p) of incomparable elements. Since C (L ) satisfied the DCC, it follows that x= x x∈A for some finite subset F ⊆ A. Since A is infinite, there is q ∈ A\F such that p a contradiction. x∈F q for some p ∈ F,  Lemma 1.59. Let X ⊆ L\{1} and L be an X -top lattice. Assume that C (L ) satisfies the DCC. Then X ⊆ SI(C (L )). Proof. Since L is an X -top lattice, we have τ = τ cl . Notice that for every p ∈ X , the singleton {p} is irreducible in (X , τ ), whence p = I({p}) is strongly irreducible in (C (L), ∧) by Proposition 1.22.  Corollary 1.60. Let X ⊆ L\{1} and L be an X -top lattice. If C (L ) satisfies the DCC, then (X , τ fp ) is compact if and only if V (p) is finite ∀p ∈ Min(X ). Proof. Follows directly by applying Lemma 1.59 and Theorem 1.58.  Example 1.61. Let L = (L, ∧, ∨, 1, 0) be a complete lattice, where L is an infinite ascending W chain x1 ≤ x2 ≤ · · · endowed with a maximum element 1 such that xi = 1 for every infinite i∈I subset I ⊆ N. Let X = L\{1}. Then C (L ) satisfies the DCC, and Min(X ) ⊆ SI(C (L ). Hence, τ fp is not compact by Theorem 1.58 because V (x1 ) is infinite. Moreover, every descending chain of (X , τ ) is a spectral subspace. 19 In what follows, R is a ring, M is a left R-module and consider L := LAT (M), the complete lattice of left R-submodules of M. Example 1.62. Let X = Spec p (M), the spectrum of prime R-submodules of M. By [10, Theorem 3.4 (i)], Spec p (M) satisfies the radical condition. Therefore, Theorem 1.54 recovers [11, Theorem 3.2] as a special case. Example 1.63. Let R M be Noetherian and X = SI(M), the spectrum of strongly irreducible R-submodules of M, whence L is X -top. By [1, Proposition 2.7], SI(M) satisfies the radical condition. Therefore (SI(M), τ fp ) is compact and (SI(M), τ ) is spectral. Example 1.64. Applying Theorem 1.54, we obtain several examples of spectral spaces: 1. If R M is duo and C (L ) satisfies the ACC, then Spec f p (M) is spectral (notice that Spec f p (M) satisfies the radical condition by [3, Proposition 3.30]). 2. If R M is duo and H (L) satisfies the DCC, then X = Spec f c (M) is spectral (notice that X = Spec f c (M) satisfies the radical condition by [4, Proposition 3.25]). 3. If R M is a completely distributive topc-module and C (L ) satisfies the ACC, then Specc (M) is spectral (notice that X = Specc (M) satisfies the radical condition by [2, Proposition 5.19 (i)]). 4. If R M is a tops -module and H (L) satisfies the DCC, then Specs (M) is spectral (notice that X = Specs (M) satisfies the radical condition by [2, Proposition 4.14 (i)]). 5. If R M is a top f -module, I(A) is first for every irreducible subset A ⊆ Spec f (M) and H (L) satisfies the DCC, then Spec f (M) is spectral (notice that the assumption on the irreducible subsets of X = Spec f (M) is equivalent to X satisfying the radical condition by [1, Remark 4.25]). 2 Algebraic versus Topological Properties As before, L = (L, ∧, ∨, 0, 1) is a complete lattice. In this section we study the interplay between the topological properties of (X , τ cl ) where X ⊆ L\{1} (or (X , τ dcl ) where X ⊆ L\{0}) and the algebraic properties of L . Applications will be given to the special case L = LAT (R M), where R is a ring and M is a left R-module. 2.1. We say that an element x ∈ L is is finitely constructed in L iff x cannot be written as an infinite irredundant join of elements of L, that is, for any collection {xi }i∈I ⊆ L such that W W xi = x, there is a finite sub-collection {x j } j∈J of {xi }i∈I with x j = x. An element x is called i∈I j∈J countably finitely constructed in L iff x cannot be written as an infinite countable irredundant W join of elements of L, i.e. for any countable collection {xi }i∈I ⊆ L with xi = x, there is a finite i∈I sub-collection {x j } j∈J of {xi }i∈I with W x j = x. An element x is called countably constructed j∈J in L iff x cannot be written as an uncountable irredundant join of elements of L. 20 We collect first some remarks: Remarks 2.2. Let L be an X -top lattice, X ⊆ L\{1} and consider the topological space (X , τ ). 1. The following are equivalent: (a) (X , τ ) is irreducible; √ (b) 0 ∈ SI(C (L )); (c) If X = S i∈I V (xi ), then either I is infinite or there is i0 ∈ I such that xi0 is a lower bound for X . 2. (X , τ ) is T1 if and only if Max(X ) = X . 3. (X , τ ) is Noetherian ⇔ C (L ) satisfies the ACC ⇔ each set in X is compact ⇔ each open set in X is compact. 4. (X , τ ) is Artinian ⇔ C (L ) satisfies the DCC ⇔ every closed cover for any subset of X has a finite subcover. 5. (X , τ ) is (countably) compact if and only if 1 is (countably) finitely constructed in C (L ). 6. If SI(C (L )) ⊆ X , then (X , τ ) is sober. 7. If X satisfies the radical condition, then (X , τ ) is sober. 8. Assume that C (L ) satisfies the complete max property. Then, (X , τ ) is T1 ⇔ (X , τ ) is discrete. 9. If (X , τ ) is an atomic, Lindelof (compact) and V (p) is open ∀ p ∈ Min(X ), then Min(X ) is countable (finite). 10. V (x) is irreducible for every x ∈ X . Proof. Let L be an X -top lattice. 1. (a ⇔ b) Apply Corollary 1.23 to V (0) = X . (a ⇒ c) Suppose that X = S i∈I V (xi ) with I finite. Since X is irreducible, V (xi0 ) = X for some i0 ∈ I whence xi0 a lower bound for X . (c ⇒ a) Suppose that X = V (x) ∪V (y) for some x, y ∈ L. By our assumption, x is a lower bound for X whence X = V (x) or y is a lower X whence X = V (y). Therefore, X is irreducible. 2. Apply Proposition 1.26 to (X , τ ) = (X , τ cl ). 21 3. It is easy to check that the first two statements are equivalent. The remaining equivalences follow by applying Proposition 1.15 to (X , τ ) = (X , τ cl ). 4. Notice that any open set in X has the form X \V (x) where x ∈ C (L). The equivalence of the first two statements is straightforward. We claim that they are equivalent to the third statement. Assume that C (L ) satisfies the DCC. Let U ⊆ X and {V (x) | x ∈ A} be a closed cover, i.e. S U ⊆ Y := V (x), and assume without loss of generality that A ⊆ C (L). It follows that I(Y ) = V x∈A x. Since C (L ) satisfies the DCC, I(Y ) = x∈B x∈A follows that Y Lemma 1.11 = V (I(Y )) = V ( ^ x) x∈B Therefore, U ⊆ V S x∈B x for some finite subset B ⊆ I. It [1, Theorem 2.2] [ = V (x). x∈B V (x) for some finite subset B ⊆ A. Conversely, suppose that x1 ≥ x2 ≥ · · · is a descending chain in C (L ) and consider the induced ascending chain V (x1 ) ⊆ V (x2 ) ⊆ · · · . Let Y = n S i=1 ∞ S V (xi ). By assumption, Y = i=1 V (xi ) for some n ∈ N, whence V (xn ) = V (xm ) for all m ≥ n and consequently, xn = xm for all m ≥ n by Lemma 1.8. 5. Assume that X is (countably) compact and suppose that 1 = i∈I xi where xi ∈ C (L) (and W̃ T S I is countable). It follows that 0/ = V ( i∈I xi ) = i∈I V (xi ), i.e. X = i∈I (X \V (xi )). Since S X is (countably) compact, X = j∈F (X \V (x j )) for some finite subset F of I and so 1 = W̃ j∈F x j . So, 1 is (countably) finitely constructed. The converse can be obtained similarly. √ 6. Let F ⊆ X be a closed irreducible subset. Then F = V (x) for some x ∈ L, whence x ∈ SI(C (L )) ⊆ X by Proposition 1.22. The uniqueness of the generic point is obvious. W̃ 7. This follows by Lemma 1.43. 8. This follows by applying Corollary 1.28 to (X , τ cl ) = (X , τ ). 9. Assume that X is Lindelof (compact). Since X is atomic, X = S V (p), whence the p∈Min(X) open cover {V (p) | p ∈ Min(X )} has a countable (finite) subcover for X , i.e. X = S V (p) p∈A for some countable (finite) subset A ⊆ Min(X ). Claim: Min(X ) = A. Let q ∈ Min(X ). S Since X = (V (p), we have q ∈ V (p) for some p ∈ A, whence q = p by the minimality p∈A of q. Consequently Min(X ) is countable (finite). 10. This is obtained by applying Proposition 1.15 to (X , τ cl ) = (X , τ ).  22 Theorem 2.3. Let X ⊆ L\{1} and assume that L is an X -top lattice. 1. The following are equivalent for the sublattice ˜ = 1 and x ∧ y = C ′ (L ) = {x ∈ C (L) | x∨y √ 0 for some y ∈ C (L)} of C (L ) : (a) (X , τ ) is connected. (b) If x ∈ L is such that 0/ 6= V (x) ( X , then V (x) is not open. √ √ (c) V (x) ∩ V (y) 6= 0/ for all x ∈ L such that x ∈ / { 0, 1} and for all y ∈ L such that X \V (x) ⊆ V (y). √ (d) C ′ (L ) = { 0, 1}. 2. Let (X , τ ) be T1 . Then X is singleton if and only if (X , τ ) is connected and C (L ) satisfies the complete max property. 3. If X is coatomic and Max(X ) is countable (finite), then (X , τ ) is Lindelof (compact). 4. Let X be coatomic. Then Max(X ) is singleton if and only if (X , τ ) is connected and each element in Max(X ) is completely strongly irreducible in (C (L), ∧) . 5. Let L be coatomic and Max(L) ⊆ X . Then (X , τ ) is ultraconnected if and only if L is hollow. 6. Let 0/ 6= X be atomic. Then (X , τ ) is reducible if and only if Min(X ) = I1 ∪ I2 such that V V p  ql for some ql ∈ Il and p∈I1 p  q2 for some q2 ∈ I2 . p∈I2 7. Let 0/ 6= X be atomic. Then (X , τ ) is connected if and only if for every 0/ 6= m ( Min(X ) there exists some q ∈ X such that ∧ p∈m p _ ∧ p∈Max(X)\m p ≤ q. Proof. Let X ⊆ L\{1} and assume that L is an X -top lattice. √ ˜ ′ = 1 and ˜ ′ = 1, x ∧ x′ = 0, y∨y 1. Let x, y ∈√C ′ . Then there are x′ , y′ ∈ C (L) such that x∨x ′ ′ ˜ are also in C with the corresponding y ∧ y = 0. One can check that x ∧ y and x∨y ′ ′ ′ ′ ˜ and x ∧ y respectively (recall that if L is X -top then C (L ) is distributive elements x ∨y by [1, Theorem 2.2]). The equivalence (a) ⇔ (b) is trivial. √ √ (a ⇒ c) Let x, y ∈ L be such that x ∈ / { 0, 1} and X \V (x) ⊆ V (y). It follows that V (x) ∪ V (y) = X , whence V (x) ∩V (y) 6= 0/ (otherwise, X will be disconnected). 23 √ √ (c ⇒ b) Suppose that 0/ 6= V (x) ( X is open for some x ∈ L, so that x ∈ / { 0, 1}. Let y ∈ L be such that X \V (x) = V (y). By our assumption, V (x) ∩V (y) 6= 0/ (a contradiction). √ ˜ = 1. Clearly, (c ⇒ d) Let x ∈ C ′ (L ). Then there is y ∈ C (L) such that x ∧ y = 0 and x∨y ˜ ˜ 6= 1, x and y satisfy the conditions stated in (c), whence V (x∨y) = V (x) ∩V (y) 6= 0, / i.e. x∨y which is a contradiction. (d ⇒ a) Suppose that V (x) ∪ V (y) = X , V (x) ∩ V (y) = 0/ for some x, y ∈ L, and assume without loss of generality that x, y ∈ C (L). It is easy to show that x, y ∈ C ′ (L ), and it follows by (d) that V (x) = X or V (x) = 0. / 2. Let (X , τ ) be T1 . If C (L ) satisfies the complete max property, then applying Corollary 1.28 to (X , τ ) = (X , τ cl ), we conclude that X is discrete. If X is moreover connected, then X is indeed a singleton. The converse is trivial. 3. Let X be coatomic and Max(X ) be countable (finite). Let A = {X \V (x) | x ∈ A} be an T open cover for X . Then V (x) = 0/ and so for any p ∈ Max(X ), there exists x p ∈ A such that p ∈ / V (x p ). Claim: x∈A T p∈Max(X) V (x p ) = 0. / Suppose that q ∈ coatomic, q ≤ p̃ for some p̃ ∈ Max(X ) and so p̃ ∈ It follows that X = S p∈Max(X) T T V (x p ). Since X is p∈Max(X) V (x p ), a contradiction. p∈Max(X) (X \V (x p )), i.e. {X \V (x p | p ∈ Max(X )} is a countable (finite) subcover of A for X . 4. Let X be coatomic. (⇒) Assume that Max(X ) = {p}. For all q ∈ X , q ≤ p as X is coatomic and so p is completely irreducible in the (C , ∧). Also, if X = V (x) ∪ V (y) and V (x),V (y) 6= 0, / then p ∈ V (x) ∩V (y) and so X is connected. (⇐) Suppose that |Max(X )| ≥ 2 and let Max(X ) = M′ ∪ M′′ with M′ ∩ M′′ = 0/ for some 0/ 6= M′ ( Max(X ). Set A := {p ∈ X | p ≤ q for some q ∈ M′ and p  q ∀ q ∈ M′′ }, B := X \A, x := V p and y := V p. p∈B p∈A Claim: V (x) ∩V (y) = 0. / Suppose that p̃ ∈ V (x) ∩V (y), whence y ≤ p̃ ≤ q̃ for some q̃ ∈ Max(X ). Since q̃ is comV pletely strongly irreducible, q̃ ∈ M′ : otherwise, q̃ ∈ M′′ and x = p ≤ q̃ implies that p′ M′′ p∈A ′ M . Similarly, p′ ≤ q̃ ∈ for some ∈ A, a contradiction. Hence, y ≤ q̃ ∈ since q̃ is completely strongly irreducible, q′ ≤ q̃ for some q′ ∈ B, which is a contradiction. Therefore V (x) ∩V (y) = 0, / and V (x) and V (y) are non-empty (M′ ⊆ V (x) and M′′ ⊆ V (y)) with V (x) ∪V (y) = X , whence X is disconnected. 24 5. Let L be coatomic and Max(L) ⊆ X . (⇒) Assume that X is ultraconnected. Let x, y ∈ L\{1}. Since L is coatomic, there are p, q ∈ Max(L ) ⊆ X with x ≤ p and y ≤ q, whence V (x) and V (y) are non-empty. By assumption, X is ultraconnected, whence V (x ∨ y) = V (x) ∩ V (y) 6= 0. / Hence x ∨ y 6= 1. Consequently, L is hollow. (⇐) Assume that L is hollow. Let V (x) and V (y) be non-empty closed subsets for some x, y ∈ L. Then x, y ∈ L\{1}, whence x ∨ y 6= 1 as L is hollow. Since L is coatomic, x ∨ y ≤ q for some q ∈ Max(L ) ⊆ X . Hence V (x) ∩V (y) = V (x ∨ y) 6= 0. / Therefore, X is ultraconnected. 6. Let X be reducible, i.e. X = V (x)∪V (y) for some x, y ∈ L such that V (x) ( X and V (y) ( X . Set I1 = {p ∈ Min(X ) | x ≤ p} and I2 = {p ∈ Min(X ) | y ≤ p}. √ √ V V √ p and y = p. Indeed, x  q2 for some q2 ∈ I2 : Since X is atomic, x = p∈I1 p∈I2 √ √ otherwise, x ≤ p ∀ p ∈ I2 and it follows that V (x) = X . Similarly, y  q1 for some q1 ∈ I1 . The converse is trivial. 7. Let 0/ 6= X be atomic. (⇒) Assume that X is connected. Let 0/ 6= m ( Min(X ), x := ∧ p∈m p and y = ∧ p∈Max(X)\m p. Since X is atomic, X = V (x) ∪ V (y). Since X is connected, V (x ∨ y) = V (x) ∩ V (y) 6= 0, / i.e. ∃ q ∈ X such that x ∨ y ≤ q. (⇐) Suppose that X = V (x) ∪V (y) for some x, y ∈ L. Set m′ := {p ∈ Min(X ) ∩V (x)} and m′′ := Min(X )\m′. Case 1: m′ = 0. / In this case, X = V (y). Case 2: m′ = Min(X ). In this case, X = V (x). √ √ Case 3: 0/ 6= m′ ( Min(X ). By our assumption, x ∨ y ≤ q for some q ∈ X and so √ √ √ √ V (x) ∩V (y) = V ( x) ∩V ( y) = V ( x ∨ y) 6= 0. / Consequently, X is connected.  Example 2.4. Let M be a left module over an arbitrary ring R. Consider X1 = Spec p (M) and √ X2 = Specc (M). Suppose that 0 = 0 (e.g. the Z-module Z[x]). Then the set C ′ which was described in Theorem 2.3 (1) is the set of the prime radical direct summands (resp. the coprime radical direct summands). Corollary 2.5. Let X ⊆ L\{1} and assume that L is an X -top lattice. 25 1. Let X be atomic, coatomic with |Max(X )| ≤ |Min(X )| and V (p) is open ∀ p ∈ Min(X ), then (X , τ ) is Lindelof (compact) if and only if Max(X ) is countable (finite). 2. Let X = Max(L ). Then |Max(L )| = 1 if and only if (X , τ ) is connected and C (L ) satisfies the complete max property. Proof. 1. If (X , τ ) is Lindelof, then Min(X ) is countable by Remark 2.2(10). Conversely, assume that Max(X ) is countable (finite). Let O = {X \V (x) | x ∈ A ⊆ L} be an open cover T for X , i.e. V (x) = 0/ and assume without loss of generality that V (x) 6= 0/ for each x ∈ A x∈A (If V (y) = 0/ for some y ∈ A, then {X \V (y)} is a finite subcover of X ). Pick x′ ∈ A and set M := {q ∈ Max(X ) | x′ ≤ q}. Observe that M is non-empty as V (x′ ) 6= 0/ and X is coatomic. For each q ∈ M, pick X \V (xq ) ∈ O that contains q. Claim: x′ ∨ W q∈M xq  p for each p ∈ Max(X ). Case (1): p ∈ M. In this case, x p  p and so x′ ∨ W q∈M xq  p. Case (2): p ∈ Max(X )\M. In this case, x′  p and so x′ ∨ Therefore, V (x′ ∨ W W q∈M xq  p. xq ) = 0/ and q∈M {X \V (x′ )} ∪ {X \V (xq ) | q ∈ M} is a countable (finite) subcover of O as Max(X ) is countable (finite). 2. Assume that Max(L ) = X , whence Max(X ) = X = Max(L ). It follows by Corollary 1.28 that X is T1 . So, we can use now Theorem 2.3 (2).  Theorem 2.6. Let X ⊆ L\{1} and assume the L is an X -top lattice. 1. There is a 1-1 correspondence C (L) closed sets in (X , τ ). ←→ 2. If SI(C (L )) ⊆ X , then there is a 1-1 correspondence X ←→ Irreducible closed sets in (X , τ ). 3. If SI(C (L )) ⊆ X , then there is a 1-1 correspondence Min(X ) ←→ Irreducible components in (X , τ ). 26 Proof. Since L is X -top, the set of closed sets in X is given by V = {V (y) | y ∈ L}. Define f : C (L) −→ V , x 7→ V (x); √ g : V −→ C (L), V (y) 7→ y. 1. For any x ∈ C (L) and y ∈ L, we have √ (g ◦ f )(x) = g(V (x)) = x = x; √ √ ( f ◦ g)(V (y)) = f ( y) = V ( y) = V (y). So, f provides a 1-1 correspondence C (L) ←→ V with inverse g. 2. Consider the restrictions of f to X and of g to the class of irreducible closed varieties. For every x ∈ X , the variety V (x) is irreducible by Proposition 1.15 (2). On the other hand, if √ V (y) is irreducible for some y ∈ L, then y is strongly irreducible in C (L ) by Proposition √ 1.22, whence y ∈ X by our assumption. 3. Consider the restrictions of f to Min(X ) and of g to the class of irreducible components in (X , τ ). For every x ∈ Min(X ). By (2), V (x) is irreducible. Suppose that V (x) ⊆ V (y) for some √ y ∈ L with V (y) irreducible. Since SI(C (L )) ⊆ X , it follows by (2) that y ∈ X , whence √ √ y ≤ x. However, x in minimal in X , whence x = y and V (x) = V (y). On the other hand, let A be an irreducible component in (X , τ ). Any irreducible component is closed. Moreover, I(A) is strongly irreducible in C (L ) as A is irreducible, hence I(A) ∈ X . Suppose that p ≤ I(A) for some p ∈ X . It follows that A = A = V (I(A)) ⊆ V (p) = {p}. However, V (p) is irreducible as it is the closure of a singleton, so V (p) = A as A is an irreducible component. So, p = I(A). Consequently, I(A) ∈ Min(X ).  Example 2.7. The first correspondence (C (L (M)) ←→ closed sets in (X , τ )) of Theorem 2.6 holds for any X ⊆ L (M)\{M} such that L is X -top, as well as for any X ⊆ L (M)\{0} such that L is dual X -top. So, this result recovers [2, 4.12 and 5.16], [3, 3.27] and [4, 3.23] as special cases. The following table summarizes some of the results we obtained in this section. Some of them generalize results in the literature on Zariski-like topologies for left modules over associative rings, which can be recovered now as special cases. At several occasions, our results were obtained under conditions and assumptions weaker than those in the corresponding results in the literature. 27 Assumption & location X -top lattice L (X , τ ) Results recovered Proposition 1.26 Max(X ) = X T1 [2, 4.27, 5.33], [3, 3.45]) C (L ) ACC C (L ) ACC C (L ) ACC C (L ) DCC Each set in X is compact Proposition 1.45 Remark 2.2 (3) Proposition 1.45 Remark 2.2 (4) Noetherian satisfies the Theorem 2.3 (1) Corollary 1.23 Corollary 1.23 Corollary 1.23 SI(C (L )) (2.6) ⊆ X √ SI(C (L )) (2.6) ⊆ X √ Max(L ) = X and C (L ) satisfies the complete max property (2.3 (2)) [2, 4.12, 5.16]) Each open set in X is compact satisfies the Artinian [2, 4.12, 5.16] Every closed cover for any subset of X has a finite subcover Max(X ) = X and C (L ) satisfies the complete max property √ C ′ = { 0, 1} I(A) ∈ SI(C (L )) I(A) is irreducible in √ C (L ) 0 is irreducible in C (L ) Theorem 1.27 Remark 2.2 (5) satisfies the C (L ) satisfies the DCC Remark 2.2 (4) Remark 2.2 (5) satisfies the Discrete [2, 4.28, 5.34], [3, 3.46], [1, 4.33]) Connected A ⊆ X is irreducible [3, 3.30, 3.31] A ⊆ X is irreducible [3, 3.30, 3.31] irreducible [3, 3.30, 3.31] x∈X V (x) is irreducible x ∈ Min(X ) V (x) is irreducible component |Max(X )| = 1 [2, 4.17, 5.22], [2, 3.27], [3, 3.33], [10, 3.6], [1, 4.28] [2, 5.22], [2, 4.17], [3, 3.27], [3, 3.33], [1, 4.28] Connected 1 is finitely constructed 1 is countably constructed Compact Lindelof Table 2: Examples on the Interplay between topological properties of (X , τ ) and algebraic properties of the X − top lattice L 28 Lemma 2.8. Let R be a ring and M a top p-module, that is L := LAT (R M) is Spec p (M)-top. Then SI(C (LAT (M))) ⊆ Spec p (M). Proof. Let N be strongly irreducible in C (L ). Suppose that IK ⊆ N for some ideal I ≤ R and a submodule P ∈ V (N), whence IM ⊆ P or K ⊆ P √ IK ⊆ P for any√prime submodule √ √ K ≤ M. Then IM ⊆ P or K ⊆ P, whence IM ∩ K ⊆ P for all P ∈ V (N). Since √ N is radical, and so √ √ IM√ ∩ K ⊆ N. By assumption, N is strongly irreducible in C (L ), whence IM ⊆ IM ⊆ N or K ⊆ K ⊆ N. Therefore, N ∈ Spec p (M).  Example 2.9. Let R be a ring and M a top p-module. By Lemma 2.8, we have SI(C (LAT (R M))) ⊆ Spec p (M). So, all the 1-1 correspondences in Theorem 2.6 hold for this special case. Behboodi and Haddadi proved the second correspondence in [10, Corollary 3.6]. Example 2.10. Let R be a ring and R M a left topc-module (i.e. L = LAT (R M) is X -top, where X = Specc (M)). If R M is completely distributive, then SI(C (L )) ⊆ X by [2, Proposition 5.19] and the 1-1 correspondences of Theorem 2.6 hold. In [2, Proposition 5.22], these correspondences were proved under the additional condition that every coprime submodule of M is strongly irreducible. Example 2.11. Let R be a ring and R M a left tops-module (i.e. L = LAT (R M) is dual X -top, where X = Specs (M)). By [2, Proposition 4.14], SH(H (L )) ⊆ X and so the 1-1 correspondences of Theorem 2.6 hold. These were proved in this special case in [2, Proposition 4.17] under the additional condition that every second submodule of M is strongly hollow. Example 2.12. Let R be a ring and R M a left top f p-module (i.e. L = LAT (R M) is X -top, where X = Spec f p (M)). If R M is duo, then SI(C (L )) ⊆ X by [3, 3.30] and the 1-1 correspondences of Theorem 2.6 hold. These were also obtained under the same condition in [3, Proposition 3.33]. Example 2.13. Let R be a ring and R M a left top f c -module (i.e. L = LAT (R M) is dual X top, where X = Spec f c (M)). If R M is duo, then SH(H (L)) ⊆ X by [4, Proposition 3.25] and Proposition 1.22 and the 1-1 correspondences of Theorem 2.6 hold. These were also obtained under the same condition for this special case in [4, Proposition 3.28]. Example 2.14. Let R be a ring and R M a left top f -module (i.e. L = LAT (R M) is dual X -top, where X = Spec f (M)). If R M has the property that H(A) is first whenever A is irreducible, then SH(H (L)) ⊆ X and so the 1-1 correspondences of Theorem 2.6 hold. This was proved under the same condition in [1]. Example 2.15. Let R be a PID with an infinite number of non-zero prime ideals (e.g. R = Z), L := Ideal(R), X = Max(R) and consider the topological space (X , τ ). √ / X and so X is 1. X = V (0) is irreducible since 0 is strongly irreducible. However, 0 = 0 ∈ not sober by Remark 2.2 (7), whence not spectral. 29 2. X is T1 as Max(X ) = X . 3. X is cofinite: consider a closed set 0/ 6= V (I) ( X , where I = (a) for some a ∈ R\{0}. Since R is a PID, the unique prime factorization of a implies that I is contained in a finite number of primes, i.e. V (I) is finite. 4. X is not regular, not T2 , and not normal. Observe that X is infinite and cofinite, so it does not have disjoint non-empty open sets, although it has disjoint non-empty closed sets. Example 2.16. Let R be a ring, M a left R-module, X ⊆ LAT (R M)\{M} (resp. X ⊆ LAT (R M)\{0}) and assume that L := LAT (R M) is X -top (resp. dual X -top). If C (L ) is uniform (resp. H (L ) is hollow), then (X , τ ) (resp. (X , τ 0 )) is connected by Theorem 2.3 (1). Example 2.17. Let R be a commutative domain, L := Ideal(R), X ⊆ Ideal(R)\{R} (resp. X ⊆ √ Ideal(R)\{0}), and assume that L is X -top (resp. L is dual X -top). If 0 = 0 (resp. ∑ p = R), p∈X Then (X , τ ) (resp. (X , τ 0 )) is connected. Example 2.18. Let R be a UFR with zero devisors. Consider L := Ideal(R), X := Spec(R) (the prime (e.g. R = Zn [x] with n not prime). Notice √ √spectrum of R) and assume that Min(X ) is infinite T q, but this is impossible as that 0 = 0 (since Min(X ) is infinite, if 0 6= x ∈ 0 then x ∈ p∈Min(X) R is a UFR). • (X , τ ) is connected by Theorem 2.3 (7). Claim: the intersection of any infinite collection of minimal elements of X is zero. SupT pose that 0 6= I := q for some infinite subcollection m′ of Min(R). For any x ∈ I\{0}, q∈m′ we have x = p1 · · · pn where p1 , · · · , pn are prime elements of R. Notice that p1 , · · · , pn ∈ I. For every q ∈ m′ , we have q = (pi ) for some i ∈ {1, 2, · · · , n}, whence m′ is finite (a contradiction). • (X , τ ) is reducible by Remark 2.2 (1). To prove this, suppose that (X , τ ) is irreducible √ and that√I ∩ J = 0√for some J ≤ R. J) = V (I) ∪ V (J) = V ( I) ∪ √ ideals I, √ √ Then√V (0) = V (I ∩√ V ( J) = V ( I ∩ J), whence I ∩ J = 0 = 0. Since 0 ∈ SI(C (L )) (by Remark √ √ 2.2 (1)), it follows that I = I = 0 or J = J = 0, whence R is a domain, a contradiction. Example 2.19. Let (G, +) be a group and set L := {H | H E G is a normal subgroup of G}, X := {H | H E G is a finite normal subgroup of G}\{G}. Notice that L = (L, ∩, +, G, 0) is a complete lattice endowed with T Ni . i∈I 30 W i∈I Ni := ∑ Ni and i∈I V i∈I Ni := 1. C (L) = X ∪ {G} as the intersection of any non-empty family of finite normal subgroups is a finite normal subgroup. 2. SI(C (L )) ⊆ X and so all the 1-1 correspondences of Theorem 2.6 hold. √ 3. 0 = 0 ∈ X and so (X , τ cl ) is irreducible and connected (observe that {0} = X and {0} is irreducible). 4. C (L ) satisfies the DCC but need not satisfy the ACC (e.g. a p-quasicyclic group [19]). 5. SI(C (L )) = X if and only if L is an X -top lattice. 6. If L is X -top, then the intersection of any nonzero elements in X is nonzero. 7. By Corollary 1.28: (X , τ cl ) is T1 ⇔ (X , τ cl ) is a singleton ⇔ (X , τ cl ) is T2 ⇔ (X , τ cl ) is discrete. 8. Suppose that L is an X -top lattice and (X , τ cl ) is compact with each element in G having a finite order. Then G is a finite p-group for some prime p. Indeed, since X is compact, by Theorem 2.3 (5), G is finitely constructed. But G is the union of all proper cyclic subgroups, say G = ∑ Hi . Then G = ∑ H j where F is a finite subset of I. Hence G is i∈I j∈F finite. Consequently, the Prüfer group is not X -top (X is the set of all proper subgroups) as it is infinite. Example 2.20. Let (G, +) be a group, Z(G) the center of G and set L := {H | H E G is a normal subgroup of G}, X := {H | H ≤ Z(G)}\{G}. Notice that L = (L, ∩, +, G, 0) is a complete lattice with W i∈I Ni := ∑ Ni and i∈I V i∈I Ni := T Ni . i∈I 1. C (L) = X ∪ {G} as the intersection of any non-empty family of subgroups of the center is again in the center. 2. SI(C (L )) ⊆ X and so all correspondences of Theorem 2.6 hold. √ 3. 0 = 0 ∈ X and so (X , τ cl ) is irreducible and connected. 4. By Corollary 1.28: (X , τ cl ) is T1 ⇔ (X , τ cl ) is singleton ⇔ (X , τ cl ) is T2 ⇔ (X , τ cl ) is discrete. 5. SI(C (L )) = X ⇔ L is X -top. Hence, if L is an X -top lattice, then the intersection of any distinct nonzero subgroups in X is nonzero. 6. If G is finite, then (X , τ cl ) is spectral by Remark 1.41. 31 7. Suppose that L is an X -top lattice and (X , τ cl ) is compact with each element in G having a finite order. Then G is a finite p-group for some prime p. 8. X is coatomic and Z(G) is the unique maximal element of X . 9. If L is X -top, then X is compact as X is coatomic and Max(X ) is finite (by Theorem 2.3 (3)). Example 2.21. Let (G, +) be a group, Z(G) the center of G and set L := {H | H E G is a normal subgroup of G}, X := {H | H ≤ Z(G) is finite }\{G}. Notice that L = (L, ∩, +, G, 0) is a complete lattice with W Ni := ∑ Ni and i∈I i∈I V i∈I Ni := T Ni . i∈I 1. C (L) = X ∪ {G} as the intersection of any non-empty family of finite subgroups of the center is again finite and in the center. 2. SI(C (L )) ⊆ X and so all correspondences of Theorem 2.6 hold. √ 3. 0 = 0 ∈ X and so (X , τ cl ) is irreducible and connected. 4. By Corollary 1.28: (X , τ cl ) is T1 ⇔ (X , τ cl ) is singleton ⇔ (X , τ cl ) is T2 ⇔ (X , τ cl ) is discrete. 5. SI(C (L )) = X ⇔ L is X -top. Hence, if L is an X -top lattice, then the intersection of any distinct nonzero subgroups in X is nonzero and so X can only be {0} or a collection of psubgroups for some fixed prime p. Otherwise, H ∈ X has order pn qm l with primes p and q not dividing l and so by the Sylow Theorem [19, Theorem 5.2] there is a Sylow p-subgroup K1 of order pn and a Sylow q-subgroup K2 of order qm . By Lagrange’s Theorem [19, Theorem 1.26], the order of their intersection must divide pn and qm and so the intersection must be zero, whereas K1 and K2 are nonzero elements of X . The uniqueness of p is clear also by Lagrange’s Theorem. 6. If G is finite, then (X , τ cl ) is spectral by Remark 1.41. 7. Suppose that L is an X -top lattice and (X , τ cl ) is compact with each element in G having a finite order. Then G is a finite p-group for some prime p. 8. X is coatomic and Z(G) is the unique maximal element of X . 9. If L is X -top, then X is compact as X is coatomic and Max(X ) is finite (by Theorem 2.3 (3)). 32 References [1] J. Abuhlail and Christian Lomp, On topological lattices and an application to module theory, Journal of Algebra and its Applications 15 (3), Article Number: 1650046 (2016). 2, 3, 5, 9, 12, 20, 22, 23, 28, 29 [2] J. Abuhlail, Zariski topologies for coprime and second submodules, Algebra Colloquium 22 (1), 47-72 (2015). 2, 3, 6, 7, 9, 10, 12, 13, 14, 20, 27, 28, 29 [3] J. Abuhlail, A Zariski topology for modules, Comm. Algebra 39 (11), 4163-4182 (2011). 2, 3, 6, 7, 9, 10, 12, 13, 14, 20, 27, 28, 29 [4] J. Abuhlail, A dual Zariski topology for modules, Topology and its Applications 158 (3) (2011) 457-467. 2, 3, 6, 9, 12, 20, 27, 29 [5] J. Abuhlail, A Zariski topology for bicomodules and corings, Applied Categorical Structures 16 (1-2), 13-28 (2008). 2 [6] J. Abuhlail, Fully coprime comodules and fully coprime corings, Applied Categorical Structures (Special Issue: Categorical Methods in Hopf Algebras) 14 (5-6), 379-409 (2006). 2 [7] J. Abuhlail and Christian Lomp, On the notion of strong irreducibility and its dual, Journal of Algebra and its Applications, 12 (6), Article Number: 1350012 (2013). 2, 4 [8] S. Annin, Associated and attached Primes over Noncommutative Rings, Ph.D. Dissertation, University of California at Berkeley (2002). [9] M. Atiyah and I. Macdonald, Introduction to Commutative Algebra, Addison-Wesley Publishing Co., Reading, Mass.-London-Don Mills, Ont. (1969). 2 [10] M. Behboodi and M. R. Haddadi, Classical Zariski topology of modules and spectral spaces, Int. Elec. J. Algebra 4, 104-130 (2008). 2, 6, 7, 8, 17, 20, 28, 29 [11] M. Behboodi and M. R. M. Haddadi, Classical Zariski topology of modules and spectral spaces, II, Int. Elec. J. Algebra 4, 131-148 (2008). 2, 15, 16, 17, 20 [12] N. Bourbaki, General Topology, Part I, Addison-Wesley (1966). 6 [13] J. Dauns, Prime modules, J. Rein. Ang. Math. 298, 165-181 (1978). 12 [14] G. Gratzer, Lattice Theory: Foundations, Birkhäuser (2010). 3 [15] M. Hochster, Prime ideal structure in commutative rings, Trans. Amer. Math. Soc. 142, 43-60 (1969). 3, 14 [16] R. L. McCasland and P. F. Smith, Zariski spaces of modules over arbitrary rings, Comm. Algebra 34 (11), 3961-3973 (2006). 2 33 [17] R. McCasland, M. Moore and P. Smith, On the spectrum of a module over a commutative ring, Comm. Algebra 25, 79-103 (1997). 2 [18] J. Munkres, Topology: A First Course, second edition, Prentice Hall, Upper Saddle River, NJ07458. (2000). 11 [19] J. S. Milne, Group Theory, (2013). 31, 32 [20] S. Yassemi, The dual notion of prime submodules, Arch. Math. (Brno) 37 273-278 (2001). [21] I. Wijayanti, Coprime modules and comodules, Ph.D. Dissertation, Heinrich-Heine Universität, Düsseldorf (2006). 2 [22] R. Wisbauer, Foundations of Module and Ring Theory. A Handbook for Study and Research, CRC Press, (1991). 34
0math.AC
Comprehending Real Numbers: Development of Bengali Real Number Speech Corpus Md Mahadi Hasan Nahid*,1 , Md. Ashraful Islam *,2 , Bishwajit Purkaystha*,2 , and Md Saiful Islam*,1 arXiv:1803.10136v1 [eess.AS] 27 Mar 2018 * Department of Computer Science and Engineering Shahjalal University of Science and Technology, Sylhet-3114. *,1 {nahid-cse,saiful-cse}@sust.edu *,2 {ashrafulcse.sust, bishwa420}@gmail.com Abstract Speech recognition has received a less attention in Bengali literature due to the lack of a comprehensive dataset. In this paper, we describe the development process of the first comprehensive Bengali speech dataset on real numbers. It comprehends all the possible words that may arise in uttering any Bengali real number. The corpus has ten speakers from the different regions of Bengali native people. It comprises of more than two thousands of speech samples in a total duration of closed to four hours. We also provide a deep analysis of our corpus, highlight some of the notable features of it, and finally evaluate the performances of two of the notable Bengali speech recognizers on it. 1 Introductions Automatic Speech Recognition (ASR) capability of machines is very important as it reduces the cost of communication between humans and machines. The recent resurgence in ASR [1, 2] is significant and due to the large recurrent neural networks [3]. The neural networks are most useful when they have large datasets. The improvement in automatic speech recognition is not reflected in Bengali literature. This is due to a lack of comprehensive corpus in the literature. There are few corpora in the literature [4], but they are not comprehensive, meaning that they do not encompass all the possible words in a specific portion of the literature. In this paper, we address this issue by describing the development of a Bengali speech corpus which encompasses all possible words that may appear in a Bengali real number. We call our corpus “Bengali real number speech corpus”. This corpus was developed to cover all the words that could possibly involve in any Bengali real number. The corpus comprises the speeches of several Bengali native speakers from different regions. The summary of our corpus is given in Table 1. One of the limitations of our corpus is that its speakers are all male speakers and the standard deviation in the ages of the speakers is relatively small. The vocabulary of the corpus, mentioned in Table 1, contains all the Bengali numbers from zero to hundred. Each number from zero to hundred in Bengali is uttered in a singular way, except for the number ‘45’. It is uttered as both ‘/p/o/y/t/a/l/l/i/sh’ and ‘/p/o/y/ch/o/l/l/i/sh’. Therefore, 102 words in our vocabulary stand for number 0 to number 1 Table 1: Bengali real number audio corpus summary Number of speakers Age range Number of speech samples Duration Vocabulary size Number of distinct phonemes Average number of words per sample 10 20-23 years 2302 samples 3.79 hours 115 words 30 ≈ 8 words Table 2: Special twelve words # 1 2 3 4 5 6 7 8 9 10 11 12 13 Bengali word English correspondence One hundred Two hundred Three hundred Four hundred Five hundred Six hundred Seven hundred Eight hundred Nine hundred Thousand Lakh Crore Decimal Bengali utterance ekSho duiSho tinSho charSho pachSho choySho satSho aTSho noySho hajar lokSho koTi doShomik 100. The details about the rest of twelve words are given in Table 2. All the words involved in uttering any Bengali real number fall to either the category of first 102 words or to the category of the words mentioned in Table 2. The main motivation behind this work was to develop a balanced corpus, meaning that all unique words would occur with more or less an equal probability. This will be useful for any learning method modeling the speech samples, but this may be a shortcoming in terms of representing the actual prior probabilities of occurring the individual words. The prior probabilities were not considered because we did not have any authentic information about them. The rest of the paper is organized as follows. In Section 2, we describe how we have developed the corpus. In the same section we also describe some key features of our corpus. In the next section, Section 3, we evaluate two methods of automatic speech recognition on our corpus. And finally, in Section 4, we draw the conclusion to our paper. 2 Development of Bengali Real Number Speech Dataset In this section, we give a detailed description of our development process and some key features of it. 2 2.1 Data Preparation We developed the corpus in two steps. At first, we had to decide what real numbers should be present in the dataset. Therefore, we generated individual random strings containing the Bengali real numbers. We had also generated some strings that did not contain the real numbers, rather, they only contained sequences of numbers (like, “One Two Three ... Ten”). The algorithm of generating the strings is given in Algorithm 1. Algorithm 1 String generation algorithm 1: procedure StringGeneration 2: w1 ← list of each word for numbers from 0 to 99 . size = 101 3: w2 ← list of each word for numbers {100,200,300, ..., 900} . size = 9 , , } . {hundred, thousand, lakh, crore} 4: w3 ← { , 5: w4 ← { } . {decimal} 6: N ← total number of strings to generate 7: counter ← 0 8: S ← {} . final set of generated strings to return 9: loop outer : 10: L ← rand(2, 4) . a random integer in range [2,4] 11: L←L×2 . the string will have 4 to 8 words 12: i←0 13: s ← “” . generated string in this iteration 14: loop inner : 15: i←i+2 16: r1 ← rand(1, 14) 17: if r1 > 1 then 18: s ← s + w1 [rand(1, len(w1 ))] 19: else 20: s ← s + w2 [rand(1, len(w2 ))] 21: end if 22: r2 ← rand(1, 7) 23: if r2 ≤ 6 or i = L then . the utterance should not end in ‘decimal’ 24: s ← s + w3 [rand(1, len(w3 ))] 25: else 26: s ← s + w4 [rand(1, len(w4 ))] 27: end if 28: if i < L then 29: goto loop inner 30: add s to S 31: counter ← counter + 1 32: if counter < N then 33: goto loop outer 34: end if 35: return S In the algorithm, we made two clusters (i.e., {w1 , w2 } and {w3 , w4 }) to comprehend all the words in the vocabulary. We constricted the length of the strings to be either four, or six, or eight. A string can be logically split into a number of groups (depending on the length of the string) where each group has exactly two words. The first word comes from either w1 or w2 and the last word comes from either w3 or w4 . This reflects the real world scenario. The 3 word ‘decimal’ does not appear as the final word in the sentence, so we have restricted it from appearing as the final word in line number 23 in the algorithm. Thus, we have generated the strings for our corpus. All the generated strings are grammatically valid, but still, there can be a very few strings which are semantically invalid. For example, a semantically invalid string ’. For such strings, we have also incorporated them in our corpus may be like: ‘ as these strings should not impede the learning process of a recognizer. After generating the strings, a set of different recording environments was set. This included lab rooms, class rooms, closed rooms, and etc. The noise in the environment was kept to a minimum level. The volunteers were given the scripts (which contained the randomly generated strings) and were asked to read out in front of a microphone. Their speeches were recorded and filtered using a band-pass filter with the cutoff frequencies 300 Hz and 3 KHz. Finally, we stored the filtered speech samples in “.wav” file format with the original bit rate of 256 kbps. A sample speech, in its final representation, is shown in Figure 1. Figure 1: Contents of file speaker 1 1.wav 2.2 2.2.1 Data Organization Transcripts of the Speech Samples Although we have mentioned before that we had not taken actual prior probabilities into account, but still we made sure that any impossible combination of the words does not occur. never occurs at the beginning of any speech sample throughout the For example, the word corpus. Figure 2 shows a snapshot of the contents of text-data.txt file of the corpus. This file Figure 2: Transcript file: text-data.txt contains transcripts of all the speech samples. Each line contains the transcript of one speech sample. Each line has mainly two important parts. The actual content contained in the audio file is transcribed within the <s></s> tag as shown in the figure. The second part contains a unique identifier in the format: speaker {1-10} {1-}. The first two parts of the identifier in this format describe whose voice it is (i.e., there are ten speakers in the corpus) whereas the remaining part denotes the recorded file number of that speaker. For example, the second line 4 Table Bengali word COUShoTTi Ek Ekotrish UnoShaT choy hajar poyCollish poytallish teish teppanno 3: Mapping of the words to the phonemes Corresponding phonemes English correspondence C OU SH O T T I 64 EK 1 E K O T R I SH 31 U N O SH A T 59 CH O Y 6 HAJAR Thousand P OY C O L L I SH 45 P OY T A L L I SH 45 T E I SH 23 TEPPANNO 53 of Figure 2 transcribes the speech (of the first speaker) contained in the seventeenth file. This text file may be used as the labels for the speech samples. 2.2.2 Dictionary of Words to Phonemes Individual words (i.e., 115 unique words) were mapped to a set of phonemes according to the rules prescribed in a file “asr avro.dic”. These rules follow the popular avro phonetic method. We recognized thirty individual Bengali phonemes which were necessary for constructing individual words in the speech samples. A few examples from the dictionary of matches of the individual words to their corresponding phonemes are given in Table 3. This phoneme list is only a supplementary to our data corpus; one can have their own list of phonemes to interpret the sentences corresponding to the speech samples. In our interpretation of the phonemes, the data corpus contains a total of 126,776 phonemes. The frequency of each of the phonemes is given in Table 4. 2.2.3 Organization of the Audio Samples The speech samples are organized into an appropriate structure. Each speech sample is under a directory whose name is the unique identifier for that speaker. In other words, each speaker has a dedicated directory for all the speech samples attributed to him. The audio files have an “.wav” extension. For example, the twenty first speech sample of the fifth speaker has the name “speaker 5 21.wav”. The information about the speech contained in the sample is in “text-data.txt” file as described in Section 2.2.1. 2.3 Characteristics of the Data Corpus In this section, we discuss some of the important characteristics of the corpus which provide a more important insight to the dataset. The dataset has 2302 examples, and 17,582 words in total. The transcripts to all the speech samples span 155,908 characters (without the spaces). Our data corpus has more longer words (i.e., the words that have seven or more characters comprise 36% of the whole dataset) as compared to the shorter words (i.e., the words that have three or less characters comprise 24% of the whole dataset). Interestingly, no real number in Bengali language utters phonemes ‘M’, ‘BH’, ‘GH’, ‘PH’ (or ‘F’). This is the reason why these phonemes have not appeared in Table 4. Another observation is that there is a significant amount of disproportions in the frequencies of phonemes (e.g., the 5 Table 4: The phoneme list and their frequency in the corpus Phonemes Occurrences Normalized frequency (%) A 13,943 10.80 AI 193 0.15 4,452 3.51 B C 3,228 2.55 CH 950 0.75 D 491 0.39 7,238 5.71 E 419 0.33 G 12,212 9.62 H I 8,603 6.76 J 1,716 1.35 4,931 3.89 K KH 1,644 1.30 3,715 2.93 L 4,477 3.53 N NG 307 0.24 O 11,546 9.11 1,357 1.07 OI OU 344 0.27 623 0.49 OY P 4,078 3.22 R 7,740 6.11 S 8,235 6.50 SH 9,152 7.22 11,646 9.19 T TH 205 0.16 U 2,031 1.60 Y 623 0.49 YA 870 0.69 6 phoneme ‘A’ has a normalized frequency 10.8% while the phoneme ‘AI’ has 0.15%). This is a limitation of our data corpus, and therefore, any method that would train on this dataset has to pay a significant attention to this discrepancy. As we were not biased to any phoneme while building the dataset, yet such disproportions arose, it can be inferred that the disproportions of the phonemes exist in the language itself. 3 Two Speech Recognizers Figure 3: Error rates incurred by CMU-Sphinx4 model with the respect to different durations of the corpus. The word error rates are smaller as compared to the sentence error rate because of shorter length dependency modeling. In this section, we describe the findings of the experiments undergone with two Bengali speech recognizers [5, 6]. These two recognizers had been developed for recognizing Bengali real numbers. The ideas and methods of these two recognizers are very different. To analyze and evaluate these two recognizers we need two types of error metrics; the first one is the word detection error rate (Ew ) and the second one is the phoneme detection error rate (Ep ). In our experiment we define them as follows: #mismatches in phonemes #total phonemes #mismatches in words Ew = #total words Ep = (1) (2) The first recognizer uses a popular recognizer CMU Sphinx 4 [7] which employs a hidden markov model (HMM). This model has been trained on our corpus with different durations of the dataset and the error rates are shown in Figure 3. These error rates are incurred when the 7 training and the test data are the same. Finally, with different training and test data (with a 80:20 ratio for training and test purposes respectively) this model incurs a 15% word error rate. Figure 4: The LSTM model’s learning process with respect to the length of training period. The second recognizer tries to recognize the speech samples by dividing them into a number of frames. It is actually a bidirectional long short term memory (LSTM) (a recurrent neural network) that does sequence learning, and has a post-processing algorithm to produce a final output. However, it can only recognize the individual words, not the entire sentence. The hourly training progression is given in Figure 4. In this figure, the error rates in individual phonemes are also given. The word detection error rate improves after the initial couple of hours because of the post-processing algorithm. Finally, the recognizer incurred a 13.2% word detection error rate and a 29% phoneme detection error rate. 4 Conclusion In this paper, we described the development of Bengali real number audio corpus that comprises of all possible words involving any Bengali real number. The major contribution of our corpus is that it comprehends a great combination of Bengali real numbers. We also provided a brief analysis of our corpus and highlighted some of the key features of it. We have also performed experiments with two methods on our corpus and evaluated their performances. On a future note, we would like to extend our corpus with more combinations of words, and with an increased and balanced number of male and female speakers. References [1] Chan, W., Jaitly, N., Le, Q., & Vinyals, O. (2016, March). Listen, attend and spell: A neural network for large vocabulary conversational speech recognition. In Acoustics, Speech 8 and Signal Processing (ICASSP), 2016 IEEE International Conference on (pp. 4960-4964). IEEE. [2] Graves, A., & Jaitly, N. (2014, January). Towards end-to-end speech recognition with recurrent neural networks. In International Conference on Machine Learning (pp. 17641772). [3] Zaremba, W., Sutskever, I., & Vinyals, O. (2014). Recurrent neural network regularization. arXiv preprint arXiv:1409.2329. [4] Alam, F., Habib, S. M., Sultana, D. A., & Khan, M. (2010). Development of annotated Bangla speech corpora. In Spoken Languages Technologies for Under-Resourced Languages. [5] Nahid, M. M. H., Islam, M. A., & Islam, M. S. (2016, May). A noble approach for recognizing Bangla real number automatically using CMU Sphinx4. In Informatics, Electronics and Vision (ICIEV), 2016 5th International Conference on (pp. 844-849). IEEE. [6] Nahid, M. M. H., Purkaystha, B., & Islam, M. S. (2017, December). Bengali speech recognition: A double layered LSTM-RNN approach. In Computer and Information Technology (ICCIT), 2017 20th International Conference of (pp. 1-6). IEEE. [7] Walker, W., Lamere, P., Kwok, P., Raj, B., Singh, R., Gouvea, E., ... & Woelfel, J. (2004). Sphinx-4: A flexible open source framework for speech recognition. 9
2cs.AI
Algebras of conjugacy classes related to symmetric groups arXiv:1604.05755v2 [math.GR] 19 Jan 2018 Yu.A.Neretin1 In 1999 V. Ivanov and S. Kerov observed that structure constants of algebras of conjugacy classes of symmetric groups Sn admit a stabilization (in a non-obvious sense) as n → ∞. We extend their construction to a class of pairs of groups G ⊃ K and algebras of conjugacy classes of G with respect to K. In our basic example G is a product of symmetric groups, G = Sn × Sn , K is the diagonal subgroup Sn . 1 Introduction 1.1. Notation. 1) Denote by #A the number of elements of a set A. Denote by Jn the set Jn = {1, 2, . . . , n} ⊂ N. Let Y be a finite or countable set. Denote by S(Y ) the group of all finitely supported permutations of Y . By Sn we denote the group of permutations of Jn , by S∞ the group S(N). We regard groups Sn as subgroups in S∞ . 2) Let G be a group, K ⊂ G a subgroup. Denote by K \ G/K the set of double cosets of G with respect to K, i.e., the quotient of G with respect to the equivalence relation g ∼ h1 gh2 , where g ∈ G, h1 , h2 ∈ K. Denote by G//K the set of conjugacy classes of G with respect to K, i.e., the quotient of G with respect to the equivalence relation g ∼ hgh−1 , where g ∈ G, h ∈ H. e consisting of elements (h, h) ∈ Consider the group G×K and the subgroup K G × K, where h ranges in K. We have a canonical identification e \ (G × K)/K e ≃ G//K. K Indeed, let (g, h) ∈ G × K. The corresponding double coset contains (g, h)(h−1 , h−1 ) = (gh−1 , 1) and also all elements of the form 1 Supported  (r, r)(gh−1 , 1)(r−1 , r−1 ) = r(gh−1 )r−1 , 1 . by the grant FWF, P28421. 1 For a group G consider its multiples G(m) = G × · · · × G (m times), let diag(G) = diagm (G) ⊂ G(n) denote the diagonal, i.e., the set of all tuples (g, . . . , g) ∈ G(m) . We have obvious identifications diag2 (G) \ (G × G)/ diag2 (G) ≃ G//G; diag3 (G) \ (G × G × G)/ diag3 (G) ≃ (G × G)// diag2 (G), etc. 3) For a finite group G denote by C(G) the group algebra of G, we denote the convolution by ∗. For f ∈ C(G) denote by f ⋆ the function f ⋆ (g) := f (g −1 ). Clearly f → f ⋆ is an anti-involution of the group algebra (f1 ∗ f2 )⋆ = f2⋆ ∗ f1⋆ , (f ⋆ )⋆ = f. Denote by C(K \ G/K) (resp. C(G//K)) the subalgebras of the group algebra consisting of functions that are constant on double cosets (resp. conjugacy classes), these subalgebras are closed with respect to the anti-involution. e be as above. We have an obvious isomorphism Let K  e \ (G × K)/K e , C(G//K) ≃ C K i.e., convolution algebras of conjugacy classes are special cases of algebras of double cosets. 1.2. Bibliographical remarks on algebras of double cosets and their infinite-dimensional degenerations. Formally, this subsection is not necessary, however here we explain origins and purposes of this work. Let ρ be a unitary representation of a finite group G in a space V , denote by the same symbol ρ the corresponding representation of the group algebra. Denote by V K the subspace of all K-fixed vectors, by (V K )⊥ its orthocomplement. The convolution algebra C(K \ G/K) acts in V = V K ⊕ (V K )⊥ by operators of block form  ′  ρ (f ) 0 ρ(f ) = . 0 0 Thus for any representation ρ of G we have a representation ρ′ of C(K \ G/K) in V K . It can be easily shown that if ρ is irreducible and V K 6= 0, then ρ′ ’remembers’ ρ. For this reason convolution algebras became tools of investigation of representations. We recall some well-known examples. 1) Hecke algebras (Iwahori [11]). Let G be the group GL(n, Fq ) of all invertible matrices over a finite field Fq and K be the group of upper-triangular matrices. These algebras admit relatively explicit descriptions and an interpolation in q (for q = 1 we get C(Sn )). They can live their own lives independently of the group GL(n, Fq ), see, e.g., [3]. 2 There are some widely explored examples of convolution algebras related to locally compact groups (in this case K must be compact). 2) Let G be a reductive Lie group and K its maximal compact subgroup. Algebras C(K \ G/K) were widely explored in classical representation theory of Lie groups at least after Gelfand [6], notice that even C SO(2)\SL(2, R)/SO(2) is a nontrivial object, see, e.g., [13]. 3) Affine Hecke algebras (Iwahori, Matsumoto [12]). Let Qp be a p-adic field, Op be the ring of p-adic integers. Let G be the group GL(n, Qp ), and K be the Iwahori subgroup. Recall that the Iwahori subgroup is a subgroup on GL(n, Op ) consisting of matrices whose elements under the diagonal are contained in pOp . Such algebras C(K \ G/K) also admit an interpolation in p and can live their own lives. These examples have extensions, however in all these cases subgroups K are quite large in G, for smaller subgroups algebras of double cosets usually seem to be too complicated. It appears that for infinite-dimensional groups double coset spaces K \ G/K often admit a natural structure of a semigroup, and for each unitary representation of G this semigroup acts in the subspace of K-fixed vectors. First example of such semigroup was discovered by Ismagilov in [9]. Many cases were examined by Olshansky [20], [21], he showed that semigroups K \ G/K allow explicit descriptions in some cases when their finite-dimensional counterparts seem non-handable. In [15] it was observed that existence of such semigroup structures is a relatively general phenomenon. In [16]–[19], [4] descriptions of such semigroups were proposed on a quite general setting. One of basic examples in [18] was G = S∞ × S∞ × S∞ and K being a subgroup in the diagonal S∞ fixing points 1, 2, . . . , α ∈ N. The present paper is an attempt to look from infinity to finite objects. We present a kind of description (or quasi-description) of a family of convolution semigroups related to symmetric groups, our basic example is     C diag3 (Sn ) \ (Sn × Sn × Sn )/ diag3 (Sn ) ≃ C (Sn × Sn )// diag2 (Sn ) . We use arguments of Ivanov and Kerov [10] who observed that the algebras C(Sn //Sn ) admit a stabilization (in a non-obvious sense) as n → ∞. 1.3. Conjugacy classes of Sj × Sj with respect to the diagonal. Denote Gj := Sj × Sj , Kj := diag2 (Sj ). For g, h, r, . . . ∈ ∞ a j=0 3 Gj denote by g, h, r, ...∈ ∞ a Gj //Kj j=0 the corresponding conjugacy classes. Let j 6 N and g ∈ Gj . Denote by ge the corresponding element of GN ⊃ Gj . We define an element AN [ g ] of C(GN //KN ) by the formula X 1 τ −1 e gτ. (N − j)! AN [ g ] := τ ∈KN If j > N and g ∈ Gj , we set AN [ g ] := 0. Thus for each N we get a family of elements of C(GN //KN ). Remarks. 1) Notice that elements AN [ g ], where g ranges in GN //KN , form a basis in C(GN //GN ). However, if g ∈ GN actually is an element of a subgroup Gk , our family contains also elements 1 AN [g], 1! 1 AN [g], . . . , 2! 1 AN [g]. (N − k)! `N 2) Elements AN [ g ], where g ranges in j=0 Gj //Kj , do not generate the Abelian group Z(GN //KN ) of Z-valued functions on GN //KN . ⊠ Theorem 1.1 Let g , h , r range in the disjoint union there are non-negative integers a r g,h `∞ j=0 Gj //Kj . Then , which do not depend on N , satisfying the following properties: • For each N AN [ g ] ∗ AN [ h ] = X ar g,h AN [ r ]. (1.1) r • Consider a linear space B with a basis consisting of symbols A[ g ], where `∞ g ranges in j=0 Gj //Kj . Then the formula A[ g ] ∗ A[ h ] = X ar g,h A[ r ], (1.2) r determines a structure of an associative algebra on B. In the next subsection we present a description (or quasi-description) of this algebra. 1.4. Checker triangulated surfaces and symmetric groups. We say that a checker triangulated surface is a two-dimensional oriented closed (generally, disconnected) surface (see Fig. 1) equipped with the following data: 4 17 − − + − + − + − + − − + 1 1 + − − + + − − + 9 9 − + + + 17 23 − − 7 7 − + + − 4 4 + 23 a) b) Figure 1: a) A piece of a checker triangulated surface. b) A piece of a labeled checker triangulated surface. Figure 2: A surface consisting of two triangles. 5 + R Q Figure 3: Surfaces R, Q and a partial bijection R− to Q+ . 6 • a graph separating surface into triangles; • for each triangle we assign a sign (+) or (−), pluses and minuses are arranged in a checker order; • edges are colored by red, yellow, blue; colors of edges of each face are different; in plus-triangles these colors are located clockwise, on minus-triangles anti-clockwise. We admit non-connected surfaces. Also, we admit pairs of triangles, which have two or three common edges as on Fig. 2. Surfaces are defined up to a combinatorial equivalence. Denote by ΞN the set of all checker triangulated surfaces with 2N faces. We say that a labeling of a surface R ∈ ΞN is a bijective map from {1, 2, . . . , N } to the set of all plus-triangles. We automatically assign labels to minus-triangles en assuming that triangles separated by blue edges have same labels. Denote by Ξ the set of all labeled surfaces with 2N triangles defined up to a combinatorial equivalence2 . There is a natural one-to-one correspondence between the set ΞN and the group GN = SN × SN . e For each red edge v we consider labels Indeed, fix a labeled checker surface R. i+ (v) and i− (v) on its plus and minus sides. Assuming σred : i+ (v) 7→ i− (v) we get an element σred of SN . Considering yellow edges we obtain another permutation σyellow ∈ SN . A permutation τ ∈ SN of labels corresponds to a simultaneous conjugation (σred , σyellow ) 7→ (τ σred τ −1 , τ σyellow τ −1 ). Therefore we get a canonical bijection between sets ΞN and (SN × SN )//SN . Next, let us describe a product in SN × SN in terms of labeled surfaces. e and R e be labeled surfaces. For each j = 1, . . . , N , we identify the Let P e with the j-th plus-triangle of P according colors of j-th minus-triangle of R their sides. Thus we get a two-dimensional simplicial cell complex consisting of N labeled plus-triangles inherited from R, labeled N minus-triangles inherited from P and N plus-minus-triangles obtained as result of gluing. Each edge is contained in 3 triangles. Removing interiors of all plus-minus-triangles we come to a simplicial cell complex such that each edge is contained in two triangles. In fact, this is a surface, but some vertices of the surface can be glued one with another (see Fig. 4). Cutting all such gluings we get a new labeled surface. 1.5. Remark. Belyi data. Checker triangulated surfaces arise in a natural way in algebraic geometry under names Belyi data or dessigns d’enfant. Denote by Q the field of algebraic numbers. Consider an algebraic curve C and a meromorphic function (Belyi function) f on C whose critical values are contained in the set 0, 1, ∞. According the famous Belyi theorem [2] such a function on a given curve C exists if and only if C can be determined by a system of algebraic equations with coefficients in Q. 2 If a surface R admits combinatorial automorphisms, then different labelings of R can give equivalent labeled surfaces. 7 Figure 4: A surface whose vertices are glued. Consider the Riemann sphere C = C ∪ ∞ and the real projective line R = R ∪ ∞ in C. Let us say that the upper half-plane is a plus-triangle, lower halfplane is a minus-triangle, the segment [1, ∞] is red, the segment [0, 1] is yellow, and the segment [−∞, 0] is blue. Thus the Riemann sphere C becomes a checker triangulated surface. The preimage of R on C is colored graph splitting C into triangles. Clearly, we come to a checker triangulated surface. The Galois group of Q over Q acts on the set of all Belyi functions. A. Grothendieck proposed a program of investigation of the Galois groups using Belyi functions and graphs on surfaces, see, e.g., [23], [24], [25], [7], [22]. Relations of this topic and infinite symmetric group remain to be non-clear. 1.6. Partial bijections. We say that a partial bijection λ of a set Y to a set Z is a bijection of a subset A ⊂ Y to a subset B ⊂ Y (we admit the case A = B = ∅). We define rk λ := #A = #B, dom λ := A, im λ := B. Denote by PB(Y, Z) the set of all partial bijections Y → Z. For partial bijections µ : W → Y , λ : Y → Z we define their product λµ : W → Z. We say that w ∈ dom λµ if w ∈ dom µ and µ(w) ∈ dom λ. In this case we set λµ(w) = λ(µ(w)) 1.7. Construction of the algebra B. The basis of the algebra is numer- 8 ated by the set ∞ a Ξn . n=0 Let R ∈ Ξn , Q ∈ Ξk . Let λ be a partial bijection from the set of minustriangles of R to`the set of plus-triangles of Q (see Fig. 3). Consider the disjoint union R Q and let us perform the following transformations. For each face A ∈ dom λ, we take the face λ(A) ∈ im λ, remove both faces and identify their boundaries according colors of edges. After this, we get a compact two-dimensional simplicial complex, and each edge of the complex is contained in precisely two faces. As above some vertices of the surface can be glued one with another (see Fig. 4). Cutting all such gluings we get a new surface R ⊛λ Q. In this notation, the product is defined by X R ⊛λ Q. R∗Q= λ∈PB(R− ,Q+ ) Proposition 1.2 This algebra coincides with the algebra B defined in Theorem 1.1. 2 A more general construction 2.1. Groups Gn . Fix a finite set I. Consider a finite or countable set3 X, the product I × N and the unions V = X ∪ (I × N), Vn = X ∪ (I × Jn ) ⊂ V, see Fig. 5. The group S∞ acts on N, therefore it acts on the product I × N. We can imagine I × N as a table with #I infinite rows. The group S∞ acts by permutations of columns. Next, we consider the trivial action of S∞ on X, this determines an action of S∞ the whole V . Consider a subgroup G∞ ⊂ S(V ) containing S∞ . Set Gn := G∞ ∩ S(Vn ). In other words, we consider elements of G supported by Vn . As above, we denote Kn := Sn , K ∞ = S∞ . Remark. The case discussed above corresponds to X = ∅ and a 2-element set I. The group G∞ = S∞ × S∞ acts by permutations preserving rows. ⊠ 3 The case X = ∅ is sufficiently interesting. 9 Vn ... I Figure 5: Sets V ⊃ Vn . Remark. It is reasonable to keep in the mind the following examples: a) X = ∅, G = S(I × N). b) More generally, let X = ∅, G = S∞ × · · · × S∞ , its subgroup S∞ is the diagonal. c) X is a finite set, #I = 1, G = S(X ∪ N). In all these cases the sets of conjugacy classes admit geometric descriptions by tricks of [18]. ⊠ `∞ 2.2. Algebras C(Gn //Kn). Let g , h , r , . . . range in j=0 Gj //Kj . Denote by g, h, r their representatives. Fix n = 0, 1, 2, . . . , let g ∈ Gn //Kn , g ∈ g , and N > n. For any n-element set Ω ⊂ N we define the sum X R(g, Ω) := σgσ −1 ∈ C(G∞ ), σ:Jn →Ω where σ ranges in the set of bijective maps Jn → Ω. Explain this more carefully. Any σ determines a bijection I × Jn → I × Ω, we denote it by the same symbol σ. Thus, σgσ −1 is a map σgσ −1 : X ∪ (I × Ω) → X ∪ (I × Ω). We extend it to a map VN → VN in a trivial way, σgσ −1 (w) := w, if w ∈ I × (JN \ Ω). Next, we consider the sum AN [ g ] = X R(g, Ω). Ω⊂JN : #Ω=n For N < n, we set AN [ g ] = 0. Remark. Clearly, for N > n, we have AN [ g ] = X 1 τ gτ −1 . (N − n)! (2.1) τ ∈KN However, our long definition will be used below. 10 ⊠ Theorem 2.1 For the groups Gn defined in this subsection Theorem 1.1 remains true. Thus, for any group G∞ , we get an associative algebra B = B[G∞ //K∞ ] and canonical epimorphisms B[G∞ //K∞ ] → C(GN //KN ). 2.3. Local bijections. Following Ivanov and Kerov [10] we define a semigroup of local bijections4 . Let Y be a finite or countable set. A local bijection ω is a bijection from a finite subset Ω ⊂ Y to Ω. We denote such local bijection by ((ω, Ω)). Any local bijection admits a canonical extension to an element ω e ∈ S(Y ), we set ω e y = y if y ∈ / Ω. We define the product of local bijections by   ((ω, Ω)) ◦ ((µ, M )) = ω e·µ e ,Ω∪ M . Ω∪M Denote by L(Y ) the semigroup of all local bijections of Y . Remark. A local bijection determines a partial bijection. But the ◦-product differs from the product of partial bijections. ⊠ The group S(Y ) acts on L(Y ) by conjugations in the obvious way, σ((w, Ω))σ −1 = ((σ wσ e −1 σΩ , σΩ)). On the other hand, we have a natural forgetting homomorphism ι : L(Y ) → S(Y ) defined by ι((ω, Ω)) = ω e. 2.4. The semigroup algebra for local bijections. Denote by C[L(Y )] the space of all formal series of the form X a((ω,Ω)) ((ω, Ω)), a((ω,Ω)) ∈ C. ((ω,Ω))∈L(Y ) This space is equipped with a convolution X X X c((ν,N )) ((ν, N )), b((µ,M)) ((µ, M )) = a((ω,Ω)) ((ω, Ω)) ∗ ((ν,N )) ((µ,M)) ((ω,Ω)) where c((ν,N )) = X a((ω,Ω)) b((µ,M)) ((ωΩ)),((µM)): Ω∪M=N, ω eµ e=e ν (this sum is finite). For any subset Z in Y we have a homomorphism Y πZ : C[L(Y )] → C[L(Z)] 4 See [1], [14] on continuations of the work [10]. 11 defined on generators by π((ω, Ω)) = ( ((ω, Ω)), if Ω ⊂ Z; 0, otherwise. For a finite set Y we have a homomorphism of algebras ι : C[L(Y )] → C[S(Y )] defined by X h X X a((ω,Ω)) ω e= a((ω,Ω)) ((ω, Ω)) = ι ((ω,Ω)) X g∈S(Y ) Ω: Ω⊃{support of g} ((ω,Ω)) a ((g ,Ω)) Ω i g (for an infinite set Y the sum in square brackets is infinite). 2.5. Elements B[ g ]. Let g ∈ Gn //Kn , g ∈ g . For any n-element subset Ω ⊂ N we define an element of C[L(V )] by X  R( g , Ω) = σgσ −1 , X ∪ (I × Ω) , σ:Jn →Ω where the summation is taken over all bijections σ : Jn → Ω. Next, we define X R( g , Ω). B[ g ] := Ω: #Ω=n By construction these elements are invariant with respect to conjugations by elements of K∞ , Example. Let G∞ = S∞ × S∞ acting on J2 × N as above. For g ∈ (SN × SN )//SN we take the corresponding R ∈ ΞN . Then X X eκ , B[ g ] = R Ω⊂N: #Ω=N κ where the summation in the interior sum is taken over all bijective maps κ from Ω to the set of plus-triangles of R. A checker triangulated surface equipped with such a map determines an element of the group S(Ω) × S(Ω). We consider this element as a local bijection of J2 × N with domain J2 × Ω. ⊠ For any g ∈ Gn //Kn , h ∈ Gm //Km the convolution B[ g ] ∗ B[ h ] is K∞ invariant, therefore it has the form X a r B[ r ]. B[ g ] ∗ B[ h ] := r∈ ` g,h Gj //Kj 2.6. Proof of the theorem. First, we apply the map πVVN . For any g and n ∈ N we get an element BN [ g ] := πVVN B[ g ]. 12 Since πVVN is a homomorphism of algebras, we get BN [ g ] ∗ BN [ h ] := r∈ `N X ar g,h BN [ r ], k=0 Gj //Kj ` where g, h range in N k=0 Gk //Sk . Next, we apply the forgetting map ι : C[L(Vn )] → C[S(Vn )] to elements BN [ g ]. Evidently, we get ι(BN [ g ]) = AN [ g ]. This implies our statement. 2.7. An expression for products. Let g ∈ Gn , h ∈ Gk . Let λ ranges in partial bijections Jk → Jn . Fix λ, denote d = rk λ. Fix any pair of injective maps σ0 : Jn → Jn+k−d , τ0 : Jk → Jn+k−d such that the product σ0−1 τ0 as product partial bijections is λ. Define the conjugacy class g ⊛λ h := σ0 ((g, Vn ))σ0−1 ◦ τ0 ((h, Vk ))τ0−1 ∈ Gn+k−d //Sn+k−d , it does not depend on the choice of σ0 and τ0 . Proposition 2.2 X B[ g ] ∗ B[ h ] = B[g ⊛λ h]. (2.2) λ∈PB(Jk ,Jn ) Proof. We expand the product B[ g ] ∗ B[ h ] by definition as a sum X X σ((g, Vn ))σ −1 ◦ τ ((h, Vk ))τ −1 = ((σgσ −1 , σVn )) ◦ ((τ hτ −1 , τ Vk )), (2.3) σ,τ σ,τ where σ : Jn → N, τ : Jk → N are injective maps. We wish to show that this expansion coincides with (2.2). It is sufficient to identify the following sub-sum of (2.3) X ((σgσ −1 , σVn )) ◦ ((τ hτ −1 , τ Vk )) (2.4) σ,τ : σJn ∪τ Jk =Jn+k−d and the sub-sum of (2.2) consisting of all summands of the form ((r, Vn+k−d )). Notice that the group Sn+k−d acts on the set of summands of (2.4) by u : (σ, τ ) 7→ (u−1 σ, u−1 τ ). We refer to Fig. 6. This action corresponds to simultaneous application of a substitution u to rows number 1, 4, 7. Rows 2, 3, 5, 6 remain to be fixed, and 13 τ −1 h τ σ −1 g σ Figure 6: The left part. A product σ((g, Vn )) σ −1 ◦ τ ((h, Vk )) τ −1 . Here k = 5, n = 7, d = 3, n + k − d = 9. We draw 7 copies of the set Jn−k+1 . Maps τ −1 , τ , σ −1 , σ are shown by arcs. We mark σ dom λ = τ −1 im λ as fat points. Arcs containing fat points are thick. Boxes correspond to elements ((h, Vk )) ∈ Gk and ((g, Vn )) ∈ Gn . The right part. A canonical form of the pair (τ, σ). 14 arcs move corresponding permutations of their ends. Applying an appropriate u can put fat points to positions 1, 2, . . . , d. Moreover, we can make τ −1 u monotone on Jd : i<j6d τ −1 u(i) < τ −1 u(j). ⇒ (on Fig. 6 this means that the corresponding arcs have no intersections). Next, we can put points of τ Jk \ τ Jd to points of Jk \ Jd . Moreover, we can make τ −1 u monotone on Jk \ Jd . Finally, we can put points of σJn \ σJd to points of Jn+k−d \ Jk . Moreover, we can make σ −1 u monotone on Jn+k−d \ Jk . This determines u in a unique way. On the other hand, the partial bijection σ −1 τ does not change under this transformation, and the new pair (u−1 σ, u−1 τ ) is uniquely determined by dom σ −1 τ , im σ −1 τ and the map σ −1 u : Jd → im σ −1 τ . Thus, we see that orbits of the group Sn+k−d on the set of summands of (2.4) are enumerated by partial bijections λ.  3 Final remarks 3.1. The involution. The map g 7→ g −1 determines an anti-involution in the algebra L[V ] and anti-involution in B[G∞ //K∞ ], B[ g ]⋆ := B[g −1 ]. Evidently, (B[ g ] ∗ B[ h ])⋆ = B[ h ]⋆ ∗ B[ g ]⋆ . 3.2. The filtration. Fix G∞ and set B := B[G∞ //K∞ ]. Let Bn be the subspace in B generated by all B[ g ], where g ranges in n a Gj //Sj . j=0 We get an increasing filtration, · · · ⊂ Bn ⊂ Bn+1 ⊂ . . . Evidently, V ∈ Bk , W ∈ Bl ⇒ V ∗ W ∈ Bk+l . 3.3. The associated graded algebra. We construct the graded algebra gr B[G∞ //K∞ ] in the usual way. Namely, the product Bk × Bl → Bk+l 15 determines a map Bk /Bk−1 × Bl /Bl−1 → Bk+l /Bk+l−1 . In this way, we get a structure of an associative algebra on gr B[G∞ //K∞ ] = ∞ M Bk /Bk−1 . k=0 Each subspace Bk /Bk−1 has a natural basis enumerated by elements of Gk //Sk . It is easy to describe the multiplication in gr B[G∞ //K∞ ]: in the sum in the right-hand side of (2.2) we leave only the first summand (corresponding to the partial bijection of rank 0). Formulate this more precisely. For n, k ∈ Z+ denote by θn,k the partial bijection Jn → Jn+k \ Jk defined by j 7→ j + k. Proposition 3.1 a) For g ∈ Gn //Sn , h ∈ Gk //Sk , their product in graded algebra gr B[G∞ //K∞ ] is −1 ◦ ((h, Vk ))]. B[ g ] ⋄ B[ h ] = B[θn,k ((g, Vn ))θn,k b) If X = ∅, then the algebra gr B[G∞ //K∞ ] is commutative. `∞ In fact, we get a semigroup structure on j=0 Gj //Sj given by −1 g • h := θn,k ((g, Vn ))θn,k ◦ ((h, Vk )). The algebra gr B[G∞ //K∞ ] is the semigroup algebra of this semigroup. Example. For G∞ = S∞ × S∞ the •-product corresponds to the disjoint union of checker triangulated surfaces. ⊠ Remark. These semigroups are similar to semigroups of double cosets, which were considered in [18], [17]. However, degree of generality in [18] is wider (as we noticed in Introduction, conjugacy classes are special cases of double cosets and not vice versa), even in the same situations we get slightly different structures. For instance, for G∞ = S∞ × S∞ adding to a checker triangulated surface R ∈ Ξj a collection of k double triangles (drawn on Fig. 2) we get different objects (this corresponds to embeddings Sj × Sj → Sk+j × Sk+j ). However, such elements in [17] are identified. Notice that we have a natural identification of sets ∞ a Gj //Kj ≃ (G∞ //K∞ ) × Z+ , j=0 where Z+ denotes the set of non-negative integers. The left-hand side enumerates elements of the basis in B[G∞ //K∞ ]. The semigroup G∞ //K∞ ≃ K∞ \ G∞ /K∞ 16 is one of objects of [17]. ⊠ 3.4. The Poisson bracket. Let X = ∅, in particular, in this case gr B[G∞ //K∞ ] is commutative. Consider the map Bk × Bl → Bk+l−1 given by (V, W ) 7→ [V, W ] = V ∗ W − W ∗ V. As usual, we get a map Bk /Bk−1 × Bl /Bl−1 → Bk+l−1 /Bk+l−2 and a structure of a Lie algebra on the space gr B[G∞ //K∞ ]. It is easy to write a formula for the bracket   X   B[ g ], B[ h ] gr = B[g ⊛λ h] − B[h ⊛λ−1 g] . λ∈PB(Jk ,Jn ): rk λ=1 Of course, a partial bijection Jk → Jn of rank 1 is determined by a pair α ∈ Jk , β ∈ Jn . Remark. Recall that there is a well-known Poisson structure on spaces (K × · · · × K)// diag K, where K is a compact Lie group, see [8], [5]. ⊠ References [1] Alexeevski A. V., Natanzon S. M. Algebras of conjugacy classes of partial elements. In Topology, geometry, integrable systems and mathematical physics. Novikov’s seminar: 2012–2014. Providence, RI: American Mathematical Society, 1-11 (2014). [2] Belyi, G. V. Galois extensions of a maximal cyclotomic field. Math. USSRIzvestiya, 1980, 14:2, 247–256. [3] Bump D. Lie groups. Second edition. Springer, New York, 2013. [4] Gaifullin A. A., Neretin Yu. A., Infinite symmetric group, pseudomanifolds, and combinatorial cobordism-like structures. J. Topol. Anal., 2017, https://doi.org/10.1142/S179352531850022X [5] Fock, V. V., Rosly, A. A. Flat connections and polyubles. Theoret. and Math. Phys. 95 (1993), no. 2, 526-534. [6] Gelfand I. M., Spherical functions on Riemannian symmetric spaces. (Russian) Doklady, 70 (1950), 5-8. [7] Girondo, E., González-Diez, G. Introduction to compact Riemann surfaces and dessins d’enfants. Cambridge University Press, Cambridge, 2012. 17 [8] Goldman, W. M. Invariant functions on Lie groups and Hamiltonian flows of surface group representations. Invent. Math. 85 (1986), no. 2, 263-302. [9] Ismagilov R. S., Elementary spherical functions on the group SL(2, P ) over a field P , which is not locally compact, with respect to the subgroup of matrices with integral elements, Math. USSR-Izv., 1:2 (1967), 349-380. [10] Ivanov V., Kerov S., The Algebra of Conjugacy Classes in Symmetric Groups and Partial Permutations, Zapiski nauchn.semin. POMI RAN, 256 (1999), 95–120; J. of Math. Sci. (New York), 2001, 107:5, 4212-4230. [11] Iwahori N., On the structure of a Hecke ring of a Chevalley group over a finite field., J. Fac. Sci. Univ. Tokyo Sect. I, 10 (1964), 215-236. [12] Iwahori N., Matsumoto H., On some Bruhat decomposition and the structure of the Hecke rings of p-adic Chevalley groups, Inst. Hautes Études Sci. Publ. Math., 25:1 (1965), 5-48. [13] Koornwinder T. H., Jacobi functions and analysis on noncompact semisimple Lie groups, in Special Functions: Group Theoretical Aspects and Applications, Reidel, Dordrecht, 1984, 1-85. [14] Mironov A., Morozov A., Natanzon, S. Infinite-dimensional topological field theories from Hurwitz numbers. J. Knot Theory Ramifications 23, No. 6, Article ID 1450033, 16 p. (2014). [15] Neretin Yu.A. Categories of symmetries and infinite-dimensional groups. Oxford University Press, 1996. [16] Neretin Yu. A. , Multi-operator colligations and multivariate characteristic functions, Anal. Math. Phys., 1:2-3 (2011), 121-138. [17] Neretin Yu. A., Infinite tri-symmetric group, multiplication of double cosets, and checker topological field theories. Int. Math. Res. Not., 2012:3 (2012), 501-523. [18] Neretin Yu.A., Infinite symmetric groups and combinatorial constructions of topological field theory type. Russ. Math. Surv., 2015, 70:4, 715-773. [19] Neretin Yu. A., Multiplication of conjugacy classes, colligations, and characteristic functions of matrix argument, Funct. Anal. Appl., 51:2 (2017), 98-111. [20] Olshanski G. I., Unitary representations of infinite dimensional pairs (G, K) and the formalism of R. Howe, in Representation of Lie groups and related topics, Adv. Stud. Contemp. Math., 7, Gordon and Breach, New York, 1990, 269-463. [21] Olshanski G. I., Unitary representations of (G, K)-pairs that are connected with the infinite symmetric group S(∞). Leningrad Math. J., 1:4 (1990), 983-1014. 18 [22] Shabat G. , Calculating and drawing Belyi pairs. Zapiski nauchn. semin. POMI RAN 446, 2016, 182-220; also, J. Math. Sci. (N.Y.) 226 (2017), no. 5, 667-693. [23] Shabat, G. B., Voevodsky, V. A. Drawing curves over number fields. in The Grothendieck Festschrift, Vol. III, 199-227, Birkhäuser, Boston, Boston, MA, 1990. [24] Schneps L. (ed.), The Grothendieck theory of dessins d’enfants. Cambridge University Press, Cambridge, 1994. [25] Schneps L., Lochak L. (eds.) Geometric Galois actions. V. 1, 2. Cambridge University Press, Cambridge, 1997. Math.Dept., University of Vienna, Oskar-Morgenstern-Platz 1, 1090 Wien; & Institute for Theoretical and Experimental Physics (Moscow); & Mech.Math.Dept., Moscow State University; Institute for information transmission problems (Moscow); e-mail: neretin(at) mccme.ru URL:www.mat.univie.ac.at/∼neretin 19
4math.GR
arXiv:1504.08196v3 [cs.SY] 19 May 2016 On the estimation of initial conditions in kernel-based system identification Riccardo S. Risuleo, Giulio Bottegal and Håkan Hjalmarsson ∗ May 20, 2016 Abstract Recent developments in system identification have brought attention to regularized kernel-based methods, where, adopting the recently introduced stable spline kernel, prior information on the unknown process is enforced. This reduces the variance of the estimates and thus makes kernel-based methods particularly attractive when few input-output data samples are available. In such cases however, the influence of the system initial conditions may have a significant impact on the output dynamics. In this paper, we specifically address this point. We propose three methods that deal with the estimation of initial conditions using different types of information. The methods consist in various mixed maximum likelihood–a posteriori estimators which estimate the initial conditions and tune the hyperparameters characterizing the stable spline kernel. To solve the related optimization problems, we resort to the expectation-maximization method, showing that the solutions can be attained by iterating among simple update steps. Numerical experiments show the advantages, in terms of accuracy in reconstructing the system impulse response, of the proposed strategies, compared to other kernel-based schemes not accounting for the effect initial conditions. 1 Introduction Regularized regression has a long history [1]. It has become a standard tool in applied statistics [2], mainly due to its capability of reducing the mean square error (MSE) of the regressor estimate [3], when compared to standard least squares [4]. Recently, a novel method based on regularization has been proposed for system identification [5]. In this approach, the goal is to get an estimate of the impulse response of the system, using the so called kernel-based methods [6]. ∗ R. S. Risuleo, G. Bottegal and H. Hjalmarsson are with the ACCESS Linnaeus Center, School of Electrical Engineering, KTH Royal Institute of Technology, Sweden (e-mail addresses: [email protected] , [email protected] , [email protected]). This work was supported by the European Research Council under the advanced grant LEARN, contract 267381 and by the Swedish Research Council under contract 621-2009-4017. 1 To this end, the class of stable spline kernels has been proposed recently in [7], [8]. The main feature of these kernels is that they encode prior information on the exponential stability of the system and on the smoothness of the impulse response. These features have made stable spline kernels suitable for other estimation problems, such as the reconstruction of exponential decays [9] and correlation functions [10]. Other kernels for system identification have been introduced in subsequent studies, see for instance [11], [12]. Stable spline kernels are parameterized by two hyperparameters, that determine magnitude and shape of the kernel and that need to be estimated from data. An effective approach for hyperparameter estimation relies upon empirical Bayes arguments [13]. Specifically, exploiting the Bayesian interpretation of regularization [14], the impulse response is modeled as the realization of a Gaussian process whose covariance matrix corresponds to the kernel. The hyperparameters are then estimated by maximizing the marginal likelihood of the output data, obtained by integrating out the dependence on the impulse response. Given a choice of hyperparameters, the unknown impulse response is found by computing its minimum MSE Bayesian estimate [5]. One situation where kernel-based methods are preferable is when data records are short (e.g., five times the rise time of the system). This mainly because of two reasons: 1. Kernel-based methods do not require the selection of a model order. Standard parametric techniques (such as the prediction error method [4], [15]) need to rely on model selection criteria, such as AIC or BIC, if the structure of the system is unknown [16]. These could be unreliable when faced with small data sets. 2. The bias introduced by regularization reduces the variance. With small data records, the variance can be very high. If the bias is of the right kind, it will compensate for the variance effect in the MSE [2, Ch. 2.9]. When data records are very short (e.g., two times the rise time of the system) we cannot ignore the effect of the initial conditions. In fact, if the system is not at rest before the experiment is performed, then there are transient effects that cannot be explained using only the collected data. Standard workarounds, such as discarding those output samples that depend on the initial conditions or approximating the initial conditions to zero [4, Ch. 10.1], may give unsatisfactory results. Thus, it seems preferable to deal with the initial conditions by estimating them. In this paper we discuss how to incorporate the estimation of the initial conditions in the context of kernel-based system identification. We discuss three possible approaches to the problem. First, we propose a method that incorporates the unknown initial conditions as parameters, to be estimated along with the kernel hyperparameters. Then, assuming that the input is an autoregressive– moving-average (ARMA) stationary process, we propose to estimate the initial conditions using the available samples of the input, thus designing a minimum variance estimate of the initial conditions from the input samples. Finally, we design a mixed maximum a posteriori–marginal likelihood (MAP–ML) estimator 2 (see [17]) that effectively exploits information from both input and output data. We solve the optimization problems using novel iterative schemes based on the expectation-maximization (EM) method [18], similar to the technique used in our previous works [19] and [20], where methods for Hammerstein and blind system identification are proposed. We show that each iteration consists of a set of simple update rules which either are available in closed-form or involve scalar optimization problems, that can be solved using a computationally efficient grid search. The paper is organized as follows. In Section 2, we formulate the problem of system identification with uncertainty on the initial conditions. In Section 3, we provide a short review of kernel-based system identification. In Section 4, we propose the initial-conditions estimation strategies and the related system identification algorithms. In Section 5, we show the results of numerical experiments. In these experiments, the discussed method are compared with standard techniques used to deal with unknown initial conditions. In Section 6, we summarize the work and conclude the paper. 2 Problem formulation We consider the output error model of the form yt = ∞ X gk ut−k + vt , (1) k=0 +∞ where {gt }t=0 is the impulse response of a linear time-invariant system. For notational convenience, we assume there are no delays in the system (g0 6= 0). n−1 We approximate g by considering its first n samples {gt }t=0 , where n is chosen large enough to capture the system dynamics. The system is driven by the input ut and the measurements of the output yt are corrupted by the process vt , which is zero-mean white Gaussian noise with variance σ 2 . N −1 N −1 Given a set of N measurements, denoted by {ut }t=0 , {yt }t=0 , we are n−1 interested in estimating the first n samples of the impulse response {gt }t=0 . To this end, we formulate this system identification problem as the linear regression problem y = Ug + v , (2) where we have introduced the following    y0    y :=  ...  , g :=  yN −1 vector/matrix   g0 ..  , v :=   .  gn−1 3 notation  v0 ..  , .  vN −1  u0 u1 u2 .. .    U =   uN −1 u−1 u0 u1 .. . u−2 u−1 u0 .. . uN −2 uN −3 ···  u−n+1 u−n+2   u−n+3  . ..  .  (3) uN −n The matrix U contains the samples u−1 , . . . , u−n+1 , that we call initial conditions, that are unavailable. Common ways to overcome this problem are, for instance • Discard the first n − 1 collected samples of y. However, if N is not much larger than n, (e.g., if n ∼ 100 and N ∼ 200), there is a considerable loss of information. • Assume that the system is at rest before the experiment is performed, (i.e. u−1 , . . ., u−n+1 = 0). This assumption might be too restrictive or unrealistic. In this paper, our aim is to study how to exploit the available information to estimate the initial conditions, in order to improve the identification performance. Specifically, we will present three estimators that make different use of the available information. 3 Kernel-based system identification In this section we briefly review the kernel-based approach introduced in [7], [8]. Exploiting the Bayesian interpretation of kernel-based methods [14], we model the unknown impulse response as a Gaussian random process, namely g ∼ N (0, λKβ ) . (4) We parameterize the covariance matrix Kβ (the kernel) with the hyperparameter β. The structure of the kernel determines the properties of the realizations of (4); its choice is therefore of paramount importance. An effective kernel for system-identification purposes is the stable spline kernel [7], [21]. In particular, in this paper we use the first-order stable spline kernel (or TC kernel in [11]), that is defined as {Kβ }i,j := β max(i,j) , (5) where β is a scalar in the interval [0, 1). The role of this hyperparameter is to regulate the velocity of the exponential decay of the impulse responses drawn from the kernel. The hyperparameter λ ≥ 0 is a scaling factor that regulates the amplitude of the realizations of (4). We collect the hyperparameters into the vector   ρ := λ β (6) 4 and introduce the following notation:   u−n+1   u   u := − u− :=  ...  u+ u−1   u0   u+ :=  ...  , uN −1 where u− contains the unknown initial conditions. Since we have assumed a Gaussian distribution for the noise, the joint description of y and g is Gaussian, parameterized by u− and ρ. Therefore, we can write        y 0 Σy Σyg p ; ρ, u− ∼ N , , (7) g 0 Σgy λKβ where Σyg = ΣTgy = λU Kβ and Σy = λU Kβ U T + σ 2 I. It follows that the posterior distribution of g given y is Gaussian, namely  p(g|y; ρ, u− ) = N ĝ, Σg|y , (8) where −1 UT U UT −1 + (λK ) , ĝ = Σg|y 2 y . (9) β 2 σ σ Equation (8) implies that the minimum variance estimator of g (in the Bayesian sense, see [22]) is ĝ = E[g|y; ρ, u− ] . (10)  Σg|y = The estimate ĝ depends on the hyperparameter vector ρ and the initial conditions. These quantities need to be estimated from data. In the next section we focus our attention to the estimation of the kernel hyperparameters and the initial conditions, describing different strategies to obtain these quantities. Remark 1. The estimator (10) depends also on the noise variance σ 2 . In this work, we assume that this parameter is known. It can for instance be estimated by fitting a least-squares estimate of the system g and then computing the sample variance of the residuals. 4 Estimation of initial conditions and hyperparameters In most works on kernel-based system identification (see e.g. [5] for a survey), the authors adopt an empirical-Bayes approach to estimate the hyperparameters that define the kernel. This amounts to maximizing the marginal likelihood (ML) of the output, found integrating g out of (7). In the standard case, that is when u− is assumed to be known, the ML estimator of the hyperparameters corresponds to ρ̂ = arg max p(y; ρ, u− ) . ρ (11) We start from (11) to design new estimators for the initial conditions and the kernel hyperparameters. 5 4.1 Model-less estimate The most straightforward generalization of (11) is to include the initial conditions among the ML parameters. The initial conditions become unknown quantities that parameterize the impulse response estimator. The ML criterion then becomes ρ̂, û− = arg max p(y ; ρ, u− ) , (12) ρ, u− where the maximization is carried out over the unknown initial conditions as well. This problem is nonconvex and possibly high dimensional, as the number of initial conditions to be estimated is equal to the number of impulse response samples. To overcome this difficulty, we devise a strategy based on the expectationmaximization method that yields a solution to (12) by iterating simple updates. To this end, we suppose we have any estimate of the unknown quantities ρ̂(k) (k) and û− , and we calculate the current estimate of the impulse response, as well as its variance, from (9). Define the matrix (k) Ŝ (k) = Σ̂g|y + ĝ (k) ĝ (k) T , (13) which is the second moment of the current estimated impulse response. We introduce the discrete-derivator matrix ∆ij = δi,j − δi,j+1 , (14) and we calculate the second moment of the derivative of the estimated impulse response at iteration k, ∆ĝ (k) , given by D̂(k) := ∆Ŝ (k) ∆T . (15) The Toeplitz matrix of the input samples U can be split in two parts, namely U = U+ + U− , where U+ is fully determined by the available samples, and U− is composed of the unknown initial conditions. Define the matrix R ∈ RN n×N that satisfies the relation Ru− = vec(U− ); and call Ĝ(k) the Toeplitz matrix of the estimated impulse response at the kth iteration. Furthermore, define h i Â(k) := RT Ŝ (k) ⊗ IN R, (16) h i T b̂(k) T := vec(U+ ) Ŝ (k) ⊗ IN R − y T Ĝ(k). With all the definitions in place, we can state the theorem that provides us with the iterative update of the estimates that solves (12). Theorem 1. Consider the hyperparameter estimator (12). Starting from any initial guess of the initial conditions and the hyperparameters, compute −1 (k) û(k+1) = Â(k) b̂ , (17) β̂ (k+1) = arg min Q(β) , (18) β∈[0,1) n λ̂(k+1) = 1 X ˆ(k) d wβ̂ (k+1) ,i , n i=1 i 6 (19) with Â(k) and b̂(k) defined in (16), and Q(β) := n log f (β) + f (β) := n−1 X n(n − 1) log β − log(1 − β) , 2 (k) 1−n dˆi β −i + dˆ(k) ; n (1 − β)β (20) (21) i=1 (k) where dˆi is the ith diagonal element of (15), and wβ̂ (k+1) ,i is the ith element of wβ := 1 h 1 β − β2 1 β ··· 1 β n−2 1−β β n−1 i , (22) ∞ when β = β̂ (k+1) . Let ρ̂(k+1) = [λ̂(k+1) , β̂ (k+1) ]; then the sequences {û(k) }k=0 ∞ and {ρ̂(k) }k=0 converge to a maximum of (12). Proof. See Appendix. Remark 2. The EM method does not guarantee convergence of the sequences to a global maximum (see [23] and [24]). However, experiments (see Section 5) have show that, for this particular problem, the EM method converges to the global maximum independently of how it is initialized. Thus, we can use Theorem 1 to find a maximum of the marginal likelihood of the hyperparameters and the initial conditions, and then use these parameters to solve the impulse response estimation problem with (10), where we use the limits of the sequences of estimates. 4.2 Conditional mean estimate The model-less estimator presented in Section 4.1 estimates the initial conditions using only information present in the system output y. It does not rely on any model of the input signal u. To show how an available model can be used to estimate the missing initial conditions, we introduce the following assumption. Assumption 1. The input ut is a realization of a stationary Gaussian process with zero-mean and known rational spectrum. Equivalently, ut is a realization on an ARMA process with known coefficients. Assumption 1 implies that ut can be expressed as the output of a difference equation driven by white Gaussian noise with unit variance [25], namely ut + d1 ut−1 + · · · + dp ut−p = c0 et + · · · + cp et−p , (23) where et ∼ N (0, 1). Since, using Assumption 1, we can construct the probability density of the input process, a possible approach to solve (11) is to estimate the missing initial conditions from the input process. To this end, consider (23). If 7 we define the matrices D as the toeplitz matrix of the coefficients 0, d1 , d2 , . . . , and C as the toeplitz matrix of the coefficients c1 , c2 , . . . , then we can write u = −Du + Ce ,  e := e−n+1 ··· eN T , (24) so that p(u) ∼ N (0, Σu ), with −1 Σu = (I + D) −T CC T (I + D) . (25) We thus have a joint probabilistic description of the initial conditions u− and the available input samples u+ . We can partition Σu into four blocks according to the sizes of u− and u+   Σ− Σ−+ Σu = . Σ+− Σ+ It follows (see [22]) that the posterior distribution of the unavailable data is p(u− |u+ ) = N (u−|+ , Σ−|+ ), where u−|+ = Σ−+ Σ−1 + u+ , Σ−|+ = Σ− − Σ−+ Σ−1 + Σ+− . (26) So we can find the minimum variance estimate of u− as the conditional mean u−|+ , namely û− = u−|+ . Having an estimate of the initial conditions, we need to find the hyperparameters that define the kernel. In this case, empirical Bayes amounts to solving the ML problem ρ̂ = arg max p(y ; ρ, û− ) , (27) ρ where the unknown initial conditions have been replaced by their conditional mean. The following theorem states how to solve the maximization using the EM method. Theorem 2. Consider the hyperparameter estimator (27). Starting from an initial guess of the hyperparameters, compute β̂ (k+1) = arg min Q(β) , (28) β∈[0,1) n λ̂(k+1) = 1 X ˆ(k) d wβ̂ (k+1) ,i , n i=1 i (29) (k) with Q(β), dˆi , and wβ̂ (k+1) ,i defined in Theorem 1. Let ρ̂(k+1) = [λ̂(k+1) , β̂ (k+1) ], ∞ then the sequence {ρ̂(k) }k=0 converges to a maximum of (27). Proof. See Appendix. Remark 3. The updates (28) and (29) require the evaluation of (15) at each iteration. In this case the estimate ĝ (k) of the impulse response is given by (10), where u− is replaced by its conditional mean. 8 4.3 Joint input-output estimate The conditional mean estimator presented in Section 4.2 exploits the structure of the input to estimate the missing samples. The model-less estimator, instead, uses information contained in the output samples. In this section we show how to merge these two information sources, defining a joint input-output estimator of the initial conditions. We use Assumption 1 to account for the statistical properties of u− . We propose the following mixed MAP–ML estimator ρ̂, û− = arg max p(y | u− , u+ ; ρ)p(u− | u+ ) , (30) ρ, u− where we have highlighted the dependence on the known input sequence u+ . A key role is played by the term p(u− | u+ ): it acts as a prior distribution for the unknown values of u− and puts weight on the values that better agree with the observed data u+ . Even in this case, the solution can be found with an iterative procedure based on the EM method. Theorem 3. Consider the hyperparameter estimator (30). Starting from an initial guess of the initial conditions and the hyperparameters, compute (k+1) û = !−1 ! −1 Â(k) b̂(k) −1 −1 +Σ−|+ +Σ−|+u−|+ , σ2 σ2 (31) β̂ (k+1) = arg min Q(β) , (32) β∈[0,1) n λ̂(k+1) = 1 X ˆ(k) d wβ̂ (k+1) ,i , n i=1 i (33) (k) with Â(k) and b̂(k) from (16); and with Q(β), dˆi , and wβ̂ (k+1) ,i defined in ∞ Theorem 1. Let ρ̂(k+1) = [λ̂(k+1) , β̂ (k+1) ]; then, the sequences {û(k) }k=0 and ∞ {ρ̂(k) }k=0 converge to a maximum of (30). Proof. See Appendix. Remark 4. This estimator incorporates the prior information about the initial conditions using the mean u−|+ and the covariance matrix Σ−|+ . If we suppose that we can manipulate Σ−|+ , we can see this estimator as a more general estimator, that contains the model-less and conditional mean as limit cases. In fact, setting Σ−|+ = ∞, we get the model-less estimator. Conversely, setting Σ−|+ = 0, we obtain the conditional-mean estimator, as (31) would yield a degenerate iteration where all the updates are û(k+1) = u−|+ . We point however out that the model-less estimator does not rely on any assumption on the input model, whereas the joint input-output estimator requires that the input is a Gaussian process with known pdf. 9 5 Numerical experiments 5.1 Experiment setup To compare the proposed methods, we perform five numerical experiments, each one consisting of 200 Monte Carlo simulations, with sample sizes 150, 200, 250, 300, and 400. At each Monte Carlo run, we generate a dynamic system of order 40. The system is such that the zeros are constrained within the circle of radius 0.99 on the complex plane, while the magnitude of the poles is no larger than 0.95. The impulse response length is 100 samples. The input is obtained by filtering white noise with unit variance through a 8-th order ARMA filter of the form (23). The coefficients of the filter are randomly chosen at each Monte Carlo run, and they are such that the poles of the filter are constrained within the circular region of radii 0.8 and 0.95 in the complex plane. Random trajectories of input and noise are generated at each run. In particular, the noise variance is such that the ratio between the variance of the noiseless output of the system and the noise variance is equal to 20. The following estimators are compared during the experiments. • KB-IC-Zeros: This method does not attempt any estimation of the initial conditions. It sets their value to 0 (that, when assumption 1 holds, corresponds to the a-priori mean of the vector u− ). The kernel hyperparameters are obtained solving (11), with u− = 0. • KB-Trunc: This method also avoids the estimation of the initial conditions by discarding the first n − 1 output samples, which depend on the unknown vector u− . The hyperparameters are obtained solving (11), using the truncated data. • KB-IC-ModLess: This is the model-less kernel-based estimator presented in Section 4.1. • KB-IC-Mean: This is the conditional mean kernel-based estimator presented in Section 4.2. • KB-IC-Joint: This is the joint input-output kernel-based estimator presented in Section 4.3. • KB-IC-Oracle: This estimator has access to the vector u− , and estimates the kernel hyperparameters using (11). The performances of the estimators are evaluated by means of the fitting score, computed as   kgi − ĝi k2 F ITi = 100 1 − , (34) kgi − ḡi k2 where gi is the impulse response generated at the i-th run, ḡi its mean and ĝi the estimate computed by the tested methods. 10 N 150 200 250 300 400 KB-IC-Zeros KB-Trunc KB-IC-ModLess KB-IC-Mean KB-IC-Joint KB-IC-Oracle 51.698 42.010 54.017 54.146 55.695 57.317 54.856 51.038 55.793 56.003 57.133 57.902 61.151 59.400 61.687 62.061 62.776 63.781 61.380 61.085 63.074 63.715 64.310 64.893 63.186 62.963 63.466 64.187 64.457 64.959 Table 1: Table of experimental results. Shown is the average fit in percent over the different experiments. 5.2 Results Table 1 shows the average fit (in percent) of the impulse response over the Monte Carlo experiments. We can see that, for short data sequences the amount of information discarded by the estimator KB-Trunc makes its performance degrade with respect to the other estimators. The estimator KB-IC-Zeros performs better, however suffers from the effects of the wrong assumption that the system was at rest before the experiment was performed. From these results, we see that the estimation of the initial conditions has a positive effect on the accuracy of the estimated impulse response. For larger data records the performances of the estimator KB-IC-Mean and of the estimator KB-IC-ModLess improve, as more samples become available. When the available data becomes larger, all the methods perform well, with fits that are in the neighborhood of the fit of the oracle. The positive performance of KB-IC-Mean indicates that the predictability of the input can be exploited to improve estimates, and that model-based approaches to initial condition estimation outperforms model-less estimation methods (if the input model is known). The further improvement of KB-IC-Joint indicates that the output measurements can be used to obtain additional information about the unobserved initial conditions, information that is not contained in the input process itself. 6 Discussion We have proposed three new methods for estimating the initial conditions of a system when using kernel-based methods. Assuming that the input is a stationary ARMA process with known spectrum, we have designed mixed MAP–ML criteria which aim at jointly estimating the hyperparameters of the kernel and the initial conditions of the systems. To solve the related optimization problems, we have proposed a novel EM-based iterative scheme. The scheme consists in a sequence of simple update rules, given by unconstrained quadratic problems or scalar optimization problems. Numerical experiments have shown that the proposed methods outperform other standard methods, such as truncation or zero initial 11 conditions. The methods presented here estimate n − 1 initial conditions (where n is the length of the FIR approximating the true system), since no information on the order of the system is given. Assuming that the system order is known and equal to say, p, the number of initial conditions to be estimated would boil down to p. However, there would also be p unknown transient responses which need to be identified. These transients would be characterized by impulse responses with the same poles as the overall system impulse response, but with different zeros. How to design a kernel correlating these transient responses with the system impulse response is still an open problem. Appendix: Proofs 6.1 Theorem 1 Consider the ML criterion (12). To apply the EM method, we consider the complete log-likelihood 1 N ky − U gk2 − 2 log σ 2 2σ 2 σ −1  1 1 − g T λKβ g − log det λKβ . 2 2 L(y, g) = − where we have introduced g as a latent variable. Suppose that we have computed (k) the estimates ρ̂(k) of the hyperparameters and û− of the initial conditions. We define the function (k) Q(ρ, u− ; ρ̂(k) , û− ) := E [L(y, g)] , (35) (k) where the expectation is taken with respect to the conditional density p(g|y; ρ̂(k) , û− ), defined in (8). We obtain (neglecting terms independent from the optimization variables) (k) (k) (k) Q(ρ, u− ; ρ̂(k) , û− ) = Q1 (u− ; ρ̂(k) , û− ) + Q2 (ρ; ρ̂(k) , û− ), (36) where (k) Q1 (u− ; ρ̂(k) , û− ) = n o  1  T T − 2 y T U− ĝ + tr U− U− − 2U− U+ Ŝ (k) , 2σ o 1 1 n (k) Q2 (ρ; ρ̂(k) , û− ) = − tr (λKβ )−1 Ŝ (k) − log det λKβ ), 2 2 (37) (38) and Ŝ (k) = Σ̂g|y + ĝ ĝ T . Define new parameters from (k+1) ρ̂(k+1) , û− (k) = arg max Q(ρ, u− ; ρ̂(k) , û− ) . ρ,u− 12 (39) By iterating between (35) and (39) we obtain a sequence of estimates that converges to a maximum of (12) (see e.g., [23] for details). Using (36), (39) splits in the two maximization problems (k+1) û− (k) = arg max Q1 (u− ; ρ̂(k) , u− ) , u− (k) ρ̂(k+1) = arg max Q2 (ρ; ρ̂(k) , û− ) . ρ (40) (41) Consider the maximization of (37) with respect to u− . Using the matrix R we have n h i T tr U− U− Ŝ (k) } = uT− RT Ŝ (k) ⊗ IN Ru− , (42) n o h i T T tr U− U+ Ŝ (k) = vec(U+ ) Ŝ (k) ⊗ IN Ru− , (43) where ⊗ denotes the Kronecker product. We now collect u− , and obtain (k) Q1 (u− ; ρ̂(k) , û− ) = − 1 1 T (k) u− Â u− + 2 uT− b̂(k) 2 2σ σ (44) with Â(k) and b̂(k) defined in (16). Hence, (40) is an unconstrained quadratic optimization, whose solution is given by (17). Consider now the maximization of (38) with respect to ρ. We can calculate the derivative of Q2 with respect to λ, obtaining o n 1 n ∂Q2 = − 2 tr Kβ−1 Ŝ (k) + ; ∂λ 2λ 2λ (45) which is equal to zero for λ∗ = 1  n −1 (k) o tr Kβ Ŝ . n (46) We thus have an expression of the optimal value of λ as a function of β. If we insert this value in Q2 , we obtain (k) Q2 ([λ∗ β]; ρ̂(k) , û− ) =  n o 1 1 − log tr Kβ−1 Ŝ (k) − log det Kβ + k1 , 2 2 (47) where k1 is constant. We now rewrite the first order stable spline kernel using the factorization (see [26]) Kβ = ∆−1 Wβ ∆−T , (48) where ∆ is defined in (14) and   β n−1 Wβ := (β − β 2 )diag 1, β, . . . , β n−2 , . 1−β 13 (49) From (15), we find (k) Q2 ([λ∗ β]; ρ̂(k) , û− ) = ! n n X X (k) −1 n log dˆ w + log wβ,ii + k2 , i β,ii i=1 (50) i=1 (k) where dˆi and wβ,ii are the i-th diagonal elements of dˆ(k) and of Wβ respectively, and k2 is a constant. If we define the function (21), we can rewrite (50) as (20). so that we obtain (20) and (21). Using a similar reasoning, we can rewrite (46) as (19). Theorem 2 Consider the ML criterion (27). The proof follows the same arguments as the proof of Theorem 1, with the optimization carried out on ρ only and with u− = u−|+ . Theorem 3 Consider the ML criterion (30). Consider the complete data log-likelihood L2 (y, g) := log p(y, g, u− ; ρ, ) , (51) (k) (k) Given any estimates ρ̂(k) and û− , take the expectation with respect to p(g|y; ρ̂(k) , û− ). We obtain   (k) (k) E L2 (y, g) = Q1 (u− ; ρ̂(k) , û− ) + Q2 (ρ; ρ̂(k) , û− ) T  1 − u−− u−|+ Σ−1 (52) −|+ u−− u−|+ , 2 with Q1 and Q2 defined in (37) and (38). Collecting the terms in u− and using (44) we obtain an unconstrained optimization problem in u− , that gives (31). The optimization in ρ follows the same procedure as in Theorem 1 and gives (32) and (33). References [1] A. N. Tikhonov and V. Y. Arsenin. Solutions of ill-posed problems. Vh Winston, 1977. i s b n: 0470991240. [2] T. Hastie, R. Tibshirani, J. Friedman, and J. Franklin. The elements of statistical learning: data mining, inference and prediction. Springer-Verlag New York Inc., 2009. i s b n: 0387848576. [3] W. James and C. Stein. “Estimation with quadratic loss”. Proceedings of the fourth Berkeley symposium on mathematical statistics and probability. Vol. 1. 1961. 1961, pp. 361–379. 14 [4] L. Ljung. System Identification, Theory for the User. Prentice Hall, 1999. [5] G. Pillonetto, F. Dinuzzo, T. Chen, G. D. Nicolao, and L. Ljung. “Kernel methods in system identification, machine learning and function estimation: A survey”. Automatica 50.3 (2014), pp. 657–682. d o i: 10.1016/j. automatica.2014.01.001. [6] B. Schölkopf and A. J. Smola. Learning with kernels: support vector machines, regularization, optimization, and beyond. MIT press, 2002. [7] G. Pillonetto and G. De Nicolao. “A new kernel-based approach for linear system identification”. Automatica 46.1 (2010), pp. 81–93. d o i: doi : 10.1016/j.automatica.2009.10.031. [8] G. Pillonetto, A. Chiuso, and G. De Nicolao. “Prediction error identification of linear systems: a nonparametric Gaussian regression approach”. Automatica 47.2 (2011), pp. 291–305. d o i: 10.1016/j.automatica.2010.11.004. [9] G. Pillonetto, A. Chiuso, and G. De Nicolao. “Regularized estimation of sums of exponentials in spaces generated by stable spline kernels”. Proc. Amer. Control Conf. (ACC). 2010, pp. 498–503. d o i: 10.1109/ACC.2010. 5530862. [10] G. Bottegal and G. Pillonetto. “Regularized spectrum estimation using stable spline kernels”. Automatica 49.11 (2013), pp. 3199–3209. d o i: 10.1016/j.automatica.2013.08.010. [11] T. Chen, H. Ohlsson, and L. Ljung. “On the estimation of transfer functions, regularizations and Gaussian processes—Revisited”. Automatica 48.8 (2012), pp. 1525–1535. d o i: 10.1016/j.automatica.2012.05.026. [12] T. Chen and L. Ljung. “Constructive State Space Model Induced Kernels for Regularized System Identification”. Proc. IFAC World Congr. Vol. 19. 1. 2014, pp. 1047–1052. d o i: 10.3182/20140824-6-ZA-1003.01254. [13] J. Maritz and T. Lwin. Empirical bayes methods. Chapman and Hall London, 1989. i s b n: 9780412277603. [14] G. Wahba. Spline models for observational data. Vol. 59. SIAM, 1990. i s b n: 0898712440. [15] T. Söderström and P. Stoica. System identification. Prentice-Hall, Inc., 1988. i s b n: 9780138812362. [16] S. Beghelli, R. Guidorzi, and U. Soverini. “The Frisch scheme in dynamic system identification”. Automatica 26.1 (1990), pp. 171–176. d o i: 10. 1016/0005-1098(90)90168-h. [17] A. Yeredor. “The joint MAP-ML criterion and its relation to ML and to extended least-squares”. IEEE Trans. Signal Process. 48.12 (2000), pp. 3484–3492. d o i: 10.1109/78.887041. [18] A. P. Dempster, N. M. Laird, and D. B. Rubin. “Maximum likelihood from incomplete data via the EM algorithm”. J. R. Stat. Soc. Ser. B. Stat. Methodol. (1977), pp. 1–38. 15 [19] R. S. Risuleo, G. Bottegal, and H. Hjalmarsson. “A kernel-based approach to Hammerstein system identication”. Proc. IFAC Symp. System Identification (SYSID). Vol. 48. 28. 2015, pp. 1011–1016. d o i: doi: 10.1016/j.ifacol.2015.12.263. [20] G. Bottegal, R. S. Risuleo, and H. Hjalmarsson. “Blind system identification using kernel-based methods”. Proc. IFAC Symp. System Identification (SYSID). Vol. 48. 28. 2015, pp. 466–471. d o i: doi:10.1016/j.ifacol. 2015.12.172. [21] G. Pillonetto and G. De Nicolao. “Kernel selection in linear system identification Part I: A Gaussian process perspective”. Proc. IEEE Conf. Decis. Control - European Control Conf. (CDC-ECC). 2011, pp. 4318–4325. d o i: 10.1109/CDC.2011.6160606. [22] B. D. O. Anderson and J. B. Moore. Optimal filtering. Courier Corporation, 2012. [23] G. McLachlan and T. Krishnan. The EM algorithm and extensions. Vol. 382. John Wiley and Sons, 2007. i s b n: 9780471201700. [24] P. Tseng. “An Analysis of the EM Algorithm and Entropy-Like Proximal Point Methods”. Mathematics of Operations Research 29.1 (2004), pp. 27– 44. d o i: 10.1287/moor.1030.0073. [25] A. S. Papoulis and U. Pillai. Probability, Random Variables, and Stochastic Processes. McGraw-Hill Education Ltd, 2002. i s b n: 0071226613. [26] F. Carli. “On the maximum entropy property of the first-order stable spline kernel and its implications”. Proc. IEEE Conf. Control Applicat. (CCA). IEEE. 2014, pp. 409–414. d o i: 10.1109/CCA.2014.6981380. 16
3cs.SY
Logical Methods in Computer Science Vol. 1 (2:5) 2005, pp. 1–39 www.lmcs-online.org Submitted Published Apr. 1, 2005 Nov. 8, 2005 AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY MALGORZATA BIERNACKA, DARIUSZ BIERNACKI, AND OLIVIER DANVY BRICS, Department of Computer Science, University of Aarhus IT-parken, Aabogade 34, DK-8200 Aarhus N, Denmark e-mail address: {mbiernac,dabi,danvy}@brics.dk Abstract. We present an abstract machine and a reduction semantics for the lambdacalculus extended with control operators that give access to delimited continuations in the CPS hierarchy. The abstract machine is derived from an evaluator in continuationpassing style (CPS); the reduction semantics (i.e., a small-step operational semantics with an explicit representation of evaluation contexts) is constructed from the abstract machine; and the control operators are the shift and reset family. We also present new applications of delimited continuations in the CPS hierarchy: finding list prefixes and normalization by evaluation for a hierarchical language of units and products. 1. Introduction The studies of delimited continuations can be classified in two groups: those that use continuation-passing style (CPS) and those that rely on operational intuitions about control instead. Of the latter, there is a large number proposing a variety of control operators [5, 37, 40, 41, 49, 52, 53, 65, 70, 74, 80] which have found applications in models of control, concurrency, and type-directed partial evaluation [8,52,75]. Of the former, there is the work revolving around the family of control operators shift and reset [27–29,32,42,43,55,56,66,80] which have found applications in non-deterministic programming, code generation, partial evaluation, normalization by evaluation, computational monads, and mobile computing [6, 7, 9, 17, 22, 23, 33, 34, 44, 46, 48, 51, 57, 59, 61, 72, 77–79]. The original motivation for shift and reset was a continuation-based programming pattern involving several layers of continuations. The original specification of these operators relied both on a repeated CPS transformation and on an evaluator with several layers of continuations (as is obtained by repeatedly transforming a direct-style evaluator into continuation-passing style). Only subsequently have shift and reset been specified operationally, by developing operational analogues of a continuation semantics and of the CPS transformation [32]. 2000 ACM Subject Classification: D.1.1; F.3.2. Key words and phrases: Delimited continuations, abstract machines, reduction semantics. l LOGICAL METHODS IN COMPUTER SCIENCE c DOI:10.2168/LMCS-1 (2:5) 2005 CC M. Biernacka, D. Biernacki, and O. Danvy Creative Commons 2 M. BIERNACKA, D. BIERNACKI, AND O. DANVY The goal of our work here is to establish a new operational foundation for delimited continuations, using CPS as a guideline. To this end, we start with the original evaluator for shift1 and reset1 . This evaluator uses two layers of continuations: a continuation and a meta-continuation. We then defunctionalize it into an abstract machine [1] and we construct the corresponding reduction semantics [36], as pioneered by Felleisen and Friedman [39]. The development scales to shiftn and resetn . It is reusable for any control operators that are compatible with CPS, i.e., that can be characterized with a (possibly iterated) CPS translation or with a continuation-based evaluator. It also pinpoints where operational intuitions go beyond CPS. This article is structured as follows. In Section 2, we review the enabling technology of our work: Reynolds’s defunctionalization, the observation that a defunctionalized CPS program implements an abstract machine, and the observation that Felleisen’s evaluation contexts are the defunctionalized continuations of a continuation-passing evaluator; we demonstrate this enabling technology on a simple example, arithmetic expressions. In Section 3, we illustrate the use of shift and reset with the classic example of finding list prefixes, using an ML-like programming language. In Section 4, we then present our main result: starting from the original evaluator for shift and reset, we defunctionalize it into an abstract machine; we analyze this abstract machine and construct the corresponding reduction semantics. In Section 5, we extend this result to the CPS hierarchy. In Section 6, we illustrate the CPS hierarchy with a class of normalization functions for a hierarchical language of units and products. 2. From evaluator to reduction semantics for arithmetic expressions We demonstrate the derivation from an evaluator to a reduction semantics. The derivation consists of the following steps: (1) we start from an evaluator for a given language; if it is in direct style, we CPStransform it; (2) we defunctionalize the CPS evaluator, obtaining a value-based abstract machine; (3) we modify the abstract machine to make it term-based instead of value-based; in particular, if the evaluator uses an environment, then so does the corresponding value-based abstract machine, and in that case, making the machine term-based leads us to use substitutions rather than an environment; (4) we analyze the transitions of the term-based abstract machine to identify the evaluation strategy it implements and the set of reductions it performs; the result is a reduction semantics. The first two steps are based on previous work on a functional correspondence between evaluators and abstract machines [1–3, 17, 26], which itself is based on Reynolds’s seminal work on definitional interpreters [71]. The last two steps follow the lines of Felleisen and Friedman’s original work on a reduction semantics for the call-by-value λ-calculus extended with control operators [39]. The last step has been studied further by Hardin, Maranget, and Pagano [50] in the context of explicit substitutions and by Biernacka, Danvy, and Nielsen [15, 16, 31]. In the rest of this section, our running example is the language of arithmetic expressions, formed using natural numbers (the values) and additions (the computations): exp ∋ e ::= pmq | e1 + e2 AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 3 • Values: val ∋ v ::= m • Evaluation function: eval : exp → val eval (pmq) = m eval (e1 + e2 ) = eval (e1 ) + eval (e2 ) • Main function: evaluate : exp → val evaluate (e) = eval (e) Figure 1: A direct-style evaluator for arithmetic expressions • Values: val ∋ v ::= m • Continuations: cont = val → val • Evaluation function: eval : exp × cont → val eval (pmq, k) = k m eval (e1 + e2 , k) = eval (e1 , λm1 . eval (e2 , λm2 . k (m1 + m2 ))) • Main function: evaluate : exp → val evaluate (e) = eval (e, λv. v) Figure 2: A continuation-passing evaluator for arithmetic expressions 2.1. The starting point: an evaluator in direct style. We define an evaluation function for arithmetic expressions by structural induction on their syntax. The resulting directstyle evaluator is displayed in Figure 1. 2.2. CPS transformation. We CPS-transform the evaluator by naming intermediate results, sequentializing their computation, and introducing an extra functional parameter, the continuation [29, 68, 76]. The resulting continuation-passing evaluator is displayed in Figure 2. 2.3. Defunctionalization. The generalization of closure conversion [60] to defunctionalization is due to Reynolds [71]. The goal is to represent a functional value with a first-order data structure. The means is to partition the function space into a first-order sum where each summand corresponds to a lambda-abstraction in the program. In a defunctionalized program, function introduction is thus represented as an injection, and function elimination as a call to a first-order apply function implementing a case dispatch. In an ML-like functional language, sums are represented as data types, injections as data-type constructors, and apply functions are defined by case over the corresponding data types [30]. Here, we defunctionalize the continuation of the continuation-passing evaluator in Figure 2. We thus need to define a first-order algebraic data type and its apply function. To this end, we enumerate the lambda-abstractions that give rise to the inhabitants of this function space; there are three: the initial continuation in evaluate and the two continuations in eval. The initial continuation is closed, and therefore the corresponding algebraic constructor is nullary. The two other continuations have two free variables, and therefore 4 M. BIERNACKA, D. BIERNACKI, AND O. DANVY • Values: val ∋ v ::= m • Defunctionalized continuations: cont ∋ k ::= [ ] | ADD2 (e, k) | ADD1 (v, k) • Functions eval : exp × cont → val and apply cont : cont × val → val: eval (pmq, k) = apply cont (k, m) eval (e1 + e2 , k) = eval (e1 , ADD2 (e2 , k)) apply cont ([ ], v) = v apply cont (ADD2 (e2 , k), v1 ) = eval (e2 , ADD1 (v1 , k)) apply cont (ADD1 (m1 , k), m2 ) = apply cont (k, m1 + m2 ) • Main function: evaluate : exp → val evaluate (e) = eval (e, [ ]) Figure 3: A defunctionalized continuation-passing evaluator for arithmetic expressions the corresponding constructors are binary. As for the apply function, it interprets the algebraic constructors. The resulting defunctionalized evaluator is displayed in Figure 3. 2.4. Abstract machines as defunctionalized continuation-passing programs. Elsewhere [1, 26], we have observed that a defunctionalized continuation-passing program implements an abstract machine: each configuration is the name of a function together with its arguments, and each function clause represents a transition. (As a corollary, we have also observed that the defunctionalized continuation of an evaluator forms what is known as an ‘evaluation context’ [25, 30, 39].) Indeed Plotkin’s Indifference Theorem [68] states that continuation-passing programs are independent of their evaluation order. In Reynolds’s words [71], all the subterms in applications are ‘trivial’; and in Moggi’s words [64], these subterms are values and not computations. Furthermore, continuation-passing programs are tail recursive [76]. Therefore, since in a continuation-passing program all calls are tail calls and all subcomputations are elementary, a defunctionalized continuation-passing program implements a transition system [69], i.e., an abstract machine. We thus reformat Figure 3 into Figure 4. The correctness of the abstract machine with respect to the initial evaluator follows from the correctness of CPS transformation and of defunctionalization. 2.5. From value-based abstract machine to term-based abstract machine. We observe that the domain of expressible values in Figure 4 can be embedded in the syntactic domain of expressions. We therefore adapt the abstract machine to work on terms rather than on values. The result is displayed in Figure 5; it is a syntactic theory [36]. 2.6. From term-based abstract machine to reduction semantics. The method of deriving a reduction semantics from an abstract machine was introduced by Felleisen and Friedman [39] to give a reduction semantics for control operators. Let us demonstrate it. We analyze the transitions of the abstract machine in Figure 5. The second component of eval -transitions—the stack representing “the rest of the computation”—has already been identified as the evaluation context of the currently processed expression. We thus read a AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 5 • Values: v ::= m • Evaluation contexts: C ::= [ ] | ADD2 (e, C) | ADD1 (v, C) • Initial transition, transition rules, and final transition: e ⇒ he, [ ]ieval hpmq, Cieval ⇒ hC, micont he1 + e2 , Cieval hADD2 (e2 , C), v1 icont ⇒ he1 , ADD2 (e2 , C)ieval ⇒ he2 , ADD1 (v1 , C)ieval hADD1 (m1 , C), m2 icont h[ ], vicont ⇒ hC, m1 + m2 icont ⇒ v Figure 4: A value-based abstract machine for evaluating arithmetic expressions • Expressions and values: e ::= v | e1 + e2 v ::= pmq • Evaluation contexts: C ::= [ ] | ADD2 (e, C) | ADD1 (v, C) • Initial transition, transition rules, and final transition: e ⇒ he, [ ]ieval hpmq, Cieval he1 + e2 , Cieval ⇒ hC, pmqicont ⇒ he1 , ADD2 (e2 , C)ieval hADD2 (e2 , C), v1 icont hADD1 (pm1q, C), pm2qicont ⇒ he2 , ADD1 (v1 , C)ieval ⇒ hC, pm1 + m2qicont h[ ], vicont ⇒ v Figure 5: A term-based abstract machine for processing arithmetic expressions configuration he, Cieval as a decomposition of some expression into a sub-expression e and an evaluation context C. Next, we identify the reduction and decomposition rules in the transitions of the machine. Since a configuration can be read as a decomposition, we compare the left-hand side and the right-hand side of each transition. If they represent the same expression, then the given transition defines a decomposition (i.e., it searches for the next redex according to some evaluation strategy); otherwise we have found a redex. Moreover, reading the decomposition rules from right to left defines a ‘plug’ function that reconstructs an expression from its decomposition. Here the decomposition function as read off the abstract machine is total. In general, however, it may be undefined for stuck terms; one can then extend it straightforwardly into a total function that decomposes a term into a context and a potential redex, i.e., an actual redex (as read off the machine), or a stuck redex. 6 M. BIERNACKA, D. BIERNACKI, AND O. DANVY In this simple example there is only one reduction rule. This rule performs the addition of natural numbers: (add) C [pm1q + pm2q] → C [pm1 + m2q] The remaining transitions decompose an expression according to the left-to-right strategy. 2.7. From reduction semantics to term-based abstract machine. In Section 2.6, we have constructed the reduction semantics corresponding to the abstract machine of Figure 5, as pioneered by Felleisen and Friedman [38, 39]. Over the last few years [15, 16, 24, 31], Biernacka, Danvy, and Nielsen have studied the converse transformation and systematized the construction of an abstract machine from a reduction semantics. The main idea is to short-cut the decompose-contract-plug loop, in the definition of evaluation as the transitive closure of one-step reduction, into a refocus-contract loop. The refocus function is constructed as an efficient (i.e., deforested) composition of plug and decompose that maps a term and a context either to a value or to a redex and a context. The result is a ‘pre-abstract machine’ computing the transitive closure of the refocus function. This pre-abstract machine can then be simplified into an eval/apply abstract machine. It is simple to verify that using refocusing, one can go from the reduction semantics of Section 2.6 to the eval/apply abstract machine of Figure 5. 2.8. Summary and conclusion. We have demonstrated how to derive an abstract machine out of an evaluator, and how to construct the corresponding reduction semantics out of this abstract machine. In Section 4, we apply this derivation and this construction to the first level of the CPS hierarchy, and in Section 5, we apply them to an arbitrary level of the CPS hierarchy. But first, let us illustrate how to program with delimited continuations. 3. Programming with delimited continuations We present two examples of programming with delimited continuations. Given a list xs and a predicate p, we want (1) to find the first prefix of xs whose last element satisfies p, and (2) to find all such prefixes of xs. For example, given the predicate λm.m > 2 and the list [0, 3, 1, 4, 2, 5], the first prefix is [0, 3] and the list of all the prefixes is [[0, 3], [0, 3, 1, 4], [0, 3, 1, 4, 2, 5]]. In Section 3.1, we start with a simple solution that uses a first-order accumulator. This simple solution is in defunctionalized form. In Section 3.2, we present its higher-order counterpart, which uses a functional accumulator. This functional accumulator acts as a delimited continuation. In Section 3.3, we present its direct-style counterpart (which uses shift and reset) and in Section 3.4, we present its continuation-passing counterpart (which uses two layers of continuations). In Section 3.5, we introduce the CPS hierarchy informally. We then mention a typing issue in Section 3.6 and review related work in Section 3.7. 3.1. Finding prefixes by accumulating lists. A simple solution is to accumulate the prefix of the given list in reverse order while traversing this list and testing each of its elements: • if no element satisfies the predicate, there is no prefix and the result is the empty list; • otherwise, the prefix is the reverse of the accumulator. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY find first prefix a (p, xs) def = letrec visit (nil , a) = nil | visit (x :: xs, a) = let a ′ = x :: a in if p x then reverse (a ′ , nil ) else visit (xs, a ′ ) and reverse (nil , xs) = xs | reverse (x :: a, xs) = reverse (a, x :: xs) in visit (xs, nil) find all prefixes a (p, xs) def letrec visit (nil , a) = nil | visit (x :: xs, a) = let a ′ = x :: a in if p x then (reverse (a ′ , nil)) :: (visit (xs, a ′ )) else visit (xs, a ′ ) and reverse (nil , xs) = xs | reverse (x :: a, xs) = reverse (a, x :: xs) in visit (xs, nil) = 7 To find the first prefix, one stops as soon as a satisfactory list element is found. To list all the prefixes, one continues the traversal, adding the current prefix to the list of the remaining prefixes. We observe that the two solutions are in defunctionalized form [30,71]: the accumulator has the data type of a defunctionalized function and reverse is its apply function. We present its higher-order counterpart next [54]. 3.2. Finding prefixes by accumulating list constructors. Instead of accumulating the prefix in reverse order while traversing the given list, we accumulate a function constructing the prefix: • if no element satisfies the predicate, the result is the empty list; • otherwise, we apply the functional accumulator to construct the prefix. 8 M. BIERNACKA, D. BIERNACKI, AND O. DANVY find first prefix c 1 (p, xs) def = letrec visit (nil , k ) = nil | visit (x :: xs, k ) = let k ′ = λvs.k (x :: vs) in if p x then k ′ nil else visit (xs, k ′ ) in visit (xs, λvs.vs) find all prefixes c 1 (p, xs) def letrec visit (nil , k ) = nil | visit (x :: xs, k ) = let k ′ = λvs.k (x :: vs) in if p x then (k ′ nil) :: (visit (xs, k ′ )) else visit (xs, k ′ ) in visit (xs, λvs.vs) = To find the first prefix, one applies the functional accumulator as soon as a satisfactory list element is found. To list all such prefixes, one continues the traversal, adding the current prefix to the list of the remaining prefixes. Defunctionalizing these two definitions yields the two definitions of Section 3.1. The functional accumulator is a delimited continuation: • In find first prefix c 1 , visit is written in CPS since all calls are tail calls and all sub-computations are elementary. The continuation is initialized in the initial call to visit, discarded in the base case, extended in the induction case, and used if a satisfactory prefix is found. • In find all prefixes c 1 , visit is almost written in CPS except that the continuation is composed if a satisfactory prefix is found: it is used twice—once where it is applied to the empty list to construct a prefix, and once in the visit of the rest of the list to construct a list of prefixes; this prefix is then prepended to this list of prefixes. These continuation-based programming patterns (initializing a continuation, not using it, or using it more than once as if it were a composable function) have motivated the control operators shift and reset [28, 29]. Using them, in the next section, we write visit in direct style. 3.3. Finding prefixes in direct style. The two following local functions are the directstyle counterpart of the two local functions in Section 3.2: find first prefix c 0 (p, xs) def = letrec visit nil = Sk.nil | visit (x :: xs) = x :: (if p x then nil else visit xs) in h visit xsii AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY find all prefixes c 0 (p, xs) def = 9 letrec visit nil = Sk.nil | visit (x :: xs) = x :: if p x then Sk′ .hhk ′ nilii :: h k′ (visit xs)ii else visit xs in h visit xsii In both cases, visit is in direct style, i.e., it is not passed any continuation. The initial calls to visit are enclosed in the control delimiter reset (noted h ·ii for conciseness). In the base cases, the current (delimited) continuation is captured with the control operator shift (noted S), which has the effect of emptying the (delimited) context; this captured continuation is bound to an identifier k, which is not used; nil is then returned in the emptied context. In the induction case of find all prefixes c 0 , if the predicate is satisfied, visit captures the current continuation and applies it twice—once to the empty list to construct a prefix, and once to the result of visiting the rest of the list to construct a list of prefixes; this prefix is then prepended to the list of prefixes. CPS-transforming these two local functions yields the two definitions of Section 3.2 [29]. 3.4. Finding prefixes in continuation-passing style. The two following local functions are the continuation-passing counterpart of the two local functions in Section 3.2: def find first prefix c 2 (p, xs) = letrec visit (nil , k1 , k2 ) = k2 nil | visit (x :: xs, k1 , k2 ) = let k1′ = λ(vs, k2′ ).k1 (x :: vs, k2′ ) in if p x then k1′ (nil , k2 ) else visit (xs, k1′ , k2 ) in visit (xs, λ(vs, k2 ).k2 vs, λvs.vs) def find all prefixes c 2 (p, xs) = letrec visit (nil , k1 , k2 ) = k2 nil | visit (x :: xs, k1 , k2 ) = let k1′ = λ(vs, k2′ ).k1 (x :: vs, k2′ ) in if p x then k1′ (nil , λvs.visit (xs, k1′ , λvss.k2 (vs :: vss))) else visit (xs, k1′ , k2 ) in visit (xs, λ(vs, k2 ).k2 vs, λvss.vss) CPS-transforming the two local functions of Section 3.2 adds another layer of continuations and restores the syntactic characterization of all calls being tail calls and all subcomputations being elementary. 3.5. The CPS hierarchy. If k2 were used non-tail recursively in a variant of the examples of Section 3.4, we could CPS-transform the definitions one more time, adding one more layer of continuations and restoring the syntactic characterization of all calls being tail calls and all sub-computations being elementary. We could also map this definition back to direct style, eliminating k2 but accessing it with shift. If the result were mapped back to direct 10 M. BIERNACKA, D. BIERNACKI, AND O. DANVY style one more time, k2 would then be accessed with a new control operator, shift2 , and k1 would be accessed with shift (or more precisely with shift1 ). All in all, successive CPS-transformations induce a CPS hierarchy [28,32], and abstracting control up to each successive layer is achieved with successive pairs of control operators shift and reset—reset to initialize the continuation up to a level, and shift to capture a delimited continuation up to this level. Each pair of control operators is indexed by the corresponding level in the hierarchy. Applying a captured continuation packages all the current layers on the next layer and restores the captured layers. When a captured continuation completes, the packaged layers are put back into place and the computation proceeds. (This informal description is made precise in Section 4.) 3.6. A note about typing. The type of find all prefixes c 1 , in Section 3.2, is (α → bool ) × α list → α list list and the type of its local function visit is α list × (α list → α list) → α list list. In this example, the co-domain of the continuation is not the same as the co-domain of visit. Thus find all prefixes c 0 provides a simple and meaningful example where Filinski’s typing of shift [42] does not fit, since it must be used at type ((β → ans) → ans) → β for a given type ans, i.e., the answer type of the continuation and the type of the computation must be the same. In other words, control effects are not allowed to change the types of the contexts. Due to a similar restriction on the type of shift, the example does not fit either in Murthy’s pseudo-classical type system for the CPS hierarchy [66] and in Wadler’s most general monadic type system [80, Section 3.4]. It however fits in Danvy and Filinski’s original type system [27] which Ariola, Herbelin, and Sabry have recently embedded in classical subtractive logic [5]. 3.7. Related work. The example considered in this section builds on the simpler function that unconditionally lists the successive prefixes of a given list. This simpler function is a traditional example of delimited continuations [21, 73]: • In the Lisp Pointers [21], Danvy presents three versions of this function: a typed continuation-passing version (corresponding to Section 3.2), one with delimited control (corresponding to Section 3.3), and one in assembly language. • In his PhD thesis [73, Section 6.3], Sitaram presents two versions of this function: one with an accumulator (corresponding to Section 3.1) and one with delimited control (corresponding to Section 3.3). In Section 3.2, we have shown that the continuation-passing version mediates the version with an accumulator and the version with delimited control since defunctionalizing the continuation-passing version yields one and mapping it back to direct style yields the other. 3.8. Summary and conclusion. We have illustrated delimited continuations with the classic example of finding list prefixes, using CPS as a guideline. Direct-style programs using shift and reset can be CPS-transformed into continuation-passing programs where some calls may not be tail calls and some sub-computations may not be elementary. One more CPS transformation establishes this syntactic property with a second layer of continuations. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 11 • Terms: term ∋ t ::= pmq | x | λx .t | t0 t1 | succ t | h tii | Sk .t • Values: val ∋ v ::= m | f • Answers, meta-continuations, continuations and functions: ans = val k2 ∈ cont2 = val → ans k1 ∈ cont1 = val × cont2 → ans f ∈ fun = val × cont1 × cont2 → ans • Initial continuation and meta-continuation: θ1 = λ(v, k2 ). k2 v θ2 = λv. v • Environments: env ∋ e ::= eempty | e[x 7→ v] • Evaluation function: eval : term × env × cont1 × cont2 → ans eval (pmq, eval (x , eval (λx .t, eval (t0 t1 , eval (succ t, eval (hhtii , eval (Sk.t, e, e, e, e, e, e, e, k1 , k1 , k1 , k1 , k1 , k1 , k1 , k2 ) k2 ) k2 ) k2 ) k2 ) k2 ) k2 ) = = = = = = = k1 (m, k2 ) k1 (e(x ), k2 ) k1 (λ(v, k1′ , k2′ ). eval (t, e[x 7→ v], k1′ , k2′ ), k2 ) eval (t0 , e, λ(f, k2′ ). eval (t1 , e, λ(v, k2′′ ). f (v, k1 , k2′′ ), k2′ ), k2 ) eval (t, e, λ(m, k2′ ). k1 (m + 1, k2′ ), k2 ) eval (t, e, θ1 , λv. k1 (v, k2 )) eval (t, e[k 7→ c], θ1 , k2 ) where c = λ(v, k1′ , k2′ ). k1 (v, λv ′ . k1′ (v ′ , k2′ )) • Main function: evaluate : term → val evaluate (t) = eval (t, eempty , θ1 , θ2 ) Figure 6: An environment-based evaluator for the first level of the CPS hierarchy Further CPS transformations provide the extra layers of continuation that are characteristic of the CPS hierarchy. In the next section, we specify the λ-calculus extended with shift and reset. 4. From evaluator to reduction semantics for delimited continuations We derive a reduction semantics for the call-by-value λ-calculus extended with shift and reset, using the method demonstrated in Section 2. First, we transform an evaluator into an environment-based abstract machine. Then we eliminate the environment from this abstract machine, making it substitution-based. Finally, we read all the components of a reduction semantics off the substitution-based abstract machine. Terms consist of integer literals, variables, λ-abstractions, function applications, applications of the successor function, reset expressions, and shift expressions: t ::= pmq | x | λx .t | t0 t1 | succ t | h tii | Sk .t Programs are closed terms. 12 M. BIERNACKA, D. BIERNACKI, AND O. DANVY This source language is a subset of the language used in the examples of Section 3. Adding the remaining constructs is a straightforward exercise and does not contribute to our point here. 4.1. An environment-based evaluator. Figure 6 displays an evaluator for the language of the first level of the CPS hierarchy. This evaluation function represents the original call-by-value semantics of the λ-calculus with shift and reset [28], augmented with integer literals and applications of the successor function. It is defined by structural induction over the syntax of terms, and it makes use of an environment e, a continuation k1 , and a meta-continuation k2 . The evaluation of a terminating program that does not get stuck (i.e., a program where no ill-formed applications occur in the course of evaluation) yields either an integer, a function representing a λ-abstraction, or a captured continuation. Both evaluate and eval are partial functions to account for non-terminating or stuck programs. The environment stores previously computed values of the free variables of the term under evaluation. The meta-continuation intervenes to interpret reset expressions and to apply captured continuations. Otherwise, it is passively threaded through the evaluation of literals, variables, λ-abstractions, function applications, and applications of the successor function. (If it were not for shift and reset, and if eval were curried, k2 could be eta-reduced and the evaluator would be in ordinary continuation-passing style.) The reset control operator is used to delimit control. A reset expression h tii is interpreted by evaluating t with the initial continuation and a meta-continuation on which the current continuation has been “pushed.” (Indeed, and as will be shown in Section 4.2, defunctionalizing the meta-continuation yields the data type of a stack [30].) The shift control operator is used to abstract (delimited) control. A shift expression Sk.t is interpreted by capturing the current continuation, binding it to k, and evaluating t in an environment extended with k and with a continuation reset to the initial continuation. Applying a captured continuation is achieved by “pushing” the current continuation on the meta-continuation and applying the captured continuation to the new meta-continuation. Resuming a continuation is achieved by reactivating the “pushed” continuation with the corresponding meta-continuation. 4.2. An environment-based abstract machine. The evaluator displayed in Figure 6 is already in continuation-passing style. Therefore, we only need to defunctionalize its expressible values and its continuations to obtain an abstract machine. This abstract machine is displayed in Figure 7. The abstract machine consists of three sets of transitions: eval for interpreting terms, cont 1 for interpreting the defunctionalized continuations (i.e., the evaluation contexts),1 and cont 2 for interpreting the defunctionalized meta-continuations (i.e., the meta-contexts).2 The set of possible values includes integers, closures and captured contexts. In the original 1The grammar of evaluation contexts in Figure 7 is isomorphic to the grammar of evaluation contexts in the standard inside-out notation: C1 ::= [ ] | C1 [[ ] (t, e)] | C1 [succ [ ]] | C1 [v [ ]] 2To build on Peyton Jones’s terminology [62], this abstract machine is therefore in ‘eval/apply/metaapply’ form. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 13 evaluator, the latter two were represented as higher-order functions, but defunctionalizing expressible values of the evaluator has led them to be distinguished. This eval/apply/meta-apply abstract machine is an extension of the CEK machine [39], which is an eval/apply machine, with the meta-context C2 and its two transitions, and the two transitions for shift and reset. C2 intervenes to process reset expressions and to apply captured continuations. Otherwise, it is passively threaded through the processing of literals, variables, λ-abstractions, function applications, and applications of the successor function. (If it were not for shift and reset, C2 and its transitions could be omitted and the abstract machine would reduce to the CEK machine.) Given an environment e, a context C1 , and a meta-context C2 , a reset expression h tii is processed by evaluating t with the same environment e, the empty context •, and a meta-context where C1 has been pushed on C2 . Given an environment e, a context C1 , and a meta-context C2 , a shift expression Sk.t is processed by evaluating t with an extension of e where k denotes C1 , the empty context [ ], and a meta-context C2 . Applying a captured context C1′ is achieved by pushing the current context C1 on the current meta-context C2 and continuing with C1′ . Resuming a context C1 is achieved by popping it off the meta-context C2 · C1 and continuing with C1 . The correctness of the abstract machine with respect to the evaluator is a consequence of the correctness of defunctionalization. In order to express it formally, we define a partial function evale mapping a term t to a value v whenever the environment-based machine, started with t, stops with v. The following theorem states this correctness by relating observable results: Theorem 1. For any program t and any integer value m, evaluate (t) = m if and only if evale (t) = m. Proof. The theorem follows directly from the correctness of defunctionalization [10, 67]. The environment-based abstract machine can serve both as a foundation for implementing functional languages with control operators for delimited continuations and as a stepping stone in theoretical studies of shift and reset. In the rest of this section, we use it to construct a reduction semantics of shift and reset. 4.3. A substitution-based abstract machine. The environment-based abstract machine of Figure 7, on which we want to base our development, makes a distinction between terms and values. Since a reduction semantics is specified by purely syntactic operations (it gives meaning to terms by specifying their rewriting strategy and an appropriate notion of reduction, and is indeed also referred to as ‘syntactic theory’), we need to embed the domain of values back into the syntax. To this end we transform the environment-based abstract machine into the substitution-based abstract machine displayed in Figure 8. The transformation is standard, except that we also need to embed evaluation contexts in the syntax; hence the substitution-based machine operates on terms where “quoted” (in the sense of Lisp) contexts can occur. (If it were not for shift and reset, C2 and its transitions could be omitted and the abstract machine would reduce to the CK machine [39].) We write t{v/x } to denote the result of the usual capture-avoiding substitution of the value v for x in t. Formally, the relationship between the two machines is expressed with the following simulation theorem, where evaluation with the substitution-based abstract machine is captured by the partial function evals , defined analogously to evale . 14 M. BIERNACKA, D. BIERNACKI, AND O. DANVY • Terms: t ::= pmq | x | λx .t | t0 t1 | succ t | h tii | Sk .t • Values (integers, closures, and captured continuations): v ::= m | [x , t, e] | C1 • Environments: e ::= eempty | e[x 7→ v] • Evaluation contexts: C1 ::= [ ] | ARG((t, e), C1 ) | SUCC(C1 ) | FUN(v, C1 ) • Meta-contexts: C2 ::= • | C2 · C1 • Initial transition, transition rules, and final transition: t ⇒ ht, eempty , [ ], •ieval hpmq, hx , hλx .t, ht0 t1 , hsucc t, hhhtii , hSk .t, e, e, e, e, e, e, e, C1 , C1 , C1 , C1 , C1 , C1 , C1 , h[ ], v, hARG((t, e), C1 ), v, hSUCC(C1 ), m, hFUN([x , t, e], C1 ), v, hFUN(C1′ , C1 ), v, C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ hC1 , m, C2 icont1 hC1 , e (x ), C2 icont1 hC1 , [x , t, e], C2 icont1 ht0 , e, ARG((t1 , e), C1 ), C2 ieval ht, e, SUCC(C1 ), C2 ieval ht, e, [ ], C2 · C1 ieval ht, e[k 7→ C1 ], [ ], C2 ieval C2 icont1 C2 icont1 C2 icont1 C2 icont1 C2 icont1 ⇒ ⇒ ⇒ ⇒ ⇒ hC2 , vicont2 ht, e, FUN(v, C1 ), C2 ieval hC1 , m + 1, C2 icont1 ht, e[x 7→ v], C1 , C2 ieval hC1′ , v, C2 · C1 icont1 hC2 · C1 , vicont2 h•, vicont2 ⇒ hC1 , v, C2 icont1 ⇒ v Figure 7: An environment-based abstract machine for the first level of the CPS hierarchy Theorem 2. For any program t, either both evals (t) and evale (t) are undefined, or there exist values v, v ′ such that evals (t) = v, evale (t) = v ′ and T (v ′ ) = v. The function T relates a semantic value with its syntactic representation and is defined as follows:3 T (m) = pmq T ([x , t, e]) = λx .t{T (e(x1 ))/x1 } . . . {T (e(xn ))/xn }, where F V (λx . t) = {x1 , . . . , xn } T ([ ]) = [ ] T (ARG((t, e), C1 )) = ARG(t{T (e(x1 ))/x1 } . . . {T (e(xn ))/xn }, T (C1 )), where F V (t) = {x1 , . . . , xn } T (FUN(v, C1 )) = FUN(T (v), T (C1 )) T (SUCC(C1 )) = SUCC(T (C1 )) 3T is a generalization of Plotkin’s function Real [68]. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 15 • Terms and values: t ::= v | x | t0 t1 | succ t | h tii | Sk .t v ::= pmq | λx .t | C1 • Evaluation contexts: C1 ::= [ ] | ARG(t, C1 ) | SUCC(C1 ) | FUN(v, C1 ) • Meta-contexts: C2 ::= • | C2 · C1 • Initial transition, transition rules, and final transition: t ⇒ ht, [ ], •ieval hpmq, hλx .t, hC1′ , ht0 t1 , hsucc t, hhhtii , hSk .t, C1 , C1 , C1 , C1 , C1 , C1 , C1 , h[ ], v, hARG(t, C1 ), v, hSUCC(C1 ), pmq, hFUN(λx .t, C1 ), v, hFUN(C1′ , C1 ), v, C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ hC1 , pmq, C2 icont1 hC1 , λx .t, C2 icont1 hC1 , C1′ , C2 icont1 ht0 , ARG(t1 , C1 ), C2 ieval ht, SUCC(C1 ), C2 ieval ht, [ ], C2 · C1 ieval ht{C1 /k }, [ ], C2 ieval C2 icont1 C2 icont1 C2 icont1 C2 icont1 C2 icont1 ⇒ ⇒ ⇒ ⇒ ⇒ hC2 , vicont2 ht, FUN(v, C1 ), C2 ieval hC1 , pm + 1q, C2 icont1 ht{v/x }, C1 , C2 ieval hC1′ , v, C2 · C1 icont1 hC2 · C1 , vicont2 h•, vicont2 ⇒ hC1 , v, C2 icont1 ⇒ v Figure 8: A substitution-based abstract machine for the first level of the CPS hierarchy Proof. We extend the translation function T to meta-contexts and configurations, in the expected way, e.g., T (ht, e, C1 , C2 ieval ) = ht{T (e(x1 ))/x1 } . . . {T (e(xn ))/xn }, T (C1 ), T (C2 )ieval where F V (t) = {x1 , . . . , xn } Then it is straightforward to show that the two abstract machines operate in lock step with respect to the translation. Hence, for any program t, both machines diverge or they both stop (after the same number of transitions) with the values v and T (v), respectively. We now proceed to analyze the transitions of the machine displayed in Figure 8. We can think of a configuration ht, C1 , C2 ieval as the following decomposition of the initial term into a meta-context C2 , a context C1 , and an intermediate term t: C2 # C1 [t] where # separates the context and the meta-context. Each transition performs either a reduction, or a decomposition in search of the next redex. Let us recall that a decomposition is performed when both sides of a transition are partitions of the same term; in that case, depending on the structure of the decomposition C2 # C1 [t], a subpart of the term is chosen 16 M. BIERNACKA, D. BIERNACKI, AND O. DANVY to be evaluated next, and the contexts are updated accordingly. We also observe that eval transitions follow the structure of t, cont 1 -transitions follow the structure of C1 when the term has been reduced to a value, and cont 2 -transitions follow the structure of C2 when a value in the empty context has been reached. Next we specify all the components of the reduction semantics based on the analysis of the abstract machine. 4.4. A reduction semantics. A reduction semantics provides a reduction relation on expressions by defining values, evaluation contexts, and redexes [36, 38, 39, 82]. In the present case, • the values are already specified in the (substitution-based) abstract machine: v ::= pmq | λx .t | C1 • the evaluation contexts and meta-contexts are already specified in the abstract machine, as the data-type part of defunctionalized continuations; C1 ::= [ ] | ARG(t, C1 ) | FUN(v, C1 ) | SUCC(C1 ) C2 ::= • | C2 · C1 • we can read the redexes off the transitions of the abstract machine: r ::= succ pmq | (λx .t) v | Sk .t | C1′ v | h vii Based on the distinction between decomposition and reduction, we single out the following reduction rules from the transitions of the machine: (δ) (βλ ) (Sλ ) (βctx ) (Reset) C2 # C1 [succ pmq] C2 # C1 [(λx .t) v] C2 # C1 [Sk .t] C2 # C1 [C1′ v] C2 # C1 [hhvii ] → → → → → C2 # C1 [pm + 1q] C2 # C1 [t{v/x }] C2 # [t{C1 /k }] C2 · C1 # C1′ [v] C2 # C1 [v] (βλ ) is the usual call-by-value β-reduction; we have renamed it to indicate that the applied term is a λ-abstraction, since we can also apply a captured context, as in (βctx ). (Sλ ) is plausibly symmetric to (βλ ) — it can be seen as an application of the abstraction λk .t to the current context. Moreover, (βctx ) can be seen as performing both a reduction and a decomposition: it is a reduction because an application of a context with a hole to a value is reduced to the value plugged into the hole; and it is a decomposition because it changes the meta-context, as if the application were enclosed in a reset. Finally, (Reset) makes it possible to pass the boundary of a context when the term inside this context has been reduced to a value. The βctx -rule and the Sλ -rule give a justification for representing a captured context C1 as a term λx .hhC1 [x ]ii, as found in other studies of shift and reset [55, 56, 66]. In particular, the need for delimiting the captured context is a consequence of the βctx -rule. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 17 Finally, we can read the decomposition machine: decompose (t) = decompose ′ (t0 t1 , C1 , C2 ) = decompose ′ (succ t, C1 , C2 ) = decompose ′ (hhtii , C1 , C2 ) = decompose ′ (v, ARG(t, C1 ), C2 ) = function off the transitions of the abstract decompose ′ (t, [ ], •) decompose ′ (t0 , ARG(t1 , C1 ), C2 ) decompose ′ (t, SUCC(C1 ), C2 ) decompose ′ (t, [ ], C2 · C1 ) decompose ′ (t, FUN(v, C1 ), C2 ) In the remaining cases either a value or a redex has been found: decompose ′ (v, [ ], •) decompose ′ (v, [ ], C2 · C1 ) decompose ′ (Sk .t, C1 , C2 ) decompose ′ (v, FUN((λx .t), C1 ), C2 ) decompose ′ (v, FUN(C1′ , C1 ), C2 ) decompose ′ (pmq, SUCC(C1 ), C2 ) = = = = = = • # [v] C2 # C1 [hhvii ] C2 # C1 [Sk .t] C2 # C1 [(λx .t) v] C2 # C1 [C1′ v] C2 # C1 [succ pmq] An inverse of the decompose function, traditionally called plug , reconstructs a term from its decomposition: plug (• # [t]) plug (C2 · C1 # [t]) plug (C2 # (ARG(t′ , C1 ))[t]) plug (C2 # (FUN(v, C1 ))[t]) plug (C2 # (SUCC(C1 ))[t]) = = = = = t plug (C2 plug (C2 plug (C2 plug (C2 # # # # C1 [hhtii ]) C1 [t t′ ]) C1 [v t]) C1 [succ t]) In order to talk about unique decomposition, we need to define the set of potential redexes (i.e., the disjoint union of actual redexes and stuck redexes). The grammar of potential redexes reads as follows: p ::= succ v | v0 v1 | Sk .t | h vii Lemma 1 (Unique decomposition). A program t is either a value v or there exist a unique context C1 , a unique meta-context C2 and a potential redex p such that t = plug (C2 # C1 [p]). In the former case decompose (t) = • # [v] and in the latter case either decompose (t) = C2 # C1 [p] if p is an actual redex, or decompose (t) is undefined. Proof. The first part follows by induction on the structure of t. The second part follows from the equation decompose (plug (C2 # C1 [r])) = C2 # C1 [r] which holds for all C2 , C1 and r. It is evident that evaluating a program either using the derived reduction rules or using the substitution-based abstract machine yields the same result. Theorem 3. For any program t and any value v, evals (t) = v if and only if t →∗ v, where →∗ is the reflexive, transitive closure of the one-step reduction defined by the relation →. Proof. When evaluating with the abstract machine, each contraction is followed by decomposing the contractum in the current context and meta-context. When evaluating with the reduction rules, however, each contraction is followed by plugging the contractum and decomposing the resulting term. Therefore, the theorem follows from the equation decompose ′ (t, C1 , C2 ) = decompose (plug (C2 # C1 [t])) which holds for any C2 , C1 and t. 18 M. BIERNACKA, D. BIERNACKI, AND O. DANVY We have verified that using refocusing [16,31], one can go from this reduction semantics to the abstract machine of Figure 8. 4.5. Beyond CPS. Alternatively to using the meta-context to compose delimited continuations, as in Figure 7, we could compose them by concatenating their representation [41]. Such a concatenation function is defined as follows: [ ] ⋆ C1′ (ARG((t, e), C1 )) ⋆ C1′ (SUCC(C1 )) ⋆ C1′ (FUN(v, C1 )) ⋆ C1′ = = = = C1′ ARG((t, e), C1 ⋆ C1′ ) SUCC(C1 ⋆ C1′ ) FUN(v, C1 ⋆ C1′ ) (The second clause would read (ARG(t, C1 )) ⋆ C1′ = ARG(t, C1 ⋆ C1′ ) for the contexts of Figure 8.) Then, in Figures 7 and 8, we could replace the transition hFUN(C1′ , C1 ), v, C2 icont1 ⇒ hC1′ , v, C2 · C1 icont1 hFUN(C1′ , C1 ), v, C2 icont1 ⇒ hC1′ ⋆ C1 , v, C2 icont1 by the following one: This replacement changes the control effect of shift to that of Felleisen et al.’s F operator [37]. Furthermore, the modified abstract machine is in structural correspondence with Felleisen et al.’s abstract machine for F and # [37, 41]. This representation of control (as a list of ‘stack frames’) and this implementation of composing delimited continuations (by concatenating these lists) are at the heart of virtually all non-CPS-based accounts of delimited control. However, the modified environment-based abstract machine does not correspond to a defunctionalized continuation-passing evaluator because it is not in the range of defunctionalization [30] since the first-order representation of functions should have a single point of consumption. Here, the constructors of contexts are not solely consumed by the cont1 transitions of the abstract machine as in Figures 7 and 8, but also by ⋆. Therefore, the abstract machine that uses ⋆ is not in the range of Reynolds’s defunctionalization and it thus does not immediately correspond to a higherorder, continuation-passing evaluator. In that sense, control operators using ⋆ go beyond CPS. Elsewhere [18], we have rephrased the modified abstract machine to put it in defunctionalized form, and we have exhibited the corresponding higher-order evaluator and the corresponding ‘dynamic’ continuation-passing style. This dynamic CPS is not just plain CPS but is a form of continuation+state-passing style where the threaded state is a list of intermediate delimited continuations. Unexpectedly, it is also in structural correspondence with the architecture for delimited control recently proposed by Dybvig, Peyton Jones, and Sabry on other operational grounds [35]. 4.6. Static vs. dynamic delimited continuations. Irrespectively of any new dynamic CPS and any new architecture for delimited control, there seems to be remarkably few examples that actually illustrate the expressive power of dynamic delimited continuations. We have recently presented one, breadth-first traversal [19], and we present another one below. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 19 The two following functions traverse a given list and return another list. The recursive call to visit is abstracted into a delimited continuation, which is applied to the tail of the list: foo xs def = letrec visit nil = nil | visit (x :: xs) = visit (Sk .x :: (k xs)) in h visit xsii bar xs def = letrec visit nil = nil | visit (x :: xs) = visit (Fk .x :: (k xs)) in h visit xsii On the left, foo uses S and on the right, bar uses F; for the rest, the two definitions are identical. Given an input list, foo copies it and bar reverses it. To explain this difference and to account for the extended source language, we need to expand the grammar of evaluation contexts, e.g., with a production to account for calls to the list constructor: C1 ::= [ ] | ARG(t, C1 ) | SUCC(C1 ) | FUN(v, C1 ) | CONS(v, C1 ) | . . . Similarly, we need to expand the definition of concatenation as follows: (CONS(v, C1 )) ⋆ C1′ = CONS(v, C1 ⋆ C1′ ) Here is a trace of the two computations in the form of the calls to and returns from visit for the input list 1 :: 2 :: nil : foo: Every time the captured continuation is resumed, its representation is kept separate from the current context. The meta-context therefore grows whereas the captured context solely consists of FUN(visit, [ ]) throughout (writing visit in the context for simplicity): C2 C2 · C1 C2 · C1 · (CONS(1, [ ])) C2 · C1 · (CONS(1, [ ])) · (CONS(2, [ ])) C2 · C1 · (CONS(1, [ ])) · (CONS(2, [ ])) C2 · C1 · (CONS(1, [ ])) C2 · C1 C2 # # # # # # # # C1 [hhvisit (1 :: 2 :: nil )ii] [visit (1 :: 2 :: nil)] [visit (2 :: nil )] [visit nil ] [nil ] [2 :: nil ] [1 :: 2 :: nil] C1 [1 :: 2 :: nil ] bar : Every time the captured continuation is resumed, its representation is concatenated to the current context. The meta-context therefore remains the same whereas the context changes dynamically. The first captured context is FUN(visit, [ ]); concatenating it to CONS(1, [ ]) yields CONS(1, FUN(visit, [ ])), which is the second captured context: C2 C2 · C1 C2 · C1 C2 · C1 C2 · C1 C2 · C1 C2 · C1 C2 # # # # # # # # C1 [hhvisit (1 :: 2 :: nil )ii] [visit (1 :: 2 :: nil)] (CONS(1, [ ]))[visit (2 :: nil )] (CONS(2, CONS(1, [ ])))[visit nil] (CONS(2, CONS(1, [ ])))[nil ] (CONS(2, [ ]))[1 :: nil ] [2 :: 1 :: nil] C1 [2 :: 1 :: nil ] 20 M. BIERNACKA, D. BIERNACKI, AND O. DANVY 4.7. Summary and conclusion. We have presented the original evaluator for the λcalculus with shift and reset; this evaluator uses two layers of continuations. From this call-by-value evaluator we have derived two abstract machines, an environment-based one and a substitution-based one; each of these machines uses two layers of evaluation contexts. Based on the substitution-based machine we have constructed a reduction semantics for the λ-calculus with shift and reset; this reduction semantics, by construction, is sound with respect to CPS. Finally, we have pointed out the difference between the static and dynamic delimited control operators at the level of the abstract machine and we have presented a simple but meaningful example illustrating their differing behavior. 5. From evaluator to reduction semantics for the CPS hierarchy We construct a reduction semantics for the call-by-value λ-calculus extended with shiftn and resetn . As in Section 4, we go from an evaluator to an environment-based abstract machine, and from a substitution-based abstract machine to a reduction semantics. Because of the regularity of CPS, the results can be generalized from level 1 to higher levels without repeating the actual construction, based only on the original specification of the hierarchy [28]. In particular, the proofs of the theorems generalize straightforwardly from level 1. 5.1. An environment-based evaluator. At the nth level of the hierarchy, the language is extended with operators shifti and reseti for all i such that 1 ≤ i ≤ n. The evaluator for this language is shown in Figures 9 and 10. If n = 1, it coincides with the evaluator displayed in Figure 6. The evaluator uses n+1 layers of continuations. In the five first clauses (literal, variable, λ-abstraction, function application, and application of the successor function), the continuations k2 , . . . , kn+1 are passive: if the evaluator were curried, they could be eta-reduced. In the clauses defining shifti and reseti , the continuations ki+2 , . . . , kn+1 are also passive. Each pair of control operators is indexed by the corresponding level in the hierarchy: reseti is used to “push” each successive continuation up to level i onto level i+ 1 and to reinitialize • Terms (1 ≤ i ≤ n): term ∋ t ::= pmq | x | λx .t | t0 t1 | succ t | h tiii | Si k .t • Values: val ∋ v ::= m | f • Answers, continuations and functions (1 ≤ i ≤ n): ans kn+1 ∈ contn+1 ki ∈ conti f ∈ fun = = = = val val → ans val × conti+1 × . . . × contn+1 → ans val × cont1 × . . . × contn+1 → ans • Initial continuations (1 ≤ i ≤ n): θi = λ(v, ki+1 , ki+2 , . . ., kn+1 ). ki+1 (v, ki+2 , . . ., kn+1 ) θn+1 = λv. v • Environments: env ∋ e ::= eempty | e[x 7→ v] • Evaluation function: see Figure 10 Figure 9: An environment-based evaluator for the CPS hierarchy at level n evaln (pmq, e, k1 , k2 , ..., kn+1 ) = k1 (m, k2 , ..., kn+1 ) evaln (x , e, k1 , k2 , ..., kn+1 ) = k1 (e(x ), k2 , ..., kn+1 ) ′ ′ ), k2 , ..., kn+1 ) ). evaln (t, e[x 7→ v], k1′ , k2′ , ..., kn+1 evaln (λx .t, e, k1 , k2 , ..., kn+1 ) = k1 (λ(v, k1′ , k2′ , ..., kn+1 evaln (t0 t1 , e, k1 , k2 , ..., kn+1 ) = evaln (t0 , e, ′ ). evaln (t1 , e, λ(f, k2′ , ..., kn+1 ′′ ). f (v, k , k ′′ , ..., k ′′ ), λ(v, k2′′ , ..., kn+1 1 n+1 2 ′ ′ k2 , ..., kn+1 ), k2 , ..., kn+1 ) ′ ′ evaln (succ t, e, k1 , k2 , ..., kn+1 ) = evaln (t, e, λ(m, k2′ , ..., kn+1 ). k1 (m + 1, k2′ , ..., kn+1 ), k2 , ..., kn+1 ) ′ , ..., k ′ ′ ′ evaln (hhtiii , e, k1 , k2 , ..., kn+1 ) = evaln (t, e, θ1 , . . ., θi , λ(v, ki+2 , ..., kn+1 ). k1 (v, k2 , ..., ki+1 , ki+2 n+1 ), ki+2 , ..., kn+1 ) evaln (Si k.t, e, k1 , k2 , ..., kn+1 ) = evaln (t, e[k 7→ ci ], θ1 , ..., θi , ki+1 , ..., kn+1 ) ′ ′′ ′′ ′ ′′ ′′ ′ ′ where ci = λ(v, k1′ , ..., kn+1 ). k1 (v, k2 , ..., ki , λ(v ′ , ki+2 , ..., kn+1 ). k1′ (v ′ , k2′ , ..., ki+1 , ki+2 , ..., kn+1 ), ki+2 , ..., kn+1 ) • Main function: evaluaten : term → val evaluaten (t) = evaln (t, eempty , θ1 , ..., θn , θn+1 ) Figure 10: An environment-based evaluator for the CPS hierarchy at level n, ctd. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 21 • Evaluation function (1 ≤ i ≤ n): evaln : term × env × cont1 × . . . × contn+1 → ans 22 M. BIERNACKA, D. BIERNACKI, AND O. DANVY them with θ1 , . . . , θi , which are the successive CPS counterparts of the identity function; shifti is used to abstract control up to level i into a delimited continuation and to reinitialize the successive continuations up to level i with θ1 , . . . , θi . Applying a delimited continuation that was abstracted up to level i “pushes” each successive continuation up to level i onto level i + 1 and restores the successive continuations that were captured in a delimited continuation. When such a delimited continuation completes, and when an expression delimited by reseti completes, the successive continuations that were pushed onto level i + 1 are “popped” back into place and the computation proceeds. 5.2. An environment-based abstract machine. Defunctionalizing the evaluator of Figures 9 and 10 yields the environment-based abstract machine displayed in Figures 11 and 12. If n = 1, it coincides with the abstract machine displayed in Figure 7. The abstract machine consists of n + 2 sets of transitions: eval for interpreting terms and cont 1 , . . . , cont n+1 for interpreting the successive defunctionalized continuations. The set of possible values includes integers, closures and captured contexts. This abstract machine is an extension of the abstract machine displayed in Figure 7 with n + 1 contexts instead of 2 and the corresponding transitions for shifti and reseti . Each metai+1 -context intervenes to process reseti expressions and to apply captured continuations. Otherwise, the successive contexts are passively threaded to process literals, variables, λ-abstractions, function applications, and applications of the successor function. Given an environment e and a series of successive contexts, a reseti expression h tiii is processed by evaluating t with the same environment e, i empty contexts, and a metai+1 context over which all the intermediate contexts have been pushed on. Given an environment e and a series of successive contexts, a shift expression Si k.t is processed by evaluating t with an extension of e where k denotes a composition of the i surrounding contexts, i empty contexts, and the remaining outer contexts. Applying a captured context is achieved by pushing all the current contexts on the next outer context, restoring the composition of the captured contexts, and continuing with them. Resuming a composition of captured contexts is achieved by popping them off the next outer context and continuing with them. In order to relate the resulting abstract machine to the evaluator, we define a partial function evalen mapping a term t to a value v whenever the machine for level n, started with • Terms (1 ≤ i ≤ n): t ::= pmq | x | λx .t | t0 t1 | succ t | h tiii | Si k .t • Values (1 ≤ i ≤ n): v ::= m | [x , t, e] | Ci • Evaluation contexts (2 ≤ i ≤ n + 1): C1 ::= [ ] | ARG((t, e), C1 ) | SUCC(C1 ) | FUN(v, C1 ) Ci ::= [ ] | Ci · Ci−1 • Environments: e ::= eempty | e[x 7→ v] • Initial transition, transition rules, and final transition: see Figure 12 Figure 11: An environment-based abstract machine for the CPS hierarchy at level n t ⇒ ht, eempty , [ ], [ ], ..., [ ]ieval hpmq, hx , hλx .t, ht0 t1 , hsucc t, hhhtiii , hSi k .t, e, e, e, e, e, e, e, C1 , C1 , C1 , C1 , C1 , C1 , C1 , h[ ], v, hARG((t, e), C1 ), v, hSUCC(C1 ), m, hFUN([x , t, e], C1 ), v, hFUN(Ci′ · (...(C2′ · C1′ )...), C1 ), v, C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ hC1 , m, C2 , ..., Cn+1 icont1 hC1 , e (x ), C2 , ..., Cn+1 icont1 hC1 , [x , t, e], C2 , ..., Cn+1 icont1 ht0 , e, ARG((t1 , e), C1 ), C2 , ..., Cn+1 ieval ht, e, SUCC(C1 ), C2 , ..., Cn+1 ieval ht, e, [ ], ..., [ ], Ci+1 · (...(C2 · C1 )...), Ci+2 , ..., Cn+1 ieval ht, e[k 7→ Ci · (...(C2 · C1 )...)], [ ], ..., [ ], Ci+1 , ..., Cn+1 ieval Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 ⇒ ⇒ ⇒ ⇒ ⇒ hC2 , v, C3 , ..., Cn+1 icont2 ht, e, FUN(v, C1 ), C2 , ..., Cn+1 ieval hC1 , m + 1, C2 , ..., Cn+1 icont1 ht, e[x 7→ v], C1 , C2 , ..., Cn+1 ieval hC1′ , v, C2′ , ..., Ci′ , Ci+1 · (...(C2 · C1 )...), Ci+2 , ..., Cn+1 icont1 h[ ], v, Cj+1 , ..., Cn+1 icontj hCj · (...(C2 · C1 )...), v, Cj+1 , ..., Cn+1 icontj hCn+1 · (...(C2 · C1 )...), vicontn+1 h[ ], vicontn+1 ⇒ hCj+1 , v, Cj+2 , ..., Cn+1 icontj +1 ⇒ hC1 , v, C2 , ..., Cn+1 icont1 ⇒ hC1 , v, C2 , ..., Cn+1 icont1 ⇒ v Figure 12: An environment-based abstract machine for the CPS hierarchy at level n, ctd. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 23 • Initial transition, transition rules, and final transition (1 ≤ i ≤ n, 2 ≤ j ≤ n): 24 M. BIERNACKA, D. BIERNACKI, AND O. DANVY t, stops with v. The correctness of the machine with respect to the evaluator is ensured by the following theorem: Theorem 4. For any program t and any integer value m, evaluaten (t) = m if and only if evalen (t) = m. 5.3. A substitution-based abstract machine. In the same fashion as in Section 4.3, we construct the substitution-based abstract machine corresponding to the environment-based abstract machine of Section 5.2. The result is displayed in Figures 13 and 14. If n = 1, it coincides with the abstract machine displayed in Figure 8. The nth level contains n + 1 evaluation contexts and each context Ci can be viewed as a stack of non-empty contexts Ci−1 . Terms are decomposed as Cn+1 #n Cn #n−1 Cn−1 #n−2 · · · #2 C2 #1 C1 [t], where each #i represents a context delimiter of level i. All the control operators that occur at the jth level (with j < n) of the hierarchy do not use the contexts j + 2, . . . , n + 1. The functions decompose and its inverse plug can be read off the machine, as for level 1. The transitions of the machine for level j are “embedded” in the machine for level j + 1; the extra components are threaded but not used. We define a partial function evalsn capturing the evaluation by the substitution-based abstract machine for an arbitrary level n, analogously to the definition of evalen . Now we can relate evaluation with the environment-based and the substitution-based abstract machines for level n. Theorem 5. For any program t, either both evalsn (t) and evalen (t) are undefined, or there exist values v, v ′ such that evalsn (t) = v, evalen (t) = v ′ and Tn (v ′ ) = v. The definition of Tn extends that of T from Theorem 2 in such a way that it is homomorphic for all the contexts Ci , with 2 ≤ i ≤ n. 5.4. A reduction semantics. Along the same lines as in Section 4.4, we construct the reduction semantics for the CPS hierarchy based on the abstract machine of Figures 13 and 14. For an arbitrary level n we obtain the following set of reduction rules, for all • Terms and values (1 ≤ i ≤ n): t ::= v | x | t0 t1 | succ t | h tiii | Si k .t v ::= pmq | λx .t | Ci • Evaluation contexts (2 ≤ i ≤ n + 1): C1 ::= [ ] | ARG(t, C1 ) | SUCC(C1 ) | FUN(v, C1 ) Ci ::= [ ] | Ci · Ci−1 • Initial transition, transition rules, and final transition: see Figure 14 Figure 13: A substitution-based abstract machine for the CPS hierarchy at level n t ⇒ ht, [ ], [ ], ..., [ ]ieval hpmq, hλx .t, hCi′ , ht0 t1 , hsucc t, hhhtiii , hSi k .t, C1 , C1 , C1 , C1 , C1 , C1 , C1 , h[ ], v, hARG(t, C1 ), v, hSUCC(C1 ), pmq, hFUN((λx .t), C1 ), v, hFUN(Ci′ · (...(C2′ · C1′ )...), C1 ), v, C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ hC1 , pmq, C2 , ..., Cn+1 icont1 hC1 , λx .t, C2 , ..., Cn+1 icont1 hC1 , Ci′ , C2 , ..., Cn+1 icont1 ht0 , ARG((t1 , e), C1 ), C2 , ..., Cn+1 ieval ht, SUCC(C1 ), C2 , ..., Cn+1 ieval ht, [ ], ..., [ ], Ci+1 · (...(C2 · C1 )...), Ci+2 , ..., Cn+1 ieval ht{Ci · (...(C2 · C1 )...)/k }, [ ], ..., [ ], Ci+1 , ..., Cn+1 ieval Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 ⇒ ⇒ ⇒ ⇒ ⇒ hC2 , v, C3 , ..., Cn+1 icont2 ht, FUN(v, C1 ), C2 , ..., Cn+1 ieval hC1 , pm + 1q, C2 , ..., Cn+1 icont1 ht{v/x }, C1 , C2 , ..., Cn+1 ieval hC1′ , v, C2′ , ..., Ci′ , Ci+1 · (...(C2 · C1 )...), Ci+2 , ..., Cn+1 icont1 h[ ], v, Cj+1 , ..., Cn+1 icontj hCj · (...(C2 · C1 )...), v, Cj+1 , ..., Cn+1 icontj hCn+1 · (...(C2 · C1 )...), vicontn+1 h[ ], vicontn+1 ⇒ hCj+1 , v, Cj+2 , ..., Cn+1 icontj +1 ⇒ hC1 , v, C2 , ..., Cn+1 icont1 ⇒ hC1 , v, C2 , ..., Cn+1 icont1 ⇒ v Figure 14: A substitution-based abstract machine for the the CPS hierarchy at level n, ctd. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 25 • Initial transition, transition rules, and final transition (1 ≤ i ≤ n, 2 ≤ j ≤ n): 26 M. BIERNACKA, D. BIERNACKI, AND O. DANVY 1 ≤ i ≤ n; they define the actual redexes: (δ) Cn+1 #n · · · #1 C1 [succ pmq] →n Cn+1 #n · · · #1 C1 [pm + 1q] (βλ ) Cn+1 #n · · · #1 C1 [(λx .t) v] →n Cn+1 #n · · · #1 C1 [t{v/x }] (Sλi ) Cn+1 #n · · · #1 C1 [Si k .t] →n Cn+1 #n · · · #i+1 Ci+1 #i [ ] . . . #1 [t{Ci · (. . . (C2 · C1 ) . . .)/k }] i ) (βctx Cn+1 #n · · · #1 C1 [Ci′ · (. . . (C2′ · C1′ ) . . .) v] →n Cn+1 #n · · · #i+1 Ci+1 · (. . . (C2 · C1 ) . . .) #i Ci′ #i−1 · · · #1 C1′ [v] (Reseti ) Cn+1 #n · · · #1 C1 [hhviii ] →n Cn+1 #n · · · #1 C1 [v] Each level contains all the reductions from lower levels, and these reductions are compatible with additional layers of evaluation contexts. In particular, at level 0 there are only δ- and βλ -reductions. The values and evaluation contexts are already specified in the abstract machine. Moreover, the potential redexes are defined according to the following grammar: pn ::= succ v | v0 v1 | Si k .t | h viii (1 ≤ i ≤ n) Lemma 2 (Unique decomposition for level n). A program t is either a value or there exists a unique sequence of contexts C1 , . . . , Cn+1 and a potential redex pn such that t = plug (Cn+1 #n · · · #1 C1 [pn ]). Evaluating a term using either the derived reduction rules or the substitution-based abstract machine from Section 5.3 yields the same result: Theorem 6. For any program t and any value v, evalsn (t) = v if and only if t →∗n v, where →∗n is the reflexive, transitive closure of →n . As in Section 4.4, using refocusing, one can go from a given reduction semantics of Section 5.4 into a pre-abstract machine and the corresponding eval/apply abstract machine of Figures 13 and 14. 5.5. Beyond CPS. As in Section 4.5, one can define a family of concatenation functions over contexts and use it to implement composable continuations in the CPS hierarchy, giving rise to a family of control operators Fn and #n . Again the modified environmentbased abstract machine does not immediately correspond to a defunctionalized continuationpassing evaluator. Such control operators go beyond traditional CPS. 5.6. Static vs. dynamic delimited continuations. As in Section 4.6, one can illustrate the difference between static and dynamic delimited continuations in the CPS hierarchy. For example, replacing shift2 and reset2 respectively by F2 and #2 in Danvy and Filinski’s version of Abelson and Sussman’s generator of triples [28, Section 3] yields a list in reverse order.4 5.7. Summary and conclusion. We have generalized the results presented in Section 4 from level 1 to the whole CPS hierarchy of control operators shiftn and resetn . Starting from the original evaluator for the λ-calculus with shiftn and resetn that uses n + 1 layers of continuations, we have derived two abstract machines, an environment-based one and a substitution-based one; each of these machines use n + 1 layers of evaluation contexts. 4Thanks are due to an anonymous reviewer for pointing this out. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 27 Based on the substitution-based machine we have obtained a reduction semantics for the λ-calculus extended with shiftn and resetn which, by construction, is sound with respect to CPS. 6. Programming in the CPS hierarchy To finish, we present new examples of programming in the CPS hierarchy. The examples are normalization functions. In Sections 6.1 and 6.2, we first describe normalization by evaluation and we present the simple example of the free monoid. In Section 6.3, we present a function mapping a proposition into its disjunctive normal form; this normalization function uses delimited continuations. In Section 6.4, we generalize the normalization functions of Sections 6.2 and 6.3 to a hierarchical language of units and products, and we express the corresponding normalization function in the CPS hierarchy. 6.1. Normalization by evaluation. Normalization by evaluation is a ‘reduction-free’ approach to normalizing terms. Instead of reducing a term to its normal form, one evaluates this term into a non-standard model and reifies its denotation into its normal form [34]: eval reify normalize normalize : : : = term → value value → term nf term → term nf reify ◦ eval Normalization by evaluation has been developed in intuitionistic type theory [20, 63], proof theory [12,13], category theory [4], and partial evaluation [22,23], where it has emerged as a new field of application for delimited continuations [9, 23, 34, 44, 48, 51, 78]. 6.2. The free monoid. A source term in the free monoid is either a variable, the unit element, or the product of two terms: term ∋ t ::= x | ε | t ⋆ t′ The product is associative and the unit element is neutral. These properties justify the following conversion rules: t ⋆ (t′ ⋆ t′′ ) ↔ (t ⋆ t′ ) ⋆ t′′ t⋆ε ↔ t ε⋆t ↔ t We aim (for example) for list-like flat normal forms: t term nf ∋ b t ::= εnf | x ⋆nf b In a reduction-based approach to normalization, one would orient the conversion rules into reduction rules and one would apply these reduction rules until a normal form is obtained: t ⋆ (t′ ⋆ t′′ ) ← (t ⋆ t′ ) ⋆ t′′ ε⋆t → t In a reduction-free approach to normalization, one defines a normalization function as the composition of a non-standard evaluation function and a reification function. Let us state such a normalization function. 28 M. BIERNACKA, D. BIERNACKI, AND O. DANVY The non-standard domain of values is the transformer value = term nf → term nf . The evaluation function is defined by induction over the syntax of source terms, and the reification function inverts it: eval x = λt.x ⋆nf t eval ε = λt.t eval (t ⋆ t′ ) = (eval t) ◦ (eval t′ ) reify v = v εnf normalize t = reify (eval t) In effect, eval is a homomorphism from the source monoid to the monoid of transformers (unit is mapped to unit and products are mapped to products) and the normalization function hinges on the built-in associativity of function composition. Beylin, Dybjer, Coquand, and Kinoshita have studied its theoretical content [14, 20, 58]. From a (functional) programming standpoint, the reduction-based approach amounts to flattening a tree iteratively by reordering it, and the reduction-free approach amounts to flattening a tree with an accumulator. 6.3. A language of propositions. A source term, i.e., a proposition, is either a variable, a literal (true or false), a conjunction, or a disjunction: term ∋ t ::= x | true | t ∧ t′ | false | t ∨ t′ Conjunction and disjunction are associative and distribute over each other; true is neutral for conjunction and absorbant for disjunction; and false is neutral for disjunction and absorbant for conjunction. We aim (for example) for list-like disjunctive normal forms: term nf ∋ b t ::= d nf term d ∋ d ::= false nf | c ∨nf d nf | x ∧nf c term nf c ∋ c ::= true Our normalization function is the result of composing a non-standard evaluation function and a reification function. We state them below without proof. Given the domains of transformers nf F1 = term nf c → term c nf nf F2 = term d → term d the non-standard domain of values is ans 1 , where ans 2 = F2 ans 1 = (F1 → ans 2 ) → ans 2 . AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 29 The evaluation function is defined by induction over the syntax of source terms, and the reification function inverts it: eval 0 x k d eval 0 true k d eval 0 (t ∧ t′ ) k d eval 0 false k d eval 0 (t ∨ t′ ) k d = = = = = k (λc.x ∧nf c) d k (λc.c) d eval 0 t (λf1 .eval 0 t′ (λf1′ .k (f1 ◦ f1′ ))) d d eval 0 t k (eval 0 t′ k d) reify 0 v = v (λf1 .λd.(f1 true nf ) ∨nf d) false nf normalize t = reify 0 (eval 0 t) This normalization function uses a continuation k, an accumulator d to flatten disjunctions, and another one c to flatten conjunctions. The continuation is delimited: the three first clauses of eval 0 are in CPS; in the fourth, k is discarded (accounting for the fact that false is absorbant for conjunction); and in the last, k is duplicated and used in non-tail position (achieving the distribution of conjunctions over disjunctions). The continuation and the accumulators are initialized in the definition of reify 0 . Uncurrying the continuation and mapping eval 0 and reify 0 back to direct style yield the following definition, which lives at level 1 of the CPS hierarchy: eval 1 x d = (λc.x ∧nf c, d) eval 1 true d = (λc.c, d) eval 1 (t ∧ t′ ) d = let (f1 , d) = eval 1 t d in let (f1′ , d) = eval 1 t′ d in (f1 ◦ f1′ , d) eval 1 false d = Sk.d eval 1 (t ∨ t′ ) d = Sk.k (eval 1 t h k (eval 1 t′ d)ii) reify 1 v = h let (f1 , d) = v false nf in (f1 true nf ) ∨nf dii normalize t = reify 1 (eval 1 t) The three first clauses of eval 1 are in direct style; the two others abstract control with shift. In the fourth clause, the context is discarded; and in the last clause, the context is duplicated and composed. The context and the accumulators are initialized in the definition of reify 1 . This direct-style version makes it even more clear than the CPS version that the accumulator for the disjunctions in normal form is a threaded state. A continuation-based, state-based version (or better, a monad-based one) can therefore be written—but it is out of scope here. 6.4. A hierarchical language of units and products. We consider a generalization of propositional logic where a source term is either a variable, a unit in a hierarchy of units, or a product in a hierarchy of products: term ∋ t ::= x | εi | t ⋆i t′ where 1 ≤ i ≤ n. All the products are associative. All units are neutral for products with the same index. 30 M. BIERNACKA, D. BIERNACKI, AND O. DANVY The free monoid: The language corresponds to that of the free monoid if n = 1, as in Section 6.2. Boolean logic: The language corresponds to that of propositions if n = 2, as in Section 6.3: ε1 is true, ⋆1 is ∧, ε2 is false, and ⋆2 is ∨. Multi-valued logic: In general, for each n > 2 we can consider a suitable n-valued logic [47]; for example, in case n = 4, the language corresponds to that of Belnap’s bilattice FOU R [11]. It is also possible to modify the normalization function to work for less regular logical structures (e.g., other bilattices). Monads: In general, the language corresponds to that of layered monads [64]: each unit element is the unit of the corresponding monad, and each product is the ‘bind’ of the corresponding monad. In practice, layered monads are collapsed into one for programming consumption [43], but prior to this collapse, all the individual monad operations coexist in the computational soup. In the remainder of this section, we assume that all the products, besides being associative, distribute over each other, and that all units, besides being neutral for products with the same index, are absorbant for products with other indices. We aim (for example) for a generalization of disjunctive normal forms: term nf ∋ b t ::= tn nf nf term nf ∋ t n ::= εn | tn−1 ⋆n tn n .. . nf nf term nf 1 ∋ t1 ::= ε1 | t0 ⋆1 t1 term nf 0 ∋ t0 ::= x For presentational reasons, in the remainder of this section we arbitrarily fix n to be 5. Our normalization function is the result of composing a non-standard evaluation function and a reification function. We state them below without proof. Given the domains of transformers nf F1 = term nf 1 → term 1 nf F2 = term nf 2 → term 2 nf nf F3 = term 3 → term 3 nf F4 = term nf 4 → term 4 nf F5 = term nf 5 → term 5 the non-standard domain of values is ans 1 , where ans 5 ans 4 ans 3 ans 2 ans 1 = = = = = F5 (F4 (F3 (F2 (F1 → → → → ans 5 ) ans 4 ) ans 3 ) ans 2 ) → → → → ans 5 ans 4 ans 3 ans 2 . AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 31 The evaluation function is defined by induction over the syntax of source terms, and the reification function inverts it: eval 0 x k1 k2 k3 k4 t5 eval 0 ε1 k1 k2 k3 k4 t5 eval 0 (t ⋆1 t′ ) k1 k2 k3 k4 t5 eval 0 ε2 k1 k2 k3 k4 t5 eval 0 (t ⋆2 t′ ) k1 k2 k3 k4 t5 eval 0 ε3 k1 k2 k3 k4 t5 eval 0 (t ⋆3 t′ ) k1 k2 k3 k4 t5 eval 0 ε4 k1 k2 k3 k4 t5 eval 0 (t ⋆4 t′ ) k1 k2 k3 k4 t5 eval 0 ε5 k1 k2 k3 k4 t5 eval 0 (t ⋆5 t′ ) k1 k2 k3 k4 t5 = = = = = = = = = = = k1 (λt1 .x ⋆nf 1 t1 ) k2 k3 k4 t5 k1 (λt1 .t1 ) k2 k3 k4 t5 eval 0 t (λf1 .eval 0 t′ (λf1′ .k1 (f1 ◦ f1′ ))) k2 k3 k4 t5 k2 (λt2 .t2 ) k3 k4 t5 eval 0 t k1 (λf2 .eval 0 t′ k1 (λf2′ .k2 (f2 ◦ f2′ ))) k3 k4 t5 k3 (λt3 .t3 ) k4 t5 eval 0 t k1 k2 (λf3 .eval 0 t′ k1 k2 (λf3′ .k3 (f3 ◦ f3′ ))) k4 t5 k4 (λt4 .t4 ) t5 eval 0 t k1 k2 k3 (λf4 .eval 0 t′ k1 k2 k3 (λf4′ .k4 (f4 ◦ f4′ ))) t5 t5 eval 0 t k1 k2 k3 k4 (eval 0 t′ k1 k2 k3 k4 t5 ) nf reify 0 v = v (λf1 .λk2 .k2 (λt2 .(f1 εnf 1 ) ⋆2 t2 )) nf (λf2 .λk3 .k3 (λt3 .(f2 εnf 2 ) ⋆3 t3 )) nf nf (λf3 .λk4 .k4 (λt4 .(f3 ε3 ) ⋆4 t4 )) nf (λf4 .λt5 .(f4 εnf 4 ) ⋆5 t5 ) ε5 normalize t = reify 0 (eval 0 t) This normalization function uses four delimited continuations k1 , k2 , k3 , k4 and five accumulators t1 , t2 , t3 , t4 , t5 to flatten each of the successive products. In the clause of each εi , the continuations k1 , . . . , ki−1 are discarded, accounting for the fact that εi is absorbant for ⋆1 , . . . , ⋆i−1 , and the identity function is passed to ki , accounting for the fact that εi is neutral for ⋆i . In the clause of each ⋆i+1 , the continuations k1 , . . . , ki are duplicated and used in non-tail position, achieving the distribution of ⋆i+1 over ⋆1 , . . . , ⋆i . The continuations and the accumulators are initialized in the definition of reify 0 . This normalization function lives at level 0 of the CPS hierarchy, but we can express it at a higher level using shift and reset. For example, uncurrying k3 and k4 and mapping eval 0 and reify 0 back to direct style twice yield the following intermediate definition, which lives at level 2: eval 2 x k1 k2 t5 = k1 (λt1 .x ⋆nf 1 t1 ) k2 t5 eval 2 ε1 k1 k2 t5 = k1 (λt1 .t1 ) k2 t5 eval 2 (t ⋆1 t′ ) k1 k2 t5 = eval 2 t (λf1 .eval 2 t′ (λf1′ .k1 (f1 ◦ f1′ ))) k2 t5 eval 2 ε2 k1 k2 t5 = k2 (λt2 .t2 ) t5 eval 2 (t ⋆2 t′ ) k1 k2 t5 = eval 2 t k1 (λf2 .eval 2 t′ k1 (λf2′ .k2 (f2 ◦ f2′ ))) t5 eval 2 ε3 k1 k2 t5 = (λt3 .t3 , t5 ) eval 2 (t ⋆3 t′ ) k1 k2 t5 = let (f3 , t5 ) = eval 2 t k1 k2 t5 in let (f3′ , t5 ) = eval 2 t′ k1 k2 t5 in (f3 ◦ f3′ , t5 ) 32 M. BIERNACKA, D. BIERNACKI, AND O. DANVY eval 2 ε4 k1 k2 t5 = S1 k3 .(λt4 .t4 , t5 ) eval 2 (t ⋆4 t′ ) k1 k2 t5 = S1 k3 .let (f4 , t5 ) = h k3 (eval 2 t k1 k2 t5 )ii1 in let (f4′ , t5 ) = h k3 (eval 2 t′ k1 k2 t5 )ii1 in (f4 ◦ f4′ , t5 ) eval 2 ε5 k1 k2 t5 = S2 k4 .t5 eval 2 (t ⋆5 t′ ) k1 k2 t5 = S1 k3 .S2 k4 .let t5 = h k4 h k3 (eval 2 t′ k1 k2 t5 )ii1 i 2 in h k4 h k3 (eval 2 t k1 k2 t5 )ii1 i 2 nf reify 2 v = h let (f4 , t5 ) = h let (f3 , t5 ) = v (λf1 .λk2 .k2 (λt2 .(f1 εnf 1 ) ⋆2 t2 )) nf nf (λf2 .λt3 .(f2 ε2 ) ⋆3 t3 ) ε5 nf i1 in (λf4 .(f3 ε3 ) ⋆nf 4 t4 , t5 )i nf nf in (f4 ε4 ) ⋆5 t5 i 2 normalize t = reify 2 (eval 2 t) Whereas eval 0 had four layered continuations, eval 2 has only two layered continuations since it has been mapped back to direct style twice. Where eval 0 accesses k3 as one of its parameters, eval 2 abstracts the first layer of control with shift1 , and where eval 0 accesses k4 as one of its parameters, eval 2 abstracts the first and the second layer of control with shift2 . Uncurrying k1 and k2 and mapping eval 2 and reify 2 back to direct style twice yield the following direct-style definition, which lives at level 4 of the CPS hierarchy: eval 4 x t5 = (λt1 .x ⋆nf 1 t1 , t5 ) eval 4 ε1 t5 = (λt1 .t1 , t5 ) eval 4 (t ⋆1 t′ ) t5 = let (f1 , t5 ) = eval 4 t t5 in let (f1′ , t5 ) = eval 4 t′ t5 in (f1 ◦ f1′ , t5 ) eval 4 ε2 t5 = S1 k1 .(λt2 .t2 , t5 ) eval 4 (t ⋆2 t′ ) t5 = S1 k1 .let (f2 , t5 ) = h k1 (eval 4 t t5 )ii1 in let (f2′ , t5 ) = h k1 (eval 4 t′ t5 )ii1 in (f2 ◦ f2′ , t5 ) eval 4 ε3 t5 = S2 k2 .(λt3 .t3 , t5 ) eval 4 (t ⋆3 t′ ) t5 = S1 k1 .S2 k2 .let (f3 , t5 ) = h k2 h k1 (eval 4 t t5 )ii1 i 2 in let (f3′ , t5 ) = h k2 h k1 (eval 4 t′ t5 )ii1 i 2 in (f3 ◦ f3′ , t5 ) eval 4 ε4 t5 = S3 k3 .(λt4 .t4 , t5 ) eval 4 (t ⋆4 t′ ) t5 = S1 k1 .S2 k2 .S3 k3 .let (f4 , t5 ) = h k3 h k2 h k1 (eval 4 t t5 )ii1 i 2 i 3 in let (f4′ , t5 ) = h k3 h k2 h k1 (eval 4 t′ t5 )ii1 i 2 i 3 in (f4 ◦ f4′ , t5 ) eval 4 ε5 t5 = S4 k4 .t5 eval 4 (t ⋆5 t′ ) t5 = S1 k1 .S2 k2 .S3 k3 .S4 k4 .let t5 = h k4 h k3 h k2 h k1 (eval 4 t′ t5 )ii1 i 2 i 3 i 4 in h k4 h k3 h k2 h k1 (eval 4 t t5 )ii1 i 2 i 3 i 4 AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 33 reify 4 v = h let (f4 , t5 ) = h let (f3 , t5 ) = h let (f2 , t5 ) = h let (f1 , t5 ) = v ε5 nf i1 in (λf2 .(f1 εnf 1 ) ⋆2 t2 , t5 )i nf nf in (λf3 .(f2 ε2 ) ⋆3 t3 , t5 )ii2 nf in (λf4 .(f3 εnf ) i3 3 ⋆4 t4 , t5 )i nf nf in (f4 ε4 ) ⋆5 t5 i 4 normalize t = reify 4 (eval 4 t) Whereas eval 2 had two layered continuations, eval 4 has none since it has been mapped back to direct style twice. Where eval 2 accesses k1 as one of its parameters, eval 4 abstracts the first layer of control with shift1 , and where eval 2 accesses k2 as one of its parameters, eval 4 abstracts the first and the second layer of control with shift2 . Where eval 2 uses reset1 and shift1 , eval 4 uses reset3 and shift3 , and where eval 2 uses reset2 and shift2 , eval 4 uses reset4 and shift4 . 6.5. A note about efficiency. We have implemented all the definitions of Section 6.4 as well as the intermediate versions eval 1 and eval 3 in ML [32]. We have also implemented hierarchical normalization functions for other values than 5. For high products (i.e., in Section 6.4, for source terms using ⋆3 and ⋆4 ), the normalization function living at level 0 of the CPS hierarchy is the most efficient one. On the other hand, for low products (i.e., in Section 6.4, for source terms using ⋆1 and ⋆2 ), the normalization functions living at a higher level of the CPS hierarchy are the most efficient ones. These relative efficiencies are explained in terms of resources: • Accessing to a continuation as an explicit parameter is more efficient than accessing to it through a control operator. • On the other hand, the restriction of eval 4 to source terms that only use ε1 and ⋆1 is in direct style, whereas the corresponding restrictions of eval 2 and eval 0 pass a number of extra parameters. These extra parameters penalize performance. The better performance of programs in the CPS hierarchy has already been reported for level 1 in the context of continuation-based partial evaluation [61], and it has been reported for a similar “pay as you go” reason: a program that abstracts control relatively rarely is run more efficiently in direct style with a control operator rather than in continuation-passing style. 6.6. Summary and conclusion. We have illustrated the CPS hierarchy with an application of normalization by evaluation that naturally involves successive layers of continuations and that demonstrates the expressive power of shiftn and resetn . The application also suggests alternative control operators that would fit better its continuation-based programming pattern. For example, instead of representing a delimited continuation as a function and apply it as such, we could represent it as a continuation and apply it with a ‘throw’ operator as in MacLisp and Standard ML of New Jersey. For another example, instead of throwing a value to a continuation, we could specify the continuation of a computation, e.g., with a reflect i special form. For a third example, instead of abstracting control up to a layer n, we could give access to each of the successive layers up to n, e.g., with a Ln operator. Then instead of eval 4 (t ⋆4 t′ ) t5 = S1 k1 .S2 k2 .S3 k3 .let (f4 , t5 ) = h k3 h k2 h k1 (eval 4 t t5 )ii1 i 2 i 3 in let (f4′ , t5 ) = h k3 h k2 h k1 (eval 4 t′ t5 )ii1 i 2 i 3 in (f4 ◦ f4′ , t5 ) 34 M. BIERNACKA, D. BIERNACKI, AND O. DANVY one could write eval 4 (t ⋆4 t′ ) t5 = L3 (k1 , k2 , k3 ).let (f4′ , t5 ) = reflect 3 (eval 4 t t5 , k1 , k2 , k3 ) in let (f4′ , t5 ) = reflect 3 (eval 4 t′ t5 , k1 , k2 , k3 ) in (f4 ◦ f4′ , t5 ). Such alternative control operators can be more convenient to use, while being compatible with CPS. 7. Conclusion and issues We have used CPS as a guideline to establish an operational foundation for delimited continuations. Starting from a call-by-value evaluator for λ-terms with shift and reset, we have mechanically derived the corresponding abstract machine. From this abstract machine, it is straightforward to obtain a reduction semantics of delimited control that, by construction, is compatible with CPS—both for one-step reduction and for evaluation. These results can also be established without the guideline of CPS, but less easily. The whole approach generalizes straightforwardly to account for the shiftn and resetn family of delimited-control operators and more generally for any control operators that are compatible with CPS. These results would be non-trivial to establish without the guideline of CPS. Defunctionalization provides a key for connecting continuation-passing style and operational intuitions about control. Indeed most of the time, control stacks and evaluation contexts are the defunctionalized continuations of an evaluator. Defunctionalization also provides a key for identifying where operational intuitions about control go beyond CPS (see Section 4.5). We do not know whether CPS is the ultimate answer, but the present work shows yet another example of its usefulness. It is like nothing can go wrong with CPS. Acknowledgments We are grateful to Mads Sig Ager, Julia Lawall, Jan Midtgaard, and the referees of CW’04 and of LMCS for their comments. The third author would also like to thank Samuel Lindley for our joint initial study of the normalization functions of Section 6. This work is partially supported by the ESPRIT Working Group APPSEM II (http://www.appsem.org), by the Danish Natural Science Research Council, Grant no. 2102-0474 (for the two first authors) and Grant no. 21-03-0545 (for the third author), and by BRICS (Basic Research in Computer Science (http://www.brics.dk), funded by the Danish National Research Foundation). References [1] Mads Sig Ager, Dariusz Biernacki, Olivier Danvy, and Jan Midtgaard. A functional correspondence between evaluators and abstract machines. In Dale Miller, editor, Proceedings of the Fifth ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP’03), pages 8– 19. ACM Press, August 2003. [2] Mads Sig Ager, Olivier Danvy, and Jan Midtgaard. A functional correspondence between call-by-need evaluators and lazy abstract machines. Information Processing Letters, 90(5):223–232, 2004. Extended version available as the technical report BRICS-RS-04-3. [3] Mads Sig Ager, Olivier Danvy, and Jan Midtgaard. A functional correspondence between monadic evaluators and abstract machines for languages with computational effects. Theoretical Computer Science, 342(1):149–172, 2005. Extended version available as the technical report BRICS RS-04-28. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 35 [4] Thorsten Altenkirch, Martin Hofmann, and Thomas Streicher. Categorical reconstruction of a reductionfree normalization proof. In David H. Pitt, David E. Rydeheard, and Peter Johnstone, editors, Category Theory and Computer Science, number 953 in Lecture Notes in Computer Science, pages 182–199, Cambridge, UK, August 1995. Springer-Verlag. [5] Zena M. Ariola, Hugo Herbelin, and Amr Sabry. A type-theoretic foundation of continuations and prompts. In Fisher [45], pages 40–53. [6] Kenichi Asai. Online partial evaluation for shift and reset. In Peter Thiemann, editor, Proceedings of the 2002 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM 2002), SIGPLAN Notices, Vol. 37, No 3, pages 19–30, Portland, Oregon, March 2002. ACM Press. [7] Kenichi Asai. Offline partial evaluation for shift and reset. In Nevin Heintze and Peter Sestoft, editors, Proceedings of the 2004 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM 2004), pages 3–14, Verona, Italy, August 2003. ACM Press. [8] Vincent Balat, Roberto Di Cosmo, and Marcelo P. Fiore. Extensional normalisation and type-directed partial evaluation for typed lambda calculus with sums. In Xavier Leroy, editor, Proceedings of the Thirty-First Annual ACM Symposium on Principles of Programming Languages, pages 64–76, Venice, Italy, January 2004. ACM Press. [9] Vincent Balat and Olivier Danvy. Memoization in type-directed partial evaluation. In Don Batory, Charles Consel, and Walid Taha, editors, Proceedings of the 2002 ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering, number 2487 in Lecture Notes in Computer Science, pages 78–92, Pittsburgh, Pennsylvania, October 2002. Springer-Verlag. [10] Anindya Banerjee, Nevin Heintze, and Jon G. Riecke. Design and correctness of program transformations based on control-flow analysis. In Naoki Kobayashi and Benjamin C. Pierce, editors, Theoretical Aspects of Computer Software, 4th International Symposium, TACS 2001, number 2215 in Lecture Notes in Computer Science, pages 420–447, Sendai, Japan, October 2001. Springer-Verlag. [11] Nuel D. Belnap. How a computer should think. In Gilbert Ryle, editor, Proceedings of the Oxford International Symposium on Contemporary Aspects of Philosophy, pages 30–56, Oxford, England, 1976. Oriel Press. [12] Ulrich Berger, Matthias Eberl, and Helmut Schwichtenberg. Normalization by evaluation. In Bernhard Möller and John V. Tucker, editors, Prospects for hardware foundations (NADA), number 1546 in Lecture Notes in Computer Science, pages 117–137, Berlin, Germany, 1998. Springer-Verlag. [13] Ulrich Berger and Helmut Schwichtenberg. An inverse of the evaluation functional for typed λ-calculus. In Gilles Kahn, editor, Proceedings of the Sixth Annual IEEE Symposium on Logic in Computer Science, pages 203–211, Amsterdam, The Netherlands, July 1991. IEEE Computer Society Press. [14] Ilya Beylin and Peter Dybjer. Extracting a proof of coherence for monoidal categories from a proof of normalization for monoids. In Stefano Berardi and Mario Coppo, editors, Types for Proofs and Programs, International Workshop TYPES’95, number 1158 in Lecture Notes in Computer Science, pages 47–61, Torino, Italy, June 1995. Springer-Verlag. [15] Malgorzata Biernacka and Olivier Danvy. A concrete framework for environment machines. Research Report BRICS RS-05-15, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, May 2005. [16] Malgorzata Biernacka and Olivier Danvy. A syntactic correspondence between context-sensitive calculi and abstract machines. Research Report BRICS RS-05-22, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, July 2005. [17] Dariusz Biernacki and Olivier Danvy. From interpreter to logic engine by defunctionalization. In Maurice Bruynooghe, editor, Logic Based Program Synthesis and Transformation, 13th International Symposium, LOPSTR 2003, number 3018 in Lecture Notes in Computer Science, pages 143–159, Uppsala, Sweden, August 2003. Springer-Verlag. [18] Dariusz Biernacki, Olivier Danvy, and Kevin Millikin. A dynamic continuation-passing style for dynamic delimited continuations. Research Report BRICS RS-05-16, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, May 2005. [19] Dariusz Biernacki, Olivier Danvy, and Chung-chieh Shan. On the dynamic extent of delimited continuations. Information Processing Letters, 96(1):7–17, 2005. Extended version available as the technical report BRICS RS-05-13. 36 M. BIERNACKA, D. BIERNACKI, AND O. DANVY [20] Thierry Coquand and Peter Dybjer. Intuitionistic model constructions and normalization proofs. Mathematical Structures in Computer Science, 7:75–94, 1997. [21] Olivier Danvy. On listing list prefixes. LISP Pointers, 2(3-4):42–46, January 1989. ACM Press. [22] Olivier Danvy. Type-directed partial evaluation. In Guy L. Steele Jr., editor, Proceedings of the TwentyThird Annual ACM Symposium on Principles of Programming Languages, pages 242–257, St. Petersburg Beach, Florida, January 1996. ACM Press. [23] Olivier Danvy. Type-directed partial evaluation. In John Hatcliff, Torben Æ. Mogensen, and Peter Thiemann, editors, Partial Evaluation – Practice and Theory; Proceedings of the 1998 DIKU Summer School, number 1706 in Lecture Notes in Computer Science, pages 367–411, Copenhagen, Denmark, July 1998. Springer-Verlag. [24] Olivier Danvy. From reduction-based to reduction-free normalization. In Sergio Antoy and Yoshihito Toyama, editors, Proceedings of the Fourth International Workshop on Reduction Strategies in Rewriting and Programming (WRS’04), number 124 in Electronic Notes in Theoretical Computer Science, pages 79–100, Aachen, Germany, May 2004. Elsevier Science. Invited talk. [25] Olivier Danvy. On evaluation contexts, continuations, and the rest of the computation. In Hayo Thielecke, editor, Proceedings of the Fourth ACM SIGPLAN Workshop on Continuations, Technical report CSR-04-1, Department of Computer Science, Queen Mary’s College, pages 13–23, Venice, Italy, January 2004. Invited talk. [26] Olivier Danvy. A rational deconstruction of Landin’s SECD machine. In Clemens Grelck, Frank Huch, Greg J. Michaelson, and Phil Trinder, editors, Implementation and Application of Functional Languages, 16th International Workshop, IFL’04, number 3474 in Lecture Notes in Computer Science, pages 52–71, Lübeck, Germany, September 2004. Springer-Verlag. Recipient of the 2004 Peter Landin prize. Extended version available as the technical report BRICS-RS-03-33. [27] Olivier Danvy and Andrzej Filinski. A functional abstraction of typed contexts. DIKU Rapport 89/12, DIKU, Computer Science Department, University of Copenhagen, Copenhagen, Denmark, July 1989. [28] Olivier Danvy and Andrzej Filinski. Abstracting control. In Wand [81], pages 151–160. [29] Olivier Danvy and Andrzej Filinski. Representing control, a study of the CPS transformation. Mathematical Structures in Computer Science, 2(4):361–391, 1992. [30] Olivier Danvy and Lasse R. Nielsen. Defunctionalization at work. In Harald Søndergaard, editor, Proceedings of the Third International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP’01), pages 162–174, Firenze, Italy, September 2001. ACM Press. Extended version available as the technical report BRICS RS-01-23. [31] Olivier Danvy and Lasse R. Nielsen. Refocusing in reduction semantics. Research Report BRICS RS-0426, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, November 2004. A preliminary version appears in the informal proceedings of the Second International Workshop on Rule-Based Programming (RULE 2001), Electronic Notes in Theoretical Computer Science, Vol. 59.4. [32] Olivier Danvy and Zhe Yang. An operational investigation of the CPS hierarchy. In S. Doaitse Swierstra, editor, Proceedings of the Eighth European Symposium on Programming, number 1576 in Lecture Notes in Computer Science, pages 224–242, Amsterdam, The Netherlands, March 1999. Springer-Verlag. [33] Scott Draves. Implementing bit-addressing with specialization. In Mads Tofte, editor, Proceedings of the 1997 ACM SIGPLAN International Conference on Functional Programming, pages 239–250, Amsterdam, The Netherlands, June 1997. ACM Press. [34] Peter Dybjer and Andrzej Filinski. Normalization and partial evaluation. In Gilles Barthe, Peter Dybjer, Luı́s Pinto, and João Saraiva, editors, Applied Semantics – Advanced Lectures, number 2395 in Lecture Notes in Computer Science, pages 137–192, Caminha, Portugal, September 2000. Springer-Verlag. [35] R. Kent Dybvig, Simon Peyton-Jones, and Amr Sabry. A monadic framework for subcontinuations. Technical Report 615, Computer Science Department, Indiana University, Bloomington, Indiana, June 2005. [36] Matthias Felleisen. The Calculi of λ-v-CS Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages. PhD thesis, Computer Science Department, Indiana University, Bloomington, Indiana, August 1987. [37] Matthias Felleisen. The theory and practice of first-class prompts. In Jeanne Ferrante and Peter Mager, editors, Proceedings of the Fifteenth Annual ACM Symposium on Principles of Programming Languages, pages 180–190, San Diego, California, January 1988. ACM Press. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 37 [38] Matthias Felleisen and Matthew Flatt. Programming languages and lambda calculi. Unpublished lecture notes. http://www.ccs.neu.edu/home/matthias/3810-w02/readings.html, 1989-2003. [39] Matthias Felleisen and Daniel P. Friedman. Control operators, the SECD machine, and the λ-calculus. In Martin Wirsing, editor, Formal Description of Programming Concepts III, pages 193–217. Elsevier Science Publishers B.V. (North-Holland), Amsterdam, 1986. [40] Matthias Felleisen, Daniel P. Friedman, Bruce Duba, and John Merrill. Beyond continuations. Technical Report 216, Computer Science Department, Indiana University, Bloomington, Indiana, February 1987. [41] Matthias Felleisen, Mitchell Wand, Daniel P. Friedman, and Bruce F. Duba. Abstract continuations: A mathematical semantics for handling full functional jumps. In Robert (Corky) Cartwright, editor, Proceedings of the 1988 ACM Conference on Lisp and Functional Programming, pages 52–62, Snowbird, Utah, July 1988. ACM Press. [42] Andrzej Filinski. Representing monads. In Hans-J. Boehm, editor, Proceedings of the Twenty-First Annual ACM Symposium on Principles of Programming Languages, pages 446–457, Portland, Oregon, January 1994. ACM Press. [43] Andrzej Filinski. Representing layered monads. In Alex Aiken, editor, Proceedings of the Twenty-Sixth Annual ACM Symposium on Principles of Programming Languages, pages 175–188, San Antonio, Texas, January 1999. ACM Press. [44] Andrzej Filinski. Normalization by evaluation for the computational lambda-calculus. In Samson Abramsky, editor, Typed Lambda Calculi and Applications, 5th International Conference, TLCA 2001, number 2044 in Lecture Notes in Computer Science, pages 151–165, Kraków, Poland, May 2001. Springer-Verlag. [45] Kathleen Fisher, editor. Proceedings of the 2004 ACM SIGPLAN International Conference on Functional Programming, Snowbird, Utah, September 2004. ACM Press. [46] Martin Gasbichler and Michael Sperber. Final shift for call/cc: direct implementation of shift and reset. In Simon Peyton Jones, editor, Proceedings of the 2002 ACM SIGPLAN International Conference on Functional Programming, SIGPLAN Notices, Vol. 37, No. 9, pages 271–282, Pittsburgh, Pennsylvania, September 2002. ACM Press. [47] Matthew L. Ginsberg. Multivalued logics: a uniform approach to reasoning in artificial intelligence. Computational Intelligence, 4:265–316, 1988. [48] Bernd Grobauer and Zhe Yang. The second Futamura projection for type-directed partial evaluation. Higher-Order and Symbolic Computation, 14(2/3):173–219, 2001. [49] Carl Gunter, Didier Rémy, and Jon G. Riecke. A generalization of exceptions and control in ML-like languages. In Simon Peyton Jones, editor, Proceedings of the Seventh ACM Conference on Functional Programming and Computer Architecture, pages 12–23, La Jolla, California, June 1995. ACM Press. [50] Thérèse Hardin, Luc Maranget, and Bruno Pagano. Functional runtime systems within the lambdasigma calculus. Journal of Functional Programming, 8(2):131–172, 1998. [51] Simon Helsen and Peter Thiemann. Two flavors of offline partial evaluation. In Jieh Hsiang and Atsushi Ohori, editors, Advances in Computing Science - ASIAN’98, number 1538 in Lecture Notes in Computer Science, pages 188–205, Manila, The Philippines, December 1998. Springer-Verlag. [52] Robert Hieb and R. Kent Dybvig. Continuations and concurrency. In Proceedings of the Second ACM SIGPLAN Symposium on Principles & Practice of Parallel Programming, SIGPLAN Notices, Vol. 25, No. 3, pages 128–136, Seattle, Washington, March 1990. ACM Press. [53] Robert Hieb, R. Kent Dybvig, and Claude W. Anderson, III. Subcontinuations. Lisp and Symbolic Computation, 5(4):295–326, December 1993. [54] John Hughes. A novel representation of lists and its application to the function “reverse”. Information Processing Letters, 22(3):141–144, 1986. [55] Yukiyoshi Kameyama. Axioms for delimited continuations in the CPS hierarchy. In Jerzy Marcinkowski and Andrzej Tarlecki, editors, Computer Science Logic, 18th International Workshop, CSL 2004, 13th Annual Conference of the EACSL, Proceedings, volume 3210 of Lecture Notes in Computer Science, pages 442–457, Karpacz, Poland, September 2004. Springer. [56] Yukiyoshi Kameyama and Masahito Hasegawa. A sound and complete axiomatization of delimited continuations. In Olin Shivers, editor, Proceedings of the 2003 ACM SIGPLAN International Conference on Functional Programming, pages 177–188, Uppsala, Sweden, August 2003. ACM Press. [57] Richard Kelsey, William Clinger, and Jonathan Rees, editors. Revised5 report on the algorithmic language Scheme. Higher-Order and Symbolic Computation, 11(1):7–105, 1998. 38 M. BIERNACKA, D. BIERNACKI, AND O. DANVY [58] Yoshiki Kinoshita. A bicategorical analysis of E-categories. Mathematica Japonica, 47(1):157–169, 1998. [59] Oleg Kiselyov. How to remove a dynamic prompt: Static and dynamic delimited continuation operators are equally expressible. Technical Report 611, Computer Science Department, Indiana University, Bloomington, Indiana, March 2005. [60] Peter J. Landin. The mechanical evaluation of expressions. The Computer Journal, 6(4):308–320, 1964. [61] Julia L. Lawall and Olivier Danvy. Continuation-based partial evaluation. In Carolyn L. Talcott, editor, Proceedings of the 1994 ACM Conference on Lisp and Functional Programming, LISP Pointers, Vol. VII, No. 3, pages 227–238, Orlando, Florida, June 1994. ACM Press. [62] Simon Marlow and Simon L. Peyton Jones. Making a fast curry: push/enter vs. eval/apply for higherorder languages. In Fisher [45], pages 4–15. [63] Per Martin-Löf. About models for intuitionistic type theories and the notion of definitional equality. In Proceedings of the Third Scandinavian Logic Symposium (1972), volume 82 of Studies in Logic and the Foundation of Mathematics, pages 81–109. North-Holland, 1975. [64] Eugenio Moggi. Notions of computation and monads. Information and Computation, 93:55–92, 1991. [65] Luc Moreau and Christian Queinnec. Partial continuations as the difference of continuations, a duumvirate of control operators. In Manuel Hermenegildo and Jaan Penjam, editors, Sixth International Symposium on Programming Language Implementation and Logic Programming, number 844 in Lecture Notes in Computer Science, pages 182–197, Madrid, Spain, September 1994. Springer-Verlag. [66] Chethan R. Murthy. Control operators, hierarchies, and pseudo-classical type systems: A-translation at work. In Olivier Danvy and Carolyn L. Talcott, editors, Proceedings of the First ACM SIGPLAN Workshop on Continuations (CW 1992), Technical report STAN-CS-92-1426, Stanford University, pages 49–72, San Francisco, California, June 1992. [67] Lasse R. Nielsen. A denotational investigation of defunctionalization. Research Report BRICS RS-00-47, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, December 2000. [68] Gordon D. Plotkin. Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science, 1:125–159, 1975. [69] Gordon D. Plotkin. A structural approach to operational semantics. Technical Report FN-19, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, September 1981. [70] Christian Queinnec and Bernard Serpette. A dynamic extent control operator for partial continuations. In Robert (Corky) Cartwright, editor, Proceedings of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, pages 174–184, Orlando, Florida, January 1991. ACM Press. [71] John C. Reynolds. Definitional interpreters for higher-order programming languages. Higher-Order and Symbolic Computation, 11(4):363–397, 1998. Reprinted from the proceedings of the 25th ACM National Conference (1972), with a foreword. [72] Chung-chieh Shan. Shift to control. In Olin Shivers and Oscar Waddell, editors, Proceedings of the 2004 ACM SIGPLAN Workshop on Scheme and Functional Programming, Technical report TR600, Computer Science Department, Indiana University, Snowbird, Utah, September 2004. [73] Dorai Sitaram. Models of Control and their Implications for Programming Language Design. PhD thesis, Computer Science Department, Rice University, Houston, Texas, April 1994. [74] Dorai Sitaram and Matthias Felleisen. Control delimiters and their hierarchies. Lisp and Symbolic Computation, 3(1):67–99, January 1990. [75] Dorai Sitaram and Matthias Felleisen. Reasoning with continuations II: Full abstraction for models of control. In Wand [81], pages 161–175. [76] Guy L. Steele Jr. Rabbit: A compiler for Scheme. Master’s thesis, Artificial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, Massachusetts, May 1978. Technical report AI-TR474. [77] Eijiro Sumii. An implementation of transparent migration on standard Scheme. In Matthias Felleisen, editor, Proceedings of the Workshop on Scheme and Functional Programming, Technical Report 00-368, Rice University, pages 61–64, Montréal, Canada, September 2000. [78] Eijiro Sumii and Naoki Kobayashi. A hybrid approach to online and offline partial evaluation. HigherOrder and Symbolic Computation, 14(2/3):101–142, 2001. [79] Peter Thiemann. Combinators for program generation. Journal of Functional Programming, 9(5):483– 525, 1999. [80] Philip Wadler. Monads and composable continuations. LISP and Symbolic Computation, 7(1):39–55, January 1994. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 39 [81] Mitchell Wand, editor. Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, Nice, France, June 1990. ACM Press. [82] Yong Xiao, Amr Sabry, and Zena M. Ariola. From syntactic theories to interpreters: Automating proofs of unique decomposition. Higher-Order and Symbolic Computation, 14(4):387–409, 2001. This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
6cs.PL
Dense Subset Sum may be the hardest arXiv:1508.06019v1 [cs.DS] 25 Aug 2015 Per Austrin Petteri Kaski Mikko Koivisto Jesper Nederlof Abstract The Subset Sum problem asks whether a given set of n positive integers contains a subset of elements that sum up to a given target t. It is an outstanding open question whether the O∗(2n/2 )-time algorithm for Subset Sum by Horowitz and Sahni [J. ACM 1974] can be beaten in the worst-case setting by a “truly faster”, O∗(2(0.5−δ)n )-time algorithm, with some constant δ > 0. Continuing an earlier work [STACS 2015], we study Subset Sum parameterized by the maximum bin size β, defined as the largest number of subsets of the n input integers that yield the same sum. For every ǫ > 0 we give a truly faster algorithm for instances with β ≤ 2(0.5−ǫ)n , as well as instances with β ≥ 20.661n . Consequently, we also obtain a characterization in terms of the popular density parameter n/ log2 t: if all instances of density at least 1.003 admit a truly faster algorithm, then so does every instance. This goes against the current intuition that instances of density 1 are the hardest, and therefore is a step toward answering the open question in the affirmative. Our results stem from novel combinations of earlier algorithms for Subset Sum and a study of an extremal question in additive combinatorics connected to the problem of Uniquely Decodable Code Pairs in information theory. Author affiliations and addresses: Per Austrin School of Computer Science and Communication KTH Royal Institute of Technology, Sweden [email protected] Petteri Kaski Helsinki Institute for Information Technology HIIT & Department of Computer Science Aalto University, Finland [email protected] Mikko Koivisto Helsinki Institute for Information Technology HIIT & Department of Computer Science University of Helsinki, Finland [email protected] Jesper Nederlof Department of Mathematics and Computer Science Technical University of Eindhoven, The Netherlands [email protected] 1 Introduction 1 1 Introduction The Subset Sum problem and its generalization to the Knapsack problem are two of the most famous NP-complete problems. In the Subset Sum problem, we are given positive P integers w1 , w2 , . . . , wn , t ∈ Z as input, and need to decide whether there exists a subset X ⊆ [n] with j∈X wj = t. In the Knapsack problem, we are additionally given integers v1 , v2 , . . . , vn and are asked to find a subset X ⊆ [n] maximizing P P w v subject to the constraint j∈X j ≤ t. While the study of Subset Sum is, among others, j∈X j motivated by cryptographic applications or balancing problems, Knapsack has numerous applications in combinatorial optimization. We study the exact worst-case time complexity of these problems. The earliest and probably most important algorithms for both problems are simple applications of dynamic programming, pioneered by Bellman [5], solving both problems in O∗(t) time (where the O∗(·) notation suppresses factors polynomial in the input size). In terms of n, the best algorithms for both problems are due to Schroeppel and Shamir [18], using O∗(2n/2 ) time and O∗(2n/4 ) space, based on the meet-in-the-middle technique by Horowitz and Sahni [9]. Nederlof et al. [16] show that there is an O∗(T n )-time, O∗(S n )-space algorithm for Subset Sum if and only if there is an O∗(T n )-time, O∗(S n )-space algorithm for Knapsack. A major open question since the paper by Horowitz and Sahni [9] is whether we can do “truly faster” for both problems:  Open Question 1: Can Subset Sum be solved in O∗ 2(0.5−δ)n time for some constant δ > 0? In this paper we discuss Monte Carlo algorithms in the following sense: the algorithm never returns false positives and constructs solutions of yes-instances with at least inverse polynomial probability. All randomized algorithms discussed in this paper are of this type, but for Open Question 1 we would be satisfied with two-sided error as well. Zooming out, one motivation of this question is as follows. It is commonly believed that there are no polynomial time or even sub-exponential time algorithms for Subset Sum. So how fast can the fastest algorithm be? It would be an elegant situation if the simple meet-in-the-middle algorithm was optimal. But this would also be quite surprising, and so we aim to show that at least this is not the case. In 2010, Howgrave-Graham and Joux [10] gave an algorithm that answered Open Question 1 in the affirmative in an average case setting. To state their result, let us describe the setting where it applies. The density of a Subset Sum instance is defined as n/ log2 t. A random instance of density d > 0 is constructed by fixing t ≈ 2n/d and picking the integers w1 , . . . , wn , t independently and uniformly at random between 1 and 2n/d . Howgrave-Graham and Joux [10] showed that random instances of density 1 can be solved in O∗(20.311n ) time, and later this has been improved to O∗(20.291n ) time by Becker et al. [4]. These results resolve Open Question 1 in the average case setting since Impagliazzo and Naor [11] showed that random instances are the hardest when they have density 1. Indeed, a vast body of research has given better algorithms for random instances with density deviating from 1, like reductions of sparse instances to the shortest vector problem (e.g. [14, 6]) and the algorithm by Flaxman and Przydatek [7]. The algorithms discussed thus far all use exponential space, which can be a serious bottleneck. Therefore many studies also emphasize the setting where the algorithm is restricted to using polynomial space. It is known that the running time of the dynamic programming based algorithms can be achieved also in polynomial space: Lokshtanov and Nederlof [15] give polynomial space algorithms solving Subset Sum in O∗(t) time and Knapsack in pseudo-polynomial time. On the other hand, in terms of n, no polynomial space algorithm significantly faster than naïvely going through all 2n subsets is known, and the following has been stated as an open problem by a number of researchers (see e.g. [20, 1]):  Open Question 2: Can Subset Sum be solved in polynomial space and O∗ 2(1−δ)n time for some constant δ > 0? 1.1 Our results We aim to make progress on Open Question 1, and show that a large class of instances can be solved truly faster. An optimist may interpret this as an indication that truly faster algorithms indeed exist, while a pessimist may conclude the remaining instances must be the (strictly) hardest instances. 1 Introduction 2 Algorithmic Results To define classes of instances that admit truly faster algorithms, we consider several natural parameters. The key parameter that seems to capture the range of our algorithmic technique the P best is the maximum bin size β(w) = maxx∈Z |{S ⊆ [n] : i∈S wi = x}|. Our main technical result is: Theorem 1.1. There exists a Monte Carlo algorithm that, for any 0 ≤ ǫ ≤ 1/6, solves all instances of  2 Subset Sum with β(w) ≤ 2(0.5−ǫ)n in O∗ 2(0.5−ǫ/4+3ǫ /4)n time. We have not optimized the precise constants in Theorem 1.1 – the main message is that any instance with bin size up to 2(0.5−ǫ)n can be solved in time 2(0.5−Ω(ǫ))n . For ǫ ≥ 1/6, the running time of 223n/48 obtained for ǫ = 1/6 is still valid since 2(0.5−1/6)n remains an upper bound on β(w). In a previous work [3], we solved Subset Sum in time O∗(20.3399n β(w)4 ), which is faster than Theorem 1.1 for small β(w), but Theorem 1.1 shows that we can beat the meet-in-the-middle bound for a much wider class of instances. From the other end, we also prove that when the maximum bin size becomes too large, we can again solve Subset Sum truly faster: Theorem 1.2. There exist a constant δ > 0 and  a deterministic algorithm that solves all instances of Subset Sum with β(w) ≥ 20.661n in O∗ 2(0.5−δ)n time. Combinatorial Results Given Theorem 1.1, a natural question is how instances with β(w) ≥ 20.5n look like. This question is an instantiation of the inverse Littlewood-Offord problem, a subject well-studied in the field of additive combinatorics. Ideally we would like to find structural properties of instances with β(w) ≥ 20.5n , that can be algorithmically exploited by other means than Theorem 1.1 in order to resolve Open Question 1 in the affirmative. While there is a large amount of literature on the inverse Littlewood-Offord problem, the typical range of β(w) studied there is β(w) = 2n / poly(n) which is not relevant for our purposes. However, we did manage to determine additional properties that any instance that is not solved by Theorem 1.1 must satisfy. In particular, we study a different natural parameter, the numberPof distinct sums generated by w, defined as |w(2[n] )| = {w(X) : X ⊆ [n]} (where we denote w(X) = i∈X wi ). This parameter can be viewed as a measure of the “true” density of an instance, in the following sense. An instance with density d = n/ log2 t has |w(2[n] )| ≤ n2n/d (assuming without loss of generality that t ≤ maxi wi ). On the other hand, by standard hashing arguments (e.g., Lemma 2.2 with B = 10|w(2[n] )|), any instance can be hashed down to an equivalent instance of density roughly n/ log2 |w(2[n] )|. The relationship between |w(2[n] )| and β(w) is more complicated. Intuitively, one would expect that if one has so much concentration that β(w) ≥ 20.5n , then w should not generate too many sums. We are not aware of any such results from the additive combinatorics literature. However, by establishing a new connection to Uniquely Decodable Code Pairs, a well-studied object in information theory, we can derive the following bound. Lemma 1.3. If |w(2[n] )| ≥ 20.997n then β(w) ≤ 20.4996n . Unfortunately, we currently do not know how to algorithmically exploit |w(2[n] )| ≤ 20.997n . But we do know how to exploit a set S with |S| ≤ n/2 and |w(2S )| ≤ 20.4999n (see Lemma 3.2). This suggests the question of how large β(w) can be in instances lacking such an S, and we prove the following bound. Lemma 1.4. There is a universal constant δ > 0 such that the following holds for all sufficiently large n. Let S, T be a partition of [n] with |S| = |T | = n/2 such that |w(2S )|, |w(2T )| ≥ 2(1/2−δ)n . Then β(w) ≤ 20.661n . Further Consequences Combining Lemma 1.3 and Theorem 1.1, we see directly that instances that generate almost 2n distinct sums can be solved faster than 20.5n . Theorem 1.5. There exists a Monte Carlo algorithm that solves all instances of Subset Sum with |w(2[n] )| ≥ 20.997n in time O∗ (20.49991n ). Combining this with the view described above of |w(2[n] )| as a refined version of the density of an instance, we have the following result, to support the title of our paper: 2 Preliminaries 3 Theorem 1.6. Suppose there exist a constant ǫ > 0 and an algorithm that solves all Subset Sum instances of density at least 1.003 in time O∗(2(0.5−ǫ)n ). Then there exists a Monte Carlo algorithm that solves Subset Sum in time O∗ 2max{0.49991,0.5−ǫ}n . After the result by Howgrave-Graham and Joux [10], this may be a next step towards resolving Open Question 1. Intuitively, one should be able to exploit the fact that the integers in a dense instance have fewer than n bits. For example, even if only the target is picked uniformly at random, in expectation there will be an exponential number of solutions, which can easily be exploited.1 . Finally, let us note a somewhat curious consequence of our results. As mentioned earlier, in the context of Open Question 2, it is known that the O∗(2n/d ) running time for instances of density d achieved through dynamic programming can be achieved in polynomial space [15] (see also [13, Theorem 1(a)]). Combining this with Corollary 1.5 and hashing, we directly get the following “interleaving” of Open Questions 1 and 2. Corollary 1.7. There exist two Monte Carlo algorithms, one running in O∗(20.49991n ) time and the other in O∗(20.999n ) time and polynomial space, such that every instance of Subset Sum is solved by at least one of the algorithms. Organization of the paper This paper is organized as follows: In Section 2 we review some preliminaries. In Section 3, we provide the proofs of our main algorithmic results. In Section 4 we prove two combinatorial lemmas. In Section 5 we give the proof for Theorem 1.6. Finally we end with some discussion on in Section 6. 2 Preliminaries For a modulus m ∈ Z≥1 and x, y ∈ Z, we write x ≡ y (mod m), or x ≡m y for short, to indicate that m divides x − y. Throughout this paper, w1 , w2 , . . . , wn , t will denote the input integers of a P Subset Sum instance. We associate the set function w : 2[n] → Z with these integers by letting w(X) = i∈X wi , and for a set family F ⊆ 2[n] we write w(F ) for the image {w(X) : X ∈ F }. Pℓ Pℓ For 0 ≤ x1 , x2 , . . . , xℓ ≤ 1 with i=1 xi = 1 we write h(x1 , x2 , . . . , xℓ ) = i=1 −xi log2 xi for the entropy function. Here, 0 log2 0 should be interpreted as 0. We shorthand h(x, 1 − x) with h(x). We routinely use the standard fact (easily proved using Stirling’s formula) that for non-negative integers n1 , . . . , nℓ (where ℓ  n h(n1 /n,...,nℓ /n)n = 2 · poly(n). is a constant) summing to n, it holds that n1 ,...,n ℓ Claim 2.1. For every sufficiently large integer r the following holds. If p is a prime between r and 2r selected uniformly at random and x is a nonzero integer, then p divides x with probability at most (log2 x)/r. Proof. By the Prime Number Theorem [8, p. 494, Eq. (22.19.3)], there are at least r/ log2 r primes between r and 2r. A nonzero number x can have at most logr x prime factors larger than r. The probability that a random prime between r and 2r is a factor of x is therefore at most (logr x) (r/ log2 r) = (log2 x)/r. Lemma 2.2 (Bit-length reduction). There exists a randomized algorithm that takes as input a Subset Sum instance w1 , w2 , . . . , wn , t ∈ Z and an integer B ∈ Z, and in time O∗ (1) outputs a new Subset Sum instance w1′ , w2′ , . . . , wn′ , t′ ∈ Z such that with probability Ω∗ (1), the following properties all simultaneously hold. 1. 0 ≤ w1′ , w2′ , . . . , wn′ , t′ < 4nB log2 B. 2. If B ≥ 10 · |w(2[n] )|, then X ⊆ [n] satisfies w(X) = t if and only if w′ (X) = t′ . 3. If B ≥ 10 · |w(2[n] )|, then |w(2[n] )|/2 ≤ |w′ (2[n] )| ≤ n|w(2[n] )|. 4. If B ≥ 5 · |w(2[n] )|2 , then β(w)/n ≤ β(w′ ) ≤ β(w). 1 For example, assuming there are at least 2σn solutions for a constant σ ≥ 0, use a dynamic programming table data structure to randomly sample the subsets in the congruence class t mod q for q a random prime with about (1 − σ)n/2 bits within linear time per sample. A solution is found within O ∗(2(1−σ)n/2 ) samples with high probability. 3 Algorithmic Results 4 Proof. The algorithm picks a uniformly random prime p from the interval B log2 t ≤ p ≤ 2B log2 t. It then outputs wi′ = wi mod p for each i = 1, 2, . . . , n and t′ = (t mod p) + r · p for a uniformly randomly chosen r ∈ {0, . . . , n − 1}. The number of bits in p is O∗(1), so the reduction runs in O∗(1) time. This construction might not satisfy Property 1 if t is very large – instead it satisfies the weaker bound t′ < 2nB log2 t. The desired bound can be obtained by repeating the reduction O(1) times – e.g., if after three steps t′′ is more than 2nB log2 B, then the original number t was triply exponential and the input weights are so large that brute force time O∗(2n ) is O∗(1). Consider any two sums y1 , y2 ∈ w(2[n] ) ∪ {t} with y1 6= y2 . We have y1 ≡p y2 if and only if p divides x = y2 − y1 6= 0. Since 0 < |y2 − y1 | = |x| ≤ 2nt ≤ t2 (without loss of generality we assume t ≥ 2n since otherwise dynamic programming lets us solve the instance in polynomial time), by Claim 2.1 we have y1 ≡p y2 with probability at most (log2 |x|)/(B log2 t) ≤ 2/B. To establish Property 2, we take a union bound over the |w(2[n] )| ≤ B/10 different sums y ∈ w(2[n] ) \ {t} and deduce that with probability at least 4/5 over the choice of p, w(X) 6= t implies w′ (X) 6= t′ . In the other direction, if w(X) = t, then w′ (X) = t′ with probability exactly 1/n over the choice of r. For Property 3 the argument is similar: for any given sum y ∈ w(2[n] ), the probability that there exists another sum y ′ 6= y that collides with y mod p is at most 1/5. By Markov’s inequality, this implies that with probability at most 2/5, more than half of all y ∈ w(2[n] ) collide with some other sum y ′ mod p. Conversely with probability at least 3/5, at least half of all y ∈ w(2[n] ) have no such collision, and in this case |w′ (2[n] )| ≥ |w(2[n] )|/2. For the upper bound, two sets S1 , S2 with w(S1 ) = w(S2 ) have w′ (S1 ) ≡p w′ (S2 ). Given w′ (S1 ) mod p, there are at most n possible different values for w′ (S1 ), so each bin of w(2[s] ) is split into at most n bins after the hashing. [n]  Finally, for Property 4, we use a union bound over all pairs of sums in w(22 ) . Since B ≥ 5|w(2[n] )|2 ≥ [n]  10 |w(22 )| , with probability at least 4/5, no two sums y1 , y2 ∈ w(2[n] ) are hashed to the same value mod p and thus β(w′ ) ≤ β(w). For the lower bound, we have as before that each original bin is split into at most n bins after hashing, and the largest of these must be at least a 1/n fraction of the original bin size. Now we combine the above bounds to bound the probability all properties hold simultaneously: taking a union bound over the events depending on p, we have that with probability at least 1/5, w(X) 6= t implies w′ (X) 6= t′ , and Properties 3 and 4 are satisfied. Conditioned on this, the final good event, that w(X) = t implies w′ (X) = t still happens with probability 1/n since r is independent of p. 3 Algorithmic Results This section establishes Theorems 1.1 and 1.2. We begin with two lemmas showing how one can exploit a subset of the input integers if it generates either many or few distinct sums. The case of many sums is the main technical challenge and addressed by the following result, which is our main algorithmic contribution. Lemma 3.1. There is a randomized algorithm that, given positive integers w1 , . . . , wn , t ≤ 2O(n) and a set [n] M ∈ µn satisfying µ ≤ 0.5 and |w(2M )| ≥ 2γ|M| for some γ ∈ [0, 1], finds a subset X ⊆ [n] satisfying  w(X) = t with probability Ω∗(1) (if such an X exists) in time O∗ 2(0.5+0.8113µ−γµ)n + β(w)2(1.5−γ)µn . The proof is given in Section 3.1. Informally, it uses an algorithm that simultaneously applies the meetin-the-middle technique of Horowitz and Sahni [9] on the set [n] \ M and the “representation technique” of Howgrave-Graham and Joux [10] on the set M . Specifically, we pick an arbitrary equi-sized partition L, R of [n] \ M and construct lists L ⊆ 2L∪M and R ⊆ 2R∪M . Note that without restrictions on L and R, one solution X is witnessed by 2|M∩X| pairs (S, T ) from L × R in the sense that S ∪ T = X. Now the crux is that since M generates many sums, M ∩ X generates many sums (say 2π|M| ): this allows us to uniformly choose a congruence class tL of Zp where p is a random prime of order 2π|M| and restrict attention only to sets S ⊆ L ∪ M and T ⊆ R ∪ M such that w(S) ≡p tL and w(T ) ≡p t − tL , while still finding solutions with good probability. This ensures that the to-be-constructed lists L and R are small enough. As an indication  M∩X for this, note that if |M ∩ X| = |M |/2 and |w( |M|/4 )| is Ω(2|M|/2 ), the expected sizes of L and R are at most 2((1−µ)/2+h(1/4)µ−µ/2)n ≤ 2(1/2−0.18µ)n . In contrast to Lemma 3.1, it is straightforward to exploit a small subset that generates few sums: 3 Algorithmic Results 5  [n] Lemma 3.2. There is a deterministic algorithm that, given positive integers w1 , . . . , wn , t and a set M ∈ µn satisfying µ ≤ 0.5 and |w(2M )| ≤ 2γ|M| for some γ ∈ [0, 1], finds a subset X ⊆ [n] satisfying w(X) = t (if 1−µ(1−γ)  n 2 such an X exists) in time O∗ 2 . Proof. Let L be an arbitrary subset of [n] \ M of size 2 1−µ(1−γ) n 2 1−µ(1−γ) n 2 , and |w(2R )| ≤ |w(2M )| · |w(2[n]\L\M )| ≤ 2γµn 2(1− and let R = [n] \ L. Then |w(2L )| ≤ 2|L| = 1−µ(1−γ) −µ 2 n )n = 2 1−µ(1−γ) 2 . Now apply routine dynamic programming to construct w(2L ) in time O∗ (|w(2L )|) and w(2R ) in time O∗ (|w(2R )|); build a look-up table data structure for w(2L ), and for each x ∈ w(2R ), check in O(n) time whether t − x ∈ w(2L ). Given these lemmas, we are now in the position to exploit small bins: Proof of Theorem 1.1. We start by preprocessing the input with Lemma 2.2, taking B = 23n ≫ |w(2[n] )|2 . Let γ = 1 − ǫ/2, µ = 3ǫ/2, and partition [n] into 1/µ parts M1 , . . . , M1/µ of size at most µn arbitrarily. We distinguish two cases. First, suppose that |w(2Mi )| ≥ 2γµn for some Mi (note that this can be easily determined within the claimed time bound). We then apply the algorithm of Lemma 3.1 with M = Mi and solve the instance (with probability Ω∗ (1)) in time   O∗ 2(0.5+0.8113µ−γµ)n + β(w)2(1.5−γ)µn . The coefficient of the exponent of the first term is 0.5+0.8113·3ǫ/2−(1−ǫ/2)·3ǫ/2 = 0.5−0.28305ǫ+0.75ǫ2. The coefficient of the exponent of the second term is 0.5 − ǫ + (1.5 − (1 − ǫ/2)) · 3ǫ/2 = 0.5 − ǫ/4 + 0.75ǫ2. 1 S 2µ Mi and R = [n] \ M . We see that Second, suppose that |w(2Mi )| ≤ 2γµn for all i. Let L = i=1 Y Y and |w(2R )| ≤ |w(2Mi )| ≤ 2γn/2 |w(2Mi )| ≤ 2γn/2 . |w(2L )| ≤ 1 i≤ 2µ 1 i> 2µ Using standard dynamic programming to construct w(2L ) and w(2R ) in O∗ (|w(2L )|) and O∗ (|w(2R )|) time, we can therefore solve the instance within O∗(2γn/2 ) = O∗(2(0.5−ǫ/4)n ) time using linear search. Exploiting large bins is easy using Lemma 1.4: Proof of Theorem 1.2. Pick an arbitrary equi-sized partition S, T of [n]. By the contrapositive of Lemma 1.4, one of S and T generates at most 2(1/2−δ)n sums. Applying Lemma 3.2 with the set in question as M , we get a running time of O∗ 2(1−δ)n/2 . The proof of Lemma 1.4 is given in Section 4. 3.1 Proof of Lemma 3.1 We now prove Lemma 3.1. Let s := |X ∩ M |. Without loss of generality, we may assume that s ≥ |M |/2 (by considering the actual target t and the complementary target t′ := w([n]) − t). We may further assume that s is known by trying all O(n) possible values. The algorithm is listed in Algorithm 1. Running time We focus on the expected running time of Algorithm 1 (by returning no after running the algorithm at least twice its expected number of steps, this is sufficient). We will analyze the algorithm in two parts: (i) the generation of the lists L and R on Lines and 10, and (ii) the iteration over pairs in L × R  9 λn ≤ 2 2h(σ1 )µn = 2((1−µ)/2+h(σ/2)µ)n denote the size in Line 11 (the typical bottleneck). Let WL := 2|L| M s1 of the search space for L. 1/2 Proposition 3.3. The lists L and R in Lines 9 and 10 can be constructed in expected time O∗ WL  WL /2πµn , where the expectation is over the choice of p and tL . + 3 Algorithmic Results 6 Algorithm A(w1 , . . . , wn , t, M, s, γ) Assumes |w(2M )| ≥ 2γ|M| Output: yes, if there exists an X ⊆ [n] with w(X) = t and |X ∩ M | = s 1: Let σ = s/|M | 2: Let π = γ − 1 + σ 3: Pick a random prime p satisfying 2π|M| ≤ p ≤ 2π|M|+1 4: Pick a random number 0 ≤ tL ≤ p − 1 5: for all 0 ≤ s1 ≤ s2 ≤ |M | such that s1 + s2 = s do 6: Let σ1 = s1 /|M |, σ2 = s2 /|M |  7: Let λ = (1 − µ)/2 + h(σ/2) − h(σ1 ) µ 8: Let L, R be an arbitrary partition of [n] \ M such that |L| = ⌈λn⌉ 9: Construct L = {S ∈ 2L∪M : w(S) ≡p tL and |S ∩ M | = s1 } 10: Construct R = {T ∈ 2R∪M : w(T ) ≡p t − tL and |T ∩ M | = s2 } 11: for all (S, T ) ∈ L × R such that w(S) + w(T ) = t do 12: if S ∩ T = ∅ then return yes 13: return no Algorithm 1: Exploiting a small subset generating many sums. 1/2 Proof. By splitting the search space for L appropriately, we get two “halves” each of which has size WL . Specifically, we arbitrarily pick a subset L1 ⊆ L of size λ1 n with λ1 = (λ + h(σ/2)µ)/2 and generate using  }. Then we store w(2L1 ) in a brute-force w(2L1 ) and w(L2 ) where L2 = {Y ∪ Z : Y ⊆ L \ L1 and Z ∈ M s1 dictionary data structure and, for each sum x ∈ w(L2 ), we look up all solutions with sum t − x mod p in the 1/2 dictionary of w(2L1 ) and list for such a pair its union. This yields a running time of O∗(|L| + WL ). The expected size of |L| over the random choices of tL is E[|L|] ≤ O(WL /2πµn ).   1/2 The analysis for R is analogous and we get a running time of O∗ WR +WR /2πµn where WR := 2|R| |M| s2 . Let ρ = |R|/n. Since h(·) is concave and, in particular, h(σ1 ) + h(σ2 ) ≤ 2h(σ/2), we then have (up to a negligible term caused by rounding λn to an integer)  ρ = 1 − µ − λ = (1 − µ)/2 − h(σ/2) − h(σ1 ) µ ≤ (1 − µ)/2 + (h(σ/2) − h(σ2 ))µ . Thus the case of R is symmetric to the situation for L and we have WR ≤ 2((1−µ)/2+h(σ/2)µ)n = O∗ (WL ). The term WL /2πµn can be bounded by using the definition of π = γ − 1 + σ and we get 1 1 WL /2πµn = 2( 2 +µ( 2 +h(σ/2)−γ−σ))n . Since 1/2 + h(σ/2) − σ subject to 1/2 ≤ σ ≤ 1 is maximized at σ = 1/2 where it is h(1/4) ≤ 0.8113, we have that WL /2πµn ≤ 2(0.5+0.8113µ−γµ)n .  1/2 The term WL is naively bounded by 2(1+µ)n/4 , which is dominated by the term O∗ 2(0.5+0.8113µ−γµ)n since µ ≤ 1/2 and γ ≤ 1. It follows that Line 9 and Line 10 indeed run within the claimed time bounds.  Proposition 3.4. The expected number of pairs considered in Line 11 is O∗ β(w)2µ(1.5−γ)n , where the expectation is over the choice of p and tL . Proof. Define  B = (P, Q) ∈ 2[n] × 2M : w(P ) + w(Q) = t , and note that the set of pairs (S, T ) ∈ 2L∪M × 2R∪M satisfying w(S) + w(T ) = t are in one-to-one correspondence with pairs in B (by the map (S, T ) 7→ (S ∪ (T ∩ R), T ∩ M )). Furthermore, the size of B is bounded by |B| ≤ β(w)2|M| : for each of the 2|M| possible choices of Q, there are at most β(w) subsets R that sum to t − w(Q). Any given pair (S, T ) ∈ 2L∪M × 2R∪M satisfying w(L) + w(R) = t is considered only if w(S) ≡p tL , which happens with probability O(2−πn ) (over the uniformly random choice of tL ). Thus the expected number of pairs considered in Line 11 is upper bounded by O(|B|/2πµn ) = O(β(w)2µ(1−π)n ) = O(β(w)2µ(2−σ−γ)n ). Using σ ≥ 1/2, the desired bound follows. 4 Combinatorial Results (Lemma 1.3 and Lemma 1.4) 7 Correctness Suppose there exists an X ⊆ [n] with w(X) = t and |X ∩M | = s. Note that 2γ|M| ≤ |w(2M )| ≤ |w(2M∩X )| · |w(2M\X )|, and since |w(2M\X )| ≤ 2|M|−s , we have that|w(2M∩X )| ≥ 2γ|M|−(1−σ)|M| = 2π|M| . )| ≥ 2π|M| /|M |. Let us focus on the Thus there must exist positive s1 + s2 = s such that |w( M∩X s1 corresponding iteration of Algorithm 1. Let wL := w(X ∩ L) be the contribution of L to the solution X. We claim that in this iteration, the following holds. Proposition 3.5.       M ∩X 1 Pr ∃Q ∈ . : w(Q) ≡p tL − wL ≥ Ω s1 |M | (3.1) Note that this is sufficient for establishing correctness of the algorithm, since conditioned on this event, Algorithm 1 will include S := Q ∪ (L ∩ X) in L and T := X \ S in R, and the algorithm recovers X.    | ≥ be a maximal injective subset, i.e., satisfying |F | = |w(F )| = |w M∩X Proof. Let F ⊆ M∩X s1 s1 Ω∗ (2π|M| ). Let ci = | {Y ∈ F : w(Y ) ≡p i} | be the number of sets from F in the i’th bin mod p. Our goal is to lower bound the probability that ctL −wL > 0 (where tL − wL is taken modulo p). We can bound the expected ℓ2 norm (e.g., the number of collisions) by X  X    (3.2) Pr p divides w(Y ) − w(Z) ≤ |F | + O∗ |F |2 /2π|M| , c2i = E i Y,Z∈F where uses Claim 2.1 and the assumption that the wi ’s are 2O(n) . By Markov’s inequality, P 2 the ∗inequality 2 π|M| ) with probability at least Ω∗ (1) over the choice of p (here we used |F | = Ω∗ (2π|M| ) i ci ≤ O (|F | /2 to conclude that the second term in (3.2) dominates on this, Cauchy-Schwarz implies  Pthe2 first).∗ Conditioned π|M| that the number of non-zero ci ’s is at least |F |2 c ≥ Ω (2 ). When this happens, the probability i i that ctL −wL > 0 (over the uniformly random choice of tL ) is Ω∗ (1). This concludes the proof of Lemma 3.1. 4 Combinatorial Results (Lemma 1.3 and Lemma 1.4) In this section we provide two non-trivial quantitative relations between several structural parameters of the weights. Our results are by no means tight, but will be sufficient for proving our main results. For the purposes of this section, itPis convenient to use vector notation for subset sums. In particular, for a vector x ∈ Zn , we write x · w = ni=1 xi wi , and x−1 (j) ⊆ [n] for the set of i ∈ [n] such that vi = j. Our approach to relate the number of sums |w(2[n] )| to the largest bin size β(w) is to establish a connection to the notion of Uniquely Decodable Code Pairs from information theory, defined as follows. Definition 4.1 (Uniquely Decodable Code Pair, UDCP). If A, B ⊆ {0, 1}n such that |A + B| = |{a + b : a ∈ A, b ∈ B}| = |A| · |B| , then (A, B) is called uniquely decodable. Note that here addition is performed over Zn (and not mod Zn2 ). UDCP’s capture the zero error region of the so-called binary adder channel, and there is a fair amount of work on how large the sets A and B can be (for a survey, see [19, §3.5.1]). The connection between UDCP’s and Subset Sum is that a Subset Sum instance that both generates many sums and has a large bin yields a large UDCP, as captured in the following proposition. Proposition 4.2. If there exist weights w1 , . . . , wn such that |w(2[n] )| = a and β(w) = b, then there exists a UDCP (A, B) with |A| = a and |B| = b. Proof. Let A ⊆ {0, 1}n be an injective set, i.e., x · w 6= x′ · w for all x, x′ ∈ A with x 6= x′ . Note that there exists such an A with |A| = a. Let B ⊆ {0, 1}n be a bin, i.e., y · w = y ′ · w for all y, y ′ ∈ B. Note that we can take these to have sizes |A| = a and |B| = b. We claim that (A, B) is a UDCP. To see this, let x, x′ ∈ A and y, y ′ ∈ B with x + y = x′ + y ′ . Then x · w + y · w = (x + y) · w = (x′ + y ′ ) · w = x′ · w + y ′ · w . 4 Combinatorial Results (Lemma 1.3 and Lemma 1.4) 8 Thus x · w = x′ · w, and so by the injectivity property of A, we have x = x′ , which in turn implies y = y ′ since x + y = x′ + y ′ . We have the following result by Ordentlich and Shayevitz [17, Theorem 1, setting R1 = 0.997 and α = 0.07]. Theorem 4.3 ([17]). Let A, B ⊆ {0, 1}n such that (A, B) is a UDCP and |A| ≥ 2.997n . Then |B| ≤ 20.4996n . With this connection in place, the proof of Lemma 1.3 is immediate. Lemma 1.3 (restated). If |w(2[n] )| ≥ 20.997n , then β(w) ≤ 20.4996n . Proof. Combine Theorem 4.3 with the contrapositive of Proposition 4.2. The remainder of this section is devoted to Lemma 1.4: Lemma 1.4 (restated). There is a universal constant δ > 0 such that the following holds for all sufficiently large n. Let S, T be a partition of [n] with |S| = |T | = n/2 such that |w(2S )|, |w(2T )| ≥ 2(1/2−δ)n . Then β(w) ≤ 20.661n . The proof also (implictly) uses a connection to Uniquely Decodable Code Pairs, but here the involved sets of strings are not binary. There is no reason to believe that the constant 0.661 is tight. However, because a random instance w of density 2 satisfies the hypothesis for all partitions S, T and has β(w) ≈ 20.5n with good probability, just improving the constant 0.661 will not suffice for settling Open Question 1. 4.1 Proof of Lemma 1.4 For a subset S ⊆ [n], define a function bS : Z → Z by letting bS (x) be the number of subsets of S that sum to x. Note that |w(2S )| equals the support size of bS , or kbS k0 , and that βw (S) = maxx bS (x) = kbS k∞ . Instead of working with these extremes, it is more convenient to work with the ℓ2 norm of bS , and the main technical claim to obtain Lemma 1.4 is the following. Proposition 4.4. There exists a δ > 0 such that for all sufficiently large |S| the following holds: if |w(2S )| ≥ 2(1−δ)|S| , then kbS k2 ≤ 20.661|S| . Using Proposition 4.4, the desired bound of Lemma 1.4 follows immediately, since X bS (y)bT (x − y) ≤ max kbS k2 kbT k2 ≤ 20.661n , β([n]) = max x∈Z x∈Z y∈Z where the first inequality is by Cauchy–Schwarz and the second inequality by Proposition 4.4. Proof of Proposition 4.4. Without loss of generality we take S = [n], and to simplify notation we omit the subscript S from bS and simply write b : Z → Z for the function such that b(r) is the number of subsets of w1 , . . . , wn summing to r. Note that X X X −1 [y · w = 0] · 2|y (0)| , [w(U ) = w(V )] · 2n−|U|−|V | = [w(U ) = w(V )] = kbk22 = U,V ⊆[n] y∈{−1,0,1}n U,V ⊆[n] U∩V =∅  where [p] denotes 1 if p holds and 0 otherwise. Defining Bσ = y ∈ {−1, 0, 1}n : y · w = 0 and kyk1 = σn , we thus have n X kbk22 = |Bi/n |2n−i ≤ n max |Bσ |2(1−σ)n . (4.1) i=0 σ We now proceed to bound the size of Bσ by an encoding argument. To this end, let A ⊆ {0, 1}n be a maximal injective set of vectors. In other words, |A| = |w(2[n] )| ≥ 20.99n , and for all pairs x 6= x′ ∈ A, it holds that x · w 6= x′ · w. We claim that |A + Bσ | = |A| · |Bσ |. To see this note that, similarly to the proof of Proposition 4.2, if x + y = x′ + y ′ (with x, x′ ∈ A and y, y ′ ∈ Bσ ) then x · w = x′ · w (since y ′ · w = 0) and thus x = x′ and y = y ′ . 4 Combinatorial Results (Lemma 1.3 and Lemma 1.4) 9 Define Pσ to be all pairs (x, y) in A × Bσ that are balanced, in the sense that for some γ > 0 the following conditions hold: |x−1 (1) ∩ y −1 (−1)| = 12 |y −1 (−1)| ± γn , |x−1 (1) ∩ y −1 (0)| = 21 |y −1 (0)| ± γn , −1 (4.2) −1 −1 |x (1) ∩ y (1)| = 12 |y (1)| ± γn . √ Claim 4.5. For γ = δ and n sufficiently large, we have that |Pσ | ≥ |A| · |Bσ |/2. Proof. We prove the claim by giving an upper bound on the number of pairs that are not balanced. Note that if a pair (x, y) is not balanced, there must exist a j ∈ {−1, 0, 1} such that (4.2) fails. Let us proceed with fixing a y ∈ Bσ and upper bounding the number of x ∈ A such that |x−1 (1) ∩ y −1 (j)| − 12 |y −1 (j)| > γn . (4.3) Recall the following basic property of the binary entropy function.    Fact 4.6. For all α ∈ 0, 12 , it holds that h 21 − α ≤ 1 − 2α2 / ln 2. Using this bound, the number of x satisfying (4.3) is at most n max 2h(α)n ≤ n2(1−2γ 2 / ln 2)n α≤1/2−γ , 2 and thus the number of pairs not balanced it√ at most 3n2(1−2γ / ln 2)n |Bσ |. This is clearly at most a constant fraction of |A| · |Bσ | by the assumption γ = δ. √ Setting γ = δ, we can now proceed to upper bound |Pσ |. Consider the encoding η : Pσ → {−1, 0, 1, 2}n defined by η(x, y) = x + y. By the property |A + Bσ | = |A| · |B|, it follows that η is an injection, and thus |Pσ | equals the size of the image of η. For a pair (x, y) ∈ Pσ , if y ∈ Bσ has τ σn many 1’s, and (1 − τ )σn many −1’s, then z = η(x, y) has the following frequency distribution: |z −1 (−1)| τσ = ± oγ (1) , n 2 1−σ (1 − τ )σ |z −1 (1)| = + ± oγ (1) , n 2 2 |z −1 (0)| τσ 1−σ = + ± oγ (1) , n 2 2 |z −1 (2)| (1 − τ )σ = ± oγ (1) , n 2 √ where, for a variable ǫ, we write oǫ (1) to indicate a term that converges to 0 when ǫ tends to 0. Since γ = δ, we have oγ (1) = oδ (1). The number of z’s with such a frequency distribution is bounded by   n oδ (1)n . (4.4) (1−τ )σ (1−τ )σ 2 τσ 1−σ 1−σ τσ n, ( + )n, ( + )n, 2 2 2 2 2 2 Then, |Pσ | is bounded by   log |Pσ | ≤ max g(σ, τ ) + oγ (1) n, where g(σ, τ ) = h τ2σ , τ2σ + τ ∈[0,1] 1−σ 1−σ 2 , 2 It can be verified that g(σ, τ ) is maximized for τ = 1/2 and we have  max g(σ, τ ) = h σ4 , 21 − σ4 , 21 − σ4 , σ4 = 1 + h τ ∈[0,1] Combining this with the bounds |Pσ | ≥ |A|·|B|·2−O(δ Plugging this into (4.1) we see that 2 )n σ 2  + (1−τ )σ (1−τ )σ , 2 2  . . and |A| ≥ 2(1−δ)n , we get that |Bσ | ≤ 2(h(σ/2)+oδ (1))n . kbk22 ≤ max 2(1+h(σ/2)−σ+oǫ (1))n . σ The expression h(σ/2) − σ is maximized at σ = 2/5, and we obtain kbk22 ≤ 2(h(1/5)+3/5+oǫ (1)) ≤ 2(1.32195+oδ (1))n . Thus if δ is sufficiently small, we have kbk22 ≤ 21.322n , as desired. 5 Proof of Theorem 1.6 5 10 Proof of Theorem 1.6 Proof of Theorem 1.6. Given oracle access to an algorithm that solves Subset Sum instance of density at least 1.003 in constant time, we solve an arbitrary instance w1 , w2 , . . . , wn , t of Subset Sum in time O∗ (20.49991n ) as follows. As Step 1, run the algorithm of Theorem 1.5 for Θ∗ (20.49991n ) timesteps. If it terminates within this number of steps, return YES if it found a solution and NO otherwise. Otherwise, as Step 2, run the preprocessing of Lemma 2.2 with B = 10 · 20.997n . This yields a new instance with density 1/0.997 > 1.003, which we solve using the presumed oracle for such instances. If the oracle returns a solution, we verify that it is indeed a solution to our original instance and if so return YES. Otherwise we return NO. If there is no solution this algorithm clearly returns NO. If there is a solution and |w(2[n] )| ≥ 20.997n , we find a solution with inversely polynomial probability in Step 1. If there is a solution and |w(2[n] )| ≤ 20.997n , Property 2 of Lemma 2.2 guarantees that the solution to the reduced instance is a solution to the original instance with probability Ω∗ (1), and the oracle will then provide us with the solution. 6 Further Discussion Our original ambition was to resolve Open Question 1 affirmatively by a combination of two algorithms that exploit small and large concentration of the sums, respectively. Since we only made some partial progress on this, it remains an intruiging question whether this approach can fulfill this ambition. In this section we speculate about some further directions to explore. Exploiting Large Density For exploiting a density 1.003 ≤ d ≤ 2, the meet-in-the-middle technique [9] does not seem directly extendable. A different, potentially more applicable O∗ (2n/2 ) algorithm works as follows: pick a prime p of order 2n/2 , build the dynamic programming table that counts the number of subsets with sum congruence to t mod p, and use this as a data structure to uniformly sample solutions mod p with linear delay; try O∗ (2n/2 ) samples and declare a no-instance if no true solution is found (see also Footnote 1). As such, this does not exploit large density at all, but to this end one could seek a similar sampler that is more biased to smaller bins. Sharper Analysis of Algorithm 1 The analysis of Algorithm 1 in Lemma 3.1, and in particular the typical bottleneck β(w)2(1.5−γ)µn in the running time, is quite naive. For example, since we can pick M as we like (and assume it generates many sums), for the algorithm to fail we need an instance where big bins are encountered by the algorithm for many choices of M . It might be a good approach to first try to extend the set of instances that can be solved ‘truly faster’ in this way, e.g. to the set of all instances with β(w) ≤ 2(.5+δ)n for some small δ > 0. As an illustration of the looseness, let us mention that in a previous version of this manuscript, we used a more sophisticated analysis to show the following: there exists some δ > 0, such that if |w(2[n] )| ≥ 2(1−δ)n , then  2 [n] |{(P, Q) ∈ : w(P ) + w(Q) = t}| ≤ 20.5254n . n/2 We used this to show that all instances with |w(2[n] )| ≥ 2(1−δ)n can be solved via a mild variant of Algorithm 1 with M = [n], indicating that Algorithm 1 gives non-trivial algorithms even for large M . Sharper Combinatorial Bounds Lemma 1.3 and Lemma 1.4 seem to be rather crude estimates. In fact, we don’t even know the following (again, borrowing notation from the proof of Proposition 4.4): Open Question 3: Suppose |w(2[n] )| ≥ 2(1−ǫ)n . Can β(w) and kb[n] k2 be bounded by 2oǫ (1)n and 2(0.5+oǫ (1))n , respectively? 6 Further Discussion 11 Note that the second bound would follow from the first bound. Furthermore, if the second bound holds, ′ we would be able to solve, for all ǫ > 0, all instances with |β(w)| ≥ 2(0.5+ǫ)n in time O∗(2(0.5−ǫ )n ) for some ǫ′ > 0 depending on ǫ, via the proof of Theorem 1.2. In recent work [2] we proved the following modest progress Lemma 6.1. There exists δ > 0 such that if A, B ⊆ {0, 1}n is a UDCP and |A| ≥ 2(1−δ)n , then |B| ≤ 20.4115n . Plugging this into the proof of Lemma 1.3, this gives that β(w) ≤ 2(0.4115+oǫ (1))n in the setting of Open Question 3. We would like to remark that improving this beyond 2(0.25+oǫ (1))n via Lemma 1.3 is not possible since UDCP pairs (A, B) with |A| ≥ 2(1−o(1))n and |B| ≥ 2n/4 do exist [12]. One may also wonder whether we can deal with instances with |w(2[n] )| ≥ 2(0.5+ǫ)n , for all ǫ > 0 by arguing β(w) must be small but this does not work directly: there are instances with |w(2[n] )| = 3n/2 and β(w) = 2n/2 (the instance 1, 1, 3, 3, 9, 9, 27, 27, . . . has this, though is it easily attacked via Lemma 3.2). Acknowledgements This research was funded in part by the Swedish Research Council, Grant 621-2012-4546 (P.A.), the European Research Council, Starting Grant 338077 “Theory and Practice of Advanced Search and Enumeration” (P.K.), the Academy of Finland, Grant 276864 “Supple Exponential Algorithms” (M.K.), and by the NWO VENI project 639.021.438 (J.N.). References [1] Open problems for FPT school 2014. http://fptschool.mimuw.edu.pl/opl.pdf. [2] Per Austrin, Petteri Kaski, Mikko Koivisto, and Jesper Nederlof. Improved uniquely decodable code pair bounds for unbalanced pairs. Unpublished. [3] Per Austrin, Petteri Kaski, Mikko Koivisto, and Jesper Nederlof. Subset sum in the absence of concentration. In Ernst W. Mayr and Nicolas Ollinger, editors, 32nd International Symposium on Theoretical Aspects of Computer Science, STACS 2015, March 4-7, 2015, Garching, Germany, volume 30 of LIPIcs, pages 48–61. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2015. [4] Anja Becker, Jean-Sébastien Coron, and Antoine Joux. Improved generic algorithms for hard knapsacks. In Kenneth G. Paterson, editor, EUROCRYPT, volume 6632 of Lecture Notes in Computer Science, pages 364–385. Springer, 2011. [5] Richard Bellman. Dynamic Programming. Princeton University Press, Princeton, N. J., 1957. [6] Matthijs J. Coster, Antoine Joux, Brian A. Lamacchia, Andrew M. Odlyzko, Claus-Peter Schnorr, and Jacques Stern. Improved low-density subset sum algorithms. Computational Complexity, 2:111–128, 1992. [7] Abraham Flaxman and Bartosz Przydatek. Solving medium-density subset sum problems in expected polynomial time. In Volker Diekert and Bruno Durand, editors, STACS 2005, 22nd Annual Symposium on Theoretical Aspects of Computer Science, Stuttgart, Germany, February 24-26, 2005, Proceedings, volume 3404 of Lecture Notes in Computer Science, pages 305–314. Springer, 2005. [8] Godfrey H. Hardy and Edward M. Wright. An Introduction to the Theory of Numbers. Oxford University Press, Oxford, sixth edition, 2008. Revised by D. R. Heath-Brown and J. H. Silverman, With a foreword by Andrew Wiles. [9] Ellis Horowitz and Sartaj Sahni. Computing partitions with applications to the knapsack problem. J. ACM, 21(2):277–292, 1974. [10] Nick Howgrave-Graham and Antoine Joux. New generic algorithms for hard knapsacks. In Henri Gilbert, editor, EUROCRYPT, volume 6110 of Lecture Notes in Computer Science, pages 235–256. Springer, 2010. [11] Russell Impagliazzo and Moni Naor. Efficient cryptographic schemes provably as secure as subset sum. Journal of Cryptology, 9(4):199–216, 1996. [12] T. Kasami, Shu Lin, V.K. Wei, and Saburo Yamamura. Graph theoretic approaches to the code construction for the two-user multiple-access binary adder channel. IEEE Transactions on Information Theory, 29(1):114–130, 1983. 6 Further Discussion 12 [13] Petteri Kaski, Mikko Koivisto, and Jesper Nederlof. Homomorphic hashing for sparse coefficient extraction. In Dimitrios M. Thilikos and Gerhard J. Woeginger, editors, Parameterized and Exact Computation - 7th International Symposium, IPEC 2012, Ljubljana, Slovenia, September 12-14, 2012. Proceedings, volume 7535 of Lecture Notes in Computer Science, pages 147–158. Springer, 2012. [14] Jeffrey C. Lagarias and Andrew M. Odlyzko. Solving low-density subset sum problems. J. ACM, 32(1):229–246, 1985. [15] Daniel Lokshtanov and Jesper Nederlof. Saving space by algebraization. In Leonard J. Schulman, editor, STOC, pages 321–330. ACM, 2010. [16] Jesper Nederlof, Erik Jan van Leeuwen, and Ruben van der Zwaan. Reducing a target interval to a few exact queries. In Branislav Rovan, Vladimiro Sassone, and Peter Widmayer, editors, Mathematical Foundations of Computer Science 2012 - 37th International Symposium, MFCS 2012, Bratislava, Slovakia, August 27-31, 2012. Proceedings, volume 7464 of Lecture Notes in Computer Science, pages 718–727. Springer, 2012. [17] Or Ordentlich and Ofer Shayevitz. A VC-dimension-based outer bound on the zero-error capacity of the binary adder channel. CoRR, abs/1412.8670, 2014. [18] Richard Schroeppel and Adi Shamir. A T = O(2n/2 ), S = O(2n/4 ) algorithm for certain NP-complete problems. SIAM J. Comput., 10(3):456–464, 1981. [19] Christian Sleger and Alex Grant. Coordinated Multiuser Communications. Springer, 2006. [20] Gerhard J. Woeginger. Open problems around exact algorithms. Discrete Appl. Math., 156(3):397–405, 2008.
8cs.DS
ORTHOSYMPLECTIC LIE SUPERALGEBRAS, KOSZUL DUALITY, AND A COMPLETE INTERSECTION ANALOGUE OF THE EAGON–NORTHCOTT COMPLEX arXiv:1312.2255v2 [math.AC] 7 Sep 2016 STEVEN V SAM Abstract. We study the ideal of maximal minors in Littlewood varieties, a class of quadratic complete intersections in spaces of matrices. We give a geometric construction for a large class of modules, including all powers of this ideal, and show that they have a linear free resolution over the complete intersection and that their Koszul dual is an infinite-dimensional irreducible representation of the orthosymplectic Lie superalgebra. We calculate the algebra of cohomology operators acting on this free resolution. We prove analogous results for powers of the ideals of maximal minors in the variety of length 2 complexes when it is a complete intersection, and show that their Koszul dual is an infinite-dimensional irreducible representation of the general linear Lie superalgebra. This generalizes work of Akin, Józefiak, Pragacz, Weyman, and the author on resolutions of determinantal ideals in polynomial rings to the setting of complete intersections and provides a new connection between representations of classical Lie superalgebras and commutative algebra. As a curious application, we prove that the cohomology of a class of reducible homogeneous bundles on symplectic and orthogonal Grassmannians and 2-step flag varieties can be calculated by an analogue of the Borel–Weil–Bott theorem. Contents 1 4 11 23 29 33 1. Introduction 2. Preliminaries 3. Symplectic Littlewood varieties 4. Orthogonal Littlewood varieties 5. Variety of complexes References 1. Introduction In this paper, we are interested on the one hand with representations of orthosymplectic Lie superalgebras (a family of simple Lie superalgebras), and on the other hand, with free resolutions over a class of quadratic complete intersections which we call Littlewood varieties (see [SW]). To avoid clumsy technicalities, we will not distinguish between affine varieties and their coordinate rings. The two sides of the story are connected by Koszul duality. Date: September 7, 2016. 2010 Mathematics Subject Classification. 13D02, 13C40, 17B10, 17B55, 18G10. The author was supported by a Miller research fellowship. 1 2 STEVEN V SAM First, it is well-known that quadratic complete intersections, that is, polynomial rings modulo an ideal generated by a regular sequence of quadratic polynomials, are Koszul algebras (this notion and the following notions are reviewed in §2.2). So it has a Koszul dual, which is the universal enveloping algebra of a nilpotent Lie superalgebra. By generalities ! on Koszul duality, if R is a Koszul k-algebra and RL is its Koszul dual, then for any finitely R ! ∗ generated graded R-module M, the space M = d≥0 Tord (M, k) is naturally a finitely generated graded R! -module, which is a direct sum of linear strands. Generally, Lie superalgebras only have a Z/2-grading, but many simple Lie superalgebras, including the orthosymplectic Lie superalgebras, have a Z-grading (not necessarily unique) which lifts its Z/2-grading. The crucial observation is that for the Littlewood varieties, the nilpotent Lie superalgebra arising from Koszul duality, which has a natural Z-grading, is a subalgebra of an orthosymplectic Lie superalgebra with a distinguished Z-grading. The main result of this paper is that for a large class of modules M over the coordinate ring of the Littlewood variety, the module M ! consists of one linear strand, and the action of the nilpotent subalgebra on M ! extends to an action of the entire orthosymplectic Lie superalgebra and becomes an irreducible representation. The Littlewood variety sits in a space of matrices, and our class of modules includes all powers of the ideal of maximal minors in this space of matrices. Furthermore, the modules M have natural geometric constructions. As a bonus, our results allow us to deduce a Borel–Weil–Bott type theorem for a class of reducible homogeneous bundles over orthogonal and symplectic Grassmannians. The use of Koszul duality allows one to transform problems about representations of Lie superalgebras into problems about modules over complete intersections, where one can use tools from commutative algebra. We hope that this work will inspire yet further connections. For some context, we mention that the motivations for this paper come in several forms from commutative algebra, invariant theory, and representation theory: (1) The Littlewood varieties were studied in several places under different names (or no name at all) [H, Ka, L, SSW]. In [SW], we put the Littlewood varieties into a Lie-theoretic context and show that related free resolutions can be used to recover Littlewood’s formulas for branching rules for classical Lie groups (hence the name) and to deduce new formulas for the exceptional Lie groups. In [S2] they played a central role in proving the saturation property for tensor product coefficients for classical groups. So it is reasonable to look for deeper connections between Littlewood varieties and representation theory. (2) If we consider the polynomial ring which is the coordinate ring of the space of matrices, then all powers of the ideal of maximal minors have a linear free resolution ([ABW, Theorem 5.4]; we give another proof in §2.6). Our results are a perfect analogue in the setting of complete intersections. See [Ch] for a survey of the behavior of homological invariants of powers of an ideal (in the general context of a graded Noetherian ring). (3) The resolution of the ideal of maximal minors is an infinite length generalization of the classical Eagon–Northcott complex [EN] which has been a rich testing ground and source of examples in the theory of finite free resolutions [Ei3, N] and its connections with the theory of degeneracy loci [GLP, Ke, S1]. (4) Techniques exist for constructing free resolutions over complete intersections, but little is known about minimal free resolutions. The complexes in this paper give a large family of concrete examples which should form the beginning of a useful case study. (5) Our results extend work of Akin, Józefiak, Pragacz, Weyman, and the author [AW1, AW2, AW3, JPW, PW, S3] on realizations of finite-dimensional representations of simple ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 3 Lie superalgebras as syzygies of determinantal ideals. Past results do not cover the important class of orthosymplectic Lie superalgebras; furthermore, our results deal with infinite-dimensional irreducible representations. Aside from this, explicit constructions of representations of Lie superalgebras are generally lacking. (6) Lovett [L] investigates the problem of calculating the minimal free resolution of the determinantal ideals in Littlewood varieties, but over the polynomial ring rather than over the coordinate ring of the Littlewood variety. As our results show, even for the maximal minors, the answer over the polynomial ring is complicated while the answer over the complete intersection is dramatically simplified. 1.1. Outline of paper. We now describe the results mentioned above in more detail and give an outline of the main results of this paper. The background material for this paper is in §2. There is a good analogy between the results we prove for modules over the coordinate rings of Littlewood varieties and modules over the coordinate ring of the whole space of matrices (which is just a polynomial ring). The polynomial case is substantially simpler and as a warmup, we deduce the analogous results in §2.6 (also they will be used later). We begin in §3 with the symplectic version of the Littlewood variety. Let V be a symplectic vector space and let E be another vector space with 2 dim(E) ≤ dim(V ). Set V V A = Sym(E ⊗ V ) and B = A/( 2 (E)), where 2 (E) is the space of quadratic invariants under the symplectic group Sp(V ). See Example 3.1.1 for an explicit example with coordinates. Then Spec(A) is the space of linear maps E → V ∗ and Spec(B) is the subvariety where the image of E in V ∗ is an isotropic subspace. Then B is a complete intersection and there is an ideal of maximal minors. The main result (Theorem 3.1.6, Remark 3.3.7) is that all powers of this ideal have a linear free resolution over B and more generally for a class of modules M. §3.1 contains basic properties of B, and the connection to orthosymplectic Lie superalgebras. In §3.2, we describe Howe duality, which is our source of the representations of the orthosymplectic Lie superalgebra, and prove new results about these representations. We prove the main result in §3.3 and give applications. First, we calculate the support varieties of the modules M (Proposition 3.3.9). Second, we use Eisenbud’s construction for free resolutions over a complete intersection from a free resolution over the polynomial ring [Ei1] to prove an analogue of the Borel–Weil–Bott theorem for a class of reducible homogeneous bundles on the symplectic Grassmannian (Theorem 3.3.6). We give examples in §3.5. Conjecture 3.3.3 gives a hint about further directions into which this story should develop. In particular, while the representations we get come from a Howe dual pair, the same will probably not be true for modules associated with lower-order minors. We expect that further understanding in this direction will lead to deeper insight into the structure of the (derived) category of representations of orthosymplectic Lie superalgebras. More importantly, this should lead to an explicit tensor construction of representations, in the same spirit as Schur functors. We will pursue this in future work. There are analogues of the above results when V is instead a vector space equipped with an orthogonal form, which is discussed in §4. There is also a third case where V is vector space with no extra structure, but one considers pairs of matrices E → V and V → F with the condition dim(E) + dim(F ) ≤ dim(V ). The locus where the composition E → V → F is 0 is a complete intersection, and analogues of the above results also hold in this case. This is discussed in §5. The main difference is that the orthosymplectic Lie superalgebra is replaced by the general linear Lie superalgebra. 4 STEVEN V SAM 2. Preliminaries Throughout the paper, we work over a field k, which we assume is algebraically closed. To avoid this assumption, it is enough to assume that all semisimple Lie algebras are split forms. At the beginning of each section we will state our assumptions on char(k) if necessary. ∗ 2.1. Notation. Given a vector space V , its dual is denoted V• V = Homk (V, k). The symmetric, exterior, and divided power algebras are Sym(V ), V (V ), and D(V ), respectively. n If V is a vector space with dim(V (V ). Similarly, if V is a vector Vn) = n, we set det V = bundle of rank n, we set det V = (V). Given representations V , W of a group G, we write V ≈ W if V has a G-equivariant filtration whose associated graded is isomorphic to W . We only consider the case when G is a reductive algebraic group and V and W are graded representations with finite-dimensional pieces. So when char(k) = 0, we can replace ≈ by ∼ = (isomorphism) by complete reducibility. If S is a graded algebra, S(−n) is the free S-module with shifted grading: S(−n)i = Si−n . 2.2. Koszul duality. Let R be a Z≥0 -graded k-algebra such that R0 = k and all Ri are finite-dimensional over k. If k = R/R>0 has a linear free resolution over R, then R is a Koszul algebra [BGS, Definition 1.2.1]. Let W be the kernel of the multiplication map R1 ⊗ R1 → R2 . Let W ⊥ be the annihilator of W in R1∗ ⊗ R1∗ and define R! = T(R1∗ )/(W ⊥ ) where T(R1∗ ) is the tensor algebra on R1∗ . Then R! is the Koszul dual of R and is also a Koszul algebra [BGS, Proposition 2.9.1] (and (R! )! = R). Furthermore, we have an isomorphism of algebras R! ∼ (2.2.1) = Ext• (k, k)op R where the right hand side is equipped with the usual Yoneda product [BGS, Theorem 2.10.1] and the superscript op means we take the opposite ring. Write E = Ext•R (k, k). Let M be a graded right R-module such that dimk Mi < ∞ for all i. A linear cochain complex β(M) is constructed in [BEH, p.105] consisting of free right E-modules with β(M)j = Mj ⊗k E(j). Via (2.2.1), this is also a cochain complex of free left R! -modules. If M is a ∗ graded left R-module, then M ∨ is a graded right R-module with Mi∨ = M−i , and we define ∨ ! L(M) = β(M ), which we think of as a chain complex of graded free left R -modules: d d 1 0 ∗ L(M) : · · · → Mi∗ ⊗ R! (−i) → · · · → M1∗ ⊗ R! (−1) − → M0∗ ⊗ R! − → M−1 ⊗ R! (1) → · · · . ∗ Chasing through the construction, we see that for any i, the map Mi∗ → Mi−1 ⊗ R1! is dual to the multiplication map R1 ⊗Mi−1 → Mi . In particular, we can recover M (functorially) from L(M) under this finiteness assumption, and so L is an equivalence. Let R be its inverse. We record the above discussion in the next theorem, which is a standard result. Theorem 2.2.2. Let M be a finitely generated graded R-module. Pick n minimal so that ∗ Mn 6= 0 and set N = coker(Mn+1 ⊗ R! (−n − 1) → Mn∗ ⊗ R! (−n)). (a) The functor L is an equivalence from the category of graded left R-modules with finitedimensional graded pieces to linear complexes of graded finite rank free left R! -modules. (b) For integers i ≥ 0 and k, we have Hk (L(M))i+k ∼ = (TorR (k, M)i+k )∗ . i (c) L(M) is a subcomplex of the minimal free resolution of N if and only if M is generated in degree n. ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 5 (d) L(M) is the first linear strand of the minimal free resolution of N if and only if M is generated in degree n and is defined by linear relations over R. (e) L(M) is the minimal free resolution of N if and only if M is generated in degree n and has a linear free resolution over R. Proof. (a) follows from the discussion above. For (b), we have ∗ Hk (L(M))i+k = H−k (β(M ∨ ))i+k = ExtiR (k, M ∨ )−i−k = (TorR i (k, M)i+k ) , where the first equality is by definition of L, the second is on [BEH, p.106], and the third follows from the fact that HomR (k, (−)∨ ) ∼ = (k⊗−)∗ are isomorphic functors when restricted to finitely generated R-modules. One can prove (c), (d), (e) using (b) by following the  arguments in [Ei3, Proof of Theorem 7.7]. We end this section with the families of Koszul algebras studied in this paper. Let V be a vector space. Let R = Sym(V )/(f1 , . . . , fr ) be a complete intersection where each fi is a homogeneous polynomial of degree 2. Define g1 = V ∗ and let g2 be the dual space of hf1 , . . . , fr i with dual basis f1∗ , . . . , fr∗ . Each fi is a quadratic form on V ∗ ; let βi be its symmetric bilinear form. Define a Lie superbracket on g = g1 ⊕ g2 by [v + w, v ′ + P r w ′ ] = Pi=1 βi (v, v ′ )fi∗ ∈ g2 for v, v ′ ∈ g1 and w, w ′ ∈ g2 . Define a squaring operation r ∗ v [2] = i=1 fi (v)fi for v ∈ g1 (this is only needed when char(k) = 2). The universal enveloping algebra U(g) is the tensor algebra on g modulo the relations (a) x ⊗ y − (−1)deg(x) deg(y) y ⊗ x = [x, y] for homogeneous x, y ∈ g, and (b) x ⊗ x = x[2] for x ∈ g1 . The bracket and squaring operations preserve the grading on g, so U(g) is a graded algebra. The V• PBW theorem [CW, Theorem 1.32] implies that U(g) admits a flat degeneration to (g1 ) ⊗k Sym(g2 ). In particular, U(g) is a Noetherian k-algebra. Proposition 2.2.3. Keep the notation above. (a) R is a Koszul algebra, and R! = U(g). (a) Let M be a finitely generated R-module and let G be a linear strand of the minimal free resolution of M over R. Then R(G) is a finitely generated U(g)-module. Proof. (a) follows from [Av, Example 10.2.3]. R ∗ (b) The algebra U(g) ∼ = Ext•R (k, k) acts on Ext•R (M, k) = Tor L• (M, k) via the Yoneda product, and this can be identified with the action of U(g) on R(G) where the sum is over all linear strands of the minimal free resolution of M (see for example, [BEH, p.106]). By [Av, Theorem 9.1.4] (and the fact that Sym(V ) has finite projective dimension [Ei3, Theorem 1.1]), the Ext•R (k, k)-module Ext•R (M, k) is finitely generated.  2.3. Partitions and Schur functors. A sequence of integers λ = (λ1 , .P . . , λn ) with λ1 ≥ · · · ≥ λn ≥ 0 is a partition. We write ℓ(λ) = max{i | λi 6= 0} and |λ| = i λi . If i > ℓ(λ), we use the convention that λi = 0. The sum of two partitions is defined by (λ + µ)i = λi + µi . The exponential notation (ab ) denotes the number a repeated b times. Its Young diagram is a rectangle, so we also denote this by b × a. We say that λ ⊆ µ if λi ≤ µi for all i. If λ ⊆ b × a, then (b × a) \ λ refers to the partition (a − λb , . . . , a − λ1 ), i.e., we have rotated the Young diagram of λ by 180 degrees and removed it from the bottom-right corner of the b × a rectangle. The transpose partition λ† is defined by λ†i = #{j | λj ≥ i}. This is best explained in terms of Young diagrams, which we define via an example. 6 STEVEN V SAM Example 2.3.1. If λ = (5, 3, 2), then λ† = (3, 3, 2, 1, 1): λ= λ† = , . So ℓ(5, 3, 2) = 3 and |(5, 3, 2)| = 10. We have λ = (3 × 5) \ (3, 2).  Let λ be a partition. Then we can define the Schur functor Sλ (this is Lλ′ in [Wey, §2.1]). For any vector space E, Sλ (E) is a representation of the general linear group GL(E) and Sλ (E) 6= 0 if and only if ℓ(λ) ≤ n. When char(k) = 0, each Sλ (E) is an irreducible representation of GL(E). If E is a vector bundle, then SV λ (E) is a vector bundle. If dim(E) = n and λ = (1n ), then S(1n ) (E) = det E = n (E). Furthermore, Sλ+(1n ) (E) = Sλ (E) ⊗ (det E). Using this, we can define Sλ (E) for any weakly decreasing sequence λ of integers of length n: find N such that λ + (1N ) is nonnegative, and define Sλ (E) = Sλ+(1N ) (E) ⊗ (det E ∗ )N . This does not depend on the choice of N. Theorem 2.3.2. Given partitions λ, µ, ν, let cνλ,µ be the Littlewood–Richardson coefficient (see [M, §9] for details, but we will not need the precise formulation). Then M ν Sλ (V ) ⊗ Sµ (V ) ≈ Sν (V )⊕cλ,µ . ν If cνλ,µ 6= 0, then |ν| = |λ| + |µ|, λ ⊆ ν, µ ⊆ ν, ν1 ≤ λ1 + µ1 , and ℓ(ν) ≤ ℓ(λ) + ℓ(µ). Proof. For the ≈, see [Bo]. The last statement is an easy consequence of [M, §9].  Theorem 2.3.3 (Cauchy identities). Given vector spaces V and W , we have M M Vn Symn (V ⊗ W ) ≈ Sλ (V ) ⊗ Sλ (W ), (V ⊗ W ) ≈ Sλ (V ) ⊗ Sλ† (W ). |λ|=n |λ|=n Proof. See [Wey, Theorem 2.3.2].  Finally, let V be a symplectic or orthogonal space, i.e., a vector space equipped with a symplectic or orthogonal form. Let λ be a partition with 2ℓ(λ) ≤ dim(V ). We can define S[λ] (V ), which is a representation of either the symplectic group Sp(V ) or orthogonal group O(V ), respectively. If V is orthogonal and 2ℓ(λ) = dim(V ), then S[λ] (V ) decomposes, as a representation of SO(V ), into the sum of two non-isomorphic representations which we call S[λ]+ (V ) and S[λ]− (V ). When char(k) = 0, Sλ (V ) is an irreducible representation of O(V ), and S[λ]± (V ) are irreducible representations of SO(V ). In all other cases, the representation S[λ] (V ) is irreducible when char(k) = 0. We refer the reader to [FH, §§17.3, 19.5] for details when char(k) = 0 and to [SW, §2] for definitions and basic properties in the general case. 2.4. Geometric technique for free resolutions. Let X be a projective variety. Let 0→ξ→ε→η→0 be an exact sequence of vector bundles on X, with ε trivial, and let V be another vector bundle on X. Put A = H0 (X; Sym(ε)) = Sym(H0 (X; ε)), M (i) (V) = Hi (X; Sym(η) ⊗ V). Then each M (i) (V) is an A-module. For the following, see [Wey, §5.1]. ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 7 Theorem 2.4.1. There is a minimal graded A-free complex F• with terms M V Fi = Hj (X; i+j (ξ) ⊗ V) ⊗ A(−i − j) j≥0 with the property that for all i ≥ 0, we have H−i (F• ) = M (i) (V) and Hj (F• ) = 0 for j > 0. In particular, Fi = 0 for all i < 0 if and only if M (j) (V) = 0 for all j > 0. In this case, F• is a minimal free resolution of M (0) (V). 2.5. Borel–Weil theorem. Let Gr(n, V ) be the Grassmannian of n-dimensional subspaces of a vector space V . There is a tautological sequence of vector bundles on Gr(n, V ) 0 → R → V ⊗ OGr(n,V ) → Q → 0, where R = {(v, W ) ∈ V × Gr(n, V ) | v ∈ W } has rank n. Theorem 2.5.1 (Borel–Weil, Kempf). Let λ, µ be weakly decreasing sequences of integers of lengths n and dim(V ) − n, and let V be the vector bundle Sλ (R∗ ) ⊗ Sµ (Q∗ ) on Gr(n, V ). Set β = (λ1 , . . . , λn , µ1 , µ2 , . . . ). • If β is weakly decreasing, then H0 (Gr(n, V ); V) = Sβ (V ∗ ) as GL(V )-representations, and all higher cohomology of V vanishes. • Suppose λ1 = · · · = λn = k for some k and that k + 1 ≤ µ1 ≤ k + n. Then all cohomology of V vanishes. Proof. Let π : Flag(V ) → Gr(n, V ) be the projection of the full flag variety on V to Gr(n, V ). Then V = π∗ L for a line bundle L such that Ri π∗ L = 0 for i > 0 (see [Wey, Theorem 4.1.12]). So we can reduce the first statement to a statement about cohomology of L on Flag(V ), and this is contained in [Ja, §II.4]. For the second statement, let Yi be the partial flag variety of flags of subspaces of dimensions i, i + 1, . . . , dim(V ) − 1. Name the projections f : Flag(V ) → Yn , g : Yn → Gr(n, V ), and h : Yn → Yn+1 . Set L′ = f∗ L. Since λ1 = · · · = λn , L is fiberwise trivial along f . The fibers of f are connected, so L′ is a line bundle. The fibers of h are isomorphic to Pn and the restriction of L′ to each Pn is isomorphic to O(k − µ1 ). By assumption, 0 > k − µ1 ≥ −n, so the cohomology is fiberwise trivial and hence globally trivial. So Ri h∗ L′ = 0 for all i. In particular, Hi (Yn ; L′) = 0 for all i. Since π = gf , we see that g∗ L′ = V, and that Ri g∗ L′ = 0 for i > 0. We conclude that Hi (Gr(n, V ); V) = 0 for all i.  Remark 2.5.2. The Grassmannian of n-dimensional subspaces of V and the Grassmannian of n-dimensional quotient spaces of V ∗ are naturally isomorphic. So in Theorem 2.5.1, we could replace R∗ and Q∗ by Q and R, respectively, and use Sβ (V ) instead of Sβ (V ∗ ).  Let Flag(n, n + d, V ) be the subvariety of Gr(n, V ) × Gr(n + d, V ) consisting of pairs of subspaces (W, W ′ ) such that W ⊂ W ′ . Let Rn ⊂ Rn+d be the corresponding tautological subbundles restricted to Flag(n, n + d, V ). Theorem 2.5.3 (Borel–Weil, Kempf). Let λ, µ, ν be weakly decreasing sequences of integers of lengths n, d, dim(V ) − n − d, respectively. Let V be the vector bundle Sλ (R∗n ) ⊗ Sµ ((Rn+d /Rn )∗ ) ⊗ Sν ((V /Rn+d )∗ ) on Flag(n, n + d, V ). If β = (λ, µ, ν) is a weakly decreasing sequence, then H0 (Flag(n, n + d, V ); V) = Sβ (V ∗ ) as GL(V )-representations, and all higher cohomology of V vanishes. Proof. See proof of Theorem 2.5.1.  8 STEVEN V SAM Now let V be a vector space of dimension 2n with symplectic form ωV . For d ≤ n, IGr(d, V ) is the subvariety of Gr(d, V ) consisting of isotropic subspaces W (i.e., ωV |W ≡ 0). Let R be the tautological subbundle on Gr(d, V ) restricted to IGr(d, V ). Theorem 2.5.4 (Borel–Weil, Kempf). Let λ be a partition with ℓ(λ) ≤ d. As representations of Sp(V ), H0 (IGr(d, V ); Sλ (R∗ )) = S[λ] (V ) and all higher cohomology of Sλ (R∗ ) vanishes. Proof. See [SW, (2.1)].  Now let V be a vector space of dimension 2n or 2n + 1 with orthogonal form ωV (if char(k) = 2, we need a quadratic form, but the details remain unchanged). For d ≤ n, OGr(d, V ) is the subvariety of Gr(d, V ) of isotropic subspaces W (i.e., ωV |W ≡ 0). Let R be the tautological subbundle on Gr(d, V ) restricted to OGr(d, V ). When dim(V ) = 2n and d = n, OGr(d, V ) has two connected components, which are isomorphic to one another. Theorem 2.5.5 (Borel–Weil, Kempf). Let λ be a partition with ℓ(λ) ≤ d. As representations of O(V ), H0 (OGr(d, V ); Sλ (R∗ )) = S[λ] (V ) and all higher cohomology of Sλ (R∗ ) vanishes. Proof. See [SW, (2.6)] for dim(V ) odd; the even-dimensional case is similar.  Remark 2.5.6. The results in this section are functorial in V . So we can replace V by a vector bundle π : V → Z on a scheme Z, and then Gr(n, V ), IGr(n, V ), etc. are replaced by a relative construction, and cohomology is replaced with higher direct images.  2.6. Determinantal modules. In this section, we construct a family of equivariant modules with a linear free resolution over the coordinate ring of a space of matrices, and derive their basic properties. The modules considered later are generalizations of them. Let E and F be vector spaces of dimensions n and n + d, respectively (d ≥ 0). Let X = Gr(d, F ) be the Grassmannian with tautological sub- and quotient bundles R and Q. In the notation of §2.4, set η = E ⊗ Q and ε = E ⊗ F ⊗ OX . Given a partition ν with ℓ(ν) ≤ d, and given k ≥ ν1 , define Vνk = (det E)k ⊗ (det Q)k ⊗ Sν R. Proposition 2.6.1. The higher cohomology of Sym(η) ⊗ Vνk vanishes. Proof. By Theorem 2.3.3, Sym(η) has a filtration by terms of the form Sλ (E) ⊗ Sλ (Q). Then the weight of Sλ (Q) ⊗Vνk is (k + λ1, . . . , k + λn , ν1 , . . . , νd ), which is weakly decreasing. Hence  all higher cohomology vanishes by Theorem 2.5.1 and Remark 2.5.2. Define the A = Sym(E ⊗ F )-module (2.6.2) k Mνk (E, F ) = H0 (X; Sym(η) ⊗ V(d×k)\ν ) M ≈ S(k+λ1 ,...,k+λn ) (E) ⊗ S(k+λ1 ,...,k+λn ,k−νd ,...,k−ν1 ) (F ). ℓ(λ)≤n To prove the ≈, use Theorem 2.5.1 and Remark 2.5.2. The annihilator of this module is 0. k Note that we have used V(d×k)\ν rather than Vνk . Still in the notation of §2.4, we have ξ = E ⊗R, so by Theorem 2.4.1 and Proposition 2.6.1, the terms of the minimal free resolution of Mνk (E, F ) are M V (2.6.3) Fνi = Hj (X; i+j (E ⊗ R) ⊗ (det E)k ⊗ S(d×k)\ν (R) ⊗ (det Q)k ) ⊗ A(−i − j). j≥0 ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 9 Proposition 2.6.4. The resolution of Mνk (E, F ) is linear. More precisely, M ⊕cα (S(kn )+λ (E) ⊗ S(kn ,α) (F )) λ† ,(d×k)\ν ⊗ A(−i). Fνi ≈ |λ|=i λ⊆n×d α⊆d×k Proof. Consider (2.6.3). Using Theorem 2.3.3, we have M Vi+j (E ⊗ R) ≈ Sλ (E) ⊗ Sλ† (R), |λ|=i+j λ⊆n×d so we have to show that Sλ† (R) ⊗ S(d×k)\ν (R) ⊗ (det Q)k has no higher cohomology when λ ⊆ n × d. Let Sα (R) be a term appearing in the filtration of Sλ† (R) ⊗ S(d×k)\ν (R) in Theorem 2.3.2 (so with multiplicity cαλ† ,(d×k)\ν ). By assumption, λ†1 ≤ n, so Theorem 2.3.2 implies that α1 ≤ k + n. To calculate the cohomology of Sα (R) ⊗ (det Q)k , we consider the sequence (k, . . . , k, α1 , . . . , αd ) and use Theorem 2.5.1 and Remark 2.5.2: if k ≥ α1 , then H0 (X; Sα (R) ⊗ (det Q)k ) = S(kn ,α) (F ) and there is no higher cohomology; otherwise, k + 1 ≤ α1 ≤ k + n, and all cohomology vanishes.  Remark 2.6.5. If ν = (k d ), then M(kk d ) (E, F ) is the kth power of the maximal minors of (k d ) the generic matrix E ⊗ A(−1) → F ∗ ⊗ A. When k < n and char(k) = 0, F• is also the kth linear strand of the ideal of minors of order n − k + 1 in A [Wey, Proposition 6.1.3].  2.7. Modification rules. In this section, fix a nonnegative integer k. C 2.7.1. Type C. We associate to a partition λ two quantities, ιC 2k (λ) and τ2k (λ). If ℓ(λ) ≤ k C we put ιC 2k (λ) = 0 and τ2k (λ) = λ. Suppose ℓ(λ) > k. A border strip is a connected skew Young diagram containing no 2 × 2 square. Let Rλ be the connected border strip of length 2ℓ(λ) − 2k − 2 which starts at the first box in the final row of λ, if it exists. If Rλ C exists, is non-empty and λ \ Rλ is a partition, then we put ιC 2k (λ) = c(Rλ ) + ι2k (λ \ Rλ ) C C and τ2k (λ) = τ2k (λ \ Rλ ), where c(Rλ ) denotes the number of columns that Rλ occupies; C otherwise we put ιC 2k (λ) = ∞ and leave τ2k (λ) undefined. Example 2.7.1. Set k = 1 and λ = (6, 5, 5, 3, 2, 1, 1). Then 2ℓ(λ) − 2k − 2 = 10. We shade in the border strip Rλ of length 10 in the Young diagram of λ: In this case c(Rλ ) = 5. If k = 2, then λ \ Rλ is not a partition, so τ4C (λ) is undefined.  More details and references can be found in [SSW, §3.5]. D 2.7.2. Type D. We associate to a partition λ two quantities ιD 2k (λ) and τ2k (λ). Details and references can be found in [SSW, §4.4]. The definition is the same as the one given in §2.7.1, D (λ)) ≤ k): except for two differences (here, as opposed to [SSW, §4.4], we require ℓ(τ2k • the border strip Rλ has length 2ℓ(λ) − 2k, • in the definition of ι2k (λ), we use c(Rλ ) − 1 instead of c(Rλ ). 10 STEVEN V SAM ∆ 2.7.3. Spin rule. We associate to a partition λ two quantities ι∆ 2k (λ) and τ2k (λ). Details and references can be found in [SS]. The definition is the same as the one given in §2.7.1, except that the border strip Rλ has length 2ℓ(λ) − 2k − 1. ′ 2.7.4. Type A. We associate to a pair of partitions (λ, λ′ ) two quantities, ιA k (λ, λ ) and τkA (λ, λ′). Details and references can be found in [SSW, §5.4]. ′ A ′ ′ If ℓ(λ) + ℓ(λ′ ) ≤ k, then ιA k (λ, λ ) = 0 and τk (λ, λ ) = (λ, λ ). Assume now that ℓ(λ) + ℓ(λ′ ) > k. Let Rλ and Rλ′ be the border strips of length ℓ(λ) + ℓ(λ′ ) − k − 1 starting in the first box of the final row of λ and λ′ , respectively, if they exist. If both Rλ and Rλ′ exist and are non-empty and both λ \ Rλ and λ′ \ Rλ′ are partitions, define ′ ′ ιA k (λ, λ ) = c(Rλ ) + c(Rλ′ ) − 1 + ιk (λ \ Rλ , λ \ Rλ′ ) and τkA (λ, λ′) = τkA (λ \ Rλ , λ′ \ Rλ′ ). Otherwise, set ιk (λ, λ′ ) = ∞ and leave τkA (λ, λ′ ) undefined. 2.8. Lie superalgebra homology. For background on Lie superalgebras, see [CW, §1.1]. Let g be a Lie superalgebra with universal enveloping algebra U(g), and let M be a g-module. U(g) Define Hi (g; M) = Tori (M, k). Given an ideal h ⊂ g, each Hq (h; M) is annihilated by h, and we have the Hochschild–Serre spectral sequence (2.8.1) E2p,q = Hp (g/h; Hq (h; M)) ⇒ Hp+q (g; M). When g is a Lie algebra, this is stated in [Wei, §7.5]. It is a special case of the Grothendieck spectral sequence for the derived functors of a composition of two right-exact functors [Wei, §5.8], so it easily extends to Lie superalgebras. We now state some calculations of Lie superalgebra homology that will be used. Let E|F denote a superspace with even part E and odd part F . Set n = dim(E) and m = dim(F ). Let gl(n|m) ∼ = gl(E|F ) = (E|F ) ⊗ (E|F )∗ be the general linear Lie superalgebra. It ∗ has an Abelian subalgebra V• u = ∗E ⊗ F , which is the space of strictly upper-triangular block matrices. So U(u) = (E ⊗ F ). Given a partition λ, we can define Sλ (E|F ) (see [Wey, §2.4] where Lλ′ is used in place of Sλ ), which is a representation of gl(E|F ). This is isomorphic to Sλ† (F |E) and it is nonzero if and only if λn+1 ≤ m. We are interested in the homology groups Hi (u; Sλ (E|F )), which are naturally representations of gl(E) × gl(F ). Let ρ = (−1, −2, −3, . . . ). Given a permutation w, set w • λ† = w(λ† + ρ) − ρ. Let W P be the set of finite permutations such that w • λ† = (β1 , . . . , βm , γ1, γ2 , . . . ) where β is weakly decreasing and γ is a partition. Set ℓ(w) = #{i < j | w(i) > w(j)}. Proposition 2.8.2. Assume char(k) = 0. With the notation above, we have M Hi (E ⊗ F ∗ ; Sλ (E|F )) = Sβ (F ) ⊗ Sγ † (E). w∈W P ℓ(w)=i w•λ† =(β,γ) In particular, setting µ = (λ†m+1 , λ†m+2 , . . . ), we get H0 (E ⊗ F ∗ ; Sλ (E|F )) = S(λ† ,...,λ†m ) (F ) ⊗ Sµ† (E), 1 H1 (E ⊗ F ∗ ; Sλ (E|F )) = S(λ† ,...,λ† ,µ1 −1) (F ) ⊗ S(λ†m +1,µ2 ,µ3 ,... )† (E), 1 m−1 V• so Sλ (E|F ) has a linear presentation as a (E ⊗ F ∗ )-module if and only if λ†m = λ†m+1 . ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS Proof. See [CKL, Corollary 5.1]. 11  Now let V be a symplectic or orthogonal space. Let F ⊂ V be a maximal isotropic subspace. The choice of F gives a nilpotent subalgebra n as follows: ). • If V is symplectic, n = Sym2 (F ) ⊂ Sym2 (F ⊕ F ∗ ) ∼ = sp(V V V • If V is orthogonal and dim(V ) is even, n = 2 (F ) ⊂ 2 (F ⊕ F ∗ ) ∼ = so(V ). V2 V2 • If V is orthogonal and dim(V ) is odd, n = F ⊕ (F ) ⊂ (F ⊕ F ∗ ⊕ k) ∼ = so(V ). Recall the representations S[λ] (V ) discussed in §2.3. Proposition 2.8.3. Assume char(k) = 0. Pick a partition with ℓ(λ) ≤ n = ⌊dim(V )/2⌋. • If V is orthogonal, dim(V ) is even, and ℓ(λ) = n, then we have gl(F )-equivariant isomorphisms H0 (n; S[λ]+ (V )) = Sλ (F ∗ ), H0 (n; S[λ]− (V )) = S(λ1 ,...,λn−1 ,−λn ) (F ∗ ). • Otherwise, we have a gl(F )-equivariant isomorphism H0 (n; S[λ] (V )) = Sλ (F ∗ ). So a finite-dimensional sp(V )- or so(V )-module M is determined by the gl(F )-module H0 (n; M). Proof. The H0 calculations are a consequence of the fact that a Cartan subalgebra of gl(F ) is also a Cartan subalgebra for sp(V ) or so(V ), respectively. The last statement follows from the fact that finite-dimensional representations of sp(V ) or so(V ) are semisimple.  Let V be a vector space with a decomposition V = A⊕B with dim(A) = a and dim(B) = b. This defines a nilpotent subalgebra n = B ∗ ⊗ A ⊂ gl(V ). Proposition 2.8.4. Assume char(k) = 0. Let λ = (λ1 , . . . , λa+b ) be a weakly decreasing sequence of integers. Then H0 (B ∗ ⊗ A; Sλ (V )) = S(λ1 ,...,λb ) (B) ⊗ S(λb+1 ,...,λa+b ) (A). So a finite-dimensional gl(V )-module M is determined by the gl(A)×gl(B)-module H0 (n; M). 3. Symplectic Littlewood varieties C In this section, we use τ2k and ι2k to denote τ2k and ιC 2k (see §2.7.1). 3.1. Preliminaries. Let E be a vector space of dimension n and let V be a symplectic space of dimension 2n + 2d (we assume d ≥ 0; some of the results below hold even if d < 0, but we will not need them). Let A = Sym(E ⊗ V ). Using the symplectic form, we have a GL(E) × Sp(V )-equivariant inclusion V2 V V (E) ⊂ 2 (E) ⊗ 2 (V ) ⊂ Sym2 (E ⊗ V ). V V Let B = A/( 2 (E)) be the quotient of A by the ideal generated by 2 (E). Example 3.1.1. Let n = 3 and d = 0, and pick bases for E and V . We think of the coordinates in A as the elements in a 3 × 6 matrix:   x1,1 x1,2 x1,3 x1,4 x1,5 x1,6 x2,1 x2,2 x2,3 x2,4 x2,5 x2,6  x3,1 x3,2 x3,3 x3,4 x3,5 x3,6 12 STEVEN V SAM If the symplectic form on V is given by ωV (v, w) = v1 w2 − v2 w1 + v3 w4 − v4 w3 + v5 w6 − v6 w5 , V then 2 (E) is spanned by the 3 equations x1,1 x2,2 − x1,2 x2,1 + x1,3 x2,4 − x1,4 x2,3 + x1,5 x2,6 − x1,6 x2,5 , x1,1 x3,2 − x1,2 x3,1 + x1,3 x3,4 − x1,4 x3,3 + x1,5 x3,6 − x1,6 x3,5 , x2,1 x3,2 − x2,2 x3,1 + x2,3 x3,4 − x2,4 x3,3 + x2,5 x3,6 − x2,6 x3,5 .  We have Spec(A) = Hom(E, V ∗ ), the space of linear maps E → V ∗ . We can identify ϕ ϕ∗ Spec(B) ⊂ Hom(E, V ∗ ) with the set of maps ϕ such that the composition E − →V∗ ∼ = V −→ E ∗ is 0 (here V ∼ = V ∗ is the isomorphism induced by the symplectic form on V ). Equivalently, Spec(B) is the subvariety of maps E → V ∗ such that the image of E is isotropic, i.e., the symplectic form restricts to the 0 form on it. V Proposition 3.1.2. (a) B is an integral domain, i.e., the ideal generated by 2 (E) is prime. (b) As a representation of GL(E) × Sp(V ), we have M B≈ Sλ (E) ⊗ S[λ] (V ). ℓ(λ)≤n (c) Sλ (E) ⊗ S[λ] (V ) is in the ideal generated by Sµ (E) ⊗ S[µ] (V ) if and only if λ ⊇ µ. (d) Two closed points in Spec(B) are in the same GL(E) × Sp(V ) orbit if and only if they have the same rank as a matrix. Each orbit closure is a normal variety with rational singularities. V In particular, they are Cohen–Macaulay varieties. (e) The ideal ( 2 (E)) is generated by a regular sequence. In particular, B is a complete intersection and is a Koszul algebra. Proof. For (a), (b), (d), and (e), see [SW, Theorem 2.2]. (c) follows from the analogous  statement for Sym(E ⊗ V ) [DEP, Corollary 4.2]. Remark 3.1.3. Part (e) of Proposition 3.1.2 also holds if dim(V ) = 2 dim(E)−2. Essentially the same proof as for [SW, Theorem 2.2(3)] works.  Let IGr(n + d, V ) be the isotropic Grassmannian of rank n + d isotropic subspaces of V with tautological subbundle R. Let ν ⊆ (k d ) be a partition. Using (2.6.2) in a relative situation, we get a Sym(E ⊗ R∗ )-module Mνk (E, R∗ ). Proposition 3.1.4. The higher sheaf cohomology groups of Mνk (E, R∗ ) vanish and M H0 (IGr(n + d, V ); Mνk (E, R∗ )) ≈ S(kn )+λ (E) ⊗ S[(kn )+λ,k−νd ,...,k−ν1] (V ). ℓ(λ)≤n Proof. By (2.6.2), we have Mνk (E, R∗ ) ≈ M S(k+λ1 ,...,k+λn ) (E) ⊗ S(k+λ1 ,...,k+λn ,k−νd ,...,k−ν1 ) (R∗ ). ℓ(λ)≤n Now the result follows from Theorem 2.5.4. We define (3.1.5) Mkν = H0 (IGr(n + d, V ); Mνk (E, R∗ )) M ≈ S(kn )+λ (E) ⊗ S[((kn )+λ,k−νd ,...,k−ν1)] (V ). ℓ(λ)≤n  ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 13 So Mkν is an A-module. In fact, the scheme-theoretic image of Spec(Sym(E ⊗ R∗ )) → Spec(A) is Spec(B) (this is clear set-theoretically, and then use that both Spec(Sym(E⊗R∗ )) and Spec(B) are reduced schemes), so Mkν is also a B-module. The following result is the symplectic version of the main result of this paper. A more detailed version of this theorem is contained in Theorem 3.3.2, which will be proven in §3.3. Theorem 3.1.6. Assume char(k) = 0. The minimal free resolution of Mkν over B is linear. Let Ve be a Z/2-graded space (from now on, superspace) with Ve0 = E ⊕ E ∗ and Ve1 = V . Define a nondegenerate symmetric bilinear form on E ⊕E ∗ by h(e, ϕ), (e′ , ϕ′)i = ϕ′ (e)+ϕ(e′ ). Then Ve has a supersymmetric bilinear form by taking the direct sum of the orthogonal form on E⊕E ∗ and the symplectic form on V . Let osp(Ve ) be the orthosymplectic Lie superalgebra in gl(Ve ) compatible with this form. See [CW, §1.1.3] for more details on supersymmetric forms and orthosymplectic Lie superalgebras. We have a Z-grading on osp(Ve ) supported on [−2, 2] (we use the symbol ⊕ to separate the different pieces of this grading): V2 V (E) ⊕ (E ⊗ V ) ⊕ (gl(E) × sp(V )) ⊕ (E ∗ ⊗ V ∗ ) ⊕ 2 (E ∗ ). Let g be the positive part of this grading, i.e., g = (E ∗ ⊗ V ∗ ) ⊕ V2 (E ∗ ). V Then 2 (E ∗ ) is central in g. For e⊗v, e′ ⊗v ′ ∈ E ∗ ⊗V ∗ , we have [e⊗v, e′ ⊗v ′ ] = ωV (v, v ′)e∧e′ where ωV is the symplectic form on V ∗ ∼ = V . So Proposition 2.2.3 implies the following: Proposition 3.1.7. The Koszul dual of B is the universal enveloping algebra U(g). V Let F ⊂ V be a maximal isotropic subspace and write V = F ⊕ F ∗ . Let u = 2 (E ∗ |F ) ⊂ osp(Ve ). It inherits a Z-grading: V u0 = Sym2 (F ), u1 = E ∗ ⊗ F, u2 = 2 (E ∗ ). Let g′ ⊂ osp(Ve ) be the subalgebra generated by u and g. Then it also has a Z-grading: V g′0 = Sym2 (F ), g′1 = E ∗ ⊗ V ∗ , g′2 = 2 (E ∗ ). Lemma 3.1.8. We have the following two exact sequences of Lie superalgebras (3.1.8.1) 0 → g → g′ → Sym2 (F ) → 0, (3.1.8.2) 0 → u → g′ → E ∗ ⊗ F ∗ → 0. Proof. For (3.1.8.1), it follows from the Z-grading that g is an ideal in g′ . The same reasoning almost works for (3.1.8.2), but we also have to note that [Sym2 (F ), E ∗ ⊗ F ∗ ] = E ∗ ⊗ F .  3.2. Howe duality. In this section, we assume that char(k) = 0. Let U be a 2k-dimensional symplectic space. Then U ⊗ Ve is a superspace with even part U ⊗(E ⊕E ∗ ) and odd part U ⊗V and has a super skew-symmetric bilinear form by taking the tensor product of the forms on U and Ve . Let spo(U ⊗ Ve ) be the associated orthosymplectic Lie superalgebra (we use spo instead of osp since our form is super skew-symmetric). Let E ∗ |F denote the superspace with even part E ∗ and odd part F . Then U ⊗ (E ∗ |F ) is a maximal isotropic subspace of U ⊗ Ve and hence we get an oscillator representation U = Sym(U ⊗ (E ∗ |F )) 14 STEVEN V SAM of spo(U ⊗ Ve ). Both sp(U) and osp(Ve ) are subalgebras of spo(U ⊗ Ve ) which commute with one another, so sp(U) × osp(Ve ) acts on U . As a representation of sp(U), U is a direct sum of finite-dimensional representations, so we can use the group Sp(U) instead. For a partition λ with ℓ(λ) ≤ k and λn+1 ≤ n + d, let Nλk denote the S[λ] (U)-isotypic component of U under the action of Sp(U). We need some of the following facts about the action of Sp(U) × osp(Ve ), which state that they form a Howe dual pair (we will not use unitarizability, and hence do not define it; we state it only for completeness): Theorem 3.2.1. For a partition λ with ℓ(λ) ≤ k and λn+1 ≤ n + d, Nλk is an irreducible, unitarizable, lowest-weight representation of osp(Ve ). We have Nλk ∼ = Nλk′ if and only if λ = λ′ . As a representation of Sp(U) × osp(Ve ), we have a direct sum decomposition M S[λ] (U) ⊗ Nλk . U = Sym(U ⊗ (E ∗ |F )) = ℓ(λ)≤k λn+1 ≤n+d Proof. See [CW, §§5.3.1, 5.3.2].  Theorem 3.2.2. We have a gl(E) × gl(F )-equivariant isomorphism M U(u) Sα (E ∗ |F ) ⊗ (det E ∗ )k ⊗ (det F ∗ )k . Hi (u; Nλk ) = Tori (Nλk , k) ∼ = α τ2k (α)=λ ι2k (α)=i Proof. This follows from [CKW, Theorem 5.7]. Their notation does not match ours, so alternatively one can use [SSW, §3] by noting that [SSW, Corollary 3.16] is valid whenever E is an object in a semisimple monoidal Abelian category. In particular, we can take E to be E ∗ |F in the category of polynomial representations of gl(E ∗ |F ). We note that the twist by (det E ∗ )k ⊗ (det F ∗ )k is not present in [SSW] because it did not consider the action of u as being restricted from a larger Lie (super)algebra which forces the twist present here.  Proposition 3.2.3. Let λ be a partition with ℓ(λ) ≤ k and λn+1 ≤ n + d. Set ν = (λ†1 , . . . , λ†n+d ) and µ = (λ†n+d+1 , λ†n+d+2 , . . . ). Then H0 (g; Nλk ) = (det E ∗ )k ⊗ Sµ† (E ∗ ) ⊗ S[((n+d)×k)\ν] (V ) H1 (g; Nλk ) = (det E ∗ )k ⊗ S(1+νn+d ,µ2 ,µ3 ,... )† (E ∗ ) ⊗ S[(k−µ1 +1,k−νn+d−1,...,k−ν1)] (V ). In particular, as a U(g)-module, Nλk is generated in a single degree and has relations of degree λ†n+d − λ†n+d+1 + 1. Proof. Consider Nλk as a g′ -module. We will analyze the Hochschild–Serre spectral sequence (2.8.1) with respect to the exact sequences (3.1.8.1) and (3.1.8.2). Everything is equivariant with respect to gl(E) × gl(F ) so we will keep track of this symmetry. For H0 , the Hochschild–Serre spectral sequence gives us the following identity: H0 (Sym2 (F ); H0 (g; N k )) ∼ = H0 (g′ ; N k ) ∼ = H0 (E ∗ ⊗ F ∗ ; H0 (u; N k )). λ λ From Theorem 3.2.2, (3.2.3.1) H0 (u; Nλk ) = Sλ (E ∗ |F ) ⊗ (det E ∗ )k ⊗ (det F ∗ )k . Proposition 2.8.2 gives H0 (E ∗ ⊗ F ∗ ; Sλ (E ∗ |F )) = Sν (F ) ⊗ Sµ† (E ∗ ). λ ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 15 Hence H0 (Sym2 (F ); H0 (g; Nλk )) = S(kn )+µ† (E ∗ ) ⊗ S((n+d)×k)\ν (F ∗ ), so by Proposition 2.8.3, we have H0 (g; Nλk ) = S(kn )+µ† (E ∗ ) ⊗ S[((n+d)×k)\ν] (V ). (3.2.3.2) Now we calculate H1 . First consider the Hochschild–Serre spectral sequence for (3.1.8.1). As a gl(E) × gl(F )-representation, H1 (g′ ; Nλk ) is the direct sum of E21,0 and the cokernel of d2 : E22,0 → E20,1 . We claim that d2 = 0. First, E22,0 = H2 (Sym2 (F ); H0 (g; Nλk )) and E20,1 = H0 (Sym2 (F ); H1 (g; Nλk )). The action of the Lie algebra Sym2 (F ) commutes with the action of gl(E). From (3.2.3.2), H0 (g; Nλk ) is gl(E)-isotypic, i.e., is a direct sum of copies of the same representation S(kn )+µ† (E ∗ ). Since H1 (g; Nλk ) ⊂ H0 (g; Nλk ) ⊗ U(g)>0 , and U(g)>0 does not contain any gl(E)-invariants, we conclude that the S(kn )+µ† (E ∗ )-isotypic component of H1 (g; Nλk ) is 0. Hence d2 = 0. So we get ∼ H0 (Sym2 (F ); H1 (g; N k )) ⊕ H1 (Sym2 (F ); H0 (g; N k )). H1 (g′ ; N k ) = λ λ λ H1 (g; Nλk ), ∗ So, to calculate we first remove the S(kn )+µ† (E )-isotypic component from H1 (g′ ; Nλk ). Now consider the Hochschild–Serre spectral sequence of (3.1.8.2). By Theorem 3.2.2, H1 (u; Nλk ) = S(λ,12k+2−2ℓ(λ) ) (E ∗ |F ) ⊗ (det E ∗ )k ⊗ (det F ∗ )k . Setting ν ′ = (2k + 2 − ℓ(λ), ν2 , . . . , νn+d ) (the first n + d columns of (λ, 12k+2−2ℓ(λ) )), Proposition 2.8.2 gives E20,1 = H0 (E ∗ ⊗ F ∗ ; H1 (u; Nλk )) = S(kn )+µ† (E ∗ ) ⊗ (det F ∗ )k ⊗ Sν ′ (F ), so we can ignore it for the purposes of calculating H1 (g; Nλk ), i.e., H0 (Sym2 (F ); H1 (g; N k )) ∼ = E2 = H1 (E ∗ ⊗ F ∗ ; H0 (u; N k )) λ λ 1,0 ∗ k = (det F ) ⊗ S(ν1 ,...,νn+d−1,µ1 −1) (F ) ⊗ (det E ∗ )k ⊗ S(1+νn+d ,µ2 ,µ3 ,... )† (E ∗ ). One more application of Proposition 2.8.3 gives us the desired formula for H1 (g; Nλk ).  Proposition 3.2.4. If λ1 ≤ d and ℓ(λ) ≤ k, then Nλk has a linear free resolution over U(g). Proof. Consider Nλk as a g′ -module. We will analyze the Hochschild–Serre spectral sequence (2.8.1) with respect to the exact sequences (3.1.8.1) and (3.1.8.2). Everything is equivariant with respect to gl(E)×gl(F ) so we will keep track of this symmetry. In particular, the center of gl(E) puts a grading on all vector spaces that are involved according to which multiple of the trace character it acts by (we use the convention that D times the trace means degree −D). We will prove by induction on i that Hi (g; Nλk ) is concentrated in degree i + nk. The base case i = 0 follows from Proposition 3.2.3. Note that Hi (g; Nλk ) is concentrated in degrees ≥ i + nk since the smallest degree appearing in Hi is strictly bigger than the smallest degree appearing in Hi−1 (use that Hi ⊂ Hi−1 ⊗ U(g)>0 ). Since the action of Sym2 (F ) commutes with the gl(E)-action, this is the same as proving that H0 (Sym2 (F ); Hi (g; Nλk )) is concentrated in degree i + nk. In the Hochschild–Serre spectral sequence for (3.1.8.1), this is the term E20,i . We claim that it is the same as E∞ 0,i . The relevant differentials are of the form Err,i−r+1 → Er0,i . But Err,i−r+1 is a subquotient of E2r,i−r+1 = Hr (Sym2 (F ); Hi−r+1(g; Nλk )). By induction, the latter is concentrated in degree i − r + 1 + nk, andLhence the differential must be 0, and the claim is proven. Now, we i ∞ ∞ have Hi (g′ ; Nλk ) = j=0 Ej,i−j . For j > 0, we know that Ej,i−j , being a subquotient of 16 STEVEN V SAM Hj (Sym2 (F ); Hi−j (g; Nλk )), is concentrated in degree i − j + nk by induction. In conclusion, H0 (Sym2 (F ); Hi (g; Nλk )) is the degree ≥ i + nk part of Hi (g′ ; Nλk ). Using the Hochschild–Serre spectral sequence for (3.1.8.2), Hi (g′ ; Nλk ) is a subquotient L of ij=0 Hj (E ∗ ⊗ F ∗ ; Hi−j (u; Nλk )). We will show that this space is concentrated in degree ≤ i + nk, which implies the result. Pick a partition α such that Sα (E ∗ |F ) ⊗ (det E ∗ )k ⊗ (det F ∗ )k ⊆ Hm (u; Nλk ). Then by Theorem 3.2.2, we have τ2k (α) = λ and ι2k (α) = m. Since Sα (E ∗ |F ) 6= 0, we have αn+1 ≤ n + d. Let ρ = (−1, −2, −3, . . . ). By Proposition 2.8.2, to calculate Hm′ (E ∗ ⊗ F ∗ ; Sα (E ∗ |F )), we apply the ρ-shifted action of a length m′ permutation w to α† to get (β1 , . . . , βn+d , γ1 , γ2 , . . . ) so that β and γ are weakly decreasing and γ is nonnegative. This contributes the representation Sβ (F ) ⊗ Sγ † (E ∗ ) (and so γ1 ≤ n). So we just have to show that |γ| ≤ m + m′ . We isolate and prove this statement in Lemma 3.2.5 along with a calculation of what happens when |γ| = m + m′ .  Lemma 3.2.5. Fix k > 0. Let λ be a partition with λ1 ≤ d and ℓ(λ) ≤ k. Pick a partition α with αn+1 ≤ n + d such that τ2k (α) = λ and let w be a permutation such that w • α† = (β1 , . . . , βn+d , γ1 , γ2 , . . . ) with β1 ≥ · · · ≥ βn+d and n ≥ γ1 ≥ γ2 ≥ · · · ≥ 0. Then |γ| ≤ ι2k (α) + ℓ(w). If |γ| = ι2k (α) + ℓ(w), then: - ι2k (α) = 0 and α† = λ† = (β1 , . . . , βd ), and - w • α† = (λ†1 , . . . , λ†d , −γn† , . . . , −γ1† , γ1 , γ2 , . . . ) where |γ| = ℓ(w). Proof. We claim that (3.2.5.1) ι2k (α) ≥ X max(αj − d − j + 1, 0). j≥1 The modification rule (§2.7.1) expresses α \ λ as a disjoint union of border strips. Since λ1 ≤ d, the part which is to the right of the dth column of α is expressed as a disjoint union of border strips, and the right hand side of (3.2.5.1) is the least number of columns needed in all of the border strips to do this. This proves the claim. P † † Set ν = (αn+d+1 , αn+d+2 , . . . ). If w = 1 is the identity, then |γ| = |ν| = j≥1 max(αj − n − d, 0). Since αn+1 ≤ n + d, we conclude that this sum is ≤ ι2k (α). Otherwise, suppose w 6= 1. To clarify the remainder of this argument, we use the convention that w(a1 , a2 , . . . ) = (aw−1 (1) , aw−1 (2) , . . . ) and set v = w −1 . Since β and γ are weakly decreasing, we get v(1) < v(2) < · · · < v(n + d) and v(n + d + 1) < v(n + d + 2) < · · · . So Pn+d (v(j) − j), and hence the number of inversions of w is ℓ(w) = ℓ(v) = j=1 |γ| = |α| − |β| = (3.2.5.2) X (αj† − βj ) = j≥1 X αj† + X j>n+d † (αj† − αv(j) + v(j) − j) j=1 j>n+d = n+d X αj† + n+d X † (αj† − αv(j) ) + ℓ(w). j=1 Pn+d Here we use the notation |β| = j=1 βj even though some entries of β may be negative. Let i be minimal with the property that v(i) 6= i. From above, we get i ≤ n + d and i = v(n + d + 1). Then γ1 = αi† + n + d + 1 − i. Since γ1 ≤ n, we get 0 ≥ αi† + d + 1 − i, i.e., ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 17 αi† < i − d, and hence αi−d < i. So (3.2.5.3) X j≥i αj† = i−d−1 X max(αj − i + 1, 0) ≤ j=1 i−d−1 X max(αj − d − j, 0) ≤ ι2k (α) j=1 where the last inequality is (3.2.5.1). By definition of i, and nonnegativity of α, we have P P Pn+d † † † † α ≥ α + j≥i j j>n+d j j=1 (αj − αv(j) ), so combining this with (3.2.5.2), we conclude that |γ| ≤ ι2k (α) + ℓ(w). Now assume that |γ| = ι2k (α) + ℓ(w). In particular, all of the above inequalities are equalities. From our proof of (3.2.5.1), it can only be an equality if d = 0 or ι2k (α) = 0 (if d > 0 and ι2k (α) > 0, then the boxes in the first d columns of α contribute to ι2k (α)). Suppose further that d = 0. By (3.2.5.3), we have max(αj − i + 1, 0) = max(αj − j, 0) for j = 1, . . . , i − 1. If i = 1, then the sum in (3.2.5.3) is empty, which means ι2k (α) = 0. Otherwise i > 1, so max(α1 − i + 1, 0) = max(α1 − 1, 0), i.e., α1 ≤ 1. This implies that the sum in (3.2.5.3) is empty, so again we get ι2k (α) = 0. In conclusion, we have ι2k (α) = 0 if |γ| = ι2k (α) + ℓ(w) and hence that α† = λ† = (β1 , . . . , βd ) (by assumption, λ1 ≤ d). So we are in the situation where w acts on a sequence of zeroes. The result of this is of the form (−γn† , . . . , −γ1† , γ1, γ2 , . . . ) where |γ| = ℓ(w) (see, for example, [S4, §2.4]), which proves the last part of the lemma.  Corollary 3.2.6. Let λ be a partition with λ1 ≤ d and ℓ(λ) ≤ k. As a representation of GL(E) × Sp(V ), Hi (g; Nλk ) is a subrepresentation of M S(kn )+γ (E ∗ ) ⊗ S[((kn )+γ,k−λ† ,...,k−λ† )] (V ). 1 d |γ|=i ℓ(γ)≤n Proof. In the proof of Proposition 3.2.4, we defined the degree of a representation in terms of the gl(E) action and showed that H0 (Sym2 (F ); Hi (g; Nλk )) is the degree i + nk part of Hi (g′ ; Nλk ), which is a subquotient (by semisimplicity, we can say subrepresentation) of the L degree i+nk part of ij=0 Hj (E ∗ ⊗F ∗ ; Hi−j (u; Nλk )). Combining the calculation of this space in the proof of Proposition 3.2.4 with Lemma 3.2.5 gives that the latter representation is M P := S(kn )+γ (E ∗ ) ⊗ S((kn )+γ,k−λ† ,...,k−λ† ) (F ∗ ). d 1 |γ|=i ℓ(γ)≤n If H0 (Sym2 (F ); P0 ) = P , then Hi (g; Nλk ) ⊆ P0 . Using Proposition 2.8.3, we get M P0 = S(kn )+γ (E ∗ ) ⊗ S[((kn )+γ,k−λ† ,...,k−λ† )] (V ). d 1  |γ|=i ℓ(γ)≤n 3.3. Main result and consequences. We assume that char(k) = 0 in this section. Recall the Z-grading on osp(Ve ) from §3.1. Let p be the sum of the nonpositive pieces. So V p = 2 (E) ⊕ (E ⊗ V ) ⊕ (gl(E) × sp(V )). Given a representation W of gl(E) × sp(V ), extend it to a p-module by letting the negative e part act by 0. The induced representation is Indposp(V ) (W ) = U(osp(Ve )) ⊗U(p) W , which is a representation of osp(Ve ). When W is irreducible, we call this a parabolic Verma module. As a U(g)-module, it is isomorphic to U(g)⊗W . From the definition, if W is a representation 18 STEVEN V SAM e of osp(Ve ), and Indposp(V ) (W ) → W is U(g)-equivariant, then it is osp(Ve )-equivariant if and only if the negative part of osp(Ve ) acts as 0 on the image of W in W. This implies: e Lemma 3.3.1. Let W0 be a graded osp(Ve )-submodule of Indposp(V ) (W ) which is generated by e W0 as a U(g)-module, so we have a surjection U(g) ⊗ W0 → W0 ⊂ Indposp(V ) (W ). If W0 is concentrated in a single degree, then this map is equivariant for the natural action of osp(Ve ). Theorem 3.3.2. Let λ be a partition with ℓ(λ) ≤ k and λn+1 ≤ n + d. Set ν = (λ†1 , . . . , λ†n+d) and µ = (λ†n+d+1 , λ†n+d+2 , . . . ). Then: (a) λ†n+d = λ†n+d+1 if and only if Nλk has a linear presentation as a U(g)-module. (b) If λ†n+d = λ†n+d+1 , L(Nλk ) (notation of §2.2) is the first linear strand of a B-module M with a compatible GL(E) × Sp(V )-action and which is uniquely determined by the fact that it is generated in degree 0 with degree 1 relations, and satisfies M0 = (det E)k ⊗ Sµ† (E) ⊗ S[((n+d)×k)\ν] (V ), M1 = (det E)k ⊗ S(µ1 +1,µ2 ,µ3 ,... )† (E) ⊗ S[(k+1−νn+d ,k−νn+d−1,...,k−ν1)] (V ). If furthermore λ1 ≤ d, then M ∼ = Mkλ† , and: (c) L(Nλk ) is an acyclic linear complex and is a minimal free resolution of Mkλ† over B, (d) R(Mkλ† ) is an acyclic linear complex and is a minimal free resolution of Nλk over U(g). The action of g on this complex extends to an action of osp(Ve ) and each R(Mkλ† )i is a direct sum of parabolic Verma modules. Proof. (a) follows directly from Proposition 3.2.3. By Proposition 3.2.3 and Theorem 2.2.2, L(Nλk ) is the first linear strand of the cokernel of (Nλk )∗1 ⊗ B(−1) → (Nλk )∗0 ⊗ B, and (Nλk )∗0 = (det E)k ⊗Sµ† (E) ⊗S[((n+d)×k)\ν] (V ). Its tensor product with B1 = E ⊗V is multiplicity-free: for all classical groups, the tensor product of an irreducible representation with the vector representation is multiplicity-free [St, Theorem 1.1ABCD] (there the character of the vector representation is denoted χ(ωn )). So the cokernel M is uniquely determined by the condition that it is linearly presented as a B-module and Mi = Hi (g; Nλk ) for i = 0, 1. This proves (b). When λ1 ≤ d, the module Mkλ† satisfies these conditions except that we do not yet know if it has a linear presentation. We have a surjection M → Mkλ† , which is an isomorphism by comparing Corollary 3.2.6 and (3.1.5). So (c) and (d) are an immediate consequence of Proposition 3.2.4 and Theorem 2.2.2. The second statement of (d) follows from Lemma 3.3.1 by induction on i since the free resolution of Nλk over U(g) is linear.  Conjecture 3.3.3. Let Iλ be the ideal generated by Sλ (E)⊗S[λ] (V ) in B. Then the resolution of Iλ is a representation of osp(Ve ). Furthermore, each linear strand is irreducible. Now we derive a few consequences of Theorem 3.3.2. First, we begin with an alternative construction of Mkν . Consider IGr(n, V ) with vector bundles η = E ⊗ R∗ , and Vνk = (det E)k ⊗ (det R∗ )k ⊗ S[(d×k)\ν] (R⊥ /R). Proposition 3.3.4. Mkν = H0 (IGr(n, V ); Sym(η) ⊗ Vνk ). Proof. Let X be the partial isotropic flag variety IFl(n, n + d, V ) with tautological flag Rn ⊂ Rn+d ⊂ V . Let π1 : X → IGr(n, V ) and π2 : X → IGr(n + d, V ) be the projections. Let R and R′ be the tautological subbundles on IGr(n, V ) and IGr(n + d, V ), respectively. ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 19 First, π1 is the relative Grassmannian Gr(d, R⊥ /R). So S[(d×k)\ν] (R⊥ /R) = π1∗ (S(d×k)\ν (R⊥ n /Rn+d )) using Theorem 2.5.4 and Remark 2.5.6. Set W = Sym(E ⊗ R∗n ) ⊗ (det E)k ⊗ (det R∗n )k ⊗ S(d×k)\ν (R⊥ n /Rn+d ). Since Rn = π1∗ (R), the projection formula gives Sym(η) ⊗ Vνk = π1∗ (W). Next, π2 is the relative Grassmannian Gr(n, R′ ). The symplectic form on V induces an isomorphism ∗ ∼ ∗ R⊥ n /Rn+d = Rn+d /Rn . So applying π2∗ to W is a relative version of the construction in §2.6, which is how we defined Mνk (E, R′ ∗ ). So pushing forward Sym(η) ⊗ Vνk to a point is the same as pushing forward Mνk (E, R′ ∗ ) to a point. Since the latter is Mkν , we are done.  Define the following vector bundle on IGr(n, V ): Eλν = Sλ (R⊥ ) ⊗ (det R∗ )k ⊗ S[(d×k)\ν] (R⊥ /R). Corollary 3.3.5. Let Fν• be the minimal free resolution of Mkν over A. Then M M Fνi = Hj (IGr(n, V ); S(kn )+λ (E) ⊗ Eλν† ) ⊗ A(−i − j). j≥0 |λ|=i+j λ⊆n×(n+2d) Proof. In the notation of §2.4, ξ = E ⊗ R⊥ . Now use Proposition 3.3.4, Theorem 2.4.1, and Theorem 2.3.3.  It is probably difficult to give a closed formula to simplify the above expression, but the next theorem sheds some light on the relevant combinatorial features. While this result looks similar to the Borel–Weil–Bott theorem, it is not a special case because the vector bundles Eλν are not irreducible homogeneous bundles. To strengthen the analogy, we point the reader to [SSW, §3.5] where ι2k and τ2k are defined in terms of the Weyl group of type BC∞ . Theorem 3.3.6. Let ν ⊆ (k d ) and λ ⊆ n×(n+2d) be partitions and let R be the tautological subbundle on IGr(n, V ). (a) If k ≥ ℓ(λ), then Hi (IGr(n, V ); Eλν† ) = 0 for i > 0. (b) The cohomology of Eλν† vanishes unless τ2k (λ) = µ is defined, in which case the cohomology is nonzero only in degree ι2k (λ) = i, and we have an Sp(V )-equivariant isomorphism Hi (IGr(n, V ); E ν† ) ∼ = H0 (IGr(n, V ); E ν† ). µ λ Proof. Let F• be the minimal free resolution of Mkν over A. Using [Ei1, §7], we can use it to build a free resolution G• of Mkν over B. We just need a few properties of this construction. First, the terms are given by ⌊i/2⌋ Gi = M j=0 V2 Fi−2j (−2j) ⊗k Dj ( V2 (E)). Second, if we set S = Sym( (E ∗ )), then R(G• ) is a minimal complex of S-modules, and applying L to its homology gives the minimal free resolution of Mkν over B. By Theorem 3.3.2, the minimal free resolution of Mkν is linear over B, which means that R(G• ) only has homology in degree 0, and H0 (R(G• )) = Nνk† . Putting this together implies k TorSi (Nνk† , k)∗j = TorA j (Mν , k)i+j . 20 STEVEN V SAM Now consider the GL(E) × Sp(V )-action on TorSi (Nνk† , k)∗j . If S(kn )+λ (E ∗ ) has a nonzero GL(E)-isotypic component, then τ2k (λ) is well-defined and ι2k (λ) = i by Theorem 3.2.2 (or [SSW, Proposition 3.13]). In particular, since the GL(E) and Sp(V ) actions commute, we have an isomorphism of Sp(V )-representations HomGL(E) (S(kn )+λ (E ∗ ), TorSι2k (λ) (Nνk† , k)∗|λ| ) ∼ = HomGL(E) (S(kn )+τ2k (λ) (E ∗ ), TorS0 (Nνk† , k)∗|τ2k (λ)| ). Combining Theorem 2.4.1 and Corollary 3.3.5, we get M k j TorA (M , k) = H (IGr(n, V ); i+j i ν S(kn )+λ (E) ⊗ Eλν† ). |λ|=i+j λ⊆n×(n+2d) Combining everything, we get an isomorphism of Sp(V )-representations Hι2k (λ) (IGr(n, V ); Eλν† ) ∼ = H0 (IGr(n, V ); Eτν2k (λ)† ), and that HN (IGr(n, V ); Eλν† ) = 0 if N 6= ι2k (λ).  The method of the proof of Theorem 3.3.6 is a clean, elegant approach, but it is in some ways unsatisfactory since it appeals to so many other techniques. We have another proof which is more direct, but has the disadvantage of only working for ν = (k d ) and is much longer. Since it may be of independent interest, we include this alternate proof in [S5]. Remark 3.3.7. As in §3.1, we interpret A as the coordinate ring of the space of linear maps E → V ∗ and hence it makes sense to talk about the generic map with respect to A, i.e., picking bases for E and V ∗ , the matrix entries are the variables of A. Similar comments apply to B. The ideal of maximal minors in B of this generic matrix is generated by V n (E) ⊗ S[1n ] (V ). When ν = (k d ), (3.1.5) becomes M Sλ (E) ⊗ S[λ] (V ), Mk(kd ) = λ, λn ≥k which is the kth power of the maximal minors in B (use Proposition 3.1.2(c)).  Corollary 3.3.8. For ν ⊆ (k d ), if k ≥ n − 1, then the minimal free resolution of Mkν over A is linear. Proof. Combine Corollary 3.3.5 and Theorem 3.3.6(a).  For every pair of finitely generated B-modules M and N, V there is an action of U(g) ∼ = 2 • • ∗ ExtB (k, k) on ExtB (M, N) which we can restrict to S = Sym( (E )). The support of this V module is the support variety of the pair (M, N), and is a subscheme of Spec(S) = 2 (E). The basic properties of support varieties are developed in [AB]. We define the support variety of a single module M to be the support variety of the pair (M, k). Note that ∗ ExtiB (M, k) = TorB i (M, k) . d k Proposition 3.3.9. Choose a partition ν ⊆ (k V2). The support variety of Mν is reduced and is the variety of skew-symmetric matrices in (E) of rank ≤ 2k. Proof. We have L(Mkν ) = Nνk† by Theorem 3.3.2. With the notation in §3.2, we have V (3.3.9.1) U = Sym(U ⊗ (E ∗ |F )) = Sym(U ⊗ E ∗ ) ⊗ • (U ⊗ F ). ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 21 The first tensor factor has a multiplicity-free action of Sp(U) × so(E ⊕ E ∗ ), and the second has a multiplicity-free action of Sp(U) × sp(V ). We have M Sym(U ⊗ E ∗ ) = S[µ] (U) ⊗ Mµso , (3.3.9.2) ℓ(µ)≤min(n,k) V• (U ⊗ F ) = M S[λ] (U) ⊗ S[((n+d)×k)\λ† ] (V ), λ⊆k×(n+d) where (det E)k ⊗ Mµso is the module Mµ in [SSW, §3.5]. So as an S-module, Nνk† is a direct sum of modules of the form Mµso . On each module, the action of S factors through M∅so , which is the coordinate ring of the variety of skew-symmetric matrices of rank ≤ 2k.  Remark 3.3.10. Using [Av, Theorem 3.9, Corollary 3.12], we get the following statement. V Let W ⊂ 2 (E) be a linear subspace of complementary dimension to the space of skewsymmetric matrices of rank ≤ 2k so that their intersection is 0. Then Mkν has finite projective dimension over A/(W ). It would be interesting to understand the minimal free resolution of Mkν over A/(W ).  3.4. Cokernels. For background on multilinear algebra on chain complexes, see [Wey, §2.4]. Let ϕ : E ⊗ B(−1) → V ⊗ B be the generic matrix. Let Ve = (E ⊕ E ∗ ) ⊕ V where E ⊕ E ∗ is given an orthogonal form as in §3.1. The complex ϕ ϕ∗ V : 0 → E ⊗ B(−2) − → V ⊗ B(−1) −→ E ∗ ⊗ B carries an action of the orthosymplectic Lie superalgebra osp(Ve ) ⊗ B. Here the indexing is such that V0 = E ∗ ⊗ B, V1 = V ⊗ B(−1), and V2 = E ⊗ B(−2). Then we have Sym2B (V) : 0 → Sym2 (E) ⊗ B(−4) → E ⊗ V ⊗ B(−3) → V ( 2 (V ) ⊕ (E ⊗ E ∗ )) ⊗ B(−2) → E ∗ ⊗ V ⊗ B(−1) → Sym2 (E ∗ ) ⊗ B. The space of gl(E) × sp(VV) invariants in E ∗ ⊗ V ⊗ B(−1) in degree 2 is 1-dimensional, and the space of invariants in 2 (V ) ⊕ (E ⊗ E ∗ ) is 2-dimensional, so there is an invariant in the latter space which represents a nonzero homology class. We write this as a map of complexes B[−2] → Sym2B (V). Using the multiplication map for symmetric powers, we get an injective k−2 map of complexes (SymB (V))[−2] → SymkB (V), and the cokernel is denoted Symk0 (V). Proposition 3.4.1. If 2 dim(E) + 2d = dim(V ), then Symd+1 0 (V) is acyclic and resolves d+1 d+1 ∗ ∗ SymB (coker ϕ ). In particular, SymB (coker ϕ ) is a perfect module. Proof. Set F = Symd+1 0 (V), which is a complex of length 2d + 2. By the Peskine–Szpiro acyclicity lemma [Ei2, Theorem 20.9], F is acyclic if and only if the localization Fp is acyclic for every prime ideal p ⊂ B with grade(p) < 2d + 2 (recall that the grade of an ideal is the longest regular sequence contained in it). Pick such a prime p. The ideal generated by the maximal minors has grade 2d + 2: since B is Cohen–Macaulay, the grade of any ideal I is dim(B) − dim(B/I); if I is the ideal of maximal minors, then an easy calculation (or see [SW, Theorem 2.2(1)]) shows that this is 2d + 2. So there is at least one maximal minor that is not in p. After inverting this minor, there is a change of basis so that ϕ becomes ϕ′ = In 0 where In is an n × n identity matrix and 0 is the n × (n + 2d) zero matrix. We claim that Fp is exact. Using the special form of ϕ′ , we can decompose V ⊗B Bp as the direct sum of a split exact sequence with (W ⊗ Bp )[−1], where dim(W ) = 2d and W 22 STEVEN V SAM inherits a symplectic form from V (the image of E in V is isotropic since V is a complex, and W = E ⊥ /E). In particular, Symd+1 Bp (V) is a direct sum of a split exact complex with Vd+1 ( (W ) ⊗ Bp )[−d − 1]. Similarly, Symd−1 Bp (V)[−2] is a direct sum of a split exact complex Vd−1 V V with ( (W )⊗Bp )[−d−1]. The induced map on homology d−1 (W )⊗Bp → d+1 (W )⊗Bp is multiplication by the symplectic form on W , so it is an isomorphism. This implies that Fp is d+1 ∗ exact. Finally, H0 (Symd+1 (V)), and the latter module is Symd+1 0 (V)) = H0 (Sym B (coker ϕ ) by right-exactness of symmetric powers (see, for example, [Ei2, Proposition A2.2(d)]).  Remark 3.4.2. It remains to construct finite length (linear) resolutions supported on lowerorder minors. These should be orthosymplectic generalizations of Schur complexes which in turn should be special cases of orthogonal and symplectic analogues of Schubert complexes. See [S1] for Schubert complexes and their connections with double Schubert polynomials, and see [Wey, Exercises 6.34–6.36] for an analogue of our situation when B is replaced by the polynomial ring. For dim(E) = n and dim(V ) = 2n + 2d, we have that the rank n − 1, n − 2, n − 3, n − 4 loci have codimensions 2d + 2, 4d + 7, 6d + 15, and 8d + 26, respectively. When this codimension is odd, we cannot use an orthosymplectic Schur functor as we did above.  3.5. Examples. In general, the resolution of Mkν , under the action of GL(E) × Sp(V ), contains representations with high multiplicity (hence the main advantage of having an irreducible action of the orthosymplectic Lie superalgebra). Now we explain how the simplest examples can be calculated using a few tricks. This amounts to calculating Nνk† (after replacing E with E ∗ ), which is the S[ν † ] (U)-isotypic component of U . To do this, use the decompositions (3.3.9.1) and (3.3.9.2). When ν = ∅, we get (using that representations of Sp(U) are self-dual) M S[((n+d)×k)\µ† ] (V ) ⊗ Mµso . µ⊆min(n,k)×(n+d) If k = 1, then Sp(U) = SL(U) and Sλ (U) = S[λ1 −λ2 ] (U). Using Theorem 2.3.3, we get M Mµso = S(µ1 +e,e) (E ∗ ). e≥0 Finally, we tensor with (det E ∗ ) because of the way that Howe duality is setup. Below, we abbreviate Sλ (E) ⊗ S[µ] (V ) with the notation (λ; µ). Example 3.5.1. Take dim(E) = 4 and dim(V ) = 8 with V symplectic. We consider the ideal M1∅ generated by the 4 × 4 minors. The first few terms of its minimal free resolution over the coordinate ring of the Littlewood variety are F0 = (1, 1, 1, 1; 1, 1, 1, 1) F1 = (2, 1, 1, 1; 1, 1, 1, 0) F2 = (2, 2, 1, 1; 1, 1, 1, 1) ⊕ (3, 1, 1, 1; 1, 1, 0, 0) F3 = (3, 2, 1, 1; 1, 1, 1, 0) ⊕ (4, 1, 1, 1; 1, 0, 0, 0) F4 = (3, 3, 1, 1; 1, 1, 1, 1) ⊕ (4, 2, 1, 1; 1, 1, 0, 0) ⊕ (5, 1, 1, 1; 0, 0, 0, 0) F5 = (4, 3, 1, 1; 1, 1, 1, 0) ⊕ (5, 2, 1, 1; 1, 0, 0, 0) F6 = (4, 4, 1, 1; 1, 1, 1, 1) ⊕ (5, 3, 1, 1; 1, 1, 0, 0) ⊕ (6, 2, 1, 1; 0, 0, 0, 0) F7 = (5, 4, 1, 1; 1, 1, 1, 0) ⊕ (6, 3, 1, 1; 1, 0, 0, 0) .. . ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 23 The graded Betti table of M1∅ over the polynomial ring (it is not an ideal in this setting) is 0 1 2 3 4 5 6 7 total: 42 192 462 607 485 257 77 10 4: 42 192 270 160 35 . . . 5: . . 192 447 288 70 . . 6: . . . . 162 160 45 . 7: . . . . . 27 32 10 Here V are the representations for the resolution of the Littlewood ideal (we removed a factor of 4 (E) = det E): V3 V4 0V 0V ⊗E V2 ⊗ S2E V3 E 0V ⊗ 0V V3 V ⊗ S3E V2 V ⊗ S2,1,1 E V04 V4 E 0V ⊗ S4E V ⊗ S3,1,1 E V2 0 V ⊗ S2,2,1,1 E S4,1,1 E V ⊗ S3,2,1,1 E V2 0 V ⊗ S2,2,2,2 E S4,2,1,1 E V ⊗ S3,2,2,2 E S4,2,2,2 E Compare this with the proof of Theorem 3.3.6.  We end with a slightly more complicated example not covered by the above derivation. Example 3.5.2. Take dim(E) = 3 and dim(V ) = 8 with V symplectic. We consider the ideal M1(1) generated by the 3 × 3 minors. The first few terms of its minimal free resolution over the coordinate ring of the Littlewood variety are F0 = (1, 1, 1; 1, 1, 1, 0) F1 = (2, 1, 1; 1, 1, 1, 1) ⊕ (2, 1, 1; 1, 1, 0, 0) F2 = (2, 2, 1; 1, 1, 1, 0) ⊕ (3, 1, 1; 1, 1, 1, 0) ⊕ (3, 1, 1; 1, 0, 0, 0) F3 = (3, 2, 1; 1, 1, 1, 1) ⊕ (3, 2, 1; 1, 1, 0, 0) ⊕ (4, 1, 1; 1, 1, 0, 0) ⊕ (4, 1, 1; 0, 0, 0, 0) F4 = (3, 3, 1; 1, 1, 1, 0) ⊕ (4, 2, 1; 1, 1, 1, 0) ⊕ (4, 2, 1; 1, 0, 0, 0) ⊕ (5, 1, 1; 1, 0, 0, 0) F5 = (4, 3, 1; 1, 1, 1, 1) ⊕ (4, 3, 1; 1, 1, 0, 0) ⊕ (5, 2, 1; 1, 1, 0, 0) ⊕ (5, 2, 1; 0, 0, 0, 0) ⊕ (6, 1, 1; 0, 0, 0, 0) .. .  4. Orthogonal Littlewood varieties D ′ Fix d′ ∈ {0, 1}. In this section, we use τ2k and ι2k to denote τ2k and ιD 2k (see §2.7.2) if d = 0 ∆ ′ and we use them to denote τ2k and ι∆ 2k (see §2.7.3) if d = 1. For simplicity of exposition, we assume char(k) 6= 2 so that we do not need to distinguish between quadratic forms and orthogonal forms, although with more care one could include this case in some of the results. 4.1. Preliminaries. Let E be a vector space of dimension n and let V be an orthogonal space of dimension 2n + 2d + d′ (we assume d ≥ 0; some of the results below hold even if d < 0, but we will not need them). Let A = Sym(E ⊗ V ). Using the orthogonal form, we have a GL(E) × O(V )-equivariant inclusion Sym2 (E) ⊂ Sym2 (E) ⊗ Sym2 (V ) ⊂ Sym2 (E ⊗ V ). Let B = A/(Sym2 (E)) be the quotient of A by the ideal generated by Sym2 (E). Example 4.1.1. Let n = 2 and d = 0 and d′ = 1, and pick bases for E and V . We think of the coordinates in A as the elements in a 2 × 5 matrix:   x1,1 x1,2 x1,3 x1,4 x1,5 x2,1 x2,2 x2,3 x2,4 x2,5 24 STEVEN V SAM If the orthogonal form on V is given by ωV (v, w) = v1 w2 + v2 w1 + v3 w4 + v4 w3 + v5 w5 , then Sym2 (E) is spanned by the 3 equations x1,1 x2,2 + x1,2 x2,1 + x1,3 x2,4 + x1,4 x2,3 + x1,5 x2,5 , 2(x1,1 x1,2 + x1,3 x1,4 ) + x21,5 , 2(x2,1 x2,2 + x2,3 x2,4 ) + x22,5 .  We have Spec(A) = Hom(E, V ∗ ), the space of linear maps E → V ∗ . We can identify ϕ Spec(B) ⊂ Hom(E, V ∗ ) with the set of maps ϕ such that the composition E − → V∗ ∼ = ϕ∗ ∗ ∗ V −→ E is 0 (here V ∼ = V is the isomorphism induced by the orthogonal form on V ). Alternatively, Spec(B) is the subvariety of maps E → V ∗ such that the image of E is an isotropic subspace, i.e., the restriction of the orthogonal form to it is the 0 form. Proposition 4.1.2. (a) If 2d+d′ > 0, then B is an integral domain, i.e., the ideal generated by Sym2 (E) is prime. If 2d + d′ = 0, then Spec(B) has 2 irreducible components. (b) As a representation of GL(E) × O(V ), we have M B≈ Sλ (E) ⊗ S[λ] (V ). ℓ(λ)≤n (c) Sλ (E) ⊗ S[λ] (V ) is in the ideal generated by Sµ (E) ⊗ S[µ] (V ) if and only if λ ⊇ µ. (d) Two closed points in Spec(B) are in the same GL(E) × O(V ) orbit if and only if they have the same rank as a matrix. Each orbit closure is a normal variety with rational singularities. In particular, they are Cohen–Macaulay varieties. (e) The ideal (Sym2 (E)) is generated by a regular sequence. In particular, B is a complete intersection and is a Koszul algebra. Proof. For (a), (b), (d), and (e), see [SW, Theorems 2.7, 2.10]. (c) follows from the analogous statement for Sym(E ⊗ V ) [DEP, Corollary 4.2].  Let OGr(n + d, V ) be the isotropic Grassmannian of rank n + d isotropic subspaces of V with tautological subbundle R. Note that when 2d + d′ = 0, OGr(n + d, V ) has 2 connected components, and otherwise it is connected. Let ν ⊆ (k d ) be a partition. Using (2.6.2) in a relative situation, we get a Sym(E ⊗ R∗ )-module Mνk (E, R∗ ). Proposition 4.1.3. The higher sheaf cohomology groups of Mνk (E, R∗ ) vanish and M H0 (OGr(n + d, V ); Mνk (E, R∗ )) ≈ S(kn )+λ (E) ⊗ S[(kn )+λ,k−νd ,...,k−ν1] (V ). ℓ(λ)≤n Proof. Similar to Proposition 3.1.4, but use Theorem 2.5.5.  We define (4.1.4) Mkν = H0 (OGr(n + d, V ); Mνk (E, R∗ )) M ≈ S(kn )+λ (E) ⊗ S[((kn )+λ,k−νd ,...,k−ν1)] (V ). ℓ(λ)≤n So Mkν is an A-module. In fact, the scheme-theoretic image of Spec(Sym(E ⊗ R∗ )) → Spec(A) is Spec(B), so Mkν is also a B-module. The following result is the orthogonal version of the main result of this paper. A more detailed version of this theorem is contained in Theorem 4.3.1. ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 25 Theorem 4.1.5. Assume char(k) = 0. The minimal free resolution of Mkν over B is linear. Let Ve be a Z/2-graded space (from now on, superspace) with Ve0 = E ⊕ E ∗ and Ve1 = V . Define a nondegenerate symplectic form on E ⊕ E ∗ by h(e, ϕ), (e′ , ϕ′ )i = ϕ′ (e) − ϕ(e′ ). Then Ve has a super skew-symmetric bilinear form by taking the direct sum of the symplectic form on E ⊕ E ∗ and the orthogonal form on V . Let spo(Ve ) be the orthosymplectic Lie superalgebra in gl(Ve ) compatible with this form. We have a Z-grading on spo(Ve ) supported on [−2, 2] (we use the symbol ⊕ to separate the different pieces of this grading): Sym2 (E) ⊕ (E ⊗ V ) ⊕ (gl(E) × so(V )) ⊕ (E ∗ ⊗ V ∗ ) ⊕ Sym2 (E ∗ ). Let g be the positive part of this grading, i.e., g = (E ∗ ⊗ V ∗ ) ⊕ Sym2 (E ∗ ). Then Sym2 (E ∗ ) is central in g. For e⊗v, e′ ⊗v ′ ∈ E ∗ ⊗V ∗ , we have [e⊗v, e′ ⊗v ′ ] = ωV (v, v ′)ee′ where ωV is the orthogonal form on V ∗ ∼ = V . So Proposition 2.2.3 implies the following: Proposition 4.1.6. The Koszul dual of B is the universal enveloping algebra U(g). Let F ⊂ V be a maximal isotropic subspace and write V = F ⊕ F ∗ ⊕ L (dim(L) = d′ ). Let u = ((E ∗ |F ) ⊗ L) ⊕ Sym2 (E ∗ |F ) ⊂ spo(Ve ). It inherits a Z-grading: V u0 = (F ⊗ L) ⊕ 2 (F ), u1 = E ∗ ⊗ (L ⊕ F ), u2 = Sym2 (E ∗ ). Let g′ ⊂ osp(Ve ) be the subalgebra generated by u and g. Then it also has a Z-grading: V g′0 = (F ⊗ L) ⊕ 2 (F ), g′1 = E ∗ ⊗ V ∗ , g′2 = Sym2 (E ∗ ). Lemma 4.1.7. We have the following two exact sequences of Lie superalgebras V 0 → g → g′ → (F ⊗ L) ⊕ 2 (F ) → 0, 0 → u → g′ → E ∗ ⊗ F ∗ → 0. Proof. Similar to the proof of Lemma 3.1.8.  4.2. Howe duality. In this section, we assume that char(k) = 0. Let U be a 2k-dimensional orthogonal space. Then U ⊗ Ve is a superspace with even part U ⊗ (E ⊕ E ∗ ) and odd part U ⊗ V and has a super skew-symmetric bilinear form by taking the tensor product of the forms on U and Ve . Let spo(U ⊗ Ve ) be the associated orthosymplectic Lie superalgebra. Pick a maximal isotropic subspace U ′ ⊂ U. Let E ∗ |F denote the superspace with even part E ∗ and odd part F and let 0|L be the superspace with odd part L. Then (U ⊗ (E ∗ |F )) ⊕ (U ′ ⊗ (0|L)) is a maximal isotropic subspace of U ⊗ Ve and hence we get an oscillator representation V U = Sym(U ⊗ (E ∗ |F )) ⊗ • (U ′ ⊗ L) of spo(U ⊗ Ve ). Both so(U) and spo(Ve ) are subalgebras of spo(U ⊗ Ve ) which commute with one another, so so(U) × spo(Ve ) acts on U . As a representation of so(U), U is a direct sum of finite-dimensional representations, so we can use the pin group Pin(U) (this is a double cover of the orthogonal group O(U)) instead. If L = 0, i.e., d′ = 0, then the action of Pin(U) factors through an action of O(U). In fact, there is more data by using the non-connected group Pin(U) as we now explain. Pick a partition λ. 26 STEVEN V SAM • If d′ = 0, λ is admissible if λ†1 + λ†2 ≤ 2k and we consider representations S[λ] (U) of O(U). For λ†1 ≤ k, this is discussed in §2.3. Otherwise, set µ†1 = 2k − λ†1 and µ†i = λ†i for i > 1. Then S[µ] (V ) and S[λ] (V ) differ by a twist of the sign character and we write µ = λσ . Further, define λ = λ if λ†1 ≤ k, otherwise define λ = λσ . • If d′ = 1, λ is admissible if ℓ(λ) ≤ k and we consider highest-weight representations Vλ+δ± where δ+ and δ− are the half-spin weights of Spin(U) (see [SW, §3.1]). Define Vλ+δ = Vλ+δ+ ⊕ Vλ+δ− , which can be made into an irreducible representation of Pin(U). To unify the notation for both cases, we define ( S[λ] (U) if d′ = 0 Vλ+d′ δ = . Vλ+δ if d′ = 1 e k be the Vλ+d′ δ -isotypic Let λ be an admissible partition with λn+1 ≤ n + d. Let N λ component of U with respect to the action of Pin(U). We need some of the following facts about the action of Pin(U) ×spo(Ve ) (we will not use unitarizability, and hence do not define it; we state it only for completeness): e k is an irreducible, Theorem 4.2.1. For an admissible partition λ with λn+1 ≤ n + d, N λ e k′ if and only if ek ∼ N unitarizable, lowest-weight representation of spo(Ve ). We have N = λ λ λ = λ′ . As a representation of Pin(U) × spo(Ve ), we have a direct sum decomposition M V e k. Vλ+d′ δ ⊗ N U = Sym(U ⊗ (E ∗ |F )) ⊗ • (U ′ ⊗ L) = λ λ admissible λn+1 ≤n+d Proof. For d′ = 0, see [CW, §§5.3.4, 5.3.5] and for d′ = 1, see [CKW, §A.1].  e k which is a Z-graded representation with Note that gl(E) × so(V ) ⊂ spo(Ve ) acts on N λ finite-dimensional pieces and the action can be integrated to the group GL(E) × SO(V ). However, when dim(V ) is even, we may not be able to extend this action to GL(E) × O(V ). We now make an additional definition ( ek ⊕ N e kσ if d′ = 0 and ℓ(λ) < k N λ Nλk = eλk . Nλ otherwise Then the action of GL(E) × SO(V ) on Nλk extends to GL(E) × O(V ). Theorem 4.2.2. We have a gl(E) × gl(F )-equivariant isomorphism M U(u) Hi (u; Nλk ) = Tori (Nλk , k) ∼ Sα (E ∗ |F ) ⊗ (det E ∗ )k ⊗ (det F ∗ )k . = α τ2k (α)=λ ι2k (α)=i Proof. See [CKW, Theorem 5.7]. Their notation does not match ours, so alternatively one can use [SSW, §4] if d′ = 0 and [SS] if d′ = 1 (see proof of Theorem 3.2.2 for comments).  ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 27 Proposition 4.2.3. Let λ be a partition with ℓ(λ) ≤ k and λn+1 ≤ n + d and set ν = (λ†1 , . . . , λ†n+d ) and µ = (λ†n+d+1 , λ†n+d+2 , . . . ). Then H0 (g; Nλk ) = (det E ∗ )k ⊗ Sµ† (E ∗ ) ⊗ S[((n+d)×k)\ν] (V ) H1 (g; Nλk ) = (det E ∗ )k ⊗ S(1+νn+d ,µ2 ,µ3 ,... )† (E ∗ ) ⊗ S[(k−µ1 +1,k−νn+d−1,...,k−ν1)] (V ). In particular, as a U(g)-module, Nλk is generated in a single degree and has relations of degree λ†n+d − λ†n+d+1 + 1. Proof. Similar to the proof of Proposition 3.2.3. There is one point to highlight though: in Proposition 2.8.3, we see that when dim(V ) is even and λn+d > 0, that H0 (n; S[λ] (V )) is a sum of two irreducible representations of gl(F ). This does not happen in Proposition 3.2.3 and is accounted for by the fact that Nλk is defined to be a sum of two irreducible representations in these cases. Rather than chase signs, we note that the representations S[λ]± (V ) always come together in each homology group since there is an action of O(V ) on everything.  Proposition 4.2.4. If λ1 ≤ d and ℓ(λ) ≤ k, then Nλk has a linear free resolution over U(g). As a representation of GL(E) × O(V ), Hi (g; Nλk ) is a subrepresentation of M S(kn )+γ (E ∗ ) ⊗ S[((kn )+γ,k−λ† ,...,k−λ† )] (V ). d 1 |γ|=i ℓ(γ)≤n Proof. The proof of the first part is similar to the proof of Proposition 3.2.4. See also the comments in the proof of Proposition 4.2.3. The proof of the second part is similar to the proof of Corollary 3.2.6. As an intermediate step, we need to prove an analogue of Lemma 3.2.5. This is almost the same, but the inequality (3.2.5.1) is replaced by ι2k (α) ≥ P D j≥1 max(αj − d − j, 0) since the definition of ι2k uses c(Rλ ) − 1 rather than c(Rλ ) (§2.7.2). This weaker inequality is the one that is used in (3.2.5.3), so there is no problem.  4.3. Main result and consequences. We assume that char(k) = 0 in this section. The definition of parabolic Verma modules is the same as in §3.3. Theorem 4.3.1. Let λ be a partition with ℓ(λ) ≤ k and λn+1 ≤ n + d. Set ν = (λ†1 , . . . , λ†n+d) and µ = (λ†n+d+1 , λ†n+d+2 , . . . ). Then: (a) λ†n+d = λ†n+d+1 if and only if Nλk has a linear presentation as a U(g)-module. (b) If λ†n+d = λ†n+d+1 , L(Nλk ) (notation of §2.2) is the first linear strand of a B-module M with a compatible GL(E) × O(V )-action and which is uniquely determined by the fact that it is generated in degree 0 with degree 1 relations, and satisfies M0 = (det E)k ⊗ Sµ† (E) ⊗ S[((n+d)×k)\ν] (V ), M1 = (det E)k ⊗ S(µ1 +1,µ2 ,µ3 ,... )† (E) ⊗ S[(k+1−νn+d ,k−νn+d−1,...,k−ν1)] (V ). If furthermore λ1 ≤ d, then M ∼ = Mkλ† , and: (c) L(Nλk ) is an acyclic linear complex and is a minimal free resolution of Mkλ† over B, (d) R(Mkλ† ) is an acyclic linear complex and is a minimal free resolution of Nλk over U(g). The action of g on this complex extends to an action of spo(Ve ) and each R(Mkλ† )i is a direct sum of parabolic Verma modules. Proof. Similar to the proof of Theorem 3.3.2.  28 STEVEN V SAM Conjecture 4.3.2. Let Iλ be the ideal generated by Sλ (E)⊗S[λ] (V ) in B. Then the resolution of Iλ is a representation of spo(Ve ). Furthermore, each linear strand is irreducible if dim(V ) is odd and otherwise is a sum of 2 irreducible representations which are interchanged by the outer automorphism of spo(Ve ) (this is related to the conjugation action of O(V ) on SO(V )). Now we derive a few consequences of Theorem 4.3.1. First, we begin with an alternative construction of Mkν . Consider OGr(n, V ) with vector bundles η = E ⊗ R∗ , and Vνk = (det E)k ⊗ (det R∗ )k ⊗ S[(d×k)\ν] (R⊥ /R). Proposition 4.3.3. Mkν = H0 (IGr(n, V ); Sym(η) ⊗ Vνk ). Proof. Similar to the proof of Proposition 3.3.4.  Define the following vector bundle on OGr(n, V ): Eλν = Sλ (R⊥ ) ⊗ (det R∗ )k ⊗ S[(d×k)\ν] (R⊥ /R). Corollary 4.3.4. Let Fν• be the minimal free resolution of Mkν over A. We have M M S(kn )+λ (E) ⊗ Eλν† ) ⊗ A(−i − j). Fνi = Hj (OGr(n, V ); j≥0 |λ|=i+j λ⊆n×(n+2d+d′ ) Proof. Similar to the proof of Corollary 3.3.5.  Theorem 4.3.5. Let ν ⊆ (k d ) and λ ⊆ n × (n + 2d + d′ ) be partitions and let R be the tautological subbundle on OGr(n, V ). (a) If k ≥ ℓ(λ), then Hi (OGr(n, V ); Eλν† ) = 0 for all i > 0. (b) The cohomology of Eλν† vanishes unless τ2k (λ) = µ is defined, in which case the cohomology is nonzero only in degree ι2k (λ) = i, and we have an O(V )-equivariant isomorphism Hi (OGr(n, V ); E ν† ) ∼ = H0 (OGr(n, V ); E ν† ). λ µ Proof. Similar to the proof of Theorem 3.3.6.  Remark 4.3.6. As in §4.1, we interpret A as the coordinate ring of the space of linear maps E → V ∗ and hence it makes sense to talk about the generic map with respect to A, i.e., picking bases for E and V ∗ , the matrix entries are the variables of A. Similar comments apply to B. The ideal minors in B of this generic matrix is generated by V V of maximal V n (E) ⊗ S[1n ] (V ) = n (E) ⊗ n (V ). When ν = (k d ), (4.1.4) becomes M Sλ (E) ⊗ S[λ] (V ), Mk(kd ) = λ, λn ≥k which is the kth power of the maximal minors in B (use Proposition 4.1.2(c)).  Corollary 4.3.7. Pick ν ⊆ (k d ). If k ≥ n, then the minimal free resolution of Mkν over A is linear. Proof. Combine Corollary 4.3.4 and Theorem 4.3.5(a).  Proposition 4.3.8. Choose a partition ν ⊆ (k d ). The support variety of Mkν is reduced and is the variety of symmetric matrices in Sym2 (E) of rank ≤ 2k. Proof. Similar to the proof of Proposition 3.3.9.  ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 29 Remark 4.3.9. When d = 0, the line bundle det R∗ on OGr(n, V ) has a unique square root L, so it is possible to take powers (det R∗ )k where k ∈ 21 Z, and we can define V k = V∅k . The results of this section should mostly hold without change, but the full details of some of the results we cite are not written down when k ∈ / Z, so we omit explaining this case in detail. The modules we get this way are submodules of the “Littlewood spinor module” studied in [SW, §3], and can be thought of as half-integer powers of the ideal of maximal minors.  5. Variety of complexes A In this section, we use τ2k and ι2k to mean τ2k and ιA 2k (see §2.7.4). Given a vector space V and partitions λ, µ with ℓ(λ) + ℓ(µ) ≤ dim(V ), let S[λ;µ] (V ) denote Sν (V ) where ν = (λ1 , λ2 , . . . , −µ2 , −µ1 ) (if ℓ(λ) + ℓ(µ) < dim(V ), there are 0’s in the . . . ). 5.1. Preliminaries. Let E and F be vector spaces of dimensions n and m and let V be a vector space of dimension n + m + d (we assume d ≥ 0; some of the results below hold even if d < 0, but we will not need them). Let A = Sym((E ⊗ V ∗ ) ⊕ (V ⊗ F ∗ )). Throughout, we fix a decomposition dim(V ) = a + b where a ≥ n and b ≥ m. Using the trace invariant in V ∗ ⊗ V , we have a GL(E) × GL(V ) × GL(F )-equivariant inclusion E ⊗ F ⊂ (E ⊗ V ∗ ) ⊗ (V ⊗ F ∗ ) ⊂ Sym2 ((E ⊗ V ∗ ) ⊕ (V ⊗ F ∗ )). Let B = A/(E ⊗ F ∗ ) be the quotient of A by the ideal generated by E ⊗ F ∗ . We have Spec(A) = Hom(E, V )×Hom(V, F ), and we can identify Spec(B) ⊂ Hom(E, V )× Hom(V, F ) with the set of pairs (ϕ, ψ) such that ψϕ = 0. Proposition 5.1.1. (a) B is an integral domain, i.e., the ideal generated by E⊗F ∗ is prime. (b) As a representation of GL(E) × GL(V ) × GL(F ), we have M Sλ (E) ⊗ S[λ;λ′ ] (V ∗ ) ⊗ Sλ′ (F ∗ ). B≈ ℓ(λ)≤n ℓ(λ′ )≤m (c) Sλ (E) ⊗ S[λ;λ′ ] (V ∗ ) ⊗ Sλ′ (F ∗ ) is in the ideal generated by Sµ (E) ⊗ S[µ;µ′ ] (V ∗ ) ⊗ Sµ′ (F ∗ ) if and only if λ ⊇ µ. (d) Two closed points (ϕ, ψ) and (ϕ′ , ψ ′ ) in Spec(B) are in the same GL(E) × GL(V ) × GL(F ) orbit if and only if rank(ϕ) = rank(ϕ′ ) and rank(ψ) = rank(ψ ′ ). Each orbit closure is a normal variety with rational singularities. In particular, they are Cohen– Macaulay varieties. (e) The ideal (E ⊗ F ∗ ) is generated by a regular sequence. In particular, B is a complete intersection and is a Koszul algebra. Proof. The proofs of (a), (b), (d), and (e) are similar to the proofs of the corresponding statements in Proposition 3.1.2. The desingularization in [SW] should be replaced with the bundle η on X mentioned directly below. The reader is also encouraged to see [DS] for the general situation of complexes with more than 2 maps. (c) follows from the analogous  statement for A [DEP, Corollary 4.2]. Remark 5.1.2. Part (e) of Proposition 5.1.1 also holds if dim(V ) = dim(E) + dim(F ) − 1. One difference is that it has 2 irreducible components whose general points are pairs (ϕ, ψ) where either ϕ or ψ has full rank and the other has corank 1.  30 STEVEN V SAM Let X = Flag(n, n + d, V ) be the partial flag variety of subspaces Rn ⊂ Rn+d ⊂ V where the subscript indicates the dimension. It has a tautological flag of vector bundles Rn ⊂ Rn+d ⊂ V × X. Set η = (E ⊗ R∗n ) ⊕ ((V /Rn+d ) ⊗ F ∗ ). Pick k, ℓ ≥ 0 and partitions ν ⊆ (k a ), ν ′ ⊆ (ℓb ). Set ν = (k − νa , . . . , k − ν1 , ν1′ − ℓ, . . . , νb′ − ℓ). Define k,ℓ k ∗ k ∗ ℓ ∗ ℓ Vν,ν ′ = (det E) ⊗ (det Rn ) ⊗ Sν ((Rn+d /Rn ) ) ⊗ (det V /Rn+d ) ⊗ (det F ) . k,ℓ Proposition 5.1.3. The higher sheaf cohomology groups of Sym(η) ⊗ Vν,ν ′ vanish and M k,ℓ S(kn )+λ (E) ⊗ S((kn )+λ,ν,−ℓ−µm ,...,−ℓ−µ1 ) (V ∗ ) ⊗ S(ℓm )+µ (F ∗ ). H0 (X; Sym(η) ⊗ Vν,ν ′) ≈ ℓ(λ)≤n ℓ(µ)≤m Proof. Similar to Proposition 3.1.4, but use Theorem 2.5.3.  We define (5.1.4) k,ℓ 0 Mk,ℓ ν,ν ′ = H (Flag(n, n + d, V ); Sym(η) ⊗ Vν,ν ′ ) M ≈ S(kn )+λ (E) ⊗ S((kn )+λ,ν,−ℓ−µm ,...,−ℓ−µ1 ) (V ∗ ) ⊗ S(ℓm )+µ (F ∗ ). ℓ(λ)≤n ℓ(µ)≤m So Mk,ℓ ν,ν ′ is an A-module. In fact, the scheme-theoretic image of Spec(Sym(η)) → Spec(A) is Spec(B), so Mk,ℓ ν,ν ′ is also a B-module. The following result is the variety of complexes version of the main result of this paper. A more detailed version of this theorem is contained in Theorem 5.3.1. Theorem 5.1.5. Assume char(k) = 0. The minimal free resolution of Mk,ℓ ν,ν ′ over B is linear. Let Ve be a Z/2-graded space (from now on, superspace) with Ve0 = E ⊕ F and Ve1 = V . We have a Z-grading on gl(Ve ) supported on [−2, 2] (we use the symbol ⊕ to separate the different pieces of this grading): (E ⊗ F ∗ ) ⊕ (E ⊗ V ∗ + V ⊗ F ∗ ) ⊕ (gl(E) × gl(V ) × gl(F )) ⊕ (E ∗ ⊗ V + V ∗ ⊗ F ) ⊕ (E ∗ ⊗ F ). Let g be the positive part of this grading, i.e., g = (E ∗ ⊗ V + V ∗ ⊗ F ) ⊕ (E ∗ ⊗ F ). Then E ∗ ⊗ F is central in g. For (e ⊗ v, ϕ ⊗ f ), (e′ ⊗ v ′ , ϕ′ ⊗ f ′ ) ∈ E ∗ ⊗ V + V ∗ ⊗ F , we have [(e ⊗ v, ϕ ⊗ f ), (e′ ⊗ v ′ , ϕ′ ⊗ f ′ )] = ϕ′ (v)e ⊗ f ′ + ϕ(v ′ )e′ ⊗ f. So Proposition 2.2.3 implies the following: Proposition 5.1.6. The Koszul dual of B is the universal enveloping algebra U(g). Choose a decomposition V = V a ⊕ V b where dim(V a ) = a and dim(V b ) = b (recall that a ≥ n and b ≥ m). Let u = (E|V a )∗ ⊗ (F |V b ) ⊂ gl(Ve ). It inherits a Z-grading: u0 = V a∗ ⊗ V b , u1 = (E ∗ ⊗ V b ) ⊕ (V a∗ ⊗ F ), u2 = E ∗ ⊗ F. Let g′ ⊂ gl(Ve ) be the subalgebra generated by u and g. Then it also has a Z-grading: g′0 = V a∗ ⊗ V b , g′1 = (E ∗ ⊗ V ) ⊕ (V ∗ ⊗ F ), g′2 = E ∗ ⊗ F. ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 31 Lemma 5.1.7. We have the following two exact sequences of Lie superalgebras 0 → g → g′ → V a∗ ⊗ V b → 0, ∗ 0 → u → g′ → (E ∗ ⊗ V a ) ⊕ (V b ⊗ F ) → 0. Proof. Similar to the proof of Lemma 3.1.8.  5.2. Howe duality. In this section, we assume that char(k) = 0. Let U be a (k + ℓ)-dimensional vector space. Then GL(U) × gl(Ve ) acts on the space U = Sym(((E|V a )∗ ⊗ U ∗ ) ⊕ (U ⊗ (F |V b ))) extending the obvious action of GL(U) × gl(E|V a ) × gl(F |V b ) [CLZ, §3.1]. Let λ, λ′ be partitions with ℓ(λ) + ℓ(λ′ ) ≤ k + ℓ and such that λm+1 ≤ b and λ′n+1 ≤ a. k,ℓ Let Nλ,λ ′ be the S[λ;λ′ ] (U)-isotypic component of U with respect to the action of GL(U). We need some of the following facts about the action of GL(U) × gl(Ve ) (we will not use unitarizability, and hence do not define it; we state it only for completeness): Theorem 5.2.1. Let λ, λ′ be partitions with ℓ(λ) + ℓ(λ′ ) ≤ k + ℓ such that λm+1 ≤ b k,ℓ and λ′n+1 ≤ a. Then Nλ,λ ′ is an irreducible, unitarizable, lowest-weight representation of k,ℓ k,ℓ ′ ′ ∼ gl(Ve ). We have Nλ,λ′ = Nµ,µ ′ if and only if λ = µ and λ = µ . As a representation of GL(U) × gl(Ve ), we have a direct sum decomposition M k,ℓ S[λ;λ′ ] (U) ⊗ Nλ,λ U = Sym(((E|V a )∗ ⊗ U ∗ ) ⊕ (U ⊗ (F |V b ))) = ′. ℓ(λ)+ℓ(λ′ )≤k+ℓ λm+1 ≤b λ′n+1 ≤a Proof. See [CLZ, Theorem 3.3].  Theorem 5.2.2. We have a gl(E) × gl(V a ) × gl(V b ) × gl(F )-equivariant isomorphism M U(u) k,ℓ k,ℓ ∼ Sα′ ((E|V a )∗ ) ⊗ Sα (F |V b ) ⊗ L Hi (u; Nλ,λ (Nλ,λ ′ , k) = ′ ) = Tori (α,α′ ) τk+ℓ (α,α′ )=(λ,λ′ ) ιk+ℓ (α,α′ )=i ∗ where L = (det E ∗ )k ⊗ (det V a )k ⊗ (det V b )ℓ ⊗ (det F )ℓ . Proof. See [CKW, Theorem 5.7]. Their notation does not match ours, so alternatively one can use [SSW, §5] (see proof of Theorem 3.2.2 for comments). The choice of L is not k,ℓ e unique: one can twist the action of gl(Ve ) on Nλ,λ ′ by the supertrace character det V = (det E) ⊗ (det V a )∗ ⊗ (det V b )∗ ⊗ (det F ) which does not affect any of its essential properties;  [CKW] uses L ⊗ (det Ve )−ℓ instead of L. Proposition 5.2.3. Let λ, λ′ be partitions such that ℓ(λ) + ℓ(λ′ ) ≤ k + ℓ, λm+1 ≤ b, and λ′n+1 ≤ a. Set ν = (λ†1 , . . . , λ†b ) and µ = (λ†b+1 , λ†b+2 , . . . ) and similarly, set ν ′ = (λ′ †1 , . . . , λ′†a ) and µ = (λ′ †a+1 , λ′ †a+2 , . . . ). Then k,ℓ ∗ ℓ ∗ k H0 (g; Nλ,λ ′ ) = (det E ) ⊗ Sµ′ † (E ) ⊗ (det F ) ⊗ Sµ† (F ) ⊗ S[(k a )\ν ′ ;(ℓb )\ν] (V ) k,ℓ ∗ k ∗ ℓ ′ H1 (g; Nλ,λ b (V ) ′ ) = (det E ) ⊗ S(ν ′ +1,µ′ ,µ′ ,... )† (E ) ⊗ (det F ) ⊗ Sµ† (F ) ⊗ S[(k−µ′ +1,k−ν ′ a 2 3 1 a−1 ,...,k−ν1 );(ℓ )\ν] ⊕(det E ∗ )k ⊗ Sµ′ † (E ∗ ) ⊗ (det F )ℓ ⊗ S(νb ,µ2 ,µ3 ,... )† (F ) ⊗ S[(ka )\ν ′ ;ℓ−µ1 +1,ℓ−νb−1 ,...,ℓ−ν1 ] (V ). 32 STEVEN V SAM k,ℓ In particular, as a U(g)-module, Nλ,λ ′ is generated in a single degree and has relations of † † degree λb − λb+1 + 1 and relations of degree λ′ †a − λ′ †a+1 + 1. Proof. Similar to the proof of Proposition 3.2.3.  Proposition 5.2.4. Let λ, λ′ be partitions such that ℓ(λ) + ℓ(λ′ ) ≤ k + ℓ and λ′1 ≤ a − n k,ℓ and λ1 ≤ b − m. Then Nλ,λ ′ has a linear free resolution over U(g). As a representation of k,ℓ GL(E) × GL(V ) × GL(F ), Hi (g; Nλ,λ ′ ) is a subrepresentation of M S(kn )+γ ′ (E ∗ ) ⊗ S[((kn )+γ ′ ,k−λ′ † ,...,k−λ′ † );((ℓm )+γ,ℓ−λ† ,...,ℓ−λ† )] (V ) ⊗ S(ℓm )+γ (F ). |γ|+|γ ′ |=i ℓ(γ)≤m ℓ(γ ′ )≤n a−n 1 b−m 1 Proof. The proof of the first part is similar to the proof of Proposition 3.2.4. See also the comments in the proof of Proposition 5.2.3. The proof of the second part is similar to the  proof of Corollary 3.2.6. 5.3. Main result and consequences. We assume that char(k) = 0 in this section. The definition of parabolic Verma modules is the same as in §3.3. Theorem 5.3.1. Let λ, λ′ be partitions with ℓ(λ)+ℓ(λ′ ) ≤ k +ℓ and λm+1 ≤ b and λ′n+1 ≤ a. Set ν = (λ†1 , . . . , λ†b ), µ = (λ†b+1 , λ†b+2 , . . . ), ν ′ = (λ′ †1 , . . . , λ′ †a ), and µ′ = (λ′ †a+1 , λ′ †a+2 , . . . ). Then: k,ℓ (a) λ†b = λ†b+1 and λ′ †a = λ′ †a+1 if and only if Nλ,λ ′ has a linear presentation as a U(g)-module. † † k,ℓ ′† ′† (b) If λb = λb+1 and λ a = λ a+1 , then L(Nλ,λ′ ) (notation of §2.2) is the first linear strand of a B-module M with a compatible GL(E) × GL(V ) × GL(F )-action and which is uniquely determined by the fact that it is generated in degree 0 with degree 1 relations, and satisfies M0 = (det E)k ⊗ Sµ′ † (E) ⊗ (det F ∗ )ℓ ⊗ Sµ† (F ∗ ) ⊗ S[(ka )\ν ′ ;(ℓb )\ν] (V ∗ ), ∗ ′ M1 = ((det E)k ⊗ S(νa′ +1,µ′2 ,µ′3 ,... )† (E) ⊗ (det F ∗ )ℓ ⊗ Sµ† (F ∗ ) ⊗ S[(k−µ′1 +1,k−νa−1 ,...,k−ν1′ );(ℓb )\ν] (V )) ⊕((det E)k ⊗ Sµ′ † (E) ⊗ (det F ∗ )ℓ ⊗ S(νb +1,µ2 ,µ3 ,... )† (F ∗ ) ⊗ S[(ka )\ν ′ ;ℓ−µ1 +1,ℓ−νb−1 ,...,ℓ−ν1] (V ∗ )). k,ℓ If furthermore λ′1 ≤ a − n and λ1 ≤ b − m, then M ∼ = Mλ′ † ,λ† , and: k,ℓ k,ℓ (c) L(Nλ,λ ′ ) is an acyclic linear complex and is a minimal free resolution of M ′ † † over B, λ ,λ k,ℓ (d) R(Mk,ℓ ) is an acyclic linear complex and is a minimal free resolution of Nλ,λ ′ over λ′ † ,λ† U(g). The action of g on this complex extends to an action of gl(Ve ) and each R(Mk,ℓ′† † )i is a direct sum of parabolic Verma modules. λ ,λ Proof. Similar to the proof of Theorem 3.3.2.  Conjecture 5.3.2. Let Iλ,λ′ be the ideal generated by Sλ (E) ⊗ S[λ;λ′ ] (V ∗ ) ⊗ Sλ′ (F ∗ ) in B. Then the resolution of Iλ,λ′ is a representation of gl(Ve ) and each linear strand is irreducible. We now derive a few consequences of Theorem 5.3.1. Recall that ν = (k − νa , . . . , k − ν1 , ν1′ − ℓ, . . . , νb′ − ℓ). Define ′ ν,ν ∗ ℓ ∗ ∗ k Eλ,λ ′ = (det Rn ) ⊗ Sν ((Rn+d /R) ) ⊗ (det V /Rn+d ) ⊗ Sλ† ((V /Rn ) ) ⊗ Sλ′ † (Rn+d ). ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS 33 Proposition 5.3.3. Let Fν,ν be the minimal free resolution of Mk,ℓ • ν,ν ′ over A. We have M M ′ ′ ∗ m ′ = Hj (Flag(n, n + d, V ); Fν,ν S(kn )+λ (E) ⊗ Eλν,ν † ,λ′ † ⊗ S(ℓ )+λ (F )) ⊗ A(−i − j). i ′ |λ|+|λ′ |=i+j λ⊆n×(m+d) λ′ ⊆m×(n+d) j≥0 Proof. Similar to the proof of Corollary 3.3.5. In the notation of §2.4, we have ε = ((E ⊗ V ∗ ) ⊕ (V ⊗ F ∗ )) ⊗ OFlag(n,n+d,V ) and ξ = (E ⊗ (V /Rn )∗ ) ⊕ (Rn+d ⊗ F ∗ ).  Theorem 5.3.4. Let ν ⊆ (k a ) and ν ′ ⊆ (ℓb ) be partitions. Also pick partitions λ ⊆ n×(m+d) and λ′ ⊆ m × (n + d). Let Rn ⊂ Rn+d be the tautological flag on Flag(n, n + d, V ). ′ (a) If k + ℓ ≥ ℓ(λ) + ℓ(λ′ ) − 1, then Hi (Flag(n, n + d, V ); Eλν,ν † ,λ′ † ) = 0 for i > 0. ′ ′ ′ (b) The cohomology of Eλν,ν † ,λ′ † vanishes unless τk+ℓ (λ, λ ) = (µ, µ ) is defined, in which case the cohomology is nonzero only in degree ιk+ℓ (λ, λ′ ) = i, and we have a GL(V )-equivariant isomorphism ′ ν,ν ′ Hi (Flag(n, n + d, V ); E ν,ν † ) ∼ = H0 (Flag(n, n + d, V ); E † ). λ† ,λ′ µ† ,µ′ Remark 5.3.5. As in §5.1, we interpret A as the coordinate ring of the space of pairs of linear maps E → V and V → F and hence it makes sense to talk about the generic map with respect to A, i.e., picking bases for E, V, F , the matrix entries are the variables of A. Similar comments apply to B. When ν = (k a ) and ν ′ = (ℓb ), (5.1.4) becomes M Sλ (E) ⊗ S[λ;λ′ ] (V ∗ ) ⊗ Sλ′ (F ∗ ), Mk,ℓ = a b (k ),(ℓ ) λ,λ′ λn ≥k λ′m ≥ℓ which is the product of the kth power of the maximal minors of E → V in B with the ℓth  power of the maximal minors of V → F (use Proposition 5.1.1(c)). Corollary 5.3.6. Pick ν ⊆ (k a−n ) and ν ′ ⊆ (ℓb−m ). If k + ℓ ≥ n + m − 1, then the minimal free resolution of Mk,ℓ ν,ν ′ is linear over A. Proof. Combine Proposition 5.3.3 and Theorem 5.3.4(a).  Proposition 5.3.7. Choose partitions ν ⊆ (k a−n ) and ν ′ ⊆ (ℓb−m ). The support variety of Mk,ℓ ν,ν ′ is reduced and is the variety of matrices in Hom(E, F ) of rank ≤ k + ℓ. Proof. Similar to the proof of Proposition 3.3.9.  References [ABW] Kaan Akin, David A. Buchsbaum, Jerzy Weyman, Resolutions of determinantal ideals: the submaximal minors, Adv. in Math. 39 (1981), no. 1, 1–30. [AW1] Kaan Akin, Jerzy Weyman, Minimal free resolutions of determinantal ideals and irreducible representations of the Lie superalgebra gl(m|n), J. Algebra 197 (1997), no. 2, 559–583. [AW2] Kaan Akin, Jerzy Weyman, The irreducible tensor representations of gl(m|1) and their generic homology, J. Algebra 230 (2000), no. 1, 5–23. [AW3] Kaan Akin, Jerzy Weyman, Primary ideals associated to the linear strands of Lascoux’s resolution and syzygies of the corresponding irreducible representations of the Lie superalgebra gl(m|n), J. Algebra 310 (2007), no. 2, 461–490. [Av] L. L. Avramov, Modules of finite virtual projective dimension, Invent. Math. 96 (1989), no. 1, 71–101. 34 [AB] [BGS] [Bo] [BEH] [Ch] [CKL] [CKW] [CLZ] [CW] [DEP] [DS] [EN] [Ei1] [Ei2] [Ei3] [FH] [GLP] [H] [Ja] [JPW] [Ka] [Ke] [L] [M] [N] [PW] [S1] STEVEN V SAM Luchezar L. Avramov, Ragnar-Olaf Buchweitz, Support varieties and cohomology over complete intersections, Invent. Math. 142 (2000), no. 2, 285–318. Alexander Beilinson, Victor Ginzburg, Wolfgang Soergel, Koszul duality patterns in representation theory, J. Amer. Math. Soc. 9 (1996), no. 2, 473–527. Giandomenico Boffi, The universal form of the Littlewood–Richardson rule, Adv. in Math. 68 (1988), no. 1, 40–63. Ragnar-Olaf Buchweitz, David Eisenbud, Jürgen Herzog, Cohen-Macaulay modules on quadrics, Singularities, representation of algebras, and vector bundles (Lambrecht, 1985), 58–116, Lecture Notes in Math. 1273, Springer, Berlin, 1987. Marc Chardin, Powers of ideals: Betti numbers, cohomology and regularity, Commutative algebra, 317–333, Springer, New York, 2013. Shun-Jen Cheng, Jae-Hoon Kwon, Ngau Lam, A BGG-type resolution for tensor modules over general linear superalgebra, Lett. Math. Phys. 84 (2008), no. 1, 75–87, arXiv:0801.0914v2. Shun-Jen Cheng, Jae-Hoon Kwon, Weiqiang Wang, Kostant homology formulas for oscillator modules of Lie superalgebras, Adv. Math. 224 (2010), no. 4, 1548–1588, arXiv:0901.0247v2. Shun-Jen Cheng, Ngau Lam, R. B. Zhang, Character formula for infinite dimensional unitarizable modules of the general linear superalgebra, J. Algebra 273 (2004), 780–805, arXiv:math/0301183v1. Shun-Jen Cheng, Weiqiang Wang, Dualities and Representations of Lie Superalgebras, Graduate Studies in Mathematics 144, American Mathematical Society, Providence, RI, 2012. C. De Concini, David Eisenbud, C. Procesi, Young diagrams and determinantal varieties, Invent. Math. 56 (1980), no. 2, 129–165. Corrado De Concini, Elisabetta Strickland, On the variety of complexes, Adv. in Math. 41 (1981), no. 1, 57–77. J. A. Eagon, D. G. Northcott, Ideals defined by matrices and a certain complex associated with them, Proc. Roy. Soc. Ser. A 269 (1962), 188–204. David Eisenbud, Homological algebra on a complete intersection, with an application to group representations, Trans. Amer. Math. Soc. 260 (1980), no. 1, 35–64. David Eisenbud, Commutative Algebra with a View Toward Algebraic Geometry, Graduate Texts in Mathematics 150, Springer-Verlag, 1995. David Eisenbud, The Geometry of Syzygies. A second course in commutative algebra and algebraic geometry, Graduate Texts in Mathematics 229, Springer-Verlag, New York, 2005. William Fulton, Joe Harris, Representation Theory: A First Course, Graduate Texts in Mathematics 129, Springer-Verlag, New York, 1991. L. Gruson, R. Lazarsfeld, C. Peskine, On a theorem of Castelnuovo, and the equations defining space curves, Invent. Math. 72 (1983), no. 3, 491–506. Roger Howe, Perspectives on invariant theory: Schur duality, multiplicity-free actions and beyond, Israel Mathematical Conference Proceedings 8, 1995. Jens Carsten Jantzen, Representations of Algebraic Groups, second edition, Mathematical Surveys and Monographs 107, American Mathematical Society, Providence, RI, 2003. T. Józefiak, P. Pragacz, J. Weyman, Resolutions of determinantal varieties and tensor complexes associated with symmetric and antisymmetric matrices, Young tableaux and Schur functors in algebra and geometry (Toruń, 1980), 109–189, Astérisque, 87-88, Soc. Math. France, Paris, 1981. V. G. Kac, Some remarks on nilpotent orbits, J. Algebra 64 (1980), no. 1, 190–213. George Kempf, On the geometry of a theorem of Riemann, Ann. of Math. (2) 98 (1973), 178–185. Stephen Lovett, Resolutions of orthogonal and symplectic analogues of determinantal ideals, J. Algebra 311 (2007), no. 1, 282–298. I. G. Macdonald, Symmetric Functions and Hall Polynomials, second edition, Oxford Mathematical Monographs, Oxford, 1995. D. G. Northcott, Finite Free Resolutions, Cambridge Tracts in Mathematics 71, Cambridge University Press, Cambridge-New York-Melbourne, 1976. Piotr Pragacz, Jerzy Weyman, Complexes associated with trace and evaluation. Another approach to Lascoux’s resolution, Adv. in Math. 57 (1985), no. 2, 163–207. Steven V Sam, Schubert complexes and degeneracy loci, J. Algebra 337 (2011), 103–125, arXiv:1006.5514v2. ORTHOSYMPLECTIC LIE SUPERALGEBRAS AND COMPLETE INTERSECTIONS [S2] 35 Steven V Sam, Symmetric quivers, invariant theory, and saturation theorems for the classical groups, Adv. Math. 229 (2012), no. 2, 1104–1135, arXiv:1009.3040v2. [S3] Steven V Sam, Derived supersymmetries of determinantal varieties, J. Commut. Algebra 6 (2014), no. 2, 261–286, arXiv:1207.3309v1. [S4] Steven V Sam, Homology of analogues of Heisenberg Lie algebras, Math. Res. Lett. 22 (2015), no. 4, 1223–1241, arXiv:1307.1901v1. [S5] Steven V Sam, Supplement to Orthosymplectic Lie superalgebras, Koszul duality, and a complete intersection analogue of the Eagon–Northcott complex, available as ancillary file at http://arxiv.org/abs/1312.2255. [SS] Steven V Sam, Andrew Snowden, Infinite rank spinor and oscillator representations, arXiv:1604.06368v1. [SSW] Steven V Sam, Andrew Snowden, Jerzy Weyman, Homology of Littlewood complexes, Selecta Math. (N.S.) 19 (2013), no. 3, 655–698, arXiv:1209.3509v2. [SW] Steven V Sam, Jerzy Weyman, Littlewood complexes and analogues of determinantal varieties, Int. Math. Res. Not. (IMRN), no. 13, 4663–4707, arXiv:1303.0546v3. [St] John R. Stembridge, Multiplicity-free products and restrictions of Weyl characters, Represent. Theory 7 (2003), 404–439. [Wei] Charles A. Weibel, An Introduction to Homological Algebra, Cambridge Studies in Advanced Mathematics 38, Cambridge University Press, Cambridge, 1994. [Wey] Jerzy Weyman, Cohomology of Vector Bundles and Syzygies, Cambridge Tracts in Mathematics 149, Cambridge University Press, Cambridge, 2003. Department of Mathematics, University of California, Berkeley Current address: Department of Mathematics, University of Wisconsin, Madison E-mail address: [email protected] URL: http://math.wisc.edu/~svs/
0math.AC
Hyperplane Sections, Gröbner Bases, and Hough Transforms Lorenzo Robbiano arXiv:1305.0478v2 [math.AC] 23 Jun 2014 Dipartimento di Matematica, Università di Genova, Via Dodecaneso 35, I-16146 Genova, Italy Abstract Along the lines of [6] and [8], the purpose of this paper is twofold. In the first part we concentrate on hyperplane sections of algebraic schemes, and present results for determining when Gröbner bases pass to the quotient and when they can be lifted. The main difficulty to overcome is the fact that we deal with non-homogeneous ideals. As a by-product we hint at a promising technique for computing implicitization efficiently. In the second part of the paper we deal with families of algebraic schemes and the Hough transforms, in particular we compute their dimension, and show that in some interesting cases it is zero. Then we concentrate on their hyperplane sections. Some results and examples hint at the possibility of reconstructing external and internal surfaces of human organs from the parallel cross-sections obtained by tomography. Keywords: Hyperplane Section, Gröbner basis, Family of schemes, Hough transform. 2010 MSC: 13P25, 13P10, 14D06 these days, even the most pure and abstract mathematics is in danger to be applied (Anonymous) Introduction About 50 years ago the technique of Hough Transforms (HT for short) was introduced with the purpose of recognizing special curves inside images (see [2]); it has subsequently become widely used and generalized in many ways, notwithstanding the fact that its range of application is rather limited. An extension was presented in [6] where the HT was introduced in the wider context of families of algebraic schemes. This paved the way to detecting more complicated objects, and offered the prospect of using algebraic geometry to help other scientists, in particular doctors, in the challenge of recognizing and reconstructing images from various types of tomography. In this paper we commence our investigation by considering hyperplane sections. It is wellknown how to use the DegRevLex term ordering to relate Gröbner bases of a homogenous ideal to Gröbner bases of its quotient modulo a linear form (see Proposition 1.3). However, that result Email address: [email protected] (Lorenzo Robbiano) Preprint submitted to Elsevier April 11, 2018 makes essential use of the homogeneity. Since we have in mind “inhomogeneous applications" we develop a theory which works in the inhomogenous case. We prove Theorem 1.7 which shows how Gröbner bases pass to the quotient, and Theorem 1.10 which establishes a criterion for lifting Gröbner bases. A consequence of this result is Theorem 1.18 which describes a class of instances where good liftings of Gröbner bases can be obtained. A confirmation of its usefulness comes from some preliminary experiments on computing implicitizations (see Example 1.21). The second section concentrates on families of schemes and Hough transforms. Given a family of algebraic schemes, there is a non-empty Zariski open set over which the universal reduced σ-Gröbner basis G specializes to the reduced σ-Gröbner basis of the fibers, hence we get a parametrization of the fibers via the non-constant coefficients of G (see Proposition 2.10). The scheme which parametrizes the fibers is called the σ-scheme, and from the theory of Gröbner fans (see [9]) we deduce that each family has only a finite set of σ-schemes (see Corollary 2.13). Subsection 2.2 applies the results about hyperplane sections to families of algebraic schemes. After recalling our definition of HT (see Definition 2.22), we show how to compute its dimension. Proposition 2.25 and some examples illustrate some cases when the HTs are zerodimensional schemes. Finally, Example 2.28 shows how the equation of a surface can be reconstructed from the equations of some of its hyperplane sections. The important remark here is that the equations of these curves can be obtained obtained using Hough transforms. Why did we mention other scientists, in particular doctors? Suppose that special curves have been recognized in the tomographic sections of a human organ. Our results hint at the possibility of reconstructing a surface whose cross-sections coincide with the recognized curves. It could be the contour of a vertebra or a kidney. However, more difficulties arise, in particular the fact that in this context all the data are inexact. More investigation is needed which is exactly what every researcher loves. Assumptions 0.1. Throughout the paper we use notation and definitions introduced in [4] and [5]. Moreover, we always assume that for every term ordering σ on Tn = T(x1 , . . . , xn ) we have x1 >σ · · · >σ xn , and we call σ̂i (or simply σ̂ if i is clear from the context) the restriction of σ to the monoid T(x1 , . . . , xi−1 , xi+1 , . . . , xn ). My warmest thanks go to J. Abbott, M. C. Beltrametti, M. Piana, M. L. Torrente. With them I had the opportunity to share my ideas, and from them I received valuable feed-back. Contents 1 2 Hyperplane Sections and Gröbner Bases 1.1 The Homogeneous Case . . . . . . . 1.2 The non-Homogeneous Case . . . . . 1.3 Lifting . . . . . . . . . . . . . . . . . 1.4 Common Lifting . . . . . . . . . . . . . . . 3 3 4 5 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Families of Schemes and the Hough Transform 2.1 Families of Schemes . . . . . . . . . . . . 2.2 Hyperplane Sections and Families . . . . . 2.3 The Hough Transform and its Dimension . 2.4 Hyperplane Sections and Hough Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 . 9 . 11 . 13 . 15 References . . . . 15 2 1. Hyperplane Sections and Gröbner Bases In this section we conduct our investigation into hyperplane sections, and establish some results about Gröbner bases. We recall several facts from the well-known homogeneous case and confront them with new results for the inhomogenous case. 1.1. The Homogeneous Case Assumptions 1.1. Let P = K[x1 , . . . , xn ], let i ∈ {1, . . . , n}, let c1 , . . . , ci−1 , ci+1 . . . cn ∈ K, and P let L = xi − ℓ be the linear polynomial with ℓ = j,i c j x j . We identify P/(L) with the ring P̂ = K[x1 , . . . , xi−1 , xi+1 , . . . , xn ] via the isomorphism defined by πL (xi ) = ℓ, πL (x j ) = x j for j , i. Definition 1.2. For t = xa11 xa22 · · · xann we write ai = log xi (t). For i ∈ {1, . . . , n} we say that a term ordering σ is of xi -DegRev type if it is degree-compatible, and for every pair of terms t, t′ ∈ Tn which satisfy deg(t) = deg(t′ ) and logxi (t) < logxi (t′ ), then t >σ t′ . The usual DegRevLex ordering is of xn -DegRev type, and by suitably modifying its definition we see that for every i there exist term orderings of xi -DegRev type. For an in-depth analysis of this topic see [5, Section 4.4]. We observe that πL = ̺ ◦ θ where θ : P −→ P is defined by θ(xi ) = xi + ℓ, θ(x j ) = x j for j , i while ̺ : P −→ P̂ is defined by ̺(xi ) = 0, ̺(x j ) = x j for j , i. Proposition 1.3. (Homogeneous Hyperplane Sections) Under Assumptions 1.1, we let let σ be a term ordering of xi -DegRev type on P, let I be a homogeneous ideal in P, and let G = {G1 , . . . , G s } be the reduced σ-Gröbner basis of θ(I). Then ̺(G) = {̺(G1 ), . . . , ̺(G s )} \ {0} is the reduced σ̂-Gröbner basis of πL (I). Proof. First of all we observe that θ is a graded isomorphism, so that θ(I) is a homogeneous ideal. Consequently the claim follows from a classical result in Gröbner basis theory (see for instance [5, Corollary 4.4.18]). The following examples illustrate this proposition. Example 1.4. Let P = K[x, y, z, w], let I = (z2 − xw, x2 y−zw2 ), let ℓ = 3y+w, and let L = z−ℓ = z − 3y − w. We consider the linear change of coordinates θ which sends z to z + ℓ = z + 3y + w, and x to x, y to y, w to w. Then θ(I) = (9y2 − xw + 6yw + w2 + 6yz + 2zw + z2 , x2 y − 3yw2 − w3 − zw2 ). Let σ be a term ordering of z-DegRev type. The reduced σ-Gröbner basis of θ(I) is G = { y2 − 19 xw + 23 yw + 19 w2 + 23 yz + 92 wz + 91 z2 , x2 y − 3yw2 − w3 − w2 z, x3 w − x2 w2 − 3xw3 − 9yw3 − 3w4 − 2x2 wz − 9yw2 z − 6w3 z − x2 z2 − 3w2 z2 } If we mod out z we get ̺(G) = { y2 − 19 xw + 23 yw + 19 w2 , x2 y − 3yw2 − w3 , x3 w − x2 w2 − 3xw3 − 9yw3 − 3w4 } On the other hand, if ̺ is defined by ̺(x) = x, ̺(y) = y, ̺(w) = w, ̺(z) = 0, and we put πL = ̺ ◦ θ we have πL (I) = (9y2 − xw + 6yw + w2 , x2 y − 3yw2 − w3 ). If we compute the σ̂-reduced Gröbner basis of πL (I) we get ̺(G), as prescribed by the proposition. 3 Example 1.5. Let P = K[x0 , x1 , x2 , x3 ], let F1 = x33 − x1 x2 x0 , F2 = x32 − x1 x3 x0 − x2 x20 , F3 = x21 x2 − x3 x20 , let I = (F1 , F2 , F3 ), and let σ be a term ordering of x0 -DegRev type. The reduced Gröbner basis of I is (F1 , F2 , F3 , F4 ) where f4 = x31 x3 x0 − x22 x3 x20 + x3 x40 . If we mod out x0 we get πL (F1 ) = x33 , πL (F2 ) = x32 , πL (F3 ) = x21 x2 , πL (F4 ) = 0. The reduced Gröbner basis of πL (I) is (πL (F1 ), πL (F2 ), πL (F3 )). We have to take out πL (F4 ) = 0. 1.2. The non-Homogeneous Case The main feature of the homogeneous case is that if σ is a term ordering of xi -DegRev type and F is a non zero homogeneous polynomial, then xi | F if and only if xi | LTσ (F). This fact implies that in Proposition 1.3 it suffices to remove 0 from the set {̺(G1 ), . . . , ̺(G s )}, and get the reduced Gröbner basis of πL (I) (see for instance Example 1.5). Even if σ is a term ordering of xi -DegRev type, in the non homogeneous case it may happen that xi divides LTσ ( f ) but xi does not divide f . For instance, if f = x2 − y and σ is any degre-compatible term ordering then x divides x2 = LTσ ( f ), but it does not divide f . These observations lead to a different approach of the hyperplane section problem in the non homogeneous case. In particular, Assumptions 1.1 are modified as follows. Assumptions 1.6. Let P = K[x1 , . . . , xn ], let i ∈ {1, . . . , n}, let ci+1 , . . . , cn , γ ∈ K, and let P L = xi − ℓ be the linear polynomial with ℓ = j>i c j x j + γ if i < n , and ℓ = γ if i = n. We identify P/(L) with the ring P̂ = K[x1 , . . . , xi−1 , xi+1 , . . . , xn ] via the isomorphism defined by πL (xi ) = ℓ, πL (x j ) = x j for j , i. Theorem 1.7. (Hyperplane Sections) Let σ be a term ordering on Tn and, under Assumptions 1.6, let I be an ideal in the polynomial ring P, let G = {g1 , . . . , g s } be a monic σ-Gröbner basis of I, and let LTσ (g j ) = LTσ̂ (πL (g j )) for every j = 1, . . . , s. (a) (b) (c) (d) The linear polynomial L does not divide zero modulo I. The set πL (G) = {πL (g1 ), . . . , πL (g s )} is a σ̂-Gröbner basis of πL (I). If G is minimal, then also πL (G) is minimal. If L = xi − γ and G is the reduced σ-Gröbner basis of I, then πL (G) is the reduced σ̂-Gröbner basis of πL (I). Proof. To prove (a) we assume, for contradiction, that L is a zero divisor modulo I. Let F be a non-zero monic polynomial with minimal leading term such that FL ∈ I. The assumption that LTσ (g j ) = LTσ̂ (πL (g j )) for every j = 1, . . . , s implies that xi does not divide any LTσ (gi ). Therefore from LTσ (L) = xi we deduce that there exist ℓ ∈ {1, . . . , s} and a monic polynomial H ∈ P with LTσ (F) = LTσ (H) LTσ (gℓ ). Then (F − Hgℓ )L ∈ I and LTσ (F − Hgℓ ) <σ LTσ (F), a contradiction. Next we prove (b). It is clear that πL (G) generates πL (I), hence we need to prove that for every non-zero element f of πL (I) its leading term LTσ̂ ( f ) is divided by the leading term of an element of πL (G). For contradiction, suppose that there exists a non-zero monic element f ∈ πL (I) such that LTσ̂ ( f ) is not divided by any leading term of the elements of πL (G), and let F ∈ I be a nonzero monic polynomial with minimal leading term such that πL (F) = f . A priori there are two possibilities: either xi | LTσ (F) or xi ∤ LTσ (F). If xi | LTσ (F) there exist an index j ∈ {1, . . . , s} and a term t ∈ Ti such that we have LTσ (F) = xi · t · LTσ (g j ). We let H = F − L · t · g j and observe that πL (H) = πL (F) = f , since πL (L) = 0. On the other hand, LTσ (H) <σ LTσ (F) which contradicts the minimality of F. So this case is excluded and hence xi ∤ LTσ (F). Since πL 4 substitutes xi with a linear polynomial whose support contains only terms which are σ-smaller than xi , we deduce that LTσ (F) = LTσ̂ ( f ). Since there exists j such that LTσ (g j ) | LTσ (F), we deduce that LTσ̂ (πL (g j )) | LTσ̂ ( f ), a contradiction. Claim (c) follows from (b) and the fact that the leading terms of the elements of both bases are the same. Finally we prove (d). Let t be a power product in the support of πL (g j ) − LTσ̂ (πL (g j )). If t = πL (t) with t in the support of gg − LTσ (g j ), then t is not a multiple of any LTσ (g j ), hence of any LTσ (πL (g j )). If t = γ1a πL (xai t) with xai t in the support of gg − LTσ (g j ), then xai t is not a multiple of any LTσ (g j ), hence t is not a multiple of any LTσ (g j ), and so t is not a multiple of any LTσ (πL (g j )) as well. In the theorem, the assumption that LTσ (g j ) = LTσ̂ (πL (g j )) for every j = 1, . . . , s is essential, as the following example shows. Example 1.8. Let P = K[x1 , x2 , x3 , x4 ], let f1 = x2 x3 − x4 , f2 = x31 −2x23 , let I = ( f1 , f2 ), and let σ be any degree-compatible term ordering. Then ( f1 , f2 ) is the reduced σ-Gröbner basis of I. If we substitute x1 with x3 + x4 , and let f2′ be the polynomial obtained from f2 with this substitution, then the reduced DegRevLex-Gröbner basis is ( f1 , f2′ , f3 ) which differs from ( f1 , f2′ ) since it includes the new polynomial f3 = x2 x34 + x23 x4 + 3x3 x24 + 3x34 − 2x3 x4 . In particular, the fact that LTσ (g j ) = LTσ̂ (πL (g j )) for j = 1, . . . , s if and only if xi does not divide any leading term of the elements of G, is essential in the proof that minimality of G implies minimality of πL (G). However, for a general L the conclusion of statement (d) of the theorem does not hold, as the following example shows. Example 1.9. The set G = {x32 − x21 , x23 − 1} is the reduced σ-Gröbner basis for every degreecompatible term ordering σ with x1 >σ x2 >σ x3 , but if L = x1 − x3 then πL (G) = {x32 − x23 , x23 −1} is not reduced. 1.3. Lifting We are going to prove a sort of converse of Theorem 1.7. Theorem 1.10. (Lifting Gröbner Bases) Let σ be a term ordering on Tn and, under Assumptions 1.6, let I be an ideal in P such that L does not divide zero modulo I, let G = {g1 , . . . , g s } ⊂ I be such that πL (G) = {πL (g1 ), . . . , πL (g s)} is a σ̂-Gröbner basis of πL (I), and LTσ (g j ) = LTσ̂ (πL (g j )) for j = 1, . . . , s. (a) The set G is a σ-Gröbner basis of I. (b) If πL (G) is minimal, then also G is minimal. (c) If L = xi − γ and πL (G) is the reduced σ̂-Gröbner basis of πL (I), then G is the reduced σ-Gröbner basis of I. Proof. We prove (a) by contradiction. Suppose that there exists a monic non-zero polynomial F ∈ I with minimal leading term among the polynomials in I such that LTσ (F) is not divisible by any leading term of the elements of G, and let f = πL (F). If f = 0 then there exists H ∈ P with F = HL, and the assumption about L implies that H ∈ I. Moreover LTσ (H) | LTσ (F), a contradiction. Therefore f = 0 is excluded, hence there exist suitable polynomials h j ∈ P̂ such P that f can be written as f = sj=1 h j πL (g j ) with LTσ̂ ( f ) = max sj=1 {LTσ̂ (h j πL (g j ))}. If we let 5 P P U = F − sj=1 h j g j , we get πL (U) = f − sj=1 h j πL (g j ) = 0. Consequently there exists H ∈ P with U = HL and the assumption about L implies that H ∈ I. We examine the two possible cases. P Case 1: H = 0. In this case F = sj=1 h j g j . We know that LTσ̂ ( f ) = maxsj=1 {LTσ̂ (h j πL (g j )}, hence there exists at least one index ℓ such that LTσ̂ ( f ) = LTσ̂ (hℓ πL (gℓ )). On the other hand we have LTσ̂ (hℓ πL (gℓ )) = LTσ (hℓ gℓ ), hence LTσ (F) = LTσ (hℓ gℓ ), so that LTσ (gℓ ) | LTσ (F), a contradiction. Case 2: H , 0. Since πL can only lower the leading term of a polynomial, we have the equality LTσ (F) = LTσ (U), hence LTσ (F) = LTσ (HL). But then LTσ (H) | LTσ (F), and H ∈ I, a contradiction. Claim (b) follows from (a) and the fact that the leading terms of the elements of both bases are the same. To prove (c) we let t be a power product in the support of g j − LTσ (g j ). We have t = xai t′ with xi ∤ t′ . Then πL (t) = cao t′ . We know that t′ is not divided by any leading term of the πL (g j ), hence also t is not divided by any leading term of the g j . The following examples show the tightness of the assumptions in the above theorem. Example 1.11. Let P = K[x1 , x2 , x3 , x4 ] and L = x2 − x4 . Then let σ be any degree-compatible term ordering, let G = {x21 , x1 x3 − x2 , x1 x4 , x24 }, let I be the ideal generated by G, and let πL (G) = {x21 , x1 x3 − x4 , x1 x4 , x24 }. We have x21 x3 − x1 (x1 x3 − x2 ) − x1 x4 = x1 (x2 − x4 ) = x1 L ∈ I which implies that L divides zero modulo I, so that all the hypotheses are satisfied except one. And we see that πL (G) is the reduced σ̂-Gröbner basis of IL , while G is not a σ-Gröbner basis of I, since the reduced σ-Gröbner basis of I is {x21 , x1 x3 − x2 , x1 x4 , x24 , x1 x2 , x22 }. Example 1.12. Let P = K[x1 , x2 , x3 , x4 ] and L = x2 − x4 , let σ be any degree-compatible term ordering on Tn , let G = {x22 − x23 , x1 x2 }, let I be the ideal generated by G, and finally let πL (G) = {−x23 + x24 , x1 x4 }. We observe that all the hypotheses are satisfied, except the fact that LTσ (gi ) = LTσ̂ (ĝi ) for i = 1, . . . , s. And we see that πL (G) is the reduced σ̂-Gröbner basis of IL , while G is not a σ-Gröbner basis of I, since the reduced σ-Gröbner basis of I is {x22 − x23 , x1 x2 , x2 x23 , x43 }. Example 1.13. Let P = K[x1 , x2 , x3 , x4 ] and let ℓ = x2 , L = x1 − ℓ = x1 − x2 . Let σ be any degree-compatible term ordering, and let G = {x32 + x1 x3 − x2 x3 , x3 }. Then πL (G) = {x32 , x3 } is the reduced σ̂-Gröbner basis, while G is not reduced. 1.4. Common Lifting In the following we consider the lifting of Gröbner bases as described in Theorem 1.10 and start investigating how to make it explicit. Assumptions 1.14. Let P = K[x1 , . . . , xn ], i ∈ {1, . . . , n}, ci+1 , . . . , cn ∈ K, N ∈ N. Moreover let γ1 , . . . , γN be distinct elements of K, and for k = 1, . . . , N let Lk = xi − ℓk be linear polynomials P with ℓk = j>i c j x j + γk if i < n , and ℓ = γk if i = n. We identify P/(Lk ) with the polynomial ring P̂ = K[x1 , . . . , xi−1 , xi+1 , . . . , n] via the isomorphism induced by πLk (xi ) = ℓk and πLk (x j ) = x j for j , i. Definition 1.15. Under Assumptions 1.14, let ĝ1 , . . . , ĝN ∈ P̂ and let g ∈ P be a polynomial such that πLk (g) = ĝk for k = 1, . . . , N. Then g is called a common lifting of ĝ1 , . . . , ĝN . 6 Remark 1.16. The linear polynomials are pairwise coprime. Therefore the Chinese Remainder Theorem (see [5, Lemma 3.7.4]) implies that all the common liftings of the gk differ by a mulQN tiple of k=1 Lk . Consequently there exists at most one common lifting of degree less than N. However, even if the degrees of the ĝi are less than N, a common lifting of degree less than N may not exist, as the following example shows. Example 1.17. Let P = K[x, y], L0 = y, L1 = y − 1, L2 = y − 2. Then let ĝ1 = x, ĝ2 = x + 1, ĝ3 = x + 4, and observe that their degree is less than N = 2. We compute a common lifting and get g = y2 + x, as the only one of degree less than 3. Therefore there is no common lifting of degree less than 2. Theorem 1.18. (Common Lifting of Gröbner Bases) Under Assumptions 1.14, let σ be a term ordering on Tn and let I be an ideal in P. (a) If γ1 , . . . , γN are sufficiently generic, all the minimal σ̂-Gröbner bases of the ideals πLk (I) share the same number of elements and the same leading terms, say t1 , . . . , t s . (b) If N ≫ 0, at least one of the Lk does not divide zero modulo I. (c) Let g1 , . . . , g s be common liftings of the corresponding elements in minimal σ̂-Gröbner bases of the ideals πLk (I). If gi ∈ I and LTσ (gi ) = ti for i = 1, . . . , s then {g1 , . . . , g s } is a minimal σ-Gröbner basis of I. (d) Let L = xi − γ and let g1 , . . . , g s be common liftings of the corresponding elements in the reduced σ̂-Gröbner bases of the ideals πLk (I). If gi ∈ I and LTσ (gi ) = ti for i = 1, . . . , s then {g1 , . . . , g s } is the reduced σ-Gröbner basis of I. P Proof. To prove claim (a), we let a be a free parameter, let La = xi − ( j>i c j x j + a), and let Ia be the ideal I + (La ) in the polynomial ring K(a)[x1 , . . . , xn ]. The σ-reduced Gröbner basis of Ia consists of La and polynomials in K(a)[x1, . . . , xi−1 , xi+1 , . . . , xn ]. It evaluates to the reduced Gröbner basis of the corresponding ideal for almost all values of a which implies that the ideals πLk (I) share the same leading term ideals (see [6, Proposition 2.3] for a more general argument). Claim (b) follows from the fact that each primary component of I can contain at most one of the linear polynomials Lk , since any pair of them generate the unit ideal. Claim (c) follows from (b) and Theorem 1.10.b. Claim (d) follows from (b) and Theorem 1.10.c. Here we show an interesting example. Example 1.19. (Zitrus) There is a well-known example of a surface which represents a lemon (see for instance the web page http://imaginary.org/gallery/herwig-hauser-classic). Its equation is the following F := x2 + z2 − y3 (1 − y)3 = 0. We cut it with a sufficiently high number of parallel hyperplanes. In our case we choose z − γ = 0 for γ ∈ {−5, −4, −3, −2, 2, 3, 4, 5} and get the hyperplane sections defined by the following eight ideals: (y + 5, x2 + z2 + 27000), (y + 4, x2 + z2 + 8000), (y + 3, x2 + z2 + 1728), (y + 2, x2 + z2 + 216), (y − 2, x2 + z2 + 8), (y − 3, x2 + z2 + 216), (y − 4, x2 + z2 + 1728), (y − 5, x2 + z2 + 8000). We use a CoCoA (see [1]) script to compute the reconstruction according to Theorem 1.18, and indeed we get F back. As a matter of curiosity, we observe that the real lemon is reconstructed using eight slices with no real points. 7 Remark 1.20. In general, if we want to use Theorem 1.18 to compute a Gröbner basis of I, we need to verify that the polynomials gk have the correct leading term, and this is easy to do. We also need to verify that they are in I, and in general this is a limit to the usefulness of the theorem. Nevertheless there are nice situations where this verification can be done easily. For instance, if we have a Gröbner basis G of I and want to compute the reduced Gröbner basis of I with respect to another term ordering, then checking that the gk belong to I entails the simple verification that their normal forms with respect to G are zero. A favourable situation is the following. If the ideal I is known via a parametrization, then checking that the gk belong to I requires only evaluating them at the parametric expressions of the coordinates. Let us show an example where the expected output is a single polynomial. Example 1.21. (Rational Surface) Let S be the affine surface in A3Q given parametrically by    x =     y =      z = s5 − st3 − t st2 − s s4 − t2 The implicit equation of S can be computed using a standard elimination procedure. We do it in CoCoA and get the implicit equation F = 0 where F is the polynomial displayed below. It has degree 14 and its support contains 319 power products. Using a procedure suggested by the theorem and the remark, we can slice the surface with several hyperplanes parallel to z = 0, compute the cartesian equation of the corresponding curve viewed as a curve in the affine plane, and then reconstruct the equation of the surface. This procedure computes the polynomial F using 1 of the time used by the standard procedure, and deserves further investigation. approximately 120 1 F = y14 +10y13 −12x2 y8 z3 +34xy9 z3 −10y10 z3 +8xy5 z7 −11y6 z7 −y2 z11 +45y12 +8x5 y5 z2 −65x4 y6 z2 +132x3 y7 z2 −32x2 y8 z2 −34xy9 z2 − 3y 0z2 − 72x2 y7 z3 + 204xy8 z3 − 44y9 z3 + 2x4 y2 z6 − 2x3 y3 z6 + 45x2 y4 z6 − 78xy5 z6 + 57y6 z6 + 32xy4 z7 − 44y5 z7 − x2 z1 0 − 8y2 z1 0 − 2yz1 1 + 120y1 1 − x8 y2 z + 18x7 y3 z − 86x6 y4 z + 120x5 y5 z + 38x4 y6 z − 92x3 y7 z − 28x2 y8 z + 4xy9 z + 32x5 y4 z2 − 260x4 y5 z2 + 464x3 y6 z2 + 112x2 y7 z2 − 236xy8 z2 −48y9 z2 −180x2 y6 z3 +510xy7 z3 −50y8 z3 +2x6 z5 −10x5 yz5 +62x4 y2 z5 −44x3 y3 z5 +31x2 y4 z5 +54xy5 z5 +4y6 z5 +4x4 yz6 −4x3 y2 z6 + 138x2 y3 z6 − 196xy4 z6 + 164y5 z6 + 48xy3 z7 − 66y4 z7 − 10x2 z9 − 24y2 z9 − 18yz1 0 − z1 1 − x1 0 + 10x9 y − 31x8 y2 + 18x7 y3 + 49x6 y4 − 26x5 y5 − 42x4 y6 −4x3 y7 +7x2 y8 +2xy9 +210y1 0−2x8 yz+36x7 y2 z−156x6 y3 z+56x5 y4 z+544x4 y5 z−296x3 y6 z−312x2 y7 z−24xy8 z−4y9 z+48x5 y3 z2 − 390x4 y4 z2 + 520x3 y5 z2 + 810x2 y6 z2 − 490xy7 z2 − 233y8 z2 − 240x2 y5 z3 + 680xy6 z3 + 64y7 z3 + 10x6 z4 − 2x5 yz4 + 127x4 y2 z4 − 78x3 y3 z4 + 163x2 y4 z4 − 12xy5 z4 + 5y6 z4 + 64x4 yz5 + 24x3 y2 z5 + 164x2 y3 z5 + 88xy4 z5 + 116y5 z5 + 2x4 z6 − 2x3 yz6 + 153x2 y2 z6 − 140xy3 z6 + 183y4 z6 + 32xy2 z7 − 44y3 z7 − 41x2 z8 − 32y2 z8 − 64yz9 − 10z1 0 + 18x8 y − 124x7 y2 + 204x6 y3 + 104x5 y4 − 236x4 y5 − 120x3 y6 + 24x2 y7 + 16xy8 + 252y9 − x8 z + 18x7 yz − 50x6 y2 z − 286x5 y3 z + 950x4 y4 z + 216x3 y5 z − 908x2 y6 z − 280xy7 z − 44y8 z + 32x5 y2 z2 − 260x4 y3 z2 + 80x3 y4 z2 + 1480x2 y5 z2 − 232xy6 z2 − 518y7 z2 + 32x6 z3 + 40x5 yz3 + 128x4 y2 z3 + 66x3 y3 z3 − 134x2 y4 z3 + 518xy5 z3 + 231y6 z3 + 32x5 z4 + 174x4 yz4 + 164x3 y2 z4 + 364x2 y3 z4 + 164xy4 z4 + 46y5 z4 + 22x4 z5 + 80x3 yz5 + 327x2 y2 z5 + 178xy3 z5 + 267y4 z5 + 72x2 yz6 − 4xy2 z6 + 126y3 z6 − 88x2 z7 + 8xyz7 − 27y2 z7 − 112yz8 − 41z9 + 4x8 − 22x7 y − 95x6 y2 + 496x5 y3 − 185x4 y4 − 484x3 y5 − 58x2 y6 + 40xy7 + 209y8 + 24x6 yz − 260x5 y2 z + 380x4 y3 z + 1120x3 y4 z − 816x2 y5 z − 776xy6 z − 180y7 z + 56x6 z2 + 88x5 yz2 + 59x4 y2 z2 − 150x3 y3 z2 + 1195x2 y4 z2 + 450xy5 z2 − 598y6 z2 + 128x5 z3 + 296x4 yz3 + 424x3 y2 z3 + 208x2 y3 z3 + 308xy4 z3 + 280y5 z3 + 92x4 z4 + 362x3 yz4 + 641x2 y2 z4 + 514xy3 z4 + 202y4 z4 + 32x3 z5 + 246x2 yz5 + 308xy2 z5 + 300y3 z5 − 92x2 z6 + 18xyz6 + 76y2 z6 − 96yz7 − 88z8 − 46x6 y + 128x5 y2 + 340x4 y3 − 560x3 y4 − 316x2 y5 + 16xy6 + 112y7 + 52x6 z + 42x5 yz − 38x4 y2 z + 926x3 y3 z + 97x2 y4 z − 884xy5 z − 362y6 z + 224x5 z2 + 368x4 yz2 + 248x3 y2 z2 + 546x2 y3 z2 + 692xy4 z2 − 358y5 z2 + 248x4 z3 + 680x3 yz3 + 736x2 y2 z3 + 456xy3 z3 + 257y4 z3 + 160x3 z4 + 602x2 yz4 + 776xy2 z4 + 368y3 z4 − 2x2 z5 + 194xyz5 + 233y2 z5 − 4yz6 − 104z7 + 10x6 + 46x5 y + 179x4 y2 − 82x3 y3 − 369x2 y4 − 64xy5 + 21y6 + 192x5 z + 220x4 yz + 388x3 y2 z + 464x2 y3 z − 432xy4 z − 396y5 z + 384x4 z2 + 624x3 yz2 + 502x2 y2 z2 + 486xy3 z2 − 78y4 z2 + 352x3 z3 + 872x2 yz3 + 792xy2 z3 + 322y3 z3 + 186x2 z4 + 536xyz4 + 384y2 z4 + 32xz5 + 98yz5 − 62z6 + 64x5 + 134x4 y + 28x3 y2 − 112x2 y3 − 64xy4 − 22y5 + 298x4 z + 358x3 yz + 302x2 y2 z − 82xy3 z − 257y4 z + 416x3 z2 + 640x2 yz2 + 448xy2 z2 + 82y3 z2 + 368x2 z3 + 688xyz3 + 376y2 z3 + 128xz4 + 200yz4 − 6z5 + 100x4 + 94x3 y − 21x2 y2 − 15y4 + 256x3 z + 248x2 yz + 28xy2 z − 112y3 z + 344x2 z2 + 440xyz2 +167y2 z2 +224xz3 +240yz3 +32z4 +64x3 +22x2 y+148x2 z+94xyz−21y2 z+192xz2 +144yz2 +56z3 +15x2 +64xz+22yz+48z2 +15z 8 2. Families of Schemes and the Hough Transform In this section we consider families of algebraic schemes and recall the necessary tools to introduce the notion of Hough transform. 2.1. Families of Schemes As said in the introduction, the notation is borrowed from [4] and [5]. We start the section by recalling some definitions taken from [6]. We let x1 , . . . , xn be indeterminates, and most of the time in the following we use the notation x = (x1 , . . . , xn ). If K is a field, the multivariate polynomial ring P = K[x1 , . . . , xn ] is denoted by K[x]. If f1 (x), . . . , fk (x) are polynomials in P, the set { f1 (x), . . . , fk (x)} is denoted by f(x), and f(x) = 0 is called a system of polynomial equations. Moreover, we let a = (a1 , . . . , am ) be an m-tuple of indeterminates which will play the role of parameters. If we are given polynomials F1 (a, x), . . . , Fk (a, x) in K[a, x], we let F(a, x) = 0 be the corresponding set of systems of polynomial equations parametrized by a, and the ideal generated by F(a, x) in K[a, x] is denoted by I(a, x). Let S be the affine scheme of the a-parameters, R its coordinate ring, and F the affine scheme Spec(K[a, x]/I(a, x)). Then there exists a morphism of schemes Φ : F −→ S, or equivalently a K-algebra homomorphism ϕ : R −→ K[a, x]/I(a, x). The morphism Φ, and F itself if the context is clear, is called a family of sub-schemes of Am . Definition 2.1. If S = Am and I(a, x) ∩ K[a] = (0) the parameters a are said to be independent with respect to F , or simply independent. Remark 2.2. According to the above definition, the parameters a are independent if and only if the K-algebra homomorphism ϕ : K[a] −→ K[a, x]/I(a, x) is injective. Therefore the parameters a are independent if and only if the morphism Φ : F −→ Am is dominant. Definition 2.3. Let f(x) be a set of polynomials in P, and let F(a, x) define a family which specializes to f(x) for a suitable choice of the parameters. Then let I = (f(x)), let I(a, x) = (F(a, x)), let F = Spec(K[a, x]/I(a, x)), let S = Am , assume that the a-parameters are independent, and let Φ : F −→ Am be the associated morphism of schemes. A dense Zariski-open subscheme U of Am with the property that Φ−1 (U) −→ U is free is said to be an F -free subscheme of Am or simply an F -free scheme. Assumptions 2.4. Let Φ : F −→ Am be a family of sub-schemes of An parametrized by Am . Then let σ be a term ordering on Tn , let Gσ (a, x) be the reduced σ-Gröbner basis of the extended ideal I(a, x)K(a)[x], and let dσ (a) be the least common multiple of all the denominators of the coefficients of the polynomials in G(a, x). Proposition 2.5. Under Assumptions 2.4 the open subscheme Uσ = Am \ {dσ (a) = 0} of Am is F -free. Proof. See [6, Proposition 2.3]. Definition 2.6. The set Gσ (a, x) is called the universal reduced σ-Gröbner basis of F . We say that dσ (a) is the σ-denominator of Φ, that Φ|dσ (a) is the σ-free restriction of Φ, and that Uσ is the σ-free set of the family F . 9 Proposition 2.7. Under Assumptions 2.4 the following conditions are equivalent. (a) The a-parameters are dependent with respect to F . (b) We have I(a, x)K(a)[x] = (1). (c) We have Gσ (a, x) = {1}. Proof. The equivalence between (b) and (c) is a standard (easy) fact in computer algebra, so let us prove the equivalence between (a) and (b). If the a-parameters are dependent with respect to F then I(a, x) ∩ K[a] contains a non-zero polynomial, say f (a). Then I(a, x)K(a)[x] contains a non-zero constant, hence it is the unit ideal. Conversely, if I(a, x)K(a)[x] = (1) then we may write 1 as a combinations of polynomials in I(a, x) with coefficients in K(a)[x]. Hence there exists a common denominator, say f (a) such that f (a) = f (a) · 1 ∈ I(a, x), and the proof is complete. Let Φ : F −→ Am be a dominant family of sub-schemes of Am . It corresponds to a K-algebra homomorphism ϕ : K[a] −→ K[a, x]/I(a, x). As observed in Remark 2.2, the dominance implies that the a-parameters are independent, therefore ϕ is injective. If we fix α = (α1 , . . . , αm ), i.e. a rational “parameter point” in Am , we get Spec(K[α, x]/I(α, x)), a special fiber of Φ, hence a special member of the family. Clearly we have the equality K[α, x] = K[x] so that I(α, x) can be seen as an ideal in K[x]. With this convention we denote the scheme Spec(K[x]/I(α, x)) by Xα,x . On the other hand, there exists another morphism Ψ : F −→ An which corresponds to the K-algebra homomorphism ψ : K[x] −→ K[a, x]/I(a, x). If we fix a rational point p = (ξ1 , . . . , ξn ) in An , we get a special fiber of the morphism Ψ, namely Spec(K[a, p]/I(a, p)). Clearly we have K[a, p] = K[a] so that I(a, p) can be seen as an ideal in K[a]. With this convention we denote the scheme Spec(K[a]/I(a, p)) by Γa,p . Definition 2.8. Let G = Gσ (a, x) be the universal reduced σ-Gröbner basis of F , listed with σ-increasing leading terms. The corresponding list of non-constant coefficients of G is denoted by NCCG and called the non constant coefficient list of G. Moreover, if α ∈ Uσ then NCCG (α) is the list obtained by α-evaluating the elements NCCG . Example 2.9. Let F be the family of subschemes of A2 which is defined by the following ideal I(a, x) = (x21 + a21 x2 − a2 , x32 + (a23 + 1)x21 + x1 + a1 a3 x2 − 1), and let σ be a degree-compatible term ordering with x1 >σ x2 >σ x3 . Then NCCG = [a21 , −a2 , a23 + 1, a1 a3 ]. The main property of the non constant coefficient list of Gσ (a, x) is described as follows. Proposition 2.10. Under Assumptions 2.4, the correspondence between {Xα,x | α ∈ Uσ } and NCCG which is defined by sending Xα,x to NCCG (α) is bijective. Proof. First we show that the universal reduced σ-Gröbner basis of F specializes to the reduced σ-Gröbner basis of each fiber Xα,x . The reason is that when we specialize we do not affect the leading terms and we do not add new elements to the support of the polynomials involved. Then the conclusion follows from the fact that the reduced σ-Gröbner basis of an ideal is unique (see [4, Theorem 2.4.13]). Proposition 2.10 suggests the following definition. 10 Definition 2.11. Let Uσ be the σ-free set of F , let G = Gσ (a, x) be the universal reduced σ-Gröbner of F , and let NCCG be the non constant coefficient list of G. Then the scheme f s (a) parametrized by NCCG is called the σ-scheme of F . If NCCG = ( df11(a) (a) , . . . , d s (a) ), then the σ-scheme of F is represented parametrically by y1 = f s (a) f1 (a) , . . . , ys = d1 (a) d s (a) which is called the parametric representation of the σ-scheme of F . Example 2.12. Let F = Spec(K[a, x]/I(a, x) where I(a, x) = (x2 + a21 x + a1 a2 y + a22 ), and let σ be a degree-compatible term ordering. Then NCCG = (a21 , a1 a2 , a22 ) and the σ-scheme of F is the affine cone Xσ represented by y1 = a21 , y2 = a1 a2 , y3 = a22 . Its defining ideal in K[y1 , y2 , y3 ] is generated by y22 − y1 y3 , and we have dim(Xσ ) = 2. Using Proposition 2.10 and the theory of Gröbner fans (see [9]), we get the following result. Corollary 2.13. Let Φ : F −→ Am be a dominant family of sub-schemes of An . (a) For every term ordering σ, the σ-scheme of F represents the generic fibers of F . (b) The set of σ-schemes of F is finite. Proof. Claim (a) is a restatement of the proposition. Claim (b) follows from the theory of Gröbner fans which entails there is only a finite number of reduced Gröbner bases of the ideal I(a, x). Remark 2.14. The statement of the proposition does not imply that there is a bijection between Uσ and NCCG , as Example 2.9 shows . For instance in that example, for (a1 , a2 , a3 ) = (1, 1, 1) and (a1 , a2 , a3 ) = (−1, 1, −1) we get the same fiber. The reason is that the proposition treats {Xα,x | α ∈ Uσ } as a set. It means that if we have Xα,x = Xα′,x we view the two fibers as a single element of the set. 2.2. Hyperplane Sections and Families The setting of this subsection is the following. Assumptions 2.15. Let F be a family of sub-schemes of An parametrized by the affine space Am and let Φ : F −→ Am be a dominant morphism which corresponds to an injective K-algebra homomorphism ϕ : K[a] −→ K[a, x]/I(a, x). Assumptions 2.16. Let P = K[x], let i ∈ {1, . . . , n}, let ci+1 , . . . , cn , γ ∈ K, and let L = xi − ℓ P be the linear polynomial with ℓ = j>i c j x j + γ if i < n , and ℓ = γ if i = n. Moreover, we let xı̂ = (x1 , . . . , xi−1 , xi+1 , . . . , xn ) and identify K[a, x]/(L) with K[a, xı̂ ] via the isomorphism induced by πL (xi ) = ℓ, πL (x j ) = x j for j , i. Notation 2.17. The scheme Spec(K[a, xı̂]/πL (I(a, x)) is called the L-hyperplane section of F and denoted by FL . The morphism FL −→ Am which corresponds to the K-algebra homomorphism ϕL : K[a] −→ K[a, xı̂ ]/πL (I(a, x)) canonically induced by ϕ, is called ΦL . Then let σ be a term ordering such that x1 >σ x2 >σ · · · >σ xn , let Gσ (a, x) = (g1 (a, x), . . . , g s (a, x)) be the universal reduced σ-Gröbner of F , and let σ̂ be the term ordering induced by σ on T(x1 , . . . , xi−1 , xi+1 , . . . , xn ). 11 Proposition 2.18. Under Assumptions 2.15 and 2.16, let Gσ (a, x) = {g1 (a, x), . . . , g s (a, x))} be a monic σ-Gröbner of I(a, x), and let LTσ (g j (a, x)) = LTσ̂ (πL (g j (a, x))) for every j = 1, . . . , s. (a) The linear polynomial L does not divide zero modulo I(a, x). (b) The set {πL (g1 (a, x)), . . . , πL (g s (a, x))} is a minimal σ̂-Gröbner basis of πL (I(a, x)). (c) If L = xi − γ, then {πL (g1 (a, x)), . . . , πL (g s (a, x))} is the reduced σ̂-Gröbner basis of πL (I(a, x)). (d) The a-parameters are independent with respect to FL . Proof. Claims (a), (b), (c) follow immediately from Theorem 1.7. To prove claim (d) we observe that the a-parameters are independent with respect to F by assumption. Therefore Gσ (a, x) , {1} by Proposition 2.7 and so LTσ (I(a, x)) , (1). Our assumptions imply that also LTσ̂ (I(a, x)L ) , (1) and hence the conclusion follows from Proposition 2.7. The following example shows that without the assumption of the proposition, even if Φ is dominant, ΦL needs not be such. Example 2.19. Let F be the family of sub-schemes of A4 defined by I(a, x) = (x2 −a1 y, y2 −a2 ). We check that I(a, x) ∩ K[a] = (0), so we conclude that the parameters are independent. However if L = x − y, then FL is defined by I(a, x)L = (y2 − a1 y, y2 − a2 ) and we have the following equality I(a, x)L ∩ K[a] = (a21 a2 − a22 ) which means that the parameters with respect to FL are not independent anymore. An easy consequence of the proposition is that the non-constant coefficient list of Gσ̂ (a, x)L is easily deduced from the non-constant coefficient list of Gσ (a, x). Let us have a look at an example which illustrates the proposition. Example 2.20. Let F be the sub-scheme of A7 defined by the ideal I(a, x) generated by the two polynomials F1 = a1 xy − a2 y2 − w, F2 = a2 x2 + a3 y2 + z2 We pick a degree-compatible term ordering σ with the property that x >σ y >σ z >σ w, and let a22 a2 1 a2 xw + yw. Then Gσ (a, x) = { a11 F1 , a12 F2 , F3 } is the universal F3 = y3 + a3 +a12 a yz2 + a3a+a 2 3 a2 +a21 a3 2 1 3 2 1 a3 reduced σ-Gröbner basis of F . Therefore   a2 a21 a2 a1 a2 1 a3 1 , , , 3 12 , 3 NCCGσ (a,x) = − , − , a1 a1 a2 a2 a2 + a1 a3 a2 + a21 a3 a32 + a21 a3 The set of the leading terms of Gσ (a, x) is {xy, x2 , y3 } and if we let ℓ = c1 w + c2 with c1 , c2 ∈ K, L = z − ℓ, then claim (b) of the proposition implies that the substitution of z with ℓ in Gσ (a, x) produces a minimal σ̂-Gröbner basis of FL . For instance if ℓ = w − 1 we get the equality πL (Gσ̂ (a, x)) = { a11 F1 , a12 (a2 x2 + a3 y2 + (w − 1)2 , F 3 } where F 3 = y3 + = y3 + a32 a21 a2 a1 a2 y(w − 1)2 + 3 xw + 3 2 2 yw 2 2 + a1 a3 a2 + a1 a3 a2 + a1 a3 a21 a32 + a21 a3 yw2 + a32 a2 − 2a2 a2 a1 a2 xw + 32 2 1 yw + 3 1 2 y 2 + a1 a3 a2 + a1 a3 a2 + a1 a3 It turns out that this is the reduced Gröbner basis, consequently we get the equality   a2 a2 a2 − 2a2 a2 1 a3 1 a1 a2 , 32 2 1 , 3 1 2 , , 3 12 , 3 NCCG = − , − , 2 a1 a1 a2 a2 a2 + a1 a3 a2 + a1 a3 a2 + a1 a3 a2 + a1 a3 12 If we compute the elimination of [x, y, z, w] from the ideal (F1 , F2 ) we get (0), hence the parameters are independent. And if we compute the σ-scheme of F we get a scheme isomorphic to A3 . Remark 2.21. As we have seen, Proposition 2.18 is almost entirely based on Theorem 1.7. Analogously, one can use Theorem 1.10 and Theorem 1.18 to deduce similar theorems in the case of families. This easy task is left to the reader. 2.3. The Hough Transform and its Dimension We recall the definition of Hough transform (see [6, Definition 3.11]). Definition 2.22. (The Hough Transform) With the above notation and definitions, let p = (ξ1 , . . . , ξn ) ∈ An . Then the scheme Γa,p is said to be the Hough transform of the point p with respect to the family Φ. If it is clear from the context, we simply say that the scheme Γa,p is the Hough transform of the point p and we denote it by H p . We observe that if p < Im(Ψ), then H p = ∅. Hough transforms were invented by P.V.C. Hough (see [2]). Here we show an example which illustrates the original idea. Example 2.23. Let F be the hypersurface of A4 defined by the equation x2 + a1 x1 + a2 = 0. It correspond to the K-algebra homomorphism K[a1 , a2 ] −→ K[a1 , a2 , x1 , x2 ]/(x2 + a1 x1 + a2 ). We have the following diagram Φ F Ψ A2(x1 ,x2 ) A2(a1 ,a2 ) It is easy to check that dim(F ) = 3 and that Φ and Ψ are dominant. It is clear that the Hough transform of the point (ξ1 , ξ2 ) is the straight line in the parameter space defined by the equation ξ2 + ξ1 a1 + a2 = 0. If some points, say p1 , p2 , . . . , p s , have Hough transforms which intersect in a point, say (α1 , α2 ), it means that the line x2 + α1 x1 + α2 = 0 contains p1 , p2 , . . . , p s . Using this idea, Hough was able to detect line segments, and similarly arcs, inside images. Next, we show an example where Φ is dominant but Ψ is not. Example 2.24. Let F be the sub-scheme of A4 defined by the ideal I = (x21 − x1 , x1 x2 − x2 , x22 + a1 a2 x1 − (a1 + a2 )x2 ) If we draw the diagram, it looks exactly the same as the diagram of Example 2.23, but there are several differences. It is easy to check that dim(F ) = 2 and that Φ is dominant. However, if we perform the elimination of [a1 , a2 ] we get the ideal (x21 − x1 , x1 x2 − x2 ), which means that Ψ is not dominant. In particular, the closure of the image of Ψ is the union of the point (0, 0) and the line x1 − 1 = 0 . We observe that the fiber of Ψ over the point (0, 0) is the plane defined by x1 = x2 = 0 while the fibers over the points on x = 1 are pairs of lines defined by x1 = 1, x2 = c, (c − a1 )(c − a2 ) = 0. The above example justifies the reason why in the next proposition we need to consider the image of Ψ. 13 Proposition 2.25. (Dimension of Hough Transforms) Let Y ⊆ X be an irreducible component of the closure of the image of Ψ, let p be the generic point of Y, and let Xα,x be the generic fiber of Φ. (a) dim (H p ) = dim (F ) − dim (Y) = m + dim(Xα,x ) − dim (Y). (b) If Ψ is dominant and dim(F ) = m, then dim(H p ) = 0. (c) If dim(H p ) = 0 and the generators of I are linear polynomials in the parameters a, then H p is a single rational point. Proof. In the proof we use the notation Kdim to indicate the Krull dimension. To prove (a)  we observe that we have the equality dim (F ) = Kdim K[a, x]/I(a, x) . Then we let p be the prime ideal which defines Y so that dim (Y) = Kdim (K[a]/p). Since dim (H p ) and dim (Xα,x ) are the Krull dimensions of the fibers of Ψ and Φ respectively, the claim follows from [7, Corollary 14.5]. To prove claim (b) we observe that if Ψ is dominant then Y = X = Am , hence dim(Y) = m, so we have dim(H p ) = m − m = 0. Claim (c) follows from (b) and the fact that the coordinates of the points in H p are the solutions of a linear system. Let us have a look at some examples. Example 2.26. Let F be the sub-scheme of A5 defined by the ideal I generated by the two polynomials F1 = (x2 + y2 )3 − (a1 (x2 + y2 ) − a2 (x3 − 3xy2 ))2 ; F2 = a1 z − a2 x. If we pick a degree-compatible term ordering σ such that z >σ y >σ x, then LTσ (F1 ) = y6 , LTσ (F2 ) = z if a1 , 0, and {F1 , a11 F2 } is the reduced Gröbner basis of I. Using Proposition 2.5, we get Uσ = A2 \ {a1 = 0} and we see that Φ−1 (Uσ ) −→ Uσ is free. If we perform the elimination of [a1 , a2 ] we get the zero ideal, hence also Ψ is dominant, actually surjective. Counting dimensions as suggested by the proposition, we see that dim (Γa,p ) = 0 for the generic fiber. Since a1 , a2 are quadratic and related by a linear equation, the Hough transforms of the points in A3 are pairs of points. For instance, if we pick the point p = (1, 1, 1), its Hough transform is the pair of points ( √12 , 1), (− √12 , − √12 ). Example 2.27. We modify the above example in the following way. Let F be the sub-scheme of A5 defined by the ideal I generated by the two polynomials F1 = (x2 + y2 )3 − a1 ((x2 + y2 ) − (x3 − 3xy2 ))2 ; F2 = z − a2 x. If we pick a degree-compatible term ordering σ such that z >σ y >σ x, then LTσ (F1 ) = y6 , LTσ (F2 ) = z, and {F1 , F2 } is the reduced Gröbner basis of I. Using Proposition 2.5 we see that Φ is free. If we perform the elimination of [a1 , a2 ] we get the zero ideal, hence also Ψ is dominant, actually surjective. Counting dimensions as suggested by the proposition, we see that dim (Γa,p ) = 0 for the generic fiber. Up to here the situation is similar to the above example. But now the two parameters a1 , a2 are linear in the polynomials F1 , F2 , hence the Hough transforms of the generic point in A3 is a single point as described in the proposition. It has coordinates α1 , α2 where (x2 + y2 )3 z α1 = α2 = 2 2 3 2 2 x ((x + y ) − (x − 3xy )) 14 2.4. Hyperplane Sections and Hough Transforms As we have seen in Examples 1.19, 1.21, and Remark 2.21, there is a concrete possibility of reconstructing ideals from this hyperplane sections. In particular, it is interesting to be able to reconstruct a surface from a set of planar curves obtained by slicing it. Here we show an example which suggests how to do it. Example 2.28. Suppose we want to reconstruct a surface using five images obtained by slicing it with the hyperplanes z = 0, z = 1, z = −1, z = 2. Suppose that a priori we know that the images contain curves of the family x3 − a1 y2 + a2 x + a3 y + a4 = 0. Using the Hough transforms of the points of the image, we discover these curves. They are described by the ideals (z, x3 −y2 ), (z − 1, x3 − y2 − x − y − 1), (z + 1, x3 − y2 + x + y + 1), (z − 2, x3 − y2 − 2x − 2y − 2). We proceed as we suggested in Example 1.19 and reconstruct the surface. Its equation is x3 − xz − y2 − yz − z = 0. Why could this reconstruction be important? Suppose we have the images of several parallel sections of a human organ, which is exactly what happens with various types of tomography. Then we try to identify the cross-sectional curves using Hough transforms. Once we have the equations of these curves, even for a small portion of the organ, we can try to reconstruct the equation of the whole surface using ideas outlined in the above example. This hot topic is under investigation. References References [1] CoCoATeam, CoCoA: a system for doing Computations in Commutative Algebra. Available at http://cocoa.dima.unige.it. [2] P.V.C. Hough, Method and means for recognizing complex patterns, US Patent 3069654, December 18, (1962). [3] O. Duda, P.E. Hart, Use of the Hough Transformation to Detect Lines and Curves in Pictures, Comm. ACM, 15, 11–15, (1972). [4] M. Kreuzer, L. Robbiano, Computational Commutative Algebra 1, Springer, Heidelberg, (2000). [5] M. Kreuzer, L. Robbiano, Computational Commutative Algebra 2, Springer, Heidelberg, (2005). [6] M.C. Beltrametti and L. Robbiano, An algebraic approach to Hough transforms J. Algebra 371, 669–681 (2012) [7] D. Eisenbud, Commutative Algebra with a View Toward Algebraic Geometry, Graduate Texts in Mathematics, Springer, (1995). [8] L. Robbiano, Parametrizations, hyperplane sections, Hough transforms, arXiv:1305.0478 [9] T. Mora, L. Robbiano, The Gröbner fan of an ideal, J. Symbolic Comput. 6, 183–208 (1988). 15
0math.AC
GreMuTRRR: A Novel Genetic Algorithm to Solve Distance Geometry Problem for Protein Structures Md. Lisul Islam1,2 , Swakkhar Shatabda1 and M Sohel Rahman2 Department of Computer Science and Engineering, United International University House 80, Road 8A, Dhanmondi, Dhaka-1209, Bangladesh 2 Department of Computer Science and Engineering, Bangladesh University of Engineering and Technology, Palashi, Dhaka-1000, Bangladesh Email: {lisul,swakkhar}@cse.uiu.ac.bd, [email protected] arXiv:1411.4246v1 [cs.NE] 16 Nov 2014 1 Abstract Nuclear Magnetic Resonance (NMR) Spectroscopy is a widely used technique to predict the native structure of proteins. However, NMR machines are only able to report approximate and partial distances between pair of atoms. To build the protein structure one has to solve the Euclidean distance geometry problem given the incomplete interval distance data produced by NMR machines. In this paper, we propose a new genetic algorithm for solving the Euclidean distance geometry problem for protein structure prediction given sparse NMR data. Our genetic algorithm uses a greedy mutation operator to intensify the search, a twin removal technique for diversification in the population and a random restart method to recover stagnation. On a standard set of benchmark dataset, our algorithm significantly outperforms standard genetic algorithms. keywords- Genetic Algorithms, Protein Structures, NMR, Euclidean Distance Geometry, Greedy Mutation 1 Introduction The function of a protein depends on its native conformation or the stable three dimensional structure with minimum free energy in a particular environment. Knowledge about this native structure is of paramount importance and can have an enormous impact on the field of rational drug discovery. Nuclear magnetic resonance (NMR) spectroscopy is one of the most widely used techniques to predict native structure of proteins. NMR machines provide inter-atomic distance data for a given protein. Thus, the molecular distance geometry problem (MDGP) arises in this context: given the set of Euclidean distances between the atoms in a protein, MDGP asks to find the Cartesian coordinates of the atoms. However, in practice, NMR machines are able to produce the inter-atomic distances of only a subset of the pairs of atoms that are spatially close and this data too lacks accuracy. As a result, we are given the upper and lower bounds of only a subset of the Euclidean distances. Thus we are left to solve a variant of the MDGP problem with incomplete and inaccurate data. Many computational approaches have been applied to solve 1 MDGP problem with sparse and inaccurate data on real instances [1, 2, 3, 4, 5, 6]. However, complete search methods like spatial branch and bound (sBB) and stochastic methods like variable neighborhood search (VNS) have been able to solve the problem for proteins with only upto 50 atoms [7] and fail to converge quickly for larger number of atoms. In this paper, we present GreMuTRRR (pronounced grey matter), which is a scalable genetic algorithm to solve the MDGP problem for sparse and inaccurate NMR data. Much of the success of our approach comes from a greedy mutation operator, sude to intensify the search, a twin removal technique to diversify the population and a random restart method to recover from stagnation. Experimental results on proteins with number of atoms ranging from 50–2147 shows that our algorithm outperforms standard genetic algorithms and thus obtains state-of-the-art results. 2 Preliminaries In this section, we provide a formal definition of the MDGP problem and a brief description of genetic algorithms. 2.1 Distance Geometry Problem Molecular distance geometry problem can formally be defined as followed [8]: find a set of Cartesian coordinates c1 , c2 , · · · , cn ∈ R3 of atoms of a molecule such that lij ≤ dij ≤ uij , ∀(i, j) ∈ E, where lij and uij are the lower and upper bounds of the Euclidean distance dij ≡ ||ci − cj || between a pair of atoms (i, j) ∈ E. Notably, in the context of NMR data, E is sparse. Here, Cartesian coordinate ci of an atom i corresponds to a three dimensional point (xi , yi , zi ) in the Euclidean space. 2.2 Genetic Algorithm Genetic Algorithms are population-based search methods that resemble the natural phenomena of biological evolution. Genetic Algorithms are widely used for different search optimization problems in different fraternity. It basically starts with a pool of initial random solutions which is called the initial population. Each individual in the population are encoded by a set of properties which are called chromosome or genotype which can be altered for attaining diversification in the population. It then follows an iterative process in which each of these iteration is called a generation. In each generation, the population are then allowed to evolve using different operators which also mimics the natural process of biological evolution like mutation, recombination or survival of the fittest. In each generation, the fitness of each individual is evaluated. Generally the fitness is the value of the optimization function being considered to be solved. The more fit individuals are usually selected to breed and generate new fitter individuals in the population. Thus a new generation of population is ‘breeded’ and are used in the next generation. This process of evolution are continues until a sufficient number of generations has 2 been produced or a satisfactory level of fitness value has been attained. 3 Related Works Euclidean distance geometry problem and its variants are applied to many problems in various fields including wireless sensor network localization [9], inverse kinematic problem [10], multi dimensional scaling [11], protein structure determination [6] etc. The variant of the MDGP problem, when we know distances for all pairs (i, j) ∈ E = {1, 2, · · · }2 and dij = lij = uij has a polynomial algorithm to produce exact solution [8]. Even when some of the pairwise distances are unknown, the problem is solvable by a linear time algorithm [3]. However, the variant of MDGP with sparse and inaccurate data is shown to be NP-hard by More and Wu [12]. A recent survey of computational methods applied to solve this variant of MDGP can be found in [2]. Among the general purpose methods, spatial branch and bound [13] and variable neighborhood search (VNS) [14] methods are not scalable [7]. Smoothing based methods like DGSOL [6, 12] also fail for large instances of the problem. In [15], VNS was combined with DGSOL approaches which provided better results for larger instances but resulted into a slow algorithm. A combinatorial build up algorithm was proposed in [16]. It is important to note that all these methods were tested on dense instances only. Among other methods applied to this problem graph decomposition methods [1] and NLP formulations [17] are notable. 4 Our Method GreMuTRRR is formally presented in Algorithm 1. It starts with a population initialized randomly and terminates at convergence. Convergence is achieved if the search does not improve the quality of the global solutions for a given period of time. In each generation, individuals are selected from the population for cross-over to produce new individuals. Mutation operations are performed probabilistically on the newly found individuals. Global best solutions are updated in each iteration and are kept in the new populations to maintain elitism. Periodical twin removal and random restart operations are activated to ensure diversification and recover stagnation. Rest of this section describes the various components of GreMuTRRR. 4.1 Search Space A Protein structure is formed by the interaction among different amino acids tied with each other by chemical bonds. A pair of these amino acid cannot reside closer than 3.8Å to each other to avoid steric clash. If all the amino acids in a certain protein structure align in a straight line, we have a chain of amino acids of length 3.8 × V in each directions, where V is the number of amino acids in the protein structure. Hence, we have taken the upper bound of our 3-D search space to 3.8 × V . 3 Algorithm 1: GreMuTRRR() nonDiverseSteps = 0 2 nonImprovingSteps = 0 3 GreedyM utationRate = 0.8 4 Intialize the population, P randomly 5 while Termination criterion are met do 6 Pnew = {globalBest} 7 for each Individual X ∈ P do 8 hX1 , X2 i = tournamentSelection(P ) 9 Xnew = crossOver(X1 , X2 ) 10 add Xnew to Pnew 11 end 12 for each Individual X in Pnew do 13 if rand(0, 1) ≤ GreedyM utationRate then 14 greedyMutate(X) 15 else 16 randomMutate(X) 17 end 18 end 19 find the individual Xbest ∈ Pnew with best fitness 20 if fitness(globalBest) < fitness(Xbest ) then 21 globalBest = Xbest 22 nonImprovingSteps = 0 23 else 24 nonImprovingSteps + + 25 end 26 if nonDiverseSteps ≥ twinRemovalInterval then 27 activate twinRemoval(Pnew ) procedure 28 nonDiverseSteps = 0 29 else 30 nonDiverseSteps + + 31 end 32 if nonImprovingSteps ≥ randomRestartInterval then 33 activate randomRestart(Pnew ) procedure 34 nonImprovingSteps = 0 35 end 36 P = Pnew 37 end 38 return globalBest 1 4 4.2 Encoding In our method, we have encoded every individual in a population by 3 × V number of genes. Here, V is the number of atoms in a protein structure. Each of these genes in an individual is initialized randomly from an uniform distribution of the range [0, 3.8 × V ]. So, an individual X can be represented as the ordered list of 3V number of genes: X=       x1 , y1 , z1 , x2 , y2 , z2 , . . . , xi , yi , zi , . . . , xV , yV , zV  | {z } | {z }  | {z } | {z } 1st Atom 4.3 2nd Atom ith Atom V th Atom Fitness Evaluation We have calculated the euclidean distance between each pair of points present in the individual’s chromosome where each non-overlapping consecutive subsequence of length three in the chromosome represents the position of an atom in the protein structure in a 3-D space. We have assumed an upper bound, uij and lower bound, lij of the distances between pair of amino acids. The fitness of an individual X is defined by as Equation 1 below: 1/2  F itness(X) =  1 |E| X e2ij  (1) (i,j)∈E where, eij = max{lij − kci − cj k, kci − cj k − uij , 0} is the error associated to the constraints lij ≤ kci − cj k ≤ uij and |E| denotes the number of distance pairs given. This is known as the Largest Distance Error (LDE) in the literature [2]. 4.4 Genetic Operators Genetic algorithms are guided by different genetic operators to help in keeping a balance of the exploitation and exploration of the search process. We use three types of genetic operators in our search: random mutation, greedy mutation and cross-over. 4.4.1 Random Mutation Genetic diversity is a necessity for the process of evolution which is generally attained by mutation operator. Mutation helps the evolutionary process to guide through and look for different avenues and solutions in the search space. It also helps to avoid local optima by preventing the individuals from becoming too similar to one another. We have used uniform mutation in our method. We have mutated the value of each gene into a new value within the pre-specified bound of the search space([0, 3.8 × V ]). Whether an individual will be mutated or not depends on a mutation rate which is kept to a lower value of 0.015 to avoid primitive random search. A sketch of the pseudo-code is given in Algorithm 2. 5 Algorithm 2: Random Mutation (individual X) 1 mutationRate = 0.015 2 for each gene X(i) in the genotype of X do 3 if rand(0, 1) ≤ mutationRate then 4 X(i) = U (0, 1) ∗ (3 ∗ V ); 5 end 6 end 7 return X 4.4.2 Greedy Mutation In our proposed method, we have also used a greedy mutation where we greedily choose the new value of a particular gene in an individual. We randomly alter a certain gene and try r different random values for the gene temporarily. The value of gene that gives the best fitness of that individual is retained and used as the final new value of the gene. As, greedy mutation is computationally expensive, we make selection between the random mutation and greedy mutation with a probability, GreedyM utationRate(= 0.8). The algorithm for greedy mutation is given in Algorithm 3. Algorithm 3: Greedy Mutation (individual X) 1 set r = 20 2 for each gene X(i) in the genotype of X do 3 S = set of r random values for gene X(i) from the range [0, 3.8 ∗ V ] 4 find v ∈ S for which fitness(X) is minimum 5 set, X(i) = v 6 end 7 return X 4.4.3 Cross-over Cross-over operators help genetic process to exploit the better solutions found thus far along the evolution process and regenerate new individuals by combining the genetic information of the individuals with better fitness value. It uses the better historical genetic information to guide the search into the search space regions with solutions having better fitness. By recombining the fitter individuals to generate new offspring, this operator is likely to produce more fitter individuals. We have used tournament selection with tournament size being equal to 5 to select two individual parents to take part in the cross-over operation. We then have recombined genes of the two parents and have generated a new set of genes for each of the offsprings with equal probability for each gene of being selected from any of the parents. The algorithm is outlined in Algorithm 4. 6 Algorithm 4: Cross-Over (individual X1 , individual X2 ) 1 Xnew be a new offspring 2 unif ormRate = 0.5 3 for each gene X(i) in the genotype of Xnew do 4 if rand(0, 1) ≥ unif ormRate then 5 Xnew (i) = X1 (i) 6 else 7 Xnew (i) = X2 (i) 8 end 9 end 10 return Xnew 4.5 Twin Removal We have removed and reinitialized individuals with identical genetic information. We have defined the similarity measure between two individuals as follows: Similarity(X1 , X2 ) = e− kX1 −X2 k2 2σ 2 (2) Here, the value of σ has been chosen to be 75. The Similarity(X1 , X2 ) function will return a value in the range [0,1]. The more the value of the similarity function is closer to 1, the more genetically similar are X1 and X2 . We have chosen 0.8 as the threshold to define similarity between two individual. If Similarity(X1 , X2 ) >= 0.8, we declare that X1 and X2 are twins and reinitialize randomly one of them. We have run the this Twin Removal procedure after every 100 generations of evolution. Algorithm 5: Twin Removal 1 similarityT hreshold = 0.8 2 for each pair of individuals (Xi , Xj ) in the population do 3 if Similarity(Xi , Xj ) ≥ similarityT hreshold then 4 declare Xi and Xj as Twins 5 reinitialize Xj 6 end 7 end 4.6 Random Restart If the algorithm does not show enough improvement within a significant number of generations, we reinitialize some individuals of the population with random values within the search space. We have evaluated the improvement over the immediate past 50 generations. If the improvement in the last 50 generations is less than or equal to a threshold, t = 0.001, we initiate the random restart procedure. 7 5 Experimental Results We have implemented GreMuTRRR in Java programming language using JDK 1.6 and have run our experiments on an Intel 3.3GHz core i3 machine with 2GB RAM. We compared the performance of GreMuTRRR with a basic genetic algorithm without considering the greedy mutation, twin removal and random restart. We denote this algorithm as ‘Basic GA’ henceforth. Basic GA differs with GreMuTRRR given in Algorithm 1 in Lines 27–36 since it does not contain twin removal and random restart and in Line 3, as the parameter greedyM utationRate = 0.0 for Basic GA. All other parameters were kept same for the sake of fair comparison. 5.1 Benchmark We have considered two sets of protein instances for our experiments: one considering only the backbone atoms (backbone only) and another containing all atoms (full atomic). These are larger protein benchmarks introduced in [18]. We extracted the structures from PDB website [19] and have calculated the distance among pair of atoms. Lower and upper bounds of the distances are calculated using the following equation: lij = (1 − )dˆij , uij = (1 + )dˆij (3) Here, dˆij is the real distance between point ci and point cj in the known structure of the protein sequence and  = 0.8. To make the dataset sparse, we took only 30% of the distances that are less or equal to 6Å. 5.2 Results The largest distance error (LDE) values for our algorithm and Basic GA for backbone only instances and full atomic instances are given in Table 1 and Table 2 respectively. Each protein is reported with its corresponding PDB id and number of atoms in the structure considered. Table 1: Best Fitness for population size 50 with run of 2000 generations(with backbone atoms only) Protein Id V Basic GA GreMuTRRR 1PTQ 50 0.49546 0.44977 1LFB 77 0.18060 0.13360 1F39 101 0.06595 0.02051 1AX8 130 0.06064 0.00253 1RGS 264 0.12380 0.00297 1TOA 277 0.12993 0.00156 1KDH 356 0.19119 0.00458 1BPM 481 0.34434 0.00441 1MQQ 679 0.58863 0.00894 8 Table 2: Best Fitness for population size 50 with run of 1500 generations(including all atoms) Protein Id V Basic GA GreMuTRRR 1PTQ 402 0.71000 0.17224 1LFB 641 0.97121 0.31463 1F39 767 1.81091 0.16805 1AX8 1003 2.52303 0.43211 Figure 1: Search progress for two algorithms for the protein 1AX8. 5.3 Analysis From the results presented in the tables it is evident that for both of the instances GreMuTRRR achieves better solutions compared to the Basic GA algorithm for the proteins. However, the improvement is more clearly shown in Figure 1. GreMuTRRR significantly lowers the objective function LDE before both algorithms gets stuck and can not improve further. Its interesting to note thatGreMuTRRR is able to converge very early (≤ 50 generation) compared to the Basic GA. 6 Conclusion In this paper, we presented a new genetic algorithm to solve the molecular distance geometry for protein structure determination problem using NMR data. We use a greedy mutation operator to intensify the search, a twin removal technique for diversification in the population and a random restart method to recover stagnation. On a standard set of benchmark dataset, our algorithm significantly outperforms standard genetic algorithms. In future, we want to implement a web service based on our method and make it public to be used by biologists. References [1] M. Souza, C. Lavor, A. Muritiba, and N. Maculan, “Solving the molecular distance geometry problem with inaccurate distance data,” BMC bioinformatics, vol. 14, no. Suppl 9, p. S7, 2013. [2] L. Liberti, C. Lavor, N. Maculan, and A. Mucherino, “Euclidean distance geometry and applications,” SIAM Review, vol. 56, no. 1, pp. 3–69, 2014. [3] D. Wu and Z. Wu, “An updated geometric build-up algorithm for solving the molecular distance geometry problems with sparse distance data,” Journal of Global Optimization, vol. 37, no. 4, pp. 661–673, 2007. 9 [4] A. Mucherino, L. Liberti, C. Lavor, and N. Maculan, “Comparisons between an exact and a metaheuristic algorithm for the molecular distance geometry problem,” in Proceedings of the 11th Annual conference on Genetic and evolutionary computation. ACM, 2009, pp. 333–340. [5] L. Liberti, C. Lavor, A. Mucherino, and N. Maculan, “Molecular distance geometry methods: from continuous to discrete,” International Transactions in Operational Research, vol. 18, no. 1, pp. 33–51, 2011. [6] J. J. Moré and Z. Wu, “Distance geometry optimization for protein structures,” Journal of Global Optimization, vol. 15, no. 3, pp. 219–234, 1999. [7] C. Lavor, L. Liberti, and N. Maculan, “Computational experience with the molecular distance geometry problem,” in Global Optimization. Springer, 2006, pp. 213–225. [8] G. M. Crippen and T. F. Havel, Distance geometry and molecular conformation. Taunton, UK, 1988, vol. 74. Research Studies Press [9] C. Savarese, J. M. Rabaey, and J. Beutel, “Location in distributed ad-hoc wireless sensor networks,” in Acoustics, Speech, and Signal Processing, 2001. Proceedings.(ICASSP’01). 2001 IEEE International Conference on, vol. 4. IEEE, 2001, pp. 2037–2040. [10] D. Tolani, A. Goswami, and N. I. Badler, “Real-time inverse kinematics techniques for anthropomorphic limbs,” Graphical models, vol. 62, no. 5, pp. 353–388, 2000. [11] J. B. Tenenbaum, V. De Silva, and J. C. Langford, “A global geometric framework for nonlinear dimensionality reduction,” Science, vol. 290, no. 5500, pp. 2319–2323, 2000. [12] J. J. Moré and Z. Wu, “Global continuation for distance geometry problems,” SIAM Journal on Optimization, vol. 7, no. 3, pp. 814–836, 1997. [13] L. Liberti and S. Kucherenko, “Comparison of deterministic and stochastic approaches to global optimization,” International Transactions in Operational Research, vol. 12, no. 3, pp. 263–285, 2005. [14] L. Liberti and M. Drazic, “Variable neighbourhood search for the global optimization of constrained nlps,” in Proceedings of GO Workshop, Almeria, Spain, vol. 2005, 2005. [15] L. Liberti, C. Lavor, N. Maculan, and F. Marinelli, “Double variable neighbourhood search with smoothing for the molecular distance geometry problem,” Journal of Global Optimization, vol. 43, no. 2-3, pp. 207–218, 2009. [16] Q. Dong and Z. Wu, “A geometric build-up algorithm for solving the molecular distance geometry problem with sparse distance data,” Journal of Global Optimization, vol. 26, no. 3, pp. 321–333, 2003. [17] B. Hendrickson, “The molecule problem: Exploiting structure in global optimization,” SIAM Journal on Optimization, vol. 5, no. 4, pp. 835–857, 1995. [18] P. Biswas, K.-C. Toh, and Y. Ye, “A distributed sdp approach for large-scale noisy anchor-free graph realization with applications to molecular conformation,” SIAM Journal on Scientific Computing, vol. 30, no. 3, pp. 1251–1277, 2008. [19] H. M. Berman, J. D. Westbrook, Z. Feng, G. Gilliland, T. N. Bhat, H. Weissig, I. N. Shindyalov, and P. E. Bourne, “The protein data bank,” Nucleic Acids Research, vol. 28, no. 1, pp. 235–242, 2000. 10
5cs.CE
arXiv:1705.00465v1 [math.ST] 1 May 2017 Maximum likelihood estimators based on the block maxima method Clément Dombry Univ. Bourgogne Franche-Comté, Laboratoire de Mathématiques de Besançon, UMR CNRS 6623, 16 route de Gray, 25030 Besançon cedex, France. Email: [email protected] and Ana Ferreira∗ Instituto Superior Técnico, Universidade de Lisboa, Av. Rovisco Pais 1049-001 Lisboa, Portugal. Email: [email protected] May 2, 2017 Abstract The extreme value index is a fundamental parameter in univariate Extreme Value Theory (EVT). It captures the tail behavior of a distribution and is central in the extrapolation beyond observed data. Among other semi-parametric methods (such as the popular Hill’s estimator), the Block Maxima (BM) and Peaks-Over-Threshold (POT) methods are widely used for assessing the extreme value index and related normalizing constants. We provide asymptotic theory for the maximum likelihood estimators (MLE) based on the BM method. Our main result is the asymptotic normality of the MLE with a non-trivial bias depending on the extreme value index and on the so-called second order parameter. Our approach combines asymptotic expansions of the likelihood process and of the empirical quantile process of block maxima. The results permit to complete the comparison of most common semiparametric estimators in EVT (MLE and probability weighted moment estimators based on the POT or BM methods) through their asymptotic variances, biases and optimal mean square errors. Key words: asymptotic normality, block maxima method, extreme value index, maximum likelihood estimator, peaks-over-threshold method, probability weighted moment estimator. AMS Subject classification: 62G32, 62G20, 62G30. 1 1 Introduction The Block Maxima (BM) method, also known as Annual Maxima, after Gumbel [11] is a fundamental method in Extreme Value Theory and has been widely used. The method is justified under the Maximum Domain of Attraction (MDA) condition: for an independent and identically distributed (i.i.d.) sample with distribution function F , if the linearly normalized partial maxima converges in distribution, then the limit must be a Generalized Extreme Value (GEV) distribution. In practice, one rarely exactly knows F but the MDA condition holds for most common continuous distributions. In the BM method, the initial sample is divided into blocks of the same size and the MDA condition ensures that the block maxima are approximately GEV distributed. The method is commonly used in hydrology and other environmental applications or in insurance and finance when analysing extremes - see e.g. the monographs by Embrechts et al. [9], Coles [5], Beirlant et al. [2], de Haan and Ferreira [6] and references therein. The GEV is a three parameter distribution, with the usual location and scale parameters, and the extreme value index being the main parameter as it characterizes the heaviness of the tail. Several estimation methods have been proposed, including the classical maximum likelihood (ML) and probability weighted moments (PWM) estimators (Hosking et al. [13]). The asymptotic study of these estimators has been established for a sample from the GEV distribution and asymptotic normality holds with null bias and explicit variance (Prescott and Walden [15], Hosking et al. [13], Smith [17], Bücher and Segers [4]). The theory is made quite difficult and technical by the fact that the support of the GEV is varying with respect to its parameters. Regularity in quadratic mean of the GEV model has been proven only recently by Bücher and Segers [4] and we provide here a different and somewhat simpler proof (cf. Proposition 4.1). However, in applications, the sample block maxima are only approximately GEV so that the classical parametric theory suffers from model misspecification. In this paper, we intend to fill this gap for ML estimators (MLE), by showing asymptotic normality under a flexible second order condition (a refinement of the MDA condition). Depending on the asymptotic block size, a non trivial bias may appear in the limit for which we provide an exact expression. Recently Ferreira and de Haan [10] showed asymptotic normality of the PWM estimators under the same conditions. They derived a uniform expansion for the empirical quantile of block maxima that is a crucial tool in our approach as well. Indeed, the MLE can be seen as a maximizer of the so-called likelihood process. Expressing the likelihood process in terms of this empirical quantile process, we are able to derive an expansion of the likelihood process that implies the asymptotic normality of the MLE. This derivation is again made quite technical by the fact that the support of the GEV is varying. Note that the asymptotic normality for the MLE of a Fréchet distribution based on the block maxima of a stationary heavy-tailed time series has been obtained by Bücher and Segers [3]. There the issue of parameter dependent supports is avoided but time dependence has to be dealt with. Besides, the ideas underlying their proof are quite different. The asymptotic normality result in the present paper brings novel results to the theoretical comparison of the main semi-parametric estimation procedures in EVT. On the one hand it permits to compare BM and Peaks-over-Threshold (POT) 2 methods (see e.g. Balkema and de Haan [1], Pickands [14]), the latter being another fundamental method in EVT and concurrent with BM. We discuss and compare the four different approaches – MLE/PWM estimators in the BM/POT approaches – based on exact theoretical formulas for asymptotic variances, biases and optimal mean square errors depending on the extreme value index and the second order parameter. It turns out that MLE under BM has minimal asymptotic variance among all combinations MLE/PWM and BM/POT but, on the other hand it has some significant asymptotic bias. When analysing the asymptotic optimal mean square error that balances variance and bias, the most efficient combination turns out to be MLE under POT (e.g. Drees, Ferreira and de Haan 2004). It turns out that the optimal sample size is larger for POT-MLE than for BM-MLE, giving a theoretical justification to the heuristic that POT allows for a better use of the data than BM. The outline of the paper is as follows: In Section 2 we present the main theoretical conditions and results including Theorem 2.2 giving the asymptotic normality of the MLE. In Section 3 we present a comparative study of asymptotic variances and biases, optimal asymptotic mean square errors and optimal samples sizes among all combinations MLE/PWM and BM/POT. In Section 4 we state additional theoretical statements, including the local asymptotic normality of MLE under the fully parametric GEV model, and provide all the proofs. Finally, Appendix A gathers some formulas for the information matrix and for the bias of BM-MLE and Appendix B provides useful bounds for the derivatives of the likelihood function that are necessary for the main proofs. 2 2.1 Asymptotic behaviour of MLE Framework and notations The GEV distribution with index γ is defined by   Gγ (x) = exp −(1 + γx)−1/γ , 1 + γx > 0, and the corresponding log-likelihood by  −(1 + 1/γ) log(1 + γx) − (1 + γx)−1/γ gγ (x) = −∞ otherwise. if 1 + γx > 0 (2.1) For γ = 0, the formula is interpreted as g0 (x) = −x−exp(−x). The three parameter model with index γ, location µ and scale σ > 0 is defined by the log-likelihood   x−µ `(θ, x) = gγ − log σ, θ = (γ, µ, σ). (2.2) σ A distribution F is said to belong to the max-domain of attraction of the extreme value distribution Gγ0 , denoted by F ∈ D(Gγ0 ), if there exist normalizing sequences am > 0 and bm such that lim F m (am x + bm ) = Gγ0 (x), m→+∞ for all x ∈ R. The main aim of the BM method is to estimate the extreme value index γ as well as the normalizing constants am and bm . The set-up is the following. Consider 3 independent and identically distributed (i.i.d.) random variables (Xi )i≥1 with common distribution function F ∈ D(Gγ0 ). Divide the sequence (Xi )i≥1 into blocks of length m ≥ 1 and define the k-th block maximum by Mk,m = max (k−1)m<i≤km Xi , k ≥ 1. (2.3) For each m ≥ 1, the variables (Mk,m )k≥1 are i.i.d. with distribution function F m and by the max-domain of attraction condition Mk,m − bm d −→ Gγ0 am as m → +∞. (2.4) This suggests that the distribution of Mk,m is approximately a GEV distribution with parameters (γ0 , bm , am ). The method consists in pretending that the sample follows exactly the GEV distribution and in maximizing the GEV log-likelihood so as to compute the MLE. A particular feature of the method is that the model is clearly misspecified since the GEV distribution appears as the limit distribution of the block maxima as the block size m tends to +∞ while in practice we have to use a finite block size. As seen afterwards, we quantify the misspecification thanks to the so-called second order condition that implies an asymptotic expansion of the empirical quantile process with a non trivial bias term. When plugging this expansion in the ML equations, we obtain a bias term for the likelihood process as well as for the MLE. The (misspecified) log-likelihood of the k-sample (M1,m , . . . , Mk,m ) is Lk,m (θ) = k X `(θ, Mi,m ), θ = (γ, µ, σ) ∈ Θ = R × R × (0, +∞). (2.5) i=1 We say that an estimator θbn = (b γn , µ bn , σ bn ) is a  ∂   ∂γ Lk,m (γ, µ, σ) ∂ ∂µ Lk,m (γ, µ, σ)   ∂ L (γ, µ, σ) ∂σ k,m MLE if it solves the score equations = 0 = 0 = 0, which we write shortly in vectorial notation ∂Lk,m (θ) = 0. ∂θ (2.6) A main purpose of this paper is to study the existence and asymptotic normality of the MLE under the following conditions: • First order condition: 1 F ∈ D(Gγ0 ) with γ0 > − . 2 Note that the also called first order condition (2.4) is equivalent to V (mx) − V (m) xγ0 − 1 = , m→∞ am γ0 lim x > 0, with V = (−1/ log F )← . W.l.g., we can take bm = V (m) in Equation 2.4, what we shall assume in the following. 4 • Second order condition: for some positive function a and some positive or negative function A with limt→∞ A(t) = 0, lim t→∞ V (tx)−V (t) a(t) − xγ0 −1 γ0 A(t) Z x γ0 −1 Z s s = uρ−1 duds = Hγ0 ,ρ (x), x > 0, (2.7) 1 1 with γ0 > − 21 . Note that necessarily ρ ≤ 0 and |A| is regularly varying with index ρ. • Asymptotic growth for the number k of blocks and the block size m: √ k = kn → ∞, m = mn → ∞ and kA(m) → λ ∈ R, as n → ∞. 2.2 (2.8) Main results Before considering the MLE, we focus on the asymptotic properties of the likelihood and score processes. For the purpose of asymptotic we introduce the local parameter h = (h1 , h2 , h3 ) ∈ R3 : √ √    h1 = √k (γ − γ0 )  γ = γ0 + h1 / k √ ⇔ (2.9) h = √k(µ − bm )/am µ = bm + am h2 /√ k  2  k (σ/am − 1) σ = am (1 + h3 / k). h3 = Set θ0 = (γ0 , 0, 1). The local log-likelihood process at θ0 is given by   h1 h2 h3 e k,m (h) = Lk,m γ0 + √ L , bm + am √ , am + am √ k k k   k X h Mi,m − bm − k log(am ), = ` θ0 + √ , am k (2.10) i=1 and, the local score process by e k,m ∂L (h) = ∂h =   k 1 X ∂` h Mi,m − bm √ θ0 + √ , am k i=1 ∂θ k 1 ∂Lk,m √ (θ). k ∂θ (2.11) e ∂L k,m Clearly, the score equation (2.6) rewrites in this new variable as ∂h (h) = 0. In the following, Qγ0 denote the quantile function of the extreme value distribution Gγ0 , i.e. (− log s)−γ0 − 1 Qγ0 (s) = , s ∈ (0, 1). (2.12) γ0 Proposition 2.1. Assume conditions (2.7) and (2.8). Let r = rn → ∞ be a sequence of positive numbers verifying, as n → ∞, rn = O(knδ ) with 0 < δ < min(1/2, γ0 + 1/2). (2.13) Let Hn ⊂ R3 be the ball of center 0 and radius rn . Then, uniformly for h ∈ Hn , e k,m ∂2L (h) = −Iθ0 + oP (1) ∂h∂hT 5 (2.14) with Iθ0 the Fisher information matrix Z 1 ∂2` Iθ0 = − (θ0 , Qγ0 (s)) ds. T 0 ∂θ∂θ (2.15) e k,m is strictly concave on Hn with As a consequence, the local log-likelihood process L high probability. Remark 2.1. The conditions in Proposition 2.1 are sufficient for consistency of √ MLE, see Dombry [7]. In particular kA(m) → λ ∈ R implies m/ log n → ∞, the later required for consistency. When γ0 ≥ 0, condition (2.13) implies that (2.14) holds for h = o(k 1/2−ε ), ε > 0. Our main result is the following Theorem establishing the asymptotic behavior of the local likelihood process and from which the existence and asymptotic normality of MLE will be deduced. Theorem 2.1. Assume conditions (2.7) and (2.8). Then, the local likelihood process satisfies uniformly for h in compact sets e k,m − 1 hT Iθ h + oP (1), e k,m (h) = L e k,m (0) + hT G L 0 2 e k,m ∂L e k,m − Iθ h + oP (1), (h) = G 0 ∂h where   k Mi,m − bm 1 X ∂` d e Gk,m = √ θ0 , −→ N (λb, Iθ0 ) am k i=1 ∂θ (2.16) (2.17) (2.18) i.e., is asymptotically Gaussian with variance equal to the information matrix and mean depending on the second order condition (2.7) through   Z 1 2 ∂ ` 1 (θ0 , Qγ0 (s)) Hγ0 ,ρ ds (2.19) b = b(γ0 , ρ) = − log s 0 ∂x∂θ and on the asymptotic block size through λ from (2.8). Remark 2.2. Explicit formulas for the Fisher information matrix Iθ0 have been given by Prescott and Walden [15] (see also Beirlant et al. [2] page 169). The vector b given by the integral representation (2.19) can also be computed explicitly. Formulas are provided in Appendix A. Remark 2.3. Equation (2.8) requires that both the number of blocks k and the block size m go to infinity with a relative rate measured by the second order scaling function A and a parameter λ. When λ = 0, the bias term disappears in (2.18); this corresponds to the situation where m grows to infinity very quickly with respect to k so that the block size is large enough and the GEV approximation (2.4) is very good. Existence and asymptotic normality of the MLE can be deduced from Theorem 2.1, mainly by the argmax theorem. The concavity property stated in Proposition 2.1 plays an important role in the proof of existence and uniqueness. Theorem 2.2. Assume conditions (2.7) and (2.8). 6 (a) There exists a sequence of estimators θbn = (b γn , µ bn , σ bn ), n ≥ 1, such that h i lim P θbn is a MLE = 1 (2.20) n→+∞ and √   µ bn − bm σ bn d k γ bn − γ0 , , − 1 −→ N (λIθ−1 b, Iθ−1 ). 0 0 am am (2.21) (b) If θbni = (b γni , µ bin , σ bni ), i = 1, 2,are two sequences of estimators satisfying h i lim P θbni is a MLE = 1 n→+∞ and  lim P n→+∞ √    µ bin − bm σ bni i k γ bn − γ0 , , − 1 ∈ Hn = 1, am am then θbn1 and θbn2 are equal with high probability, i.e. h i lim P θbn1 = θbn2 = 1. n→+∞ Remark 2.4. An interesting by-product of the strict concavity stated in Proposition 2.1 is the convergence of numerical procedures for the computation of the MLE that are implemented in software. The Newton-Raphson algorithm is commonly used to solve numerically the score equation (2.6). Strict concavity of the objective function on a large neighbourhood of the solution ensures convergence of the algorithm with high probability as soon as the initial value θ = (γ, µ, σ) belongs to this neighbourhood. 3 Theoretical comparisons: BM vs POT and MLE vs PWM The POT method uses observations above some high threshold or top order statistic and the underlying approximate model is the Generalized Pareto distribution (Balkema and de Haan [1], Pickands [14]). Estimators of the shape parameter γ, as well as location and scale parameters have been proposed and widely studied, including MLE and PWM (Hosking and Wallis [12]). For their asymptotic properties - under basically the same conditions as under BM in Theorem 2.2 - we refer to de Haan and Ferreira [6]. Asymptotic normality of PWM estimators under BM has been established only recently by Ferreira and de Haan [10] and a comparison of PWM estimators under BM and POT has been carried out. The aim of the present section is to include our new asymptotic results for MLE estimators under BM, completing the picture in the comparison of the four different cases BM/POT and MLE/PWM. Recall that asymptotic normality of MLE (resp. PWM estimator) holds for γ > −1/2 (resp. γ < 1/2). The number k of selected observations corresponds to the number of blocks in BM and of selected top order statistics in POT. Similarly as in Ferreira and de Haan [10], our comparative study is restricted to the range ρ ∈ [−1, 0] where second order conditions for BM and POT are comparable (cf. Drees et al. [8] or Ferreira and de Haan [10]). In the following we compare MLE/PWM under BM/POT methods through their: (i) asymptotic variances (VAR), (ii) asymptotic biases (BIAS), (iii) optimal asymptotic mean square errors (AMSE) and optimal number of observations minimizing AMSE (k0 ). 7 Var 6 5 VarPOTpwm 4 VarPOTmle 3 VarBMpwm VarBMmle 2 1 -1.0 -0.5 0.5 1.0 gamma Figure 1: Asymptotic variances of estimators of the extreme value index γ. The straight lines corresponds to the MLE under BM and POT while the dashed lines correspond to PWM under BM and POT. POT mle BM mle Figure 2: Asymptotic bias of estimators of the extreme value index γ: blue color for BM and orange for POT. (i) Asymptotic variances The asymptotic variance depends on γ only and is plotted in Figure 1 where straight lines stand for MLE and dashed lines for PWM estimators. Among all four different cases, BM-MLE is the one with the smallest variance within its range. Moreover, for both estimators, BM has the lowest variance indicating that BM is preferable to POT when variance is concerned. (ii) Asymptotic biases The asymptotic biases depend on γ and ρ and are shown in Figures 2–3: POT-MLE is the one with the smallest bias also in absolute value when compared to BM-MLE, contrary to what was observed for variance. This is in agreement with what has been observed when comparing BM-PWM and POT-PWM, also shown in Figures 2–3 already analysed in Ferreira and de Haan [10]. There is again the indication that POT method is favourable to BM when concerning bias. (iii) Optimal asymptotic MSEs and optimal number of observations Another way to compare the estimators that combines both variance and bias information is through mean square error. One can compare these for the optimal number of observations k0 i.e., that value for which the asymptotic mean square error (AMSE) is minimal. Similarly as in Ferreira and de Haan [10], under the 8 (a) MLE (b) PWM Figure 3: Ratios of asymptotic bias: BIASP OT /BIASBM . POT POT BM BM 0.9 0.4 0.1 1 0.8 0.2 0.6 0.4 0.0 gamma gamma 0.4 0.3 0.2 0.6 1.4 -0.2 1.2 -0.4 0.0 -0.6 0.7 -0.2 1.3 -0.8 -0.4 0.2 0.5 -1.0 -0.8 -0.6 1.1 -0.4 -0.2 0.0 -1.0 rho -0.8 -0.6 -0.4 -0.2 0.0 rho (a) MLE (b) PWM Figure 4: Contour plot of ratios of optimal AMSE: AMSEP OT /AMSEBM . conditions of Theorem 2.2, we have k0 ∼ n  1 ← (n) s  VAR2 (γ) BIAS2 (γ, ρ) 1/(1−2ρ) , n → ∞, 2 with R ∞ s(·) a decreasing and 2ρ − 1 regularly varying function such that A (t) = t s(u) du. It follows in particular that the optimal k0 is different but of the same order for both estimators and methods. As for the optimal AMSE, we have AMSE ∼ 1/(1−2ρ) 1 − 2ρ (1/s)← (n) BIAS2 (γ, ρ) (VAR(γ))−2ρ/(1−2ρ) , −2ρ n n → ∞. When considering ratios of optimal AMSE (or optimal number k0 of selected observations), the regularly varying function cancels out and the asymptotic ratio does not depend on n but only on γ and ρ. Figure 4 shows the contour plots of the ratio AMSEP OT /AMSEBM for MLE and PWM estimators. It is surprising to see a reverse behaviour in both cases: in the range of parameters considered, POT is preferable when MLE are considered, while BM is mostly preferable for PWM estimators. 1/(1−2ρ) In Figure 5 are shown BIAS2 (γ, ρ) (VAR(γ))−2ρ/(1−2ρ) for comparing optimal AMSE among all combinations. The green surface corresponds to MLEPOT that has always the minimal optimal AMSE in the range of parameters considered. Finally, Figure 6 reports for MLE the asymptotic ratio of optimal numbers 9 k0POT/k0BM 20 10 0.4 30 15 5 gamma 0.2 0.0 -0.2 25 -0.4 -1.0 -0.8 -0.6 -0.4 -0.2 Figure 5: Comparison of optimal AMSE: the lowest green surface corresponds to MLE-Figure 6: Asymptotic ratio of optimal sizes: POT. k0,P OT /k0,BM . rho of selected observations, that is k0,P OT /k0,BM . We can see that the optimal number of observations is larger for POT, which is in agreement with the PWM case considered in previous studies. 4 Main proofs We start by introducing some material that will be useful for the proofs. More technical material is still postponed to Appendices. 4.1 Local asymptotic normality of the GEV model If the observations (Xi )i≥1 are exactly GEV(γ0 , µ0 , σ0 ) distributed, then the choice of constants mγ0 − 1 am = σ0 mγ0 and bm = µ0 + σ0 (4.1) γ0 ensures that the normalised block maxima ((Mi,m − bm )/am )k≥1 are i.i.d. with distribution Gγ0 . The issue of model misspecification is irrelevant in that particular case. In this simple i.i.d. setting, a key property in the theory of ML estimation is differentiability in quadratic mean (see e.g. van der Vaart [18, Chapter 7]). A statistical model defined by the family of densities {pθ (x), θ ∈ Θ} is called differentiable in quadratic mean at the point θ0 if there exists a measurable function `˙θ0 called the score function such that 2 Z q q q 1 T˙ pθ0 +h (x) − pθ0 (x) − h `θ0 (x) pθ0 (x) dx = o(khk2 ), as h → 0. 2 R The following Proposition corresponds to Proposition 3.2 in Bücher and Segers [4]. We provide a slightly different proof in the case −1/2 < γ0 ≤ −1/3. Proposition 4.1. The three parameter GEV model with log-likelihood `(θ, x) defined in Equation (2.2) is differentiable in quadratic mean at θ0 = (γ0 , σ0 , µ0 ) ∈ Θ if and ∂` only if γ0 > −1/2. The score function is then given by `˙θ0 (x) = ∂θ (θ0 , x). Proof of Proposition 4.1. The density of the 3-parameter GEV model is given by !     x − µ −1−1/γ x − µ −1/γ pθ (x) = 1 + γ exp − 1 + γ σ σ 10 if 1 + γ x−µ σ > 0 and 0 otherwise. In the case γ0 > −1/3, the function θ ∈ (−1/3, +∞) × R × (0, +∞) 7→ p pθ (x) is continuously differentiable for every x ∈ R and the information matrix θ 7→ Iθ is well defined and continuous (see Appendix A or Beirlant et al. [2] page 169). Differentiability in quadratic mean of the GEV model follows by a straightforward application of Lemma 7.6 in Van der Vaart [18]. p In the case γ0 ∈ (−1/2, −1/3], the function θ 7→ pθ (x) is not differentiable at points such that 1 + γ x−µ σ = 0. Going back to the definition of differentiability in quadratic mean, we need to show that #2 p p Z "p ∂` (θ0 , x) pθ0 (x) pθ0 +h (x) − pθ0 (x) − 12 hT ∂θ lim dx = 0. h→0 R khk (4.2) This is credible because for all x 6= µ − σ/γ, the relation p q ∂ pθ (x) 1 ∂` = (θ0 , x) pθ0 (x) ∂θ 2 ∂θ θ=θ0 entails p p p ∂` (θ0 , x) pθ0 (x) pθ0 +h (x) − pθ0 (x) − 21 hT ∂θ lim = 0. h→0 khk For further reference, we note also that, for x 6= µ − σ/γ, p q ∂ 2 pθ (x) 1 ∂` ∂` 1 ∂2` = p (x) (θ , x) (θ , x) + p (x) (θ0 , x). 0 0 θ θ0 ∂θ∂θT θ=θ0 4 0 ∂θ ∂θT 2 ∂`θ∂θT (4.3) A rigorous proof of (4.2) is given below. Since γ0 < 0, we have γ0 + h < 0 for h = (h1 , h2 , h3 ) in a neighbourhood of 0 so that the density pθ0 +h vanishes outside (−∞, xh ) with xh = (µ0 + h2 ) − (σ0 + h3 )/(γ0 + h1 ) the right endpoint of the distribution GEV(γ0 +h1 , µ0 +h2 , σ0 +h3p ). We also introduce xh = min0≤u≤1 xuh . For all x < xh , the function u ∈ [0, 1] 7→ pθ0 +uh (x) is twice continuously differentiable, whence Taylor formula entails ! p q q q 1 T ∂` 1 T ∂ 2 pθ (x) pθ0 +h (x) − pθ0 (x) − h (θ0 , x) pθ0 (x) = h h 2 ∂θ 2 ∂θ∂θT θ=θ0 +vh for some v = v(h, x) ∈ [0, 1]. Together with Equation (4.3), the formula (a + b)2 ≤ 2(a2 + b2 ) and Proposition B.1, this yields the upper bound "p #2 p p ∂` (θ0 , x) pθ0 (x) pθ0 +h (x) − pθ0 (x) − 12 hT ∂θ khk "  4  2 # 2 1 2 T ∂` T ∂ ` ≤ pθ0 +vh (x) h (θ0 + vh, x) + 4pθ0 +vh (x) h (θ0 + vh, x)h 32khk2 ∂θ ∂θ∂θT h ≤Ckhk2 pθ0 +vh (x)2 max(z(θ0 + vh, x)γ0 −ε , z(θ0 + vh, x)1+ε )4 i + pθ0 +vh (x) max(z(θ0 + vh, x)2γ0 −ε , z(θ0 + vh, x)1+ε )2 11 for all x < xh and h small enough. This entails #2 p p Z xh " p ∂` (θ0 , x) pθ0 (x) pθ0 +h (x) − pθ0 (x) − 21 hT ∂θ dx = 0. lim h→0 −∞ khk (4.4) It remains to estimate the contribution of the integral between xh and +∞. Recall that pθ0 +h (x) vanishes for x ≥ xh . We have  2   Z +∞ q 1 x h − µ0 1 pθ0 (x) dx = 1 − Gγ0 , khk2 xh khk2 σ0    2 Z +∞ q 1 xh − µ0 − h2 1 1 − Gγ0 +h1 , pθ0 +h (x) dx = khk2 xh khk2 σ0 + h3 2 Z +∞  Z x0 q 2 1 ∂` T ∂` h p (x) (θ , x) dx ≤ (θ , x) pθ0 (x)dx. 0 0 θ 0 khk2 xh ∂θ ∂θ xh The first and second integral converge to 0 as h → 0 because xh − x0 = O(khk) and γ0 > −1/2. The third integral converges also to 0 because xh → x0 and γ0 > −1/2 so that the score is square integrable (its covariance matrix is Iθ0 ). We deduce #2 p p Z +∞ " p ∂` pθ+h (x) − pθ (x) − 12 hT ∂θ (θ, x) pθ (x) dx = 0. (4.5) lim h→0 x khk h Equations (4.4) and (4.5) imply (4.2). The fact that differentiability in quadratic mean does not hold when γ0 ≤ −1/2 is proved in Bücher and Segers [4] Appendix C. They observe that for γ0 ≤ −1/2, Z +∞ −2 lim inf khk 1{pθ0 (x)=0} pθ0 +h (x)dx > 0 h→0 R which rules out differentiability in quadratic mean. We omit further details here. Differentiability in quadratic mean implies that the score function is centered with finite variance equal to the information matrix, i.e. Z Z ˙`θ (x)pθ (x)dx = 0 and `˙θ0 (x)`˙θ0 (x)T pθ0 (x)dx = Iθ0 . (4.6) 0 0 R R Another important consequence of differentiability in quadratic mean is the local asymptotic normality property of the local score process. The following Corollary follows from Proposition 4.1 by a direct application of Theorem 7.2 in Van der Vaart [18]. Corollary 4.1. Assume that F = GEV(γ0 , µ0 , σ0 ) with γ0 > −1/2 and that the constants am > 0, bm ∈ R are given by (4.1). Then the local log-likelihood process (2.10) satisfies 1 T ee e k,m (h) = L e k,m (0) + hT G L k,m − h Iθ0 h + oP (1) 2 where   k Mi,m − bm 1 X ∂` d ee Gk,m = √ θ0 , −→ N (0, Iθ0 ). am k i=1 ∂θ Note the similarity between Theorem 2.1 and Corollary 4.1. In Theorem 2.1 however, the oP (1) is uniform on compact sets and the model misspecification F ∈ e k,m . D(Gγ0 ) results in a bias term λb for the asymptotic distribution G 12 4.2 The empirical quantile process associated to BM The starting point of the proof of Proposition 2.1 and Theorem 2.1 is to rewrite the local log-likelihood process (2.10) in terms of the (normalized) empirical quantile process Mdkse:k,m − bm Qk,m (s) = , 0 < s < 1, (4.7) am where M1:k,m ≤ · · · ≤ Mk:k,m are the order statistics of the block maxima sample (Mk,m )1≤k≤m defined by (2.3) and dxe denotes the smallest integer larger than or equal to x. The local log-likelihood process (2.10) can be rewritten as  Z 1  h e ` θ0 + √ , Qk,m (s) ds. Lk,m (h) = k (4.8) k 0 Convergence (2.4) ensures the convergence of the empirical quantile process Qk,m to the “true” quantile function Qγ0 defined in (2.12). The following expansion of the empirical quantile process is taken from Ferreira and de Haan [10], Theorem 2.1. Proposition 4.2. Assume conditions (2.7) and (2.8). For a specific choice of the second order auxiliary functions a and A in (2.7),   √ Bk (s) 1 k (Qk,m (s) − Qγ0 (s)) = + λHγ0 ,ρ + Rk,m (s) (4.9) s(− log s)γ0 +1 − log s where Bk , k ≥ 1, denotes an appropriate sequence of standard Brownian bridges and the remainder term Rk,m satisfies, for 0 < ε < 1/2, Rk,m (s) = s−1/2−ε (1 − s)−1/2−γ0 −ρ−ε oP (1) h i 1 k uniformly for s ∈ k+1 , k+1 . (4.10) Remark 4.1. For Proposition 4.2, the auxiliary functions a and A have to be specially chosen for establishing uniform second order regular variation bounds refining (2.7), see Lemma 4.2 in [10]. However, this choice is useful for the proofs only and is irrelevant for the statements of the main results in Section 2.2. The following Proposition provides useful technical bounds for the proof of the main results. Proposition 4.3. Assume conditions (2.7) and (2.8). Then, as n → ∞, √ ! √ Q (s) − h / k 2 k,m √ (− log s)γ0 1 + (γ0 + h1 / k) = eOP (1) 1 + h3 / k and √ −1 (− log s) uniformly for s ∈ √ !−1/(γ0 +h1 / √ Qk,m (s) − h2 / k √ 1 + (γ0 + h1 / k) 1 + h3 / k h k 1 k+1 , k+1 i k) and h ∈ Hn as in Proposition 2.1. For the proof of Proposition 4.3, we need the following Lemma. 13 = eOP (1) Lemma 4.1. Let Z1:k < . . . < Zk:k be the order statistics of i.i.d random variables Z1 , . . . , Zk with standard Fréchet distribution. Then,  log (− log s)Zdkse:k = OP (1) where the OP (1)−term is uniform for s ∈ h 1 k k+1 , k+1 i . Proof of Lemma 4.1. An equivalent statement is, with U standard uniform,   − log Udkse:k = OP (1). log − log s We use Shorack and Wellner [16] (inequality 1 on p.419): for some M > 1 Udkse:k 1 ≤ ≤M M s for 1 − Udkse:k 1 ≤ ≤M M 1−s for 1 ≤ s < 1, k+1 0<s≤ k . k+1 (4.11) (4.12) Relation (4.11) implies, for s ≥ 1/(k + 1), 1− − log Udkse:k log M log M ≤ ≤1+ . − log s − log s − log s Both sides are bounded for 0 < s ≤ 1/2. Relation (4.12) implies, for s ≤ k/(k + 1), − log Udkse:k 1 − s 1 − Udkse:k ≤ − log s 1 − s − log s   − log 1 − 1 − Udkse:k 1 − Udkse:k 1 1−s ≤ ≤ . − log s 1−s Udkse:k − log s Both sides are bounded for 1/2 ≤ s < 1. Proof of Proposition 4.3. Let Z be a unit Fréchet random variable, i.e. with distribution function F (x) = e−1/x , x > 0, and {Zi:k }ki=1 be the order statistics from the associated i.i.d. sample of size k, Z1 , . . . , Zk . Note that Mi:k,m =d V (mZi:k ). From Lemma 4.2 in [10], 1+γ V (mZdkse:k ) − bm a0 V (mZdkse:k ) − bm =1+γ m σ σ a0m is bounded (above and below) by γ0 Zdkse:k  0  Z γ0  am a0 dkse:k − 1 γ0 +ρ±δ + γ − γ0 + γ m A0 (m)Hγ0 ,ρ Zdkse:k ± εZdkse:k A0 (m) σ γ0 σ for each ε, δ > 0 provided k and m are large enough. Hence,    a0m V (mZdkse:k ) − bm µ − bm γ0 (− log s) 1+γ − σ a0m a0m 14 is bounded (above and below) by, γ (− log s)Zdkse:k 0 − (− log s)γ0 (− log s)Zdkse:k γ0 0  a0 µ − bm a + γ m A0 (m)(− log s)γ0 Hγ0 ,ρ Zdkse:k − γ m (− log s)γ0 σ σ a0m γ0 ρ±δ Zdkse:k A0 (m). (4.13) ± ε (− log s)Zdkse:k γ0 a0 + γ m − γ0 σ   Applying Lemma 4.1, the first term in (4.13) is bounded (above and below) uniformly in s, in probability. It remains to verify that the other terms are op (1) uniformly in s. Note that  (  k)γ0 (− log s)γ0 O (log , γ0 > 0 k1/2−δ sup =  1/2−δ −1/2−γ +δ 0 k O k , γ0 ≤ 0. (k+1)−1 ≤s≤k(k+1)−1 Using this with δ < min(1/2, γ0 + 1/2), Lemma 4.1 and (2.13), the second term in (4.13) is op (1) uniformly in s. For the third term, by  √  (− log s)γ0 √ A0 (m)(− log s)γ0 Hγ0 ,ρ Zdkse,k = kA0 (m) Hγ0 ,ρ Zdkse,k k and, sup (k+1)−1 ≤s≤k(k+1)−1 (− log s)γ0 √ Hγ0 ,ρ k  1 − log s    = O (log k)ξ k −1/2−(γ0 ∨0) for some ξ ∈ R, it follows that it is also op (1) uniformly in s. The last two terms follow similarly. For the second statement just note that √ (− log s)−γ0 /(γ0 +h1 / k) = (− log s)−1 (− log s)h1 /(γ0 √ k)(1+o(1)) where the second factor converges to 1 uniformly in s. The following auxiliary result closely related to Proposition 4.3 will be useful in our proofs of Proposition 2.1 and Theorem 2.1. Lemma 4.2. As n → ∞, √ √ !−1/(γ0 +h1 / k) Qγ (s) − h2 / k √ (− log s)−1 1 + (γ0 + h1 / k) 0 = 1 + o(1), 1 + h3 / k h i 1 k uniformly for s ∈ k+1 , k+1 and h ∈ Hn as in Proposition 2.1. √ Proof. Using (2.9) and expanding, √ Qγ0 (s) − h2 / k √ 1 + (γ0 + h1 / k) 1 + h3 / k   1 + (− log s)γ0 −γ0 √ = (− log s) + O max(h1 , h2 , h3 ) k √ where the O-term is in fact a o-term uniformly in s as seen in the proof of Corollary 4.3. The result follows as in the last part of the proof of Corollary 4.3 for the second statement. 15 4.3 Proofs of Proposition 2.1, Theorems 2.1 and 2.2 Before proving Proposition 2.1, we first check that, with high probability the local e k,m is finite and twice differentiable on Hn . log-likelihood process L Lemma 4.3. Under the assumptions of Proposition 2.1, we have i h e k,m (h) > −∞ for all h ∈ Hn = 1. lim P L n→∞ (4.14) e k,m is smooth on Hn as soon as it is finite on Hn . Furthermore, L e k,m (h) is finite on Hn as soon Proof. In view of Equations (2.1),(2.2) and (2.10), L as √ √ Qk,m (1/(k + 1)) − h2 / k √ 1 + (γ0 + h1 / k) > 0 for all h = (h1 , h2 , h3 ) ∈ Hn . 1 + h3 / k Proposition 4.3 entails that the left hand side is asymtptically (log k)−γ0 eOP (1) uniformly on Hn so that it remains positive on Hn with high probability. Equations (2.1)-(2.2) imply that the function θ 7→ `(θ, x) is smooth when it is finite. We e k,m is smooth on Hn as soon as it is finite on Hn . deduce that L Proof of Proposition 2.1. According to Lemma 4.3, the local log-likelihood process e k,m is smooth on Hn with high probability. Differentiating Equation (4.8), we get L e k,m ∂2L (h) = ∂h∂hT Z 1 0 ∂2` ∂θ∂θT   h θ0 + √ , Qk,m (s) ds. k By the definition (2.15) of the information matrix, e k,m ∂2L (h) + Iθ0 ∂h∂hT Z 1 = 0 Z = 1 k ∂2` ∂θ∂θT   h ∂2` θ0 + √ , Qk,m (s) − (θ , Q (s)) ds 0 γ0 ∂θ∂θT k Z k−1 Z 1 k (· · · ) ds + (· · · ) ds + (· · · ) ds 0  k−1 k 1 k = I + II + III We will show that these three terms are oP (1) uniformly on Hn , which proves Equation (2.14). First consider the boundary terms I and III. Since Qk,m (s) is constant on [0, k1 ], we have    Z 1 k 1 ∂2` 1 h ∂2` √ I= θ + , Q − (θ0 , Qγ0 (s)) ds (4.15) 0 k,m T k ∂θ∂θT k k 0 ∂θ∂θ The integral term vanishes as k → ∞ because the integral is well defined on [0, 1] (see Eq. (2.15) or alternatively use the upper bound for the second derivative provided by Proposition B.1). To deal with the first term, we use the upper bound for the second derivative provided by Proposition B.1:     ∂2` h 1 θ0 + √ , Qk,m ≤ C max z −ε , z 1+ε , z 2γ0 −ε , z 1+2γ0 +ε T ∂θ∂θ k k 16 with    1 h z = z θ0 + √ , Qk,m k k √ √ !−1/(γ0 +h1 / Qk,m (1/k) − h2 / k √ 1 + (γ0 + h1 / k) 1 + h3 / k √ = k) . Corollary 4.3 with s = k1 provides the asymptotic z = eOP (1) log k uniformly for h ∈ Hn . We deduce that the first term in (4.15) is asymptotically  1 eOP (1) max (log k)−ε , (log k)1+ε , (log k)2γ0 −ε , (log k)1+2γ0 +ε = oP (1) k uniformly for h ∈ Hn . Hence, I = oP (1) uniformly for h ∈ Hn . The proof for the boundary term III is similar and details are omitted. Next, consider the main term II. By Taylor formula, we have   Z k−1  2  k h ∂ ` ∂2` θ0 + √ , Qk,m (s) − (θ0 , Qγ0 (s)) ds II = 1 ∂θ∂θT ∂θ∂θT k k = IIa + IIb with 1 IIa = √ k k−1 k Z IIb = 1 k k−1 k Z 1 k Z Z 0 1 ∂3` h 2 ∂ θ∂θT T   uh θ0 + √ , (1 − u)Qγ0 (s) + uQk,m (s) duds (4.16) k 1 (Qk,m (s)−Qγ0 (s)) 0 ∂3` ∂x∂θ∂θT   uh θ0 + √ , (1 − u)Qγ0 (s) + uQk,m (s) duds k (4.17) Using the notation z = z(θn0 , x0n ) with uh x0n = (1 − u)Qγ0 (s) + uQk,m (s) and θn0 = θ0 + √ , k u ∈ [0, 1], Proposition B.1 provides the upper bound   ∂3` θn0 , x0n ≤ C max z −ε , z 1+ε , z 3γ0 −ε , z 1+3γ0 +ε . 2 T ∂ θ∂θ Using the fact that uh ∈ Hn and that z(θn0 , x0n ) is between z(θn0 , Qγ0 (s)) and z(θn0 , Qk,m (s)), Proposition 4.3 and Lemma 4.2 imply z = z(θn0 , x0n ) = eOP (1) (− log s) uniformly for s ∈ [ k1 , k−1 k ], u ∈ [0, 1] and h ∈ Hn . Using these bounds, we obtain   ∂3` 0 0 OP (1) −ε −ε 3γ0 −ε θ , x = e max s , (1 − s) , (1 − s) n n ∂ 2 θ∂θT and, since condition (2.13) implies khk = O(k δ ), IIa = OP (k δ−1/2 k−1 k Z )  max s−ε , (1 − s)−ε , (1 − s)3γ0 −ε ds. 1 k 17 When 3γ0 −ε > −1 the integral converges as k → ∞ and, IIa = OP (k δ−1/2 ) = oP (1) since δ < 1/2. When γ0 ≤ −1/3, the integral diverges at rate O(k −1−3γ0 +ε ) so that IIa = OP (k δ−3/2−3γ0 +ε ) = oP (1) since δ + ε < γ0 + 1/2. Similarly for the term IIb , Propositions 4.3 and B.1 together with Lemma 4.2 imply   ∂3` θn0 , x0n ≤ C max z γ0 −ε , z 1+γ0 +ε , z 3γ0 −ε , z 1+3γ0 +ε T ∂x∂θ∂θ  ≤ eOP (1) max (− log s)γ0 −ε , (− log s)1+γ0 +ε , (− log s)3γ0 −ε , (− log s)1+3γ0 +ε , uniformly for s ∈ [ k1 , k−1 k ], u ∈ [0, 1] and h ∈ Hn . From the law of the iterated logarithm,   Bk (s) = Op s1/2−ε (1 − s)1/2−ε uniformly on (0, 1) (4.18) and,  Hγ0 ,ρ 1 − log s    = O s−ε (1 − s)−ε+min(−γ0 ,0) uniformly on (0, 1). (4.19) Combining these two with Proposition 4.2 it follows,   √ k (Qk,m (s) − Qγ0 (s)) = OP s−1/2−ε (1 − s)−1/2−γ0 −ε + s−ε (1 − s)min(−γ0 ,0)−ε (4.20) uniformly on (0, 1). Combining the previous bound for the derivative and (4.20), we deduce similarly as before   Z k−1 k 1 IIb = OP √ max(s−1/2−2ε , (1 − s)−1/2+2γ0 −2ε , (1 − s)3γ0 −2ε )ds = oP (1) 1 k k uniformly in h ∈ Hn for ε small enough. Proof of Theorem 2.1. Integrating Equation (2.14), we obtain directly e k,m e k,m ∂L ∂L (h) = (0) − Iθ0 h + oP (1) ∂h ∂h e e k,m (h) = L e k,m (0) + hT ∂ Lk,m (0) − 1 hT Iθ h + oP (1) L 0 ∂h 2 uniformly on compact sets. This is exactly Equations (2.16) and (2.17) since   k e k,m ∂L Mi,m − bm 1 X ∂` e k,m . (0) = √ θ0 , =G ∂h am k i=1 ∂θ It remains to prove the asymptotic normality (2.18), i.e. e k,m ∂L (0) →d N (λb, Iθ0 ). ∂h Differentiating Equation (4.8), we obtain e k,m √ ∂L (0) = k ∂h Z 0 1 ∂` (θ0 , Qk,m (s)) ds = I0 + II0 + III0 ∂θ 18 (4.21) k−1 where the three terms correspond to the integrals on [0, k1 ], [ k1 , k−1 k ] and [ k , 1] respectively. Since Qk,m (s) is constant on the first and last intervals, we have    1 ∂` 1 0 I =√ θ0 , Qk,m k+1 k ∂θ    1 ∂` k 0 III = √ θ0 , Qk,m . k+1 k ∂θ The first term is evaluated thanks to Propositions B.1 and 4.3:     ∂` 1 θ0 , Qk,m ≤ C max z −ε , z 1+ε , z γ0 −ε , z 1+γ0 +ε ∂θ k+1 with   −1/γ0 1 z = 1 + γ0 Qk,m = eOP (1) log k, k+1 whence we deduce 1 I0 = eOP (1) √ max((log k)1+ε , (log k)1+γ0 +ε ) = oP (1). k With similar arguments, one can prove III0 = oP (1). For the second term, we use Taylor integral formula ∂` ∂` ∂2` (θ0 , Qk,m (s)) = (θ0 , Qγ0 (s)) + (θ0 , Qγ0 (s)) (Qk,m (s) − Qγ0 (s)) ∂θ ∂θ ∂x∂θ Z 1 ∂3` 2 + (Qk,m (s) − Qγ0 (s)) (1 − u) 2 (θ0 , (1 − u)Qγ0 (s) + uQk,m (s)) du. ∂x ∂θ 0 √ From decomposition (4.9) for k(Qk,m (s) − Qγ0 (s)), we get k−1 k √ Z II = k 0 1 k ∂` (θ0 , Qk,m (s)) ds = II0a + II0b + II0c + II0d + II0e , ∂θ with II0a √ Z = k 1 k k−1 k k−1 k ∂` (θ0 , Qγ0 (s)) ds ∂θ ∂2` Bk (s) (θ0 , Qγ0 (s)) ds 1 ∂x∂θ s(− log s)γ0 +1 k   Z k−1 2 k ∂ ` 1 0 IIc = λ (θ0 , Qγ0 (s)) Hγ0 ,ρ ds 1 ∂x∂θ − log s k Z k−1 2 k ∂ ` II0d = (θ0 , Qγ0 (s)) Rk,m (s)ds 1 ∂x∂θ k Z k−1 Z 1 √ k ∂3` II0e = k(Qk,m (s) − Qγ0 (s))2 (1 − u) 2 (θ0 , (1 − u)Qγ0 (s) + uQk,m (s)) duds. 1 ∂x ∂θ 0 II0b = Z k We consider the different terms successively. Equation (4.6) implies Z 1 ∂` (θ0 , Qγ0 (s)) ds = 0 ∂θ 0 19 so that II0a 1 k √ Z =− k 0 √ ∂` (θ0 , Qγ0 (s)) ds − k ∂θ Z 1 1− k1 ∂` (θ0 , Qγ0 (s)) ds. ∂θ Proposition B.1 provides the upper bound ∂` (θ0 , Qγ0 (s)) ∂θ ≤ C max (− log s)−ε , (− log s)1+ε , (− log s)γ0 −ε , (− log s)1+γ0 +ε ≤ C max(s−ε , (1 − s)−ε , (1 − s)γ0 −ε ), whence we deduce II0a = O(max(k −1/2+ε , k −1/2−γ0 +ε )) = o(1) because γ0 > −1/2. For term II0b , Proposition B.1 entails ∂2` (θ0 , Qγ0 (s)) ∂x∂θ (4.22) ≤ C max((− log s)γ0 −ε , (− log s)1+γ0 +ε , (− log s)2γ0 −ε , (− log s)1+2γ0 +ε ) ≤ C max(s−ε , (1 − s)γ0 −ε , (1 − s)2γ0 −ε ). (4.23) Combined with (4.18) we get ∂2` Bk (s) (θ0 , Qγ0 (s)) s(− log s)γ0 +1 ∂x∂θ = max(s−1/2−2ε , (1 − s)−1/2−2ε , (1 − s)γ0 −1/2−2ε )OP (1), which implies, since γ0 > −1/2, II0b Z = 0 1 ∂2` Bk (s) (θ0 , Qγ0 (s)) ds + oP (1) ∂x∂θ s(− log s)γ0 +1 where the integral on [0, 1] is well defined. Similarly for II0c , (4.19) together with (4.23) yields  2  1 ∂ ` Hγ0 ,ρ (θ0 , Qγ0 (s)) − log s ∂x∂θ  ≤ C max s−2ε , (1 − s)−2ε , (1 − s)2γ0 −2ε . Because 2γ0 > −1, we get   Z 1 2 ∂ ` 1 0 (θ0 , Qγ0 (s)) Hρ IIc = λ ds + o(1) − log s 0 ∂x∂θ where the integral on [0, 1] is well defined. For II0d we use the uniform bound (4.10) and the upper bound (4.23) to get II0d k−1 k ∂2` (θ0 , Qγ0 (s)) Rk,m (s)ds 1 ∂x∂θ k Z k−1   k = oP (1) C max s−1/2−2ε , (1 − s)−1/2−ρ−2ε , (1 − s)γ0 −1/2−ρ−2ε ds Z = 1 k = oP (1). 20  We consider finally the last term II0e . With the notations x0n = (1 − u)Qγ0 (s) + uQk,m (s) and z = z(θ0 , x0n ), Proposition B.1 yields   ∂3` θ0 , x0n ≤ C max z 2γ0 −ε , z 1+2γ0 +ε , z 3γ0 −ε , z 1+3γ0 +ε . 2 ∂ x∂θ Using the fact that z(θ0 , x0n ) is between z(θ0 , Qγ0 (s)) and z(θ0 , Qk,m (s)), Corollary B.1 implies z(θ0 , x0n ) = eOP (1) (− log s) so that   ∂3` 0 −ε 2γ0 −ε 3γ0 −ε θ , x = O (1) max s , (1 − s) , (1 − s) . 0 P n ∂ 2 x∂θ Combining this bound with (4.20), we obtain similarly as before II0e  = O 1 √ k k−1 k Z 1 k  max s−1−3ε , (1 − s)−1+γ0 −3ε ds = oP (1). Collecting all the different terms, we get e k,m ∂L (0) = ∂h 1 ∂2` Bk (s) (θ0 , Qγ0 (s)) ds s(− log s)γ0 +1 0 ∂x∂θ   Z 1 2 ∂ ` 1 +λ (θ0 , Qγ0 (s)) Hρ ds + oP (1). − log s 0 ∂x∂θ Z The second term in the right-hand side is deterministic and corresponds to λb with b defined by (2.19). The first term is an integral of the Brownian bridge that defines a centered Gaussian vector whose covariance only depends on the first order parameter γ0 . Comparing with the special case of i.i.d. GEV random variables considered in Corollary 4.1, we identify the covariance which is equal to Iγ0 . This proves Equation (4.21) and concludes the proof of Theorem 2.1. Proof of Theorem 2.2. The proof of Theorem 2.2 relies on Theorem 2.1 and on the Argmax Theorem. Consider the random processes e k,m (h) − L e k,m (0), Mn (h) = L h ∈ R3 and 1 M (h) = hT (λb + G) − hT Iθ0 h, h ∈ R3 2 with G a centered Gaussian random vector with variance Iθ0 . Let Hn be the closed ball of R3 centered at 0 and with radius rn → ∞ such that rn = O(k δ ) as in (2.13). Define the maximizer b hn = argmax Mn (h). h∈Hn In the case it is not unique, define b hn as the smallest maximizer in the lexicographic order. Theorem 2.1 implies that, for any compact K ⊂ R3 , Mn converge in distribution to M in `∞ (K) as k → ∞. The limit process M is continuous and has a unique maximizer given by b h = argmax M (h) = Iθ−1 (λb + G). 0 h∈R3 21 The Argmax Theorem (see van der Vaart [18] Corollary 5.58) implies that, provided the sequence b hn is tight, then b hn converge weakly to b h as n → ∞. We now prove the tightness of the sequence b hn . Let ε > 0. There is R > 0 such that P(kb hk < R) > 1 − ε. The relation 1 M (h) = M (b h) − (h − b h)T Iθ0 (h − b h), 2 implies that 1 max M (h) = M (b h) − λmin 2 kb h−hk≥1 with λmin > 0 the smallest eigenvalue of Iθ0 . As a consequence, kb hk < R implies 1 M (b h) − max M (h) = max M (h) − max M (h) ≥ λmin 2 khk=R+1 khk≤R khk=R+1 and this occurs with probability at least 1−ε. Using the convergence in distribution of Mn to M in `∞ (K) with K = {h : khk ≤ R + 1}, we deduce that for large n 1 max Mn (h) − max Mn (h) ≥ λmin 4 khk=R+1 khk≤R (4.24) with probability at least 1 − 2ε. For large n, Hn contains the ball {h : khk ≤ R + 1} (because rn → ∞) and, according to Proposition 2.1, Mn is strictly concave on Hn with probability at least 1 − ε. Then, Equation (4.24) together with the strict concavity of Mn implies that the maximizer b hn of Mn over Hn satisfies kb hn k ≤ R. b Hence, for large n, P(khn k ≤ R) ≥ 1 − 3ε and this proves the tightness of b hn . Note also that on this event, b hn belongs to the interior of Hn and is hence a critical point of Mn , i.e. e k,m ∂L ∂Mk b (hn ) = 0 or equivalently (b hn ) = 0. ∂h ∂h Define θbn = (γ0 + k −1/2b hn,1 , bm + am k −1/2b hn,2 , am (1 + k −1/2b hn,3 )). Equations (2.10) and (2.11) imply that e k,m ∂L ∂Lk,m b (b hn ) = k −1/2 (θn ). ∂h ∂θ ∂Lk,m b Hence, with high probability, Lk,m has a local maximum at θbn with ∂θ (θn ) = 0, b i.e. θn is a MLE and Eq. (2.20) is satisfied. Eq. (2.21) stating the asymptotic normality of θbk is a direct consequence of e k,m (b L hn ) = Lk,m (θbn ) and d b hn → b h = Iθ−1 (λb + G) ∼ N (λIθ−1 b, Iθ−1 ). 0 0 0 The second part of Theorem 2.2, i.e. the asymptotic uniqueness of the MLE, is a consequence of the strict concavity stated in Proposition 2.1: with large probability the log-likelihood function is strictly concave on Hn and hence the score equation ∂ e ∂h Lk,m (h) = 0 has a unique solution on Hn . For n large, the normalised MLE b hin = (b γni , (b µin − bm )/am , σ bni /am − 1), i = 1, 2 ∂ e belong to Hn with large probability and solve ∂h Lk,m (h) = 0. This implies that 1 2 1 2 b b b b hn = hn with high probability and hence θn = θn with high probability. 22 A Formulas for the information matrix and bias According to Prescott and Walden [15] (see also Beirlant et al. [2, page 169]), the information matrix of the GEV model at point θ0 = (γ0 , 0, 1) is given by  1 2 γ0   Iθ0 =      2 + 1 − γ∗ + γ1 − γ2q + 0 0   − γ1 q − γp 0 0   − γ12 1 − γ∗ − q + 1−r+p γ π2 6 p 2 γ0  0  q− p γ0  − γ12  1 − γ∗ − q + 0 1−r+p γ0        − p−r γ p 0 − p−r γ 0 0 − γ1 0 1 2 (1 γ0 − 2r + p) where Γ is Euler’s Gamma function, γ∗ = 0.5772157 is Euler’s constant and p = (1 + γ0 )2 Γ(1 + 2γ0 ), q = (1 + γ0 )Γ0 (1 + γ0 ) +   1 Γ(2 + γ0 ), 1+ γ0 r = Γ(2 + γ0 ). The bias in Theorem 2.2 is given by Iθ−1 b where the vector b can be computed exactly. Calculations are tedious and have been performed with Mathematicar . We get b = (bγ , bµ , bσ ) with 1 Z bγ = 0 =            ∂2` 1 (θ0 , Qγ0 (s)) Hγ0 ,ρ ds ∂x∂γ − log s  1 2 2 3 ρ(γ +ρ) (γ0 + ρ)(1 + γ0 − γ∗ γ0 ) − (γ0 + γ0 (1 + ρ) + 2ρ(1 + γ0 ))Γ(1 + γ0 ) + (1 + γ0 ) ρΓ(1 + 2γ0 ) γ0 0  +γ02 Γ(1 − ρ) − γ0 (1 + γ0 )Γ(2 − ρ) + γ0 (1 + γ0 )(1 − ρ)Γ(1 + γ0 − ρ) − γ0 ρΓ0 (2 + γ0 ) − γ02 Γ0 (2 − ρ) ,   1 (1 + γ0 − γ0 γ∗ )2 + γ02 π 2 /6 + (1 + γ0 )2 Γ(1 + 2γ0 ) − 2(1 + γ0 ) [(1 + γ0 )Γ(1 + γ0 ) + γ0 Γ0 (1 + γ0 )] , γ4 0 1 Z bµ = 0 =    1 Z bσ = 0 =          B ∂2` (θ0 , Qγ0 (s)) Hγ0 ,ρ ∂x∂µ  1 − log s  ds 1+γ0 (−(γ0 + ρ)Γ(1 + γ0 ) + (1 + γ0 )ρΓ(1 + 2γ0 ) + γ0 ρ(γ0 +ρ)  (1+γ) (1 + γ0 )Γ(1 + 2γ0 ) − Γ(2 + γ0 ) − γ0 Γ0 (1 + γ0 ) , 2 γ0 γ0 (1 − ρ)Γ(1 + γ0 − ρ)) , ρ < 0, ρ = 0,   ∂2` 1 (θ0 , Qγ0 (s)) Hγ0 ,ρ ds ∂x∂σ − log s  1 − γ0 − ρ + (1 + γ0 )(γ0 + 2ρ)Γ(1 + γ0 ) − (1 + γ0 )2 ρΓ(1 + 2γ0 ) 2 ρ(γ +ρ) γ0 0  +γ0 Γ(2 − ρ) − γ0 (1 + γ0 )(1 − ρ)Γ(1 + γ0 − ρ) ,   1 − 1 + γ0 (γ∗ − 1) − (1 + γ0 )2 Γ(1 + 2γ0 ) + Γ(3 + γ0 ) + γ0 (1 + γ0 )Γ0 (1 + γ0 ) , γ3 ρ < 0, ρ = 0. 0 Bounds for the derivatives of the likelihood We provide in this section upper bounds for the partial derivatives of the GEV log-likelihood,       1 x−µ x − µ −1/γ `(θ, x) = − 1 + log 1 + γ − 1+γ − log σ, γ σ σ for θ = (γ, µ, σ) and x such that 1 + γ x−µ σ > 0. 23 ρ < 0, ρ = 0, Proposition B.1. Let θ0 = (γ0 , 0, 1) with γ0 ∈ R. For all ε > 0, there exists a neighbourhood N0 of θ0 and a constant C > 0 such that, for all θ ∈ N0 and x such that 1 + γ(x − µ)/σ > 0, we have ∂` ∂xi ∂θ1−i ∂2` ∂xi ∂θ2−i ∂3` ∂xi ∂θ3−i where  ≤ C max z iγ0 −ε , z 1+iγ0 +ε , z γ0 −ε , z 1+γ0 +ε , i = 0, 1,  ≤ C max z iγ0 −ε , z 1+iγ0 +ε , z 2γ0 −ε , z 1+2γ0 +ε , i = 0, 1, 2,  ≤ C max z iγ0 −ε , z 1+iγ0 +ε , z 3γ0 −ε , z 1+3γ0 +ε , i = 0, 1, 2, 3,   x − µ −1/γ z = z(θ, x) = 1 + γ > 0, σ for 1 + γ x−µ > 0. σ The notation ∂θ denotes either ∂γ, ∂σ or ∂µ and, similarly for higher order derivatives, ∂θ2 denotes ∂γ 2 , ∂γ∂µ, ∂γ∂σ, ∂µ2 . . . Note that the constant C > 0 appearing in Proposition B.1 and in the proofs below may change from line to line. Proposition B.1 gathers with short notations several different inequalities. For instance, the first inequality with i = 1 yields  ∂` ≤ C max z γ0 −ε , z 1+γ0 +ε , ∂x while the third inequality with i = 1 yields  ∂3` ≤ C max z γ0 −ε , z 1+γ0 +ε , z 3γ0 −ε , z 1+3γ0 +ε ∂x∂γ∂σ   C max z γ0 −ε , z 1+3γ0 +ε  if γ0 ≥ 0 ≤ C max z 3γ0 −ε , z 1+γ0 +ε if γ0 ≤ 0. For θ = (γ, µ, σ), we have   x−µ `(θ, x) = g γ, − log σ, σ   1 g(γ, x) = − 1 + log(1 + γx) − (1 + γx)−1/γ γ (B.1) where the function g is the log-likelihood of the one parameter GEV distribution with γ ∈ R (i.e. µ = 0 and σ = 1). With the notation z(γ, x) = (1 + γx)−1/γ , 1 + γx > 0 (B.2) g(γ, x) = (1 + γ) log z(γ, x) − z(γ, x). (B.3) we have, The proof of Proposition B.1 relies on three lemmas providing upper bounds for the derivatives of z(γ, x) and g(γ, x). Define h : R → R by  x (e − 1 − x)/x2 for x 6= 0 h(x) = (B.4) 1/2 for x = 0 and denote by h(n) (x) its derivative of order n = 0, 1, 2. 24 Lemma B.1. The function h : R → R in (B.4) is twice continuously differentiable and h(n) (x) = O(max(1, ex )) for all x ∈ R, and n = 0, 1, 2. Proof of Lemma B.1. The function h can be represented as the power series h(x) = P n n≥0 x /(n + 2)! and is hence indefinitely continuously differentiable. From the asymptotic behaviour h(x) ∼ − 1 as x → −∞ , x h(x) ∼ ex as x → +∞, x2 we deduce that the function x 7→ |h(x)|/ max(1, ex ) is bounded on R since it is continuous with vanishing limits at ±∞. This proves the existence of C > 0 such that |h(x)| ≤ C max(1, ex ) for all x ∈ R. The upper bound for the second and third derivatives is proved similarly since simple computations show that h0 (x) ∼ ex as x → +∞ x2 1 as x → −∞ , x2 h0 (x) ∼ 2 as x → −∞ , x3 h00 (x) ∼ and h00 (x) ∼ − ex as x → +∞. x2 From Lemma B.1 it follows h(n) (γ log z) = O (max(1, z γ ) , n = 0, 1, 2. (B.5)  We also use throughout the elementary bound | log z|k = O z ±δ , for all k ∈ N and δ > 0. Lemma B.2. Consider the function z(γ, x) defined by Equation (B.2). For all γ0 ∈ R and ε > 0, there exists C > 0 and δ > 0 such that, for all γ ∈ (γ0 − δ, γ0 + δ) and 1 + γx > 0, ∂z ∂xi ∂γ 1−i ∂2z ∂xi ∂γ 2−i ∂3z ∂xi ∂γ 3−i  ≤ C max z 1+iγ0 ±ε , z 1+γ0 ±ε ,  ≤ C max z 1+iγ0 ±ε , z 1+2γ0 ±ε , ≤ C max z 1+iγ0 ±ε , z 1+3γ0 ±ε  i = 0, 1, i = 0, 1, 2, i = 0, 1, 2, 3, Proof of Lemma B.2. Recall the definition (B.4) of the function h. The first order partial derivatives of z equal ∂z = −z 1+γ ∂x and ∂z = z(log z)2 h(γ log z). ∂γ Assuming γ ∈ (γ0 − δ, γ0 + δ), we deduce ∂z ∂z ≤ C max(z 1+γ0 ±δ ) and ≤ C max(z 1±δ , z 1+γ0 ±2δ ) ∂x ∂γ 25 (B.6) from which the bounds of the first order partial derivatives of z follow. The second order partial derivatives of z are given by ∂2z ∂x2 ∂2z ∂x∂γ ∂2z ∂γ 2 ∂z ∂x ∂z = −(1 + γ)z γ − (log z)z 1+γ ∂γ  ∂z = (log z + 2)(log z)h(γ log z) + γ(log z)2 h0 (γ log z) + z(log z)3 h0 (γ log z). ∂γ = −(1 + γ)z γ Combined with the previous bounds and (B.5), we obtain, for γ ∈ (γ0 − δ, γ0 + δ), ∂2z ∂x2 ∂2z ∂γ∂x ∂2z ∂γ 2 ≤ C max(z 1+2γ0 ±2δ ) ≤ C max(z 1+γ0 ±2δ , z 1+2γ0 ±2δ ) ≤ C max(z 1±2δ , z 1+2γ0 ±4δ ) from which the bounds for the second order partial derivatives of z follow. The case of third order derivatives can be dealt with similarly and we omit the details. Lemma B.3. Consider the function g(γ, x) defined by Equation (B.3). For all γ0 ∈ R and ε > 0, there exists C > 0 and δ > 0 such that, for all γ ∈ (γ0 − δ, γ0 + δ) and 1 + γx > 0, ∂g ∂xi ∂γ 1−i ∂2g ∂xi ∂γ 2−i ∂3g ∂xi ∂γ 3−i  ≤ C max z iγ0 −ε , z 1+iγ0 +ε , z γ0 −ε , z 1+γ0 +ε , i = 0, 1,  ≤ C max z iγ0 −ε , z 1+iγ0 +ε , z 2γ0 −ε , z 1+2γ0 +ε , i = 0, 1, 2,  ≤ C max z iγ0 −ε , z 1+iγ0 +ε , z 3γ0 −ε , z 1+3γ0 +ε , i = 0, 1, 2, 3. Proof of Lemma B.3. Equation (B.3) expressing g(γ, x) in terms of z(γ, x) entails     ∂g 1+γ ∂z ∂g 1+γ ∂z = −1 , = −1 + log z. ∂x z ∂x ∂γ z ∂γ Using the upper bound for the first derivatives of z(γ, x) in Lemma B.2, we get, for γ ∈ (γ0 − δ, γ0 + δ), ∂g ≤ C max(z γ0 ±ε , z 1+γ0 ±ε ) , ∂x ∂g ≤ C max(z ±ε , z 1±ε , z γ0 ±ε , z 1+γ0 ±ε ). ∂γ This proves the upper bounds for the first derivatives of g(γ, x) given in Lemma B.3. Note that we can handle the ± sign since we have −ε < ε < 1 − ε < 1 + ε, for small ε > 0. When considering the maximum of the power functions, only the extreme exponents −ε < 1 + ε matter. A similar argument holds for γ0 − ε < γ0 + ε < 1 + γ0 − ε < 1 + γ0 + ε. 26 Similarly for the second order derivatives of g(γ, x), the upper bounds are derived from the similar upper bounds for the partial derivatives of z(γ, x) in Lemma B.2 (with ε replaced by ε/2) together with the formulas ∂2g ∂x2 ∂2g ∂x∂γ ∂2g ∂γ 2    2 1+γ ∂ z 1 + γ ∂z 2 −1 − z ∂x2 z2 ∂x   2 1+γ ∂ z 1 ∂z 1 + γ ∂z ∂z = −1 + − z ∂x∂γ z ∂x z 2 ∂x ∂γ     2 1+γ 2 ∂z ∂ z 1 + γ ∂z 2 = + . −1 − z ∂γ 2 z ∂γ z2 ∂γ  = Partial derivatives of order 3 are dealt with similarly. Proof of Proposition B.1. Equation (B.1) implies that the partial derivatives of ` are closely related to those of g. For the first derivatives, we have     ∂` x−µ x−µ 1 ∂g ∂` 1 ∂g γ, γ, (θ, x) = (θ, x) = − ∂x σ ∂x σ ∂µ σ ∂x σ     ∂` ∂g x−µ ∂` x − µ ∂g x−µ 1 (θ, x) = γ, (θ, x) = − 2 γ, − . ∂γ ∂γ σ ∂σ σ ∂x σ σ These equalities together with Lemma B.3 yield  1 ∂g ∂` = ≤ C max z γ0 −ε , z 1+γ0 +ε , ∂x σ ∂x which corresponds to the first inequality in Proposition B.1 with i = 0. We also obtain  ∂` ∂g = ≤ C max z −ε , z 1+ε , z γ0 −ε , z 1+γ0 +ε ∂γ ∂γ ,  ∂` 1 ∂g = ≤ C max z γ0 −ε , z 1+γ0 +ε ∂µ σ ∂x which implies the inequality in Proposition B.1 with i = 1 and the derivatives taken with respect to γ and µ respectively. The case of the derivative with respect to σ is slightly more difficult: we use the inequality x−µ z −γ − 1 = ≤ C max(z −γ0 −δ , z −γ0 +δ , 1), σ γ γ ∈ (γ0 − δ, γ0 + δ), which implies ∂` ∂σ =  1 z −γ − 1 ∂g + 1 ≤ C max(z −γ0 −δ , z −γ0 +δ , 1) max z γ0 −ε , z 1+γ0 +ε σ γ ∂x 0 0 0 0 ≤ C max(z −ε , z 1+ε , z γ0 −ε , z 1+γ0 +ε ) for sufficiently small ε0 . For the first inequality, we use Lemma B.3. This proves the first inequality in Proposition B.1 with i = 1 and the derivatives taken with respect to σ. The case of second order derivatives is dealt similarly with the relations 27 ∂2` ∂x2 ∂2` ∂γ∂x ∂2` ∂µ∂x ∂2` ∂σ∂x ∂2` ∂γ 2 = = = = = 1 ∂2g σ 2 ∂x2 1 ∂2g σ ∂γ∂x 1 ∂2g − 2 2 σ ∂x x − µ ∂2g − 3 σ ∂x2 2 ∂ g ∂γ 2 ∂2` ∂µ2 ∂2` ∂σ 2 ∂2` ∂γ∂µ ∂2` ∂γ∂σ ∂2` ∂µ∂σ = = = = = 1 ∂2g σ 2 ∂x2 x − µ ∂g (x − µ)2 ∂ 2 g 1 2 3 + + 2 4 2 σ ∂x σ ∂x σ 1 ∂2g − σ ∂γ∂x x − µ ∂2g − 2 σ ∂γ∂x 1 ∂g x − µ ∂2g + . σ 2 ∂x σ 3 ∂x2 Using these relations, the second inequality in Proposition B.1 follows from Lemma B.3. Checking all the different cases is relatively tedious but elementary. Details are omitted. Similar formulas hold for derivatives of order 3 and the resulting bounds have been checked with Mathematicar . Acknowledgements The authors would like to thank Laurens de Haan for his useful suggestions and support. Research partially funded by VolkswagenStiftung Support for Europe – WEXMOP and, FCT - Fundacão para a Ciência e a Tecnologia, Portugal, through UID/MAT/00006/2013 and UID/Multi/04621/2013. References [1] A.A. Balkema and L. de Haan. Residual life time at great age. Ann. Probability, 2:792–804, 1974. [2] J. Beirlant, Y. Goegebeur, J. Teugels, and J. Segers. Statistics of extremes: Theory and applications. Wiley Series in Probability and Statistics. John Wiley & Sons Ltd., Chichester, 2004. [3] A. Bücher and J. Segers. Maximum likelihood estimation for the frÃľchet distribution based on block maxima extracted from a time series. Preprint arXiv:1511.07613. [4] A. Bücher and J. Segers. On the maximum likelihood estimator for the generalized extreme-value distribution. Preprint arXiv:1601.05702. [5] S. Coles. An Introduction to Statistical Modeling of Extreme Values. SpringerVerlag, London, 2001. [6] L. de Haan and A. Ferreira. Extreme value theory: An introduction. Springer Series in Operations Research and Financial Engineering. Springer, New York, 2006. [7] C. Dombry. Existence and consistency of the maximum likelihood estimators for the extreme value index within the block maxima framework. Bernoulli, 21(1):420–436, 2015. 28 [8] H. Drees, L. de Haan, and D. de Li. On large deviation for extremes. Stat. Probab. Letters, 1(64):51–62, 2003. [9] P. Embrechts, C. Klüppelberg, and T. Mikosch. Modelling extremal events, volume 33 of Applications of Mathematics (New York). Springer-Verlag, Berlin, 1997. [10] A. Ferreira and L. de Haan. On the block maxima method in extreme value theory: PWM estimators. Ann. Statist., 43(1):276–298, 2015. [11] E.J. Gumbel. Statistics of extremes. Columbia University Press, New York, 1958. [12] J.R.M. Hosking and J.R. Wallis. Parameter and quantile estimation for the generalized Pareto distribution. Technometrics, 29(3):339–349, 1987. [13] J.R.M. Hosking, J.R. Wallis, and E.F. Wood. Estimation of the generalized extreme-value distribution by the method of probability-weighted moments. Technometrics, 27(3):251–261, 1985. [14] J. Pickands, III. Statistical inference using extreme order statistics. Ann. Statist., 3:119–131, 1975. [15] P. Prescott and A.T. Walden. Maximum likelihood estimation of the parameters of the generalized extreme-value distribution. Biometrika, 67(3):723–724, 1980. [16] G.R. Shorack and J.A. Wellner. Empirical processes with applications to statistics. Wiley Series in Probability and Mathematical Statistics: Probability and Mathematical Statistics. John Wiley & Sons Inc., New York, 1986. [17] R.L. Smith. Maximum likelihood estimation in a class of nonregular cases. Biometrika, 72(1):67–90, 1985. [18] A.W. van der Vaart. Asymptotic statistics, volume 3 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, Cambridge, 1998. 29
10math.ST
Cybernetic Interpretation of the Riemann Zeta Function arXiv:1602.05507v1 [cs.SY] 12 Feb 2016 Petr Klán, Dept. of System Analysis, University of Economics in Prague, Czech Republic, [email protected] Abstract: This paper uses cybernetic approach to study behavior of the Riemann zeta function. It is based on the elementary cybernetic concepts like feedback, transfer functions, time delays, PI (Proportional–Integral) controllers or FOPDT (First Order Plus Dead Time) models, respectively. An unusual dynamic interpretation of the Riemann zeta function is obtained. Key words: Riemann zeta function, feedback, time delay, PI controller, FOPDT model 1 Introduction Zeta function [4] is associated with equation ∞ Y X 1 1 = s n 1 − p−s p=2,3,5... n=1 (1) introducing the fundamental relationship between natural numbers n = 1, 2, 3, 4, 5 . . . and prime numbers p = 2, 3, 5, 7, 11 . . . for real s > 1. It was discovered by L. Euler in 1737. A full idea of this relationship excels at expansion to the individual base elements 1 1 1 1 1 1 1 1 1 1 + + + + + . . . = ..., 1s 2s 3s 4s 5s 1 − 2−s 1 − 3−s 1 − 5−s 1 − 7−s 1 − 11−s in which an infinite summation over all the natural numbers (left side) and an infinite product over all the prime numbers (right side) are contained. L. Euler assumed the parameter s on both sides as a real number. Equation (1) is considered to be an input to the mystery of interrelation between natural and prime numbers that is waiting for hundreds of years to be discovered [2]. P The infinite sum 1/ns from (1), typically for s > 1, is called zeta function ζ(s), thus ∞ X 1 . ζ(s) = s n n=1 (2) Function diverges for s < 1 and converges for s > 1. For s = 1, the function ζ(s) is projected to a harmonic series, which is divergent as well [5]. G. F. Riemann proposes a specific analytic function in the field of all complex numbers s = a + ib in his work On the Number of Prime Numbers Under a Given Magnitude ([4], Riemann’s original work is a part of this publication) that coincides with zeta function for Re(s) > 1. This new function is called the Riemann zeta function and denoted in the same way as zeta function (2). Whilst coincident with (2) introduced by L. Euler for values of a > 1 and b = 0, it is more formally considered for values of a < 1. The Riemann zeta function 1 stays in the effect throughout the interval of s, including a < 1. In considering language of the complex analysis, the Riemann zeta function represents a meromorphic function in whole complex plane except point s = 1, where it has no final value [8]1 . It greatly contributes to the analysis of prime numbers distribution [2, 4, 9]. Riemann zeta function ζ(s) has two sorts of zero values2 or values s for which ζ(s) = 0. Some of them, for example s = 0.5 + i14.135, s = 0.5 + i21.022, s = 0.5 + i25.011, s = 0.5 + i30.425, s = 0.5 + i32.935 . . . are called nontrivial. One can ask, where do all the complex zero values of the Riemann zeta function locate. As extremely interesting, it is taken the area of complex plane determined by interval 0 ≤ a ≤ 1 for any real b which is called critical strip, see Fig. 1. The Riemann zeta function has zero values in negative integers ζ(−2) = 0, ζ(−4) = 0, ζ(−6) = 0 . . . as well. They are called trivial. The Riemann hypothesis conjectures that all the critical strip nontrivial zeros lie on midst critical line of 1/2. In other words, all the zero values of the Riemann zeta function (except trivial) are assumed to receive values of s = 0.5 + ib or 1/2 + ib for real b. When finding a single zero value in the critical strip outside this midst line, Riemann hypothesis fails. The hypothesis has not been proven yet. Due to its fundamental significance, it belongs to the millennium problems [2]. 30 40.9 37.6 32.9 30.4 20 25.0 21.0 40 14.1 10 0 −10 −20 −30 −40 Critical line 1/2 1 −14.1 −21.0 −25.0 −30.4 −32.9 −37.6 −40.9 Critical strip Figure 1: Critical strip of complex plane showing positions of nontrivial zero values. The paper shows that for a > 1, the Riemann zeta function can be interpreted by an endless serial connection of the elementary cybernetic concepts like PI controllers or FOPDT models [6]. It is shown that this interpretation brings a new perspective to the Riemann zeta function with possible impacts to the Riemann hypothesis. 1 2 This article provides an elegant proof of equation (1) for Re(s) > 1. Terms like zeros and poles of transfer functions are well known in cybernetics too [6]. 2 2 Single transfer functions The right–hand side of equation (1) is composed of an infinite product of base elements 1 , 1 − p−s (3) 1 . 1 − e−s ln p (4) where p is a prime and s a complex number. Cybernetic considerations frequently use the base of natural logarithm e unlike primes p in the number theory. Thus, rewrite the base element (3) equivalently to If ex = p−s for a certain x, then x = −s ln p. Now, the infinite product (2) becomes Y p 1 1 1 1 1 1 = ... −s ln p −s ln 2 −s ln 3 −s ln 5 −s ln 7 1−e 1−e 1−e 1−e 1−e 1 − e−s ln 11 (5) In Laplace transformation [3], the expression e−s ln p represents a transfer function including time delay ln p. Generally, G(s) = e−sL , where L = ln p [6]. Looking through the eyes of transfer functions, a block scheme including positive feedback for the entire expression (4) is in Fig. 2. Here, R(s) is Laplace transformation of a reference input and Y (s) is Laplace transformation of the corresponding output. In that case Y (s)/R(s) = 1/(1 − e−s ln p ). R(s) + Y (s) + e−sL Figure 2: Base element (4) represented by the transfer function. Reference inputs are usually realized by a unit step 1(t). The latter is defined as 0 for times t < 0 and 1 for t > 0, in Laplace transformation 1/s. Assume that r(t) = 1(t) is a unit step and determine output response y(t) of transfer function (4) to a unit step where the signals r(t) and y(t) are denoted by R(s) and Y (s) in the Laplace transformation. Suppose time delay L = ln 2 related to the first prime number in the positive feedback loop of Fig. 2. Corresponding transfer function is Y (s)/R(s) = 1/(1 − e−s ln 2 ). A reference input unit step is immediately transferred to the output, or y(t) = 1 for t > 0. This output is delayed in the feedback and after time delay L it is added to the reference input, or y(t) = 2 for t > L. It again is delayed by time L, added to reference input. It results in y(t) = 3 for t > 2L etc. A whole response to unit step reference input (transient response) is in Fig. 3. Due to the positive feedback, a regular multistep signal y(t) is obtained3 . 3 It agrees with [3] which introduces the same Laplace transformation for time functions shown in Fig. 3. 3 y 8 7 6 5 4 3 2 1 0 ln 2 3 ln 2 5 ln 2 7 ln 2 t Figure 3: Step response associated with transfer function 1/(1 − e−s ln 2 ). Transient response in Fig. 3 can not be simply described. Therefore, an approximation is used in the sequel. The points placed just in the middle of time delays in Fig. 3 join a line beginning at y(0) = 0.5. Some of these points and the corresponding values of transient response are collected in Tab. 1. t y ln 2/2 3 ln 2/2 5 ln 2/2 7 ln 2/2 . . . 1 2 3 4 ... Table 1: A collection of transient pairs associated with transfer function 1/(1 − e−s ln 2 ). Considering pairs in Tab. 1 one can make the following interesting deduction: the approximated line transient response is described by 1 t ln 2 which coincides with the transient response of a PI controller given by transfer function y(t) = 0.5 + 1 1 + (6) 2 sL or 0.5 + 1/s ln 2, where L = ln 2 represents an integration time constant. Notice that the line in Fig. 3 corresponds to (6) as well if the first–order Pade approximation is used in the form e−s ln p = (1 − s ln p/2)/(1 + s ln p/2). After substituting the latter into 1/(1 − e−s ln p ) it implies that 1/[1 − (1 − s ln p/2)/(1 + s ln p/2)] = 1/2 + 1/(s ln p). 4 Since an infinite product in the Riemann zeta function, it is concluded that the latter can be approximated by an endless series combining transfer functions of PI controllers (6)  Y 1 1 (7) + 2 s ln p p or  0.5 + 1 s ln 2  0.5 + 1 s ln 3  1 0.5 + s ln 5  0.5 + 1 s ln 7  0.5 + 1 s ln 11  ... This approximation is called PI approximation or simple approximation of the Riemann zeta function. Connection of something fundamental as the Riemann zeta function is in the theory of numbers and something as PI controllers fundamental in cybernetics is really surprising based on a big context difference of both these subjects. 3 Case ζ(ib) By virtue of formulation (5) in which s = ib for non–negative real b and a = 0, we can form ζ(ib) by Y p 1 . 1 − e−ib ln p Based on (7), it results in a PI approximation  Y 1 1 ζPI (ib) = + 2 ib ln p p (8) composed of the frequency transfer functions. 4 Case ζ(a + ib) Consider s = a + ib for non–negative real a, b. Thus, each base element of the zeta function (4) equals 1 and by rearranging 1− e−(a+ib) ln p 1− e−aL e−ibL 1 , (9) in which L = ln p. Introducing K = e−aL as form of a gain, it composes a feedback loop with positive feedback shown in Fig. 4. Analogously with Fig. 2, it relates to transfer function Y (s)/R(s) = 1/(1 − Ke−sL ) for s = ib. Consider again L = ln 2 for time delay in Fig. 4. If a reference unit step input occurs, then it immediately is transferred to the output, i.e. y(t) = 1 for t > 0. In feedback, it is multiplied by gain K, delayed by time L, and added to the reference input, i.e. y(t) = 1 + K for t > L. It again is multiplied by K, delayed by time L, added to reference input, which products 5 R(s) + Y (s) + K e−sL Figure 4: Base element (9) as a feedback loop, s = ib. y(t) = 1 + K(1 + K) = 1 + K + K 2 for t > 2L, y(t) = 1 + K(1 + K(1 + K)) = 1 + K + K 2 + K 3 for t > 3L etc. It forms transient response which is shown in Fig. 5. Note that a specific case of this response for K = 1 is in Fig. 3 . A complex step signal y(t) is generated by an irregular height of individual steps. In Fig. 5, point 1 + K ∗ on vertical axis relates to 1 + K, 1 + 2K ∗ to 1 + K + K 2 , 1 + 3K ∗ to 1 + K + K + K 2 + K 3 etc. y 1 + 7K ∗ 1 + 6K ∗ 1 + 5K ∗ 1 + 4K ∗ 1 + 3K ∗ 1 + 2K ∗ 1 + K∗ 1 0 ln 2 3 ln 2 5 ln 2 7 ln 2 t Figure 5: Transient response associated with transfer function 1/(1 − Ke−s ln 2 ). Since K ≤ 1 and K > 0, summation 1+K +K 2 +. . .+K n constitutes geometric series having partial sums 1 + K + K 2 + . . . + K n = (1 − K n+1 )/(1 − K) and the infinite sum 1/(1 − K). A few single time points in Fig. 5 together with related values of transient response is collected in Tab. 2. Since a close relation between geometric series and exponential functions, the partial sum of the geometric series can be written as   1 1 1 − K n+1 = 1 − e(n+1) ln K , 1−K 1−K 6 (10) n y 1 1 − K2 1−K 2 1 − K3 1−K 3 1 − K4 1−K 4 1 − K5 1−K ... ... Table 2: Values of transient response representing transfer function 1/(1 − Ke−s ln 2 ). in which n ≥ 0 and n = 0 relates to t = 0, n = 1 to t = ln 2, n = 2 to 2 ln 2 etc. It expresses transient response of the first order transfer function Ke−sL , (11) 1 + Ts where K is gain, T time constant and L time delay. This kind of transfer function is called FOPDT model or three–parameter model [6, 7]. Gain of transfer function (11) is given by the steady state of unit step response K = 1/(1 − K) − 1 owing to the initial condition y(0) = 1, then 1+ K . 1−K Identification of the time constant T is based on pairs in Tab. 2 giving K= (12) ln 2 . (13) 1−K It is based on scenario, in which the tangent line of transient response at beginning intersects the point K indicated in Fig. 2. If the ratio of K/(1 − K) and time constant T determines ẏ(0), then the latter is determined by the ratio K and ln 2 as well. T = This approximation suggests that L = 0 permanently for all time delays of FOPDT model (10). A deeper analysis of transient responses for large prime numbers associated with big delays L and small gains K shows that the shape of the response in Fig. 5 is relatively rare. More often, responses are similar to single steps characterized by delay L and one magnitude 1 + K since the very small squares of K (10). This observation was independently confirmed by a use of the three–parameter model calculus [7], which underlines the importance of the time delay approximation in describing behavior of feedback loop in Fig. 4. Use of this calculus also showed that the time constant (13) estimates rather give the average residence time of FOPDT model Tar = T + L, see (11) than the time constants themselves. Thus, the estimated time constant results in T = and the estimated time delay ln 2 √ K 1−K ln 2 L= 1−K These estimates agree with observations. If K is tiny. Conversely, the time delay rises up. change in this case.  √  1− K . (14) (15) is very small, then the estimated time constant Response (10) looks almost like a single step Therefore, one can conclude that the Riemann zeta function ζ(a + ib) is described by the endless transfer function called FOPDT approximation or complex approximation in the form ! Y K p e−sLp , (16) 1+ 1 + T s p p 7 where Kp = e−a ln p = p−a , K p = Kp /(1 − Kp ), Tp = and Lp = ln p p Kp 1 − Kp p  ln p  1 − Kp 1 − Kp or by the FOPDT frequency function (16) ζFOPDT (a + ib) = Y p Kp e 1 + ibTp −ibLp 1+ ! . (17) Note for completeness, that for Pade approximation of (9) we obtain 1/[1−K(1−SL/2)/(1+ sL/2)] = (1 + sL/2)/[(1 − K) + (1 + K)sL/2], which eventually leads to transfer function based on the single base elements 1 + s ln p/2  .  1 + Kp ln p/2 s 1+ 1 − Kp This approximation indicates a different initial point for the transient response. Whilst y(0) = 1 for (16), y(0) = 1/(1 + Kp ) at Pade approximation. If a = 0, then y(0) = 0.5 in accordance with (7). However, the Pade approximation is only applicable to the base elements having small time delays. 1 1 − Kp 5 FOPDT approximation experiments Some typical real values (b = 0) obtained by FOPDT approximation (16) are collected in Tab. 3. Experiments were carried out with the first million of prime numbers [1]. a 2 3 4 5 6 ζ(a) Tabular value 1.6449 π 2 /6 1.2021 1.0823 π 4 /90 1.0369 1.0173 π 6 /945 a 7 8 9 10 12 ζ(a) Tabular value 1.0083 1.0041 π 8 /9450 1.0020 1.0010 π 10 /93 555 1.0002 691π 12/638 512 875 Table 3: Some real values of the Riemann zeta function obtained through FOPDT approximation. Results for complex values of s = 2 + bi obtained by FOPDT approximation (17) summarize Tab. 4. Experiments were carried out with the first million primes as well. For comparison, Tab. 4 refers to tabular values of ζ(2 + ib) on the first 4 decimal places. The tables 3 and 4 show that real and complex values of the Riemann zeta function obtained by FOPDT approximation (17) are rather accurate. In the case of complex values surprisingly up to two decimal places since achieved by simple FOPDT model. 8 b 0.1 0.2 0.3 0.4 0.5 ζ(2 + ib) 1.6351 − 0.0928i 1.6067 − 0.1799i 1.5627 − 0.2567i 1.5075 − 0.3202i 1.4455 − 0.3692i Tabular value 1.6350 − 0.0927i 1.6067 − 0.1798i 1.5628 − 0.2565i 1.5079 − 0.3198i 1.4463 − 0.3688i b 0.6 0.7 0.8 0.9 1.0 ζ(2 + ib) 1.3807 − 0.4041i 1.3165 − 0.4262i 1.2552 − 0.4375i 1.1980 − 0.4399i 1.1459 − 0.4353i Tabular value 1.3821 − 0.4037i 1.3187 − 0.4261i 1.2582 − 0.4378i 1.2018 − 0.4410i 1.1504 − 0.4375i Table 4: Some complex values of the zeta function obtained through FOPDT approximation. 6 Conclusion Based on the similarity of transient characteristics, two approximations of the Riemann zeta function for a > 1, ζPI (see (8)) and ζFOPDT (see (17)), were obtained. Approximation of the Riemann zeta function results in a dynamic model consisting of base elements including positive feedbacks and delays, which are infinitely many times serially connected. It provides rather accurate approximations owing to their simplicity. The paper points to the possibility of using the methods of cybernetics for solving problems in number theory. Two cybernetic–like models were derived close to the Riemann zeta function in terms of single transfer functions. Based on this paper it can be remarkably concluded, that such fundamental concepts of cybernetics as PI controllers or FOPDT models stand in the modeling of the fundamental and complex function as the zeta function undoubtedly is. Can cybernetics be used e.g. in the density analysis of primes with respect to the known role of the Riemann zeta function in this subject? References [1] Ch. Caldwell (1994–2012): The Prime Pages. Online primes.utm.edu. [2] C.C. Clawson (1996): Mathematical Mysteries. The Beauty and Magic of Numbers. Basic Books. [3] G. Doetsch (1961): Anleitung zum Praktischen Gebrauch der Laplace–Transformation. R. Oldenbourg, Műnchen. [4] H.M. Edwards (2001): Riemann’s Zeta Function. Dover Publications. [5] P. Klán (2014): Numbers. Relationships, Insights and Eternal Inspirations. Academia Prague (in Czech). [6] P. Klán, R. Gorez (2011): Process Control. FCC Public. [7] P. Klán (2011): A Comprehensive Calculus of Three–Parameter Models. Automa No. 8-9, 70–73 (in Czech). [8] M. Křı́žek, M. Markl, L. Somer (2013): In 2013, Pierre Deligne won the Abel Prize for fundamental work joining algebra and geometry. Pokroky matematiky, fyziky a astronomie, Vol. 58, No. 4, 265–273 (in Czech). [9] I. Stewart (2013): Visions of Infinity. Basic Books. 9
3cs.SY
Intent-Aware Contextual Recommendation System Biswarup Bhattacharya∗ , Iftikhar Burhanuddin† , Abhilasha Sancheti‡ and Kushal Satya§ ∗ Department arXiv:1711.10558v1 [cs.IR] 28 Nov 2017 of Computer Science, USC Viterbi School of Engineering University of Southern California, Los Angeles, CA 90089. USA. Email: [email protected] † ‡ Adobe Research † Email: [email protected] ‡ Email: [email protected] § Adobe Email: [email protected] Abstract—Recommender systems take inputs from user history, use an internal ranking algorithm to generate results and possibly optimize this ranking based on feedback. However, often the recommender system is unaware of the actual intent of the user and simply provides recommendations dynamically without properly understanding the thought process of the user. An intelligent recommender system is not only useful for the user but also for businesses which want to learn the tendencies of their users. Finding out tendencies or intents of a user is a difficult problem to solve. Keeping this in mind, we sought out to create an intelligent system which will keep track of the user’s activity on a webapplication as well as determine the intent of the user in each session. We devised a way to encode the user’s activity through the sessions. Then, we have represented the information seen by the user in a high dimensional format which is reduced to lower dimensions using tensor factorization techniques. The aspect of intent awareness or intent scoring is dealt with at this stage. Finally, combining the user activity data with the contextual information gives the recommendation score. The final recommendations are then ranked using some filtering and collaborative recommendation techniques to show the top-k recommendations to the user. A provision for feedback is also envisioned in the current system which informs the model to update the various weights involved in the recommender system architecture. Our overall model aims to combine both frequencybased and context-based recommendation systems and quantify the intent of a user to provide better recommendations. We ran experiments on real-world timestamped user activity data, in the setting of recommending reports to the users of a business analytics tool/application and the results are better than the baselines. We also tuned certain aspects of our model to arrive at optimized results. I. I NTRODUCTION In the business world, showing the advertisement of the “appropriate” product to the “appropriate” person at the correct time is the most definite method of attracting customers. This is the general underlying thought behind digital marketing solutions which exist in the current ecosystem. Occasionally, it may be easy to figure out what the user wants but generally it isn’t that trivial. Therefore, there is a need for an effective recommendation system which can identify what the user wants to do and needs to do. When we talk about what a user wants to do, there are three questions involved. The first question is: Does the user like what he is doing? This is probably a harder question to answer but after analyzing in a web-based situation this reduces to observing things like the frequency of visits, the duration spent by the user on a page, the depth of each visit and so on. Determining the answer to this question at least for a customized scenario is an essential component in improving the recommendations for a user so that the user ultimately starts liking the material shown/suggested to him and he starts spending more time on the webpage. The sweet spot in any recommender system algorithm is to get positive reinforcement which can lead to more revenue for the businesses involved and greater satisfaction of the user. Thus, it is a win-win situation for everyone involved. The second question is: Does the user want to do what he did the last time? For example, an electronic music listener would like electronic music recommendations with high probability. In such situations, we can extrapolate that we can get better results if we suggest them electronic music soundtracks rather than rock music. This leads us on to the third question: Does the user want to do something new that he never did before? This is a very difficult question to answer and much work has been done on providing diversification in recommendation systems to handle problems exactly like this [1]. If we can identify what is going on in user’s mind then we can design a “smart” system. Coming on to the second part of what the user needs to do, there are certain aspects involved. A user in a business setting (for eg. an employee using a company’s product) generally has an objective provided to him by the administration that he needs to fulfill. Thus, understanding the function of the user and his requirements is an essential component to designing a suitable recommendation system. Speaking from a virtual assistant perspective, if a user is in the sales department of a company then he will want suggestions related to methods of improving sales and may not be bothered about getting computer programming suggestions. However, the programming suggestions may be useful to the technical team who primarily do not have to bother about the sales issues. Thus, even though as a company, both of these two suggestions may be of high relevance to the overall group of “employees of the company”, we see that our recommender system must understand what ©2017 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. DOI: 10.1109/ICDMW.2017.8 each user in that company needs to do to provide effective recommendations. A simple frequency-based recommender system essentially remembers the pages visited in the previous sessions by the user and suggests those pages itself. This is a simple algorithm but has obvious issues like not taking into account the content of the page. An alternate system of recommendations which exists is a content-based recommendation system. Lots of variations exist in literature about this [2], [3], [4], [5], [6] however, the basic idea remains the same i.e. the system essentially tries to observe the usefulness of a piece of content (or webpage) to a user and thus recommend it to a user. Usually, there is some sort of relevance “score” involved which can range from simple methods like cosine similarity to more complex algorithms. The novelty of our work lies in the focus on combining these two aspects of recommender systems in the hope of providing better recommendations. We propose an innovative method of encapsulating the user intent so as to increase the relevance of the recommendations shown. In complex systems, there are a vast array of parameters which can be changed, thus leading to thousands of possible recommendations which can be suggested to the user. Overall, in this paper, we suggest a methodology to rank the content and combine this ranking with historical browsing knowledge to arrive at a new recommendation score. We conduct experiments on real data for recommending reports to users to demonstrate the effectiveness of our approach. II. R ELATED W ORK Firstly, we have a content-based recommendation system which recommends particular kinds of items to the users. This consists of the recommendation system used by Netflix [7], traditional music recommendation systems [8] and video recommendation by YouTube [9]. These kinds of recommendations are driven by the content of the items to be recommended (i.e. description of the music, movie title, genre etc.) and a profile of the user’s preference based on the historical information. A way of combining the global popularity and the user preference of videos to recommend the next N videos recommendation on YouTube is described in [9]. Various methodologies like use of latent factors to model the relationship between items and users and to determine the rating of videos by the neighboring videos seen by the user are discussed in [7]. Other kinds of systems deal with a Markov-model approach. This consists of models which study item similarity to understand sequential patterns and recommend next set of items based on the previous set [10]. User’s preference for different items can be modeled using a Markov chain. Therefore a transition matrix is estimated that gives the probability of buying an item based on the previous purchases of the user. Tensor decomposition methods can be used to promote collaborative filtering by combining transition matrices of similar users. However these models lack the knowledge of contextual signals from the user. Then, we have context-based recommendation systems. These systems represent context(such as time, place) either explicitly through various external signals [11], [12] or implicitly using the technique of exploration and exploitation [13]. Tensor decomposition methods can be extended to combine content, context and collaborative filtering as in [11]. Bandit’s approach can be used to generate context aware online recommendations. Instead of modeling context explicitly through external signals, [13] uses user activity or user feedback to model the context and hence gives the most suitable recommendation in that context. These systems lack sequential evolution of the state and they do not consider the final intent of the user. Finally, some literature exists on tracking user intent by analyzing context. Contextual Markov chains [14] and nowcasting models [15] have been studied to track user intent through the context. However context modeling in these cases are limited to consumer applications. Context and intent in enterprise applications have to be dealt with differently and modeled in a way relevant for the enterprise users. The motivation behind our work comes from the intent tracking with sequential evolution as described in [11]. We have redesigned the algorithm combined with other techniques to suit our needs. III. P ROBLEM D EFINITION In this section, we formally define the problem we target to solve in this paper. There are certain special business intelligence tasks involved which require the user to go through the content of multiple reports to arrive at conclusions. Often, specialized business intelligence tools are used for this purpose. Thus, the user has an end goal in mind which is of prime importance to the recommendation system. We refer to this goal as the intent of the user which in our scenario is a report. This is a very difficult task to solve given the current literature. Our system aims to provide recommendations of this manner where the system tries to understand the end goal of the user thereby assisting the user in coming to conclusions faster. This also helps in reducing human error as the system essentially tries to understand the quality of the webpage content (which in the normal case the user tries to utilize manually) and suggest webpages (reports in our scenerio) accordingly. Also, in our case, a new user of a tool may be overwhelmed by the number of features provided by it. There is not much history involved for a new user so recommendations are not “correct” or appropriate most of the times. This user’s needs have to be understood over a certain period of time. Thus, in this case, a collaborative approach makes sense. There has been some work done in case of expert recommendations in literature [16]. Our system utilizes a collaborative/group-based model to suggest recommendations in order to address this issue. In this paper, we aim to solve the following questions: • Predict user intent which is the end goal or report in our scenario, from context and frequency Determine the relationships between various features in the content of a webpage • Determine the right content, data and representation based on the type and expertise of the user • Find the most suitable recommendation scoring system We will propose a model that is able to address the above questions. We will refer recommendation items as reports and users as analysts in the paper, but the approach works with any type of items with parse-able information (e.g. webpages, products, movies, music etc.). • Fig. 1. Frequency Model using hit data (Section V-A) IV. S YSTEM D ESIGN In this section, we describe our approach in detail. We first describe the graphical and contextual models that predict the relevance of items to users (Sections IV-A,B,C,D), then we describe how we can incorporate these two models together to generate the recommendations (Section IV-E,F). Here, items refer to the reports seen by the users. Each report is a dimension which gives the value of a metric for each of the dimension elements. Metric is a continuous variable, dimension is a categorical variable and dimension element is a value that a dimension takes. For example, for a report “Page Views” which consists of the page views of individual pages in a website, the dimension elements can be {“homepage”, “sales page”, “contacts page”} and so on and the metric for these elements is “number of views”. Time-series reports capture the variation of a metric over time for a particular dimension element while histogram reports consist of histograms of metrics over different dimension elements. Finally, we briefly discuss about feedback in this scenario (Section IV-G). We propose a solution to predicting user intent based upon current context and combining it with a frequency based graphical model to provide relevant recommendations to the user. We have defined the current context as the current report being looked at by the analyst. Our solution approach has 3 main steps: 1) Modeling browsing patterns through a user navigation graph (Markov Model) where each node is uniquely represented. 2) Modeling context of the user as a matrix of context features versus time and predicting user intent from latent factors which are obtained from current context. 3) Combining the Markov Model and the intent scores to give relevant recommendations to the user. A. User Navigation Graph The first step of the algorithm is to generate a navigation graph for each user. We need to learn the reports (webpages) that each of the users visit so that we can build our set of reports from which to recommend. We do this by encoding additional information while building this graph of reports for every user. This forms the frequency-based recommendation aspect of our algorithm. The frequency model is illustrated in Figure 1 and explained below. A user navigation graph is a weighted directed graph with each node signifying a unique report seen by the user and each directed edge between node u and v signifying that the user transitioned between node u and v with probability greater than 0. This user graph can be thought of as a Markov model since the outgoing transition probabilities for each node sums up to 1. B. Determining the Target nodes The second step of the algorithm is to determine the target/intent nodes. The motivation behind this is that every user has some intent in his mind as was discussed before. The target nodes are denoted by setting the target attribute of the node to 1. Target nodes refer to the possible candidates for intent which is the end of analysis or a milestone. The target nodes were arrived by analyzing the sequences of nodes visited by the user in a session and using the following heuristics. If the node in question has in-degree greater than or equal the mean of the in-degrees of all nodes, then the target attribute is set to 1. This algorithm has yielded at least 1 target node even in the smallest of graphs particularly due to the inherent property of the statistical mean which ensures that at least 1 node will be set as a target. C. Context Model The next step of the algorithm is to model the user context. This forms the basis of the context-based recommendations as was discussed before. This combined with the frequency information encoded in the user navigation graph will give the final recommendation score. This combination is the novel step which is behind the improvement in performance. Section V-D gives the evidence of this improvement. Fig. 2. Building the context tensor There are mostly two kinds of reports seen by the users: one is the report in the form of histograms and the another is in the form of time series. To model context from the current report (that the user is seeing), we extract some relevant features as described below. This of course varies from domain to domain based on implementation. For each time-series report we extract the following 6 features [17]: aggregate value, maximum and minimum value of the time series, location of maximum and minimum observation, longest positive and negative runs, length of time series & average absolute change in consecutive observation. These features are calculated for each metric and dimension element pair. Alternatively, for each histogram report only the aggregate value as a feature is populated and rest of the 5 values in the vector are set to 0. From all the reports seen by a given user we form descriptions for building the context vector in which we specify a place for six different values for all the reports seen. So at each time instant, the corresponding vector is populated according to the type of the report. By combining context vectors at different time instants, the context matrix is formed for all the users. The users of the tool are analyzed and clustered into 4 categories depending on their exposure and competence level of using the tool using k-means clustering algorithm. This is done for the purpose of group-based recommendations which is discussed in Section IV-F. The users are categorized depending upon their usage and amount of activity on the tool. Activity here implies duration of browsing, number of redirects, reports seen. After clustering, the user matrix is combined for users within a cluster to form the context tensor. For a given user we have a set of different dimension elements over which metric is calculated. The cardinality of this for each metric m is PMset u denoted as dm . We define Du = m=1 dm where Mu is the cardinality of the set of all metrics seen by the user. For each report, we have 6 observable features. Thus the dimension of the context vector is 6 × Du , which we denote as N u . We populate all the 6 values for a time-series report and only the aggregate value is populated for a histogram report. All the remaining positions are given a value of zero indicating they are not present in the current report. The aggregation of many such context vectors over the number of reports seen form the context matrix. The dimension of the context matrix is hence N u ×T , where N u signifies the context variables which varies from user to user and T signifies the number of reports seen. We form the context tensor consisting of context matrices of U users from the same cluster. The method to generate the context tensor is illustrated in Figure 2. For each user we repeat the reports seen, such that the total number of reports seen is equal to the maximum number of reports seen by any user. Since the tensor is highly sparse and the number of context features varies from user to user, PARAFAC2 tensor decomposition is used to obtain latent factors for each report seen by the user [15], [18]. 1) PARAFAC2 Decomposition: For a three-way tensor i.e. N u × T × U , PARAFAC2 decomposition requires only two out of the three modes (N u , T and U ) to have uniform sizes, which in our scenario are the time (T ) and user modes (U ), while the third mode N u can be of different sizes. The decomposition is equivalent to solving the following optimization problem: (F̃, Λ̃u )u=1,2,...|U | = minu F,Λ |U | X ||Xu − Λu F||2 F (1) u=1 where F is the Frobenius norm. The latent factor space dimensionality is R × T . The value of T is discussed above. The value of R is a constant fixed by us for design purposes. It is typically a value much smaller than the number of users (|U |), which leads to the reduction of the dimensionality of the original context tensor (X). After decomposition, the panel for the uth user is approximated by Xu ≈ Gu HSu V0 u N u ×R (2) R×R where G ∈ R is an orthonormal matrix, H ∈ R is a matrix invariant to u, Su ∈ RR×R is a diagonal matrix and V ∈ RT ×R is the matrix containing the collaborative latent factors at T time instances. The latent factors are a lower dimensional representation of reports. For the uth user, the initially estimated latent factors are F̃u = F̃ = V0 (3) and the factor loading matrix is estimated by Λ̂u = Gu HSu (4) 2) Kalman Filter: Kalman Filter is used to enforce the dynamics and sequential correlations in the latent factors. Let the a priori and a posteriori latent factors and error covariance matrices at time step t be f̃t , f̂t , P̃ut and P̂ut , respectively. Au represents the transition matrix. In the time update (prediction) step, the a priori factors for the next time step are computed by f̃t = Au f̂t−1 + ω ut (5) and the priori error covariance by 0 P̃ut = Au P̃ut−1 Au + Qu (6) In the measurement update (correction) step, the Kalman gain Kut equals 0 Kut = P̃ut Λu (Λu P̃ut Λu + Ψu )−1 (7) where Ψ is the covariance matrix [15]. With the Kalman gain, the a priori latent factors are corrected by available contextual signals (missing signals are assigned a very large variance), and the a posteriori factors equals u f̂t = f̃t + Kut (xt − Âf̃t ) (8) The a posteriori error covariance for next time step equals P̂ut = (I − Kut Λu )P̃ut (9) I is the identity matrix The value of R was iterated over multiple values to arrive at optimal values so that latent factors can be evolved faster [15]. D. Ranking of Latent Factors To distinguish between the finally evolved latent factors (using Kalman filtering) with and without intent I for each user, the pair-wise learning-to-rank method of RankSVM [19] was used. Fig. 3. Context Model to get relevance scores From the ranking function we wish to obtain the intent score (S) such that scores are normalized to be between 0 and 1. Here, w ~ · ~f represents the distance between the training point and plane separating positive training and negative training points. The latent factors are normalized to have norm 1. Now since the RankSVM measures the distance between the hyperplane and the set of points, the distance value lies between −4 and 4 (since the difference of latent factors have norm less than 2 after normalization). For every test data, we calculate the latent factor (~f ) for the report seen and take its dot product with the weights for each intent which finally gives us the intent score (S) , normalized to be between 0 and 1: SI (~f ) = (4 + w ~ I · ~f ) 8 (12) The method to get the relevance score through the context model is illustrated in Figure 3. E. Recommendation Scoring Fig. 4. The recommendation system with feedback Based on the training data we have the set R1 which consists of all the latent factors fi such that the user eventually ends up at target node I in the session. Similarly we have the set R2 which consists of all the latent factors fj such that the user does not eventually end up at target node I in the session i.e. the user reaches a target node other than the intent I. We define g(I, fi ) = 1 if fi belongs to the set R1 otherwise g(I, fi ) = 0 if fi belongs to the set R2 . So, this notation induces a partial ranking of latent factors for intent I such that fi is preferred over fj for intent I. P is a set as defined below. P = {(i, j) : fi ∈ R1 and fj ∈ R2 } The objective of the RankSVM is to learn the ranking function g(I, fi ) such that g(I, fi ) > g(I, fj ) for all fi ∈ R1 and fj ∈ R2 . Thus, g(I, fi ) can be defined as g(I, fi ) =< w, ~ fi > (10) Following a large margin approach leads us to the optimization problem: X min < w, ~ w ~ > +λ ij (11) w, ~ ij ≥0 ij s.t. ∀(i, j) ∈ P, < w, ~ fi > ≥ < w, ~ fj > + 1 − ij , where λ > 0 determines the trade-off between margin maximization and error minimization. The latter is the sum of individual losses ij and constitutes an upper bound on the 0/1-loss of mistaken preference relations. The constraints enforce < w, ~ fi > is greater than < w, ~ fj > whenever possible and penalize violations thereof. Once optimal w ~ has been learned they can be used to induce ranking of new latent factors for each intent. The next step of the algorithm is to determine the recommendation scores for the candidate recommendable nodes. This is the step which puts together frequency-based and context-based recommendations. According to our hypothesis, our aim was to prove that combining both of these can actually improve recommendations. This step is responsible for finally combining the intent scores, edge weights (Wuv ) and the masses (Mv ). The formula that we are using for scoring recommendation (Kuv ) is as follows: Kuv = (αv × Wuv × Rv ) + (βv × Mv ) (13) The components of the recommendation score are as follows: • Wuv : This is the historical probability that the user goes from current node, u to a recommendable node, v. This probability information is stored in the graph itself as the edge weight. • Rv : This is the relevance score of the recommendable node, v. This score is essentially a function of the intent scores and the probabilistic distance from the node v to the set of target (intent) nodes (the function definitions Max-IxD and Dot-IxD are discussed in Section V-D). Using single source Dijkstra shortest path algorithm, we calculate the distance between the node v and the target nodes in the graph. In our case as the edge weights of the graph are not the distance between two nodes but the probabilities of transition, probabilities are to be multiplied when traversing through the graph. Keeping this in mind, we converted the edge weights to their negative natural logarithms (as natural logarithm of probabilities which are values less than 1 give negative values, a negative sign is added to make the weights positive). Thus, adding logarithms corresponds to multiplication of the probabilities. Hence, with this modification, single source Dijkstra shortest path algorithm was applied to find these shortest paths. Finally, for the node v, a list of targets and the probability of reaching those targets from the node v based on the user’s historical user navigation graph was calculated. • Mv : It is the fraction of the total browsing time of the user that he spent on the node v. The word “mass” is being used to denote the notion of weighing down i.e. if the mass of a node is relatively high, the user is weighed down in that node as he spends more time there compared to the other nodes. • αv , βv : These are the feedback factors of node v. These factors are initialized with 1.0. However, they change on receiving feedback. The recommendation scoring technique is illustrated in Figure 4. The recommendation score is generated for all nodes v connected to the current node u, as well as for all nodes w connected to each of the nodes v. Hence, essentially, 1-step and 2-step distanced nodes from u get a score. This calculation is done for all the user graphs available irrespective of the current user. The reasoning behind the formula is henceforth explained. The Rv gives the true score of the relation between the current user context and intent. This score incorporates the report data and other stimuli. The Rv calculation results in the scoring of the intents but it does not really deal completely with the actual history involving the nodes to be recommended. It is more of a score which assures that from node v a certain set of intents can be reached or, should be reached (goals or reports which are required to complete an analysis). However, the past user behavior might indicate other tendencies of the users. Historical analysis might reveal that the user is always interested in certain kinds of reports which may not always be encoded by the contextual information. For handling such kind of cases, multiplying the edge weight with the relevance score makes logical sense as the edge weight itself can act like a weighing factor to the relevance score. Thus, a node with high Rv which a user rarely visits may not be shown as the top recommendation due to the fact that the user is not likely to find it useful as per their browsing history. Thus, in most cases, it is expected that the edge weight as well as relevance should be positively correlated and the multiplication would not affect the ordering. However, for cases where the correlation between the edge weight and the relevance is negative then the multiplication plays a role in trading off each value with each other and arriving at a more realistic prediction. Finally the mass is added as an offset to the recommendation score. It is generally a small factor which signifies the importance of a node. In cases where the Rv × Wuv is similar, the mass will determine the ranking as the actual time spent by the user historically must be factored in. In other cases, based on empirical analysis, the mass does not play a deciding role as such. However, the mass attribute can be used finally to break ties if there are any (discussed further in Section V-B). F. Group-based Recommendations Apart from recommending reports to a user from that user’s graph we also recommended reports from other user graphs or user groups. This step is especially useful for new or novice users who do not have much personal history with the tool. For such users, sourcing recommendations from an “experienced” group is a good idea and it has been shown to work. First, to identify the users, we selected user groups based on clusters. For new or inexperienced users, we gave recommendations from clusters which contained more experienced users. Secondly, after identifying the relevant clusters we identified the set of users who have the same report/node in their graph and at least one of the target node. Finally, for the selected users, we calculated the recommendation score in a similar manner as we calculated above but with some slight variations. Intent scores (Rv ) are the same as the intent scores of the original user (the user to whom the recommendations are shown). Edge weights (Wuv ) and mass (Mv ) are taken from the selected users’ (group) graphs. Therefore, the notion of “distance” as discussed before is also according to those selected users’ (group) navigation graph. We calculated recommendation scores only for those nodes from other users which were not present in the original user graph i.e. nodes novel to the original users. These recommendation scores are combined with the recommendation scores of original user to give the final set of recommendations. In the next section we will see that feedback can be used to inform the model and provide better recommendations. G. Feedback The final step of the algorithm is to gather implicit/explicit feedback and update the system. Feedback is a very important requirement in any ranking system as it informs the algorithm about its own correctness and rectification can be done in the subsequent calculations. We defined feedback in the following situations: Explicit positive feedback: If a user clicks on one of the recommendations shown in the list. • Explicit negative feedback: If a user deletes one of the recommendations shown in the list. • Implicit positive feedback: If a user does not click on any of the recommendations shown in the list, however navigates to a page which existed in that list. This is particularly an important piece of information as this addresses many of the problems existing in today’s recommendation system. The recommender intelligently identifies the actions of the user and updates accordingly. • Implicit negative feedback: If a user does not click on any of the recommendations shown in the list and navigates to a page which did not exist in that list. Thus, even though the user did not delete any recommendation, this can be taken to be a weak signal of negative feedback. This leads to a change in the Wuv , Mv , αv and βv values which were introduced before. The appropriate values can be updated on the basis of mathematical optimization methods as well as empirical observations. Also, the updating algorithm must be slightly different for giving feedback on 2-step nodes compared to 1-step recommendations. A simulation system is planned to evaluate the feedback mechanism. • V. E XPERIMENTS In this section we will showcase the performance improvements of our model compared to baseline models. We will first describe the dataset, the algorithm setup with respect to our case and then evaluate our model with other baselines. We also conduct several case studies to show which recommendation score is the most appropriate. A. Dataset We used real-world hit data. A hit corresponds to a report access. The hit data essentially consisted of time-stamped user activity tracking. Data was filtered to give relevant information like timestamp, report requested, URL, metrics seen, and so on. The data also has information related to the session which is used to sessionize it for context modeling. We used 10 days hit-level data. This data is taken across different companies so the number of users varies depending upon the company. The number of reports visited by each user also varies depending upon his tasks. The data contained information about the user as well as the reports visited by each user at each timestamp. The data was finally sessionized to understand and segregate the transitions. We trained our model on 70% of the data (first 7 days) and tested on the remaining 30% (last 3 days) data. Further work may be conducted by using alternative training-testing methods like interleaved training, increasing the percentage of the training set, increasing the amount of overall data and so on. B. Ranking of Recommendations The recommendations generated using the methodology described in Section IV are stored along with the information such as the value of recommendation score, Rv , αv , βv , Mv , TABLE I C OMPARISON OF PROPOSED SYSTEM WITH BASELINES & DIFFERENT Rv Method Mass Frequency Context Based PARAFAC2 Model Max-IxD Dot-IxD Max-I Sum-I (proposed) NDCG 0.4297 0.4744 0.5228 0.5470 0.4908 0.5274 0.4736 0.5706 Precision 0.0885 0.0853 0.1003 0.0987 0.1006 0.1021 0.0969 0.1006 Recall 0.6181 0.5866 0.6730 0.6343 0.6753 0.6911 0.6390 0.6753 w-AUC 0.5867 0.5866 0.7226 0.6250 0.6858 0.7165 0.6555 0.7239 Wuv and whether the node is actually the 1-step or 2-step recommendation. Now, these generated recommendations are ranked in the following order of preference: 1) Kuv (Descending): This is the recommendation score obtained by using Equation (13). It is highly unlikely that two nodes will have the same recommendation score. 2) Collaborative or not (Preferring the recommendations got from the current user graph over the recommendations got from the other user graphs) 3) Rv (Descending): Relevance score (Section IV-E). 4) Wuv (Descending): If a node v is not adjacent to u then shortest path weight which is the product of probabilities on the path is taken. 5) Mv (Descending): “Mass” of the node (Section IV-E). C. Baselines We tested our model against the baselines described below: 1) Frequency: Recommendation based upon the probabilistic graphical model i.e. based upon edge weights (Wuv ) in the user navigation graph. 2) Mass (Mv ): Recommendation based upon the average time spent on the reports seen. 3) Context: Recommendation based upon intent scores obtained from the current context of the user. 4) Tensor Factorization: Recommendation based upon obtaining latent factors only from PARAFAC2 tensor decomposition (without Kalman Filter regularization). D. Results We tested our model on the 4 metrics: NDCG (Normalized Discounted Cumulative Gain), Precision, Recall and w-AUC (weighted average Area Under the Curve). The results shown below are for the users seeing considerable number of unique reports. The results for performance of our algorithm against other baselines are summarized in Table 1. It is seen that the proposed model i.e. the Markov model with context modeling using PARAFAC2 and Kalman Filtering works better than the other models with respect to the metrics used. The precision is near 0.1 because we set an upper limit to the number of recommendations to be generated to be 10 and for every recommended list, there could be only 1 correct recommendation as testing was done by simply checking the immediate next report access. The number of reports seen/accessible (universe of reports) is a huge number thus driving down overall results in case of precision. However, it is clear from comparison that our algorithm indeed performs better than baselines with respect to each metric. We have also varied the recommendation scoring formula. In this case, the general formula structure remains the same as Eqn. (13), but the method of calculation of Rv changes. The key for the formulae are as follows: • Max-IxD: Rv = Maximum of (intent scores * distance to target node) • Dot-IxD: Rv = Dot product between intent score and distances of node to those intents • Max-I: Rv = Maximum of intent scores • Sum-I: Rv = Sum of intent scores (proposed) It is observed that Dot-IxD performs better than other methods with Precision and Recall. The intuition behind Max-IxD is to extract the information of the most relevant and visited nodes among the options. Similarly, the intuition behind DotIxD is to get a single score which captures not only the maximum but encodes the information of all possible intent scores and the distances. The proposed model in Table 1 uses the Rv as described in the Sum-I method. The intuition behind proposing Sum-I is the fact that it considers the relevance scores fully without any discount and does not lead to any bias. As we are already considering the probabilities of reaching a node through the user navigation graph (Wuv ), it is not necessary to encode the distance information again in Rv . VI. C ONCLUSION In this paper we have proposed a novel recommendation system combining a probabilistic graphical model with tensor factorization and Kalman filtering. Though some steps like tensor factorization are computationally heavy, they are to be conducted after long periods (once a day). The updating of latent factors through Kalman filter is a fast process thus making the system suitable for usage in real-time. From the results, we are able to justify our hypothesis that combining frequency and context-based recommendations should lead to better results. Further analysis maybe conducted by tuning the parameters and incorporating the feedback system which should lead to improved results. ACKNOWLEDGMENT This work was done during an internship at Adobe Research BigData Experience Lab, Bangalore, India in summer 2016. The authors would like to thank Adobe Research for their support. R EFERENCES [1] C.-N. Ziegler, S. M. McNee, J. A. Konstan, and G. Lausen, “Improving recommendation lists through topic diversification,” in Proceedings of the 14th International Conference on World Wide Web, ser. WWW ’05. New York, NY, USA: ACM, 2005, pp. 22–32. [Online]. Available: http://doi.acm.org/10.1145/1060745.1060754 [2] M. J. Pazzani and D. Billsus, Content-Based Recommendation Systems. Berlin, Heidelberg: Springer Berlin Heidelberg, 2007, pp. 325–341. [3] I. Cantador, A. Bellogı́n, and D. Vallet, “Content-based recommendation in social tagging systems,” in Proceedings of the Fourth ACM Conference on Recommender Systems, ser. RecSys ’10. New York, NY, USA: ACM, 2010, pp. 237–240. [Online]. Available: http://doi.acm.org/10.1145/1864708.1864756 [4] P. Lops, M. de Gemmis, and G. Semeraro, Content-based Recommender Systems: State of the Art and Trends. Boston, MA: Springer US, 2011, pp. 73–105. [5] K. Yoshii, M. Goto, K. Komatani, T. Ogata, and H. G. Okuno, “Hybrid collaborative and content-based music recommendation using probabilistic model with latent user preferences,” in Proceedings of the 7th International Conference on Music Information Retrieval (ISMIR), 2006, pp. 296–301. [6] M. Claypool, A. Gokhale, T. Miranda, P. Murnikov, D. Netes, and M. Sartin, “Combining content-based and collaborative filters in an online newspaper,” 1999. [7] R. M. Bell and Y. Koren, “Lessons from the netflix prize challenge,” SIGKDD Explor. Newsl., vol. 9, no. 2, pp. 75–79, Dec. 2007. [Online]. Available: http://doi.acm.org/10.1145/1345448.1345465 [8] O. Celma, “Music recommendation and discovery,” in Springer Berlin Heidelberg, 2010, pp. 43–85. [9] B. L. James Davidson, P. N. Junning Liu, U. G. Taylor Van Vleet, Y. H. Sujoy Gupta, B. L. Mike Lambert, and D. Sampath, “The youtube video recommendation system,” in Proceedings of the fourth ACM conference on Recommender systems, ser. RecSys ’10. New York, NY, USA: ACM, 2010, pp. 293–296. [Online]. Available: http://doi.acm.org/10.1145/1864708.1864770 [10] S. Rendle, C. Freudenthaler, and L. Schmidt-Thieme, “Factorizing personalized markov chains for next-basket recommendation,” in Proceedings of the 19th International Conference on World Wide Web, ser. WWW ’10. New York, NY, USA: ACM, 2010, pp. 811–820. [Online]. Available: http://doi.acm.org/10.1145/1772690.1772773 [11] A. Karatzoglou, X. Amatriain, L. Baltrunas, and N. Oliver, “Multiverse recommendation: N-dimensional tensor factorization for contextaware collaborative filtering,” in Proceedings of the Fourth ACM Conference on Recommender Systems, ser. RecSys ’10. New York, NY, USA: ACM, 2010, pp. 79–86. [Online]. Available: http://doi.acm.org/10.1145/1864708.1864727 [12] G. Shroff, L. Dey, and H. Ghosh, “Enterprise contextual intelligence.” in WI-IAT (1). IEEE Computer Society, 2014, pp. 202–209. [13] N. Hariri, B. Mobasher, and R. D. Burke, “Context adaptation in interactive recommender systems.” in RecSys, A. Kobsa, M. X. Zhou, M. Ester, and Y. Koren, Eds. ACM, 2014, pp. 41–48. [14] J. Kiseleva, H. T. Lam, M. Pechenizkiy, and T. Calders, “Predicting current user intent with contextual markov models,” in 13th IEEE International Conference on Data Mining Workshops, ICDM Workshops, TX, USA, December 7-10, 2013, 2013, pp. 391–398. [Online]. Available: http://dx.doi.org/10.1109/ICDMW.2013.143 [15] Y. Sun, N. J. Yuan, X. Xie, K. McDonald, and R. Zhang, “Collaborative nowcasting for contextual recommendation,” in Proceedings of the 25th International Conference on World Wide Web, WWW 2016, Montreal, Canada, April 11 - 15, 2016, 2016, pp. 1407–1418. [Online]. Available: http://doi.acm.org/10.1145/2872427.2874812 [16] V. Arnold, N. Clark, P. A. Collier, S. A. Leech, and S. G. Sutton, “The differential use and effect of knowledge-based system explanations in novice and expert judgment decisions,” MIS Quarterly, vol. 30, no. 1, pp. 79–97, 2006. [Online]. Available: http://www.jstor.org/stable/25148718 [17] J. Wiens, E. Horvitz, and J. V. Guttag, “Patient risk stratification for hospital-associated c. diff as a time-series classification task,” in Advances in Neural Information Processing Systems 25, F. Pereira, C. J. C. Burges, L. Bottou, and K. Q. Weinberger, Eds. Curran Associates, Inc., 2012, pp. 467–475. [18] R. A. Harshman, “PARAFAC2: Mathematical and technical notes,” UCLA Working Papers in Phonetics, vol. 22, pp. 30–44, 1972b. [19] G. Giannopoulos, U. Brefeld, T. Dalamagas, and T. Sellis, “Learning to rank user intent,” in Proceedings of the 20th ACM International Conference on Information and Knowledge Management, ser. CIKM ’11. New York, NY, USA: ACM, 2011, pp. 195–200. [Online]. Available: http://doi.acm.org/10.1145/2063576.2063609
2cs.AI
1 Small Cell Offloading Through Cooperative Communication in Software-Defined Heterogeneous Networks arXiv:1606.03912v4 [cs.NI] 17 May 2017 Tao Han, Member, IEEE, Yujie Han, Xiaohu Ge, Senior Member, IEEE, Qiang Li, Member, IEEE, Jing Zhang, Member, IEEE, Zhiquan Bai, Member, IEEE, and Lijun Wang, Member, IEEE Abstract—To meet the ever-growing demand for a higher communicating rate and better communication quality, more and more small cells are overlaid under the macro base station (MBS) tier, thus forming the heterogeneous networks. Small cells can ease the load pressure of MBS but lack of the guarantee of performance. On the other hand, cooperation draws more and more attention because of the great potential of small cell densification. Some technologies matured in wired network can also be applied to cellular networks, such as Softwaredefined networking (SDN). SDN helps simplify the structure of multi-tier networks. And it’s more reasonable for the SDN controller to implement cell coordination. In this paper, we propose a method to offload users from MBSs through small cell cooperation in heterogeneous networks. Association probability is the main indicator of offloading. By using the tools from stochastic geometry, we then obtain the coverage probabilities when users are associated with different types of base stations (BSs). All the cell association and cooperation are conducted by the SDN controller. Then on this basis, we compare the overall coverage probabilities, achievable rate and energy efficiency with and without cooperation. Numerical results show that small cell cooperation can offload more users from MBS tier. It can also increase the system’s coverage performance. As small cells become denser, cooperation can bring more gains to the energy efficiency of the network. Accepted by IEEE Sensors Journal.The authors would like to acknowledge the support from the International Science and Technology Cooperation Program of China under grants 2015DFG12580 and 2014DFA11640, the National Natural Science Foundation of China (NSFC) under the grants 61471180, 61210002, 61301147, 61301128, 61271224 and 61461136004, the Hubei Provincial Science and Technology Department under the grant 2013CFB188, the Hubei Provincial Department of Education Scientific research projects (No.B2015188), the Fundamental Research Funds for the Central Universities under the HUST grants 2015XJGH011 and 2015MS038, the grant from Wenhua College (No.2013Y08), and the Fundamental Research Funds of Shandong University (No. 2016JC010). This research is partially supported by the EU FP7-PEOPLE-IRSES, project acronym S2EuNet (grant no. 247083), project acronym WiNDOW (grant no. 318992) and project acronym CROWN (grant no. 610524). This research is supported by the National international Scientific and Technological Cooperation Base of Green Communications and Networks (No. 2015B01008) and the Hubei International Scientific and Technological Cooperation Base of Green Broadband Wireless Communications. (Corresponding author: Xiaohu Ge.) Tao Han, Yujie Han, Xiaohu Ge, Qiang Li and Jing Zhang are with the School of Electronic Information and Communications, Huazhong University of Science and Technology, Wuhan, 430074 P.R. China, e-mail: {hantao, hanyujie, xhge, qli_patrick, zhangjing}@hust.edu.cn. Zhiquan Bai is with the School of Information Science and Engineering, Shandong University, Jinan, 250100 China, e-mail: [email protected]. Lijun Wang is with the Department of Information Science and Technology, Wenhua College, Wuhan, 430074 P.R. China, e-mail: [email protected]. Copyright (c) 2016 IEEE. Personal use of this material is permitted. However, permission to use this material for any other purposes must be obtained from the IEEE by sending a request to [email protected]. Digital Object Identifier 10.1109/JSEN.2016.2581804 Index Terms—Small cell cooperation, heterogeneous network, offloading, energy efficiency, software-defined networking. I. I NTRODUCTION LONG with the huge increasing of mobile users, the current wireless communication system is facing with the great challenges of system capacity and quality-of-service (QoS) requirements [1]. 5G is expected to achieve gigabit-level throughput and more varied service capabilities in an energyefficient way by 2020 [2], [3]. In [4] and [5], mobile cloud and wearable computing is implemented in 5G to improve Quality of Experience (QoE) and overcome the energy bottleneck. The deployment of small cells seems to be one of the most feasible solutions for the areas with a large traffic demand. Heterogeneous networks (HetNets) where macro and small cells coexist have been widely applied [6]. BSs in different tiers differ in transmit power, coverage range, and spatial density. In HetNets, small cells serve to offload users and traffic data from congested macro BSs (MBSs) [7]. Compare to traditional MBSs, small cell base stations (SBSs) have smaller coverage areas [8] but with the advantage of less transmit power and easy deployment. It will also cut down the construction cost significantly. [9] shows that there’s a significant gain in power consumption by introducing the small cell tier. However, multi-tier and denser small cells bring a serious problem, users have to suffer more severe interference. The deployment of SBSs is still an effective complement to traditional MBS on coverage and capacity. Over the multitier HetNets, mobile converged networks have become a focus recently [10], [11]. Cooperative communication has been deemed as a solution to address the interference problem [12], [13]. Coordinated multipoint (CoMP) transmission is one of the key technologies to improve cell edge user data rate and spectral efficiency. Interference can be exploited or mitigated by cooperation between BSs [14]. [15] proposes macrodiversity coordinated multipoint transmission (MD-CoMP) with user-centric adaptive clustering, which can significantly improve the coverage performance in different networks. [16] introduces a novel cooperation policy which triggers cooperation only when the user lies inside a planar zone at the edge of the cell. In general, the system’s overall performance can be improved by utilizing cooperation. Considering the benefits of cooperation among SBSs and small cell offloading in HetNets, we propose a novel A 2 scheme to combine them together, and thus improving energy efficiency (EE) of the networks. The convergence of various technologies is inevitable. Significant data manipulation, the evolution of equipment and complex protocols set higher requirements for BS controller. In HetNets, coordination between different tiers is also difficult because of their different protocols and interfaces. Softwaredefined networking (SDN) has shown its important role in the wired networks by decoupling the control plane and data plane [17], [18]. The SDN controller is software-based and the entire network is abstracted in it. This centralization makes it easy to control the network behavior. Applying SDN to the traditional radio access networks (RAN) is a promising way. In [19] various SDN principles are described to apply to the RAN. It shows great potential for RAN optimization. To enable software-defined cellular networks, authors in [20] presents several changes and extensions to controller platforms and BSs. With SDN controller, information exchanged between BSs can be effectively reduced and backhaul power consumption reduces as well, thus improving the efficiency of BS cooperation. A. Related Work In recent years, people start to concentrate on cooperation in HetNets. Most of them put forward the coordination between different tiers, i.e., the cross-tier cooperation. [12] presents an overview of the multi-cell cooperation. It can dramatically improve the system performance in dense networks where interference emerges as the key capacity-limiting factor. [21] analyzes the coverage probability of a general user that locates at an arbitrary location. For the general user, the cooperative set consists of the BSs with the strongest average received power in each tier. Similarly, in [22] the authors consider a cell association based on maximum biased-received-power. It confirms that a user prefers to connect to a tier with higher BS density and transmit power. [23] proposes a Markov chain based channel access model and integrates it into random cellular networks. [24] and [25] propose non-coherent jointtransmission cooperation. The former characterizes the signal to interference and noise ratio (SINR) distribution for a typical user served by cooperating BSs. BSs that are sufficiently close are grouped into a cooperative cluster. [25] extends the work to heterogeneous networks. In [26] the authors demonstrate that BS cooperation in HetNets achieves higher throughput gains because of the mitigation of inter-cell interference through cooperation. Considering the user mobility in real life, [27] and [28] study the system performance based on the Gauss–Markov mobile models and individual mobility model respectively. Authors in [29] propose a framework called GNV (Global Network View) in SDN. The related information and states are stored in it and can be visited by applications and modules. This kind of global view of the network helps the implement of some complicated technologies like CoMP. In a network with dense small cells, BS density is a considerable factor that influences the system’s performance. To minimize the network energy consumption, [30] gives the optimal BS density for both homogeneous and heterogeneous networks. In [31] the authors figure out the BS density ratio that makes the system get the best energy efficiency. Within the constraints of backhaul capacity and energy efficiency, authors in [32] prove that there exists a density limit in 5G ultra-dense networks. Energy efficiency is what people always endeavor for, especially for the next-gen communications. Results in [33] reveal that BSs’ cooperation will bring gains to the energy efficiency only when most of the BSs participate in the cooperation. [34] formulates a power minimization problem with the minimum ergodic rate constraint and shows that the extra deployment of small cells is energy-saving compared to the traditional macro-only network under its cooperation scheme. Sleeping strategy is also an effective way to save energy in HetNets [35], [36]. One purpose of deploying SBSs is to offload users from the MBS tier. Small cell’s low transmit power makes it offload enough users in an energy-efficient way. Cell range expansion (CRE) [6] is a practical technique in which users can be offloaded with biasing. In [37] the authors calculate the appropriate range expansion bias for two different range expansion strategies. For coverage maximization, the required selection bias is given in [38]. [39] shows that the offloading strategy, coupled with resource partitioning is able to improve the rate of cell edge users in HetNets. [7] evaluates the load of each network tier and studies different offloading techniques used to control the load. The traffic offloading is quantified via the tier association probability. [40] proposes two offloading algorithms, called Traffic Offloading (TO) algorithm based on the Reference Signal Receive Power and Traffic Offloading based on Frequency Reuse (TOFFR) algorithm. User association has been studied to balance the loads among different tiers [41], [42], [43]. With the related load information and centralized manipulation in SDN, it will be more convenient to address the offloading problems. In [44], data offloading optimization is coordinated by the SDN controller dynamically on the offloading demand and supply. [45] proposes a novel software-defined small cell offloading control mechanism (SDoff) that can orchestrate the offloading according to the proposed dissatisfaction parameter and user types. These applications can also be assisted by software-defined network function virtualization (VFN) which decouples the network functions from the hardware [46]. B. Contributions and Organizations The main contributions of our work can be summarized as follows: • We propose a novel offloading scheme through small cell cooperation in a software defined 2-tier network where BSs in each tier are distributed independently according to a Poisson point process (PPP). In the cooperative model, with the help of the SDN controller, multiple adjacent SBSs cooperate to transmit data to a specified user if they can jointly offer stronger signal than the MBS. Thus it can offload more users from the MBS tier compare to one SBS. For the single BS association, the user will connect to the nearest BS. We evaluate the association probabilities to measure the cell’s traffic load. 3 We propose a dynamic power consumption model for our non-cooperative and cooperative schemes, where the power consumption of a BS changes with its load, i.e., the number of users associated with it. • We evaluate the performance of the proposed schemes in terms of coverage probability, mean achievable rate and energy efficiency by using tools from stochastic geometry. Expressions of each metric are obtained. And they are analyzed under different system parameters by varying the SINR thresholds, BS densities and transmit power. • We show that the proposed SBS cooperation scheme is able to offload more users from the MBS tier. Meanwhile, it can offer better coverage and achievable rate for a typical user in a more energy efficient way. Benefits of deploying more SBSs can be seen from our discussion. The rest of this paper is organized as follows. A tractable model for a downlink 2-tier network is presented in Section II. And then we propose the offloading scheme and power consumption model. In Section III, we derive expressions of the coverage probabilities, as well as distance analysis in the non-cooperative and cooperative model. Then on the basis of coverage probability, average rate and energy efficiency are obtained. Simulations are conducted in Section IV to show the performance comparison between our cooperative model and non-cooperative model. Section V concludes the paper and points out the future prospects. • Let xi,j be the location of the j-th BS in tier i and ri,j be the distance from xi,j to the typical user, hi,j be the corresponding channel coefficient. Here, i ∈ {s, m} and s, m denote the SBS tier and MBS tier respectively. In this paper, we consider a Rayleigh fading model to characterize the channel fading, i.e., hi,j ∼ exp(1). α > 2 is the path loss exponent for both tiers. Wireless control plane SDN Controller MBS User User User SBS User User SBS SBS User Wireless data plane Fig. 1. A software defined heterogeneous network with small cell cooperation II. S YSTEM M ODEL We consider a software defined HetNet composed of two independent tiers of network, i.e., the macro BS network and the small cell BS network. Both tiers are independent with different deployment densities and transmit powers. The BSs belonging to the MBS and SBS tier have transmit powers Pm , Ps and follow homogeneous Poisson point processes (PPPs) Φm , Φs ∈ R2 with densities λm , λs respectively. All the BSs and users are assumed to be equipped with a single antenna. Without any loss of generality, we focus on a typical user at the origin. A simple case of a software defined 2-tier HetNet composed of a single MBS and multiple SBSs is illustrated in Fig. 1, where users can be served by BSs from the two tiers. All BSs are connected to the SDN controller by wireless links. Thus the control plane and data plane are separated. All connections are configured by the OpenFlow protocol, which is proposed to standardize the communications between the data plane and control plane [47]. Through these links, BSs can transmit the related state information to the SDN controller which sends the control information back to BSs. In this case, applications, such as cooperation and radio resource allocation are managed by the SDN controller in the control plane. It is similar to the measurement flows and control flows presented in [48], that are used to collect information and control underlying hardware and software respectively. Here, it is feasible for a user to simultaneously connect to several cells in HetNets. We consider an orthogonal frequency division multiple access (OFDMA) system adopted for BSs. It means that no intra-cell interference exists, but users will suffer interferences from other BSs in both tiers. A. Small Cell Offloading In the HetNet, the deployment of small cell BSs is able to offload users from the MBSs. It can ease the traffic burden of the MBSs and improve the system’s performance to some extent. For example, CRE of the small cells is a common way to offload users from the MBS tier and increases the coverage. In any case, the existing study focuses on the offloading ability of a single small cell. Besides, MBS can reduce its dynamic power consumption when it is lightly loaded. Offloading users to SBSs when they can offer better communication quality can reduce the load of MBS and possibly reduce the energy consumption of the entire network. In our study, we analyze the offloading performance of the cooperation of small cells. For simplicity, the resource partition between different tiers is not considered. In this scenario, a user is allowed to access any tier’s BSs because of open access. We consider a cell association based on maximum received-signal-strength (RSS). Covered by the closest MSB and SBS, the user will choose one that offers higher RSS as its serving BS [7]. Thus a user is always associated to either an MBS or an SBS. 1) Non-cooperative model: A user will associate with the BS that results in the highest RSS. As the BSs belonging to the same tier have the same transmit power, it means a user will choose its closest MBS or SBS as its serving BS. It’s called the non-cooperative operation. We use association probability to measure the traffic offloading. 4 Lemma 1. The probability that a user associates with SBS tier can be expressed as Psbs_no = 1+ λm λs 1  Pm Ps  α2 . (1) Psbs_co = P X Z Psbs_no −α = 1 − P Pm rm > Ps rs h  i 1/α α Ps /Pm ) = 1 − Erm P rs > (rm Z ∞   1/α frm (r) dr, P rs > (rα Ps /Pm ) = 1− −α −α  Ps rs,j > Pm rm e(−λm πη where η = Pm / Ps xP s,k −α rs,j ! and it is proved in [49] that frm (r) = 2 d (1 − P [rm > r]) = 2πλm re(−πλm r ) . dr ) f (r) dr, Γ (4) and rs,j denotes the distance of the j-th closest small cell to the typical user. It can be proved by referring to Lemma 1. r = [rs,1 , rs,2 , ...., rs,k−1 , rs,k ] is the set of the distances of the k closest small cells to the typical user. Lemma 2. The joint PDF of rs,j is 0 where rm and rs are the distances from the typical user to its nearest MBS and SBS and its probability density functions (PDFs) are frm (r) and frs (r). It is known that the null probability of the 2-D homogeneous PPP with density λ in α an area A is exp (−λA), so rs > (rm Ps /Pm )1/α means that α there’s no BS in the circle whose radius is (rm Ps /Pm )1/α in the small cell tier. Thus,   2 2/α 1/α = e(−λs πr (Ps /Pm ) ) , (2) P rs > (rα Ps /Pm ) 2/α 0<rs,1 <rs,2... rs,k−1 <rs,k <∞ xs,j ∈C  −α  xs,k xs,j ∈C = −α Proof: Pm rm and Ps rs−α are the RSS received by the typical user from its nearest MBS and SBS respectively. The user will access to the tier which can offer it stronger RSS. Therefore  xs,k fΓ (r) = (2πλs ) e(−λs πrs,k ) k 2 Y rs,j . (5) xs,j ∈C Proof: We start from the first and second closest neighbor SBSs. We define frs,2 |rs,1 (rs,2 | rs,1 ) as the conditional PDF of the distance of the second closest SBS. Around the typical user, with radiuses of rs,1 and rs,2 , it forms an annulus. In analogy to (3), the probability that  there’s no SBS in this 2 2 . So, annulus is exp −λs π rs,2 − rs,1 frs,2 |rs,1 (rs,2 | rs,1 ) = 2πλs e(−λs π(rs,2 −rs,1 )) rs,2 , 2 (3) Then by solving the exponential integral, it can be simplified as (1). From the above, we can see that in order to change the load of each tier, it just needs to adjust the BS density and power ratio λm /λs and Pm /Ps . Although deploying more SBSs will bring extra costs, the tendency of small cell densification has proved that the capacity of heterogeneous networks can be dramatically improved. Comparing with the method of adjusting transmit powers, deploying more SBSs seems to be a more reasonable way to offload users from MBS. 2) Cooperative model: To meet the exponential growth of traffic demands, small cell densification is a promising way. As small cells are getting closer, cooperation can benefit more. In our proposed network model, the SDN controller coordinates the cooperation among SBSs by gathering information, such as channel states, BSs and users. It decouples processing from transmission within the data plane to make cooperation practically feasible. We call the cooperative small cells an SBS cluster. In the cooperative operation, the cooperative cluster consists of k closest small cells, denoted by C ⊂ Φs . The cooperative small cells jointly transmit a message to the typical user. In other words, the user will associate with the cooperative cluster or the MBS depending on its RSS. The association probability of the cooperative model is 2 and by using Bayes formula, we have frs,2 ,rs,1 (rs,2 , rs,1 ) = = frs,2 |rs,1 (rs,2 | rs,1 ) frs (r) 2 (2πλs )2 e(−λs πrs,2 ) rs,1 rs,2 . (6) In a similar way, we can easily obtain the joint PDF of the k-th closest cooperative SBSs expressed as (5). It’s obvious that the SBS cluster can offer stronger RSS comparing with the single SBS association. So it will offload more users to the small cell tier. But it adds extra complexity to both the transmit side and receive side. So in the non-cooperative model, we define Am (As ) as the event that the user connects to an MBS (SBS). In the cooperative model, we define Bm (Bs ) as the event that the user connects to an MBS (SBS cluster). Small cell cooperation will offload more users from the MBS tier and provide better coverage performance compared with a single small cell. The communication quality will improve dramatically especially for the cell-edge users. In addition, cooperation is also an effective means to reduce interferences. However, cooperation is a complex work for small cells to perform, and deploying more cells causes additional costs in the future. 5 III. SINR C OVERAGE B. Power Consumption Model We consider the power consumption in a Voronoi cell [16] consisting of an MBS and several users. A Voronoi cell associated with a given MBS is the set of all points in R2 which are closer to it than to any other MBSs. The power consumption is load-dependent for MBSs, and to a lesser extent for SBSs [50]. We introduce SDN controller to manage the power control of BSs. Utilizing the load information of the BS, the SDN controller notifies the BS to turn on/off some channels for dynamically adjusting the BS power consumption. 1) Non-cooperative model: The power consumption of an MBS is proportional to its current load, which is the number of users associated with it. The total power consumption of the MBS under non-cooperative model is Pmbs_no = Pms + nPmax (1−P sbs_no ) /N, (7) where Pms denotes the static power expenditure, such as processing unit and radio module. Pmax is the maximum output power. n is the number of users in the Voronoi cell, N is the maximum number of the users when the MBS is full loaded and quality of communication can also be guaranteed in the meantime. n (1−P sbs_no ) denotes the number of users connecting to the MBS. The output power is determined by the ratio n (1−P sbs_no ) /N . Since the power consumption of small cell is low and most part of it is static consumption which is Ps , we assume the energy consumption of the small cells which the users in the Voronoi cell associate with is Psbs_no = nPsbs_no Ps . (8) We define the total power consumption of the system as the energy needed to serve all the users in the Voronoi cell, which is Pno = Pmbs_no + Psbs_no . 2) Cooperative model: In the cooperative model, as more users choose the small cell tier, the number of users connecting to MBS turns to n (1−Psbs_co ), so the total energy consumption of the MBS is Pmbs_co = Pms + nPmax (1−Psbs_co )/N. (9) If k small cells cooperate, that means a user is served by k BSs simultaneously. Due to the low power consumption of small cell, it can be assumed that there are totally knPsbs_co small cells serving for users in a Voronoi cell. So the energy consumption of the small cells is Psbs_co = knPsbs_co (Ps + Pbkh ) . (10) E NERGY E FFICIENCY A. SINR Coverage Probability The received signal at a typical user can be written as X (P hi,j )1/2 α/2 xi,j ∈B ri,j X+ X (P hi,j )1/2 α/2 xi,j ∈B / ri,j Y + Z, (11) where P is the transmit power of the serving BS. B denotes the set of BSs that the user associate with, it may be an MBS, an SBS or an SBS cluster. X denotes the input symbol that is sent by the associated BSs. So the first sum denotes the useful signal from the associated BSs. Y denotes the input symbol sent by the BSs that do not belong to B. So the second sum denotes the interference, including the inter-tier and intratier interference. Z is a circular-symmetric zero-mean complex Gaussian random variable with variance σ 2 , which models the additive white noise. Thus, from [21] and [51], the received instantaneous SINR at a typical user is given by P −α/2 (P hi,j )/ ri,j |2 | SINR (B) = xi,j ∈B | P xi,j ∈B / −α/  | (P hi,j )/ ri,j +σ  . (12) The coverage probability is defined as the probability that the received SINR is greater than a threshold. For a given SINR threshold θ, the coverage probability Pn at the typical user can be expressed as Pn = P (SINR > θ), (13) and Pn is relevant to the user’s association policy. Lemma 3. To connect the link between the coverage and the association policy, we analyze the PDFs of the distance between a typical user and its serving BS or BSs, i.e., fR (r). In the non-cooperative model, when the user connects to an MBS or an SBS, the PDFs are respectively fRm (r) = and Pbkh is the backhaul power consumption for each cooperative SBS. To serve a common user, the cooperative SBSs have to share data with each other, so the backhaul overhead has to be considered. When traffic load of MBS is offloaded to SBS, the dynamic power consumption of MBS decreases. This will be more remarkable in the cooperative model. So the total power consumption for the cooperative model is Pco = Pmbs_co + Psbs_co . AND In this section, we analyze the offloading performance through three main metrics: SINR coverage, user rates, and energy efficiency. First, we will discuss the SINR for downlink transmission at a typical user under different association strategies. Then, we derive the analytical expressions for the coverage probability and the average ergodic rate. On the basis of the above analysis, we can get the energy efficiency of the system under both cooperative and non-cooperative schemes. 2πλm r (−πr2 (λm +λs (Ps /Pm )2/α )) , e 1 − Psbs_no (14) 2πλs r (−πr2 (λs +λm (Pm /Ps )2/α )) . e Psbs_no (15) fRs (r) = As the association probability changes, the distance distribution changes as well. In the cooperative model, the PDF of the distance between the user and the MBS is fr (r) g(r) , (16) fRcm (r) = m 1 − Psbs_co 6 where g(r) =P Pm r −α /Ps > xP s,k xs,j ∈C −α rs,j ! is the function of r. frm (r) is given as (3). If the user connects to an SBS cluster, the joint PDF is fRcs (r) = 2/α 1 e(−πλm η ) fΓ (r) . Psbs_co (17) Proof: See Appendix A. Remark 4. Note that there is no general analytical expression for g(r) in (16), we can derive an exact result for a special case for simplicity, as shown later in our simulation. Here, we consider two SBSs cooperation and α = 4. So we have Z π4  2 sr πλs sin−1 ϕ + ωr−2 − ωπλsin ϕ dϕ, (18) g(r) = e 2 (cos ϕr−1 ) ω 0 p where ω = Pm /Ps . Proof: See Appendix B. Theorem 5. The coverage probabilities for a typical user associated with an MBS, an SBS in non-cooperative model are Pn (Am ) = Z h i −1 α 2 − α fRm (r) dr, θr e(−Pm θr σ ) LI Pm Pn (As ) = Z h i −1 α 2 e(−Ps θr σ ) LI Ps− θrα fRs (r) dr, r>0 r>0 (19) (20) where distance distributions are given in Lemma 3. And LI (s) = Y e(−2πλi (sPi ) 2/α F ((sPi )−/α di ,α)) . Pno = 1 √  √ 1 + θ tan−1 θ . (24) For this special case, the total outage probability in the non-cooperative model is just the function of threshold θ and there exists a negative correlation between them. This is the same as the result in [52], where the coverage probability has nothing to do with the number of the tiers or their densities and transmit powers in an interference-limited network. The adjustment in the properties of the BSs is helpless to improve the coverage performance. In other words, we can deploy more BSs to improve the throughput and ignoring the interference they cause. Theorem 7. In the cooperative model, when the user associates with an MBS we can obtain its coverage probability Pn (Bm ) by substituting fRcm (r) for fRm (r) in (19). When the user associates with an SBS cluster, its coverage probability Pn (Bs ) is shown as (25). Same as the coverage probabilities in non-cooperative model, for Pn (Bm ) we have dm = r and ds ≈ ω −2/α r. And for Pn (Bs ), we have dm = η 1/α and ds = rs,k . Proof: See Appendix C. The overall coverage probability of the user in the cooperative model is (21) i∈{s,m} It denotes the Laplace transform of interference I. di is the minimum distance between the user and its nearest interfering BS in tier i, i ∈ {s, m} . It means all interfering BSs are distributed outside the circle with the radius di . For (19), we have dm = r and ds = ω −2/α r. For (20), we have dm = ω 2/α r and ds = r. And Z ∞ µ F (y, α) = dµ. (22) α y 1+µ Proof: See Appendix C. Since the association methods are mutually exclusive, by using the law of total probability, we obtain the overall coverage probability of the non-cooperative model as follow: Pno = (1 − Psbs_no ) Pn (Am ) + Psbs_no Pn (As ) ,  F (y, ) = 12 tan−1 y −2 . Note that in the interferencelimited network, when σ 2 is small enough, the first exponential term in (19) and (20) approaches 1. Here, in consideration of the situation and conciseness of the numerical analysis, assuming α = 4 and σ 2 = 0, we have the result Pn (Am ) = Pn (As ). And the total outage probability (23) simplifies to (23) where Psbs_no is given in (1). In view of the big advantage in transmit power, MBS can offer better coverage performance than the SBS under the same threshold θ. In addition, an SBS user may be subjected to more cross-tier interference. Remark 6. We can get the closed-form expressions for specific values of the integral function (22) [21]. Then we can get Pco = (1 − Psbs_co ) Pn (Bm ) + Psbs_co Pn (Bs ) . (26) When k = 1, (25) degrades into (20). In the SBS tier, if the user associates with only one BS, its second nearest neighbor BS becomes its strongest interference. Same for the k-th nearest neighbor. So if we bring in cooperation, the strongest interference turns into useful signal. As k increases, this advantage will be more obvious. Even two SBSs cooperate, it may have a better coverage performance than the MBS user. For the cell-edge users who are far from the MBS, a single SBS is not able to satisfy its requirements for communication. Cooperation could solve this problem. Because cooperation needs BSs to exchange data with each other, simply increasing k is not an optimal solution. And it is also not practical for the mobile users to connect to too many BSs at the same time. B. Mean Achievable Rate With the conditional coverage probability above, we can easily obtain the mean achievable rates (measured in (bit/sec/Hz)) of non-cooperative and cooperative models respectively. Theorem 8. The achievable rate of a typical user can be expressed as Z ∞ 1 1 dθ, (27) Pn τ= ln 2 0 1+θ 7 Pn (Bs ) = Z 0<rs,1 <rs,2... rs,k−1 <rs,k <∞          −θσ 2 θ      exp  xs,k  LI  xs,k  fRcs (r) dr   P  P −α  −α  Ps rs,j Ps rs,j xs,j ∈C where Pn is the coverage probability of the given user. After substituting Pn (Am ) , Pn (As ) , Pn (Bm ) and Pn (Bs ) into (27), we can get the achievable rates when user associates to the corresponding BS, which are τmbs , τsbs and τmbs_co , τmbs_co . Proof: The mean achievable rate of the typical user is defined as τ = E [log  (1 + SINR)] 1 = E [ln (1 + SINR)] ln 2 Z ∞  1 P SINR > et − 1 dt = ln 2 0 Z ∞ 1 1 dθ. P (SINR > θ) = ln 2 0 1+θ Here using the change of variables and the definition of the coverage probability (13) we can obtain the final result. According to the mutual independence of different association strategy, by using the law of total probability, we get the mean achievable rate for a user in non-cooperative model as τno = (1 − Psbs_no ) τmbs + Psbs_no τsbs . (28) Similarly, the mean achievable rate in the cooperative model is τco = (1 − Psbs_co ) τmbs_co + Psbs_co τsbs_co . (29) C. Energy Efficiency Energy efficiency is one of the key performance indicators for the proposed model. We define it as the ratio of throughput to the energy consumption of the network (usually measured in (bits/J)). It is assumed that BSs in different tiers share the same frequency bandwidth B. Since we have derived the achievable rate τ , the throughput of a typical user is τ B. For a Voronoi cell, it includes all the BSs that serve the users in the cell. Numbers of the users and BSs are given in II-B. The total system throughput of the non-cooperative model and cooperative model are respectively derived as Rno = nτno B, (30) Rco = nτco B. (31) and Thus, the expressions of the corresponding energy efficiency of the non-cooperative model and cooperative model are Eno = Rno /Pno , (32) Eco = Rco /Pco (33) and respectively.  (25) xs,j ∈C IV. N UMERICAL R ESULTS In this section, the traffic offloading performance with cooperative and non-cooperative models has been compared by numerical results. Without loss of generality, two small cells cooperative scenarios are analyzed and σ 2 = 0 is configured in numerical simulations. The comparison is performed in terms of coverage probability, association probability, average achievable rate and energy efficiency. A. Coverage Probability Fig. 2 shows the coverage probability trends with SINR threshold corresponding to event Am , As , Bm and Bs . The coverage probability decreases as the SINR threshold increases. The curves of the SBS and MBS are the same in non-cooperative model. In this interference-limited regime, the user just connects to a BS that offers the highest RSS without differentiating between the tiers. When two SBSs cooperates the coverage probability has been dramatically improved and is higher than the coverage probability transmitted by an MBS. Fig. 3 depicts the overall coverage probabilities of the noncooperative and cooperative model with respect to the SINR threshold. The overall coverage probability with the noncooperative and cooperative model decreases with the increase of the SINR threshold. When the SINR threshold has been fixed, the overall coverage probability with the cooperative model is higher than that of the non-cooperative model. It demonstrates that the cooperation can offer better coverage. Fig. 4 shows the effect of SBS density and the transmit power of MBS on the overall coverage probability in the cooperative model. As the SBS density grows, coverage probabilities increase and this trend slows down gradually when λs /λm is larger than 30. That’s because the user will associate with the SBS cluster with a significant possibility if λs is big enough. As the transmit power of MBS Pm increases, there’s more chance that the user will associate with an MBS. But based on the result in Fig. 3, the SBS cooperation offer a better coverage. So the overall coverage probability decreases with the increase of Pm . B. Traffic load As mentioned in II-A, we use association probability to evaluate small cell offloading. It can be seen from Fig. 5, if small cells are deployed denser, they will have more chance to serve the user. And the rising trends recede as λm increases. The association probability of cooperative model always outperforms the non-cooperative model owe to the large RSS of the SBS cooperation. 8 0.44 1 MS non−coop SBS non−coop MS coop 2 SBSs coop 0.9 0.42 0.4 0.7 Coverage Probability Coverage Probability 0.8 0.6 0.5 0.4 0.38 0.36 0.34 0.32 0.3 0.3 0.2 0.28 0.1 0.26 P =10 0 −15 −10 −5 0 5 SINR Threshold (in dB) 10 15 0.24 20 m Pm=50 P =100 m 0 10 20 30 λ /λ s Fig. 2. Coverage probabilities when the user connects to different BSs. α = 4, −1 λm = 5002 π , λs = 50λm and Pm = 50, Ps = 1. 40 50 60 70 m Fig. 4. Overall coverage probability of the cooperative model under different −1 Pm and λs . λm = 5002 π θ = 5 and Ps = 1. 0.8 1 non−coop coop 0.9 non−coop coop 0.7 Association Probability Overall Coverage Probability 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.6 0.5 0.4 0.3 0.2 0.1 0.1 0 −15 −10 −5 0 5 SINR Threshold (in dB) 10 15 20 Fig. 3. Overall coverage probability of the non-cooperative and cooperative −1 , λs = 50λm and Pm = 50, Ps = 1. model where λm = 5002 π C. Energy Efficiency Fig. 6 gives the mean achievable rate of a typical user in the two models. We still focus on the impact of the small cell density. According to the figure, the user rate is constant as λs increases. We can see from (27) that user rate is deduced from the coverage probability. (24) is independent with the cell densities and transmit power, so there’s no doubt that the mean achievable rate is invariant for λs /λm in the non-cooperative model. In the cooperative model, the rate is a rising curve and the trend is steady. Deploying more SBSs brings the SBSs closer to the user, thus SINR and rate of the user becomes higher. Fig. 7 shows the energy efficiency of the non-cooperative and cooperative model in a Voronoi cell. The shape of the curves is as similar with that of the user rate shown in Fig. 6. In the non-cooperative model, the energy efficiency decreases with the increase of the λs /λm . This really distracts from our main goal. In the cooperative model, when λs < 3λm the energy efficiency experiences a slight decrease. When λs > 3λm it keeps up increase. Considering the result in Fig. 5 , when λs is small, user is more likely to associate with the MBS other 0 5 10 λs /λm 15 20 Fig. 5. Comparison of the association probability between −1 non-cooperative and Pm = 50, and cooperative model where α = 3, λm = 5002 π Ps = 2. than the cooperative SBSs. When λs = 6λm , the two curves meet and Eco starts to transcend Eno . Hence, we can draw the conclusion that small cell offloading through cooperation have better energy efficiency in a dense environment. In our work, we analyze n users in a Voronoi cell where there’s one MBS and several SBSs to serve these users. The number of SBSs is decided by n and is constant, and many of the SBSs may even locate outside the Voronoi cell. In the cooperative model, as λs increases, there won’t be more SBSs to serve these n users, thus the energy consumption won’t increase significantly. Meanwhile, an increase in λs means the SBSs are closer to the users, so the user rate will improve through cooperation. These changes make EE improves as λs increases. V. C ONCLUSIONS In this paper, we have proposed a novel offloading strategy through small cell cooperation. Using tools from stochastic geometry, a tractable model has been proposed in the downlink HetNets. The SDN controller has been introduced to manage the SBS cooperation and power control, which simplifies the 9 model, the probability of the event of Rm > r is 2.8 non−coop coop P [Rm > r] = Average Users Rate(bits/s/Hz) 2.7 P [rm > r | Am ] P [rm > r, Am ] P [Am ] −α P [rm > r, Pm rm > Ps rs−α ] 1 − Psbs_no R∞   −/α frm (r) dr r P rs > rω , (34) 1 − Psbs_no = 2.6 = 2.5 2.4 = 2.3 2.2 2.1 0 5 10 λ /λ s 15 20 m Fig. 6. Mean achievable rateof the non-cooperative and cooperative model −1 where α = 4, λm = 5002 π , Pm = 50, Ps = 2 and B = 20MHz. 6 2.3 where rm is the idistance of the nearest MBS, h /α , frm (r) and Psbs_no can be P rs > (Ps rα /Pm ) >r|Am ] . found in Lemma 1. Then we can get fRm (r) = dP[rmdr Proofs of (15) is the same under the condition of As . For (16),   xs,k X −α  −α P [rm > r, Bm ] = P rm > r, Pm rm Ps rs,j > xs,j ∈C x 10 non−coop coop Z = r Energy Efficiency(bits/Joule) 2.25    P r < η /α frm (r) dr. (35) For (17), we can get joint probability Z i h P r > η 1/α fΓ (r) dr (36) P [rm > r, Bs ] = 2.2 0<rs,1 <rs,2... rs,k−1 <rs,k <∞ 2.15 as similar with the numerator in (34). After the multiple integral we can obtain the result. 2.1 2.05 ∞ 0 5 10 λs /λm 15 20 Fig. 7. The system’s energy efficiency of the non-cooperative and cooperative −1 , Pm = 50, Ps = 2, B = 20MHz model where α = 4, λm = 5002 π and Pms = 20, Pbkh = 1. BS’s function and burden. In proposed cooperative-model, two or more small cells could serve a common user simultaneously. The user connects to an MBS or an SBS cluster depending on its RSS. In our study the power consumption of BS is determined by its load, which is represented by the association probability. We obtain the expressions of the overall coverage probabilities, achievable rate for a typical user with and without cooperation. Numerical results have shown that small cell cooperation could offload more users from MBS tier. It can also increase the system’s coverage performance. It’s been proved that when SBSs get closer, cooperation can benefit more and thus shows the great potential of small cell densification. A PPENDIX B P ROOF OF R EMARK 4 The proof of (18) is under the condition that k = 2 and α = 4. So g (r) =  − − P ω  r− > rs, + rs,     −  −  , + rs, P ωr− > rs, (37) drs,1 da 3 so this probability is constrained in an area which within a circle with radius ωr−2 and the area 0 < rs,1 < rs,2 < ∞. − − , the joint probability of a and b can Set a = rs, and b = rs, be expressed as   1 1 (38) fa,b (a, b) = J frs,2 ,rs,1 a− 2 , b− 2 , where Jacob determinant | J |= 0 drs,2 db = 1 4 (ab)− 2 . 0 As it concerned to the circle area, we use the polar transformation, so a = ρ cos ϕ and b = ρ sin ϕ. Finally we have A PPENDIX A P ROOF OF L EMMA 3 g (r) = fR (r) is a conditional PDF under different association circumstance. So for the MBS association in non-cooperative = Z 0 π 4 dϕ Z ωr −2 ρfa,b (ρ cos ϕ, ρ sin ϕ) dρ, 0 after solving the inner integration, we can obtain (18). (39) 10 P ROOF OF −1 A PPENDIX C T HEOREM 5 AND T HEOREM 7 The proof of (19), (20) and (25) are similar. We take (19) as an example. For the user served by an MBS, SINR can be expressed as −α Pm hm, rm , (40) I + σ P −α and IM = Pm hm,i rm,i , Is = SINR = where I = IM + Is i∈m P −α Ps hs,i rs,i are the interference from the MBS tier and SBS i∈s tier. So the coverage probability when user associated with an MBS in non-cooperative model is variable substitution µα = (sPi ) rα . ΦIi is the set of all the interference BSs in tier i. And the interference is expressed as the integration from d to ∞. When i ∈ m, that is in MBS tier, interference is outside the coverage area of the user’s serving MBS which is the circle of radius r. So we set d = r. As our discussion is limited in the event of Am , we have the condition /α rs > (Ps rα /Pm ) . In which, rs also means the distance of 1/α nearest interference SBS. So i ∈ s, d = rs = (Ps rα /Pm ) . xP s,k −α −α rs,j > Pm rm /Ps , Similarly for Pn (Bm ), when i ∈ s, xs,j ∈C to obtain the region of rs,1 we have to get the approximation  1/α −α −α . rs,1 > Pm rm /Ps . So d ≈ PPms R EFERENCES = = (a) = = = Pn (Am ) P (SINR > θ) Z P [SINR > θ | r] fRm (r) dr Zr>    −1 α P hm,1 > Pm θrm I + σ 2 | r fRm (r) dr Zr> h i 2 −1 α E e(−Pm θrm (I+σ )) fRm (r) dr Zr> Ih i −1 α 2 −1 α θrm fRm (r) dr, E e(−Pm θrm σ ) LI Pm r> (41) where fRm (r) can be seen in Lemma 3. (a) is because that hi,j ∼ exp(1). LI (s) is Laplace transform of interference I, it can be written as LI (s) = = = (b) =   EI e−sI   Y Y −α E  e−sPi hi,j ri,j  i∈{s,m} ΦI i∈{s,m} ΦI  i    Y Y −α E  Ehi,j e−sPi hi,j ri,j   i Y Y E i∈{s,m} (c) = ΦIi R  1  −α 1 + sPi ri,j   1− 1+sP1 r−α dr  −λi  −2πλi  −2πλi (sPi ) α Y e Y e R2  i i∈{s,m} (d) = R ∞ 1− d 1 1+sPi r−α   rdr i∈{s,m} (e) = Y e 2 R ∞ (sPi ) µ 1+µα −1 αd dµ , i∈{s,m} (42) where (b) uses the expression for moment generating function of an exponential random variable, which is hi,j ; (c) is due to the probability generating functional for a PPP; (d) uses the translation of surface integration. (e) is because of the [1] Y. Zhang, M. Chen, S. Mao, L. Hu, and V. Leung, “Cap: community activity prediction based on big data analysis,” IEEE Network, vol. 28, no. 28, pp. 52–57, 2014. [2] P. Popovski, V. Braun, G. Mange, P. Fertl, D. Gozalvez-Serrano, N. Bayer, H. Droste, A. Roos, G. Zimmermann, M. Fallgren et al., “Ic t-317669-metis/d6. 2 initial report on horizontal topics, first results and 5g system concept,” EU-Project METIS (ICT-317669), 2014. [3] X. Ge, H. Cheng, M. Guizani, and T. Han, “5g wireless backhaul networks: challenges and research advances,” IEEE Network, vol. 28, no. 6, pp. 6–11, 2014. [4] M. Chen, Y. Zhang, Y. Li, M. Hassan, and A. Alamri, “Aiwac: Affective interaction through wearable computing and cloud technology,” IEEE Wireless Communications, vol. 22, no. 1, pp. 20–27, 2015. [5] M. Chen, Y. Zhang, Y. Li, and S. Mao, “Emc: Emotion-aware mobile cloud computing in 5g,” IEEE Network, vol. 29, no. 2, pp. 32–38, 2015. [6] A. Damnjanovic, J. Montojo, Y. Wei, T. Ji, T. Luo, M. Vajapeyam, T. Yoo, O. Song, and D. Malladi, “A survey on 3gpp heterogeneous networks,” IEEE Wireless Communications, vol. 18, no. 3, pp. 10–21, 2011. [7] H. ElSawy, E. Hossain, and D. I. Kim, “Hetnets with cognitive small cells: user offloading and distributed channel access techniques,” IEEE Communications Magazine, vol. 51, no. 6, pp. 28–36, 2013. [8] J. G. Andrews, H. Claussen, M. Dohler, S. Rangan, and M. C. Reed, “Femtocells: Past, present, and future,” IEEE Journal on Selected Areas in Communications, vol. 30, no. 3, pp. 497–508, 2012. [9] R. Razavi and H. Claussen, “Urban small cell deployments: Impact on the network energy consumption,” in Wireless Communications and Networking Conference Workshops (WCNCW). IEEE, 2012, pp. 47–52. [10] T. Han, Y. Yang, X. Ge, and G. Mao, “Mobile converged networks: framework, optimization, and challenges,” IEEE Wireless Communications, vol. 21, no. 6, pp. 34–40, 2014. [11] M. Chen, Y. Zhang, L. Hu, T. Taleb, and Z. Sheng, “Cloud-based wireless network: Virtualized, reconfigurable, smart wireless network to enable 5g technologies,” Mobile Networks and Applications, vol. 20, no. 6, pp. 1–9, 2015. [12] D. Gesbert, S. Hanly, H. Huang, S. S. Shitz, O. Simeone, and W. Yu, “Multi-cell mimo cooperative networks: A new look at interference,” IEEE Journal on Selected Areas in Communications, vol. 28, no. 9, pp. 1380–1408, 2010. [13] O. Simeone, O. Somekh, H. V. Poor, and S. Shamai, “Local base station cooperation via finite-capacity links for the uplink of linear cellular networks,” IEEE Transactions on Information Theory, vol. 55, no. 1, pp. 190–204, 2009. [14] R. Irmer, H. Droste, P. Marsch, M. Grieger, G. Fettweis, S. Brueck, H.-P. Mayer, L. Thiele, and V. Jungnickel, “Coordinated multipoint: Concepts, performance, and field trial results,” IEEE Communications Magazine, vol. 49, no. 2, pp. 102–111, 2011. [15] V. Garcia, Y. Zhou, and J. Shi, “Coordinated multipoint transmission in dense cellular networks with user-centric adaptive clustering,” IEEE Transactions on Wireless Communications, vol. 13, no. 8, pp. 4297– 4308, 2014. [16] F. Baccelli and A. Giovanidis, “A stochastic geometry framework for analyzing pairwise-cooperative cellular networks,” IEEE Transactions on Wireless Communications, vol. 14, no. 2, pp. 794–808, 2015. 11 [17] B. Nunes, M. Mendonca, X.-N. Nguyen, K. Obraczka, T. Turletti et al., “A survey of software-defined networking: Past, present, and future of programmable networks,” IEEE Communications Surveys Tutorials, vol. 16, no. 3, pp. 1617–1634, 2014. [18] D. Kreutz, F. M. Ramos, P. Esteves Verissimo, C. Esteve Rothenberg, S. Azodolmolky, and S. Uhlig, “Software-defined networking: A comprehensive survey,” Proceedings of the IEEE, vol. 103, no. 1, pp. 14–76, 2015. [19] M. Arslan, K. Sundaresan, and S. Rangarajan, “Software-defined networking in cellular radio access networks: potential and challenges,” IEEE Communications Magazine, vol. 53, no. 1, pp. 150–156, 2015. [20] L. E. Li, Z. M. Mao, and J. Rexford, “Toward software-defined cellular networks,” in European Workshop on Software Defined Networking (EWSDN). IEEE, 2012, pp. 7–12. [21] G. Nigam, P. Minero, and M. Haenggi, “Coordinated multipoint joint transmission in heterogeneous networks,” IEEE Transactions on Communications, vol. 62, no. 11, pp. 4134–4146, 2014. [22] H.-S. Jo, Y. J. Sang, P. Xia, and J. G. Andrews, “Heterogeneous cellular networks with flexible cell association: A comprehensive downlink sinr analysis,” IEEE Transactions on Wireless Communications, vol. 11, no. 10, pp. 3484–3495, 2012. [23] X. Ge, B. Yang, J. Ye, and G. Mao, “Spatial spectrum and energy efficiency of random cellular networks,” IEEE Transactions on Communications, vol. 63, no. 3, pp. 1019–1030, 2015. [24] R. Tanbourgi, S. Singh, J. G. Andrews, and F. K. Jondral, “A tractable model for noncoherent joint-transmission base station cooperation,” IEEE Transactions on Wireless Communications, vol. 13, no. 9, pp. 4959–4973, 2014. [25] ——, “Analysis of non-coherent joint-transmission cooperation in heterogeneous cellular networks,” in IEEE International Conference on Communications (ICC). IEEE, 2014, pp. 5160–5165. [26] D. Lee, H. Seo, B. Clerckx, E. Hardouin, D. Mazzarese, S. Nagata, and K. Sayana, “Coordinated multipoint transmission and reception in lte-advanced: deployment scenarios and operational challenges,” IEEE Communications Magazine, vol. 50, no. 2, pp. 148–155, 2012. [27] X. Ge, S. Tu, T. Han, and Q. Li, “Energy efficiency of small cell backhaul networks based on gauss-markov mobile models,” IET Networks, vol. 4, no. 2, pp. 158–167, 2015. [28] X. Ge, J. Ye, Y. Yang, and Q. Li, “User mobility evaluation for 5g small cell networks based on individual mobility model,” IEEE Journal on Selected Areas in Communications, vol. 34, no. 3, pp. 528–541, 2016. [29] X. Mi, Z. Tian, X. Xu, M. Zhao, and J. Wang, “No stack: A sdn-based framework for future cellular networks,” in International Symposium on Wireless Personal Multimedia Communications (WPMC). IEEE, 2014, pp. 497–502. [30] D. Cao, S. Zhou, and Z. Niu, “Optimal combination of base station densities for energy-efficient two-tier heterogeneous cellular networks,” IEEE Transactions on Wireless Communications, vol. 12, no. 9, pp. 4350–4362, 2013. [31] T. Q. Quek, W. C. Cheung, and M. Kountouris, “Energy efficiency analysis of two-tier heterogeneous networks,” in Wireless Conference 2011-Sustainable Wireless Technologies (European Wireless). VDE, 2011, pp. 1–5. [32] X. Ge, S. Tu, G. Mao, and C. X. Wang, “5g ultra-dense cellular networks,” IEEE Wireless Communications, vol. 23, no. 1, pp. 72–79, 2016. [33] P. Qiao, Y. Zhong, and W. Zhang, “Base station cooperation for energy efficiency: A gauss-poisson process approach,” in Signal and Information Processing Association Annual Summit and Conference (APSIPA). IEEE, 2013, pp. 1–7. [34] W. Nie, X. Wang, F.-C. Zheng, and W. Zhang, “Energy-efficient base station cooperation in downlink heterogeneous cellular networks,” in IEEE Globecom. IEEE, 2014, pp. 1779–1784. [35] L. Saker, S. E. Elayoubi, T. Chahed, and A. Gati, “Energy efficiency and capacity of heterogeneous network deployment in lte-advanced,” in European 18th European Wireless Conference Wireless (EW 2012). VDE, 2012, pp. 1–7. [36] Y. Sun, Y. Chang, S. Song, and D. Yang, “An energy-efficiency aware sleeping strategy for dense multi-tier hetnets,” in IEEE Globecom Workshops. IEEE, 2014, pp. 1180–1185. [37] D. Lopez-Perez, X. Chu, and . Guvenc, “On the expanded region of picocells in heterogeneous networks,” IEEE Journal of Selected Topics in Signal Processing, vol. 6, no. 3, pp. 281–294, 2012. [38] A. K. Gupta, H. S. Dhillon, S. Vishwanath, and J. G. Andrews, “Downlink multi-antenna heterogeneous cellular network with load balancing,” IEEE Transactions on Communications, vol. 62, no. 11, pp. 4052–4067, 2014. [39] S. Singh and J. G. Andrews, “Joint resource partitioning and offloading in heterogeneous cellular networks,” IEEE Transactions on Wireless Communications, vol. 13, no. 2, pp. 888–901, 2014. [40] Q. Liu, G. Feng, and S. Qin, “Energy-efficient traffic offloading in macro-pico networks,” in Wireless and Optical Communication Conference (WOCC). IEEE, 2013, pp. 236–241. [41] K. Son, S. Chong, and G. Veciana, “Dynamic association for load balancing and interference avoidance in multi-cell networks,” IEEE Transactions on Wireless Communications, vol. 8, no. 7, pp. 3566–3576, 2009. [42] Q. Ye, B. Rong, Y. Chen, M. Al-Shalash, C. Caramanis, and J. G. Andrews, “User association for load balancing in heterogeneous cellular networks,” IEEE Transactions on Wireless Communications, vol. 12, no. 6, pp. 2706–2716, 2013. [43] H. Kim, G. De Veciana, X. Yang, and M. Venkatachalam, “Alphaoptimal user association and cell load balancing in wireless networks,” in Proc. IEEE INFOCOM. IEEE, 2010, pp. 1–5. [44] L. Liu, X. Chen, M. Bennis, G. Xue, and Z. Han, “A distributed admm approach for mobile data offloading in software defined network,” in IEEE Wireless Communications and Networking Conference (WCNC). IEEE, 2015, pp. 1748–1752. [45] Z. Arslan, M. Erel, Y. Ozcevik, and B. Canberk, “Sdoff: A softwaredefined offloading controller for heterogeneous networks,” in IEEE Wireless Communications and Networking Conference (WCNC). IEEE, 2014, pp. 2827–2832. [46] Y. Li and M. Chen, “Software-defined network function virtualization: A survey,” IEEE Access, vol. 3, pp. 2542–2553, 2015. [47] M. Chen, Y. Qian, S. Mao, W. Tang, and X. Yang, “Software-defined mobile networks security,” Mobile Networks and Applications, pp. 1–15, 2015. [48] Y. Li, F. Zheng, M. Chen, and D. Jin, “A unified control and optimization framework for dynamical service chaining in software-defined nfv system,” IEEE Wireless Communications, vol. 22, no. 6, pp. 15–23, 2015. [49] V. Baumstark and G. Last, “Some distributional results for poissonvoronoi tessellations,” Advances in applied probability, pp. 16–40, 2007. [50] G. Auer, V. Giannini, C. Desset, I. Godor, P. Skillermark, M. Olsson, M. A. Imran, D. Sabella, M. J. Gonzalez, O. Blume et al., “How much energy is needed to run a wireless network?” IEEE Wireless Communications, vol. 18, no. 5, pp. 40–49, 2011. [51] A. H. Sakr and E. Hossain, “Location-aware cross-tier coordinated multipoint transmission in two-tier cellular networks,” IEEE Transactions on Wireless Communications, vol. 13, no. 11, pp. 6311–6325, 2014. [52] H. S. Dhillon, R. K. Ganti, F. Baccelli, and J. G. Andrews, “Modeling and analysis of k-tier downlink heterogeneous cellular networks,” IEEE Journal on Selected Areas in Communications, vol. 30, no. 3, pp. 550– 560, 2012. Tao Han (M’13) received the Ph.D. degree in information and communication engineering from Huazhong University of Science and Technology (HUST), Wuhan, China, in 2001. He is currently an Associate Professor with the School of Electronic Information and Communications, HUST. From 2010 to 2011, he was a Visiting Scholar with the University of Florida, Gainesville, FL, USA, as a Courtesy Associate Professor. He has published more than 50 papers in international conferences and journals. His research interests include wireless communications, multimedia communications, and computer networks. He is currently serving as an Area Editor for the European Alliance Innovation Endorsed Transactions on Cognitive Communications. 12 Yujie Han received the Bachelor’s degree in communication and information system from Huazhong University of Science and Technology, Wuhan, China, in 2012, where he is currently working toward the Master’s degree. His research interests include cooperative communication, stochastic geometry, and heterogeneous networks. Jing Zhang (M’13) received the M.S. and Ph.D. degrees in electronics and information engineering from Huazhong University of Science and Technology (HUST), Wuhan, China, in 2002 and 2010, respectively. He is currently an Associate Professor with HUST. He has done research in the areas of multipleinput multiple-output, CoMP, beamforming, and next-generation mobile communications. His current research interests include cellular systems, green communications, channel estimation, and system performance analysis. Xiaohu Ge (M’09-SM’11) is currently a full Professor with the School of Electronic Information and Communications at Huazhong University of Science and Technology (HUST), China. He is an adjunct professor with the Faculty of Engineering and Information Technology at University of Technology Sydney (UTS), Australia. He received his PhD degree in Communication and Information Engineering from HUST in 2003. He has worked at HUST since Nov. 2005. Prior to that, he worked as a researcher at Ajou University (Korea) and Politecnico Di Torino (Italy) from Jan. 2004 to Oct. 2005. His research interests are in the area of mobile communications, traffic modeling in wireless networks, green communications, and interference modeling in wireless communications. He has published more than 100 papers in refereed journals and conference proceedings and has been granted about 15 patents in China. He received the Best Paper Awards from IEEE Globecom 2010. Dr. Ge is a Senior Member of the China Institute of Communications and a member of the National Natural Science Foundation of China and the Chinese Ministry of Science and Technology Peer Review College. He has been actively involved in organizing more the ten international conferences since 2005. He served as the general Chair for the 2015 IEEE International Conference on Green Computing and Communications (IEEE GreenCom 2015). He serves as an Associate Editor for the IEEE ACCESS, Wireless Communications and Mobile Computing Journal (Wiley) and the International Journal of Communication Systems (Wiley), etc. Moreover, he served as the guest editor for IEEE Communications Magazine Special Issue on 5G Wireless Communication Systems. Qiang Li (M’16) received the B.Eng. degree in communication engineering from the University of Electronic Science and Technology of China (UESTC), Chengdu, China, in 2007 and the Ph.D. degree in electrical and electronic engineering from Nanyang Technological University (NTU), Singapore, in 2011. From 2011 to 2013, he was a Research Fellow with Nanyang Technological University. Since 2013, he has been an Associate Professor with Huazhong University of Science and Technology, Wuhan, China. He was a visiting scholar at the University of Sheffield, Sheffield, UK from March to June 2015. His current research interests include future broadband wireless networks, software-defined networking, cooperative communications, and cognitive spectrum sharing. Zhiquan Bai (M’08) received the M.Eng. degree in communication and information systems from Shandong University, Jinan, China, in 2003, and the Ph.D. degree in communication engineering with honor from INHA University in 2007, under the Grant of Korean Government IT Scholarship, Incheon, Korea. From 2007 to 2008, he was a postdoctor with UWB Wireless Communications Research Center, INHA University, Incheon, Korea. Since 2007, he has been an associate professor with the School of Information Science and Engineering, Shandong University, China. He has published more than 70 papers in international conferences and journals. His current research interests include cooperative communications and MIMO system, ultra wideband communications, cognitive radio system, and beyondfourth generation wireless communications. Dr. Bai is the associate editor of the Introduction Journal of Communication Systems. He served as a TPC member and a session chair for some international conferences. Lijun Wang (M’16) received the B.S. degree in telecommunication engineering from Xidian University, Xi’an, China in July, 2004 and the M.S. degree in communication and information system from Huazhong University of Science and Technology (HUST), Wuhan, China in June, 2008. From Sept., 2016 she will work toward the Ph.D. degree with Wuhan University, Wuhan, China. She is currently an associate professor with the Department of Information Science and Technology, Wenhua College, Wuhan, China. Her research interests include wireless communications, and multimedia communications.
7cs.IT
Autocatalysis in Reaction Networks. arXiv:1309.3957v4 [math.DS] 6 Aug 2014 Abhishek Deshpande∗1 and Manoj Gopalkrishnan†2 1 Center for Computational Natural Sciences and Bioinformatics, International Institute of Information Technology, Gachibowli, Hyderabad, India. 2 School of Technology and Computer Science, Tata Institute of Fundamental Research, Mumbai, India. 6 August 2014 Abstract The persistence conjecture is a long-standing open problem in chemical reaction network theory. It concerns the behavior of solutions to coupled ODE systems that arise from applying mass-action kinetics to a network of chemical reactions. The idea is that if all reactions are reversible in a weak sense, then no species can go extinct. A notion that has been found useful in thinking about persistence is that of “critical siphon.” We explore the combinatorics of critical siphons, with a view towards the persistence conjecture. We introduce the notions of “drainable” and “self-replicable” (or autocatalytic) siphons. We show that: every minimal critical siphon is either drainable or self-replicable; reaction networks without drainable siphons are persistent; and non-autocatalytic weakly-reversible networks are persistent. Our results clarify that the difficulties in proving the persistence conjecture are essentially due to competition between drainable and self-replicable siphons. 1 Introduction Following [18, Example 6.3], consider the reaction network in the species X and Y with the reactions k k 1 − * Y − ) − − 2X, 3 − * 2Y − ) − −X k2 ∗ † k4 [email protected] [email protected] 1 Let x(t), y(t) represent concentrations at time t of the species X, Y respectively. Then mass-action kinetics is described by the system of ordinary differential equations           ẋ 2 −2 1 −1 2 2 = k1 y(t) + k2 x(t) + k3 y(t) + k4 x(t) −2 2 ẏ −1 1 Does there exists a trajectory (x(t), y(t)) originating in the positive orthant (i.e., (x(0), y(0)) ∈ R2>0 ) that can get arbitrarily close to the boundary ∂R2≥0 = R2≥0 \ R2>0 as time t → ∞? That is, for each  > 0, does there exist a time t such that the distance of (x(t ), y(t )) from ∂R2≥0 is less than ? The persistence conjecture [12] asserts that so long as the reaction network is weakly-reversible (Definition 2.9), this can not happen. This conjecture has a history going back to 1974 [28]. It remains open, even when all reactions are reversible, even for as few as 3 species! The 2 species case was settled only very recently [8, 39]. The notion of critical siphon [5] provides a powerful and easy combinatorial way of proving persistence for a certain subclass of networks. The idea is that the existence of a trajectory violating persistence has certain combinatorial implications, i.e., the existence of critical siphons. Conversely, the absence of critical siphons — which can be combinatorially checked — has dynamical implications, i.e., persistence. For example, consider the following network in the species X and Y with reactions given by 0 X +Y 2X + Y X + 2Y 3X + 4Y This is persistent. The idea is that if X were ever at zero concentration, it would be produced from nothing, and similarly for Y . Only the first reaction 0 X + Y matters for this analysis. The other reactions can be replaced arbitrarily, and so long as they remain reversible, we can prove persistence. The notion of siphon helps to make this idea into a proof. A siphon is a set of species that, once absent, remain absent. It turns out that reaction networks without siphons are persistent. Another example is X Y . Here if X and Y are both absent, they remain absent, so {X, Y } is a siphon. However, there is a conservation law: x(t) + y(t) is time-invariant, because whenever an X is destroyed, a Y is created, and vice versa. Therefore, if the initial conditions are (x(0), y(0)) ∈ R2>0 then the point (0, 0) where both X and Y are absent is unreachable. The idea is that if there is a positive conservation law whose support is contained in a siphon then that siphon can not be drained. Hence, among siphons, the challenge to persistence comes only from critical siphons, i.e., siphons that do not contain the support of a positive conservation law. The example with reactions Y 2X and 2Y X has the critical siphon {X, Y }. So, though it is persistent, showing this requires a different argument that proceeds by exhibiting a Lyapunov function [8, 20]. A different approach to the persistence conjecture is to try to identify a subclass of weakly-reversible systems which are somehow physical, and exploit this extra structure to obtain a proof for the persistence conjecture. This program was initiated in [1] and [17], 2 where the notion of systems where every species is made up of atoms in a unique way was made precise, and it was shown that atomic systems have no critical siphons, and hence are persistent. Later, in [18], this result was extended to all saturated or non-catalytic systems, a larger class of systems properly containing the atomic systems. The biological motivation for our work comes from Synthetic Biology, specifically from the DNA Molecular Programming community [41, 53, 52], where reaction networks are being viewed as programming languages for the synthesis of desired behaviour. One would like to have a programming language that is natural with respect to chemical reaction dynamics, so that there are meaningful ways to separately test, and then compose, different subsystems. The Petri net view of reaction networks makes a connection with process algebras, and connects to work on concurrent programming languages. Our work may be viewed as setting down a mathematical bridge between these two different areas, by making explicit the combinatorial foundations of reaction network notions like catalysis, self-replication, and persistence. We hope to exploit these connections more in future to describe ways of programming chemical reaction networks that will take advantage of advances in concurrent programming language design. Our contributions in this paper are the following: • We give an explicit combinatorial characterization of the minimal critical siphons. Specifically, we introduce the notions of drainable and self-replicable sets in Definition 3.1, and prove in Theorem 5.3 that every minimal critical siphon is either drainable or self-replicable. • Conjecture 1 from [18] asserted a link between a certain notion of autocatalysis and critical siphons. We provide a counterexample (Example 3.8) to this conjecture. Our notion of self-replicable siphons captures a more nuanced notion of autocatalysis. With this notion, we show in the spirit of [18, Conjecture 1] that the weakly-reversible networks that have critical siphons are precisely the autocatalytic systems (Theorem 5.3). In particular, all non-autocatalytic (i.e., without self-replicable siphons) weakly-reversible networks are persistent. As a special case, in Section 7 we obtain a combinatorial proof for the persistence of non-catalytic networks, the main result in [18] which was originally proved using algebraic geometric methods. • Angeli et al. [5] have shown that conservative reaction networks without critical siphons are persistent. We show that reaction networks without drainable siphons are persistent (Theorem 6.2). Since networks with drainable siphons are a proper subclass of networks with critical siphons (Theorem 5.3), our result sharpens Angeli’s result, and brings out that the obstruction to proving the persistence conjecture comes from a competition between the drainable and self-replicable natures of a siphon (Remark 6.4). • In Section 4, towards proving Theorem 5.3, we prove the Convex Rank-Nullity theorem (Theorem 4.9), a trichotomy result for matrices that have a sign pattern with all diagonal terms are negative, and all off-diagonal terms positive. Though this result is very suggestive of Farkas’ lemma and its variants, to our best knowledge it has neither 3 appeared before, nor is it an immediate corollary of Farkas’ lemma (Remark 4.10). • All our results are in the setting of positive reaction networks (Definition 2.3). This means our results hold for reactions like 0.3X + 2.14Y → 1.1Z with fractional stoichiometric coefficients. • We introduce the notion of a critical set (Definition 3.1), so that a critical siphon is a set of species which is both critical and a siphon. Together with the notion of critical point (Definition 3.6), this decoupling of the two notions simplifies the analysis (Theorem 3.7), and allows us to obtain slightly stronger results (Theorem 5.3). Figure 1 provides a summary of all the results at a glance. 2 Preliminaries Notation 2.1. Let z, z 0 ∈ Rn be two vectors. 1. min(z, z 0 ) is the vector whose i’th coordinate is min(zi , zi0 ) for all i ∈ {1, 2, . . . , n}. 2. dze is the vector whose i’th coordinate is dzi e for all i ∈ {1, 2, . . . , n}. 3. supp(z) := {i | zi 6= 0}. Definition 2.2. For all vectors v1 , v2 , . . . , vk ∈ Rn : 1. The convex polyhedral cone Cone{v1 , v2 , . . . , vk } := ( k X ) ai vi | a1 , a2 , . . . , ak ≥ 0 . i=1 2. Span{v1 , v2 , . . . , vk } := ( k X ) ai vi | a1 , a2 , . . . , ak ∈ R . i=1 Definition 2.3 (Reaction Network). For every finite set S: 1. An S-complex is a vector y ∈ RS . 2. A complex y ∈ RS is (a) Positive iff y ∈ RS≥0 . (b) Integer iff y ∈ ZS . (c) Chemical iff y ∈ NS . 3. A reaction is a pair (y, y 0 ) of complexes, written y → y 0 with reactant y and product y0. 4. A reaction y → y 0 is positive (respectively, integer, chemical) iff both y, y 0 are positive (respectively, integer, chemical). 4 Figure 1: Summary of results. Self-replicable Siphon Corollary 6.11 Positive Strictly Catalytic set Theorem 6.6 Chemical Weakly-reversible Strictly Catalytic network Positive Cons, Positive C Cons, Positive Theorem 5.3.3 OR Cons : Consistent OR B Definition A Positive Theorem 5.3.2 Theorem 5.3.3 Cons, Positive Drainable Siphon By result X, if the network is Y then A implies B or C. Minimal Critical Siphon Theorem 5.3.3 Positive Theorem 5.6 Network is not persistent Catalytic Network Critical Siphon A reaction network is a pair (S, R) where S is a finite set denoting reacting species, and R is a finite set of reactions. The reaction graph of the reaction network (S, R) is the directed graph with vertex set C := {y, y 0 | y → y 0 ∈ R} and edge set R. Remark 2.4. Conventionally, a reaction network is defined as a triple (S, C, R) where C is the set of complexes that occur either as reactants or as products in some reaction in 5 R. Explicitly providing the set C is redundant, because the complexes can be recovered from the set of reactions. Therefore, we have found it more economical to depart from convention, and define a reaction network as a two-tuple of species and reactions. Notation 2.5. Let G = (S, R) be a reaction network. A reaction y → y 0 is a G-reaction iff y → y 0 ∈ R. Definition 2.6. Let G = (S, R) be a reaction network. Then 1. The stoichiometric subspace H ⊆ RS of G is the linear span of the reaction vectors {y 0 − y | y → y 0 ∈ R}. P 2. A G-conservation law is a linear polynomial i∈S wi xi = w · x, where the xi ’s are indeterminates, and w ∈ RS is perpendicular to H. 3. A G-conservation law w.x is positive iff w ∈ RS≥0 \ {0}. Remark 2.7. It is well-known and easily verified that G-conservation laws P are invariant 0 is a G-reaction and to the application of G-reactions. That is, if y → y i wi xi is a GP P wi (xi + θ(yi0 P − yi )) for all θ ∈ R. Indeed, this is conservation law then i∈S wi xi = i∈SP but a special case of the observation that i∈S wi xi = i∈S wi (xi + θ vi )for all vectors v in the stoichiometric subspace H of G. Definition 2.8. Let G = (S, R) be a reaction network. Then the stoichiometric matrix Γ of G is the matrix whose rows are the reaction vectors {y 0 − y | y → y 0 ∈ R}. For all T ⊆ S, the stoichiometric submatrix ΓT is the matrix obtained from Γ by keeping only those columns that correspond to species in T . Definition 2.9. A reaction network G is: 1. Positive (respectively integer, chemical) if each G-reaction is positive (respectively integer, chemical). 2. Reversible if the reaction graph is undirected. 3. Weakly-reversible if in the reaction graph, every reaction belongs to a cycle. 4. Consistent if there exists a strictly positive vector v such that v · Γ = 0 Remark 2.10. The notion of consistent is well-known from the Petri net literature [54]. It is also well-known [5] that every weakly-reversible reaction network is consistent. For a reaction network consisting of a single cycle, this is obvious by taking v to be the vector of all 1’s. Since a weakly-reversible network can be expressed as a combination of cycles, the result follows for an arbitrary weakly-reversible network. 6 Example 2.11. 2X+3Y is a complex, represented by the vector (2, 3) in the space R{X,Y } ∼ = R2 of complexes. It is a positive complex because 2, 3 ≥ 0. It is an integer complex because 2, 3 are integers. Finally, it is a chemical complex because 2, 3 are positive integers. The reactions X → 2Y and 2X → Y are chemical reactions, where the reaction notation is understood as shorthand to represent the pairs of vectors ((1, 0), (0, 2)) and ((2, 0), (0, 1)). The corresponding reaction network is G = ({X, Y }, {X → 2Y, 2X → Y }). Definition 2.12. Let G = (S, R) be a reaction network. For all reactions y → y 0 and positive complexes w ∈ RS≥0 , the dilution of y → y 0 by w is the reaction y + w → y 0 + w. A reaction z → z 0 is a G-dilution iff there exist a positive complex w ∈ RS≥0 and a G-reaction y → y 0 such that z → z 0 is the dilution of y → y 0 by w. Dilutions of reactions have been defined by Cardelli [6]. Notation 2.13. Let G = (S, R) be a reaction network, and let y, y 0 ∈ RS be complexes. One says that there is a G-reaction pathway y →∗G y 0 iff there exists a sequence y = y(0) → y(1) → . . . → y(k) = y 0 of G-dilutions. Clearly, G-dilutions need not be G-reactions. Such dilutions describe the effect of applying a G-reaction y → y 0 to a population y + w that contains all the reactants required for the reaction to fire, to obtain the population y 0 + w. A G-reaction pathway corresponds to the idea of reachability: given a population z in a test-tube, and a reaction network, what other populations are reachable by applying G-reactions? The reachable populations are precisely the populations z 0 such that z →∗G z 0 . This notion of reachability has been considered by other authors [46, 7, 6]. Lemma 2.14. Let G be a reaction network, and let z →∗G z 0 be a G-reaction pathway. Then z 0 − z is in the positive span H+ = cone{y 0 − y | y → y 0 ∈ R} of the reactions of G. In particular, for every θ ∈ R, for every G-reaction pathway y →∗G y 0 , we have w · (x + θ(y 0 − y)) = w · x for every w perpendicular to the stoichiometric subspace H. Proof. To see that z 0 − z ∈ H+ , first note that for G-dilutions x → x0 we have x0 − x ∈ H. Since reaction pathways are formed by a chain z = y(0) → y(1) → y(2) . . . → y(k) = z 0 of dilutions, we have z 0 −z = y(k)−y(0) = y(k)−y(k −1)+y(k −1)−y(k −2)+· · ·+y(1)−y(0), which is in H+ . The invariance of w · x along z →∗G z 0 now follows from Remark 2.7. Example 2.15. Let G = ({X, Y }, {X → 2Y, 2Y → X, 2X → Y, Y → 2X}). Then the reaction 2X → X + 2Y is not a G-reaction. However, it is a dilution by X of the G-reaction X → 2Y . The sequence of G-dilutions 2X → X + 2Y → 3X + Y → 5X where the second and third reactions are dilutions of Y → 2X, yields a reaction pathway 2X →∗G 5X. 7 Definition 2.16. Let G = (S, R) be a reaction network. The opposite reaction network Gop of G is the reaction network with species S and reactions {y 0 → y | y → y 0 ∈ R} obtained by reversing the reactions of G. 3 Siphons, Drainability, Self-replicability We will say that a set of species is self-replicable if there is an initial state, and a reaction pathway from that state that will increase the numbers of each species in the set. In ecological terms, this would capture the potential for a set of species to simultaneously prosper and increase in number. The opposite notion is that of drainable sets of species, where from an initial state a reaction pathway can deplete the numbers of each species. In ecological terms, this notion captures the potential for a set of species to simultaneously decrease in number, and is connected to the threat of extinction or non-persistence. We now define these notions more formally. Definition 3.1. Let G = (S, R) be a reaction network. A set T ⊆ S of species is 1. A siphon iff for every reaction y → y 0 ∈ R, if the complex y 0 contains a species from T then the complex y contains a species from T . 2. Critical iff there is no positive conservation law whose support is contained in T . 3. Self-replicable iff there is a reaction pathway y →∗G y 0 such that for every species i ∈ T , the i’th component (y 0 − y)i is strictly positive. 4. Drainable iff T is self-replicable for Gop , i.e., there is a reaction pathway y →∗G y 0 such that for every species i ∈ T , the i’th component (y 0 − y)i is strictly negative. 5. Closed iff for every reaction y → y 0 ∈ R, if supp y ⊆ T then supp y 0 ⊆ T . The closure Cl(T ) is the smallest closed set containing T . Remark 3.4.2 will show that the intersection of closed sets is closed, and hence the closure is unique. Notation 3.2. As is usual, one calls a set maximal (respectively, minimal) among all nonempty sets having a property P if no set having property P properly contains it (is properly contained in it). In this sense, we shall refer to maximal and minimal siphons, critical siphons, self-replicable sets, and drainable sets. In particular, note that a minimal critical siphon is minimal among all critical siphons, but not necessarily minimal among all critical sets. Also see Remark 3.4.5. Siphons and critical siphons have been defined before in the chemical reaction network literature [5]. Though “siphon” appears to be the more conventional term, such sets have also been called semi-locking sets. We find this to be a better description of their nature. 8 They don’t necessarily siphon off any flow; however, if all the siphon species are absent, then they remain absent. Critical siphons have also been referred to as “relevant siphons.” [44] The notion of “closure” with respect to a set of reactions of a starting “food” set of species has been considered before in the literature of autocatalytic sets [24]. Gnacadja [17] has considered the notions of “reach-closure” of a set. Our notion of closed sets is cognate with both these notions. Example 3.3. Consider the reaction network G with reactions X 2Y, 2X Y from Example 2.15. The set {X, Y } is: 1. A siphon, because every reaction with either X or Y on the product side requires either X or Y on the reactant side. The set {X} is not a siphon, because of the G-reaction Y → 2X. 2. Critical because there are no conservation laws. 3. Self-replicable because there is a G-reaction pathway 2X + 2Y →∗G 3X + 3Y = 2X + 2Y → X + 4Y → 3X + 3Y increasing both the number of X and number of Y . 4. Drainable because there is a G-reaction pathway 3X + 3Y →∗G 2X + 2Y = 3X + 3Y → X + 4Y → 2X + 2Y decreasing both the number of X and the number of Y . 5. Closed. In particular, the set of all species is trivially always closed. The set {X} is not closed, because the G-reaction X → 2Y produces the species Y which was not in the set. The next remark collects some easy observations about these definitions. Remark 3.4. For every reaction network: 1. As shown in [17, Proposition 3.4], a set T is a siphon iff its complement S \ T is closed. To see this, observe that S \ T is not closed ⇔ There exists a reaction y → y 0 such that the complex y does not contain any species from T , while the complex y 0 contains a species from T . ⇔ T is not a siphon. 9 2. The union of siphons is a siphon. The intersection of closed sets is closed. In particular, this is why the definition of closure of a set is well-defined. 3. The intersection of siphons need not be a siphon. Consider the following reactions: {X + Y → Y , X + Z → Y }. In this example, the sets {X, Y } and {Y, Z} are both siphons, but their intersection {Y } is not a siphon. For the same reason, the union of closed sets need not be closed. 4. Every subset of a critical set is critical. If not, suppose T 0 is a non-critical subset of T . Then there exists a positive conservation law w.x with supp w ⊆ T 0 ⊆ T , contradicting T being critical. 5. As a consequence, every minimal critical siphon is also minimal among siphons. 6. Every subset P of a self-replicable set T is self-replicable since if y →∗G y 0 is such that the i’th component yi0 − yi > 0 for all i ∈ T then a fortiori yi0 − yi > 0 for all i ∈ P . 7. Similarly, every subset of a drainable set is drainable. 8. The union of critical sets need not be critical. Consider the reaction X → Y . In this reaction the sets {X} and {Y } are both critical, but their union {X, Y } is not critical because of the positive conservation law x + y. 9. The union of self-replicable sets/ drainable sets need not be self-replicable/ drainable. Consider the following reactions : {2X → Y , 2Y → X}. In this example, the sets {X} and {Y } are self-replicable, but their union {X, Y } is not self-replicable. Reversing all reaction arrows gives an example where the union of drainable sets is not drainable. Lemma 3.5. Let G = (S, R) be a reaction network. A set T ⊆ S of species is a siphon iff for every reaction pathway y →∗G y 0 , if the complex y 0 contains a species from T then the complex y contains a species from T . Proof. (⇐:) Since every reaction is a reaction pathway. (⇒:) Suppose T is a siphon. Then by definition, for every reaction y → y 0 ∈ R, if the complex y 0 contains a species from T then the complex y contains a species from T . In particular, this is true for every dilution y + w → y 0 + w of y → y 0 , where w ∈ RS≥0 . Therefore, it must be true for chains of dilutions, i.e., reaction pathways. Definition 3.6 (Critical point). Let G = (S, R) be a reaction network with stoichiometric subspace H = span{y 0 − y | y → y 0 ∈ R}. A point z ∈ RS≥0 is a critical point iff the affine space z + H meets the positive orthant RS>0 . Note that a critical point is a point whose support is stoichiometrically admissible in the language of [17]. Critical points are a generalization of critical siphon-points defined in 10 [18]. Firstly, we do not require the reaction network to be weakly-reversible. Further, we do not require the point z to be an equilibrium point, nor do we require the set {i | zi = 0} to be a siphon. Theorem 3.7. Let G = (S, R) be a reaction network. Let T ⊆ S. Then the following are equivalent: 1. T is critical. 2. ker ΓT ∩ RT≥0 = {0}. 3. Every point z ∈ RS≥0 with {i | zi = 0} = T is a critical point. 4. There exists a critical point z ∈ RS≥0 with zi = 0 iff i ∈ T . Proof. Let z ∈ RS≥0 be such that zi = 0 iff i ∈ T . Let H = span{y 0 − y | y → y 0 ∈ R} be the stoichiometric subspace of G. ¬(2) ⇒ ¬(1). If 0 6= v ∈ ker ΓT ∩ RT≥0 then v · x is a positive conservation law with support in T , and T is not critical. (2) ⇒ (3). From the Transposition theorem of Gordan [43, (31), pp. 95] applied to ΓT , there exists v ∈ RR such that vΓT > 0. Note that vΓ is in the stoichiometric subspace H of G. Consider w := z + vΓ where  > 0 is to be chosen sufficiently small. It is enough to show that there exists  > 0 so that w ∈ RS>0 . We show this by case analysis. Case 1: i ∈ T . Since zi = 0, we have wi = (vΓ)i > 0. zi Case 2: i ∈ / T . Then zi > 0 and so for  < |(vΓ) , we have wi = zi + (vΓ)i > 0. i| (3) ⇒ (4) is obvious. ¬(1) ⇒ ¬(4). Suppose T is not critical. Then there exists a positive conservation law w · x such that supp w ⊆ T . In particular, w · (z + H) = w · z + w · H = w · z = 0. But w · x 6= 0 for all x ∈ RS>0 . We conclude that z + H does not meet RS>0 . Hence, z is not a critical point. Example 3.8. Consider the reaction network X 2X, Y X + Y. The associated event-system [1] is EG = {x − x2 , y − xy}. The network is autocatalytic as per [18, Definition 6.2] because x − x2 ∈ EG and for all k ∈ N the binomials 1 − xk are not contained in the ideal (EG ). However, contrary to [18, Conjecture 1], there are no critical siphons. The set {X} is not a siphon because X is produced by the second reaction. Neither of the siphons {Y } and {X, Y } are critical siphons, since the concentration of Y is dynamically invariant. Example 3.8 motivated our definition of drainable and self-replicable sets. The key observation was that the failure of [18, Conjecture 1] can be attributed to working with only one species at a time. If we work with sets of species instead then, as we show in Theorem 5.3, an appropriately modified version of [18, Conjecture 1] is true. 11 4 Diffusive Matrices Definition 4.1. A matrix A = (aij )m×n is diffusive iff all diagonal elements are strictly negative, and all off-diagonal elements are non-negative. That is, aii < 0 and aij ≥ 0 for all i ∈ {1, 2, . . . , m} and j ∈ {1, 2, . . . , n} with i 6= j. A diffusive matrix is strongly diffusive iff all off-diagonal elements are strictly positive. Example 4.2. Laplacian matrices (or their negatives, depending upon convention) are diffusive. If the graph is a clique then the Laplacian matrix is strongly diffusive. If the graph is strongly connected then some power of the Laplacian matrix is strongly diffusive. Notation 4.3. Let A be a matrix. Then rows(A) is the set of row vectors of A. Lemma 4.4. Let A = (aij )n×n be a square matrix with aij > 0 for all i 6= j. If cone(rows(A)) ∩ Rn≥0 \ {0} is nonempty then cone(rows(A)) ∩ Rn>0 is nonempty. Proof. Suppose cone(rows(A)) ∩ Rn≥0 \ {0} = 6 ∅. Let v ∈ cone(rows(A)) ∩ Rn≥0 \ {0}, and let i be such that vi > 0. Define w() := v + (ai1 , ai2 , . . . , ain ). Then for sufficiently small  > 0, we claim that w() ∈ Rn>0 , which completes the proof because w() ∈ cone(rows(A)). To see this, note first that vi > 0 ⇒ vi + aii = w()i > 0 for sufficiently small  > 0. Next, for all j 6= i, we have w()j = vj + aij > 0 since aij > 0 by assumption. Lemma 4.5. Let A be a diffusive square n × n matrix, and let −A1 be the matrix obtained after one step of Gaussian elimination applied to −A. Then 1. cone(rows(A1 )) ⊆ cone(rows(A)), and 2. Either A1 is diffusive or rows(A1 ) ∩ Rn≥0 is nonempty. Proof. (1) Recall that Gaussian elimination proceeds by either (a) exchanging rows, or (b) multiplying a row by a scalar, or (c) adding a constant times one row to another row. We consider each of these cases separately. (a) Since A is diffusive, all elements on the diagonal of −A are strictly positive, in particular non-zero. So the algorithm will not exchange rows. (b) If a row is multiplied to make the pivot element equal 1, then it is multiplied by the reciprocal of the diagonal element, which is a positive number, so cone(rows(A1 )) ⊆ cone(rows(A)). a >0 (c) If rowj ← rowj +c · rowi for some rows i, j then the algorithm will choose c = − aji ii 12 so that cone(rows(A1 )) = cone({row1 , row2 , . . . , rowj−1 , rowj +c · rowi , rowj+1 , . . . , rown }) ⊆ cone{row1 , row2 , . . . , rown , rowj +c · rowi } = cone{row1 , row2 , . . . , rown } (Since c > 0) = cone(rows(A)). (2) Suppose A1 is not diffusive. Since scalar multiplication preserves diffusivity, A1 must have been obtained from A by an operation rowj ← rowj +c rowi for some c > 0 and rows i, j. Since A was diffusive and by the choice of c, this operation preserves non-negativity of off-diagonal terms. By non-diffusivity of A1 , the diagonal entry on the j’th row of A1 must be non-negative, so that the j’th row of A1 is in Rn≥0 . Remark 4.6. The reason we are applying Gaussian elimination to −A instead of to A is because Gaussian elimination as usually described in textbooks sets the pivot elements to be positive, whereas diffusive matrices have negative elements on the diagonal. If one were to either change the convention in the Gaussian elimination algorithm, or reverse the sign convention for what is meant by a diffusive matrix, we wouldn’t need this negative sign. Lemma 4.7. Let A be a strongly diffusive square matrix. Suppose Gaussian elimination is applied to −A to obtain the sequence −A = −A0 , −A1 , −A2 , . . . , −Ak of matrices, and suppose A1 , . . . , Ak−1 are diffusive and Ak is not. If rows(Ak ) ∩ Rn≥0 = {0} then Ak has the sign pattern   < 0 ≥ 0 ... ≥ 0  0 < 0 ... ≥ 0     ..  ..  . . <0 ≥0  0 0 ... 0 That is, if Ak = (akij )n×n then   ≥ 0 if i > j k aij = 0 if i < j or i = n   < 0 if i = j 6= n Proof. Since Ak−1 is diffusive, and Ak is not, then as in the proof of Lemma 4.5, Ak must have been obtained from Ak−1 by an operation rowkq := rowk−1 +c · rowk−1 q p 13 where c > 0 and p, q ∈ {1, 2, . . . , n} are distinct rows. If Ak = (akij )n×n then akqj   = 0 if j = p by choice of c in Gaussian elimination; k−1 k−1 k−1 = aqj + capj ≥ 0 if j 6= q, j 6= p since ak−1 qj ≥ 0, apj ≥ 0 by diffusivity of Ak−1 ;   ≥ 0 if j = q since Ak is not diffusive, and Ak−1 is. Therefore rowkq ∈ Rn≥0 . By assumption, rowkq = 0. Suppose for contradiction that q 6= n. Consider the n’th column. Note that a0in > 0 for all i 6= n since A0 = A is strongly diffusive. It follows by induction that for all i 6= n, a1in , a2in , . . . , akin > 0. In particular, akqn > 0 contradicting rowkq = 0. Hence q = n. The fact that Ak is upper-triangular is a consequence of Gaussian elimination reaching the last row. The sign pattern follows because Ak−1 was diffusive. Corollary 4.8. Let A be an (n − 1) × n strongly diffusive matrix. If cone(rows(A)) ∩ Rn≥0 = {0} then A has rank n − 1. Proof. Observe that Gaussian elimination does not employ the n’th row of an n × n matrix to put the (n − 1) × n submatrix obtained by dropping the n’th row into upper triangular form. Suppose cone(rows(A)) ∩ Rn≥0 = {0}. Consider applying Gaussian elimination to A. After each step, either the matrix remains diffusive, or a row becomes non-negative, by Lemma 4.5. If we never get a non-negative row, Gaussian elimination goes all the way to the end, and gives us a matrix in row echelon form, which clearly has rank n − 1. If we get a non-negative row, by assumption the row must be 0. However, this contradicts Lemma 4.7, and hence this case can never happen. Theorem 4.9 (Convex Rank-Nullity Theorem). Let A be a strongly diffusive n × n matrix. Then either ker A∩Rn≥0 6= {0} or cone(rows(A))∩Rn>0 is nonempty or Rn<0 ⊆ cone(rows(A)). Proof. Suppose cone(rows(A)) ∩ Rn>0 = ∅ and ker A ∩ Rn≥0 = {0}. By Lemma 4.4 we must have cone(rows(A)) ∩ Rn≥0 = {0}. Hence applying Corollary 4.8 to the first n − 1 rows of A, it follows that A has rank at least n − 1. We next argue that A has rank n. Suppose for contradiction that A has rank n − 1. Let v ∈ ker A be a non-zero vector. Since ker A ∩ Rn≥0 = {0}, we know that v ∈ / Rn≥0 . Reordering indices if necessary, we may assume without loss of generality that v has the sign pattern (≥ 0, ≥ 0, . . . , ≥ 0, > 0, ≤ 0, ≤ 0, . . . , ≤ 0), with k such that vk > 0 and vk+1 ≤ 0. Now applying Gaussian elimination to A with this ordering leads to an upper triangular matrix B as in Lemma 4.7 with the last row 0. In particular, the k’th row rkB of this matrix has the sign pattern (0, 0, . . . , 0, < 0, ≥ 0, . . . , ≥ 0) with the entry in position k having the only negative sign. Since v ∈ ker A = ker B, we must have rkB · v = 0. But from the sign analysis, rkB · v < 0, which is a contradiction. Hence, A has rank n. 14 The sequence of matrices produced by Gaussian elimination applied to A are all diffusive. This is because cone(rows(A)) ∩ Rn≥0 = {0} and A has rank n, so Lemma 4.5 applies inductively. So the final matrix B output by Gaussian elimination is diagonal and diffusive. That is:   <0 0 ... 0  0 < 0 ... 0    B= .  ..  .. . <0 0  0 0 ... <0 By repeated application of Lemma 4.5, cone(rows(B)) ⊆ cone(rows(A)), and so Rn<0 ⊆ cone(rows(A)). Remark 4.10. Theorem 4.9 might remind some readers of Gordan’s theorem [43, (31), pp. 95], which asserts unconditionally that either ker A ∩ Rn≥0 6= {0} or span(rows(A)) ∩ Rn>0 is nonempty. However, the two theorems are different, and it is instructive to compare the differences. Theorem 4.9 makes a stronger assumption — that A is strongly-diffusive — and produces a stronger implication: if the kernel is trivial then the cone (as opposed to span in Gordan’s theorem) of the rows meets either the positive or the negative orthant. In particular, there are matrices that violate the stronger assumption for which the stronger conclusion is also false. For example, consider the diffusive, but not strongly diffusive, matrix   −1 0 0  0 −1 2  . 0 1 −1 The conclusion of Theorem 4.9 is false for this matrix. This is because the kernel is zero. The cone of the rows does not contain any strictly positive or strictly negative vector, as can be easily verified. 5 The Main Result Lemma 5.1. Let G = (S, R) be a positive reaction network. Let T ⊆ S be a minimal siphon. Then for all i ∈ T , the closure Cl({i} ∪ S \ T ) = S. Proof. Note that S \ T ( {i} ∪ S \ T ⊆ Cl({i} ∪ S \ T ). Therefore, the complement S \ Cl({i} ∪ S \ T ) ( T . But S \ Cl({i} ∪ S \ T ) is the complement of a closed set, and hence must be a siphon by Remark 3.4.1. Since T is a minimal siphon, a siphon properly contained in T can only be the empty set. Hence, Cl({i} ∪ S \ T ) = S. Lemma 5.2. Let G = (S, R) be a positive reaction network. Suppose T ⊆ S is a minimal siphon that is not self-replicable. Then there exists a strongly diffusive T × T matrix A such that cone(rows(A)) ⊆ cone(rows(ΓT )) and ker A = ker ΓT . 15 Proof. By Lemma 5.1, we have Cl({i} ∪ S \ T ) = S for every i ∈ T . Hence for every i ∈ T , there exists a reaction pathway y(i) →∗G y 0 (i) such that supp(y(i)) = i ∪ S \ T and supp(y 0 (i)) = S. Define the matrix A = (y 0 (i)j − y(i)j )T ×T . To see that A is strongly diffusive, first note that y 0 (i)j − y(i)j > 0 for all i, j ∈ T such that i 6= j since y(i)j = 0. Next note that if there exists i ∈ T such that y 0 (i)i − y(i)i ≥ 0, then Lemma 4.4 implies that T is self-replicable. Hence y 0 (i)i − y(i)i < 0 for all i ∈ T . Since the rows of A correspond to reaction pathways, Lemma 2.14 implies that cone(rows(A)) ⊆ cone(rows(ΓT )). It is clear that ker ΓT ⊆ ker A. Suppose the containment is strict. Then there exists a row of ΓT that is not in the span of the rows of A. In particular A does not have full rank, so by Corollary 4.8, A must have rank n − 1 and the first n − 1 rows of A are linearly independent. Further, ΓT has a row that is not in the span of the rows of A. Adding  times this row of ΓT to the last row of A, where  > 0 is sufficiently small, gives a new matrix à that is full rank (hence ker ΓT = ker à = {0}), strongly-diffusive, and such that cone(rows(Ã)) ⊆ cone(rows(ΓT )). Theorem 5.3. Let G = (S, R) be a positive reaction network. Let ∅ = 6 T ⊆ S. Then 1. If T is either drainable or self-replicable then it is critical. 2. If T is a minimal critical siphon then it is either drainable or self-replicable. 3. If G is consistent then the following are equivalent: (a) T is critical. (b) T is drainable. (c) T is self-replicable. Proof. 1. For contradiction, suppose T is not critical. Then there exists a positive conservation law w.x with support in T . If T is self-replicable then there exists a reaction pathway y →∗G y 0 such that yi0 − yi > 0 for all i ∈ T . In particular, w.y 0 > w.y, contradicting Lemma 2.14 that w.x is invariant along G-reaction pathways. If T is drainable, we get a similar contradiction from yi0 − yi < 0 for all i ∈ T . Hence, T is critical. 2. Let T be a minimal critical siphon. Since T is critical, by Theorem 3.7, we have ker ΓT ∩ RT≥0 = {0}. Since T is a minimal siphon, Lemma 5.2 gives a strongly diffusive matrix A such that cone(rows(A)) ⊆ cone(rows(ΓT )) and ker A = ker ΓT . Applying Theorem 4.9 to the matrix A, either cone(rows(ΓT )) ∩ Rn>0 ⊇ cone(rows(A)) ∩ Rn>0 6= ∅ so that T is self-replicable, or cone(rows(ΓT )) ∩ Rn<0 ⊇ cone(rows(A)) ∩ Rn<0 6= ∅ 16 so that T is drainable. 3. The implication (b) ⇒ (a) is true by part 1. Now suppose that G is consistent. We will show (a) ⇒ (c) and (c) ⇒ (b). Since G is consistent, for each reaction y → y 0 ∈ R there is a number ay→y0 > 0 such that X ay→y0 (y 0 − y) = 0. (1) ay→y0 (y 0 − y)i = 0. (2) y→y 0 ∈R In particular, for all i ∈ T , we have X y→y 0 ∈R Since RS>0 is an open set, we may assume the ay→y0 are rational numbers. Normalizing denominators, we may assume the ay→y0 are integers. (a) ⇒ (c): Suppose T is critical. We will show that T is self-replicable. Towards this, let z ∈ ZS≥0 be such that zi = 0 precisely when i ∈ T . Then z is a critical point by Theorem 3.7. From the definition of a critical point, there exist reals ey→y0 such that z+ X ey→y0 (y 0 − y) ∈ RS>0 . (3) y→y 0 ∈R In particular, for all i ∈ T , since zi = 0, we have X ey→y0 (y 0 − y)i > 0. (4) y→y 0 ∈R Since RS>0 is an open set, we may assume the ey→y0 are rational numbers. Normalizing denominators, we may assume the ey→y0 are integers. Now choose strictly positive integers fy→y0 such that fy→y0 ay→y0 + ey→y0 > 0. Let n = maxy→y0 {fy→y0 }. Adding n times Equation 2 to Equation 4 yields for all i ∈ T : X  n ay→y0 + ey→y0 (y 0 − y)i > 0. y→y 0 ∈R Hence T is self-replicable. (c) ⇒ (b) Suppose T is self-replicable. Then there exist positive integers by→y0 such that for all i ∈ T X by→y0 (y 0 − y)i > 0. (5) y→y 0 ∈R 17 We choose strictly positive integers cy→y0 such that cy→y0 ay→y0 − by→y0 > 0, and define m := maxy→y0 {cy→y0 }. Subtracting Equation 5 from m times Equation 2 yields for all i ∈ T: X  m ay→y0 − by→y0 (y 0 − y)i < 0. y→y 0 ∈R Hence T is drainable. Example 5.4. Some critical siphons are neither self-replicable nor drainable. Consider the following network: X → 2Y, 2X → Y In this network, the siphon {X, Y } is critical. However, {X, Y } is neither self-replicable nor drainable. A self-replicable siphon need not be a minimal critical siphon. Consider the following network: X → 2X, 2X → 2X + Y The siphon {X, Y } is self-replicable because there exists a reaction pathway X →∗ 2X + Y , and therefore {X, Y } is a critical siphon by Theorem 5.3.1. However, it is not a minimal critical siphon because {X} is also a critical siphon. 6 Persistence Definition 6.1. A reaction network G = (S, R) is persistent iff for every choice k : R → R>0 of specific rates, for all initial conditions x(0) ∈ RS>0 , for the mass-action ODE system ẋ(t) = X ky→y0 (y 0 − y)x(t)y , y→y 0 ∈R the omega-limit set ω(x) does not meet ∂RS≥0 , i.e., for every increasing sequence 0 < t1 < t2 < . . . of positive real numbers tending to +∞, the limit lim x(ti ) ∈ / ∂RS≥0 . i→∞ The definition of persistence is standard in dynamical systems, and we have adapted it here for mass-action systems. Theorem 6.2. Let G = (S, R) be a positive reaction network. If G has no drainable siphons then G is persistent. Proof. We will prove the contrapositive. Suppose G is not persistent. We will first identify a siphon in G, and then show that siphon to be “drainable.” There exist a point x0 ∈ RS>0 and specific rates k : R → R>0 such that the solution x(t) to the mass-action ODE system with initial conditions x(0) = x0 violates persistence, so that the omega-limit set ω(x) meets 18 S . From [5, Proposition 1], the boundary ∂RS≥0 of the positive orthant. Let z ∈ ω(x) ∩ ∂R≥0 we know that the set Tz := {i | zi = 0} is a siphon. (Strictly speaking, [5, Proposition 1] is in the context of chemical reaction networks, but the proof applies without change to positive reaction networks.) We now show that Tz is drainable. Define ConeR := Cone({y 0 − y | y → y 0 ∈ R}). We first claim that z ∈ x(0) + ConeR . By definition of ω-limit point, there exists an increasing sequence 0 < t1 < t2 < . . . of positive real numbers tending to +∞ such that z = lim x(ti ). Further, writing the integral of the mass-action ODE system as a Riemann i→∞ sum, t/h−1 X X x(t) = x(0) + lim h · ky→y0 · (y 0 − y) · (x(jh))y , h→0 j=0 y→y 0 ∈R so that ti /h−1 z = x(0) + lim lim i→∞ h→0 X X h · ky→y0 · (y 0 − y) · (x(jh))y . j=0 y→y 0 ∈R Each of the partial sums ti /h−1 zi,h = x(0) + X X h · ky→y0 · (y 0 − y) · (x(jh))y j=0 y→y 0 ∈R is in ConeR because h, ky→y0 , (x(jh))y > 0; the limit exists by choice of ti ; and ConeR is a closed set by Definition 2.2. Hence, z ∈ x(0) + ConeR . So there exist non-negative real numbers ay→y0 ∈ R≥0 such that X z = x(0) + ay→y0 (y 0 − y). y→y 0 ∈R P Rewriting this, we get x(0) = z − y→y0 ∈R ay→y0 (y 0 − y) ∈ RS>0 by assumption. Since RS>0 is open, we can slightly perturb the numbers ay→y0 P if necessary so that they lie in the non-negative rational numbers, while ensuring that z − y→y0 ∈R ay→y0 (y 0 − y) remains in the positive orthant. Now clearing denominators of P the numbers ay→y0 by multiplying by a large positive integer L, we get that α := Lz − y→y0 ∈R by→y0 (y 0 − y) ∈ RS>0 , where by→y0 = Lay→y0 are all non-negative integers. In other words, there is a G-reaction pathway from α ∈ RS>0 to Lz, showing that TLz = Tz is drainable. Remark 6.3. Let G = (S, R) be a positive reaction network. If T1 ⊆ S is a drainable siphon and T2 ⊆ T1 is a siphon then T2 is drainable by Remark 3.4.7. In particular, every minimal drainable siphon is a minimal siphon. Hence to show that a positive reaction network is persistent, it is sufficient to show that its minimal siphons are not drainable. 19 The next remark provides a vague indication of future directions for attack on the Global Attractor Conjecture prompted by the results in this paper. Remark 6.4. Many reaction networks with drainable siphons are nevertheless persistent. One natural question to explore is precisely when do minimal drainable siphons cause extinction? If a minimal drainable siphon is simultaneously also self-replicable, then intuitively it seems as if there is a competition between extinction and autocatalytic growth. Let us say, very informally, that the self-replicable nature of a minimal critical siphon dominates the drainable nature if this competition is won by autocatalytic growth, so that there is no extinction of the species in T . We will leave this notion of “domination” vague at the moment; making it precise in combinatorial terms, and linking the combinatorics to the dynamics, are two of the challenges in taking this work forward. In this regard, also see notions of draining, sustaining, and domination in [20, Proposition 6.26] which are cognate to the present notions of drainable, self-replicable, and domination respectively. Note that in weakly-reversible networks, every drainable siphon is also self-replicable by Theorem 5.3.3. Perhaps the definition of domination, when provided, will allow us to reformulate the persistence conjecture thus: in weakly-reversible networks, for minimal critical siphons, the self-replicable nature dominates the drainable nature. 7 Catalytic sets and Catalysis The goal of this section is to give an elementary proof to Theorem 7.14, which was first proved in [18] with algebraic geometric techniques. We recall some definitions from [18]. Definition 7.1 (Definition 3.1 in [18]). Let G = (S, R) be a weakly-reversible chemical reaction network. The event-graph G of G is a directed graph with vertices V (G) = ZS≥0 and edges the G-dilutions y → y 0 where both y, y 0 ∈ ZS≥0 . Q Remark 7.2. In [18], the event-graph was defined in terms of the monomials i∈S xyi i and Q yi0 i∈S xi because the techniques in that paper came from algebraic geometry. Here we have rephrased the same definition in terms of dilutions. The equivalence is immediate from comparing the two definitions. The next lemma bridges positive and chemical reaction networks. Specifically, it makes the point that in chemical reaction networks, it is sufficient to consider complexes that have non-negative integer coordinates, as opposed to non-negative real coordinates. Lemma 7.3. Let G = (S, R) be a chemical reaction network. If y →∗G y 0 is a reaction pathway then 1. y − byc = y 0 − by 0 c. 20 2. There is a reaction pathway byc →∗G by 0 c. Proof. Since G is chemical, each G-reaction (and hence each G-dilution) can only change the population by an integer vector, and fractional parts of complexes are carried around unchanged by reaction pathways, which establishes part 1. To see part 2, suppose y →∗G y 0 corresponds to the sequence of dilutions y = y(0) → y(1) → . . . → y(m) = y 0 . Then by part 1, since every dilution is a reaction pathway, y(i) − by(i)c = y − byc for all i. Since G is chemical, removing the fractional part of a complex does not affect the reactions that can occur with that complex as source. So by(0)c → by(1)c → . . . → by(m)c is a sequence of dilutions, and there is a reaction pathway byc →∗G by 0 c. The next lemma restates the definitions of catalytic and strictly catalytic chemical reaction networks which were introduced in [18] in the language of reaction pathways. Readers who do not wish to consult [18] at this point may also consider the next lemma as the definition of catalytic and strictly-catalytic chemical reaction networks, and skip the proof. Lemma 7.4. A weakly-reversible chemical reaction network G is catalytic (respectively, strictly catalytic) iff there exist complexes y, y 0 ∈ ZS≥0 such that y →∗G y 0 but y − min(y, y 0 ) 6→∗G y 0 − min(y, y 0 ) (respectively, y →∗G y 0 but for all k ∈ R>0 , k(y − min(y, y 0 )) 6→∗G k(y 0 − min(y, y 0 ))). Proof. Since edges in G correspond to dilutions, complexes y, y 0 are path-connected in G 0 0 iff y →∗G y 0 . Next note that gcd(xy , xy ) = xmin(y,y ) . The catalytic part of the lemma now follows from Definition 3.2 in [18]. To see the strictly catalytic part, first observe that by Definition 6.1 in [18], G is strictly catalytic iff there exist complexes y, y 0 ∈ ZS≥0 such that y →∗G y 0 and k(y − min(y, y 0 )) 6→∗G k(y 0 − min(y, y 0 )) for all k ∈ Z≥1 . It remains to show that the definition does not change if we quantify over all k ∈ R>0 . One direction is easy. For the other direction, we proceed by contrapositive. Suppose y, y 0 ∈ ZS≥0 are such that y →∗G y 0 and there exists k ∈ R>0 such that k(y − min(y, y 0 )) →∗G k(y 0 − min(y, y 0 )). By dropping any fractional part if necessary as in Lemma 7.3, we may assume that k(y − min(y, y 0 )) is an integer vector, so that k is rational. Let p, q be positive integers such that k = pq . Then we get a reaction pathway kq(y − min(y, y 0 )) →∗G kq(y 0 − min(y, y 0 )) by applying the above reaction pathway q times. Since kq = p is a positive integer, we are done. The intuition behind the definition of “catalytic” is that min(y, y 0 ) prevents the conversion of y − min(y, y 0 ) to y 0 − min(y, y 0 ). “Strictly catalytic” indicates that the conversion is not possible even with multiple copies of y − min(y, y 0 ). Note that we have only defined what it means for a network to be (strictly) catalytic, but have said nothing about which species may be identified as the catalysts. The next definition 21 makes precise this identification of the catalytic species, in the process also extending the concept of catalysis beyond weakly-reversible chemical reaction networks, to all positive reaction networks. Definition 7.5 (Catalytic set). Let G = (S, R) be a positive reaction network. A set T ⊆ S is catalytic iff there is a reaction pathway y →∗G y 0 such that 1. supp(min(y, y 0 )) = T . 2. y − min(y, y 0 ) 6→∗G y 0 − min(y, y 0 )). It is strictly-catalytic if in addition k(y −min(y, y 0 )) 6→∗G k(y 0 −min(y, y 0 )) for every k ∈ R>0 . We immediately obtain the next theorem as an easy consequence. Theorem 7.6. Let G be a weakly reversible chemical reaction network. Then G has a catalytic (respectively, strictly-catalytic) set T ⊆ S iff G is catalytic (respectively, strictlycatalytic). Proof. Immediate from Lemma 7.3, Lemma 7.4 and Definition 7.5. This theorem allows us to extend the previous definition of catalytic and strictlycatalytic networks from the class of weakly-reversible chemical reaction networks to all positive reaction networks. Definition 7.7. A positive reaction network G = (S, R) is catalytic (respectively strictly catalytic) iff there exists a catalytic (respectively, strictly catalytic) subset T ⊆ S. Example 7.8. For the reaction network: 3X → 0 X + 2Y → 2Y , the set {Y } is catalytic because there exists a reaction pathway X + 2Y →∗G 2Y , but there is no reaction pathway X →∗G 0. However, it is not strictly catalytic, because there is a reaction pathway 3X →∗G 0. For the reaction network: X +Y →Y X + 2Y → 2Y , the set {Y } is strictly catalytic here because there exists a reaction pathway X + 2Y →∗G 2Y , and for all k ∈ R>0 , kX 6→∗G 0, since the absence of Y turns off all reactions. The next theorem shows how the notions of self-replicable, strictly-catalytic, and siphon are related. 22 Theorem 7.9. Let G = (S, R) be a positive reaction network. If T ⊆ S is a self-replicable set that is not strictly-catalytic then no nonempty subset of T is a siphon. Proof. Suppose T is a self-replicable set that is not strictly-catalytic. Since T is selfreplicable, there exists a reaction pathway y →∗G y 0 such that yi0 − yi > 0 for all i ∈ T . Since T is not strictly-catalytic, there exists k ∈ R>0 such that k(y − min(y, y 0 )) →∗G k(y 0 − min(y, y 0 )). Note that for all i ∈ T , k(yi − min(yi , yi0 )) = 0 whereas k(yi0 − min(yi , yi0 )) > 0. Hence no nonempty subset of T is a siphon by Lemma 3.5. Example 7.10. The converse of the above theorem is false. Consider the following reaction network: X → 2X Y →X +Y In this example, no non-empty subset of X is a siphon. Notice that X is self-replicable because of the reaction pathway X → 2X that increases the number of X. But X is strictly catalytic as we have a reaction pathway X → 2X, but no reaction pathway 0 → kX for every k ∈ R>0 . Corollary 7.11. Let G = (S, R) be a positive reaction network. If T ⊆ S is a self-replicable siphon then T is a strictly-catalytic set. Corollary 7.12. Let G = (S, R) be a weakly-reversible positive reaction network. If T ⊆ S is a critical siphon then T is a strictly-catalytic set. Proof. By Theorem 5.3.3, Remark 2.10 and Corollary 7.11 From Corollary 7.12 and Theorem 7.6, we have the following theorem. Theorem 7.13. Weakly-reversible chemical reaction networks with critical siphons are strictly catalytic. Since every strictly catalytic network is also catalytic we also obtain an elementary proof for the following theorem first proved in [18]. Theorem 7.14. Weakly-reversible chemical reaction networks with critical siphons are catalytic. Note that [18] made a connection between saturated binomial ideals and catalysis, and used the algebraic geometry of binomial ideals to obtain this result. Example 7.15. The converse of the above theorem is false. Consider the reaction network in Example 7.10. In this case, there is a reaction pathway Y →∗ X + Y , but there is no reaction pathway 0 →∗G X. Hence the set Y is catalytic. But the above network does not possess any self-replicable siphons. The species X is not a siphon because of the second reaction. The sets {Y } and {X, Y } are not critical because of the conservation law y. 23 8 Related Work A reaction network admits various choices for dynamics whose appropriateness depends on the context of the application. We briefly describe some of the possible choices. • Mass-action kinetics [21] prescribes a way for going from a reaction network and a collection of reaction “specific rates” to a system of ordinary differential equations. The variables of this ODE system are concentrations of the reaction species as functions of time, and the right-hand sides are polynomials in these variables. Many of the mathematical results about chemical reaction networks have been proved in the setting of mass-action kinetics. Such models also appear in the study of power-law systems and S-systems from biochemical systems theory [45]. Quadratic dynamical systems [42] studied in computer science to model genetic algorithms are mathematically cognate to bimolecular mass-action systems. Many models in population biology like predatorprey systems [36, 48] are described as mass-action systems. • The chemical master equation describes the evolution of species populations as a continuous-time Markov process, given a “specific propensity” for each reaction. It is a physically more accurate choice for dynamics than mass-action kinetics, since it also takes into account stochastic effects. It is especially relevant when modeling reactions where the species population sizes are small, and the stochastic effects can cause a significant deviation from mass-action behavior. • A common choice of dynamics in the computer science community, especially in the study of Petri nets, is non-deterministic dynamics. The key question here is that of “reachability:” whether there is a path to go from one population vector to another, by applying the reactions in any sequence. • In practice, the rates and propensities of reactions are often not easily obtainable by experiment. Indeed, they may not even be constants, but may vary in time, or across assays. This can be captured by mass-action differential inclusions [19], where the reaction rates simultaneously take all values in a fixed interval bounded away from 0 and +∞. • The assumption of mass-action can be relaxed to allow other functional forms for the right-hand sides of the ODEs. Many of the results first proved in the setting of mass-action can be extended to these more general dynamical systems [9]. • Stochastic and deterministic reaction-diffusion systems combine spatial effects of diffusion with some local dynamical model of the progress of reactions. They are relevant in settings where the assumption that the reactants are well-mixed no longer holds. Reaction networks have been studied in chemistry for a long time [21], but they have also been studied beyond chemistry. In 1962, Carl Petri [40] applied reaction networks to the study of distributed processes in computer science, and they have come to be known in this area as “Petri nets.” Kauffman [33] has conjectured a key role for autocatalytic reaction networks in the origin of life. 24 In recent times, advances in systems and synthetic biology and molecular computation have given a new impetus to the study of reaction networks. It is now commonplace wisdom in biology that the sophisticated behavior of living systems emerges from the dynamics of their reaction networks. As high-throughput techniques uncover more details about these biochemical reaction networks, the questions of inference and control of dynamical properties of the system from this combinatorial data becomes more compelling. Such efforts are already underway in the areas of Flux Balance Analysis [31, 38], and Biochemical Systems Theory [45]. It is hoped that a deep mathematical understanding of reaction networks would aid such efforts. In the area of molecular computation, researchers have engineered proof-of-principle molecular circuits that synthesize sophisticated behavior [41]. Interesting applications would result if these constructions could be scaled economically by two orders of magnitude. One problem with attempts at scaling has been “retroactivity:” composition of two reaction networks leads to changes in the behavior of each network [51], so that the gestalt dynamics does not have the targeted behavior. To obtain a good compositional scheme for reaction networks, it may be helpful to investigate whether there are mathematically-natural ways for reaction networks to be composed, and decomposed. The persistence conjecture [12] is a good candidate problem for gauging progress in our understanding of the dynamics of reaction networks. In recent times, there has been a resurgence of interest in this conjecture [8, 39, 2, 18, 19, 20], and in critical siphons [3, 4, 44, 18]. Autocatalysis almost certainly plays a central role in the complexity and self-organization exhibited by living systems, and possibly also played a role in the origin of life [33]. Autocatalysis is also a feature of synthetic DNA molecular circuits that perform signal amplification [49, 50] — signal amplification is essential for the scaling of molecular circuit constructions. Our notion of “self-replicable siphons” may be relevant in the context of Kauffman’s program [33] of explaining the origin of life using autocatalytic sets of reactions. Autocatalytic sets of reactions have been studied extensively [47, 24, 37, 23, 26, 25, 27, 29, 30, 16, 32, 11, 10]. The notion of self-replicable siphons (Definition 3) appears to be cognate with the idea of autocatalytic sets, and has a certain mathematical naturalness to it. Acknowledgements. We thank Jaikumar Radhakrishnan for pointing out that our proof of Theorem 4.9 showed a result mildly stronger (Rn<0 ⊆ cone(rows(A))) than what we had asserted in a previous draft (cone(rows(A)) ∩ Rn<0 is nonempty). We thank the referees for useful comments. 25 References [1] Leonard Adleman, Manoj Gopalkrishnan, Ming-Deh Huang, Pablo Moisset, and Dustin Reishus, On the mathematics of the law of mass action, preprint, 2008, http://arXiv. org:0810.1108. [2] David F. Anderson, A proof of the global attractor conjecture in the single linkage class case, SIAM Journal on Applied Mathematics. 71 (2011), no. 4, 1487–1508. [3] , Global asymptotic stability for a class of nonlinear chemical equations, SIAM J. Appl. Math. 68 (2008), no. 5, 1464–1476. [4] David F. Anderson and Anne Shiu, The dynamics of weakly reversible population processes near facets, SIAM J. Appl. Math. 70 (2010), no. 6, 1840–1858. [5] David Angeli, Patrick De Leenheer, and Eduardo Sontag, A Petri net approach to persistence analysis in chemical reaction networks, Biology and Control Theory: Current Challenges (Isabelle Queinnec, Sophie Tarbouriech, Germain Garcia, and Silviu-Iulian Niculescu, eds.), Lecture Notes in Control and Information Sciences, vol. 357, Springer Berlin/Heidelberg, 2007, 10.1007/978-3-540-71988-5_9, 181–216. [6] Luca Cardelli, Strand algebras for DNA Computing, DNA and molecular programming, Lecture notes in computer science, 5877 (2009), 12–24. [7] Ho-Lin Chen, David Doty, David Soloveichik, Deterministic Function Computation with Chemical Reaction Networks, Preliminary extended abstract in Proceedings of DNA Computing and Molecular Programming. 18 (2012), no.7433, 25–42. [8] Gheorghe Craciun, Casian Pantea, and Fedor Nazarov, Persistence and permanence of mass-action and power-law dynamical systems, SIAM J. Appl. Math. 73(1) (2013), 305–329. [9] Pete Donnell and Murad Banaji, Local and global stability of equilibria for a class of chemical reaction networks, SIAM J. Appl. Dynamical Systems 12(2) 2012, 899–920. [10] Freeman Dyson, A model for the origin of life, Journal of Molecular Evolution. 18 (1982), 344–350. [11] Manfred Eigen and Peter Schuster, The hypercycle: a principle of natural selforganization. Part A: Emergence of the hypercycle. Naturwissenschaften. 64 (1977), 541– 565. [12] Martin Feinberg, Necessary and sufficient conditions for detailed balancing in massaction systems of arbitrary complexity, Chem. Eng. Sci. 44 (1989), no. 9, 1819 –1827. 26 [13] , Chemical reaction network structure and the stability of complex isothermal reactorsi.e. the deficiency zero and deficiency one theorems, Chem. Eng. Sci. 42 (1987), no. 10, 2229–2268. [14] , Lectures on chemical reaction networks, unpublished lecture notes, 1979, http: //www.che.eng.ohio-state.edu/~FEINBERG/LecturesOnReactionNetworks/. [15] , On chemical kinetics of a certain class, Arch. Rational Mech. Anal. 46 (1972). [16] Varun Giri and Sanjay Jain, The origin of large molecules in primordial autocatalytic reaction networks, PLoS ONE. 7(1), (2012), doi: 10.1371/journal.pone.0029546. [17] Gilles Gnacadja, Reachability, persistence, and constructive chemical reaction networks (part I): reachability approach to the persistence of chemical reaction networks, J Math Chem. 49 (2011), 2117–2136. [18] Manoj Gopalkrishnan, Catalysis in reaction networks, Bull Math Biol. 73 (2011), no.12 2962–2982. [19] Manoj Gopalkrishnan, Ezra Miller, Anne Shiu, A projection argument for differential inclusions, with application to mass-action kinetics, SIGMA. 9 (2013), 025, 25 pages. [20] , A geometric approach to the Global Attractor Conjecture, (2013), http:// arxiv.org/pdf/1305.5303v1.pdf. [21] Cato M. Guldberg and Peter Waage, Studies concerning affinity, Journal of chemical education. 63 (1986), 1044. [22] Jeremy Gunawardena, Chemical reaction network theory for in-silico biologists, (2003), http://vcp.med.harvard.edu/papers/crnt.pdf. [23] Wim Hordijk, Jotun Hein, Mike Steel, Autocatalytic sets and the origin of life, Entropy. 12(7) (2010), 1733–1742. [24] Wim Hordijk, Mike Steel, Detecting autocatalytic, self-sustaining sets in chemical reaction systems, Journal of Theoretical Biology. 227(4) (2004), 451–461. [25] , Predicting template-based catalysis rates in a simple catalytic reaction model, Journal of Theoretical Biology. 295 (2012), 132–138. [26] Wim Hordijk, Stuart Kauffman, Mike Steel, Required levels of catalysis for emergence of autocatalytic sets in models of chemical reaction systems, International Journal of Molecular Sciences. 12(5) (2011), 3085–3101. [27] Wim Hordijk, Mike Steel, Stuart Kauffman, The structure of autocatalytic sets: Evolvability, enablement, and emergence, Acta Biotheoretica. 60(4) (2012), 379–392. 27 [28] Friedrich J. M. Horn, The dynamics of open reaction systems, Mathematical aspects of chemical and biochemical problems and quantum chemistry (New York), Proc. SIAMAMS Sympos. Appl. Math.,vol. VIII, (1974). [29] Sanjay Jain and Sandeep Krishna, Autocatalytic Sets and the Growth of Complexity in an Evolutionary Model, Physical Review Letters. 81 (1998), 5684–5687. [30] , A model for the emergence of cooperation, interdependence, and structure in evolving networks, PNAS. 98 (2000), 543–547. [31] Kenneth J Kauffman, Purusharth Prakash, Jeremy S Edwards, Advances in flux balance analysis, Current Opinion in Biotechnology. 14(5) (2003), 491-496. [32] Stuart Kauffman, Cellular homeostasis, epigenesis and replication in randomly aggregated macromolecular systems, Journal of Cybernetics. 1 (1971), 71–96. [33] , At Home in the Universe: The Search for the Laws of Self-Organization and Complexity. Oxford University Press. (1995) ISBN 0-19-509599-5. [34] , Autocatalytic sets of proteins, Journal of theoretical Biology. 119 (1986), 1–24. [35] , The origins of order. Oxford University Press, (1993). [36] Alfred J. Lotka, Elements of Physical Biology, Williams and Wilkins (1925). [37] Elchanan Mossel, Mike Steel, Random biochemical networks: The probability of selfsustaining autocatalysis, Journal of Theoretical Biology. 233(3) (2005), 327–336. [38] Jeffrey D Orth, Ines Thiele, Bernhard O Palsson, What is flux balance analysis?, Nature Biotechnology. 28 (2010) 245–248. [39] Casian Pantea, On the persistence and global stability of mass-action systems, SIAM J. Math. Anal. 44 (2012), no.3, 1636–1673. [40] Carl Petri, Kommunikation mit Automaten, Ph. D. Thesis. University of Bonn, (1962). [41] Lulu Qian and Erik Winfree, A simple DNA gate motif for synthesizing large-scale circuits, J.R.Soc. Interface 8(62) (2011), 1281–1297. [42] Yuri Rabinovich, Alistair Sinclair and Avi Wigderson, Quadratic dynamical systems, Proc. of the 33rd Ann. IEEE Symp. on Foudations of Computer Science, (1992), 304–313. [43] Alexander Schrijver, Theory of Linear and Integer Programming. John Wiley and Sons, (1986). [44] Anne Shiu and Bernd Sturmfels, Siphons in chemical reaction networks, Bull. Math. Biol. 72 (2010), no.6, 1448–1463. 28 [45] Michael A. Savageau, Eberhard O. Voit, Douglas H. Irvine, Biochemical systems theory and metabolic control theory: 1. fundamental similarities and differences, Math.Biosci 86(2) (1987), 127–145. [46] David Soloveichik, Matt Cook, Erik Winfree, Shuki Bruck, Computation with Finite Stochastic Chemical Reaction Networks, Natural Computing. 7(4) (2008), 615–633. [47] Mike Steel, The emergence of a self-catalysing structure in abstract origin-of-life models, Applied Mathematics Letters. 3 (2000), 91–95. [48] Vito Volterra, Variazioni e fluttuazioni del numero d’individui in specie animali conviventi, Mem. Acad. Lincei Rom. 2, (1926), 31–113. [49] Peng Yin, Harry M.T. Choi, Colby R. Calvert, Niles A. Pierce, Programming biomolecular self-assembly pathways, Nature Letters. 451(7176) (2008), 318–322. [50] David Yu Zhang, Andrew J. Turberfield, Bernard Yurke, Erik Winfree, Engineering Entropy-Driven Reactions and Networks Catalyzed by DNA, Science 318 (2007), no. 5853 1121–1125. [51] Domitilla Del Vecchio, Alexander J Ninfa, Eduardo D Sontag, Modular cell biology: retroactivity and insulation, Molecular Systems Biology, 4(161) (2008). [52] Andrew Phillips, Luca Cardelli, A programming language for composable DNA circuits, Journal of the Royal Society Interface, 6, Suppl. 4, pp. S419–S436, (2009). [53] David Soloveichik, Georg Seelig, Erik Winfree, DNA as a universal substrate for chemical kinetics, Proceedings of the National Academy of Sciences, 107, no. 12, pp. 5393–5398, (2010). [54] Grzegorz Rozenberg, Advances in Petri Nets, Springer Berlin Heidelberg, (1990). 29
5cs.CE
arXiv:1305.0840v1 [math.AC] 3 May 2013 THE MONOMIAL CONJECTURE AND ORDER IDEALS S. P. Dutta Abstract. In this article first we prove that a special case of the order ideal conjecture, originating from the work of Evans and Griffith in equicharacteristic, implies the monomial conjecture due to M. Hochster. We derive a necessary and sufficient condition for the validity of this special case in terms certain syzygis of canonical modules of normal domains possessing free summands. We also prove some special cases of this observation. The main focus of this paper is to establish a relation between the monomial conjecture due to Hochster [Ho1] and the assertion on order ideals of minimal generators of syzygies of modules of finite projection dimension, introduced and proved by Evans and Griffith ([EG1], [E-G2]) for equicharacteristic local rings. The monomial conjecture asserts that given  t+1 a local ring R and a system of parameters x1 , . . . , xn of R, (x1 . . . xn )t 6∈ xt+1 . 1 , . . . , xn In [Ho1] Hochster proved this assertion for the equicharacteristic case and proposed it as a conjecture for local rings of all characteristics. He also showed ([Ho1]) that this conjecture is equivalent to the direct summand conjecture for module-finite extension of regular rings. From the equational point of view both these conjectures claim that the n P polynomial equation (X1 . . . Xn )t − Yi Xit+1 = 0 (Xi , Yj s are variables) cannot have a i=1 solution {x1 , . . . , xn , y1 , . . . , yn } in any noetherian ring, unless the height of (x1 , . . . , xn ) is less than n. In the early eighties in order to prove their syzygy theorem ([E-G1]), [E-G2]) Evans and Griffith proved an important aspect of order ideals of syzygies over equicharacteristic local rings. We would like to generalize and state their result as a conjecture on arbitrary local rings in the following way. AMS Subject Classification: Primary 13D02, 13D22; secondary 13C15, 13D25, 13H05 Key words and phrases: Regular local ring, order ideal, grade, syzygy, canonical module. Typeset by AMS-TEX 1 Order ideal conjecture. Let (R, m) be a local ring. Let M be a finitely generated module of finite projective dimension over R and let Syzi (M ) denote its ith syzygy for i > 0. If β is a minimal generator of Syzi (M ), then the order ideal OSyzi (M ) (β)(= {f (β)|f ∈ HomR (Syzi (M ), R)}) has grade ≥ i. For their proof of the syzygy theorem Evans and Griffith actually needed a particular case of this conjecture: M is locally free on the punctured spectrum and R is regular local. They reduced the proof of the above conjecture for this special case to the validity of the improved new intersection conjecture (also introduced by them) and proved its validity over equicharacteristic local rings by using big Cohen-Macaulay modules. In the mid-eighties Hochster ([Ho3]) proposed a new conjecture that is deeply homological in nature—the canonical element conjecture. In this conjecture Hochster assigns a canonical element ηR to every local ring R and asserts that ηR 6= 0. He proved this conjecture for the equicharacteristic case. In the same paper Hochster ([Ho2]) showed that the canonical element conjecture is equivalent to the monomial conjecture and it implies the improved new intersection conjecture due to Evans and Griffith. Later this author proved the reverse implication ([D1]). Thus, the monomial conjecture implies a special case of the order ideal conjecture: the case when M is locally free on the punctured spectrum of R. In this article we would prove that the validity of the order ideal conjecture over regular local rings (actually a special case of it) implies the monomial conjecture. First we would like to propose the following definition. Consider a finitely generated module M of finite projective dimension over a local ring R with a minimal free resolution (F• , β• ). Let Syzi (M ) denote the ith syzygy of M in F• . We say that for i ≥ 1, Syzi (M ) satisfies the property (0) or simply (0) if for every minimal generator α of Syzi (M ), the ideal I generated by the entries of α in Fi−1 has grade ≥ i. In our main theorem (Theorem 1.4) we prove the following: Theorem. The monomial conjecture is valid for all local rings if for every almost complete intersection ideal J of height d in any regular local ring (R, m), d < dimension of R, Syzd+1 (R/J) satisfies (0). The idea involved in the proof of this theorem evolved gradually through our work in ([D5], [D7], [D-G]). Actually our assertion is more specific than what is stated above. We 2 derive the following from the proof of the above theorem. Corollary (Notations as above). The monomial conjecture is valid for all local rings if for every almost complete intersection ideal J of height d in a regular local ring (R, m), N Kd+1 (J; R) k → TorR d+1 (R/J, k) is the 0-map where K• (J; R) is the Koszul complex corresponding to J in R and k = R/m. Next we prove a proposition (Prop. 1.5) that replaces the previous assertion involving J with the canonical module Ω of R/J. Let J = (x1 , . . . , xd , λ) and let x = (x1 , . . . , xd ) denote the ideal generated by an R-sequence. As a corollary we derive: R The monomial conjecture is valid if TorR d (k, R/x) → Tord (k, R/(x + Ω)) is the zero R map (equivalently TorR d (k, Ω) → Tord (k, R/x) is non zero). The following proposition (prop. 1.6) provides a characterization of the above statement in terms of syzygies of canonical modules. Proposition (Notations as above). If Kd+1 (J; R) N k → TorR d+1 (R/J, k) is the 0-map then Syzd (Ω) (minimal) has a free summand. Conversely, if I is an ideal of R of height d such that R/I satisfies the Serre-condition S2 and its canonical module Ω is such that R Syzd (Ω) has a free summand, then TorR d (Ω, k) → Tord (R/x, k) is non-zero, where x denotes the ideal generated by a maximal R-sequence in I. As a corollary to our next theorem we observe the following: Let (R, m) be a equicharacteristic regular local ring. Let I be an ideal in R of codimension d and let Ω denote the canonical module of R/I. Then Syzd (Ω) has a free summand. Remark. The above assertion is also valid in the graded equicharacteristic case via the same mode of proof. In this connection let us recall that for any finitely generated module M of grade g, no Syzi (M ) can have a free summand for i < g ([D2]). Our next theorem describes the special cases where we can at present prove that Syzd (Ω) possesses a free summand. Theorem. Let (R, m, k) be a regular local ring in mixed characteristic p > 0 and let I be an ideal of height d in R. Let x denote the ideal generated by a maximal R-sequence contained in I and Let Ω = HomR (R/I, R/x) denote the canonical module of R/I. Then 3 R d TorR d (Ω, k) → Tord (R/x, k) is non-zero (equivalently Syz (Ω) possesses a free summand) in the following cases: 1) Ω is S3 and 2) the mixed characteristic p is a non-zero-divisor on Extd+1 (R/I, R). In our last proposition (1.7) we derive a sufficient condition for Syzd (Ω) to possess a free summand. We prove that if Ω′ denotes the lift of Ω in R via R → R/x and if at least one of x1 , . . . , xd is contained in mΩ′ , then Syzd (Ω) has a free summand. Throughout this work “local” means noetherian local. Over the years different aspects of the monomial conjecture have been studied, special cases have been proved and new equivalent forms have been introduced (see [Bh], [Br-H], [D1], [D2], [D3], [D4], [D5], [D6], [D-G], [Go], [He], [K], [O], [R3], [V]). Statements of four equivalent forms of this set of conjectures, as proposed by Hochster in [Ho3] are given below for the convenience of the reader. A. Direct Summand Conjecture (DSC). Let R be a regular local ring, and let i : R ֒→ A be a module-finite extension of R. Then i splits as an R-module map. B. Canonical Element Conjecture (CEC). Let A be a local ring of dimension n with maximal ideal m and residue field k. Let Si denote the ith syzygy of k in a minimal resolution of k over A, and let θn : ExtnA (k, Sn ) → n Hm (Sn ) denote the direct limit map. Then θn (class of the identity map on Sn ) 6= 0. C. Improved New Intersection Conjecture (INIC). Let A be as before. Let F• be a complex of finitely generated free A-modules, F• : 0 → Fs → Fs−1 → · · · → F1 → F0 → 0, such that ℓ(Hi (F• )) < ∞ for i > 0 and H0 (F• ) has a minimal generator annihilated by a power of the maximal ideal m. Then dim A ≤ s. D. Let (A, m, k = A/m) be a local ring of dimension n which is a homomorphic image of a Gorenstein ring. Let Ω denote the canonical module of A. Then the direct limit map n ExtnA (k, Ω) → Hm (Ω) is non-null. Recall that for any equivalent version of this set of conjectures one can assume that the local ring A is a complete local (normal) domain. We have A = R/P̃ , where R is a 4 complete regular local ring. Let S = R/y, where y is the ideal generated by a maximal R-sequence contained in P̃ . Then A = S/P , P = P̃ /y. Let Ω denote the canonical module for A; Ω can be identified with HomS (A, S)—an ideal of S. Let E denote the injective hull of the residue field of S (resp. R) over S (resp. R). For any S-module (R-module) T , we write T ∨ to denote HomS (T, E) (HomR (T, E)) and dim T to denote the Krull dimension of T . These notations will be utilized throughout this article. Section 1 Our first proposition is an observation due to Strooker and Stückrad on a characterization of the monomial conjecture ([Str-Stü]). This author independently proved a similar characterization for the direct summand conjecture ([D5]). Since our main focus is on a proof of the monomial conjecture we provide a proof of this result here. 1.1 Proposition (Th. [Str-Stü]). With notations as above, A satisfies MC if and only if for any system of parameters x1 , . . . , xn of S, Ω is not contained in (x1 , . . . , xn ). Proof. Let ξ1 , . . . , ξn be a system of parameters of A. We can lift it to a system of parameters x1 , . . . , xn for S such that Im(xi ) = ξi , 1 ≤ i ≤ n. Conversely, any system of parameters for S is a system of parameters for A. Let us write x = (x1 , . . . , xn ) and ξ = (ξ1 , . . . , ξn ). The monomial conjecture for A is equivalent to the assertion that, for n every system of parameters ξ1 , . . . , ξn of A, the direct limit map α : A/ξ → Hm (A) is nonn (S) null [Ho1]. Because S is a complete intersection, the direct limit map β : S/x → Hm S is non-null (mS = maximal ideal of S). We have the following commutative diagram S/x  η y A/ξ β n Hm (S) S  γ y −−−−→ ց α n −−−−→ Hm (A) n where η is induced by the natural surjection η : S → A and γ = Hm (η). This implies that S n α is non-null ⇔ α ◦ η = γ ◦ β is non-null ⇔ Hm (A)∨ → (S/x)∨ is non-null ⇔ Im(Ω → S/x) n (A)∨ = Ω). is non-null ⇔ Ω 6⊂ x (recall that, by local duality, Hm In our next proposition we deduce the validity of the monomial conjecture for all local rings from the validity of the same for all local almost complete intersections. We prove the following: 5 1.2 Proposition. The monomial conjecture is valid for all local rings if and only if it holds for all local almost complete intersections. Proof. Suppose MC holds for all local almost complete intersections. Let A be a complete local domain. Then we have A = R/P̃ , where R is a complete regular local ring. We can choose y1 , . . . , yr —a maximal R sequence in P in such a way that P̃ RP̃ = (y1 , . . . , yr )RP̃ . Write S = R/y, where y = (y1 , . . . , yr ) and P = P̃ /y. Then S is a complete intersection, A = S/P , dim S = dim A, and P SP = 0. Let Ω = HomS (A, S), the canonical module of A. Consider the primary decomposition of (0) in S: 0 = P ∩ q2 ∩ · · · ∩ qh , where qi is Pi -primary and height Pi = height P = 0 for 2 ≤ i ≤ h. It can be checked easily S that Ω = q2 ∩ · · · ∩ qh . Choose λ ∈ P − i≥2 Pi . Then Ω = Hom(S/λS, S), and S/λS is an almost complete intersection. Since S/λS satisfies MC by assumption, it follows from the above proposition that Ω is not contained in the ideal generated by any system of parameters in S. Hence, by Prop. 1.1, A satisfies MC. Now we reduce the assertion in the monomial conjecture to a length inequality between Tor0 and Tor1 on regular local rings. 1.3 Proposition. The monomial conjecture is valid for all local rings if and only if for every regular local ring R and for every pair of ideals (I, J) of R such that i) I is a complete intersection, ii) J is an almost complete intersection (i.e., J is minimally generated by (height J + 1) elements), iii) height I + height J = dim R and iv) (I + J) is primary to the maximal ideal of R, the following length inequality holds:  ℓ (R/(I + J)) > ℓ TorR 1 (R/I, R/J) . Proof. First assume that every pair of (I, J), as in the statement of our theorem, satisfies the length inequality: ℓ(R/(I + J)) > ℓ(TorR 1 (R/I, R/J)). By Prop. 1.2, we can assume that A is an almost complete intersection ring of the form S/λS, where S is a complete intersection and dim S = dim A. Let Ω = Hom(S/λS, S) denote the canonical module for A. We consider the short exact sequence f 0 → S/Ω − → S → S/λS → 0, 6 (1) where f (1) = λ. Let x′′1 , . . . , x′′n be a system of parameters for A. We can lift x′′1 , . . . , x′′n to x′1 , . . . , x′n in S in such a way that {x′1 , . . . , x′n } form a system of parameters in S. Let x′′ = (x′′1 , . . . , x′′n ) and x′ = (x′1 , . . . , x′n ). Tensoring (1) with S/x′ yields the following exact sequence f 0 → TorS1 (S/x′ , S/λS) → S/(Ω + x′ ) − → S/x′ → S/(x′ + λS) → 0, (2) where f is induced by f . Then we have the following Ω 6⊂ x′ ⇔ ℓ(S/(x′ + λS)) > ℓ(Tor1 (S/x′ , S/λS)). (3) As in the proof of the previous proposition, let R be a complete regular local ring mapping onto S. Now lift x′1 , . . . , x′n to an R-sequence x1 , . . . , xn in R. Write I = x and J = (y, λ). Then (3) translates to ℓ(R/(I + J)) > ℓ(Tor1 (R/I, R/J)), as required in our statement. For the converse part of the theorem, write I = (x1 , . . . , xn ) and J = (y1 , . . . , yr , λ), where x1 , . . . , xn and y1 , . . . , yr form R-sequences such that n + r = dim R. Let S = R/(y1 , . . . , yr ) and A = S/λS, and let x′i = Im(xi ) in S for 1 ≤ i ≤ n. Write x′ = (x′1 , . . . , x′n ) and x = (x1 , . . . , xn ). Since I + J is primary to the maximal ideal and since both R/x and S are complete intersections, it follows from [Se] that TorR i (R/x, S) = 0 for S ′ i > 0. This implies that TorR i (R/I, R/J) = Tori (S/x , A) for i ≥ 0. Let Ω = HomS (A, S), the canonical module for A. Now (1)–(3) and the subsequent arguments complete the proof. 1.4. Our main theorem is the following. Theorem. The monomial conjecture is valid for all local rings if for every almost complete intersection ideal J of height d in any regular local ring R, d < dim R, Syzd+1 (R/J) satisfies (0). Proof. By Prop.1.3 it is enough to prove the following. Theorem. Let (R, m) be a regular local ring and let I, J be two ideals of R such that i) R/I is Gorenstein and J is an almost complete intersection, ii) I + J is m-primary 7 and iii) height I + height J = dim R. Let n = height I and d = height J. Suppose that d < dim R and Syzd+1 (R/J) satisfies (0). Then  ℓ (R/(I + J)) > ℓ TorR 1 (R/I, R/J) . Proof. Let J = (y1 , . . . , yd , λ) where {y1 , . . . , yd } form an R-sequence. Let (K• , γ• ) = K• (y1 , . . . , yd , λ; R) denote the Koszul complex corresponding to y1 , . . . , yd , λ and let H = H1 (y1 , . . . , yd , λ; R). Let L• be a minimal free resolution of H and let ψ• : L• → K• (1) be a lift of H ֒→ coker γ2 = G. We have the following commutative diagram L• : K• (1) : −→ Rrd+1 −→ Rrd −→   yψd 0 −→ R γd+1 Rrd−1 −→ · · · −→ Rr0 −→ H −→ 0 ∩      ψ ψ y y 0 y d−1 γ2 −−−→ Rd+1 −→ · · · −→ Rd+1 −→ G −→ 0 The mapping cone of ψ• is a free resolution of J and thereby provides a free resolution of R/J from which a minimal resolution (F• , β• ) of R/J can be extracted. Claim. Im ψd = R. Proof of the Claim. If not, then Im ψd ⊂ m. Then the copy of R = Kd+1 would be a free summand of Fd+1 . Let α be the image of (1, 0) in Syzd+1 (R/J) ⊂ Fd . Since βd+1 (1, 0)   y1  y2   .   is a part or whole of   .. , the height of the ideal generated by the entries of α must   yd λ be less than (d + 1). This contradicts our hypotheses that Syzd+1 (R/J) satisfies (0) and hence Im ψd = R. This means that if η• : K• → F• lifts the identity map on R/J, then ηd+1 (R) ⊂ m Fd+1 . Recall that the spectral sequences {ExtpR (R/J, ExtqR (R/I, R))} and {ExtiR (TorR j (R/J, R/I), R)} converge to the same limit when p + q = i + j. Since R/I is Gorenstein, we have ExtiR (R/I, R) = 0 for i 6= n and ExtnR (R/I, R) ≃ R/I. Since ℓ(R/(I + J)) < ∞ and R is regular local of dimension (n + d), each of the above spectral sequence degenerates. Hence  R Tor (R/J, R/I), R ≃ Extd+1 Extn+d 1 R (R/J, R/I). R 8 (1) By (1) and local duality we have ℓ TorR 1 (R/I,   d+1 R/J) = ℓ ExtR (R/J, R/I) .  (2) We also note that since n + d = dim R and ℓ (R/(I + J)) < ∞, ExtiR (H, R/I) = 0 for i < d. The mapping cone of ψ• leads to the following exact sequence: 0 → K• → (a free resolution of R/J from the mapping cone of ψ• ) → L• (−2) → 0. d−1 (H, R/I) = 0 applying HomR (−, R/I) to this sequence we obtain the followSince ExtR ing short exact sequence d+1 (y1 , . . . , yd , λ; R/I) = R/(I + J). 0 → Extd+1 R (R/J, R/I) → H This inclusion cannot be an isomorphism since ηd+1 (R) ⊂ m Fd+1 .  Thus, from (2), ℓ (R/(I + J)) > ℓ TorR 1 (R/I, R/J) and the proof of our theorem is complete. We have the following corollary from the above proof. Corollary. The monomial conjecture is valid if for every almost complete intersection N ideal J of height d in a regular local ring (R, m, k = R/m), Kd+1 (J; R) k → Tord+1 (R/J, k) is the 0-map where K• (J; R) is the Koszul complex corresponding to J in R. The proof of this corollary follows from our observation after the diagram and the claim in the proof of the above theorem. 1.5. In our next proposition we study the assertion in the above corollary. Proposition. Let (R, m) be a local ring of dim n. Let {x1 , . . . , xd } ⊂ m be a regular sequence on R and let λ be a 0-divisor and not a parameter on R/x, x = the ideal generated by x1 , . . . , xd . Let Ω = Hom(R/(x, λ), R/x). Let K• (x, λ; R) = K• (x1 , . . . , xd , λ; R) and K• (x; R) denote the Koszul complexes corresponding to x1 , . . . , xd , λ and x1 , . . . , xd respectively. Let (L• , c• ) be a minimal free resolution of Ω. Let ψ• : L• → K• (x, λ; γ• )(+1) and φ• : L• → K• (x; δ• ) be lifts of Ω ≃ H1 (x, λ; R) ֒→ G = Coker γ2 and Ω ֒→ R/x respectively. Then Im ψd = R if and only if Im φd = R. 9 Proof. We have the following commutative diagrams: L• : Rrd+1 −→ Rrd −→ Rrd−1 −→ · · · −→ Rr0       y yψd−1 y ψd −→ K• (x, λ; R)(+1) : 0 −→ R −→ H1 = Ω −→ 0 ∩  y −→ Rd+1 −→ · · · −→ Rd+1 −→ G (1) −→ 0 and L• : −→ Rrd+1 −→ Rrd −→ Rrd−1 −→ · · · −→ Rr0 −→ Ω    ∩     yφd yφd−1 y y 0 −→ R α d −→ Rd −→ · · · −→ R −→ 0 (2) −→ R/x −→ 0 Suppose that Im ψd = R. Let η• : K• (x, λ; R)(+1) → K• (x; R) denote the natural surjection. Since ηd = IdR , ηd · ψd : Rrd → R is surjective. Since η• · ψ• : L• → K• (x; R) lifts Ω ֒→ R/x, η• ψ• is homotopic to φ• . Hence φd (Rrd ) = R. Conversely let Im φd = R. Let multiplication by λ : K• (x; R) → K• (x; R) lift the multiplication by λ on R/x. Since λΩ = 0 in R/x, λ· φ• is homotopic to the 0-map: L• → K• (x; R). Let h• = (hi )0≤i≤d−1 d denote corresponding homotopies; h : Rri → R(i+1) . Since K (x, λ; R) is the mapping i • cone of λ : K• (x; R) → K• (x; R), we can define ψ•′ : L• → K• (x; λ; R), lifting Ω = H1 ֒→ G, in the following way: ψ•′ (Rri ) = (φi , hi ). Then ψd′ (Rrd ) = R. Since ψ•′ , ψ• both lift the inclusion Ω ֒→ G, they are homotopic and hence ψd (Rrd ) = R. Corollary (with notations as above). Let J = (x1 , . . . , xd , λ) be an almost complete intersection ideal in a regular local ring (R, m, k) and let Ω denote the canonical module of N R R/J. Then Kd+1 (J; R) k → TorR d+1 (R/J, k) is the 0-map if and only if Tord (R/x, k) → R R TorR d (R/(x + Ω), k) is the 0-map or equivalently Tord (Ω, k) → Tord (R/x, k) is non-zero. 1.6. The following proposition is partially a consequence of the above proposition. Proposition (Notations as in the previous corollary). If Kd+1 (J; R) N k → TorR d+1 (R/J, k) is the 0-map then Syzd (Ω) (minimal) has a free summand. Conversely, if I is an ideal of R of height d such that R/I is S2 and its canonical module Ω is such that Syzd (Ω) has R a free summand, then TorR d (Ω, k) → Tord (R/x, k) is non-zero, where x denotes the ideal generated by a maximal R-sequence in I. 10 Proof. Let us assume that Kd+1 (J; R) N k → TorR d+1 (R/J, k) is the 0-map. This implies, by diagram (1) in the proof of the above proposition, that ψd (Ld ) = R. Then we can write L Ld = R F where F = ker ψd . Hence, from the commutativity of the diagram (1) in proposition (1.5), it follows that cd+1 (Ld+1 ) ⊂ F and this implies that Syzd (Ω) has a free summand. Conversely let (L• , c• ) denote a minimal free resolution of Ω. If Syzd (Ω) has a free summand then Ld has a free generator e such that c∗d+1 (e∗ ) = 0 (−∗ = HomR (−, R)). Let L∗• denote the complex 0 → L∗0 → L∗1 → ... → L∗d → G → 0. Since grade Ω > d, L∗• is exact. Then im e∗ ∈ Extd (Ω, R) is non-zero and is a minimal generator of G. Let x1 , . . . , xd be a maximal R sequence contained in I and let x denote the ideal generated by ∼ Hom(Ω, Ω) ∼ them. Since R/I is S2 , we have Extd (Ω, R) = = R/I. Let Gd+i = Coker c∗ d+i for i > 1. We consider the following short exact sequences : 0 → R/I → G → Im c∗d+1 → 0, 0 → Im c∗d+1 → L∗d+1 → Gd+1 → 0, 0 → Extd+1 (Ω, R) → Gd+1 → Im c∗d+2 → 0, . . . , 0 → Im c∗n−2 → L∗n−2 → Extn−2 (Ω, R) → 0. Since Ω is S2 , it follows from the above sequences that grade Exti (Ω, R) > i + 2 for i > d and hence it can be easily checked that Ω = Extd (G, R) ∼ = Extd (R/I, R). Let R α denote the composite of R/x → R/I ∼ = ExtdR (Ω, R) R ֒→ G, where im1 ∈ R/x goes to im e∗ ∈ Extd (Ω, R). Let φ∗• : K• (x; R) → L∗• denote a lift of α. Then φ• : L• → K • (x; R) lifts the injection Ω = Extd (G, R) ֒→ R/x, where φd (Ld ) = R. Thus, we obtain our required assertion. In our next theorem we prove that for any ideal in a regular local ring the first part of the above proposition is implied by the validity of the order ideal conjecture. Theorem. Let us assume that the order ideal conjecture is valid for a regular local ring (R, m, k). Let I be any ideal of R of codimension d and let Ω denote the canonical module of R/I. Then Syzd (Ω) has a free summand. Proof. Let (F• , φ• ) :→ Fd → Fd−1 → · · · → F1 → R → 0 denote a minimal free resolution φ∗ 1 of R/I over R. Let F•∗ denote the complex: 0 → R −−→ F1∗ → · · · → Fd∗ → Gd → 0 11 where Gd+i = Coker φ∗d+i , for 0 ≤ i ≤ 1. Since height of I = d, we have Hi (F•∗ ) = 0 for i < d and Ω = Extd (R/I, R) ֒→ Gd . Let L• be a minimal free resolution of Ω and let ψ• : L• → F•∗ lift Ω ֒→ Gd . Then ψd (Ld ) = R; for otherwise in the minimal free resolution P• of Gd+1 obtained from the mapping cone of ψ• , Pd+1 would contain a copy of R = L∗0 as a summand. Let I = (y1 , . . . , ys ) where s = ℓ(TorR 1 (k, R/I)). Since height of I = d and φ∗1 (1) = (y1 , . . . , ys ), this would contradict the order ideal conjecture. Hence ψd (Ld ) = R. This implies, by a previous observation, that Syzd (Ω) has a free summand. Corollary. Let (R, m) be a equicharacteristic regular local ring and let I be an ideal of R of codimension d. Let Ω denote the canonical module of R/I. Then Syzd (Ω) has a free summand. Remark. The above assertion is also valid in the graded equicharacteristic case via the same mode of proof. Our next theorem describe the cases where we are at present able to prove that Syzd (Ω) possesses a free summand. Theorem. Let (R, m, k) be a regular local ring in mixed characteristic p > 0 and let I be an ideal of height d in R. Let x denote the ideal generated by a maximal R-sequence contained in I and Let Ω = HomR (R/I, R/x) denote the canonical module of R/I. Then R d TorR d (Ω, k) → Tord (R/x, k) is non-zero (equivalently Syz (Ω) possesses a free summand) in the following cases: 1) Ω is S3 and 2) the mixed characteristic p is a non-zero-divisor on Extd+1 (R/I, R). Proof. Let (F• , φ• ) :→ Fd → Fd−1 → · · · → F1 → R → 0 denote a minimal free resolution φ∗ 1 ∗ F1∗ → · · · → Fd∗ → Fd+1 → of R/I over R. Let F•∗ denote the complex: 0 → R −−→ ∗ → 0. Let Gd+i = Coker φ∗d+i , for 0 ≤ i ≤ 2. We have following short exact sequences Fd+2 for 0 ≤ i ≤ 2: 0 → Extd+i (R/I, R) → Gd+i → Im φ∗d+i+1 → 0. Let F•′ denote the complex F•∗ truncated at the dth spot i.e. H0 (F•′ ) = Gd . Since height of I = d, F•′ is a minimal free resolution of Gd . Let L• be a minimal free resolution of Ω and let ψ• : L• → F•′ denote a lift of the inclusion Ω = Extd (R/I, R) ֒→ Gd . 12 Claim. Suppose that either Ω is S3 or p is a non-zero-divisor on Extd+1 R (R/I, R). Then ψd (Ld ) = R. Proof of the Claim. If ψd (Ld ) 6= R, then in the minimal free resolution P• of Gd+1 extracted from the mapping cone of ψ• , Pd+1 would contain the copy of R = F0′ as a free summand. Let I = (y1 , . . . , yr1 ) where r1 = TorR 1 (R/I, k). Since height of I = d and φ∗1 (1) = (y1 , . . . , yr1 ), this would imply that Syzd+1 (Gd+1 ) does not satisfy (0). Let S = R/x; then Ω = ExtdR (R/I, R) = HomS (R/I, S). If Ω is S3 , then Ext1S (R/I, S) = 0, ∗ i.e. Extd+1 (R/I, R) = 0 and Hence Gd+1 ≃ Im φ∗d+2 ֒→ Fd+2 . Thus p is a non-zero-divisor on Gd+1 . Let R = R/pR and Gd+1 = Gd+1 /pGd+1 . Since Gd+1 has finite projective dimension over R and R is equicharacteristic local ring, Syzd+1 (Gd+1 ) must satisfy (0) by the order ideal theorem. This leads to a contradiction and hence ψd (Ld ) = R. If p is a non-zero-divisor on Extd+1 (R/I, R), then p is a non-zero-divisor on Gd+1 . Hence, arguing in a similar way as above, it follows that ψd (Ld ) = R also in this case. Let θ• : K• (x; R) → F• denote a lift of R/x → R/I. Dualizing θ• and combining the diagram corresponding to θ•∗ with the same corresponding to ψ• we get our required result. 1.7. Finally we point out a sufficient condition for the assertion in the above theorem to be valid in a more general set-up. Proposition. Let (R, m) be a local ring of dimension n and let x1 , . . . , xd ∈ m form an R-sequence. Let λ be a zero-divisor and not a parameter on R/x, x = the ideal generated by x1 , . . . , xd and let Ω = Hom(R/(x, λ), R/x). Let Ω′ be a lift of Ω in R via the surjection R → R/x. Let K• = K• (x; R; β• ) and (L• , γ• ) denote the Koszul complex corresponding to x1 , . . . , xd and a minimal free resolution of Ω respectively. Let φ• : L• → K• denote a lift of Ω ֒→ R/x. If at least one of x1 , . . . , xd is contained in mΩ′ , then φd (Ld ) = R. Proof. Let R = R/x1 R, L• = L• ⊗ R and K • = K• (x; R) ⊗ R. Then H1 (L• ) = Ω, Hi (L• ) = 0 for i > 1 and H1 (K • ) = R/x = R/x and Hi (K • ) = 0 for i > 1. We have a canonical surjection η• (= (ηi ), i ≥ 1) : K • (+1) → K• (x2 , . . . , xd ; R) such that η1 induces the identity map on H1 (K • ) to R/x = H0 (K• (x2 , . . . , xd ; R)). Let F• denote a minimal free resolution of Ω over R and let θ• (= (θi )i≥0 ) : F• → L• (+1) lift the natural inclusion Ω = H1 (L• ) ֒→ Coker γ 2 . Then η• φ• θ• : F• → K• (x2 , . . . , xd ; R) lifts the natural inclusion 13 Ω ֒→ R/x over R. If ηd φd θd−1 (Fd−1 ) = R, then it follows that φd (Ld ) = R. Hence by induction on d it is enough to consider d = 1 and x = xd is contained in mΩ′ . Let µ1 , . . . , µh denote a minimal set of generators of Ω′ over R. Since x ∈ mΩ′ , there h P exists a1 , . . . , ah ∈ m such that x = a i µi . i=1 Consider the commutative diagram 0 0 −→ Syz1 (Ω) −→   yφ1 −→ R x Rh −→ Ω  ∩   yφ0 y −→ R where φ0 (ei ) = µi , 1 ≤ i ≤ h. Since x = P −→ 0 −→ R/xR −→ 0 ai µi , the element α = (a1 , . . . , ah ) ∈ Syz1 (Ω) is such that φ0 (α) = x. Hence φ1 (Syz1 (Ω)) = R and our proof is complete. 14 References [A-Br] [Bh] [Br-H] M. Auslander and M. Bridger, Stable Module Theory, Mem. Amer. Math. Soc. 94 (1969). B. Bhatt, Almost direct summands, Preprint on ArXiv:1109, 0356(2011).. W. Bruns and J. Herzog, Cohen-Macaulay Rings, Cambridge Stud. Adv. Math. 39, Cambridge Univ. Press, Cambridge, 1993. [D1] S. P. Dutta, On the canonical element conjecture, Trans. Amer. Math. Soc. 299 (1987), 803–811. [D2] S. P. Dutta, Syzygies and homological conjectures, Commutative Algebra, MSRI Publications. 15 (1989), 139–156. [D3] , Dualizing complex and the canonical element conjecture, J. London Math. Soc. 50 (1994), no. 2, 477–487. , Dualizing complex and the canonical element conjecture, II, J. London Math. Soc. 2 [D4] (1997), no. 56, 46–63. , A note on the monomial conjecture, Trans. Amer. Math. Soc. 350 (1998), 2871–2878. [D5] [D6] , Splitting of local cohomology of syzygies of the residue field, J. Algebra 244 (2001), 168–185. [D7] , A connection between two sets of conjectures, The Mathematics Student, Special Centenary Volume of the Indian Mathematical Society (2007), 79–88. [D-G] S. P. Dutta & P. Griffith, Intersection multiplicities, the canonical element conjecture and the syzygy problem, Michigan Math J. 57 (2008), 227–247. [E-G1] E. G. Evans and P. Griffith, The syzygy problem, Ann. of Math. 114 (1981), no. 2, 323–333. , Order ideals, in M. Hochster, J. D. Sally, and C. Huneke (eds.), Commutative Algebra, [E-G2] Math. Sci. Res. Inst. Publ. 15, Springer (1989), 213–225. [E-G3] , A Graded Syzygy Theorem in mixed characteristic, Math. Research Letters 8 (2001), 605–611. [Go] S. Goto, On the associated graded rings of parameter ideals in Buchsbaum rings, J. Algebra 85 (1983), 490–534. [He] R. Heitmann, The direct summand conjecture in dimension three, Ann. of Math. 156 (2002), no. 2, 695–712. [Ho1] M. Hochster, Contracted ideals from integral extensions of regular rings, Nagoya Math. J. 51 (1973), 25–43. [Ho2] , Topics in the homological theory of modules over commutative rings, CBMS Reg. Conf. Ser. Math. 24, Amer. Math. Soc., Providence, RI, 1975. [Ho3] , Canonical elements in local cohomology modules and the direct summand conjecture, J. Algebra 84 (1983), 503–553. [K] Jee Koh, Degree p extensions of an unmixed regular local ring of mixed characteristic p, J. Algebra 99 (1986), 310–323. [O] T. Ohi, Direct summand conjecture and descent of flatness, Proc. Amer. Math. Soc. 124 (1996), no. 7, 1967–1968. [P-S1] C. Peskine and L. Szpiro, Dimension projective finie et cohomologie locale, Inst. Hautes Études Sci. Publ. Math. 42 (1973), 49–119. [Ro1] P. Roberts, Two applications of dualizing complexes over local rings, Ann. Sci. Ec. Norm. Sup. 4e Sés t.9 (1976), 103–106. [Ro2] , Le Théorème d’ intersection, C. R. Acad. Sci. Paris, Sér I Math. 304 (1987), 177–180. [Str-Stü] J. R. Strooker and J. Stückrad, Monomial conjecture and complete intersections, Manuscripta Math. 79 (1993), 153–159. [V] J. Valez, Splitting results in module-finite extension rings and Koh’s Conjecture, J. Algebra 172 (1995), 454–469. Department of Mathematics University of Illinois 15 1409 West Green Street Urbana, IL 61801 U.S.A. e-mail: [email protected] 16
0math.AC
arXiv:1710.10753v2 [cs.MA] 21 Nov 2017 Computational Social Choice and Computational Complexity: BFFs?∗ Lane A. Hemaspaandra Department of Computer Science University of Rochester Rochester, NY 14627, USA October 30, 2017; revised November 21, 2017 Abstract We discuss the connection between computational social choice (comsoc) and computational complexity. We stress the work so far on, and urge continued focus on, two less-recognized aspects of this connection. Firstly, this is very much a two-way street: Everyone knows complexity classification is used in comsoc, but we also highlight benefits to complexity that have arisen from its use in comsoc. Secondly, more subtle, less-known complexity tools often can be very productively used in comsoc. 1 Introduction Even in a work context, friendship is amazingly powerful. We all know how valuable it is to have collaborators who have each other’s backs: working closely toward a shared project goal yet each bringing their own skills and perspective to the project, to seek to reach insights and advances that neither researcher could have achieved alone. Research areas can be like that too. Computational social choice (henceforward, comsoc)—which brings a computational-cost lens to such social-choice issues as preference aggregation/elections/manipulation/fair division—certainly has roots tracing far back; but comsoc’s existence as a recognized, distinctive research area within AI/multiagent-systems is quite recent. Despite that, its growth as an area during these recent years has been explosive, and we suggest that a synergy between comsoc and complexity has been partially responsible for that growth. At the 2017 AAMAS conference [LWDD17], for example, there were four sessions devoted to Computational Social Choice; no other topic had that many sessions. Those four sessions included 21 papers, and of those 21, 7 had the word “complexity” in their titles although in the entire conference only two other papers had the word complexity in their titles. In contrast, at the 2003 AAMAS conference [RWSY03], the string ∗ A version of this paper will appear in AAAI-2018 [Hem18]. 1 “social choice” does not even appear in the ACM Digital Library online table of contents; neither does the string “election” or any form of the word “vote,” and only three papers in the entire conference have the word “complexity” in their titles. One thing that those numbers are reflecting is the fact that comsoc and complexity have worked together very well. Comsoc research, from the seminal work of Bartholdi, Orlin, Tovey, and Trick [BTT89b, BTT89a, BO91, BTT92] onward, has done an enviably skilled job of interestingly employing complexity classification—which admittedly has strengths and weaknesses, both in its theory and in its application—to reveal a subtle and varied landscape as to what is difficult and what is hard, and how small changes in problems and models can induce seismic changes in complexity. Yet this article’s primary goal is not to praise that praiseworthy achievement. It is to recognize two more subtle things that have already happened, but that we think need to be recognized for what they are, and what more can be done. Firstly, the comsoc/computational complexity friendship is truly a two-way street. Although everyone knows that complexity classification is widely used in comsoc research, we will stress a direction that is not well-recognized within the AI community or the complexity community: Research in comsoc has often been of great benefit to complexity theory. In particular, complexity classification within comsoc has populated key complexity classes with problems that are undeniably natural and compelling. Why is that important? Complexity theorists like creating complexity classes that capture computational capabilities/resources that seem natural and compelling to the complexity theorists. But if those classes then turn out, for example, to have no natural complete problems, it is like hosting a party and having no one show up. It could even make one wonder whether the classes really were important at all. So complexity owes quite a debt to comsoc, for bringing parties to life. In addition to stressing the two-way street aspect of the comsoc/computational complexity friendship, we will also point out how rather subtle, lesser-known complexity notions and machinery have in the comsoc world found fertile ground to actually do important things. Complexity notions ranging from search-versus-decision issues to one-to-one reductions to the join operator have arguably been used in the comsoc world in more natural and more satisfying ways than they have been used within complexity theory itself. We present four different issues where the work in comsoc exemplifies one or both of these themes: comsoc work helping complexity, and lesser-known complexity notions and machinery being used to address comsoc issues. We will particularly stress examples that fall in the area of the complexity of elections/voting, probably the most intense current focus of comsoc and a remarkably challenging, interesting, nuanced area (for a general survey of comsoc see the excellent articles by Chevaleyre et al. [CELM07] and Brandt, Conitzer, and Endriss [BCE13], and for surveys of elections/voting within comsoc see the surveys by Faliszewski et al. [FHHR09], Faliszewski, Hemaspaandra, and Hemaspaandra [FHH10], and Faliszewski and Procaccia [FP10]; and for additional accessible surveys, see the relevant chapters in the important recent textbook edited by Rothe [Rot16]). This article gives just a few examples of these themes, but we try to discuss each of those with some context and care, and in two places our examples will connect complexity with other important AI areas, 2 planning and SAT solvers, once with the comsoc/complexity connection growing from the other AI area and once with it creating an opportunity within the other AI area. Then in the conclusion we will suggest that the two themes we have been stressing and the work to date on them make clear that comsoc experts and complexity experts working more closely and extendedly together will be to the benefit of both fields. 2 Make It a Party: Populating Lonely Complexity Classes As mentioned above, complexity classes are typically defined to capture a certain mode/power/model of computing. For example, the important probabilistic complexity class BPP [Gil77], bounded probabilistic polynomial time, is the class of those sets A for which there is a probabilistic polynomial-time Turing machine that on each input agrees with A with probability at least 75% (or 51%, or 99%; all three of those turn out to define the same class). The class NP is the class of those sets accepted by nondeterministic polynomial-time Turing machines. The class UP [Val76], unambiguous polynomial time, is the class of those sets A accepted by nondeterministic polynomial-time Turing machines whose acceptance is always unambiguous; for inputs not in A the machine has no accepting computation paths, and for each input in A, the machine has exactly one accepting computation path (in the lingo, “has a unique succinct certificate”). This section will present a few examples of classes that were not wildly filled with natural sets that seem to capture their nature, yet comsoc provided new, or even the first, such examples. By “capture the nature” of a class, in the dream case we would mean “is complete for the class,” i.e., our set is in the class and has the property that each set in the class many-one reduces to our set. But if that can’t be achieved, finding a set that falls into a given class and does not seem to fall into any smaller class is the natural fallback step to take. Even readers not very familiar with complexity theory may know that there are thousands of known NP-complete problems and indeed a whole book is devoted to such problems [GJ79]; and that there is an entire book devoted even to problems complete for P, with respect to the natural completeness type there [GHR95]; and that even for the levels NP of the polynomial hierarchy beyond NP and coNP, such as NPNP , coNPNP , NPNP , and NP coNPNP , there exists a detailed compendium [SU02]. And from that it would be easy to conclude that it is boring and easy to find natural problems complete for virtually any natural complexity class. But that seems not to be so. For example, NP ∩ coNP (the class of sets that have succinct, easily-checkable proofs both of membership and nonmembership) and two of the classes mentioned above, BPP and UP, are not known to have even one complete set—not a natural one, and not even an unnatural one [Sip82, HH88]. In fact, the just-cited papers and the work of Regan [Reg89] in effect are showing that the existence of a complete set for one of these classes would have sweeping consequences for our understanding of the class: that the issue of whether each of these classes has a complete set is in fact a disguised version of the question of whether there exists a nice enumeration of machines that precisely covers 3 the class, i.e., that provides what Regan calls a “constructive programming system.” But things are worse still. It is now know that not only do these classes seem to lack complete sets, but in fact, it is plausible that—indeed there are black boxes (aka oracles) relative to which—even far larger classes than the given class do not contain even a single set that is many-one hard, or indeed even Turing hard, for the class [HJV93]. So it is not at all a sure thing that important classes—and BPP is undeniably important, since some would even argue that BPP rather than P should be the working definition of feasibility—have complete sets at all, much less natural complete sets. And yet some classes that had remained largely or wholly unpopulated by natural sets needing the class’s power have had natural examples provided by problems from comsoc, and other less empty but far from crowded classes have also turned out to be what pinpoints the complexity of important comsoc problems. 2.1 Θp2 : Parallel Access to NP Probably the most striking such example is the Θp2 level of the polynomial hierarchy. This class was introduced by Papadimitriou and Zachos [PZ83], and is the class of sets that can be accepted by polynomial-time machines allowed to make O(log n) sequential queries to an NP oracle; NP ∪ coNP ⊆ Θp2 ⊆ PNP . Perhaps more naturally, Θp2 is known to be the class of sets that can be accepted by polynomial-time machines allowed to make (an unlimited number of) nonadaptive (i.e., parallel) queries to an NP oracle [Hem89]. For example, consider the language, ParitySAT, that accepts its input exactly if the input is a list of Boolean formulas and the number of them that is satisfiable is itself an odd number. ParitySAT is clearly in Θp2 , since the polynomial-time machine can in parallel ask its oracle about the membership in SAT of each of its input formulas, and then can see whether the number that are satisfiable is odd. We will come back in a moment to the unnaturalness of this example and the search for natural examples. Θp2 is a very important class in complexity theory. Briefly put, it has a large number of equivalent characterizations that are quite natural, e.g., it is the class of sets that can be accepted by logspace machines allowed to make an unlimited number of adaptive queries to an NP oracle [Wag90]; it is the class the polynomial hierarchy naturally is shown to collapse to if there are sparse (i.e., having at most a polynomial number of strings at each length) NP-Turing-complete sets [Kad89]; and its relationship to PNP is known to completely characterize whether conversations with NP oracles can manufacture time-bounded randomness [HW91]. This at first sounds like quite a party, if one focuses on the results Θp2 is central to. But wait. Even when all these results were known, the class was not known to have even one natural complete set. It was known to have a large number of rather unnatural complete sets all having to do with counting the parity of items, e.g., the ParitySAT example given above about telling whether out of a collection of Boolean formulas an odd number of them are satisfiable is known to be complete for Θp2 [Wag87]. So in fact, as to known natural complete sets, the party was at that time a (complexitytheoretically important but) empty room. However, comsoc put first one and then many 4 people into that room. In particular, Charles Lutwidge Dodgson (aka Lewis Carroll) in the year 1876 had defined a fascinating election system [Dod76]. He was motivated by the idea that it would be nice for an election system to ensure that (a) if (relative to the votes, which are assumed to each be a tie-free total ordering of the candidates) there is a candidate— what is known as a Condorcet winner [Con85]—who is preferred in head-on-head contests against each other candidate, then that candidate is chosen the winner, and (b) otherwise, each candidate who is “closest” to being such a winner (in the sense that the number of adjacent exchanges in preference orders needed to make it become a Condorcet winner is the lowest among the candidates) is named a winner. And Dodgson’s system then does just that: It counts distance from being a Condorcet winner, and the candidate(s) with the lowest distance wins. In doing that, Dodgson was in the 1800s already using the notation that in modern computer science is central and known as an edit distance. Although Dodgson’s system is mathematically very well defined, one of the seminal papers of comsoc showed that the computational complexity of implementing his system is not low. In particular, Bartholdi, Tovey, and Trick [BTT89b] showed that it is NP-hard to tell if a given candidate wins such an election. They left open whether the problem is NP-complete, but eight years later the problem was proven to be complete for Θp2 [HHR97a]. Θp2 -complete problems cannot be NP-complete unless the polynomial hierarchy collapses to NP ∩ coNP, and thus the winner problem for Dodgson elections is highly unlikely to be NP-complete. But the most important thing to note here is that the complexity of winner-testing for Dodgson elections is not a problem that was rigged to provide a Θp2 -complete set. The election system was defined in the 1800s for its own interest and importance, long before NP was ever dreamed of, much less Θp2 . This problem—from comsoc—thus provides an extremely natural Θp2 -complete set. This result sparked interest in whether other problems in comsoc and beyond might also be Θp2 -complete. And the floodgates opened. Other important election systems such as those of Kemeny and Young were proven to also be Θp2 -complete [HSV05, RSV03]. General tools were extracted from this approach to try to make it easier to prove such results [SV00], Θp2 -completeness was shown to capture the complexity of how well certain greedy algorithms do [HR98], and a survey was written looking at the meaning of improving from NP-hardness results to Θp2 -completeness results [HHR97b]. Even in the quite different field of automata theory, Θp2 -complete problems were found to capture important, natural notions [HM00]. Briefly put, the party was very much on! 2.2 NPPP and Other Classes There are many other classes that comsoc and other work within AI have helped populate. One of the most striking examples is the class NPPP , i.e., the sets solvable by nondeterministic polynomial-time Turing machines given access to (their choice of a) set from PP (probabilistic polynomial time, the class of sets for which there is a probabilistic polynomial-time Turing machine that on each input is correct with probability greater than 50%). NPPP is a class of great complexity, and it is not always easy to work with. In terms 5 of descriptive generality and its “location,” Toda’s [Tod91] Theorem says that PPP contains not just the polynomial hierarchy (PH) but even PPPH . So NPPP contains both of those PH and even NPPP , while being itself contained in PSPACE. It was only in the late 1990s that people started finding natural complete sets for NPPP , and that work came not from complexity issues but from an AI domain, the study of planning and decision processes. There are a number of papers on this and we won’t here cite them all, but we mention as a pointer the very impressive work of Goldsmith, Littman, and Mundhenk [LGM98], which shows versions of both the plan-existence problem and the plan-evaluation problem are, for partially ordered plans, NPPP -complete, and of Mundhenk et al. [MGLA00] on Markov decision processes, which also yields natural NPPP -complete problems. Comsoc also has helped populate that party. Although currently its NPPP results are upper bounds—and we commend to the reader the open issue of either proving completeness or of lowering the upper bound—the beautiful work of Mattei, Goldsmith, Klapper, and Mundhenk [MGKM15] shows that NPPP plays an important role in the study of bribery and manipulation in tournaments of uncertain information, by showing that many such problems are in NPPP .1 There are many other parties, some admittedly not so previously poorly attended as those thrown by Θp2 and NPPP , where comsoc has provided attendees. Here are just a few examples. Nguyen et al. [NNRR14] gave the class DP (all sets that are the symmetric difference of two NP sets) a wide range of new complete sets having to do with social welfare optimization in multiagent resource allocation. The first PNP[1] -completeness result in social choice (which also is perhaps the first natural completeness result anywhere for PNP[1] ) and the first PNP -completeness result in social choice both come from a study of the complexity of weighted coalitional manipulation of elections, under the voting system, Veto, where each voter vetos one candidate and whoever has the fewest vetos wins; in an online setting (what in political science is called a roll-call vote), the winner problem here is PNP[1] -complete for 3 candidates and is PNP -complete for 4 or more candidates [HHR14]. Filos-Ratsikas and Goldberg [FG17] have recently proven a natural cake-cutting-related problem to be complete for the lonely class PPA. And a huge number of papers in comsoc contribute 1 After doing that, that paper comments that “we have actually shown these problems are in NPPP[1] ,” which is the class in which the NP machine is allowed at most one query per path to the PP oracle. Simply so that comment in the paper doesn’t lead any reader of the present paper to think that NPPP -completeness for that paper’s problems is unlikely due to that paper having achieved the seemingly better upper bound of NPPP[1] , we claim that in fact NPPP[1] = NPPP . Let us prove that claim. NPPP[1] = NPPP holds via altering the NP machine of NPPP to instead guess the answer to each PP query (without asking the query) and then via a single truth-table (parallel) query round to PP checking that all its guesses were correct, and if a given path would have accepted if its guesses of the answers were correct and that path finds via its truth-table-round access to PP that it guessed correctly, then that path accepts. That as just stated is illegally overly using the PP oracle. But since PP is closed under truth-table reductions [FR96], the truth-table round can be replaced with a single query, and thus we indeed have establishing the claimed class equality. Indeed, since the truth-table yields True for only one known-at-truth-table-query-time setting of answers, even Beigel, Reingold, and Spielman [BRS95, p. 195] would suffice to allow a single query per path. 6 natural problems—often related to manipulative attacks on elections—to other classes such as NPNP , coNPNP , and PSPACE. Also, many counting-based issues in comsoc have been shown to be complete for the counting analogue of NP, the class #P. In summary, there is a two-way street of friendship between comsoc and computational complexity. Complexity benefits since its classes—some of which played central roles in key abstract results yet had few or no natural complete problems—are given quite compelling natural problems based in comsoc. Comsoc in turn has benefited since the machinery of complexity-class classification helps clarify how hard or easy many of its problems are. 3 Complexity Machinery and Notions Find Fertile Ground in Comsoc This section provides a tour of two cases where complexity techniques and notions have found very fertile ground in comsoc research. Although one-to-one (Section 3.2) reductions have been used centrally in complexity theory, in particular in the 1970s, their new use in comsoc is both powerful and quite different than the use they had in complexity. And in another case (Section 3.1), comsoc has given new life to lovely complexity machinery that had been developed in 1976, and yet that even 36 years later had not found a single application in a real-world domain. We will cover each topic but briefly, though we will try to give a sense of how each supports this section’s thesis that comsoc has been a fertile ground for complexity techniques and notions, helping comsoc of course, but also in the case of little-used or narrowly used complexity techniques helping establish the value or breadth of the techniques. 3.1 Search versus Decision for NP Problems Everyone knows that SAT is a decision problem, and indeed that the vast majority of complexity classes are defined in terms of decision problems, not search problems. This has been the case for so long that it is easy to forget why this is so. The reason why complexity is largely focused on decision problems is because for almost all natural problems the search problem clearly polynomial-time Turing reduces (and often, for example for SAT, even “polynomial-time 2-disjunctive truth-table” reduces) to the problem’s decision version. And so the two problems are inherently of the same complexity, give or take composition with a polynomial; it is impossible in these cases for decision to be easy yet for search to be hard. SAT is the classic case: Given a Boolean formula, F (v1 , v2 , . . .), it is satisfiable exactly if at least one of F (True, v2 , . . .) and F (False, v2 , . . .) is satisfiable, so given a decision procedure for SAT, one can ask those two questions to it, and thus find a good value for the first variable (if any exists), and then can redo the process, on the “reduced” formula, to similarly set the second variable and so on. By the end, using as a black-box a decision procedure for SAT, one has found a satisfying assignment in polynomial time, when one exists. 7 Are all natural NP problems so polite as to allow themselves to be fitted into this straitjacket of linked complexities? For decades there have been hints that the answer might be “no.” Most powerfully, in 1976 Borodin and Demers [BD76] built lovely, clever machinery that showed that if P 6= NP∩coNP, then there exists an infinite polynomial-time recognizable subset of SAT that has no polynomial-time search algorithm finding solutions for its members. In brief, one could quickly determine with certainty that its members were satisfiable, but one has no idea—it turns out not even a good setting for the first variable of the formula—of what a satisfying assignment would be. (The reason this claim is not precluded by the above discussion of self-reducibility is that the Borodin–Demers subset is so pathological that it has infinitely many members such that the formulas generated at some stage of the above self-reduction process are all not in the subset, and so the above process is rendered invalid on the subset.) Stunning though that result was, the fact that it was achieving its power not on all of SAT (which is impossible), but rather on a somewhat pathological subset of SAT, kept the result and its lovely machinery from gaining traction; it remained only as the above 1976 technical report, and did not have a conference or a journal version. The work was likely—and in the first and second of these four examples the work is explicitly discussed— the inspiration behind some later related work, e.g., that for unambiguous computation the implication mentioned above becomes an “if and only if” characterization [HH88], that under the extremely strong assumption that deterministic and nondeterministic double exponential time differ there exists an (artificial) language in NP for which search does not reduce to decision [BG94], that if P 6= NP then there exist NP-complete languages that are not self-reducible [FO10], and that relative to some oracle there is a search versus decision separation for exponential-time classes [IT89]. Nonetheless, the work found not a single application on natural problems for 36 years. And it was comsoc that finally provided that application. In particular, Hemaspaandra, Hemaspaandra, and Menton [HHM13] proved that of the standard types of attacks on elections, for about half it holds that if P 6= NP ∩ coNP then there is an election system having a polynomial-time winner problem for which the decision problem for that type of attack is in P but the search problem cannot be solved in polynomial time. (For the other half of the attack types, that paper proved unconditionally that search does reduce to decision.) Note that the attack types were not created by that paper; they are the long-standard attack types. And so the problems themselves are not tricks, but are the natural, standard ones, and on these, search and decision are being separated under the given complexity-theoretic assumption, which is widely believed to be true. There are four comments which pretty compellingly need to be made at this point. First, if P = NP ∩ coNP, then integer factoring can be done in polynomial time, and so RSA and much of the foundation of modern computer security falls. So the above results say that either the foundations of cryptography are deeply flawed, or the approach taken within comsoc to defining election-attack problems—namely, they are defined in their decision versions—is defining as tractable some problems whose search version (the issue of finding the attack that works) is not tractable. Second, the reason this separation of search 8 and decision is possible is that, quite unexpectedly, about half of the natural election-attack problems do not seem to be nicely self-reducible. Third, natural is in the eye of the beholder; although the election-attack problems used in the result are the standard, natural ones, the election systems used are indirectly specified by the hypothesized sets in (NP ∩ coNP) − P, and so are likely not very natural. And fourth and finally, this entire approach then found application in a different area of AI, namely, the study of backbones and backdoors of Boolean formulas, where it was shown for example that if P 6= NP ∩ coNP, then search versus decision separations occur for backbones [HN17a, HN17b]. 3.2 Density-of-Hardness Transfer and One-to-One Reductions When one says a problem is NP-complete, that doesn’t prove that it is hard. It just proves that if anything in NP is hard, then that problem is hard. This is generally viewed as much better than having nothing to say about the difficulty of the problem. Wouldn’t it be lovely to have an analogous type of result for frequency of hardness? For example, in Section 3.1, we discussed work showing that if P 6= NP ∩ coNP, then search and decision separate for many key issues regarding manipulative attacks on elections and backbones of Boolean formulas. But maybe in those examples, for which we know decision is easy, the hardness of search may be a con: Perhaps search is only hard on a very, very, very small portion of the inputs, asymptotically? That is, perhaps it is a worst-case separation that doesn’t hold in the typical case. To try to argue against that possibility, it would be wonderful if we could argue that if even one problem A in NP ∩ coNP is hard with a certain frequency h (i.e., each polynomialtime heuristic is wrong on A’s membership problem on Ω(h(n)) strings up to length n) then every polynomial-time heuristic for our search problem fails with almost that same frequency, namely, for each polynomial-time heuristic there is an ǫ > 0 such that on our given search problem it fails on Ω(h(nǫ )) of the strings up to length n). This would say that if any set in P 6= NP ∩ coNP is frequently hard (relative to heuristic attacks), then our search versus decision separations are not cons. After all, it is widely believed, most crucially in the cryptography community (due in part to the issue of factoring), that there are sets in NP ∩ coNP that are frequently hard with respect to polynomial-time heuristics. And if one believes that, then the hypothetical machinery discussed above would immediately convert that into a claim of the frequent hardness of the created search problems whose decision problems are easy. In fact, machinery that can do this exists, although it was developed for a completely different purpose in the 1970s. So this is an example where comsoc—and the study of SAT solvers—is giving a fresh use to a complexity-theoretic notion. In particular, every CS undergraduate learns why claims of NP-completeness are crucially tied to the tool of many-one polynomial-time reductions; it is how we establish them. In the 1970s, though, there was a sudden moment of focus in theoretical computer science on the notion of one-to-one (aka injective) polynomial-time reductions, i.e., polynomial-time reductions that have no collisions. 9 This moment of intense focus on one-to-one reductions came about to support one of the great complexity goals of the 1970s: to prove that all NP-complete sets were the same set in a transparent disguise, namely, that all NP-complete sets were polynomial-time isomorphic. This is known as the Isomorphism Conjecture (aka the Berman–Hartmanis Isomorphism Conjecture). To this day it remains open. However, using one-to-one reductions, in the 1970s Berman and Hartmanis [BH77] proved that all familiar NP-complete sets indeed were polynomial-time isomorphic, which was a huge revelation. (Their insight in using one-to-one reductions was motivated by the fact that in recursive function theory, recursive one-to-one reductions are central to the proof that all RE-complete sets are recursively isomorphic, a result that follows from the so-called Myhill [Myh55] Isomorphism Theorem.) However, due to challenges such as the potential existence of one-way functions, that 1970s result has not only never been expanded to (under the inherently required assumption that P 6= NP) include all NP-complete sets, but indeed there is evidence that there may well exist nonisomorphic NP-complete sets [JY85, KMR95], i.e., that the Isomorphism Conjecture may fail. These days in complexity theory, many-one reductions remain the standard, and oneto-one reductions are not often discussed. However, one thing that one-to-one reductions do fiendishly well is preserve density. If one has a bunch of strings with a certain behavior, their image when pushed through the reduction cannot possibly jumble them on top of each other, because one-to-one reductions don’t jumble anything on top of anything else. It is admittedly true that such reductions can leave “holes” (though injective, they need not be surjective), and can polynomially stretch (and superpolynomially contract, though inherently not too frequently) lengths; and that in fact is what is behind the “ǫ” mentioned above. But one-to-one reductions by definition never have collisions. Exploiting that, the “if anything in NP ∩ coNP is frequently hard relative to polynomialtime heuristics then our search problems are almost as frequently hard relative to polynomial-time heuristics as those” results mentioned above are achieved by ensuring that the entire proof structure in those papers can be made to yield polynomial-time one-to-one reductions. (And the additional related paper mentioned earlier, which adds in results on the case of backdoors of Boolean formulas, and has some related results about backbones of Boolean formulas, in both cases under the weaker assumption P 6= NP, also works by achieving polynomial-time one-to-one reductions.) Thus, to summarize, one-to-one reductions are a tool that was briefly extremely important in complexity in the 1970s in a brilliant but even forty years later not yet successful attempt to show that there is in effect just one NP-complete set. But comsoc—and also, related to SAT solvers, the study of backbones and backdoors of Boolean formulas—has brought the notion of one-to-one reductions again front-and-center, providing an “if anything in the class is frequently hard then this is frequently hard” analogue of the “if anything in the class is hard then this is hard” argument that many-reductions have provided for almost half a century in the case of NP-complete sets. This case makes very clear the two-way street that exists between complexity and comsoc (and also the study of SAT solvers). Complexity benefits in that one of its notions that 10 was a bit covered in cobwebs turned out to yield important frequency-of-hardness results in comsoc, and also relatedly in the study of SAT solvers. And comsoc benefits in that it now has these results, which are quite powerful evidence that the hardness of search that these speak of is in fact not some con job that happens only extremely infrequently. 4 Conclusions We have discussed just a few of the rich collection of interactions between comsoc and computational complexity. Many others—from how the complexity-theoretic join operation allows proofs in comsoc of the impossibility of proving certain impossibility theorems [HHR09] to how work on online control gives an unexpected new quantifier-alternation characterization of the class coNP [HHR17] to the rich interactions with approximation (see as just one of many examples [FST17]) to the power of dichotomy results to the insights given by parameterized complexity (both these last are on view simultaneously, for example, in [DMN17]) to much more—are not even touched on here. What are the take-aways? The benefits of the friendship between comsoc and computational complexity are a two-way street; both comsoc and complexity have benefited. Classes from complexity have been populated, cobweb-covered techniques have been given surprising new life, and interesting results have been obtained in comsoc from the use of those classes and techniques. In light of this, we urge researchers in comsoc and complexity to reach out and work with each other more and more, for the benefit of both fields. And we hope that more Ph.D. programs will encourage and create young researchers who are trained in and simultaneously expert in both areas; that will allow advances far beyond even those that so far have come from this wonderful synergy between areas. Let us hope that the areas become best friends forever. Acknowledgments Warm thanks to the anonymous AAAI-18 reviewers, Aris Filos-Ratsikas, and Paul Goldberg for helpful comments. References [BCE13] F. Brandt, V. Conitzer, and U. Endriss. Computational social choice. In G. Weiss, editor, Multiagent Systems, pages 213–284. MIT Press, 2nd edition, 2013. [BD76] A. Borodin and A. Demers. Some comments on functional self-reducibility and the NP hierarchy. Technical Report TR 76-284, Dept. of Computer Science, Cornell University, July 1976. [BG94] M. Bellare and S. Goldwasser. The complexity of decision versus search. SIAM Journal on Computing, 23(1):97–119, 1994. 11 [BH77] L. Berman and J. Hartmanis. On isomorphisms and density of NP and other complete sets. SIAM Journal on Computing, 6(2):305–322, 1977. [BO91] J. Bartholdi, III and J. Orlin. Single transferable vote resists strategic voting. Social Choice and Welfare, 8(4):341–354, 1991. [BRS95] R. Beigel, N. Reingold, and D. Spielman. PP is closed under intersection. Journal of Computer and System Sciences, 50(2):191–202, 1995. [BTT89a] J. Bartholdi, III, C. Tovey, and M. Trick. The computational difficulty of manipulating an election. Social Choice and Welfare, 6(3):227–241, 1989. [BTT89b] J. Bartholdi, III, C. Tovey, and M. Trick. Voting schemes for which it can be difficult to tell who won the election. Social Choice and Welfare, 6(2):157–165, 1989. [BTT92] J. Bartholdi, III, C. Tovey, and M. Trick. How hard is it to control an election? Mathematical and Computer Modeling, 16(8/9):27–40, 1992. [CELM07] Y. Chevaleyre, U. Endriss, J. Lang, and N. Maudet. A short introduction to computational social choice. In Proceedings of the 33rd International Conference on Current Trends in Theory and Practice of Computer Science, pages 51–69. Springer-Verlag Lecture Notes in Computer Science #4362, January 2007. [Con85] J.-A.-N. de Caritat, Marquis de Condorcet. Essai sur l’Application de L’Analyse à la Probabilité des Décisions Rendues à la Pluralité des Voix. 1785. Facsimile reprint of original published in Paris, 1972, by the Imprimerie Royale. [DMN17] P. Dey, N. Misra, and Y. Narahari. Parameterized dichotomy of choosing committees based on approval votes in the presence of outliers. In Proceedings of the 16th International Conference on Autonomous Agents and Multiagent Systems, pages 42–50, May 2017. [Dod76] C. Dodgson. A method of taking votes on more than two issues. Pamphlet printed by the Clarendon Press, Oxford, and headed “not yet published”, 1876. [FG17] A. Filos-Ratsikas and P. Goldberg. Consensus Halving is PPA-complete. Technical Report arXiv:1711.04503 [cs.CC], Computing Research Repository, arXiv.org/corr/, November 2017. [FHH10] P. Faliszewski, E. Hemaspaandra, and L. Hemaspaandra. Using complexity to protect elections. Communications of the ACM, 53(11):74–82, 2010. [FHHR09] P. Faliszewski, E. Hemaspaandra, L. Hemaspaandra, and J. Rothe. A richer understanding of the complexity of election systems. In S. Ravi and S. Shukla, editors, Fundamental Problems in Computing, pages 375–406. Springer, 2009. 12 [FO10] P. Faliszewski and M. Ogihara. On the autoreducibility of functions. Theory of Computing Systems, 46(2):222–245, 2010. [FP10] P. Faliszewski and A. Procaccia. AI’s war on manipulation: Are we winning? AI Magazine, 31(4):53–64, 2010. [FR96] L. Fortnow and N. Reingold. PP is closed under truth-table reductions. Information and Computation, 124(1):1–6, 1996. [FST17] P. Faliszewski, P. Skowron, and N. Talmon. Bribery as a measure of candidate success: Complexity results for approval-based multiwinner rules. In Proceedings of the 16th International Conference on Autonomous Agents and Multiagent Systems, pages 6–14, May 2017. [GHR95] R. Greenlaw, H. Hoover, and W. Ruzzo. Limits to Parallel Computation: PCompleteness Theory. Oxford University Press, 1995. [Gil77] J. Gill. Computational complexity of probabilistic Turing machines. SIAM Journal on Computing, 6(4):675–695, 1977. [GJ79] M. Garey and D. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979. [Hem89] L. Hemachandra. The strong exponential hierarchy collapses. Journal of Computer and System Sciences, 39(3):299–322, 1989. [Hem18] L. Hemaspaandra. Computational social choice and computational complexity: BFFs? In Proceedings of the 32nd AAAI Conference on Artificial Intelligence. AAAI Press, February 2018. To appear. [HH88] J. Hartmanis and L. Hemachandra. Complexity classes without machines: On complete languages for UP. Theoretical Computer Science, 58(1–3):129–142, 1988. [HHM13] E. Hemaspaandra, L. Hemaspaandra, and C. Menton. Search versus decision for election manipulation problems. In Proceedings of the 30th Annual Symposium on Theoretical Aspects of Computer Science, pages 377–388, 2013. [HHR97a] E. Hemaspaandra, L. Hemaspaandra, and J. Rothe. Exact analysis of Dodgson elections: Lewis Carroll’s 1876 voting system is complete for parallel access to NP. Journal of the ACM, 44(6):806–825, 1997. [HHR97b] E. Hemaspaandra, L. Hemaspaandra, and J. Rothe. Raising NP lower bounds to parallel NP lower bounds. SIGACT News, 28(2):2–13, 1997. [HHR09] E. Hemaspaandra, L. Hemaspaandra, and J. Rothe. Hybrid elections broaden complexity-theoretic resistance to control. Mathematical Logic Quarterly, 55(4):397–424, 2009. 13 [HHR14] E. Hemaspaandra, L. Hemaspaandra, and J. Rothe. The complexity of online manipulation of sequential elections. Journal of Computer and System Sciences, 80(4):697–710, 2014. [HHR17] E. Hemaspaandra, L. Hemaspaandra, and J. Rothe. Online voter control in sequential elections. Autonomous Agents and Multi-Agent Systems, 31(5):1055– 1076, May 2017. [HJV93] L. Hemaspaandra, S. Jain, and N. Vereshchagin. Banishing robust Turing completeness. International Journal of Foundations of Computer Science, 4(3):245– 265, 1993. [HM00] M. Holzer and P. McKenzie. Alternating and empty alternating auxiliary stack automata. In Proceedings of the 25th International Symposium on Mathematical Foundations of Computer Science, pages 415–425. Springer-Verlag Lecture Notes in Computer Science #1893, August/September 2000. [HN17a] L. Hemaspaandra and D. Narváez. The opacity of backbones. In Proceedings of the 31st AAAI Conference on Artificial Intelligence, pages 3900–3906. AAAI Press, February 2017. [HN17b] L. Hemaspaandra and D. Narváez. The opacity of backbones and backdoors under a weak assumption. Technical Report arXiv:1706.04582 [cs.AI], Computing Research Repository, arXiv.org/corr/, June 2017. [HR98] E. Hemaspaandra and J. Rothe. Recognizing when greed can approximate maximum independent sets is complete for parallel access to NP. Information Processing Letters, 65(3):151–156, 1998. [HSV05] E. Hemaspaandra, H. Spakowski, and J. Vogel. The complexity of Kemeny elections. Theoretical Computer Science, 349(3):382–391, 2005. [HW91] L. Hemachandra and G. Wechsung. Kolmogorov characterizations of complexity classes. Theoretical Computer Science, 83:313–322, 1991. [IT89] R. Impagliazzo and G. Tardos. Decision versus search problems in superpolynomial time. In Proceedings of the 30th IEEE Symposium on Foundations of Computer Science, pages 222–227. IEEE Computer Society Press, October/November 1989. [JY85] D. Joseph and P. Young. Some remarks on witness functions for non-polynomial and non-complete sets in NP. Theoretical Computer Science, 39(2–3):225–237, 1985. [Kad89] J. Kadin. PNP[log n] and sparse Turing-complete sets for NP. Journal of Computer and System Sciences, 39(3):282–298, 1989. 14 [KMR95] S. Kurtz, S. Mahaney, and J. Royer. The Isomorphism Conjecture fails relative to a random oracle. Journal of the ACM, 42(2):401–420, 1995. [LGM98] M. Littman, J. Goldsmith, and M. Mundhenk. The computational complexity of probabilistic planning. Journal of Artificial Intelligence Research, 9:1–36, 1998. [LWDD17] K. Larson, M. Winikoff, S. Das, and E. Durfee, editors. Proceedings of the 16th International Conference on Autonomous Agents and Multiagent Systems, AAMAS 2017, São Paulo, Brazil, May 8–12, 2017. International Foundation for Autonomous Agents and Multiagent Systems, 2017. [MGKM15] N. Mattei, J. Goldsmith, A. Klapper, and M. Mundhenk. On the complexity of bribery and manipulation in tournaments with uncertain information. Journal of Applied Logic, 13(4, Part 2):557–581, 2015. [MGLA00] M. Mundhenk, J. Goldsmith, C. Lusena, and E. Allender. Complexity of finitehorizon Markov decision process problems. Journal of the ACM, 47(4):681–720, July 2000. [Myh55] J. Myhill. Creative sets. Zeitschrift für Mathematische Logik und Grundlagen der Mathematik, 1:97–108, 1955. [NNRR14] N. Nguyen, T. Nguyen, M. Roos, and J. Rothe. Computational complexity and approximability of social welfare optimization in multiagent resource allocation. Autonomous Agents and Multi-Agent Systems, 28(2):256–289, 2014. [PZ83] C. Papadimitriou and S. Zachos. Two remarks on the power of counting. In Proceedings of the 6th GI Conference on Theoretical Computer Science, pages 269–276. Springer-Verlag Lecture Notes in Computer Science #145, January 1983. [Reg89] K. Regan. Provable complexity properties and constructive reasoning. Manuscript, April 1989. [Rot16] J. Rothe, editor. Economics and Computation: An Introduction to Algorithmic Game Theory, Computational Social Choice, and Fair Division. Springer, 2016. [RSV03] J. Rothe, H. Spakowski, and J. Vogel. Exact complexity of the winner problem for Young elections. Theory of Computing Systems, 36(4):375–386, 2003. [RWSY03] J. Rosenschein, M. Wooldridge, T. Sandholm, and M. Yokoo, editors. Proceedings of the 2nd International Joint Conference on Autonomous Agents and Multiagent Systems, AAMAS 2003, Melbourne, Australia, June 14–18, 2003. International Foundation for Autonomous Agents and Multiagent Systems, 2003. 15 [Sip82] M. Sipser. On relativization and the existence of complete sets. In Proceedings of the 9th International Colloquium on Automata, Languages, and Programming, pages 523–531. Springer-Verlag Lecture Notes in Computer Science #140, July 1982. [SU02] M. Schaefer and C. Umans. Completeness in the polynomial-time hierarchy: Part I: A compendium. SIGACT News, 33(3):32–49, 2002. Updated version available online at ovid.cs.depaul.edu/documents/phcom.pdf. [SV00] H. Spakowski and J. Vogel. Θp2 -completeness: A classical approach for new results. In Proceedings of the 20th Conference on Foundations of Software Technology and Theoretical Computer Science, pages 348–360. Springer-Verlag Lecture Notes in Computer Science #1974, December 2000. [Tod91] S. Toda. PP is as hard as the polynomial-time hierarchy. SIAM Journal on Computing, 20(5):865–877, 1991. [Val76] L. Valiant. The relative complexity of checking and evaluating. Information Processing Letters, 5(1):20–23, 1976. [Wag87] K. Wagner. More complicated questions about maxima and minima, and some closures of NP. Theoretical Computer Science, 51(1–2):53–80, 1987. [Wag90] K. Wagner. Bounded query classes. SIAM Journal on Computing, 19(5):833– 846, 1990. 16
2cs.AI
arXiv:1404.0672v1 [cs.CE] 2 Apr 2014 Thermodynamic Hypothesis as Social Choice: An Impossibility Theorem for Protein Folding Hammurabi Mendes, Sorin Istrail {hmendes,sorin}@cs.brown.edu Brown University Abstract Protein Folding is concerned with the reasons and mechanism behind a protein’s tertiary structure. The thermodynamic hypothesis of Anfinsen postulates an universal energy function (UEF) characterizing the tertiary structure, defined consistently across proteins, in terms of their aminoacid sequence. We consider the approach of examining multiple protein structure descriptors in the PDB (Protein Data Bank), and infer individual preferences, biases favoring particular classes of aminoacid interactions in each of them, later aggregating these individual preferences into a global preference. This 2-step process would ideally expose intrinsic biases on classes of aminoacid interactions in the UEF itself. The intuition is that any intrinsic biases in the UEF are expressed within each protein in a specific manner consistent with its specific aminoacid sequence, size, and fold (consistently with Anfinsen’s thermodynamic hypothesis), making a 1-step, holistic aggregation less desirable. Our intention is to illustrate how some impossibility results from voting theory would apply in this setting, being possibly applicable to other protein folding problems as well. We consider concepts and results from voting theory and unveil methodological difficulties for the approach mentioned above. With our observations, we intend to highlight how key theoretical barriers, already exposed by economists, can be relevant for the development of new methods, new algorithms, for problems related to protein folding. 1 1 Introduction The systematic aggregation of individual preferences into a global social preference is the principal concern of social choice theory. Its origins trace back to the 13th-century, when the philosopher Ramon Lull considered a voting method that counted pairwise preferences among candidates. This technique was later recovered by the famous 18th-century mathematicians Borda and Condorcet. Later, in 1951, Kenneth Arrow stated his famous impossibility theorem ([3], for the version of 1963), which is viewed as a landmark of social choice theory. This important result defines apparently innocuous properties that certain preference aggregation functions (called social welfare functions) should respect, but also demonstrates that such properties are conflicting. Many other impossibility results followed. The conclusions usually result from an axiomatic setting, where aggregation functions are modeled after axioms defining their intended behavior. Also common is the relative unconcern for the elements subject to preferences. Many aggregation settings, in addition, do not consider voters as players, but merely as providers of information – and we are interested on those settings only. Note that the observations above suggest a potential application of the impossibility results to other circumstances that involve aggregation. In this work, we model a problem related to protein folding as an aggregation function prone to those impossibility results, exploring the connection between these ideas. The protein folding problem is basically interested on how and why proteins settle in particular three-dimensional structures. The well-accepted thermodynamic hypothesis of Anfinsen [2] states that the protein structure, informally speaking, is a unique, stable, and viable state depending solely on aminoacid sequence. The state minimizes an energy function accounting for physiochemical utilities. Such universal energy function (UEF) is defined consistently across proteins, in terms of the particular aminoacid interactions that define each of them. The protein folding literature often takes a holistic approach to analyzing the PDB [1] in order to obtain certain conclusions from stable folds. We define a problem related to protein folding where a 2-step aggregation process will seem more intuitive: suppose we intend to infer hypothesized intrinsic preferences on the UEF, which would favor certain classes of aminoacid interactions over others. The idea is to first aggregate multiple individual preferences, and later consolidate them into a single global preference. In other words, we consider and explore the following scenario: • Say that the UEF has an intrinsic global preference among interaction classes. For instance, the UEF might generally favor (A, V ), the interaction of the aminoacids alanine and valine, over (G, L), the interaction of aminoacids glycine and leucine. • This global preference is manifested distinctly across proteins, in light of the thermodynamic hypothesis. In other words, a protein’s stable fold implies an individual preference among interaction classes, which results from its corresponding aminoacid sequence and the global preference intrinsic to the UEF. We consider the possibility of inferring or estimating the postulated global preference among interaction classes, intrinsic to the UEF, by aggregating individual preferences, extracted separately from multiple stable folds in the PDB. We assess and qualify aminoacid interactions inside each protein in order to generate the individual preferences. Importantly, we assume that aminoacid interactions are totally defined by pairwise interactions (see Sec. 2.2). The existence and expression of a pairwise interaction depends on the aminoacids involved (their physiochemical affinities) and their spacial arrangement (their distance and contact). 2 We particularly think that such 2-step aggregation process is particularly sensible in light of Anfinsen’s thermodynamic hypothesis. The idea is that individual proteins may express universal biases differently, according to their particular aminoacid sequence, size, and fold (note here the thermodynamic hypothesis). If we holistically analyze the PDB, performing instead a 1-step aggregation process, we effectively aggregate over aminoacid interactions from multiple proteins. By assumption, those aminoacid interactions may express biases differently. This argument might as well be applicable to other problems related to protein folding where the thermodynamic hypothesis is considered. The problem formalized before is formally weaker than those aiming for more complete characterizations of the UEF with our 2-step aggregation process and the same axiomatic setting. Here, while we do not intend to completely characterize the UEF, we do intend to identify intrinsic biases among interaction classes in the UEF. Unfortunately, this weaker problem will still manifest an impossibility in light of some seemingly reasonable assumptions (discussed in Sec. 2 and Sec. 4). Stronger characterizations of the UEF via the method above will suffer from similar methodological limitations unless axioms are relaxed, made more specific, or otherwise changed appropriately. Our intention and contribution is to highlight theoretical impossibility results for the problem considered above, under reasonable assumptions (see Sec. 4). We use concepts and results from voting theory, a distinct investigation field of social choice theory, in Economics. The goal is to sparkle interest in the profound results from voting theory, and highlight a connection of this area with methods that, so far, have been mainly a concern of biologists, chemists, physicists, and computer scientists. We note that the remarks made here result from a suitable axiomatic framework, from the application of voting theory concepts, and from direct reduction to previous results in this area. We intend to suggest how some key theoretical barriers, already exposed by economists, can be relevant for the development of new methods, new algorithms, for problems related to protein folding, particularly those in which the thermodynamic hypothesis is considered. 2 The Analytic Framework In this section, we present the axioms and definitions that form our analytic framework. We adhere to the thermodynamic principle of [2], and further assume that aminoacid interactions in the universal energy function are totally defined by pairwise interactions. We try to abstract concepts of purely biological nature as much as possible. Again, the purpose is to bring impossibility results from voting theory to our 2-step preference model and suggest that they might be relevant to other problems related to protein folding. 2.1 Thermodynamic Hypothesis There are two principal questions in the Protein Folding research [9]. The first one concerns the reasons why proteins settle in a specific tertiary structure. The second asks how to correctly predict the tertiary structure given the protein’s aminoacid configuration. The thermodynamic hypothesis [2] says that the tertiary structure results solely from aminoacid interactions, maximizing a function of utility character and physiochemical nature. Also, the final structure is (1) unique, as other possible states have strictly lower energy; (2) stable, as small external changes do not disrupt the structure; and (3) viable, smoothly accessible by physiochemical changes. 3 Axiom 2.1. The thermodynamic hypothesis of [2] is valid, hence the protein’s tertiary structure is unique, stable, viable, and depends solely on aminoacid interactions. 2.2 Pairwise Interactions Previous literature suggests energy functions depending on number, distance, and additional physiochemical properties (hydrophobia/hydrophilia, among others) between pairs of aminoacids in the three-dimensional protein structure [11, 17, 13]. We will follow such approach, hence pairwise interactions fully characterize our aminoacid interactions in this work. Identifying pairwise interactions instead of trying to obtain all collective, grouped interactions is much more viable computationally. Besides, it is conceivable that more intricate interaction patterns be extrapolated from pairwise interactions. In this work, we consider pairwise energy functions, i.e., those totally defined by energy potentials on pairwise interactions among aminoacids. Axiom 2.2 (Pairwise Hypothesis). All existent information on aminoacid interactions can be obtained by considering only pairwise interactions. 2.2.1 Interaction Classes and Instances An interaction class is a pair (X1 , X2 ) where X1 and X2 are names of aminoacids. For instance, (A, V ) is the interaction of the aminoacids alanine and valine, and (G, L) is the interaction of aminoacids glycine and leucine. We consider (X1 , X2 ) equal to (X2 , X1 ) for any aminoacid names X1 , X2 . Considering the standard 20 aminoacids that characterize proteins, we have 380 possible interactions classes. Within a protein’s stable fold, an interaction instance of (X1 , X2 ) occurs if the distance between two aminoacids of types X1 and X2 , is within an arbitrary threshold τ . In practice, the distance could be taken over heavy atoms, centroids in aminoacids, or cα locations in aminoacids (the location of the central carbon atom). Our results are independent of the choice above. We represent interaction classes with uppercase letters (e.g. I), and interaction instances with lowercase letters (e.g. i). In a protein’s stable fold P , the interaction instances of the interaction class I defines the set Inst P (I). Establishing a distance threshold might seem arbitrary and even unrealistic, as overlooking interaction instances that barely fail such distance may discard useful information. Also, whatever account attributed to interaction instances must also consider certain physiochemical properties, for instance, hydrophobia or hydrophilia1 , usually compiled into tables such as the MiyazawaJernigan [13]. One could argue that the right choice of distance threshold and tables describing physiochemical interactivity could be enough to totally define the UEF. Let us fix (yet not specify) τ big enough as to accommodate all possible actual aminoacid interactions, and assume that contacts are scored accordingly. Therefore, to each interaction instance i, we associate an energetic score e(i) ∈ R, which abstracts the following parameters: (1) distance threshold τ ; (2) contact point; (3) the physiochemical properties of the aminoacids involved. As far as identifying intrinsic preferences over interaction classes in the UEF, our results are independent of the above choices – in other words, independent of the energetic score function. The key to such generality of results lies in our 2-step preference model, in our axiomatic setting, and impossibility results from voting theory. 1 Respectively, the tendency or aversion to bind to water. 4 3 Internal Aggregation The internal aggregation is the procedure where the energetic scores of the interaction instances are taken into account and define a protein’s individual preference. For any protein P : • Each interaction instance i has an energetic score e(i) ∈ R modeling distance threshold, contact point, and physiochemical properties of i. The function e() is fixed yet arbitrary. The value of e(i) can be positive or negative, modeling physiochemical properties that might manifest with opposing effect (for instance, hydrophobia vs. hydrophilia). • Each interaction class I has a set of interaction instances Inst P (I). The individual preference of P regarding I1 versus I2 depends only on Inst P (I1 ) and Inst P (I2 ), and the energetic scores respectively associated with each interaction instance. We consider two scenarios: 1. For each interaction instance I, we can infer an utility value uP (I) ∈ R, completely defined in terms of Inst P (I). Considering the same protein/function, the utilities are comparable: if uP (I1 ) > uP (I2 ), then P manifests preference (i.e., bias) for I1 instead of I2 ; if uP (I1 ) = uP (I2 ), then P does not manifest any preference (i.e., bias) for I1 instead of I2 . Note that we do not assume comparability between utility levels across two different proteins. This is what characterizes our 2-step preference model: utilities are meaningful to its corresponding protein only. In Sec. 4.4 we in fact vary the comparability between utility levels across proteins, and explore the consequences of each mode. 2. We can only infer a total order P among interaction classes, completely defined in terms of Inst P (I1 ) and Inst P (I2 ). If I1 ≻P I2 , then P prefers I1 to I2 ; if I1 ≺P I2 , then P prefers I2 to I1 ; if I1 =P I2 , then P is indifferent regarding I1 versus I2 . We call the first scenario the utility preference model, and the second scenario is an ordinal preference model (our terminology). We examine the two scenarios separately, in each case we apply the appropriate concepts and impossibility results from social choice theory. Recapitulating, our goal is to evaluate the viability of the following strategy: Internal Aggregation: Examine interaction instances of each protein, deriving the manifested individual preferences, either a utility function uP or a total order P , for each protein P . External Aggregation: Examine individual preferences and derive the global preference, which is similarly a utility function or a total order. We assume that the internal aggregation might be subject to errors, but not in presence or scope such that they might deem any individual preference “more representative” than another. Errors are small and covert. This idea is formalized by the anonymity requirement (Axiom 4.5) for the external aggregation. 4 External Aggregation In this section we will axiomatize the requirements of the external aggregation procedure. We discuss the general problem structure on Sec. 4.1, followed by an axiomatic formulation of the basic requirements on Sec. 4.2. We finally show that the external aggregation (axiomatized as below) is 5 subject to fundamental impossibility results studied in the context of voting theory regardless of: (1) the function e; and (2) the utility function uP or the total order P for any protein P . In other words, the strategy outlined above, in the end of Sec. 3, will pose some fundamental methodological limitations regardless on how the internal aggregation is defined – how distances, contact, physiochemical potentials, as well how preferences are extracted. Specific axioms and impossibility theorems for the case with ordinal preference is presented on Sec. 4.3, and for the case with utility preference on Sec. 4.4. 4.1 Basic Notation The external aggregation is defined as follows. Consider all interaction classes I = {I1 , . . . , I380 }, and arbitrary n proteins P = {P1 , . . . , Pn }, with some finite n ≥ 2. Considering our two preference models: • In the ordinal preference setting, the individual preference of Pi is a total order i over I. By definition, these relations are total (Ia i Ib or Ib i Ia for any Ia , Ib ), transitive (if Ia i Ib and Ib i Ic then Ia i Ic ), and antisymmetric (Ia i Ib and Ib i Ia implies Ia =i Ib ). • In the utility preference setting, the individual preference of Pi is a utility function ui : I → R. The utilities imply a total order (if ui (Ia ) ≤ ui (Ib ) then Ia i Ib ). The individual preference manifested by protein Pi is denoted as I(i). The preference profile is composed of all individual preferences: I = (I(0), . . . , I(n)). Finally, the universe of preference profiles is composed of all preference profiles: I∗ = {I : I is a valid preference profile}. The external aggregation procedure returns a global preference, either a total order O or a utility function uO over I. We consider the two cases separately. In terms of notation, for any individual or the global preference X, if Ia  Ib in X, we write Ia X Ib (and similarly for other relations). So, if Ia  Ib in I(i), we write Ia I(i) Ib ; besides, if Ia  Ib in O, we write Ia O Ib . For any two preferences X and Y , if Ia X Ib ⇔ Ia Y Ib , then we write SameOrder(X, Y, Ia ∼ Ib ). 4.2 General Axioms Our first axioms simply models the requirement that the procedure receives multiple individual preferences and produces a single global preference. Individual preferences are transitive ordering over interaction classes. Axiom 4.1. Agreement After the external aggregation, we obtain a single global preference among interaction classes. Axiom 4.2. Transitivity The individual preferences as well as the global preference are total transitive orderings over interaction classes. The unrestricted domain requirement, stated below, is an imposition on the external aggregation, not on the actual preference profile. Intuitively speaking, the external aggregation must be able to handle arbitrary transitive individual preferences. Axiom 4.3. Unrestricted Domain Any total order among interaction classes is permitted in a preference profile. 6 If any set of at least three interaction classes S = {I1 , I2 , I3 } is such that both (1) Ii  Ij and (2) Ij  Ii are possible preferences in the preference profile, for any 1 ≤ i, j ≤ 3, S is called a 3-unrestricted preference set. In a first glance, Axiom 4.3 may appear overly imposing for practical purposes. After all, the preference profile expressed in the PDB, given a suitable internal aggregation procedure, can be more restrictive. However, it seems reasonable to expect a 3-unrestricted preference set in the preference profile after the internal aggregation. In that case, the Arrow’s Impossibility Theorem (Theorem 4.14) is applicable, and May’s Theorem (Theorem 4.15) may imply the possibility of breaking transitivity (discussed ahead). Even considering the much less restrictive condition of having only a 3-unrestricted preference set in the preference profile, the results apply. We keep the complete unrestricted domain axiom for its generality appeal. The unanimity requirement requires that if all proteins expose a preference on a particular interaction class over another, the unanimity should be respected. Axiom 4.4. Unanimity. For any I ∈ I∗ , if SameOrder(I(i), I(j), Ia ∼ Ib ) for all Pi , Pj then SameOrder(I(i), O, Ia ∼ Ib ) for all Pi , considering arbitrary Ia , Ib ; We assume that proteins manifest preferences over interaction classes in an indistinguishable manner; i.e., we cannot infer whether protein A manifests a “better” individual preference than protein B. As mentioned before, we assume that the internal aggregation might be subject to errors, but not in presence or scope such that they might deem any individual preference “more representative” than another. Errors are small and covert. In specific terms, the preferences manifested by protein A and those by protein B are considered without regard to their identity. Axiom 4.5. Anonymity. For any I′ , I′′ ∈ I∗ , whenever I′ = (I(0)′ , . . . , I(n)′ ) is a permutation of I′′ = (I(0)′′ , . . . , I(n)′′ ), we have that O′ = O′′ . We note that anonymity implicates in non-dictatorship, i.e., the fact that no individual preference completely and exclusively defines the global preference. Axiom 4.6. Non-Dictatorship. For all Pi ∈ P there exists at least one I ∈ I∗ and elements Ia , Ib such that Ia ≻I(i) Ib but Ia O Ib . 4.3 Ordinal Preference Model Our external aggregation procedure is modeled after social welfare functions, a basic concept in social choice theory, simply representing a procedure that receives total orders on elements of I and produces a total order over elements of I. We start with basic axioms meaningful for the ordinal preference model, followed by impossibility results. 4.3.1 Axioms The neutrality requirement, formalized below, basically requires that all pairwise preferences over interaction classes are treated equally: the procedure computing the outcome of all pairwise preferences is oblivious to the particular names of interaction classes. We say that two preference profiles are compatible whenever they have the same number of individual preferences. Axiom 4.7. Neutrality. For any compatible (I′ , I′′ ) and corresponding outputs (O′ , O′′ ), if we have [∀Pi ea I(i)′ eb ⇔ ec I(i)′′ ed ] then ea O′ eb ⇔ ec O′′ ed , considering arbitrary ea , eb , ec , ed ; 7 If we make ec = ea and ed = eb , neutrality implies the famous and controversial Independence of Irrelevant Alternatives (IIA). This requirement basically says that for any two aggregation scenarios where individual preferences over arbitrary elements ea and eb remain identical, the algorithm output similarly remains identical over those elements. Axiom 4.8. Independence of Irrelevant Alternatives (IIA). For any compatible I′ , I′′ ∈ I∗ and corresponding outputs O′ , O′′ , if we have [∀Pi SameOrder(I(i)′ , I(i)′′ , ea ∼ eb )] then we have SameOrder(O′ , O′′ , ea ∼ eb ), considering arbitrary ea , eb ; Intuitively speaking, we want an aggregation procedure that behaves similarly to continuous functions in the following sense: small changes in the preference profile will not induce substantial changes in the global preference. We formalize this requirement using distance metrics. We first define a distance metric d : I∗ × I∗ → R, which naturally satisfies the following: 1. d(X, X) = 0 2. d(X, X ′ ) = d(X ′ , X) 3. d(X, X ′′ ) ≤ d(X, X ′ ) + d(X ′ , X ′′ ) for any X, X ′ ∈ I∗ . Then, between two compatible preference profiles I′ , I′′ , we define X D= d(I(i), I(i)′ ). i∈{1,...,n} Technically, we want smaller changes in the preference profile to produce smaller changes in the global preference, where changes are measured according to the distance function. The motivation is having an external aggregation that is robust to small imprecision in the internal aggregation. Formally: Axiom 4.9. Proximity Preservation. There exists a distance function d over I∗ such that D(I, I′ ) ≤ D(I, I′′ ) ⇒ d(O, O ′ ) ≤ d(O, O ′′ ). We want an external aggregation that responds positively (or at least monotonically) to the preferences of the proteins. We want that positive changes on the preference of I1 over I2 , say, due to improving our internal aggregation, induce positive (or at least monotonic) changes in the global order. The two axioms are presented below. Axiom 4.10. Positive Responsiveness. For any I′ , I′′ ∈ I∗ and corresponding outputs O′ , O′′ , if SameOrder(I(i)′ , I(i)′′ , ea ∼ eb ) for all i 6= j, and, for some j 1. ea ≺I(j)′ eb ⇒ ea I(j)′′ eb ; 2. ea =I(j)′ eb ⇒ ea ≻I(j)′′ eb , then ea O′ eb ⇒ ea ≻O′′ eb , considering arbitrary ea , eb . Axiom 4.11. Monotonic Responsiveness. For any I′ , I′′ ∈ I∗ and corresponding outputs O′ , O′′ , if SameOrder(I(i)′ , I(i)′′ , ea ∼ eb ) for all i 6= j, and, for some j 1. ea ≺I(j)′ eb ⇒ ea I(j)′′ eb ; 2. ea =I(j)′ eb ⇒ ea ≻I(j)′′ eb , then ea O′ eb ⇒ ea O′′ eb , considering arbitrary ea , eb . 8 4.3.2 Impossibility Results In this section, we romp through impossibility results from social choice theory and expose contradictions hidden in our previous axioms. First, considering the results from [5], we conclude that any external aggregation procedure that respects unanimity and satisfies anonymity does not preserve proximity. Theorem 4.12. No external aggregation can simultaneously respect Axioms 4.4, 4.5, 4.9. Proof. Proof in [5]. Theorem 4.12 exposes a methodological difficulty: an external aggregation procedure that respects anonymity and unanimity does not preserve proximity, which goes against the intuition that smaller changes in the preference profile should imply in smaller changes in the global preference. Note that the theorem in [5] is valid even when the unrestricted domain axiom is not considered. However, if we waive proximity preservation (hence keeping unanimity and anonymity), having an unrestricted domain still frustrates our requirements, as we conflict with neutrality: Corollary 4.13. No external aggregation can simultaneously respect Axioms 4.2, 4.3, 4.4, 4.5, 4.7. Proof. Since anonymity implicates in non-dictatorship and neutrality implicates in the IIA, this is a corollary of the Arrow’s Impossibility Theorem [3]. The famous Arrow’s Impossibility Theorem [3] is widely considered as a landmark of modern social choice theory. There exist many proofs for such result (including [3, 6, 10]). The original theorem is presented below. Note that even relaxing anonymity to non-dictatorship, and neutrality to the IIA, the original theorem applies: Theorem 4.14 (Arrow’s Impossibility Theorem). No external aggregation (modeled after social welfare functions) can simultaneously respect Axioms 4.2, 4.3, 4.4, 4.6, 4.8. Proof. Proof in [3]. If we want a positively responsive aggregation procedure (i.e., respecting axiom 4.10), May’s Theorem [12] says that the preference regarding each pairwise comparison among interaction classes is necessarily decided by simple majority. For any interaction classes Ia , Ib ∈ I, define N (Ia > Ib ) = |{Pi : Ia ≻I(i) Ib }|. Theorem 4.15 (May’s Theorem). For each interaction class (Ia , Ib ), any decision function2 respecting Axioms 4.4, 4.7, and 4.10 is such that Ia O Ib ⇔ [N (Ia > Ib ) ≥ N (Ib > Ia )]. The problem implied by May’s Theorem is that the global preference might be intransitive [6, 4] if a 3-unrestricted preference set exists in the preference profile (which seems reasonable after the internal aggregation). In fact, even waiving neutrality (preserving just the IIA) conflicts with positive responsiveness ([4], chap. 22), so perhaps the problem is the positive responsiveness itself. Settling for monotonicity (Axiom 4.11) works around May’s theorem, but then we could argue whether waiving neutrality (preserving just the IIA) is reasonable or not. 2 For us, external aggregation procedure. 9 At first, it sounds reasonable to treat preferences consistently across different interaction classes (as suggested by neutrality and by the IIA). As implied above, restrictions like neutrality (and its weaker restriction, the IIA), even with seemingly natural meaning, have strong axiomatic implications. Nevertheless, dropping neutrality poses serious methodological difficulties for our strategy: in that case, names of interaction classes matter for our external aggregation. Their relationship and place, however, are precisely our unknowns. Many impossibility theorems in the voting theory literature presume unrestricted domains (or simply a 3-unrestricted preference set). For the Arrow’s Theorem as well as the May’s Theorem, performing suitable domain restrictions, where we limit the preference profile, might be enough to overcome the theoretical impossibilities. If preferences are single-peaked or quasi-transitive (please refer to [16, 15]), we also dodge from the impossibility results above. We invite the reader to appreciate these previous results and understand the relevance of these theorems for problems related to protein folding, and perhaps in other similar contexts where a 2-step preference model is similarly suitable. 4.4 Utility Preference Model In this section, we discuss the utility preference model. In this setting, it is possible to obtain utility values associated with each interaction class in each individual protein. In other words, for any protein Pi , there exists a utility function ui mapping interaction classes to utility values. Recall that we intend to analyze preferences manifested by individual proteins in an individual setting, and then make an external aggregation. We presume utility functions that are not comparable across proteins. In the following subsection, we improve the comparability and explore the consequences. For now, we technically assume that the utility function for P differ in origin and scale from the utility function for Q, taking any proteins P 6= Q. Formally: Axiom 4.16. Any utility function is a strictly increasing linear transformation of another utility function: uP = αpq uQ + βpq for some αpq > 0 and any βpq , considering any proteins P and Q. Borrowing terminology from voting theory, there is no interpersonal comparisons of utility levels or of gains and losses among different individual preferences. Note that this is fundamentally different from the approach where there is free comparison among utility levels (energy scores) measured across different proteins, as seen in [11, 17, 13]. With that in mind, we are still going to consider ordinal preferences, however expressed through utility functions, in a continuous manner. Consider the space R380 + where the i-th coordinate of an arbitrary point p is represented by p[i]. A point p an expression descriptor for interaction classes: p is such that the bigger the p[i], the bigger the associated expression for the interaction class Ii . Furthermore, for sufficiently close levels of expression descriptors (i.e., points in R380 + ), the utility function has sufficiently close values. Formally, we define X uP (Ii ) · p[i], UP (p) = I1 ...I380 representing the utility associated with some point p. Technically, UP is a utility function over the expression descriptor space. Note that UP is linear, implying that the expression of I1 is worth uP (I1 )/uP (I2 ) times the expression of I2 for any interaction classes I1 and I2 and protein P . 10 Of course, this informational framework is subject to the same impossibility results as before, but other interesting results further apply. We now briefly overview the approach of [7, 14], describing an impossibility result that mirrors (in the continuous setting) Theorem 4.12. The indifference hyperplane HPc is the hyperplane containing points p where UP (p) = c. Note that HPc and HPd are parallel for any positive constants c and d. The unit vector perpendicular to HPc (for an arbitrary constant c > 0), called vP , represents the direction where the utility increases for P . The length of the vector is disconsidered precisely because we are taking a purely ordinal interpretation of the utility functions: their origin and scale are not comparable among different proteins. The individual preference for P , denoted by vP , is a unit vector indicating the direction that maximizes UP . Note that vP denotes a unique point in the 380-dimensional sphere S 380 . The global preference, denoted by vO , and is also a unit vector indicating the direction that maximizes the global utility. The external aggregation is such that E : |S 380 × .{z . . × S 380} → S 380 , n where E satisfies the following: Axiom 4.17. Continuity. The external aggregation E is a continuous function. The anonymity and unanimity, central requirements for our aggregate mechanism, are rephrased for our continuous setting below. Axiom 4.18. Continuous unanimity. If vP = v for all proteins P , then the vO = v. Axiom 4.19. Continuous anonymity. E(v1 , . . . , vn ) = E(π(v1 ), . . . , π(vn )), where π is a permutation function over individual preferences. Theorem 4.20. No external aggregation can simultaneously respect Axioms 4.18, 4.19, and 4.17. Proof. Follows from [7, 14]. Note how Theorem 4.20 mirrors Theorem 4.12 in the continuous setting. At first glance, it seems that anonymity and unanimity are inherently incompatible with a notion of continuity. In fact, the generality imposed by seemingly innocuous axioms is also fundamental to such impossibilities. Specifically, performing domain restrictions, that is, reducing the generality of possible individual preferences, is often sufficient to escape impossibility results (please refer to [7, 14]). The continuity requirement models our robustness to imprecision in the internal aggregation procedure. It parallels the proximity preservation property defined for ordinal preferences. In both scenarios, in light of our general axioms, we have impossibility results that seriously hinder the methodological strategy considered in this work. 4.4.1 Inter-Protein Comparison of Energy Levels Let us now increase the comparability among utility function for different proteins. The utility function for P differs in origin, but not in scale, from the utility function for Q, taking any proteins P 6= Q. Formally: 11 Axiom 4.21. Any utility function is a strictly increasing linear transformation of another utility function: uP = αuQ + βP Q for some fixed and unique α > 0 and any βP Q , considering any proteins P and Q. Borrowing terminology from voting theory, there is no interpersonal comparisons of utility levels, but there is comparison between gains and losses among different individual preferences, since the scale is the same. For the utility preference model, we write SameValue(X, Y, Ia ∼ Ib ) to denote uX (Ia ) = uY (Ib ). Now consider the axioms below. Utility IIA. For any compatible I′ , I′′ ∈ I∗ and O′ , O′′ , if [∀Pi SameValue(I(i)′ , I(i)′′ , ea ∼ eb )] then we have that SameOrder(O′ , O′′ , ea ∼ eb ), considering arbitrary ea , eb ; Strict Unanimity. For any I ∈ I∗ , if SameOrder(I(i), I(j), Ia ∼ Ib ) for all Pi , Pj then we have SameOrder(I(i), O, Ia ∼ Ib ) for all Pi , considering arbitrary Ia , Ib ; Also, if Ia ≻I(i) Ib for an arbitrary protein P , then Ia ≻O Ib . Interestingly, those axioms imply that the external aggregation is the utilitarian rule [8]: X X Ia  O Ib ⇔ uP (Ia ) ≥ uP (Ib ). P ∈P P ∈P In current literature [11, 17, 13], it is usual to perform a 1-step holistic analysis of the PDB in order to infer a certain conclusion. Social choice theory can provide interesting characterizations and consequences for different levels of comparability of preferences, or whichever concept maps suitably (e.g energy scores). 5 Discussion and Final Remarks In this work we hope to have illustrated the application and relevance of social choice theory not only to the problem and methodology that intends to infer biases in the UEF, but to other problems related to protein folding where the 2-step approach makes sense. We particularly think that the 2-step approach is sensible in light of Anfinsen’s thermodynamic hypothesis, as if stable folds are the result solely of a protein’s individual aminoacid sequence, considering the PDB holistically may not be always desirable. Note that the problem considered in this work is formally weaker than those aiming for more complete characterizations of the UEF with our 2-step approach and the same axiomatic setting. Stronger characterizations of the UEF via the method above will suffer from similar methodological limitations unless axioms are relaxed, made more specific, or otherwise changed appropriately. Many impossibility results highlighted here rely on the generality of the axioms. Our axioms specify, for instance, that any possible individual preference is valid. While this is attractive in an axiomatic setting, it is necessary to the Arrow’s Impossibility Result and implies possibly breaking transitivity in light of May’s Theorem. However, those conditions can be avoided. In some cases (such as for Corollary 4.13 and Theorem 4.20), a suitable domain restriction, which disallows some particular individual preferences, avoid the issues (please refer to [6, 7]). If preferences are single-peaked or quasi-transitive, we also dodge from the impossibility results above (please refer to [16, 15]). Given the considerations here, we invite the reader to appreciate these previous results and understand their relevance for algorithm design – not only in the context of protein folding with 12 the thermodynamic hypothesis, but perhaps in other similar contexts where a 2-step aggregation procedure is similarly suitable. The social choice literature is vast – and we urge the community of computer scientists to investigate these results and their possibly immense connection and relevance to problems involving protein folding. References [1] http://www.rcsb.org. [2] Christian B. Anfinsen. Principles that govern the folding of protein chains. 181(4096):223–230, 1973. Science, [3] Kenneth Arrow. Social Choice and Individual Values. John Wiley and Sons, 1963. [4] K.J. Arrow and M.D. Intriligator, editors. Handbook of Mathematical Economics, volume III. Elsevier Science Publishers, 1986. [5] Nick Baigent. Preference proximity and anonymous social choice. The Quarterly Journal of Economics, 102(1):pp. 161–170, 1987. [6] Donald Campbell and Jerry Kelly. Impossibility theorems in the arrovian framework. volume 1 of Handbook of Social Choice and Welfare, chapter 1, pages 35 – 94. Elsevier, 2002. [7] Graciela Chichilnisky. Social aggregation rules and continuity. The Quarterly Journal of Economics, 97(2):pp. 337–352, 1982. [8] Claude D’Aspremont and Louis Gevers. Equity and the informational basis of collective choice. The Review of Economic Studies, 44(2):pp. 199–209, 1977. [9] Ken A. Dill, S. Banu Ozkan, M. Scott Shell, and Thomas R. Weikl. The protein folding problem. Annual Review of Biophysics, 37(1):289–316, 2008. [10] John Geanakoplos. Three brief proofs of arrow’s impossibility theorem. Cowles Foundation Discussion Papers 1123R3, Cowles Foundation for Research in Economics, Yale University, April 1996. [11] R. Jernigan and I. Bahar. Structure-derived potentials and protein simulations. Current Opinion Structural Biology, 6(2):195–209, 1996. [12] Kenneth May. A set of independent necessary and sufficient conditions for simple majority decision. Econometrica, 20(4):680–684, 1952. [13] S. Miyazawa and R. Jernigan. Self-consistent estimation of inter-residue protein contact energies based on an equilibrium mixture approximation of residues. Proteins: Structure, Function, and Genetics, 34(1):49–68, 1999. [14] Baigent Nicholas. Chapter eighteen - topological theories of social choice. In Amartya Sen Kenneth J. Arrow and Kotaro Suzumura, editors, Handbook of Social Choice and Welfare, volume 2 of Handbook of Social Choice and Welfare, pages 301 – 334. Elsevier, 2011. 13 [15] Amartya Sen. Quasi-transitivity, rational choice and collective decisions. The Review of Economic Studies, 36(3):pp. 381–393, 1969. [16] Amartya K. Sen. A Possibility Theorem on Majority Decisions. Econometrica, 34(2):491–499, 1966. [17] P. Thomas and K. Dill. An iterative method for extracting energy-like quantities from protein structures. Proceedings of the National Academy of Sciences of the United States of America, 93(21):11628–11633, 1996. 14
5cs.CE