of the other soft rules used in the present invention children and their friends are of similar age a young adult occurring solely with a kid shares the parent child relationship two people of similar age and opposite gender appearing together by themselves share spouse relationship friends and relatives are clustered across photos if two friends appear together a photo then a third person occurring in the same photo is more likely to be a friend same holds for relatives in general one would prefer a solution which would satisfy all the hard constraints presumably such a solution always exists at the same time satisfying maximal number weighted of soft constraints in general the sets of rules apply to the relationships between individuals in the images i e subjects as well as the relationships between the photographer and the subjects one example of additional rules specific to the relationships between the photographer or the assumed owner of the photo collection and the subjects is the child ren with the highest occurrence in a photo collection is are the child ren of the photographer finally there is a rule consisting of a singleton predicate hasrelation person 1 person 2 relation means that we learn a different weight for each relation which can be thought of representing the prior probability of a particular relationship holding between any two random people in the collection for example it would be.