Medicines to treat attention deficit hyperactivity disorder are in such short supply that hundreds of patients complain daily to the Food and Drug Administration that they are unable to find a pharmacy with enough pills to fill their prescriptions.

The shortages are a result of a troubled partnership between drug manufacturers and the Drug Enforcement Administration, with companies trying to maximize their profits and drug enforcement agents trying to minimize abuse by people, many of them college students, who use the medications to get high or to stay up all night.

Caught in between are millions of children and adults who rely on the pills to help them stay focused and calm. Shortages, particularly of cheaper generics, have become so endemic that some patients say they worry almost constantly about availability.

While the Food and Drug Administration monitors the safety and supply of the drugs, which are sold both as generics and under brand names like Ritalin and Adderall, the Drug Enforcement Administration sets manufacturing quotas that are designed to control supplies and thwart abuse. Every year, the D.E.A. accepts applications from manufacturers to make the drugs, analyzes how much was sold the previous year and then allots portions of the expected demand to various companies.