# Combinatorics mmo problem

i've recently came across a problem that i came up with that is realted to a mmo(world of warcraft). Basicaly let's say one player deals a random number between $100$ and $200$ each strike and the opponent as $1000$ health. What would be the probability of killing my opponent in $5,6,\dots,10$ strikes? I've tried solving this problem but there just seems like there are too many possibilities wich seems to make it so it takes too much time to solve this problem. So i was wondering if anyone is able to solve this easily? also any sources on how to solve these kind of problems would be appreciated.

-
I think the idea is very simple. And sometimes tedious calculations cannot be avoided, especially when you are trying to kill an opponent in World of Warcraft XD –  Hui Yu Jul 17 '13 at 13:34
A quick simulation gave me P(6)=8.2% , P(7)=65.5% , P(8)=25.7% and P(9)=0.6%. If you want to do it analytically, you might need the Irwin-Hall distribution. –  Raskolnikov Jul 17 '13 at 13:57

I don't know if there's a good way to calculate this explicitly, but it's not hard to get the computer to do it for you:

     # (Perl)
# $prob[$health][$strikes] is probability of killing a monster # with$health health
#   in exactly $strikes strikes$prob[0][0] = 1;

my $MAX_HEALTH = 1000; my @possible_damage = (100 .. 200); my$denom = @possible_damage;

for my $health (1 ..$MAX_HEALTH) {
$prob[$health][0] = 0;
for my $damage (@possible_damage) { if ($health <= $damage) {$prob[$health][1] += 1/$denom;
} else {
for my $strikes (1 ..$#{$prob[$health-$damage]}+1) {$prob[$health][$strikes] +=
$prob[$health-$damage][$strikes-1] / $denom; } } } } for my$strikes (0 .. $#{$prob[$MAX_HEALTH]}) { my$prob = 100* $prob[$MAX_HEALTH][$strikes]; printf "%2d %5.2f\n",$strikes, $prob if$prob;
}


The output:

$$\begin{array}{rrl} 5 & 0.00 &\% \\ 6 & 8.38 \\ 7 & 65.59 \\ 8 & 25.38 \\ 9 & 0.65 \\ 10 & 0.00 \\ \end{array}$$

(Lines with "$0.00$" indicate a positive but negligible probability.)

This assumes that the probability of each damage value between 100 and 200 is distributed uniformly, which may not actually be the case.

-
well i never thought of this approach and it was kinda what i was loonking for so thx :) –  mithurn Jul 17 '13 at 14:10
Yeah, it's not subtle, and it's not clever, but it does do the job. –  MJD Jul 17 '13 at 14:13