We can choose the amount of stirfry ounce and boba fluid ounces Healthy Squad Goals 2000 Calories 2500 Sugar 100 g Calcium 700 mg Food Cost Calories Sugar ID: 813360
Download The PPT/PDF document "Warm-up: What to eat? We are trying heal..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Warm-up: What to eat?
We are trying healthy by finding the optimal amount of food to purchase.We can choose the amount of stir-fry (ounce) and boba (fluid ounces).
Healthy Squad Goals2000 Calories 2500Sugar 100 gCalcium 700 mg
FoodCostCaloriesSugarCalciumStir-fry (per oz)1100320Boba (per fl oz)0.550470
What is the cheapest way to stay “healthy” with this menu?
How much
stir-fry
(ounce) and
boba
(fluid ounces) should we buy?
Slide2Slide3Announcements
Assignments:HW3 (online)Due Wed 2/6, 10 pmP1: Search & GamesDue Thu 2/7, 10 pm
HW4 (written)Released Wed 2/6Due Tue 2/12, 10 pmP2: OptimizationReleased later this weekDue Thu 2/21, 10 pm
Slide4Announcements
Midterm 1 ExamMon 2/18, in class
Slide5AAAI Conference
Honolulu, HI
Slide6AI: Representation and Problem Solving
Linear ProgrammingInstructors: Pat Virtue & Stephanie Rosenthal
Slide credits: CMU AI, http://ai.berkeley.edu
Slide7Warm-up: What to eat?
We are trying healthy by finding the optimal amount of food to purchase.We can choose the amount of stir-fry (ounce) and boba (fluid ounces).
Healthy Squad Goals2000 Calories 2500Sugar 100 gCalcium 700 mg
FoodCostCaloriesSugarCalciumStir-fry (per oz)1100320Boba (per fl oz)0.550470
What is the cheapest way to stay “healthy” with this menu?
How much
stir-fry
(ounce) and
boba
(fluid ounces) should we buy?
Slide8Optimization
s.t.
Problem DescriptionGraphical Representation
Optimization Representation
Slide9Warm-up: What to eat?
We are trying healthy by finding the optimal amount of food to purchase.We can choose the amount of stir-fry (ounce) and boba (fluid ounces).
Healthy Squad Goals2000 Calories 2500Sugar 100 gCalcium 700 mg
FoodCostCaloriesSugarCalciumStir-fry (per oz)1100320Boba (per fl oz)0.550470
What is the cheapest way to stay “healthy” with this menu?
How much
stir-fry
(ounce) and
boba
(fluid ounces) should we buy?
Slide10Constraint Satisfaction Problems
Map coloring
s.t.
Slide11Constraint Satisfaction Problems
Map coloring
s.t.
Notation Alert!
Slide12What to eat?
We are trying healthy by finding the optimal amount of food to purchase.We can choose the amount of stir-fry (ounce) and boba (fluid ounces).
Healthy Squad Goals2000 Calories 2500Sugar 100 gCalcium 700 mg
FoodCostCaloriesSugarCalciumStir-fry (per oz)1100320Boba (per fl oz)0.550470
What is the cheapest way to stay “healthy” with this menu?
How much
stir-fry
(ounce) and
boba
(fluid ounces) should we buy?
Slide13Optimization Formulation
Diet Problem
s.t.
Notation Alert!
Healthy Squad Goals
2000
Calories
2500
Sugar
100 g
Calcium
700 mg
Food
Cost
Calories
Sugar
Calcium
Stir-fry
(per oz)
1
100
3
20
Boba
(per
fl
oz)
0.5
50
4
70
Slide14Optimization Formulation
Diet Problem
s.t.
Notation Alert!
Healthy Squad Goals
2000
Calories
2500
Sugar
100 g
Calcium
700 mg
Food
Cost
Calories
Sugar
Calcium
Stir-fry
(per oz)
1
100
3
20
Boba
(per
fl
oz)
0.5
50
4
70
Objective
Slide15Optimization Formulation
Diet Problem
s.t. calcium
Healthy Squad Goals
2000
Calories
2500
Sugar
100 g
Calcium
700 mg
Food
Cost
Calories
Sugar
Calcium
Stir-fry
(per oz)
1
100
3
20
Boba
(per
fl
oz)
0.5
50
4
70
Slide16Optimization Formulation
Diet Problem
s.t.
Healthy Squad Goals
2000
Calories
2500
Sugar
100 g
Calcium
700 mg
Food
Cost
Calories
Sugar
Calcium
Stir-fry
(per oz)
1
100
3
20
Boba
(per
fl
oz)
0.5
50
4
70
Notation Alert!
Slide17Optimization Formulation
Diet Problem
s.t.
Limit
Notation Alert!
Stir-fry
Boba
Cost
Calorie min
Calorie max
Sugar
Calcium
Slide18Optimization Formulation
Diet Problem
s.t.
Limit
Notation Alert!
Stir-fry
Boba
Cost
Calorie min
Calorie max
Sugar
Calcium
Slide19Optimization Formulation
Diet Problem
s.t.
Limit
Stir-fry
Boba
Cost
Calorie min
Calorie max
Sugar
Calcium
Slide20Optimization Formulation
Diet Problem
s.t.
Limit
Stir-fry
Boba
Cost
Calorie min
Calorie max
Sugar
Calcium
Slide21Optimization Formulation
Diet Problem
s.t.
Limit
Cost
Calorie min
Calorie max
Sugar
Calcium
Notation Alert!
Stir-fry
Boba
Slide22Piazza Poll 1
What has to increase to add more nutrition constraints?
s.t.
Select all that apply
length length height width length
Piazza Poll 1
What has to increase to add more nutrition constraints?
s.t.
Piazza Poll 2
What has to increase to add more menu items?
s.t.
Select all that apply
length length height width length
Piazza Poll 2
What has to increase to add more nutrition constraints?
s.t.
Question
If
, which of the following also equals ? s.t.
Select all that apply
length
length
length
Notation Alert!
Slide27Linear Programming
Linear objective with linear constraints
s.t.
As opposed to general optimization
s.t.
Linear Programming
Different formulations
s.t.
Inequality form
Important to pay attention to form!
s.t.
General form
s.t.
A
Standard form
Slide29Linear Programming
Different formulations
s.t.
Inequality form
Can switch between formulations!
s.t.
General form
s.t.
A
Standard form
Slide30Optimization
s.t.
Problem DescriptionGraphical Representation
Optimization Representation
Slide31Graphics Representation
Geometry / Algebra I QuizWhat shape does this inequality represent?
Graphics Representation
Geometry / Algebra I QuizWhat shape does this inequality represent?
Piazza Poll 3
What is the relationship between the half plane:
and the vector:
Piazza Poll 4
Given the cost vector
and initial point ,Which unit vector step will cause to have the lowest cost
?
Notation Alert!
Slide35Cost Contours
Given the cost vector
where will = 0 ?
Slide36Cost Contours
Given the cost vector
where will = 0 ? = 1 ? = 2 ? = -1 ?
= -2 ?
LP Graphical Representation
s.t.
Inequality form
Slide38LP Graphical Representation
Inequality form, with no constraints
Slide39LP Graphical Representation
s.t.
Inequality form, with no constraints
Slide40Piazza Poll 5
s.t.
True or False: An minimizing LP with exactly on constraint, will always have a minimum objective at .
Optimization
s.t.
Problem DescriptionGraphical Representation
Optimization Representation
Slide42Warm-up: What to eat?
We are trying healthy by finding the optimal amount of food to purchase.We can choose the amount of stir-fry (ounce) and boba (fluid ounces).
Healthy Squad Goals2000 Calories 2500Sugar 100 gCalcium 700 mg
FoodCostCaloriesSugarCalciumStir-fry (per oz)1100320Boba (per fl oz)0.550470
What is the cheapest way to stay “healthy” with this menu?
How much
stir-fry
(ounce) and
boba
(fluid ounces) should we buy?
Slide43Optimization Formulation
Diet Problem
s.t.
Limit
Cost
Calorie min
Calorie max
Sugar
Calcium
Stir-fry
Boba
Slide44Slide45Solving an LP
Solutions are at feasible intersectionsof constraint boundaries!!
Slide46Solving an LP
Solutions are at feasible intersectionsof constraint boundaries!!