{"items":["5fda4e5bfb427c00177535cf","5fda4e5bfb427c00177535ce","5fda4e5bfb427c00177535cd"],"styles":{"galleryType":"Columns","groupSize":1,"showArrows":true,"cubeImages":true,"cubeType":"max","cubeRatio":1.7777777777777777,"isVertical":true,"gallerySize":30,"collageAmount":0,"collageDensity":0,"groupTypes":"1","oneRow":false,"imageMargin":5,"galleryMargin":0,"scatter":0,"rotatingScatter":"","chooseBestGroup":true,"smartCrop":false,"hasThumbnails":false,"enableScroll":true,"isGrid":true,"isSlider":false,"isColumns":false,"isSlideshow":false,"cropOnlyFill":false,"fixedColumns":0,"enableInfiniteScroll":true,"isRTL":false,"minItemSize":50,"rotatingGroupTypes":"","rotatingCropRatios":"","columnWidths":"","gallerySliderImageRatio":1.7777777777777777,"numberOfImagesPerRow":3,"numberOfImagesPerCol":1,"groupsPerStrip":0,"borderRadius":0,"boxShadow":0,"gridStyle":0,"mobilePanorama":false,"placeGroupsLtr":true,"viewMode":"preview","thumbnailSpacings":4,"galleryThumbnailsAlignment":"bottom","isMasonry":false,"isAutoSlideshow":false,"slideshowLoop":false,"autoSlideshowInterval":4,"bottomInfoHeight":0,"titlePlacement":["SHOW_ON_THE_RIGHT","SHOW_BELOW"],"galleryTextAlign":"center","scrollSnap":false,"itemClick":"nothing","fullscreen":true,"videoPlay":"hover","scrollAnimation":"NO_EFFECT","slideAnimation":"SCROLL","scrollDirection":0,"scrollDuration":400,"overlayAnimation":"FADE_IN","arrowsPosition":0,"arrowsSize":23,"watermarkOpacity":40,"watermarkSize":40,"useWatermark":true,"watermarkDock":{"top":"auto","left":"auto","right":0,"bottom":0,"transform":"translate3d(0,0,0)"},"loadMoreAmount":"all","defaultShowInfoExpand":1,"allowLinkExpand":true,"expandInfoPosition":0,"allowFullscreenExpand":true,"fullscreenLoop":false,"galleryAlignExpand":"left","addToCartBorderWidth":1,"addToCartButtonText":"","slideshowInfoSize":200,"playButtonForAutoSlideShow":false,"allowSlideshowCounter":false,"hoveringBehaviour":"NEVER_SHOW","thumbnailSize":120,"magicLayoutSeed":1,"imageHoverAnimation":"NO_EFFECT","imagePlacementAnimation":"NO_EFFECT","calculateTextBoxWidthMode":"PERCENT","textBoxHeight":26,"textBoxWidth":200,"textBoxWidthPercent":65,"textImageSpace":10,"textBoxBorderRadius":0,"textBoxBorderWidth":0,"loadMoreButtonText":"","loadMoreButtonBorderWidth":1,"loadMoreButtonBorderRadius":0,"imageInfoType":"ATTACHED_BACKGROUND","itemBorderWidth":0,"itemBorderRadius":0,"itemEnableShadow":false,"itemShadowBlur":20,"itemShadowDirection":135,"itemShadowSize":10,"imageLoadingMode":"BLUR","expandAnimation":"NO_EFFECT","imageQuality":90,"usmToggle":false,"usm_a":0,"usm_r":0,"usm_t":0,"videoSound":false,"videoSpeed":"1","videoLoop":true,"jsonStyleParams":"","gallerySizeType":"px","gallerySizePx":1000,"allowTitle":true,"allowContextMenu":true,"textsHorizontalPadding":-30,"itemBorderColor":{"themeName":"color_12","value":"rgba(230,230,230,0)"},"showVideoPlayButton":true,"galleryLayout":2,"calculateTextBoxHeightMode":"MANUAL","targetItemSize":1000,"selectedLayout":"2|bottom|1|max|true|0|true","layoutsVersion":2,"selectedLayoutV2":2,"isSlideshowFont":true,"externalInfoHeight":26,"externalInfoWidth":0.65},"container":{"width":300,"galleryWidth":305,"galleryHeight":0,"scrollBase":0,"height":null}}

# Maxwell's Demon

Out of context, Maxwell’s Demon evokes an image of a hounding remorse circling James Clerk Maxwell for some debauchery committed in his earlier years. Alas, Maxwell’s Demon is totally unrelated to any purported debauchery, as far as I know. Rather than plodding through a description of this ostensible paradox, elaboration from Maxwell himself, accompanied by an awesome graphic, should suffice.

“... if we conceive of a being whose faculties are so sharpened that he can follow every molecule in its course, such a being, whose attributes are as essentially finite as our own, would be able to do what is impossible to us. For we have seen that molecules in a vessel full of air at uniform temperature are moving with velocities by no means uniform, though the mean velocity of any great number of them, arbitrarily selected, is almost exactly uniform. Now let us suppose that such a vessel is divided into two portions, A and B, by a division in which there is a small hole, and that a being, who can see the individual molecules, opens and closes this hole, so as to allow only the swifter molecules to pass from A to B, and only the slower molecules to pass from B to A. He will thus, without expenditure of work, raise the temperature of B and lower that of A, in contradiction to the second law of thermodynamics.” - James Clerk Maxwell, 1871

Image credit:[2]

Breathe a sigh of relief, in light of this quote, we can confidently vindicate Maxwell of any debauchery.

Prior to investigating Maxwell’s demon, let’s consider a system without the intervention of any enterprising demons. To introduce the convention of my animations, the red dots are ‘fast’ particles (absolute velocity between 1 and 2), and the blue dots are ‘slow’ particles (absolute velocity between 0 and 1). Similarly, we consider a vertically divided 4x2 box. Energy values below each box display the normalized kinetic energy of all constituent particles within said box: such that the energies sum to unity (energy is calculated as the sum of the squares of the velocities). I’m additionally displaying the energies as a time-series plot affixed to the simulation box.

First, let’s consider the base case: a permeable partition with 500 particles distributed throughout the system. Figure 1 animates this situation.

*Figure 1: Animation of 250 ‘fast’ and 250 ‘slow’ particles with a permeable partition.*

Now, of course, we expect the average energy to remain relatively constant. Small deviations from 0.5 are artifacts of simulating discrete particles, in the limit of an infinite number of particles we expect deviations from 0.5 to approach 0. This case is so unfathomably boring that acts as an ideal model for all other systems, essentially, with no external trickery, every system should settle to resemble this one.

To test this hypothesis, let’s consider initially separating the particles on each side of the partition. Figure 2 illustrates a system with the ‘fast’ particles initially on the right, and the ‘slow’ on the left.

*Figure 2: ‘Fast’ particles are initially splattered on the right, while ‘slow’ splattered on the left, the partition remains permeable.*

We notice the right box begins at a markedly greater energy, however, particle diffusion drives their energies to equilibrate. Notice the oscillations, the quickest particles cross the partition and transfer their energy into the left box, eventually rebounding back into the right box. This process persists diminishingly until everything is adequately distributed, settling into the first case we discussed.

To aptly address Maxwell’s Demon requires a complete discussion of entropy, which I will save for a future post. For now, as an intuitive analog, consider entropy as proportional to the difference of energy between the two boxes. Now consider the previous cases: The first speaks to the unvarying nature of a system set in equilibrium. The second reflects that entropy is always decreasing, which we will tacitly take as a statement of The Second Law of Thermodynamics.

Figure 3 illustrates an incarnation of Maxwell’s thought experiment. The ‘fast’ and ‘slow’ particles are distributed throughout the system and divided with a semi-permeable partition. Concretely, this partition strictly allows ‘fast’ particles passage from the left box to the right, and ‘slow’ particles from the right box to the left.

Figure 3: Randomly distributed particles separated with a semi-permeable membrane: allowing ‘fast’ particle passage to the right, and ‘slow’ particle passage to the left.

We notice a divergence of energy coincident with the systematic separation of particles, ultimately illustrating a steady increase in entropy. This is clearly in direct contradiction with our Second Law, which states that the entropy must always decrease. Turns out Maxwell’s intuition was correct!

Now, upon further scrutiny, the Second Law is of course not actually violated. A resolution mends this predicament by analyzing the information required to ‘open’ the door for each particle passage.

Please refer to [1] and [3] for a precise discussion of Maxwell's thought experiment. Although cursory, I hope I helped illuminate some of the mystery surrounding Maxwell’s Demon.

References:

[1] Maruyama, Koji, et al. “Colloquium: The physics of Maxwell’s demon and information.” Reviews of Modern Physics, vol. 81, no. 1, June 2009, pp. 1–23., doi:10.1103/revmodphys.81.1.

[2] Maxwell's demon. 23 Oct. 2017, en.wikipedia.org/wiki/Maxwell%27s_demon. Accessed 24 Oct. 2017.

[3]Rex, Andrew. “Maxwell's Demon-A Historical Review.” MDPI, Multidisciplinary Digital Publishing Institute, 23 May 2017, www.mdpi.com/1099-4300/19/6/240/htm.