You are looking to see there are any duplicates in a `set` I think the simplest way to do this would be:

```ruby
def grouping_valid?(set)
  set.to_a.length == set.to_a.uniq.length
end
```