3 ms·
Assumptions: - we have balloons with no rings (just a knot ;-)) - we can't add any rings (cheating!) - we can make rings out of strings --------------------
by bartkappenburg 14y ago
Assumptions:
- we have balloons with no rings (just a knot ;-))
- we can't add any rings (cheating!)
- we can make rings out of strings
--------------------------------------------------
Solution: 1 string that makes a ring under the balloon, 1 that goes through that ring and has two rings at each end. 1 string through 1 ring for kid #1 and #2, 1 string through the other ring for kid #3 and #4. 4 strings in total ( general function f(N,M) => f(4,1) = 4 )
For 1 balloon an three kids you need 3 strings (1 as a ring under the balloon, 1 string through the ring. One end is held by kid #1, other end is a ring. 1 string through that ring and the ends are hold by kid #2 and #3) f(3,1) = 3.
Likewise:
f(2,1) = 2
f(1,1) = 1 <= trivial
Now for M balloons with M > 0. For 1 balloon you can have 1 string that makes a ring, for 2 balloons 1 string as well (interconnected). For 3 balloons you need 2 strings from 1 to 2 and from 2 to 3. Ergo: for M balloons you need M-1 strings.
Consider the fact that having 2 balloons or 100 balloons, you only need to attach a string to one of these interconnecting strings to float all the balloons if you release this string.
Hence: M balloons and 2 kids needs the same amount of strings for for example 1 balloon and 2 kids plus the interconnecting strings.
From here it follows that for M > 1 (and N>0) the general function is:
f(N,M) = (N-1) + (M-1)
(in words: you need M-1 interconnecting strings and one string less than the number of kids)
3D plot: http://www.wolframalpha.com/share/clip?f=d41d8cd98f00b204e9800998ecf8427ecs5d2lubni http://www.wolframalpha.com/share/clip?f=d41d8cd98f00b204e98...