Deleting duplicate equations from a list of equations

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












Here is a list of algebraicly identical equations, and I like to delete all the duplicate equations from this list and get only one equation. I tried the following:



Clear[ss];
listEqs =
x + y == x^2 + z,
y + z == x^2 + z,
x + y == z + x^2,
y + z == z + x^2,
x^2 + z == x + y,
z + x^2 == x + y,
x^2 + z == y + z,
z + x^2 == y + x
;

DeleteDuplicates[listEqs]


I got:




x + y == x^2 + z,
y + z == x^2 + z,
x^2 + z == x + y,
x^2 + z == y + z



Can someone tell me how to reduce the list to only one equation?



EDIT 1



I noticed a misunderstanding of my question. Here is a second list:



listEqs = 
y + z == x^2 + z,
a + b == k + g,
x + y == x^2 + z,
b + a == g + k,
x + y == z + x^2,
a + b == g + k,
y + z == z + x^2,
x^2 + z == x + y,
z + x^2 == x + y,
x^2 + z == y + z,
z + x^2 == y + x;


The code:



DeleteDuplicatesBy[listEqs, MemberQ@Level[listEqs, -1]]


picks the first element of the list, which is not what I asked. I want the following list to be the output of the code:




y + z == x^2 + z,
a + b == k + g



Basically, I just want to pick the non-identical equations from the list. The desired equations can be placed in the middle, end or beginning of the list. The position of the equations are not the issue.










share|improve this question























  • in what sense are x + y == x^2 + z and y + z == x^2 + z} "equivalent"?
    – kglr
    22 mins ago















up vote
1
down vote

favorite
1












Here is a list of algebraicly identical equations, and I like to delete all the duplicate equations from this list and get only one equation. I tried the following:



Clear[ss];
listEqs =
x + y == x^2 + z,
y + z == x^2 + z,
x + y == z + x^2,
y + z == z + x^2,
x^2 + z == x + y,
z + x^2 == x + y,
x^2 + z == y + z,
z + x^2 == y + x
;

DeleteDuplicates[listEqs]


I got:




x + y == x^2 + z,
y + z == x^2 + z,
x^2 + z == x + y,
x^2 + z == y + z



Can someone tell me how to reduce the list to only one equation?



EDIT 1



I noticed a misunderstanding of my question. Here is a second list:



listEqs = 
y + z == x^2 + z,
a + b == k + g,
x + y == x^2 + z,
b + a == g + k,
x + y == z + x^2,
a + b == g + k,
y + z == z + x^2,
x^2 + z == x + y,
z + x^2 == x + y,
x^2 + z == y + z,
z + x^2 == y + x;


The code:



DeleteDuplicatesBy[listEqs, MemberQ@Level[listEqs, -1]]


picks the first element of the list, which is not what I asked. I want the following list to be the output of the code:




y + z == x^2 + z,
a + b == k + g



Basically, I just want to pick the non-identical equations from the list. The desired equations can be placed in the middle, end or beginning of the list. The position of the equations are not the issue.










share|improve this question























  • in what sense are x + y == x^2 + z and y + z == x^2 + z} "equivalent"?
    – kglr
    22 mins ago













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





Here is a list of algebraicly identical equations, and I like to delete all the duplicate equations from this list and get only one equation. I tried the following:



Clear[ss];
listEqs =
x + y == x^2 + z,
y + z == x^2 + z,
x + y == z + x^2,
y + z == z + x^2,
x^2 + z == x + y,
z + x^2 == x + y,
x^2 + z == y + z,
z + x^2 == y + x
;

DeleteDuplicates[listEqs]


I got:




x + y == x^2 + z,
y + z == x^2 + z,
x^2 + z == x + y,
x^2 + z == y + z



Can someone tell me how to reduce the list to only one equation?



EDIT 1



I noticed a misunderstanding of my question. Here is a second list:



listEqs = 
y + z == x^2 + z,
a + b == k + g,
x + y == x^2 + z,
b + a == g + k,
x + y == z + x^2,
a + b == g + k,
y + z == z + x^2,
x^2 + z == x + y,
z + x^2 == x + y,
x^2 + z == y + z,
z + x^2 == y + x;


The code:



DeleteDuplicatesBy[listEqs, MemberQ@Level[listEqs, -1]]


picks the first element of the list, which is not what I asked. I want the following list to be the output of the code:




y + z == x^2 + z,
a + b == k + g



Basically, I just want to pick the non-identical equations from the list. The desired equations can be placed in the middle, end or beginning of the list. The position of the equations are not the issue.










share|improve this question















Here is a list of algebraicly identical equations, and I like to delete all the duplicate equations from this list and get only one equation. I tried the following:



Clear[ss];
listEqs =
x + y == x^2 + z,
y + z == x^2 + z,
x + y == z + x^2,
y + z == z + x^2,
x^2 + z == x + y,
z + x^2 == x + y,
x^2 + z == y + z,
z + x^2 == y + x
;

DeleteDuplicates[listEqs]


I got:




x + y == x^2 + z,
y + z == x^2 + z,
x^2 + z == x + y,
x^2 + z == y + z



Can someone tell me how to reduce the list to only one equation?



EDIT 1



I noticed a misunderstanding of my question. Here is a second list:



listEqs = 
y + z == x^2 + z,
a + b == k + g,
x + y == x^2 + z,
b + a == g + k,
x + y == z + x^2,
a + b == g + k,
y + z == z + x^2,
x^2 + z == x + y,
z + x^2 == x + y,
x^2 + z == y + z,
z + x^2 == y + x;


The code:



DeleteDuplicatesBy[listEqs, MemberQ@Level[listEqs, -1]]


picks the first element of the list, which is not what I asked. I want the following list to be the output of the code:




y + z == x^2 + z,
a + b == k + g



Basically, I just want to pick the non-identical equations from the list. The desired equations can be placed in the middle, end or beginning of the list. The position of the equations are not the issue.







list-manipulation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 14 mins ago

























asked 1 hour ago









Tugrul Temel

43113




43113











  • in what sense are x + y == x^2 + z and y + z == x^2 + z} "equivalent"?
    – kglr
    22 mins ago

















  • in what sense are x + y == x^2 + z and y + z == x^2 + z} "equivalent"?
    – kglr
    22 mins ago
















in what sense are x + y == x^2 + z and y + z == x^2 + z} "equivalent"?
– kglr
22 mins ago





in what sense are x + y == x^2 + z and y + z == x^2 + z} "equivalent"?
– kglr
22 mins ago











1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Maybe



DeleteDuplicatesBy[listEqs, Reduce] (* or *)
DeleteDuplicatesBy[listEqs, Sort]



x + y == x^2 + z, y + z == x^2 + z




For the longer input list:



DeleteDuplicatesBy[listEqs2, Reduce] 



y + z == x^2 + z, a + b == g + k, x + y == x^2 + z




In both cases, I can't see how x + y == x^2 + z and y + z == x^2 + z can be "equivalent"`.






share|improve this answer




















  • It is a typo. Sorry for confusion, but your answer is the right one and it works for me. Thank you very much.
    – Tugrul Temel
    7 mins ago










Your Answer




StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f184309%2fdeleting-duplicate-equations-from-a-list-of-equations%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










Maybe



DeleteDuplicatesBy[listEqs, Reduce] (* or *)
DeleteDuplicatesBy[listEqs, Sort]



x + y == x^2 + z, y + z == x^2 + z




For the longer input list:



DeleteDuplicatesBy[listEqs2, Reduce] 



y + z == x^2 + z, a + b == g + k, x + y == x^2 + z




In both cases, I can't see how x + y == x^2 + z and y + z == x^2 + z can be "equivalent"`.






share|improve this answer




















  • It is a typo. Sorry for confusion, but your answer is the right one and it works for me. Thank you very much.
    – Tugrul Temel
    7 mins ago














up vote
1
down vote



accepted










Maybe



DeleteDuplicatesBy[listEqs, Reduce] (* or *)
DeleteDuplicatesBy[listEqs, Sort]



x + y == x^2 + z, y + z == x^2 + z




For the longer input list:



DeleteDuplicatesBy[listEqs2, Reduce] 



y + z == x^2 + z, a + b == g + k, x + y == x^2 + z




In both cases, I can't see how x + y == x^2 + z and y + z == x^2 + z can be "equivalent"`.






share|improve this answer




















  • It is a typo. Sorry for confusion, but your answer is the right one and it works for me. Thank you very much.
    – Tugrul Temel
    7 mins ago












up vote
1
down vote



accepted







up vote
1
down vote



accepted






Maybe



DeleteDuplicatesBy[listEqs, Reduce] (* or *)
DeleteDuplicatesBy[listEqs, Sort]



x + y == x^2 + z, y + z == x^2 + z




For the longer input list:



DeleteDuplicatesBy[listEqs2, Reduce] 



y + z == x^2 + z, a + b == g + k, x + y == x^2 + z




In both cases, I can't see how x + y == x^2 + z and y + z == x^2 + z can be "equivalent"`.






share|improve this answer












Maybe



DeleteDuplicatesBy[listEqs, Reduce] (* or *)
DeleteDuplicatesBy[listEqs, Sort]



x + y == x^2 + z, y + z == x^2 + z




For the longer input list:



DeleteDuplicatesBy[listEqs2, Reduce] 



y + z == x^2 + z, a + b == g + k, x + y == x^2 + z




In both cases, I can't see how x + y == x^2 + z and y + z == x^2 + z can be "equivalent"`.







share|improve this answer












share|improve this answer



share|improve this answer










answered 12 mins ago









kglr

166k8188390




166k8188390











  • It is a typo. Sorry for confusion, but your answer is the right one and it works for me. Thank you very much.
    – Tugrul Temel
    7 mins ago
















  • It is a typo. Sorry for confusion, but your answer is the right one and it works for me. Thank you very much.
    – Tugrul Temel
    7 mins ago















It is a typo. Sorry for confusion, but your answer is the right one and it works for me. Thank you very much.
– Tugrul Temel
7 mins ago




It is a typo. Sorry for confusion, but your answer is the right one and it works for me. Thank you very much.
– Tugrul Temel
7 mins ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f184309%2fdeleting-duplicate-equations-from-a-list-of-equations%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?