On a ketogenic diet, you’re generally eating a diet that’s high in fat (roughly 70 percent of your total calories come from fat), moderate in protein (about 20 percent of your calories), and low in carbohydrate (about 5 percent of calories). By limiting carbohydrates (to usually less than 45 grams for the average person), your body lacks the glucose (from carbs) that it normally uses for energy, so it eventually switches over to burning fat as its primary fuel source instead; through a metabolic process called ketosis, the liver converts the fat into fragments of fatty acids called ketones, which power the brain and other organs and tissues.
The first modern study of fasting as a treatment for epilepsy was in France in 1911. 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.