Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

A knotty problem.

by BrowserUk (Pope)
on Sep 29, 2003 at 01:54 UTC ( #294847=perlquestion: print w/ replies, xml ) Need Help??
BrowserUk has asked for the wisdom of the Perl Monks concerning the following question:

This is a challenge for a slightly practical purpose -- golf it if you want, though that's not my goal -- I just want the problem solved.

If you take a long narrow strip of paper or plastic, that is both flexible and strong -- a well flattened drinking straw is ideal -- and you tie a simple knot -- form a single loop and pull one end through -- and then pull it tight without crushing the width of the strip, you'll end up with a pentagon.

Excuse the ascii art. Take your strip, that should be at least 8 times as long as it is wide, an bend the ends, back, around and up until the ends cross. Take the end that is furthest from (tends to vary upon whether your left or right-handed) and bend it forward and over the other end and down, tucking the end through the loop. Pull it tight. It will take some juggling to get everything tight and flat, but when you've done it, you see that if you trimmed the two ends back to the knot, what would remain is the pentagon, with the five sides the same width as your strip.

1. 2. 3. A __ B__ ___B \ \/ / / / \/ / ^ / / /\ /_\/ ____________________ /_/\_\ \__| B |____________________|A \____/ \ \ \__\A

Now, if you lay the knot flat on the desk, you may be able to see that if you had 5 such knots and you positioned them correctly, you will end up with a larger pentagon. If you juggled the ends into each other, you can get them to hold together. And if you trim the ends fairly short before doing so, you would end up with the knots touching each other and the whole in the middle will also have 5 sides, with the vertexes of the inner pentagon diametrically opposed to the flats of the outer one.

Now the perl. Supplied with the diameter of circle which the inner edge would encompass, determine the width and minimum length of strip required to form the complete 5 knot pentagon.

From my experiments, it is near impossible to actually tie this. However, by leaving a larger gap between the knots, it is possible to have an outer pentagon with an inner decagon. So, also calculate the minimum length of strip required to achieve this with the inner decagon being regular. Ie. with all 10 inner edges the same size.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.

Comment on A knotty problem.
Download Code
Re: A knotty problem.
by Roger (Parson) on Sep 29, 2003 at 02:48 UTC
    Interesting experiment, I'd give it a go. Here's my solution -

    Assume the width of the paper strip is W. The small pentagon knot has side length of L, where L = W / cos(18 degree).

    The total length of paper required by the small pentagon knot is: (2*L + L*sin(18)) * 4 + L*sin(18).

    Five such pentagons are needed to build the large pentagon. Giving the total length requirement of ((2*L + L*sin(18))*4 + L*sin(18))*5, which simplifies to 47.725424859 * L. The relationship b/w L and the Diameter of the circle is: L = D * sin(36).

    Thus the perl code:
    # calculate length and width of paper strip # based on diameter of circle of inner edge sub NumberCrunch() { my ($diameter) = @_; my $L = $diameter * 0.58778525229; my $W = $L * 0.951056516; # W = L * cos(18) my $total_length = $L * 47.725424859; return ($total_length, $W); } ... my ($TotalLength, $PaperWidth) = NumberCrunch($Diameter);
    The above should give the minimum length and paper width required to fold such pentagon, given the diameter of the inner circle encompass the inner pentagon.

    Ok, this is just a quick solution I came up during my lunch break, don't be suprised if my number crunch is wrong. :-) I'd love to see other people's solution to this problem.

    Second solution: if inner is regular decagon, then L = D * sin(18), and Length = ((2*L + L*sin(18))*4 + L*sin(18) + L)*5, and W = L * cos(18). Simplify the equations and modify the perl script to get the solution for the second part of the question...

    PS. I vaguely remember seeing this knot in ancient greek geometry, where golden ratio and the self-repeating patterns were discussed.

      Thanks Roger++. That sorts me out.

      My problem, which is perfectly clear even from the ascii art, but eluded me last night is that my assumption that ...the pentagon, with the five sides the same width as your strip.... is completely falacious. The strip passes through the sides of the pentagon at an angle (of 18°), hence the width is just under 5% narrower than the length of the sides. Seemingly a small difference when the strip is only 10 mm wide, but multipled 48 times has a dramatic affect on the overall length of the strip.

      That explains why I was having trouble tying the dratted thing. I was 24mm short!


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
      If I understand your problem, I can solve it! Of course, the same can be said for you.

        ^_^ No problems.

        It was a fun problem to solve, and I am glad that you found my calculations useful. It made my lunch break very fun.
Re: A knotty problem.
by John M. Dlugosz (Monsignor) on Sep 29, 2003 at 19:01 UTC
    Ah, that brings back memories of the tractor-feed printer paper with tear-off sprocket margins.
Re: A knotty problem.
by gaal (Parson) on Oct 06, 2004 at 11:02 UTC
    Random comment: did you know that the diagonals of a perfect pentagon intersect at a golden ratio? Tying a simple knot with a strip of paper is thus one of the easiest ways of producing this ratio physically.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://294847]
Approved by jdtoronto
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-12-21 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (106 votes), past polls