Re: [sympy] Determine Redundant Equations

2022-07-15 Thread Oscar Benjamin
On Fri, 15 Jul 2022 at 22:25, 'Ephraim Bryski' via sympy
 wrote:
>
> Hi,
>
> I'm using nsolve to solve systems of equations. There are cases where the 
> number of equations is greater than the number of variables, but it can still 
> be solved because some equations are redundant. I would like to be able to 
> eliminate redundant equations beforehand, leaving only unique equations left 
> for nsolve. There are two approaches I was thinking of:
>
> Using == on each pair. The number of checks is (n-1)! though (where n is the 
> number of equations), so that would become very slow for large systems.

Surely there are N*(N-1)/2 pairs. In any case if you expect to find
equations that are precisely the same you can filter out repeated
equations with set(eqs).

> Apply simplify on the equations and get the unique simplified expressions. In 
> order for this to work, however, equivalent expressions would always have to 
> result in identical simplified expressions, and I'm not sure whether this is 
> the case.
>
> Does anyone have an idea for removing redundant equations from a system?

You need to be more specific about what kinds of equations you have
and how exactly they are redundant. Are the equations linear or
polynomial or what? What kinds of coefficients do they have?

It's much better if you can just make a small example and show what
the equations are.

--
Oscar

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxR%3DEq1t_XZAxG2ObNecH234Rs3p9iGwPhxH-HRjFmKKgA%40mail.gmail.com.


[sympy] Determine Redundant Equations

2022-07-15 Thread 'Ephraim Bryski' via sympy
Hi,

I'm using nsolve to solve systems of equations. There are cases where the 
number of equations is greater than the number of variables, but it can 
still be solved because some equations are redundant. I would like to be 
able to eliminate redundant equations beforehand, leaving only unique 
equations left for nsolve. There are two approaches I was thinking of:


   1. Using == on each pair. The number of checks is (n-1)! though (where n 
   is the number of equations), so that would become very slow for large 
   systems.
   2. Apply simplify on the equations and get the unique simplified 
   expressions. In order for this to work, however, equivalent expressions 
   would always have to result in identical simplified expressions, and I'm 
   not sure whether this is the case.

Does anyone have an idea for removing redundant equations from a system?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/b5fdd342-bac9-4807-9dc2-4f13811df5c2n%40googlegroups.com.