A fast HMM algorithm is proposed for online handwritten character recognition. After preprocessing the input strokes are discretized so that a discrete HMM is used. This particular discretization naturally leads to a simple procedure for assigning the initial state and state transition probabilities. In the training phase, complete marginelization with respect to state is not performed. A criterion based on normalized maximum likelihood ratio is given for deciding when to create a new model for the same character in the learning phase, in order to cope with stroke order variations and large shape variations. Experiments are done on the Kuchibue data base from Tokyo University of Agriculture and Technology. The algorithm appears to be very robust against stroke number variations and have reasonable robustness against stroke order variations and large shape variations. A drawback of the proposed algorithm is its memory requirement when the number of character classes and their associated models becomes large. Density tying is discussed in order to overcome this problem.