John has 8 friends. He will invite 5 to his party. However, two of his friends have beef and they refuse to attend together. How many possible combinations of guests are possible given this constraint?
Just sum up the combos from the different cases. If neither of the beefy friends attend, then have
You are playing a 2D game where your character is trapped in a 6×6 grid. Your character starts at (0,0) and can only move up and right. There are two power-ups located at (2,3) and (4,6). How many possible paths can your character take to get to (6,6) such that it can collect at least one power-up?
Firstly, we know that given an n by m grid there are
Gives this, there are
Additionally, there are
There are
Via inclusion-exclusion, there are therefore 210 + 350 - 100 = 460 paths that go through either of the target points.