Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement intersecting product using Möbius transform #14954

Merged
merged 2 commits into from Jul 23, 2018

Conversation

Projects
None yet
2 participants
@sidhantnagpal
Copy link
Member

sidhantnagpal commented Jul 22, 2018

Brief description of what is fixed or changed

Möbius transform is used for calculating intersecting product (returns list of sum of products of elements grouped by bitwise AND of the corresponding sequence indices).
Usage for the same is:

>>> from sympy import symbols, S, I, intersecting_product
>>> u, v, x, y, z = symbols('u v x y z')

>>> intersecting_product([u, v], [x, y])
[u*x + u*y + v*x, v*y]

>>> intersecting_product([u, v, x], [y, z])
[u*y + u*z + v*y + x*y + x*z, v*z, 0, 0]

Other comments

The indices of each argument, considered as bit strings, correspond to
subsets of a finite set.
The intersecting product of given sequences is a sequence which contains

This comment has been minimized.

@jksuom

jksuom Jul 22, 2018

Member

Maybe the sequence?

subsets of a finite set.
The intersecting product of given sequences is a sequence which contains
sum of products of the elements of the given sequences grouped by

This comment has been minimized.

@jksuom

jksuom Jul 22, 2018

Member

Should this be plural? the sums?

This comment has been minimized.

@sidhantnagpal

sidhantnagpal Jul 22, 2018

Author Member

Yes, seems clearer.

@jksuom jksuom merged commit f0bfc2c into sympy:master Jul 23, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.