[SOLVED] AI ASSIGNMENT 6- Trees in Prolog

35.00 $

Programming resource
Digital learning resource
Category:
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

Rate this product

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.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.