Optimizing Healthy Eating Choices

Slide Note
Embed
Share

Explore how to make cost-effective, healthy food choices by optimizing the purchase of stir-fry and boba to meet specific calorie, sugar, and calcium goals. Learn how to find the cheapest way to stay healthy with this menu and determine the ideal quantities of stir-fry and boba to buy. Additionally, get insights on upcoming assignments and announcements related to optimization and AI problem solving.


Uploaded on Oct 10, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. 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 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 What is the cheapest way to stay healthy with this menu? How much stir-fry (ounce) and boba (fluid ounces) should we buy?

  2. Announcements Assignments: HW3 (online) Due Wed 2/6, 10 pm P1: Search & Games Due Thu 2/7, 10 pm HW4 (written) Released Wed 2/6 Due Tue 2/12, 10 pm P2: Optimization Released later this week Due Thu 2/21, 10 pm

  3. Announcements Midterm 1 Exam Mon 2/18, in class

  4. AAAI Conference Honolulu, HI

  5. AI: Representation and Problem Solving Linear Programming Instructors: Pat Virtue & Stephanie Rosenthal Slide credits: CMU AI, http://ai.berkeley.edu

  6. 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 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 What is the cheapest way to stay healthy with this menu? How much stir-fry (ounce) and boba (fluid ounces) should we buy?

  7. Optimization Graphical Representation Problem Description Optimization Representation ??? min ? s.t. ?? ?

  8. 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 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 What is the cheapest way to stay healthy with this menu? How much stir-fry (ounce) and boba (fluid ounces) should we buy?

  9. Constraint Satisfaction Problems Map coloring ??? ? s.t. ? ????????? ???????????

  10. Constraint Satisfaction Problems Map coloring ??? ? s.t. ? ????????? ??????????? Notation Alert!

  11. 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 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 What is the cheapest way to stay healthy with this menu? How much stir-fry (ounce) and boba (fluid ounces) should we buy?

  12. Optimization Formulation Diet Problem ??? ? s.t. ? ????????? ??????????? Healthy Squad Goals 2000 Calories 2500 Sugar 100 g Calcium 700 mg Cost Calories Calciu m Food Sugar Stir-fry (per oz) 1 100 3 20 Notation Alert! Boba (per fl oz) 0.5 50 4 70

  13. Optimization Formulation Diet Problem min ? ????(?) Objective s.t. ? ????????? ??????????? Healthy Squad Goals 2000 Calories 2500 Sugar 100 g Calcium 700 mg Cost Calories Calciu m Food Sugar Stir-fry (per oz) 1 100 3 20 Notation Alert! Boba (per fl oz) 0.5 50 4 70

  14. Optimization Formulation Diet Problem min ? s.t. ???????? ? ????????? ????? ? ????? calcium ? ????? ????(?) Healthy Squad Goals 2000 Calories 2500 Sugar 100 g Calcium 700 mg Cost Calories Food Sugar Calcium Stir-fry (per oz) 1 100 3 20 Boba (per fl oz) 0.5 50 4 70

  15. Optimization Formulation Diet Problem min ?1, ?2 s.t. 100 ?1+ 50 ?2 2000 100 ?1+ 50 ?2 2500 3 ?1+ 4 ?2 100 20 ?1+ 70 ?2 700 1 ?1+ 0.5 ?2 Healthy Squad Goals 2000 Calories 2500 Sugar 100 g Calcium 700 mg Cost Calories Food Sugar Calcium Stir-fry (per oz) 1 100 3 20 Boba (per fl oz) 0.5 50 4 70 Notation Alert!

  16. Optimization Formulation Diet Problem min ?1, ?2 s.t. ?1,1 ?1+ ?1,2 ?2 ?1 ?2,1 ?1+ ?2,2 ?2 ?2 ?3,1 ?1+ ?3,2 ?2 ?3 ?4,1 ?1+ ?4,2 ?2 ?4 ?1 ?1+ ?2 ?2 Cost 1 ? = 0.5 Limit 2000 2500 100 700 Calorie min Calorie max Sugar Calcium 100 100 3 20 50 50 4 70 ? = ? = Notation Alert!

  17. Optimization Formulation Diet Problem ??? min ? s.t. ?1,1 ?1+ ?1,2 ?2 ?1 ?2,1 ?1+ ?2,2 ?2 ?2 ?3,1 ?1+ ?3,2 ?2 ?3 ?4,1 ?1+ ?4,2 ?2 ?4 Cost 1 ? = 0.5 Limit 2000 2500 100 700 Calorie min Calorie max Sugar Calcium 100 100 3 20 50 50 4 70 ? = ? = Notation Alert!

  18. Optimization Formulation Diet Problem ??? min ? s.t. ?1,1 ?1 ?1,2 ?2 ?1 ?2,1 ?1+ ?2,2 ?2 ?2 ?3,1 ?1+ ?3,2 ?2 ?3 ?4,1 ?1 ?4,2 ?2 ?4 Cost 1 ? = 0.5 Limit 2000 2500 100 700 Calorie min Calorie max Sugar Calcium 100 100 3 20 50 50 4 70 ? = ? =

  19. Optimization Formulation Diet Problem ??? min ? s.t. ?1,1 ?1+ ?1,2 ?2 ?1 ?2,1 ?1+ ?2,2 ?2 ?2 ?3,1 ?1+ ?3,2 ?2 ?3 ?4,1 ?1+ ?4,2 ?2 ?4 Cost 1 ? = 0.5 Limit 2000 2500 100 700 Calorie min Calorie max Sugar Calcium 100 100 3 20 50 50 4 70 ? = ? =

  20. Optimization Formulation Diet Problem ??? min ? s.t. ?? ? Cost 1 ? = 0.5 Limit 2000 2500 100 700 Calorie min Calorie max Sugar Calcium 100 100 3 20 50 50 4 70 ? = ? = Notation Alert!

  21. Piazza Poll 1 What has to increase to add more nutrition constraints? ??? min ? s.t. ?? ? Select all that apply A) length ? B) length ? C) height ? D) width ? E) length ?

  22. Piazza Poll 1 What has to increase to add more nutrition constraints? ??? min ? s.t. ?? ? 2000 2500 100 700 100 100 3 20 50 50 4 70 ?1 ?2 1 ? = ? = ? = ? = 0.5

  23. Piazza Poll 2 What has to increase to add more menu items? ??? min ? s.t. ?? ? Select all that apply A) length ? B) length ? C) height ? D) width ? E) length ?

  24. Piazza Poll 2 What has to increase to add more nutrition constraints? ??? min ? s.t. ?? ? 2000 2500 100 700 100 100 3 20 50 50 4 70 ?1 ?2 1 ? = ? = ? = ? = 0.5

  25. Question If ? ? ?, which of the following also equals ?? ??? min ? s.t. ?? ? Select all that apply A) length ? B) length ? C) length ? Notation Alert!

  26. Linear Programming Linear objective with linear constraints ??? min ?. s.t. ?? ? As opposed to general optimization min ?. s.t. ??? 0, ? = 1 ? ?? ?0? ?? = ??, ? = 1 ?

  27. Linear Programming Different formulations Inequality form General form Standard form ??? ??? + ? ??? min ?. s.t. ?? ? min. ? s.t. ?? ? ?? = ? min. ? s.t. A? = ? ? 0 Important to pay attention to form!

  28. Linear Programming Different formulations Inequality form General form Standard form ??? ??? + ? ??? min ?. s.t. ?? ? min. ? s.t. ?? ? ?? = ? min. ? s.t. A? = ? ? 0 Can switch between formulations!

  29. Optimization Graphical Representation Problem Description Optimization Representation ??? min ? s.t. ?? ?

  30. Graphics Representation Geometry / Algebra I Quiz What shape does this inequality represent? ?1 ?1+ ?2 ?2 ?1

  31. Graphics Representation Geometry / Algebra I Quiz What shape does this inequality represent? ?1 ?1+ ?2 ?2= ?1 ?1 ?1+ ?2 ?2 ?1 ?1,1 ?1+ ?1,2 ?2 ?1 ?2,1 ?1+ ?2,2 ?2 ?2 ?3,1 ?1+ ?3,2 ?2 ?3 ?4,1 ?1+ ?4,2 ?2 ?4

  32. Piazza Poll 3 What is the relationship between the half plane: ?1 ?1+ ?2 ?2 ?1 and the vector: ? ?1,?2

  33. Piazza Poll 4 ? and initial point ?(0), Given the cost vector ?1,?2 Which unit vector step ?will cause ?(1)= ?(0)+ ? to have the lowest cost ???(1)? Notation Alert!

  34. Cost Contours ? where will Given the cost vector ?1,?2 ??? = 0 ?

  35. Cost Contours ? where will Given the cost vector ?1,?2 ??? = 0 ? ??? = 1 ? ??? = 2 ? ??? = -1 ? ??? = -2 ?

  36. LP Graphical Representation Inequality form ??? min ?. s.t. ?? ?

  37. LP Graphical Representation Inequality form, with no constraints ??? min ?.

  38. LP Graphical Representation Inequality form, with no constraints ??? min ?. s.t. ?1?1+ ?2?2 ?

  39. Piazza Poll 5 True or False: An minimizing LP with exactly on constraint, will always have a minimum objective at . ??? min ?. s.t. ?1?1+ ?2?2 ?

  40. Optimization Graphical Representation Problem Description Optimization Representation ??? min ? s.t. ?? ?

  41. 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 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 What is the cheapest way to stay healthy with this menu? How much stir-fry (ounce) and boba (fluid ounces) should we buy?

  42. Optimization Formulation Diet Problem ??? min ? s.t. ?? ? Cost 1 ? = 0.5 Limit 2000 2500 100 700 Calorie min Calorie max Sugar Calcium 100 100 3 20 50 50 4 70 ? = ? =

  43. Solving an LP Solutions are at feasible intersections of constraint boundaries!!

  44. Solving an LP Solutions are at feasible intersections of constraint boundaries!!

Related


More Related Content