Last night, I tried to find a workaround but was unable to do so. The
problem lies in the CIM which does not account for non-commutativity.
I think a good starting point could be having two forms of the CIM : A
commutative form and a non-commutative one.
For example,
If a, b are two non-commutative variables and a^2 * b + b * a^2 is the
expression.
Normal form :
a b
a^2 * b 2 1
b * a^2 2 1
Non-commutative form :
a b a
a^2 * b 2 1 0
b * a^2 0 1 2
On Thursday, March 30, 2017 at 1:12:40 AM UTC+5:30, Aaron Meurer wrote:
>
> Does the algorithm work for noncommutative products as well? I have a
> pull request here that implements an ad hoc algorithm (it isn't from a
> paper, it's just something I came up with)
> https://github.com/sympy/sympy/pull/10271. I'd be interested to know
> if this algorithm can supercede that.
>
> I should point out that for your example, p = x - x**3 + x**5 - x**7,
> cse(horner(p)) gives the same result as the paper. However,
> multivariate horner is more complicated, so it could still be useful
> (see https://github.com/sympy/sympy/pull/11586).
>
> Note that Google has three evaluation periods starting this year
> (previously it was two). However, your timeline does not necessarily
> need to be split around those evaluation periods.
>
> Aaron Meurer
>
> On Wed, Mar 29, 2017 at 6:06 AM, Arif Ahmed
> <[email protected] <javascript:>> wrote:
> > Can you please review my latest proposal here :
> >
> https://docs.google.com/document/d/18pLah093CgClXM9i1LTPfkBjBvFDGhqQrR5TkkG8F2E/edit#
>
> >
> > On Sunday, March 26, 2017 at 3:16:37 AM UTC+5:30, Jason Moore wrote:
> >>
> >> Arif,
> >>
> >> Search the open issues for a variety of keywords that you've listed
> above
> >> and check out the wiki for more codegen needs. There is plenty to do!
> >>
> >>
> >> Jason
> >> moorepants.info
> >> +01 530-601-9791
> >>
> >> On Mon, Mar 20, 2017 at 5:28 AM, Arif Ahmed <[email protected]>
> >> wrote:
> >>>
> >>> Hi,
> >>> I am writing a proposal for GSoC 2017 to improve the codegen
> >>> module(
> https://github.com/sympy/sympy/wiki/GSoC-2017-Application-Arif-Ahmed:-Improve-Code-Generation-in-SymPy).
>
>
> >>>
> >>> Currently the proposal describes the workflow to implement a
> robust
> >>> CSE algorithm. However, implementing it definitely would not take more
> than
> >>> a month(maybe 5 weeks maximum).
> >>> I was looking for issues related to codegen, ufuncify, lambdify,
> >>> ccode, so that I can include a plan to fix those in my proposal as
> well.
> >>>
> >>> These are the implementations I would include :
> >>> 1. Make codegen work with
> >>> matrices.(https://github.com/sympy/sympy/issues/11991)
> >>> 2. Improve the Python code printer.
> >>> (https://github.com/sympy/sympy/issues/12213)
> >>> 3. Make ufuncify work with complex numbers.
> >>> (https://github.com/sympy/sympy/issues/10522)
> >>>
> >>> If anyone would like to see any new implementation in SymPy's
> >>> codegen then please do reply to this thread.
> >>>
> >>> Regards --
> >>> Arif Ahmed
> >>>
> >>> --
> >>> 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 [email protected].
> >>> To post to this group, send email to [email protected].
> >>> Visit this group at https://groups.google.com/group/sympy.
> >>> To view this discussion on the web visit
> >>>
> https://groups.google.com/d/msgid/sympy/5f25542d-3505-49c1-9e7d-034ad54b4654%40googlegroups.com.
>
>
> >>> For more options, visit https://groups.google.com/d/optout.
> >>
> >>
> > --
> > 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 [email protected] <javascript:>.
> > To post to this group, send email to [email protected]
> <javascript:>.
> > Visit this group at https://groups.google.com/group/sympy.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/sympy/aa779c10-05c5-4372-a4c7-77cb66759cbd%40googlegroups.com.
>
>
> >
> > For more options, visit https://groups.google.com/d/optout.
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/8b991f72-bbc6-4115-94c0-a3038f9b9236%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.