Hi

The explanation says:
"By linearity of expectation, the expected number of copies is then
just P multiplied by the number of places the string can occur, which
is S-L+1. This is a convenient fact to use, because we don't need to
take into account that the string occurring in one position and the
string occurring in an overlapping position are not independent
events."

I didn't understand that how come expected number of copies is P*(S-L+1).

Shouldn't the min_copies be ( P*(S-L+1) )* n, where n is 1+(S-L)/(L-O)
i.e. maximum number of copies that can fit in S?

Please help me understand this.

Best regards
Vivek

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CABaJBv%2Bf8zSBGj02nG%3Dm8AOPDTNmCOYsaff-8qcd%3DkViAGA_nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to