Problem of Maximum Matching in Non-Bipartite Graph Using Edmonds’ Cardinality Matching Algorithm and Its Application in the Battle of Britain Case

Matching is a part of graph theory that discusses pair. A matching M is called to be maximum if M has the highest number of elements. A blossom which is encountered in non-bipartite graph can cause failure in process of finding the maximum matching in non-bipartite graph. One of the algorithms that can be used to find a maximum matching in non-bipartite graph is Edmonds’ Cardinality Matching Algorithm. Shrinking process is done in each blossom Bi that is encountered to become pseudovertex bi , in a way that each blossom does not interfere the process of finding a maximum matching in non-bipartite graph. In order to accelerate the finding, simple greedy method is used to perform initialization of matching and BFS algorithm is also used in constructing an alternating tree in a non-bipartite graph. The research discussed the finding of maximum matching in non-bipartite graph using Edmonds’ cardinality matching algorithm. In addition, this research gave a sample of its application in the resolution of The Battle of Britain case. The result obtained is a maximum matching in non-bipartite graph. The maximum matching obtained is a solution to the case of The Battle of Britain.


INTRODUCTION
A matching  in  is a subset of () where there are no two edges in  that meet in the same vertex [3].Matching concept can be used in many things especially for the problem of pairing.In the discussion about matching, there is a term called maximum matching.Maximum matching is matching  with the highest cardinality [1].Generally, the finding of maximum matching is performed in bipartite graph, but it can also be executed in non-bipartite graph.
The process of finding the maximum matching in non-bipartite graph is a bit different from that in bipartite graph where in non-bipartite graph, it should contain at least an odd cycle that issues a blossom.A blossom can cause a failure in some algorithms of finding the maximum matching or it cannot be engaged in finding the maximum matching in non-bipartite graph.
One of the algorithms that can be used in finding maximum matching in nonbipartite graph is Edmonds' cardinality matching algorithm.This algorithm can handle a blossom found in non-bipartite graph.Hence the process of finding maximum matching can be done without any obstacle even though there is a blossom while finding the maximum matching.

METHODS
The research was begun with studying the basic concept about graph theory which cover definition of basic graph, types of graph, subgraph and skelter subgraph, operation of graph, and basic concept about tree graph and matching concept in  graph.Besides, the research also explains about Breadth-First Search (BFS) algorithm to arrange tree construction of alternating .Then, it discusses Edmonds' cardinality matching algorithm and its application in finding a maximum matching in a graph and in the last chapter, there is a sample of pairing a pilot in a war of Britain in 1940 which was taken from M. Gondran and Minoux's book entitled "Graphs and Algorithms".

Definition: Matching [6]
A matching  in  is a subset of a set () where there are no two edges in  that meet at the same vertex.A  graph with matching  ⊆ () can be written in (, ).Example: A graph  1 with matching  = { 2  3 ,  4  5 }.

𝐺 1 :
There are two vertex terms in matching graph: 1. Saturated vertex is a vertex which is incident with the edges in matching .[8] Example: In  1 , the saturated vertex is vertex  2 ,  3 ,  4 ,  5 .2. Exposed vertex is a vertex which is not incident with each edge in matching M. [8].
Example: In  1 , the exposed vertex is vertex  1 and  6 .
Apart from vertex, path in the matching graph is also divided into two kinds: 1. Alternating path is a path with the edges that alternate between the edge that is included in  and not included in .

Maximum Matching
Matching  in a  graph is called maximum if there is no matching  ′ in  with | ′ | > ||.[1] Example: Graph with a matching that is not maximum yet Graph with a matching that is already maximum

Matching Initialization
Initialization process is used to shorten the finding of maximum matching in a graph.This process uses a help of simple greedy method as follows: [9] 1.  = ∅ 2. If there is no more e edge which can be added into , then stop 3. Otherwise, select e edge that does not have the same vertex with the edges in  3.1  = ( ∪ ) 4. Turn back to .

Blossom
A blossom  in a matching graph (, ) is an odd cycle with  ∩  which is the maximum matching in  with base which is an exposed vertex or outer vertex for  ∩ .[3] Example: In a case of bipartite graph, it is not possible to find a blossom while constructing alternating tree  because bipartite graph does not have two vertices that are adjacent to each other at the same partition.Therefore, it is impossible for two vertices at the same layer to join each other [10].The following below is the illustration: A blossom in non-bipartite graph can raise a possibility of not finding an augmenting path while constructing alternating tree  so that it causes a failure in the finding process of maximum matching [10].

Shrinking Blossom
To prevent the problem caused by a blossom , the process of shrinking and unshrinking should be done to a blossom  that is encountered when the alternating tree  is shrinking.A shrinking blossom is a shrinking process to odd cycle in (, ) by replacing all of the vertices and edges in blossom  with a labeled vertex, for example  with  = /.Vertex  is called pseudovertex.When the unshrink process toward  is not executed yet (by deleting label  then replacing it with  as it was), ignore all of the vertices in  and all of the edges which join one vertex to the other in .Besides, the unshrink process toward  is a returning process of all vertices and edges included in blossom  [3].Example: Shrink Unshrink Below is a lemma which ensures that shrinking and unshrink process can be used in finding a maximum matching.

Lemma of Shrinking Cycle [7]
Supposed  is a graph with matching , and r is an exposed vertex in (, ).Supposed that during the process of establishing an alternating tree T with the root , it encounters blossom .If vertex  is a base of blossom  and graph  ′ = / is a graph produced from the shrinking of blossom  into pseudovertex .Graph (, ) will contain an augmenting path that begins in vertex  if and if only graph ( ′ ,  ′ ) with matching  ′ = / contains an augmenting path that starts in vertex .

Alternating Tree
An alternating tree  is a tree whose edges alternate between the edge that is included in  and not included in  and are rooted in an exposed vertex of which each edge relates an inner vertex with an outer vertex thus every inner vertex in  is exactly incident with two edges in .Inner vertex is a vertex that occupies odd layer (1,3,5, … ), while outer vertex is a vertex that occupies even layer (0,2,4, … ) [3].
The following is the steps to construct an alternating tree  using BFS: Case 3:  is already contained in  as an inner vertex.So, a cycle with an even length has been found.Therefore, ignore if the condition below is found.
Case 4:  is already contained in  as an outer vertex.Blossom has been found.Stop the constructing process of alternating tree T and do the shrinking process of the blossom.
The followings are theorems that become the basis of Edmonds' cardinality matching algorithm in finding a maximum matching in a graph [7].Theorem: [2]  1 and  2 are matching in graph .If  is a spanning subgraph of , then in every component of  with (() = ( 1 −  2 ) ∪ ( 2 −  1 ) thing that should fulfill the following requirements: 1.An isolated vertex, 2.An even cycle in which the edge of the cycle alternates in  1 dan  2 , 3. A path in which the edge of the path alternates in  1 dan  2 thus every end of the vertex is unsaturated in  1 or  2 but not in both.

Theorem: [7]
Matching  in graph  is called maximum if and if only there is no augmenting path in  with respect to .

Edmonds' Cardinality Matching Algorithm
The followings are the steps from Edmonds' cardinality matching algorithm: [4] Step 1 (initialization) Graph  is a non-bipartite graph with matching  0 = Ø.Do the matching initialization in  by using greedy algoritm.
Step This step is reached only if the alternating tree  encounters a cycle with an odd length (called blossom).Suppose a blossom   ( = 1,2,3 … ) is encountered in the constructing process of alternating tree , then shrink blossom   into a pseudovertex   .Continue the construction process of alternating tree  with root  as step 2.
Step 5 The matching on graph  is maximum.Stop the finding process.

Sample Case (The Battle of Britain)
In the Battle of Britain (1940), The Royal Air Force provided several aircrafts to thwart the German air force attack.The aircrafts provided by the Royal Air Force could be flown only by two people as a pilot and co-pilot.To get the best results in the mission to thwart German air force attack, the Royal Air Force brought some of the best pilots from all regions in Britain.However, there was a problem to solve by the Royal Air Force: among all the pilots that were called, some of them could not fly together in one aircraft because there were differences in terms of language, the ability of flying techniques, as well as in terms of flying experience.Suppose the Royal Air Force obtained 18 best pilots from all regions in Britain that were ready to fly the aircraft.Based on the problem, the Royal Air Force wished to pair the 18 pilots where each pair consisted of two pilots in such a way that the number of all the possible pairs is the highest number.In order to solve such problem, the Royal Air Force conducted a series of tests to the 18 pilots including language test, flying technique test, and psychological test to determine the suitability of the 18 pilots to fly together in one aircraft as a pilot and co-pilot [5].
Table 1  By transforming the problem into the form of graph, where the pilots are represented as a vertex and the corresponding relationship between each pilot is represented as an edge, the following graph is obtained: (The following form of graph is taken from [7]): By following the steps from Edmonds' cardinality matching algorithm, we obtain maximum matching on graph  2 as follows: Step 1 (initialization): By doing the process of matching initialization to graph  2 , we obtain graph ( 2 , ) with  = { 1  2 ,  3  4 ,  5  6 ,  7  8 ,  9  10 ,  11  12 ,  13  14 ,  15  16 } as follows: ( 2 , ): Since there are still two exposed vertices left that are  17 and  18 , then go to step 2.3 Step 2.3 : Vertex  17 is selected as the root, by using BFS we obtain an alternating tree  1 that corresponds to graph ( 2 , ) as follows: ( 2 ′′ ,  2 ): By continuing the constructing process of alternating tree that corresponds to graph ( 2 ′′ ,  2 ), we obtain: Tree Since all vertices in ( 2 , ′) are incident with a matching edge, then go to step 5.
Step 5: Matching ′ in graph  2 is maximum, therefore the finding process is discontinued.
From the steps that have been done, we obtain a maximum matching ′ in  2 with cardinality of matching ' that is | ′ | = 9.Matching ′ that has been obtained is the solution of the problem of pairing the 18 pilots as described above with details as follows: 1. Pilot number 1 pairs up with pilot number 17 And the maximum number of aircrafts that can be flown is as many as 9 aircrafts.

CONCLUSION
Matching  in graph  is a subset of () edge set where there are no two edges in Matching  that meet each other at the same vertex in graph .
Generally, Edmonds' cardinality matching algorithm is divided into three steps where the first step is the process of matching initialization.The second step is shrinking and unshrinking of blossom   .The third step is to execute augmenting- if the augmenting  path has been found.Edmonds' cardinality matching algorithm can be applied to find for maximum matching especially towards non-bipartite graph.The process of matching initialization is the effort to find the first matching to fasten the finding of maximum matching.Alternating  tree is a  graph concept that is used to find an augmenting path to obtain a new matching that has bigger cardinality than the first matching from the process of matching initialization.

[ 7 ]
Example: In  1 path :  1 −  2 −  3 −  4 −  5 is an alternating path 2. Augmenting path is a path with the beginning and ending vertex that are exposed vertex.[7] Example: In  1 path :  1 −  2 −  3 −  4 −  5 −  6 is an augmenting path Problem of Maximum Matching in Non-Bipartite Graph Using Edmonds' Cardinality Matching Algorithm and Its Application in the Battle of Britain Case Muchammad Abrori 171

Case 2 :
[7] (Root): Choose an exposed vertex  in graph (, ).Make the exposed vertex  as the root (layer 0) in alternating tree . 1.In layer 1, add all the vertices  1 ,  2 ,  3 , … ,   which are adjacent to the root .Keep in mind that all of the vertices that are added are only saturated ones.2. Add vertex   = (  ) on layer 2 (even) in . 3.For the next layer, add all the vertices  1 ,  2 ,  3 , … ,   where   is adjacent to at least one   , while the edge that relates   with   is not contained in .Continue step 1, 2, and 3 until finding one of these two possibilities as follows: (a) an augmenting path, (b) an odd cycle.4. If x is a vertex in layer 2i, and  ≠ () is a vertex that is adjacent to .So, there are four possibilities: Case 1: y is an exposed vertex (and not yet contained in ).So, an augmenting path has been found.Therefore, the constructing process of alternating tree  is discontinued. is not an exposed vertex; neither  nor () is contained in .So, add  into layer 2 + 1 and m () into layer 2 + 2.

2 .
Pilot number 2 pairs up with pilot number 3 3. Pilot number 4 pairs up with pilot number 9 4. Pilot number 5 pairs up with pilot number 6 5. Pilot number 7 pairs up with pilot number 8 6.Pilot number 10 pairs up with pilot number 16 7.Pilot number 11 pairs up with pilot number 12 8.Pilot number 13 pairs up with pilot number 14 9. Pilot number 15 pairs up with pilot number 18 Problem of Maximum Matching in Non-Bipartite Graph Using Edmonds' Cardinality MatchingAlgorithm and Its Application in the Battle of Britain Case In non-bipartite graphIn bipartite graph Problem of Maximum Matching in Non-Bipartite Graph Using Edmonds' Cardinality MatchingAlgorithm and Its Application in the Battle of Britain Case If the alternating tree  ends with an exposed vertex  wheres ≠ , an augmenting path from  to  has been found.Go to step 3. 2.3.2If the alternating tree  encountered an odd cycle, stop the constructing process and go to step 4. If the augmenting path  that has been obtained from the alternating tree  does not contain pseudovertex   ( = 1,2,3 … ), then augment matching M in (, ) with  ′ =  ⊕ .Go to step 2.Step 4 (Odd cycle) 2 (An Examination of exposed vertex) 2.1 If all vertices in (, ) are incident with a matching edge, go to step 5. 2.2 If there is only one unexamined exposed vertex in (, ), go to step 5. 2.3 Otherwise, select any exposed vertex  in (, ) as a root and construct alternating tree : 2.3.1  .Do the same steps until augmenting path in (, ) is found in which it does not contain any pseudovertex   .Augment matching M in (, ) with  ′ =  ⊕ .Go to step 3.2.3.2