The following predicate on Category should work (assuming that information
is the to-many relationship from Category to Information):
[NSPredicate predicateWithFormat:@"SUBQUERY(information, $i, ANY $i.groups in %@).@count > 0",groups];
Alternatively, you could use the inverse relationships:
// your set of Group objects:
NSSet *groups = ...;
// all Information objects that are related to any group object:
NSSet *information = [groups valueForKey:@"information"] ;
// all Category objects that are related to any information object:
NSSet *categories = [information valueForKey:@"category"];
which can be combined to
NSSet *categories = [groups valueForKeyPath:@"information.category"];
A disadvantage of this alternative solution might be that it creates also the intermediate set of groups in memory.