/
Warm-up: What to eat? We are trying healthy by finding the optimal amount of food to purchase. Warm-up: What to eat? We are trying healthy by finding the optimal amount of food to purchase.

Warm-up: What to eat? We are trying healthy by finding the optimal amount of food to purchase. - PowerPoint Presentation

importedferrari
importedferrari . @importedferrari
Follow
342 views
Uploaded On 2020-10-06

Warm-up: What to eat? We are trying healthy by finding the optimal amount of food to purchase. - PPT Presentation

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

stir fry optimization boba fry stir boba optimization cost calcium problem sugar healthy calories 100 representation calorie amount ounce

Share:

Link:

Embed:

Download Presentation from below link

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.


Presentation Transcript

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?

Slide2

Slide3

Announcements

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

Slide4

Announcements

Midterm 1 ExamMon 2/18, in class

Slide5

AAAI Conference

Honolulu, HI

Slide6

AI: Representation and Problem Solving

Linear ProgrammingInstructors: Pat Virtue & Stephanie Rosenthal

Slide credits: CMU AI, http://ai.berkeley.edu

Slide7

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?

Slide8

Optimization

s.t.  

Problem DescriptionGraphical Representation

Optimization Representation

Slide9

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?

Slide10

Constraint Satisfaction Problems

Map coloring

s.t.  

Slide11

Constraint Satisfaction Problems

Map coloring

s.t.  

Notation Alert!

Slide12

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?

Slide13

Optimization 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

Slide14

Optimization 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

Slide15

Optimization 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

Slide16

Optimization 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!

Slide17

Optimization Formulation

Diet Problem

s.t.

 

Limit

Notation Alert!

 

 

 

Stir-fry

Boba

Cost

Calorie min

Calorie max

Sugar

Calcium

Slide18

Optimization Formulation

Diet Problem

s.t.

 

Limit

Notation Alert!

 

 

 

Stir-fry

Boba

Cost

Calorie min

Calorie max

Sugar

Calcium

Slide19

Optimization Formulation

Diet Problem

s.t.

 

Limit

 

 

 

Stir-fry

Boba

Cost

Calorie min

Calorie max

Sugar

Calcium

Slide20

Optimization Formulation

Diet Problem

s.t.

 

Limit

 

 

 

Stir-fry

Boba

Cost

Calorie min

Calorie max

Sugar

Calcium

Slide21

Optimization Formulation

Diet Problem

s.t.  

Limit

 

 

 

Cost

Calorie min

Calorie max

Sugar

Calcium

Notation Alert!

Stir-fry

Boba

Slide22

Piazza Poll 1

What has to increase to add more nutrition constraints?

s.t.  

Select all that apply

length length height width length

 

Slide23

Piazza Poll 1

What has to increase to add more nutrition constraints?

s.t.  

 

 

 

 

Slide24

Piazza Poll 2

What has to increase to add more menu items?

s.t.  

Select all that apply

length length height width length

 

Slide25

Piazza Poll 2

What has to increase to add more nutrition constraints?

s.t.  

 

 

 

 

Slide26

Question

If

, which of the following also equals ?  s.t.  

Select all that apply

length

length

length

 

Notation Alert!

Slide27

Linear Programming

Linear objective with linear constraints

s.t.  

As opposed to general optimization

s.t.

 

Slide28

Linear Programming

Different formulations

s.t.  

Inequality form

Important to pay attention to form!

s.t.

 

General form

s.t.

A

 

Standard form

Slide29

Linear Programming

Different formulations

s.t.  

Inequality form

Can switch between formulations!

s.t.

 

General form

s.t.

A

 

Standard form

Slide30

Optimization

s.t.  

Problem DescriptionGraphical Representation

Optimization Representation

Slide31

Graphics Representation

Geometry / Algebra I QuizWhat shape does this inequality represent?

 

Slide32

Graphics Representation

Geometry / Algebra I QuizWhat shape does this inequality represent?

 

 

 

Slide33

Piazza Poll 3

What is the relationship between the half plane:

and the vector:

 

Slide34

Piazza Poll 4

Given the cost vector

and initial point ,Which unit vector step will cause to have the lowest cost

?

 

Notation Alert!

Slide35

Cost Contours

Given the cost vector

where will = 0 ? 

Slide36

Cost Contours

Given the cost vector

where will = 0 ? = 1 ? = 2 ? = -1 ?

= -2 ?

 

Slide37

LP Graphical Representation

s.t.  

Inequality form

Slide38

LP Graphical Representation

 Inequality form, with no constraints

Slide39

LP Graphical Representation

s.t.

 

Inequality form, with no constraints

Slide40

Piazza Poll 5

s.t.

 

True or False: An minimizing LP with exactly on constraint, will always have a minimum objective at .

 

Slide41

Optimization

s.t.  

Problem DescriptionGraphical Representation

Optimization Representation

Slide42

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?

Slide43

Optimization Formulation

Diet Problem

s.t.  

Limit

 

 

 

Cost

Calorie min

Calorie max

Sugar

Calcium

Stir-fry

Boba

Slide44

Slide45

Solving an LP

Solutions are at feasible intersectionsof constraint boundaries!!

Slide46

Solving an LP

Solutions are at feasible intersectionsof constraint boundaries!!