Good day to you! I am a proficient C/C++ programmer and a matematician. Long time ago I learned Prolog as a course, and now I believe that I can help you with your assignment. Although my price may seem large at first, I have reasons behind this: to implement your assignment one have to install Prolog first and to recall a lot of things. However, I guarantee that I shall complete it. For example, answer for one of the first questions would rely on the fact that Prolog uses depth-first tree search and thus results would not differ on each run.
Feel free to PM me if needed.
Last but not least — good luck to your project anyway!