types of patterns and algebra - Search