📜 ⬆️ ⬇️

Painting and nails

There is a picture to which a long rope is tied at the two ends. It is required to hang it on the nails hammered into the wall so that when one of the nails are pulled out of the wall, the picture and rope fall.

The rope has a negligible thickness, is not torn and inextensible, nails do not bend and are perpendicular to the wall, there is no friction. In short, the problem is solved without any tricks and tricks.

UPD1 The solution for N = 2 almost simultaneously found FrollowMi , Goder and nightday . Now the most interesting thing remains: to find a generalized solution.

UPD2 No need to think that the overall solution follows from the solution N = 2. Recursion is a good thing, but already for 3 nails such a web is obtained, which is difficult to understand not only for me, but also for the author of the solution. For 4 or more there will be a hellish mix in general. The solution I know does not contain recursion.
')
UPD3 Recursive solution found Biga . Who can find easier?

UPD4 As promised, I bring my decision without recursion:
habrastorage.org/storage1/6eb17d07/4fd350e6/8d47396e/192e76df.png
It easily scales to any number of nails, it is enough to insert the necessary number of elementary links instead of dashed lines.
Disentangling scheme: nekaka.com/files/get/4HZV7BKSsx/rope.pdf

UPD5 User Kallikanzarid formalized the problem and brought a strict solution to it . (Take care of the brain :)

Source: https://habr.com/ru/post/132047/


All Articles