Research on Routing Algorithm Based on Limitation Arrangement Principle in Mathematics

Since the research on information consistency of the whole network under OSPF protocol has been insufficient in recent years, an algorithm based on limitation arrangement principle for routing decision is proposed and it is a permutation and combination problem in mathematical area. The most fundamental function of this algorithm is to accomplish the information consistency of the whole network at a relatively fast speed. Firstly, limitation arrangement principle algorithm is proposed and proved. Secondly, LAP routing algorithm in single link network and LAP routing algorithm in single link network with multiloops are designed. Finally, simulation experiments are worked by VC6.0 and NS2, which proves that LAPSN algorithm and LAPSNM algorithm can solve the problem of information consistency of the whole network under OSPF protocol and LAPSNM algorithm is superior to Dijkstra algorithm.


Introduction
With the rapid development of social economic, the computer network develops rapidly.The relationship between the current Internet and our life is more and more close.Meanwhile, network resource and the amount of information are consistently increasing, which leads to the emergence of many problems including the following: the computer network loads onerously, the switch speed of information slows down, and the communication quality becomes poor [1].Therefore, it should not be ignored to design an efficient, stable, and flexible routing algorithm to solve the problems.In recent years, the routing algorithm has been a hotspot, and research on routing algorithm mainly includes three different directions as follows: (1) a new network environment is proposed, and a routing algorithm is studied under it, for example, Ad Hoc, NoC, WSN, IoT, and DNT [2][3][4][5][6]; (2) a hybrid routing algorithm is designed based on two or more mature algorithms, which is usually heuristic or intelligent (e.g., artificial intelligence and biological intelligence); (3) the traditional research mode is converted and a new routing algorithm is designed, which is the theoretical innovation [7][8][9][10][11].
Routing algorithm is a special computation method, and its purpose is to realize routing function.The traditional routing algorithms include static/dynamic, host intelligently/ routing intelligently, domain/outside, and link state/distance vector [12][13][14][15].In short, routing algorithm should be fast in convergence speed, simple and easily understood, stable, strong, and flexible.In fact, it is of no significance to only do research on routing algorithm.The routing algorithm should be used to some routing protocols.The routing protocol can collect data of network in current state, for this reason, and then find the optimal path [16].RIP and OSPF [17,18] are two typical internal gateway protocols.RIP protocol fails to cope with a large amount of nodes in network, so OSPF protocol has been a common protocol in recent years.OSPF protocol was proposed in 1989 and it aims at accomplishing the information consistency of the whole network as soon as possible [19].In OSPF protocol, Dijkstra algorithm [20] is always used to accomplish the information consistency of the whole network under OSPF protocol and it is also approved by domestic and foreign experts and scholars.
Information consistency is defined as follows: any one routing node can know the information of the other routing nodes.For example, there are 4 nodes in network; they are A, B, C, and D. If A owns the information " * * ", B owns the information "@@", C owns the information "##", and D owns the information "$$", then they all own " * * ", "@@", "##", and "$$" after accomplishing the information consistency.Of course, it is very important to keep information consistency of the whole network.Three reasons are listed as follows.(1) OSPF protocol focuses on whether the link state is synchronous or not.The information of all routing nodes must keep consistency; namely, any routing node can know the network topology at any time.(2) In recent years, Internet technology has developed rapidly; plenty of science and technology information resources are stored in Internet.These resources can be browsed online and shared smoothly by keeping the information consistency of the whole network.(3) The other routing nodes can be regarded as the copies to exchange information with each other when one or more routing nodes go wrong.In this way, the integrity of the network information can be guaranteed.But, it is a pity that the research on information consistency of the whole network under OSPF protocol has been insufficient for 25 years and people only focus on how to detect the information consistency [21][22][23].In terms of the study of information consistency, Dijkstra algorithm has been selected as the unique algorithm so far (i.e., no other algorithms).Generally, Dijkstra algorithm focuses on the cost of link, and plenty of time is spent to compare all cost of link when the shortest path is found.Does it have a kind of new method that can avoid the trouble to achieve the same purpose as Dijkstra algorithm?In this paper, we will study the information consistency of the whole network under OSPF protocol.
Given the above consideration, LAP routing algorithms including LAPSN algorithm and LAPSNM algorithm are proposed to solve the problem of the information consistency of the whole network under OSPF protocol.The LAP routing algorithms are inspired by LAP algorithm that is a permutation and combination problem in mathematical area.Meanwhile, LAP algorithm is a new algorithm and it is proposed and proved based on another limitation arrangement problem.Three strategies are used to design LAP routing algorithms, including the depth traversal method, off nodes method, and added loops method.The static experiments on VC6.0 and the dynamic experiments on NS2 are performed for two designed LAP routing algorithms.The former results reveal that routing algorithm in this paper is feasible and effective.The latter results demonstrate that the routing algorithm can accomplish the information consistency of the whole network and LAPSNM algorithm is superior to Dijkstra algorithm and LAPSN algorithm.
The paper is organized as follows.Section 2 proposes the limitation arrangement principle algorithm and gives the optimal limitation arrangement.The limitation arrangement principle algorithm is applied to OSPF protocol and to solve the problem of information consistency, two routing algorithms including LAPSN algorithm and LAPSNM algorithm are designed in Section 3. Experimental results based on two routing algorithms are reported in Section 4. Finally, Section 5 concludes this paper.

Description of LAP Algorithm
To discuss this paper, the notations are introduced in Notations section.

LAP Algorithm
where   is shown in Proof.
(2) Consider  ≥ 4. The style of  is similar to that of   by Theorem 2, so   is just to be proved in Theorem 4. On this condition, the method of abstract generalizations is adopted to prove   .Let  = 10; then  1 ,  2 , and  3 can be got as follows: ) − [( 10 − 2 1 ) To compare and analyze  1 ,  2 , and  3 , when  = 10, we generalize   .Consider The trend is extended to arbitrary ; the formula (3) can be got.

Optimal LA Algorithm.
In  LAs, there must be a LA that is the optimal limitation arrangement (OLA).OLA can be described in Definition 5.
According to Definition 5, we give Theorem 6.

LAP Routing Algorithm Design
3.1.Basic Points.OSPF protocol pays attention to the information consistency of the whole network, namely, whether the link state is synchronous or not in computer network.Let  = {1, 2, . . ., }, and these elements in set  are different from each other.These routers in network are converted into different numbers, and they can be regarded as the elements in set . Suppose  nodes are arranged in a single link network, and then only these adjacent nodes can exchange information at the initial moment.Right after this, the  nodes are moved repeatedly by some methods, and information consistency of  nodes can be accomplished at some point.The process can be regarded as LAP transform, and the method can be named as LAP.In fact, LAP algorithm can be used for computer network and to keep the information consistency of the whole network under OSPF protocol, which is inspired by the following three basic points: the existence of network path, the construction of adjacent routers, and the existence of network loops.

Network Path.
Only when network connection is available, the information can be transmitted fluently.We have Theorem 7.
Theorem 7. Suppose network connection is available; a path can be found from node V  to node V  .
Proof.Suppose all nodes are included into set , and the computer network can be decomposed into  single link structures.They are denoted by  1 ,  2 , . . .,   , the corresponding sets of nodes are denoted by  1 ,  2 , . . .,   , and these connection nodes between each single link are denoted by trace 1 , trace 2 , . . ., trace −1 (e.g., the connection node between  1 and  2 is trace 1 ).We have the following formula: Let node V  be in single link   and node V  in single link   ; then V  ∈   and V  ∈   .If  = , then node V  and node V  are in the same single link.It is obvious that a path can be found from node V  to node V  .If  ̸ = , any  < , then a path can also be found from node V  to node V  by these connection nodes trace  , trace +1 , . . ., trace −1 .Similarly, a path can also be found from node V  to node V  when  > .To sum up, Theorem 7 is proved.

Adjacent Routers.
At the initial moment, node V  is adjacent to node V +1 and node V −1 , and node V  can get the information of node V +1 and node V −1 indirectly (i.e., node V  can exchange information with node V +1 and node V −1 without any hop).Right after this,  nodes should be rearranged by running the limitation arrangement after  nodes are moved.In short, node V  should not be adjacent to node V +1 and node V −1 at the next limitation arrangement moment.It should be adjacent to other routing nodes except node V  , node V +1 , and node V −1 , which is named the maximization construction on adjacent routers.For example, there are four routing nodes in single link network; they are V 1 , V 2 , V 3 , and V 4 in turn.At the initial moment, node V 2 can get the information of node V 1 and node V 3 indirectly.At the next limitation arrangement moment, node V 2 should be adjacent to node V 4 .And then, the arrangement may be {V All processes need LAP algorithm to realize the maximization construction on adjacent routers, which aims at improving the speed of information consistency of the whole network (e.g., node V 2 should be adjacent to other routing nodes.Otherwise, the solution is still the local optimal solution).

Network Loops.
The single link network is an ideal network topology, and there are a lot of loops in the actual network topology.At the initial moment, if one routing node is adjacent to many routing nodes, then it can accomplish information consistency with the other routing nodes faster.When these loops in network are so adequate that the network topology becomes an undirected complete graph, it is the best state that information consistency of the whole network can be accomplished at the fastest speed.So, the study of adding multiloops to single link network is necessary (See Section 3).

Symmetric 0/1 Table.
In this paper, we use symmetric 0/1 table to mark the results of information exchange.In terms of node V  and node V  , if node V  and node V  have accomplished the information exchange, then the corresponding element value is 1; otherwise, it is 0. Any element of the symmetric 0/1 table is denoted by  , and shown in the following formula: 1, routing node  and routing node  have been communicated 0, otherwise.(14) In terms of  routers, the state of information exchange after the initial moment is shown in Table 1.
In Table 1, at the initial moment, all routing nodes are converted into different numbers and arranged for {1, 2, . . ., }.Any routing node knows its own information; hence  , = 1.And because adjacent routing nodes can  Suppose there are five routers in single link network.At the initial moment, the arrangement is {1, 2, 3, 4, 5}; the status of information exchange can be seen from Table 2(a).The arrangement is {1, 3, 5, 2, 4} at the first limitation arrangement moment (i.e., OLA).The symmetric 0/1 table should be modified; then  1,3 ,  3,5 ,  5,2 , and  2,4 are changed to 1 from 0. The status of information exchange can be seen from Table 2(b).After OLA,  1,4 and  1,5 are still 0; the next limitation arrangement should ensure that routing node 1 and routing node 4 or/and routing node 5 are adjacent.The arrangement is {1, 4, 5, 2, 3} at the second limitation arrangement moment, and  1,4 is changed to 1 from 0. The status of information exchange can be seen from Table 2(c).At the third limitation arrangement moment, the arrangement is {1, 5, 4, 2, 3}. 1,5 is changed to 1 from 0, and the status of information exchange can be seen from Table 2(d).In Table 2(d), all elements are 1; in other words, the five routers have accomplished the information consistency.

Depth Traversal Method.
After initialization and OLA, one node is selected randomly as the head node, and then does depth traversal for the network topology.The concrete method is described in Hypothesis 1.
Hypothesis 1.When the next routing node needs to be researched, the next routing node number should be the routing node number which accomplishes the information consistency with the other routing nodes at the slowest speed.Namely, it is the routing node number that the number of 0 in one row or column in symmetric 0/1 table is the greatest and the used routing node number in former cannot be regarded as the next routing node number.If the number of 0 in two or more rows is equal, then the minimal routing node number should be regarded as the next routing node number.
Suppose there are eight routers in single link network; the routing node number 1 is regarded as the head node, and the changing process of LA is shown in column 2 in Table 3.As can be seen from column 2 in Table 3, the information consistency of eight routers can be accomplished by six times LAs, and the total number of coped routing nodes is 48.

Off Nodes Method.
It is a phenomenon: at some moment, one or more routing nodes have accomplished the information consistency with the other routers in advance.
If these routing nodes are still coped in the following LAs, then a lot of time will be spent because a lot of information is exchanged repeatedly.Given the above statement, we have Hypothesis 2.
Hypothesis 2. If one or more routing nodes have accomplished the information consistency with the other routing nodes in advance, then they should not be coped in the following LAs.
Suppose there are eight routers in single link network.In this way, the changing process of LA is shown in column 3 in Table 3.
It needs the same LA numbers (i.e., six times LAs) to accomplish the information consistency of eight routers under Hypotheses 1 and 2 as can be seen from Table 3.However, it needs to cope with 48 routing nodes (See column 2) under Hypothesis 1 because every time LA needs to cope with 8 routing nodes.And it needs to cope with 34 routing nodes (See column 3) under Hypothesis 2 because routing nodes 2, 3, and 4 are off at the forth LA, routing node 5 is off at the fifth LA, and routing node 6 is off at the sixth LA.In other words, the total number of coped routing nodes decreases obviously under Hypothesis 2, which proves that, in comparison with Hypothesis 1, Hypothesis 2 is better.Additionally, an example of five routers in single link network (see Table 2 for details).After the first limitation arrangement moment, routing nodes 2 and 3 have accomplished the information consistency with the other routing nodes (i.e., all elements of column 2 and 3 are 1).So they should not be coped in the following LAs; namely, routing nodes 2 and 3 are off (see Table 2(b) for details).

LAPSN Algorithm Description.
After analysis of LAP algorithm and its related theorems, depth traversal method, and off nodes method, the routing algorithm based on limitation arrangement principle in single link network (LAPSN) is described in Algorithm 1.
Step 1.  routing nodes in single link network are converted into different numbers.
Step 2. The OLA is got by Theorem 6.The current state of information exchange is marked by symmetric 0/1 table.
Step 3. The th LA is run, and  routing nodes are coped.The number of off routing nodes is checked, right after this; suppose it is ; the (+1)th LA is run and − routing nodes are coped.Otherwise, the ( + 1)th LA is run and  routing nodes are coped.
Step 4. Check the current LA.If the number of routing nodes is 2, then convert to Step 5; otherwise, convert to Step 3.
Step 5. Check the symmetric 0/1 table.If all elements in symmetric 0/1 table are 1, then end algorithm 1; otherwise, convert to Step 2.

LAP Routing Algorithm in Single Link
Network with Multiloops 3.3.1.Added Loops Model.The complex networks can be got by adding multiloops to single link network.In reality, the single link network with multiloops is the complex networks.The added loops model is shown in Figure 1.
The dashed line in Figure 1 represents that the link between two routing nodes cannot be added.At the initial moment, the adjacent routing nodes are connected, so the link between routing node  and routing node  + 1 or routing node  − 1 cannot be added.The link between routing node  and routing node  − 2 or routing node  + 2 cannot be added because there is a link between them in OLA.For the same reason, the link between routing node 2 and routing node  cannot be added.Theorem 8. Suppose  links can be added to single link network; the kinds of added links are 2  − 1, where  is shown in formula (15).In this paper, we maintain that the number of links added is equivalent to that of loops added.Consider Proof.
The total number of links in an undirected complete graph is (−1)/2.At the initial moment, the number of links in single link network is  − 1.At OLA moment, the number of links is  − 1.We have formula (16), and it is equivalent to formula (15).Consider (2) Proof of 2  − 1 is as follows.
Give three variables , , and , ( + )  is shown in the following formula: Let  =  = 1 and  = ; formula (17) can be converted to the following formula: According to permutation and combination principle, it has (  1 ) kinds to add 1-loops (i.e., only one loop) to single link network and (  2 ) kinds to add 2-loops to single link network.Similarly, it has (   ) kinds to add -loops to single link network.To summarize, the kinds of added links in single link network are (  1 )+(  2 )+⋅ ⋅ ⋅+(  −1 )+(   ).We know that it is equivalent to 2  − 1 when both sides of formula (18) are subtracted by 1.
To sum up ( 1) and ( 2), Theorem 8 is proved.In order to study the network model of added loops, given is an added loops method and it is shown in Hypothesis 3.

LAPSNM Algorithm Description.
Limitation arrangement principle in single link network with multiloops (LAP-SNM) is described in Algorithm 2.
Step 1.  routing nodes in single link network are converted into different numbers.
Step 2. The OLA is got by Theorem 6.The current state of information exchange is marked by symmetric 0/1 table.The total number of coped routing nodes is recorded, and it is .
Step 3. Add links to single link network, and then run LAPSN algorithm.If the current number of added links is less than , then run Step 3 repeatedly; otherwise, convert to Step 4.

Simulation Results
In this Section, we will give two kinds of simulation experiments, one is to test the performance of LAPSN algorithm (i.e., optimization results under Hypothesis 2) and LAPSNM algorithm (i.e., optimization results by adding links to single link network), and the other one is to be compared with Dijkstra algorithm on information consistency delays of the whole network.The test environment is set up on a personal computer with Intel Q8400, 2.66 GHZ CPU, 4 G RAM, and running on Windows 7. In addition, two different simulators (i.e., VC6.0 and NS2) are selected to test LAPSN algorithm and LAPSNM algorithm, which is necessary and reasonable.Three reasons are listed as follows.Firstly, VC6.0 adopts C++ code; the results often are ideal because they are without considering bandwidth, delays, cache, and so forth.However, it can be used to test enormous routing nodes.NS2 is a network simulator, and it adopts VC++ code and OTCL script.The results often are considerably realistic.However, it usually is applied to test relatively fewer routing nodes.Secondly, the combination of two experiments of different styles can further prove the rationality of algorithms, which ensures that the structure of this paper is rigorous and the algorithms can be more easily accepted by other authors.Finally, VC tests Hypotheses 1 and 2 and the method of added links, which is microcosmic.NS2 tests delays of algorithms, which is macroscopic.The line that comes from LA numbers changes smoothly and stably and the curve that comes from the code running time also changes smoothly and stably, which proves that Hypothesis 1 has impact on LAPSN algorithm stably.Additionally, the number of LA is 0 at the beginning because the limitation arrangement is generated when the number of routing nodes in single link network is greater than 4, which can be seen from ( 2) on condition where 1 ≤  < 4. In summary, Hypothesis 1 has a good adaptability for LAPSN algorithm.
In order to prove the performance of Hypothesis 2, we do two kinds of experiments.One is given 75-115 routing nodes in single link network and the step size is five, and the other one is given 40-400 routing nodes in single link network and the step size is forty.The experimental results are shown in Figures 3 and 4.
Suppose routing nodes in single link network are .The number of coped routing nodes in a LA begins to decrease when LA numbers are about /2 because some routing nodes begin to be off at this moment, which can be proved by Hypothesis 2. By analysis of Figures 3 and 4, we know that the change of the relationship between LA numbers and the number of coped routing nodes in a LA is very stable by 21 polygonal lines.The concrete performance is denoted by , that is, the difference between 1 and the ratio of the total number of coped routing nodes under Hypothesis 2 and the total number of coped routing nodes without Hypothesis 2 and shown in Table 4.
We know that the performance is in (0, 0.5) by Figures 3  and 4 because the number of coped routing nodes in a LA begins to decrease when LA numbers are about /2.As can be seen from Table 4, with the increase of routing nodes in single link network, the performance on LAPSN algorithm under Hypothesis 2 improves correspondingly and they are in (0.3381, 0.3668).In addition, the total number of coped routing nodes under Hypothesis 2 is less than that of Hypothesis 1.The results prove that Hypothesis 2 has a good optimization performance on LAPSN algorithm.We study the relationship between the number of added links and the total number of coped routing nodes.LAPSNM algorithm is run, and we have Figures 5 and 6.
In general, with the increase of the number of added links, the total number of routing nodes which are coped decreases.When the number of added links reaches , the information consistency of whole network is accomplished (i.e., it can be seen from ( 15)), because the complex network is an undirected complete graph and all routing nodes can exchange information with each other at the same time (i.e., the total number of coped routing nodes is  which is seen from ( 7)).In short, LAPSNM algorithm is superior to LAPSN algorithm.    of the whole network under OSPF protocol at present, they are compared with Dijkstra algorithm in this section.7.
In Figure 7, the information consistency delays of LAPSN algorithm are greater than that of Dijkstra algorithm.With the increase of routing nodes in single link network, the delays difference is greater and greater.Generally, LAPSN algorithm can solve the problem of information consistency of the whole network under OSPF protocol.But it is inferior to Dijkstra algorithm.

LAPSNM Algorithm
Test.Simulation parameters are as follows: routing nodes are 20 in single link network, the corresponding network delays are 20 ms, buffer queue size is 5 GB, and the other simulation parameters are the same as Section 4.2.1.We add 5, 10, 25, and 100 loops to single link network.The changing process of accumulation delays is shown in Figure 8, and the information consistency delays of whole network are shown in Table 5.As can be seen from Figure 8 and Table 5, the more added loops to the single link network, the less obviously the information consistency delays of the whole network.Therefore, we conclude that LAPSNM algorithm also can solve the problem of information consistency of the whole network under OSPF protocol and it is superior to LAPSN algorithm and Dijkstra algorithm.

Conclusions
In this paper, we give three definitions including ALA, LA, and OLA.Four theorems are proved including LAs, OLA, network path, and added loops.Three hypotheses are proposed including depth traversal method, off nodes method, and added loops method.In order to do further research on information consistency of the whole network under OSPF protocol, two LAP routing algorithms are designed.In Static Experiments section, the results reveal that LAPSN algorithm and LAPSNM algorithm have a good performance.In the Dynamic Experiments section, the results prove that LAPSN algorithm and LAPSNM algorithm can solve the problem of information consistency of the whole network under OSPF protocol and the performance of LAPSNM is superior to that of LAPSN algorithm and Dijkstra algorithm.In the next steps, we will study the stability of LAPSN algorithm and LAPSNM algorithm and propose a new algorithm for the complex networks.

LAP:
Limitation arrangement principle ALA: Another limitation arrangement OLA: Optimal limitation arrangement   : Th en u m b e ro fA L A : Th en u m b e ro fL A /: LAev e n t ,LA :{ 1 ,  2 , . . .,   } /{ 1 ,  2 , . . .,   } ()/(): The mathematical expectation of / : The number of routing nodes in network : The set of all routing nodes V: R o u t i n gn o d e : Subsingle link structure trace: Connection node between two subsingle links : The number of off routing nodes : The number of added links : The total number of coped routing nodes with multiloops : Optimization efficiency.

Figure 1 :
Figure 1: The model of single link network with multiloops.

4. 1 .
Static Experiments.LAPSN algorithm and LAPSNM algorithm are implemented in VC6.0.4.1.1.LAPSN Algorithm Experiment.There are 5-400 routing nodes in single link network and the step size is one.The LA numbers and code running time under Hypothesis 1 are shown in Figure2.

Figure 2 :Figure 3 :
Figure 2: LA numbers and code running time under Hypothesis 1.

Figure 4 :
Figure 4: The relationship between LA numbers and the number of coped routing nodes in a LA where  = 40-400 with step size of 40 in single link network.

Figure 5 :
Figure 5: The relationship between the number of added links and  where  = 75-115 with step size of 5 under Hypothesis 3.

Figure 6 :
Figure 6: The relationship between the number of added links and  where  = 40-400 with step size of 40 under Hypothesis 3.

Figure 7 : 5 Figure 8 :
Figure 7: The relationship between routing nodes in single link network and information consistency delays.
Definition 1.Given a positive integer  and a set  = {1, 2, . . ., },  elements in set  are arranged; if 12, 23, . . ., (− 1) are not included in an arrangement, then the arrangement is an another limitation arrangement.Let   represent the number of ALA, and   is shown in Theorem 2.

Table 1 :
Information exchange table after initialization for  routers.
1exchange information indirectly,  ,+1 =  +1, = 1.At the next limitation arrangement moment, if a routing node can obtain the new information of other routing nodes, then the element is changed to 1 from 0. If all the elements in Table1are 1, then  routing nodes have accomplished the information consistency in single link network.Here, it must be noted that OLA should be considered as the first LA in LAP routing algorithm because the corresponding mathematical expectation is the least, which saves time at the next limitation arrangement moment.

Table 2 :
Changing process of information exchange for five routers.

Table 3 :
Changing process of LA in single link network for eight routers.

Table 4 :
Performance table of LAPSN algorithm under Hypothesis 1 and Hypothesis 2.

Table 5 :
The comparison table of information consistency delays/ms.