Unbiased Random Sequences from Quasigroup String Transformations

  • Smile Markovski
  • Danilo Gligoroski
  • Ljupco Kocarev
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3557)


The need of true random number generators for many purposes (ranging from applications in cryptography and stochastic simulation, to search heuristics and game playing) is increasing every day. Many sources of randomness possess the property of stationarity. However, while a biased die may be a good source of entropy, many applications require input in the form of unbiased bits, rather than biased ones. In this paper, we present a new technique for simulating fair coin flips using a biased, stationary source of randomness. Moreover, the same technique can also be used to improve some of the properties of pseudo random number generators. In particular, an improved pseudo random number generator has almost unmeasurable period, uniform distribution of the letters, pairs of letters, triples of letters, and so on, and passes many statistical tests of randomness. Our algorithm for simulating fair coin flips using a biased, stationary source of randomness (or for improving the properties of pseudo random number generators) is designed by using quasigroup string transformations and its properties are mathematically provable. It is very flexible, the input/output strings can be of 2-bits letters, 4-bits letters, bytes, 2-bytes letters, and so on. It is of linear complexity and it needs less than 1Kb memory space in its 2-bits and 4-bits implementations, hence it is suitable for embedded systems as well.


Transition Matrix Hash Function Random Number Generator Stationary Source Pseudo Random Number Generator 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Gude, M.: Concept for a high-performance random number generator based on physical random phenomena. Frequenz 39, 187–190 (1985)Google Scholar
  2. 2.
    Agnew, G.B.: Random sources for cryptographic systems. In: Price, W.L., Chaum, D. (eds.) EUROCRYPT 1987. LNCS, vol. 304, pp. 77–81. Springer, Heidelberg (1988)Google Scholar
  3. 3.
    von Neumann, J.: Various techniques used in connection with random digits. In: Collected Works, vol. 5, pp. 768–770. Pergamon Press, Oxford (1963)Google Scholar
  4. 4.
    Elias, P.: The efficient construction of an unbiased random sequence. Ann. Math. Statist. 43(3), 865–870 (1972)zbMATHCrossRefGoogle Scholar
  5. 5.
    Stout, Q.F., Warren, B.L.: Tree algorithms for unbiased coin tossing with a biased coin. Ann. Probab. 12(1), 212–222 (1984)zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Juels, A., Jakobsson, M., Shriver, E., Hillyer, B.K.: How to Turn Loaded Dice into Fair Coins. IEEE Transactions on Information Theory 46(3), 911–921 (2000)zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Dénes, J., Keedwell, A.D.: Latin Squares and their Applications. English Univer. Press Ltd. (1974)Google Scholar
  8. 8.
    Markovski, S., Gligoroski, D., Bakeva, V.: Quasigroup String Processing: Part 1. Contributions, Sec. Math. Tech. Sci., MANU XX(1-2), 13–28 (1999)MathSciNetGoogle Scholar
  9. 9.
    Markovski, S.: Quasigroup string processing and applications in cryptography. In: Proc. 1-st Inter. Conf. Mathematics and Informatics for industry MII, Thessaloniki, pp. 278–290 (2003)Google Scholar
  10. 10.
  11. 11.
  12. 12.
    Markovski, S., Kusakatov, V.: Quasigroup String Processing: Part 2. Contributions, Sec. Math. Tech. Sci., MANU XXI(1-2), 15–32 (2000)MathSciNetGoogle Scholar
  13. 13.
    Markovski, S., Kusakatov, V.: Quasigroup string processing: Part 3. Contributions, Sec. Math. Tech. Sci., MANU XXIII-XXIV(1-2), 7–27 (2002-2003)MathSciNetGoogle Scholar
  14. 14.
    Dimitrova, V., Markovski, J.: On quasigroup pseudo random sequence generator. In: Manolopoulos, Y., Spirakis, P. (eds.) Proc. of the 1-st Balkan Conference in Informatics, Thessaloniki, pp. 393–401 (2004)Google Scholar
  15. 15.
    Markovski, S., Gligoroski, D., Markovski, J.: Classification of quasigroups by using random wolk on torus. Tech. Report, RISC-LINZ (2004),
  16. 16.
    Gusev, M., Markovski, S., Gligoroski, G. Kocarev, L.J.: Processor Array Realization of Quasigroup String Transformations. Tech. Report, 01-2005, II-PMF Skopje (2005)Google Scholar
  17. 17.
    Markovski, S., Gligoroski, D., Bakeva, V.: Quasigroup and Hash Functions, Disc. Math. and Appl. In: Shtrakov, S., Denecke, K. (eds.) Proceedings of the 6th ICDMA, Bansko 2001, pp. 43–50 (2001)Google Scholar
  18. 18.
    Gligoroski, D., Markovski, S., Bakeva, V.: On Infinite Class of Strongly Collision Resistant Hash Functions ”EDON-F” with Variable Length of Output. In: Proc. 1-st Inter. Conf. Mathematics and Informatics for industry MII, Thessaloniki, pp. 302–308 (2003)Google Scholar
  19. 19.
    Gligoroski, G., Markovski, S., Kocarev, Lj.: On a family of stream ciphers ”EDON”. Tech. Report, 10-2004, II-PMF Skopje (2004)Google Scholar
  20. 20.
    McKay, B.D., Meynert, A., Myrvold, W.: Small Latin Squares, Quaisgroups and Loops,
  21. 21.
    Hall, M.: Combinatorial theory. Blaisdell Publishing Company, Massachusetts (1967)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Smile Markovski
    • 1
  • Danilo Gligoroski
    • 1
  • Ljupco Kocarev
    • 2
  1. 1.Faculty of Natural Sciences and Mathematics, Institute of Informatics“Ss Cyril and Methodius” UniversitySkopjeRepublic of Macedonia
  2. 2.Institute for Nonlinear ScienceUniversity of California San DiegoLa JollaUSA

Personalised recommendations