Skip to main content
Log in

A Generalization of Magic Squares with Applications to Digital Halftoning

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract

A semimagic square of order n is an n×n matrix containing the integers 0,…,n 2−1 arranged in such a way that each row and column add up to the same value. We generalize this notion to that of a zero k×k -discrepancy matrix by replacing the requirement that the sum of each row and each column be the same by that of requiring that the sum of the entries in each k×k square contiguous submatrix be the same. We show that such matrices exist if k and n are both even, and do not if k and n are relatively prime. Further, the existence is also guaranteed whenever n=k m, for some integers k,m≥2. We present a space-efficient algorithm for constructing such a matrix.

Another class that we call constant-gap matrices arises in this construction. We give a characterization of such matrices.

An application to digital halftoning is also mentioned.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Aggarwal, A., Klawe, M., Moran, S., Shor, P., Wilber, R.: Geometric applications of a matrix searching algorithm. In: Proc. 2nd ACM Symposium on Computational Geometry, pp. 285–292 (1986)

  2. Asano, T.: Digital halftoning: algorithm engineering challenges. IEICE Trans. Inf. Syst. E86-D(2), 159–178 (2003)

    Google Scholar 

  3. Asano, T., Obokata, K., Katoh, N., Tokuyama, T.: Matrix rounding under the L p -discrepancy measure and its application to digital halftoning. In: Proc. ACM-SIAM Symposium on Discrete Algorithms, San Francisco, pp. 896–904 (2002)

  4. Asano, T., Katoh, N., Obokata, K., Tokuyama, T.: Combinatorial and geometric problems related to digital halftoning. In: Theoretical Foundations of Computer Vision: Geometry, Morphology, and Computational Imaging. Lecture Notes in Comput. Sci., vol. 2616. Springer, New York (2003)

    Google Scholar 

  5. Bayer, B.E.: An optimum method for two-level rendition of continuous-tone pictures. In: Conference Record, IEEE International Conference on Communications, vol. 1, pp. (26-11)–(26-15) (1973)

  6. Chazelle, B.: The Discrepancy Method: Randomness and Complexity. Cambridge University Press, Cambridge (2000)

    MATH  Google Scholar 

  7. Heinz, H.D.: Magic squares, magic stars & other patterns. Web site, http://www.geocities.com/CapeCanaveral/Launchpad/4057/

  8. Knuth, D.E.: The Art of Computer Programming, Volume 1, Fundamental Algorithms, 3rd edn. Addison-Wesley, Reading (1997)

    Google Scholar 

  9. Matoušek, J.: Geometric Discrepancy. Springer, New York (1991)

    Google Scholar 

  10. Mitsa, T., Parker, K.J.: Digital halftoning technique using a blue-noise mask. J. Opt. Soc. Am. A 9(11), 1920–1929 (1992)

    Article  Google Scholar 

  11. Ulichney, R.A.: Dithering with blue noise. Proc. IEEE 76(1), 56–79, (1988)

    Article  Google Scholar 

  12. Ulichney, R.: The void-and-cluster method for dither array generation. In: Allebach, J. (ed.) IS&T/SPIE Symposium on Electronic Imaging Science and Technology, Proceedings of Conf. Human Vision, Visual Processing and Digital Display IV. Proc. SPIE, vol. 1913, pp. 332–343. Wiley, New York (1993)

    Google Scholar 

  13. Yao, M., Parker, K.J.: Modified approach to the construction of a blue noise mask. J. Electron. Imag. 3, 92–97 (1994)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tetsuo Asano.

Additional information

A preliminary version of this paper appeared in Proceedings of International Symposium on Algorithms and Computation, Hong Kong, December, 2004.

Part of the work on the paper has been carried out when B.A. was visiting JAIST. Work of B.A. on this paper was supported in part by NSF ITR Grant CCR-00-81964.

Work of T.A. was partially supported by the Ministry of Education, Science, Sports and Culture, Grant-in-Aid for Scientific Research (B).

Rights and permissions

Reprints and permissions

About this article

Cite this article

Aronov, B., Asano, T., Kikuchi, Y. et al. A Generalization of Magic Squares with Applications to Digital Halftoning. Theory Comput Syst 42, 143–156 (2008). https://doi.org/10.1007/s00224-007-9005-x

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-007-9005-x

Keywords

Navigation