Am 24.01.11 07:47, schrieb tvn:
hi, just wondering if the Fourier-Motzkin algorithm for eliminating
variable from a system of linear inequalities is implemented somewhere in
Sage ?
Hi,
it shouldn't be too hard to implement Fourier-Motzkin elemimination
yourself. Here is the definition of
://wwwcip.informatik.uni-erlangen.de/~snphschn/sage/doc/output/pdf/de/tutorial/
You can either send me the corrections per email, or you can post them
to sage trac at:
http://trac.sagemath.org/sage_trac/ticket/9725
Thank you,
Philipp Schneider
Liebe Sage-Community,
Michael Mardaus und ich sind glücklich
Hi,
(...)
In my next try I used FiniteEnumeratedSet and cartesian_product, but
this is not iterable.
Is there any other way to do this?
there is a sage function called cartesian_product_iterator.
Greetings,
Phil
--
To post to this group, send email to sage-support@googlegroups.com
To
Hi,
Q1. How can I extract elements from a solution set?
For example, consider:
sage: x, y = var('x, y')
sage: solve([x+y==6, x-y==4], x, y)
[[x == 5, y == 1]]
Like this:
sage: sol = solve([x+y==6, x-y==4], x, y)
sage: sol[0]
[x == 5, y == 1]
sage: sol[0][0]
x == 5
sage: sol[0][0].rhs()
5
Hi,
Q2. How can I define the set of all primes up to some limit N but
excluding 2 and multiples of some number D?
Try this:
sage: N=100
sage: D=5
sage: [i for i in primes(3,N+1) if not i.divides(D)]
[3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71,
73, 79, 83, 89, 97]
Hi,
I'm trying to symbolically calculate the product of all roots of the
polynomial x^5 - 3*x -1.
(The answer should of course be 1).
Numerically I can compute the product as follows:
sage: x = polygen(QQbar)
sage: p=x^5-3*x-1
sage: p.roots(QQbar)
[(-1.214648042698462?, 1),
Nils, thanks for you answer.
Basically, the answer to How do I compute explicitly with the
conjugates of an algebraic number is Don't.
Actually I'm just trying to convert an example from mathematica/maple
to sage. Both give me the answer instantaneously.
Mathematica:
In[1] := s =
On Jul 23, 9:36 pm, Jason Grout jason-s...@creativetrax.com wrote:
On 7/23/10 11:35 AM, VictorMiller wrote:
There's abugin assigning 1 x 1 submatrices. assigning any
submatrices with dimensions bigger than 1 seems to work as expected:
sage: A =matrix(GF(2),100,100)
sage: C1