Does or does not sword spec reset swings that have not completed? For 2h? For dw?
Assuming it doesn't...
You want to model a Markov chain with four nodes.
http://en.wikipedia.org/wiki/Markov_chain
So you'll have something like this (but with Sword Spec added in):
(No Flurry) -p(Crit)-> (Flurry 3) -p(Hit)-> (Flurry 2) -p(Hit)-> (Flurry 1) -p(Hit)-> (No Flurry)
| | | |
p(Hit) p(Crit) p(Crit) p(Crit)
| | | |
(No Flurry) (Flurry 3) (Flurry 3) (Flurry 3)
I hope that helps :)