Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python program Show code Task 3 When should John leave for airport? John has a flight to catch at 9 am. He wants to minimize

image text in transcribed

Python program

Show code

Task 3 When should John leave for airport? John has a flight to catch at 9 am. He wants to minimize the waiting time at the airport. The travel time between his home and the airport follows a normal distribution with u=25, o=5. If he is late for the flight, i.e., his arrival time at the airport is after 9 am, he will be rebooked to the next available flight at 11 am. In this case, he has to wait until 11 am. So please write Python codes to help him determine the optimal departure time x. Hint: To solve this problem, you can first create a function that returns the expected waiting time. Note that there are two possibilities: missing the flight or catching the flight. Then, you can evaluate each possible departure time between 8 am and 9 am by calling the above function. You can then get the relation between the expected waiting time and department time, based on which you can find the best departure time. Task 3 When should John leave for airport? John has a flight to catch at 9 am. He wants to minimize the waiting time at the airport. The travel time between his home and the airport follows a normal distribution with u=25, o=5. If he is late for the flight, i.e., his arrival time at the airport is after 9 am, he will be rebooked to the next available flight at 11 am. In this case, he has to wait until 11 am. So please write Python codes to help him determine the optimal departure time x. Hint: To solve this problem, you can first create a function that returns the expected waiting time. Note that there are two possibilities: missing the flight or catching the flight. Then, you can evaluate each possible departure time between 8 am and 9 am by calling the above function. You can then get the relation between the expected waiting time and department time, based on which you can find the best departure time

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

3. What are potential solutions?

Answered: 1 week ago

Question

4. I can tell when team members dont mean what they say.

Answered: 1 week ago