<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel rdf:about="https://community.wolfram.com">
    <title>Community RSS Feed</title>
    <link>https://community.wolfram.com</link>
    <description>RSS Feed for Wolfram Community showing questions tagged with Wolfram Science with no replies sorted by new.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2380863" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2124038" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1993079" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1991416" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1966961" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1964836" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1963134" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1962565" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1945598" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1945647" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1943636" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1942050" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1842928" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1294732" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1140115" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1139804" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1017048" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/981112" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/245858" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2380863">
    <title>Does the multicomputational paradigm include every other one in science?</title>
    <link>https://community.wolfram.com/groups/-/m/t/2380863</link>
    <description>Are the four paradigms of science described in this Stephen Wolfram&amp;#039;s writing (https://writings.stephenwolfram.com/2021/09/even-beyond-physics-introducing-multicomputation-as-a-fourth-general-paradigm-for-theoretical-science/) more general as we reach the 4th paradigm of the 2020&amp;#039;s? In other words, does the 4th paradigm (the multi computational one) englobe or include the rest of them? Is it a &amp;#034;generalization&amp;#034; of all of them? (I mean, mathematical models are not included in the first &amp;#034;structural&amp;#034; paradigm, since they usually consider time, while in the structural paradigm time is not considered. But the mathematical paradigm includes all the models from the structural paradigm, since time is or is not considered in mathematical models. So, would this continue up until the last paradigm, which would include all the models from the rest)?&#xD;
&#xD;
If it is, then, according to the framework of the multicomputational paradigm, every possible model from the rest paradigms (all possible structural, mathematical and computational models) would be included in it. But if that is really the case, then, how could there be an incompatible model with Wolfram&amp;#039;s framework (which is basically the multicomputational one) as he says here ( https://www.wolframphysics.org/questions/scientific-general-interest/ ):&#xD;
&#xD;
&amp;gt; Any particular rule could be proved wrong by disagreeing with&#xD;
&amp;gt; observations, for example predicting particles that do not exist. But&#xD;
&amp;gt; the overall framework of our models is something more general, and not&#xD;
&amp;gt; as directly amenable to experimental falsification. Asking how to&#xD;
&amp;gt; falsify our framework is similar to asking how one would prove that&#xD;
&amp;gt; calculus could not be a model for physics. An obvious answer would be&#xD;
&amp;gt; another model successfully providing a fundamental theory of physics,&#xD;
&amp;gt; and **being proved incompatible**.&#xD;
&#xD;
&#xD;
If his multicomputational framework englobes every possible conceivable model, how can there be any model incompatible with it?</description>
    <dc:creator>Nodu Agga</dc:creator>
    <dc:date>2021-10-06T23:21:02Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2124038">
    <title>Code that goes with &amp;#034;Patterns in Combinator Evolution&amp;#034; paper</title>
    <link>https://community.wolfram.com/groups/-/m/t/2124038</link>
    <description>&amp;amp;[Wolfram Notebook][1]&#xD;
&#xD;
&#xD;
  [1]: https://www.wolframcloud.com/obj/9ff169d0-d363-45ef-8c76-17ca6bc2b40f</description>
    <dc:creator>Eric Parfitt</dc:creator>
    <dc:date>2020-11-25T19:35:16Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1993079">
    <title>Is MultiwaySystem currently broken?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1993079</link>
    <description>I was doing some work and a notebook of mine got corrupted.  When I restarted I used ResourceFunction instead of the pre-packed little functions, so I got a new version of the MultiwaySystem function downloaded.  This code used to work:&#xD;
&#xD;
    ResourceFunction[&amp;#034;MultiwaySystem&amp;#034;][&#xD;
     ResourceFunction[&amp;#034;WolframModel&amp;#034;][{{{0, 1}} -&amp;gt; {{0, 1}, {1, 2}}}], {0,&#xD;
       0}, 5, &amp;#034;StatesGraph&amp;#034;]&#xD;
&#xD;
However, now it does not.  Looking at the examples again, I see the interface has changed slightly.  So, if I change my example to:&#xD;
&#xD;
    ResourceFunction[&amp;#034;MultiwaySystem&amp;#034;][&#xD;
     &amp;#034;WolframModel&amp;#034; -&amp;gt; {{{0, 1}} -&amp;gt; {{0, 1}, {1, 2}}}, {{0, &#xD;
       0}}, 5, &amp;#034;StatesGraph&amp;#034;]&#xD;
&#xD;
The code executes (too rapidly to actually be doing a computation) and gives a blank output.  If I change it to:&#xD;
&#xD;
    ResourceFunction[&amp;#034;MultiwaySystem&amp;#034;][&#xD;
     &amp;#034;WolframModel&amp;#034; -&amp;gt; {{{0, 1}} -&amp;gt; {{0, 1}, {1, 2}}}, {{0, &#xD;
       0}}, 5, &amp;#034;CausalGraph&amp;#034;]&#xD;
&#xD;
This now gives the correct output.&#xD;
&#xD;
If I use string substitution systems, it all works fine.&#xD;
&#xD;
Any clue what is going on?</description>
    <dc:creator>Brent Werness</dc:creator>
    <dc:date>2020-06-02T17:43:36Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1991416">
    <title>Utilising cellular automata for computation.</title>
    <link>https://community.wolfram.com/groups/-/m/t/1991416</link>
    <description>I have a question regarding the possibility of utilising a matrix of actual living cells as &amp;#034;nodes&amp;#034; of a three dimensional biological cellular automata matrix where each cell acts like a state machine with multiple states, and the ability to broadcast their states to their neighbours, while also detecting the states of their neighbours and changing their internal states in response to changes in states of their neighbours. &#xD;
&#xD;
Brains accomplish this with actual physical connections and branching networks of axons and dendrites and can have tens of thousands of connections to other nodes that can be physically distant. &#xD;
&#xD;
Could it be done however without the physical &amp;#034;tendrils&amp;#034; that transmit and collect signals, and just use the waves of state changes propagating through a collection of  &amp;#034;ordinary&amp;#034; cells? Could it be done while the cells are moving relative to one another within a solution, or would it only work in a solid matrix with stationary nodes?&#xD;
&#xD;
I thought this forum might be my best chance at finding some people who might have some answers.&#xD;
&#xD;
I have seen simple calculators built on Conway&amp;#039;s Game of Life, and I think it has been shown that it is Turing complete.&#xD;
&#xD;
I was wondering if there are methods to figuring out what rule sets are Turing complete, and if they are, designing algorithms for computation to be run on them, and estimating the &amp;#034;efficiency&amp;#034; and &amp;#034;computing power&amp;#034; of such systems.</description>
    <dc:creator>Balazs Imri</dc:creator>
    <dc:date>2020-05-31T03:55:32Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1966961">
    <title>Emergence of Relativity</title>
    <link>https://community.wolfram.com/groups/-/m/t/1966961</link>
    <description>Hi, I&amp;#039;m trying to understand how relativity follows from the fundamentals of the model. In the paper by Jonathan I read: &#xD;
&#xD;
&amp;gt; &amp;#034;One of the foundational features of conventional special relativity&#xD;
&amp;gt; is that two events are causally related if and only if they are&#xD;
&amp;gt; timelike-separated. From our definition of the discrete Minkowski norm&#xD;
&amp;gt; and the properties of layered graph embedding, we can see that a pair&#xD;
&amp;gt; of updating events are causally related (i.e.connected by a directed&#xD;
&amp;gt; edge in the causal graph) if and only if the corresponding vertices&#xD;
&amp;gt; are timelike separated in the embedding of the causal graph into the&#xD;
&amp;gt; discrete Minkowski lattice Z(1,n), as required.&amp;#034;&#xD;
&#xD;
Would it be possible to elaborate a bit more on the &amp;#034;**if and only if** the corresponding vertices...&amp;#034; ? For me this is not clear.&#xD;
&#xD;
Thanks!</description>
    <dc:creator>Ygor Geurts</dc:creator>
    <dc:date>2020-05-07T09:59:05Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1964836">
    <title>Shape Dynamics and Wolfram Fundamental Physics Project</title>
    <link>https://community.wolfram.com/groups/-/m/t/1964836</link>
    <description>Given that Wolfram Physics Project is background independent I am curious how it interacts with formalism and predictions of  &amp;#034;Shape Dynamics&amp;#034; - a theory of gravity locally similar to General Relativity but with different global implications.&#xD;
&#xD;
I will not go into all the detail what makes SD stand out from GR (https://arxiv.org/abs/1409.0105 has an SD tutorial which is a fascinating, but very technical in places, read).  Similarities with the Wolfram Physics Project is that both are background independent and have an arrow of time.  SD also has a relativity of size (implying that the length of an object is only measured locally by using other objects as a reference, objects far away from each other cannot be properly compared).  Of course, in the Wolfram project, distance between elements is also somewhat arbitrary (if I understand it correctly).&#xD;
&#xD;
However, SD seems to really shine when it comes to solving for singularities (whether black holes or the big bang).  My limited understanding of those solutions is that black holes can form pocket universes and that the big bang can be traced back to a big crunch of an earlier universe.&#xD;
&#xD;
My last paragraph is the most speculative, so please keep it in mind.  If the universe is a branch tree of black holes within black holes with initial conditions being slightly different for each new daughter universe (as Lee Smolin proposed in his 1997 book &amp;#034;The Life of the Cosmos&amp;#034;) then it has a direct bearing on this project.  Another words, instead of randomly looking for a set of initial conditions plus a rule to start our computational universe, we can try to guess what the overall rule is.  For example, Lee Smolin proposed that it could be some rule that maximizes the number of black holes in a universe.</description>
    <dc:creator>Anton Spektorov</dc:creator>
    <dc:date>2020-05-05T04:22:33Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1963134">
    <title>Gray rectangle as an output from Wolfram Physics functions</title>
    <link>https://community.wolfram.com/groups/-/m/t/1963134</link>
    <description>I have been playing with some functions related to Wolfram Physics Project and most of the evaluated code, which should give some visual output (graphs etc.) ends up in producing mysterious gray rectangle. I have tested mostly codes from Technical Introduction and from Resources/Function repository, and some of them work, but mostly they don&amp;#039;t. Also slight modifications of working line (such as changing number of iterations) usually gives such output. The problem appears to be not quite deterministic. I attach example of code taken from https://resources.wolframcloud.com/FunctionRepository/resources/MultiwaySystem?i=MultiwaySystem&amp;amp;searchapi=https%3A%2F%2Fresources.wolframcloud.com%2FFunctionRepository%2Fsearch&#xD;
&#xD;
![Weird output][1]&#xD;
&#xD;
&#xD;
  [1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=error.png&amp;amp;userId=1961061</description>
    <dc:creator>Dominik Rzepka</dc:creator>
    <dc:date>2020-05-03T12:45:30Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1962565">
    <title>NKS and Resonance</title>
    <link>https://community.wolfram.com/groups/-/m/t/1962565</link>
    <description>I was wondering it you could use CA to investigate modal shapes of vibrating objects such as plates? Even starting with the frequency response of a simple cantilever. My problem is I have no idea where to start with this using NKS. I have limited knowledge of Mathematica or would you use Wolfram Alpha?&#xD;
Dave</description>
    <dc:creator>davematt</dc:creator>
    <dc:date>2020-05-03T01:46:55Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1945598">
    <title>Stochastic Hamiltonians and the Hypergraph model</title>
    <link>https://community.wolfram.com/groups/-/m/t/1945598</link>
    <description>Has anyone thought of trying to find a relationship between the stochastic Hamiltonian equations we see with Schrodinger Equations and the Hypergraph model? It seems odd to me that we don&amp;#039;t see this equation here. Granted, there&amp;#039;s no notion of stochastic dynamics since he don&amp;#039;t equip rule updating with probabilities (or amplitudes), but it seems to me like there is a type of Hamiltonian lurking in the model. For example, the Hamiltonians and Feynman Diagrams appear in the Hamiltonians for QM, and they&amp;#039;re really obvious once you do the Taylor expansion that they represent specific state paths in a QM model. It feels to me like some form of Hamiltonian should exist for Hypergraph models, where the Feynman statepaths are the specific choices of updates to do on the graph. Is there any sort of analog to this at the moment in the Hypergraph models?</description>
    <dc:creator>Jalil F</dc:creator>
    <dc:date>2020-04-19T15:50:06Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1945647">
    <title>What role do self-replicating Phenomena play for hypergraphs?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1945647</link>
    <description>From optics we know self-imaging or self-replicating effects like the Talbot effect or the Lau effect.&#xD;
I wonder what implications these mechanism of self-replication, or emergence of auto-propagating patterns, might have in the realms of hypergraphs.</description>
    <dc:creator>R K</dc:creator>
    <dc:date>2020-04-19T07:32:14Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1943636">
    <title>What are the Hypergraph Nodes?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1943636</link>
    <description>Any consideration of the nodes as extremal black holes? Then you can consider their evolution in fractional dimensions. Arbitrary sets of nodes make up dimensional gradients when they are more dynamically evolving in a multi way graph that corresponds to a node being a greater contributor to a higher dimensional locality in the fractional scale. Using this harmonic oscillator behavior on whatever the topological correlate is of local sums of nodes in the multi way hyper graph local topological gradients(equivalent to particles), the local behavior would correspond to the causal flux(feynman diagrams). If your nodes are something like 10^-100 m or whatever, each. It could explain why the cosmological constant isn’t constant, but increasing locally for us, because these nodes are evaporating black holes in a VSL scale at some larger gradient at the scale of our universe. Where scale invariance is broken in quantum fractional dimensional steps and only applies to each conformal scale. Would explain why the quantization behavior at the Planck scale and then why it suddenly stops behaving quantum to the classical. Has to do with reduction of the multi wave graph, which has to do with these black holes evaporating from the casual graph ? It also allows you to have universes inside these nodes and thereby not having them be a weird abstract set of point constants of base reality. Where the extremal black hole nodes are entangled via Hawking radiation. And they’re each a Penrose Twistor Riemann Sphere. This then gives you a sphere packing description of the hypergraphs? I had intuited this two months ago and called them HawkingPenrose Networks. And the cohomological structure as Huerta Puzzles because fundamentally they are symmetry puzzles that are periodically solved across the VSL fractional dimensional continuum. Also, thought of black hole evaporation as preserving the change in entropy local gradients, which I can amend this to explain why mathematically later if desired. Among other ideas, thanks !</description>
    <dc:creator>Salim Huerta</dc:creator>
    <dc:date>2020-04-18T04:12:38Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1942050">
    <title>Implement Cellular Automaton 5-neighborhood totalistic CA</title>
    <link>https://community.wolfram.com/groups/-/m/t/1942050</link>
    <description>Hi all,&#xD;
&#xD;
I have recently been trying to model a CA for forest fires. I found some useful code on Rosetta code however it is applied to a 9-neighborhood totalistic model. I&amp;#039;m seeking to implement this, with a particular custom ruleset in place, for a 5-neighborhood totalistic method.&#xD;
&#xD;
How can I change this in the CA function?&#xD;
&#xD;
    evolve[nbhd_List, k_] := 0 /; nbhd[[2, 2]] == 2    (*burning-&amp;gt;empty*)&#xD;
    evolve[nbhd_List, k_] := 2 /; nbhd[[2, 2]] == 1 &amp;amp;&amp;amp; Max@nbhd == 2     (*near_burning&amp;amp;nonempty-&amp;gt;burning*)&#xD;
    evolve[nbhd_List, k_] := RandomChoice[{f, 1 - f} -&amp;gt; {2, nbhd[[2, 2]]}] /; nbhd[[2, 2]] == 1 &amp;amp;&amp;amp; Max@nbhd &amp;lt; 2   (*spontaneously combusting tree*)&#xD;
    evolve[nbhd_List, k_] := RandomChoice[{p, 1 - p} -&amp;gt; {1, nbhd[[2, 2]]}] /; nbhd[[2, 2]] == 0  (*random tree growth*)&#xD;
     &#xD;
    r = 100; c = 100; p = 10^-2; f = 10^-4;&#xD;
    init = RandomInteger[BernoulliDistribution[0.05], {r, c}];&#xD;
    MatrixPlot[CellularAutomaton[{evolve, {}, {1, 1}}, {init, 0}, {{{300}}}], ColorRules -&amp;gt; {0 -&amp;gt; White, 1 -&amp;gt; Green, 2 -&amp;gt; Red}, Frame -&amp;gt; False]</description>
    <dc:creator>Jon Rickett</dc:creator>
    <dc:date>2020-04-17T07:03:31Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1842928">
    <title>Why are simple ethical laws unlikely to be true (NKS)?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1842928</link>
    <description>In [A Short Talk on AI Ethics](https://writings.stephenwolfram.com/2016/10/a-short-talk-on-ai-ethics/), Stephen Wolfram states&#xD;
&#xD;
&#xD;
&amp;gt; Well, if we can express laws in computable form maybe we can start telling AIs how we want them to act. Of course it might be better if we could boil everything down to simple principles, like Asimovs Laws of Robotics, or utilitarianism or something.&#xD;
&#xD;
&amp;gt; But I dont think anything like that is going to work. What were ultimately trying to do is to find perfect constraints on computation, but computation is something thats in some sense infinitely wild. The issue already shows up in Gödels Theorem. Like lets say were looking at integers and were trying to set up axioms to constrain them to just work the way we think they do. Well, what Gödel showed is that no finite set of axioms can ever achieve this. With any set of axioms you choose, there wont just be the ordinary integers; therell also be other wild things.&#xD;
&#xD;
&amp;gt; And the phenomenon of computational irreducibility implies a much more general version of this. Basically, given any set of laws or constraints, therell always be unintended consequences. This isnt particularly surprising if one looks at the evolution of human law. But the point is that theres theoretically no way around it. Its ubiquitous in the computational universe.&#xD;
&#xD;
**Question:** Can someone explain Wolfram&amp;#039;s argument more formally?&#xD;
&#xD;
I&amp;#039;ve read NKS, as well as overviews on Godel&amp;#039;s undecidability proofs. I don&amp;#039;t see how this follows.&#xD;
&#xD;
To me he seems to be saying that our practical ethics are incredibly complicated, and so cannot be captured by simple ethical laws. But that violates one of the whole points of NKS, which is that **simple laws can generate incredible complexity.** So why couldn&amp;#039;t simple laws (something resembling Asimov&amp;#039;s Laws, etc) turn out to compute our entire ethical framework?</description>
    <dc:creator>George Singer</dc:creator>
    <dc:date>2019-12-17T21:10:59Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1294732">
    <title>Phenomenological classification of cellular automata ?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1294732</link>
    <description>I want to simulate urban growth in the French Riviera with a cellular automaton. The following program works and analyzes the results. Rule 1000 seems appropriate. St. Wolfram has classified the behavior of cellular automata. But can we have a phenomenological classification ? What are the useful rules to simulate a simple diffusion or a diffusion equivalent to a flight Levy ?&#xD;
&#xD;
    ClearAll[&amp;#034;Global`*&amp;#034;]&#xD;
image={![enter image description here][1]}&#xD;
&#xD;
    coteazur = ArrayPad[ImageData[Binarize[ColorNegate[image,30];&#xD;
    &#xD;
    etats = Flatten[&#xD;
       CellularAutomaton[{1000, {2, 1}, {1, 1}}, coteazur, 20], {1}];&#xD;
    imd = Image[etats[[1]]];&#xD;
    imf = Image[etats[[20]]];&#xD;
    GraphicsRow[{ColorNegate[imd], ColorNegate[imf]}, ImageSize -&amp;gt; 300]&#xD;
    ImageMeasurements[imd, {&amp;#034;Mean&amp;#034;, &amp;#034;StandardDeviation&amp;#034;, &#xD;
      &amp;#034;IntensityCentroid&amp;#034;, &amp;#034;Entropy&amp;#034;}, &amp;#034;Dataset&amp;#034;]&#xD;
    ImageMeasurements[imf, {&amp;#034;Mean&amp;#034;, &amp;#034;StandardDeviation&amp;#034;, &#xD;
      &amp;#034;IntensityCentroid&amp;#034;, &amp;#034;Entropy&amp;#034;}, &amp;#034;Dataset&amp;#034;]&#xD;
    ColorNegate[ImageDifference[imf, imd]]&#xD;
    flist = {EuclideanDistance, ManhattanDistance, CorrelationDistance, &#xD;
       &amp;#034;DifferenceNormalizedEntropy&amp;#034;};&#xD;
    &#xD;
    Grid[Table[{f, ImageDistance[imd, imf, DistanceFunction -&amp;gt; f]}, {f, &#xD;
       flist}], Alignment -&amp;gt; {{Right, Left}, Center}]&#xD;
    croissance = Table[Count[Flatten[etats[[i]]], 1], {i, 1, 20, 1}];&#xD;
    &#xD;
    ts = TimeSeries[croissance, {Range[1, 20]}];&#xD;
    ListLinePlot[ts]&#xD;
    &#xD;
    model = TimeSeriesModelFit[ts];&#xD;
    Normal[model]&#xD;
    &#xD;
&#xD;
   &#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Captured%E2%80%99%C3%A9cran2018-03-02%C3%A011.42.35.png&amp;amp;userId=77503</description>
    <dc:creator>André Dauphiné</dc:creator>
    <dc:date>2018-03-02T10:48:59Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1140115">
    <title>[WSC17] A Cryptographic Hash Code Algorithm based on Cellular Automata</title>
    <link>https://community.wolfram.com/groups/-/m/t/1140115</link>
    <description>#Introduction&#xD;
&#xD;
-----------&#xD;
&#xD;
 Hi, I&amp;#039;m Rishu Mohanka, and I developed a Cryptographic Hash Code Algorithm based off of Cellular Automata. I initially came up for the idea while thinking about the complexity of CAs (Cellular Automata) and their applications in the real world, and I came across a relatively old article regarding how researchers at Google were able to crack the SHA-1 Hash Code Algorithm; hash code algorithms are very important regarding the security of our personal and sensitive information, so I decided to try to make my own Hash Code Algorithm that generated hash codes for inputs/messages from complex and chaotic CA. I thought this project would be pretty easy to complete, but it was harder than I expected, and completing the project successfully required a lot of experimentation. In the end, I wasn&amp;#039;t able to fully achieve my vision of the potential for my algorithm within the 2 weeks I had at Wolfram Summer Camp 2017, but I will continue to work hard at perfecting, refining, and improving my algorithm because I truly believe that chaotic CA are the best means to generate hash codes. &#xD;
&#xD;
---------&#xD;
&#xD;
#What are Hash Code Algorithms?&#xD;
&#xD;
---------&#xD;
&#xD;
First, let&amp;#039;s go over what hash code algorithms *are* and *why* they are needed. Cryptographic hash functions are used to take in an arbitrarily long input/message, and it performs mathematical operations on the message to transform it into a hash code which is the output; the hash code must have a fixed length but it can be the same length or shorter than the input. These hash codes securely represents the input, and for good/valid hash code algorithms, it&amp;#039;s easy to generate hash codes, but it&amp;#039;s extremely hard to get the input from solely the hash code. Also, very good hash code algorithms must have extremely low probabilities of creating collisions meaning that if the hash code algorithm took in two distinct inputs, then if it generated the same hash code for the two distinct inputs, then that&amp;#039;s a collision which creates the confusion and mix-up because you cannot have one hash code representing two distinct inputs. Also, a good/valid hash code algorithm must have the ability to generate the same hash code for the same input meaning that it is deterministic. Cryptographic Hash Code Algorithms are used for purposes like storing passwords securely, secure file/data transferring, etc. Good cryptographic hash code algorithms exhibit two main properties: Strong Collision Resistance and Weak Collision Resistance. Strong Collision Resistance means that it is computationally impractical for anyone to find any two distinct messages/inputs that when inputted into the cryptographic hash function, output the same hash code. Weak Collision Resistance means that for any large set of inputs, there exist no inputs in that set of inputs such that they will generate the same hash codes as another input in that set. If a hash code algorithm has the property of Strong Collision Resistance, then it also exhibits the property Weak Collision Resistance, but the converse is not true.&#xD;
&#xD;
-------&#xD;
&#xD;
#Development&#xD;
&#xD;
--------&#xD;
The CA used in this project have ranges of either 2 or 3, and they all have two states (black or white so k = 2), and the CA used are those that are very chaotic and complex with no pattern available within the CA&amp;#039;s structure in order to prevent the hash code algorithm from generating collisions for distinct messages/inputs/passwords. To choose the CA from r = 2, r = 3, k = 2, I generated at hundreds of thousands of CA for each range. There are 2^2^5 (around 4.3 billion) number of possible CA for r = 2, k = 2 and around 2^2^7 number of possible CA for r = 3, k = 2, so it was computationally impossible for me to go through each and every one of those CA without crashing my kernel repeatedly, so I had to pick and choose (in the future, if I have access to powerful computers, I&amp;#039;d want to modify my algorithm and test every one of those CA).&#xD;
Example for r = 2: &#xD;
&#xD;
    Select[Table[{n, Flatten@CellularAutomaton[{n, 2, 2}, RandomChoice[{1, 0}, 128], {{1000}}]}, {n, 1, 20000}], (60&amp;lt; Count[#[[2]], 0] &amp;lt; 75) &amp;amp;];&#xD;
Example for r = 3:&#xD;
&#xD;
    Select[Table[{n, Flatten@CellularAutomaton[{n, 2, 3}, RandomChoice[{1, 0}, 128], {{1000}}]}, {n, 123308249090345280300093458548552398347, 123308249090345280300093458548552438347}], (60 &amp;lt; Count[#[[2]], 0] &amp;lt; 70) &amp;amp;]&#xD;
&#xD;
I changed the parameters to go through more rules, so, in total for r = 2, k = 2, I went through the rules between 21000-65000, 65001 - 120000, 120001 - 200000, 200001 - 300001, 300002 - 600000, 600001 - 1000000, 1000001 - 1500000, 2000001 - 2500001, 90409230 - 90999240, 953402389 - 1094838934, 3008324031 - 3008563853, 2309409238 - 2309732198, 1094838929 - 1094939529. I only selected the rules that had between 55 and 75 0s (or between 60 and 70 0s for the larger rules) because I want approximately the same amount of 1s and 0s in the rules I use to make sure that I am using chaotic and random CA. For r = 3, k = 2, I looked at the rules from 90280300834552398346 - 90280300834552598349, 9090345280300834552398347 - 909034528030083454308552458347, 123909034528030083454308552398347 - 123909034528030083454308552410347, 12330824909034528030083454308552298347 - 12330824909034528030083454308552438347, 123308249090345280300093458548552398347 - 123308249090345280300093458548552438347, 58437598988924093823479989347 - 58437598988924093823479999347, 584378988924093823479989347 - 584378988924093823479999347, 9843095354984375023479989347 - 9843095354984375023479999999, 910843095354984375023479789347 - 910843095354984375023479989347.&#xD;
&#xD;
    f = BooleanFunction[# /. {0 -&amp;gt; False, 1 -&amp;gt; True}, {a, b, c, p, q, t, u}] &amp;amp;&#xD;
I found the Boolean functions representing each rule for the CA in each range. Because I was going through so many rules, for many operations, I had to export the list of rules in text files that way I can just read those text files after my kernel crashes without having to evaluate the previous cells&#xD;
Then I ran Boolean Minimize on each Boolean Function for every rule. &#xD;
&#xD;
    evenBetterRules = Table[{n[[1]], BooleanMinimize[n[[2]]]}, {n, ReadList[&amp;#034;bestRules.txt&amp;#034;]}]&#xD;
&#xD;
I found the Leaf Counts for every Boolean Function after compressing each one. &#xD;
&#xD;
    leafCountRules = Table[{n[[1]], LeafCount[n[[2]]]}, {n, ReadList[&amp;#034;evenBetterRules.txt&amp;#034;]}];&#xD;
&#xD;
I created a Distribution (Histogram) of the aforementioned leaf counts, then I took the rules at the 90th percentile&#xD;
&#xD;
    graphOfDist = HistogramDistribution[ReadList[&amp;#034;leafCountRules.txt&amp;#034;][[All, 2]]]&#xD;
&#xD;
This is what the histogram looks like for r = 3&#xD;
&#xD;
![enter image description here][1]&#xD;
It looks approximately normally distributed which is interesting.&#xD;
I took the rules at the 99.95 percentile for r = 2, &#xD;
&#xD;
&#xD;
    listOfRules = Select[ReadList[&amp;#034;leafCountRules.txt&amp;#034;],  Last[#] &amp;gt; Floor[Quantile[graphOfDist, 0.9995]] &amp;amp;] &#xD;
&#xD;
and rules at the 95th percentile for r = 3.&#xD;
&#xD;
    setOfRules = Select[leafCountRules, Last[#] &amp;gt; Quantile[w, 0.95] &amp;amp;]&#xD;
&#xD;
&#xD;
I then found the amount of information entropy in each CA (interestingly enough, I found that the max entropy of the rules for CA in r = 2, 3, k = 2 was 6.9085, no CA had more entropy than that) and found the rules whose information entropy exceeded 6.5. The following is the code for r = 3&#xD;
&#xD;
    theBestRules = Select[rules, N[Entropy[CellularAutomaton[{#, 2, 3}, RandomChoice[{1, 0}, 128], 1000]]] &amp;gt; 6.5 &amp;amp;] &#xD;
&#xD;
Then, I converted each CA in my new small set of rules into JPEG images and using file conversion compression algorithms; the following is the code for r = 3, just replicate the same process with r = 2.&#xD;
&#xD;
    arrayPlotOfBestRulesr3k2 = Table[ArrayPlot[CellularAutomaton[{theBestRules[[n]], 2, 3}, RandomChoice[{1, 0}, 128], 1000]], {n, 1, Length[theBestRules]}];&#xD;
    &#xD;
    picsOfBestRulesr3k2 = Table[Export[StringJoin[StringJoin[&amp;#034;r3k2rule&amp;#034;, ToString[n]], &amp;#034;.jpg&amp;#034;], arrayPlotOfBestRulesr3k2[[n]]], {n, 1, Length[theBestRules]}];&#xD;
    &#xD;
    secondFinalSetOfRules = Table[{theBestRules[[n]], FileByteCount[picsOfBestRulesr3k2[[n]]]}, {n, 1, Length[theBestRules]}]&#xD;
&#xD;
 I created a Distribution (Histogram) of file byte sizes for each CA then I took the CA at the 95th percentile and found that all of those CA at the 95th percentile were very complex, chaotic and had no pattern, and this distribution also looked approximately normally distributed (for r = 2, I took the CA at the 85th percentile, these were also very complex CA, but the distribution of file byte sizes for r = 2 was not normally distributed).   &#xD;
  &#xD;
  ![enter image description here][2]&#xD;
&#xD;
    Distribution = HistogramDistribution[FileByteCount /@ picsOfBestRulesr3k2]&#xD;
    finalSetOfRulesr3k2 = Select[secondFinalSetOfRules, Last[#] &amp;gt; Quantile[Distribution, 0.95] &amp;amp;]&#xD;
&#xD;
An example of one of the CA at the 95th percentile in terms of file byte size for r = 3, this is rule 123308249090345280300093458548552398368 up to 1000 evolutionary steps:&#xD;
&#xD;
    ArrayPlot[CellularAutomaton[{123308249090345280300093458548552398368, 2, 3}, RandomChoice[{1, 0}, 128], 1000]]&#xD;
![enter image description here][3]&#xD;
&#xD;
To generate hash codes for inputs based off of my new set of CA, I converted the user&amp;#039;s input into their binary representation, then I took the first n bits (length specified by the user, and if their input&amp;#039;s binary representation was shorter than the user&amp;#039;s specified length, then my algorithm pads their input&amp;#039;s binary representation with 0s) and used that as the initial condition for a random CA rule (range specified by user) while the kth row is generated by taking the base-10 representation of the user&amp;#039;s input, squaring it, and doing that number mod a random prime number between 2^10 and 2^15 (similar to Rabin cryptosystem processes), then the first n bits of that row are used as the hash code. I created a block system similar to Merkle Damgård Construction, so I partition the user&amp;#039;s input into x amount of blocks where x is a multiple of the length of the hash code as specified by the user, then I use the hash code for the first block as an input as the initial conditions for the CA in the second block, then I take the hash code of the input in the second block and I perform the XOR operation on the hash codes from the first block and the second block and use that as the input for the third block,etc. The hash code from the final block is used as the final hash code of the user&amp;#039;s message/input/password. In my algorithm, I got the number 57203 (from the process similar to Rabin&amp;#039;s cryptosystem as described earlier) as the nth row to get the hash code for each block, and I decided to use the rule 2309726947 as the CA for r = 2, k = 2 and rule 123308249090345280300093458548552398368 for r = 3, k = 2. The user, through my microsite, can enter their message along with the length of the hash code and the range of the CA, so for example, if they enter in their message to get a hash code with length 128 using r = 2, my algorithm will generate the hash code for their message using rule 2309726947 at the 57203th evolutionary step. The predetermined nth evolutionary step helps ensure that the user will get the same hash code for the same input rather than fully implementing the random function in the algorithm which will produce a different nth row for every input meaning a different hash code for the same inputs which is NOT what we want. Here is my code for the described process: &#xD;
&#xD;
    RoundFunctionr2k2[block_] :=  Flatten@CellularAutomaton[{2309726947, 2, 2}, block,  {{PowerMod[FromDigits[block], 2, 57203]}}]&#xD;
    &#xD;
    RoundFunctionr3k2[block_] := Flatten@CellularAutomaton[{123308249090345280300093458548552398368, 2, 3}, block,  {{PowerMod[FromDigits[block], 2, 57203]}}]&#xD;
    &#xD;
    CAHash[message_, len_, range_] := Block[{blocks = Partition[ImportString[ToString[message],&amp;#034;Bit&amp;#034;], len, len, 1, 0]},&#xD;
    	If[range == 2, StringJoin[ToString/@Fold[RoundFunctionr2k2@BitXor[#1, #2] &amp;amp;,RoundFunctionr2k2[blocks[[1]]],  blocks[[2;;]]]], &#xD;
    	If[range == 3, StringJoin[ToString/@Fold[RoundFunctionr3k2@BitXor[#1, #2] &amp;amp;,RoundFunctionr3k2[blocks[[1]]],  blocks[[2;;]]]]]]&#xD;
    	]&#xD;
&#xD;
After this, I wanted show that my hash code algorithm based off of cellular automata was really strong by showing that no two rows would be the same in two cases: by checking the CA if you had random initial conditions, but the same row, and by checking the CA if you had the same initial conditions(still random initial conditions) but different amount (random) of rows. You can use random initial conditions for the CA because it&amp;#039;s supposed to represent the user&amp;#039;s input and since there are so many possible inputs, it might as well just be random. &#xD;
&#xD;
For the first case, r = 2, my code is shown here:&#xD;
&#xD;
    Block[{in =  RandomChoice[{1, 0}, 128]},&#xD;
     Sort[Tally@(CellularAutomaton[{2309726947, 2, 2}, in, &#xD;
         PowerMod[FromDigits[in], 2, 57203]]), #1[[2]] &amp;gt; #2[[2]] &amp;amp;]]&#xD;
   and r = 3,&#xD;
&#xD;
    Block[{in =  RandomChoice[{1, 0}, 128]},&#xD;
    Sort[Tally@(CellularAutomaton[{\&#xD;
    123308249090345280300093458548552398368, 2, 3}, in, &#xD;
    PowerMod[FromDigits[in], 2, 57203]]), #1[[2]] &amp;gt; #2[[2]] &amp;amp;]]&#xD;
For the second case, r = 2, &#xD;
&#xD;
    Block[{in =  RandomChoice[{1, 0}, 128]},&#xD;
     Sort[Tally@(CellularAutomaton[{2309726947, 2, 2}, in, &#xD;
         PowerMod[FromDigits[in], 2, &#xD;
          RandomPrime[{2^10, 2^20}]]]), #1[[2]] &amp;gt; #2[[2]] &amp;amp;]]&#xD;
and r = 3,&#xD;
&#xD;
    Block[{in =  RandomChoice[{1, 0}, 128]},&#xD;
     Sort[Tally@(CellularAutomaton[{\&#xD;
    123308249090345280300093458548552398368, 2, 3}, in, &#xD;
         PowerMod[FromDigits[in], 2, &#xD;
          RandomPrime[{2^10, 2^20}]]]), #1[[2]] &amp;gt; #2[[2]] &amp;amp;]]&#xD;
And for both cases, each row only occurs once! &#xD;
&#xD;
Here is the link to my microsite where you can test out my program: [https://www.wolframcloud.com/objects/ccc4a4f1-b362-431d-8f71-5688908ecfa7][4]&#xD;
&#xD;
--------&#xD;
&#xD;
#Reflections and Extensions&#xD;
&#xD;
-----------&#xD;
This project really gave me a taste of what software development was all about because almost everyday was full of intense work on my project including many rounds of just revisions and experimenting with Mathematica. My original vision for my project was not able to come into fruition because 2 weeks weren&amp;#039;t enough to fully develop my project, but I will be hard at work refining and perfecting my novel algorithm. I personally think that my cryptographic hash code algorithm based off of Cellular Automata can be used to replace current cryptographic hash code algorithms implemented to secure passwords, securing file transfers, implemented in cryptocurrencies, etc., but I&amp;#039;m working hard to prove that it is better.&#xD;
&#xD;
In the future, I want to find complex CA and test each rule from r = 1 to r = 5 (or even r = 10) on more powerful computers to compile a list of CA fit to use for my cryptographic hash code algorithm. I also want to explore further methods of making my system more safe and secure than current cryptographic hash code algorithms (like SHA-256, SHA-512, etc.) because I believe that chaotic cellular automata can serve very useful purposes in cryptography, and chaotic/disordered CAs will allow for more secure cryptographic systems in the future. Also, I want to learn more about cryptanalysis and methods of cryptanalysis, so that I can try to break my own system, and if I can&amp;#039;t (or if anyone else can&amp;#039;t), then I&amp;#039;ll try to prove that my cryptographic system is more secure than current cryptographic hash code algorithms (and if my system is &amp;#034;breakable&amp;#034;, then I&amp;#039;ll try my best to improve my system). I&amp;#039;m going to learn about more secure cryptosystems implemented in other hash functions to see if I can use those in junction with CA to create better cryptographic hash code algorithms based on CA that are harder to brute force than current hash functions like SHA-256 or SHA-512.&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=histogramr3k2leafcounts.png&amp;amp;userId=1138050&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=histogramr3k2filebytesize.png&amp;amp;userId=1138050&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=rule123308249090345280300093458548552398368r3k2OneThousteps.png&amp;amp;userId=1138050&#xD;
  [4]: https://www.wolframcloud.com/objects/65d6c0a7-ce23-4f7e-8929-dd1e1df952d2</description>
    <dc:creator>Rishu Mohanka</dc:creator>
    <dc:date>2017-07-07T01:24:13Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1139804">
    <title>[WSC17] Exploring Halting Times in Turing Machines</title>
    <link>https://community.wolfram.com/groups/-/m/t/1139804</link>
    <description>Description&#xD;
-----------&#xD;
&#xD;
In this exploration, I explored the halting times of Turing machines. A Turing machine is essentially consists of a set of rules that can be applied to successive cells on a infinitely long tape of typically blank cells. Each step in a Turing machine is characterized by the state (color) of the current cell and the direction in which the head is turned. &#xD;
&#xD;
A set of rules for a Turing machine might resemble as follow:&#xD;
&#xD;
![Rule 1507][1]&#xD;
&#xD;
This rule dictates, for example, that when the head is position 1 (up) and the cell it is on is likewise in position 1 (orange), the cell below it should become orange and the head, still facing up, should move a distance of -1 (one unit left). This can be notated as {1,1} -&amp;gt; {1,1,-1}. &#xD;
&#xD;
A common issue in the study of Turing machines is the halting problem, or whether and when a Turing machine will cease moving. Generally, this problem has been proved to be incomputable. However, it is possible to determine halting probabilities for more specific cases.&#xD;
&#xD;
I have investigated two definitions of halting in the following study. The first defines halting within the rules of a Turing machine; that is, when a Turing machine reaches a particular head-cell combination, it will halt. The second defines halting merely as a cessation of changing cell states. When a halting state is reached in this instance, the head may move as it pleases, but the resulting cell states will not differ from step to step.&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
Basic Points&#xD;
------------&#xD;
&#xD;
Some basic principles to establish:&#xD;
&#xD;
- A Turing machine can do one of three things: halt relatively quickly, never halt, or continue on for an indefinite amount of time before reaching a halt state.&#xD;
	- This third instance generally pertain to Turing machines where it is not obvious that the machine will never halt. After all, in some cases the repetition of steps in a machine leaves no room for halting motion.&#xD;
	- For the sake of simplicity, these three kinds of machines will be referred to as halting, non-halting, and weird Turing machines.&#xD;
- A Turing machine will not halt unless some halt state is specified.&#xD;
	- There will always be some rule dictating what the machine should do next that correspond to the current position of the head and cell.&#xD;
	- Therefore, for a Turing machine to halt it needs some rule in some way, shape, or form that corresponds to a halt state.&#xD;
- A Turing machine does not necessarily halt even if a halt state is specified.&#xD;
	- For example, a machine may enter a loop here it goes through the same few steps infinitely, never achieving a halt state.&#xD;
	- On the other hand, some Turing machines halt immediately; the first step they take is halting.&#xD;
- Given a known maximum halting time for a specific kind of Turing machine, any machine that does not halt before the maximum time will not halt after.&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
Halting as Defined by Rules&#xD;
---------------------------&#xD;
&#xD;
As aforementioned, a Turing machine will not halt unless some halt state is specified. In this instance, the halt state for a given Turing machine was defined within the set of rules in a manner similar to busy beaver Turing machines. Busy beavers are machines with n head states and 2 cell states (denoted n, 2) which attempt to achieve the maximum amount of a given cell state before halting with known maximum halt values of 6, 24, and 107 step for 2, 3, and 4 head states, respectively. The rules can be defined by assigning every head state (s) on a cell of state (a) to a new head state (sp), cell state (ap), and head displacement (off), denoted {s, a} -&amp;gt; {sp, ap, off}. Here, the halt state was indicated by assigning a single {s, a} in any set of rules to {0, 3, 0}. In practice, this did not actually halt the Turing Machine, but it did provide a method to determine when a machine would have halted. As no other rule would result in a head state of zero or a cell state of three, it was easy to identify both visually and computationally which machines &amp;#034;halted&amp;#034;.&#xD;
&#xD;
&#xD;
The below functions describe the process for finding the probability whether and when a 2, 2 Turing machine will halt.&#xD;
&#xD;
    TM[n_, x_] :=  TuringMachine[n, {1, {{}, 0}}, x]           (* A simpler, more convenient way to write the TuringMachine function. *)&#xD;
    HEADS2 = Permutations[Flatten[Table[{i, j}, {i, 1, 2}, {j, 0, 1}], 1]];            (* Creates all possible head states *)&#xD;
    pCELLS2 = Permutations[Flatten[Table[{i, j, k}, {i, 1, 2}, {j, 0, 1}, {k,{-1, 1}}],2],{3}];   (* Creates all possible cell states *)&#xD;
    RuleMaker2[x_] := Table[Join[Thread[Rule[Rest[x], pCELLS2[[m]]]], {First[x] -&amp;gt; {0, 3, 0}}], {m,1, Length[pCELLS2]}]  (*Creates machine rules*)&#xD;
    Halting2 = &#xD;
      Flatten[Table[&#xD;
        Select[RuleMaker2[n], ! FreeQ[TM[#, 8], {0, _, _}] &amp;amp;], {n, &#xD;
         HEADS2}], &#xD;
       1];            (* Lists all sets of rules that eventually halt*)&#xD;
     NonHalting = &#xD;
      Flatten[Table[&#xD;
        Select[RuleMaker2[n], FreeQ[TM[#, 8], {0, _, _}] &amp;amp;], {n, HEADS2}],&#xD;
        1];     (* Lists all sets of rules that do not halt*)&#xD;
    &#xD;
    N[Length[Halting2]/(Plus[Length[Halting2], &#xD;
       Length[NonHalting]])] (* Gives approximate halting probability*)&#xD;
    &#xD;
The 	last functions returns that any given 2,2 Turing machine with a halting state defined in its rules has about a 43.3% chance of halting.&#xD;
&#xD;
The total amount of rules that halt at a certain step is given by the following function:&#xD;
&#xD;
    HaltStep1 = KeySort[Counts[Table[First@Flatten[Position[First /@ TM[#, 8] &amp;amp;@n, {0, _, _}]] - 1, {n, Halting2}]]]   &#xD;
    Thread[Rule[Keys[HaltStep1], Table[N[x/100] &amp;#034;%&amp;#034;, {x,HaltStep1}]]]     (* The percentage of machines that halted at a certain step*)          &#xD;
   &#xD;
 The -1 accounts for the initial step listed in the returned machine.&#xD;
The results of these functions are that:&#xD;
     &#xD;
    &amp;lt;|1 -&amp;gt; 2016, 2 -&amp;gt; 1008, 3 -&amp;gt; 288, 4 -&amp;gt; 108, 5 -&amp;gt; 12, 6 -&amp;gt; 60|&amp;gt;&#xD;
    {1 -&amp;gt; 20.16 &amp;#034;%&amp;#034;, 2 -&amp;gt; 10.08 &amp;#034;%&amp;#034;, 3 -&amp;gt; 2.88 &amp;#034;%&amp;#034;, 4 -&amp;gt; 1.08 &amp;#034;%&amp;#034;, 5 -&amp;gt; 0.12 &amp;#034;%&amp;#034;, 6 -&amp;gt; 0.6 &amp;#034;%&amp;#034;}&#xD;
&#xD;
Corresponding list plot that plots the step at which a function halts against how many functions halt at that step:&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
 For the most part, there is a great downward trend concerning at what step a 2,2 Turing machine halts. It is far more likely for a machine to halt at the first step than at the sixth. This makes a certain amount of sense. The Turing machines that halted at the first step would have to consist of all those whose rules dictated that when the head state is 1 and the cell state is 0, halt. Any rule with this as part of its rule set will definitely halt on step 1. However, those rules that halt on step 2 had to depend on two factors: the rule dictating what should happen after the initial state, and the rule dictating what should be done after that. It would follow that this compounding complexity results in less instances of halting. And of course, each step results in more complexities, leading to less instance of halting.&#xD;
&#xD;
However, it so happens a machine is five times more likely to halt at the sixth step than at the fifth. This may be a quirk of 2,2 Turin machines, I suppose, or it may be that at a certain point complexities begin to cancel out. If this is the case, then it would be something like mixing up a Rubik&amp;#039;s cube. You can only mix up the pieces to a certain degree; after that, some moves begin to solve it, if even a little. It would seem that the increasing complexity is counteracted enough by this effect in order to produce more halting Turing machines than expected.&#xD;
&#xD;
&#xD;
Furthermore, although the curve is relatively smooth, no function approximates it quite that well.     &#xD;
&#xD;
    FindFormula[List @@ HaltStep1];&#xD;
     Plot[1128.` + 3291.8` #1 - 3435.5` #1^2.` + 1204.` #1^3.` -182.5` #1^4.` + 10.2` #1^5.` &amp;amp;@x, {x, 0, 7}]&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
&#xD;
&#xD;
&#xD;
Theoretically, the above process could be performed for 2,3 and 2,4 Turing machines as well. However, the run time to Halting3 (the 2,3 machine counterpart to Halting2) was taking so long so as to be incompatible with my time constraints, and it could be imagined that functions dealing with 2,4 machines would take even longer.&#xD;
&#xD;
An example of functions that could potentially produce results if run:&#xD;
&#xD;
    HEADS3 = Permutations[Flatten[Table[{i, j}, {i, 1, 3}, {j, 0, 1}], 1]];&#xD;
    pCELLS3 = &#xD;
      Permutations[&#xD;
       Flatten[Table[{i, j, k}, {i, 1, 3}, {j, 0, 1}, {k, {-1, 1}}], &#xD;
        2], {5}];&#xD;
    RuleMaker3[x_] := &#xD;
     Table[Join[&#xD;
       Thread[Rule[Rest[x], pCELLS3[[m]]]], {First[x] -&amp;gt; {0, 3, 0}}], {m, &#xD;
       1, Length[pCELLS3]}]&#xD;
    Halting3 = &#xD;
      Flatten[Table[&#xD;
        Select[RuleMaker3[&#xD;
          Part[HEADS3, RandomInteger[720]]], ! &#xD;
           FreeQ[TM[#, 26], {0, _, _}] &amp;amp;], 10], 1];&#xD;
&#xD;
&#xD;
Overall, the function `FreeQ[TM[n_List, x_],{0,_,_}]&amp;amp;]` can be used on a single Turing machine with a halting state defined in its rules in order to determine whether it will halt.&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
Halting as Defined by Cell State&#xD;
--------------------------------&#xD;
An alternative way to define a halting state could be to claim the machine halts when the cell state no longer changes from step to step. This, however, allows for the head to keep changing position. To check to see whether this happens in a Turing machine without a halt state explicitly defined in its rules, I created a function that looks for three repeats in a row at x-1, x, and x+1 steps, then checked to see whether this pattern held true at 2x. Originally, I had not thought to check the pattern at 2x, as it seemed natural to me that a Turing machine that produces the same result three times in a row would continue to do so for the fourth, fifth, sixth, etc. time. However, I had discounted the fact that the head moves and may be in different positions even when cell states are identical, leading to a mistake in computations that I caught when I plotted the halt times of various Turing machines and discovered surprising outliers that could only be accounted for by the fact that they don&amp;#039;t actually halt. &#xD;
&#xD;
In the following incorrect Plot, older and incorrect versions of RepeatingBoolean and HaltWhen are being used. These will be defined correctly later. RepeatingBoolean returns True if a function repeats and therefore halts at a point, and HaltWhen checks at what point the repeating state first occurs, indicating the halt state.&#xD;
&#xD;
    ListPlot[Counts[Table[Module[{x = RandomInteger[4095]}, If[RepeatingBoolean[x, 100], HaltWhen[x, 100]]], 1000]]]&#xD;
&#xD;
![enter image description here][4]&#xD;
&#xD;
Note how most Turing machines had halted, as expected, between 0 and 5 steps. Some machines, however, appeared to halt close to the 100th step when in fact they merely had three identical cell states at that point.&#xD;
&#xD;
&#xD;
&#xD;
The proper way to follow through with this process goes as follow:&#xD;
&#xD;
    RepeatingTM[rule_, n_] := If[Apply[SameQ, Last /@ Part[#, {n - 1, n, n + 1, 2 n}] &amp;amp;@TM[#, 2 n] &amp;amp;@&#xD;
        rule], {rule, &amp;#034;Halts&amp;#034;}, {rule, &amp;#034;Doesn&amp;#039;t Halt&amp;#034;}] &#xD;
    (*Takes a rule and the number of steps the rule should run and returns whether a given rule halts or not*)&#xD;
    &#xD;
    HaltWhen[rule_, n_] := First@First@Position[TM[rule, 2 n], Last@Part[TM[rule, 2 n], 2 n]] - 1  &#xD;
    (* Shows at what step a function halts.*) &#xD;
&#xD;
The -1 in the above function accounts for the fact that some Turing machines may &amp;#034;halt&amp;#034; from their initial position: they never changed from their initial state, and halt at step 0. Here n should represent the same n used in RepeatingTM, as it might not necessarily work if a smaller value is chosen. Although this function will produce a result for a non-halting function, it shouldn&amp;#039;t be used for that purpose.&#xD;
&#xD;
    ProbabilityTM[h_, k_] := &#xD;
     N[Mean[#]/1000] &amp;amp;@&#xD;
      Table[Length[&#xD;
        Select[Table[&#xD;
          RepeatingTM[{RandomInteger[(2 h k)^(h k) - 1], h, k}, 100], &#xD;
          1000], ! FreeQ[#, {_, &amp;#034;Halts&amp;#034;}] &amp;amp;]], 20]&#xD;
&#xD;
This function takes h to be amount of head states of a machine and k to be the amount of cell states in a Turing machine. It then generates 1000 random Turing machines (where the rule is represented as a number between 0 to ((2 h k)^(h k)-1), the total amount of possible h,k Turing machines) and checks after 100 steps whether it halts or not. This should be sufficient for most machines. &#xD;
&#xD;
Using the above function, one can generate a table of probabilities for Turing machines ranging from having 2 head and 2 cell states to those having 6 head and 6 cell states.&#xD;
&#xD;
    ProbabilityTable = Table[ProbabilityTM[i, j], {i, 2, 6}, {j, 2, 6}]; &#xD;
    Grid[Join[{{&amp;#034;h\c&amp;#034;, 2, 3, 4, 5, 6}}, Table[Prepend[Part[ProbabilityTable, k - 1], k], {k, 2, 6}]], Frame -&amp;gt; All] &#xD;
&#xD;
    ![enter image description here][5]&#xD;
&#xD;
In the above grid, the &amp;#034;h&amp;#034; column represents the amount of head states of a Turing machine while the &amp;#034;c&amp;#034; row represents the cell states. (The error indicated on the right side of the cell only occurs because \c is &amp;#034;an unknown string escape&amp;#034;. As I am using the notation h\c only to more clearly label the grid, this error is inconsequential.)&#xD;
&#xD;
This data can be used to observe trends both when the cell states keep constant while the head states change and when the head states are constant and the cell state changes. &#xD;
&#xD;
    (* Cell states constant, head states change*)&#xD;
    ListLinePlot[ &#xD;
     Table[{i + 1, Part[#, j] &amp;amp;@Part[ProbabilityTable, i]}, {j, 1, 5}, {i,&#xD;
        1, 5}], PlotLegends -&amp;gt; {&amp;#034;h, 2&amp;#034;, &amp;#034;h, 3&amp;#034;, &amp;#034;h, 4&amp;#034;, &amp;#034;h, 5&amp;#034;, &amp;#034;h, 6&amp;#034;}, &#xD;
     AxesLabel -&amp;gt; { &amp;#034;Head State&amp;#034;, &amp;#034;Probability of Halting&amp;#034;}]&#xD;
&#xD;
&#xD;
![enter image description here][6]&#xD;
&#xD;
&#xD;
    (* Head states constant, cell states change*)&#xD;
    ListLinePlot[ &#xD;
     Table[{i + 1, Part[#, i] &amp;amp;@Part[ProbabilityTable, j]}, {j, 1, 5}, {i,&#xD;
        1, 5}], PlotLegends -&amp;gt; {&amp;#034;2, c&amp;#034;, &amp;#034;3, c&amp;#034;, &amp;#034;4, c&amp;#034;, &amp;#034;5, c&amp;#034;, &amp;#034;6, c&amp;#034;}, &#xD;
     AxesLabel -&amp;gt; { &amp;#034;Cell State&amp;#034;, &amp;#034;Probability of Halting&amp;#034;}]&#xD;
&#xD;
![enter image description here][7]&#xD;
&#xD;
The cell state appears to determine halting probabilities to a greater degree than cell state. This makes sense, as per this definition of halting it was cell state, not head state, that determined when a machine should stop. In that respect it must be that head state alters halting probability only by increasing the complexity of the machine. As described in context with Halting1, an increase in complexity gives more possible states for a machine to be in, though the amount of those states that result in halting may not increase. &#xD;
&#xD;
&#xD;
&#xD;
Although it is possible to find functions that somewhat resemble the above plots, for the most part approximations are still inaccurate.&#xD;
&#xD;
Constant Cell States:&#xD;
&#xD;
    FindFormula /@ &#xD;
      Table[{i + 1, Part[#, j] &amp;amp;@Part[ProbabilityTable, i]}, {j, 1, &#xD;
        5}, {i, 1, 5}];&#xD;
    Table[Plot[Part[%24, k]@x, {x, 0, 7}], {k, 1, 5}]&#xD;
&#xD;
![enter image description here][8]&#xD;
&#xD;
&#xD;
Constant Head States:&#xD;
&#xD;
    FindFormula /@ &#xD;
      Table[{i + 1, Part[#, i] &amp;amp;@Part[ProbabilityTable, j]}, {j, 1, &#xD;
        5}, {i, 1, 5}];&#xD;
    Table[Plot[Part[%26, k]@x, {x, 0, 7}], {k, 1, 5}]&#xD;
&#xD;
![enter image description here][9]&#xD;
&#xD;
The below function randomly selects 2,2 Turing machines and detects when those that halt do so.&#xD;
&#xD;
    RepeatingBoolean[rule_, n_] := Apply[SameQ, Last /@ Part[#, {n - 1, n, n + 1, 2 n}] &amp;amp;@TM[#, 2 n] &amp;amp;@rule]        &#xD;
     (* Returns TRUE when a machine halts and FALSE when it doesn&amp;#039;t *)&#xD;
    HaltStep22 = &#xD;
     KeySort[Merge[{Counts[&#xD;
         Table[If[RepeatingBoolean[x, 100], HaltWhen[x, 100]], {x, 0, &#xD;
           4095}]], &amp;lt;|3 -&amp;gt; 0|&amp;gt;}, Total]]&#xD;
    Thread[Rule[Keys[Drop[HaltStep22, -1]], &#xD;
      Table[N[100 x/Plus @@ Values[Drop[HaltStep22, -1]]] &amp;#034;%&amp;#034;, {x, &#xD;
        Values[Drop[HaltStep22, -1]]}]]]&#xD;
&#xD;
This returns:&#xD;
&#xD;
    &amp;lt;|0 -&amp;gt; 1568, 1 -&amp;gt; 178, 2 -&amp;gt; 20, 3 -&amp;gt; 0, 4 -&amp;gt; 6, 5 -&amp;gt; 2, Null -&amp;gt; 2322|&amp;gt;&#xD;
    {0 -&amp;gt; 88.3878 &amp;#034;%&amp;#034;, 1 -&amp;gt; 10.0338 &amp;#034;%&amp;#034;, 2 -&amp;gt; 1.1274 &amp;#034;%&amp;#034;, 3 -&amp;gt; 0., 4 -&amp;gt; 0.338219 &amp;#034;%&amp;#034;, 5 -&amp;gt; 0.11274 &amp;#034;%&amp;#034;}&#xD;
&#xD;
Corresponding list plot:&#xD;
&#xD;
![enter image description here][10]&#xD;
&#xD;
&#xD;
Although the halt times for HaltStep1 ranged from 1 to 6, the halt times for HaltStep22 ranged from 0 to 5. This arises mainly through the different definitions of &amp;#034;halting&amp;#034; in each case. For example, it would clearly be impossible for a machine to halt after 0 steps using the first definition; that would mean that it halted before it even started. This, however, is acceptable per the second definition, as this definition describes a change in state rather than a state in itself. That is, when there is no change in state, the machine is said to halt, as opposed to reaching a single &amp;#034;halt state&amp;#034;. Furthermore, it appears that HaltStep22 never halts at 6 or 3 steps. This may be a random consequence; the low amount of machines that halt at 4 and 5 steps would certainly allow it. However, it is interesting how both in HaltStep1 and HaltStep22 briefly increase after a stretch of decreasing values. Perhaps this corresponds with the aforementioned &amp;#034;canceling out&amp;#034;, but more data is needed for a complete conclusion. &#xD;
&#xD;
As with HaltStep1, no function quite approximates this trend.&#xD;
&#xD;
    FindFormula[List @@ HaltStep22]&#xD;
    Plot[8659.05 - 12756.8 #1 + 7595.42 #1^2 - 2199.33 #1^3 + 265.796 #1^4 + 8.55533 #1^5 - 5.07196 #1^6 + 0.339872 #1^7 &amp;amp;@x, {x, 0, 7}]&#xD;
&#xD;
![enter image description here][11]&#xD;
&#xD;
Comparing the results of the first definition of halting with the second, it can be noticed that although neither exceed six steps to halt, with HaltStep22 it is generally more likely that the machine will halt at or before the first step.&#xD;
&#xD;
    {PieChart[Values[HaltStep1], ChartLabels -&amp;gt; Keys[HaltStep1]], &#xD;
     PieChart[ Drop[Values[HaltStep22], -1], &#xD;
      ChartLabels -&amp;gt; &#xD;
       Placed[Keys[HaltStep22], &#xD;
        &amp;#034;RadialOuter&amp;#034;]]}&#xD;
    (* Left pie chart represents HaltStep1, right HaltStep2 without the Null values*)&#xD;
&#xD;
![enter image description here][12]&#xD;
&#xD;
The following chart further emphasizes how much more likely it is for a function to halt at 1, compared to other values, in Halting22.&#xD;
&#xD;
    PieChart[ Take[Values[HaltStep22], 2 ;; 6], ChartLabels -&amp;gt; Placed[{1, 2, 3, 4, 5}, &amp;#034;RadialOuter&amp;#034;]]&#xD;
&#xD;
![enter image description here][13]&#xD;
&#xD;
&#xD;
Much like with the computing issue of Halting1, it is difficult to garner complete information about the halting patterns of higher order Turing machines with this method.&#xD;
Although it is easier to select Turing machines at random, there are substantially more Turing machines to choose from, which requires a larger sample size to accurately depict probabilities. In fact, as there are 2985983 machines of the 2,3 degree, (compared to the 4095 of the 2,2 degree), even 100,000 randomly selected machines may not produce a significant percentage of halting machines.&#xD;
&#xD;
    Halt23 =  &#xD;
     KeySort[Counts[&#xD;
       Module[{x = RandomInteger[2985983]}, &#xD;
        Table[If[RepeatingBoolean[{x, 2, 3}, 100], &#xD;
          HaltWhen[{x, 2, 3}, 100], &amp;#034;NONHALTING&amp;#034;], 100000]]]]&#xD;
&#xD;
This usually returns `&amp;lt;|&amp;#034;NONHALTING&amp;#034; -&amp;gt; 100000|&amp;gt;`.&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
Weird Turing Machines&#xD;
---------------------&#xD;
&#xD;
For most Turing machines, it is simple to determine after a relatively small number of steps whether it will halt or not. However, there exist some Turing machines that will appear to never halt but will actually reach a halt state (per the second definition) after a tremendous amount of steps.&#xD;
&#xD;
The following functions work much like RepeatingBoolean, only they have the option to check a greater number of steps per a given input.&#xD;
&#xD;
    WeirdTM[weird_, n_, max_] := NestWhileList[ Plus[#, 1000] &amp;amp;, n, ! RepeatingBoolean[weird, #] &amp;amp;, 1,max]&#xD;
    WeirdHalt[weird_, n_, max_] := If[Length[WeirdTM[weird, n, max]] == max + 1, &amp;#034;NEVER HALTS&amp;#034;, &#xD;
      StringJoin[&amp;#034;HALTS AT &amp;#034;, ToString[HaltWhen[weird, n]]]]&#xD;
&#xD;
Here WeirdTM takes a single Turing machine running for n steps at a time, adding 1000 to n every cycle. This cycle will occur a specified max number of times. WeirdTM then returns a list of all values of n used to achieve it goal (either by halting, making !RepeatingBoolean false, or by reaching the max value). WeirdHalt then checks the length of this list; if its length is equivalent to the length the list would have had if n cycled through the max number times, the function returns that it never halts, but if the length of the list is shorter that, apparently the machine halted at some point, prompted the function to return when the machine halted.&#xD;
&#xD;
&#xD;
These &amp;#034;weird&amp;#034; machines are relatively rare, and are tricky to detect through their resemblance to Turing machines that never halt. The above functions are best for Turing machines know to be complex and suspected of eventually halting. Most machines, however, clearly either halt or don&amp;#039;t, leaving little confusion.&#xD;
&#xD;
Furthermore, weird Turing machines can be compressed in order to reach farther steps (or to check out interesting though not necessarily halting patterns). Left-compression only returns the steps when the head is farther left than it ever was before, and right-compression only returns the steps when the head is farther right than it ever was before. CompressedRepeatingBoolean works much the same way as RepeatingBoolean, only that it first decides whether left-compression is applicable in the given situation. If, for example, the machine never moves left at all, right-compression will be used instead. &#xD;
&#xD;
Admittedly, though, there may exist machines that may move left for long enough that SameQ[LeftCompression[rule, 20 n],{}] returns false, prompting it to use left-compression, even though it may eventually continue only on the right side. Still, if this is the case, then CompressedWeirdTM would still detect a string of unchanging, blank values after a certain point, indicating a &amp;#034;halt&amp;#034;. Furthermore, due to a lack of data concerning &amp;#034;weird&amp;#034; Turing machines, it is not certain that this situation can arise at all.&#xD;
&#xD;
    LeftCompression[rule_, n_] := Module[{s = {1}, ls = {}}, Table[If[Last@First@Part[TM[rule, n], i] &amp;lt; &#xD;
         Min[s], {AppendTo[s, Last@First@Part[TM[rule, n], i]], AppendTo[ls, Last@Part[TM[rule, n], i]]}, Nothing], {i, 2, n}]; ls]&#xD;
    &#xD;
    RightCompression[rule_, n_] := Module[{s = {-1}, ls = {}}, Table[If[Last@First@Part[TM[rule, n], i] &amp;gt; &#xD;
         Max[s], {AppendTo[s, Last@First@Part[TM[rule, n], i]], AppendTo[ls, Last@Part[TM[rule, n], i]]}, Nothing], {i, 2, n}]; ls]&#xD;
    &#xD;
     CompressedRepeatingBoolean[rule_, n_] := Module[ {x}, x = If[SameQ[LeftCompression[rule, 20 n], {}], &#xD;
        RightCompression[rule, 20 n], LeftCompression[rule, 20 n]]; Apply[SameQ, Part[#, {n - 1, n, n + 1, 2 n}] &amp;amp;@x]]&#xD;
    &#xD;
    &#xD;
    CompressedWeirdTM[weird_, n_, max_] := NestWhileList[ Plus[#, 1000] &amp;amp;, &#xD;
      n, ! CompressedRepeatingBoolean[weird, #] &amp;amp;, 1, max]&#xD;
&#xD;
    CompressedWeirdHalt[weird_, n_, max_] := If[Length[CompressedWeirdTM[weird, n, max]] == max + 1, &#xD;
      &amp;#034;NEVER HALTS&amp;#034;, StringJoin[&amp;#034;HALTS AT &amp;#034;, ToString[HaltWhen[weird, n]]]]&#xD;
&#xD;
&#xD;
As a side note, here is a cool application of using compression on more complex Turing machines:&#xD;
&#xD;
    {ArrayPlot[Last /@ TM[{596440, 2, 3}, 100]], &#xD;
     ArrayPlot[RightCompression[{596440, 2, 3}, 1000]], &#xD;
     ArrayPlot[LeftCompression[{596440, 2, 3}, 1000]]}&#xD;
&#xD;
![enter image description here][14]&#xD;
&#xD;
This is not particularly related to the above study, but it demonstrates compression well.&#xD;
&#xD;
&#xD;
----------&#xD;
&#xD;
Conclusion&#xD;
----------&#xD;
&#xD;
When halting is defined within the rules of a 2,2 Turing machine, there is an overall 43.3% chance that any given machine will halt. Of those that halt, the chances of a machine halting at a given step goes as follows:&#xD;
&#xD;
1-&amp;gt; 20.16 %	2-&amp;gt; 10.08 %	3-&amp;gt; 2.88 %	4-&amp;gt; 1.08 %	5-&amp;gt; 0.12 %	6-&amp;gt; 0.6 %&#xD;
&#xD;
For the most part the probability of halting at a given step decreases as the amount of steps increase, presumably because of issues with complexity. The fact that a machine is more likely to halt at step 6 than at step 5 is possible either a random incongruity or a result of cancelling complexities.&#xD;
&#xD;
When halting is defined as a lack of change in cell state, overall probabilities for 2,2 machines up to 6,6 machines are given by this chart:&#xD;
&#xD;
![enter image description here][15]&#xD;
&#xD;
For 2,2 Turing machines, the likelihoods of a machine halting at given steps are as follows:&#xD;
&#xD;
0-&amp;gt; 88.3878 %		1-&amp;gt; 10.0338 %		2-&amp;gt; 1.1274 %		3-&amp;gt; 0.	4 -&amp;gt;0.338219 %	5-&amp;gt; 0.11274 %&#xD;
	&#xD;
Weird, eventually halting Turing machines can theoretically be detected by using methods similar to the second process of determining halting times. However, due to their scarcity and my own computing limitations I lack enough examples to come to an acceptable conclusion concerning them.&#xD;
	&#xD;
In either case of halting, it would be nice to have more data concerning higher order Turing machines so that more accurate conclusions may be reached about the probability trends. In this study, computing time (and possibly memory storage) was mainly the issue. To fix this I could find more concise functions to achieve my purposes, or I suppose that the functions could be run as they are when I can spare my laptop for a few days. For now, though, these results should suffice.&#xD;
	&#xD;
	&#xD;
&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Final_Project.png&amp;amp;userId=1138184&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=HaltStep1Plot.png&amp;amp;userId=1138184&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ApproxHalt1.png&amp;amp;userId=1138184&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Wring.png&amp;amp;userId=1138184&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotfrom2017-07-0614-44-22.png&amp;amp;userId=1138184&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotfrom2017-07-0614-46-12.png&amp;amp;userId=1138184&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotfrom2017-07-0614-47-26.png&amp;amp;userId=1138184&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotfrom2017-07-0614-55-36.png&amp;amp;userId=1138184&#xD;
  [9]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotfrom2017-07-0614-57-01.png&amp;amp;userId=1138184&#xD;
  [10]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Halt22.png&amp;amp;userId=1138184&#xD;
  [11]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Approx22.png&amp;amp;userId=1138184&#xD;
  [12]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotfrom2017-07-0615-06-09.png&amp;amp;userId=1138184&#xD;
  [13]: http://community.wolfram.com//c/portal/getImageAttachment?filename=PieChart.png&amp;amp;userId=1138184&#xD;
  [14]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotfrom2017-07-0615-17-29.png&amp;amp;userId=1138184&#xD;
  [15]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotfrom2017-07-0614-44-22.png&amp;amp;userId=1138184</description>
    <dc:creator>Katarzyna Krzyzanska</dc:creator>
    <dc:date>2017-07-06T22:40:45Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1017048">
    <title>Probabilistic Cellular Automata</title>
    <link>https://community.wolfram.com/groups/-/m/t/1017048</link>
    <description>![Variant of Rule 90 in which black squares are generated 99% instead of 100% of the time][1]&#xD;
## Introduction ##&#xD;
During the summer of my junior year, I participated in the Wolfram Summer Camp, a program which gave me the unique opportunity to learn and explore the Wolfram Language. After completing a project on predicting the trends of the Housing Price Index, I was so fascinated by the unimaginably powerful capabilities of the Wolfram Language that I began looking for other opportunities to further explore in this amazing language.&#xD;
&#xD;
Through the Wolfram Mentorship program, I have been able to continue doing so. Interested in computational mathematics, I began working on the &amp;#034;Probabilistic Cellular Automata&amp;#034; project with the objective of creating the most efficient Mathematica program that can output cellular automaton based on eight predetermined probabilities.&#xD;
&#xD;
## Cellular Automaton ##&#xD;
&#xD;
A traditional cellular automaton function has three basic components: the initial list, the rule, and the number of iterations. For those who are unfair with this concept, the initial list is simply a list of 0&amp;#039;s and 1&amp;#039;s which correspond to white and black, respectively. The rule is essentially a function that takes a sequence of three digits and outputs a 0 or 1. For example, for rule 30, the list {0,0,0} gives 0, {0,0,1} gives 1, {0,1,0} give 1, etc. Since there are eight possible three digit sequences of zeros and ones, there are 2^8 = 256 rules. The number of iterations is just the number of times we apply the same rule to the new list. &#xD;
&#xD;
One can see that the traditional cellular automaton function is limited to only 256 possibilities and that the sequences or images are predetermined. To address these shortcomings, I have created a Probabilistic Cellular Automaton function in which the output of a given list of three digits will be based on a probability. For example, the sequence {1,0,1} will output 1 80% of the time and 0 the other 20% of the time. &#xD;
&#xD;
## Initial Coding ##&#xD;
&#xD;
Creating a function that performs accurate iterations is not a difficult task. One only needs to consider the probabilities for each of the eight possible three-term sequences. Such code is shown below:&#xD;
&#xD;
    PCA[{p7_, p6_, p5_, p4_, p3_, p2_, p1_, p0_}, init_, t_] := NestList[&#xD;
      Replace[Partition[#, 3, 1, 2], {{1, 1, 1} :&amp;gt;&#xD;
          RandomChoice[{p7, 1 - p7} -&amp;gt; {1, 0}], {1, 1, 0} :&amp;gt;&#xD;
          RandomChoice[{p6, 1 - p6} -&amp;gt; {1, 0}], {1, 0, 1} :&amp;gt;&#xD;
          RandomChoice[{p5, 1 - p5} -&amp;gt; {1, 0}], {1, 0, 0} :&amp;gt;&#xD;
          RandomChoice[{p4, 1 - p4} -&amp;gt; {1, 0}], {0, 1, 1} :&amp;gt;&#xD;
          RandomChoice[{p3, 1 - p3} -&amp;gt; {1, 0}], {0, 1, 0} :&amp;gt;&#xD;
          RandomChoice[{p2, 1 - p2} -&amp;gt; {1, 0}], {0, 0, 1} :&amp;gt;&#xD;
          RandomChoice[{p1, 1 - p1} -&amp;gt; {1, 0}], {0, 0, 0} :&amp;gt;&#xD;
          RandomChoice[{p0, 1 - p0} -&amp;gt; {1, 0}]}, {1}] &amp;amp;, init, t]&#xD;
While this code will compute the result, it is inefficient for large iterations.After creating my first working function, I experimented with several other functions and compared their efficiency through the Repeated Timing function. Some of the other codes I created are listed below:&#xD;
&#xD;
    PCAUnitStep[{p7_, p6_, p5_, p4_, p3_, p2_, p1_, p0_}, init_, t_] := &#xD;
     NestList[&#xD;
      Replace[&#xD;
        Partition[#, 3, 1, &#xD;
         2], {{1, 1, 1} :&amp;gt; UnitStep[RandomReal[1] - (1 - p7)]&#xD;
         , {1, 1, 0} :&amp;gt;&#xD;
          UnitStep[RandomReal[1] - (1 - p6)], {1, 0, 1} :&amp;gt;&#xD;
          UnitStep[RandomReal[1] - (1 - p5)], {1, 0, 0} :&amp;gt;&#xD;
          UnitStep[RandomReal[1] - (1 - p4)], {0, 1, 1} :&amp;gt;&#xD;
          UnitStep[RandomReal[1] - (1 - p3)], {0, 1, 0} :&amp;gt;&#xD;
          UnitStep[RandomReal[1] - (1 - p2)], {0, 0, 1} :&amp;gt;&#xD;
          UnitStep[RandomReal[1] - (1 - p1)], {0, 0, 0} :&amp;gt;&#xD;
          UnitStep[RandomReal[1] - (1 - p0)]}, {1}] &amp;amp;, init, t]&#xD;
   &#xD;
Using FoldList and another function:&#xD;
&#xD;
    f[probabilities_, list_] := &#xD;
     probabilities[[FromDigits[#, 2] + 1]] &amp;amp; /@ Partition[list, 3, 1, 2]&#xD;
    PCAUnitStep2[{p7_, p6_, p5_, p4_, p3_, p2_, p1_, p0_}, init_, t_] := &#xD;
     FoldList[f[#2, #1] &amp;amp;, init, &#xD;
      Table[{UnitStep[-RandomReal[1] + (p7)], &#xD;
        UnitStep[-RandomReal[1] + p6], UnitStep[-RandomReal[1] + p5], &#xD;
        UnitStep[-RandomReal[1] + (p4)], UnitStep[-RandomReal[1] + (p3)], &#xD;
        UnitStep[-RandomReal[1] + (p2)], UnitStep[-RandomReal[1] + (p1)], &#xD;
        UnitStep[-RandomReal[1] + (p0)]}, t]]&#xD;
    &#xD;
Using NestList and Partition:&#xD;
&#xD;
    PCA3[prob_, init_, t_] := &#xD;
     NestList[UnitStep[-RandomReal[1, Length[init]] + (prob[[&#xD;
           FromDigits[#, 2] + 1 &amp;amp; /@ Partition[#, 3, 1, 2]]])] &amp;amp;, init, t]&#xD;
And using FoldList and Partition:&#xD;
&#xD;
    PCA4[prob_, init_, t_] :=&#xD;
     FoldList[&#xD;
      UnitStep[-#2 + (prob[[&#xD;
           FromDigits[#, 2] + 1 &amp;amp; /@ Partition[#1, 3, 1, 2]]])] &amp;amp;, init, &#xD;
      RandomReal[1, {t, Length[init]}]]&#xD;
    &#xD;
Through trial and error, I eventually arrived at the most efficient code (of the ones I&amp;#039;ve tried). The code is shown below:&#xD;
&#xD;
    PCA5[prob_, init_, t_] :=&#xD;
     FoldList[&#xD;
      UnitStep[-#2 + (prob[[ListConvolve[{1, 2, 4}, #1, 2] + 1]])] &amp;amp;, &#xD;
      init, RandomReal[1, {t, Length[init]}]]&#xD;
&#xD;
## Probabilistic Cellular Automaton versus Traditional Cellular Automaton ##&#xD;
&#xD;
Below are the arrays plots of two cellular automaton. The first one is generated using rule 126 while the second one uses probabilities that are really close to rule 126 but differs by 1% when generating black squares.&#xD;
&#xD;
![Traditional Cellular Automaton (using probability list {0, 1, 1, 1, 1, 1, 1, 0})][7]![Probabilistic Cellular Automaton (Using probability list {0, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99, 0.99 ,0})][8]&#xD;
&#xD;
It is interesting to see how even though the codes are more than 99% alike, the images can differ so drastically.&#xD;
&#xD;
## Challenges Faced ##&#xD;
&#xD;
This project was more difficult in the beginning since I was still inexperienced with many of Mathematica&amp;#039;s functions. It took me a long time to figure out how to properly use each one and also my knowledge was limited to only what I had learned through the Wolfram Summer Camp. Overall, the most difficult aspect of the project was finding functions that could make my code more efficient.&#xD;
&#xD;
## Conclusion ##&#xD;
&#xD;
From this project, I have learned how to use several functions in Mathematica and have gleaned valuable insights into programming. This experience helped me understand the seemingly easy yet actually complex process behind creating an efficient function and showed me that simple changes could lead to widely varied results.&#xD;
&#xD;
Links:&#xD;
&#xD;
[Wolfram Summer Camp][4]&#xD;
&#xD;
[Wolfram Mentorship Program][5]&#xD;
&#xD;
[Cellular Automaton][6]&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=pcapic3.png&amp;amp;userId=993979&#xD;
  [4]: http://education.wolfram.com/summer/camp/ &amp;#034;Wolfram Summer Camp&amp;#034;&#xD;
  [5]: http://education.wolfram.com/mentorships/ &amp;#034;Wolfram Mentorship Program&amp;#034;&#xD;
  [6]: http://mathworld.wolfram.com/CellularAutomaton.html &amp;#034;Cellular Automaton&amp;#034;&#xD;
  [7]: http://community.wolfram.com//c/portal/getImageAttachment?filename=3676pcapic4.png&amp;amp;userId=993979&#xD;
  [8]: http://community.wolfram.com//c/portal/getImageAttachment?filename=1468pcapic5.png&amp;amp;userId=993979</description>
    <dc:creator>Arthur Tseng</dc:creator>
    <dc:date>2017-02-19T05:23:27Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/981112">
    <title>Is there a paper for SW blog post: &amp;#034;What Is Spacetime, Really?&amp;#034; ?</title>
    <link>https://community.wolfram.com/groups/-/m/t/981112</link>
    <description>Dear Wolfram friends,&#xD;
&#xD;
Stephen Wolfram&amp;#039;s blog [&amp;#034;What Is Spacetime, Really?&amp;#034;][1]  refers to  what seems to me like a paper .  I am really dying to read it. Can someone please point me to the journal  in which it was published?&#xD;
&#xD;
Thank you so much!&#xD;
&#xD;
&#xD;
![enter image description here][2]&#xD;
&#xD;
&#xD;
  [1]: http://blog.stephenwolfram.com/2015/12/what-is-spacetime-really/&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=6471SW.png&amp;amp;userId=956938</description>
    <dc:creator>Amin C</dc:creator>
    <dc:date>2016-12-14T18:31:48Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/245858">
    <title>CellularAutomaton function speed</title>
    <link>https://community.wolfram.com/groups/-/m/t/245858</link>
    <description>has anyone done a speed comparion of Gosper&amp;#039;s Golly program/app (http://golly.sourceforge.net) and the CellularAutomaton function? it would be interesting because e.g. the Game of Life program implemented in CellularAutomaton function (http://www.wolfram.com/language/gallery/implement-conways-game-of-life/) is very fast - much faster than the 3 versions i wrote in the final section of my turorial notes set (http://library.wolfram.com/infocenter/MathSource/5216)/) which surprised me becuase in one of those programs i made direct use of all of the 512 update rules which i expectedd to be quite fast since it directly uses the rule-based, pattern-matching nature of WL). if anyone knows of, or can do, a speed omparision, i&amp;#039;d like to know the results (you&amp;#039;ll need to look at the effect of both the grid size and  the number of time steps  - and possibly the initial number of empty (i.e. dead) sites as well - because the relative speed of execution of the various programs can change as a function of these parameter values.. </description>
    <dc:creator>Richard Gaylord</dc:creator>
    <dc:date>2014-05-01T15:25:59Z</dc:date>
  </item>
</rdf:RDF>

