Primitive Pythagorean Codes

Similar documents
= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

of Nebraska - Lincoln

Settling a Question about Pythagorean Triples

SYSTEMS OF PYTHAGOREAN TRIPLES. Acknowledgements. I would like to thank Professor Laura Schueller for advising and guiding me

A Direct Method To Generate Pythagorean Triples And Its Generalization To Pythagorean Quadruples And n-tuples

Congruent Number Problem

4.2 Euclid s Classification of Pythagorean Triples

PYTHAGOREAN TRIPLES KEITH CONRAD

Pythagorean Triples. becomes

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

Solution to Exercise 2.2. Both m and n are divisible by d, som = dk and n = dk. Thus m ± n = dk ± dk = d(k ± k ),som + n and m n are divisible by d.

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

RECURSIVE ENUMERATION OF PYTHAGOREAN TRIPLES

Pythagorean Theorem: Proof and Applications

MATH 289 PROBLEM SET 4: NUMBER THEORY

On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples

MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

MATH10040 Chapter 2: Prime and relatively prime numbers

Indexing Properties of Primitive Pythagorean Triples for Cryptography Applications

8 Primes and Modular Arithmetic

Section 4.2: The Division Algorithm and Greatest Common Divisors

Factoring Algorithms

How To Prove The Dirichlet Unit Theorem

Integer roots of quadratic and cubic polynomials with integer coefficients

Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

88 CHAPTER 2. VECTOR FUNCTIONS. . First, we need to compute T (s). a By definition, r (s) T (s) = 1 a sin s a. sin s a, cos s a

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Continued Fractions and the Euclidean Algorithm

k, then n = p2α 1 1 pα k

Every Positive Integer is the Sum of Four Squares! (and other exciting problems)

Cardinality. The set of all finite strings over the alphabet of lowercase letters is countable. The set of real numbers R is an uncountable set.

4. How many integers between 2004 and 4002 are perfect squares?

Observation on Sums of Powers of Integers Divisible by Four

God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886)

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Linear Codes. Chapter Basics

THE CONGRUENT NUMBER PROBLEM

PYTHAGOREAN TRIPLES M. SUNIL R. KOSWATTA HARPER COLLEGE, ILLINOIS

Homework until Test #2

Square Roots and the Pythagorean Theorem

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

SECTION 10-2 Mathematical Induction

5.3 SOLVING TRIGONOMETRIC EQUATIONS. Copyright Cengage Learning. All rights reserved.

SOLVING TRIGONOMETRIC EQUATIONS

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions

Basic Proof Techniques

Notes on Determinant

Mathematics Course 111: Algebra I Part IV: Vector Spaces

v w is orthogonal to both v and w. the three vectors v, w and v w form a right-handed set of vectors.

The last three chapters introduced three major proof techniques: direct,

Sect Solving Equations Using the Zero Product Rule

Chapter 3. if 2 a i then location: = i. Page 40

Mathematical Induction

Today s Topics. Primes & Greatest Common Divisors

CS 103X: Discrete Structures Homework Assignment 3 Solutions

Alex, I will take congruent numbers for one million dollars please

TEST A CHAPTER 6, EQUATIONS, INEQUALITIES, PROBLEM SOLVING. 1. Factor x 2-5x Factor x 2-4x - 5.

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

Handout #1: Mathematical Reasoning

Systems of Linear Equations

MATH 90 CHAPTER 6 Name:.

Lemma 5.2. Let S be a set. (1) Let f and g be two permutations of S. Then the composition of f and g is a permutation of S.

An Introductory Course in Elementary Number Theory. Wissam Raji

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Heron Triangles. by Kathy Temple. Arizona Teacher Institute. Math Project Thesis

NOTES ON LINEAR TRANSFORMATIONS

Lecture 3: Finding integer solutions to systems of linear equations

Number Theory: A Mathemythical Approach. Student Resources. Printed Version

Lecture 13 - Basic Number Theory.

Right Triangles A right triangle, as the one shown in Figure 5, is a triangle that has one angle measuring

The Deadly Sins of Algebra

11 Ideals Revisiting Z

PROOFS BY DESCENT KEITH CONRAD

Quotient Rings and Field Extensions

minimal polyonomial Example

Mathematical Induction. Lecture 10-11

Codes for Network Switches

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

I remember that when I

Nice Cubic Polynomials, Pythagorean Triples, and the Law of Cosines

A Study on the Necessary Conditions for Odd Perfect Numbers

SCORE SETS IN ORIENTED GRAPHS

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Error Detection and Correction

RSA Question 2. Bob thinks that p and q are primes but p isn t. Then, Bob thinks Φ Bob :=(p-1)(q-1) = φ(n). Is this true?

8 Divisibility and prime numbers

Unified Lecture # 4 Vectors

ON FIBONACCI NUMBERS WITH FEW PRIME DIVISORS

A SIMPLE PROOF OF FERMAT'S LAST THEOREM BY

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Introduction to Algebraic Coding Theory

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

1.2. Successive Differences

COUNTING INDEPENDENT SETS IN SOME CLASSES OF (ALMOST) REGULAR GRAPHS

Math 55: Discrete Mathematics

How To Solve Factoring Problems

Transcription:

International Mathematical Forum, Vol. 8, 2013, no. 38, 1873-1879 HIKARI Ltd, www.m-hikari.com http://dx.doi.org/10.12988/imf.2013.39180 Primitive Pythagorean Codes Massoud Malek California State University, East Bay Hayward, CA 94542, USA massoud.malek@csueastbay.edu Copyright c 2013 Massoud Malek. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Abstract In this paper, we shall define a simple generating matrix which produces all the primitive Pythagorean triples. Then we define classes of codes with primitive Pythagorean triples. These classes are very simple to encode and decode messages. They also have a very good data compression quality. Keywords: Primitive Pythagorean triple; PPT; Pythagorean Triangle; Pythagoras, Plato, Euclid; generating matrix; Pythagorean alphabet; Coding theory; Coset Leader decoding; and Data Compression Introduction A Pythagorean triple, is a triple of positive integers a, b, and c such that a right angle triangle exists with legs a, b and hypotenuse c. By the Pythagorean theorem, this is equivalent to finding positive integers a, b, and c, satisfying a 2 + b 2 = c 2. If a and b are relatively prime, then the Pythagorean triple is called primitive. The smallest and best-known Pythagorean triple is (3, 4, 5. The triangle generated by a Pythagorean triple is called a Pythagorean triangle. In all that follows we denote the primitive Pythagorean triple or triangle by PPT. Plato (380 B. C. is attributed with the formula: <1,n>=(n 2 1, 2 n, n 2 +1, for n>1. A more general formula for obtaining all triples was given by Euclid in c. 300 B.C.

1874 Massoud Malek Lemma 1. For positive integers m and n, where 1 m < n,the triple <m, n> =(n 2 m 2, 2 mn, n 2 + m 2 is Pythagorean. Moreover, if m and n are relatively prime of opposite parity, then they generate a primitive triple. Basic Properties of Primitive Pythagorean Triangles In a primitive Pythagorean triangle T =(a, b, c, the following conditions hold: The hypotenuse and one of the legs are always odd and the other leg is divisible by 4. The hypotenuse of every PPT exceeds the odd leg by twice the square of an integer r and the even leg by the square of an odd integer s, c = a +2r 2 = b + s 2 Generating Matrix 1 0 1 Consider the matrix G = 2 2 2 and the vector u m, n]=(m 2, mn, n 2, where m is 0 2 2 odd and gcd (m, n =1. Then u m, n] G = ( m 2, mn, n 2 1 0 1 2 2 2 = m 2 +2mn, 2 mn +2n 2,m 2 +2mn+2n 2 = <n,m+ n>. 0 2 2 Proposition 1. Let P be the set of all PPTs. For fixed positive integers m 0 and n 0,, where m 0 is odd, define the following sets of PPTs: R m0 = {T n =(a n,b n,c n =um 0,n] G : n =1, 2, 3,..., gcd(m 0,n=1}, S n0 = {T m =(a m,b m,c m =um, n 0 ] G : m =1, 3, 5,..., gcd(m, n 0 =1}. and Then R m0 S n0 = um 0,n 0 ] G, whenever gcd(m 0,n 0 =1; also for all T n R m0 and T m S n0, c n b n = m 2 0 and c m a m =2n 0 2 ; and finally for i 1 i 2 and j 1 j 2, P = R 2 i+1 = S j, R 2 i1 +1 R 2 i2 +1 =, S 2 j1 S 2 j2 =. i=0 j=1 Moreover, R 1 contains all the PPTs, where the hypotenuse exceeds its even leg by one; and S 1 contains all the PPTs, where the hypotenuse exceeds its odd leg by two. Proof. The identity u m, n] G = <n,m+ n> and Lemma 1 imply that any PPT can be obtained from the product of the vector u m, n] and the generating matrix G. Thus P = R 2 i+1 = S j. i=0 j=1

Primitive Pythagorean codes 1875 We also conclude that if gcd (m 0,n 0 = 1, then R m0 S n0 contains only one PPT, which is um 0,n 0 ] G. From the definitions of u r, s] G, we obtain T =(a,b,c=u r, s] G = ( r 2 +2rs,2 rs+2s 2,r 2 +2rs+2s 2 Notice that c b = r 2 and c a =2s 2. Thus for the same a, b, and c ; r and s must be unique. Hence for i 1 i 2 and j 1 j 2, R 2 i1 +1 R 2 i2 +1 = and S 2 j1 S 2 j2 =. Finally, from c b = r 2 and c a =2s 2, we conclude that c n b n =(2i +1 2 and c m a m =2j 2. Hence only R 1 contains all the PPTs, where the hypotenuse exceeds its even leg by one; and only S 1 contains all the PPTs, where the hypotenuse exceeds its odd leg by two. Proposition 2. Let T =(a, b, c be a PPT. (i If T R m0 ; then T = u m 0, a m2 0 2 m 0 (ii If T S n0 ; then T = u n 0 + ] G = n 2 0 + a, n 0 ( a, a2 m 4 0 2 m 2 0 ] G =., a2 + m 4 0 2 m 2 0 ( a, 2 n 0 n 2 0 + a, a+2n2 0 Proof. (i If T R m0 ; then there exists a positive integer n with gcd (m 0,n=1 such that T =(a, b, c =um 0,n] G = ( m 2 0 +2m 0 n, 2 n (m 0 + n,m 2 0 +2n (m 0 + n. ( a m 2 From a = m 2 0 +2m 0 n, we obtain n = 0. Hence 2 m 0 T = u m 0, a ] ( m2 0 G = a, a2 m 4 0, a2 + m 4 0. 2 m 0 2 m 2 0 2 m 2 0 (ii IfT S n0 ; then there exists an odd number m with gcd (m, n 0 = 1 such that T =(a, b, c =um, n 0 ] G = ( m 2 +2mn 0, 2 n 0 (m + n 0,m 2 +2n 0 (m + n 0.. By solving the quadratic equation a = m 2 +2mn 0 ( m = n 0 + n 2 0 + a. Hence for a positive m, we obtain ] ( T = u n 0 + n 20 + a, n 0 G = a, 2 n 0 n 2 0 + a, a+2n 2 0.

1876 Massoud Malek From the fact that the last digit of any integer, could not be different from 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 ; we conclude that any R m0 and S n0 may be partitioned into a finite number of disjoint classes, based on the last digits of a, b, and c, of T =(a, b, c. The first 30 PPTs T n =(a n,b n,c n, generated by 1,n,n 2 ] G : (3, 4, 5 (5, 2, 3 (7, 4, 5 (9, 0, 1 (1, 0, 1 3 4 5 5 12 13 7 24 25 9 40 41 11 60 61 13 84 85 15 112 113 17 144 145 19 180 181 21 220 221 23 264 265 25 312 313 27 364 365 29 420 421 31 480 481 33 544 545 35 612 613 37 684 685 39 760 761 41 840 841 43 924 925 45 1012 1013 47 1104 1105 49 1200 1201 51 1300 1301 53 1404 1405 55 1512 1513 57 1624 1625 59 1740 1741 61 1860 1861 The above table shows that the set of T n, is partitioned into five disjoint classes, with coset leaders: (3, 4, 5, (5, 2, 3, (7, 4, 5, (9, 0, 1, and (1, 0, 1. According to Proposition 1, c n b n =1. From a n =1+2n, b n =2n (1 + n, and c n =1+2n (1 + n, one may readily show the following identities which appear in the above table: a n+1 = a n +2,a 5 k+n = a n +10k, a n+6 = a n +12,a 2 n = b n + c n, and a 6 k+1 is divisible by 3. The first 30 PPTs T m =(a m,b m,c m, generated by m 2,m,1] G (Plato PPT, where m is odd: (3, 4, 5 (5, 8, 7 (5, 2, 7 (3, 6, 5 (9, 0, 1 3 4 5 15 8 17 35 12 37 63 16 65 99 20 101 143 24 145 195 28 197 255 32 257 323 36 325 399 40 401 483 44 485 575 48 577 675 52 677 783 56 785 899 60 901 1023 64 1025 1155 68 1157 1295 72 1297 1443 76 1445 1599 80 1601 1763 84 1765 1935 88 1937 2115 92 2117 2303 96 2305 2499 100 2501 2703 104 2705 2915 108 2917 3135 112 3137 3363 116 3365 3599 120 3601 According to the above table, the set of T m is partitioned into five disjoint classes, with coset leaders: (3, 4, 5, (5, 8, 7, (5, 2, 7, (3, 6, 5, and (9, 0, 1. According to Proposition 1, c m a m =2. From a m = m 2 +2m, b m =2(m +1, and c m = m 2 +2(m +1, one may readily show the following identities which appear in the above table: b m+2 = b m +4, b m+10 k = b m +20k, b 2 m =2(b m + c m, and a 12 k+1 is divisible by 3.

Primitive Pythagorean codes 1877 Application to Coding Theory Primitive Pythagorean triple can lend itself to Coding Theory. There are infinitely many ways to encode letters of alphabet with PPTs. To define a class of codewords, first we select either R m0 or S n0. Suppose, we choose R m0, where m 0 is a prime odd number; then we assign a positive integer k with gcd (m 0,k = 1 to each letter of the alphabet. Finally, we create a Pythagorean alphabet using the generating matrix G. Here is a Pythagorean alphabet using R 7. For the sake of simplicity, the alphabet was generated by u7,k] G, where k =1, 2, 3,...,30, excluding k =7, 14, 21, and 28 which are multiples of 7. The Pythagorean alphabet is as follows: A 63 16 65 B 77 36 85 C 91 60 109 D 105 88 137 E 119 120 169 F 133 156 205 G 161 240 289 H 175 288 337 I 189 340 389 J 203 396 445 K 217 456 505 L 231 520 569 M 259 660 709 N 273 736 785 O 287 816 865 P 301 900 949 Q 315 988 1037 R 329 1080 1129 S 357 1276 1325 T 371 1380 1429 U 385 1488 1537 V 399 1600 1649 W 413 1716 1765 X 427 1836 1885 Y 455 2088 2137 Z 469 2220 2269 This set contains five different disjoint classes: (3, 6, 5 (7, 6, 5 (1, 0, 9 (5, 8, 7 (9, 0, 9 AF JNW BKOSX CLT GP DHQUY EIMRV Z Error Detection The fact that R 7 is partitioned into five disjoint classes; the received codeword must be in one of those five classes. If the last digits of a, b, or c do not match the digits of any of the coset leaders, the received codeword may be corrupted. Once the error is detected, it could eventually be corrected either directly or by a retransmission. It is customary that all codewords have the same length. We could achieve this task by adding some digits, such as zeros or ones at the beginning or the end of the shorter codewords. Data Compression Sometimes, it is necessary to shorten the length of the codewords without compromising the integrity of the message. According to Proposition 1, R m0 contains all the PPTs, where the hypotenuse exceeds its even leg by m 2 0 ; and S n0 contains all the PPTs, where the hypotenuse exceeds its odd leg by 2 n 2 0. Removing the hypotenuse of the encrypted code in these sets, would not alter the message and its integrity. Notice that in R 7, c b =49=7 2, for all c s and b s; so the alphabet could be shorten, by removing all the hypotenuses. According to Proposition 2, from the odd leg a of the codeword, we obtain k = a 49, the number assigned to the letter which was encoded 14

1878 Massoud Malek with the generating matrix G. Therefore we could also remove the even leg b. In order to be able to detect some transmission errors, we should add the last two digits of the coset leader of the class which contains the codeword. Here is the short form of the alphabet with parity-check digits: A 63 65 B 77 65 C 91 09 D 10 87 E 119 65 F 133 65 G 161 09 H 175 87 I 189 09 J 203 65 K 217 65 L 231 09 M 259 09 N 273 65 O 287 65 P 301 09 Q 315 87 R 329 09 S 357 65 T 371 09 U 385 87 V 399 09 W 413 65 X 427 65 Y 455 87 Z 469 09 Error Correction and Decoding Suppose the codewords w 1 = 133 67 and w 2 = 359 75 were received. Since (3, 6, 7 and (9, 7, 5 are not coset leaders; but 133 65 is in our table, generated by u7, 6] G, representing the letter F ; and 359 65 is very close to 357 75 generated by u7, 22] G, representing the letter S. We therefore conclude that it is most likely that v 1 = 133 65 and v 2 = 357 65 are the transmitted codewords. Although the generating matrix G is needed to encode a message; the received codeword by itself may decode the message without the need of the inverse of the generating matrix G. We could recreate the message, using 7, k= a 49, and G. 14 One( could obviously generate a Pythagorean alphabet, using S n0. To decode the message, k = n 0 + n 20 + a must be used. In order to increase the probability of correcting errors, one could assign for example, three PPTs to each letter in the following way: Choose the odd leg of the first PPT, the even leg of the second PPT, and the hypotenuse of the third PPT. This way, if one of the legs is error-free, then the codeword may be identified. Finally, another way of increasing the probability of correcting errors and decreasing the number of retransmission; is to choose k s with large gaps between them. This way, it is most likely that the closest codeword to the received codeword is the codeword sent. Clearly, all codewords must be converted to binary codewords, before transmission. References 1] Carmichael, R. D., 1914, Diophantine analysis, in second half of R. D. Carmichael, The Theory of Numbers and Diophantine Analysis, Dover Publ., 1959. 2] Edenfield, Kelly, Pythagorean Triples. http://jwilson.coe.uga.edu/emt668/emt668. Folders.F97/Edenfield/Pythtriples/Pythriples.html 3] Posamentier, Alfred; Lehmann, Ingmar (2007. The (Fabulous FIBONACCI Num-

Primitive Pythagorean codes 1879 bers. Prometheus Books. p. 305. ISBN 978-1-59102-475-0. Received: September 27, 2013