Pricing of perpetual American and Bermudan options by binomial tree method