Re: Finding determinants of nxn matrices
- To: mathgroup at smc.vnet.net
- Subject: [mg31805] Re: [mg31758] Finding determinants of nxn matrices
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Sun, 2 Dec 2001 04:25:57 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Here is the complete solution for the case n=3. I hope it is
self-explanatory.
In[1]:=
lambda[A_?MatrixQ]:=Abs[Det[Minors[A]]]
In[2]:=
matrices=Union[
Map[Partition[#,3]&,
Map[ReplacePart[#,6,3]&,Distribute[Table[Range
[-1,1],{3^2}],List]]]];
In[3]:=
Length[matrices]
Out[3]=
6561
In[4]:=
largest=Max[lambda/@matrices]
Out[4]=
196
In[5]:=
Count[matrices,_?(lambda[#]==largest&)]
Out[5]=
128
On Saturday, December 1, 2001, at 04:44 PM, cavc_uk wrote:
>
> Hello.
>
> I am interested in a number lamda(A) associated with an nxn matrix, A,
> which mathematica will compute when given the input Abs[Det[Minors[A]]].
> I am interested in matrices with all the entries either -1,0 or 1
> except that the (1,3) entry must be 6. I want to know how large
> lamda(A) can possibly be when A is allowed to range over all possible
> such nxn matrices. NB only for n<=3. I need to write a function in
> Mathematica which will find that answer and also will tell us for how
> many of the 3^((n^2)-1) possible matrices that number is actually
> obtained.
>
> Can anyone suggest the best way to go about this problem?
>
> Thanks
> Judith
>
>
>
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/