[LON-CAPA-dev] Installing Modules for LON-CAPA
Mon, 26 Sep 2005 16:10:47 -0400
On Sep 26, 2005, at 3:33 PM, GARRETT, DONNELL MAZON wrote:
> That was an example... maybe one that is too simple to show what I'm
> trying to do.
> Let's say we want to solve for x and y, and if we randomly generate A,
> B, C, D, E, and F, then
> xA + yB = C
> xD + yE = F
> how can we find x and y using an algorithm that we don't have to
> cut and
> paste into each and every problem.
Yep, you can use the .library mechanism (as Guy explained) to write
routines that you can then <import> into any problem.
But, what I was trying to suggest is building your problem the other
way around, i.e., randomly determine the solution first.
Then generate your coefficients:
Now, when determining your $e, you just need to make sure that the
second equation is not a multiple of the first:
Then calculate your $c and $f:
To your students, you just give $a, $b, $c, $d, $e, and $f, of
course. Solving an equation system is computing-intensive,
constructing one is not - and there is no reason why LON-CAPA needs
to do the same work that the students do.
But maybe the example is really too simple.