Design and Evaluation of Experiment Course Arrangement System Based on Backtracking and Analytic Hierarchy Process

With the continuous expansion of the scale of colleges and universities, it may be necessary to temporarily add some experiment class while teaching, so the demand of the experiment course arrangement system is increasing. Based on the backtracking method, this paper constructs a basic algorithm for the problem of courses arrangement in the laboratory. The algorithm supports the functionality to adding new courses to the schedule at any time, and is able to randomly generate the schedule which generates different outcome at each time the algorithm runs. The branch prediction method is used to optimize the performance of the algorithm. At last, a personal and digital evaluation method of teachers and students’ satisfaction is given by using Analytic Hierarchy Process (AHP) to solve the curriculum problem. By using this method, the curriculum generated by this algorithm can be optimized, so as to getting more satisfactory schedule plan for teachers and students.


Introduction: Current Situation of Course Arrangement in Laboratory
Curriculum is the navigation map of teaching activity in university and the basis of teaching arrangement. All teaching activities are carried out around curriculum. With the expansion of universities and the shortage of teaching resources, solving the course arrangement problem is becoming more and more important. Most of the courses are arranged by the academic affairs office before the beginning of the semester, such activity is, sometimes referred to, as the large curriculum. In the process of carry-out of a curriculum, however, each department needs to arrange some courses or meetings which is not on the curriculum. This occurs especially when the arrangement of experiment courses is to be considered, which could involve the occupation of laboratories or other resources, and is generally arranged by each department or teachers themselves. [1] For example, when arranging material mechanics experiments, in a certain period of time, the laboratory may have been occupied, the teachers may have arranged tasks, or the students are in other classes, which makes it difficult for the academic staff to arrange temporary classes. Therefore, we should find a flexible method to meet the needs of experiment course arrangement. Compared with the common course scheduling problem, the experiment course scheduling problem is more complex. In essence, it is a secondary allocation problem to reschedule the time of teachers, students and laboratories on the basis of not affecting the school curriculum. That is to say, referring to the large curriculum, the three elements -teachers, students, and laboratories -being combined for many times, ensuring that one element only appears once in a period of time, and finally completing the reasonable experiment course scheduling. [2] In addition, the humanistic needs of teachers and students should be considered as much as possible [3] , such as: 1) Teachers and students' personal requirements (aka avoid certain periods which is particularly unwanted); 2) Teachers and students should leave a gap between the two courses to prepare for the experiment or changing of the laboratory; 3) The using frequency of each laboratory should be arranged as equal as possible. For different schools, humanistic needs are not same. However, a mechanism should be established to evaluate the level of efficiency of the curriculum from the mathematical point of view, so as to objectively and intuitively judge whether the schedule is properly arranged. Through the evaluation of the schedule, an optimization to the scheduling algorithm, and a more humanized scheduling result could be made practically. The purpose of this paper is to set up a system to generate the experimental course scheduling scheme iteratively, and then design a scientific evaluation method. On university classroom arrangement problem, the genetic algorithm could generate feasible solutions and optimize the classroom arrangement. [4] But when it comes to experiment course arrangement problem, Backtracking is more practical, because the scale of the problem is always small on this issue.

Mathematical Representation of Class Time, Teachers, Students and Laboratory Resources
In order to facilitate the description of the laboratory scheduling algorithm, the following content uses the concept of set in mathematics to define class time, teachers, students and laboratories. In the problem of laboratory course arrangement, for simplicity, and according to certain situation, class time is simplified into course periods. Therefore, the class time of an experimental course can be expressed as , , , , , in which, represents the beginning week of the course, represents the end week of the course, represents the day of the week, represents the beginning of the course and represents the end of the course. All teachers are represented as sets , , , ⋯ ⋯ , students (classes) are represented as sets , , , ⋯ ⋯ , and laboratories are represented as sets , , , ⋯ ⋯ .

Format of Application for Experiment Course
An application for an experiment course can be expressed as: ', ', ', , , where '、 ' are the teaching teacher and students (class), ′ is the collection of available laboratories for the course, is the number of sessions required for each class of the experimental course, and is the number of weeks that the experimental course lasts.

Analysis of Course Arrangement
The combination of teachers, students (classes) and laboratories at a specific time forms a subset of ', ' , , , , , , , where ' is a subset of and ' is a subset of , which represent the teaching teachers, students (classes) respectively. And is laboratories used in the course. When all the courses are recorded, there is the course information , , , ⋯ ⋯ , which includes both experiment as well as other course information. Curriculum information set should meet the constraints: teachers and students can only have one class at the same time, and laboratories can only be used by one class at the same time. That is, ∀ , ∈ none of them is satisfied:

Course Arrangement Algorithm
Backtracking is an optimal search method. It searches forward according to the selection criteria to achieve the goal, but when it finds that the original selection fails to reach the goal, it will take one step back and choose again. [5] Backtracking method is very suitable to solve the problem of arranging courses, especially on this issue, because the scale of the problem is always small. By studying the previous algorithms [6] , a more complex backtracking algorithm is designed.

Backtracking Solution
Use depth first backtracking method to find a conflict free solution. A basic algorithm is given: 1) Select an unselected lab in the collection of currently processing applications (set L prime) (initially the first one). If there is no unselected laboratory, jump to 4) 2) In the course week (w1 throught w2), all sections are traversed one by one to find the sections that still meet the constraints after the course is added to the course information set, and select one of the unselected sections. If you cannot find a section that meets the condition, jump to 1).
3) Add the course information to the course information set, process the next application, and execute 1). If there is no application, an effective course arrangement is found. 4) Delete the previous course information added to the course information set, process the previous application again, jump to 2)

Problems in Basic Algorithm
Obviously, this algorithm is very complex. There are two main reasons: 1) If the selected laboratory does not have an optimal solution, the amount of calculation based on the premise of selecting the laboratory is wasted. 2) In the second step of the algorithm, when traversing all sections, there are usually dozens of choices, and each choice means traversing the course information set once, so as to determine whether the constraints are met. Every time the time choice fails, the calculation after this choice will be wasted. Also, if we choose the time according to the specific rules (such as the order of time), it is likely that the courses will be arranged in the same time (such as the first class on Monday), which will inevitably lead to the resource shortage of the laboratory in a certain period of time, and in rare cases, it will lead to the implementation of step 4 of the algorithm, which will further reduce the efficiency of the algorithm.

Improvement of Branch Prediction Method
In order to improve the efficiency of the algorithm, the branch prediction method is used to reduce backtracking. The changes of algorithm steps are as follows: 1) For laboratory selection: before selection, traverse the existing course information set at first, and calculate the usage frequency of each laboratory in. According to the frequency, it is divided into idle group and busy group. When algorithm 1 is executed, the idle group is preferred. In order to further optimize the algorithm, we should choose a completely idle laboratory when there is a completely idle laboratory. At the same time, it should be selected in a random way. 2) For time selection: in order to reduce or avoid execution 4), the time distribution of the course should be more uniform. Therefore, when choosing class time, you can randomly choose a time, and then check whether it meets the constraints. In order to further improve the probability that the time of random selection meets the constraints and reduce the number of times of traversing the course information set, further optimization can be carried out: multiple times are generated randomly at one time, whether they meet the constraints is checked at one time, and then one time is selected from the time that meets the constraints. In addition, considering that some teachers may have other affairs in some time periods, which are often not entered into the educational administration system, it is possible when we choose the time at random, we avoid to choose the time that teachers do not expect to attend classes.

Evaluation of Scheduling Results
In order to make the results more humanized and meet the requirements of teachers and students, AHP can be used to evaluate the results. AHP can synthesize various opinions and digitize the proportion of various indicators, so we can get the most popular schedule accurately. This method is not only suitable for experimental courses, but also for other courses. The best scheme is selected according to the evaluation results. The analytic hierarchy process can be carried out as follows: [7]

Identification of Evaluation Indicators
First of all, several evaluation indexes should be determined and a hierarchy chart should be drawn, as shown in Figure 1. According to psychologists, the number of evaluation indicators should be less than or equal to seven. It should be noted that the evaluation indicators here are demanded quantifiable. For example, whether a course is arranged in an unexpected period of time can be counted according to the frequency of this phenomenon. Here, we discuss three requirements listed in the section 1 as an example.

Statistical Judgment Matrix
Then, through the way of questionnaire, using the paired comparison method in the scale of 1~9, we collect the degree of attention of teachers and students to each evaluation index. We then remove the extreme value of their answers, find the statistical average, and construct the pairwise comparison matrix (judgment matrix) of the optimal scheduling scheme of the target layer in the criteria layer. The value of the row and column of the matrix indicate the importance of the evaluation index compared with the evaluation index . For example, survey and statistics are conducted for the three requirements in the previous article, and the assumed matrix is as follows: The two factors are of equal importance 3 One factor is slightly more important than the other 5 One factor is obviously more important than the other 7 One factor is intensely important than the other 9 One factor is extremely important than the other 2,4,6,8 The median value of the two adjacent judgments reciprocal The judgment of factor and comparison is , The judgment of factor and comparison is 1/

Consistency Testing
First, calculate the maximum eigenvalue of the judgment matrix, which is calculated as λ_max=3 in this case and then calculate (consistency index).
In this case 0.52, 0 When 0.01, the judgment matrix is considered to have passed the consistency test. Otherwise, the judgment matrix needs to be modified. The case described above passed the consistency test. And then, we calculate weight vector. In this paper, the geometric average method is used to obtain the weight vector.
In this case, the weight vector is , , After getting the weight vector, we need to make clear the calculation method of the evaluation index of the schedule. Although the calculation methods of different indexes are different, the final result should be positive, and it will ensure that the final value is positively related to the quality of the schedule. In this case, for three requirements, the following calculation methods are given respectively:  For requirement 1: it can be measured by the frequency of the whole curriculum arranged to the time period that the teachers or students do not expect.  For requirement 2: it can be measured by the frequency of the same teacher or the same student continuously attending classes but not in the same classroom plus the frequency of the laboratory continuously undertaking two different courses.  For requirement 3, because the method of prioritizing the low-frequency laboratory is adopted in the algorithm, the difference in the use of the laboratory will not be large, and only the use of the unbalanced situation can be counted. For the same type of laboratory, the difference between the maximum and minimum use frequency can be calculated, and then the maximum value of business trip can be calculated for different types of laboratories. The standard deviation of different types of laboratories is calculated by using the laboratories with frequency greater than the average, and then the weighted average of the standard deviation of various laboratories is taken according to the number of laboratories. Using computer, a set of evaluation indexes is calculated for each course plan, which is written as a matrix, and each line corresponds to a set of evaluation indexes for a course plan. After getting the matrix, we divide each term by the sum of the column, and standardize it. Finally, as we calculate the index, we count the cases that do not meet the needs, so the lesson arrangement plan is good, but the weight is lower. So we use a full 1 matrix, subtract the matrix, and get the final evaluation index matrix, which may be called the evaluation index matrix. For this example, subtract the above matrix from a 3 × 3 full 1 matrix. Here, assume that the matrix calculated in this case is as follows . . . .
. . In this case, the weight of each scheme can be obtained by multiplying the evaluation index matrix and weight vector W. The best scheme is the one with the highest weight. For example, in this example, we get: . . . It can be seen that scheme 3 has the highest corresponding weight, so scheme 3 is the optimal solution in this batch of course arrangement schemes.

Conclusion
In this paper, a feasible and efficient algorithm is proposed to randomly generate the schedule of experiment courses based on the actual scheduling method in the laboratory of Beijing University of Posts and telecommunications. The algorithm does not need to apply for all the experiment courses at one time, so it is very flexible. In order to meet the humanistic needs of teachers and students, this paper also provides a set of evaluation methods of curriculum arrangement scheme, so as to find the curriculum arrangement that best meets the needs of teachers and students. By using this system, we could get a vary beautiful schedule which can meets the practical requirements and satisfy more students' and teachers' humanistic needs. If the algorithm can further improve the accuracy of branch prediction, the efficiency may be further improved. Moreover, if we can understand the needs of teachers and students in depth, we can modify the algorithm to a certain extent to get a better schedule scheme with a greater probability, and reduce the number of randomly generated schedules.