Skip to main content
Log in

A linear-time approximate convex envelope algorithm using the double Legendre–Fenchel transform with application to phase separation

  • Published:
Computational Optimization and Applications Aims and scope Submit manuscript

Abstract

We study the double discrete Legendre–Fenchel transform (LFT) to approximate the convex envelope of a given function. We analyze the convergence of the double discrete LFT in the multivariate case based on previous convergence results for the discrete LFT. We focus our attention on the grid on which the second discrete LFT is computed (dual grid); its choice has great impact on the accuracy of the resulting approximation of the convex envelope. Then, we present an improvement (both in time and accuracy) to the standard algorithm based on a change in the factorization order for the second discrete LFT. This modification is particularly beneficial for bivariate functions. Moreover, we introduce a method for handling functions that are unbounded outside sets of general shape. We also present some situations in which the selection of the dual grid is crucial, and show that it is possible to choose a dual grid of arbitrary size without increasing the memory requirements of the algorithm. Finally, we apply our algorithm to the study of phase separation in non-ideal ionic solutions.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

References

  1. Barber, C.B. Dobkin, D.P. Huhdanpaa, H.: The Quickhull algorithm for convex hulls. ACM Trans. Math. Softw. 22(4), 469–483 (1996) doi:10.1145/235815.235821. http://www.qhull.org

  2. Blum, L.: Mean spherical model for asymmetric electrolytes. Mol. Phys. 30(5), 1529–1535 (1975). doi:10.1080/00268977500103051

    Article  Google Scholar 

  3. Brenier, Y.: Un algorithme rapide pour le calcul de transformées de Legendre-Fenchel discrètes. Comptes Rendus des Séances de l’Académie des Sciences. Série I. Mathématique 308(20), 587–589 (1989)

    MATH  MathSciNet  Google Scholar 

  4. Chan, T.M.: Optimal output-sensitive convex hull algorithms in two and three dimensions. Discret. Comput. Geom. 16(4), 361–368 (1996). doi:10.1007/BF02712873

    Article  MATH  Google Scholar 

  5. Contento, L.: The Discrete Legendre-Fenchel Transform and its application to phase separation in electrolytes. University of Udine (2012). http://hal.archives-ouvertes.fr/hal-00806085

  6. Corrias, L.: Fast Legendre–Fenchel transform and applications to Hamilton–Jacobi equations and conservation laws. SIAM J. Numer. Anal. 33(4), 1534–1558 (1996). doi:10.1137/S0036142993260208

    Article  MATH  MathSciNet  Google Scholar 

  7. Ern, A., Joubaud, R., Lelièvre, T.: Mathematical study of non-ideal electrostatic correlations in equilibrium electrolytes. Nonlinearity 25(6), 1635–1652 (2012). doi:10.1088/0951-7715/25/6/1635

    Article  MATH  MathSciNet  Google Scholar 

  8. Gardiner, B., Lucet, Y.: Convex hull algorithms for piecewise linear-quadratic functions in computational convex analysis. Set-Valued Var. Anal. 18(3–4), 467–482 (2010). doi:10.1007/s11228-010-0157-5

    Article  MATH  MathSciNet  Google Scholar 

  9. Groh, B., Evans, R., Dietrich, S.: Liquid-vapor interface of an ionic fluid. Phys. Rev. E 57(6), 6944–6954 (1998). doi:10.1103/PhysRevE.57.6944

    Article  Google Scholar 

  10. Helluy, P., Mathis, H.: Pressure laws and fast Legendre transform. Math. Models Methods Appl. Sci. 21(4), 745–775 (2011). doi:10.1142/S0218202511005209

    Article  MATH  MathSciNet  Google Scholar 

  11. Hiriart-Urruty, J.-B.: Lipschitz r-continuity of the approximate subdifferential of a convex function. Math. Scand. 47, 123–134 (1980)

    MATH  MathSciNet  Google Scholar 

  12. Joubaud, R., Bernard, O., Deville, A., Ern, A., Rotenberg, B., Turq, P.: Numerical study of density functional theory with mean spherical approximation for ionic condensation in highly charged confined electrolytes. Phys. Rev. E (2014) (to appear)

  13. Lucet, Y.: Faster than the fast Legendre transform, the linear-time Legendre transform. Numer. Algorithms 16(2), 171–185 (1997). doi:10.1023/A:1019191114493

    Article  MATH  MathSciNet  Google Scholar 

  14. Lucet, Y.: What shape Is your conjugate? A survey of computational convex analysis and its applications. SIAM Rev. 52(3), 505–542 (2010). doi:10.1137/100788458

    Article  MATH  MathSciNet  Google Scholar 

  15. Maxwell, J.C.: On the dynamical evidence of the molecular constitution of bodies. Nature 11, 357–359 (1875). doi:10.1038/011357a0

    Article  Google Scholar 

  16. Oberman, A.M.: The convex envelope is the solution of a nonlinear obstacle problem. Proc. Am. Math. Soc. 135(6), 1689–1694 (2007). doi:10.1090/S0002-9939-07-08887-9

    Article  MATH  MathSciNet  Google Scholar 

  17. Oberman, A.M.: Computing the convex envelope using a nonlinear partial differential equation. Math. Models Methods Appl. Sci. 18(5), 759–780 (2008). doi:10.1142/S0218202508002851

    Article  MATH  MathSciNet  Google Scholar 

  18. Patrinos, P., Sarimveis, H.: Convex parametric piecewise quadratic optimization: theory and algorithms. Automatica 47(8), 1770–1777 (2011). doi:10.1016/j.automatica.2011.04.003

    Article  MATH  MathSciNet  Google Scholar 

  19. Rockafellar, R.T.: Convex Analysis. Princeton University Press, Princeton, NJ (1970)

    MATH  Google Scholar 

  20. Serra, J.: Image Analysis and Mathematical Morphology. Academic Press, London (1983)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rossana Vermiglio.

Appendix: Treatment of non-rectangular domains

Appendix: Treatment of non-rectangular domains

The double discrete LFT algorithms operate naturally on rectangular computational domains discretized by a Cartesian grid. But since every function can be extended by setting its value to \(+\infty \) where it is not defined, we should be able to treat inside this framework functions defined on sets of arbitrary shape. Unfortunately, as observed in Remark 1, the double discrete LFT is always finite everywhere and thus every information about the domain shape is lost.

The problem lies in the fact that the information about the domain shape is encoded in the behavior at infinity of the LFT. Consider for example a one-dimensional function \(f\) which is finite on the interval \([l,r]\) and \(+\infty \) elsewhere. Its discrete LFT \(f^*_{X_N}\) is a piecewise linear function whose domain is the whole real line and whose first and last slopes, which extend all the way to \(\mp \infty \), are respectively \(l\) and \(r\). If we apply the continuous LFT to \(f^*_{X_N}\), we obtain again a function which is defined on \([l,r]\) and \(+\infty \) elsewhere. On the other hand, by applying a discrete LFT to \(f^*_{X_N}\), we use its values in only a finite number of points and suppose that it is \(+\infty \) elsewhere, which produces again a function defined on the whole real line. In order to reconstruct the correct domain, it is sufficient to keep in memory the values of the external slopes of \(f^*_{X_N}\).

In the two-dimensional case, we similarly have to preserve the external slope information of the first discrete LFT in order to obtain the correct domain after the second discrete LFT. Using the modified algorithm simplifies the matter because we only have one set of slopes to consider since there are only two passes of one-dimensional discrete LFTs; however, because of the pass of convex envelopes between them, these slopes change before the last pass. This is reasonable since the convex envelope can make the domain of finiteness of a function grow.

Using the notation of Sect. 4.2, in order to compute the slopes after the convex envelope pass, we have to determine which points of \(Y_N\) belong asymptotically for \(\xi \rightarrow \pm \infty \) to the convex envelope \({{\mathrm{conv}}}\left[ \left( -g(\xi ,\cdot )\right) _{Y_{N}}\right] \). This can be done in a similar way to the computation of the standard one-dimensional convex envelope by taking into account also the slopes obtained in the first pass of discrete LFTs. We explain explicitly only the case \(\xi \rightarrow \infty \); the other case can be treated in exactly the same way by inverting the \(\xi \)-axis. Let \(y_{i}\), \(i=1,\ldots ,N\) be the points of the grid \(Y_{N}\). Fixed \(i\), the function \(-g(\cdot ,y_{i})\) is a piecewise linear function whose slope has a constant value \(s_{i}\) after a certain value \(\xi _{i}\) on the \(\xi \)-axis. Take \(\xi _{0}=\max _{i}\xi _{i}\). For simplicity, given \(\xi >\xi _{0}\), denote the value \(-g(\xi ,y_{i})\) by \(z_{i}(\xi )\); we have that \(z_{i}(\xi )=z_{i}(\xi _{0})+s_{i}(\xi -\xi _{0})\) and that the slopes \(c_{ij}(\xi )\) between the nodes \(x_{i}\) and \(x_{j}\) are

$$\begin{aligned} c_{ij}(\xi )=\frac{z_{j}(\xi )-z_{i}(\xi )}{x_{j}-x_{i}}=\frac{z_{j} (\xi _{0})-z_{i}(\xi _{0})+(s_{j}-s_{i})(\xi -\xi _{0})}{x_{j}-x_{i}}. \end{aligned}$$
(5)

The convex hull of the piecewise linear function having nodes \(y_{i}\) and values \(z_{i}(\xi )\) with \(i=1,\ldots ,N\) is given by interpolating only a subset of the nodes. This subset depends on \(\xi \), but we will now show that there exists \(\xi _{r}\ge \xi _{0}\) such that the subset remains constant for \(\xi \ge \xi _{r}\); we will denote by \(i_{k}^{*}\), \(k=1,\ldots ,M\), with \(M\le N\), these nodes.

We have that \(i_{1}^{*}=1\) since the first node always belongs to the convex hull nodes for every \(\xi \) (similarly we also have \(i_{M}^{*}=N\)). Given \(i_{k}^{*}\), the next value \(i_{k+1}^{*}\) can be computed in the following way. Neglecting the grid points \(x_{i}\) with \(i<i_{k}^{*}\) and supposing that \(x_{i_{k}^{*}}\) is in the convex hull, the next node in the convex hull at \(\xi \) is \({{\mathrm{arg\ min}}}_{j=i_{k}^{*}+1,\ldots ,N}c_{i_{k}^{*}j}(\xi )\). Since \(c_{i_{k}^{*}j}(\xi )\) are affine as functions of \(\xi \), there is \(\xi _{k+1}^{*}\ge \xi _{0}\) such that the minimizer will be the same for all \(\xi >\xi _{k+1}^{*}\). This value is \(i_{k+1}^{*}\) and from (5) we have that \(i_{k+1}^{*}={{\mathrm{arg\ min}}}_{j=i_{k}^{*}+1,\ldots ,N}\frac{s_{j}-s_{i_{k}^{*}}}{x_{j}-x_{i_{k}^{*}}}\). In the case of the minimum being assumed by more than one value of \(j\) we choose the one for which \(\frac{z_{j}(\xi _{0})-z_{i_{k}^{*}}(\xi _{0})}{x_{j}-x_{i_{k}^{*}}}\) is the smallest; in case of a further draw, we can take the point for which \(x_{j}\) is larger. If \(i_{k+1}^{*}=N\), then \(M=k+1\) and all values have been computed.

The value \(\xi _{k+1}^{*}\) is the first value of \(\xi \) for which

$$\begin{aligned} c_{i_{k}^{*}i_{k+1}^{*}}(\xi )\le c_{i_{k}^{*}j}(\xi )\quad \text {for every }j>i_{k}^{*}; \end{aligned}$$

by substituting (5) and solving these linear inequalities we obtain that

$$\begin{aligned} \xi _{k+1}^{*}=\xi _{0}+\max _{\begin{array}{c} j>i_{k}^{*}\\ j\ne i_{k+1}^{*} \end{array}}\frac{\frac{z_{i_{k+1}^{*}}(\xi _{0}) -z_{i_{k}^{*}}(\xi _{0})}{x_{i_{k+1}^{*}}-x_{i_{k}^{*}}} -\frac{z_{j}(\xi _{0})-z_{i_{k}^{*}}(\xi _{0})}{x_{j} -x_{i_{k}^{*}}}}{\frac{s_{j}-s_{i_{k}^{*}}}{x_{j} -x_{i_{k}^{*}}}-\frac{s_{i_{k+1}^{*}} -s_{i_{k}^{*}}}{x_{i_{k+1}^{*}}-x_{i_{k}^{*}}}}. \end{aligned}$$

Taking \(\xi _{r}=\max _{k=1,\ldots ,M}\xi _{k}^{*}\) (where we put \(\xi _{1}^{*}=\xi _{M}^{*}=\xi _{0}\)), we have that the convex hull nodes are given by \((i_{k}^{*})_{k=1,\ldots ,M}\) for all \(\xi >\xi _{r}\). The functions \({{\mathrm{conv}}}\left[ \left( -g(\xi ,\cdot )\right) _{Y_{N}}\right] (y_{i})\), \(i=1,\ldots ,N\), when \(\xi >\xi _{r}\) are given by the formulas

$$\begin{aligned} {\left\{ \begin{array}{ll} z_{i}(\xi ) &{}\quad \text {if }i=i_{k}^{*}\text { for some }k,\\ \alpha z_{i_{k}^{*}}(\xi )+(1-\alpha )z_{i_{k+1}^{*}}(\xi ) &{}\quad \text {if }i_{k}^{*}<i<i_{k+1}^{*}\text { for some }k; \end{array}\right. } \end{aligned}$$

by substituting the \(z_{i}\), we can easily get their slopes as functions of \(s_{i}\).

In this way we obtain the interval \([\xi _l,\xi _r]\) outside which the points of \(Y_N\) belonging to the convex envelope do not change anymore and we obtain the external slopes of \({{\mathrm{conv}}}\left[ \left( -g(\xi ,\cdot )\right) _{Y_{N}}\right] (y)\) as a function of \(\xi \) for every \(y\in Y_N\). Then, by discretizing \([\xi _l,\xi _r]\) and using the obtained slopes, we can compute the final pass of discrete LFTs recovering the correct shape of the domain. We finally observe that this improvement to the algorithm can also be seen as a further enlargement of the dual set; in particular, the function we are computing is \(\left( f_{\varOmega _{N}}^{*}\right) _{(]-\infty ,\xi _l[\cup C_{M} \cup ]\xi _r,+\infty [)\times \mathbb {R}}^{*}\), where \(C_M\) is a discretization of \([\xi _l,\xi _r]\); by applying the symmetrization, we can then compute the double LFT with a dual set \(S_M\) such that \(\mathbb {R}^2\setminus S_M\) is bounded.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Contento, L., Ern, A. & Vermiglio, R. A linear-time approximate convex envelope algorithm using the double Legendre–Fenchel transform with application to phase separation. Comput Optim Appl 60, 231–261 (2015). https://doi.org/10.1007/s10589-014-9666-8

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10589-014-9666-8

Keywords

Navigation