Message Boards Message Boards

[WSS22] Computational implications of the third law of Thermodynamics

3 Replies

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD

Great work!

POSTED BY: Simon Fischer
ruleTransformation = {{0, 1, 0, 0, 0, 1}, {1, 0, 1, 0, 0, 0}, {0, 1, 
   0, 1, 0, 0}, {0, 0, 1, 0, 1, 0}, {0, 0, 0, 1, 0, 1}, {1, 0, 0, 0, 
   1, 0}}
lenngth = Dimensions[ruleTransformation][[1]];
Eigenvalues[ruleTransformation]
edge = {};
Do[Do[If[ruleTransformation[[i, j]] == 1,
      AppendTo[edge, i -> j]],
    {j, 1, lenngth}] ,
  {i, 1, lenngth }]
Graph[edge,
  VertexLabels -> "Name",
  ImagePadding -> 100,
  ImageSize -> 500]
    TableForm[
 Table[{n, Tr[MatrixPower[ruleTransformation, n]]}, {n, 10}],
  TableHeadings -> {None, {"n", "Matrix Power"}}]

Therefore the evolution of the matrix..

Matrix Map

What about people like me who don't even know any binary? That must be why the Third Law requires an infinite amount of steps in its definition.

Cyclic Matrix

Eigenvalues

Reading your article is like reading the textbook; the cellular automata evolution is like that. Do you want to choose a perturbation?

Manipulate[
 Module[
  {init = RandomInteger[1, length], transs},
  transs = 
   GraphPlot[# -> CellularAutomaton[rule, #] & /@ 
     Tuples[{0, 1}, length],
    DirectedEdges -> True,
    GraphStyle -> "Prototype",
    GraphLayout -> "SpringEmbedding",
    EdgeShapeFunction -> "CurvedArc",
    VertexShapeFunction -> "Diamond"];
  Grid[{{transs}}]],
 {rule, 0, 255, 1, Appearance -> "Labeled"},
 {steps, 10, 100, 1, Appearance -> "Labeled"},
 {length, 10, 100, 1, Appearance -> "Labeled"}]

New Rule 80

The third law of thermodynamics, within the context of computational programs: cellular automata..let's do a computational walk through the complex behavior, of physical systems. That part went way, over my head and I was afraid to ask. Soo, the third law of thermodynamics states that whensince reducing the entropy of a system to absolute zero.. a measure of randomness or disorder..maybe there's a way to explore the way that cellular automata are traditionally..defined. When we create some "vigorous" perturbations in the cellular automata that is temporary changes in cell states..we can try and drive the system towards a state of minimum entropy and then..all cells are the same color. If that's our state of minimum entropy, here's how to reach local consensus.

SeedRandom[561];
swapSimple[rule_, init_, t_] := 1 - CellularAutomaton[rule, init, t]
plotComparison[rule_, init_, t_] := GraphicsRow[{
   ArrayPlot[CellularAutomaton[rule, init, t]],
   ArrayPlot[swapSimple[rule, init, t]]
   }, ImageSize -> 300]
linearRules = {0, 60, 90, 102, 150, 170, 204, 240};
plotComparison[#, RandomInteger[1, 100], 50] & /@ linearRules

Linear Rules

Computational implications of the third law of Thermodynamics is all very beautiful and I am very happy to be able to represent this concept within the cellular automata, linear and non-linear. Linear automata, an analytical method developed to find the set of states that evolve to a zero state..involved finding the kernel of the transformation rule for the automata. How do I solve the kernel? Here is the best explanation of how to solve things..

substituteCellularAutomata[rule_, init_, t_, sub_] := 
 With[{subList = 
    Flatten[Join[ConstantArray[rule, sub[[2]] - 1], 
      PadRight[{#1}, #2, rule] & @@@ 
       Partition[
        Riffle[sub[[;; ;; 2]], (#2 - #1) & @@@ 
          Partition[Join[sub, {rule, t + 1}][[2 ;; ;; 2]], 2, 1]], 
        2]], 1]}, 
  FoldList[CellularAutomaton[#2, #1, {{{1}}}] &, init, subList]]
init = RandomInteger[1, 50];
rule = 154; 
perturbPlot = 
  MapAt[Red &, 
   substituteCellularAutomata[rule, init, 
    50, {{Mod[#[[1]] + #[[3]], 2] &, {}, 1}, 10}], 
   Position[
    Partition[
     MapThread[
      Equal, {Flatten[
        substituteCellularAutomata[rule, init, 
         50, {{Mod[#[[1]] + #[[3]], 2] &, {}, 1}, 10}]], 
       Flatten[CellularAutomaton[rule, init, 50]]}], 50], False]];
GraphicsRow[{ArrayPlot[CellularAutomaton[rule, init, 50], 
   PlotLabel -> "Rule " <> ToString[rule]], 
  ArrayPlot[perturbPlot, 
   PlotLabel -> "Rule " <> ToString[rule] <> " Perturb"]}, 
 ImageSize -> Medium]

New Rule 154 Perturb

Hmm..remove duplicates to find the states unique that evolve to zero. But that's just how I see it. But then I can identify these states and develop a function to find the cell perturbations, the minimum number needed to drive the automata to a zero state? This is it, this is the one-point crossover. I really enjoyed exploring the concept of the "attractive surface" that, after a certain number, what is it? I don't know..the iterations, break them down into 1-iter dimensional attractive surfaces.

entropyL[list_] := Module[
  {probs},
  probs = Counts[list]/Length[list];
  -Sum[probs[[i]] Log2[probs[[i]]], {i, Length[probs]}]
  ]
plotEntropy[rule_, init_, t_] := ListLinePlot[
  Map[entropyL, CellularAutomaton[rule, init, t]],
  PlotLabel -> "Entropy Over Time",
  AxesLabel -> {"Time", "Entropy"},
  ImageSize -> Medium,
  Filling -> Axis,
  PlotTheme -> "Business"]
init = RandomInteger[1, 100];
plotEntropy[30, init, 100]

Entropy Plot

Let's say we want to highlight how the Third Law of Thermodynamics implications play out, in computational models, through the cellular automata lens. Focus on the non-linear behavior with a focus on their "attractive surfaces". And those are the states, that we do evolve to zero entropy states. We don't need to distinguish between states that we visually represented with transition diagrams..these weren't even connected to the attractive surface. Supposedly it's possible to analyze this exquisite evolution of these states via Hamming entropy that makes most states stabilize, what did you expect, at a fixed Hamming distance from the periodic behavior display.

Manipulate[
 Module[
  {init = RandomInteger[1, length]},
  MatrixPlot[
   substituteCellularAutomata[rule, init, steps, {2, 3, 1, 5}],
   Mesh -> True,
   FrameTicks -> All,
   ColorFunction -> "Monochrome"]],
 {rule, 0, 255, 1, Appearance -> "Labeled"},
 {length, 10, 100, 1, Appearance -> "Labeled"},
 {steps, 10, 100, 1, Appearance -> "Labeled"}]

Rule Length Steps

@Gianmarco Morbelli implements a function that identifies which state within the evolution comes closest to the attraction surface states, and applies the perturbations necessary to this state in the right sequence to drive the cellular automata to a zero entropy state, visually represented in a transition diagram, and highlights the role of the perturbation in connecting two disconnected regions of the state graph.

automatonSpectrogram[rules_, inits_, steps_] := Module[
  {automatons, sound, instrument = "Piano"},
  automatons = 
   MapThread[
    substituteCellularAutomata[#1, #2, steps, {2, 3, 1, 5}] &, {rules, 
     inits}];
  sound = Sound[
    Flatten[
     MapThread[
      SoundNote[#1, 0.1, instrument] &,
      {Mod[Flatten[#], 88] & /@ automatons}]]];
  {Spectrogram[sound, ImageSize -> 345], sound}]
automatonSpectrogram[{90, 30, 110, 45, 210}, 
 RandomInteger[1, {5, 50}], 12]

Spectrogram Automaton

@Gianmarco Morbelli I want to do update the function, add in the attractive surfaces states that map to the zero state after some n iterations...increasing the computational effort required while reducing all these perturbations needed to reach the zero state, and this perturbation provides valuable insights into the computational models, the study of thermodynamics..why not introduce a "update" to achieve zero entropy states?

Manipulate[init = RandomInteger[1, 100];
 t = 50;
 sub = {RandomInteger[{0, 255}], 10, RandomInteger[{0, 255}], 11};
 g = substituteCellularAutomata[rule, init, t, sub];
 MatrixPlot[g], {rule, 0, 255, 1}]

Matrix Plot

Alright, that's enough. At the procedure..after all, driving cellular automata to a zero entropy state requires finding the states that do evolve to the zero state after an arbitrary number of iterations..which, results in a significance in computational effort. With that I hope you are doing well, as the nearest person to our customer, our next of kin. Besides, it's the result that we've been waiting for: as the number of cells increases, it becomes unfeasible computationally to predict the states contained within the attractive surfaces..this really checks all the right boxes. It's not just the instance of computational irreducibility, or the lack of information, or the inability to determine what perturbations to apply to reach a state of zero entropy, it's the Third Law of Thermodynamics.

Grid[{{ListPlot3D[g, ColorFunction -> "Pastel", ImageSize -> Medium], 
   ListContourPlot[g, ColorFunction -> "Rainbow", 
    ImageSize -> Medium], 
   ListPlot3D[g, ColorFunction -> "TemperatureMap", 
    ImageSize -> Medium]}, {MatrixPlot[g, ColorFunction -> "Rainbow", 
    Mesh -> True, ImageSize -> Medium], 
   ListLinePlot[substituteCellularAutomata[30, init, t, sub], 
    PlotStyle -> Directive[Purple, Thick], ImageSize -> Medium], 
   ListLinePlot[g, ColorFunction -> "SunsetColors", 
    PlotStyle -> Directive[LightBlue, Thick], Filling -> Axis, 
    FillingStyle -> Pink, ImageSize -> Medium]}}]

List Line Plot

That's the Third Law, It's impossible or difficult to reach a state of zero entropy without infinite steps. This reflects the infinite trials needed, to find the correct perturbations. The Second Law of Thermodynamics deals with the decrease of entropy..or the impossibility of finding initial conditions that leads to the decrease in entropy. I'm just out here in these interpretations, perturbations applying the Knuth-Bendix algorithm for rewriting systems, where the perturbations would be interpreted..as performing completions on a graph to reach local confluence and test the consequences, thermodynamically. Understanding any specific mathematical formalism is like understanding binary; understanding binary is not crucial to understanding the Third Law. In its definition, there is no necessity other than to reflect the computational irreducibility and complexity in here in this system and suggests that the laws of thermodynamics are all connected to the principles, of computational irreducibility.

POSTED BY: Dean Gladish
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract