Part I Basics of coding theory and linear codes CODING and CRYPTOGRAPHY IV054 1. Basics of coding theory and linear codes 2/77 CODING and CRYPTOGRAPHY IV054 IV054 1. Basics of coding theory and linear codes 2/77 CODING and CRYPTOGRAPHY IV054 Modern Coding theory is a very beautiful and often very surprising mathematical th that is very much applied and broadly used for transmission of digital information, without which modern telecommunication would be practically impossible. IV054 1. Basics of coding theory and linear codes 2/77 CODING and CRYPTOGRAPHY IV054 Modern Coding theory is a very beautiful and often very surprising mathematical theory that is very much applied and broadly used for transmission of digital information, without which modern telecommunication would be practically impossible. . Mostly everyone is daily using outcomes of modern coding and decoding. Modern Cryptography is rich on clever use of beautiful and often much surprising concepts and methods that allows to use outcomes of modern classical and also surprisingly quantum tools, to make transmission of information so safe that even very powerful eavesdropper has next to zero chance to read transmitted information that not intended to him. IV054 1. Basics of coding theory and linear codes 2/77 CODING and CRYPTOGRAPHY IV054 Modern Coding theory is a very beautiful and often very surprising mathematical theory that is very much applied and broadly used for transmission of digital information, without which modern telecommunication would be practically impossible. . Mostly everyone is daily using outcomes of modern coding and decoding. Modern Cryptography is rich on clever use of beautiful and often much surprising concepts and methods that allows to use outcomes of modern classical and also surprisingly quantum tools, to make transmission of information so safe that even very powerful eavesdropper has next to zero chance to read transmitted information that not intended to him. In spite of the fact that both coding and cryptography areas have already many very efficient systems using only very small memories, new and new applications require to develop again and again new, faster, and less memory demanding systems for both coding and cryptography. IV054 1. Basics of coding theory and linear codes 2/77 Teaching stuff ■ Prof. Jozef Gruska DrSc - lecturer ■ RNDr. Matej Pivoluska PhD - tutorials end CRYPTO team member RNDr Lukáš Boháč - head of CRYPTO-team ■ Mgr. Libor Cáha PhD, member of CRYPTO-team Be. Henrieta Michelová, member of CRYPTO-team Be. Roman Oravec, member of CRYPTO-team 3/77 Teaching stuff ■ Prof. Jozef G ruska DrSc - lecturer ■ RNDr. Matej Pivoluska PhD - tutorials end CRYPTO team member ■ RNDr Lukáš Boháč - head of CRYPTO-team ■ Mgr. Libor Cáha PhD, member of CRYPTO-team Be. Henrieta Michelová, member of CRYPTO-team ■ Be. Roman Oravec, member of CRYPTO-team Teaching loads: lecture - 2 hours, tutorial 2 hours - non obligatory 3/77 Teaching stuff ■ Prof. Jozef Gruska DrSc - lecturer ■ RNDr. Matej Pivoluska PhD - tutorials end CRYPTO team member RNDr Lukáš Boháč - head of CRYPTO-team ■ Mgr. Libor Cáha PhD, member of CRYPTO-team ■ Be. Henrieta Michelová, member of CRYPTO-team ■ Be. Roman Oravec, member of CRYPTO-team Teaching loads: lecture - 2 hours, tutorial 2 hours - non obligatory Languages: lecture - English, tutorials 1 in English and 1 in Czech-Slovak 3/77 IV054-CRYPTO team; Teaching stuff ■ Prof. Jozef Gruska DrSc - lecturer ■ RNDr. Matej Pivoluska PhD - tutorials end CRYPTO team member ■ RNDr Lukáš Boháč - head of CRYPTO-team ■ Mgr. Libor Cáha PhD, member of CRYPTO-team ■ Be. Henrieta Michelová, member of CRYPTO-team ■ Be. Roman Oravec, member of CRYPTO-team Teaching loads: lecture - 2 hours, tutorial 2 hours - non obligatory Languages: lecture - English, tutorials 1 in English and 1 in Czech-Slovak Prerequisites: Basics of discrete mathematics and linear algebra See: "Appendix" in http: //www.fi.muni.cz/usr/gruska/crypto21, IV054 1. Basics of coding theory and linear codes 3/77 IV054 - Homeworks and exams Homeworks 5-6 sets of homeworks of 6-8 exercises designed and evaluated by our CRYPTO-team created mainly from some of best former IV054-students IV054 1. Basics of coding theory and linear codes 4/77 IV054 - Homeworks and exams Homeworks 5-6 sets of homeworks of 6-8 exercises designed and evaluated by our CRYPTO-team created mainly from some of best former IV054-students Termination of the course - Exams or zapocty IV054 1. Basics of coding theory and linear codes 4/77 IV054 - Homeworks and exams Homeworks 5-6 sets of homeworks of 6-8 exercises designed and evaluated by our CRYPTO-team created mainly from some of best former IV054-students Termination of the course - Exams or zapocty Each student will get 5 questions. Number of questions a student has to respond will depend on the number of points received for homeworks. Each student will get automatically A in case (s)he received number of points from exercises >= 85% of MAX - maximal number of points any student got from exercises. Automatically a student gets B, with an easy way to get A, in case the number of points (s)he received is in interval (75,85)% of MAX....... IV054 1. Basics of coding theory and linear codes 4/77 IV054 - Homeworks and exams Homeworks 5-6 sets of homeworks of 6-8 exercises designed and evaluated by our CRYPTO-team created mainly from some of best former IV054-students Termination of the course - Exams or zapocty Each student will get 5 questions. Number of questions a student has to respond will depend on the number of points received for homeworks. Each student will get automatically A in case (s)he received number of points from exercises >= 85% of MAX - maximal number of points any student got from exercises. Automatically a student gets B, with an easy way to get A, in case the number of points (s)he received is in interval (75,85)% of MAX....... Teaching materials IV054 1. Basics of coding theory and linear codes 4/77 IV054 - Homeworks and exams Homeworks 5-6 sets of homeworks of 6-8 exercises designed and evaluated by our CRYPTO-team created mainly from some of best former IV054-students Termination of the course - Exams or zapocty Each student will get 5 questions. Number of questions a student has to respond will depend on the number of points received for homeworks. Each student will get automatically A in case (s)he received number of points from exercises >= 85% of MAX - maximal number of points any student got from exercises. Automatically a student gets B, with an easy way to get A, in case the number of points (s)he received is in interval (75,85)% of MAX....... Teaching materials ■ Detailed slides of all lectures. ( Each chapter will consists of a (i) short prologue, (ii) basic materials and an (iii) Appendix -for much demanding students. IV054 1. Basics of coding theory and linear codes 4/77 IV054 - Homeworks and exams Homeworks 5-6 sets of homeworks of 6-8 exercises designed and evaluated by our CRYPTO-team created mainly from some of best former IV054-students Termination of the course - Exams or zapocty Each student will get 5 questions. Number of questions a student has to respond will depend on the number of points received for homeworks. Each student will get automatically A in case (s)he received number of points from exercises >= 85% of MAX - maximal number of points any student got from exercises. Automatically a student gets B, with an easy way to get A, in case the number of points (s)he received is in interval (75,85)% of MAX....... Teaching materials ■ Detailed slides of all lectures. ( Each chapter will consists of a (i) short prologue, (ii) basic materials and an (iii) Appendix -for much demanding students. ■ Appendix of fundamental discrete math and linear algebra - 45 pages ■ Two lecture notes of solved examples (at least 100 in each one) and short (2-3) pages overviews for all chapters. ■ Posted solutions of homeworks IV054 1. Basics of coding theory and linear codes 4/77 Goals 1. To learn beautiful and powerful basics of the coding theory and of the classical as well as quantum modern cryptography and steganography-watermarking needed for all informaticians; in almost all areas of informatics and for transmission and storing information. IV054 1. Basics of coding theory and linear codes 5/77 Goals 1. To learn beautiful and powerful basics of the coding theory and of the classical as well as quantum modern cryptography and steganography-watermarking needed for all informaticians; in almost all areas of informatics and for transmission and storing information. 2. To verify, for ambitious students, their capability to work hard to be successful in very competitive informatics+mathematics environments. IV054 1. Basics of coding theory and linear codes 5/77 ■ J. Gruska: Foundation of computing. Thomson International Computer Press, 1997 ■ V. Pless: Introduction to the theory of error correcting codes, John Willey, 1998 ■ A. De Vos: Reversible Computing, Viley, VCH Verlg, 2010, 249 p. ■ W. Trape, L. Washington: Introduction to cryptography with coding theory D.R. Stinson: Cryptography: Theory and practice, CRC Press, 1995 ■ A. Salomaa: Public-key cryptography, Springer, 1990 ■ B. Schneier: Applied cryptography, John Willey and Son, 1996 ■ J. Hoffsten, J. Peper, J. Silveman: An introuction to Mathematial cryptography (elypti curves), Springer, 2008 ■ I. J. Cox: Digital Watermarking and Steganography, Morgan Kufman eries in Multimedia Information and Systems, 2008 ■ J. Gruska: Quantum computing, McGraw Hill, 1999,430 pages ■ M. A. Nielsen, I. I. Chuang: Quantum computtion and Quantum Information Cambridge University Press, 2000, 673 p. ■ D. Kahn: The codebreker. Two tory of secret wrung, Mcmilan, 1996 (An alternative and informative hitory of cryptography.) IV054 1. Basics of coding theory and linear codes 6/77 CONTENS IV054 1. Basics of coding theory and linear codes 7/77 Beautiful and much applied coding theory - efficiency and miniaturization of modern information transition systems depends much on the quality and efficiency of the underlying encoding and decoding systems. IV054 1. Basics of coding theory and linear codes 7/77 Beautiful and much applied coding theory - efficiency and miniaturization of modern information transition systems depends much on the quality and efficiency of the underlying encoding and decoding systems. Basic encryption systems and decryption methods of the classical, secret and public key cryptography. Blocks and streams encryption and decryption systems and methods. IV054 1. Basics of coding theory and linear codes 7/77 Beautiful and much applied coding theory - efficiency and miniaturization of modern information transition systems depends much on the quality and efficiency of the underlying encoding and decoding systems. Basic encryption systems and decryption methods of the classical, secret and public key cryptography. Blocks and streams encryption and decryption systems and methods. Digital signatures. Authentication protocols, privacy preservation and secret sharing methods. Basics and applications of such primitives as cryptographical hash functions, pseudorandomness, and elliptic curves. IV054 1. Basics of coding theory and linear codes 7/77 Beautiful and much applied coding theory - efficiency and miniaturization of modern information transition systems depends much on the quality and efficiency of the underlying encoding and decoding systems. Basic encryption systems and decryption methods of the classical, secret and public key cryptography. Blocks and streams encryption and decryption systems and methods. Digital signatures. Authentication protocols, privacy preservation and secret sharing methods. Basics and applications of such primitives as cryptographical hash functions, pseudorandomness, and elliptic curves. Fundamental crypto protocols and zero-knowledge protocols as well as probabilistic proofs as some highlights of the fundamentals of informatics. IV054 1. Basics of coding theory and linear codes 7/77 Beautiful and much applied coding theory - efficiency and miniaturization of modern information transition systems depends much on the quality and efficiency of the underlying encoding and decoding systems. Basic encryption systems and decryption methods of the classical, secret and public key cryptography. Blocks and streams encryption and decryption systems and methods. Digital signatures. Authentication protocols, privacy preservation and secret sharing methods. Basics and applications of such primitives as cryptographical hash functions, pseudorandomness, and elliptic curves. Fundamental crypto protocols and zero-knowledge protocols as well as probabilistic proofs as some highlights of the fundamentals of informatics. Steganography and watermarkinga as key information hiding and discovery methods -for a huge variety of applications. IV054 1. Basics of coding theory and linear codes 7/77 Beautiful and much applied coding theory - efficiency and miniaturization of modern information transition systems depends much on the quality and efficiency of the underlying encoding and decoding systems. Basic encryption systems and decryption methods of the classical, secret and public key cryptography. Blocks and streams encryption and decryption systems and methods. Digital signatures. Authentication protocols, privacy preservation and secret sharing methods. Basics and applications of such primitives as cryptographical hash functions, pseudorandomness, and elliptic curves. Fundamental crypto protocols and zero-knowledge protocols as well as probabilistic proofs as some highlights of the fundamentals of informatics. Steganography and watermarkinga as key information hiding and discovery methods -for a huge variety of applications. Fundamentals of quantum information transmission and Cryptography. Surprising and even shocking practical applications of quantum information transmission and cryptography. Top current cryptosystem for applications. Comment: Concerning both lectures and homeworks the overall requirement for students will be significantly smaller than in previous years. IV054 1. Basics of coding theory and linear codes 7/77 Codes basics and linear codes Basics of coding theory and an introduction to linear codes IV054 1. Basics of coding theory and linear codes 8/77 IV054 1. Basics of coding theory and linear codes 9/77 ROSETTA SPACECRAFT ROSETTA SPACECRAFT In 1993 in Europe Rosetta spacecraft project started IV054 1. Basics of coding theory and linear cod ROSETTA SPACECRAFT ■ In 1993 in Europe Rosetta spacecraft project started. ■ In 2004 Rosetta spacecraft was launched. IV054 1. Basics of coding theory and linear codes ROSETTA SPACECRAFT In 1993 in Europe Rosetta spacecraft project started. In 2004 Rosetta spacecraft was launched. In August 2015 Rosetta spacecraft got on the orbit of the comet 67P ((4.3 x 4.11 of its size) one of 4000 known comets of the solar systems) and sent to earth a lot of photos of 67P. IV054 1. Basics of coding theory and linear codes 10/77 ROSETTA SPACECRAFT In 1993 in Europe Rosetta spacecraft project started. In 2004 Rosetta spacecraft was launched. In August 2015 Rosetta spacecraft got on the orbit of the comet 67P ((4.3 x 4.11 of its size) one of 4000 known comets of the solar systems) and sent to earth a lot of photos of 67P. In spite of the fact that the comet 67P is 720 millions of kilometers from the earth IV054 1. Basics of coding theory and linear codes 10/77 ROSETTA SPACECRAFT In 1993 in Europe Rosetta spacecraft project started. In 2004 Rosetta spacecraft was launched. In August 2015 Rosetta spacecraft got on the orbit of the comet 67P ((4.3 x 4.11 of its size) one of 4000 known comets of the solar systems) and sent to earth a lot of photos of 67P. In spite of the fact that the comet 67P is 720 millions of kilometers from the earth and there is a lot of noise for signals on the way IV054 1. Basics of coding theory and linear codes 10/77 ROSETTA SPACECRAFT In 1993 in Europe Rosetta spacecraft project started. In 2004 Rosetta spacecraft was launched. In August 2015 Rosetta spacecraft got on the orbit of the comet 67P ((4.3 x 4.11 of its size) one of 4000 known comets of the solar systems) and sent to earth a lot of photos of 67P. In spite of the fact that the comet 67P is 720 millions of kilometers from the earth and there is a lot of noise for signals on the way encoding of photos arrived in such a form that they could be decoded to get excellent photos of the comet. IV054 1. Basics of coding theory and linear codes 10/77 ROSETTA SPACECRAFT In 1993 in Europe Rosetta spacecraft project started. In 2004 Rosetta spacecraft was launched. In August 2015 Rosetta spacecraft got on the orbit of the comet 67P ((4.3 x 4.11 of its size) one of 4000 known comets of the solar systems) and sent to earth a lot of photos of 67P. In spite of the fact that the comet 67P is 720 millions of kilometers from the earth and there is a lot of noise for signals on the way encoding of photos arrived in such a form that they could be decoded to get excellent photos of the comet. All that was, to the large extent, due to the enormously high level coding theory already had in 1993. IV054 1. Basics of coding theory and linear codes 10/77 ROSETTA SPACECRAFT In 1993 in Europe Rosetta spacecraft project started. In 2004 Rosetta spacecraft was launched. In August 2015 Rosetta spacecraft got on the orbit of the comet 67P ((4.3 x 4.11 of its size) one of 4000 known comets of the solar systems) and sent to earth a lot of photos of 67P. In spite of the fact that the comet 67P is 720 millions of kilometers from the earth and there is a lot of noise for signals on the way encoding of photos arrived in such a form that they could be decoded to get excellent photos of the comet. All that was, to the large extent, due to the enormously high level coding theory already had in 1993. Since that time coding theory has made another enormous progress that has allowed, among other things, almost perfect mobile communication and transmission of music in time and space. IV054 1. Basics of coding theory and linear codes 10/77 IV054 1. Basics of coding theory and linear codes 11/77 IV054 1. Basics of coding theory and linear codes 12/77 CHAPTER 1: BASICS of CODING THEORY CHAPTER 1: BASICS of CODING THEORY IV054 1. Basics of coding theory and linear codes 14/77 CHAPTER 1: BASICS of CODING THEORY ABSTRACT Coding theory - theory of error correcting codes - is one of the most interesting and applied part of informatics. IV054 1. Basics of coding theory and linear codes 15/77 CHAPTER 1: BASICS of CODING THEORY ABSTRACT Coding theory - theory of error correcting codes - is one of the most interesting and applied part of informatics. Goals of coding theory are to develop systems and methods that allow to detect/correct errors caused when information is transmitted through noisy channels. IV054 1. Basics of coding theory and linear codes 15/77 CHAPTER 1: BASICS of CODING THEORY ABSTRACT Coding theory - theory of error correcting codes - is one of the most interesting and applied part of informatics. Goals of coding theory are to develop systems and methods that allow to detect/correct errors caused when information is transmitted through noisy channels. All real communication systems that work with digitally represented data, as CD players, TV, fax machines, internet, satellites, mobiles, require to use error correcting codes because all real channels are, to some extent, noisy - due to various interference/destruction caused by the environment IV054 1. Basics of coding theory and linear codes 15/77 CHAPTER 1: BASICS of CODING THEORY ABSTRACT Coding theory - theory of error correcting codes - is one of the most interesting and applied part of informatics. Goals of coding theory are to develop systems and methods that allow to detect/correct errors caused when information is transmitted through noisy channels. All real communication systems that work with digitally represented data, as CD players, TV, fax machines, internet, satellites, mobiles, require to use error correcting codes because all real channels are, to some extent, noisy - due to various interference/destruction caused by the environment ■ Coding theory problems are therefore among the very basic and most frequent IV054 1. Basics of coding theory and linear codes 15/77 INFORMATION PROLOGUE - II. IV054 1. Basics of coding theory and linear codes 16/77 INFORMATION INFORMATION IV054 1. Basics of coding theory and linear codes INFORMATION INFORMATION is often an important and very valuable commodity. IV054 1. Basics of coding theory and linear codes 17/77 INFORMATION INFORMATION is often an important and very valuable commodity. This lecture is about how to protect or even hide information INFORMATION is often an important and very valuable commodity. This lecture is about how to protect or even hide information against noise or even unintended user, IV054 1. Basics of coding theory and linear codes 17/77 INFORMATION INFORMATION is often an important and very valuable commodity. This lecture is about how to protect or even hide information against noise or even unintended user, using mainly classical, but also quantum tools. IV054 1. Basics of coding theory and linear codes 17/77 CODING THEORY - BASIC CONCEPTS IV054 1. Basics of coding theory and linear codes 18/77 CODING THEORY - BASIC CONCEPTS Error-correcting codes are used to correct messages when they are (erroneously) transmitted through noisy channels. channel message w Encoding code word code word _ Decoding W user source C(W) noise C'(W) IV054 1. Basics of coding theory and linear codes 18/77 CODING THEORY - BASIC CONCEPTS Error-correcting codes are used to correct messages when they are (erroneously) transmitted through noisy channels. channel message w Encoding code word code word _ Decoding W user source C(W) noise C'(W) Error correcting framework IV054 1. Basics of coding theory and linear codes 18/77 CODING THEORY - BASIC CONCEPTS Error-correcting codes are used to correct messages when they are (erroneously) transmitted through noisy channels. channel message w Encoding code word code word _ Decoding W user source C(W) noise C'(W) Error correcting framework Example message YES or NO YES Encoding YES-00000 NO -11111 00000 >01001 Decoding 01001 00000 YES user IV054 1. Basics of coding theory and linear codes CODING THEORY - BASIC CONCEPTS Error-correcting codes are used to correct messages when they are (erroneously) transmitted through noisy channels. channel message w Encoding code word code word _ Decoding W user source C(W) noise C'(W) Error correcting framework Example message YES or NO YES Encoding YES-00000 NO -11111 00000 >01001 Decoding 01001 00000 YES user A code C over an alphabet U is a nonempty subset of i7*(C C Z1*). IV054 1. Basics of coding theory and linear codes CODING THEORY - BASIC CONCEPTS Error-correcting codes are used to correct messages when they are (erroneously) transmitted through noisy channels. channel message w Encoding code word code word _ Decoding W user source C(W) noise C'(W) Error correcting framework Example message YES or NO YES Encoding YES-00000 NO -11111 00000 >01001 Decoding 01001 00000 YES user A code C over an alphabet U is a nonempty subset of i7*(C C Z1*). A q-nary code is a code over an alphabet of q-symbols. IV054 1. Basics of coding theory and linear codes CODING THEORY - BASIC CONCEPTS Error-correcting codes are used to correct messages when they are (erroneously) transmitted through noisy channels. channel message w Encoding code word code word _ Decoding W user source C(W) noise C'(W) Error correcting framework Example message YES or NO YES Encoding YES-00000 NO -11111 00000 >01001 Decoding 01001 00000 YES user A code C over an alphabet U is a nonempty subset of i7*(C C Z1*). A q-nary code is a code over an alphabet of q-symbols. A binary code is a code over the alphabet {0,1}. IV054 1. Basics of coding theory and linear codes CODING THEORY - BASIC CONCEPTS Error-correcting codes are used to correct messages when they are (erroneously) transmitted through noisy channels. channel message w Encoding code word code word _ Decoding W user source C(W) noise C'(W) Example Error correcting framework message YES or NO YES Encoding YES-00000 NO -11111 00000 >01001 Decoding 01001 00000 YES user A code C over an alphabet U is a nonempty subset of i7*(C C Z1*). A q-nary code is a code over an alphabet of q-symbols. A binary code is a code over the alphabet {0,1}. Examples of codes CI = {00,01,10,11} C2 = {000,010,101,100} IV054 1. Basics of coding theory and linear codes CODING THEORY - BASIC CONCEPTS Error-correcting codes are used to correct messages when they are (erroneously) transmitted through noisy channels. channel message w Encoding code word code word _ Decoding W user source C(W) noise C'(W) Example Error correcting framework message YES or NO YES Encoding YES-00000 NO -11111 00000 >01001 Decoding 01001 00000 YES user A code C over an alphabet U is a nonempty subset of i7*(C C Z1*). A q-nary code is a code over an alphabet of q-symbols. A binary code is a code over the alphabet {0,1}. Examples of codes CI = {00,01,10,11} C2 = {000,010,101,100} C3 = {00000,01101,10111,11011} IV054 1. Basics of coding theory and linear codes CHANNELS is any physical medium in which information is stored or through which information is transmitted. 19/77 is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) IV054 1. Basics of coding theory and linear codes 19/77 is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) NOISE IV054 1. Basics of coding theory and linear codes 19/77 is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) NOISE may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... IV054 1. Basics of coding theory and linear codes 19/77 is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) NOISE may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... TRANSMISSION GOALS IV054 1. Basics of coding theory and linear codes 19/77 is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) NOISE may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... TRANSMISSION GOALS □ Encoding of information should be very fast. IV054 1. Basics of coding theory and linear codes 19/77 is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) NOISE may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... TRANSMISSION GOALS □ Encoding of information should be very fast. Q Very similar messages should be encoded very differently. IV054 1. Basics of coding theory and linear codes 19/77 is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) NOISE may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... TRANSMISSION GOALS □ Encoding of information should be very fast. Q Very similar messages should be encoded very differently. Q Transmission of encoded messages should be very easy. IV054 1. Basics of coding theory and linear codes 19/77 is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) NOISE may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... TRANSMISSION GOALS □ Encoding of information should be very fast. Q Very similar messages should be encoded very differently. Q Transmission of encoded messages should be very easy. □ Decoding of received messages should be very easy. IV054 1. Basics of coding theory and linear codes 19/77 CHANNELS is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... □ Encoding of information should be very fast. Q Very similar messages should be encoded very differently. Q Transmission of encoded messages should be very easy. □ Decoding of received messages should be very easy. H Corection of errors introduced in the channel should be reasonably easy. NOISE TRANSMISSION GOALS IV054 1. Basics of coding theory and linear codes 19/77 CHANNELS is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... □ Encoding of information should be very fast. B Very similar messages should be encoded very differently. B Transmission of encoded messages should be very easy. □ Decoding of received messages should be very easy. B Corection of errors introduced in the channel should be reasonably easy. 0 As large as possible amount of information should be transferred reliably per a time NOISE TRANSMISSION GOALS unit. 19/77 CHANNELS is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... □ Encoding of information should be very fast. Q Very similar messages should be encoded very differently. Q Transmission of encoded messages should be very easy. □ Decoding of received messages should be very easy. H Corection of errors introduced in the channel should be reasonably easy. 0 As large as possible amount of information should be transferred reliably per a time NOISE TRANSMISSION GOALS unit. BASIC METHOD OF FIGHTING ERRORS: REDUNDANCY!!! 19/77 CHANNELS is any physical medium in which information is stored or through which information is transmitted. (Telephone lines, optical fibres and also the atmosphere are examples of channels.) may be caused by sunspots, lighting, meteor showers, random radio disturbances, poor typing, poor hearing, .... □ Encoding of information should be very fast. Q Very similar messages should be encoded very differently. Q Transmission of encoded messages should be very easy. □ Decoding of received messages should be very easy. H Corection of errors introduced in the channel should be reasonably easy. 0 As large as possible amount of information should be transferred reliably per a time unit. BASIC METHOD OF FIGHTING ERRORS: REDUNDANCY!!! Example: 0 is encoded as 00000 and 1 is encoded as 11111. NOISE TRANSMISSION GOALS IV054 1. Basics of coding theory and linear codes 19/77 CHANNELS - MAIN TYPES IV054 1. Basics of coding theory and linear codes 20/77 CHANNELS - MAIN TYPES Discrete channels and continuous channels are main types of channels. IV054 1. Basics of coding theory and linear codes 20/77 CHANNELS - MAIN TYPES Discrete channels and continuous channels are main types of channels. With an example of continuous channels we will deal in Chapter 2. Main model of the noise in discrete channels is: 20/77 CHANNELS - MAIN TYPES Discrete channels and continuous channels are main types of channels. With an example of continuous channels we will deal in Chapter 2. Main model of the noise in discrete channels is: ■ Shannon stochastic (probabilistic) noise model: Probability Pr(y|x), for any output y and input x) is given that output is y in case input is x, IV054 1. Basics of coding theory and linear codes 20/77 CHANNELS - MAIN TYPES Discrete channels and continuous channels are main types of channels. With an example of continuous channels we will deal in Chapter 2. Main model of the noise in discrete channels is: ■ Shannon stochastic (probabilistic) noise model: Probability Pr(y|x), for any output y and input x) is given that output is y in case input is x,, and in additionthe probability of too many errors is low. IV054 1. Basics of coding theory and linear codes 20/77 CHANNELS - MAIN TYPES Discrete channels and continuous channels are main types of channels. With an example of continuous channels we will deal in Chapter 2. Main model of the noise in discrete channels is: ■ Shannon stochastic (probabilistic) noise model: Probability Pr(y|x), for any output y and input x) is given that output is y in case input is x,, and in additionthe probability of too many errors is low. IV054 1. Basics of coding theory and linear codes 20/77 DISCRETE CHANNELS - MATHEMATICAL VIEWS IV054 1. Basics of coding theory and linear codes DISCRETE CHANNELS - MATHEMATICAL VIEWS Formally, a discrete Shannon stochastic channel is described by a triple C = (Z,Q,p), where ■ Z is an input alphabet ■ Q is an output alphabet ■ Pr is a probability distribution on IxQ and for each / G I, o G Q, PrV, °) >s the probability that the output of the channel is o if the input is /. IV054 1. Basics of coding theory and linear codes 21/77 DISCRETE CHANNELS - MATHEMATICAL VIEWS Formally, a discrete Shannon stochastic channel is described by a triple C = (Z,Q,p), where ■ Z is an input alphabet ■ Q is an output alphabet ■ Pr is a probability distribution on IxQ and for each / G I, o G Q, PrV, °) >s the probability that the output of the channel is o if the input is /. IMPORTANT CHANNELS IV054 1. Basics of coding theory and linear codes 21/77 DISCRETE CHANNELS - MATHEMATICAL VIEWS Formally, a discrete Shannon stochastic channel is described by a triple C = (Z,Q,p), where ■ Z is an input alphabet ■ Q is an output alphabet ■ Pr is a probability distribution on IxQ and for each / G I, o G Q, PrV, °) >s the probability that the output of the channel is o if the input is /. IMPORTANT CHANNELS ■ Binary symmetric channel maps, with fixed probability po, each binary input into the opposite one. Hence, Pr(0,1) = Pr(l,0) = po and Pr(0,0) = Pr(l,l) = l-p0. IV054 1. Basics of coding theory and linear codes 21/77 DISCRETE CHANNELS - MATHEMATICAL VIEWS Formally, a discrete Shannon stochastic channel is described by a triple C = (Z,Q,p), where ■ Z is an input alphabet ■ Q is an output alphabet ■ Pr is a probability distribution on IxQ and for each / G I, o G Q, PrV, °) >s the probability that the output of the channel is o if the input is /. IMPORTANT CHANNELS ■ Binary symmetric channel maps, with fixed probability po, each binary input into the opposite one. Hence, Pr(0,1) = Pr(l,0) = po and Pr(0,0) = Pr(l,l) = l-p0. ■ Binary erasure channel maps, with fixed probability po, binary inputs into {0, l,e}, where e is so called the erasure symbol, and Pr(0,0) = Pr(l, 1) = po, Pr(0,e) = Pr(l,e) = 1 - p0. IV054 1. Basics of coding theory and linear codes 21/77 DISCRETE CHANNELS - MATHEMATICAL VIEWS Formally, a discrete Shannon stochastic channel is described by a triple C = (Z,Q,p), where ■ Z is an input alphabet ■ Q is an output alphabet ■ Pr is a probability distribution on IxQ and for each / G I, o G Q, PrV, °) >s the probability that the output of the channel is o if the input is /. IMPORTANT CHANNELS ■ Binary symmetric channel maps, with fixed probability po, each binary input into the opposite one. Hence, Pr(0,1) = Pr(l,0) = po and Pr(0,0) = Pr(l,l) = l-p0. ■ Binary erasure channel maps, with fixed probability po, binary inputs into {0, l,e}, where e is so called the erasure symbol, and Pr(0,0) = Pr(l, 1) = po, Pr(0,e) = Pr(l,e) = 1 - p0. ■ White noise Gaussian channel that models errors in the deep space. IV054 1. Basics of coding theory and linear codes 21/77 BASIC CHANNEL CODING PROBLEMS Summary: The task of a communication channel coding is to encode the information to be sent over the channel in such a way that even in the presence of some channel noise, several (or a specific number of) errors can be detected and/or corrected. IV054 1. Basics of coding theory and linear codes 22/77 BASIC CHANNEL CODING PROBLEMS Summary: The task of a communication channel coding is to encode the information to be sent over the channel in such a way that even in the presence of some channel noise, several (or a specific number of) errors can be detected and/or corrected. There are two basic coding methods BEC (Bawkwarda) Err or Cerection Coding allows the receiver only to detect errors. If an error is detected, then the sender is requested to re transmit the message.] IV054 1. Basics of coding theory and linear codes 22/77 BASIC CHANNEL CODING PROBLEMS Summary: The task of a communication channel coding is to encode the information to be sent over the channel in such a way that even in the presence of some channel noise, several (or a specific number of) errors can be detected and/or corrected. There are two basic coding methods (Bawkwarda) Err or Cerection Coding allows the receiver only to detect errors. If an error is detected, then the sender is requested to re transmit the message.] DEC (Forward Error Cerection) Coding] allows the receiver to correct a certain amount of IV054 1. Basics of coding theory and linear codes 22/77 IMPORTANCE of ERROR-CORRECTING CODES for CRYPTOGRAPHY In a good cryptosystem a change of a single bit of the cryptotext should change so many bits of the plaintext obtained from the cryptotext that the plaintext gets incomprehensible. 23/77 IMPORTANCE of ERROR-CORRECTING CODES for CRYPTOGRAPHY In a good cryptosystem a change of a single bit of the cryptotext should change so many bits of the plaintext obtained from the cryptotext that the plaintext gets incomprehensible. Methods to detect and correct errors when cryptotexts are transmitted are therefore much needed. 23/77 IMPORTANCE of ERROR-CORRECTING CODES for CRYPTOGRAPHY In a good cryptosystem a change of a single bit of the cryptotext should change so many bits of the plaintext obtained from the cryptotext that the plaintext gets incomprehensible. Methods to detect and correct errors when cryptotexts are transmitted are therefore much needed. Also many non-cryptography applications require error-correcting codes. For example, mobiles, CD-players,... IV054 1. Basics of coding theory and linear codes 23/77 WHY WE NEED TO KEEP IMPROVING ERROR-CORRECTING CODES When error correcting capabilities of some code are improved - that is a better code is found - this has the following impacts: IV054 1. Basics of coding theory and linear codes 24/77 WHY WE NEED TO KEEP IMPROVING ERROR-CORRECTING CODES When error correcting capabilities of some code are improved - that is a better code is found - this has the following impacts: ■ For the same quality of the received information, it is possible to achieve that the transmission system operates in more severe conditions; IV054 1. Basics of coding theory and linear codes 24/77 WHY WE NEED TO KEEP IMPROVING ERROR-CORRECTING CODES When error correcting capabilities of some code are improved - that is a better code is found - this has the following impacts: ■ For the same quality of the received information, it is possible to achieve that the transmission system operates in more severe conditions; ■ For example; □ It is possible to reduce the size of antennas or solar panels and the weight of batteries IV054 1. Basics of coding theory and linear codes 24/77 WHY WE NEED TO KEEP IMPROVING ERROR-CORRECTING CODES When error correcting capabilities of some code are improved - that is a better code is found - this has the following impacts: ■ For the same quality of the received information, it is possible to achieve that the transmission system operates in more severe conditions; ■ For example; □ It is possible to reduce the size of antennas or solar panels and the weight of batteries Q In the space travel systems such savings can be measured in hundred of thousands of dollars; IV054 1. Basics of coding theory and linear codes 24/77 WHY WE NEED TO KEEP IMPROVING ERROR-CORRECTING CODES When error correcting capabilities of some code are improved - that is a better code is found - this has the following impacts: ■ For the same quality of the received information, it is possible to achieve that the transmission system operates in more severe conditions; ■ For example; □ It is possible to reduce the size of antennas or solar panels and the weight of batteries B In the space travel systems such savings can be measured in hundred of thousands of dollars; B In mobile telephone systems, improving the code enables the operators to increase the potential number of users in each cell. IV054 1. Basics of coding theory and linear codes 24/77 WHY WE NEED TO KEEP IMPROVING ERROR-CORRECTING CODES When error correcting capabilities of some code are improved - that is a better code is found - this has the following impacts: ■ For the same quality of the received information, it is possible to achieve that the transmission system operates in more severe conditions; ■ For example; □ It is possible to reduce the size of antennas or solar panels and the weight of batteries Q In the space travel systems such savings can be measured in hundred of thousands of dollars; B In mobile telephone systems, improving the code enables the operators to increase the potential number of users in each cell. ■ Another field of applications of error-correcting codes is that of mass memories: computer hard drives, CD-Rooms, DVDs and so on. IV054 1. Basics of coding theory and linear codes 24/77 REDUNDANCY - BASIC IDEA of ERROR CORRECTION IV054 1. Basics of coding theory and linear codes 25/77 REDUNDANCY - BASIC IDEA of ERROR CORRECTION Details of the techniques used to protect information against noise in practice are sometimes rather complicated, but basic principles are mostly easily understood. IV054 1. Basics of coding theory and linear codes 25/77 REDUNDANCY - BASIC IDEA of ERROR CORRECTION Details of the techniques used to protect information against noise in practice are sometimes rather complicated, but basic principles are mostly easily understood. The key idea is that in order to protect a message against a noise, we should encode the message by adding some redundant informationto the message. IV054 1. Basics of coding theory and linear codes 25/77 REDUNDANCY - BASIC IDEA of ERROR CORRECTION Details of the techniques used to protect information against noise in practice are sometimes rather complicated, but basic principles are mostly easily understood. The key idea is that in order to protect a message against a noise, we should encode the message by adding some redundant informationto the message. This should be done in such a way that even if the message is corrupted by a noise, there will be enough redundancy in the encoded message to recover, or to decode the message completely. IV054 1. Basics of coding theory and linear codes 25/77 MAJORITY VOTING DECODING - BASIC IDEA The basic idea of so called majority voting decoding/principle or of maximal likelihood decoding/principle, when a code C is used, is 26/77 MAJORITY VOTING DECODING - BASIC IDEA The basic idea of so called majority voting decoding/principle or of maximal likelihood decoding/principle, when a code C is used, is to decode a received message w' by a codeword w that is the closest codeword to w IV054 1. Basics of coding theory and linear codes 26/77 MAJORITY VOTING DECODING - BASIC IDEA The basic idea of so called majority voting decoding/principle or of maximal likelihood decoding/principle, when a code C is used, is to decode a received message w' by a codeword w that is the closest codeword to w' in the whole set of the codewords of the given code C. IV054 1. Basics of coding theory and linear codes 26/77 EXAMPLE IV054 1. Basics of coding theory and linear codes 27/77 EXAMPLE In case: (a) the encoding 0 ^ 000 1 111, is used, IV054 1. Basics of coding theory and linear codes 27/77 EXAMPLE In case: (a) the encoding 0 ^ 000 1 111, is used, (b) the probability of the bit error is p < \ and, IV054 1. Basics of coding theory and linear codes 27/77 EXAMPLE In case: (a) the encoding 0 ^ 000 1 -> 111, is used, (b) the probability of the bit error is p < \ and, (c) the following majority voting decoding 000, 001,010,100 -> 000 and 111, 110,101,011 -> 111 is used, IV054 1. Basics of coding theory and linear codes 27/77 In case: (a) the encoding 0 ^ 000 1 111, is used, (b) the probability of the bit error is p < \ and, (c) the following majority voting decoding 000, 001,010,100 000 and 111, 110,101,011 111 is used, then the probability of an erroneous decoding (for the case of 2 or 3 errors) is 3p2(l-p) + p3 = 3p2-2p3
s + 1.
IV054 1. Basics of coding theory and linear codes
30/77
HAMMING DISTANCE
The intuitive concept of "closeness" of two words is well formalized through Hamming distance /?(x, y) of words x, y. For two words x, y
h(x, y) = the number of symbols in which the words x and y differ.
Example: /?(10101, 01100) = 3, h(fourth, eighth) = 4
Properties of th Hamming distance
□ /?(x,y) = 0 x = y H h(x,y) = h(y,x)
H /?(x, z) < /?(x,y) + /?(y, z) triangle inequality An important parameter of codes C is their minimal distance.
h(C) = min{h(x,y) | x,y e C,x ^ y},
Therefore, h(C) is the smallest number of errors that can change one codeword into another.
Basic error correcting theorem
□ A code C can detect up to s errors if h(C) > s + 1. Q A code C can correct up to t errors if h(C) > 2t + 1.
IV054 1. Basics of coding theory and linear codes
30/77
HAMMING DISTANCE
The intuitive concept of "closeness" of two words is well formalized through Hamming distance /?(x, y) of words x, y. For two words x, y
h(x, y) = the number of symbols in which the words x and y differ.
Example: /?(10101, 01100) = 3, h(fourth, eighth) = 4
Properties of th Hamming distance
□ /?(x,y) = 0 x = y H h(x,y) = h(y,x)
H /?(x, z) < /?(x,y) + /?(y, z) triangle inequality An important parameter of codes C is their minimal distance.
h(C) = min{h(x,y) | x,y e C,x ^ y},
Therefore, h(C) is the smallest number of errors that can change one codeword into another.
Basic error correcting theorem
□ A code C can detect up to s errors if h(C) > s + 1. Q A code C can correct up to t errors if h(C) > 2t + 1.
Proof (1) Trivial.
IV054 1. Basics of coding theory and linear codes
30/77
HAMMING DISTANCE
The intuitive concept of "closeness" of two words is well formalized through Hamming distance /?(x, y) of words x, y. For two words x, y
h(x, y) = the number of symbols in which the words x and y differ.
Example: /?(10101, 01100) = 3, h(fourth, eighth) = 4
Properties of th Hamming distance
□ /?(x,y) = 0 x = y H h(x,y) = h(y,x)
H /?(x, z) < /?(x,y) + /?(y, z) triangle inequality An important parameter of codes C is their minimal distance.
h(C) = min{h(x,y) | x,y e C,x ^ y},
Therefore, h(C) is the smallest number of errors that can change one codeword into another.
Basic error correcting theorem
□ A code C can detect up to s errors if h(C) > s + 1. Q A code C can correct up to t errors if h(C) > 2t + 1.
Proof (1) Trivial. (2) Suppose /?(C) > 2t + 1. Let a codeword x is transmitted and a word y is received such that /?(x,y) < t.
IV054 1. Basics of coding theory and linear codes
30/77
HAMMING DISTANCE
The intuitive concept of "closeness" of two words is well formalized through Hamming distance /?(x, y) of words x, y. For two words x, y
h(x, y) = the number of symbols in which the words x and y differ.
Example: /?(10101, 01100) = 3, h(fourth, eighth) = 4
Properties of th Hamming distance
□ /?(x,y) = 0 x = y H h(x,y) = h(y,x)
H /?(x, z) < /?(x,y) + /?(y, z) triangle inequality An important parameter of codes C is their minimal distance.
h(C) = min{h(x,y) | x,y e C,x ^ y},
Therefore, h(C) is the smallest number of errors that can change one codeword into another.
Basic error correcting theorem
□ A code C can detect up to s errors if h(C) > s + 1. Q A code C can correct up to t errors if h(C) > 2t + 1.
Proof (1) Trivial. (2) Suppose /?(C) > 2t + 1. Let a codeword x is transmitted and a word y is received such that /?(x,y) < t. If x ^ x is any codeword, then h(yJx/) > t + 1 because otherwise /?(y, x7) < t + 1 and therefore h(x,xf) < /?(x,y) + ^(y^7) < 2t + 1
IV054 1. Basics of coding theory and linear codes
30/77
HAMMING DISTANCE
The intuitive concept of "closeness" of two words is well formalized through Hamming distance /?(x, y) of words x, y. For two words x, y
h(x, y) = the number of symbols in which the words x and y differ.
Example: /?(10101, 01100) = 3, h(fourth, eighth) = 4
Properties of th Hamming distance
□ /?(x,y) = 0 x = y H h(x,y) = h(y,x)
H /?(x, z) < /?(x,y) + /?(y, z) triangle inequality An important parameter of codes C is their minimal distance.
h(C) = min{h(x,y) | x,y e C,x ^ y},
Therefore, h(C) is the smallest number of errors that can change one codeword into another.
Basic error correcting theorem
□ A code C can detect up to s errors if h(C) > s + 1. Q A code C can correct up to t errors if h(C) > 2t + 1.
Proof (1) Trivial. (2) Suppose /?(C) > 2t + 1. Let a codeword x is transmitted and a word y is received such that /?(x,y) < t. If x ^ x is any codeword, then h(yJx/) > t + 1 because otherwise /?(y, x7) < £ + 1 and therefore h(x,xf) < /?(x,y) + ^(y^7) < 2t + 1 what contradicts the assumption h(C) > 2t + 1.
IV054 1. Basics of coding theory and linear codes
30/77
BINARY SYMMETRIC CHANNEL
IV054 1. Basics of coding theory and linear codes
31/77
BINARY SYMMETRIC CHANNEL
Consider a transition of binary symbols such that each symbol has probability of error
P < i
0
l-p
0
Binary symmetric channel
1 !-P '1
IV054 1. Basics of coding theory and linear codes
31/77
BINARY SYMMETRIC CHANNEL
Consider a transition of binary symbols such that each symbol has probability of error
P < i
0
l-p
0
Binary symmetric channel
1 !-P '1
If n symbols are transmitted, then the probability of t errors is
IV054 1. Basics of coding theory and linear codes
31/77
BINARY SYMMETRIC CHANNEL
Consider a transition of binary symbols such that each symbol has probability of error
P< i
l-p
Binary symmetric channel
l-p
If n symbols are transmitted, then the probability of t errors is
p'ii-py-'C)
IV054 1. Basics of coding theory and linear codes
31/77
BINARY SYMMETRIC CHANNEL
Consider a transition of binary symbols such that each symbol has probability of error
P< i
l-p
Binary symmetric channel
l-p
If n symbols are transmitted, then the probability of t errors is
p'ii-py-'C)
In the case of binary symmetric channels, the "nearest neighbour decoding strategy" is also "maximum likelihood decoding strategy".
IV054 1. Basics of coding theory and linear codes
31/77
BINARY SYMMETRIC CHANNEL
Consider a transition of binary symbols such that each symbol has probability of error
P< i
l-p
Binary symmetric channel
l-p
If n symbols are transmitted, then the probability of t errors is
p'ii-py-'C)
In the case of binary symmetric channels, the "nearest neighbour decoding strategy" is also "maximum likelihood decoding strategy".
IV054 1. Basics of coding theory and linear codes
31/77
SURPRISING POWER of PARITY BITS
IV054 1. Basics of coding theory and linear codes
32/77
SURPRISING POWER of PARITY BITS
Example Let all 2 of binary words of length 11 be codewords
IV054 1. Basics of coding theory and linear codes
SURPRISING POWER of PARITY BITS
Example Let all 2 of binary words of length 11 be codewords and let the probability of a bit error be p = 10-8.
SURPRISING POWER of PARITY BITS
Example Let all 211 of binary words of length 11 be codewords
and let the probability of a bit error be p = 10-8.
Let bits be transmitted at the rate 107 bits per second.
IV054 1. Basics of coding theory and linear codes
SURPRISING POWER of PARITY BITS
Example Let all 2 of binary words of length 11 be codewords
and let the probability of a bit error be p = 10-8.
Let bits be transmitted at the rate 107 bits per second.
The probability that a word is transmitted incorrectly is approxim
np(i-p)10«^.
IV054 1. Basics of coding theory and linear codes
SURPRISING POWER of PARITY BITS
Example Let all 211 of binary words of length 11 be codewords
and let the probability of a bit error be p = 10-8.
Let bits be transmitted at the rate 107 bits per second.
The probability that a word is transmitted incorrectly is approximately
np(i - p)
10 _ 11
108
Therefore ^
101
li
= 0.1 of words per second are transmitted incorrectly.
IV054 1. Basics of coding theory and linear codes
SURPRISING POWER of PARITY BITS
Example Let all 211 of binary words of length 11 be codewords
and let the probability of a bit error be p = 10-8.
Let bits be transmitted at the rate 107 bits per second.
The probability that a word is transmitted incorrectly is approximately
np(i - p)
10 _ 11
108
Therefore ^
101
li
= 0.1 of words per second are transmitted incorrectly.
Therefore, one wrong word is transmitted every 10 seconds, 360 erroneous words hour and 8640 words every day without being detected!
IV054 1. Basics of coding theory and linear codes
SURPRISING POWER of PARITY BITS
txam pie Let all 211 of b inary words of length 11 be codewords
and let the probability of a bit error be p = 10-8.
Let bits be transmitted at the rate 107 bits per second.
The probability that a word is transmitted incorrectly is approximately
np(i-p)10«
Therefore ^ • ^ = 0.1 of words per second are transmitted incorrectly.
Therefore, one wrong word is transmitted every 10 seconds, 360 erroneous words every
hour and 8640 words every day without being detected!
Let now one parity bit be added.
IV054 1. Basics of coding theory and linear codes
32/77
SURPRISING POWER of PARITY BITS
txam pie Let all 211 of b inary words of length 11 be codewords
and let the probability of a bit error be p = 10-8.
Let bits be transmitted at the rate 107 bits per second.
The probability that a word is transmitted incorrectly is approximately
iip(i-P)io«
Therefore ^ • ^ = 0.1 of words per second are transmitted incorrectly.
Therefore, one wrong word is transmitted every 10 seconds, 360 erroneous words every
hour and 8640 words every day without being detected!
Let now one parity bit be added.
Any single error can be detected!!!
IV054 1. Basics of coding theory and linear codes
32/77
SURPRISING POWER of PARITY BITS
txam pie Let all 211 of b inary words of length 11 be codewords
and let the probability of a bit error be p = 10-8.
Let bits be transmitted at the rate 107 bits per second.
The probability that a word is transmitted incorrectly is approximately
np(i-p)
10 _ 11
io8
Therefore ^ • ^ = 0.1 of words per second are transmitted incorrectly.
Therefore, one wrong word is transmitted every 10 seconds, 360 erroneous words every
hour and 8640 words every day without being detected!
Let now one parity bit be added.
Any single error can be detected!!!
The probability of at least two errors is:
1 _ (1 _ p)12 _ 12(1 _ p)Hp « (12) (1 _ p)10p
2 ^ 66
10"
IV054 1. Basics of coding theory and linear codes
32/77
SURPRISING POWER of PARITY BITS
txam pie Let all 211 of b inary words of length 11 be codewords
and let the probability of a bit error be p = 10-8.
Let bits be transmitted at the rate 107 bits per second.
The probability that a word is transmitted incorrectly is approximately
np(i-p)
10 _ 11
io8
Therefore ^ • ^ = 0.1 of words per second are transmitted incorrectly.
Therefore, one wrong word is transmitted every 10 seconds, 360 erroneous words every
hour and 8640 words every day without being detected!
Let now one parity bit be added.
Any single error can be detected!!!
The probability of at least two errors is:
1 _ (1 _ p)12 _ 12(1 _ p)Hp « (12) (1 _ p)10p
10 „2 ^ 66
10"
Therefore, approximately • « 5.5 • 10 9 words per second are transmitted with a undetectable error.
IV054 1. Basics of coding theory and linear codes
32/77
SURPRISING POWER of PARITY BITS
txam pie Let all 211 of b inary words of length 11 be codewords
and let the probability of a bit error be p = 10-8.
Let bits be transmitted at the rate 107 bits per second.
The probability that a word is transmitted incorrectly is approximately
np(i-p)
10 _ 11
io8
Therefore ^ • ^ = 0.1 of words per second are transmitted incorrectly.
Therefore, one wrong word is transmitted every 10 seconds, 360 erroneous words every
hour and 8640 words every day without being detected!
Let now one parity bit be added.
Any single error can be detected!!!
The probability of at least two errors is:
1 _ (1 _ p)12 _ 12(1 _ p)Hp « (12) (1 _ p)10p
10 „2 ^ 66
10"
Therefore, approximately • « 5.5 • 10-9 words per second are transmitted with a undetectable error.
Corollary One undetected error occurs only once every 2000 days! (2000 « 5 5*g640Q).
IV054 1. Basics of coding theory and linear codes
32/77
NOTATIONS and EXAMPLES
Notation: An (n, M, c/)-code C is a code such that
IV054 1. Basics of coding theory and linear codes
33/77
NOTATIONS and EXAMPLES
Notation: An (/i, M, c/)-code C is a code such that
■ n - is the length of codewords.
■ M - is the number of codewords.
■ d - is the minimum distance of two codewords i
IV054 1. Basics of coding theory and
NOTATIONS and EXAMPLES
Notation: An (/i, M, c/)-code C is a code such that
■ n - is the length of codewords.
■ M - is the number of codewords.
■ d - is the minimum distance of two codewords in C.
Example:
CI = {00,01,10,11} is a (2,4,l)-code.
IV054 1. Basics of coding theory and linear codes
33/77
NOTATIONS and EXAMPLES
Notation: An (/i, M, c/)-code C is a code such that
■ n - is the length of codewords.
■ M - is the number of codewords.
■ d - is the minimum distance of two codewords in C.
Example:
CI = {00,01,10,11} is a (2,4,l)-code. C2 = {000,011,101,110} is a (3,4,2)-code.
IV054 1. Basics of coding theory and linear codes
33/77
NOTATIONS and EXAMPLES
Notation: An (/i, M, c/)-code C is a code such that
■ n - is the length of codewords.
■ M - is the number of codewords.
■ d - is the minimum distance of two codewords in C.
Example:
CI = {00,01,10,11} is a (2,4,l)-code.
C2 = {000,011,101,110} is a (3,4,2)-code.
C3 = {00000, 01101,10110,11011} is a (5,4,3)-code.
IV054 1. Basics of coding theory and linear cod
NOTATIONS and EXAMPLES
Notation: An (/i, M, c/)-code C is a code such that
■ n - is the length of codewords.
■ M - is the number of codewords.
■ d - is the minimum distance of two codewords in C.
Example:
CI = {00,01,10,11} is a (2,4,l)-code.
C2 = {000,011,101,110} is a (3,4,2)-code.
C3 = {00000, 01101,10110,11011} is a (5,4,3)-code.
Comment: A good (/i, M, d)-code has small n, large M and also large d.
IV054 1. Basics of coding theory and linear codes
33/77
EXAMPLES from DEEP SPACE TRAVELS
IV054 1. Basics of coding theory and linear codes
EXAMPLES from DEEP SPACE TRAVELS
Examples (Transmission of photographs from the deep space)
IV054 1. Basics of coding theory and linear codes
EXAMPLES from DEEP SPACE TRAVELS
Examples (Transmission of photographs from the deep space)
■ In 1965-69 Mariner 4-5 probes took the first photographs of another planet - 22 photos. Each photo was divided into 200 x 200 elementary squares - pixels. Each pixel was assigned 6 bits representing 64 levels of brightness, and so called Hadamard code was used.
IV054 1. Basics of coding theory and linear codes
34/77
EXAMPLES from DEEP SPACE TRAVELS
Examples (Transmission of photographs from the deep space)
■ In 1965-69 Mariner 4-5 probes took the first photographs of another planet - 22 photos. Each photo was divided into 200 x 200 elementary squares - pixels. Each pixel was assigned 6 bits representing 64 levels of brightness, and so called Hadamard code was used.
Transmission rate was 8.3 bits per second.
IV054 1. Basics of coding theory and linear codes
34/77
EXAMPLES from DEEP SPACE TRAVELS
Examples (Transmission of photographs from the deep space)
■ In 1965-69 Mariner 4-5 probes took the first photographs of another planet - 22 photos. Each photo was divided into 200 x 200 elementary squares - pixels. Each pixel was assigned 6 bits representing 64 levels of brightness, and so called Hadamard code was used.
Transmission rate was 8.3 bits per second.
■ In 1970-72 Mariners 6-8 took such photographs that each picture was broken into 700 x 832 squares. So called Reed-MuHer (32,64,16) code was used.
IV054 1. Basics of coding theory and linear codes
34/77
EXAMPLES from DEEP SPACE TRAVELS
Examples (Transmission of photographs from the deep space)
■ In 1965-69 Mariner 4-5 probes took the first photographs of another planet - 22 photos. Each photo was divided into 200 x 200 elementary squares - pixels. Each pixel was assigned 6 bits representing 64 levels of brightness, and so called Hadamard code was used.
Transmission rate was 8.3 bits per second.
■ In 1970-72 Mariners 6-8 took such photographs that each picture was broken into 700 x 832 squares. So called Reed-MuHer (32,64,16) code was used.
Transmission rate was 16200 bits per second. (Much better quality pictures could be received)
HADAMARD CODE
In Mariner 5, 6-bit pixels were encoded using 32-bit long Hadamard code that could correct up to 7 errors.
IV054 1. Basics of coding theory and linear codes
35/77
HADAMARD CODE
In Mariner 5, 6-bit pixels were encoded using 32-bit long Hadamard code that could correct up to 7 errors.
Hadamard code has 64 codewords. 32 of them are represented by the 32 x 32 matrix H = {hu}, where 0 < /, j < 31 and
fa.j — ^_-^^aobo+al^l + ---+a4^4
IV054 1. Basics of coding theory and linear codes
35/77
HADAMARD CODE
In Mariner 5, 6-bit pixels were encoded using 32-bit long Hadamard code that could correct up to 7 errors.
Hadamard code has 64 codewords. 32 of them are represented by the 32 x 32 matrix H = {hu}, where 0 < /, j < 31 and
where i and j have binary representations
IV054 1. Basics of coding theory and linear codes
35/77
HADAMARD CODE
In Mariner 5, 6-bit pixels were encoded using 32-bit long Hadamard code that could correct up to 7 errors.
Hadamard code has 64 codewords. 32 of them are represented by the 32 x 32 matrix H = {hu}, where 0 < /, j < 31 and
where i and j have binary representations
The remaining 32 codewords are represented by the matrix —H.
IV054 1. Basics of coding theory and linear codes
35/77
HADAMARD CODE
In Mariner 5, 6-bit pixels were encoded using 32-bit long Hadamard code that could correct up to 7 errors.
Hadamard code has 64 codewords. 32 of them are represented by the 32 x 32 matrix H = {hu}, where 0 < /, j < 31 and
where i and j have binary representations
/ = 3433323130, j = 6463626160
The remaining 32 codewords are represented by the matrix —H. Decoding was quite simple.
IV054 1. Basics of coding theory and linear codes
35/77
CODES RATES
For qr-nary (/i, M, c/)-code C we define the code rate, or information rate, Rc, by
Rc =
n
IV054 1. Basics of coding theory and linear codes
36/77
CODES RATES
For qr-nary (/i, M, c/)-code C we define the code rate, or information rate, Rc, by
R = IggM
The code rate represents the ratio of the number of needed input data symbols to the number of transmitted code symbols.
IV054 1. Basics of coding theory and linear codes
36/77
For qr-nary (/i, M, c/)-code C we define the code rate, or information rate, Rc, by
The code rate represents the ratio of the number of needed input data symbols to the number of transmitted code symbols.
If a q-nary code has code rate R, then we say that it transmits R q-symbols per a channel use - or R is a number of bits per a channel use (box) - in the case of binary alphabet.
IV054 1. Basics of coding theory and linear codes
36/77
For qr-nary (/i, M, c/)-code C we define the code rate, or information rate, Rc, by
The code rate represents the ratio of the number of needed input data symbols to the number of transmitted code symbols.
If a q-nary code has code rate R, then we say that it transmits R q-symbols per a channel use - or R is a number of bits per a channel use (box) - in the case of binary alphabet.
Code rate (6/32 for Hadamard code), is an important parameter for real implementations, because it shows what fraction of the communication bandwidth is being used to transmit actual data.
IV054 1. Basics of coding theory and linear codes
36/77
The ISBN-code I
Each book till 1.1.2007 had linternational Sstandard BOOK Number whi 10-digit codeword produced by the publisher with the following structure
IV054 1. Basics of coding theory and linear codes
The ISBN-code I.
Each book till 1.1.2007 had linternational Sstandard BOOK Number which was a 10-digit codeword produced by the publisher with the following structure:
/ p m w = xi... xio
language publisher number weighted check sum
0 07 709503 0
such that
IV054 1. Basics of coding theory and linear codes
37/77
The ISBN-code I.
Each book till 1.1.2007 had linternational Sstandard BOOK Number which was a 10-digit codeword produced by the publisher with the following structure:
/ p m w = xi... xio
language publisher number weighted check sum
0 07 709503 0
such that El=i(n - '>/ = 0 (modll)
The publisher has to put xio = X if xio is to be 10.
IV054 1. Basics of coding theory and linear codes
37/77
Each book till 1.1.2007 had linternational Sstandard BOOK Number which was a 10-digit codeword produced by the publisher with the following structure:
/ p m w = xi... xio
language publisher number weighted check sum
0 07 709503 0
such that £/=i(n - />/ = 0 {modll)
The publisher has to put xio = X if xio is to be 10.
The ISBN code was designed to detect: (a) any single error (b) any double error created by a transposition
IV054 1. Basics of coding theory and linear codes
37/77
EQUIVALENCE of CODES
EQUIVALENCE of CODES
Definition Two g-ary codes are called equivalent if one can be obtained from the other by a combination of operations of the following type:
IV054 1. Basics of coding theory and linear codes
38/77
EQUIVALENCE of CODES
Definition Two g-ary codes are called equivalent if one can be obtained from the other by a combination of operations of the following type:
[@ a permutation of the positions of the code.
IV054 1. Basics of coding theory and linear codes
38/77
EQUIVALENCE of CODES
Definition Two g-ary codes are called equivalent if one can be obtained from the other by a combination of operations of the following type:
[@ a permutation of the positions of the code.
93 a permutation of symbols appearing in a fixed position.
IV054 1. Basics of coding theory and linear codes
38/77
EQUIVALENCE of CODES
Definition Two g-ary codes are called equivalent if one can be obtained from the other by a combination of operations of the following type:
[@ a permutation of the positions of the code.
93 a permutation of symbols appearing in a fixed position.
Question: Let a code be displayed as an M x n matrix. To what correspond operations (a) and (b)?
IV054 1. Basics of coding theory and linear codes
38/77
EQUIVALENCE of CODES
Definition Two g-ary codes are called equivalent if one can be obtained from the other by a combination of operations of the following type:
[@ a permutation of the positions of the code.
93 a permutation of symbols appearing in a fixed position.
Question: Let a code be displayed as an M x n matrix. To what correspond operations (a) and (b)?
Claim: Distances between codewords are unchanged by operations (a), (b). Consequently, equivalent codes have the same parameters (n,M,d) (and correct the same number of errors).
IV054 1. Basics of coding theory and linear codes
38/77
EQUIVALENCE of CODES
Definition Two g-ary codes are called equivalent if one can be obtained from the other by a combination of operations of the following type:
[@ a permutation of the positions of the code.
93 a permutation of symbols appearing in a fixed position.
Question: Let a code be displayed as an M x n matrix. To what correspond operations (a) and (b)?
Claim: Distances between codewords are unchanged by operations (a), (b). Consequently, equivalent codes have the same parameters (n,M,d) (and correct the same number of errors).
Examples of equivalent codes
(1) <
(0
0
1 1
0
0
1 1
1
0
1
0
0
1 1
0
0}
1 1
0
> <
fo
0
1 1
0
1
0
1
0
1 1
0
0
0
1 1
0}
1
0
1
>
IV054 1. Basics of coding theory and linear codes
38/77
EQUIVALENCE of CODES
Definition Two g-ary codes are called equivalent if one can be obtained from the other by a combination of operations of the following type:
[@ a permutation of the positions of the code.
93 a permutation of symbols appearing in a fixed position.
Question: Let a code be displayed as an M x n matrix. To what correspond operations (a) and (b)?
Claim: Distances between codewords are unchanged by operations (a), (b). Consequently, equivalent codes have the same parameters (n,M,d) (and correct the same number of errors).
Examples of equivalent codes
(1)
0
1 1 0
0
1
2
0
1
0
1
1
2 0
0} 1
0
1
>
IV054 1. Basics of coding theory and linear codes
38/77
EQUIVALENCE of CODES
Definition Two g-ary codes are called equivalent if one can be obtained from the other by a combination of operations of the following type:
[@ a permutation of the positions of the code.
93 a permutation of symbols appearing in a fixed position.
Question: Let a code be displayed as an M x n matrix. To what correspond operations (a) and (b)?
Claim: Distances between codewords are unchanged by operations (a), (b). Consequently, equivalent codes have the same parameters (n,M,d) (and correct the same number of errors).
Examples of equivalent codes
(1)
0
1 1 0
0
1
2
0
1
0
1
1
2 0
0} 1
0
1
>
Lemma Any qr-ary (/i, M, c/)-code over an alphabet {0,1,..., q — 1} is equivalent to an (/i, M, c/)-code which contains the all-zero codeword 00 ... 0. Proof Trivial.
IV054 1. Basics of coding theory and linear codes
38/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
IV054 1. Basics of coding theory and linear codes
39/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
39/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
Notation: Aq(n, d) is the largest M such that there is an q-nary (n, M, d)-code.
39/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
Notation: Aq(n, d) is the largest M such that there is an c/-nary (n, M, d)-code.
Theorem
m Aq(n,l) = qn\ [B Aq(n, n) = q.
39/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
Notation: Aq(nJ d) is the largest M such that there is an c/-nary (n, /V/, d)-code.
Theorem
m Aq(n,l) = qn\ [B Aq(n, n) = q.
Proof
39/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
Notation: Aq(n, d) is the largest M such that there is an q-nary (/i, M, d)-code.
Theorem m A^nl)
m Aq(n, n)
Proof
M First claim is obvious;
39/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
Notation: Aq(n, d) is the largest M such that there is an q-nary (n, M, d)-code.
Theorem m Aq^^ = qn.
[B Aq(n, n) = q.
Proof
[@ First claim is obvious;
H3 Let C be an o;-nary (/i, M, n)-code.
39/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
Notation: Aq(n, d) is the largest M such that there is an q-nary (/i, M, c/)-code.
Theorem a Aq{rijl) = qn.
H3 Aq(n, n) = q.
Proof
[@ First claim is obvious;
93 Let C be an qr-nary (/i, M, /i)-code. Any two distinct codewords of C have to differ in all n positions.
IV054 1. Basics of coding theory and linear codes
39/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
Notation: Aq(n, d) is the largest M such that there is an q-nary (/i, M, c/)-code.
Theorem a Aq{rijl) = qn.
H3 Aq(n, n) = q.
Proof
[@ First claim is obvious;
93 Let C be an qr-nary (/i, M, /i)-code. Any two distinct codewords of C have to differ in all n positions. Hence symbols in any fixed position of M codewords have to be different.
IV054 1. Basics of coding theory and linear codes
39/77
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
Notation: Aq(n, d) is the largest M such that there is an q-nary (/i, M, c/)-code.
Proof
[@ First claim is obvious;
[G Let C be an q-nary (/i, M, n)-code. Any two distinct codewords of C have to differ in all n positions. Hence symbols in any fixed position of M codewords have to be different. Therefore ^> Aq(n, n) < q.
Theorem
M Aq(n,l) m Aq(n, n)
q
n.
IV054 1. Basics of coding theory and linear codes
39/77
THE MAIN CODING THEORY PROBLEM
A good (/i, M, d)-code should have a small n, large M and large d.
The main coding theory problem is to optimize one of the parameters n, M, d for given values of the other two.
Notation: Aq(n, d) is the largest M such that there is an q-nary (/i, M, c/)-code.
Proof
[@ First claim is obvious;
93 Let C be an qr-nary (/i, M, /i)-code. Any two distinct codewords of C have to differ in all n positions. Hence symbols in any fixed position of M codewords have to be different. Therefore ^> Aq(n, n) < q. Since the q-nary repetition code is (/i, q, /i)-code, we get Aq(n, n) > q.
Theorem
M Aq{n,l) H3 Aq(n,n)
n.
39/77
A SPHERE and its VOLUME
Notation - is a set of all words of length n over the alphabet {0,1,2,..., q — 1}
IV054 1. Basics of coding theory and linear codes
40/77
Notation Fq - is a set of all words of length n over the alphabet {0,1, 2,..., q — 1} Definition For any codeword u G Fq and any integer r > 0 the sphere of radius r and centre u is denoted by
S(u, r) = {v eFnq\h{u, v)