Last Friday at lunch, I came up with a fairly elegant solution, but I've been pretty busy, so I haven't gotten a chance to post it until now. Here it is:
Let a, b, c represent the results of the dice, each an integer 1-6 inclusive, in any order.
- if a=b=c
- if a=b or b=c or c=a and max(a,b,c)+min(a,b,c)=7
- min(a,b,c) +9
- a≠b≠c≠a and either a=2i, b=2j, c=2k or a=2i+1, b=2j+1, c=2k+1, where i,j,k∈ℤ
- max(a,b,c) + min(a,b,c)
- If you get triples, then the answer is 3.
- If you get doubles where low+high=7, then the answer is low+9 (a.k.a. high+low+low+2).
- If you get all 3 even numbers or all 3 odd numbers, then the answer is 2*low.
- Otherwise, add the highest and lowest numbers.
And yes, I know that this is terribly informal and I didn't dig up all of the math symbols, but it's been a while since I did serious math, so I'm a bit rusty.
EDIT 2016/Apr/30: discovered and removed a touch of redundant text: I had parenthetically said, in "if a=b or b=c or c=a and max(a,b,c)+min(a,b,c)=7", "(but not a=b=c)", but the max and the min would have different parity, so, duh.