For more than 40 years, Oliver O'Reilly's shoelaces have been coming untied pretty much every day. And for most of those 40 years O'Reilly didn't think too much about it.But then, about a decade ago, his daughter Anna was learning to tie her shoes, and O'Reilly decided his shoelace problem wasn't worth passing on to another generation."I didn't want her to inherit my problems, so I went online and found some really helpful videos to teach me how to tie her shoelaces," he says.And, perhaps if O'Reilly had had a different job, that's where the shoelace problem would have stopped. But Oliver O'Reilly is a professor of mechanical engineering at the University of California, Berkeley, and as he looked at videos of shoelace knots, he started wondering why they came untied in day-to-day life."That problem always stuck in my mind," he says.Now, he and two graduate students have published a paper, in Proceedings Of The Royal Society A, titled "The roles of impact and inertia in the failure of a shoelace knot."In order to study how shoelaces untie themselves, the team did a handful of experiments. "We did all sorts of stuff," says graduate student and co-author Christine Gregg. "We ran on treadmills. We swung our legs back and forth while sitting on tables, to take the impact out of the equation. We just stomped our feet like Frankenstein."In all, they estimate it was well over 100 hours of testing, over about two years."We were wandering the halls of the mechanical engineering building just staring at our shoes, watching them come untied," Gregg says.Gregg's feet are featured in this slow-motion video they shot at the campus gym.Chris Daily-Diamond, the third co-author, shot the video and did a lot of the legwork (pun intended) on the experiments.Based on the video, and the other tests they did on shoelace knots, the team says two things happen when a lace comes untied. First, the impact of the shoe on the ground loosens the knot. With the knot loosened, the whipping of the free ends of the laces — as the leg swings back and forth — makes the laces slip.As the foot hits the ground and the laces swing repeatedly, the knot loses integrity until, in a matter of seconds, it fails altogether.The researchers also have some advice to keep shoes from coming untied. It's all in how you tie the knot.Basically, there are two similar ways to tie your shoelaces in a bow. The knots look almost identical, but one is significantly stronger than the other. Here's a diagram the researchers made of how the knots differ.The easiest way to tell if you're tying a strong bow or a weak one is by looking at how the finished bow naturally lies on your shoe. If it lies across the shoe, perpendicular to your foot, it's the stronger knot. If it lies down the top of your shoe, parallel to your foot, it's the weaker knot.If you find (as all three researchers and I did) that you are habitually tying the weaker version on your own shoes, Gregg says there is a theoretically simple way to fix it."Just go the other way around your loop when you're tying the last part of the [bow]," she explains, although years of muscle memory can make this easier said than done.Gregg has been the most successful at transitioning to the strong knot in daily life, says Daily-Diamond. "Oliver and I are still in rehab."In the paper, the researchers also reference this popular 2005 TED talk by Terry Moore about how to tie your shoes better.Daily-Diamond says there still is a lot of work to be done, beyond the shoelace example, about how tangles or knots come untied in dynamic situations. And the scientists say an unnamed shoe company has already approached them about their work, as well. Copyright 2017 NPR. To see more, visit http://www.npr.org/.