Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

CAGenetics

Guides

  • Main Guide

Symbols

  • AncestorGraphEvolution
  • AncestorGraph
  • AncestorsEvolution
  • CACanonicalTree
  • CAEquationTree
  • CAEvolutionTree
  • CAGeneticTree
  • CAMonotoneQTree
  • CanonicalGenes
  • CanonicalRule
  • CANormalTree
  • CAPlot
  • CASymmetryIndexTree
  • CoeffToOutput
  • ComputeEntropy
  • ComputeWolframClass
  • DeNormalizePosition
  • DigitOrder
  • EquivalentClass
  • ExtendGene
  • FindMinimumRange
  • FromGenes
  • FromNormalSpace
  • FullAsymmetricRuleQ
  • GeneCompress
  • GeneEquation
  • GeneExpand
  • GeneFromNormalSpace
  • GenePrepend
  • GeneRule
  • GeneSet
  • GeneSets
  • GeneSplice
  • GeneThread
  • GeneToNormalSpace
  • GeneToPrimal
  • GeneVariables
  • GetWolframClass
  • IdentityRule
  • InverseRule
  • MAERule
  • MakeGeneSymmetric
  • ModulusKDCoeff
  • ModulusKDFunction
  • ModulusPCoeff
  • ModulusPCore
  • ModulusPFunctionFromCoeff
  • ModulusPFunction
  • ModulusPMatrix
  • MonotoneQ
  • NegateRule
  • NormalizePosition
  • NormalSignatureDiagonal
  • NormalSpaceCenter
  • NormalSpaceDotToReferenceVector
  • NormalSpaceProjectionToMain
  • NormalSpaceReference
  • NormalSpaceReferenceVector
  • NormalSpaceVectorFromPoints
  • NormalSpaceVectorOrthogonalToMain
  • OffsetGeneSet
  • OutputToCoeff
  • PermutationForSymmetry
  • PermutationsForReflection
  • PermutationsFromNormalSpace
  • PermutationsGeneToPrimal
  • PermutationsPrimalToGene
  • PermutationsToNormalSpace
  • PositionToPrimal
  • PrimalToGene
  • PrimalToPosition
  • PrintableEquation
  • ProbRule
  • RandomAsymmetricGene
  • RandomAsymmetricRule
  • RandomGene
  • RandomRule
  • RandomSemiAsymmetricRule
  • RandomSymmetricGene
  • RandomSymmetricRule
  • ReflectDigitOrder
  • ReflectGene
  • ReflectNormalRule
  • ReflectRule
Obando`CAGenetics`
RuleGenes
​
RuleGenes
[rule]
gives the list of the 2 genes that make up the rule in the Elementary Cellular Automata (ECA.)
​
​
RuleGenes
[rule,k]
gives the list of the k number of genes for the rule for the given k and r = 1.
​
​
RuleGenes
[rule,k,r]
gives the list of the k number of genes for the rule for the given and r.
​
Details and Options

Examples  
(1)
Basic Examples  
(1)
In[1]:=
Needs["Obando`CAGenetics`"]
In[2]:=
RuleGenes
[30]
Out[2]=
{6,3}
In[3]:=
RuleGenes
[110]
Out[3]=
{10,7}
In[4]:=
RuleGenes
[90]
Out[4]=
{6,6}
In[5]:=
RuleGenes
[86]
Out[5]=
{6,5}
In[6]:=
RuleGenes
[3452,3,1]
Out[6]=
{23,19,4}
▪
RuleGenes
is Listable.
In[7]:=
RuleGenes
[{30,110,124,86}]
Out[7]=
{{6,3},{10,7},{12,7},{6,5}}
▪
Find all the symmetric rules in the ECA and list the genes that make them.
In[8]:=
symmetricRules=Select[Range[0,255],SymmetryIndex[#,2,1]1&]​​symmetricGenes=Union[#]&/@Transpose
RuleGenes
[symmetricRules,2,1]
Out[8]=
{0,1,4,5,18,19,22,23,32,33,36,37,50,51,54,55,72,73,76,77,90,91,94,95,104,105,108,109,122,123,126,127,128,129,132,133,146,147,150,151,160,161,164,165,178,179,182,183,200,201,204,205,218,219,222,223,232,233,236,237,250,251,254,255}
Out[8]=
{{0,1,6,7,8,9,14,15},{0,1,6,7,8,9,14,15}}
▪
Find all the fully asymmetric rules in the ECA and list the genes that make them.
In[9]:=
asymmetricRules=Select[Range[0,255],SymmetryIndex[#,2,1]0&]​​asymmetricGenes=Union[#]&/@Transpose
RuleGenes
[asymmetricRules,2,1]
Out[9]=
{10,11,14,15,24,25,28,29,42,43,46,47,56,57,60,61,66,67,70,71,80,81,84,85,98,99,102,103,112,113,116,117,138,139,142,143,152,153,156,157,170,171,174,175,184,185,188,189,194,195,198,199,208,209,212,213,226,227,230,231,240,241,244,245}
Out[9]=
{{2,3,4,5,10,11,12,13},{2,3,4,5,10,11,12,13}}
▪
Build the symmetric rules from the symmetric genes.
In[10]:=
Outer
FromGenes
[{#1,#2}]&,symmetricGenes1,symmetricGenes2//MatrixForm
Out[10]//MatrixForm=
0
4
72
76
128
132
200
204
1
5
73
77
129
133
201
205
18
22
90
94
146
150
218
222
19
23
91
95
147
151
219
223
32
36
104
108
160
164
232
236
33
37
105
109
161
165
233
237
50
54
122
126
178
182
250
254
51
55
123
127
179
183
251
255
▪
Build the asymmetric rules from the asymmetric genes.
In[11]:=
Outer
FromGenes
[{#1,#2}]&,asymmetricGenes1,asymmetricGenes2//MatrixForm
Out[11]//MatrixForm=
10
14
66
70
138
142
194
198
11
15
67
71
139
143
195
199
24
28
80
84
152
156
208
212
25
29
81
85
153
157
209
213
42
46
98
102
170
174
226
230
43
47
99
103
171
175
227
231
56
60
112
116
184
188
240
244
57
61
113
117
185
189
241
245
▪
Get the gene equation for the symmetric genes.
In[12]:=
PrintableEquation[GeneEquation[#,2,1]]&/@symmetricGenes〚1〛//MatrixForm
Out[12]//MatrixForm=
0
a
-1
a
1
a
1
a
-1
+
a
-1
a
1
a
-1
+
a
1
a
-1
a
1
a
-1
a
1
+
a
-1
a
1
a
-1
+
a
1
1
▪
Get the gene equation for the asymmetric genes.
In[13]:=
PrintableEquation[GeneEquation[#,2,1]]&/@asymmetricGenes〚1〛//MatrixForm
Out[13]//MatrixForm=
a
-1
a
1
a
-1
a
1
a
-1
a
1
a
1
a
-1
+
a
1
a
-1
a
1
+
a
-1
RelatedLinks
▪
FromGenes
""

Powered by the Wolfram Cloud More about Wolfram Technology

© 2022 Wolfram Research, Inc. All rights reserved. Terms of Use Privacy Contact Us