I am doing some projects related to statistics simulation using R based on "Introduction to Scientific Programming and Simulation Using R". In the Students projects session (chapter 24), I am doing the "The pipe spiders of Brunswick" problem. At the end of this project, he asks if there is any way where you can design a web spider that has a efficiency of at least 45. A web spider is made of segments from points in the circle border, as we can see below: enter image description here

In this project a web spider is created inside a circle of radio 1, and its efficiency is calculated as follows:

100*p - a,


p = probability of a fly is caught by the web. Flies are randomly generated inside the circle

a = length of the web

So clearly there is a trade-off, if the web is bigger, certainly it will catch more flies, but it will have a higher "cost". I am trying to figure out how to design a web with higher efficiency based on this information, all I know is that the ideal would be that the strands of the web do not cross each other too much.

  • $\begingroup$ +1 Cool problem. "...he asks if there is any way where you can design a web spider that has a efficiency of at least 45." Does this mean (a) he wants to know if it is possible? or (b) he wants to know an algorithm to find the solution efficiently? If it is (a), one could use a brute force approach and simulate it an arbitrarily large number of times. This is very inefficient, but as long as one simulation has an efficiency greater than 45, you have your answer. Also, could you provide us with any code you have written so far that tries to answer the question? $\endgroup$ – Mark White Dec 20 '18 at 4:38
  • 1
    $\begingroup$ wait, how big are these flies? $\endgroup$ – Taylor Dec 20 '18 at 5:32
  • $\begingroup$ where you say "a web spider" do you instead mean a spider web? $\endgroup$ – Glen_b Dec 20 '18 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.