How would you program this?

James Stroud jstroud at mbi.ucla.edu
Wed Mar 2 13:53:08 EST 2005


>
> Rows:
> 3 + B + C + D = 22
> E + F + 8 + H = 26
> I + J + K + 8 = 31
> M + 7 + O + P = 25
>
> Col sums:
> 24, 18, 31, 31
>
> Diag sums:
> 3 + F + K + P = 24
> M + J + 8 + D = 24
>
>
>

This is a system of 12 variables and 10 equations. Looks like there will be 
more than one solution (if I remember my 8th grade algebra--its beginning to 
get very foggy). Given a proper set of linear equations, I think numarray and 
scientific python have very convenient tools for this. An introductory linear 
algebra book can provide everything you need to know about this topic.

-- 
James Stroud, Ph.D.
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095



More information about the Python-list mailing list