home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / math / symbolic / 3076 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  1.8 KB

  1. Path: sparky!uunet!mcsun!sun4nl!nikhefh!t68
  2. From: t68@nikhefh.nikhef.nl (Jos Vermaseren)
  3. Newsgroups: sci.math.symbolic
  4. Subject: Re: an example of comparative CAS programming
  5. Message-ID: <2024@nikhefh.nikhef.nl>
  6. Date: 23 Nov 92 09:59:42 GMT
  7. References: <dzpqj3g@lynx.unm.edu>
  8. Organization: Nikhef-H, Amsterdam (the Netherlands).
  9. Lines: 49
  10.  
  11. In article <dzpqj3g@lynx.unm.edu>, jpg@spectre.unm.edu (Jeffrey P. Golden) writes:
  12. > Reply-To: jpg@macsyma.com
  13. > Given all the recent messages about comparative programming in 
  14. > the various CAS, I thought the following might be elucidating.
  15. > Barry Simon, "Symbolic Math: Problems and Solutions", 
  16. > Notices of the AMS, Vol. 39, No. 7, pp. 700-710, Sept. 1992 
  17. > has the following problem:
  18. >   9.  Rule based algebra
  19. >   Consider the Clifford algebra in 10 variables, that is the 
  20. >   complex algebra with ten generators, s0,...,s9 obeying
  21. >           si sj + sj si = 0 if i is different from j
  22. >           si si = 1
  23. >   That is multiplication is NOT commutative (but is assumed
  24. >   associative).  Compute (s0+s1+....+s9)^5
  25.  
  26. The FORM solution seems easiest to me.
  27. 1: Brute force:
  28. F   sa,sb,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9;
  29. Local F = (s0+s1+s2+s3+s4+s5+s6+s7+s8+s9)^5;
  30. repeat;
  31.     id sa?*sa? = 1;
  32.     id,disorder,sb?*sa? = -sa*sb;
  33. endrepeat;
  34. print;
  35. .end
  36. This takes of the order of 3 minutes on a SPARC 2.
  37. Slightly better:
  38. 2: Build up the powers:
  39. #define MAXPOW "5"
  40. F   sa,sb,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9;
  41. Local F = s0+s1+s2+s3+s4+s5+s6+s7+s8+s9;
  42. #do i = 2,'MAXPOW'
  43. multiply,right,(s0+s1+s2+s3+s4+s5+s6+s7+s8+s9);
  44. repeat;
  45.     id sa?*sa? = 1;
  46.     id,disorder,sb?*sa? = -sa*sb;
  47. endrepeat;
  48. .sort
  49. #enddo
  50. print;
  51. .end
  52. This takes of the order of 0.1 sec on a SPARC 2
  53. Note that programming the anticommutation relation is rather natural.
  54. Note 2:  The disorder option does not exist in FORM 1. You need FORM 2 for it.
  55.  
  56. Jos Vermaseren
  57.