On the Equivalence Classes of Recoverable Patterns in DR Code: A Group-Theoretic Analysis with Applications to Storage Optimization
Abstract
1. Introduction
Symmetry as the Organizing Principle
2. Background and Related Work
2.1. Two-Dimensional Barcodes
2.2. Error Correction in Barcodes
2.3. Group-Theoretic Analysis of Combinatorial Structures
2.4. The Dihedral Group D4 and Cyclic Groups
2.5. Latin Squares and Frequency Squares
3. Problem Formulation
4. Exhaustive Enumeration of Recoverable Templates
4.1. Enumeration Algorithm
| Algorithm 1: DR Code Pattern Enumerator |
| Input: the nine logical blocks Σ = {A0,…,C2} with class function cls(·) Output: the set V of all recoverable templates 1. V ← ∅ 2. for each permutation r = (r0,…,r8) of {0,…,8} do 3. template π ← place block index ri at cell (i mod 3, ⌊i/3⌋) 4. valid ← true 5. for each of the three rows and three columns L do 6. if {cls(π(L1)), cls(π(L2)), cls(π(L3))} ≠ {A,B,C} then 7. valid ← false; break 8. if valid then V ← V ∪ {π} 9. return V |
4.2. Result
5. Structural Symmetry Theorems
5.1. Mirror Reflection
5.2. Vertical Flip
5.3. Tetris Rotation
5.4. Cyclic Column Rotation
5.5. Cyclic Row Rotation
6. Group Structure and Equivalence Classes
6.1. The Symmetry Group G
Group Structure
6.2. Orbit Analysis
Equivalence Classes
6.3. Practitioner-Friendly D4 View
6.4. Why the Semi-Direct Product Structure?
6.5. Verification by Burnside’s Lemma
7. Practical Applications of the Symmetry Framework
7.1. Compact Equivalence-Class Encoding
Encoding Scheme
7.2. Constant-Time Validity Oracle
Oracle Algorithm
7.3. Randomized DR Code for Anti-Cloning Security
7.4. Empirical Validation
8. Discussion and Applications
8.1. Cloud and Embedded Storage
8.2. Memory-Cache Locality
8.3. Limitations
8.4. Comparison with QR Code Recovery Geometry
8.5. Implementation Notes for DR15.py
8.6. Future Work
9. Conclusions
10. Patents
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Sriphum, W. DR Code: The Two Dimensions Barcode Supporting High Rate Data Recovery. In Proceedings of the IEEE 16th International Conference on Computational Science and Engineering (CSE), Sydney, Australia, 3–5 December 2013; pp. 1214–1219. [Google Scholar] [CrossRef]
- Soon, T.J. QR Code. Synth. J. 2008, 59–78. [Google Scholar]
- Li, L.; Qiu, J.; Lu, J.; Chang, C.-C. An aesthetic QR code solution based on error correction mechanism. J. Syst. Softw. 2016, 116, 85–94. [Google Scholar] [CrossRef]
- ISO/IEC 18004:2015; Information Technology—Automatic Identification and Data Capture Techniques—QR Code Bar Code Symbology Specification. International Organization for Standardization: Geneva, Switzerland, 2015.
- Wikipedia, MaxiCode. Available online: https://en.wikipedia.org/wiki/MaxiCode (accessed on 13 July 2026).
- RACO Industries. QR Code Barcode Generator, 2013. Available online: https://www.barcodesinc.com/generator/qr/ (accessed on 13 July 2026).
- Parikh, D.; Jancke, G. Localization and Segmentation of a 2D High Capacity Color Barcode. In Proceedings of the IEEE Workshop on Applications of Computer Vision (WACV), Copper Mountain, CO, USA, 7–9 January 2008; pp. 1–6. [Google Scholar]
- Bulan, O.; Monga, V.; Sharma, G. High capacity color barcodes using dot orientation and color separability. In Proceedings of the SPIE Media Forensics Security XI, San Jose, CA, USA, 18–22 January 2009; Volume 7254, pp. 725417-1–725417-7. [Google Scholar]
- Fang, Y.; Peng, Y. The design and implementation of two-dimensional barcode identification in smartphone. In Proceedings of the Internation Conference on Computer Application and System Modeling (ICCASM), Taiyuan, China, 22–24 October 2010; Volume 7. [Google Scholar]
- Tan, A.K.T.; Chai, D. Improving mobile color 2D-barcode JPEG image readability using DCT coefficient distributions. In Proceedings of the International Conference on Audio, Language and Image Processing (ICALIP), Shanghai, China, 16–18 July 2012. [Google Scholar]
- Belussi, L.F.F.; Hirata, N.S.T. Fast QR code detection in arbitrarily acquired images. In Proceedings of the SIBGRAPI, Alagoas, Brazil, 28–31 August 2011; pp. 281–288. [Google Scholar]
- Querini, M.; Grillo, A.; Lentini, A.; Italiano, G.F. 2D color barcodes for mobile phones. Int. J. Comput. Sci. Appl. 2011, 8, 136–155. [Google Scholar]
- Yang, Z.; Xu, H.; Deng, J.; Loy, C.C.; Lau, W.C. Robust and fast decoding of high-capacity color QR codes for mobile applications. IEEE Trans. Image Process. 2018, 27, 6093–6108. [Google Scholar] [CrossRef]
- Falas, T.; Kashani, H. Two-dimensional bar-code decoding with camera-equipped mobile phones. In Proceedings of the IEEE International Conference on Pervasive Computing and Communications Workshops, White Plains, NY, USA, 19–23 March 2007; pp. 597–600. [Google Scholar]
- Kato, H.; Tan, K.T. Pervasive 2D Barcodes for Camera Phone Applications. IEEE Pervasive Comput. 2007, 6, 76–85. [Google Scholar] [CrossRef]
- Reed, I.S.; Solomon, G. Polynomial codes over certain finite fields. J. Soc. Ind. Appl. Math. 1960, 8, 300–304. [Google Scholar] [CrossRef]
- Wicker, S.B.; Bhargava, V.K. Reed–Solomon Codes and Their Applications; Wiley-IEEE Press: Hoboken, NJ, USA, 1994. [Google Scholar]
- Patterson, D.A.; Gibson, G.; Katz, R.H. A case for redundant arrays of inexpensive disks (RAID). In Proceedings of the ACM SIGMOD, Chicago, IL, USA, 1–3 June 1988; pp. 109–116. [Google Scholar]
- Chen, P.M.; Lee, E.K.; Gibson, G.A.; Katz, R.H.; Patterson, D.A. RAID: High-performance, reliable secondary storage. ACM Comput. Surv. 1994, 26, 145–185. [Google Scholar] [CrossRef]
- Moreira, J.C.; Farrell, P.G. Essentials of Error-Control Coding; Wiley: Chichester, UK, 2006. [Google Scholar]
- Hou, A.-L.; Yaun, F.; Ying, G. QR code image detection using run-length coding. In Proceedings of the International Conference on Computer Science and Network Technology (ICCSNT), Harbin, China, 24–26 December 2011; Volume 4, pp. 2130–2134. [Google Scholar]
- Sun, M.; Fang, Z.; Fu, L.; Zhao, F. Identification of QR Codes Based on Pattern Recognition. In Proceedings of the World Automation Congress (WAC), Kobe, Japan, 19–23 September 2010; pp. 397–401. [Google Scholar]
- Armstrong, M.A. Groups and Symmetry; Springer: New York, NY, USA, 1988. [Google Scholar]
- Rotman, J.J. An Introduction to the Theory of Groups, 4th ed.; Springer: New York, NY, USA, 1995. [Google Scholar]
- Cameron, P.J. Permutation Groups. In London Mathematical Society Student Texts; Cambridge University Press: Cambridge, UK, 1999; Volume 45. [Google Scholar]
- Stanley, R.P. Enumerative Combinatorics, 2nd ed.; Cambridge University Press: Cambridge, UK, 2011; Volume 1. [Google Scholar]
- Pólya, G.; Read, R.C. Combinatorial Enumeration of Groups, Graphs, and Chemical Compounds; Springer: New York, NY, USA, 1987. [Google Scholar]
- McKay, B.D.; Wanless, I.M. On the number of Latin squares. Ann. Comb. 2005, 9, 335–344. [Google Scholar] [CrossRef]
- Chomsiri, T.; Sriphum, W. DR15.py: Open-Source Enumerator of Recoverable DR Code Templates, GitHub Repository. 2025. Available online: https://github.com/thawatchai2799/2D_DR_Code_20260606_0141.git (accessed on 13 July 2026).








| Templates Surviving | Constraint |
|---|---|
| 362,880 | No constraint (9! permutations) |
| 120,960 | Row 1 has all three classes |
| 31,104 | Rows 1 and 2 valid |
| 10,368 | All three rows valid |
| 5184 | All rows + col 1 valid |
| 2592 | All rows + cols 1, 2 valid |
| 2592 | Full DR Code recoverability (all rows + all cols) |
| Geometric Action | Order | Symbol | Constraint |
|---|---|---|---|
| Reflects about vertical axis | 2 | σ_M | Mirror (left ↔ right) |
| Reflects about horizontal axis | 2 | σ_F | Flip (top ↔ bottom) |
| Rotates the entire 3 × 3 grid | 4 | σ_R | Tetris rotation (90° CW) |
| Shifts columns: 0 → 1 → 2 → 0 | 3 | σ_C | Column-cyclic rotation |
| Shifts rows: 0 → 1 → 2 → 0 | 3 | σ_W | Row-cyclic rotation |
| Number of Equivalence Classes | Orbit Size | Order | Subgroup of G |
|---|---|---|---|
| 1296 | 2 | 2 | ⟨σ_M⟩ (mirror only) |
| 1296 | 2 | 2 | ⟨σ_F⟩ (flip only) |
| 648 | 4 | 4 | ⟨σ_M, σ_F⟩ (mirror + flip) |
| 648 | 4 | 4 | ⟨σ_R⟩ (rotations only) |
| 324 | 8 | 8 | D4 = ⟨σ_M, σ_F, σ_R⟩ |
| 864 | 3 | 3 | ⟨σ_C⟩ (col-cyclic only) |
| 864 | 3 | 3 | ⟨σ_W⟩ (row-cyclic only) |
| 288 | 9 | 9 | C3 × C3 = ⟨σ_C, σ_W⟩ |
| 36 | 72 | 72 | G = (C3 × C3) ⋊ D4 (full) |
| Reduction vs. Naïve | Bytes Per Pattern | Bits Per Pattern | Encoding Method |
|---|---|---|---|
| 1.0× (baseline) | 4.5 | 36 | Naïve (cell-by-cell) |
| 1.9× | 2.38 | 19 | Permutation index in 9! |
| 3.0× | 1.5 | 12 | Pattern index in V (2592) |
| 3.0× | 1.5 | 12 | D4-quotient (324 atoms + 8) |
| 2.8× | 1.62 | 13 | Full-quotient (36 atoms + 72) |
| Preservation Rate | Recoverable Outputs | Recoverable Inputs | Transformation |
|---|---|---|---|
| 100.00% | 2592 | 2592 | Mirror (σ_M) |
| 100.00% | 2592 | 2592 | Flip (σ_F) |
| 100.00% | 2592 | 2592 | Rotate 90° (σ_R) |
| 100.00% | 2592 | 2592 | Rotate 180° (σ_R2) |
| 100.00% | 2592 | 2592 | Rotate 270° (σ_R3) |
| 100.00% | 2592 | 2592 | Column rotate ×1 (σ_C) |
| 100.00% | 2592 | 2592 | Column rotate ×2 (σ_C2) |
| 100.00% | 2592 | 2592 | Row rotate ×1 (σ_W) |
| 100.00% | 2592 | 2592 | Row rotate ×2 (σ_W2) |
| DR Code (This Work) | QR Code (H-Level) | Property |
|---|---|---|
| Bitwise XOR (RAID-5 style) | Reed–Solomon over GF(256) | Error-correction algorithm |
| 33% | 30% | Maximum data recovery rate |
| 6 (any single row or column) | 2 (center-circle, upper row) | Number of damage geometries handled |
| O(n) XOR operations | O(n2) field operations | Computational cost per decode |
| 2592 (this work) | 1 per quality level | Number of distinct valid templates |
| 324 (this work) | 1 | Atomic patterns up to symmetry (D4) |
| 36 (this work) | 1 | Atomic patterns up to full G |
| Yes (13-bit encoding) | Limited | Suitable for embedded/RFID |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Sriphum, W.; Chomsiri, T. On the Equivalence Classes of Recoverable Patterns in DR Code: A Group-Theoretic Analysis with Applications to Storage Optimization. Symmetry 2026, 18, 1255. https://doi.org/10.3390/sym18081255
Sriphum W, Chomsiri T. On the Equivalence Classes of Recoverable Patterns in DR Code: A Group-Theoretic Analysis with Applications to Storage Optimization. Symmetry. 2026; 18(8):1255. https://doi.org/10.3390/sym18081255
Chicago/Turabian StyleSriphum, Wiwat, and Thawatchai Chomsiri. 2026. "On the Equivalence Classes of Recoverable Patterns in DR Code: A Group-Theoretic Analysis with Applications to Storage Optimization" Symmetry 18, no. 8: 1255. https://doi.org/10.3390/sym18081255
APA StyleSriphum, W., & Chomsiri, T. (2026). On the Equivalence Classes of Recoverable Patterns in DR Code: A Group-Theoretic Analysis with Applications to Storage Optimization. Symmetry, 18(8), 1255. https://doi.org/10.3390/sym18081255

