RepliCount Function Example: 2^3

In a previous post I discussed the HyperOperation function H(m,n,k) which is a Recursive Functions reducing arithmetic operations on natural numbers to Peano Successor. Here I give an example of a complete computation, evaluating 2^3.

Operator Notation:

^	k=3	Exponentiation 
*	k=2	Multiplication 
+	k=1	Addition 
'	k=0	Successor; next natural number 
~	        predecessor: previous natural number 
@	        binary form of successor: m@n = n'

NOTE: n’ and n~ are often written, incorrectly, n+1 and n-1; this is incorrect because + and – are higher-order functions defined (in the Peano system) in terms of the primitives “next number” and “previous number”.

PRECEDENCE: in the example, all operators are to be performed strictly RIGHT TO LEFT; (ignoring the usual “Please Excuse My Dear Aunt Sally” rule); this allows me to omit parentheses which would clutter up the example.
Example: a^b+c*d~ is evaluated a^(b+(c*(d~)))

For convenience in relating to standard math “infix” notation (operator between the operands) I will reorder the operands putting k, the operator order, in the middle.

The General Forumula, with the “operator” k moved to the middle (infix) position:

H(m,k,0) = constant specific to k; for all k>2,the value is 1. 
H(m,k,n) = H( m, k~, H(m, k, n~) ) for n > 0 

Specific formulas, where k is converted to the corresponding operator for clarity:

E0:	m^0=1	
En:	m^n= m*m^n~	 for n>0 
M0:	m*0=0	
Mn:	m*n= m+m*n~      for n>0 
A0:	m+0=m 
An:	m+n= m@m+n~	 for n>0 
S:	m@n=n'	

EXAMPLE: 2 raised to the power 3, showing the formula applied at each step

=2*2^2	        En	
=2*2*2^1	En 
=2*2*2*2^0	En 
=2*2*2*1	E0 
=2*2*2+2*0	Mn 
=2*2*2+0	M0 
=2*2*2	        A0
=2*2+2*1	Mn 
=2*2+2+2*0	Mn 
=2*2+2+0	M0 
=2*2+2	        A0 
=2*2@2+1	An 
=2*2@2@2+0	An 
=2*2@2@2	A0 
=2*2@3	        S 
=2*4	        S 
=2+2*3	         Mn 
=2+2+2*2	 Mn 
=2+2+2+2*1	 Mn 
=2+2+2+2+2*0	 Mn 
=2+2+2+2+0	 M0 
=2+2+2+2	 A0 
=2+2+2@2+1	 An 
=2+2+2@2@2+0	 An 
=2+2+2@2@2	 A0 
=2+2+2@3	 S 
=2+2+4	         A0 
=2+2@2+3	 An	
=2+2@2@2+2	 An 
=2+2@2@2@2+1	 An 
=2+2@2@2@2@2+0	 An	
=2+2@2@2@2@2	 A0	
=2+2@2@2@3	 S 
=2+2@2@4	 S 
=2+2@5	         S 
=2+6	         S 
=2@2+5	         An 
=2@2@2+4	 An 
=2@2@2@2+3	 An 
=2@2@2@2@2+2	 An 
=2@2@2@2@2@2+1	 An 
=2@2@2@2@2@2@2+0  An 
=2@2@2@2@2@2@2	 A0 
=2@2@2@2@2@3	 S 
=2@2@2@2@4	 S 
=2@2@2@5	 S 
=2@2@6	         S 
=2@7	         S 
=8	         S 

NOTE: This demonstrates that exponentiation can be properly defined in terms of multiplications, multiplication in terms of additions, and addition in terms of counting.

It also demonstrates that if you start the answer with the operator’s identity,
computing m op n uses exactly n performances of the operation and n instances of the operand m.
2^3 = 2*2*2*1 Three 2’s, three *’s
5*4 = 5+5+5+5+0 Four 5’s, four +’s

This represents the correct interpretation of the idea often incorrectly stated as: “Multiplication is just repeated addition; 5*4 is 5 added to itself 4 times.” Well, 5+5+5+5 is only 3 additions; and only 2 repetitions, if you insist that you can’t “repeat” something you haven’t done once.

About DrTechDaddy

Dr Tech Daddy is a retired computer science professor with additional interests in music, robotics, STEM education, model railroading, mathematical physics, congenital heart disease and heart transplant, and Christian theology.
This entry was posted in STEM and tagged , , , , , . Bookmark the permalink.

Leave a Reply