[FoRK] basic number theory

Dave Long < dave.long at bluewin.ch > on > Sun Aug 6 11:05:29 PDT 2006

> I'm thinking along the lines of patterns, "how many ways can you 
> arrange these items" ... and logic problems.

Strictly speaking, those aren't quite number theory, but they are all 
in the neighborhood, and make for a nice tour.

Divisibility comes very naturally when one has a bunch of things to 
arrange neatly on a shelf.  If one counts cows out in a field, one is 
likely to count off on one's fingers, and only be used to grouping 
things in 10s.  If one counts loaves of bread (or bottles of beer, for 
the liquid variety), one is likely to put them in rectangular patterns, 
and hence be used to grouping things in 6s or 12s or 24s. [0]  A very 
accessible approach to "divides by" is to see that instead of saying 
"6|24", we can arrange 24 items in a rectangle with 6 items along one 
of the sides. [1]

Our rectangle leads, in another direction, to combinations and 
permutations: combinations because one can make a rectangle with the 
elements duplicated across each row, and then asking "what happens if 
we take one from column A, one from column B, etc.", and permutations 
by doing so without repeating rows. [2]

If we then make different shapes, stacking "213" and "132" and so forth 
on top of "123", we find a way to embed the meta-statement "without 
repeating" into a simple system of arranging things into patterns.  If 
we know the exact permutation we remember both column and row, but if 
we don't care about the order, we can profitably forget in which row 
the element is found, and concentrate on the column. [3]

That having been done, it's only a short scramble to logic.  Consider 
the similarities between:

	All men are mortal		<->	6 divides 24
	Socrates is a man		<->	2 divides 6
	.: Socrates is mortal	<->	.: 2 divides 24

Conjunction, disjunction, and implication are merely formal ways of 
calculating what we need to remember and what we should forget (which 
variables are the columns, and which the rows) in a given problem. [4]

:: :: ::

As a more concrete suggestion, sudoku are a common logic problem 
involving rectangles of permuted elements.

Hofstadter's MU puzzle might be interesting one day (it's just the 
first stop on the trail he takes, adding complexity to each formal 
system until reaching the predicate calculus). [5]

How about problems with symmetry groups?  This could be done in space, 
with physical objects, or on paper, which allows for projections and 
perspectives. [6]  Which operations must one have to be able to map 
object A into object B?

-Dave

:: :: ::

[0] this may be why hot dogs and buns are traditionally (at least as 
far back as the Sumerians) incommensurate.

[1] once one starts considering the cases where one makes a rectangle, 
but has a little bit left over, one enters into the realm of number 
theory and mod congruences.

It is diverting to see how the peasant multiplication algorithm works 
(halving and doubling simply reshapes a rectangle) and the interplay 
between the parity bit's value in the abstract place representation and 
its value in the concrete representation of the column of pebbles which 
has been "left over" during the reshaping.

[2] one can view the Pauli exclusion principle as saying that the 
universe counts up ways to do things without repeating electron states.

[3] commutative laws enter here, and transitivity comes from retaining 
order, but forgetting grouping.

[4] via Curry-Howard, this extends naturally to programming.  Just 
about any programming problem involves forgetting something (I have an 
object -- which column is it in?), adding something (I have a column 
and some extra data --a quasiquotation or printf string in the easy 
case, a constraint in the difficult, etc.--, so now which is the 
appropriate row?), or just plain substituting something for something 
else (what's the object in *the* other row of the same column?)

[5] It's interesting to compare the description of SHRDLU (ca. 1980) in 
GEB to the relational machinery available in Inform 7. (ca. 2005)

[6] See "Descriptive Geometry" for the pencil-and-paper methods of 
solving 3D problems used in the days before CAD software.  Just like 
knowing a row and a column allow one to reconstruct an address, having 
two 2D views of a 3D object gives one enough information to reconstruct 
any arbitrary third.

:: :: ::

> You know, I've been looking for a cheap turtle!  The only ones I've 
> seen have been > $100.

I'd guess volume to be low enough that $100 is a very reasonable price. 
  Is Mindstorms not suitable for building turtles?  How much do those 
ebay for these days?


More information about the FoRK mailing list