A method and apparatus for filter air entering an animal’s nostrils include a filtering element operatively disposed with a lower portion contacting the animal’s nose region between the animal’s nostrils and upper lip. An optimized pattern matching rule for one or more respective pattern matching rules is derived from an original pattern matching rule. A first electromagnetic coupler is connected to at least one of the contacts of the connector.