Restricted Patterns and Replacement Rules

  • Michael Trott

Abstract

The main topics of this chapter are replacement rules and patterns. No other available programming systemcomes close to Mathematical ability to match patterns in arbitrary structures (expressions). The ability to selectsubexpressions on the basis of their form and/or contents and to manipulate them permits the construction ofvery elegant, short, and direct programs. However, the use of pattern matching in very large expressions mayrequire a lot of time because of the potential combinatorial explosion of all possible pattern realizations. But athoughtful, appropriate use of patterns allows us to write programs that are quite elegant, fast, natural, and easyto read and to maintain. We begin this chapter with a discussion of Boolean variables and functions because thedetermination of truth values is an important part of constructing special patterns.

Keywords

Sorting Dispatch Nial Cond aVar 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    R. M. Abu-Sards in S. Elaydi, F. Allan, A. Elkhader, T. Mughrabi, M. Saleh (eds.). Proceedings of the Mathematics Conference, World Scientific, Singapore, 2000.Google Scholar
  2. 2.
    M. S. Alber, C. Miller. arXiv:nlin.PS!0001004 (2000).Google Scholar
  3. 3.
    G. E. Andrews. SIAM Rev. 16, 441 (1974).Google Scholar
  4. 4.
    G. E. Andrews. The Theory of Partitions, Addison-Wesley, Reading, 1976.MATHGoogle Scholar
  5. 5.
    L. Anne, P. Joly, Q. H. Tran. Comput. Geosc. 4, 207 (2000).CrossRefMATHMathSciNetGoogle Scholar
  6. 6.
    R. Askey. CRM Proc. Lecture Notes 9, 13 (1996).Google Scholar
  7. 8.
    K. J. Baumeister in S. Sengupta, J. Hauser, P. R. Eiseman, J. F. Thompson (eds.). Numerical Grid Generation in Computational Fluid Mechanics, Pineridge Press, Swansea, 1988.Google Scholar
  8. 9.
    H. B. Benaoum. J. Phys. A 31, L 751 (1998).Google Scholar
  9. 10.
    H. B. Benaoum. arXiv:math-ph/9%\202% (1998).Google Scholar
  10. 11.
    H. B. Benaoum. J. Phys. A 32, 2037 (1999).Google Scholar
  11. 12.
    V. N. Beskrovnyi. Comput. Phys. Commun. 111, 76 (1998).Google Scholar
  12. 13.
    D. Bonatsos, C. Daskaloyannis. arXiv :nucl-th/9999003 (1999).Google Scholar
  13. 14.
    J. M. Borwein, D. M. Bradley, R. E. Crandall. J. Comput. Appl. Math. 121, 247 (2000).Google Scholar
  14. 15.
    A. Bose. J. Math. Phys. 30, 2035 (1989).CrossRefMATHMathSciNetGoogle Scholar
  15. 16.
    D. Bowman. q-Difference Operators, Orthogonal Polynomials, and Symmetric Expansions, American Mathematical Society, Providence, 2002.Google Scholar
  16. 18.
    B. Buchberger. An Implementation ofGrdbner Bases in Mathematica, MathSource 0205-300 (1992).Google Scholar
  17. 19.
    C. S. Calude, M. J. Dinneen, C.-K. Shu. arXivmlin.CD/0112022 (2001).Google Scholar
  18. 20.
    R. Camassa, D. D. Holm. Phys. Rev. Lett. 71, 1661 (1993).Google Scholar
  19. 21.
    R. Camassa, D. L. Holm, J. M. Hyman. Adv. Appl. Mech. 31, 1 (1994).Google Scholar
  20. 22.
    K. Charter, T. Rogers. Exp. Math. 2, 209 (1994).Google Scholar
  21. 23.
    S. Ciliberti, G. Caldarelli, P. D. L. Rios, L. Pietronero, Y.-C. Zhang. Phys. Rev. Lett. 85, 4848 (2000).Google Scholar
  22. 24.
    H. Cirstea, C. Kirchner. INRIA Report RR-3818 (1999). http://www.inria.fr/RRRT/RR-3818.htmlGoogle Scholar
  23. 25.
    L. Comtet. Advanced Combinatorics, Reidel, Dordrecht, 1974.Google Scholar
  24. 26.
    B. Costa, W. S. Don. Appl. Num. Math. 33, 151 (2000).Google Scholar
  25. 27.
    A. Degasperis, D. D. Holm, A. N. W. Hone. arXivmlin.SI/0205023 (2002).Google Scholar
  26. 29.
    A. Degasperis, D. D. Holm, A. N. W. Hone. arXiv:nlin.SI/020900S (2002).Google Scholar
  27. 30.
    H. De Raedt. Comput. Phys. Rep. 1, 1 (1987).Google Scholar
  28. 31.
    A. Dimakis, F. Muller-Hoissen. Phys. Lett. B 295, 242 (1992).Google Scholar
  29. 32.
    L. Di Vizio. arXiv:math.NT10211217 (2002).Google Scholar
  30. 33.
    V. K. Dobrev. arXiv:quant-ph/0201011 (2002).Google Scholar
  31. 34.
    H. M. Edwards. Riemann’s Zeta Function, Academic Press, Boston, 1974.Google Scholar
  32. 35.
    P. Erdos. Discrete Math. 136, 53 (1994).Google Scholar
  33. 36.
    J. Esch, T. D. Rogers. Discr. Comput. Geom. 25, 477, (2001).Google Scholar
  34. 37.
    H. Exton. q-Hypergeometric Functions and Applications, Ellis Horwood, Chichester, 1983.Google Scholar
  35. 38.
    B. L. Feigin, S. A. Loktev, I. Y. Tipunin. Commun. Math. Phys. 229, 271 (2002).Google Scholar
  36. 39.
    A. S. Fokas, P. J. Olver, P. Rosenau in A. S. Fokas and I. M. Gel’fand (eds.). Progress in Nonlinear Differential Equations, Birkhauser, Boston, 1996.Google Scholar
  37. 40.
    B. Fornberg in G. D. Byrne, W. E. Schiesser (eds.). Recent Developments in Numerical Methods and Software for ODEs/DAEs/PDEs,World Scientific, Singapore, 1992.Google Scholar
  38. 41.
    B. Fornberg. A Practical Guide to Pseudospectral Methods, Cambridge University Press, Cambridge, 1996.Google Scholar
  39. 42.
    B. Fornberg. SIAMRev. 40, 685 (1998).Google Scholar
  40. 43.
    J. D. Franson, M. M. Donegan. arXiv:quant-ph/Q\0 m% (2001).Google Scholar
  41. 44.
    L. Galue. Algebras, Groups Geometries 14, 83 (1997).Google Scholar
  42. 45.
    T. Golinski, A. Odzijewicz. Czech. J. Phys. 52, 1219 (2002).Google Scholar
  43. 46.
    I. P. Goulden, D. M. Jackson. Combinatorial Enumeration, Wiley, New York, 1983.Google Scholar
  44. 47.
    A. Z. Gorski, J. Szmigielski. hep-th/9103\5 (1997).Google Scholar
  45. 48.
    A. Z. Gorski. Acta Phys. Polonica B 31, 789 (2000).Google Scholar
  46. 49.
    R. Grimshaw, B. A. Malomed, G. A. Gottwald. arXiv:nlin.PS/0203056 (2002).Google Scholar
  47. 50.
    M. M. Gupta, J. Kouatchou. SIAM Rev. 44, 83 (1998).Google Scholar
  48. 51.
    S. Hauswirth. arXiv: hep-lat/0003001 (2000).Google Scholar
  49. 52.
    A. S. Hegazi, M. Mansour. Int. J. Theor. Phys. 41, 1815 (2002).Google Scholar
  50. 53.
    D. D. Holm, M. F. Staley. arXiv:nlin. CD/0203007 (2002).Google Scholar
  51. 54.
    Q. Hou, N. Goldenfeld, A. McKane. arXiv:cond-mat!0009449 (2000).Google Scholar
  52. 55.
    A. Ivic. The Riemann Zeta-Function, Wiley, New York, 1985.Google Scholar
  53. 56.
    D. Jacobson. The Mathematica Journal 2, n4, 42, (1992).Google Scholar
  54. 57.
    R. Jaganathan. arXiv:math-phf0003018 (2000).Google Scholar
  55. 58.
    W. P. Johnson. Discr. Math. 157, 207 (1996).Google Scholar
  56. 59.
    A. A. Karatsuba. Complex Analysis in Number Theory, CRC Press, Boca Raton, 1995.Google Scholar
  57. 60.
    V. Kathotia. Int. J. Math. 11, 523 (2000).Google Scholar
  58. 61.
    E. Katz, U.-J. Wiese. Phys. Rev. D 58, 5796 (1998).Google Scholar
  59. 62.
    I. R. Khan, R. Ohba. J. Comput. Appl. Math. 107,179 (1999).Google Scholar
  60. 63.
    T. H. Kjeldsen. Arch. Hist. Exact Sci. 56, 469 (2002).Google Scholar
  61. 64.
    S. Klarsfeld, J. A. Oteo. J. Phys. A 22, 4565 (1989).Google Scholar
  62. 65.
    M. Klimek. J. Phys. A 26, 955 (1993).Google Scholar
  63. 66.
    T. H. Koornwinder. arXiv:math. CA/9403216 (1994).Google Scholar
  64. 67.
    T. Koornwinder. Informal Paper( 1999). http://www.wins.uva.nl/pub/mathematics/reports/Analysis/koomwinder/qbinomial.psGoogle Scholar
  65. 68.
    B. A. Kupershmidt. J. Nonlinear Math. Phys. 1, 244 (2000).Google Scholar
  66. 69.
    S. T. Kuroda in W. F. Ames, E. M. Harrell II, J. V. Herod (eds.). Differential Equations with Applications to Mathematical Physics, Academic Press, Boston, 1993.Google Scholar
  67. 70.
    C. S. Lam. arXiv:hep-thm04m (1998).Google Scholar
  68. 71.
    S. Levy. The Mathematica Journal 1, n3, 63, (1991).Google Scholar
  69. 72.
    X.-J. Li. J. Afamfor Th. 65, 325 (1997).Google Scholar
  70. 73.
    Y. A. Li, P. J. Olver, P. Rosenau in M. Grosser, G. Hormann, M. Kunzinger, and M. Oberguggenberger (eds.). Nonlinear Theory of Generalized Functions, Chapman and Hall, New York, 1999.Google Scholar
  71. 74.
    Z. Liu, T. Qian. Int. J. Bifurc. Chaos. 11, 781 (2001).Google Scholar
  72. 75.
    Z. Liu, T. Qian. Appl. Math. Model. 26, 473 (2002).Google Scholar
  73. 76.
    M. Lothaire. Algebraic Combinatorics on Words, Cambridge University Press, Cambridge, 2002.Google Scholar
  74. 77.
    K. Maurin. The Riemann Legacy, Kluwer, Dordrecht, 1997.Google Scholar
  75. 78.
    K. Mayrhofer, F. D. Fischer. ZAMM 74, 265 (1994).Google Scholar
  76. 79.
    S. A. Messaoudi. Int. J. Math. Edu. Sci. Technol. 33, 425 (2002).Google Scholar
  77. 80.
    G. A. Miller. Am. Math. Monthly 28, 116 (1921).Google Scholar
  78. 81.
    W. Miller Jr. Symmetry Groups and Their Applications, Academic Press, New York, 1972.Google Scholar
  79. 82.
    J. Morales, A. Flores-Riveros. J. Math. Phys. 30, 393 (1989).Google Scholar
  80. 83.
    A. Odzijewicz, T. Golinski. arXiv :math-ph/020S006 (2002).Google Scholar
  81. 84.
    J. A. Oteo. J. Math. Phys. 32, 419 (1991).Google Scholar
  82. 85.
    H. Pan, Z. S. Zhao. Phys. Lett. A 282, 251 (2001).Google Scholar
  83. 86.
    T. Petersen. The Mathematica Journal 2, n4, 10, (1992).Google Scholar
  84. 87.
    P. A. Pritchard, A. Moran, A. Thyssen. Math. Comput. 64, 1337 (1995).Google Scholar
  85. 88.
    L. D. Pustyl’nikov. Russian Math. Surv. 54, 262 (1999).Google Scholar
  86. 89.
    L. D. Pustyl’nikov. Russian Math. Surv. 55, 207 (2000).Google Scholar
  87. 90.
    L. D. Pustyl’nikov. Izvest. Math. 65, 85 (2001).Google Scholar
  88. 91.
    R. Qu. Math. Comput. Model. 24, 55 (1996).Google Scholar
  89. 92.
    R. Reigada, A. H. Romero, A. Sarmiento, K. Lindenberg. arXiv:cond-mat/9905003 (1999).Google Scholar
  90. 93.
    M. W. Reinsch. arXiv:math-ph/99050\2 (1999).Google Scholar
  91. 94.
    M. W. Reinsch. J. Math. Phys. 41, 2434 (2000).Google Scholar
  92. 95.
    P. Ribenboim. Nieuw Archief Wiskunde 12, 53 (1994).Google Scholar
  93. 96.
    R. D. Richtmeyer. Principles of Advanced Mathematical Physics, Springer-Verlag, Berlin, 1981.Google Scholar
  94. 97.
    R. D. Richtmeyer, S. Greenspan. Commun. Pure Appl. Math. 18, 107 (1965).Google Scholar
  95. 98.
    A. Riddle. The Mathematica Journal 1, n3, 60 (1991).Google Scholar
  96. 99.
    A. V. Ryzhov, L. G. Yaffe. arXiv:hep-p/z/0006333 (2000).Google Scholar
  97. 100.
    J. M. Sanz-Serna, M. P. Calvo. Numerical Hamiltonian Problems, Chapman & Hall, London, 1994.Google Scholar
  98. 101.
    H. Scheffe. Technometrics 12, 388 (1970).Google Scholar
  99. 102.
    102 A. Schilling. arXiv:q-alg/9101007 (1997).Google Scholar
  100. 103.
    A. Schilling, S. O.Warnaar. Ramanujan J. 2, 459 (1998).Google Scholar
  101. 104.
    D. Scott. Am. Math. Monthly 92, 422 (1985).Google Scholar
  102. 105.
    R. Sedgewick. Comput. Surveys 9, 137 (1977).Google Scholar
  103. 106.
    C. Shu. Differential Quadratue and its Applications in Engineering Sciences, Springer-Verlag, Berlin, 2000.Google Scholar
  104. 107.
    J. Si-cong. Chin. Sci. Bull. 34, 1248 (1989).Google Scholar
  105. 108.
    A. T. Sornborger, E. D. Stewart. arXiv:quant-phl9903055 (1999).Google Scholar
  106. 109.
    R. Sridhar, R. Jagannathan. arXiv:math-ph/02\206& (2002).Google Scholar
  107. 110.
    R. P. Stanley. Enumerative Combinatorics v.l, Cambridge University Press, Cambridge, 1997.Google Scholar
  108. 111.
    S. Steinberg. J. Diff. Eq. 26, 404 (1977).Google Scholar
  109. 112.
    S. Steinberg, P. J. Roache in D. V. Shirkov, V. A. Rostovtsev, V. P. Gerdt (eds.). IV. International Conference on Computer Algebra in Physical Research, World Scientific, Singapore, 1991.Google Scholar
  110. 113.
    B. Strand. J. Comput. Phys. 110, 47 (1994).Google Scholar
  111. 114.
    M. Suzuki. Commun. Math. Phys. 57, 193 (1977).Google Scholar
  112. 115.
    M. Suzuki. Int. J. Mod. Phys. C 7, 355 (1996).Google Scholar
  113. 116.
    E. C. Titchmarsh. The Theory of the Riemann Zeta Function, Clarendon Press, Oxford, 1986.Google Scholar
  114. 117.
    M. Trott. The Mathematica GuideBookfor Numerics, Springer-Verlag, New York, 2004.Google Scholar
  115. 118.
    M. Trott. The Mathematica GuideBookfor Symbolics, Springer-Verlag, New York, 2004.Google Scholar
  116. 119.
    D. R. Truax. Phys. Rev. D 31, 1988 (1985).Google Scholar
  117. 120.
    J. H. van Lint, R. M. Wilson. A Course in Combinatorics, Cambridge University Press, Cambridge, 1992.Google Scholar
  118. 121.
    I. Vardi. The Mathematica Journal 1, n3, 63 (1991).Google Scholar
  119. 122.
    M. Veltman. Nucl. Phys. B 319, 253 (1989).MathSciNetGoogle Scholar
  120. 123.
    C. P. Viazminsky. arXiv:math.NA/02 m61 (2002).Google Scholar
  121. 124.
    G. Walz. Asymptotics and Extrapolation, Akademie Verlag, Berlin, 1996.Google Scholar
  122. 125.
    S. Weintraub. J. Recreat. Math. 18, 281 (1986).MATHGoogle Scholar
  123. 126.
    S. Wolfram. Mathematica: A System for Doing Mathematics by Computer, Addison-Wesley, Reading, 1992.Google Scholar
  124. 127.
    K. Zarankiewicz. Matematyka 2, n4, 1 (1949).Google Scholar
  125. 128.
    K. Zarankiewicz. Matematyka 2, n5, 1 (1949).Google Scholar

Copyright information

© Springer Science+Business Media New York 2004

Authors and Affiliations

  • Michael Trott
    • 1
  1. 1.Wolfram ResearchChampaignUSA

Personalised recommendations