A computer program such as KetoCalculator may be used to help generate recipes.[47] The meals often have four components: heavy whipping cream, a protein-rich food (typically meat), a fruit or vegetable and a fat such as butter, vegetable oil, or mayonnaise. Only low-carbohydrate fruits and vegetables are allowed, which excludes bananas, potatoes, peas, and corn. Suitable fruits are divided into two groups based on the amount of carbohydrate they contain, and vegetables are similarly divided into two groups. Foods within each of these four groups may be freely substituted to allow for variation without needing to recalculate portion sizes. For example, cooked broccoli, Brussels sprouts, cauliflower, and green beans are all equivalent. Fresh, canned, or frozen foods are equivalent, but raw and cooked vegetables differ, and processed foods are an additional complication. Parents are required to be precise when measuring food quantities on an electronic scale accurate to 1 g. The child must eat the whole meal and cannot have extra portions; any snacks must be incorporated into the meal plan. A small amount of MCT oil may be used to help with constipation or to increase ketosis.[37]
Physicians of ancient Greece treated diseases, including epilepsy, by altering their patients' diet. An early treatise in the Hippocratic Corpus, On the Sacred Disease, covers the disease; it dates from c. 400 BC. Its author argued against the prevailing view that epilepsy was supernatural in origin and cure, and proposed that dietary therapy had a rational and physical basis.[Note 3] In the same collection, the author of Epidemics describes the case of a man whose epilepsy is cured as quickly as it had appeared, through complete abstinence of food and drink.[Note 4] The royal physician Erasistratus declared, "One inclining to epilepsy should be made to fast without mercy and be put on short rations."[Note 5] Galen believed an "attenuating diet"[Note 6] might afford a cure in mild cases and be helpful in others.[11]
The first modern study of fasting as a treatment for epilepsy was in France in 1911.[12] Twenty epilepsy patients of all ages were "detoxified" by consuming a low-calorie vegetarian diet, combined with periods of fasting and purging. Two benefited enormously, but most failed to maintain compliance with the imposed restrictions. The diet improved the patients' mental capabilities, in contrast to their medication, potassium bromide, which dulled the mind.[13] 
×