Forum archive 2000-2006

Bob Byerly - Linear Algebra answer evaluators

Bob Byerly - Linear Algebra answer evaluators

by Arnold Pizer -
Number of replies: 0
inactiveTopicLinear Algebra answer evaluators topic started 7/5/2005; 1:21:25 PM
last post 7/12/2005; 2:06:59 PM
userBob Byerly - Linear Algebra answer evaluators  blueArrow
7/5/2005; 1:21:25 PM (reads: 1041, responses: 2)
I'm currently revising some linear algebra problems and have some comments and questions.

In a recent message (http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$3407#3438) Michael Gage indicated he might revise BASIS_CMP to use MultiPart. I'm somewhat curious as to what this means. I can see scenarios in which I wouldn't want to "give away" the number of vectors in a basis, and would simply want to present the student with a single answer blank to enter a list of vectors into. On the other hand, there are other times I might want to give the student this additional information, and provide a blank for each vector. If convenient, I would vote for allowing problem writers both possibilities.

Davide's addition of problem-writer-supplied answer checkers to the parser, together with MultiPart and friends, gives another possible direction. It is now relatively easy for a problem-writer to write his/her own answer evaluator without having to worry about syntax-checking, answer hashes, etc. I cannot imagine that a small number of canned answer evaluators would enable us to ask all the types of questions that we would really like to ask our students. Without trying to make WeBWorK into a full-blown computer algebra system, it seems that a reasonably small toolbox of linear algebra routines would enable problem-writers to easily write many of these problems.

Some of these tools are already part of the parser, but some more are needed, e.g., checking dimension, equality of spans, etc. I've tried writing some of these tools for my own use, but perhaps tighter integration with the parser is desirable. One thought I had was that a new parser class with a name such as VectorList, having these tools as methods, might be useful.

What other tools would people find useful?

I also have a question about BASIS_CMP as it is currently implemented. Apparently it works by projecting the student's set of vectors into the space generated by the professor's vectors, and then counts the student's answer as correct if the student's (projected) vectors are independent, and if each of the student's vectors is equal to its projection on the professor's space.

This comparison of vectors is pretty stringent. Is there any reason not to use fuzzy comparison? For example, if a student were asked to enter a basis for span([sqrt(2), sqrt(3)]) (although it presumably wouldn't be asked this way), it would necessary for the student to enter a large number of decimal places to get BASIS_CMP to accept the answer. This seems inconsistent with other parts of WeBWork. Maybe examples like this are too pathological to arise in practice, and maybe using fuzzy comparison would cause other problems I'm not seeing.

Thanks to the WeBWorK developers for a great package! (And sorry for such a long post.)

Bob

<| Post or View Comments |>


userMichael Gage - Re: Linear Algebra answer evaluators  blueArrow
7/6/2005; 1:43:57 PM (reads: 1416, responses: 1)
In reply to Bob:

If convenient, I would vote for allowing problem writers both possibilities.

I don't see any problem with that. My main point is that code in BASIS_CMP (actually in ans_array_filter) and code in Davide's MultiPart.pm are pretty similar. I'd like to see it consolidated.

I have also been thinking of changing the algorithm for comparing subspaces from the one Bob describes above to one in which you check that, if A and B are matrices (not necessarily square) whose column vectors span the spaces in question then the spaces are equal if Range(A) is perpendicular to the kernel(transpose B) (hence range(A) is contained in range(B) ) and the range(B) is perpendicular the kernel of transpose A.

I think this might be quicker as well. It involves two LR decompositions and two matrix multiplications. I suspect that speed is not really a factor however.

To get fuzzy comparison I suggest

|( ( ker(A^T) )^T B)| / | A| |B| ) < relativeTolerance amount

and the same inequality with A and B reversed. This says that ker(A^T) is roughly perpendicular to B. (|A| is the L2 norm).

Does that seem reasonable? Are there better or more stable methods?

-- Mike

<| Post or View Comments |>


userBob Byerly - Re: Linear Algebra answer evaluators  blueArrow
7/12/2005; 2:06:59 PM (reads: 1657, responses: 0)
Mike,

Although I'm not an expert in numerical linear algebra, my initial reaction is that this sounds very good. If I understand correctly, it could also allow one to check if A and B have the same column space even if the columns of A or of B aren't linearly independent. This could be useful.

I hope the functions implementing this will be callable by problem writers, as well as part of the provided answer evaluators.

Bob

<| Post or View Comments |>