Implementing Multi Agent Systems (Mas)-Based Trust And Reputation In Smart Iot Environments : A Thesis Submitted In Partial Fulfilment Of The Requirements For The Degree Of Doctor Of Philosophy At Lincoln University