Back


Newsgroup sci.math.num-analysis 29161

Directory

Subject: Re: Complex Numbers in C -- From: kaz@vision.crest.nt.com (Kaz Kylheku)
Subject: Re: Complex Numbers in C -- From: ws@aix1.ucok.edu (Bill Stockwell)
Subject: Re: Complex Numbers in C -- From: dik@cwi.nl (Dik T. Winter)
Subject: help us -- From:
Subject: Re: Q: Galerkin Method -- From: "Jeffery J. Leader"
Subject: Re: [Q] Crank Nicolson -- From: psalzman@landau.ucdavis.edu (Peter Jay Salzman)
Subject: prime number problem -- From: Peter Koeppel
Subject: Re: Fitting complex functions -- From: spellucci@mathematik.th-darmstadt.de (Peter Spellucci)
Subject: Re: Problem in matrix theory -- From: spellucci@mathematik.th-darmstadt.de (Peter Spellucci)
Subject: Principal components of sparse matrices -- From: dan@eventus.co.il (Eventus company)
Subject: Re: Principal components of sparse matrices -- From: Combustion Dynamics
Subject: Re: Triangular Square Numbers -- From: jmcgowan@metric.inch.com (John McGowan)
Subject: Warning to parents! -- From: sa@genannounce.org (Staff /Admin)

Articles

Subject: Re: Complex Numbers in C
From: kaz@vision.crest.nt.com (Kaz Kylheku)
Date: 11 Dec 1996 19:47:19 GMT
In article <58mq4a$1i7g@r02n01.cac.psu.edu>,
Mike Yukish   wrote:
>In article  Dik T. Winter, dik@cwi.nl
>writes:
>>In article <58k2dj$ntl@frazier.backbone.ou.edu> ws@aix1.ucok.edu (Bill Stockwell) writes:
>> > I fail to see ANY advantage to doing this.
>>
>>Represent a + bi as
>>    [ a   -b ]
>>    [ b    a ]
>>and show in what way matrix multiplication does NOT correspond to complex
>>multiplication.
>>
>
>it makes fine sense to me. Multiplication by i corresponds
>to a rotation of 90 DEG in the complex plane.
>Multiplication by a complex number corresponds to a
>rotation and a scaling in the complex plane. A complex
>number can be written  r * EXP(i*theta). Similarly, the
>number
The point is not whether it makes algebraic sense but whether it behooves you
to use that representation in a program.
If you represent _both_ operands of a complex multiplication as 2x2 matrices,
and perform the naive matrix multiplication, you are doing twice the
computational work by computing two redundant values and using more storage. It
is a wasteful representation in both time and space.
You can avoid some of the computational work by allowing one of your operands
to be a column vector, in which case, a multiplication of (a + ib) * (c + id)
would be
	| a  -b | | c |
	| b   a | | d |
However, this is still less than optimal. Space is wasted to store the
left operand, and your compiler will  never  clue in to the fact that in your
matrices, the upper left is always the same as the lower right and lower left
is the additive inverse of the upper right. It will generate code to
redundantly fetch the value 'a' from separate objects, ditto for b.
I think that this was Bill Stockwell's point; he was not disputing the 
algebraic correctness of representing complex numbers as matrices, was he?
Of course, you may not care about efficiency, and using 2x2 matrices can save
you programming time if a matrix library is already available to you. The
saving in programming time can be more significant than a saving in memory
or computing time.
Return to Top
Subject: Re: Complex Numbers in C
From: ws@aix1.ucok.edu (Bill Stockwell)
Date: 11 Dec 1996 19:27:04 GMT
Dik T. Winter (dik@cwi.nl) wrote:
: In article <58k2dj$ntl@frazier.backbone.ou.edu> ws@aix1.ucok.edu (Bill Stockwell) writes:
:  > : One can 'conceive' of a complex as a 2x2 matrix, and have it inherit all
:  > : of the usual matrix operations (whatever they may be).
: ...
:  > I think you need to elaborate a bit more.  After all, representing a complex
:  > by a 2x2 matrix uses twice as much space as it needs to; moreover, the normal
:  > matrix multiplication it inherits would NOT correspond to complex multiplication;
:  > I fail to see ANY advantage to doing this.
: Represent a + bi as
:     [ a   -b ]
:     [ b    a ]
: and show in what way matrix multiplication does NOT correspond to complex
: multiplication.
: -- 
: dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland, +31205924131
: home: bovenover 215, 1025 jn  amsterdam, nederland; http://www.cwi.nl/~dik/
Point taken.  I was thinking he meant that a + bi would be represented as
    [ a   0 ]
    [ 0   b ]
whence the normal multiplication is now just componentwise.
No doubt, however, the old FORTRAN folks would REALLY scream about either repn.
--
*------------------------------------------------------------------*
* Bill Stockwell          | "The President will keep those         *
* Computing Science       |  promises he INTENDED to keep"         *
* U. of Central Oklahoma  |       -- George Stephanopoulos         *
*------------------------------------------------------------------*
Return to Top
Subject: Re: Complex Numbers in C
From: dik@cwi.nl (Dik T. Winter)
Date: Thu, 12 Dec 1996 01:38:19 GMT
In article <58n1u8$kng@frazier.backbone.ou.edu> ws@aix1.ucok.edu (Bill Stockwell) writes:
 > No doubt, however, the old FORTRAN folks would REALLY scream about either repn.
Perhaps.  But I am one (at least doing Fortran since 1971).  There are
many programs that represent complex matrices as real matrices with
doubled dimensions.
-- 
dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn  amsterdam, nederland; http://www.cwi.nl/~dik/
Return to Top
Subject: help us
From:
Date: 12 Dec 1996 01:00:35 GMT
Hi My name is Abdulhamid Mukhtar.  I am in 12th grade taking Calculus I&II.;
 We bet points against our teach. Now our class have 120 pts.  If any one
of you knows every tough question in any field, Calculus would prefer,
would like to give us please email me at this address
amukhtar@mail.bcpl.lib.md.us.   
Thank you for taking your time to read this message.    
Return to Top
Subject: Re: Q: Galerkin Method
From: "Jeffery J. Leader"
Date: Wed, 11 Dec 1996 18:03:37 -0800
Delphine Wolfersberger wrote:
> I have got a problem to solve a partial differential equation using
> the Galerkin method. At the end of the calculation, I obtain a system
> of differential equations that is not solvable. What can I do?
Solve that system of ODEs.  That's how all the (pseudo-)spectral methods
work.  The time-steppingis the last problem, and often a significant
one.
-- 
Mathematics possesses not only truth but supreme beauty, a beauty 
cold and austere, like that of a sculpture, without appeal to any 
part of our weaker nature, and capable of a stern perfection such 
as only the greatest art can show.  -Bertrand Russell
Return to Top
Subject: Re: [Q] Crank Nicolson
From: psalzman@landau.ucdavis.edu (Peter Jay Salzman)
Date: 12 Dec 1996 06:25:16 GMT
hi there
i just wanted to thank everyone for the comments.  i'm going to the library
tomorrow and get the reference.  thanks!
peter
Return to Top
Subject: prime number problem
From: Peter Koeppel
Date: Wed, 11 Dec 1996 16:29:21 +0100
Hi everybody,
for a long time ago I asked if there exists a natural number n <> 10, so
that
	123456789101112...(n-1)n(n-1)...121110987654321
is a prime.
I haven't yet an answer, but if you know anything about my problem I'd
be happy to get some info.
thanks a lot.
Peter.
Return to Top
Subject: Re: Fitting complex functions
From: spellucci@mathematik.th-darmstadt.de (Peter Spellucci)
Date: 12 Dec 1996 10:20:06 GMT
In article , Gerhard Heinzel  writes:
|> I need to fit a complex function of a real variable to complex measured
|> data. All algorithms I found so far assume real-valued data. Of course I
|> could define an SSQ or chi^2 as usual and applay a general minimization
|> algorithm, as e.g. Nelder-Mead Simplex. Buit I wonder if there are
|> specialized, more efficient algorithms or even implementations of e.g.
|> Levenberg-Marquardt?
|> 
|> I would be grateful for any hints, 
|> 
|> 
|> =====================================================================
|>   Gerhard Heinzel                          E-mail:   ghh@mpq.mpg.de
|>   Max-Planck-Institut fuer Quantenoptik
|>   Hans-Kopfermann-Str. 1                    Phone: +49(89)32905-268
|>   D-85748 Garching                                             -252
|>   Germany                                     Fax: +49(89)32905-200
|> =====================================================================
|> 
|> 
look at the section "lsq"  e.g. in "decision_tree on optimization-software"
to be found (for european people) at
http://www.mathematik.th-darmstadt.de/ags/ag8/spellucci.html
or otherwise at
http://plato.la.asu.edu/guide.html
hope this helps
peter
Return to Top
Subject: Re: Problem in matrix theory
From: spellucci@mathematik.th-darmstadt.de (Peter Spellucci)
Date: 12 Dec 1996 10:14:46 GMT
In article <58mkb1$oqq@news.lth.se>, tobias@maths.lth.se (Tobias Ryden) writes:
|> Hello,
|> 
|> Does anybody has a solution or reference to the following problem?
|> 
|> Let G be a symmetric and positive definite matrix, block partitioned
|> as
|> 
|> 
|>    [G_11 G_12 G_13 ... G_1n]
|>    [G_21 G_22 ....     G_2n]
|>    [...                    ]
|>    [...                    ]
|>    [G_n1 G_n2 ....     G_nn]
|> 
|> where all blocks are square and equally sized, and G_ii is positive
|> semi-definite for each i (which might be obvious?)
|> 
|> The problem is to minimize
|> 
|>    Q(a) = (\sum_{i=1}^n a_i G_ii)^{-1}
|> 
|>            * (\sum_{i,j} a_i a_j G_ij)
|> 
|>            * (\sum_{i=1}^n a_i G_ii)^{-1}
|> 
|> over all vectors a={a_i}, i=1,...,n, satisfying a_1+...+a_n=1 and a_i>=0
|> for each i. The minimization should be done in the sense of "definiteness",
|> i.e. if a* is the optimal vector and a is any other vector, then Q(a)-Q(a*)
|> is positive semi-definite.
|> 
|> The middle part of the expression can be viewed as a quadratic form in
|> the matrix blocks, while the outer parts, that are inverted, are linear
|> combinations of the diagonal blocks.
|> 
|> The questions are if a vector a* that is optimal in the sense above exists,
|> and, if so, if there is an algorithm to compute it?
|> 
looks like a typical PSD-problem. for solution and software look at:
   semidefinite programming and determinant maximization
   (solves c^Tx-log(detG(x)) subject to the linear matrix inequality
   constraints G(x)>0, F(x)>0, subsumes LP, QP, and other convex problems,
   includes the author's SP and MAXDET programs for which sources are
   available, binaries for major platforms, very convenient to use with Matlab)
     -> http://WWW-ISL.Stanford.EDU/~boyd/SDPSOL.html
     -> ftp://isl.stanford.edu/pub/boyd
   Solves semidefinite programs utilizing a Mehrotra-type predictor-corrector
   step, uses sparse matrix structure, only binaries for major platforms,
   includes documentation
     -> ftp://ftp.is.titech.ac.jp/pub/OpRes/software/SDPA/
hope this helps. peter
Return to Top
Subject: Principal components of sparse matrices
From: dan@eventus.co.il (Eventus company)
Date: Thu, 12 Dec 1996 13:28:39 GMT
How to do this or where to find a software? Non-zeros are distributed
uniformly over the matrix, without any pattern.
Return to Top
Subject: Re: Principal components of sparse matrices
From: Combustion Dynamics
Date: Thu, 12 Dec 1996 11:16:19 -0700
Are you talking about eigenvalues and eigenvectors?  If so, I know of 
two methods; subspace iteration, and the Lanczos method.  Any book on 
matrix methods should have at least one of them.  Also, you could 
consult works by K.J. Bathe regarding subspace iteration.  I believe 
that one of his books has Fortran source code.  For the Lanczos 
method, there is a reference by T.J.R. Hughes that has source code for 
large eigenproblems.
Rick.
Return to Top
Subject: Re: Triangular Square Numbers
From: jmcgowan@metric.inch.com (John McGowan)
Date: 12 Dec 1996 16:32:31 GMT
someone@nowhere.com wrote:
> a) What are they
> b) How can I check a number (x) to see if it is a Triangular square
> no.? 
                   Square numbers that are triangular
                   ----------------------------------
Pell's Equation: (not solved by Pell, but he wrote a text describing it)
                            x^2 - D*y^2 = 1
        We want positive integral solutions to this where D is square
        free (that is, cannot be divided by 4, 9, 16, 25, etc.)
        The trick to solving this is to note that there is a SMALLEST
        solution (if one has two solutions, (x1, y1) and (x2, y2) and
        x1V THEN
        REM check
        PRINT "ERROR": END
        ELSE
        REM print m, n and the number which is the m'th triangular,
        REM                                        n'th square number.
        PRINT USING "#### #### #########";M,N,U
        ENDIF
A = 3*M + 4*N + 1: B = 3*N + 2*M + 1: M=A: N=B
LOOP
END
                                Results
                                -------
                             m    n    Number
                          ---- ----  --------
                             1    1         1
                             8    6        36
                            49   35      1225
                           288  204     41616
                          1681 1189   1413721
                          9800 6930  48024900
                          etc. etc.      etc.
The numbers at the right are both triangular and square. They are
m(m+1)/2 (the m'th triangular number: m in the first column) and n^2
(the n'th square number: n in the second column).
(you may want to use UBASIC and convert the programme to get more digits 
 before overflow!)
Return to Top
Subject: Warning to parents!
From: sa@genannounce.org (Staff /Admin)
Date: 12 Dec 1996 07:39:07 GMT
Warning to parents!
Content of http://www.mrdoobie.com/ too controversial for children!
Return to Top

Downloaded by WWW Programs
Byron Palmer