Abstract
The central location problem is a key aspect of graph theory, with a significant importance in various applications and studies within the field. The center of a graph is made up of nodes that have the smallest eccentricity, where eccentricity is defined as the greatest distance between a given node and any other node in the graph. To determine the graph’s center, it is essential to compute the eccentricity of each node. In this article, we explore various characteristics of the BFS tree of trapezoid graphs. We also present new properties that relate to the radius, diameter, and center of trapezoid graphs. For the trapezoid graph G, We prove that the difference between the and the height of the BFS trees and is at most one. We also establish relationship between and of trapezoid graphs. We also show that, to find the center of a trapezoid graph, it is not necessary to find the eccentricity of all vertices. Based on our studied results, we design an optimal algorithm for finding the center, radius, and diameter of trapezoid graphs. Also, we prove theoretically that our proposed algorithm compiles within time. We also find an algorithmic solution to real problems (that involves finding a center location in a district to build a private hospital that minimizes the farthest distance from it to all areas of the district) with the help of the trapezoid graph model and BFS trees within time.
MSC:
05C90; 05C85
1. Introduction
The center location problem is a classical optimization problem where the aim is to compute the optimal location for a facility (like a hospital, fire station, warehouse, etc.) to minimize the maximum distance to the farthest point. The importance of determining the optimal location for service facilities has been steadily increasing. The exploration of service location problems began in the early 20th century, gaining notable attention especially after the 2000s. Facility location theory was originally based on Alfred Weber’s single warehouse problem in 1909. These problems often arise in transportation, urban planning, and distribution network design. In this article, we focus on finding the radius, diameter, and center of trapezoid graphs. This article also addresses a specific type of central location problem, which is solved using a trapezoid graph model.
Suppose T is a set of n trapezoids , , ,…, . In a trapezoid diagram (T-diagram), we define a trapezoid by four different corner points . A typical T-diagram [1] has two parallel horizontal lines—one as the top line, and the other as the bottom line. We assume that no two trapezoids share a common vertex. In the T-diagram, we place the corner points and on the top line and and on the bottom line. The trapezoids in the T-diagram are indexed according to the ascending order of their corner points , where . A trapezoid graph is an intersection graph formed by a set of trapezoids arranged within a T-diagram. Here, we consider an undirected trapezoid graph, which is also simple and connected. Two trapezoids and intersect if and only if either , , or both. The recognition of a trapezoid graph can be accomplished in O time [2]. Initial studies on trapezoid graphs were presented in [1,3]. This graph is more complex than both permutation and interval graphs [4]. It is also a subclass of cocomparability graphs [5]. We present a trapezoid diagram and its corresponding trapezoid graph in Figure 1 and Figure 2. For convenience, we use the symbols and to indicate the trapezoid whose bottom-left corner point position is the minimum and the trapezoid whose bottom-right corner point position is the maximum, respectively. In Figure 1, and . This graph has many applications, such as for emergency services: finding the optimal location for fire stations or hospitals to minimize response time to the farthest service area; telecommunication networks: placing cell towers or communication hubs to maximize coverage while minimizing the maximum distance to undeserved regions; and warehousing and distribution: choosing warehouse locations to minimize the delivery distance to the furthest retail outlets, etc.
Figure 1.
T-Diagram of the trapezoid graph shown in Figure 2.
Figure 2.
A trapezoid graph G.
In this article, we focus on exploring various characteristics of the BFS trees and new properties that relate to the radius, diameter, and center of trapezoid graphs. We concentrate on establishing a sharp relationship between the and of trapezoid graphs. We also show that, to find the center of a trapezoid graph, it is not necessary to find the eccentricity of all vertices. We design an time algorithm for finding center, radius, and diameter of trapezoid graphs. In addition, theoretically, we prove that our proposed algorithm compiles in time. We also find an algorithmic solution to real problems (that involves finding a center location in a district to build a private hospital that minimizes the distance from it to all areas of the district) with the help of the trapezoid graph model and BFS graph traversal technique within time.
1.1. Some Definitions
First, we assume an undirected graph structure which is simple as well as connected, where and . The term ‘distance’ between nodes and refers to the shortest-path’s length between them and we denote it by . The eccentricity of a vertex , denoted as , represents the greatest length among all shortest paths starting from v and finishing at other remaining nodes, i.e., . The maximum among all eccentricities of the nodes of G is considered the diameter of G and we denote it by , i.e., . Also, the lowest eccentricity of all nodes of G is assumed to be the radius of G and we denote it by , i.e., . A central vertex/node z belonging to G is a node such that . A graph may contain one or more central vertices. The set of all central nodes of a graph G is called the center of G and it is symbolled by , i.e., . Computation of the diameter, radius, and center of a graph is fundamental and has many real-life applications. In different fields such as the facility location problem [6], social network problem [7], biological systems [7], and transportation networks [7], we can apply the concept of the center of the graph.
1.2. Review of the Related Works
A wide range of location-related problems have been explored for various types of service facilities. Numerous studies have been carried out by researchers, addressing diverse location issues across both private sectors (such as industrial plants, banks, and retail outlets) and public sectors (including schools, hospitals, and fire stations). In 2004, Stummer et al. [8] proposed a two-phase solution approach for addressing multi-objective decisions related to the location and size of medical departments within a hospital network. They used tabu search to find the optimal solution. In 2007, Wu et al. [9] introduced an AHP-based evaluation model to determine the best location for a regional hospital. Syam [10] developed a nonlinear location–allocation model, which was solved using Lagrangian relaxation in 2008. In 2009, Vahidnia et al. [11] applied an integrated multi-criteria decision analysis approach, enhanced by GIS analysis, for making hospital site selection decisions. Shariff et al. [12] tackled a healthcare facility location–allocation problem and introduced a new solution method based on genetic algorithms in 2012. In 2013, Kim and Kim [13] focused on a healthcare facility location problem involving two patient types—low-income and middle/high-income—using a heuristic algorithm based on Lagrangian relaxation and subgradient optimization. Shariff et al. [14] also explored a dynamic location problem for public primary healthcare facilities, applying a genetic algorithm in 2014. In 2015, Beheshtifar and Alimoahmmadi [15] proposed a location model that combines GIS analysis with a multi-objective genetic algorithm to determine the optimal locations for new the clinics and assign populations to these clinics. Elkady and Abdelsalam [16] integrated Monte Carlo simulation with Particle Swarm Optimization (PSO) to address the healthcare location–allocation problem in 2015. In 2015, Maric et al. [17] developed a hybrid method incorporating an Evolutionary Approach (EA) to identify facility locations from a set of potential sites and allocate patient groups to the nearest facility. In 2016, Elkady and Abdelsalam [18] introduced a two-loop Particle Swarm Optimization (PSO) algorithm to address the multi-objective healthcare facility location problem. Ouyang et al. [19] conducted a study focused on the healthcare facility location problem, utilizing the CPLEX solver in 2016. In 2016, Ye and Kim [20] proposed a network-based covering location problem, incorporating sub-models such as the network-based maximal covering location problem (Net-MCLP) and the network-based location set covering the problem (Net-LSCP). Zhang et al. [21] examined a public healthcare facility location–allocation problem, considering future decisions about the placement of several new facilities in 2016.
If we wish to solve real center location problems using graph models, then we have find the eccentricity, radius, diameter, and center of graphs. Computation of these parameters is an interesting problem in graph theory. Behzad et al. [22] first established a relation between the radius and diameter of a connected graph. Then, many research works [23,24] were conducted to solve this problem. For some particular graphs such as outer planar graphs [25], tree graphs [26], interval graphs [27], chordal graphs [28], and weighted cactus graphs [29], the center is computed in linear time. Olariu [30] designed a parallel algorithm to locate the center of interval graphs in time with the help of processors. Also, Olariu [31] formulated another algorithm (runs in time) for the same purpose on the same graphs. Pal et al. [27] have developed a linear time ( time) algorithm to find out center and diameter of interval graphs. Further, Saha [32] also presented parallel algorithms (taking -time on an EREW PRAM, where p represents the number of processors) for finding the diameter, eccentricity, and radius of circular-arc graphs. Michele et al. [33] solved the center problem of weakly connected digraphs within time. In [7], an efficient algorithm was proposed to identify the center of a graph, running in time, where is a constant. Additionally, Abound et al. [34] introduced a faster algorithm that detects the center of a sparse graph in time via solving all pairs’ shortest paths. Laskar et al. [35] established a relationship between the and of the chordal graph G, while Mahesh [36] developed an inequality relating the and for general graph G. In, 1997, Erich Prisner proved for trapezoid graphs. Pramanik et al. [6] explored the relationship between the and of the interval graph G. In 2021, Nandi et al. [37] created an time algorithm for calculating , , and the center of permutation graphs, also establishing a sharp relationship between the and in these graphs.
1.3. Result
In this article, we present some characteristics of the BFS tree of trapezoid graphs. We explore new properties that relate to the radius, the diameter, and the center of trapezoid graphs. For the trapezoid graph G, we prove that the difference between the and the height of the BFS trees and is at most one. We also establish a relationship () between the and the of trapezoid graphs. This result is slightly better than the result of [38] for . We also prove that it is not necessary to find the eccentricity of all vertices to find the radius, the diameter, and the center of trapezoid graphs. We also propose an time algorithm to find the radius, the diameter, and the center of trapezoid graphs. We also analyze the time complexity of our proposed algorithm. Besides these, we consider a center location problem for identifying a center location in a district to construct a private hospital that minimizes the farthest distance from the hospital to other places in the district. We present an algorithmic solution of the proposed problem with the help of a trapezoid graph model and using BFS graph traversal technique within time.
1.4. Structure of Article
Section 2 presents the formation of , , and and identification their principal paths. In this section, some important results on BFS trees , , and are given. We also explore some characteristics of these BFS trees in Section 2. Some essential results on the diameter, the radius, and the center of the trapezoid graph are presented in Section 3. In this section, we also establish a relationship () between the and the of trapezoid graphs. This result is slightly better than the result of [38] for . We also prove that it is not necessary to find the eccentricity of all vertices to find the radius, the diameter, and the center of trapezoid graphs. In Section 4, we design an optimal algorithm for finding the central vertices, the and the of trapezoid graphs. This section also presents the time complexity of our proposed algorithm. We also present an explanatory example of our proposed algorithm in Section 4. In Section 5, we present a real application of our studied results. Here, we find an algorithmic solution to a real problem (that involves finding a center location in a district to build a private hospital that minimizes the farthest distance from it to all areas of the district) with the help of the trapezoid graph model and BFS trees within time. Lastly, Section 6 describes the conclusion part and future planning of this paper.
2. Formation of BFS Tree Based on BFS
One of the effective graph traveling methods for researchers in graph theory is BFS. It assists us in building a BFS tree of the graph. For general graphs, we are able to build this tree by spending just -time [39]. Also for the tree, we found an algorithm (compiles in linear time) [40] for the same occasion. Again, Olariu has provided a faster algorithm (executes in just time) [41] to make an interval-tree (basically a tree) on interval graph. Again, in [42], an algorithm is presented for the same purpose on permutation graphs within time. In [43], a TBFS algorithm (compiles within time) is available for building a tree having root as z on trapezoid graphs. In the present paper, we use a new notation, instead of . We draw four trees , (shown in Figure 3), and , (displayed in Figure 4) of the trapezoid graph shown in Figure 2.
Figure 3.
BFS trees and of the graph of Figure 2.
Figure 4.
A part of a trapezoid diagram.
The symbol , , refers to the level of z, which is the distance of z from the root of any BFS trees like , , , etc. We also assign the level of the root of such types of trees to be 0. In [40], an algorithm is available by which we can determine the level of every node/vertex on these trees.
Detection of the Main Path and Alternative-Path on Trees
For a tree (of a trapezoid graph G) with as root, suppose , where (set of integers), and is an arbitrary node at the highest level (i.e., k) of that tree. We define the shortest path between y and z () as the main path of the same tree, where is the parent node of z. The tree may have other paths of length up to k. One of these other paths, we consider as the alternative path. We denote the node points/vertices on the main path and the alternative path of at ith level by the symbols and respectively. Here, we assume that and , for . Apart from this, some parts of the main path and the alternative path may coincide.
Lemma 1.
For trapezoid graphs, the difference between the heights of any two trees among , , and is maximum 1.
Proof.
We suppose that and are the heights of and respectively. First, we prove that . If we minutely observe the trapezoid diagram, then we see that either or . If then . If then a situated at the first level of . Now, let be an arbitrary node at the ith level of , . So, in that case, because the probable shortest paths between a and z are as follows:
- or
- or
Now, if we build a BFS tree , then , i.e., .
Similarly, we can show that .
Next, we prove that . Now, if we observe the trapezoid diagram and follow the TBFS algorithm [43], then we can see either of the following observations:
- (1)
- Vertex n is located at the last level of the tree .
- (2)
- Vertex n is situated at the level of the tree .
Case 1: When vertex n is found at the last level of the tree . In that case, node 1 may be located at level or of the tree . Now, if the node 1 is found at level of the tree then . Again, if node 1 is found at level of the tree then there exists at least one node point z at the last level of the tree . So, as .
Case 2: When vertex n is situated at the level of the tree . So, at the last level of , at least one vertex v is found there. In that case, node 1 may be located at level or of the tree . Now, if the node 1 is found at level of the tree then . That is, . Again, if the node 1 is found at level of the tree then there exists at least one node z at the last level of . So, . So, .
Similarly, we can show that , and . Hence the result. □
Lemma 2.
If the tree consists of two internal vertices at any level, then the maximum indexed vertex at that level must be an internal vertex at the same level.
Proof.
We know ([44]) that the BFS tree cannot have more than two internal nodes at any level. As per the algorithm, TBFS [43], only the right scanning is needed to build . Let there be certain stages of the scanning process; and are, respectively, the top scanning and bottom scanning intervals. Also, let K be the set formed by the vertices whose corresponding unmarked trapezoids are scanned in the mentioned intervals. So, by the TBFS algorithm [43], members of K will be placed at the next level (say i) of the vertices corresponding to the trapezoids relating to and as the children of the same vertices (relating to and ). After that, two scanning intervals are reset as and , where, s is the top-right vertex of the trapezoid corresponding to and t is the bottom-right vertex of the trapezoid whose spread along the bottom channel is the maximum. Let, at level i, two internal nodes exist. So, and are both non-empty. So, at the end of scanning these new two intervals, the vertices corresponding to and will be set as two internal nodes at level i, where the vertex corresponding to is equal to . So, if consists of two internal vertices at any level, then the maximum indexed vertex at that level must be an internal vertex/node at the same level. □
Note 1.
The above result is also true for the trees , and .
Lemma 3.
If x is any leaf node at level 1 of and , exist, then either , , or both.
Proof.
Since and both exist so, one of and extends at the maximum along the top line and the other extends at the maximum along the bottom line, among all (see Figure 4). Again, if x is a leaf node at level 1 of and , then or . So, and x may or may not be adjacent to . Again, if if x is a leaf node at level 1 of and , then and x may or may not be adjacent to . Hence, the result is proved. □
3. Some Results Related to , and Center of Trapezoid Graphs
Here, we propose and prove some vital results related to , and the center of trapezoid graphs.
Lemma 4.
For a trapezoid graph G, if and there exist at least two nodes such that and , for all and , for all then , else .
Proof.
Let the height of the tree , , and be the same and equal to h, and there exist at least two node points such that and , for all and , for all . So, by the given conditions, . Now, for the tree , (see the corresponding path or ). So, will be the longest shortest path in G. So, as .
Similarly, for the trees , and , we can easily prove that .
Now, if any one of the heights , , and is different from the others or if and no such x and y exist, then, from the trapezoid diagram, we can say that the shortest path between any one among and anyone among gives the possible greatest shortest path between any pair of nodes in V. Again, the difference between the heights of any two trees among , , and is maximum 1 (by Lemma 1). Therefore, the highest value of and indicates the length of the greatest shortest path between any pair of nodes. So, . □
Observing the results of Lemmas 1 and 4, we can conclude the following.
Note 2.
If h is the height of any one of the BFS trees , , and of a trapezoid graph G, then the diameter of G is either h or .
Lemma 5.
For a trapezoid graph G, if the heights of four trees , , and are the same and equal to h(say) and then the number of internal node points at level for each of these trees is just one.
Proof.
Suppose the heights of four BFS trees , , and are the same and equal to h and . Then, we will find at least two nodes such that and , for all and , for all . So, the node x lies at the first level for the trees and as well as last level for the trees and and the node y lies at the first level for the trees and as well as the last level for the trees and . Therefore, one of n and b is the parent node located at the level of y for the trees and and one of 1 and a is the parent node point placed at the level of x for the trees and . Hence, the number of internal node points at level for all these four trees is just one. □
Lemma 6.
For a trapezoid graph G, if the height of the BFS tree is even, say and , then and all central vertices lie in .
Proof.
For a trapezoid graph G, let us consider that and , . So, there exists a leaf node . Now, if there exists only one internal node at the first level of , then , and , for . In that case, , (like ), . So, , for all . Similarly, , for all . So, and eccentricity of other vertices are or more. So, , and are two central vertices of G.
Again, if and there exists two internal nodes , where at the first level of , then , , , for . But, . In that case, , and . So, , for all . So, is a central vertex.
Therefore, and all central vertices lie in . □
From the above result, we see that and . So, we can conclude the following.
Corollary 1.
.
This result is slightly better than the result of [38].
Lemma 7.
For a trapezoid graph G, if is even, say , and , , then or and the center lies in .
Proof.
For a trapezoid graph G, let us consider that , and , . Now, if a leaf node and only a main path exists, then , , or both. In that case, (along the main path), (along the main path), (like or ), and (along the main path). So, for all . Therefore, the eccentricity of is k and eccentricity of other vertices are k or more. So, and is a central vertex of G, i.e., the center lies in .
If a leaf node and both a main path () and an alternative path () exist, where , then, by Lemma 3, (, , or both). In that case, if and , for all , then (along the main path), (along the main path), (like or ), (as or ), (along the main path), and (like ). So, for all . Therefore, the eccentricity of is k and the eccentricity of other vertices is k or more. So, and is a central vertex of G, i.e., the center lies in .
Again, if and , for all , then (along the main path), (along main path), (like or ), (as ), (along the main path), and (like ). So, for all . Therefore, the eccentricity of is and the eccentricity of other vertices is or more. So, and is a central vertex of G. Similarly, it can be shown that is a central vertex of G. Depending upon some edge connectivity, some other vertices at level , k, and may be central vertices.
Therefore, or and the center of G lies in . □
From the above result, we can conclude the following.
Corollary 2.
If and , then , else if and , then .
Lemma 8.
For a trapezoid graph G, if is odd, say , and , , then and the center lies in .
Proof.
For a trapezoid graph G, let us consider that and . Now, if a leaf node and only a main path exists, then , or both. In that case, (along the main path), (along the main path), (like or ), and (along the main path). So, for all . Therefore, the eccentricity of is and the eccentricity of other vertices is or more. So, and is a central vertex of G. Similarly, it can be shown that is a central vertex of G. Depending upon some edge connectivities, some other vertices at levels k and may be central vertices. So, the center lies in .
If a leaf node and both the main path () and the alternative path () exist, where , then, by Lemma 3, , and ( or or both). In that case, (along the main path), (along the main path), (like or ), (as or ), (along the main path), and (like ). So, for all . Therefore, the eccentricity of is and the eccentricity of other vertices is or more. So, and is a central vertex of G. Similarly, it can be shown that is a central vertex of G. Depending upon some edge connectivity, some other vertices at levels k and may be central vertices. Therefore, and the center of G lies in . □
From the above result, we see that and . So, we can conclude the following.
Corollary 3.
.
This result is slightly better than the result of [38].
Lemma 9.
For trapezoid graph G, if is odd, say and , , then or , and the center lies in .
Proof.
For trapezoid graph G, let and , . Now, there are two cases that may arise—case 1: does not exist at level 1 of and case 2: both and exist at level 1 of . □
- Case 1:
- In that case, if the distinct part of the alternative path () starts from or a higher level of (see Figure 5b, here, is the common part of both the alternative path and the main path), then (along the main path), , (as ); (along the main path), and (along the alternative path). So, , ∀ and . Therefore, and is a central vertex of the trapezoid graph G. Similarly, some other leaf nodes at level of may be central node of G. So, the center of G lies in .
Figure 5. Parts of BFS trees.
Again, let the distinct part of the alternative path () starting from the first level to the level of (see Figure 5c, here, the alternative path and the main path may have a common part above the level ). Now, if and , then ; ; ; and (as ). So, for all . Similarly, , for all . Also, and , ∀ . So, and are central vertices of G and .
Again, if , , or both, then , , or both may be central vertices and .
Now, if , (, or both, for , then ∀ and ∀. So, and , will be two central vertices. So, in case 1, or and the center lies in ().
- Case 2:
- If both and exist (see Figure 5a, here, the alternative path and the main path are distinct, except the root), then and , and for , ∀.
Now, (along the alternative path); ; (as ); and (as ). So, , and . Therefore, and is a central vertex of the trapezoid graph G. Similarly, we can show that some other vertices of or may be central vertices. So, the center lies in ().
Hence, or , and lies in .
From the above result, we can conclude the following.
Corollary 4.
If and , then , else if and , then .
From the Corollaries 1–4, we can conclude the following.
Corollary 5.
For any trapezoid graph G, .
From the previous three results, we have reached the following statement.
Corollary 6.
.
Proof.
It is straightforward as . □
Note 3.
The results of Lemmas 6–9 are also true for the BFS trees and .
4. Computation of Central Vertices and Radius
Here, we find out the and central vertices of the trapezoid graph G. To achieve this, we compute the set P, where
and the vertices of P are arranged in order (descending or ascending).
Let , . Now, we find a set A where the member of A is the common adjacent trapezoid of and except the trapezoid(s) corresponding to the internal nodes at level 1 of and . Then, we find
- where is the top-right vertex of the trapezoid belonging to the set and
- where is the bottom-right vertex of the trapezoid belonging to the set .
Again, we find another set B whose members are the common adjacent trapezoid of and except the trapezoid(s) corresponding to the internal nodes at level 1 of and . Then, we find
- max{ where is the top-left vertex of the trapezoid belongs to the set B} and
- max{ where is the bottom-left vertex of the trapezoid belongs to the set B}.
Let us consider , corresponding to , , , . Obviously, some or all among will be the farthest vertices from the members of P. Now, If S is a non-empty set, then we construct the BFS trees , , and with and t as roots. Now, we find the distance of the vertices of P from , if they exist, in Table 1 and from , if they exist, in Table 2 with the help of , , and .
Table 1.
Distance of the vertices of P from .
Table 2.
Distance of the vertices of P from .
Table 3.
Comparison of and .
So, as is the longest shortest distance of from the farthest vertices of G. Now, we find = min{. After then, we find the member of P, say , corresponding to , in Table 3. As , therefore, the smallest value of the eccentricity of the vertices of P must be equal to , that is , by Corollary 1. Now, we find the s at the fourth column of Table 3, which are equal to and the s corresponding to the s are the central vertices G.
4.1. Algorithm and Its Complexity
Here, we propose an algorithm to determine the , and central node(s) of trapezoid graphs based on the results presented in Section 3 and Section 4.
Using Algorithm 1, we obtain , and for the trapezoid graph of Figure 2.
| Algorithm 1: Algorithm DIA-RAD-CEN-TRA. |
Input: Trapezoid representation of a trapezoid graph G, for . Output: , and central vertices of G. Step 1: Make 4 BFS trees , , and . Step 2: Obtain the heights and of , , and , respectively. Step 3: Mark the main paths and alternative-paths of , , and . Step 4: Find the sets for . Step 5: If and there exist at least two nodes such that and , for all and , for all then (by Lemma 4) Else (Lemma 4). End if Step 6: If one of and is even, say and then and set (Lemma 6). Else if one of and is even, say and then or and set (Lemma 7). Else if one of and are odd, say and , then and set (Lemma 8). Else if one of and are odd, say and , then or and set (by Lemma 9). Step 7: Arrange the vertices of P in ascending order, say . Step 8: Step 8.1: Find set A where the members of A are the common adjacent trapezoid of and except the trapezoid(s) corresponding to the internal nodes at level 1 of and . Step 8.2: Find min{ where is the top-right vertex of the trapezoid belonging to the set A}. Step 8.3: Find min{ where is the bottom-right vertex of the trapezoid belonging to the set A}. Step 8.4: Find another set B where the members of B are the common adjacent trapezoid of and except the trapezoid(s) corresponding to the internal nodes at level 1 of and . Step 8.5: Find max{ where is the top-left vertex of the trapezoid belonging to the set B}. Step 8.6: Find max{ where is the bottom-left vertex of the trapezoid belonging to the set B}. Step 9: Compute the set corresponding to , , , . Step 10: If S is a non-empty set, then we construct the BFS trees and with and t, if they exist, as roots, respectively. Else go to Step 11 End if Step 11: Compute the distance of the vertices of P from (if they exist) and find the maximum value for each row using Table 3. Step 13: Find where min{ and find corresponding to s (in Table 3), where . Step 14: Set . End if End DIA-RAD-CEN-TRA. |
4.2. Explanatory Example
To explain the total compilation process of Algorithm 1, we consider the T-diagram (displayed in Figure 1) of the trapezoid graph of Figure 2. Here, and . At first (in Step 1), we make four BFS trees , , and (shown in Figure 3 and Figure 6). In Step 2, we find the height of and of , , and , respectively. Here, . As there are no node points such that , and x is only adjacent with 1, 2, or both and y is only adjacent with 15, 13, or both, therefore, (in Step 5). As (odd and, here, ) and , so and (in Step 6). In Step 7, we arrange the vertices of P in ascending order, so . In Step 8.1, we are to find the set A where the members of A are the common vertices of and at level 1 except the internal nodes. Hence, and and (in Step 8.2 and Step 8.3) do not exist. In Step 8.4, we are to find the set B whose members are the common vertices of and at level 1 except the internal nodes, i.e., . Hence, and (in Step 8.5 and Step 8.6) do not exist. Therefore, and we go to Step 11. In Step 11, we compute the distance of the vertices of from in Table 4 (with the help of ) and in Table 5 (with the help of ) as follows.
Figure 6.
BFS trees and of G shown in Figure 2.
Table 4.
Distance of the vertices of P from 1, 2.
Table 5.
Distance of the vertices of P from 15, 13.
Now, we compare the entries in the columns (in Table 4) and (in Table 5), and find the maximum value for each row using the following table at Step 12.
At Step 13, we use the Table 6 to find and corresponding to s (in Table 6), where . In the last step, we set . Therefore, the main output of our proposed algorithm is , , and .
Table 6.
Comparison table.
Theorem 1.
The , and center of the trapezoid graph G can be determined within time, where n represents the cardinality of .
Proof.
In Step 1, the BFS trees , , and can be made within time. The heights and in the Step 2 can be found in constant time. At Step 3, main paths and alternative paths of , , and can be identified in time. Step 4 needs time to compute the sets for . In Step 5, can be determined in time. We can compute the set P, at Step 6, within time. Also, we can arrange the members of P in ascending order, at Step 7, in just time. The determination process of the sets A and B and corner points , , , and just take time, in Step 8. Also, Step 9 takes constant time. In Step 10, BFS trees , , and can be made within which is equivalent to time. At Step 11, we can find the distance of the vertices of P from within time and, also, the distance of the vertices of P from in time. Further, at Step 12, we can evaluate s in constant time. Again, at Step 13, anyone can determine within time and in time. The execution time of Step 14 is constant. Hence, the overall run time of the Algorithm 1 is . □
5. Real Application
Here, we present a real application of the center of trapezoid graphs. We consider a real center location problem and present its algorithmic solution with the help of our studied results.
Step-by-step representation of center location problem using a trapezoid graph and its algorithmic solution
Step 1: Proposed problem set up
Consider a center location problem where we have a finite set of blocks (subdivisions of a district), , in a district. We aim to find a central location to establish a private hospital that serves all the people in the district and minimizes the maximum distance from the hospital to any block. To achieve this, we first identify a well-connected location (near a national highway (NH) or state highway (SH)) within each block for a potential hospital site, ensuring that no two sites have the same latitude and longitude. Let these locations be , where for . Let and represent the latitude and longitude of the candidate hospital at . We assume each hospital will provide free ambulance services within a certain distance (say 20 km) radius, which we consider the hospital’s range. Our main objective is to find a “center” location that minimizes the farthest distance from it to any point for .
Step 2: Represent each location for candidate hospital as an interval on two parallel lines
Draw two parallel horizontal lines, Line 1 and Line 2. Two horizontal parallel lines represent the range of each hospital’s free ambulance service. For each point , define an interval taking as center and place it on Line 1 and another interval taking as the center and place it on Line 2, where, represents the length of the national or state highway, which is the maximum, in block ; represents the average distance of local roads from to all the areas in block .
Step 3: Construct trapezoids based on intervals
For each point , construct a trapezoid by connecting the endpoints of its intervals on Line 1 and Line 2. Each trapezoid represents the potential area of influence for a candidate hospital. For instance, for point , connect point on Line 1 to point on Line 2, and connect on Line 1 to on Line 2 to form a trapezoid.
Step 4: Create a trapezoid graph
Vertices: Each trapezoid represents a vertex/node in the trapezoid graph.
Edges: Draw an edge between two nodes if their corresponding trapezoids intersect (overlap). This indicates that there is a potential overlap in the service area between the corresponding locations. For example, suppose the service area of covers the whole area of block and partial areas of blocks and and that of covers the whole area of block and partial areas of blocks and . So, there is service overlapping between these hospitals. So, there will be an edge between the vertices representing these trapezoids corresponding to the locations and .
To illustrate the above steps graphically, we consider a district that has four blocks , , , and , and its five parameters of candidate hospitals are given in Table 7. The graphical representation of our proposed problem is displayed in Figure 7 and Figure 8.
Table 7.
Parameters of our proposed problem.
Figure 7.
Trapezoidal representation of proposed problem.
Figure 8.
Trapezoid graph of proposed problem.
Step 5: Identification of the center location in the trapezoid graph
The center location problem is now represented as finding a node in the trapezoid graph that minimizes the greatest graph distance to all other nodes. This node represents the optimal location for the facility.
Now, if we compile our designed Algorithm DIA-RAD-CEN-TRA for the trapezoid graph corresponding to the proposed problem, then we will obtain the central vertices in time. Any member of the center of the trapezoid graph is suitable for setting up a private hospital that minimizes the farthest distance from it to other vertices.
6. Conclusions
The center location problem is a crucial problem in graph theory. In this paper, we explore some characteristics of the BFS tree of trapezoid graphs. We also study new properties that relate to the radius, the diameter, and the center of trapezoid graphs. For the trapezoid graph G, we prove that the difference between the and the height of the BFS trees and is at most one. We also establish a relationship () between and of trapezoid graphs. This result is slightly better than the result of [38] for . We also prove that, to find the radius, the diameter, and the center of trapezoid graphs it is not necessary to find the eccentricity of all vertices. We also design an time algorithm to find the radius, the diameter, and the center of trapezoid graphs. We also calculate the time complexity of our proposed algorithm. Besides these, we consider a center location problem for identifying a center location in a district to construct a private hospital that minimizes the farthest distance from the hospital to other places in the district. We present an algorithmic solution of the proposed problem with the help of a trapezoid graph model and using BFS graph traversal technique within time. In the future, we have a plan to solve different center location problems using other graph models.
Author Contributions
S.N. and S.C.B. conceived of the presented idea. S.N. and S.M. developed the theory and performed the computations. S.S. and L.M. verified the studied results and methodology. A.K. encouraged S.N. to investigate the real applications of the studied results and supervised the findings of this work. S.N. and S.C.B. wrote the manuscript in consultation with S.S., L.M. and A.K. All authors have read and agreed to the published version of the manuscript.
Funding
This paper was supported by the Project: 101140217, Artificial Intelligence in Medical Care: Reducing Errors and Saving Lives (AI2MED), ERASMUS-EDU-2023-PI-ALL-INNO-EDU-ENTERP.
Data Availability Statement
In this study, we have conducted theoretical research work. No empirical data were used or generated in this study.
Acknowledgments
We would like to express our deep and sincere gratitude to our colleagues and friends for encouraging us to complete this research work and giving continuous support throughout this research.
Conflicts of Interest
The authors declare no competing interests.
Abbreviations
| BFS tree whose root is z. | |
| ’s height. | |
| Level of the node u on BFS tree. | |
| The parent node of u. | |
| Node located on the main path of at ith level. | |
| Node situated on the alternative path of at level i. | |
| The node set of situated at level i. | |
| . | |
| The shortest distance between two nodes and . | |
| Eccentricity of . | |
| The diameter of G. | |
| The radius of G. | |
| Center of G. | |
| The set of nodes adjacent to y, and y itself. | |
| a | Index of the trapezoid with the minimum bottom-left corner point position. |
| b | Index of the trapezoid with the minimum bottom-right corner point position. |
| The distance between the vertices x and . | |
| The eccentricity of the node . |
References
- Dagan, I.; Golumbic, M.C.; Pinter, R.Y. Trapezoid graphs and their coloring. Discret. Appl. Math. 1988, 21, 35–46. [Google Scholar] [CrossRef]
- Ma, T.; Spinrad, J.P. An O(n2) algorithm for 2-chain problem on certain classes of perfect graphs. In Proceedings of the 2nd ACM-SIAM Symposium on Discrete Algorithms, San Francisco, CA, USA, 28–30 January 1991. [Google Scholar]
- Corneil, D.G.; Kamula, P.A. Extension of permutation and interval graphs. Congr. Numer. 1987, 58, 267–276. [Google Scholar]
- Golumbic, M.C. Algorithmic Graph Theory and Perfect Graphs; Elsevier B.V.: Amsterdam, The Netherlands, 2004; Volume 57. [Google Scholar]
- Liang, Y.D. Domination in trapezoid graphs. Inf. Process. Lett. 1994, 52, 309–315. [Google Scholar] [CrossRef]
- Pramanik, T.; Mondal, S.; Pal, M. The Diameter of an Interval Graph is Twice of its Radius. World Acad. Sci. Technol. Int. J. Math. Comput. Phys. Electr. Comput. Eng. 2011, 5, 1412–1417. [Google Scholar]
- Abbound, A.; Grandoni, F.; Williams, V.V. Subcubic Equivalences Between Graph Centrality Problems, APSP and diameter. In Proceedings of the 26th Annual ACM-SIAM Symposium on Discrete Algorithms, San Diego, CA, USA, 4–6 January 2015; pp. 1681–1697. [Google Scholar]
- Stummer, C.; Doerner, K.; Focke, A.; Heidenberger, K. Determining location and size of medical departments in a hospital network: A multiobjective decision support approach. Health Care Manag. Sci. 2004, 7, 63–71. [Google Scholar] [CrossRef]
- Wu, C.R.; Lin, C.T.; Chen, H.C. Optimal selection of location for Taiwanese hospitals to ensure a competitive advantage by using the analytic hierarchy process and sensitivity analysis. Build. Environ. 2007, 42, 1431–1444. [Google Scholar] [CrossRef]
- Syam, S.S. A multiple server location-allocation model for service system design. Comput. Oper. Res. 2008, 5, 2248–2265. [Google Scholar] [CrossRef]
- Vahidnia, M.H.; Alesheikh, A.A.; Alimohammadi, A. Hospital site selection using fuzzy AHP and its derivatives. J. Environ. Manag. 2009, 90, 3048–3056. [Google Scholar] [CrossRef] [PubMed]
- Shariff, S.S.R.; Moin, N.H.; Omar, M. Location allocation modeling for healthcare facility planning in Malaysia. Comput. Ind. Eng. 2012, 62, 1000–1010. [Google Scholar] [CrossRef]
- Kim, D.G.; Kim, Y.D. A Lagrangian heuristic algorithm for a public healthcare facility location problem. Ann. Oper. Res. 2013, 206, 221–240. [Google Scholar] [CrossRef]
- Shariff, S.S.R.; Moin, N.H.; Omar, M. Planning of public healthcare facility using a location allocation modelling: A case study. In Proceedings of the Statistics and Operational Research International Conference (SORIC 2013), Sarawak, Malaysia, 3–5 December 2013; AIP Publishing LLC: Melville, NY, USA, 2014; Volume 296, pp. 282–296. [Google Scholar] [CrossRef]
- Beheshtifar, S.; Alimoahmmadi, A. A multiobjective optimization approach for location-allocation of clinics. Int. Trans. Oper. Res. 2015, 22, 313–328. [Google Scholar] [CrossRef]
- Elkady, S.K.; Abdelsalam, H.M. A simulation-based optimization approach for healthcare facility location allocation decision. In Proceedings of the Science and Information Conference 2015, London, UK, 28–30 July 2015; pp. 500–505. [Google Scholar]
- Maric, M.; Stanimirovic, Z.; Bozovic, S. Hybrid metaheuristic method for determining locations for long-term health care facilities. Ann. Oper. Res. 2015, 227, 3–23. [Google Scholar] [CrossRef]
- Elkady, S.K.; Abdelsalam, H.M. A modified multi-objective particle swarm optimisation algorithm for healthcare facility planning. Int. J. Bus. Syst. Res. 2016, 10, 1–22. [Google Scholar] [CrossRef]
- Ouyang, R.; Faiz, T.I.; Noor-E-Alam, M. An ILP model for healthcare facility location problem with long term demand. In Proceedings of the 2016 International Conference on Industrial Engineering and Operations Management, Kuala Lumpur, Malaysia, 8–10 March 2016; IEOM Society International: Detroit, MI, USA, 2014; pp. 840–847. [Google Scholar]
- Ye, H.; Kim, H. Locating healthcare facilities using a network-based covering location problem. GeoJournal 2016, 81, 875–890. [Google Scholar] [CrossRef]
- Zhang, W.; Cao, K.; Liu, S.; Huang, B. A multi-objective optimization approach for health-care facility location-allocation problems in highly developed cities such as Hong Kong. Comput. Environ. Urban Syst. 2016, 59, 220–230. [Google Scholar] [CrossRef]
- Behzad, M.; Chartrand, G. Introduction to the Theory of Graphs; Allyn and Bacon: Boston, MA, USA, 1971. [Google Scholar]
- Cheopoi, V. Centers of Triangulated Graphs. Mat. Zametki 1988, 43, 143–151. [Google Scholar] [CrossRef]
- Takes, F.W.; Kosters, W.A. Determining the Diameter of Small World Networks. In proceedings of the In Proceedings of the 20th ACM Conference on Information and Knoledge Management (CIKM 2011), Glasgow, UK, 24–28 October 2011; pp. 1191–1196. [Google Scholar] [CrossRef]
- Farley, A.; Proskurowski, A. Computation of the Center and Diameter of Outerplanar Graphs. Discret. Appl. Math. 1980, 2, 185–191. [Google Scholar] [CrossRef]
- Goldman, A.J. Minimax Location of a Facility in a Network. Transp. Sci. 1972, 6, 407–418. [Google Scholar] [CrossRef]
- Pal, M.; Bhattacharjee, G.P. Optimal Sequential and Parallel Algorithms for Computing the Diameter and the Center of Interval Graph. Int. J. Comput. Math. 1995, 59, 1–13. [Google Scholar] [CrossRef]
- Chepoi, V.D.; Dragan, F. A Linear-time Algorithm for Finding a Central Vertex of a Chordal Graph. Lect. Notes Comput. Sci. 1994, 855, 159–170. [Google Scholar] [CrossRef]
- Lan, Y.F.; Wanga, Y.L.; Suzuki, H. A Linear-time Algorithm for Solving the Center Problem on Weighted Cactus Graphs. Inf. Process. Lett. 1999, 71, 205–212. [Google Scholar] [CrossRef]
- Olariu, S. A Simple Linear Time Algorithm for Computing the Center of an Interval Graph. Int. J. Comput. Math. 1990, 34, 121–128. [Google Scholar] [CrossRef]
- Olariu, S.; Schwing, J.L.; Zhang, J. Optimal Parallel Algorithms for Problems Modelled by a Family of Intervals. IEEE Trans. Parallels Distrib. Syst. 1992, 3, 364–374. [Google Scholar] [CrossRef]
- Saha, A. Computation of Average Distance, Radius and Center of a Circular-Arc Graph in Parallel. J. Phys. Sci. 2006, 10, 178–187. [Google Scholar]
- Borassi, M.; Cresccnzi, P.; Habib, M.; Kosters, W.A.; Marino, A.; Takes, F.W. Fast Diameter and Radius BFS- based Computation in(weakly connected) Real-World Graphs: With an application to the six degrees of separation games. Theory Comput. Sci. 2015, 586, 59–80. [Google Scholar] [CrossRef]
- Abbound, A.; Wang, J.; Williams, V.V. Approximation and Fixed Parameter Sub Quadratic Algorithms for Radius and Diameter in Sparse Graphs. In Proceedings of the 27th Annual ACM-SIAM Symposium on Discrete Algorithms, Arlington, VA, USA, 10–12 January 2016; pp. 377–391. [Google Scholar]
- Laskar, R.; Shier, D. On powers and centers of chordal graphs. Discret. Appl. Math. 1983, 6, 139–147. [Google Scholar] [CrossRef]
- Mahesh, C.P. Distance in Graph Theory and its Application. Int. J. Adv. Eng. Technol. 2011, 3, 147–150. [Google Scholar]
- Nandi, S.; Mondal, S.; Barman, S.C. Computation of diameter, radius and center of permutation graphs. Discret. Math. Algorithms Appl. 2021, 14, 2250039. [Google Scholar] [CrossRef]
- Prisner, E. Radius versus diameter in cocomparability and intersection graphs. Discret. Math. 1997, 163, 109–117. [Google Scholar] [CrossRef]
- Tarjan, R.E. Depth-First Search and Linear Graph Algorithms. SIAM J. Comput. 1972, 1, 146–160. [Google Scholar] [CrossRef]
- Chen, C.C.Y.; Das, S.K. Breadth-First Traversal of Trees and Integer Sorting in Parallel. Inf. Process. Lett. 1992, 41, 39–49. [Google Scholar] [CrossRef]
- Olariu, S. An Optimal Greedy Heuristic to Color Interval Graphs. Inf. Process. Lett. 1991, 37, 21–25. [Google Scholar] [CrossRef]
- Barman, S.; Mondal, S.; Pal, M. An Efficient Algorithm to find Next-to-Shortest Path on Permutation Graphs. J. Appl. Math. Comput. 2009, 31, 369–384. [Google Scholar] [CrossRef]
- Mondal, S.; Pal, M.; Pal, T.K. An optimal algorithm for solving all-pairs shortest paths on trapezoid graphs. Int. J. Comput. Eng. Sci. 2002, 3, 103–116. [Google Scholar] [CrossRef]
- Barman, S.; Mondal, S.; Pal, M. A Linear Time Algorithm to Construct a Tree 4-Spanner on Trapezoid Graphs. Int. J. Comput. Math. 2010, 87, 743–755. [Google Scholar] [CrossRef]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).