Implemented backward-chaining algorithm to determine if the query can be inferred from the information given in the knowledge base.