From Jonathan Gardner's Korean Notebook
The ㅂ rule is very simple. Look at the final vowel, right before the ㅂ. If it is ㅏ, then replace the ㅂ with an ㅗ. Otherwise, use an ㅜ.
Here's a few examples:
See Category:ㅂ 불규칙 for a list of verbs and adjectives with this rule.