Ehrenfest's Lottery
This MATLAB program (urngame.m) reads in a distribution of marbles amongst a collection of two or more urns, and then plays Ehrenfest’s Lottery to randomly mix marbles amongst the urns following a diffusion like process. The entropy of the marble distributions are evaluated as the game is played out demonstrating entropy maximization as equilibrium is approached as dictated by the Second Law of Thermodynamics. This lottery and its thermodynamic implications are described in more detail in an article recently submitted to Chemical Engineering Education.
Cite As
Hank Ashbaugh (2024). Ehrenfest's Lottery (https://www.mathworks.com/matlabcentral/fileexchange/24626-ehrenfest-s-lottery), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Sciences > Material Sciences > Thermal Analysis >
- Engineering > Mechanical Engineering > Thermodynamics and Heat Transfer >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |