A Factor Graph Model of Trust for a Collaborative Multi-Agent System