Skip to main content

Restricted Patterns and Replacement Rules

  • Chapter
The Mathematica GuideBook for Programming
  • 3440 Accesses

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.

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

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 69.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 99.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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. M. S. Alber, C. Miller. arXiv:nlin.PS!0001004 (2000).

    Google Scholar 

  3. G. E. Andrews. SIAM Rev. 16, 441 (1974).

    Google Scholar 

  4. G. E. Andrews. The Theory of Partitions, Addison-Wesley, Reading, 1976.

    MATH  Google Scholar 

  5. L. Anne, P. Joly, Q. H. Tran. Comput. Geosc. 4, 207 (2000).

    Article  MATH  MathSciNet  Google Scholar 

  6. R. Askey. CRM Proc. Lecture Notes 9, 13 (1996).

    Google Scholar 

  7. 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. H. B. Benaoum. J. Phys. A 31, L 751 (1998).

    Google Scholar 

  9. H. B. Benaoum. arXiv:math-ph/9%\202% (1998).

    Google Scholar 

  10. H. B. Benaoum. J. Phys. A 32, 2037 (1999).

    Google Scholar 

  11. V. N. Beskrovnyi. Comput. Phys. Commun. 111, 76 (1998).

    Google Scholar 

  12. D. Bonatsos, C. Daskaloyannis. arXiv :nucl-th/9999003 (1999).

    Google Scholar 

  13. J. M. Borwein, D. M. Bradley, R. E. Crandall. J. Comput. Appl. Math. 121, 247 (2000).

    Google Scholar 

  14. A. Bose. J. Math. Phys. 30, 2035 (1989).

    Article  MATH  MathSciNet  Google Scholar 

  15. D. Bowman. q-Difference Operators, Orthogonal Polynomials, and Symmetric Expansions, American Mathematical Society, Providence, 2002.

    Google Scholar 

  16. B. Buchberger. An Implementation ofGrdbner Bases in Mathematica, MathSource 0205-300 (1992).

    Google Scholar 

  17. C. S. Calude, M. J. Dinneen, C.-K. Shu. arXivmlin.CD/0112022 (2001).

    Google Scholar 

  18. R. Camassa, D. D. Holm. Phys. Rev. Lett. 71, 1661 (1993).

    Google Scholar 

  19. R. Camassa, D. L. Holm, J. M. Hyman. Adv. Appl. Mech. 31, 1 (1994).

    Google Scholar 

  20. K. Charter, T. Rogers. Exp. Math. 2, 209 (1994).

    Google Scholar 

  21. S. Ciliberti, G. Caldarelli, P. D. L. Rios, L. Pietronero, Y.-C. Zhang. Phys. Rev. Lett. 85, 4848 (2000).

    Google Scholar 

  22. H. Cirstea, C. Kirchner. INRIA Report RR-3818 (1999). http://www.inria.fr/RRRT/RR-3818.html

    Google Scholar 

  23. L. Comtet. Advanced Combinatorics, Reidel, Dordrecht, 1974.

    Google Scholar 

  24. B. Costa, W. S. Don. Appl. Num. Math. 33, 151 (2000).

    Google Scholar 

  25. A. Degasperis, D. D. Holm, A. N. W. Hone. arXivmlin.SI/0205023 (2002).

    Google Scholar 

  26. A. Degasperis, D. D. Holm, A. N. W. Hone. arXiv:nlin.SI/020900S (2002).

    Google Scholar 

  27. H. De Raedt. Comput. Phys. Rep. 1, 1 (1987).

    Google Scholar 

  28. A. Dimakis, F. Muller-Hoissen. Phys. Lett. B 295, 242 (1992).

    Google Scholar 

  29. L. Di Vizio. arXiv:math.NT10211217 (2002).

    Google Scholar 

  30. V. K. Dobrev. arXiv:quant-ph/0201011 (2002).

    Google Scholar 

  31. H. M. Edwards. Riemann’s Zeta Function, Academic Press, Boston, 1974.

    Google Scholar 

  32. P. Erdos. Discrete Math. 136, 53 (1994).

    Google Scholar 

  33. J. Esch, T. D. Rogers. Discr. Comput. Geom. 25, 477, (2001).

    Google Scholar 

  34. H. Exton. q-Hypergeometric Functions and Applications, Ellis Horwood, Chichester, 1983.

    Google Scholar 

  35. B. L. Feigin, S. A. Loktev, I. Y. Tipunin. Commun. Math. Phys. 229, 271 (2002).

    Google Scholar 

  36. 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. 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. B. Fornberg. A Practical Guide to Pseudospectral Methods, Cambridge University Press, Cambridge, 1996.

    Google Scholar 

  39. B. Fornberg. SIAMRev. 40, 685 (1998).

    Google Scholar 

  40. J. D. Franson, M. M. Donegan. arXiv:quant-ph/Q\0 m% (2001).

    Google Scholar 

  41. L. Galue. Algebras, Groups Geometries 14, 83 (1997).

    Google Scholar 

  42. T. Golinski, A. Odzijewicz. Czech. J. Phys. 52, 1219 (2002).

    Google Scholar 

  43. I. P. Goulden, D. M. Jackson. Combinatorial Enumeration, Wiley, New York, 1983.

    Google Scholar 

  44. A. Z. Gorski, J. Szmigielski. hep-th/9103\5 (1997).

    Google Scholar 

  45. A. Z. Gorski. Acta Phys. Polonica B 31, 789 (2000).

    Google Scholar 

  46. R. Grimshaw, B. A. Malomed, G. A. Gottwald. arXiv:nlin.PS/0203056 (2002).

    Google Scholar 

  47. M. M. Gupta, J. Kouatchou. SIAM Rev. 44, 83 (1998).

    Google Scholar 

  48. S. Hauswirth. arXiv: hep-lat/0003001 (2000).

    Google Scholar 

  49. A. S. Hegazi, M. Mansour. Int. J. Theor. Phys. 41, 1815 (2002).

    Google Scholar 

  50. D. D. Holm, M. F. Staley. arXiv:nlin. CD/0203007 (2002).

    Google Scholar 

  51. Q. Hou, N. Goldenfeld, A. McKane. arXiv:cond-mat!0009449 (2000).

    Google Scholar 

  52. A. Ivic. The Riemann Zeta-Function, Wiley, New York, 1985.

    Google Scholar 

  53. D. Jacobson. The Mathematica Journal 2, n4, 42, (1992).

    Google Scholar 

  54. R. Jaganathan. arXiv:math-phf0003018 (2000).

    Google Scholar 

  55. W. P. Johnson. Discr. Math. 157, 207 (1996).

    Google Scholar 

  56. A. A. Karatsuba. Complex Analysis in Number Theory, CRC Press, Boca Raton, 1995.

    Google Scholar 

  57. V. Kathotia. Int. J. Math. 11, 523 (2000).

    Google Scholar 

  58. E. Katz, U.-J. Wiese. Phys. Rev. D 58, 5796 (1998).

    Google Scholar 

  59. I. R. Khan, R. Ohba. J. Comput. Appl. Math. 107,179 (1999).

    Google Scholar 

  60. T. H. Kjeldsen. Arch. Hist. Exact Sci. 56, 469 (2002).

    Google Scholar 

  61. S. Klarsfeld, J. A. Oteo. J. Phys. A 22, 4565 (1989).

    Google Scholar 

  62. M. Klimek. J. Phys. A 26, 955 (1993).

    Google Scholar 

  63. T. H. Koornwinder. arXiv:math. CA/9403216 (1994).

    Google Scholar 

  64. T. Koornwinder. Informal Paper( 1999). http://www.wins.uva.nl/pub/mathematics/reports/Analysis/koomwinder/qbinomial.ps

    Google Scholar 

  65. B. A. Kupershmidt. J. Nonlinear Math. Phys. 1, 244 (2000).

    Google Scholar 

  66. 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. C. S. Lam. arXiv:hep-thm04m (1998).

    Google Scholar 

  68. S. Levy. The Mathematica Journal 1, n3, 63, (1991).

    Google Scholar 

  69. X.-J. Li. J. Afamfor Th. 65, 325 (1997).

    Google Scholar 

  70. 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. Z. Liu, T. Qian. Int. J. Bifurc. Chaos. 11, 781 (2001).

    Google Scholar 

  72. Z. Liu, T. Qian. Appl. Math. Model. 26, 473 (2002).

    Google Scholar 

  73. M. Lothaire. Algebraic Combinatorics on Words, Cambridge University Press, Cambridge, 2002.

    Google Scholar 

  74. K. Maurin. The Riemann Legacy, Kluwer, Dordrecht, 1997.

    Google Scholar 

  75. K. Mayrhofer, F. D. Fischer. ZAMM 74, 265 (1994).

    Google Scholar 

  76. S. A. Messaoudi. Int. J. Math. Edu. Sci. Technol. 33, 425 (2002).

    Google Scholar 

  77. G. A. Miller. Am. Math. Monthly 28, 116 (1921).

    Google Scholar 

  78. W. Miller Jr. Symmetry Groups and Their Applications, Academic Press, New York, 1972.

    Google Scholar 

  79. J. Morales, A. Flores-Riveros. J. Math. Phys. 30, 393 (1989).

    Google Scholar 

  80. A. Odzijewicz, T. Golinski. arXiv :math-ph/020S006 (2002).

    Google Scholar 

  81. J. A. Oteo. J. Math. Phys. 32, 419 (1991).

    Google Scholar 

  82. H. Pan, Z. S. Zhao. Phys. Lett. A 282, 251 (2001).

    Google Scholar 

  83. T. Petersen. The Mathematica Journal 2, n4, 10, (1992).

    Google Scholar 

  84. P. A. Pritchard, A. Moran, A. Thyssen. Math. Comput. 64, 1337 (1995).

    Google Scholar 

  85. L. D. Pustyl’nikov. Russian Math. Surv. 54, 262 (1999).

    Google Scholar 

  86. L. D. Pustyl’nikov. Russian Math. Surv. 55, 207 (2000).

    Google Scholar 

  87. L. D. Pustyl’nikov. Izvest. Math. 65, 85 (2001).

    Google Scholar 

  88. R. Qu. Math. Comput. Model. 24, 55 (1996).

    Google Scholar 

  89. R. Reigada, A. H. Romero, A. Sarmiento, K. Lindenberg. arXiv:cond-mat/9905003 (1999).

    Google Scholar 

  90. M. W. Reinsch. arXiv:math-ph/99050\2 (1999).

    Google Scholar 

  91. M. W. Reinsch. J. Math. Phys. 41, 2434 (2000).

    Google Scholar 

  92. P. Ribenboim. Nieuw Archief Wiskunde 12, 53 (1994).

    Google Scholar 

  93. R. D. Richtmeyer. Principles of Advanced Mathematical Physics, Springer-Verlag, Berlin, 1981.

    Google Scholar 

  94. R. D. Richtmeyer, S. Greenspan. Commun. Pure Appl. Math. 18, 107 (1965).

    Google Scholar 

  95. A. Riddle. The Mathematica Journal 1, n3, 60 (1991).

    Google Scholar 

  96. A. V. Ryzhov, L. G. Yaffe. arXiv:hep-p/z/0006333 (2000).

    Google Scholar 

  97. J. M. Sanz-Serna, M. P. Calvo. Numerical Hamiltonian Problems, Chapman & Hall, London, 1994.

    Google Scholar 

  98. H. Scheffe. Technometrics 12, 388 (1970).

    Google Scholar 

  99. 102 A. Schilling. arXiv:q-alg/9101007 (1997).

    Google Scholar 

  100. A. Schilling, S. O.Warnaar. Ramanujan J. 2, 459 (1998).

    Google Scholar 

  101. D. Scott. Am. Math. Monthly 92, 422 (1985).

    Google Scholar 

  102. R. Sedgewick. Comput. Surveys 9, 137 (1977).

    Google Scholar 

  103. C. Shu. Differential Quadratue and its Applications in Engineering Sciences, Springer-Verlag, Berlin, 2000.

    Google Scholar 

  104. J. Si-cong. Chin. Sci. Bull. 34, 1248 (1989).

    Google Scholar 

  105. A. T. Sornborger, E. D. Stewart. arXiv:quant-phl9903055 (1999).

    Google Scholar 

  106. R. Sridhar, R. Jagannathan. arXiv:math-ph/02\206& (2002).

    Google Scholar 

  107. R. P. Stanley. Enumerative Combinatorics v.l, Cambridge University Press, Cambridge, 1997.

    Google Scholar 

  108. S. Steinberg. J. Diff. Eq. 26, 404 (1977).

    Google Scholar 

  109. 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. B. Strand. J. Comput. Phys. 110, 47 (1994).

    Google Scholar 

  111. M. Suzuki. Commun. Math. Phys. 57, 193 (1977).

    Google Scholar 

  112. M. Suzuki. Int. J. Mod. Phys. C 7, 355 (1996).

    Google Scholar 

  113. E. C. Titchmarsh. The Theory of the Riemann Zeta Function, Clarendon Press, Oxford, 1986.

    Google Scholar 

  114. M. Trott. The Mathematica GuideBookfor Numerics, Springer-Verlag, New York, 2004.

    Google Scholar 

  115. M. Trott. The Mathematica GuideBookfor Symbolics, Springer-Verlag, New York, 2004.

    Google Scholar 

  116. D. R. Truax. Phys. Rev. D 31, 1988 (1985).

    Google Scholar 

  117. J. H. van Lint, R. M. Wilson. A Course in Combinatorics, Cambridge University Press, Cambridge, 1992.

    Google Scholar 

  118. I. Vardi. The Mathematica Journal 1, n3, 63 (1991).

    Google Scholar 

  119. M. Veltman. Nucl. Phys. B 319, 253 (1989).

    MathSciNet  Google Scholar 

  120. C. P. Viazminsky. arXiv:math.NA/02 m61 (2002).

    Google Scholar 

  121. G. Walz. Asymptotics and Extrapolation, Akademie Verlag, Berlin, 1996.

    Google Scholar 

  122. S. Weintraub. J. Recreat. Math. 18, 281 (1986).

    MATH  Google Scholar 

  123. S. Wolfram. Mathematica: A System for Doing Mathematics by Computer, Addison-Wesley, Reading, 1992.

    Google Scholar 

  124. K. Zarankiewicz. Matematyka 2, n4, 1 (1949).

    Google Scholar 

  125. K. Zarankiewicz. Matematyka 2, n5, 1 (1949).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer Science+Business Media New York

About this chapter

Cite this chapter

Trott, M. (2004). Restricted Patterns and Replacement Rules. In: The Mathematica GuideBook for Programming . Springer, New York, NY. https://doi.org/10.1007/978-1-4419-8503-3_5

Download citation

  • DOI: https://doi.org/10.1007/978-1-4419-8503-3_5

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4612-6421-7

  • Online ISBN: 978-1-4419-8503-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics