Search NKS | Online
1 - 10 of 25 for Select
![](/common/images/search/spacer.gif)
For it could still be that the particular rules that appear are somehow specially selected to be ones that are not universal. … But when there are no constraints that force simple overall behavior, my guess is that most rules that appear in nature can be viewed as being selected in no special way—save perhaps for the fact that the structure of the rules themselves tends to be fairly simple.
Conway considered fraction systems based on rules of the form
FSEvolveList[fracs_, init_, t_] := NestList[First[Select[fracs #, IntegerQ, 1]] &, init, t]
With the choice
fracs = {17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/ 23, 77/19, 1/17, 11/13, 13/11, 15/14, 15/2, 55/1}
starting at 2 the result for Log[2, list] is as shown below, where Rest[Log[2, Select[list, IntegerQ[Log[2, #]] &]]] gives exactly the primes.
The implementation above is a so-called type B Eden model in which one first selects a cell in the cluster, then randomly selects one of its neighbors. One gets extremely similar results with a type A Eden model in which one just randomly selects a cell from all the ones adjacent to the cluster.
Ulam systems
Having formulated the system around 1960, Stanislaw Ulam and collaborators (see page 877 ) in 1967 simulated 120 steps of the process shown below, with black cells after t steps occurring at positions
Map[First, First[Nest[UStep[p[q[r[#1], #2]] &, {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}, #] &, ({#, #} &)[{{{0, 0}, {0, 0}}}], t]]]
UStep[f_, os_, {a_, b_}] := {Join[a, #], #} &[f[Flatten[ Outer[{#1 + #2, #1} &, Map[First, b], os, 1], 1], a]]
r[c_]:= Map[First, Select[Split[Sort[c], First[#1] First[#2] &], Length[#] 1 &]]
q[c_, a_] := Select[c, Apply[And, Map[Function[u, qq[#1, u, a]], a]] &]
p[c_]:= Select[c, Apply[And, Map[Function[u, pp[#1, u]], c]] &]
pp[{x_, u_}, {y_, v_}] := Max[Abs[x - y]] > 1 || u v
qq[{x_, u_}, {y_, v_}, a_] := x y || Max[Abs[x - y]] > 1 || u y || First[Cases[a, {u, z_} z]] y
These rules are fairly complicated, and involve more history than ordinary cellular automata.
Implementation [of patterning model]
Given a 2D array of values a and a list of weights w , each step in the evolution of the system corresponds to
WeightedStep[w_List, a_] := Map[If[# > 0, 1, 0]&, Sum[w 〚 1 + i 〛 Apply[Plus, Map[RotateLeft[a, #]&, Layer[i]]], {i, 0, Length[w] - 1}], {2}]
Layer[n_] := Layer[n] = Select[Flatten[Table[{i, j}, {i, -n, n}, {j, -n, n}],1], MemberQ[#, n| - n]&]
But about once in every 10,000 randomly selected rules, rather different behavior is obtained.
Properties [of network systems]
Random behavior seems to occur in a few out of every thousand randomly selected rules of the kind shown here.
As discovered by Srinivasa Ramanujan in 1918 its fluctuations (see below) can be obtained from the formula
1/6 π 2 n Sum[Apply[Plus, Cos[2 π n Select[ Range[s], GCD[s, #] 1 &]/s]]/s 2 , {s, ∞ }]
(c) Squares are taken to be of positive or negative integers, or zero. … (d) All numbers n can be expressed as the sum of four squares, in exactly 8 Apply[Plus, Select[Divisors[n], (Mod[#, 4] ≠ 0)&]] ways, as established by Carl Jacobi in 1829. … The number of ways of writing an integer n as a sum of two primes can be calculated explicitly as Length[Select[n - Table[Prime[i], {i, PrimePi[n]}], PrimeQ]] .
For a map x f[x] where f[x] is a polynomial such as a x (1 - x) the real initial conditions that yield period p are given by
Select[x /.
Counting of [network] nodes
The number of nodes reached by going out to network distance r (with r > 1 ) from any node in the networks on page 477 is (a) 4r - 4 , (b) 3r 2 /2 - 3r/2 + 1 , and (c)
First[Select[4r 3 /9 + 2r 2 /3 + {2, 5/3, 5/3} r - {10/9, 1, -4/9}, IntegerQ]]
In any trivalent network, the quantity f[r] obtained by adding up the numbers of nodes reached by going distance r from each node must satisfy f[0] = n and f[1] = 3n , where n is the total number of nodes in the network.
![](/common/images/search/spacer.gif)