I just noticed something else: All posts to this point tacitly assume that "string" implies the adjective "uninterrupted." I see nothing in the original post which explictly excludes a result such as f,r,i,a,s,t,h, (etc.).
Then again, there may be a standard definition of "string" which I've missed. Again, great work on your part, that of Dr. Scales and all others.
> Date: Mon, 12 Aug 2013 13:35:26 -0400 > From: email@example.com > To: firstname.lastname@example.org > Subject: Re: Permutation problems > > Hi Mark, > > > The same fish/rat logic (inclusion/exclusion) needs > > to be applied to the second problem as well. For > > example, 9876450123 has been counted three times. > > I believe the solution is: > > 7!+8!+7! - (5!+4!+5!) + 2! > > Thanks for picking up that double and triple counting. > I agree with your result. > > Peter Scales.