Ehrenfest's urn
|
12-30-2021, 05:28 AM
Post: #4
|
|||
|
|||
RE: Ehrenfest's urn
(12-29-2021 11:53 PM)zahi48g Wrote: it does not try to remove L2(2) from L2 but n from L2 . With SUPPRESS(L2,n) you are removing from L2 the element at the nth position, so if L2={2} then SUPRESS(L2,2) will fail because there is only one element in the list. The correct instruction to remove 2 from the list is SUPPRESS(L2,POS(L2,2))) which will remove 2 from the list whatever it’s position in the list. (12-29-2021 11:53 PM)zahi48g Wrote: If you get these results , could copy and paste you code ? Here is a working code, I’ve added the number of elements in the urns as a parameter of the program so you can test with more than two: Code: #pragma mode( separator(.,;) integer(h32) ) |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Ehrenfest's urn - zahi48g - 12-29-2021, 10:16 PM
RE: Ehrenfest's urn - toml_12953 - 12-29-2021, 11:11 PM
RE: Ehrenfest's urn - zahi48g - 12-29-2021, 11:53 PM
RE: Ehrenfest's urn - Didier Lachieze - 12-30-2021 05:28 AM
RE: Ehrenfest's urn - John Keith - 12-30-2021, 10:30 PM
RE: Ehrenfest's urn - zahi48g - 01-03-2022, 11:10 PM
RE: Ehrenfest's urn - toml_12953 - 01-04-2022, 02:09 AM
|
User(s) browsing this thread: 1 Guest(s)