% Form for paper
% 1995:02

% \documentclass[twosided,fleqn]{article}
\documentclass[fleqn]{article}
\usepackage{latexsym,amssymb}
\usepackage{epsfig}
%\input{./plnotes2e}

\begin{document}
%\input{./macros2e}

\title{\LARGE\sf A guide for interactive exercises}
\author
{
{ Dorina Jibetean}\\ [0.5cm] 
{ TUe} \\
{ Postbus 513, 5600 MB Eindhoven, The Netherlands}  \\
{\small\tt djibetean@win.tue.nl}  \\ [0.5cm]
{ Draft \today}
}
\date{}
\maketitle
\begin{quotation}
\begin{small}
\noindent
A model is proposed for an interactive guided exercise for computing the
derivative of an arbitrary function. 

\par\vspace{1\baselineskip}\par\noindent
{\em AMS Subject Classification (1991):}
NUMBERS
\\
{\em Keywords and Phrases:} 
WORDS
\\
{\em Note}:
NOTE
% Research is supported in part by the Project
% Paper was presented at the conference
% Report will be submitted for publication elsewhere
\\
\end{small}
\end{quotation}
\section{Introduction}


The objective here is to define a model for an interactive exercise. We
restrict ourselves to the problem of computing the derivative of an arbitrary
function. The interactive exercise is meant for training the ability of
students to compute derivatives outside school hours. It is therefore
necessary for the exercise to read student's input, analyze the correctness of
the result, give feedback (suggest correct answer or assist the student in
decomposing the problem into simpler ones), review student's activity and
notice the weak points in his solution.

\section{The tree structure of a function}
A function can be decomposed, using a
finite set of rules, into elementary functions. Moreover the derivative of any
elementary function is known and the derivative of the initial function can be
computed using them and the above mentioned derivation rules. More
specifically, we have:
\\
\\Derivation rules:
\begin{enumerate}
\item linear:  $(f(x)+g(x))'=f'(x)+g'(x)$.
\item product: $(f(x)*g(x))'=f'(x)*g(x)+f(x)*g'(x)$.
\item chain:   $f(g(x))'=f'(g(x))*g'(x)$.
\item division: $(f(x)/g(x))'=(f'(x)*g(x)-f(x)*g'(x))/g^2(x)$.
\end{enumerate}
%
Elementary functions:
\begin{enumerate}
\item constant: $c'=0$.
\item power: $(x^n)'=n x^{n-1}$.
\item logarithm: $ (\log{x})' = 1/x$.
\item exponential: $(\exp{x})'=\exp{x}$.
\item trigonometric: ..
\end{enumerate}

Therefore, to any function we associate a (binary) tree. The fact that we have
a binary tree is based on the observation that all derivation rules above
decompose the function is two sub-functions.\\
\\
The tree is constructed dynamically as the result of the interaction with the
student. The root of the tree is the given function. The leaves of the tree
are either sub-functions for which the student is capable of calculating the
derivative, either elementary functions for which the formula for the
derivative should be known or, it will be in any case provided. \\
\\
For programming purposes, any (sub-)function needs to have an attribute called
\emph{indicator} which takes value $1$ if the derivative is known (i.e. the
student's input equals the correct answer) and value $0$ otherwise. Also the
attribute \emph{current} takes value $1$ if ths (sub-)function is the one we
concetrate on at a given moment and $0$ otherwise. These two attributes help
us move around in the tree. For a possible implementation choice for the tree structure see Section \ref{sec:omobj}.

\section{A simple interactive model}
\label{sec:model}

The exercise consists of several interactive parts, each presented
in a web-page. There are at least 3 reasons for dividing an exercise into
different pages. Firstly, it hopefully makes the program easier to understand
and debug since each page corresponds to a different type of
activity. Secondly, different parts of this exercise may be reused in other
exercises. Thirdly, we do this for avoiding a technical problem (i.e. remembering parameter values). Let us describe the pages we use
and the activities performed in each of them.\\
\\
In this section we consider a simplified model, in the sense that all
attributes coming from the student model are ignored. The interaction is
solely based on the attributes \emph{indicator} and \emph{current}. Note that we do not forsee any
technical problems in integrating more attributes coming from the student
model, as soon as the model will be defined. See Section \ref{sec:discussion}
for more details. \\  
\\
 In a web-page we collect information from the student and adapt the tree. In the simple model, the next page is selected according to the indicator of the
 currently handled function (1 go to the parent, 0 go to the children)
 and the indicators of the children (iff all children have indicator equal to
 1, then compute the derivative of their parent and change the indicator of
 the parent to 1). Obviously, the exercise ends when the indicator
corresponding to root equals 1.
\subsection{Page Start:}
Constructs the tree.
\begin{itemize}
\item assigns the initial function expression (f);
\item assigns indicator to 0.
\item assigns current to 1
\end{itemize}
Redirects to Page CheckDerivative

\subsection{Page CheckDerivative:}
Recovers the session (that is, the tree).
\begin{itemize}
\item reads the student's input for the derivative (fder);
\item it compares it to the correct derivative (D[f,x]). \\
\\
If the derivative is correct, it finds the CurrentNode (that is the one with
atribute current=1) and sets indicator = 1 and redirects to Page
IntermediaryResults.mb.\\
\\
If the derivative is not correct and the function is not elementary redirects
to  Page Rule.\\
\\
If the derivative is not corrent and the function is elementary, (i.e. the student should  know the answer) it displays the correct answer, updates the derivative, updates indicator to 1 and redirects to Page IntermediaryResults.

\end{itemize}

\subsection{Page Rule}
Recovers tree.
\begin{itemize}
\item reads the student's input for the derivation rule;
\item redirect to Page Product, Chain, ... according to the rule.
\end{itemize}

\subsection{Page Product/Chain/...}
These are possibly different pages following in any case the same pattern.\\
Recovers tree.
\begin{itemize}
\item displays the chosen rule.
\item reads the student's input for the two children;
\item checks if the respective rule is satisfied;
\item assigns indicator to 0 for both children (and their parent!);
\item assigns current to 1 for fChild1;
\item assigns f = fchild1 and redirects to Page CheckDerivative.
\end{itemize}

\subsection{Page IntermediaryResults}
Recovers tree. If f != root, then
\begin{itemize}
\item  f = parent of the current f
\item checks if all its children have indicator 1. \\
\\
If yes, then redirect to Page IntermediaryResults.
\\
\\If no, set current=0 for fChild1 and current=1 for fChild2 . Set f = fchild2 and redirect to Page CheckDerivative. 
\end{itemize}
else redirect to Page FinalResult.

\subsection{Page ComputeDerivative}
Let the student compute the derivative of the new f using the derivatives of
its children using the derivation rule and update the indicator of f to
1. 
Redirect to Page IntermediaryResults.

\subsection{Page FinalResult}

Display the derivative of the root and possibly the tree.
Open to suggestions.

\section{Remarks and Further Work}
\label{sec:discussion}

Note that Page CheckDerivative requires us to be able to recognize elementary
functions. This is easily done and is necessary for other reasons as well. We
define a function to be elementary if its OMOBJ representation contains at
most one OMA.\\
\\
%A student model can be easily integrated in the following way: the conditions
%for redirecting to the next page will be adapted and will take into
%consideration not only the value of the attribute \emph{indicator}, but also the values of the parameters defining the student model. Such values are
%typically set once, at the beginning of the session (login).\\
%\\
Note also that we used a very simpe diagnosis model, namely we check at all times whether the
student's input is correct or false. In a next version we shall use a more
sophisticated diagnosis model based for example on buggy rules.
This can be implemented easily, for example by introducing a new value for the
indicator corresponding to each buggy rule. For example, for buggy rules for
derivatives, the condition in Page CheckDerivative will take care of this
extra case by displaying a message indicating the error and redirecting to
Page CheckDerivative. A list of buggy rules is required.\\
\\
We also need to include hints at various steps. Let us detail:
\begin{itemize}
\item On Page CheckDerivative possible hints are: a) on the rule, and that can
  be done using the OM representation of the function; b) on the expression of
  the derivatives of elementary functions, that is for example, return correct answer. 
\item On Page Product/Chain/... we can suggest an alternative rule if the
  student fails to compute the children correctly, that is, he cannot prove
  the rule he chose is valid. Alternatively, validating the rule by computer
seems quite difficult at the moment.
\end{itemize}

 

\section{Discussion on the tree structure}
\label{sec:omobj}

A mathematical function has a OpenMath representation. This allows
representing the function equivalently as a DOM object. A DOM object has the desired
tree structure and offers methods for modifying the tree without any restrictions. \\
\\
Using OpenMath/DOM objects may be helpfull when: a. hints are required (the roo
can be used to suggest the next step); b. comparing different solution paths
(?? not sure). For programming purposes, we would need to modify them by
adding an attribute indicator, rewrite the function in equivalent ways
($x*(x+1)=x^2+x$), etc.\\
\\
Since the attribute \emph{indicator} is required for all non-elementary (sub-)functions whose
derivative we need to compute, it seems natural to us to add an attribute
indicator to <OMA>. The attribute indicator will \emph{not be required}.  \\
\\
On the other hand, the attribute \emph{current} can be an attribute of OMA,
OMI, OMV, but not of OMS. Note that at all times, we have to have
\emph{exactly} one OMA, OMV, OMI with attribute current=$1$.

\bibliography{../bibtex/base,../bibtex/base1}
\bibliographystyle{plain}
\end{document}

