# How do you come up with greedy algorithm for deadline scheduling when comparing x_subscript(i) and y_subscript(k)?

So there are two boxing teams, my team A and the opposing team B, each with m boxers. Based on the player's ranking of skill, x_subscript(i) being the ranking for ith boxer for team A and y_subscript(k) being the ranking for kth box for team B. Each fight round is set up one boxer from team A against one boxer from team B at a time. I get to set up who goes against whom, so I need to make sure the boxer from my team A has a higher ranking than the boxer from team B for as many rounds as possible.

I need to provide a greedy algorithm and prove that it's correct, and come up with the running time.

It seems to me it's a type permutation, scheduling with deadlines and apply the inversion, but I am stuck on how to start. Could someone provide a guidace? Thank you!

• What have you tried? What greedy strategies have you considered? We want to help you understand, not solve your exercises for you. If you don't tell us what you've tried, where you got stuck, how much you understand about greedy algorithms, what studying you have done, etc., it is very hard to help you. – D.W. Oct 20 '14 at 1:20
• @D.W. Certainly. I too would like to learn... I tried a few that were given, but permutation was the correct way to go but I just don't know how to apply to this case because there was a problem similar that I only practiced with where they were from the same interval, for example, x_subscript(i) and y_subscript(i), and not different with i and k for this. So I just want a starting guidance. – O M Oct 20 '14 at 1:26
• Welcome to Computer Science! Note that you can use LaTeX here to typeset mathematics in a more readable way. See here for a short introduction. – FrankW Oct 20 '14 at 5:07