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

Added Möbius transform to discrete module #14853

merged 2 commits into from Jul 2, 2018


None yet
2 participants

sidhantnagpal commented Jul 1, 2018

Brief description of what is fixed or changed

Möbius transform is implemented using Yate's Dynamic Programming (DP) method.
The method mobius_transform takes subset as the argument, which specifies if the enumeration is over subsets or supersets for the transform.
having the usage as:

In []: seq = list(symbols('w x y z'))

In []: mobius_transform(seq)
Out[]: [w, w + x, w + y, w + x + y + z]

In []: inverse_mobius_transform(_)
Out[]: [w, x, y, z]

In []: inverse_mobius_transform(seq, subset=False)
Out[]: [w - x - y + z, x - z, y - z, z]

In []: mobius_transform(_, subset=False)
Out[]: [w, x, y, z]

Other comments

sidhantnagpal added some commits Jun 29, 2018

@Abdullahjavednesar Abdullahjavednesar requested a review from jksuom Jul 1, 2018


This comment has been minimized.


jksuom commented Jul 2, 2018

Thanks, this looks good to me.

@jksuom jksuom merged commit 8492912 into sympy:master Jul 2, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment