International Conference on Principles and Practice of Constraint Programming

CP 2015: Principles and Practice of Constraint Programming pp 351-366 | Cite as

Randomness as a Constraint

  • Steven D. Prestwich
  • Roberto Rossi
  • S. Armagan Tarim
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9255)


Some optimisation problems require a random-looking solution with no apparent patterns, for reasons of fairness, anonymity, undetectability or unpredictability. Randomised search is not a good general approach because problem constraints and objective functions may lead to solutions that are far from random. We propose a constraint-based approach to finding pseudo-random solutions, inspired by the Kolmogorov complexity definition of randomness and by data compression methods. Our “entropy constraints” can be implemented in constraint programming systems using well-known global constraints. We apply them to a problem from experimental psychology and to a factory inspection problem.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Apt, K.R., Wallace, M.: Constraint Logic Programming Using Eclipse. Cambridge University Press (2007)Google Scholar
  2. 2.
    Beltrami, E.: What Is Random? Chance and Order in Mathematics and Life. Copernicus (1999)Google Scholar
  3. 3.
    van Casteren, M., Davis, M.H.: Mix, a Program for Pseudorandomization. Behaviour Research Methods 38(4), 584–589 (2006)CrossRefGoogle Scholar
  4. 4.
    Cilibrasi, R., Vitányi, P.M.B.: Clustering by Compression. IEEE Transactions on Information Theory 51(4), 1523–1545 (2005)MATHCrossRefGoogle Scholar
  5. 5.
    Chaitin, G.J.: Algorithmic Information Theory. Cambridge University Press (1987)Google Scholar
  6. 6.
    Claessen, K., Duregård, J., Pałka, M.H.: Generating constrained random data with uniform distribution. In: Codish, M., Sumii, E. (eds.) FLOPS 2014. LNCS, vol. 8475, pp. 18–34. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  7. 7.
    Cutler, C.C.: Differential Quantization for Television Signals. U. S. Patent 2, 605, 361, July 1952Google Scholar
  8. 8.
    Dechter, R., Kask, K., Bin, E., Emek, R.: Generating random solutions for constraint satisfaction problems. In: Proceedings of the 18th National Conference on Artificial Intelligence, pp. 15–21 (2002)Google Scholar
  9. 9.
    Ermon, S., Gomes, C.P., Selman, B.: Uniform solution sampling using a constraint solver as an oracle. In: Proceedings of the Twenty-Eighth Conference on Uncertainty in Artificial Intelligence, pp. 255–264. AUAI Press (2012)Google Scholar
  10. 10.
    French, R.M., Perruchet, P.: Generating Constrained Randomized Sequences: Item Frequency Matters. Behaviour Research Methods 41(4), 1233–1241 (2009)CrossRefGoogle Scholar
  11. 11.
    Hebrard, E., Hnich, B., O’Sullivan, B., Walsh, T.: Finding diverse and similar solutions in constraint programming. In: Proceedings of the 20th National Conference on Artificial Intelligence (2005)Google Scholar
  12. 12.
    Van Hentenryck, P., Coffrin, C., Gutkovich, B.: Constraint-based local search for the automatic generation of architectural tests. In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 787–801. Springer, Heidelberg (2009) CrossRefGoogle Scholar
  13. 13.
    Hinkelmann, K., Kempthorne, O.: Design and Analysis of Experiments I and II. Wiley (2008)Google Scholar
  14. 14.
    Housworth, E.A., Martins, E.P.: Random Sampling of Constrained Phylogenies: Conducting Phylogenetic Analyses When the Philogeny is Partially Known. Syst. Biol. 50(5), 628–639 (2001)CrossRefGoogle Scholar
  15. 15.
    Huffman, D.A.: A Method for the Construction of Minimum Redundancy Codes. Proceedings of the IRE 40, 1098–1101 (1951)CrossRefGoogle Scholar
  16. 16.
    Kitchen, N., Kuehlmann, A.: Stimulus generation for constrained random simulation. In: Proceedings of the 2007 IEEE/ACM International Conference on Computer-Aided Design, pp. 258–265. IEEE Press (2007)Google Scholar
  17. 17.
    Knuth, D.E.: The Art of Computer Programming. Seminumerical Algorithms, 2nd edn., vol. 2, p. 89. Addison-Wesley (1981)Google Scholar
  18. 18.
    Marsaglia, G., Tsang, W.W.: Some Difficult-to-pass Tests of Randomness. Journal of Statistical Software 7(3) (2002)Google Scholar
  19. 19.
    Naveh, R., Metodi, A.: Beyond feasibility: CP usage in constrained-random functional hardware verification. In: Schulte, C. (ed.) CP 2013. LNCS, vol. 8124, pp. 823–831. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  20. 20.
    Ouellet, P., Quimper, C.-G.: The multi-inter-distance constraint. In: Proceedings of the 22nd International Joint Conference on Artificial Intelligence, pp. 629–634 (2011)Google Scholar
  21. 21.
    Pachet, F., Roy, P.: Markov Constraints: Steerable Generation of Markov Sequences. Constraints 16(2), 148–172 (2011)MathSciNetCrossRefGoogle Scholar
  22. 22.
    Pesant, G., Régin, J.-C.: SPREAD: a balancing constraint based on statistics. In: van Beek, P. (ed.) CP 2005. LNCS, vol. 3709, pp. 460–474. Springer, Heidelberg (2005) CrossRefGoogle Scholar
  23. 23.
    Pincus, S.M., Gladstone, I.M., Ehrenkranz, R.A.: A Regularity Statistic for Medical Data Analysis. Journal of Clinical Monitoring and Computing 7(4), 335–345 (1991)CrossRefGoogle Scholar
  24. 24.
    Press, W.H., Flannery, B.P., Teukolsky, S.A., Vetterling, W.T.: Numerical Recipes in C, 2nd edn. Cambridge University Press, UK (1992)MATHGoogle Scholar
  25. 25.
    Ramsey, F.P.: On a Problem of Formal Logic. Proceedings London Mathematical Society s2 30(1), 264–286 (1930)MathSciNetCrossRefGoogle Scholar
  26. 26.
    Refalo, P.: Impact-based search strategies for constraint programming. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 557–571. Springer, Heidelberg (2004) CrossRefGoogle Scholar
  27. 27.
    Régin, J.-C.: Generalized Arc Consistency for Global Cardinality Constraint. In: 14th National Conference on Artificial Intelligence, pp. 209–215 (1996)Google Scholar
  28. 28.
    Régin, J.-C.: A filtering algorithm for constraints of difference in CSPs. In: Proceedings of the 12th National Conference on Artificial Intelligence, Vol. 1, pp. 362–367 (1994)Google Scholar
  29. 29.
    Rissanen, J.J., Langdon, G.G.: Arithmetic Coding. IBM Journal of Research and Development 23(2), 149–162 (1979)MATHMathSciNetCrossRefGoogle Scholar
  30. 30.
    Rossi, R., Prestwich, S., Tarim, S.A.: Statistical constraints. In: 21st European Conference on Artificial Intelligence (2014)Google Scholar
  31. 31.
    Sayood, K.: Introduction to Data Compression. Morgan Kaufmann (2012)Google Scholar
  32. 32.
    Shannon, C.E.: A Mathematical Theory of Communication. Bell System Technical Journal 27(3), 379–423 (1948)MATHMathSciNetCrossRefGoogle Scholar
  33. 33.
    Wallace, G.K.: The JPEG Still Picture Compression Standard. Communications of the ACM 34, 31–44 (1991)CrossRefGoogle Scholar
  34. 34.
    Welch, T.A.: A Technique for High-Performance Data Compression. IEEE Computer, 8–19, June 1984Google Scholar
  35. 35.
    Ziv, J., Lempel, A.: A Universal Algorithm for Data Compression. IEEE Transactions on Information Theory IT 23(3), 337–343 (1977)MATHMathSciNetCrossRefGoogle Scholar
  36. 36.
    Ziv, J., Lempel, A.: Compression of Individual Sequences via Variable-Rate Coding. IEEE Transactions on Information Theory IT 24(5), 530–536 (1978)MATHMathSciNetCrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Steven D. Prestwich
    • 1
  • Roberto Rossi
    • 2
  • S. Armagan Tarim
    • 3
  1. 1.Insight Centre for Data AnalyticsUniversity College CorkCorkIreland
  2. 2.University of Edinburgh Business SchoolEdinburghUK
  3. 3.Department of ManagementCankaya UniversityAnkaraTurkey

Personalised recommendations