Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem about chapter04/car_rental.py #150

Open
shaoeChen opened this issue Aug 11, 2021 · 1 comment
Open

problem about chapter04/car_rental.py #150

shaoeChen opened this issue Aug 11, 2021 · 1 comment

Comments

@shaoeChen
Copy link

image

as show above,
you define a variable POISSON_UPPER_BOUND = 11 ,
and you have a comment , # If n is greater than this value, then the probability of getting n is truncated to 0

image

then the loop, just consider 0 to 10, not 0 to 20,
In fact, we should execute 0-20, but because of probability issues, we only execute 0-10, right?

I just want to confirm that my concept is correct, thank you for your guidance

@lmc8133
Copy link

lmc8133 commented Jan 3, 2022

it's because poisson disstribution has an infinite upper limit, so the author just take a limit of 10 cars.
what you said about execute 0-20, it is reflected in this part, it's about all the 400 states
217N~2S77`YD T)DGTZCW9F

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants