this is for holding javascript data
Alex Varghese edited q5.tex
about 10 years ago
Commit id: 0c184cad55aa3c263248ae1b324a425ef26ed75e
deletions | additions
diff --git a/q5.tex b/q5.tex
index e4a16e8..40c03fb 100644
--- a/q5.tex
+++ b/q5.tex
...
We first take the first gift and compare it to the first person. Then we follow this procedure:
If $a_j>=s_j$ automatically assign that gift to that person and continue.
If $a_j
If you continue this to completion that means that you have looked at every single person( m comparison) and some fraction of the gifts. If you have looked at each gift that means you assigned all of them and we are done.
If you still have gifts left that means that all the gifts dollar values are smaller than any particular persons satisfication level. So it will be necessary to use more than one gift to satisfy any person.