Results 1 to 4 of 4

Thread: [RESOLVED] Simple, I Guess, But I'm Stumped...

  1. #1

    Thread Starter
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Resolved [RESOLVED] Simple, I Guess, But I'm Stumped...

    I have a hollow rectangular cardboard box that is 12" square on each end and the four long sides are 24" each, so each side has dimensions 12" x 24". Inside the box is a hungry spider positioned dead center on a square end. A lazy fly is also positioned dead center on the opposite square end.

    What is the minimum distance that the spider must walk on the surface of the box to reach the fly?
    Doctor Ed

  2. #2
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: Simple, I Guess, But I'm Stumped...

    Why does this stump you? The shortest distance is a straight line connecting the two points. Any deviation away from the directions "straight down, directly across the floor, straight up the other side" inevitably makes the route longer. Hence the shortest distance is 36".

    See attached pic; an "unfolded" floorplan showing the 8 ways in which the spider can travel in a straight line towards the fly.
    Attached Images Attached Images  
    I use VB 6, VB.Net 2003 and Office 2010



    Code:
    Excel Graphing | Excel Timer | Excel Tips and Tricks | Add controls in Office | Data tables in Excel | Gaussian random number distribution (VB6/VBA,VB.Net) | Coordinates, Vectors and 3D volumes

  3. #3

    Thread Starter
    PowerPoster Code Doc's Avatar
    Join Date
    Mar 2007
    Location
    Omaha, Nebraska
    Posts
    2,354

    Re: Simple, I Guess, But I'm Stumped...

    Brain dead. Somehow I thought that walking on the diagonal path and thus using five of the six surfaces would be shorter than walking on only three.

    Is there any way that the spider and fly could be positioned inside the box with the top open so that walking on all five of the available surfaces results in a shorter walk?
    Doctor Ed

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Simple, I Guess, But I'm Stumped...

    No. But the only vertical walking spiders do is on theinr webs or up. A spider never walks down.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width