Abstract
In the areas of Computer Science and Telecommunications there is a huge amount of applications in which error control, error detection and error correction are crucial tools to enable reliable delivery of digital data over unreliable communication, thus providing quality of service. Hadamard matrices can almost directly be used as an error-correcting code using an Hadamard code, generalized in Reed-Muller codes. Advances in algebraic design theory by using deep connections with algebra, finite geometry, number theory, combinatorics and optimization provided a substantial progress on exploring Hadamard matrices. Their construction and its use on combinatorics are crucial nowadays in diverse fields such as: quantum information, communications, networking, cryptography, biometry and security. Hadamard matrices give rise to a class of block designs named Hadamard configurations and different applications of it based on new technologies and codes of figures such as QR Codes are present almost everywhere. Some connections to Balanced Incomplete Block Designs are very well known as a tool to solve emerging problems in these areas. We will explore the use of Hadamard matrices on QR Codes error detection and correction. Some examples will be provided.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Hadamard Matrices
An HadamardFootnote 1 matrix is a square matrix H n of order n with entries ± 1 and whose rows (or columns vice versa) are mutually orthogonal, see Seberry [24]. If H n is Hadamard matrix, then \({\mathbf {H}}_n{\mathbf {H}}_n^\top = n{\mathbf {I}}_n\). An Hadamard matrix remains so when any row or column is multiplied by − 1. Having this into consideration, one can always write an Hadamard matrix with its first row and first column having only + 1’s, that it is the normal form of an Hadamard matrix, see Sylvester [26].
If H n exists for n = 1, then H 2 can be written like the one below:
More examples of Hadamard matrices:
The necessary condition for the existence of an Hadamard matrix H n, n > 2 is that n ≡ 0(mod4); more about this can be found on Hall [8]. Hadamard matrices for all permissible values of n ≤ 100, with the exception of n = 92 can be found on Plackett and Burman [18]. Only later on Baumert et al. [1] presented an Hadamard matrix of order 92.
According to Hedayat and Wallis [9] and to Sawade [23] Hadamard matrices have their existence confirmed for all permissible values of n ≤ 424.
If H m and H n are Hadamard matrices of orders m and n, respectively, then their tensor product H m ⊗H n is an Hadamard matrix of order mn, where ⊗ denotes the Kronecker matrix product. So, in particular, an Hadamard matrix H n of order n where n = 2s and s ≥ 2 is an integer can be built by taking the s-fold tensor product of H 2 with itself, as it is given below:
Hadamard matrices are very well known because of the wide range of applications, not only in several areas of mathematics, but also in other sciences and mainly those connected with new technological advances, like cryptography Ogata et al. [15], image analysis, signal processing, coding theory and algorithm design, see e.g. Francisco [6]. In Statistics, Combinatorial Designs and Experimental design the Hadamard matrices play a key role in the block design construction. We refer to Din and Mavron [5] and to Koukouvinos [11] where one can see how these matrices are useful for the construction of BIBD (balanced incomplete block design)—see Sect. 2—, and for designs and secret sharing schemes, respectively.
2 Relationship Between Hadamard Matrices and BIBD
Consider now an Hadamard matrix H 4u, which without loss of generality is assumed to be in its normal form. Delete from H 4u, its first row and first column of all ones, thus obtaining a matrix A of order (4u − 1) × (4u − 1).
Taking A we can define \(\mathbf {N} = \frac {1}{2} \left ( \mathbf {A} + {\mathbf {J}}_{4u-1} \right )\), where \({\mathbf {J}}_u = {\mathbf {1}}_u {\mathbf {1}}_u^\top \).
This means that N is obtained from A, by replacing the − 1’s in A by zero and keeping + 1’s unaltered. Then, it is easy to see that N is the incidence matrix of a balanced incomplete block design (BIBD) with parameters:
as presented by Yates, see [28], in his agriculture experiments, where these parameters would stand for v varieties in b blocks of size k, so that each variety occurs exactly r times along the blocks and every pair of varieties concurs in exactly λ blocks, see Raghvarao [19].
Conversely, if N is the incidence matrix of a BIBD with parameters given by (1), then by replacing the 0’s in N by − 1 and bordering the resultant matrix by a row and column of all ones, one gets an Hadamard matrix of order 4u.
We thus have the following theorem
Theorem 1
The existence of an Hadamard matrix of order 4u is equivalent to the existence of a BIBD with parameters given by (1).
Example 1
Consider an Hadamard matrix H 16 which can be obtained by forming the tensor product H 4 ⊗H 4, where H 4 is as below:
Following the construction method described above, we get a solution of a BIBD with parameters v = 15 = b, r = 7 = k, λ = 3.
A review of several construction methods to synthesize these matrices was presented by Oliveira [16, 17], namely Paley Matrices, Sylvester Matrices and Kronecker recursive product. We also refer to Stinson [25] and Cameron [4], as well as to the webpage
http://mathworld.wolfram.com/HadamardMatrix.html
for more examples of such matrices.
Now consider the BIBD (7,7,3,3,1) and the BIBD(13,13,4,4,1). If we add a row and a column of 1’s, and if we replace all the null entrances in the matrix by (1), we obtain the following Hadamard matrices:
Sometimes in the literature Hadamard matrices are represented by a square in black and white, as we can have for our examples. Using this form, in figures, see Figs. 1 and 2, we present Hadamard matrices corresponding to the BIBD(7,7,3,3,1) and BIBD (13,13,4,4,1), from [16, 17].
3 BIBD and R Project for Statistical Computing
As stated before, a BIBD is an arrangement of v treatments (varieties) in b blocks, each of size k(< v), where each variety occurs exactly r times and every pair of varieties concurs in exactly λ blocks. The necessary, but not sufficient conditions for the existence of a BIBD are:
In order to generate BIBD with the aid of the computational statistical program ‘R’, we can use the extra ‘package’, ‘crossdes’. This ‘package’ includes several functions that assist in building balanced designs. Each BIBD produced with the aid of this ‘package’ has five parameters described above. To install the ‘package’ the command ‘install.packages (“crossdes”)’ is used. To load the ‘package’ in order to be able to use the functions contained herein, the command ‘library (“crossdes”)’ is used. The ‘find.BIB’ function is used to generate a block design with a specific number of treatments, blocks (which correspond to the lines of the generated design) and elements per block (corresponding to the columns of the generated design). It is also possible to use another function to test if the generated design meets the conditions to be a BIBD. For instance, to create a design with five treatments in four blocks of three elements the function is as follows (Fig. 3):
> find.BIB(5, 4, 3)
The corresponding ‘R’ output is:
The resulting structure is not a BIBD because the treatments are not all repeated the same number of times. This observation can be confirmed by using the ‘isGYD’ function as follows: ‘isGYD (find.BIB (5, 4, 3))’. The result of executing this function in ‘R’ is (Fig. 4):
Consider now another example, this time with seven treatments and seven blocks of three elements (Fig. 5):
It is confirmed through the use of the ‘isGYD’ function that this experimental design is indeed a BIBD:
Another useful ‘package’ to generate outlines designs for BIBDs is the ‘dae’. As the one above, this package has several different functions targeted to aid in obtaining experimental designs. The following example illustrates the use of one of the features of “dae”, the “fac.layout” to generate an experiment of BIBD consisting of randomized factors (Fig. 6):
A page from CRAN—The Comprehensive R Archive Network—aggregates all the existing information about the various ‘packages’ related to experimental design with the aid of the ‘R’. This page can be found at the url: http://cran.r-project.org/web/views/ExperimentalDesign.html.
This page presents first the general-purpose packages and proceeds with those that perform more specific tasks such as the ones used in the design of experiments for agriculture, industry and clinical trials among others (Fig. 7).
4 Application of Hadamard Matrices to Error Correction
Reed–Muller codes, see Reed [20] and Muller [14], are a family of linear error-correcting codes that were first used in communications.
Special cases of Reed–Muller codes include the Hadamard code, the Walsh–Hadamard code and the Reed–Solomon code, see Wicker and Bhargava [27].
The Hadamard code is an error-correcting code that is used for error detection and correction when transmitting messages over very noisy or unreliable channels. A famous application of the Hadamard code was the NASA space probe Mariner 9 in 1971, where the code was used to transmit photos of Mars.
Generalized Hadamard codes are obtained from an n × n Hadamard matrix H. In particular, the 2n codewords of the code are the rows of H and the rows of H. To obtain a code over the alphabet {0, 1}, the mapping 1↦1, 1↦0, or, equivalently, x↦(1x)∕2, is applied to the matrix elements. That the minimum distance of the code is n∕2 follows from the defining property of Hadamard matrices, namely that their rows are mutually orthogonal.
To get the punctured Hadamard code with n = 2k−1 the chosen Hadamard matrix H has to be of Sylvester type, see [13], which gives rise to a message length of log2(2n) = k.
Quick response codes (QR-Codes) contain codewords that are 8 bits long and use the Reed–Solomon error correction algorithm with four different error correction levels. It is well known that higher the error correction level, the less the available storage capacity there is.
The Reed-Solomon algorithm was created by Irving Reed and Gustave Solomon, both engineers at MIT’s Lincoln Labs, and their work, see Reed and Solomon [21], led to the extent of and later on used with the creation of the QR code in 1994 for the Japanese automotive industry by Denso Wave, a subsidiary that produces automatic identification products.
Since its debut a long way was overcome and the amount of information that a QR code may store is massive. The four levels of security, that include redundant information, may go up to 30%, allowing the retrieval of information even when the QR code is damaged and thus giving space for error correction.
Below some examples of the relation between QR codes and information capacity (Figs. 8, 9 and 10).
Crossing the level of information redundant and the number of characters, Version 1, will allow 41 characters at his lowest and 17 on its highest level. Version 40 allows 7089 numerical characters.
Reed-Solomon codes are of the same family of error correcting codes as the Hadamard codes. The rows of a k × v generating matrix, for a generalized Reed-Solomon code GR k(c, 1), where c = (1, c, …, c v−1) for some c ∈ GF(q), of order v, are rows of a cocyclic matrix. For v = p, an odd prime number, the resulting Reed-Solomon codes are cocyclic Hadamard codes. So Reed-Solomon codes are closely related to Hadamard matrices as well.
5 Biometry
In information technology, biometrics refers technologies to identify human body characteristics, such as fingerprints and iris, see Jain et al. [10]. However, there is a tremendous amount of research that demonstrates biometrics can be easily faked. There are several examples on the Internet on how to make false fingerprints or forge iris images, big companies like Facebook are making efforts to develop both hardware tokens and software-based authentication for their social network. Software code generation like QR Codes seem to offer a preferable solution, rather than biometric recognition, thanks to their mathematical properties, see Gonçalves [7].
Gregg Stefancik, a Facebook engineer has stated in an interview that he would like his company to eventually move away from using passwords, but opposes the use of biometrics. However biometrics security can be leveraged with a two-factor authentication solution, ensuring that alphanumeric passwords or generated codes enter the authentication steps, see Anongporn [22]. A combination of voice recognition based, for example, on a phrase, along with a generated QR Code is an extremely strong authentication solution, see Lakshmanaswamy et al. [12].
Lumidigm, an ATM manufacturer, is already using this principle on their machines. Their ATMs use biometrics and QR Codes for secure cash withdrawals.
6 Considerations and Remarks
The QR Codes are 2-dimensional bar codes that can be easily read by a device capable of image capture, as is the case of most existing mobile phones. These codes can represent text, an address for a web site (URL), a phone number, a geo-referenced location, an email, a contact or an SMS.
QR codes have, as the base of their error correcting structure, Hadamard matrices. The mathematical properties jointly with the new technological advances allow simple figures to contain and transmit a huge amount of information. The mathematical properties that are intrinsic to these structures will allow great advances for error detection and correction, in huge amounts of information. Potential developments using well-studied properties of randomized block designs, namely with Orthogonal Block Designs, see, e.g., Calinski and Kageyama [2] and Calinski and Kageyama [3], will create a vast spectrum of research (Fig. 11).
Notes
- 1.
Jacques Hadamard (1865–1963).
References
Baumert, L. D., Golomb, S. W., & Hall, Jr., M. (1962). Discovery of an Hadamard matrix of order 92. Bulletin of the American Mathematical Society, 68(3), 237–238.
Caliński, T., & Kageyama, S. (2000). Block designs: A randomization approach. Vol. I: Analysis. Lecture Notes in Statistics (p. 150). Berlin: Springer.
Caliński, T., & Kageyama, S. (2003). Block designs: A randomization approach. Vol. II: Design. Lecture Notes in Statistics (p. 170). Berlin: Springer.
Cameron, P. J. (2006). Hadamard matrices in The Encyclopaedia of Design Theory at http://www.maths.qmul.ac.uk/~leonard/designtheory.org/library/encyc/.
Din S. U., & Mavron V. C. (1984). On designs constructed from Hadamard matrices. Proceedings of the London Mathematical Society, 49, 274–288.
Francisco, C. (2014). Experimental Design in Incomplete Blocks: Particular Case Studies. Master Thesis. Open University. Lisbon. Portugal.
Gonçalves, R. M. P. (2015). Handwritten signature authentication using motion detection and QRCodes. Master Thesis on Computers Sciences. Porto University.
Hall, Jr, M. (1986). Combinatorial theory, 2nd edn. New York: Wiley.
Hedayat, A., & Wallis, W. D. (1978). Hadamard matrices and their applications. Annals of Statistics, 6(6), 1184–1238.
Jain, A., Hong, L., & Pankanti, S. (2000). Biometric identification. Communications of the ACM, 43(2), 91–98. https://doi.org/10.1145/328236.328110
Koukouvinos C., Simos, D. E., & Varbanov, Z. (2011). Hadamard matrices, designs and the secret- sharing schemes. CAI11 Proceedings of the forth International Conference on Algebraic Informatics, 216–229.
Lakshmanaswamy, K., Das Gupta, D., Toppo N. S., & Senapati, B. (2014). Multi-layered security by embedding biometrics in quick response (QR) codes. International Journal of Engineering Research & Technology, 3(4). e-ISSN: 2278-0181.
Mitrouli, M. (2014). Sylvester Hadamard matrices revisited. Special Matrices, 2, 120–124.
Muller, D. E. (1954). Application of boolean algebra to switching circuit design and to error detection. IRE Transactions on Electronic Computers, 3, 6–12.
Ogata, W., Kurosawa, K., Stinson, D., & Saido H. (2004). New combinatorial designs and their applications to authentication codes and secret sharing schemes. Discrete Mathematics, 279, 383–405
Oliveira, T. A. (2010). Planos em Blocos Incompletos Equilibrados e Parcialmente Equilibrados (BIB e PBIB Designs): Na fronteira entre a Estatística e a Matemática, Actas da ENSPM 2010, 8–10 Julho de 2010, Escola Superior de Tecnologia e Gestão, Instituto Politécnico de Leiria.
Oliveira, T. A. (2011). Exploring the links between the BIBD and PBIBD and mathematics. In D. Hampel, J. Hartmann & J. Michálek (Eds.) Biometric Methods and Models in Current Science and Research. Proceedings of XIXth. Summer School of Biometrics 6-10.9.2010. Faculty of Horticulture of Mendel University, Lednice, República Checa (pp. 183–194) Brno: Central Institute of Supervising and Testing in Agriculture.
Plackett, R. L., & Burman, J. P. (1946). The design of optimum multifactorial experiments. Biometrika, 33(4), 305–325.
Raghvarao, D. (1971). Constructions and combinatorial problems in design of experiments. New York: Wiley.
Reed, I. S. (1954). A class of multiple-error-correcting codes and the decoding scheme. Transactions of the IRE Professional Group on Information Theory, 4, 38–49.
Reed, I. S., & Solomon, G. (1960). Polynomial codes over certain finite fields. Journal of the Society for Industrial and Applied Mathematics, 8(2), 300–304.
Salaiwarakul, A. (2010). Verification of secure biometric authentication protocols. Ph.D. thesis. Birmingham: University of Birmingham.
Sawade, K. (1985). A Hadamard matrix of order-268. Graphs Combinatorics, 1, 185–187.
Seberry, J. (2012). Hadamard matrices. University of Wollongong.
Stinson, D. R. (2004). Combinatorial designs – constructions and analysis. Berlin: Springer.
Sylvester, J. J. (1867). Thoughts on inverse orthogonal matrices, simultaneous sign successions, and tessellated pavements in two or more colours, with applications to Newton’s rule, ornamental tile-work, and the theory of numbers. Philosophical Magazine, 34, 461–475.
Wicker, S. B., Bhargava, V. K. (1999). Reed-Solomon codes and their applications. Hoboken: Wiley-IEEE Press. ISBN: 978-0-7803-5391-6.
Yates, F. (1936). Incomplete randomized blocks. Annals of Eugenics, 7, 121–140.
Acknowledgements
This research was partially sponsored by national funds through the FCT—Fundação para a Ciência e Tecnologia, Portugal—FCT under the project PEst-OE/MAT/UI0006/2013 (CEAUL).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Francisco, C., Oliveira, T.A., Oliveira, A., Carvalho, F. (2019). Hadamard Matrices on Error Detection and Correction: Useful Links to BIBD. In: Ahmed, S., Carvalho, F., Puntanen, S. (eds) Matrices, Statistics and Big Data. IWMS 2016. Contributions to Statistics. Springer, Cham. https://doi.org/10.1007/978-3-030-17519-1_8
Download citation
DOI: https://doi.org/10.1007/978-3-030-17519-1_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-17518-4
Online ISBN: 978-3-030-17519-1
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)