PPrime Clocks
Michael Stephen FiskeSeptember 30, 2019
Abstract
Physical implementations of digital computers began in the latter half of the 1930’s and werefirst constructed from various forms of logic gates. Based on the prime numbers, we introduceprime clocks and prime clock sums, where the clocks utilize time and act as computationalprimitives instead of gates. The prime clocks generate an infinite abelian group, where foreach n , there is a finite subgroup S such that for each Boolean function f : { , } n → { , } ,there exists a finite prime clock sum in S that can represent and compute f . A parallelizablealgorithm, implemented with a finite prime clock sum, is provided that computes f . In contrast,the negation ¬ , conjunction ∧ , and disjunction ∨ operations generate a Boolean algebra. Interms of computation, Boolean circuits computed with logic gates NOT , AND , OR have a depth.This means that a completely parallel computation of Boolean functions is not possible withthese gates. Overall, some new connections between number theory, Boolean functions andcomputation are established. Symbol Z denotes the integers and N the non-negative integers. For any n ∈ N such that n ≥ a ∈ N such that 0 ≤ a ≤ n −
1, consider the equivalence class [ a ] = { a + kn : k ∈ Z } that is asubset of Z . Let Z n = { [0] , [1] , . . . , [ n − } . a mod n is the remainder when a is divided by n . Inthe standard manner, ( Z n , + n ) is an abelian group, where binary operator + n is defined as [ a ] + n [ b ]= (cid:2) ( a + b ) mod n (cid:3) . The brackets are sometimes omitted and [ a ] ∈ Z n is represented with the integer a , satisfying 0 ≤ a ≤ n −
1. The set of all functions f : N → Z n is denoted as Z n N . Symbol c is theconstant function f : N → N where f ( m ) = c for all m ∈ N . The set of all n -bit strings is { , } n .It is convenient to identify the 2 bits in { , } with the elements [0] and [1] in Z .The least common multiple of positive integers a and b is lcm ( a, b ). Let p = 2, p = 3, p = 5, p = 7, . . . where the n th prime number is p n . Let p be an odd prime. p is called a 3 mod 4 primeif p − is odd. p is called a 1 mod 4 prime if p − is even. Physical implementations of digital computers began in the latter half of the 1930’s and early designswere based on various implementations of logic gates [1, 4, 5, 17, 18, 19] (e.g., mechanical switches,electro-mechanical devices, vacuum tubes). The transistor was conceptually invented [9, 10] in thelate 1920’s, but the first working prototype [2, 13] was not demonstrated until 1947. Transistors act1 a r X i v : . [ c s . CC ] O c t INTRODUCTION , { , } and the 0 means that the clock starts ticking from state 0 at time 0. Shown incolumn 2 of table 1, the clock [2 ,
0] ticks 0 , , , , and so on. In column 3 of table 1, the clock [3 , { , , } and ticks 1 , , , , , Z N Time [2 ,
0] [3 ,
1] [2 , ⊕ [3 ,
1] [7 ,
3] [13 ,
6] [7 , ⊕ [13 , . . . Expressed as ⊕ in table 1, two or more prime clocks can be added and their sum can be projectedinto Z N . The fourth column of table 1 shows the sum of clocks [2 ,
0] and [3 , Z N .This paper primarily focuses on prime clock sums, projected into Z N , since they can computeBoolean functions. These sums have a mathematical property that has a practical application. Thisproperty is formally stated in theorem 3.6: for every natural number n , every Boolean function f : { , } n → { , } can be computed with a finite prime clock sum that lies inside the infiniteabelian group ( Z N , ⊕ ). This means prime clocks can act as computational primitives instead ofgates [14, 15]. A computer can be built from physical devices that implement prime clock sums.Prime clock addition ⊕ is associative and commutative. These two group properties enableprime clocks to compute in parallel, while gates do not have this favorable property. For example, ¬ ( x ∧ y ) (cid:54) = ( ¬ x ) ∧ y because ¬ (0 ∧
0) = 1 while ( ¬ ∧ ¬ , conjunctionoperation ∧ , and disjunction operation ∨ form a Boolean algebra [7], so circuits built from the NOT , AND , and OR gates must have a depth. x x x x ··· h ( x x x x ) Figure 1: A gate-based circuit that computes [7 , ⊕ [13 ,
6] on { , } .Shown in the last column of table 1, the clock sum [7 , ⊕ [13 , parallelization of prime clock sums versus the circuit depth of gates . Figure 1 shows PRIME CLOCKS
3a gate-based circuit with depth 5 that computes [7 , ⊕ [13 ,
6] on { , } . This circuit computesBoolean function h : { , } → { , } , where h ( x x x x ) = (cid:2)(cid:0) ¬ ( x ∧ x ) (cid:1) ∧ ( ¬ x ) ∧ x (cid:3) ∨ (cid:2) x ∧ x ∧ x ∧ ( ¬ x ) (cid:3) ∨ (cid:2) ( ¬ x ) ∧ ( ¬ x ) (cid:3) . Note (cid:0) [7 , ⊕ [13 , (cid:1) ( m ) = h ( x x x x ), whenever m = x + 2 x + 4 x + 8 x .This disparity enlarges for Boolean functions f : { , } n → { , } as n increases. Informally,Shannon’s theorem [14] implies that most functions f : { , } n → { , } require on the order of n n gates. More precisely, let β ( (cid:15), n ) be the number of distinct functions f : { , } n → { , } that can becomputed by circuits with at most (1 − (cid:15) ) n n gates built from the NOT , AND , and OR gates. Shannon’stheorem states for any (cid:15) > n →∞ β ( (cid:15), n )2 n = 0 . (1)Let the gates of a circuit be labeled as { g , g , . . . , g m } where m is about n n . The graph con-nectivity of the circuit specifies that the output of gate g connects to the input of gate g k , andso on. Shannon’s theorem implies that for most of these Boolean functions the graph connectivityrequires an exponential (in n ) amount of information. This is readily apparent after comparing thenumber of symbols used in [7 , ⊕ [13 ,
6] versus the symbolic expression (cid:2)(cid:0) ¬ ( x ∧ x ) (cid:1) ∧ ( ¬ x ) ∧ x (cid:3) ∨ (cid:2) x ∧ x ∧ x ∧ ( ¬ x ) (cid:3) ∨ (cid:2) ( ¬ x ) ∧ ( ¬ x ) (cid:3) .Consider a cryptographic application that uses a function h : { , } → { , } , where h =( h , . . . , h ) and each h i : { , } → { , } is highly nonlinear [6]. Then over 1 million gatescan be required to compute h , since = 52428 and there are 20 distinct h i functions. Usingthe first 559 prime numbers (i.e., all primes ≤ f : { , } → { , } even though there are 2 = 2 distinct functions. This meansa physical realization with prime clocks may use the first 599 prime numbers to implement anarbitrary h : { , } → { , } .Lastly, the structure of our paper is summarized. Section 2 provides formal definitions of aprime clock, prime clock sums, and some results about the periodicity of finite prime clock sums.Section 3 covers prime clock sums projected into Z N , where the main theorem is that any Booleanfunction f : { , } n → { , } can be computed with a finite prime clock sum. Section 4 provides aparallelizable algorithm for computing a Boolean function with prime clock sums. Definition 2.1.
Prime Clocks
Let p be a prime number. Let t ∈ N such that 0 ≤ t ≤ p −
1. Define [ p, t ] : N → N as [ p, t ]( m ) =( m + t ) mod p . Function [ p, t ] is called a p - clock that starts ticking with its hand pointing to t .Herein the expression prime clock [ p, t ] always assumes that 0 ≤ t ≤ p −
1. Thus, if p (cid:54) = q or s (cid:54) = t , then prime clock [ p, s ] is not equal to [ q, t ]; equivalently, if p = q and s = t , then [ p, s ] = [ q, t ].For the n th prime p n , let P n = { [ p n , , [ p n , , . . . , [ p n , p n − } be the distinct p n -clocks. The set ofall prime clocks is defined as P = ∞ ∪ n =1 P n (2) Physical realizations of prime clocks are beyond the scope of this paper.
PRIME CLOCKS n ≥
2, let Ω n = Z n N . Define π n : P → Ω n as the projection of each p -clock into Ω n where π n ([ p, t ]( m )) = (cid:0) [ p, t ]( m ) (cid:1) mod n . Definition 2.2.
Let n ∈ N such that n ≥
2. On the set P of all prime clocks, define the binary operator ⊕ n as (cid:0) [ p, s ] ⊕ n [ q, t ] (cid:1) ( m ) = (cid:0) [ p, s ]( m ) + [ q, t ]( m ) (cid:1) mod n , where + is computed in Z . Observe that[ p, s ] ⊕ n [ q, t ] ∈ Ω n . Definition 2.3.
Finite Prime Clock Sum
Similarly, with prime clocks [ q , t ], [ q , t ] . . . and [ q l , t l ], the function [ q , t ] ⊕ n [ q , t ] · · · ⊕ n [ q l , t l ] : N → Z n can be constructed. For each m ∈ N , define ([ q , t ] ⊕ n [ q , t ] ⊕ n · · · ⊕ n [ q l , t l ])( m )= (cid:0) [ q , t ]( m )+[ q , t ]( m )+ · · · +[ q l , t l ]( m ) (cid:1) mod n , where + is computed in Z . [ q , t ] ⊕ n [ q , t ] · · ·⊕ n [ q l , t l ] is called a finite prime clock sum in Ω n .Table 2 shows a finite prime clock sum in Ω .Table 2: Some Prime Clocks and their Sum in Ω Time [5 ,
3] [7 ,
6] [11 ,
3] [13 ,
0] [5 , ⊕ [7 , ⊕ [11 , ⊕ [13 , . . . Definition 2.4.
Let r , . . . r k be k prime numbers and q , . . . q r be r prime numbers. Let f =[ r , s ] ⊕ n [ r , s ] · · ·⊕ n [ r k , s k ]. Let g = [ q , t ] ⊕ n [ q , t ] · · ·⊕ n [ q l , t l ]. Define f ⊕ n g in Ω n as (cid:0) f ⊕ n g (cid:1) ( m ) = f ( m ) + n g ( m ), where + n is the binary operator in the group ( Z n , + n ).Definition 2.4 is well-defined with respect to definition 2.3 (i.e., f ⊕ n g = [ r , s ] ⊕ n [ r , s ] · · · ⊕ n [ r k , s k ] ⊕ n [ q , t ] ⊕ n [ q , t ] · · · ⊕ n [ q l , t l ] ) because ( m + m ) mod n = (cid:0) ( m mod n ) + ( m mod n ) (cid:1) mod n for any m , m ∈ N . Remark . ( m + m ) mod n = (cid:0) ( m mod n ) + ( m mod n ) (cid:1) mod n for any m , m ∈ N . Proof.
Euclid’s division algorithm implies m = k n + r and m = k n + r , where 0 ≤ r , r < n .Thus, ( m + m ) mod n = (cid:0) ( k + k ) n + r + r (cid:1) mod n = ( r + r ) mod n = (cid:0) ( m mod n ) +( m mod n ) (cid:1) mod n The binary operator ⊕ n can be extended to all of Ω n . For any f, g ∈ Ω n , define (cid:0) f ⊕ n g (cid:1) ( m ) = f ( m ) + n g ( m ). The associative property ( f ⊕ n g ) ⊕ n h = f ⊕ n ( g ⊕ n h ) follows immediatelyfrom the fact that + n is associative. The zero function 0, where 0( m ) = 0 in Z n , is the identity inΩ n . For any f in Ω n , its unique inverse f − is defined as f − ( m ) = − f ( m ), where − f ( m ) is the PRIME CLOCKS f ( m ) in the group ( Z n , + n ). The commutativity of ⊕ n follows from the commutativity of+ n , so (Ω n , ⊕ n ) is an abelian group.Let Q be a subset of the prime clocks P . Using the projection π n of Q into Ω n , define S Q = { H : H ⊇ π n ( Q ) and H is a subgroup of Ω n } . The subset Q generates a subgroup of (Ω n , ⊕ n ).Namely, ∩ H ∈ S Q H (3)We focus on subgroups of Ω , generated by a finite number of prime clocks; consequently, the morenatural symbol ⊕ is used instead of ⊕ . Definition 2.5.
Periodic Functions f ∈ Ω n is a periodic function if there exists a positive integer b such that for every m ∈ N , then f ( m ) = f ( m + b ). Furthermore, if a is the smallest positive integer such that f ( m ) = f ( m + a ) forall m ∈ N , then a is called the period of f . After k substitutions of m + a for m , this implies for any m ∈ N that f ( m ) = f ( m + ka ) for all positive integers k .Table 3: Some 2-Clocks, 3-Clocks and Sums in Ω Time [2 ,
0] [2 ,
1] [3 ,
0] [3 ,
1] [2 , ⊕ [3 ,
0] [2 , ⊕ [3 ,
0] [2 , ⊕ [3 , . . . Table 3 shows that both prime clocks [2 ,
0] and [2 ,
1] projected into Ω have period 2. Bothprime clocks [3 ,
0] and [3 ,
1] projected into Ω have period 3. Each prime clock sum [2 , ⊕ [3 , , ⊕ [3 ,
0] and [2 , ⊕ [3 ,
1] has period 6.For any f ∈ Ω n , define the relation ∼ f on N such that x ∼ f y if and only if for all m ∈ N , f ( m ) = f ( m + | y − x | ). Trivially, ∼ f is reflexive and symmetric.To verify transitivity of ∼ f , suppose x ∼ f y and y ∼ f z . W.L.O.G., suppose x ≤ y ≤ z . (The otherorderings of x , y and z can be handled by permuting x , y and z in the following steps.) This meansfor all m ∈ N , f ( m + y − x ) = f ( m ); and for all k ∈ N , f ( k ) = f ( k + z − y ). This implies that forall m ∈ N , f ( m + z − x ) = f ( m + z − y + y − x ) = f ( m + y − x ) = f ( m ). Thus, ∼ f is an equivalencerelation.When f is periodic with period a , each equivalence class is of the form [ k ] = { k + ma : m ∈ N } ,where 0 ≤ k < a . Thus, f has period a implies there are a distinct equivalence classes on N withrespect to ∼ f . PRIME CLOCK SUMS IN Ω Remark . If a is the period of f and b is a positive integer such that f ( m ) = f ( m + b ) for all m ∈ N , then a divides b . Proof.
First, verify that a ∼ f b . By the definition of period, a ≤ b and for all m ∈ N , then f ( m + b − a ) = f ( m + a + b − a ) = f ( m + b ) = f ( m ). From the prior observation, a lies in [0] and b also lies in [0].Thus, b = ma for some positive integer m . Lemma 2.1. If f, g ∈ Ω n are periodic, then f ⊕ n g is periodic. Further, if the period of f is a and the period of g is b , then f ⊕ n g has a period that divides lcm ( a, b ) .Proof. Let a be the period of f and b the period of g . Let l a,b = lcm ( a, b ). l a,b = ia and l a,b = jb for positive integers i, j . For any m ∈ N , (cid:0) f ⊕ n g (cid:1) ( m ) = f ( m ) + n g ( m ) = f ( m + ia ) + n g ( m + jb ) = f ( m + l a,b ) + n g ( m + l a,b ) = (cid:0) f ⊕ n g (cid:1) ( m + l a,b ). Thus, f ⊕ n g is periodic and remark 2.2 implies itsperiod divides l a,b .In regard to lemma 2.1, if g = − f , then the period of f ⊕ n g is 1. Remark . There are n a distinct periodic functions f ∈ Ω n whose period divides a . Proof.
Since f is periodic and its period divides a , the values of f (0), f (1), . . . , f ( a −
1) uniquelydetermine f . There are n choices for f (0). There are n choices for f (1), and so on. Remark . Let p be prime. There are n p − n distinct periodic functions f ∈ Ω n with period p . Proof.
Consider a finite sequence c , c , . . . , c p − of length p where each c i ∈ Z n This sequenceuniquely determines a periodic f such that f ( m + p ) = f ( m ) for all m ∈ N . In particular, f (0) = c , f (1) = c , . . . , f ( p −
1) = c p − . There are n p periodic functions with a period that divides p . Ifthe period of f is less than p , then remark 2.2 implies f has period 1 since p is prime. There are n distinct, constant (period 1) functions in Ω n Thus, the remaining n p − n periodic functions haveperiod p . Remark . The prime clock [ p, t ], projected into Ω n , has period p . Proof.
Since p is prime, this follows immediately from remark 2.2. Theorem 2.2.
Finite Prime Clock Sums are PeriodicAny finite sum of prime clocks [ q , t ] ⊕ n [ q , t ] ⊕ n · · · ⊕ n [ q l , t l ] is periodic.Proof. Use induction and apply remark 2.5 and lemma 2.1. Ω Remark . [ p, t ] ⊕ [ p, t ] = 0 for any prime clock [ p, t ].Per definition 2.2, (cid:0) [ p, k ] ⊕ [ p, k ] (cid:1) ( m ) = (cid:0) [ p, k ]( m ) + [ p, k ]( m ) (cid:1) mod 2 = 0 in Z . Remark . Let p be an odd prime. If p is a 3 mod 4 prime, then [ p, ⊕ [ p, ⊕· · ·⊕ [ p, p −
1] = 1.If p is a 1 mod 4 prime, then [ p, ⊕ [ p, ⊕ · · · ⊕ [ p, p −
1] = 0.
Proof. (cid:0) [ p, ⊕ [ p, ⊕· · ·⊕ [ p, p − (cid:1) (0) = (0+1+ · · · + p −
1) mod 2 = ( p − p mod 2. For each m > (cid:0) [ p, ⊕ [ p, ⊕ · · · ⊕ [ p, p − (cid:1) ( m ) is a permutation of the sum inside (0 + 1 + · · · + p −
1) mod 2.
PRIME CLOCK SUMS IN Ω p = 2, observe that [2 , ⊕ [2 ,
1] = 1.
Definition 3.1.
A finite sum [ q , t ] ⊕ [ q , t ] ⊕ · · · ⊕ [ q l , t l ] of prime clocks is non-repeating if i (cid:54) = j implies [ q i , t i ] is not equal to [ q j , t j ]. Remark . Any finite sum [ q , t ] ⊕ [ q , t ] ⊕ · · · ⊕ [ q l , t l ] of prime clocks in Ω can be reduced toa non-repeating finite sum [ q i , t i ] ⊕ [ q i , t i ] ⊕ · · · ⊕ [ q i r , t i r ], where r ≤ l such that for any m ∈ N , (cid:0) [ q , t ] ⊕ [ q , t ] ⊕ · · · ⊕ [ q l , t l ] (cid:1) ( m ) = (cid:0) [ q i , t i ] ⊕ [ q i , t i ] ⊕ · · · ⊕ [ q i r , t i r ] (cid:1) ( m ). Proof.
Since (Ω , + ) is abelian, if necessary, rearrange the order of [ q , t ] ⊕ [ q , t ] ⊕ · · · ⊕ [ q l , t l ], sothat the prime clocks are ordered using the dictionary order. If two or more adjacent prime clocksare equal, then the associative property and remark 3.1 enables the cancellation of even numbers ofequal prime clocks. This reduction can be performed a finite number of times so that the resultingsum is non-repeating. Definition 3.2.
Let p be a prime. A finite sum of prime clocks [ p, t ] ⊕ [ p, t ] ⊕ . . . [ p, t l − ] ⊕ [ p, t l ]is called a p - clock sum of length l if for each 1 ≤ i ≤ l , the clock [ p, t i ] is a p -clock and the sum isnon-repeating. The non-repeating condition implies l ≤ p . Lemma 3.1.
Let p be a prime. A p -clock sum with length p has period . A p -clock sum withlength l such that ≤ l < p has period p .Proof. When p = 2, the 2-clock sum [2 ,
0] has period 2 and the 2-clock sum [2 ,
1] also has period 2.Recall that [2 , ⊕ [2 ,
1] = 1. For the remainder of the proof, it is assumed that p is an odd prime.Let [ p, t ] ⊕ [ p, t ] ⊕ . . . [ p, t l − ] ⊕ [ p, t l ] be a p -clock sum. When l = p , remark 3.2 implies that[ p, t ] ⊕ [ p, t ] ⊕ . . . [ p, t l − ] ⊕ [ p, t l ] has period 1. Lemma 2.1 and remark 2.5 imply that [ p, t ] ⊕ [ p, t ] ⊕ . . . [ p, t l − ] ⊕ [ p, t l ] has period p or period 1. The rest of this proof shows that 1 ≤ l ≤ p − p -clock sum cannot have period 1.Thus, it suffices to show that 1 ≤ l < p implies that (cid:0) [ p, t ] ⊕ [ p, t ] ⊕ · · · ⊕ [ p, t l ] (cid:1) ( m ) (cid:54) = (cid:0) [ p, t ] ⊕ [ p, t ] ⊕ · · · ⊕ [ p, t l ] (cid:1) ( m + 1) for some m ∈ N . If needed, the p -clock sum may be permuted so that[ p, s ] ⊕ [ p, s ] ⊕ · · · ⊕ [ p, s l ] = [ p, t ] ⊕ [ p, t ] ⊕ · · · ⊕ [ p, t l ] and the s i are strictly increasingly. (Strictlyincreasing means 0 ≤ s < s . . . s l − < s l ≤ p − l is odd. If s l < p −
1, then (cid:0) [ p, s ] ⊕ [ p, s ] ⊕ · · · ⊕ [ p, s l ] (cid:1) (0) = l (cid:80) i =1 s i mod 2 (cid:54) = l (cid:80) i =1 ( s i + 1) mod 2 = (cid:0) [ p, s ] ⊕ [ p, s ] ⊕ · · · ⊕ [ p, s l ] (cid:1) (1) because l is odd. Otherwise, s l = p −
1. Set s = 0. (The auxiliary index s = 0 handles the case s k +1 − s k for all k such that 1 ≤ k < l .)Set m = max (cid:8) k ∈ N : ( s k +1 − s k ) ≥ and ≤ k < l (cid:9) . Since s = 0 and 1 ≤ l < p , thepigeonhole principle implies m exists. Before the mod 2 step, the difference between l (cid:80) i =1 (cid:0) ( s i + l − m + 1) mod p (cid:1) and l (cid:80) i =1 (cid:0) ( s i + l − m ) mod p (cid:1) equals l . Hence, (cid:0) [ p, s ] ⊕ [ p, s ] ⊕ · · · ⊕ [ p, s l ] (cid:1) ( l − m ) (cid:54) = (cid:0) [ p, s ] ⊕ [ p, s ] ⊕ · · · ⊕ [ p, s l ] (cid:1) ( l − m + 1).Case B. l is even. Set j = ( p − − s l . Before the mod 2 step, the sum l (cid:80) i =1 (cid:0) ( s i + j ) mod p (cid:1) differs from the sum l (cid:80) i =1 (cid:0) ( s i + j + 1) mod p (cid:1) by an odd number. Thus, (cid:0) [ p, s ] ⊕ · · · ⊕ [ p, s l ] (cid:1) ( j ) (cid:54) = (cid:0) [ p, s ] ⊕ · · · ⊕ [ p, s l ] (cid:1) ( j + 1). PRIME CLOCK SUMS IN Ω Definition 3.3.
Let p be prime. Suppose the times are strictly increasing: that is, s < s · · · < s l and t < t · · · < t m . Suppose max { l, m } ≤ p . Then p -clock sum [ p, s ] ⊕ · · · ⊕ [ p, s l ] is distinct from p -clock sum [ p, t ] ⊕ · · · ⊕ [ p, t m ] if l (cid:54) = m or for some i , s i (cid:54) = t i .7-clock sum [7 , ⊕ [7 , ⊕ [7 ,
3] is distinct from [7 , ⊕ [7 , ⊕ [7 , Time [7 ,
0] [7 ,
1] [7 ,
2] [7 ,
3] [7 , ⊕ [7 , ⊕ [7 ,
3] [7 , ⊕ [7 , ⊕ [7 , . . . Theorem 3.2.
For any prime p , if two p -clock sums are distinct, then they are not equalin Ω . The theorem also holds for p = 2 .Proof. The special case p = 2 can be verified by examining the second and third columns of table 3.Let p be a 3 mod 4 prime. Assume p -clock sum [ p, s ] ⊕ · · · ⊕ [ p, s l ] is distinct from p -clock sum[ p, t ] ⊕ · · · ⊕ [ p, t m ]. By reductio absurdum, suppose[ p, s ] ⊕ · · · ⊕ [ p, s l ] = [ p, t ] ⊕ · · · ⊕ [ p, t m ] . (4)For each s i ∈ { t , . . . , t m } , the operation ⊕ [ p, s i ] in Ω can be applied to both sides of equation4. Similarly, for each t j ∈ { s , . . . , s l } , the operation ⊕ [ p, t j ] can be applied to both sides ofequation 4. Since (Ω , ⊕ ) is an abelian group, equation 4 can be simplified to [ p, s ] ⊕ · · · ⊕ [ p, s L ]= [ p, t ] ⊕ · · · ⊕ [ p, t M ] such that { s , . . . , s L } ∩ { t , . . . , t M } = ∅ and M + L ≤ p .Set f = [ p, s ] ⊕ · · · ⊕ [ p, s L ]. Apply f ⊕ to both sides of [ p, s ] ⊕ · · · ⊕ [ p, s L ] = [ p, t ] ⊕ · · · ⊕ [ p, t M ].This simplifies to f ⊕ [ p, t ] ⊕ · · · ⊕ [ p, t M ] = 0. Lemma 3.1 implies that L + M = p . Since L + M = p and { s , . . . , s L } ∩ { t , . . . , t M } = ∅ and p is a 3 mod 4 prime, remark 3.2 impliesthat f ⊕ [ p, t ] ⊕ · · · ⊕ [ p, t M ] = 1. This is a contradiction, so [ p, s ] ⊕ · · · ⊕ [ p, s l ] is not equal to[ p, t ] ⊕ · · · ⊕ [ p, t m ] in Ω .Let S l be the set of all p -clock sums of length l , where 1 ≤ l ≤ p . There are (cid:0) pl (cid:1) distinct p -clocksums in each set S l . Set G p = p ∪ l =1 S l ∪ { } . For any f, g ∈ G p , remark 3.1 implies f ⊕ g − in G p . Thus,( G p , ⊕ ) is an abelian subgroup of Ω . Set B p = { , } p . For any a . . . a p ∈ B p and b . . . b p ∈ B p ,define a . . . a p + b . . . b p = c . . . c p , where c i = ( a i + b i ) mod 2. ( B p , + ) is an abelian group with2 p elements. When p is a 3 mod 4 prime, define the function φ : G p → B p where φ (0) = 0 . . . ∈ B p and φ ([ p, t ] ⊕ [ p, t ] ⊕ . . . [ p, t l ]) = c . . . c p where c i = (cid:0) [ p, t ] ⊕ [ p, t ] ⊕ . . . [ p, t l ] (cid:1) ( i ). We reachtheorem 3.3 because φ is a group isomorphism. PRIME CLOCK SUMS IN Ω Theorem 3.3.
Let p be a prime. The subgroup G p of Ω , generated by the p -clocks [ p, , [ p, , . . . [ p, p − has order p and is isomorphic to ( B p , + ) .Proof. Theorem 3.2 implies φ is a group isomorphism.Table 5: The 5-clocks projected into Ω Time [5 ,
0] [5 ,
1] [5 ,
2] [5 ,
3] [5 ,
4] [5 , ⊕ [5 ,
1] [5 , ⊕ [5 , ⊕ [5 , . . . Theorem 3.2 does not hold when p is a 1 mod 4 prime. Table 5 shows [5 , ⊕ [5 ,
1] equals[5 , ⊕ [5 , ⊕ [5 ,
4] in Ω . Theorem 3.4.
For any prime p , if two p -clock sums are distinct and their respectivelengths L and M are both ≤ p − , then these two p -clock sums are not equal in Ω .Proof. The proof is almost the same as the proof in theorem 3.2. The conditions L ≤ p − and M ≤ p − and the reduction [ p, s ] ⊕ · · · ⊕ [ p, s L ] ⊕ [ p, t ] ⊕ · · · ⊕ [ p, t M ] = 0 leads to an immediatecontradiction: L + M ≤ p − { s , . . . , s L } ∩ { t , . . . , t M } = ∅ means lemma 3.1 implies [ p, s ] ⊕· · · ⊕ [ p, s L ] ⊕ [ p, t ] ⊕ · · · ⊕ [ p, t M ] has period p . Remark . Let p be a 1 mod 4 prime. Let f = [ p, s ] ⊕ · · · ⊕ [ p, s l ] for some 1 ≤ l ≤ ( p − T = { , , . . . , p − }−{ s , . . . , s l } . Now T = { t , . . . t m } , where l + m = p . Set g = [ p, t ] ⊕· · ·⊕ [ p, t m ].Then f = g in Ω . Proof.
Since p is a 1 mod 4 prime, (cid:0) f ⊕ g (cid:1) (0) = p − (cid:80) k mod 2 = 0 in Z . When k >
1, the sum of theelements of f ⊕ g before projecting into Ω is a permutation of the elements { , , . . . , p − } . Hence,for all k > (cid:0) f ⊕ g (cid:1) ( k ) = 0 in Z . This means g = f − . Lastly, f = f − in Ω , so f = g in Ω .Let p be a 1 mod 4 prime. Set H p − = ( p − ∪ l =1 S l ∪ { } . Observe that | H p − | = ( p − (cid:80) l =1 (cid:0) pk (cid:1) +1 = 2 p − . To verify that ( H p − , ⊕ ) is a subgroup of (Ω , ⊕ ), let f, g ∈ H p − . Since g = g − in(Ω , ⊕ ), it suffices to show that f ⊕ g lies in H p − . If f or g equals 0, closure in ( H p − , ⊕ ) holds.Otherwise, f = [ p, s ] ⊕ · · · ⊕ [ p, s l ] for some 1 ≤ l ≤ ( p −
1) and g = [ p, t ] ⊕ · · · ⊕ [ p, t m ] for some1 ≤ m ≤ ( p − f ⊕ g may be reduced to [ p, s ] ⊕ · · · ⊕ [ p, s L ] ⊕ [ p, t ] ⊕ · · · ⊕ [ p, t M ], where { s , . . . , s L } ∩ { t , . . . , t M } = ∅ and L + M ≤ p . If L + M ≤ ( p − H p − , ⊕ ) holds. Otherwise, if L + M > ( p − p -clocksum h = f ⊕ g , where h ’s length is p − ( L + M ) and p − ( L + M ) ≤ ( p − φ , define ψ : H p − → B p − such that ψ (0) = 0 . . . ∈ B p . Foreach p -clock sum in S l , where 1 ≤ l ≤ ( p − ψ ([ p, t ] ⊕ [ p, t ] ⊕ . . . [ p, t l ]) = c . . . c p − where PRIME CLOCK SUMS COMPUTE BOOLEAN FUNCTIONS IN Ω c i = (cid:0) [ p, t ] ⊕ [ p, t ] ⊕ . . . [ p, t l ] (cid:1) ( i ). It is straightforward to verify that ψ is a group isomorphism onto B p − . The group isomorphism ψ : H p − → B p − leads to the following theorem. Theorem 3.5.
Let p be a prime. The subgroup H p − of Ω , generated by the p -clocks [ p, , [ p, , . . . [ p, p − has order p − and is isomorphic to ( B p − , + ) . Theorem 3.6.
For positive integer n and any function f : { , } n → { , } , there exists a finitesum of prime clocks in Ω that can compute f .Proof. Euclid’s second theorem implies there is a prime p > n , where p is a 3 mod 4 or 1 mod 4prime. Hence, theorem 3.3 or 3.5 completes the proof.Furthermore, finding a finite prime clock sum that computes f is Turing computable and there areefficient Turing computable algorithms that can decide whether a natural number n is prime [3]. Ω F n denote the set of all Boolean functions in n variables. Formally, the set F n = (cid:8) f | f : { , } n → { , } (cid:9) and F n contains 2 n distinct functions. For prime clock sums, it is convenientto think of f ∈ F n as a binary string of length 2 n , called the truth-table of f . Table 6 shows all 16Boolean functions in F , their truth tables and corresponding prime clock sums that compute eachfunction. Table 6: f k : { , } → { , } .Boolean Function Truth Table Prime Clock Sum f ( x, y ) = 1 1111 [2 , ⊕ [2 , f ( x, y ) = 0 0000 [2 , ⊕ [2 , f ( x, y ) = x , ⊕ [3 , f ( x, y ) = y , f ( x, y ) = ¬ x , ⊕ [3 , f ( x, y ) = ¬ y , f ( x, y ) = x ∧ y , ⊕ [3 , f ( x, y ) = x ∨ y , ⊕ [3 , f ( x, y ) = ¬ x ∨ y , ⊕ [3 , f ( x, y ) = x ∨ ¬ y , ⊕ [3 , f ( x, y ) = ( x ∧ y ) ∨ ¬ ( x ∨ y ) 1001 [3 , f ( x, y ) = ( x ∨ y ) ∧ ¬ ( x ∧ y ) 0110 [3 , ⊕ [3 , f ( x, y ) = ¬ ( x ∨ y ) 1000 [2 , ⊕ [3 , f ( x, y ) = ¬ ( x ∧ y ) 1110 [2 , ⊕ [3 , f ( x, y ) = ¬ x ∧ y , f ( x, y ) = x ∧ ¬ y , { , } is ordered as { , , , } .Consider [ p, s ] ⊕ [ q, t ] in Ω . The first n elements of [ p, s ] ⊕ [ q, t ] refer to the bit string (cid:0) [ p, s ] ⊕ [ q, t ] (cid:1) (0), (cid:0) [ p, s ] ⊕ [ q, t ] (cid:1) (1), . . . , (cid:0) [ p, s ] ⊕ [ q, t ] (cid:1) (2 n −
1) of length 2 n . The first 2 n elements of PRIME CLOCK SUMS COMPUTE BOOLEAN FUNCTIONS IN Ω p, s ] ⊕ [ q, t ] represent a Boolean function f ∈ F n . In the general case, if q , . . . , q L are primes, thefirst 2 n elements of [ q , t ] ⊕ [ q , t ] ⊕· · ·⊕ [ q L , t L ] also represent a Boolean function f n ∈ F n . Considerthe first 2 n elements of prime clock sum [ q , t ] ⊕ [ q , t ] ⊕ · · · ⊕ [ q L , t L ]. Algorithm 1 computes the i th element of this truth table in F n . Algorithm . A Prime Clock Sum in Ω Computes a Boolean Function
INPUT: i set r = ( t + i ) mod q set r = ( t + i ) mod q . . .set r L = ( t L + i ) mod q L set y = ( r + r + · · · + r L ) mod 2 OUTPUT: y Example . We demonstrate 2-bit multiplication with prime clock sums, computed with algorithm1. In table 7, for each u ∈ { , } and each l ∈ { , } , the product u ∗ l is shown in each row, whose4 columns are labelled by M , M , M and M . With input i of 4 bits (i.e., u concatenated with l ), the output of the 2-bit multiplication is a 4-bit string M ( i ) M ( i ) M ( i ) M ( i ), shown in eachrow of table 7.One can verify that, according to algorithm 1, prime clock sum [2 , ⊕ [7 , ⊕ [7 , ⊕ [7 , ⊕ [11 , M : { , } ×{ , } → { , } . Similarly, [2 , ⊕ [2 , ⊕ [3 , ⊕ [5 , ⊕ [11 , ⊕ [11 , M . Prime clock sum [5 , ⊕ [7 , ⊕ [7 , ⊕ [11 ,
4] computes function M . Lastly,[2 , ⊕ [5 , ⊕ [11 , ⊕ [11 ,
6] computes function M .Table 7: 2-Bit Multiplication.Multiplication functions M i : { , } → { , } . u l M M M M
00 00 0 0 0 000 01 0 0 0 000 10 0 0 0 000 11 0 0 0 001 00 0 0 0 001 01 0 0 0 101 10 0 0 1 001 11 0 0 1 110 00 0 0 0 010 01 0 0 1 010 10 0 1 0 010 11 0 1 1 011 00 0 0 0 011 01 0 0 1 111 10 0 1 1 011 11 1 0 0 1
EFERENCES i th element of (cid:0) [ q , t ] ⊕ [ q , t ] ⊕ · · · ⊕ [ q L , t L ] (cid:1) ’s truth table is stored in the variable y whenalgorithm 1 halts. Algorithm 1 is presented in a serial form. Nevertheless, the computation of the L instructions set r k = ( t k + i ) mod q k , where 1 ≤ k ≤ L , can be computed in parallel when there isa separate physical device for each of these L prime clocks [ q , t ], [ q , t ] . . . [ q L , t L ]. Subsequently,the parity of y can be determined in a second computational step that executes a parallel add of r + r + · · · + r L , followed by setting y to the least significant bit of the sum r + r + · · · + r L .As an alternative implementation of algorithm 1, when there is a more suitable physical devicefor prime clocks, the k th clock can compute the k th bit b k = (cid:0) ( t k + i ) mod q k (cid:1) mod 2 and thena parallel exclusive-or [16] can be applied to the L bits b , b , . . . , b L . In contrast, a gate-basedBoolean circuit requires at least d computational steps where d is the depth of the circuit. References [1] H. Aiken and G. Hopper. The Automatic Sequence Controlled Calculator, reprinted in B. Ran-dell, ed., The Origins of Digital Computers. Berlin: Springer Verlag, 203–222, 1982.[2] J. Bardeen and W. H. Brattain. The Transistor, A Semi-Conductor Triode. Physical Review, , 230, July 15, 1948.[3] Manindra Agrawal, Neeraj Kayal, and Nitin Saxena. Primes is in P. Annals of Mathematics, , 781–793, 2004.[4] A.W. Burks and A.R. Burks, The ENIAC: First General Purpose Electronic Computer, Annalsof the History of Computing, , 4, 310–399, 1981.[5] A.W. Burks and A.R. Burks, The First Electronic Computer: The Atanasoff Story. Ann Arbor:Univ. of Michigan Press, 1988.[6] T.W. Cusick and P. Stanica. Cryptographic Boolean Functions and Applications. AcademicPress, 2009.[7] P. Halmos, S. Givant. Logic as Algebra. MAA, 1998.[8] Jack Kilby. Miniaturized Electronic Circuits. U.S. Patent 3,138,743. 1959.[9] J.E. Lilienfeld. Method and apparatus for controlling electric currents. U.S. Patent 1,745,175:January 28, 1930. October 8, 1926.[10] J.E. Lilienfeld. Device for controlling electric current. U.S. Patent 1,900,018: March 7, 1933.March 28, 1928.[11] Carver Mead. Analog VLSI and Neural Systems. Addison-Wesley, 1989.[12] Robert N. Noyce. Semiconductor Device-and-Lead Structure. U.S. Patent 2,981,877. 1959.[13] M. Riordan, Lillian Hoddeson, and Conyers Herring. The invention of the transistor. Reviewsof Modern Physics, vol. 71, no. 2, Centenary 1999. American Physical Society, 1999.[14] Claude Shannon. The synthesis of two-terminal switching circuits. Bell Systems Technical Jour-nal. , 59–98, 1949. EFERENCES125