Balanced trees and quotient set

Hi,

I'm looking for two Scheme functions:

- one that tests if a tree is balanced, i.e. for each node, the right

weight is equal to the left weight, e.g.:

(4 (1 2 3) (3 1 2)) is balanced

(3 (3 1 1) (1 1 2)) is not

- one that, given the graph of an equivalence relation R on the set A

(implemented as a list), computes the quotient set A/R.

Thanks.

--

Article post via l'accs Usenet http://www.*-*-*.com/

Accs par Nnrp ou Web