{"id":1286,"date":"2010-11-21T16:27:57","date_gmt":"2010-11-21T20:27:57","guid":{"rendered":"http:\/\/mat.tepper.cmu.edu\/blog\/?p=1286"},"modified":"2010-11-21T16:27:57","modified_gmt":"2010-11-21T20:27:57","slug":"keto-diets-and-linear-programming","status":"publish","type":"post","link":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/2010\/11\/21\/keto-diets-and-linear-programming\/","title":{"rendered":"Keto Diets and Linear Programming"},"content":{"rendered":"<p>In today&#8217;s <em>New York Times Magazine<\/em>, there is <a href=\"http:\/\/www.nytimes.com\/2010\/11\/21\/magazine\/21Epilepsy-t.html?ref=magazine\">an article on how a ketogenic (&#8220;keto&#8221;) diet can be used to control epileptic seizures in kids<\/a>.\u00a0 The diet is quite something.\u00a0 Referring to his son&#8217;s diet, the author Fred Vogelstein writes:<\/p>\n<blockquote><p>His breakfast eggs are mixed with heavy cream and served with bacon. A  typical lunch is full-fat Greek yogurt mixed with coconut oil. Dinner is  hot dogs, bacon, macadamia nuts and cheese. We figure that in an  average week, Sam consumes a quart and a third of heavy cream, nearly a  stick and a half of butter, 13 teaspoons of coconut oil, 20 slices of  bacon and 9 eggs. Sam\u2019s diet is just shy of 90 percent fat.<\/p><\/blockquote>\n<p>The diet contains almost no carbs, making it reminiscent of an Atkin&#8217;s diet during a particularly anti-carb phase.\u00a0 This diet has the effect of greatly reducing the number of seizures in many kids, including those who have not responded to any of the possible drugs.\u00a0 In Sam&#8217;s case, the seizures went from hundreds per day to perhaps a half dozen.<\/p>\n<p>While a diet of bacon and ice cream seems like heaven, it is actually very hard to do.<\/p>\n<blockquote><p>For Sam\u2019s diet to be effective, he must eat a certain number of <a title=\"In-depth reference and news articles about Diet - calories.\" href=\"http:\/\/health.nytimes.com\/health\/guides\/nutrition\/diet-calories\/overview.html?inline=nyt-classifier\">calories<\/a> every day with specific ratios of  fat, protein and carbohydrates. These are not back-of-the-envelope  calculations, but ratios that have to be hit exactly at every meal. If  Sam wants a snack after school, he gets 18 grams of bacon (about two  slices), 14 grams of macadamia nuts (about seven nuts) and 18 grams of  apple (less than an eighth).<\/p><\/blockquote>\n<p>You can&#8217;t just throw together everything without carbs and hope that things work:<\/p>\n<blockquote><p>To jump through these arithmetic hoops, Evelyn, who gave up her career  to take on the now full-time job of feeding Sam, plans meals on the  kitchen computer using a Web-based program called KetoCalculator. It is  hard to imagine how to administer keto without it. A meal for Sam might  have eight ingredients. Mathematically, there are potentially millions  of combinations \u2014 a bit more of this; a bit less of that \u2014 that gets you  to a 400-\u00adcalorie meal and a 3-to-1 ratio.<\/p><\/blockquote>\n<p>I don&#8217;t have access to the Calculator (you need to be referred to it by a doctor), but it would be interesting to know if the site goes beyond just being a calculator.\u00a0 Putting together ingredients to meet dietary requirements is a classical problem for linear programming. \u00a0 Rather than just determine if a set of ingredients meets the requirements, a linear-programming approach would put the ingredients together in an optimal way to meet the requirements while optimizing some objective (like maximizing use of ingredients you have not eaten in the last week, or maximizing use of some food you have a craving for).\u00a0 No hit-or-miss calculating:\u00a0 the combination would be guaranteed to meet the dietary requirements.<\/p>\n<p>You can check out the <a href=\"http:\/\/www-neos.mcs.anl.gov\/CaseStudies\/dietpy\/WebForms\/index.html\">NEOS server to experiment with putting together a traditional diet<\/a>.\u00a0 I would love to experiment with a site that creates keto diets.\u00a0 Imagine being able to turn an illegal, but palatable, meal into a legal meal by adding 3 macadamia nuts (and have the linear program automatically suggest that).<\/p>\n<p>In the past, I have used the <a href=\"http:\/\/mat.tepper.cmu.edu\/blog\/?p=520\">diet problem for laughs<\/a>, but this seems to be a real application for\u00a0 operations research that could be very useful (if it is not already being used).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today&#8217;s New York Times Magazine, there is an article on how a ketogenic (&#8220;keto&#8221;) diet can be used to control epileptic seizures in kids.\u00a0 The diet is quite something.\u00a0 Referring to his son&#8217;s diet, the author Fred Vogelstein writes: His breakfast eggs are mixed with heavy cream and served with bacon. A typical lunch &hellip; <a href=\"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/2010\/11\/21\/keto-diets-and-linear-programming\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Keto Diets and Linear Programming&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,6],"tags":[],"class_list":["post-1286","post","type-post","status-publish","format-standard","hentry","category-applications","category-blogs-and-web"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1286"}],"version-history":[{"count":0,"href":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1286\/revisions"}],"wp:attachment":[{"href":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mat.tepper.cmu.edu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}