How to linearize the bilinear constraint $z=xcdot y$ with binary $y$? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite
1












I would like to linearize the quadratic constraint $$z=xcdot y$$ where $y in 0,1$ is a binary variable and $x in [0,U] cap mathbb Z$ is a bounded integer.







share|cite|improve this question













closed as off-topic by John Ma, Xander Henderson, Mostafa Ayaz, amWhy, Shailesh Aug 2 at 11:55


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – John Ma, Xander Henderson, Mostafa Ayaz, amWhy, Shailesh
If this question can be reworded to fit the rules in the help center, please edit the question.












  • $y$ equals $0$ or $1$.
    – Hang Wu
    Aug 2 at 14:58














up vote
0
down vote

favorite
1












I would like to linearize the quadratic constraint $$z=xcdot y$$ where $y in 0,1$ is a binary variable and $x in [0,U] cap mathbb Z$ is a bounded integer.







share|cite|improve this question













closed as off-topic by John Ma, Xander Henderson, Mostafa Ayaz, amWhy, Shailesh Aug 2 at 11:55


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – John Ma, Xander Henderson, Mostafa Ayaz, amWhy, Shailesh
If this question can be reworded to fit the rules in the help center, please edit the question.












  • $y$ equals $0$ or $1$.
    – Hang Wu
    Aug 2 at 14:58












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I would like to linearize the quadratic constraint $$z=xcdot y$$ where $y in 0,1$ is a binary variable and $x in [0,U] cap mathbb Z$ is a bounded integer.







share|cite|improve this question













I would like to linearize the quadratic constraint $$z=xcdot y$$ where $y in 0,1$ is a binary variable and $x in [0,U] cap mathbb Z$ is a bounded integer.









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Aug 2 at 15:03









Rodrigo de Azevedo

12.6k41751




12.6k41751









asked Aug 1 at 11:23









Hang Wu

658




658




closed as off-topic by John Ma, Xander Henderson, Mostafa Ayaz, amWhy, Shailesh Aug 2 at 11:55


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – John Ma, Xander Henderson, Mostafa Ayaz, amWhy, Shailesh
If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by John Ma, Xander Henderson, Mostafa Ayaz, amWhy, Shailesh Aug 2 at 11:55


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – John Ma, Xander Henderson, Mostafa Ayaz, amWhy, Shailesh
If this question can be reworded to fit the rules in the help center, please edit the question.











  • $y$ equals $0$ or $1$.
    – Hang Wu
    Aug 2 at 14:58
















  • $y$ equals $0$ or $1$.
    – Hang Wu
    Aug 2 at 14:58















$y$ equals $0$ or $1$.
– Hang Wu
Aug 2 at 14:58




$y$ equals $0$ or $1$.
– Hang Wu
Aug 2 at 14:58










1 Answer
1






active

oldest

votes

















up vote
2
down vote













$$
begincases
z leq Uy \
z leq x \
z geq x - U(1-y) \
z geq 0
endcases
$$
if $y=0$ these constraints force $z=0$ while for $y=1$ you get $z=x$.






share|cite|improve this answer




























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    $$
    begincases
    z leq Uy \
    z leq x \
    z geq x - U(1-y) \
    z geq 0
    endcases
    $$
    if $y=0$ these constraints force $z=0$ while for $y=1$ you get $z=x$.






    share|cite|improve this answer

























      up vote
      2
      down vote













      $$
      begincases
      z leq Uy \
      z leq x \
      z geq x - U(1-y) \
      z geq 0
      endcases
      $$
      if $y=0$ these constraints force $z=0$ while for $y=1$ you get $z=x$.






      share|cite|improve this answer























        up vote
        2
        down vote










        up vote
        2
        down vote









        $$
        begincases
        z leq Uy \
        z leq x \
        z geq x - U(1-y) \
        z geq 0
        endcases
        $$
        if $y=0$ these constraints force $z=0$ while for $y=1$ you get $z=x$.






        share|cite|improve this answer













        $$
        begincases
        z leq Uy \
        z leq x \
        z geq x - U(1-y) \
        z geq 0
        endcases
        $$
        if $y=0$ these constraints force $z=0$ while for $y=1$ you get $z=x$.







        share|cite|improve this answer













        share|cite|improve this answer



        share|cite|improve this answer











        answered Aug 1 at 13:13









        LinAlg

        5,4111319




        5,4111319












            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?