[SOLVED] AI ASSIGNMENT 6- Trees in Prolog

35.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Assignment6-v5v1qh.zip (216.3 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
šŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Duration- 5 periods. Full Marks (including Viva Voce)-15
Write Prolog programs
1. *To determine whether an element is a member of a binary tree.
2. *To determine whether an element is a member of a binary search tree.
3. *To determine whether an object is a binary tree.
4. To find whether an object is a binary search tree.
5. *To find maximum element from a binary search tree.
6. To find the height of a binary tree.
7. To find the preorder traversal of a binary tree, storing the result in a list.
8. *To find the inorder traversal of a binary tree, storing the result in a list.
9. To find the postorder traversal of a binary tree, storing the result in a list.
10. *To insert an element in a binary search tree.
11. *To delete a leaf node from a binary search tree.
12. To delete a node from a binary search tree.
13. To sort an unordered list into an ordered list using a binary search
tree and inorder traversal.
14. To sort an unordered list into an ordered list using insertions in a binary
search tree and subsequent deletions of minimum elements.
15. Given preorder and inorder traversals of a binary tree in two lists,
obtain its postorder traversal in another list.
16. Given postorder and inorder traversals of a binary tree in two lists,
obtain its preorder traversal in another list.
*marked problems are done in the class.

  • Assignment6-v5v1qh.zip