<?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 Mathematics with no replies sorted by most viewed.</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/2188842" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/240312" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1448725" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/237108" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/429851" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/471839" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/412193" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1140640" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1140551" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/406693" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/406556" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/385883" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/428854" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/402946" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1008706" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/557572" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/469432" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/550930" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1793523" />
        <rdf:li rdf:resource="https://community.wolfram.com/groups/-/m/t/1382823" />
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/2188842">
    <title>OEIS integration?</title>
    <link>https://community.wolfram.com/groups/-/m/t/2188842</link>
    <description>There are a lot of smart people here, I&amp;#039;m sure someone has found a way to integrate the OEIS database so I don&amp;#039;t have to leave Mathematica!  If not I might be willing to implement that if there are others that would find it useful.&#xD;
&#xD;
    FindSequenceFunction&#xD;
&#xD;
is very nice, but won&amp;#039;t have all the radical stuff.</description>
    <dc:creator>Christopher Wolfe</dc:creator>
    <dc:date>2021-02-08T20:57:40Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/240312">
    <title>Can NonlinearModelFit consider the error parameters dependent ?</title>
    <link>https://community.wolfram.com/groups/-/m/t/240312</link>
    <description>Dear All,
I am using NonlinearModelFit to fit data with a function with 4 parameters.
With Marquardt Levenberg Algorithm the errors are considered independent, but in reality errors are dependent each other.
Is there a build in function which  I can use that when I type 
nonlimearmodelfit[&amp;#034;ParameterErrors&amp;#034;] I can obtain an evaluation of the errors that takes into consideration that they are dependent each other?

Many thanks,

Best regards,
Maria</description>
    <dc:creator>Maria Giovanna Dainotti</dc:creator>
    <dc:date>2014-04-21T13:05:46Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1448725">
    <title>Perform Breadth First Search algorithm (BFS) for the 8-puzzle game?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1448725</link>
    <description>I&amp;#039;ve tried to implement Breadth First Search algorithm in MMA, to attempt to solve the 8-puzzle game. But in some cases, I ran out of memory, but on other cases it solves without problem.&#xD;
&#xD;
Here is the code I am using to make BFS, in the case of inicial = {{1, 6, 2}, {0, 4, 3}, {7, 5, 8}}; you get the desired answer, run the following code and see the result&#xD;
&#xD;
    mutacion[tablero_List] := &#xD;
     Module[{posc, directions, newposs, olddigits}, &#xD;
      posc = Flatten[Position[tablero, 0]];&#xD;
      directions = Select[Tuples[Range[-1, 1], 2], Norm[#] == 1 &amp;amp;];&#xD;
      newposs = (posc + #) &amp;amp; /@ directions;&#xD;
      newposs = Select[newposs, FreeQ[#, 4] \[And] FreeQ[#, 0] &amp;amp;];&#xD;
      olddigits = Extract[tablero, newposs];&#xD;
      MapThread[&#xD;
       ReplacePart[tablero, {#1 -&amp;gt; 0, posc -&amp;gt; #2}] &amp;amp;, {newposs, &#xD;
        olddigits}]]&#xD;
    &#xD;
    q = {}; map = {};&#xD;
    &#xD;
    inicial = {{1, 6, 2}, {0, 4, 3}, {7, 5, 8}};&#xD;
    &#xD;
    final = {{1, 2, 3}, {4, 5, 6}, {7, 8, 0}};&#xD;
    &#xD;
    AppendTo[q, {inicial, 0}]&#xD;
    &#xD;
    AppendTo[map, {inicial, 0}]&#xD;
    &#xD;
    While[q != {}, prim = First@MinimalBy[q, Last]; &#xD;
     hijos = Flatten[Most[MapAt[mutacion, prim, 1]], 1]; &#xD;
     If[Not@MemberQ[map, #, Infinity], &#xD;
        AppendTo[q, {#, Last[prim] + 1}]] &amp;amp; /@ hijos; &#xD;
     If[Not@MemberQ[map, #, Infinity], &#xD;
        AppendTo[map, {#, Last[prim] + 1}]] &amp;amp; /@ hijos; &#xD;
     q = DeleteCases[q, prim, Infinity]; &#xD;
     If[MemberQ[hijos, final], &#xD;
      Print[&amp;#034;Found at the level : &amp;#034;, Last[prim] + 1]; Break[]]]&#xD;
&#xD;
but when inicial = {{2, 1, 5}, {6, 3, 4}, {8, 0, 7}};I have waited for more than 15 minutes without getting any response, maybe the problem is with the command MemberQ, since that command must make many comparisons in increasingly larger lists. I want to ask you please can you help me to correct my mistakes and thus be able to improve my code to obtain the solutions. Thanks in advance, your help is very necessary and important.</description>
    <dc:creator>Luis Ledesma</dc:creator>
    <dc:date>2018-09-10T19:12:54Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/237108">
    <title>CUDALink within ParallelDo</title>
    <link>https://community.wolfram.com/groups/-/m/t/237108</link>
    <description>Hi all, a quick question. I have a working Mathematica code that runs 8 kernels using ParallelDo. Now, to speed things up I have been trying, without success, to have each of these kernels compute the values of a function (it is the same function for all the kernels) for 1000 different values of the independent variables and return these values in an array called results. I have tried Needs[&amp;#034;CUDALink`&amp;#034;] from inside and outside the ParallelDo instruction, and ParallelNeeds[&amp;#034;CUDALink`&amp;#034;] from outside ParallelDo. In any case, it seems that Mathematica does not recognize any CUDA instruction. I was wondering if anyone has tried runing CUDA code from within ParallelDo. If you have or know of an example please let me know. Thanks.

Gus</description>
    <dc:creator>Gustavo Carri</dc:creator>
    <dc:date>2014-04-14T20:52:57Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/429851">
    <title>Asymmetric, bicubic and $3$-edge colorable graphs by W|A</title>
    <link>https://community.wolfram.com/groups/-/m/t/429851</link>
    <description>I&amp;#039;m interested in finding graphs with certain properties, like [the smallest cubic bipartite asymmetric graph](http://math.stackexchange.com/q/1109733/19341). While working on a related graph-theoretic problem, concerning [edge-colrings](http://math.stackexchange.com/q/1121030/19341), I came along  [Georges Graph](http://www.wolframalpha.com/input/?i=GeorgesGraph) at Wolfram|Alpha.&#xD;
&#xD;
It shows a nice collection of properties of the graph:&#xD;
&#xD;
asymmetric  |  bicolorable  |  biconnected  |  bicubic  |  bipartite  |  bridgeless  |  class 1  |  connected  |  cubic  |  cyclic  |  local  |  noncayley  |  noneulerian  |  nonhamiltonian  |  nonplanar  |  perfect  |  perfect matching  |  regular  |  square-free  |  traceable  |  triangle-free  |  weakly regular&#xD;
&#xD;
So I&amp;#039;m interested if it&amp;#039;s possible to search Wolfram|Alpha for graph with certain properties.&#xD;
&#xD;
How to build a query, that returns a list of graphs that are asymmetric, bicubic and $3$-edge colorable i.e. they have chromatic index $3$?&#xD;
&#xD;
Other ways to get that list are also welcome..&#xD;
&#xD;
Cross-posted: http://mathematica.stackexchange.com/q/72628/1436</description>
    <dc:creator>draks ...</dc:creator>
    <dc:date>2015-01-27T21:55:16Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/471839">
    <title>Upgrade from Mathematica 10.0.2 to 10.1.0 home edition for free?</title>
    <link>https://community.wolfram.com/groups/-/m/t/471839</link>
    <description>Hi,&#xD;
I would like to know if the upgrade for Mathematica 10.0.2 home edition to 10.1 home edition is seen as a whole new version and therefor should be a paid upgrade (aprox 90 dollar). &#xD;
&#xD;
regards,&#xD;
Lou</description>
    <dc:creator>l van Veen</dc:creator>
    <dc:date>2015-04-01T20:45:15Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/412193">
    <title>How multidimensional Interpolation works in mathematica</title>
    <link>https://community.wolfram.com/groups/-/m/t/412193</link>
    <description>Dear Friends&#xD;
I have used Interpolation function in 3-D works. I only know that this interpolation gives the exact value of cologation points and attributes a approximate number to any points between them. How can I find the equation and mathematic assumptions that have been considered for thid multidimensional Interpolation&#xD;
&#xD;
Interpolation[{{x1,f1},{x2,f2},}]&#xD;
construct an approximate function with values  at points</description>
    <dc:creator>Soheil Bazazzadeh</dc:creator>
    <dc:date>2014-12-27T15:27:34Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1140640">
    <title>[WSC17] Using Kleene and Priest Logic Rules to Create Ternary Logic Tables</title>
    <link>https://community.wolfram.com/groups/-/m/t/1140640</link>
    <description>&amp;lt;h1&amp;gt;Introduction&amp;lt;/h1&amp;gt;&amp;lt;br&amp;gt;&#xD;
&#xD;
My name is Taha Shaikh and I attended the 2017 Wolfram Alpha High School Summer Camp. At this camp, I researched and created a project about many-valued logic.&#xD;
&#xD;
In this exploration, I implemented multivalued logic with the Wolfram language. Multivalued logic is a branch of propositional calculus in which there are more than two truth values. Multivalued logic contrasts with traditional two-valued logic in which only two truth values exist: &amp;lt;i&amp;gt;True&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;False&amp;lt;/i&amp;gt;. The most popular types of many-valued logic are three-valued Kleene and Priest logic, which incorporate an additional &amp;lt;i&amp;gt;Indeterminate&amp;lt;/i&amp;gt; value. The truth function for conjunction, for example, is given by:&#xD;
&#xD;
![Ternary Logic Conjunction Table][1]&#xD;
&#xD;
&amp;lt;hr&amp;gt;&#xD;
&#xD;
&amp;lt;h2&amp;gt;Procedure&amp;lt;/h2&amp;gt;&#xD;
&amp;lt;br&amp;gt;&#xD;
The first step in this project was understanding the aim of the investigation and doing research on the topics at hand. Next, support for the new truth value &amp;lt;i&amp;gt;Undecided&amp;lt;/i&amp;gt; was added to the basic boolean operations. I used Kleene and Priest logic tables to redefine the boolean operations. &#xD;
&#xD;
![Different Logic Tables][2]&#xD;
&#xD;
    Undecided = Undecided;&#xD;
    Unprotect[And];&#xD;
    And[Undecided, True] := Undecided&#xD;
    And[Undecided, Undecided] := Undecided&#xD;
    Protect[And];&#xD;
    Unprotect[Boole];&#xD;
    Boole[Undecided] := 0&#xD;
    Boole[False] := -1&#xD;
    Protect[Boole];&#xD;
    Unprotect[Or];&#xD;
    Or[Undecided, False] := Undecided&#xD;
    Or[Undecided, Undecided] := Undecided&#xD;
    Protect[Or];&#xD;
    Unprotect[Not];&#xD;
    Not[Undecided] := Undecided&#xD;
    Unprotect[Implies];&#xD;
    Implies[True, Undecided] := Undecided&#xD;
    Implies[Undecided, Undecided] := True&#xD;
    Implies[False, Undecided] := True&#xD;
    Implies[Undecided, True] := True&#xD;
    Implies[Undecided, False] := Undecided&#xD;
    Protect[Implies];&#xD;
    Unprotect[Nand];&#xD;
    Nand[Undecided, Undecided] := Undecided&#xD;
    Protect[Nand];&#xD;
    Unprotect[Nor];&#xD;
    Nor[Undecided, Undecided] := Undecided&#xD;
    Protect[And];&#xD;
&#xD;
&amp;lt;br&amp;gt;&#xD;
These functions ensured that the rest of the functions created worked smoothly. The next step was creating a function that would generate truth tables based on a given operation and the list of the variables used. The TernaryTable function used an input of a logic expression and the list of used variables and converts it into a truth table. Where Boolean logic has $2^2 = 4$ unary operators, the addition of a third value in ternary logic leads to a total of $3^3 = 27$ distinct operators on a single input value. It uses the Tuples function to run through all of the possible permutations of the three truth values and runs them through the given expression.&#xD;
&amp;lt;br&amp;gt;&#xD;
&amp;lt;br&amp;gt;&#xD;
&#xD;
    TernaryTable[expr_, vars__] :=&#xD;
     &#xD;
     ReplaceAll[expr, Thread[vars -&amp;gt; #]] &amp;amp; /@ &#xD;
      Tuples[{True, False, Undecided}, {Length[vars]}]&#xD;
&#xD;
&amp;lt;br&amp;gt;&#xD;
An example of TernaryTable in action:&#xD;
&#xD;
![enter image description here][3]&#xD;
&#xD;
This function uses the Tuples function to run through the various combinations and permutations of the three different truth values. The truth table generated has length $3^n$ in which $n$ is the number of variables used in the logic expression. In the case of this example, since four variables are present (x, y, z, w), the length of its truth table is $3^4$ or 81. This is because all possible permutations of the three truth values are considered when generating the truth table. Even though many of the outputs are the same, their individual logic expressions were unique. Creating a function that created truth tables was a good first step and helped me better visualize and understand the topic.&#xD;
&amp;lt;hr&amp;gt;&#xD;
&amp;lt;h2&amp;gt;Cooking Up Some Functions&amp;lt;/h2&amp;gt;&amp;lt;br&amp;gt;&#xD;
&#xD;
The main strategy for determining the identity of the truth table was brute-force-esque. All of the possible arrangements of the basic logic functions were ran through the tuples of the three logic values. Their logic expression was also calculated and correlated to their truth table. First, I made a function called LotsOfTernaryTables that produces a lot of ternary tables. Given the number of variables, it produces every possible truth table for every possible arrangement of the functions And, Or, Nand, Nor, and Not for the given variables. &amp;lt;br&amp;gt;&#xD;
&#xD;
    LotsOfTernaryTables[x_] :=&#xD;
      &#xD;
      MatrixForm[&#xD;
       Groupings[#, {And -&amp;gt; 2, Or -&amp;gt; 2, Nand -&amp;gt; 2, Nor -&amp;gt; 2, Not -&amp;gt; 1}, &#xD;
          HoldForm] &amp;amp; /@ Tuples[{True, False, Undecided}, {x}]]&#xD;
&#xD;
&amp;lt;br&amp;gt;&#xD;
In this function, Groupings was used in coordination with Tuples to produce a huge number of different tables.&#xD;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&#xD;
In order to visualize these massive tables, I created a function called TernaryPlot that generates a colorful plot of the different logic truth tables. It converts the outputs from LotsOfTernaryTables into numerical values and creates a colorful array plot. It uses similar mechanics to the previous function.&amp;lt;br&amp;gt;&#xD;
&#xD;
    TernaryPlot[x_] :=&#xD;
     &#xD;
     ArrayPlot[&#xD;
      Boole[Groupings[#, {And -&amp;gt; 2, Or -&amp;gt; 2, Nand -&amp;gt; 2, Nor -&amp;gt; 2, &#xD;
           Not -&amp;gt; 1}]] &amp;amp; /@ Tuples[{True, False, Undecided}, {x}], &#xD;
      ColorRules -&amp;gt; {1 -&amp;gt; Green, 0 -&amp;gt; LightBlue, -1 -&amp;gt; Red}]&#xD;
&amp;lt;br&amp;gt;&#xD;
The array plot created by this function has several visible patterns and sequences and makes very interesting art. A ternary plot with 3 variables, for example, looks like so:&amp;lt;br&amp;gt;&#xD;
![enter image description here][4]&#xD;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&#xD;
In this plot, every column represents an individual truth table. In this case, since there are three variables, each column contains $3^3=27$ values. When creating ternary plots with more variables, patterns become crazier and the resulting image has some pretty appealing qualities. The ternary plot for 6 variables looks like so:&amp;lt;br&amp;gt;&#xD;
![enter image description here][5]&#xD;
&#xD;
&amp;lt;br&amp;gt;&#xD;
Finally, the last function I created was called TernaryFunction and was based off of the pre-existing BooleanFunction. When given a ternary truth table, this function would return the logic expression associated with it. After generating a list of truth tables and a list of logic expressions, the two lists were then correlated with each other. After retrieving the correct truth table, its corresponding logic expression was derived and returned. In order to assist with this process, the logarithm base 3 of the length of the truth table was calculated and used to narrow down the number of arguments that had to be processed. The function still works with an unlimited number of arguments as long as $log_3n$ is an integer with $n$ representing the length of the inputted truth table. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&#xD;
This is an example of TernaryFunction in action:&amp;lt;br&amp;gt;&#xD;
![enter image description here][6]&#xD;
&amp;lt;br&amp;gt;&#xD;
The logic function is returned with the given variables as defined by the user.&#xD;
&#xD;
&amp;lt;hr&amp;gt;&#xD;
&amp;lt;h2&amp;gt;Differences From Binary Logic&amp;lt;/h2&amp;gt;&amp;lt;br&amp;gt;&#xD;
&amp;lt;p&amp;gt;Multi-valued logics are intended to preserve the property of designationhood, or being designated. Since there are more than two truth values, rules of inference may be intended to preserve more than just whichever corresponds to truth. For example, in a three-valued logic, sometimes the two greatest truth-values (when they are represented as e.g. positive integers) are designated and the rules of inference preserve these values. Precisely, a valid argument will be such that the value of the premises taken jointly will always be less than or equal to the conclusion.&amp;lt;/p&amp;gt;&#xD;
&amp;lt;br&amp;gt;&#xD;
&amp;lt;hr&amp;gt;&#xD;
&amp;lt;h2&amp;gt;Applications of Ternary Logic&amp;lt;/h2&amp;gt;&#xD;
&amp;lt;br&amp;gt;&#xD;
&amp;lt;p&amp;gt;An application of many valued logic is geared towards the design of electronic circuits which employ more than two discrete levels of signals, such as many-valued memories, arithmetic circuits, and field programmable gate arrays. Many-valued circuits have a number of theoretical advantages over standard binary circuits. For example, the interconnect on and off chip can be reduced if signals in the circuit assume four or more levels rather than only two. In memory design, storing two instead of one bit of information per memory cell doubles the density of the memory in the same die size. Applications using arithmetic circuits often benefit from using alternatives to binary number systems. For example, residue and redundant number systems can reduce or eliminate the ripple-through carries which are involved in normal binary addition or subtraction, resulting in high-speed arithmetic operations.&amp;lt;/p&amp;gt;&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=tablemyb.png&amp;amp;userId=1138154&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=allthetables.png&amp;amp;userId=1138154&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=terntable.png&amp;amp;userId=1138154&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=plotarry.png&amp;amp;userId=1138154&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ternarylogic6-1.png&amp;amp;userId=1138154&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=ternfunc.png&amp;amp;userId=1138154</description>
    <dc:creator>Taha Shaikh</dc:creator>
    <dc:date>2017-07-07T11:10:37Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1140551">
    <title>[WSC17] Predicting Fractal Dimension Using Machine Learning</title>
    <link>https://community.wolfram.com/groups/-/m/t/1140551</link>
    <description># Predicting fractal Dimension using Machine Learning&#xD;
&#xD;
----------&#xD;
&#xD;
## Motivation&#xD;
Fractal Dimension is a way to measure the complexity of a fractal. This project&amp;#039;s purpose it too estimate it with machine learning. Traditional methods such as box counting have shortcomings, such as a lack of versatility with many different types of fractals, and inefficient compute times. Machine learning was used to give good approximations of the fractal dimension of any fractal with reasonable speed.&#xD;
&#xD;
## Data Collection&#xD;
I decided to use an image of a fractal as the input, and the dimension as the output. This allowed the algorithm to classify many types of fractals.&#xD;
&#xD;
### Wikipedia&#xD;
Wikipedia has a set of fractal images, as well the corresponding fractal dimensions. I looked through them to pick the ones with high quality images for my training set, however it was not enough.&#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
### Randomly Generated Julia Sets&#xD;
I chose to generate random Julia Sets, as there is a built in function for it in Wolfram Language. Julia Sets have a single parameter called c, and changing it generates unique fractals. I generated Julia Sets with random c values, both real and complex, to give the sets some variety.&#xD;
&#xD;
    CreateJuliaFractals[size_] :=&#xD;
        Module[{jFunction = {JuliaSetPlot[#], #} &amp;amp;, jFractals},&#xD;
        jFractals =&#xD;
        jFunction /@ Table[RandomComplex[], Floor[size/2]] \[Union]&#xD;
        jFunction /@ Table[RandomReal[{-1, 1}], Ceiling[size/2]];&#xD;
        Association[#[[1]] -&amp;gt; JuliaFractalDimension[#[[2]]] &amp;amp; /@ jFractals]&#xD;
    ]&#xD;
&#xD;
Calculating the fractal dimension from a given c value of a Julia Set is relatively simple.&#xD;
&#xD;
    JuliaFractalDimension[c_] := 1 + Abs[c]^2/4 Log[2]&#xD;
&#xD;
## Training&#xD;
I split the data into train and test and used the Predict function in Wolfram Language, as it has the capability of returning a result that differs from the training set.&#xD;
&#xD;
    FractalDimensionPredictor[training_] := Predict[List @@ training]&#xD;
&#xD;
## Evaluation&#xD;
I returned the real and predicted fractal dimension as well as the margin of error for every fractal in the test set.&#xD;
&#xD;
    FractalMapEval[pred_, test_] := Keys[KeyMap[# -&amp;gt; {test[#], pred[#]} &amp;amp;, test]]&#xD;
&#xD;
## Deployment&#xD;
I created a micro site in which people can put in pictures of any fractal and get an approximation of it&amp;#039;s dimension.&#xD;
&#xD;
    CloudDeploy[FormFunction[{&amp;#034;Fractal&amp;#034; -&amp;gt; &amp;#034;Image&amp;#034;},&#xD;
        Column[{#image, pred[#image]}] &amp;amp;, &amp;#034;PNG&amp;#034;,&#xD;
        AppearanceRules -&amp;gt; &amp;lt;|&amp;#034;Title&amp;#034; -&amp;gt;     &amp;#034;Predict Fractal Dimension&amp;#034;|&amp;gt;],&#xD;
        Permissions -&amp;gt; &amp;#034;Public&amp;#034;]&#xD;
&#xD;
## Conclusion&#xD;
Before doing this project, I had no idea what fractal dimension was, and I learned many things including data generation and continuous classification. In the future I hope to use iterated function system to generate more fractals.&#xD;
&#xD;
Visit the micro site [here](https://www.wolframcloud.com/objects/7102eabb-7b80-4bb1-9652-eebcd75e90cd).&#xD;
&#xD;
Link to source code [here](https://github.com/LordDarkula/FractalNet).&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=fractalData.png&amp;amp;userId=515558</description>
    <dc:creator>Aubhro Sengupta</dc:creator>
    <dc:date>2017-07-07T13:47:06Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/406693">
    <title>How to get prime factorization with a factor base?</title>
    <link>https://community.wolfram.com/groups/-/m/t/406693</link>
    <description>How can I get the prime factors of a number, with all the primes being less to a factor base $B$. For example given $B=8$, then the primes used can only be in $\{2,3,5,7\}$. And given $48$, it returns $2^43$.&#xD;
&#xD;
Anyone know how to do this in wolfram alpha?&#xD;
&#xD;
Thanks</description>
    <dc:creator>Ryan D&amp;#039;Souza</dc:creator>
    <dc:date>2014-12-12T20:08:31Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/406556">
    <title>m*m bijective function</title>
    <link>https://community.wolfram.com/groups/-/m/t/406556</link>
    <description>Dear All,&#xD;
&#xD;
I&amp;#039;m working on an algorithm of a block cipher. One step of this algorithm is to build m*m bijective functions (here: m = 4). Earlier I assumed it means the input and output should be 4 bits respectively. But this understanding didn&amp;#039;t fit in the algorithm well. According to the algorithm, there&amp;#039;s a definition of bijective functions.&#xD;
&#xD;
![enter image description here][1]&#xD;
&#xD;
&#xD;
  [1]: /c/portal/getImageAttachment?filename=Bildschirmfoto2014-12-12um16.47.27.png&amp;amp;userId=406528&#xD;
&#xD;
Anyone has an idea about the m*m bijective functions? Any pointer would be appreciated. Thanks in advance!&#xD;
&#xD;
Best Regards</description>
    <dc:creator>Qi Z</dc:creator>
    <dc:date>2014-12-12T15:51:40Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/385883">
    <title>Step-Wise Functions</title>
    <link>https://community.wolfram.com/groups/-/m/t/385883</link>
    <description>How do I enter a step-wise function into WolframAlpha?  How do I enter a step-wise differential equation?</description>
    <dc:creator>Jay Gourley</dc:creator>
    <dc:date>2014-11-08T04:16:08Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/428854">
    <title>Speeding up  a simulation</title>
    <link>https://community.wolfram.com/groups/-/m/t/428854</link>
    <description>Hi All,&#xD;
&#xD;
   I have tried my best to speed up the simulation below. Could it be made more time efficient ?  Please ignore the LV function for now.&#xD;
&#xD;
        &#xD;
    TFinal = 0.5;&#xD;
    NN = 10;&#xD;
    r = 0;&#xD;
    dt = TFinal/NN;&#xD;
    (*Initial Stock*)&#xD;
    (*All the parameters should be easily extractable from the files \&#xD;
    available*)&#xD;
    S0 = 1;&#xD;
    &#xD;
    Num = 100000;&#xD;
    &#xD;
    (**)&#xD;
    &#xD;
    Tmin = 0.01;&#xD;
    T = Tmin;&#xD;
    LV = Compile[{{x, _Real}}, 0.8];&#xD;
    (******************)&#xD;
    &#xD;
    &#xD;
    &#xD;
    ParallelEvaluate[Off[InterpolatingFunction::dmval]];&#xD;
    &#xD;
    (*Initial Simulation Block*)&#xD;
    SimPathsLV = Transpose[Reap[&#xD;
          Sow[ParallelTable[S0, {Num}]];&#xD;
          Sow[&#xD;
           SamplePaths2 = &#xD;
            ParallelTable[&#xD;
             Nest[(a = RandomVariate[NormalDistribution[0, 1]]; #*&#xD;
                 Exp[((r - 0.5*(LV[#])^2)*dt + (LV[#])*Sqrt[dt]*a)]) &amp;amp;, &#xD;
              S0, 1], {Num}]];&#xD;
          For[k = 0, T &amp;lt; TFinal, k++,&#xD;
           T = T + dt;&#xD;
           Sow[&#xD;
            SamplePaths2 = &#xD;
             ParallelTable[&#xD;
              Nest[(a = RandomVariate[NormalDistribution[0, 1]]; #*&#xD;
                  Exp[((r - 0.5*(LV[#])^2)*dt + (LV[#])*Sqrt[dt]*a)]) &amp;amp;, &#xD;
               SamplePaths2[[i]], 1], {i, 1, Num}]]&#xD;
           (*Appending out iteration of the simulation*)&#xD;
           ]][[2, 1]]] // Timing;&#xD;
    &#xD;
    SimPathsLV[[1]]</description>
    <dc:creator>Nabeel Butt</dc:creator>
    <dc:date>2015-01-26T19:53:49Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/402946">
    <title>How do the same function in Mathematica?</title>
    <link>https://community.wolfram.com/groups/-/m/t/402946</link>
    <description>Hello all, today I write because i have a doubt, by searching on the internet something for my project i found myself with this code in Matlab, which I am trying to translate to Mathematica but without success, I unfortunately know very little of Matlab, and would ask for your help, then I put the code in Matlab and my attempt in Mathematica, greetings to all. Thank you in advance.&#xD;
&#xD;
Code en matlab&#xD;
&#xD;
n=384; m=512;&#xD;
tx=[0:n-1]; ty[0:m-1];&#xD;
&#xD;
rho=@(x,y) ((1-x^2/50^2-x*y/(15*50)-y^2/15^2)...&#xD;
*exp(-(x^2/50^2+y^2/15^2)))&#xD;
&#xD;
my attempt in Mathematica&#xD;
&#xD;
    n=384; m=512;&#xD;
    &#xD;
    tx=Range[0,n-1]; ty=Range[0,m-1];&#xD;
    &#xD;
    rho[x_,y_]:= 1 - x^2/50^2 - (x y)/(50*15) - y^2/15^2*Exp[-(x^2/50^2) - y^2/15^2]&#xD;
&#xD;
I hope I have done my job well, but if i have errors please let me know.</description>
    <dc:creator>Luis Ledesma</dc:creator>
    <dc:date>2014-12-06T03:53:02Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1008706">
    <title>Convert Crandall&amp;#039;s Mma MRB Constant code to C, C++ or Turbo C++</title>
    <link>https://community.wolfram.com/groups/-/m/t/1008706</link>
    <description>The late Richard Crandall worked to develop the following robust Mathematica code for calculating many digits of the MRB constant.&#xD;
Just before he died he did something with it to increase it&amp;#039;s speed many fold! as seen in [Try to Beat these MRB Constant Records!][1] .  After much consideration I decided he converted it to a low level language like  C, C++ or Turbo C++. Unfortunately he died before he could share it with enough people.&#xD;
Can anyone here translate the code into one or more of those languages for the world?&#xD;
&#xD;
It has two flavors: first plain and then multi threaded.&#xD;
&#xD;
First:&#xD;
&#xD;
    (*Newer loop with Newton interior.*)prec = 5000;(*Number of required \&#xD;
    decimals.*)expM[pr_] := Module[{a, d, s, k, b, c}, n = Floor[1.32 pr];&#xD;
      Print[&amp;#034;Iterations required: &amp;#034;, n];&#xD;
      d = N[(3 + Sqrt[8])^n, pr + 10];&#xD;
      d = Round[1/2 (d + 1/d)];&#xD;
      {b, c, s} = {-1, -d, 0};&#xD;
      T0 = SessionTime[];&#xD;
      Do[c = b - c;&#xD;
       x = N[E^(Log[k + 1]/(k + 1)), iprec = Ceiling[prec/128]];&#xD;
       pc = iprec;&#xD;
       Do[nprec = Min[2 pc, pr];&#xD;
        x = SetPrecision[x, nprec];(*Adjust precision*)&#xD;
        x = N[x - x/(k + 1) + 1/x^k, nprec];&#xD;
        pc *= 2;&#xD;
        If[nprec &amp;gt;= pr, Break[]], {ct, 1, 19}];&#xD;
       s += c*(x - 1);&#xD;
       b *= 2 (k + n) (k - n)/((k + 1) (2 k + 1));&#xD;
       If[Mod[k, 1000] == 0, &#xD;
        Print[&amp;#034;Iterations: &amp;#034;, k, &amp;#034;    Cumulative time (sec): &amp;#034;, &#xD;
          SessionTime[] - T0];], {k, 0, n - 1}];&#xD;
      N[-s/d, pr]];&#xD;
    &#xD;
    MRBtest2 = expM[prec]&#xD;
&#xD;
Then for the adventures,&#xD;
&#xD;
    (*Fastest (at RC&amp;#039;s end) as of 30 Nov 2012.*)prec = 500000;(*Number of \&#xD;
    required decimals.*)ClearSystemCache[];&#xD;
    T0 = SessionTime[];&#xD;
    expM[pre_] := &#xD;
      Module[{a, d, s, k, bb, c, n, end, iprec, xvals, x, pc, cores = 4, &#xD;
        tsize = 2^7, chunksize, start = 1, ll, ctab, &#xD;
        pr = Floor[1.02 pre]}, chunksize = cores*tsize;&#xD;
       n = Floor[1.32 pr];&#xD;
       end = Ceiling[n/chunksize];&#xD;
       Print[&amp;#034;Iterations required: &amp;#034;, n];&#xD;
       Print[&amp;#034;end &amp;#034;, end];&#xD;
       Print[end*chunksize];&#xD;
       d = N[(3 + Sqrt[8])^n, pr + 10];&#xD;
       d = Round[1/2 (d + 1/d)];&#xD;
       {b, c, s} = {SetPrecision[-1, 1.1*n], -d, 0};&#xD;
       iprec = Ceiling[pr/27];&#xD;
       Do[xvals = Flatten[ParallelTable[Table[ll = start + j*tsize + l;&#xD;
            x = N[E^(Log[ll]/(ll)), iprec];&#xD;
            pc = iprec;&#xD;
            While[pc &amp;lt; pr, pc = Min[3 pc, pr];&#xD;
             x = SetPrecision[x, pc];&#xD;
             y = x^ll - ll;&#xD;
             x = x (1 - 2 y/((ll + 1) y + 2 ll ll));];(*N[Exp[Log[ll]/ll],&#xD;
            pr]*)x, {l, 0, tsize - 1}], {j, 0, cores - 1}, &#xD;
           Method -&amp;gt; &amp;#034;EvaluationsPerKernel&amp;#034; -&amp;gt; 1]];&#xD;
        ctab = Table[c = b - c;&#xD;
          ll = start + l - 2;&#xD;
          b *= 2 (ll + n) (ll - n)/((ll + 1) (2 ll + 1));&#xD;
          c, {l, chunksize}];&#xD;
        s += ctab.(xvals - 1);&#xD;
        start += chunksize;&#xD;
        Print[&amp;#034;done iter &amp;#034;, k*chunksize, &amp;#034; &amp;#034;, SessionTime[] - T0];, {k, 0,&#xD;
          end - 1}];&#xD;
       N[-s/d, pr]];&#xD;
    &#xD;
    t2 = Timing[MRBtest2 = expM[prec];];&#xD;
    MRBtest2 - MRBtest3&#xD;
&#xD;
MRBtest3 is any known decimal expansion of the MRB constant.&#xD;
You can use the above Mathematica code to calculate as many trial digits for MRBtest3 as you wish. I have absolute confidence that the code gives accurate results for anywhere from 5000 to 2,000,000 digits.&#xD;
&#xD;
As far as interpeting the code is concerned I noted that&#xD;
`x = N[E^(Log[ll]/(ll)), iprec];` Gives k^(1/k) to only 1 decimal place; they are either 1.0, 1.1, 1.2, 1.3 or 1.4 (usually 1.1 or 1.0).&#xD;
 On the other hand,&#xD;
&#xD;
    While[pc &amp;lt; pr, pc = Min[3 pc, pr];&#xD;
     x = SetPrecision[x, pc];&#xD;
     y = x^ll - ll;&#xD;
     x = x (1 - 2 y/((ll + 1) y + 2 ll ll));],&#xD;
&#xD;
takes the short precision x and gives it the necessary precision and accuracy for k^(1/k) (k Is ll there.) It actually computes k^(1/k). &#xD;
Then he remarks, &amp;#034;(N[Exp[Log[ll]/ll], pr]).&amp;#034;&#xD;
&#xD;
After finding a fast way to compute k^(1/k) to necessary precision he uses Cohen&amp;#039;s algorithm 1, found at [Henri Cohen, Fernando Rodriguez Villegas, and Don Zagier,s Convergence Acceleration of Alternating Series][2], to accelerate convergence of Sum[(-1)^k*(k^(1/k) - 1), {k, 1, Infinity}].&#xD;
&#xD;
Looking at Cohen&amp;#039;s paper:&#xD;
&#xD;
![enter image description here][3]&#xD;
![enter image description here][4]&#xD;
![enter image description here][5]&#xD;
&#xD;
we see the $a_n$&amp;#039;s are multiplied over the c&amp;#039;s. There Crandall craftily took advantage of Mathematica&amp;#039;s dot product advantages. &#xD;
&#xD;
So `s += ctab.(xvals - 1);`is in place of ![enter image description here][6].&#xD;
&#xD;
&#xD;
  [1]: http://community.wolfram.com/groups/-/m/t/366628?p_p_auth=rwE8taHU&#xD;
  [2]: http://people.mpim-bonn.mpg.de/zagier/files/exp-math-9/fulltext.pdf&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=68211.JPG&amp;amp;userId=366611&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=93142.JPG&amp;amp;userId=366611&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=93013.JPG&amp;amp;userId=366611&#xD;
  [6]: http://community.wolfram.com//c/portal/getImageAttachment?filename=36464.JPG&amp;amp;userId=366611</description>
    <dc:creator>Marvin Ray Burns A.G.S. (cum laude)</dc:creator>
    <dc:date>2017-02-05T19:55:23Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/557572">
    <title>DERIVATIVE OF A TRANSFER FUNCTION</title>
    <link>https://community.wolfram.com/groups/-/m/t/557572</link>
    <description>Hi,&#xD;
&#xD;
I have the following situation and would like some feedback on my approach to solving the problem, since I am not sure if it&amp;#039;s &amp;#034;mathematically legit&amp;#034;:&#xD;
&#xD;
I have two transfer functions: function A is the transfer function of a system, function B is the transfer function of a reduced version of the same system. The transfer functions show the frequency response of the system, the input being a force and output being a displacement. I want to compare both functions and see what the deviation of the reduced order system is from the original system.&#xD;
&#xD;
Now, however, for the overall goal of the project, I am not so interested in the displacement, but rather the velocity. So it would be great if I could compare the velocities I am getting from both functions. This should just be the derivative of the transfer functions since the transfer functions are giving me the displacement? The transfer functions are complex and in the frequency domain (H_a(jw) and H_b(jw)), so the derivative of these should just be a multiplication with jw (since s=jw for steady state)? Is this correct?&#xD;
&#xD;
Thank you in advance!</description>
    <dc:creator>A N</dc:creator>
    <dc:date>2015-09-01T13:49:16Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/469432">
    <title>Dynamic functions and interface</title>
    <link>https://community.wolfram.com/groups/-/m/t/469432</link>
    <description>I have a large number of functions which I am combining into packages and will call those functions via a palette. I then use those functions in a notebook and may need to call them several times. The data entry for many of those functions is via a dynamic interface, which gives a nice check on the data as it is entered. My problem is that, if I call the same function twice in a Notebook then entering the data each time the function is called changes the data for the previous function already in my notebook. Is there a way around this?</description>
    <dc:creator>Malcolm Woodruff</dc:creator>
    <dc:date>2015-03-29T10:53:12Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/550930">
    <title>Tiling the plane - another two?</title>
    <link>https://community.wolfram.com/groups/-/m/t/550930</link>
    <description>Hi, I have drawn these two tiling the plane pattens (A &amp;amp; B), are these just considered variations of some of the current, or are these new? Geometrically they are appear to be different (but with similarities) to all the ones I have seen. &#xD;
&#xD;
Type A is similar to type 4, but my type A has three equal sides, and the other two make the same length as one of the equal.  Type 4 has four equal sides. &#xD;
&#xD;
Type B is similar to type 8, but my type B has two 90 deg angles and the primary unit can overlap its self at each quadrant and maintain the patten.&#xD;
&#xD;
I would be interested in any opinion about these two Plane Tile Pattens. Thanks!</description>
    <dc:creator>Reece Hill</dc:creator>
    <dc:date>2015-08-21T11:20:42Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1793523">
    <title>Use an InputField going with the result of a RadioButon?</title>
    <link>https://community.wolfram.com/groups/-/m/t/1793523</link>
    <description>I am looking for a solution for a minor but annoying flaw in a program that I made for building a CDF for analysing the properties of accumulations of random numbers. In the CDF I can choose for several types of such accumulations through a number of radiobuttons. With each radiobutton I can make a list that contains the sum of the accummulation in question along with several parameters and quantities that I for instance need for a text above the final chart of the accumulation and some additional special properties of it. &#xD;
Together with each radiobutton for any accumulation with a certain probability distribution the CDF has one or more inputfields for the necessary parameters, such as mean and standard deviation for a normal distribution.&#xD;
My problem is the following: After pushing a radiobutton and then inserting a number in an inputfield that goes with that button, and then hitting Enter or clicking with the mouse outside of the input field, the radiobutton turns white and in order to make the number in the input field do its work I have to push this radiobutton anew. What I want is that the new situation is activated right away after entering a number in the inputfield and then pushing Enter of clicking with the mouse outside of the inputfield. I hope there is a solution for this.&#xD;
This is the program all the way stripped down to the relevant section: &#xD;
&#xD;
    Export[&amp;#034;Testpanel.cdf&amp;#034;,&#xD;
     CreateDocument[{   &#xD;
       DynamicModule[{y, beta, center, standarddeviation, mean},&#xD;
        Row[{&#xD;
          Row[{&#xD;
            Dynamic[&#xD;
             SeedRandom[1];&#xD;
             RadioButton[&#xD;
              Dynamic[y], {&amp;#034; Laplace&amp;#034;, &amp;#034; distribution&amp;#034;, &amp;#034; &amp;#034;, &#xD;
               Accumulate[&#xD;
                RandomVariate[LaplaceDistribution[center, beta], 1000]], &#xD;
               0}]],&#xD;
            TextCell[&amp;#034; Laplace &amp;#034;],&#xD;
            center = 0;&#xD;
            InputField[Dynamic[center], FieldSize -&amp;gt; 3],&#xD;
            beta = 1.7;&#xD;
            InputField[Dynamic[beta], FieldSize -&amp;gt; 3],&#xD;
            TextCell[&amp;#034;  &amp;#034;],&#xD;
            Dynamic[&#xD;
             SeedRandom[1];&#xD;
             RadioButton[&#xD;
              Dynamic[y], {&amp;#034; normal&amp;#034;, &amp;#034; distribution&amp;#034;, &amp;#034; &amp;#034;, &#xD;
               Accumulate[&#xD;
                RandomVariate[NormalDistribution[mean, standarddeviation],&#xD;
                  1000]], 0}]],&#xD;
            TextCell[&amp;#034;  Normal  &amp;#034;],&#xD;
            mean = 0;&#xD;
            standarddeviation = 1;&#xD;
            InputField[Dynamic[mean], FieldSize -&amp;gt; 3],&#xD;
            InputField[Dynamic[standarddeviation], FieldSize -&amp;gt; 3], &#xD;
            TextCell[&amp;#034;  &amp;#034;]&#xD;
            }],&#xD;
          Dynamic[Show[&#xD;
            ListPlot[&#xD;
             Partition[Riffle[Range[1, 500], y[[4]][[1 ;; 500]]], 2],&#xD;
             PlotStyle -&amp;gt; {PointSize[0.003], White}, Background -&amp;gt; Black ],&#xD;
            ImageSize -&amp;gt; 500]]      }]     ]}]]&#xD;
**Additional information**: In the meantime I discovered that after putting a new number in an inputfield instead of hitting Enter or clicking outside of the inputfield and then pushing the radiobutton again one may also get desired result by right away pushing the Radiobutton 3 times. So in fact my problem may be considered as solved.</description>
    <dc:creator>Laurens Wachters</dc:creator>
    <dc:date>2019-09-20T12:38:22Z</dc:date>
  </item>
  <item rdf:about="https://community.wolfram.com/groups/-/m/t/1382823">
    <title>[WSC18] Using Multilevel NAND trees to Create XOR Expressions</title>
    <link>https://community.wolfram.com/groups/-/m/t/1382823</link>
    <description>The goal of this project has been to explore NAND expressions and look for expressions equivalent to XOR. The Wolfram Language can already simplify XOR expressions with NANDs by using the following function but it only simplifies to a two level tree. By using more than two levels there is a possibility of finding a simpler version of three or four input XOR expressions. The reason that I chose to use NAND gates is that they are universal gates (any expression can be represented with a combination of NAND gates). Other universal gates like NOR would work but it seemed simplest to just stick with NAND to keep things consistent.&#xD;
&#xD;
    `BooleanMinimize[Xor[a, b, c], &amp;#034;NAND&amp;#034;] // TreeForm`&#xD;
![NAND simplification for XOR[a,b,c] in Tree Form][1]&#xD;
&#xD;
## Two Input Trees ##&#xD;
The first thing I implemented was a recursive function that creates all of the different NAND trees possible with a given amount of NAND gates. It works by assuming that each NAND gate only has two inputs. From this it runs through the possibilities for the NAND gate configurations on each input.&#xD;
&#xD;
![Nand Tree Logic][2]&#xD;
&#xD;
The code starts by defining the first case of the recursive function and then on the next gates it runs through the different combinations with tuples to generate all of the outcomes. It also creates NAND trees with half of the amount of NAND implemented and it doesn&amp;#039;t know what to do with an odd amount of gates so &amp;#034;nandTreeCreate&amp;#034; was implemented to fix that by multiplying the input by two. Additionally it uses a new NAND function that get&amp;#039;s rid of trivial cases that aren&amp;#039;t worth computing (Ex. Xor[a, !a]).&#xD;
&#xD;
    nand[a_, a_] := Null;&#xD;
    nand[a_, ! a_] := Null;&#xD;
    nand[! a_, a_] := Null;&#xD;
    nand[a_, b_] /; OrderedQ[{a, b}] := Sow@Nand[a, b];&#xD;
    nand[a_, b_] := Null;&#xD;
&#xD;
    nandTreeGenerate[0] := {a, b, c, ! a, ! b, ! c}&#xD;
        &#xD;
    nandTuples[list1_, list2_] := &#xD;
     Replace[Reap[&#xD;
       Do[nand[a, b], {a, list1}, {b, list2}]], {{_, {x_}} :&amp;gt; x, _ :&amp;gt; {}}]&#xD;
    &#xD;
    nandTreeGenerate[&#xD;
       0] := {a,b,c,!a,!b,!c};&#xD;
    &#xD;
    nandTreeGenerate[nGates_] := &#xD;
     nandTreeGenerate[nGates] = &#xD;
      Module[{subtrees = nandTreeGenerate /@ Range[0, nGates - 1]},&#xD;
       Join @@ &#xD;
        Table[nandTuples[subtrees[[i]], subtrees[[nGates - i]]], {i, 1, &#xD;
          nGates - 1}]&#xD;
       ]&#xD;
    &#xD;
    nandTreeCreate[nGates_] := nandTreeGenerate[nGates*2]&#xD;
&#xD;
This turned out to be an effective set of functions but it wasn&amp;#039;t very useful since it only generates two input NAND trees and no simpler forms of XOR were found by running tests with this function. The following function was used to compare it to XOR.&#xD;
&#xD;
    Select[nandTreeCreate[5], &#xD;
     TautologyQ[Equivalent[Xor[a, b, c], #]] &amp;amp;]&#xD;
&#xD;
##Multi-Input Tree Generation ##&#xD;
By inputting the amount of leaves into the recursive function, I was able to expand it in order to account for more than two input NAND gates. This uses the same general structure as the two input NAND generate function except it is based on integer partitions to find all of the different combinations.&#xD;
&#xD;
    nand[arg_] := Nand[arg];&#xD;
    nand[args___] /; Equivalent[args] := Null;&#xD;
    nand[args___] /; OrderedQ[{args}] := Nand[args];&#xD;
    nand[args___] := Null;&#xD;
    &#xD;
    nandTuples[l_] := (nand @@ #) &amp;amp; /@ Tuples[l]&#xD;
    &#xD;
    nandTreeGenerate[1] := {a,b,c]};&#xD;
    &#xD;
    nandTreeGenerate[nLeaves_] := nandTreeGenerate[nLeaves]&#xD;
        DeleteCases[Module[{subtrees =  nandTreeGenerate /@ Range[1, nLeaves - 1]},&#xD;
             Join @@ ((nandTuples[subtrees[[#]] &amp;amp; /@ #] &amp;amp; /@ (IntegerPartitions[nLeaves - 1]))&#xD;
        ], Null]&#xD;
This works super well but it&amp;#039;s still computationally intensive and I figured out later that some of the logic must be wrong since it misses a couple of cases every once and awhile. It&amp;#039;s still good for getting a basic idea of the different cases that come from different leaf counts though.&#xD;
## Random Generation ##&#xD;
It seems that the best way to generate expressions computationally comes from random generation. This is because it can be stopped and started within a time limit even though it doesn&amp;#039;t get every possible expression. In order to implement this I used a function that inserts either a NAND gate or a variable at a random spot within the expression.&#xD;
&#xD;
    varlist = {\[FormalA], \[FormalB], \[FormalC]};&#xD;
    &#xD;
    addSomething[ex_] := Module[{positions},&#xD;
      positions = Position[ex, _myNand, {0, Infinity}];&#xD;
      Insert[ex, &#xD;
       RandomChoice[{.2, .7, .7, .7} -&amp;gt; Join[{myNand[]}, varlist]], &#xD;
       Append[RandomChoice[positions], 1]]&#xD;
      ]&#xD;
    &#xD;
    makeTree[nLeaves_] := (&#xD;
       (Last@NestList[addSomething, myNand[], nLeaves - 1]) /. &#xD;
        myNand[] :&amp;gt; RandomChoice[varlist]) /. myNand -&amp;gt; Nor&#xD;
    &#xD;
    randTreeGenerate[nLeaves_, nTimes_] := &#xD;
     makeTree /@ Table[nLeaves, nTimes]&#xD;
&#xD;
Although this is good for generating most functions, some cases become increasingly unlikely as it adds more terms. This makes it necessary to adjust the weights for NANDs and variables so that all of the cases have an equal chance of occurring. I didn&amp;#039;t have enough time to find the right values so eventually I setup the weights as random integers so that it would have a good distribution for each of the different weight combinations.&#xD;
##Visualizing the Data##&#xD;
At the end I made a couple of functions that could generate expressions for awhile and then put it in a form that&amp;#039;s easy to analyze. There are two equivalents of the functions depending on if you want to input the iterations or the duration that it should run for. It also has the option to input what percentage of those expressions should use NOR gates if any variation is needed.&#xD;
&#xD;
    Clear[&amp;#034;Global`*&amp;#034;]&#xD;
    &#xD;
    counts = Table[0, {i, 0, 255}];&#xD;
    &#xD;
    varlist = {a, b, c};&#xD;
    &#xD;
    addSomething[ex_, nand_: 1, var_: 1] := Module[{positions},&#xD;
      positions = Position[ex, _myNand, {0, Infinity}];&#xD;
      Insert[ex, &#xD;
       RandomChoice[{nand, var/3, var/3, var/3} -&amp;gt; &#xD;
         Join[{myNand[]}, varlist]], Append[RandomChoice[positions], 1]]&#xD;
      ]&#xD;
    &#xD;
    makeTreeNand[nLeaves_] := (&#xD;
       (Last@NestList[&#xD;
           addSomething[#, RandomInteger[{1, 20}], &#xD;
             RandomInteger[{1, 20}]] &amp;amp;, myNand[], nLeaves - 1]) /. &#xD;
        myNand[] :&amp;gt; RandomChoice[varlist]) /. myNand -&amp;gt; Nand&#xD;
    &#xD;
    makeTreeNor[nLeaves_] := (&#xD;
       (Last@NestList[&#xD;
           addSomething[#, RandomInteger[{1, 20}], &#xD;
             RandomInteger[{1, 20}]] &amp;amp;, myNand[], nLeaves - 1]) /. &#xD;
        myNand[] :&amp;gt; RandomChoice[varlist]) /. myNand -&amp;gt; Nor&#xD;
    &#xD;
    visualizeCount[leaves_, iterations_, Nand_] := &#xD;
     Module[{tree, counts = Table[0, {i, 0, 255}], c},&#xD;
      Monitor[Do[&#xD;
        c = 100*N@i/iterations;&#xD;
        tree = makeTreeNand[RandomInteger[{1, leaves}]];&#xD;
        counts[[FromDigits[Boole[BooleanTable[tree]], 2]]]++;&#xD;
        , {i, 1, iterations * (Nand/100)}&#xD;
        ], c];&#xD;
      Monitor[Do[&#xD;
        c = 100*N@i/iterations;&#xD;
        tree = makeTreeNor[RandomInteger[{1, leaves}]];&#xD;
        counts[[FromDigits[Boole[BooleanTable[tree]], 2]]]++;&#xD;
        , {i, 1, iterations * (1 - (Nand/100))}&#xD;
        ], c];&#xD;
      Print[ListLogPlot[Sort[counts[[#]] &amp;amp; /@ Range[0, 254]] + 1]];&#xD;
      Print[ArrayPlot[&#xD;
        IntegerDigits[#, 2, 8] &amp;amp; /@ &#xD;
         Flatten[Position[counts[[#]] &amp;amp; /@ Range[0, 254], 0] - 1], &#xD;
        Mesh -&amp;gt; True, ColorRules -&amp;gt; {0 -&amp;gt; Red, 1 -&amp;gt; Darker@Green}]];&#xD;
      Print[Column[&#xD;
        FullForm /@ (FullSimplify[BooleanFunction[#, varlist]] &amp;amp; /@ &#xD;
           Flatten[Position[counts[[#]] &amp;amp; /@ Range[0, 254], 0] - 1])]];&#xD;
      Print[BarChart[counts[[#]] &amp;amp; /@ Range[0, 254]]]&#xD;
      ]&#xD;
    &#xD;
    visualizeWhile[leaves_, time_, Nand_: 100] := &#xD;
     Module[{tree, c, start = UnixTime[]},&#xD;
      Monitor[&#xD;
       While[UnixTime[] &amp;lt; (start + (time*(Nand/100))),&#xD;
        c = UnixTime[] - start;&#xD;
        Do[tree = makeTreeNand[RandomInteger[{1, leaves}]];&#xD;
         len += 1;&#xD;
         counts[[FromDigits[Boole[BooleanTable[tree]], 2]]]++;, {100}]&#xD;
        ], c];&#xD;
      start = UnixTime[];&#xD;
      Monitor[&#xD;
       While[UnixTime[] &amp;lt; (start + (time*(1 - (Nand/100)))),&#xD;
        c = UnixTime[] - start;&#xD;
        Do[tree = makeTreeNand[RandomInteger[{1, leaves}]];&#xD;
         counts[[FromDigits[Boole[BooleanTable[tree]], 2]]]++;, {100}]&#xD;
        ], c];&#xD;
      Print[ListLogPlot[Sort[counts[[#]] &amp;amp; /@ Range[0, 254]] + 1]];&#xD;
      Print[ArrayPlot[&#xD;
        IntegerDigits[#, 2, 8] &amp;amp; /@ &#xD;
         Flatten[Position[counts[[#]] &amp;amp; /@ Range[0, 254], 0] - 1], &#xD;
        Mesh -&amp;gt; True, MeshStyle -&amp;gt; {Black, Thick}, Background -&amp;gt; Black, &#xD;
        ColorRules -&amp;gt; {0 -&amp;gt; Red, 1 -&amp;gt; Darker@Green}]];&#xD;
      Print[Column[&#xD;
        FullForm /@ (FullSimplify[BooleanFunction[#, varlist]] &amp;amp; /@ &#xD;
           Flatten[Position[counts[[#]] &amp;amp; /@ Range[0, 254], 0] - 1])]];&#xD;
      Print[BarChart[counts[[#]] &amp;amp; /@ Range[0, 254]]]&#xD;
      ]&#xD;
&#xD;
Because there are only three variables being used, the amount of possible truth tables is 256. The function uses a list to keep track of the amount of times each of those truth tables occurred and at the end it creates a logarithmic line plot and a histogram. This particular test ran for 12 hours or so. The logarithmic plot is shifted up one to make it easier to analyze the data.&#xD;
&#xD;
![Random Expression Logarithmic Plot][3]&#xD;
&#xD;
![Random Expression Histogram][4]&#xD;
&#xD;
It also formats the truth tables that weren&amp;#039;t generated into an array plot and lists the equivalent expressions for each of those truth tables.&#xD;
&#xD;
![Expressions not generated][5]&#xD;
&#xD;
    Xor[a,b,c,And[a,b,c]]&#xD;
    Not[Xor[a,b,c,And[a,b],And[a,b,c]]]&#xD;
    Not[Xor[a,b,c,And[a,c],And[a,b,c]]]&#xD;
    Not[Xor[a,b,c,And[b,c],And[a,b,c]]]&#xD;
    Not[Xor[a,b,c]]&#xD;
    Not[Xor[a,b,And[a,c],And[b,c],And[a,b,c]]]&#xD;
    Not[Xor[b,c,And[a,b],And[a,c],And[a,b,c]]]&#xD;
    Xor[a,c,And[a,b],And[b,c],And[a,b,c]]&#xD;
    Xor[a,b,c]&#xD;
    Xor[a,b,c,And[b,c],And[a,b,c]]&#xD;
    Xor[a,b,c,And[a,c],And[a,b,c]]&#xD;
    Not[Xor[a,b,c,And[a,b,c]]]&#xD;
&#xD;
##Conclusion##&#xD;
From random generation I was able to deduce to a reasonable degree of certainty that it is impossible to generate an equivalent NAND expression that&amp;#039;s simpler than the one the Wolfram Language generates for three input XOR gates. There are most likely equivalent expressions out there for four or more input XOR expressions but that proves to be very computationally intensive and time consuming. It is pretty interesting how some expressions require significantly more NAND gates to be expressed because of their structure and the nature of NAND gates. It would be interesting to look into making expressions with NOR and XOR gates in the future and maybe putting more time into generating random expressions.&#xD;
&#xD;
  [1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Capture2.PNG&amp;amp;userId=1371737&#xD;
  [2]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Tree.png&amp;amp;userId=1371737&#xD;
  [3]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Capture1.PNG&amp;amp;userId=1371737&#xD;
  [4]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Capture3.PNG&amp;amp;userId=1371737&#xD;
  [5]: http://community.wolfram.com//c/portal/getImageAttachment?filename=Capture.PNG&amp;amp;userId=1371737</description>
    <dc:creator>Ben Huenemann</dc:creator>
    <dc:date>2018-07-13T17:54:42Z</dc:date>
  </item>
</rdf:RDF>

