ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 03 Dec 2016 15:44:40 -0600The interval I(u,v) between a pair of vertices u,v in graphhttps://ask.sagemath.org/question/35905/the-interval-iuv-between-a-pair-of-vertices-uv-in-graph/Hello Everyone,
I am really new to the sagemath and I need your help with finding the interval between **all pair of vertices** in a graph.
Def: In graph G, the Interval between a pair of vertices u and v is: I(u,v)={w|d(u,v)=d(u,w)+d(w,v)}
In other words, the interval between a pair of vertices u and v is : all vertices that lies on all shortest paths between them.
I want to find the interval between all pairs of vertices in graph. I do not know if such function already exists in sagemath or I do need to implement my own.
Thanks,
HakeemHakeemSat, 03 Dec 2016 15:44:40 -0600https://ask.sagemath.org/question/35905/Combining intervalshttps://ask.sagemath.org/question/9739/combining-intervals/Hi, is it possible to do the following and get a result?:
$(\overline{(-4,1)}\cup[0,\infty)) \backslash ((-\infty,4)\cap[-1,3])$
Plotting would also be nice.randomuserFri, 25 Jan 2013 02:10:41 -0600https://ask.sagemath.org/question/9739/interface to MPFIhttps://ask.sagemath.org/question/9431/interface-to-mpfi/Thanks to the Sage team for providing an interface to the MPFI package for arbitrary precision interval arithmetic. It looks like the MPFI version used in Sage is 1.5.1, the most recent. Reading the included info file mpfi.info, there are references to additional functionality such as extended interval division, which would be useful for implementing extended interval Newton and related numerical methods. I can't tell if this is available in MPFI 1.5.1 and does not yet have a wrapper in Sage (not complaining!), or will only be "available soon" in MPFI as the file states.
Since I can't find any information at any MPFI site (Mon français n'est pas très bon), does anyone know if or when the extended interval arithmetic functions will be implemented in MPFI? And this looks like it would be quite a job to get into Sage as well. For example, currently:
1./RIF(-1.,1.)
[-infinity .. +infinity]
The extended interval division of this would be the (sharper bound) union of two intervals:
[-infinity .. -1] <union> [1 .. +infinity]
which would seem to require a data structure to hold multiple RIF objects. A numerical algorithm can then detect this split, perform iterations on both parts, and (ideally) find all solutions to the original problem without multiple starting points. This could get messier in higher dimensions since multiple intervals now become multiple boxes, cubes, and hypercubes.
I see that MPFI or something does solve systems of equations over RIF:
A = matrix([[RIF(2,2.1), RIF(1,1.1)],[RIF(1,1.1),RIF(2,2.0)]]); A
[2.1? 1.1?]
[1.1? 2]
b = vector([RIF(1,1.1),RIF(1,1.1)]); b
(1.1?, 1.1?)
x = A\b
x[0].endpoints()
(0.230244068953746, 0.426562500000001)
x[1].endpoints()
(0.259218749999999, 0.447175285884964)
which is very nice, but also breaks down if the determinant of the matrix is an interval that includes 0, resulting in all infinities for the solution. There is an entire area of numerical linear algebra now devoted to solving these problems, which I'm interested in implementing. I might be able to handle the extended interval arithmetic with my own generalized Python classes, but it's better to use whatever standards are being developed.
burningbrightMon, 15 Oct 2012 13:15:10 -0500https://ask.sagemath.org/question/9431/