It is extremely frustrating when you are walking and discover your shoelaces are untied.

It causes embarrassing moments from falling flat on your face and a puzzling reaction knowing you double-tied your shoelaces only a few moments ago.

Fortunately, there is an answer to it all at last.

Research suggests that a blend of two forces act like an invisible hand, first loosening the knot and then tugging until the laces trail on the ground, causing many hazardous situations.

The research at the University of California, Berkeley used a slow-motion camera, scientists revealed how knot-failure happens in seconds with the use of complex interaction of forces.

Lead researcher Christopher Daily-Diamond, University of California, Berkeley, said: "When you talk about knotted structures, if you can start to understand the shoelace, then you can apply it to other things, like DNA or microstructures, that fail under dynamic forces.

"This is the first step toward understanding why certain knots are better than others, which no one has really done."

The study began when co-author and graduate student Christine Gregg was tying her running shoes while her colleague recorded her jogging on a treadmill.

Ms Gregg said: "To untie my knots, I pull on the free end of a bow tie and it comes undone.

"The shoelace knot comes untied due to the same sort of motion.

"The forces that cause this are not from a person pulling on the free end but from the inertial forces of the leg swinging back and forth while the knot is loosened from the shoe repeatedly striking the ground."

Running shoes
The research was carried out in California using a slow-motion camera

The findings were published in the Proceedings of the Royal Society A journal.

The research revealed a high level of acceleration at the base of the knot before scientists used an impacting pendulum to swing the knot and experimented on different shoelaces.

While the research found some laces might be better than other for tying knots, they all suffered from the same fundamental cause of knot failure.

Adding weights to the loose ends of a swinging knot showed that laces untied themselves more frequently as the inertial forces on their ends increased.

"The interesting thing about this mechanism is that your laces can be fine for a really long time and it's not until you get one little bit of motion to cause loosening that starts this avalanche effect leading to knot failure," said Ms Gregg.