• 沒有找到結果。

The Identity of Centroids and Medians in Discrete Sets

N/A
N/A
Protected

Academic year: 2021

Share "The Identity of Centroids and Medians in Discrete Sets"

Copied!
6
0
0

加載中.... (立即查看全文)

全文

(1)The Identity of Centroids and Medians in Discrete Sets Ê×àÕ¯2”¾2-D2Ûõíø_4 Chih–Wei Chang1. Yue–Li Wang1. Hon–Chan Chen2. "/&. Ù. ωõ. 1. Department of Information Management,. National Taiwan University of Science and Technology, Taipei Email: [email protected] 2. Department of Shipping Transportation and Management,. National Kaohsiung Institute of Marine Technology, Kaohsiung. Abstract. dian and center objectives for location of switching centers[5]. In [12], Slater introduced the competi-. Centroids and medians are very important in dis-. tive facility location problem in graphs. For exam-. cussing location problems. There are very few pa-. ple, each vertex in a graph G represents a customer. pers proposed for finding centroids and medians on and a store can be created in any vertex of G. Asvarious graphs. In some graphs, centroids and me- sume that every customer will shop at the closest store and that there is only one store in G before. dians are the same. It was shown that the centroids. you want to create a new one to compete with it.. are also the medians in a tree graph. In this paper,. Which vertex will be chosen as the location of your we shall prove the identity of centriods and medi-. store so that you will have as many customers as ans in a discrete set according to the Manhattan possible? The solution of this problem is called a metric on Z 2 . centroid. Location problems in graphs and networks are. Keyword: Manhattan metric, centroids, medians.. studied wildly in operations research[3, 4, 8, 10, 12,. 1. 13, 14]. Most of researchers are focus on designing. Introduction. efficient algorithms for finding the centers, medians, Location on networks is a topic of great impor-. and centroids of a graph. See [14] for a summary of. tance in fields such as transportation, communi-. early history. Very few papers discussed the iden-. cation, service areas and computer sciences. His-. tity of centers, medians, and centroids. However,. torically, the center and median have been proved Slater proved that, in a tree graph, a point u is a useful as solutions for the locations of emergency centroid if and only if u is also a median[12]. Moreand service facilities, respectively, such as a hospi-. over, he also proved that for any connected graph. tal, a police station, a post office, shopping mall, G, the centroids and medians are in the same block bank or power station. It was for telecommunica-. of G[13]. In this paper, we shall show the identity. tion networks that Hakimi originally proposed me-. of medians and centroids of a discrete set according 1.

(2) to the Manhattan metric on Z 2 . A discrete set S. c(S) = max{g(u)|u ∈ R(S)}. Point u is called a. 2. is a subset of Z with elements called points. In centroid if g(u) = c(S). The set of centroids is de[9], Lungo et al. proposed an efficient algorithm for noted by C(S). finding the medians of a discrete set S in O(|R(S)|) We use an example to illustrate the above no-. time, where R(S) denotes the smallest rectangle. area containing S and |R(S)| is the cardinality of tation. In Figure 1, R(S) is a 3 × 4 rectangle of R(S) . Chung extended their result to the weighted 12 points, where S contains the points p1 , p4 , p6 , case and solved the problem in O(|S|) time [2]. The rest part of this paper is organized as fol-. p8 , p10 , and p12 . The distances between point p1 and points p1 , p4 , p6 , p8 , p10 , and p12 are 0, 3,. lows. In Section 2, we define our problem formally 2, 4, 3, and 5, respectively. The total distance and introduce some notation in detail. Section 3 D(p1 ) = 0 + 3 + 2 + 4 + 3 + 5 = 17. Similarly, contains our main result of proving the identity of the distances between point p2 and points p1 , p4 , medians and centroids on a discrete set. Finally, p6 , p8 , p10 , and p12 are 1, 2, 1, 3, 2, and 4, reconcluding remarks are given in Section 4.. spectively, and D(p2 ) = 1 + 2 + 1 + 3 + 2 + 4 = 13. For all points pi , i = 3, 4, · · · , 12, the values. 2. Preliminaries. of D(pi ) are 13, 13, 15, 11, 11, 11, 17, 13, 13, and 13, respectively. Therefore, the median set. We will follow the notation defined in [9]. For clar-. M (S) = {p6 , p7 , p8 }. Note that p7 is not in S. Let Points p , p , p , and p are closer to p than 6 8 10 12 6 R(S) denote the smallest m × n rectangle con- p , thus |P | = 4. Since no point is closer to ity, we introduce some of them as follows.. 1. taining S which is a discrete subset on Z 2 . The. p6 p1. p1 than p6 except p1 itself, |Pp1 p6 | = 1. There-. position of each point p in R(S) is indexed by. fore, f (p6 , p1 ) = |Pp6 p1 | − |Pp1 p6 | = 4 − 1 = 3.. (xp , yp ), 1 ≤ xp ≤ m and 1 ≤ yp ≤ n, where xp. Similarly, f (p6 , p2 ) = 2, f (p6 , p3 ) = 1, f (p6 , p4 ) =. and yp are the row number and the column num-. 0, f (p6 , p5 ) = 4, f (p6 , p7 ) = 0, f (p6 , p8 ) = 0,. ber, respectively. Note that we number the rows. f (p6 , p9 ) = 2, f (p6 , p10 ) = 2, f (p6 , p11 ) = 0, and and columns starting from the lower-left corner of f (p , p ) = 0. The value of g(p ) is 0. Using the 6 12 6 R(S). Using the Manhattan metric, the distance same computation for each point in R(S), the valbetween two points p = (xp , yp ) and q = (xq , yq ) is. ues of g(pi ), i = 1, 2, · · · , 12, are -4, -2, -1, -2, -4, 0, d(p, q) = |xp − xq | + |yp − yq |. The total distance of 0, 0, -4, -2, -2, and -2, respectively. By the definiP point p in R(S) is D(p) = d(p, q)[1]. A point p tion of centroids, C(S) contains points p , p , and 6 7 q∈S in R(S) is said to be a median with respect to S if p8 which are also the medians with respect to S. D(p) is minimum among the total distances of all points in R(S). Generally, there are more than one. The ith row projection (respectively, jth column. median and some medians are in R(S) − S. We use. projection) of S is the number of points of S in the. M (S) to denote the set of medians with respect to ith row (respectively, jth column). We denote the S. For a pair of points u, v ∈ R(S), let Puv be the. ith row projection by hi , 1 ≤ i ≤ m and the jth. set of points in S which are closer to u than v, in-. column projection by vj , 1 ≤ j ≤ n. The vectors. cluding u itself if u ∈ S. Let f (u, v) = |Puv | − |Pvu | H = (h1 , h2 , · · · , hm ) and V = (v1 , v2 , · · · , vn ) are and g(u) = min{f (u, v)|v ∈ R(S) − u}. The cen- called the horizontal and vertical projections, retroid value of S, denoted by c(S), is defined as. spectively, of S. The prefix sums of vectors H and.

(3) p1. p2. p3. p4. p5. p6. p7. p8. p9. p10. p11. p12. Observation 2 If there are more than two median rows (respectively, columns), then no point of S is in the intermediate median rows (respectively, columns). Observation 3 If there are more than one median column (respectively, row) and m is a median at one of the left (respectively, lower) cor-. Figure 1: The Manhattan metric.. ners of R(M ), then Vym = A 2 ).. A 2. (respectively, Hxm =. Furthermore, if m is a median at one of. the right (respectively, upper) corners of R(M ), V are defined as follows: H0 = 0 and Hk =. k P. then Vym −1 = hi , k = 1, 2, ..., m. V ym >. vj , k = 1, 2, ..., n. 3. A 2. A 2. (respectively, Hxm −1 =. (respectively, Hxm >. A 2). and. A 2 ).. i=1. V0 = 0 and Vk = and A =. k P. j=1 m P. n P. i=1. j=1. hi =. vj .. Main Result. In this section, we shall prove the identity of medians and centroids on a discrete set under the Man-. The ith row (respectively, jth column) of R(S) is called a median row (respectively, median column) if Hi−1 ≤. A 2. ≤ Hi (respectively, Vj−1 ≤. A 2. ≤ Vj ).. In [9], Lungo et al. proved that a point m belongs to M (S) if and only if m is an intersection of a median row and a median column of R(S). For example, in Figure 1, H = (h1 , h2 , h3 ) = (2, 2, 2), V = (v1 , v2 , v3 , v4 ) = (1, 2, 0, 3), (H1 , H2 , H3 ) = (2, 4, 6), (V1 , V2 , V3 , V4 ) = (1, 3, 3, 6) and the value of A is 6. It is easy to find that row 2 and columns 2, 3, and 4 are the median row and the median columns, respectively. The medians of R(S), p6 , p7 , and p8 are indeed the intersections of row 2 and. hattan metric. For ease of description, in Lemmas 1 and 2, all positions of the discrete set S are mapped into the coordinate system and a specific median is mapped to the origin. That is, if m = (xm , ym ) is the specific median, then for any point u = (xu , yu ), the abscissa and ordinate of u in the coordinate system are yu − ym and xu − xm , respectively. Notice that the row number xu is mapped to an ordinate and the column number yu is mapped to an abscissa. We use x ˆu and yˆu to denote the mapped abscissa and ordinate, respectively, of point u in the coordinate system. That is, x ˆu = yu − ym and yˆu = xu − xm .. columns 2, 3, and 4, respectively. According to the result that a point m belongs to. Lemma 1 Let m = (xm , ym ) and u = (xu , yu ) M (S) if and only if m is an intersection of a median be two points in R(S), where m ∈ M (S) and row and a median column of R(S), the medians of u ∈ R(S) − M (S). If xm = xu or ym = yu , then S will form a rectangle. We denote it by R(M ). f (m, u) ≥ 0. Moreover, if m is the closest median With respect to R(M ), we have the following ob-. to u, then f (m, u) > 0.. servations: Proof: Since m is at the origin, the coordinate of Observation 1 If m is a median and m ∈ M (S), u is either (0, k) or (k, 0), where k is an integer. We then m must be at one of the four corners of R(M ). only consider the case where (ˆ xu , yˆu ) = (k, 0) and.

(4) k > 0. The other cases can be handled similarly. Let v = (xv , yv ) be a point in R(S) with x ˆv ≤ 0. It can be obtained that d(m, v) < d(u, v) by the following derivation: d(m, v) = |0 − x ˆv | + |0 − yˆv | = |ˆ xv | + |ˆ yv | < |k − x ˆv | + |0 − yˆv | = d(u, v). Since Vym ≥. A 2,. there are at least. A 2. points in. S whose column numbers are less than or equal to ym . Thus, there are at least. A 2. points in S which. are closer to m than u. It implies that f (m, u) ≥ 0. Figure 2: A Voronoi diagram under the Manhattan Now we prove that if m is the closest median to metric. u, then f (m, u) > 0. Let m be the closest median to u. If Vym =. A 2,. then column ym + 1 will be. a median column and point (xm , ym + 1) is also a median which is closer to u. It contradicts that m is the closest median to u. Therefore, f (m, u) > 0. Q. E. D. Let Ni contain the points of S in Quadrant i, i = I, II, III, IV . Note that the points in x-axis or. Lemma 2 Let m = (xm , ym ) and u = (xu , yu ) be two points in R(S), where m ∈ M (S) and u ∈ R(S) − M (S). If xm 6= xu and ym 6= yu , then f (m, u) ≥ 0. Moreover, if m is the closest median to u, then f (m, u) > 0.. y-axis are not in any quadrant. Let O be the origin Proof: We only consider the case where point u and u be a point in S with (ˆ xu , yˆu ) = (k, k), where is in Quadrant I. With a similar reasoning, we k is a positive integer. The Voronoi diagram[7, 11]. can prove the other cases in which the points are. of points u and O, under Manhattan metric, sepa-. in other quadrants. Consider the following three. rates the plane into three regions: region Au con-. cases.. tains the points of S closer to u than O; region. Case 1. x ˆu > yˆu .. Am contains the points of S closer to O than u; the. In this case, we shall prove that d(m, v) < d(u, v). third region contains the points of S which have the. for any point v = (xv , yv ) in S with x ˆv ≤ 0. Let. equal distance to u and O[7]. The points of S on w be a point in R(S) whose coordinate is (0, yˆu ). x-axis and y-axis are separated into four segments Then, L0 , R0 , D0 , and U0 : L0 contains the points u of S with x ˆu ≤ 0 and yˆu = 0; R0 contains the points u of S with x ˆu > 0 and yˆu = 0; D0 contains the points of S with x ˆu = 0 and yˆu < 0; and U0 contains the. d(u, v) = d(u, w) + d(w, v) = |ˆ xu − 0| + |ˆ yu − yˆu | + d(w, v). points of S with x ˆu = 0 and yˆu > 0. See Figure 2. = |ˆ xu | + d(w, v). for an illustration.. > |ˆ yu | + d(w, v).

(5) +|NIV | + |R0 |. = d(m, w) + d(w, v). |NI | + |NIV | + |R0 | ≥ |NIII | + |NIV | + hxm. ≥ d(m, v). Since Vym ≥. A 2,. there are at least. A 2. points in S. whose column numbers are less than or equal to ym . Thus, there are at least. +|D0 | A |NI | + |NIV | + |R0 | > . 2. A 2. points in S which It implies that V < A and contradicts that m is ym 2 are closer to m than u. It implies that f (m, u) ≥ 0. a median. Thus, f (m, u) > 0. Case 2. x ˆu < yˆu .. Q. E. D.. Similar to Case 1, it can be proved that there are at least. A 2. points in S whose row numbers are less. Corollary 3 If u ∈ R(S)−M (S), then there exists a point w in M (S) such that f (w, u) > 0.. than or equal to xm and f (m, u) ≥ 0. Case 3. x ˆu = yˆu .. Lemma 4 If |M (S)| > 1 and m, u belong to. For the purpose of contradiction, we assume that. M (S), then f (m, u) = 0.. f (m, u) < 0. That is |Pum | > |Pmu | and |Au | > |Am |. Since Au is a subset of NI and Am contains Proof: By Observations 1 and 2, the positions of S S NIII L0 D0 , |NI | ≥ |Au | > |Am | = |NIII | + m and u in R(S) must be in one of the following cases: |L0 | + |D0 |. Therefore, 1. m and u are at the same row, |NI | > |NIII | + |L0 | + |D0 | |NI | + |NIV | + |R0 | > |NIII | + |L0 | + |D0 | +|NIV | + |R0 |. 2. m and u are at the same column, and 3. m and u are at the opposite corners of R(M ). Suppose that m and u are at the same row, where. A |NI | + |NIV | + |R0 | > |NIII | + |NIV | + hxm ym < yu . By Observation 3, there are 2 points closer to m than u since Vym = A2 . Moreover, since +|D0 | Vyu−1 = A2 , the number of points on column yu A . |NI | + |NIV | + |R0 | > and on the right hand side of u is A2 ; that is, the 2 number of points closer to u than m is A2 . We It implies that Vym < A2 and contradicts that m is have |Pmu | = |Pum | = A2 and f (m, u) = 0. With a a median. Thus, f (m, u) ≥ 0. similar reasoning, the same result for the latter two For the case where m is the closest median to u, cases can be obtained. we assume to the contrary that f (m, u) ≤ 0. That Q. E. D is |Pum | ≥ |Pmu | and |Au | ≥ |Am |. Since Au is S S a subset of NI and Am contains NIII L0 D0 , Lemma 5 If point m is a median of S, then m is |NI | ≥ |Au | ≥ |Am | = |NIII | + |L0 | + |D0 |. More- a centroid of S.. over, m must be the upper-right corners of R(M ) since m is the closest median to u and u is in Quad-. Proof: By Lemmas 1 and 2 and the definition of. rant I with xm 6= xu and ym 6= yu . By Observation g(u) = min{f (u, v)|v ∈ R(S) − u}, if u is a median, 3, Hx = |NIII | + |NIV | + hx + |D0 | > A . There- then g(u) ≥ 0; otherwise, g(u) ≤ 0. The definition m. m. 2. of a centroid u is g(u) = c(S) = max{g(v)|v ∈. fore,. R(S)}. By Lemma 4, therefore, a median must be |NI |. ≥ |NIII | + |L0 | + |D0 |. |NI | + |NIV | + |R0 |. ≥ |NIII | + |L0 | + |D0 |. a centroid. Q. E. D.

(6) Lemma 6 If u = (xu , yu ) ∈ G is a centroid under the Manhattan metric, then u is a median.. [4] A. J. Goldman, Minimax Location in a Facility in a Network, Transportation Science Vol. 6, 1972, pp. 407-418.. Proof: Assume to the contrary that u is a centroid but not a median. Let point m be the closest me-. [5] S.L. Hakimi, Optimum Location of Switching. dian to u. By Lemmas 1 and 2 and Corollary 3, we. Centers and the Absolute Centers and Medians. know that g(m) ≥ 0 and g(u) < 0. It contradicts. of a graph, Operations Research, Vol. 12, 1964,. the definition of a centroid g(u) = max{g(v)|v ∈. pp. 450-459.. G}. It completes the proof.. [6] F. Harary, Status and Contrastatus, SociomeQ. E. D.. try, Vol. 22, 1959, pp. 23-430.. We summarize Lemmas 5 and 6 as the following theorem.. [7] R. Klein and A. Lingas, Manhattonian Proximity in a Simple Polygon, Eighth Annual Sym-. Theorem 7 Under the Manhattan metric, point u is a centroid of G if and only if it is a median of. posium on Computational Geometry, 1992, pp. 312-319.. G. [8] R. Laskar and D. Shier, On Powers and Centers. 4. Concluding Remarks. of Chordal Graphs, Discrete Apply Mathematics, Vol. 6, 1983, pp. 139-147.. In this paper, we prove the identity of medians and centroids of a discrete set under Manhattan metric. Thus, an algorithm which finds the medians of a graph can also be applied to find the centroids. [9] A. Del Lungo, M. Nivat, R. Pinzani and L. Sorri, The Medians of Discrete Sets, Information Processing Letter, 65, pp. 293-299, 1998.. of the graph and vice versa. By using the algo-. [10] O. R. Oellermann, On Steiner Centers and. rithm proposed by Chung[2], the centroids of a dis-. Steiner Medians of Graphs Telecommunication. crete set can be found in O(|S|) time. In general. Networks, Networks, Vol. 34, 1999, pp. 258-263.. graphs, a median may not be a centroid. It is worth to study the identity of medians and centroids on other graphs.. References. [11] F. P. Preparata and M. I. Shamos, Computational Geometry, Springer-Verlag, New York, 1985. [12] P.. J.. Slater,. Maximum. Facility. Loca-. tion,Journal of Research of the National Bureau [1] F. Buckley and F. Harary, Distance in Graphs,. of Standards, Vol. 79, 1975, pp. 107-115.. Addison-Wesley, Reading, MA, 1990. [13] P. J. Slater, Center, Median and Centroid Sub[2] Kuo-Liang Chung, On Finding Medians of. graphs, Networks, Vol. 34, 1999, pp. 303-311.. Weighted Discrete Points, Information Processing Letter, Vol. 74, 2000, pp. 103-106.. [14] B. C. Tansel, R. L. Francis and T. J. Lowe, Locations on Networks: A Survey, Management. [3] A. J. Goldman, Optimal Center Location in Simple Networks, Transportation Science Vol. 5, 1971, pp. 212-221.. Science, Vol. 29, 1983, pp. 482-511..

(7)

參考文獻

相關文件

Should an employer find it necessary to continue the employment of the Class A Foreign Worker(s), the employer shall, within four (4) months prior to the expiration of the

You are given the wavelength and total energy of a light pulse and asked to find the number of photons it

Wang, Solving pseudomonotone variational inequalities and pseudocon- vex optimization problems using the projection neural network, IEEE Transactions on Neural Networks 17

Hope theory: A member of the positive psychology family. Lopez (Eds.), Handbook of positive

volume suppressed mass: (TeV) 2 /M P ∼ 10 −4 eV → mm range can be experimentally tested for any number of extra dimensions - Light U(1) gauge bosons: no derivative couplings. =&gt;

Define instead the imaginary.. potential, magnetic field, lattice…) Dirac-BdG Hamiltonian:. with small, and matrix

The temperature angular power spectrum of the primary CMB from Planck, showing a precise measurement of seven acoustic peaks, that are well fit by a simple six-parameter

incapable to extract any quantities from QCD, nor to tackle the most interesting physics, namely, the spontaneously chiral symmetry breaking and the color confinement.. 