Optimization of Thompson Construction of an NFA I would like to ask under which circumstances can these optimizations be used,supposed that they are part of a bigger NFA and when can they lead to an error ??
In general these reductions are OK when there are no other edges incident to the edges you are contracting. Whenever there are other edges there can be unexpected paths. 

I do not know of a good characterization when they can be used. If such an improvement would have been obvious, I think Thompson would have included it.