A fuzzy set merging (FSM) algorithm is proposed in order to generate distinguishable fuzzy sets. A relative compactness measure is defined to characterize the homogenous information that one pattern shares with its neighbors, and a so-called "local" entropy is employed to evaluate the distinguishability of fuzzy sets. By maximizing this entropy measure the optimal number of merged fuzzy sets with good distinguishability can be obtained, which preserve the information of original fuzzy sets as much as possible. Furthermore, we propose a scheme to optimize the input space partitioning for a Takagi-Sugeno (TS) fuzzy model by using the FSM algorithm. As a result, a good trade-off between global approximation ability and interpretability in input space partitioning is achieved in the TS model.