As expected, both the anorexic and the healthy women showed activation in an area known as the ventral striatum, part of the brain’s reward center. But the anorexic women showed more activity in the dorsal striatum, an area involved with habitual behavior, suggesting that rather than weighing the pros and cons of the foods in question, they were acting automatically based on past learning.

“This is an important paper,” said Antonio Rangel, a professor of neuroscience, behavioral biology and economics at the California Institute of Technology who was not involved in the study.

The study’s findings, Dr. Rangel said, were “consistent with the idea that the habitual system may be in control over the behavior of the anorexic much more than in the general population.”

B. Timothy Walsh, the senior author of the report, said the study grew out of a theoretical paper he published in 2013. In that paper, he proposed that for women who are vulnerable to anorexia, weight loss initially serves as a reward, eliciting compliments, relieving anxiety and increasing self-esteem. Over time, though, the pairing of dieting with a reward — weight loss — may result in the act of dieting itself becoming rewarding.

This theory, said Dr. Walsh, a professor of psychiatry at the psychiatric institute at Columbia, might shed light on why treatment is more successful the earlier it is offered and less successful the longer the illness has been established. He predicted in the paper that as an anorexic patient’s dieting became more habitual, the dorsal striatum would become more involved.

“It helps to explain why treatments we expect to work, like antidepressants and cognitive therapy, don’t work very well,” Dr. Walsh said. “Habits have to be replaced with another behavior.”

For example, he said, one strategy might be to get the patient to look at entrees as well as at the salad bar, or to switch to eating with the left hand, as a reminder to think about eating different foods.