EDIT: I can't write down a boolean equasion. I tried using the line above for my not symbols, but it messes it up when I make the post. So I made another post showing the truth table, which one can use to come up with the equasion

I believe that there is not one answer. I am starting to think the answer I get will have to be the one I can use to build the cheapest circuit. I am pretending I have to make 10,000 of these so that means that finding something to use 1 less circuit means saving a whole lot of money.