I'm not even sure at this point that this is homework. I have a hard time believing that any school system in the world would give this type of problem to students who have no understanding of the underlying concepts. I think we have a child using multiple ids pretending he needs help just to waste peoples time.