Discrete Optimization Solving the p-median problem with pos/neg weights by variable neighborhood search and some results for special cases J. Fathali * , H. Taghizadeh Kakhki Department of Mathematics, Ferdowsi University of Mashhad, Vakil Abad Blvd., Mashhad 91775-1159, Iran Received 1 September 2003; accepted 6 May 2004 Available online 19 August 2004 Abstract The p-median problem with positive and negative weights has been introduced by Burkard and Krarup [Computing 60 (1998) 193]. In this paper we discuss some special cases of this problem on trees and propose a variable neighborhood search procedure for general networks, which is in fact a modification of the one proposed by Hansen and Mladenovic [Locat. Sci. 5 (1997) 207] for the p-median. We also compare the results with those obtained by a Tabu search procedure. Ó 2004 Elsevier B.V. All rights reserved. Keywords: Location theory; p-Median problem; Discrete optimization; Heuristics 1. Introduction The p-median problem is well known in the OR literature and has received much attention in the past decades (see e.g. Mirchandani and Francis, 1990; Drezner and Hamacher, 2002). In the graph version, it asks for finding a subset P of cardinality p of the set of vertices V of a given network N =(V, E), so that the sum of the distances from this set to all other nodes in N is minimized. The distance from any node v 2 V to the set P is defined as the shortest distance from v to the node u 2 P closest to v. Usually to every node v i is also assigned a weight w i ; so the problem actually asks for the minimum weighted sum. The p- median problem on a graph has been shown by Kariv and Hakimi (1979) to be NP-hard. The weights have been taken almost invariably to be positive, until as mentioned by Burkard and Krarup (1998) the work of 0377-2217/$ - see front matter Ó 2004 Elsevier B.V. All rights reserved. doi:10.1016/j.ejor.2004.05.027 * Corresponding author. Tel./fax: +98 511 828606. E-mail addresses: fathali@math.um.ac.ir (J. Fathali), taghizad@math.um.ac.ir (H.T. Kakhki). European Journal of Operational Research 170 (2006) 440–462 www.elsevier.com/locate/ejor