A THESIS PRESENTED TO THE UNIVERSITY OF WATERLOO