Group: sci.op-research
From: Ray Vickson
Date: Saturday, March 22, 2008 1:35 AM
Subject: Re: Counting zero continuous variables

On Mar 21, 3:35 pm, "xgenera...@gmail.com"
wrote:
> On Mar 21, 4:51 pm, Wit Jakuczun wrote:
>
>
>
> > Dnia Fri, 21 Mar 2008 13:40:32 -0700 (PDT)
> > "xgenera...@gmail.com" napisa=B3(a):
>
> > > On Mar 21, 4:30 pm, Wit Jakuczun wrote:
> > > > Dnia Fri, 21 Mar 2008 13:13:32 -0700 (PDT)
> > > > "xgenera...@gmail.com" napisa=B3(a):
>
> > > > > I have a set of continuous variables x(i), i=3D1,.., N where x(i) =
can be
> > > > > negative, zero or positive. I'm trying to count, in some way, how =
many
> > > > > of x(i)'s are exactly zero. Is there any way to do so using linear=

> > > > > constraints?
>
> > > > Without introducing binary variables it is not possible. This means
> > > > you must switch to MIP. Moreover x(i)'s must be bounded.
>
> > > > Best regards
> > > > --
> > > > [ Wit Jakuczun ]
> > > > [ WLOG Solutions http://www.wlogsolutions.com]
>
> > > x(i)'s ae actually bounded above and below: LB(i) <=3D x(i) <=3D UB(i=
).
> > > But the problem is that x(i)'s can be either positive or negative.
>
> > Represent each x(i) with a sum of two auxiliary variables that
> > cannot be greater than zero at the same time.
>
> > Best
> > --
> > [ Wit Jakuczun ]
> > [ WLOG Solutions http://www.wlogsolutions.com]- Hide quoted text -
>
> > - Show quoted text -
>
> if x(i)=3Dxp(i)-xn(i) where xp(i) and xn(i) are two nonnegative slack
> variables, then to enforce exactly one of them to be zero I would
> need to maximize
> |x(i)|=3Dz=3Dxp(i)+xn(i).
> But this is not the case for me.

No, you don't need this. The trick of representing x(i) as a
difference of non-negatives goes back to the beginnings of LP and has
long been used in cases where the available LP requires >=3D0 variables
only. In any BASIC solution at most one of the two variables xp and xn
will be basic, or else both will be non-basic =3D 0. Of course, you
could have degeneracy, with a basic xp or xn being zero.

R.G. Vickson

Safety Articles | Usenet Groups | Usenet News | Bluegrass