464 Midterm 1 Flashcards

1
Q

Construct linear constraint: x in [a,b]

A

a <= x <= b

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Construct linear constraint: x in [a,b] or x in [c,d]

A

y in {0,1} ay+c(1-y) <= x <= by+d(1-y)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Construct linear constraint: x is one greater than a multiple of 3

A

x-1 = 3y, y in Z

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Construct linear constraint: x in {2,7,8,12,20}

A

y in {0,1}^5
x= 2y1+7y2+8y3+12y4+20y5
y1+y2+y3+y4+y5 = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Construct linear constraint: y <= |x|

A

w in {0,1}
y-x <= Mw
y+x <= M(1-w)
(M large)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Construct linear constraint: Ax <= b or Cx <= d

A

w in {0,1}
w(Ax) <= b
w(Cx) <= d

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Construct linear constraints where all variables are binary: x=1 or y=1

A

x+y >= 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Construct linear constraints where all variables are binary: x=1 xor y=1

A

x+y=1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Construct linear constraints where all variables are binary: exactly 5 of {x1,…,xn} are 1

A

summation from k=1 to n xk = 5

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Construct linear constraints where all variables are binary: If x=1 then y=1

A

x<=y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Construct linear constraints where all variables are binary: If x=1 then y=0

A

x<=1-y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Construct linear constraints where all variables are binary: If x1=1 and x2=1 then x3=0

A

x1+x2+x3<=2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Construct linear constraints where all variables are binary: If x1=1 and x2=0 then x3=0

A

x1-x2+x3<=1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Construct linear constraints where all variables are binary: x=y1 or y2

A

x>= y1
x>=y2
x<=y1+y2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Construct linear constraints where all variables are binary: x= y1 and y2

A

x<=y1
x<=y2
x>=y1+y2-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Construct linear constraints where all variables are binary: x = (not) y