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

Added new feature Schur_Number #14493

Closed
wants to merge 3 commits into from
Closed

Conversation

slacker404
Copy link
Contributor

The Schur number S(k) is the largest integer n for which the interval [1,n] can be partitioned into k sum-free sets. http://mathworld.wolfram.com/SchurNumber.html

I have also made the partition which can be proven by induction and I have added test cases

for j in subset:
if i + j in subset:
raise AssertionError("This subset is not sum free")
return "Everything is correct"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is not necessary

"""
Checks if the occurance of all numbers is exactly one
"""
t = 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests should go inside of a test function. See how the other test files in SymPy are organized.

@asmeurer
Copy link
Member

Would it also be useful for this function to work symbolically?

@Abdullahjavednesar Abdullahjavednesar added the PR: author's turn The PR has been reviewed and the author needs to submit more changes. label Mar 17, 2018
@slacker404
Copy link
Contributor Author

I have changed the files now and I added the symbolic representation of the inequality. I think that the result of the function cannot be represented symbolically because there is no formula derived except from the last subset which has numbers of the form 3*n + 1

@Abdullahjavednesar Abdullahjavednesar added PR: sympy's turn and removed PR: author's turn The PR has been reviewed and the author needs to submit more changes. labels Mar 17, 2018
@asmeurer
Copy link
Member

Symbolically means the function would be a Function subclass which remains unevaluated on symbolic inputs.

@Abdullahjavednesar Abdullahjavednesar added PR: author's turn The PR has been reviewed and the author needs to submit more changes. and removed PR: sympy's turn labels Mar 28, 2018
@czgdp1807
Copy link
Member

It looks like a nice feature. @slacker404 Would you like to continue your work on this?

@czgdp1807 czgdp1807 added Please take over and removed PR: author's turn The PR has been reviewed and the author needs to submit more changes. labels Dec 25, 2019
@sachin-4099
Copy link
Contributor

sachin-4099 commented Jan 25, 2020

I would like to work on this. Please guide as to what is remaining to be implemented. I will come up with a PR soon
@asmeurer

@mijo2
Copy link
Contributor

mijo2 commented Feb 16, 2020

I would like to revive this PR, and I am planning to do it today. @sachin-4099 We can work on this together if its ok with you, it is fine by me.

@sachin-4099
Copy link
Contributor

I would like to revive this PR, and I am planning to do it today. @sachin-4099 We can work on this together if its ok with you, it is fine by me.

It is fine by me..

@czgdp1807
Copy link
Member

Closing in favour of #18667

@czgdp1807 czgdp1807 closed this Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants