Jon Birger is a freelance writer, a contributor to Fortune magazine and the author of "DATE-ONOMICS: How Dating Became a Lopsided Numbers Game."

Per DATE-ONOMICS, the math here doesn’t work. (iStock)

There’s a scene in “The Fires of Autumn,” Irene Nemirovsky’s novel set in 1920s France, in which a young war widow named Therese thinks she is being courted for marriage by her childhood friend Bernard — only to discover that he wants nothing more than a fling.

He, in turn, is baffled by her unwillingness to carry on a casual affair. Given the shortage of young men in post-World War I Europe — 10 million soldiers died and 20 million were wounded, many grievously — Bernard wonders why any bachelor would want to settle down. “You want to have some fun?” he asks Therese rhetorically, “Fine. You don’t? Goodbye. There are too many women and they’re all too easy to make it worthwhile.”

I was reminded of this while reading Vanity Fair’s much-publicized piece, “Tinder and the Dating Apocalypse,” which naively blames today’s “hookup culture” on the popularity of a three-year-old dating app. I say “naively” because it’s not the first time some newfangled technology has been mistakenly blamed for young people having more sex.

At present, it’s Tinder. But the moralizers of Nemirovsky’s era fooled themselves into believing that the automobile was to blame for loosening sexual mores. “A house of prostitution on wheels” was how one judge described it at the time.

Today’s hookup culture does have one big thing in common with the ’20s flapper generation, and that is demographics. In the Vanity Fair article, David Buss, a University of Texas psychology professor, says that apps like Tinder contribute to “a perceived surplus of women,” among straight men, which in turn leads to more hookups and fewer traditional relationships. Here’s the thing: This surplus of women is not just “perceived” but very, very real.

As I argue in “DATE-ONOMICS: How Dating Became a Lopsided Numbers Game,” the college and post-college hookup culture is a byproduct, not of Tinder or Facebook (another target of modern scolds), but of shifting demographics among the college-educated. Much as the death toll of WWI caused a shortage of marriageable men in the 1920s, today’s widening gender gap in college enrollment has created unequal numbers in the post-college dating pool.

In 2012, 34 percent more women than men graduated from American colleges, and the U.S. Department of Education expects this gap to reach 47 percent by 2023. The imbalance has spilled over into the post-college dating scene. According to data from the Census Bureau’s American Community Survey, there are now 5.5 million college-educated women in the United States between the ages of 22 and 29 vs. 4.1 million such men. In other words, the dating pool for straight, millennial, college graduates has four women for every three men. No wonder some men are in no rush to settle down and more women are giving up on what used to be called “playing hard to get.”

These demographics represent the true dating apocalypse, as stacks of social science show how dating and mating behavior is influenced by prevailing sex ratios. When there are plenty of marriageable men, dating culture emphasizes courtship and romance, and men generally must earn more to attract a wife. But when gender ratios skew toward women, as they do today among college grads, the dating culture becomes more sexualized. The good news, at least according to the work of psychologists and sex-ratio pioneers Marcia Guttentag and Paul Secord, is that people tend to have better sex when ratios skew female. The downside? Women frequently wind up being treated as sex objects, and men are more inclined to exercise the option to delay marriage and play the field. As I note in my book, today’s uneven gender ratios “add up to sexual nirvana for heterosexual men, but for heterosexual women — especially those who put a high priority on getting married and having children in wedlock — they represent a demographic time bomb.”

Of course, these lopsided numbers might not matter if young, college-educated women become more willing to date — and, eventually, marry — across socioeconomic lines. But according to separate research by University of Pennsylvania economist Jeremy Greenwood and by UCLA sociologists Christine Schwartz and Robert Mare, educational intermarriage is less common today than at any point over the past half century.

Because the pool of college-educated women is much larger, the unwillingness of college-educated men to consider working-class women as life partners has little statistical effect on their marriage prospects. But for college-educated women, excluding working-class guys makes their dating math much more challenging. If there is an undersupply of men in the college-educated dating pool, there is going to be an oversupply of men in the non-college-educated one. Indeed, there are 1.5 million more non-college-educated men than women among Americans age 22 to 29. Bottom line: New York City women looking for a match would be better off, statistically at least, at a fireman’s bar in Staten Island than a wine bar on the Upper East Side.

The dynamics, and numbers, shift when we expand the conversation from different-sex to same-sex dating. Obviously the lesbian dating market is unaffected by how many men there are, just as the dating market for gay men is unaffected by how many women there are. However, gender ratios within the LGBT community do affect different-sex dating, oddly enough. According to Gary Gates, a UCLA researcher and a leading expert on LGBT demographics, cities known for being LGBT-friendly (New York, Washington, Miami, etc.) have disproportionate numbers of gay men, but not of lesbians. Consequently, the different-sex dating markets in these cities are worse for women than the overall census numbers imply. DATE-ONOMICS illustrates that Manhattan’s hetero, college-grad, under-30 dating pool has three women for every two men — which, like it or not, is exactly the sort of sexual playground for men portrayed by Vanity Fair.

Regardless of orientation, not all women, of course, place a premium on marriage, or even monogamy. But for the straight, college-educated woman who is eager to get married and start a family, the question becomes how best to deal with a dating market in which men have too much leverage.

Dating and marrying across socioeconomic lines — “mixed-collar” marriages, if you will — is one possible remedy. I’d also urge marriage-minded women not to put off getting serious about dating because the math will only get worse over time. Call it the musical chairs problem: Nearly everybody finds a chair in the first round. By the last round, however, there’s a 50 percent chance of not getting one. Similarly, in a dating pool that starts out with 140 women and 100 men, the gender ratio among those still single soars from 1.4:1 to more than 2:1 once half the women get married.

Another solution (at least for the frustrated women interviewed by Vanity Fair) would be to quit Manhattan, which is one of the worst dating markets in the country for educated young women. Indeed, their new mantra should probably be “Go West, Young Woman.” The Western part of the country, in general, has more balanced gender ratios than those found east of the Mississippi River. California and Colorado, for example, each have 20 percent more college-grad women than men age 22 to 29 compared with 36 and 41 percent, respectively, in Illinois and North Carolina.

Unsurprisingly, men tend to be less — I’ll say it — promiscuous when women are more scarce. Consider Santa Clara County, Calif., home to Silicon Valley and the only well-populated area in the country where male college grads outnumber female ones by a significant margin. There, it’s women who have the dating leverage. “I think it’s pretty good for the girls,” one single woman told the San Jose Mercury News a few years back. “You can be more picky,” because guys “have to try harder.”

Perhaps as a result, 33 percent of college-educated women age 22 to 29 are married vs. 13 percent in Manhattan. Santa Clara County’s marriages happen to be more stable too: Among college-grad women in their 30s, 4 percent are separated or divorced vs. 7 percent in Manhattan.

Just goes to show that demographics trump technology, even in the land of a million apps.