Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5576

Re: Interesting problem looking for a solution.

From Murray Eisenberg <murray@math.umass.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Interesting problem looking for a solution.
Date 2011-10-10 08:33 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j6ualf$f3p$1@smc.vnet.net> (permalink)
References <201110090752.DAA01680@smc.vnet.net>

Show all headers | View raw


I used just such a method in several courses some years ago, including 
linear algebra and discrete math. Some of that was described in a 
presentation I gave at the 1998 Mathematica Conference in Chicago.

Briefly:

1. You write a Mathematica package, let's call it prep.m, that prepares 
the data -- in your case, that somehow randomly creates the function f 
(selecting randomly from a list of function types, for that type 
selecting from values for various parameters), and then creates the 
graph and writes it to the evaluation notebook.

More about prep.m in a moment.

2. You prepare a notebook, let's call it problem.nb, in which the 
package prep.m is called by a Get.

3. You distribute both prep.m and problem.nb to the students.

3. The student evaluates the Get cell in problem.nb (or you make the Get 
cell an initialization cell). When Get is called, it writes the randomly 
created output to the notebook problem.nb.

Now to deal with the issue of keeping the data generation method secret:

In the package, you need to do all the work inside a context that, at 
the end of the package, gets deleted from $ContextPath and $Packages 
lists; Remove various stuff defined along the way.

And finally, after you're sure it all works, encrypt the package via Encode.

(I don't recall whether you need to run Encode on the same platform as 
the target platform students will be using.)

If you wish, you can even do such fancier things as condition the 
package's random choices upon, say the student's name: in problem.nb, 
the student types her name into a global variable, to which prep.m will 
therefore have access.

On 10/9/11 3:52 AM, Church, Gary wrote:
> Hello,
>
> I have an (I think) interesting problem for you Mathematica gurus.
>
> I'm trying to create a worksheet for my students and want to be able to display the plot of a randomly generated function f[x], without them being able to access the expression which defines f; In other words, I don't want them to be able to evaluate f[x].
>
> The idea is that each student will get a different function f[x] and will see a different graph and they have to determine the expression which defines f. They then have to plot the function they think is f against the actual function f[x] and turn in the two plots (or the one plot with the two graphs.)
>
> Is this possible?
>
> Thanks much,
> Gary
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Interesting problem looking for a solution. Murray Eisenberg <murray@math.umass.edu> - 2011-10-10 08:33 +0000

csiph-web