#18137: Centrality betweenness in Sage
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.6
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  421dc01c948b631dd227c17aeba0459080293b94
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/18137         |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by vdelecroix):

 Replying to [comment:12 ncohen]:

 > Sooooooo please don't just limit your argumentation to "not exact=BAD".

 Do not oversimplify. My argumentation was "not exact => extra care
 needed". Floats are wonderful because they are very fast.

 > And this is the very reason why I wrote both implementations.

 Would be interesting to investigate (experimentally) the error
 propagation.

 > I am not so sure that it is a very big problem, however, as the
 algorithm will not add noise to noise like it can happen for PDE
 computations.

 Already summing (a lot of) floating point numbers create problems. Simple
 (not so dramatic) example
 {{{
 sage: sum(1.r/n for n in range(1,10000000))
 16.69531126585727
 sage: sum(1.r/n for n in range(9999999,0,-1))
 16.695311265859964
 }}}
 If you mix that with division, it is of course even worse.

 > I care about this, and for this reason I implemented both (which
 definitely took more than a couple of minutes as you can imagine), but I
 do believe that for this kind of computations working on floats is not
 that bad, for I know when the divisions occur and, well, we do not mind
 much.

 I also believe so, but it would be better if we were sure and the
 documentation mentioned it. Something like: if you do have a graph with
 `m` vertices and `n` edges than the worst case is an error of
 `function(m,n)`.

 Vincent

--
Ticket URL: <http://trac.sagemath.org/ticket/18137#comment:13>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to