{'fraction_non_alphanumeric': 0.0091324200913242, 'fraction_numerical': 0.0, 'mean_word_length': 5.192090395480226, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimal algorithms for selective variants of the classical and inverse median location problems on trees

ABSTRACT This paper is concerned with selective variants of the classical and inverse median location problems on tree graphs in which the set of existing customer points and the set of candidate facility locations are assumed to be two selective subsets of the vertices of the underlying tree. In the classical selective median location problem, the aim is to find the best location for establishing a facility such that the sum of (weighted) distances from the customers to the facility is minimized. However, the task of the corresponding inverse model is to augment or reduce the edge lengths at the minimum total cost until a predetermined facility location becomes a selective median of the underlying tree. We propose a novel optimal algorithm with linear time complexity for the classical selective model. Moreover, optimal approaches with time complexities are developed for solving the inverse selective median location problem on the given tree graph under different cost norms.