1st one H->2^1+1 HTHT->2^4+4 TTHTHTHTHTHHTHTHTHTTTTTTHTHHHHHTT(33) -> 2^33+6(why)?
do you see any connection? On Aug 24, 6:55 am, keyankarthi <keyankarthi1...@gmail.com> wrote: > http://www.spoj.pl/problems/MAIN8_D/ > > i tried solving this problem.... > any ideas...?? > for second test case 'htht' > the states i considered are > 1 T - (1/2) * x+1 > 2 HH - (1/4) * x+2 > 3 HTT - (1/8) * x+3 > 4 HTHH - (1/16) * x+4 > 5 HTHT - (1/16) (final state) > > x is the expected no of coins. > x= 1 + 2+3+4+5 > gives 16x=15x+26 > x=26. > > answer given is 20... > can any one explain this, -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.