APL's relation to perl 
Author Message
 APL's relation to perl


> [followup crossposted to sci.math - should be of interest there]


>>> >I WISH! APL is (was) one of the best linear variable programming
>>> >languages in existence. Imagine a primitive function (domino) to
>>> >invert an arbitry matrix (of ANY number of dimensions even!). How many
>>>                                             ^^^^^^^^^^

APL complains when you ask it to invert an array of dimension other
than two.

>>> <OT>
>>> I don't know APL, I am only a beginner in Perl, and OTOH I'm not an
>>> expert in (multi)linear algebra either, but AFAIK there's no (+ I
>>> can't devise a) generally accepted/acceptable notion of multiplication
>>> (and thus inversion) of "ANY number of dimension"-al matrices,

I think this is wrong; does the following not define a bilinear
multiplication between certain n- and k-dimensional "matrices"?  
It is a straightforward extension of how you go from inner product
of vectors, to linear transform  of vector by matrix, to product
of matrices:

        Let A_n, A_k be "matrices" of dimensions n, k respectively
        with the n-th axis of A_n having the same length as the
        first axis of A_k.  Let I_n and I_k be the sets of all
        tuples of coordinates of elements of A_n, A_k respectively
        and let J_n and J_k be the sets of (n-1)- and (k-1)-tuples
        obtained by dropping the last element of each tuple in I_n
        and the first element of I_k respectively.  Then if j, j'
        are in J_n, J_k respectively, each specifies a vector v, v'
        of A_n, A_k respectively ... the items having coordinates
        matching j in all but the last position and j' in all but
        the first, and (j, j') specifies a single cell in an (n+k-2)
        dimensional "matrix".  Let the value in this cell be the
        inner product v.v'.  This "matrix" is the product A_n*A_k.

This definition looks strangely familiar ...

Now if n, k are equal, the dimension of A_n*A_k is 2n-2,
which shows (one reason) why n=2 is special.

In any case ... APL was constructed by a mathematician, for the
purpose of precisely describing algorithms and computations to
other mathematicians (K.E. Iverson, 1962,  "A Programming Language",
NY: Wiley), and was made into an executable notation several years

Mon, 11 Jul 2005 15:03:16 GMT  
 [ 1 post ] 

 Relevant Pages 

1. clever lawyers, public-relations brainstorms and a giant corporation's ardor

2. clever lawyers, public-relations brainstorms and a giant corporation's ardor

3. Perl functions similar to APL?

4. Perl and English (and APL)

5. a Perl script's interaction with Ruby's system call

6. converting some 'eval's from perl

7. tcl's equivalence to Perl's pack function

8. Workspace transfer between STSC's and DIGITAL's APL

9. I-APL, Vanguard APL, and APL.68000

10. Can't get AWK output to a PERL script

11. O'Reilly Perl Conference Paper Submission Deadline

12. REXX vs Perl (Really on TCL and Jay's Note)


Powered by phpBB® Forum Software