From: Reinder Verlinde Date: 2006-01-08T01:58:00+09:00 Subject: Re: Dice Roller (#61) In article , Christian Neukirchen wrote: > "Matthew D Moss" writes: > > > Hopefully this ASCII art comes through clean: > > > > Parse tree for: (5d5-4)d(16/d4)+3 > > > > _______________ + _______________ > > | | > > _______ d _______ 3 > > | | > > ___ - ___ ___ / ___ > > | | | | > > ___ d ___ 4 16 ___ d ___ > > 5 5 1 4 > > So what are the maximum and minimum values of this? Notation: [x,y] is any distribution with minimum x and maximum y. I then get: (5d5-4)d(16/d4)+3 = (adb = [a,a*b], so 5d5 = [5,25]) ([5,25]-4)d(16/d4)+3 = ([x,y] - c = [x-c,y-c]) ([1,21])d(16/d4)+3 = (adb = [a,a*b], so d4 = 1d4 = [1,4]) ([1,21])d(16/[1,4])+3 = (c/[x,y] = [c/y,c/x] if x and y > 0) ([1,21])d([4,16])+3 = ([a,b]d[c,d] = [a*c,b*d] if a,b,c, and d > 0) [4,336]+3 = ([x,y] + c = [x+c,y+c]) [7,339] Reinder