Consulting

Results 1 to 11 of 11

Thread: How to show the answer graphically

  1. #1
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,379
    Location

    How to show the answer graphically

    A recently put to me quiz question went as such:
    Each day at noon a ship leaves La Harve for New York City. At the same time, a ship leaves New York City for La Harve, traveling the same route in the opposite direction. The trip lasts 7 days and 7 nights. How many ships will you pass on your journey? Show graphically, if possible.
    I believe the answer is 4. How can I show this graphically?

    Edit: If you were the initial ship then you could only pass 4. However the Question did not state this, so assuming you were in a continuous pre existing rotation then I'm guessing its 7
    Last edited by Aussiebear; 01-28-2025 at 12:46 PM.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  2. #2
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    413
    Location
    A solution is at Popular Mechanics. I got a brief look at graphic before subscription popup blocked it.

    From another discussion:

    Depending on how you look at it the answer could be 13 or 15.At the moment you take off there will be 6 NY-LH ships already at sea, one docking at LH and one casting off at NY. At noon of each day of the voyage a new ship will be launched. You must encounter every ship that was already at sea (6) and each one that was launched during your voyage (including the one that launched at the same time you did, so 7 more). So you will pass 13 ships at sea and also encounter a ship that docked as you cast off and another that cast off as you docked.
    Another https://puzzling.stackexchange.com/q...-from-le-havre
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,379
    Location
    In thinking about this possible answer, I am completely wrong.

    I'm assuming you would pass the first ship at approximately midnight on the third day, then two at midnight on the 4th day etc.... resulting in 10 ships passed.

    So, if the above is true then on a pre existing continuous rotation..... the answer is 21??
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,959
    Quote Originally Posted by Aussiebear View Post
    I believe the answer is 4. How can I show this graphically?
    Count for yourself!
    In the attached a chart and a scroll bar. The scroll bar moves time on by 1 hour at a time (4 hours if you page). 1 orange boat one way, several blue boats the other. date/time displayed at the top.

    2025-01-29_010701.jpg
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    VBAX Expert Dave's Avatar
    Joined
    Mar 2005
    Posts
    863
    Location
    You asked for graphically and this is the only way i could understand what's going on. I can't wait to trial p45cal's solution. HTH. Dave

    boat2.jpg
    Last edited by georgiboy; 01-28-2025 at 11:31 PM. Reason: Removed one image

  6. #6
    VBAX Expert Dave's Avatar
    Joined
    Mar 2005
    Posts
    863
    Location
    I messed up the post. Could a moderator please remove the second image. Thanks. Dave

  7. #7
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    413
    Location
    Dave, can't you do that with the Advanced editor? That's where you can manage attachments in the section below edit window.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,379
    Location
    Okay... I'll claim the "dummy" award for this one. Thanks to P45cal for solving the initial ship phase.

    So here are the assumptions:
    1. Both Ships leave at the same time ( yes I waved the magic wand and converted the time difference to zippo.)
    2. The red ship commanded by P45cal (for the Good Guys) leaves New York) on the 1st at noon.
    3. The blue Ship commanded by Paul Hossler (for the Darth Vader crew - sorry Paul, but your name was drawn out of the hat) also leaves Le Harve at the same time.
    4. All weather, tide and spin of the earth conditions magically convened the same effects. (Man I love this Magic wand - any one want to buy it?).
    5. Somehow during the night of the 3rd day both ships pass Port to Port with a flurry of flag signals ( Yes I too wonder why the British Admiralty require this procedure. By the way the Cook's second mate was seen to have flipped the bird at his 4th cousin on the opposite boat, and will be keel hauled at 6 am tomorrow morning).
    6. Every twelve hours after this the Red boat shall pass a Blue boat until 84 hours shall pass.
    7. The blue boat in Le Harve shall be considered as "Passed" even if anchored ..... I'm making them rules again, pass the champagne to all the crew.

    So 8 vessels in total

    So what is the answer if the vessels are continuous and already in operation?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  9. #9
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,959
    In the attached:
    To count passed vessels when the ships started their regular service, set cell B2 to 83 when the orange ship is very nearly half way across (that's how I left the attachment), just about to meet the blue ship which left from the other end at the same time, then click the Continue button and count the encounters(8)
    To count the ships passing with an established schedule, move the scroll bar to the top (B2=0) and press the Continue button and count (15).
    If you have a fast computer you may have to increase the delay in the macro (For j = 1 To 100: DoEvents: Next).
    Attached Files Attached Files
    Last edited by p45cal; 01-29-2025 at 06:34 AM.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  10. #10
    VBAX Expert Dave's Avatar
    Joined
    Mar 2005
    Posts
    863
    Location
    Hi June7...I trialed the advanced editor but couldn't figure it out. Thanks georgiboy for fixing my mess. p45cal that was fun. Aussiebear, in my mock up illustration of of continuous boat traffic, I have the magic boats in a non-continuous scenario passing on day 4... it probably has something to do with the noon departures as it seems improbable that you would see 3 boats on day 4 (in a continuous scenario). In my mock up graphic, each letter (ie. Xa, Xb, Ya, Yb etc.) are different ships that departed at different times that have different locations each day. In our magic boat travelling the distance 1/7, 2/7 etc. in our 7 day journey, you can see each day's results. So, end of Day1 at distance 1/7, you see 1 boat not counting the 1 in port (Xg). Day 2 at distance 2/7, you see 2 boats (Xf and Xe) and etc. The boats are coloured for the day that they are seen. They can only be seen once. So for example, after seeing the boats Xf and Xe on Day2 they are all coloured red as they can't be seen again. It all seems reasonable to me and somewhat quasi scientific, however the outcome must be wrong (I had 14 boats in a continuous cycle not counting the boats in port). If anyone can follow my "logic", I'd appreciate if they could point out where I fell over board. Dave

  11. #11
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,835
    Location
    Here's my take on the question. There are a number of ambiguities in there

    1. Since both LH and NY ships travel at the same speed and depart at the same time (ignoring time zones), they'l meet at a mid-day of the third day (Day 3.5)

    2. Mid-day of the third day (Day 3.5) the LH ship that left at the beginning (Day 0) will cross with the NY ships that left on Day 0

    3. The fourth day (Day 4) the LH ship that left at the beginning (Day 0) will cross with the NY ship that left on Day 1 since it's already passed the NY Day 0 ship

    4. Mid-day of the fourth day (Day 4.5) the LH ship that left at the beginning (Day 0) will cross with the NY ship that left on Day 2 since it's already passed the NY Day 0 and Day 1 ships

    5. Etc.

    So my guess is 8, depending if port arrival on Day 7 counts as passing

    Capture.JPG


    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

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