Triangle Generator for Online Mathematical E-learning

What constitutes learning in the 21st century is the capacity for e-learning. Integral components of e-education are training content management systems. Existing content generators more transform content than create original content. Creating a methodology and technology for generating original content is important and relevant. In order to form adequate methods for generating content, primarily for mathematical and related disciplines, the problem of generating a triangle, together with its many attributes, is considered as the simplest object of elementary mathematics. We create a simulation model that describes the properties of the object and apply modified methods of optimization and corresponding algorithms to it. The current algorithmic layout demonstrates the performance of the developed system. It generates triangles in any configurations matching the given parameters and demonstrates their properties.


Introduction
Electronic learning is a type of learning that uses an electronic device. It is a broad educational field, encompassing many sub-disciplines and uses, for example, computer-integrated learning is one of the common ways of electronic learning, Internet learning known as online learning. Today, many universities are transferring most materials digitally. (Concannon, Flynn, & Campbell, 2005) showed that Irish universities are taking advantage of the benefits of electronic learning as a mechanism for improving student learning performance on campus. While traditional methods, such as face-to-face lectures, trainings and mentoring, remain dominant in education, universities invest heavily in learning technologies to facilitate learning quality improvement. There are many benefits to learning this way. In (Henderson, Selwyn, & Aston, 2015) they identified 11 benefits of digital learning -from the flexibility of time and space, ease of organization and management of learning tasks to the ability to replay and re-examine teaching materials and learn in more visual forms. Specifically, for math and computer subjects, in (Yushau, 2006) she examined the effect of electronic learning on students' attitude toward mathematics and computers. The result indicated that students who studied in this way had a positive approach to mathematics and computers. There is currently no system that can interactively teach a material that considers the students' thinking, which can show all the options available to any data set that a student wants to examine.
For the full realization of the possibilities of e-education, the training system should include content management modules, such as training content generators. Many generators are built on the use of ontological models. The ontology-based approach and the corresponding algorithm (Jovanović, Gašević, & Devedžić, 2006) are used to automatically decompose learning objects into reusable content units and dynamically assemble such units into personalized learning content. An ontological approach is also used in the framework to create custom educational content on demand with automatic evaluation (Tsai, Datla, & Xu, 2008). This structure can logically regulate educational content and offer several alternative and ranked learning paths so that teachers or students can make smart decisions.
Higher education can benefit from creating open, shared datasets for students, as this data do not currently exist in open and accessible formats. It is proposed to use synthetic data generators (Dorodchi, Al-Hossami, Benedict, & Demeter, 2019) to create open source student data versions. Synthetic data sets take precedence over real data, since access to real data can be limited. The characteristic of synthetic data is compared with the source data and a model of how synthetic data can be used to develop and optimize a general learning algorithm is illustrated.
Online courses personalization is an urgent task. Although various personalization methodologies in an educational context already exist, personalization by context is always limited by the existing educational material; their creation is a laborious task. A conveyor is presented for generating questions and correct answers based on training texts (Rüdian & Pinkwart, 2019), limited to actual questions for given sentences. NLP technologies are combined with an effective methodology and adjusted to create pairs of questions and answers.
Tasks solving is one of the key problems of the educational process in mathematics. It requires instructors to prepare tasks, correct them, and return feedback to students. The ability to automate all these steps will be a powerful tool for instructors, especially in courses with a large number of students. A method is proposed for automatically creating and correcting mathematical problems (Poch, et al., 2016). The proposed approach codifies various types of problems in a single template that supports a problem descriptor, a set of parameters, and a fix code. This approach has been used in calculus and algebra courses. It is confirmed that the average grades of students are increasing, due to the increase in the number of exercises performed. Students feel more motivated to work. Moreover, the automation of many actions allow instructors to improve the time distribution and students' progress monitoring.
The automatic creation of a large number of exercises for teaching topics in the framework of mathematical education is a difficult task. In the installed system (Liebscher, Eckhard; Michael, Ben 2019), files with exercise elements are prepared for input via the interface. The generation process is performed in the R environment. You can generate as many instances of a certain type of exercise as necessary. The focus here is on math exercises, but these ideas can be used to create exercises in similar areas, such as natural sciences and computer science.
Despite the use of various methods in content generators (ontologies, data synthesis, templates, etc.), all of them come down, to one degree or another, not to create really new training materials, but to process existing content stored in databases , or to duplicate task options from templates. To get out of this vicious circle of repeatedly repeating modification of traditional content, a methodology is proposed for generating content based on subject-based simulation models of educational material (Rotkin, Yavich, & Malev, 2018) which allows to switch from processing data from databases knowledge directly to the generation of knowledge in the form of educational content.
The base of the methodology is a universal mathematical model that describes the behavior (i.e. a set of states) of the investigated object. The universality of the model assumes its multi-parameter nature, that is, the presence of parameters and variables that exhaustively reflect the aspects of the functioning of the object being investigated.
Thus, the simulation model should include a significant number of parameters that take values in wide ranges, so that any data characterizing the object can replace the corresponding parameters of the model. Although mathematical analysis does not require the establishment of qualitative differences between model parameters, it is necessary to represent the difference between the original (active) and derived parameters. For example, there is a set of "primary'' independent parameters that characterize the object's own properties, and there are "external'' parameters dependent on them. However, a set of some of its own and "external'' parameters can constitute an active "user package'', that is, a set of data selected by the individual user as a characteristic of the object, and the remaining parameters acquire the status of "secondary" The simulation model of an object can be represented in a configuration space with a dimension equal to the total number of parameters that act as generalized coordinates of the system. The connections in this space are represented by multidimensional surfaces, and the point representing the configuration of the object is located at the intersection of these surfaces. Combinatorial analysis gives a chance to determine a set of object configurations with varying its parameters. It is easy to understand that the number and diverseness of the set of such configurations is extremely large, which significantly complicates the procedure of knowledge extraction, and requires the development of special methods and approaches.
The triangle (taken together with its properties) is selected as the object of generation for this paper. On the one hand, this object is simple and intuitive; it is known to all by its basic mathematics course (Davidovitch & Yavich, 2017). On the other hand, its properties include a wide variety of attributes, equations, parameters. This makes the triangle a very suitable object for modeling and generation.
In (Mironescu & Panaitopol, 1994) Mironescu and Panaitopol prove that for every three positive real numbers 1 , 2 and 3 there exists a triangle ABC such that = 1 , = 2 and = 3 . In (Oxman, 2008) Oxman shows the uniqueness of such triangle. In this paper we consider these, and all other problems appearing in the triangle and provide an algorithm to answer all of them.

The Task
We have a list of 21 parameters for each triangle ABC:

Search Algorithm
One of the possible algorithms is to compare given by user values of parameters to standard and search possible triangles in such a way. We construct an array with all values of parameters for standard triangles (with positive integer angles). The array consists of 178 * 179 2 = 15931 triangles.

Array Construction
We write a short program which will construct an array of all triangles with positive integer (in degrees) angles. Of course, three angles do not define a triangle, however they define it up to a linear parameter (for example, ). One could compute all values of parameters by introducing functions and using these well-known formulas: Now we are ready to define an array of all standard triangles (i.e. with integer angles). We run over all the alpha and beta that have positive whole angle and save all the values of their parameters.
We have differentiated between parameters with function ( ) that returns an order of the parameter number : in particular, sides, bisectors medians etc. are parameters of order 1; angles are parameters of order 0; and the area is a parameter of order 2.

An Algorithm
The user chooses three parameters (number 1 , 2 and 3 ) and provides values 1 , 2 and 3 correspondingly. Our goal is to answer whether triangle satisfying these conditions exists and find all triangles with this property.
First, we check whether we can answer immediately that there are no triangles satisfying these properties. In particular, we check if  for each side, a height must be less than or equal to an internal bisector, which must be less than or equal to a median. If two of them are equal, then the third must be equal to them since a triangle is isosceles.  an angle must be strictly lower than , < and < .  + + = 180 0 , therefore, a sum of any two of them is lower than 180 0 .  Side lengths must satisfy three triangle inequalities.
If parameters provided by the user contradict to one of these conditions, then we just say that such triangle does not exist.
There are four cases: the user provided three, two, one or zero parameters of order 0. In each case the main function ( , ) will be defined.

Case 1: All Three Parameters Provided by the User are of Order 0
There are only 6 angle parameters of order 0: , , , , , . If the user decided to provide values for three parameters among these, then one option is that there exist infinitely many triangles (each triangle can be homothetically transformed with arbitrary coefficient, and the achieved triangle will have the same values for parameters of order 0. We can find all possible triangles with a condition = 1, after that write formulas for each parameter with respect to . Let us write a search over all possible integer parameters and , and check three inequalities: | 1 − , 1 , , -| < , | 2 − , 2 , , -| < and | 3 − , 3 , , -| < , where is a small angle, for example, = 1 ∘ , and is the database of parameter . In this case we define the main function in the following way: and it must be less than 3 for our found triangles.
2.5.1 Case 2: The User has Provided two Parameters of Order 0, and one Parameter of a Positive Order Without loss of generality we assume that positive ordered parameter is the third one. In this case there should be only finite number of possible triangles. We write a search over all possible integer parameters and , and check two inequalities: | 1 − , 1 , , -| < and | 2 − , 2 , , -| < .
First, we find all triangle with = 1 using two parameters of order 0, and after that we calculate using the third parameter by the formula (values α and β is taken from the triangle with = 1): In this case we define the main function in the following way: ( , ) = 1 2 ⋅ (( 1 − , 1 , , -) 2 + ( 2 − , 2 , , -) 2 ) and it must be less than 2 for our found triangles.
2.5.2 Case 3: The User has Provided one Parameter of Order 0, and two Parameters of Positive Orders Without loss of generality we assume that the zero ordered parameter is the first one. We write a search over all possible integer parameters and , and check whether the value 1 differs from , 1 , ,by less than .
If this condition holds, we can calculate two values of R: 2 and 3 using values 2 and 3 respectively: We check whether the ratio 2 3 is closed to 1 (if and is closed to values in the needed triangle, it must be closed to 1). We can check it in the following way:| 2 3 − 1| < where is some small constant, for example 0.01. In this case we define the main function in the following way: and it must be less than 2 for our found triangles.

Case 4: The User has Provided Three Parameters of Positive Orders
In this case we will do the same search as in the previous case, but we will define three values of : 1 , 2 and 3 by the same formula . In this case we will need to check three inequalities: and it must be less than 3 for our found triangles. Now for each found solution (i.e. pair of integer numbers( , )) we start the searching in its neighbors that far from this point in 1 angle degree from alpha or beta to find a closer minimum of our function.
Now several found approximations for one solution will go to one point, and we are ready to clarify our approximation. At this moment our approximation has integer angles. But we want to clarify it to have k decimal places. I suggest taking k=3 however one can take larger if there is a need.
The algorithm is as follows. Assume that we have decimal places already calculated (in the beginning = 0). Let ( , ) be our point. (In particular, we take( 0 , 0 ) to be a pair found in the previous step. We take = 10 *; ;1+ . For 1 from -10 to 10 and for 2 from -10 to 10 we evaluate ( + 1 , + 2 ). We compare all these 441 numbers and find the minimal one. We fix the pair ( + 1 , + 2 )as a new pair ( * :1+ , * :1+ ). This will help us to calculate the decimal place + 1. We continue until decimal places will not be computed. At the end we will obtain a pair ( , ) which will clarify our approximation up to k decimal places, i.e. as accurate as we want.

Examples
Here are illustrations for the generating triangles: On the Figure 1 we can see 4 examples of triangles; each was generated by 3 parameters (including the radius R of the circumscribed circle) listed below the figure.

Discussion
The development of the methodology and the current algorithmic layout of the content generator using the example of a triangle as the simplest object of mathematical education gives a number of significant advantages in the field of content management of e-education.
In contrast to the traditional methods of creating and solving problems about the properties of a triangle (Mironescu & Panaitopol, 1994;Oxman, 2008), which consider individual particular issues, the developed technique based on 21 parameters includes almost all the basic attributes and properties of triangles. The number of possible combinations of parameters in the generated configurations is several orders of magnitude greater than the number of triangles in the original array, which allows the formation of an almost unlimited number of original problems.
The advantage of the imitational generator is also that it does not need primary content databases, which in conventional sources (Dorodchi, Al-Hossami, Benedict, & Demeter, 2019;Rüdian & Pinkwart, 2019) usually are a source for modifying the content. In addition, the use of optimization calculation methods can significantly expand the scope of tasks. Optimization allows to choose both initial and secondary parameters as parameter sets. Conventional simulation generation (Rotkin, Yavich, & Malev, 2018) is based on direct configuration dependencies exclusively on the initial parameters, which limits the variety of tasks.
The other side of these advantages is the need of large computational resources. This circumstance is overcome by using special algorithmic techniques. Using a circumscribed circle of radius 1 and varying the dimension reduces the number of initial parameters from three to two and, accordingly, reduces the dimension of the calculation model. An additional significant effect is the use of stepwise optimization. Together, these measures give an acceptable level of estimated time.

Suggestions
This work has significant development prospects, both methodological and practical (applied).
There is a great interest and considerable difficulty in the improvement of the optimization problem, with the aim of eliminating the formation of large source arrays and increasing accuracy (not due to an increase in the volume of calculations).
The following list is also necessary to be committed: to supplement the generator with an ontological model and algorithm for selecting acceptable tasks from sets of configurations; to improve the user interface algorithms in order to adequately represent the generated content; to extend the private methodology to other mathematical and related problems; to test pilot generators in the educational process; to study the effect of using content generators on the didactic features of trainings.