A mathematical framework for estimating prototyping cost considering transition of quality states under Markovian setting