Linear Programs Flashcards

1
Q

What is Linear Programming?

What does it consist of?

A

Linear Program is an optimization problem.

It consists of:

  • A set of decision variables
  • A set of linear constraints on the variables
    • These are inequalities involving the variables, which only appear with exponent 1
  • An objecttive function to optimize (max or min)
    • This is any function involving the variables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define the following from the problem below:

  1. Decision variables
  2. Objective function
  3. Constraints
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the definition of the half-plane intersection problem?

A

Finding the intersection of a given set of half-planes

Definition: Given a set H consisting of n half-planes (eg. linear equalities), computer the intersection.

  • In other words, compute the set of points that are in every half-plane in H.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The intersection of half-planes is a convex polygon.

What is the definition of convex and convex polygon?

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

What is the observation for Case 1 of an intersection of a Convex Polygon with a Half-Plane.

Draw a diagram

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

What is the observation for Case 2 of an intersection of a Convex Polygon with a Half-Plane.

Draw a diagram

A

Important to note:

  • Half-plane h intersects the boundary of P in at most 2 points
  • Can find the intersection points by testing each edge of P, takes Theta(E) time, where E is the # of edges in P
  • Once the intersection points x,y are found, can construct P’ by start with x,y,(the intersection points) then adding vertices clockwise untiil we get back to x. Takes Theta(E) time.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the brute-force solution for Half-Plane Intersection problem.

What is the run time?

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

What is the divide for Half-plane intersection problem?

Input: a set H of n half-planes

A

Divide: Partition the set H into two sets H1 and H2 with equal size n/2

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

What is the conquer for Half-plane intersection problem?

Input: a set H of n half-planes

A

Conquer: Recursively compute the intersection of each set H1 and H2. This will return two convex polygons P1 and P2.

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

What is the Combine for Half-plane intersection problem?

Input: a set H of n half-planes

A

Combine: Compute the intersection of polygons P1 and P2

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

in the combine portion of the half-plane problem divide-and-conquer algo

p is an edge in P

q is an edge in Q

What does it mean to advance p or q?

What does it mean if we advance p or q?

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

cases: (red edge = p, blue edge = q)

Given this picture:

Are the edges pointing:

  • towards each other,
  • away from each other
  • p towards q
  • q towards p

Which edge should be advanced?

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

cases: (red edge = p, blue edge = q)

Given this picture:

Are the edges pointing:

towards each other,

away from each other

p towards q

q towards p

Which edge should be advanced?

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

cases: (red edge = p, blue edge = q)

Given this picture:

Are the edges pointing:

towards each other,

away from each other

p towards q

q towards p

Which edge should be advanced?

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

cases: (red edge = p, blue edge = q)

Given this picture:

Are the edges pointing:

towards each other,

away from each other

p towards q

q towards p

Which edge should be advanced?

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

In our polygon algorithm, how many times do we traverse each polygon at most?

What does that mean for total steps here?

A

At most twice,

so 2(Ep+Eq)

17
Q

What is the cost of each step of checking if the two polygons intersect?

18
Q

What is the worst case and actual cost of our comining polygons algo?

19
Q

What is the recurrence relation for the half-plan intersection problem?

Use the master theorem to determine the run time, what case does it fall under?