I have a large ordered list of lists of integers like this
set={{3,4,5,6,7,9},{1,2,3,4,5,6},{3,4,5,6,9,10},{3,4,5,6,11,12},{3,4,6,9,11,12},...}
and I would like to filter out the nested list based on two conditions. The conditions are two types of shorter nested lists
- pairs of consecutive numbers that are not allowed anywhere in the nested list
- pairs of consecutive numbers that must occur somewhere in the list
required={{3,4},{5,6},...}
notallowed={{1,2},{9,10},...}
The output in this case would be
{{3,4,5,6,7,9},{3,4,5,6,11,12}}
notallowed
and alsoallowed
? Would not just usingnotallowed
be enought to remove those unwanted? $\endgroup$