Results 1 to 10 of 10

Thread: Not too hard: a maths problem

  1. #1

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Not too hard: a maths problem

    B1 and B2 went to visit each other. They left their houses at the same time. When they met on the way, they forgot they wanted to see each other and kept on walking. B1 reached B2's house 8 minutes after the meeting and B2 got to B1's house 18 minutes after the meeting. How long did it take B2 to reach B1's house from the time he left his own house?

    ...

    Who else can work it out...

    Kedaman? gooddreams?

  2. #2
    nullus
    Guest
    me being the simpleton that i am, i'm gonna say 26mins

  3. #3
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    Is there enough data?

    There does not seem to be enough data to solve this problem. I think for a given total time for the B1 trip, there is a fixed total time for the B2 trip.

    When I assumed a B1 total time of 20 minutes, I got a B2 total time of 30 minutes not matter what B1 velocity I assumed. This agrees with the Kedaman answer.

    When I assumed a B1 total time of 26 minutes, I got 26 miniutes for the total B2 time. this agrees with the Nullus answer.

    When I assumed a B1 total time of 32 minutes, I got a B2 total time of 24 minutes.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  4. #4
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357
    30 mins by my calculations so keda is right. not a bad little puzzle though silv.
    There are 10 types of people in the world - those that understand binary, and those that don't.

  5. #5
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    Error.

    Kedaman is right. I discovered an inconsistency in my calculations.

    There seems to be enough data to solve this problem.
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Wink Yep

    I liked this one.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  7. #7

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    how did u guys solve it?

  8. #8
    Frenzied Member nishantp's Avatar
    Join Date
    Jan 2001
    Location
    Where you least expect me to be
    Posts
    1,375
    Originally posted by nullus
    me being the simpleton that i am, i'm gonna say 26mins
    That was my first thought too...but then i figured why would anyone post such a stupid question if the answer is that simple...how did u people figure that out?
    You just proved that sig advertisements work.

  9. #9
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Code:
    B1:
     time:     x      8
          |--------|---------|       
     pos:     S1      S2
    B2:
     time:     x      18
          |--------|-------------------|
     pos:     S2      S1
    
    Speed:
    B1=S2/8=S1/x
    B2=S2/x=S1/18
    
    S2/S1=8/x
    S2/S1=x/18
    
    x^2=8*18
    x=12
    total=12+18=30
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  10. #10
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804
    Kedaman's approach is the way to do it. However you can also do it this way too. I just assumed 10 km betweem B1 and B2.

    VB Code:
    1. Private Sub Command1_Click()
    2. 'Assumed 10 km between B1 and B2
    3. Dim KmPerHourB1&, KmPerHourB2&, MinToMeet@
    4. Dim KMLeftB1@, MinAfterMeetB1@, KMLeftB2@, MinAfterMeetB2@
    5. Dim KMAfterMeetingB2@, TimeBeforeMeetingB2@
    6.  
    7.  
    8. For KmPerHourB1 = 70 To 20 Step -1
    9.     For KmPerHourB2 = 70 To 20 Step -1
    10.         MinToMeet = 10 * 60 / (KmPerHourB1 + KmPerHourB2)
    11.         KMLeftB1 = 10 - MinToMeet / 60 * KmPerHourB1
    12.         MinAfterMeetB1 = KMLeftB1 / (KmPerHourB1 / 60)
    13.         KMLeftB2 = 10 - MinToMeet / 60 * KmPerHourB2
    14.         MinAfterMeetB2 = KMLeftB2 / (KmPerHourB2 / 60)
    15.        
    16.         If MinAfterMeetB1 = 8 And MinAfterMeetB2 = 18 Then
    17.        
    18.             Debug.Print "B1 kph: " & KmPerHourB1; "    B2 kph: " & KmPerHourB2
    19.             KMAfterMeetingB2 = 18@ / 60 * KmPerHourB2
    20.             Debug.Print "B2 Travelled this many km after meeting B1: " & KMAfterMeetingB2
    21.             TimeBeforeMeetingB2 = (10 - KMAfterMeetingB2) / (KmPerHourB2 / 60)
    22.             Debug.Print "B2 travelled for this many minutes before meeting B1: " & TimeBeforeMeetingB2
    23.             Debug.Print "Total Time B2: " & 18@ + TimeBeforeMeetingB2
    24.            
    25.         End If
    26.     Next KmPerHourB2
    27. Next KmPerHourB1
    28.  
    29. End Sub

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