You asked:

what is the difference between an alloy and a compound

Sorry, I don't yet have an answer to that question.