A general class of combinatorial filters that can be minimized efficiently