大矩阵的行列式 [英] Determinant of Large Matrix

查看:80
本文介绍了大矩阵的行列式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在使用numpy来计算看起来像

这个矩阵的决定因素(13x13):


[[0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]

[1. 0 1. 4. 1. 9. 4. 4. 1. 1. 4. 9. 4. 9.]

[1. 1. 0. 1. 4. 4. 9. 9 .4。4. 1. 4. 1. 4.]

[1. 4. 1. 0. 9. 1. 4. 4. 9. 1. 4. 1. 4. 1 。]

[1. 1. 4. 9. 0. 4. 4. 4. 1. 4. 1. 9. 4. 9.]

[1 。9. 4. 1. 4. 0. 4. 4. 9. 4. 1. 1. 4. 1.]

[1. 4. 9. 4. 4. 4. 0 1. 1. 1. 9. 1. 9. 4.]

[1. 4. 9. 4. 4. 4. 1. 0. 4. 1. 9. 4. 4 .1。]

[1. 1. 4. 9. 1. 9. 1. 4. 0. 4. 4. 4. 4. 9.]

[1. 1. 4. 1. 4. 4. 1. 1. 4. 0. 9. 4. 9. 4.]

[1. 4. 1. 4. 1. 1 9. 9. 4. 9. 0. 4. 1. 4.]

[1. 9. 4. 1. 9. 1. 1. 4. 4. 4. 4. 0 4. 1.]

[1. 4. 1. 4. 4。 4. 9. 4. 4. 9. 1. 4. 0. 1.]

[1. 9. 4. 1. 9. 1. 4. 1. 9. 4. 4。 1. 1. 0.]]


对于这个矩阵,我得到的是numpy:


2774532095.9999971


但我感觉我超过了浮子的容量。

是否有人知道如何对待这个?认为我可以获得这个矩阵的决定因素,这是荒谬的吗?是否有一个python包可以帮助我?
帮助我?

非常感谢任何答案。


James

解决方案



2007年6月6日13点10分,James Stroud写道:


Hello All,


我正在使用numpy来计算看起来像这样的矩阵的决定因素(13x13):


[[0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]

[ 1. 0. 1. 4. 1. 9. 4. 4. 1. 1. 4. 9. 4. 9.]

[1. 1. 0. 1. 4. 4。 9. 9. 4. 4. 1. 4. 1. 4.]

[1. 4. 1. 0. 9. 1. 4. 4. 9. 1. 4. 1. 1。 4. 1.]

[1. 1. 4. 9. 0. 4. 4. 4. 1. 4. 1. 9. 4. 9.]

[1. 9. 4. 1. 4. 0. 4. 4. 9. 4. 1. 1. 4. 1.]

[1. 4. 9. 4. 4。 4. 0 1. 1. 1. 9. 1. 9. 4.]

[1. 4. 9. 4. 4. 4. 1. 0. 4. 1. 9。 4. 4. 1.]

[1. 1. 4. 9. 1. 9. 1. 4. 0. 4. 4. 4. 4. 9.]

[1. 1. 4. 1. 4。 4. 1. 1. 4. 0. 9. 4. 9. 4.]

[1. 4. 1. 4. 1. 1. 9. 9. 4. 9. 0。 4. 1. 4.]

[1. 9. 4. 1. 9. 1. 1. 4. 4. 4. 4. 0. 4. 1.]

[1. 4. 1. 4. 4. 4. 9. 4. 4. 9. 1. 4. 0. 1.]

[1. 9. 4. 1。 9. 1. 4. 1. 9. 4. 4. 1. 1. 0.]]


对于这个矩阵,我得到的是numpy:


2774532095.9999971


是否有人知道如何对待这个?认为我是否b / b
得到这个矩阵的决定因素是荒谬的吗?是否有一个python包可以帮助我?
帮助我?

非常感谢任何答案。


James

-
http:/ /mail.python.org/mailman/listinfo/python-list



你确定NumPy返回float结果。据我所知,它是

返回双打

(约16位数)

------------ ------------------------------------------

家不是你出生的地方,而是你的心在哪里找到平安 -

Tommy Nordgren,垂死的老人
to ************@comhem.se




James Stroud je napisao / la:


Hello All,


我正在使用numpy来计算看起来像
$的矩阵的行列式b $ b this(13x13):


[[0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1。 ]

[1. 0. 1. 4. 1. 9. 4. 4. 1. 1. 4. 9. 4. 9.]

[1。 1. 0. 1. 4. 4. 9. 9. 4. 4. 1. 4. 1. 4.]

[1. 4. 1. 0. 9. 1. 4。 4. 9. 1. 4. 1. 4. 1.]

[1. 1. 4. 9. 0. 4. 4. 4. 1. 4. 1. 9. 4。 9.]

[1. 9. 4. 1. 4. 0. 4. 4. 9. 4. 1. 1. 4. 1.]

[ 1. 4. 9. 4. 4. 4. 0. 1. 1. 1. 9. 1. 9. 4.]

[1. 4. 9. 4. 4. 4。 1. 0 4. 1. 9. 4. 4. 1.]

[1. 1. 4. 9. 1. 9。 1. 4. 0. 4. 4. 4. 4. 9.]

[1. 1. 4. 1. 4. 4. 1. 1. 4. 0. 9. 4。 9. 4.]

[1. 4. 1. 4. 1. 1. 9. 9. 4. 9. 0. 4. 1. 4.]

[1. 9. 4. 1. 9. 1. 1. 4. 4. 4. 4. 0. 4. 1.]

[1. 4. 1. 4. 4。 4. 9. 4. 4. 9. 1. 4. 0. 1.]

[1. 9. 4. 1. 9. 1. 4. 1. 9. 4. 4。 1. 1. 0.]]


对于这个矩阵,我得到的是numpy:


2774532095.9999971


但我感觉我超过了浮子的容量。

是否有人知道如何对待这个?认为我可以获得这个矩阵的决定因素,这是荒谬的吗?是否有一个python包可以帮助我?
帮助我?

非常感谢任何答案。


James



您是否尝试过使用matlab验证结果? matlab非常快

并且可以使用大型矩阵,所以这应该没有问题

它...


6月6日上午6:47,Tommy Nordgren< tommy.nordg ... @ comhem.sewrote:


6月6日2007年,13.10,James Stroud写道:


Hello All,


I'使用numpy计算矩阵的行列式看起来像

this(13x13):


[[0. 1 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]

[1. 0. 1. 4. 1. 9. 4. 4 1. 1. 4. 9. 4. 9.]

[1. 1. 0. 1. 4. 4. 9. 9. 4. 4. 1. 4. 1. 4 。]

[1. 4. 1. 0. 9. 1. 4. 4. 9. 1. 4. 1. 4. 1.]

[1 1. 4. 9. 0. 4. 4. 4. 1. 4. 1. 9. 4. 9.]

[1. 9. 4. 1. 4. 0. 4 4。 9. 4. 1. 1. 4. 1.]

[1. 4. 9. 4. 4. 4. 0. 1. 1. 1. 9. 1. 9. 4。 ]

[1. 4. 9. 4. 4. 4. 1. 0. 4. 1. 9. 4. 4. 1.]

[1。 1. 4. 9. 1. 9. 1. 4. 0. 4. 4. 4. 4. 9.]

[1. 1. 4. 1. 4. 4. 1。 1. 4. 0. 9. 4. 9. 4.]

[1. 4. 1. 4. 1. 1. 9. 9. 4. 9. 0. 4. 1。 4.]

[1. 9. 4. 1. 9. 1. 1. 4. 4. 4. 4. 0. 4. 1.]

[ 1. 4. 1. 4. 4. 4. 9. 4. 4. 9. 1. 4. 0. 1.]

[1. 9. 4. 1. 9. 1。 4. 1. 9. 4. 4. 1. 1. 0.]]


对于这个矩阵,我得到了numpy :


2774532095.9999971


但我有一种感觉我'' m超过这里的浮子容量。

是否有人知道如何对待这个?认为我是否b / b
得到这个矩阵的决定因素是荒谬的吗?是否有一个python包可以帮助我?b $ b帮助我?


非常感谢任何答案。


James

-
http://mail.python.org/mailman/listinfo/python-list



你确定NumPy返回浮动结果。据我所知,它是
返回双打



我不知道NumPy,但一般来说,python float是双重:
http://docs.python.org/lib /typesnumeric.html

"浮点数在C中使用double实现。所有投注

除非你碰巧知道机器,否则它们的精度都会关闭你是

使用。"


(约16位数)

------ ------------------------------------------------ <无线电通信/>
家庭不是你出生的地方,而是你的心在哪里找到平安 -

Tommy Nordgren,垂死的老人

tommy.nordg ... @ comhem.se



Hello All,

I''m using numpy to calculate determinants of matrices that look like
this (13x13):

[[ 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[ 1. 0. 1. 4. 1. 9. 4. 4. 1. 1. 4. 9. 4. 9.]
[ 1. 1. 0. 1. 4. 4. 9. 9. 4. 4. 1. 4. 1. 4.]
[ 1. 4. 1. 0. 9. 1. 4. 4. 9. 1. 4. 1. 4. 1.]
[ 1. 1. 4. 9. 0. 4. 4. 4. 1. 4. 1. 9. 4. 9.]
[ 1. 9. 4. 1. 4. 0. 4. 4. 9. 4. 1. 1. 4. 1.]
[ 1. 4. 9. 4. 4. 4. 0. 1. 1. 1. 9. 1. 9. 4.]
[ 1. 4. 9. 4. 4. 4. 1. 0. 4. 1. 9. 4. 4. 1.]
[ 1. 1. 4. 9. 1. 9. 1. 4. 0. 4. 4. 4. 4. 9.]
[ 1. 1. 4. 1. 4. 4. 1. 1. 4. 0. 9. 4. 9. 4.]
[ 1. 4. 1. 4. 1. 1. 9. 9. 4. 9. 0. 4. 1. 4.]
[ 1. 9. 4. 1. 9. 1. 1. 4. 4. 4. 4. 0. 4. 1.]
[ 1. 4. 1. 4. 4. 4. 9. 4. 4. 9. 1. 4. 0. 1.]
[ 1. 9. 4. 1. 9. 1. 4. 1. 9. 4. 4. 1. 1. 0.]]

For this matrix, I''m getting this with numpy:

2774532095.9999971

But I have a feeling I''m exceeding the capacity of floats here. Does
anyone have an idea for how to treat this? Is it absurd to think I could
get a determinant of this matrix? Is there a python package that could
help me?

Many thanks for any answers.

James

解决方案


On 6 jun 2007, at 13.10, James Stroud wrote:

Hello All,

I''m using numpy to calculate determinants of matrices that look like
this (13x13):

[[ 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[ 1. 0. 1. 4. 1. 9. 4. 4. 1. 1. 4. 9. 4. 9.]
[ 1. 1. 0. 1. 4. 4. 9. 9. 4. 4. 1. 4. 1. 4.]
[ 1. 4. 1. 0. 9. 1. 4. 4. 9. 1. 4. 1. 4. 1.]
[ 1. 1. 4. 9. 0. 4. 4. 4. 1. 4. 1. 9. 4. 9.]
[ 1. 9. 4. 1. 4. 0. 4. 4. 9. 4. 1. 1. 4. 1.]
[ 1. 4. 9. 4. 4. 4. 0. 1. 1. 1. 9. 1. 9. 4.]
[ 1. 4. 9. 4. 4. 4. 1. 0. 4. 1. 9. 4. 4. 1.]
[ 1. 1. 4. 9. 1. 9. 1. 4. 0. 4. 4. 4. 4. 9.]
[ 1. 1. 4. 1. 4. 4. 1. 1. 4. 0. 9. 4. 9. 4.]
[ 1. 4. 1. 4. 1. 1. 9. 9. 4. 9. 0. 4. 1. 4.]
[ 1. 9. 4. 1. 9. 1. 1. 4. 4. 4. 4. 0. 4. 1.]
[ 1. 4. 1. 4. 4. 4. 9. 4. 4. 9. 1. 4. 0. 1.]
[ 1. 9. 4. 1. 9. 1. 4. 1. 9. 4. 4. 1. 1. 0.]]

For this matrix, I''m getting this with numpy:

2774532095.9999971

But I have a feeling I''m exceeding the capacity of floats here. Does
anyone have an idea for how to treat this? Is it absurd to think I
could
get a determinant of this matrix? Is there a python package that could
help me?

Many thanks for any answers.

James
--
http://mail.python.org/mailman/listinfo/python-list

Are you sure NumPy return float results. As far as I know, it
returns doubles
(about 16 digits)
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
to************@comhem.se



James Stroud je napisao/la:

Hello All,

I''m using numpy to calculate determinants of matrices that look like
this (13x13):

[[ 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[ 1. 0. 1. 4. 1. 9. 4. 4. 1. 1. 4. 9. 4. 9.]
[ 1. 1. 0. 1. 4. 4. 9. 9. 4. 4. 1. 4. 1. 4.]
[ 1. 4. 1. 0. 9. 1. 4. 4. 9. 1. 4. 1. 4. 1.]
[ 1. 1. 4. 9. 0. 4. 4. 4. 1. 4. 1. 9. 4. 9.]
[ 1. 9. 4. 1. 4. 0. 4. 4. 9. 4. 1. 1. 4. 1.]
[ 1. 4. 9. 4. 4. 4. 0. 1. 1. 1. 9. 1. 9. 4.]
[ 1. 4. 9. 4. 4. 4. 1. 0. 4. 1. 9. 4. 4. 1.]
[ 1. 1. 4. 9. 1. 9. 1. 4. 0. 4. 4. 4. 4. 9.]
[ 1. 1. 4. 1. 4. 4. 1. 1. 4. 0. 9. 4. 9. 4.]
[ 1. 4. 1. 4. 1. 1. 9. 9. 4. 9. 0. 4. 1. 4.]
[ 1. 9. 4. 1. 9. 1. 1. 4. 4. 4. 4. 0. 4. 1.]
[ 1. 4. 1. 4. 4. 4. 9. 4. 4. 9. 1. 4. 0. 1.]
[ 1. 9. 4. 1. 9. 1. 4. 1. 9. 4. 4. 1. 1. 0.]]

For this matrix, I''m getting this with numpy:

2774532095.9999971

But I have a feeling I''m exceeding the capacity of floats here. Does
anyone have an idea for how to treat this? Is it absurd to think I could
get a determinant of this matrix? Is there a python package that could
help me?

Many thanks for any answers.

James

have you tried using matlab to verify the result? matlab is very fast
and can work with large matrices, so this should be no problem for
it...


On Jun 6, 6:47 am, Tommy Nordgren <tommy.nordg...@comhem.sewrote:

On 6 jun 2007, at 13.10, James Stroud wrote:

Hello All,

I''m using numpy to calculate determinants of matrices that look like
this (13x13):

[[ 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.]
[ 1. 0. 1. 4. 1. 9. 4. 4. 1. 1. 4. 9. 4. 9.]
[ 1. 1. 0. 1. 4. 4. 9. 9. 4. 4. 1. 4. 1. 4.]
[ 1. 4. 1. 0. 9. 1. 4. 4. 9. 1. 4. 1. 4. 1.]
[ 1. 1. 4. 9. 0. 4. 4. 4. 1. 4. 1. 9. 4. 9.]
[ 1. 9. 4. 1. 4. 0. 4. 4. 9. 4. 1. 1. 4. 1.]
[ 1. 4. 9. 4. 4. 4. 0. 1. 1. 1. 9. 1. 9. 4.]
[ 1. 4. 9. 4. 4. 4. 1. 0. 4. 1. 9. 4. 4. 1.]
[ 1. 1. 4. 9. 1. 9. 1. 4. 0. 4. 4. 4. 4. 9.]
[ 1. 1. 4. 1. 4. 4. 1. 1. 4. 0. 9. 4. 9. 4.]
[ 1. 4. 1. 4. 1. 1. 9. 9. 4. 9. 0. 4. 1. 4.]
[ 1. 9. 4. 1. 9. 1. 1. 4. 4. 4. 4. 0. 4. 1.]
[ 1. 4. 1. 4. 4. 4. 9. 4. 4. 9. 1. 4. 0. 1.]
[ 1. 9. 4. 1. 9. 1. 4. 1. 9. 4. 4. 1. 1. 0.]]

For this matrix, I''m getting this with numpy:

2774532095.9999971

But I have a feeling I''m exceeding the capacity of floats here. Does
anyone have an idea for how to treat this? Is it absurd to think I
could
get a determinant of this matrix? Is there a python package that could
help me?

Many thanks for any answers.

James
--
http://mail.python.org/mailman/listinfo/python-list


Are you sure NumPy return float results. As far as I know, it
returns doubles

I don''t know about NumPy, but in general, a python float is a double:
http://docs.python.org/lib/typesnumeric.html
"Floating point numbers are implemented using double in C. All bets on
their precision are off unless you happen to know the machine you are
working with."

(about 16 digits)
------------------------------------------------------
"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"
tommy.nordg...@comhem.se



这篇关于大矩阵的行列式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆