The Math Behind Numb3rs

Wolfram Research and CBS/Paramount, season 4

Ed Pegg Jr

Wolfram Research, Inc.

http://www.cbs.com/primetime/numb3rs/

For 4 seasons now, Wolfram Research has worked with the hit TV show Numb3rs.

Friday's top show in US for the past three years. Popular worldwide.

Michael Trott, Ed Pegg Jr, Cheryl Heuton, Eric Weisstein, Amy Young

in 2007, Numb3rs won a Public Service Award from the National Science Board

Script Review

We make suggestions

p. 9:

"Truing" -> "Turing"
http://mathworld.wolfram.com/TuringMachine.html

Evolutionary optimization includes such things as
http://mathworld.wolfram.com/GeneticAlgorithm.html
http://mathworld.wolfram.com/EvolutionStrategies.html
http://mathworld.wolfram.com/SimulatedAnnealing.html

Evolutionary optimization can very surely be achieved
without superrecursive algorithm. Evolution is not far away
from a true Markov chain. You just modify the existing genes
randomly. Two issues that are not fully understood are some
memory and cross-adaptibility effects:

http://www.nature.com/news/2006/061218/full/444994a.html

But you might want to use superrecursive algorithms for
modeling learning processes in brains.

http://arxiv.org/pdf/cs.CC/0207055

http://www.cs.auckland.ac.nz/%7Ecristian/recentpublications.html

Or you could use supertasks

http://plato.stanford.edu/entries/spacetime-supertasks/

Math Notes

Page 9, Scene 9, PART I:
Charlie works on his Cognitive Emergence work on the chalkboard.  It's not going too well for him—he's stuck.  Feel free to come up with anything you want for this.

Cognitive Emergence Theory

Reductionism assumption->
                                                                                                     self-reproduction (QM no cloning theorem—open systems)
                                                                                                           ⇓
universe (black holes?) (Underscript[⟵, Smolin])Darwinism ??                                 causation   phase transition Darwinism
    ⇓                                                                                                    ⇓                ⇓                   ⇓   ⇐ cognition vs computation
particles (Underscript[⟹, QM/QED]) molecules (Underscript[⟹, QM/QED])  organic molecules (Underscript[⟹, QM/QED+?]) life (Underscript[⟹, preCET])  IGUS   (Underscript[⟹, CET])consciousness (Underscript[⟹ , ??])??hyperconsciousness??
                               ⇑                                    ⇑                                  ⇑                ⇑    (thermo field)          ⇓                                ⇓?
                        classicality                    handedness                astrobiology        ⇑                mathematical creativity   hypercomputation                                                                          
                                                                                                          ⇑                ⇑                                                              (≫ Turing)  
                                                                                        (forbidden sequence) astrosociology/animal intelligence
                             ⇕                                                                                 (Fermi's: Where is ...?)
                     field doubling                                                            how many sexes needed for a mind (2—7?)
                     (Underscript[⟺, (Subscript[⟨f⟩, micro])->(Subscript[⟨f⟩, macro])]) reality  (Underscript[⟺, Conway-Kochen free will theorem backreaction])

MMM-Triangle -> MMMM-Square to add full commutativity (FP 36, 765); ensures asymptotic holism
Matter           (Overscript[⟹, CET])          Mind
   ⇑ ⇓            (Underscript[⟵, wf (Underscript[reduction, (Underscript[monism, placebo])])])     ⇓    Gödelize
   ⇓ ⇑                                ⇓
Mathematics  ⟺    Mathematics
(Wigner's                  (Plato's
unreasonable)  ⇑        cave)
               holographic world? 
               Kant/Plato
               objective reduction?
               isomorphic?
               psycho-physical parallelism

({{, Wigner, Turing, Cajal, Hameroff, Benioff, Penrose, Stapp, Kherennikov, Menskii, Tegmark}, {quantum
mechanics needed, yes, no, ?, 1, 2, 1, 1, yes, ?, ? (yes)}, {brain≡quantum
computer, 1, 3, ?, **, *, yes, 1, 4, ?, no}, {consciousness=>wave function reduction, yes, 1, ?, no, 1, 3, 1, 4, ?, no}, {Darwinism needed, ?, ?, ?, call, call, ?, ?, 2, ?, 2}, {Utilitarianism needed, ?, ?, ?, call, ?, call, ?, 2, call, 1}})

Arbib, Ashby, Atlan, Bechtel, Cohen, Churchland, Edelman, Umezawa, Vitiello, Baars => degree doubling

Weak emergence versus strong emergence (convergence of thoughts versus carried out actions)

Semantics of mental categorial representations:

Mental space (Subscript[X, mental]) (work within and outside ZFC ...+ AFA – allow for hypersets of thoughts [Barwise 1996])
Theorem:  (Subscript[X, mental]) can be approximated as a separable Hilbert space and can be equipped with a metric.

Thoughts: f : (Subscript[X, mental])=>(Subscript[X, mental])
                     conscious thoughts: (Subscript[X, mental])(Subscript[|, r])
unconsciousness thought: (Subscript[X, mental])(Subscript[|, s]) (p-adic)
feelings: (Subscript[X, mental])(Subscript[|, f]) (nonarchimedian)
ideas:(∑_k)(Subscript[X, mental])(Underscript[⊗, j])… (Subscript[X, mental]) (superposition)
memory comparisons: h:(max_(m∈(Subscript[X, mental])×{t}))(Subscript[x, x]).(Subscript[y, m]) (weak von Neumann postulate for mental observables)

Memories: m: (Subscript[X, mental])×{t}=>(Subscript[X, mental]) ×(Subscript[X, mental]^(+)) (enforce self-duality through Δ(σ)(m,m')=δ(m,m'))

External stimuli (perceptions): σ: (Subscript[X, mental])×{ℰ}=>(Subscript[X, mental])
Qualia:  𝕢: (Subscript[X, mental])×{ℰ [generalized ETS models]}=>(Subscript[X, mental])⊗(Subscript[X, mental]^ε)

Thinking process: Π: π(Underscript[->, (OverTilde[Π])])π'(Underscript[->, (OverTilde[Π])])π''(Underscript[->, (OverTilde[Π])])…(Underscript[->, (OverTilde[Π])])(Overscript[π, ∼])  (attractor)

Free will: ∀x∈(Subscript[X, mental])∃y∈ 𝒜 ⟸y∈𝒴(ℰ) (

Convergence of thinking processes: ‖ (Overscript[π, ∼])  -(π^((ν)))‖≤ ((‖ π'  -π''‖)/((ν^2)+c)) (on (Subscript[ℬ, m])norm)

Hopf–ing: ∀m,π:  (Δ ⊗id)⊗Δ (m)=(id ⊗Δ)⊗Δ (m)

(∑_ν)(π^((ν)))∈(Subscript[X, mental])×{t}(Underscript[->, project])(Subscript[X, mental])->(Subscript[(OverTilde[X]), mental])≡(Underscript[𝒯, ->])(Subscript[X, mental])

Model n th order self-awareness as: 
(g^n)(Υ ∘ (Subscript[X, mental]))∈ (g^(n+1))(Υ ∘ (Subscript[X, mental]))= 𝒜[(g^n)(Υ ∘ (Subscript[X, mental])), ℰ]⊎ Tr[𝒜[(g^n)(Υ ∘ (Subscript[X, mental])), (SubPlus[ℰ])]]

Short-time emporal stability of self-awareness: (ρ^((me)))->(Subscript[ρ, t]^((me)))=𝒰 (ρ^((me)))(t=0)((𝒰 )^(++))
                                                                                                                                  =… (trace out environment, use Linblads ...)
Long time evolution automorphism: (Underscript[Tr, ℰ])(𝒰 ∘ (|☺⟩⟨☺|⊗ℰ))=α|☺⟩⟨☺|+β|☹⟩⟨☹|+γ|\[FreakedSmiley]⟩⟨\[FreakedSmiley]| +(SubPlus[0])|☺⟩⟨\[FreakedSmiley]| +…+cc (Wigner's  friend)

[Andy: The last equation looks a bit funny, but such equation do indeed appear in the relevant literature, for instance http://arxiv.org/abs/quant-ph/9907009, eqs 25 ff]

Page 9, Scene 9, PART II:
Amita works on her laptop—Charlie comments: Haven't seen a 2-dimensional Turing Machine used quite like that—to which Amita says it's for realizing arbitrary structured memory.  Again, feel free—though if it involves coding, we'd love to have this in a Word doc, as well.

This is code and diagrams in Mathematica.  If needed, we can copy-paste into Word.

A Turmite (aka 2-D Turing machine) is a rule for a moving cell on a grid.

Definitions:
mite: moving cell with {state, direction}.
mound:  {matrix of colored cells, the position of the mite, {state, direction} of mite}.
state: matrix row in the turmite rule that will be used next. A two-state has values {0, 1}.
color: matrix column used in the rule, color for grid cell to changed to. Two color has values {0=Black, 1=White}.
twist: change in direction for mite {Left = -1, No change = 0, Right = 1}.
direction: current orientation of mite {0 = ↑, 1 = →, 2 = ↓, 3 = ←}
turmite: A rule that moves in the indicated direction, considers the current {color, state}, and changes the {color, direction, state} accordingly.

Show[Graphics[{GrayLevel[1],
Rectangle[{-.6,-.1},{1.1,2.6}],GrayLevel[.8],Rectangle[{0,0},{1,1}],Rectangle[{1.3,1.1},{1.7,1.5}],
GrayLevel[0],Map[Text[StyleForm[#[[1]],FontSize->18,FontFamily-> "Courier",FontWeight->"Bold"],#[[2]],{0,0},#[[3]]] &,{{"1",{.5,.5},{0,-1}},
{"1",{1.5,.5},{1,0}},{"1",{-.2,.5},{1,0}}}],
Line[{{0,0},{0,1},{2,1},{2,0},{0,0}}],Line[{{1.3,1.1},{1.3,1.5},{1.7,1.5},{1.7,1.1},{1.3,1.1}}],
Line[{{.3,1.1},{.3,1.5},{.7,1.5},{.7,1.1},{.3,1.1}}],
Line[{{1,0},{1,1}}],Line[{{0,1},{2,1}}]},AspectRatio-> Automatic,Frame-> False]
]

binary={{{1,1,0},{0,0,0}}};

MatrixForm/@(l2=First/@NestWhileList[moundstep[#,binary]&,{Table[0,{4},{2}],{3,2},{0,0}},Length[#]>1 &,1,10])

For a GIF animation, see http://www.ericweisstein.com/numb3rs/317/Turmite.gif

moundstep[mound_List,turmite_List] := With[{
j=Dimensions[mound[[1]]][[1]],
k=Dimensions[mound[[1]]][[2]],
x=mound[[2,1]],
y=mound[[2,2]],
state=mound[[3,1]]+1,
direction = mound[[3,2]]},
If[Max[j,k]<129,  (* *** Arbitrarily maximum size of diagram *** *)
With[{old=Switch[direction,
0,If[x==1,{Prepend[mound[[1]],Table[0,{k}]],{x,y}},{mound[[1]],{x-1,y}}],
1,If[y==1 ,{Map[Prepend[#,0]&,mound[[1]]],{x,y}},{mound[[1]],{x,y-1}}],
2,If[x==j,{Append[mound[[1]],Table[0,{k}]],{x+1,y}},{mound[[1]],{x+1,y}}],3,If[y==k,{Map[Append[#,0]&,mound[[1]]],{x,y+1}},{mound[[1]],{x,y+1}}]]},
With[{newx = old[[2,1]],newy=old[[2,2]]},
With[{color=old[[1,newx,newy]]+1},
Append[ReplacePart[old,turmite[[state,color,1]],{1,newx,newy}],{turmite[[state,color,3]],Mod[direction + turmite[[state,color,2]],4]}]]]],{mound[[1]]}]];

myturmites={{{{1,1,0},{0,-1,0}}},
{{{0,-1,1},{1,1,1}},{{1,0,0},{1,0,1}}},{{{0,0,1},{0,-1,1}},{{1,1,0},{0,0,1}}},{{{0,1,1},{0,-1,0}},{{1,-1,1},{0,1,0}}},{{{0,1,1},{0,-1,0}},{{1,-1,1},{1,0,0}}},

{{{0,1,1},{0,0,1}},{{1,1,1},{1,-1,0}}},{{{0,1,1},{0,1,1}},{{1,0,0},{0,1,1}}},{{{0,1,1},{1,1,1}},{{1,-1,1},{1,-1,0}}},{{{1,-1,0},{0,0,1}},{{0,-1,0},{0,-1,1}}},{{{1,-1,0},{1,1,1}},{{0,1,0},{0,-1,1}}},

{{{1,-1,0},{1,1,1}},{{0,1,1},{1,-1,0}}},{{{1,-1,1},{0,-1,0}},{{1,0,0},{0,0,0}}},{{{1,-1,1},{0,-1,0}},{{1,1,1},{1,1,0}}},{{{1,-1,1},{0,-1,1}},{{1,1,1},{0,-1,0}}},{{{1,-1,1},{0,0,0}},{{1,0,0},{1,1,0}}},

{{{1,-1,1},{0,1,0}},{{0,-1,0},{0,-1,0}}},{{{1,-1,1},{1,-1,1}},{{1,1,1},{0,0,0}}},{{{1,-1,1},{1,1,0}},{{0,-1,0},{0,-1,0}}},{{{1,-1,1},{1,1,1}},{{1,0,0},{0,0,1}}},{{{1,0,1},{0,-1,1}},{{1,1,0},{1,0,1}}},

{{{1,0,1},{0,0,0}},{{0,1,0},{1,-1,0}}},{{{1,0,1},{0,0,1}},{{1,1,1},{0,0,0}}},{{{1,0,1},{0,1,0}},{{0,-1,0},{0,-1,0}}},{{{1,0,1},{0,1,1}},{{1,-1,0},{1,1,0}}},{{{1,0,1},{1,-1,0}},{{1,1,1},{0,0,0}}},

{{{1,1,0},{0,-1,1}},{{1,-1,0},{0,0,1}}},{{{1,1,0},{0,-1,1}},{{1,-1,0},{0,1,1}}},{{{1,1,0},{1,1,1}},{{0,0,0},{0,0,1}}},{{{1,1,1},{0,-1,1}},{{1,0,0},{0,0,0}}},{{{1,1,1},{0,1,0}},{{0,-1,1},{1,-1,0}}},

{{{1,1,1},{0,1,0}},{{0,0,0},{1,1,1}}},{{{1,1,1},{0,1,1}},{{1,0,0},{1,0,1}}},{{{1,1,1},{1,-1,1}},{{1,1,1},{0,1,0}}},{{{1,1,1},{1,0,0}},{{1,0,0},{0,0,1}}},{{{1,1,1},{1,1,0}},{{0,0,0},{0,0,0}}},

{{{1,1,1},{1,1,0}},{{0,1,0},{1,0,1}}},{{{1,1,1},{1,1,1}},{{1,-1,1},{0,1,0}}},{{{0,1,1},{1,1,1}},{{0,-1,2},{0,-1,0}},{{1,1,2},{1,-1,0}}},{{{1,-1,1},{0,0,0}},{{0,1,2},{1,-1,0}},{{1,1,1},{1,0,0}}},{{{1,-1,1},{0,0,2}},{{0,1,2},{1,0,1}},{{1,1,1},{1,0,0}}},

{{{1,-1,1},{1,-1,1}},{{1,0,0},{0,0,2}},{{0,-1,1},{1,0,1}}},{{{1,-1,2},{0,1,0}},{{1,-1,0},{0,1,0}},{{0,-1,0},{0,-1,1}}},{{{1,1,0},{0,1,2}},{{0,-1,0},{0,1,0}},{{0,0,1},{1,-1,0}}},{{{1,1,1},{0,-1,0}},{{1,1,2},{0,0,0}},{{1,-1,0},{0,-1,0}}}};

mybusybeaver ={{{0,1,1},{1,1,0}},{{1,1,0},{0,-1,1}}};

Pad[m0_List,n_]:=Module[{m,h=Floor[(n-Length[m0])/2]},
m=If[Length[m0[[1]]]==1,PadRight[#,2]&/@m0,m0];
Join[Table[0,{h},{2}],m,Table[0,{n-h-Length[m0]},{2}]]
]

ArrayPlot[NestWhile[moundstep[#,myturmites[[1]]]&,mound,Length[#]>1 &,1,1000000][[1]]]//Timing

ArrayPlot[Transpose[Flatten[Map[Function[x,Transpose[
PadCenter[NestWhile[moundstep[#,myturmites[[x]]]&,mound,Length[#]>1 &,1,1000000][[1]],{131,131}]]],{1,29,14,32}],1]]]

ArrayPlot[Transpose[Flatten[Map[Function[x,Transpose[
PadCenter[NestWhile[moundstep[#,myturmites[[x]]]&,mound,Length[#]>1 &,1,1000000][[1]],{131,131}]]],{12,43,11,44}],1]]]

ArrayPlot[Transpose[Flatten[Map[Function[x,Transpose[
PadCenter[NestWhile[moundstep[#,myturmites[[x]]]&,mound,Length[#]>1 &,1,1000000][[1]],{131,131}]]],{24,15,7,25}],1]]]

ArrayPlot[Transpose[Flatten[Map[Function[x,Transpose[
PadCenter[NestWhile[moundstep[#,myturmites[[x]]]&,mound,Length[#]>1 &,1,1000000][[1]],{131,131}]]],{33,6,38,21}],1]]]

Clip From One Hour - Spiky (Tetrahedra 5-compound)

Clip From One Hour -- Books

Clip From One Hour --  2-D Turing Machines Demo

Clip From One Hour (mathworld.wolfram.com/Turmite.html)

Clip From One Hour - Turing Machine Demoes

Clip From One Hour -- Transition Diagram Demo

Some of the Math in Season 3

With demonstrations

Social Network Analysis 322 
Lunar Phases 321
Deconvolution Algorithm 319 
State Diagram 316 
Galton Board 302
Pursuit Curve 301

Without demonstrations

Misznay-Schardin Effect 320 
Runge - Kutta Method 315 
Outlier Detection 314 
Euclid's Orchard 310 
Metcalfe's Law 310 
Kac-Moody Algebras 309
Social Security Number 302

Lunar Phases Demo

http://numb3rs.wolfram.com/

We made a site that listed demos for each episode.

Lots of other commentary

Numb3rs really likes us

The Janus List

Run clip

Possible Bridge Shapes

Truss Analysis

Questions?