Tuesday, September 19, 2017

GNU Math = Math + CS

[first shared on math-teach, Math Forum @ Drexel, with no pictures ]

Factor an Integer
:: factors(84729293) ::

Rhymes with "New Math"...

I think we all know the pun by now: GNU stands for GNU is Not Unix.

However in being recursively defined, it's also an allusion to Lambda Calculus.

GNU came along around Gen 2.0 of the C-STEM Epoch, which Epoch started around PLATO (1960) and rolled through at least two revolutions: PC (personal computer) and Liberation (free / open source).

Liberation was a long fought battle pitting the likes of GNU / Linux against SCO. I'm sure some here remember those years, followed by Browser Wars...

Where C-STEM starts hybridizing with the contemporary public schools math sequence is around the Fundamental Theorem of Arithmetic, that every integer has a unique prime factorization.

I'm going with Conway's suggestion that we throw in -1 as a factor along with 1, go ahead and call the former prime if you like.

A prime has only itself and 1 as a factor, and -1 if negative. 1 itself is not prime.

When we say factors, we may include or omit the 1 (identity element) depending on context.

factors(42)
(1, 2, 3, 7)
factors(100)
(1, 2, 2, 5, 5)
factors(-12)
(1, -1, 2, 2, 3)

When students are ready to write code, in whatever language, to deliver these unique prime factorizations, that's when CS starts to meet Algebra. The Sieve of Eratosthenes, Trial By Division, Euclid's Algorithm, start phasing in here, as things to code.

Yes, we're still doing arithmetic, using the four basic operators plus modulo (%), but we're also introducing functions, the composition of which will be our basis for getting work done.

Algebra has much to do with controlling the components of a function, one might say inputs, arguments or parameters. The specifics are often fixed with constants, as in:

A sin (Bx + C) + D

the paradigm oscillator. Only x is considered the dependent variable at the end of the day, as A, B, C, D are used to construct a special case function.

Polynomials are the same way. The coefficients fix the function, and then x or t do the heavy lifting.

A*x**3 + B*x**2 + C*x + ... we have notation for arbitrarily long lists.

CS is good at this: providing an executable language wherein functions have the ability to construct other functions.

CS profs further along in the pipeline will be grateful if we start writing functions that build functions earlier.

C-STEM has a bright future.

The Pumpkin Knows
:: (1, 11, 31, 248473) ::