WIMS: An Interactive Mathematics Server
Examples of WIMS Modules
WIMS offers great freedom in the design of modules. As a result, a wide variety of applications of various aspects are now available. Here we discuss some of them as examples.
- The most popular activity on the WIMS server seems to be Shifting Puzzle, partly because no mathematical sophistication is needed to play with it. This is a typical step-by-step interface: It presents a scrambled m×n puzzle, and the user can successively shift a row or a column of pieces, until the puzzle is recovered.
The only mathematically nontrivial part is the generation of the puzzle. For example, in the 3×3 case, the combination of shifts can generate only even permutations (all of them). Therefore, in the initial scrambling by the server, only even permutations are generated, so that every puzzle presented to the user is solvable.
- Another step-by-step example is Visual Gauss, which can generate linear systems or matrices over various coefficient rings, including finite ones. The user can make successive modifications of rows by clicking or by returning forms. Since PARI/GP (see Page 5) is involved in all of the computations, a change of coefficient ring amounts to some minor changes in the script sent to PARI, controlled by a parameter.
- The system also allows "interactive" exercises, in which the user is encouraged to ask questions of the server in order to solve a problem. Linear system dialog is such an example. The exercise Number of solutions is in fact quite complicated: The next question to ask may depend on the answer to the last question, and there are several different ways to get the necessary information, with different levels of efficiency.
The server can detect situations such as
- pure speculation -- where the user does not have enough information to determine the answer to the problem -- or
- unnecessary information, such as the number of equations, which is not directly related to the number of solutions of the system.
At the end, it attributes a score to the user, which depends on the efficiency of the questions asked.
- Graphic functions is a classical multiple-choice exercise, but one that generates interest by constructing both the question and the choices as random graphics. There is no database of pictures behind the exercise: Every curve is plotted on the fly by Gnuplot, using randomly generated functions, taking care that no ambiguous situations (in which several choices may look good) are generated. Except for such technical restrictions, the functions are as random as possible, so that in practice no repetition will occur.
There are several exercises of the same style. Interested readers can search for the word graphic on the WIMS site to get the complete list.
- Where a computational tool is needed, WIMS can allow users to make common computations without the need of installing and learning the corresponding software packages. The tools Function calculator (limit, derivative, integral, Taylor, root, extrema, etc.), Matrix calculator (determinant, rank, characteristic polynomial, eigenvalues and eigenvectors, etc.), Factoris (factorization of integers and polynomials), Tracés animés (plots of curves and surfaces), and Polyray (ray-traced algebraic surfaces) are examples of this feature.
A comment about the root/extrema search under Function calculator: Behind the simple user interface -- click on an apparent root or extremum in the picture, and the root or extremum is found and computed to arbitrary precision by the software -- several programs are called in sequence to compute the answer: PARI/GP for roots, Maxima for symbolic derivatives, and Gnuplot to plot the point. A similar mechanism can also be found in D-int for computation of numerical double integrals.
- There is another advantage of online tools, less known but not less important. Take the example of Animated sequences, a special tool designed for graphical illustration of convergence of functional sequences or series, and quite useful for a teacher of, say, Taylor series. I have no doubt that I am not the first to think about such an application. However, this kind of thing is too special and too complicated for general-purpose mathematical software to carry a single-command implementation. So anyone wanting to construct this application would have to write a script or program, which might turn out to be quite complicated.
There are several factors that limit wide distribution of such a script:
As a result, either this capability is not as widely used as it should be, or people are reinventing the wheel all the time.
- the popularity of the software under which the script can run,
- the specificity of the purpose, and
- the limits of communication -- there are thousands of scripts, and a user cannot test them all -- so how can you convince him or her that yours can do the job?
The online environment is particularly suited for such special-purpose applications: No distribution of the script is needed, and any interested person can test it or use it immediately online. Although WIMS contains some applications that may be considered "special purpose," it is still at its very beginning with respect to the huge potential of development in this direction.
- As a last example, we present the recent addition Pathfind, which employs an algorithm searching for the shortest path, a problem of exponential complexity with respect to the number of points. An initial implementation of a naive algorithm in PARI/GP stops at less than 8 points. An improved algorithm, implemented in C with serious optimization, gives the current result -- 16 points open for the public, but one can go up to 20 points with a bit more delay. When the C program is finished and compiled, it is put into the bin directory of the server, and the module Pathfind can execute it, so that the computation is accessible by the general public.
This illustrates another interesting potential use of WIMS: The best way to publish a special-purpose algorithm is online execution. The distribution of source code is limited by many factors just as in Example 6: adoption rate of the language under which the algorithm is implemented, limits of communication, and users' willingness to compile.
On the other hand, a naive online execution chained by a simple cgi script may bring considerable security risk to the server, so a system like WIMS, having several layers of security protection, is necessary for such online executions. (The security issues will be discussed in another paper.)