I am a bit desperate for help. What I need to do is the same as to search a recipe inside other recipes. Assuming that all ingredients are expressed in a number of columns (assuming N columns), and each row contains the record of the recipes with non-zero in the columns corresponding to the ingredients, I need to find out whether the same non-zero ingredients appeared in other recipes, starting from the smallest recipes with the least number of ingredients. I already did counting and sorting the number of ingredients for each row, smallest in the bottom of the rows). How do I go from here? Appreciate some light! Thanks.