Ask Your Question

Revision history [back]

Solve set of equations with all unique values in sage

0

I have defined a set of 20 equations, consisting of 22 variables.

Now I want to implement that each variable needs to have a unique value.

I've tried via assumptions: assume(A!=B) assume(B!=C)...and so on. But this does not seam to solve the equation. I've also tried to add these unequalities to the set of equations, which also still have 2 parameters in my solutionset.

ps. I also know that each value is an integer. And that the difference between the highest and the lowest value is smaller than a certain number (e.g. 40). But I believe I have implemented this correctly via:

assume(A, 'integer')

assume(B, 'integer')

assume(C, 'integer')

... and

assume((max_symbolic(A,B,C,...)-min_symbolic(A,B,C,...)) < 40)

click to hide/show revision 2
merged revision

Solve set of equations with all unique values in sage

0

I have defined a set of 20 equations, consisting of 22 variables.

Now I want to implement that each variable needs to have a unique value.

I've tried via assumptions: assume(A!=B) assume(B!=C)...and so on. But this does not seam to solve the equation. I've also tried to add these unequalities to the set of equations, which also still have 2 parameters in my solutionset.

ps. I also know that each value is an integer. And that the difference between the highest and the lowest value is smaller than a certain number (e.g. 40). But I believe I have implemented this correctly via:

assume(A, 'integer')

assume(B, 'integer')

assume(C, 'integer')

... and

assume((max_symbolic(A,B,C,...)-min_symbolic(A,B,C,...)) < 40)

0

I have defined a set of 20 equations, consisting of 22 variables.

Now I want to implement that each variable needs to have a unique value.

I've tried via assumptions: assume(A!=B) assume(B!=C)...and so on. But this does not seam to solve the equation. I've also tried to add these unequalities to the set of equations, which also still have 2 parameters in my solutionset.

ps. I also know that each value is an integer. And that the difference between the highest and the lowest value is smaller than a certain number (e.g. 40). But I believe I have implemented this correctly via:

assume(A, 'integer')

assume(B, 'integer')

assume(C, 'integer')

... and

assume((max_symbolic(A,B,C,...)-min_symbolic(A,B,C,...)) < 40)