STACK doesn't match set elements

STACK doesn't match set elements

by Oleg Melnikov -
Number of replies: 4

Hi All. I'm new to STACK (but excited about this tool). I've been puzzled by this for a bit. One of solutions in my problem requires a set with one root. A root is a mean of observed values, i.e. (X[1]+...+X[6])/6  for 6 observations. I've come across a particular form of this equation that fails STACK test on algebraic equivalence (AlgEquiv in PRT node) or set equivalence. Not sure if there is a more proper way to compare elements of a set on algebraic equivalence (or perhaps, this isn't related to sets of expressions). Any ideas how this error can be handled? Let me know if more information is needed. I hope it's not an algebra error on my part.

Here are printscreens of correct answers (which either succeed or fail): 

example of success

example of success

example of a fail

example of a failure

Here is the setup of this PRT with test Sets. Test AlgEquiv shows the same behavior.

PRT

Average of ratings: -
In reply to Oleg Melnikov

Re: STACK doesn't match set elements

by Oleg Melnikov -
Perhaps, one idea is to simplify each element of the set of expressions in the student's answer, ans5. Currently, the instructor's answer ta5 is computed as a set of roots of ta4 equation (to find roots of a function via its derivative set to zero): ta5: setify(map(rhs, solve(ta4, mu)));. In such case, what type of simplification might help and how can it be applied ? Is there an element-wise simplification available ?
In reply to Oleg Melnikov

Re: STACK doesn't match set elements

by Oleg Melnikov -
It seems that with map(ratsimp, ans5); in SAns of the PRT, the comparison works correctly now. Not sure if there is a better solution or a global option of some sort. 
In reply to Oleg Melnikov

Re: STACK doesn't match set elements

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Yes, this is a problem because we have to think carefully about when elements are the "same" or "different". Sets remove duplicate elements.

While AlgEquiv does its best, as you noticed there is a "sets" answer test: https://docs.stack-assessment.org/en/Authoring/Answer_tests/#sets

If you have a commonly occurring situation like this please let me know and we can provide better support in the core, or document how to achieve what you need better.

Indeed, I really welcome pull requests adding to the documentation if you have found a way to do something which you didn't find obvious from the docs. Everyone is welcome to help me with this!

Chris
Average of ratings: Useful (1)
In reply to Christopher Sangwin

Re: STACK doesn't match set elements

by Oleg Melnikov -
Hi Chris. Thanks for your awesome help and development! I'm still new to STACK/Maxima, but with some experience will definitely try to contribute starting with more examples and documentation. That's a good suggestion/idea.