Results 1 to 14 of 14

Thread: The Bridge Puzzle...

  1. #1

    Thread Starter
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357

    The Bridge Puzzle...

    There are 4 people, called A,B,C,D, who want to cross a bridge in the dark. They only have one torch between them. The bridge can only hold a maximum of two people at once. A can cross in 1 minute, B in 2 minutes, C in 5 and D in 10 minutes. The other rule is that if two people cross, they go at the pace of the slower person.

    So for instance, A could cross over with B. This would take 2 minutes. Then B might return with the torch (which takes 2 minutes) to help C across. This crossing would take 5 minutes. Then B returns again (another 2 minutes) to help D across which takes 10 minutes. Total: 21 minutes.

    How can they cross most quickly?

    Btw, lets invent some notation to avoid confusion. AB|CD shows A and B are on the original side and C and D have crossed. So the above example reads:

    ABCD|
    CD|AB <2 mins>
    BCD|A <2 mins>
    D|ABC <5 mins>
    BD|AC <2 mins>
    |ABCD <10 mins>
    (Total 21 mins)
    There are 10 types of people in the world - those that understand binary, and those that don't.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    ABCD|
    CD|AB <2 mins>
    ACD|B <1 min>
    D|ABC <5 mins>
    AD|BC <1 mins>
    |ABCD <10 mins>
    (Total 19 mins)

    would this not be the fastest?

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Hi
    17 mins is fastest i think

    AB cross = 2 mins
    A returns = 1 min (3)
    CD cross = 10 mins (13)
    B returns = 2 mins (15)
    AB cross = 2 mins (17)
    Regards
    Stuart
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  4. #4

    Thread Starter
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    Top marks beachbum.
    There are 10 types of people in the world - those that understand binary, and those that don't.

  5. #5
    New Member
    Join Date
    Jul 2000
    Posts
    12
    It's a bridge, not an obstacle course, they can cross it in the dark, darn fools!

    Ah yes, I always have the wisest answer!

    Doesn't answer the question, but alteast they get across
    Is that not the Beast you said you saw? The one from Hell, the one that strives to drown you in the deepest pits of darkness, the pits of insanity?

    My soul is resting yet my body alert; my instincts rule, my mind is shut; I am an animal, a beast on guard, hidden in my cave I cannot sleep, I just watch, watch your every movement, ready to strike at you when you expect it least. Look behind you, my friend, you might see my dead eyes staring through you, and you, too, might put your soul to rest, to be protected from the demon that's stalking you.

  6. #6

    Thread Starter
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    lol
    There are 10 types of people in the world - those that understand binary, and those that don't.

  7. #7
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    If this bridge can only hold 2 people at once, I don't know if I'd be too keen on crossing it, with or without a torch . That does remind me of a similar thing. It's called the Farmer's Dilemma I think (and if it isn't, that'll suffice).

    A farmer must cross a river with his three items to get them to the market to sell them. He has a fox, a hen, and a basket of corn. Along the way he must cross a river. The fox and hen can't cross by themselves, so he must carry them across himself, but can only take one at a time. The problem is, if he takes the fox and leaves the hen alone with the corn, the hen will eat it. If he takes the corn and leaves the fox with the hen, the fox will eat the hen. What's the minimum number of total trips needed for the farmer to get his goods across the river without losing any? You can use this notation if you want:
    Code:
    Y = you (the farmer)
    F = fox
    H = hen
    C = corn
    | = river
    
    start:
    YFHC|
    
    end:
    |YFHC
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  8. #8
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Hi all
    Yeah that farmer one is pretty easy. Actually, there is a funny site here that lets u do these puzzles interactively. I tried a few months ago and cos i am such a super genius they were dead simple. Hope others enjoy them

    http://www.plastelina.net/examples/games/index.html

    Regards
    Stuart
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  9. #9
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    You could have answered though. I was hoping that someone would.
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  10. #10
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Originally posted by Kaverin
    You could have answered though. I was hoping that someone would.
    LOL ok!!!! Geesh pushy

    1. Farmer and chicken (mmm chicken)
    2. Comes back self
    3. Farmer and Fox (u sure a farmer would keep a fox?)
    4. Brings chicken back
    5. Farmer and corn
    6. Comes back self
    7. Farmer and chicken

    Try the missionary one on that site i gave u ! is funny. Also, i see they have a new king and horse one (game 4).. ahhhh got it in one!! Answer is "Terrific"
    Regards
    Stuart
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  11. #11
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    The answer is 5 minutes.

    A crosses with B (ON HIS BACK hehe) 1m CD|AB
    A returns 2m ACD|B
    A crosses with C 3m D|ABC
    A returns 4m AD|BC
    A crosses with D 5m |ABCD - A is knackered.

    Cheers,

    P.
    Not nearly so tired now...

    Haven't been around much so be gentle...

  12. #12

    Thread Starter
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    lol. A is knackered.
    There are 10 types of people in the world - those that understand binary, and those that don't.

  13. #13
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    Actually, there is a funny site here that lets u do these puzzles interactively. I tried a few months ago and cos i am such a super genius they were dead simple
    So BeachBum do you remember how to do game 4?

  14. #14
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    Sorry, Scrub that I just found this thread http://forums.vb-world.net/showthrea...threadid=99448

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