Inspiration comes in many forms, as it did for four teenage girls whose work on breast cancer has brought them to Washington for the final stages of the nation’s most prestigious science competition.

In many cases, it comes from sorrow, as it did for Esha Maiti, a 17-year-old from San Ramon, Calif. Maiti became interested in learning how cancer cells spread after her grandmother died from breast cancer at age 63. Maiti developed a mathematical model that uses information on the size, location and growth rate of primary tumors to predict how a particular tumor will spread. Sara Sakowitz, a 17-year-old from New York, also became interested in breast cancer research when she realized her family may be predisposed to cancer after several family members died from it. Her biochemistry project looks at how a certain protein inhibitor may be used to treat metastatic breast cancer.

In others, the inspiration comes from curiosity, as it did for Stanford University-bound Angela Xiangyue Kong of San Jose, Calif. When she was in 9th grade, she noticed that her female cat Sassy was spotty, while her male cat Sam was not. She wondered why and learned that it was because a chromosome had been turned off in one cat and not in the other. Three years later, her curiosity brought her to the finals of the science competition for her work on how normal cells transform into cancer cells and allow breast cancer to spread. As she explained to me, her research tells a protein that represses the spread of cancer to “wake up and get to work.”

Likewise, Natalie Ng of Cupertino, California, was curious about why so many breast cancer patients who undergo chemotherapy and suffer through its harsh side effects fail to benefit from the therapy. She developed a statistical model that may predict the spread of breast cancer cells more accurately and thus bring more precision to breast cancer treatment.

These breast cancer researchers are four of the 40 finalists competing for $630,000 in prizes in the annual Intel Science Talent Search, a program of Society for Science & the Public. Winners will be announced in a black-tie gala at the National Building Museum on Tuesday. The award ceremony will be broadcast live on the Web, starting at 7:35 p.m.

These girls know that they’ve reached a pinnacle in their high school science careers. How did they get there?

They all had mentors and teachers who helped. Kong, who as a youngster felt that she “might not be smart enough to do science,” was lucky that she had a teacher who told her that “all it takes to be good in science is curiosity.” Kong, of course, learned a lot about curiosity from her cats. Maiti, a senior at California High School, was guided by a professor at Harvard Medical School, while Ng, who is a senior at Monta Vista High School, benefitted from Ingenuity systems and the labs at Stanford University.

Others had surprising influences.

Sakowitz, a senior at the Brearley School, who turns 18 on Saturday and says winning the top prize would be “the best birthday present ever,” had a unique source of influence. While still a budding researcher, she met a girl scientist who she described as “the coolest person ever. She looked so together. She seemed to have it all.” Sakowitz was speaking about Michelle Hackman, a young scientist who happens to have earned second place in the 2011 science competition.

These girls have to spend a lot of time in the lab to make it this far, but they don’t live in their labs.

They read extensively and think about where their science careers might lead them.

“I just loved Caddy in Faulkner’s ‘The Sound and the Fury,’” Sakowitz said. “She’s a headstrong girl, but one who is seriously flawed.” As a kid, she looked up to Hermione of Harry Potter fame as one girl who projects a positive image of a girl scientist. “When I saw her working on her potions,” she recalled, “I said to myself ‘That’s science!’”  Kong enjoyed Siddhartha Mukherjee’s Pulitzer-prize winning study of cancer, “The Emperor of all Maladies,” for the way it broadened the applications of science to fields like politics and marketing.

Kong has the normal worries of a successful young woman when thinking about her future. “Will I be able to balance my work and family life in twenty years,” she wondered, adding that the message in Sheryl Sandberg’s book “Lean In” resonated with her.

Dostoyevsky’s “Crime and Punishment” sends a particularly apt message against nihilism and the need to explore bigger ideas. “These thoughts tie into concerns about how to balance work and life,” Kong added.

With her science project completed, Maiti now has time to read literary novels and magazines. When I asked whether the 17-year-old reads the magazine Seventeen, she laughed and said, “No, I read Scientific American!”

Of course, as talented as these girls are, they have had some setbacks in their lives.

I asked Ng to tell me one nonscientific failure she’s encountered.

“I try not to remember those,” Ng warned me, “but one thing I can tell you is that I can’t dance!”

Even if you spent 10,000 hours trying, I asked, referring to Amy Chua’s Tiger Mom and Malcolm Gladwell’s research that 10,000 hours is what’s needed to become an expert.

“Nope,” she said. “Not even with 10,000 hours of practice.”

It’s nice to see that these young scientists are so down to earth.

Which they are, except in one way.

These scientists can look up into the galaxy and say “there’s my asteroid.” That’s true. Since 2001, MIT’s Lincoln Laboratory’s Ceres Connection program has named minor planets in honor of the top award winners in the annual science talent competition.