The Laplace expansion of determinants in J:
minors=: 1 |:\."2^:2 ] NB. from
http://www.jsoftware.com/jwiki/Essays/Minors
det=: -/ .*
] m=: 5 5 [EMAIL PROTECTED] 10
0 7 8 9 2
2 5 5 5 3
8 0 0 5 9
6 4 0 6 4
9 8 5 7 4
] cofactors=: (_1^+/&>{i.&.>$m) * det minors m
250 _880 400 770 _650
_1030 1810 _580 _1250 1610
190 _562 304 158 40
_410 749 _923 179 265
630 _402 474 18 _570
det m
2670
({.m) +/ .* {.cofactors
2670
({."1 m) +/ .* {."1 cofactors
2670
i=: ?#m
(i{m) +/ .* i{cofactors
2670
j=: ?#m
(j{"1 m) +/ .* j{"1 cofactors
2670
+/"1 m * cofactors
2670 2670 2670 2670 2670
+/ m * cofactors
2670 2670 2670 2670 2670
----- Original Message -----
From: Roger Hui <[EMAIL PROTECTED]>
Date: Wednesday, November 7, 2007 18:41
Subject: Re: [Jchat] why did Dijkstra dislike APL so much?
To: Chat forum <[email protected]>
> A few other interesting contextual tidbits.
>
> - The encounter was recorded in "A Source Book in APL".
> http://www.jsoftware.com/jwiki/Doc/A_Source_Book_in_APL
> The occasion was the Working Conference on Mechanical
> Language Structures, Princeton, NJ, August 14-16, 1963.
>
> - The list of conferees included John Backus, Haskell Curry,
> Dijkstra, Robert Floyd, Sheila Greibach, Iverson, Alan Newell,
> Alan Perlis, Maurice Wilkes. 7 of these people later
> won the Turing Award.
>
> - Just before Dijkstra question, S. Gorn asked:
> Does your generalized operator notation for matrices
> lead to a simpler proof of the generalized Laplace expansion
> of determinants?
> Followed by Ken's answer of about 20 dense lines. If Ken
> did that on the fly in immediate response then it was
> a fantastic feat. The answer to Dijkstra's question was
> far far easier in comparison.
>
>
>
> ----- Original Message -----
> From: Roger Hui <[EMAIL PROTECTED]>
> Date: Wednesday, November 7, 2007 18:10
> Subject: Re: [Jchat] why did Dijkstra dislike APL so much?
> To: Chat forum <[email protected]>
>
> > I might say:
> >
> > +/ , M * M = +/&> {i.&.> $M
> > 6
> >
> > If I were under pressure (e.g. with Dijkstra in the audience
> > asking the question) and wanted to avoid any fumbling,
> > I might say:
> >
> > +/ , M * M = (i.#M) +/ i.{:$M
> > 6
> >
> > And then from that to successively "better" answers
> > +/ , M * M = (#M) +/&i. {:$M
> > +/ , M * M = +/&i./ $M
> > +/ , M * M = +/&> {i.&.> $M
> > not forgetting to point out that the last expression
> > works for M of any rank.
> >
> > Dijkstra's question in 1963 was: How would you represent
> a
> > more complex operation, for example, the sum of all elements
> of
> > a matrix which are equal to the sum of the corresponding row
> > and column indices?
> >
> >
> >
> > ----- Original Message -----
> > From: Oleg Kobchenko <[EMAIL PROTECTED]>
> > Date: Wednesday, November 7, 2007 17:00
> > Subject: Re: [Jchat] why did Dijkstra dislike APL so much?
> > To: Chat forum <[email protected]>
> >
> > > What is the standard J answer?
> > >
> > > ((= +/@#&, [) +/&i./@$) i.3 4
> > > 6
> > > (+/@#~&, (= +/&i./@$)) i.3 4
> > > 6
> > > (+/@,@:* (= +/&i./@$)) i.3 4
> > > 6
> > > +/,M*M=+/&i./$ M =. i.3 4
> > > 6
> > >
> > >
> > > --- Roger Hui <[EMAIL PROTECTED]> wrote:
> > >
> > > > I don't know of any and I suspect Ken was too smart to respond.
> > > >
> > > > There was an encounter between KEI and Dijkstra recorded in
> > > > http://keiapl.info/anec/#Dijkstra
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: Richard Hill <[EMAIL PROTECTED]>
> > > > Date: Wednesday, November 7, 2007 15:21
> > > > Subject: Re: [Jchat] why did Dijkstra dislike APL so much?
> > > > To: Chat forum <[email protected]>
> > > >
> > > > > Is there any record, or even an anecdote, of KEI's
> > > > > own response to Dijkstra's comment?
> > > > > Richard Hill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm