Like most cities around the world, New York City suffers from horrendous traffic.

A new MIT study suggests that UberPool and Lyft Line (the two apps’ carpool features that allow strangers to share a ride for a reduced fare) could be the key to cutting down on urban congestion.

If New Yorkers switched from private taxis to carpools, traffic would decrease dramatically, according to the researchers. Using data from 3 million taxi rides, they designed an AI algorithm that would both reduce congestion and wait time for the vehicles. The researchers used taxi ride data to understand how New Yorkers move by car (Just 23% of Manhattan households own personal cars).

First, the system plans the routes that the cars could take that day, prioritizing areas that it knows are usually busy. Throughout the day, the algorithm continually adjusts based on the requests that come in. It also takes into account the best type of vehicle to send (e.g. a 10-person van would be most efficient for neighborhoods with a lot of requests at once).

The more often people use the system, the smarter and more efficient it would become.

The system's algorithm would also eliminate the need for 75% of all NYC taxis (i.e. 10,190 cabs), according to the study. In addition to eliminating every private taxi, 3,000 four-person cars could serve 94% of car demand in NYC, and 2,000 ten-person vehicles could serve 95% of demand. On average, you would wait fewer than three minutes for the vehicle to show up.

"Ride-sharing services have enormous potential for positive societal impact with respect to congestion, pollution and energy consumption," Daniela Rus, the professor at MIT's Computer Science and Artificial Intelligence Laboratory who led the study, said in a press release.

While the report may seem idealistic, more Americans (especially city folk) are warming up to carpools.

In 2015, Lyft reported that 30% of its rides in NYC were carpools, and Uber said the same for more than half of its NYC rides in March 2016. That works out to over 12,700 Lyft Line rides and over 107,000 UberPool rides every day in the city.

Rus notes that MIT's system would best work with autonomous cars, which promise an unprecedented level of data. Driverless cars can track everything from what times people leave for work to which roads they take to the location of other carpools - data that would only make the algorithm more efficient.

Uber, Lyft, and legacy car manufacturers all have their own driverless car initiatives, and the former was the first company to rollout autonomous vehicles to a US city (Pittsburgh in September and Arizona in early 2017). Uber's driverless cars are not carpools, but Uber CEO Travis Kalanick has describedUberPool as the future of his company.

While the AI-driven communal rideshare is a possible solution to New York City's congestion, subways and buses are the still the fastest and most efficient way to move residents. And that probably won't change anytime soon.