"I began thinking about going to medical school," he says. "I saw that medicine would allow me to express all aspects of my creativity."

Segev moved to Baltimore in 1992 to attend medical school at Hopkins. In 2005, he founded the Charm City Swing Club, which has grown to 2,000 members under the name Mobtown Ballroom.

It was swing dancing that brought the couple together. They met in 1999 at the American Lindy Hop Championships and married four years later.

"In the dance community, everyone kind of knows each other," Gentry says. "When I moved to Boston, people started immediately telling me about Dorry, who was doing research at Harvard. And they started telling Dorry about me. Something told them we were compatible."

As a teen, young Sommer was a goofball, known for wearing stickers on her face.

But she also became so immersed in her studies that she would fall asleep with her head in her books. After the girl won the academic decathlon for Ventura County, her mother told the Los Angeles Times that she sometimes had to order the 16-year-old to stop studying and go to the mall.

Sommer discovered her calling in calculus, with its glimpses of hidden order.

"Math isn't about numbers," Gentry says. "It's about finding patterns and structures. It's about recognizing that problems that look different — like scheduling airline flights and kidney transplants — have the same mathematics underlying them. That's exciting and beautiful."

Her approach to problem-solving is high-minded and playful. While studying for her doctorate, Gentry taught a robot named Fred (for Fred Astaire) to dance. Tutoring him in the Lindy Hop required mastering math concepts that came in handy when she worked on organ transplants.

"I like math that can change the world," Gentry says, "math that's about real things, math that can help people make better decisions."

At the moment, the couple is trying to fix what Segev describes as "the huge geographical disparity in access to donated organs."

"Depending on where you live," he says, "your waiting time for a new organ may be six months, or it may be 10 years."

Surgeons can only transplant organs that come from otherwise healthy adults who have died traumatically or from a disease such as a stroke that can't be transmitted to the recipient.

Rural areas have a bigger supply of donors, Roberts said, because a greater proportion of their deaths result from car crashes and other accidents. Conversely, cities have a dearth of available organs.

For people awaiting liver transplants, the inequity can be a matter of life and death.

"If you don't get a liver in the right amount of time, you'll die," Segev says. "At certain disease severities, patients in some parts of the country might have a 15 percent chance of dying in the next three months. But patients living in other parts of the country might have a 90 percent chance of dying."

Gentry and Segev recently finished a formula that they think will remedy this disparity while staying within the deadlines imposed by a liver that can survive only 12 hours outside the body.

"There's a trade-off between the transport time it takes to get a liver someplace and how fair you want the access to livers to be," Gentry says. "I'm looking at it mathematically as a redistricting problem. The organ transplant system is divided into regions. The same way that congressional districts can be gerrymandered to provide political advantages, the geographic boundaries of regions for livers can be redrawn so that each region has an appropriate balance of demand and supply."

Segev and Gentry realize their new formula is unlikely to win universal acclaim.

As Roberts puts it: "If half the people have to wait longer for a liver, they're going to be upset."