We equivalently transform [PQ ] to an ILP ILPs and IQPs can be solved using general mathematical optimization solver [ PQ] : minimize X (u,v)2A wuv( yv yu) 2 subject to yv yu uv, 8 ( u, v ) 2 A, yv = 0 , 8v 2 V0, yv = L, 8v 2 VL, yv 2 Z+, 8v 2 V. ze X (u,v)2A wuv( yv yu) 2 to yv yu uv, 8 ( u, v ) 2 A, yv = 0 , 8v 2 V0, yv = L, 8v 2 VL, yv 2 Z+, 8v 2 V. [PL] : minimize X (u,v)2A wuv X k2Kuv k 2 xuvk subject to X k2Kuv kxuvk yv + yu = 0, 8 (u, v) 2 X k2Kuv xuvk = 1, 8 (u, v) 2 A, yv = 0, 8 v 2 V0, yv = L, 8 v 2 VL, yv 2 Z+ , 8 v 2 V, xuvk 2 { 0, 1 } , 8 (u, v) 2 A, 8 k 2 Kuv [PL] : minimize X (u,v)2A wuv X k2Kuv k 2 xuvk subject to X k2Kuv kxuvk yv + yu = 0, 8 (u, v) 2 A, X k2Kuv xuvk = 1, 8 (u, v) 2 A, yv = 0, 8 v 2 V0, yv = L, 8 v 2 VL, yv 2 Z+ , 8 v 2 V, xuvk 2 { 0, 1 } , 8 (u, v) 2 A, 8 k 2 Kuv. X k2Kuv kxuvk = yv yu Kuv = { uv, · · · , L} X k2Kuv xuvk = 1 xuvk 2 {0 , 1} where