Professional Documents
Culture Documents
Project - Problems: Set Exercises
Project - Problems: Set Exercises
Set Exercises
1 1, 3, 5, 7
2 2, 4, 6, 8
3 3,6,9,10
Sets
1. Write a program to determine whether X = Y given arrays representing X and Y.
4. Assuming the same as previous exercise, write a program that finds the composition R o
S of relations R and S
Recurrence Relations
5. Write a program that prints the amount accumulated yearly if a person invests n dollars
at p percent annual interest compounded m times yearly. Write the program using two
versions: (a) Using iterative solution (b) Recursive solution
6. Write a program that prints the amount accumulated yearly if a person invests n dollars
at p percent compound annually. Write the program using two versions: (a) Using
iterative solution (b) Recursive solution
Trees
7. Write a program that tests if a graph is a tree.
8. Implement pre-order tree traversals as program.
9. Implement post-order tree traversals as program
10. Implement in-order tree traversals as program