Michel Langevin was playing hockey in an old timers' league when he collapsed near the blue line and his heart stopped. He describes what unfolded next as "almost a miracle."

It was a Friday the 13th -- in April 2007 -- but in the end, luck was on his side. A year earlier, the league had held a tournament to help raise funds for an automated external defibrillator for the community centre and arena in Sturgeon Falls, Ont. Installed in the lobby, it was mere steps from where Langevin suffered his cardiac arrest. He was revived by a shock from the AED, operated by a fellow player who had been trained just two weeks earlier on how to use it.

"Everybody that knows me is amazed at what happened or transpired that day. I was called Mr. 6-49," said Langevin, now 49, relating what others have told him about the time that he spent on death's doorstep.

"The defibrillator was in place. It only took two minutes for the defibrillator to get to me, or three minutes ... One of my best friends -- he was in my wedding party -- he was playing hockey with me and he saved my life. The arena was full. I also had two nurses that were watching the game and two policemen that came and assisted him ... It's unbelievable."

Proximity to an AED can make all the difference in such a case.

And now, it's hoped that mathematical modelling techniques developed by Toronto researchers to optimize the geographical placement of defibrillators will lead to more of the sort of confluence of events that kept Langevin alive, and -- after quadruple bypass surgery -- healthy enough that he was eventually able to play hockey again.

After working on the project for more than a year, Timothy Chan, a mathematician and engineer at the University of Toronto, and colleagues from St. Michael's Hospital, presented their research Monday at the American Heart Association conference in Chicago.

In particular, they looked at the placement of registered AEDs in Toronto and nearby Peel Region, as well as the location of out-of-hospital cardiac arrests from January 2006 to November 2009. They discovered that the current distribution was not optimal.

It's a challenging problem, Chan said, because it's difficult to predict where cardiac arrests are going to occur.

"What we did find is that using these location-based or geo-spatial modelling techniques, they actually are able to identify pockets of geographies where historically there have been cardiac arrests and there weren't necessarily any AEDs nearby," he said in an interview.

There were 1,414 out-of-hospital cardiac arrests, and 2,041 AEDs provided coverage within 100 metres for only 226, or 16 per cent.

The average distance to the closest AED was 487 metres, Chan discovered. At that distance, it would take a bystander about five minutes to get to it -- and then another five minutes to get back to the patient. Meanwhile, the probability of survival for the person suffering cardiac arrest declines by seven to 10 per cent with each passing minute.

Using the mathematical model, the team determined that the top five locations for additional AED placement would have covered an additional 51 out-of-hospital cardiac arrests.

Most of the largest clusters where cardiac arrests occurred and there was no AED nearby were in downtown Toronto, revealed Chan, who worked on the study with doctors Laurie Morrison and Steven Brooks.

"We're really just looking retrospectively now. We're hoping some of this will be able to guide ideas of, 'Are there geographies where there are a lot of people flowing through that don't have an AED nearby?' and that would be a priority area to target."

Defibrillation improves survival rates by up to 30 per cent if delivered in the first few minutes, according to the Heart and Stroke Foundation of Canada.

"Once we bring in defibrillation combined with early CPR -- that other link in the chain of survival -- we can improve the cardiac arrest survival rates by up to 50 per cent, if delivered in the first few minutes," said Brad Holland, general manager of the foundation's resuscitation programs.

He said the study on optimizing AED placement contains useful information that will help as the foundation tries to get more defibrillators into communities across Canada.

"We think this type of research is really important to help us understand how we might optimize outcomes, and improve survival for cardiac arrest victims," he said from Ottawa.

"More AEDs in public places will equal more lives saved. And the time to respond to a sudden cardiac arrest is really reduced as a result of the community availability of AEDs in Canada."

An important element is community engagement that would increase the number of bystanders who will get involved in a crisis, he said.

"People need to react quickly -- call 911 or their local emergency number, start CPR, and have someone get the AED."

As many as 45,000 people suffer a sudden cardiac arrest every year in Canada. The foundation says up to 85 per cent of cardiac arrests happen at home or in public places, and fewer than five per cent of victims survive.

Langevin will speak out whenever he has the chance about the value of a defibrillator. In the aftermath of his near-death experience, he discovered he had a hereditary condition in which his body produces cholesterol at a higher-than-normal rate.

"I want to make people realize that you have to get verified, or checked, to make sure that everything's OK because you never know," he said.

"I thought I was indestructible, that nothing could happen to me. It did."