Question

I NEED THE CODE FOR PART 2-MATH MODELING CLASS USING MATH LAB in thrve posed elevator...

I NEED THE CODE FOR PART 2-MATH MODELING CLASS USING MATH LAB

in thrve posed elevator problem, your assistant notified you that there are 60 workers operating on each of 5 floors atop the ground floor in your office building - 300 in total. The elevator occupancy is 10 people, and there are 3 elevators in total. In the worst-case scenario in terms of total transition time, on each elevator ride at least one person is getting off at each floor. Naturally, we can ask: what is the probability that an elevator with 10 passengers has none of the 5th floor workers? For that trip, it should reduce the elevator travel time by t4→5 + texit + t5→4 = 5 + 15 + 5 = 25sec. To see how often this might happen, we can perform random draws of elevator occupants, and average over a long time. This is a way to check the validity of certain modeling assumptions.

Part 1 Write a script which computes random draws for the 10 elevator occupants, and perform this 1000 times. Count the number of times a 5th floor occupant is present, and divide the that count by 1000. A basic structure for this may look like:

N=1000;

f o r . . . % loop ove r a l l N t r i e s

Elev= % g e n e r a t e v al u e s f o r Elev u si ng pseudorandom numbers

i f % put a c o n di ti o n on v al u e s to check f o r a 5 th f l o o r worker

% inc remen t co u n t e r

e l s e

% do no thing ( can l e a v e e l s e s ta temen t blank )

end

% do more t hi n g s i f n e c e s s a r y

end

% output count / N A very useful matlab command to look up would be "randi" or similarly "rand

PART 2

A back-of-the-napkin calculation for this probability can be done using simple
combinatorics. Assume that the full pool of workers are available to enter this
particular elevator. The probability of there being no 5th floor workers on the
elevator is given by:
Combinations without 5th floor employees/Combinations of all workers =(240C10* 60C0)/300C10

the binomial coefficient stated as "N choose k". Calculate this probability using
the MATLAB command "nchoosek".
Answer the following questions in your lab report:
• 1. How does your value calculated in Part 1 compare to the result of th
calculation shown in Part 2?
• 2. What is probability that a given elevator only contains workers from the
1st, 2nd, and 3rd floors?
• 3. (Tougher) Given your answers to 1. and 2., can you justify and calculate
a more realistic expected transition time than if you were to simply assume
each elevator goes to each floor on its travel?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Executable Matlab Code:

val=(nchoosek(240,10)*nchoosek(60,0))/nchoosek(300,10)

Add a comment
Know the answer?
Add Answer to:
I NEED THE CODE FOR PART 2-MATH MODELING CLASS USING MATH LAB in thrve posed elevator...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I really need help with this problem! It’s part of a Math Modeling course. Please help!!!...

    I really need help with this problem! It’s part of a Math Modeling course. Please help!!! Simulation Problem 1: Rejection Sampling Consider the function 0 otherwise Use rejection sampling to create N-1000 r values distributed according to this pdf. For this problem, hand in the following items: 1. A short paragraph explaining why f(x) is the pdf for a continuous random variable. 5] 2. The source code or Excel worksheet used to do the rejection sampling. 0 3. A histogram...

  • I want the math lab code for theses problems in a unique way

    I want the math lab code for theses problems in a unique way Theory A projectile is launched from point A up an incline plane that makes an angle of 10 with the horizontal. The mountain is 6,000 m high. Vo 10° Figure 1: Flightpath of a projectile. If we neglect the air resistance, the flight path of a projectile launched at an initial speed vo and an angle θ of departure relative to the horizontal is a parabola (see...

  • This is an assignment for my algorithm class which I have written the code partially and...

    This is an assignment for my algorithm class which I have written the code partially and only need to complete it by adding a time function that calculates the average running time. We could use any programming language we want so I am using C++. I am including the instruction and my partial code below. Thank you! Implement linearSearch(a,key) and binarySearch( a,key)functions. Part A.In this part we will calculate theaverage-case running time of each function.1.Request the user to enter a...

  • Verify the following using MATLAB 2) (a) Consider the following function f(t)=e"" sinwt u (t (1)...

    Verify the following using MATLAB 2) (a) Consider the following function f(t)=e"" sinwt u (t (1) .... Write the formula for Laplace transform. L[f)]=F(6) F(6))e"d Where f(t is the function in time domain. F(s) is the function in frequency domain Apply Laplace transform to equation 1. Le sin cot u()]F(s) Consider, f() sin wtu(t). From the frequency shifting theorem, L(e"f()F(s+a) (2) Apply Laplace transform to f(t). F,(s)sin ot u (t)e" "dt Define the step function, u(t u(t)= 1 fort >0...

  • CODE IN C++ 13.5 Alphabet Histogram Write a program that reads input character by character from...

    CODE IN C++ 13.5 Alphabet Histogram Write a program that reads input character by character from the given data file "data.txt" The program should be case insensitive and count the number of occurances of each character in the alphabet. It should print a histogram of the results as follows: A : B : C : * D : * E : * F : G : H : I : J : * K : L : M : N...

  • In lab, a student weighed out 3.281 g of an unknown salt. Her coffee cup calorimeter...

    In lab, a student weighed out 3.281 g of an unknown salt. Her coffee cup calorimeter weighed 36.763 g. After adding water it weighed 94.732 g. Before the addition of salt, the temperature of the water in the coffee cup was 19.5 d e g r e e s C . After all the salt dissolved the maximum temperature was 25 d e g r e e s C . Calculate the enthalpy of solution for the salt, d e...

  • I don't know how to terminate the code in the second time that whether or not...

    I don't know how to terminate the code in the second time that whether or not the users want to continue to get a new number. PLEASE HELP. To make telephone numbers easier to remember, some companies use letters to show their telephone number. For example, using letters, the telephone number 438-5626 can be shown as GET LOAN. In some cases, to make a telephone number meaningful, companies might use more than seven letters. For example, 225-5466 can be displayed...

  • (Mohammad- Summer 2020) - Introduc Involuntary part-time workers are workers who Select one A work less...

    (Mohammad- Summer 2020) - Introduc Involuntary part-time workers are workers who Select one A work less than 35 hours by choice B. work less than 35 hours but would like to work full time Chave withdrawn from the labor market Dwork more than 25 hours but would like to work less than 35 hours work have lost their job within the last four weeks and are seeking another job ER de $ O 3 4 5 6 7 8 9...

  • 12.22 Chapter 4: Encrypt Characters Simple Caesar Cipher challenge. You'll need to correct code to print...

    12.22 Chapter 4: Encrypt Characters Simple Caesar Cipher challenge. You'll need to correct code to print ciphertext character correctly. With offset of 3 the output should be ORIGINAL CHARACTERS A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ENCRYPTED CHARACTERS D E F G H I J K L M N O P Q R S T U V W X Y Z...

  • Please explain the python code below L1 = [2, 15, 'Carol', 7.4, 0, -10, -6, 42,...

    Please explain the python code below L1 = [2, 15, 'Carol', 7.4, 0, -10, -6, 42, 27, -1, 2.0, 'hello', [2, 4], 23] print("L1 =",L1) odds =[] evens=[] list=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',',','.'] no=0 for i in L1: i=str(i) for j in list: if i.find(j)>=0: no=1 if no==1: None else: i=int(i) if i%2==0: evens.append(i) else: odds.append(i) no=0      ...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT