LONDON - We all know about the problem of China's missing girls: the tens of millions of female babies who were selectively aborted after their sex was determined by ultrasound, or were born and then just allowed to die, as families seeking sons took drastic measures to cope with the one-child-per-family rule.
By 2020, China will have about 40 million more men of marriageable age than it has women for them to marry. But I have just realized where the solution will come from.
Other Asian countries have a deficit of daughters, too, especially where the families of brides are still expected to provide a dowry on marriage. But nowhere else has decreed that there can be only one child per family, as China did in 1980, so the dearth of girls is far more acute in China than it is anywhere else.
It took the new law a while to be enforced nationwide, and until the mid-1980s the gender ratio in Chinese newborns remained stable at about 108 boys to 100 girls. That suggests that there was already some female infanticide going on, since the global average is about 105 or 106 male births to 100 females, but it wasn't hugely different from elsewhere.
Males die in greater numbers at every age, so more male babies mean that the gender ratio is more or less even for people in their 20s and 30s (and very old people are overwhelmingly female).
By the later 1980s, the ratio in China was beginning to skew sharply in favor of male babies, and by 2000 there were 117 boys born for every 100 girls. In some mainly rural counties, according to the latest official statistics, the ratio is now up to 132 to 100.
The one-child policy has been a success in curbing runaway population growth - officials estimate that it has prevented the births of about 300 million children, who would have swollen China's current population of 1.3 billion by almost a quarter - but the price has been very high.
That price was initially paid almost entirely by girls, but in the end there is a price to be paid by the boys as well. The children born in the late 1980s, the first to be seriously affected by the growing gender imbalance in births, are now in their late teens or just turning 20.
Almost any girl who wants a husband will find one - but millions of the boys will not find a wife. The girls who might have married them were never born.
Two years ago, a prominent Chinese demographer publicly addressed the problem for the first time. Li Weixiong, who advises the Political Consultative Committee on population issues, warned that "such serious gender imbalance poses a major threat to the healthy, harmonious, and sustainable growth of the nation's population and would trigger such crimes and social problems as abduction of women and prostitution." But it could be worse than that.
Even if the one-child policy were abolished tomorrow (which will not happen), the next 20 years will see some 40 million spare males, for whom there are no females, reach maturity. And the "social problems" do not necessarily stop at occasional acts of abduction or a rise in prostitution.
No sane government would want to rule over a country where there are 40 million unattached males between the ages of 20 and 40 rattling around with nobody to go home to in the evenings. That is a recipe for riot or even revolution. So if China has not made enough girls, it will just have to import them.
China is not a country that welcomes immigration, for obvious demographic reasons but also for deeply rooted cultural reasons. There is great pride in the long history and the cultural and even racial homogeneity of the Han Chinese population, which often verges on a polite form of racism. Foreign brides often have a hard time fitting into Chinese families who are less than delighted by their son's choice. But China as a whole no longer has a choice in the matter.
Tens of millions of men are condemned to lives of loneliness and celibacy, or at best furtive visits to prostitutes. But they live in an economy that is rapidly growing richer and, out in the poorer countries of Asia, are millions of young women who would be happy to ease their loneliness and share their prosperity. The solution is obvious, and no government on earth could stop it. No sane government would want to.
The implications of this impending huge influx of foreign brides are very large. China has never seen immigration on this scale before, and it is bound to resist the big cultural changes that come with it.
Tens of millions of the next generation of children born in China will have foreign mothers, and relatives abroad who expect to be visited or to come and visit once in a while. There will be some personal tragedies, and a great deal of happiness, and at the end of it all China will be a changed place.
Changed for the better, for the most part. It's just a pity about all those Chinese girls, aborted, killed as infants, or allowed to die of neglect, who won't be around to see it.
Gwynne Dyer is a London-based independent journalist.