You are on page 1of 1

Project Problems

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.

2. Assuming a universe represented as an arrays, write a program to represent the set X ,


given the arrays representing X

Function and Relations


3. Assume that a sequence from [1,,n] to the real numbers is represented as an array A,
indexed from 1 to n. Write a program that finds the inverse of a relation

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

You might also like