Problem 52839. Easy Sequences 33: Web Trapped Ant
Solution Stats
Problem Comments
-
5 Comments
My results are all different, although the formula gets the right result in all the simple cases like hs=H/2; ha=H/2; xs=0; xa=0; etc...
I’m checking my solution…
Hi William,
I updated the test suites. I made a mistake in using full diameter instead of the semicircle's diameter. I also added a clarification to ensure only one option is considered.,
With regards to your solution. I think that your algorithm will work only if both the ant and spider are in the same side. Please take note that the ant is inside and the spider is outside. Please try again. Thanks.
The dotted line doesn't show it, but presumably the spider has to go up, over the top edge of the can, and down again. Also it can presumably choose whether to go clockwise or counterclockwise.
Hi William, I've included one solution into the problem itself. I hope this clarifies everything. Of course the circumference will not change. But if you would not consider inside/outside, the insects will appear to be closer together, and you will be get shorter distance than the correct one.
Solution Comments
-
7 Comments
Hi William,
Try to imagine that the can is a sngle piece of paper folded in half and after which the edges perpendicular to the fold are joined together to form a cylinder.
Hi Ramon,
Yes, that is exactly how I was imagining it, and I think my solution correctly computes the result for that situation. But unfortunately it only agrees with your numbers in the case of problem 1 (for which hs=ha and xs=xa).
William, you've corrected your net height after considering the spider/ant are outside/inside. That means viewing it flat, you have now one correct triangle side. You also need to adjust the other triangle side, again considering inside/outside.
Sorry, but I think it is incorrect to change the other side. The circumferential distance does not change as a result of inside/outside.
Hi William, I've included one solution into the problem itself. I hope this clarifies everything. Of course the circumference will not change. But if you would not consider inside/outside, the insects will appear to be closer together, and you will be get shorter distance than the correct one.
That solution has an error. In the equations for wa and ws, you should not be dividing by 2*pi.
Your right. Thanks so much...
-
1 Comment
I think that your algorithm will work only if both the ant and spider are in the same side. Please take note that the ant is inside and the spider is outside. For example, your formula for the net height is H - hs - ha. This is correct if they are on the same side. The correct net height should be: H - hs + ha. Thanks.
Problem Recent Solvers9
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
43959 Solvers
-
Remove the small words from a list of words.
1155 Solvers
-
What gear ratio does the cyclist need?
78 Solvers
-
78 Solvers
-
49 Solvers
More from this Author102
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!