Automated Generation of Randomizable Problems Sets and Detailed Solutions for a First Year Course in Engineering Statics K.R. Fyfe and J.A. Davis Engineering Department, MacEwan University, Edmonton, Alberta, Canada Introduction Academic integrity issues have plagued educational institutions since their creation. Frequently observed violations range from students submitting solutions for weekly problem assignments range that are slightly modified from another student to verbatim letter-for-letter copying infractions from frequently available textbook answer keys found on the internet. This problem has been exacerbated with the broad range of social networks on the internet making it easy to collaborate and use sophisticated search tools to find and obtain copyrighted online textbook solution manuals illegally. At times, it’s tempting to ignore these cases due to the amount of paperwork involved with reporting these academic infringements. In addition to this, it’s common knowledge that the desperate students involved in this behavior will do poorly on ensuing exams. None-the-less, as instructors with integrity, we must ensure that we are doing our best to prepare fresh problems with full solutions every year to keep this problem under control. To combat this problem, we have taken a pragmatic approach and created a software tool which generates fully randomizable engineering statics problems for first year students. This tool has several unique features. First of all, various levels of difficulty can be generated within the same problem. Secondly, the drawings are fully scaled to the randomized parameters. And finally, detailed solutions, that can entail several pages of diagrams and algebra, are generated for each problem. This software, which was created using a combination of the LaTeX, Asymptote and C++ languages, can instantly create a new set of assignment problems for each lecture section, or for each student in the class if desired. In the case where unique assignments were created for each student, we would now happily encourage students to work with one another as now they would have to explain the solution steps and processes to each other, rather than simply copying another student’s work. Literature Review The generation of randomized problems in engineering courses is not new. Typically, the deployment is web-based and includes only multiple choice and numeric answer questions. This simplistic approach is deployed due to the ease of creating an algorithm for automatic assessment of the assignment/quiz. In one such system, created by Fikar, et al.1 created an automatic assignment generator using for Control Engineering. Using fixed book examples, random variables were created using MATLAB scripts combined with XML to produce input templates. The XML templates were then transformed into HTML or PDF assignments using extendible style sheet language transformation (XSLT). Others available software packages include those designed for courses in Electrical Engineering2 and Engineering Statics and Dynamics3. These latter two citations, however, do not describe the software's implementation in any detail, so little can be said about them. One thing that is common to all of these packages, however, is that only brief answers, rather than detailed solutions are available for the problems. In this paper, we describe a process and software platform, whereby engineering statics problems with randomly generated parameters and variable levels of difficulty, creates both problem statements with scaled drawings along with full, detailed solutions. Methodology One of the goals of this work was to create a set of software tools that could be duplicated at any institution without the need to purchase dedicated software. With that in mind, only public domain software was employed, namely C++, LaTeX and Asymptote. C++ was the top-level software that controlled the randomization and level of difficulty of the problem. Parameters were written to files that the two companion software packages would utilize, namely, LaTeX for text and equation generation and Asymptote for the 2D and 3D graphics generation. These three software tools are now described in detail. C++ The C++ programming language was chosen to be our controlling language because of its universal deployment and flexible programming structures and objects. C++ was used for formulate the problem, read the template files, control the variable randomization, and finally output the LaTeX and Asymptote parameter files. These variable parameter files are then read by the LaTeX and Asymptote program files that are unique to each problem. Finally, the Asymptote and LaTeX compilers are run to generate two separate documents, namely the problem statements and diagrams as well as the resulting solutions for each problem. This complete process is depicted in Figure 1 below. Figure 1 – Generation of Problems and Solutions LaTeX The LaTeX4 package is the standard by which all other mathematical typesetting packages are measured against. It has widespread acceptance and use in the fields of math, sciences and engineering. LaTeX is a markup language in that it is created with commands in a text editor (or generated by our control program, for example). It is then saved, compiled and output to various devices. In this project, LaTeX was used to generate the text and equations for the problem statements and resulting solutions. An example of some LaTeX commands to create formulas and its accompanying output is shown in Figure 2. \begin{align*} \sum F_x &= A \cos (\alpha) + B \sin (\beta) \\ I &= \int r^2 dA \\ \mathbf{F} &= F \left(\frac{\mathbf{r}}{r}\right) \end{align*} Figure 2 – Sample Code (left) and LaTeX Output (right) Asymptote Several graphical markup languages are available and were considered for producing high quality graphics that that are compatible with LaTeX. These include TikZ5, Processing6 and Asymptote7. For our research project, Asymptote was chosen because of its high quality 2D and 3D vector graphics, its C++ like language and its abilities to run on several platforms and output to various devices. Because Asymptote is a markup language like LaTeX, its code and parameters could be generated by the C++ control program. An example of some Asymptote commands and resulting output is given in Figure 3. size(4cm,0); import geometry; pair A=(0,0), B=(2,0), C=(1,1); pair dB=dir(B), dC=dir(C); draw(A--B, Arrow); draw(A--C); dot(A); label("$A$",A,W); dot(C); label("Point $C$",C,N); draw(Label("$AC$",Rotate(-dir(C--A))),C--A); draw(“$\theta$”,arc(dB,A,dC,0.8),Arrows); Figure 3 – Sample Code (left) Asymptote Output (right) Randomization The ability to create a virtually unlimited number of variations to a particular problem was central to the project. As a result, one of the first functions created dealt with randomization. The base function was random_range(start,final,increment). For example, a call to random_range(10,90,5) would randomly select numbers in the series [10, 15… 85, 90]. These numbers might represent angles that a given force could be applied on beam, for example. A simple problem with 6 randomizable parameters is show in Figure 4. If ten variations are permitted for each of these parameters, a total of 106 different configurations would be possible. Figure 4 – Loaded Beam with Six Variables Level of Difficulty While developing the software, we included the option to be able to adjust the level of difficulty by varying quantities like the number of, the orientation of and units of the applied loads. In addition to this, on several types of problems we could adjust what type of force was being applied; i.e. a concentrated point force, point couple and distributed loads (constant, linear, etc.). We could also make variations in the geometry to affect aspects such as support types (roller, pinned or built-in) and single vs. compound bodies. The determination of problem difficulty is not a simple task. Various researchers have attributed a problem's difficulty to characteristic such as: problem syntax8,9, number of solution steps8,10, number of variables8, and degree of familiarity10. Another way of determining the degree of difficulty of a question is to use an expert’s opinion. In this present work, we simply leave the degree of question difficulty up to the instructor and offer a variable in the scale of 0 (easy) to 1 (hard) which can be varied. It should be noted that the difficulty level is not automatic; instead the instructor must build the difficulty levels in the question and solution templates. A series of decision statements then selects the correct action when the degree of difficulty is varied. Results The first example, shown in Figures 5 and 6, depict a 3D cable problem. A force of known quantity, F = 223kN, is applied to a 3D configuration of cables. In a series of steps, the student is asked to calculate the forces in each of the three cables. The top half of Figure 5 depicts the problem statement including the scaled 3D drawing. The bottom half of the figure solves part a) of the problem, that being to determine the Cartesian components of the applied force. Figure 6 shows the remainder of the detailed solution steps for this problem. The second example, shown in Figure 7, shows a problem with a beam loaded with a point load, a point couple and a distributed load. The top half of Figure 7 is the problem statement where the student is asked to determine the resulting shear force, V, and bending moment, M, diagrams. The bottom half of Figure 7 shows the graphical solution being applied. With the developed software, any number of applied point loads, point couples and distributed moments may be applied to a beam and the resulting shear force and bending moment diagrams will be generated. Figure 5 – Problem Statement (above) and Partial Solution (below) for the 3D Cable Problem Figure 6 – Continued Solution (from Figure 5) for the 3D Cable Problem Figure 7 – Problem Statement (above), Shear Force and Bending Moment Diagrams (below) The variable level of difficulty features in our software are demonstrated in two loading cases of a beam below. On the left shows a beam with only a distributed load applied, while the beam on the right shows a point load, point couple and distributed load applied (as shown in Figure 7). Figure 8 – Variable Level of Difficulty – Simple (left) and More Complicated (right) One of the unique properties of the Asymptote markup language is the ability to generate 3D images with ease. Not only that, but when the output is directed to a PDF file in a 3D PRC11 format and then viewed in Adobe Reader®, one is able to rotate and zoom a 3D image with a mouse. As shown in the figure below, one is able to obtain a variety of viewpoints of a pipe frame object that has been loaded with a force. This is a great advantage for students to be able to visualize and understand complex 3D geometries. Figure 9 – Four Viewpoints of a 3D Geometry using Adobe Reader® Discussion In addition to the problems displayed in the above section, another 35 problems with full solutions have been created by our software. These problem sets have now been successfully used in two terms of engineering statics courses in our university. Owing to the fact that we can instantly create new batches of random problem sets, we have no hesitations in posting the PDF solutions online, after the students have submitted their work, as there is no danger the same problems will come up again in following years. We now fully encourage student collaboration on assignments because they can only help each other by explaining the solution methodology, which aids both students, rather than directly copying solutions from one another. Despite the many benefits of this software, the current platform is not without its issues. Because this project was initiated with little lead time and without any base software platform in place, all aspects of the software were coded from scratch. Two major limitations of the first version of our program platform are discussed below. Authoring System One of the main drawbacks of the current content system is that a programmer is required to put together a problem who is familiar with the subject content as well as the C++, LaTeX and Asymptote languages. Often 3 or 4 days of work is required to create each problem statement and solution pair. This clearly is not a scalable procedure if we wish to push this out to other schools or disciplines. High level authoring strategies are now being pursued to permit rapid creation of problems, including the required graphics and solutions, via a web-based interface. Labeling and Layout When preparing a graphic image, the author must spend time to ensure that the layout of objects and labels do not collide with one another. When randomly generating thousands of variations of a single problem, each with a wide range of randomly generated variables, it becomes a real challenge to create output that is both meaningful and follows spacing layout guidelines. One case in point has to do with the labeling of figures. Because of the wide range of variables that can be used in generating the geometry and loads for any given problem, labels often overwrite one another or other parts of the figure, thus rendering areas of some figures largely unreadable. An example of a poorly labeled and well-labeled image is shown below. We are now tackling this issue with methods similar to that used in cartography (map making). Figure 10 – An Example of Overlapping Labels and Clean Labeling Output Formats The current implementation of our software only permits output to PDF files. While this is sufficient for simple viewing and printing, it offers no real interaction or reflowing which is such an integral component of today’s touch based, multi-windowed interfaces. We are currently investigating variable output paths such that the resulting problem statements, graphics and solutions and be interacted with via web interfaces as well as iOS/Android platforms. Assessment Although this newly created assignment generation technology solves many problems, it creates a brand new problem; that of how to mark assignments that are unique to each student. One typically used approach is to assess randomly generated assignments using multiple-choice questions. While multi-choice may have uses in some courses, we are currently pursuing research whereby the student’s full solution is graded in real-time via tablet technologies. Acknowledgments We would like to acknowledge the financial support of the Faculty of Arts and Science and the Technology Office from MacEwan University as well as the Province of Alberta’s STEP program for the funding to carry out this work. We would also like to mention the efforts of Amy Warkentin and Justin Sharp in coding the problem statements and solutions in this project. In addition to this, we would like to thank John Bowman, a co-author of Asymptote, for his advice in planning the graphical image generation for this work. References [1] M. Fikar, L. Cirka, M. Bakosova, and T. Hirmajer. Automatic Generation of Assignments and Quizzes in Control Engineering Education. Proceedings of the European Control Conference. Kos, Greece. 2007. [2] S. Hussmann, G. Covic, and N. Patel. Effective Teaching and Learning in Engineering Education using a Novel Web-based Tutorial and Assessment Tool for Advanced Electronics. International Journal of Engineering Education. vol 20. pp. 161-169. 2004. [3] Pearson. Mastering Engineering. http://www.masteringengineering.com. 2013. [4] L. Lamport, LaTeX: A Document Preparation System (2 nd Edition). Addison-Wesley Pub Co. 1994. [5] TikZ/PGF Graphical Markup Language. http://sourceforge.net/projects/pgf/. 2013. [6] Processing Graphical Markup Language. http://processing.org/. 2013. [7] A. Hammerlindl, J. Bowman and T. Prince, Asymptote Graphical Markup Language, http://asymptote.sourceforge.net/. 2013. [8] E. Solver and A. Thompson. Research Perspectives on Problem Solving in Elementary School Mathematics. The Elementary School Journal. vol.84. pp. 529-545. 1984. [9] D. Newman, D. Kundert, D. Lane, and K. Bull. Effect of Varying Item order on Multiple-Choice Test Scores: Importance of Statistical and Cognitive Difficulty. Applied Measurement in Education. vol 1. pp. 89-97. 1988. [10] F. Lee and R. Heyworth. Problem Complexity: A Measure of Problem Difficulty in Algebra by Using Computer. Education Journal. vol 28. pp. 85-107. 2000. [11] 3D PRC Format. http://www.3dpdfconsortium.org/pdf-standards-info/prc.html. 2013.