It is a cliche to say that India is full of contradictions. But the fact that it can send rockets into space, produce billionaires who run global leviathans and explode nuclear devices while failing to build toilets is perhaps the starkest of them all.
The gang rape of two teenage girls in Uttar Pradesh on May 28 highlighted the dangers for women of having no toilet in their homes. The girls went out into the fields at night where they were raped and killed.
A joint World Health Organisation and Unicef report published last month said 597 million Indians, or 55 per cent of households in India, defecate in the open.
There are at least five implications.
First, it is a disgrace, an affront to human dignity. Travel on early morning trains and you flinch from the sight out the window: rows of exposed bottoms of squatting males lining the tracks as the train passes villages.
Second, open defecation gives children gastro-intestinal ailments which prevent them from retaining the nutrients in their food, leading to malnutrition.
Third, it is a massive health issue for everyone. The failure to remove human excreta leaves it within range of further human contact, causing disease. Absorbed into the earth, it also contaminates water sources.
Fourth, according to Unicef, 28 million Indian children have no toilet facilities in school. Not surprisingly, girls, when they start menstruating, drop out.
Finally, for women it is a dreadful daily scourge. When they venture out in the dark, men from the village can taunt them, flash torchlights at them through the crops where they crouch in the fields, or ambush and sexually assault them.
Despite all these problems, India has more mobile phones than toilets. The reason is that no government has made toilet-building a priority. This forms part of a wider picture of terrible sanitation. India's cities and towns are filthy. It took nothing less than the bubonic plague in the city of Surat in 1994 to make the municipal authorities improve sanitation.
Building toilets would not be easy even if the political will existed. The Urban Development Ministry's statistics for 2011 show that half of India's cities have no piped water or sewers. Even if they do, only 13 per cent of piped sewage is treated.
The beautiful Dal Lake in Srinagar has the city's raw sewage pumped into it. The "sacred" River Ganges receives almost 3,000 million litres of sewage every day from five cities that line its banks, most of it untreated.
The government has been building toilets since 1986. Yet three decades later, only 30 per cent of Indians have toilets. Corruption is partly responsible. Government funds for toilets are siphoned off on a colossal scale.
In truth, though, it is a daunting challenge. The 1.2 billion population keeps outgrowing the pace of toilet building. How do you build toilets in villages where there are no septic tanks, piped water or sewage pipes?
And we are talking about vast regions. Uttar Pradesh, for example, is the size of France. If it were a country, it would be the seventh biggest in the world in terms of population.
Even if a government could miraculously build the vast sewage and piped water network that is required, water remains a key issue. As conservationists point out, there is simply not enough water to provide all Indians with a flush toilet.
They are right. It is pointless aping developed countries when it comes to toilets. The Indian toilet of the future, if it is to be built on a gargantuan scale, will perforce have to be different.
One man who has devoted his life to thinking about toilets is social reformer Bindeshwar Pathak. His organisation, Sulabh International, has devised a dry, compost toilet for Indian conditions. It requires 90 per cent less water than a conventional toilet and converts the human waste into compost. A million such toilets are currently in use.
Why the government has not developed this toilet on a mass scale is a mystery. But at least it has decided to partner with the Melinda and Bill Gates Foundation, which launched the Reinvent the Toilet Challenge in 2011 to encourage innovative designs for poor countries.
The foundation gives grants to selected teams whose brief is daunting. Invent a toilet able to operate without water, sewer or electrical connections that costs only a few cents a day to operate.
If Mr Bill Gates succeeds, Indian Prime Minister Narendra Modi might throw his weight behind the winning design. He has said he wants to build a toilet in every Indian home.
But Mr Modi will also have to overcome another problem. Research by non-government organisations and United Nations agencies has shown that some rural Indians prefer to answer nature's call in the fields.
They find it "disgusting", "suffocating" and "embarrassing" to do their business in an enclosed closet inside their home.
That is why sanitation volunteers often find a new toilet being used as a store room for kitchen utensils. Or why some families prefer to use the government grant they receive for a toilet to build a room instead.
Experts say it will take time to change the habit of centuries. The sooner, the better.
The writer, a former BBC journalist, is a freelance journalist based in New Delhi.