Patterns in set partitions and restricted growth functions