home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!nikhefh!t68
- From: t68@nikhefh.nikhef.nl (Jos Vermaseren)
- Newsgroups: sci.math.symbolic
- Subject: Re: an example of comparative CAS programming
- Message-ID: <2024@nikhefh.nikhef.nl>
- Date: 23 Nov 92 09:59:42 GMT
- References: <dzpqj3g@lynx.unm.edu>
- Organization: Nikhef-H, Amsterdam (the Netherlands).
- Lines: 49
-
- In article <dzpqj3g@lynx.unm.edu>, jpg@spectre.unm.edu (Jeffrey P. Golden) writes:
- > Reply-To: jpg@macsyma.com
- >
- > Given all the recent messages about comparative programming in
- > the various CAS, I thought the following might be elucidating.
- >
- > Barry Simon, "Symbolic Math: Problems and Solutions",
- > Notices of the AMS, Vol. 39, No. 7, pp. 700-710, Sept. 1992
- > has the following problem:
- >
- > 9. Rule based algebra
- > Consider the Clifford algebra in 10 variables, that is the
- > complex algebra with ten generators, s0,...,s9 obeying
- > si sj + sj si = 0 if i is different from j
- > si si = 1
- > That is multiplication is NOT commutative (but is assumed
- > associative). Compute (s0+s1+....+s9)^5
-
- The FORM solution seems easiest to me.
- 1: Brute force:
- F sa,sb,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9;
- Local F = (s0+s1+s2+s3+s4+s5+s6+s7+s8+s9)^5;
- repeat;
- id sa?*sa? = 1;
- id,disorder,sb?*sa? = -sa*sb;
- endrepeat;
- print;
- .end
- This takes of the order of 3 minutes on a SPARC 2.
- Slightly better:
- 2: Build up the powers:
- #define MAXPOW "5"
- F sa,sb,s0,s1,s2,s3,s4,s5,s6,s7,s8,s9;
- Local F = s0+s1+s2+s3+s4+s5+s6+s7+s8+s9;
- #do i = 2,'MAXPOW'
- multiply,right,(s0+s1+s2+s3+s4+s5+s6+s7+s8+s9);
- repeat;
- id sa?*sa? = 1;
- id,disorder,sb?*sa? = -sa*sb;
- endrepeat;
- .sort
- #enddo
- print;
- .end
- This takes of the order of 0.1 sec on a SPARC 2
- Note that programming the anticommutation relation is rather natural.
- Note 2: The disorder option does not exist in FORM 1. You need FORM 2 for it.
-
- Jos Vermaseren
-