Similarity measure of multiple sets and its application to pattern recognition