3 ms·
w sf x sf2 y sf3 z is equivalent to sf3(sf2(sf(w,x),y),z) assuming left to right evaluation (and equal priorities of operations). Trees of operations: w sf
by ajuc 17y ago
w sf x sf2 y sf3 z
is equivalent to
sf3(sf2(sf(w,x),y),z)
assuming left to right evaluation (and equal priorities of operations).
Trees of operations:
w sf x sf2 y sf3 z
w-sf1-sf2-sf3
| | |
x y z
sf(w,sf2(x,sf3(y,z)))
sf1-sf2-sf3-z
| | |
w x y
You can permutate w,x,y,z in these trees - I was sure this will give the same expressions, but now I'm not.
Interesting question.
Edit: oh, so you wanted to permutate functions, not arguments. Then it won't give the same expressions.
- nopassrecover 17y agoAs I just commented in another comment I will generate all possible substitutions of someFunc with (+,*,-,/) and all possible substitutions of w,x,y,z with the set of arguments. Now what I am trying to work out is that I am not assuming equal priorities of operations for w sf x sf2 y sf3 z. I see you've reoganised the nested approach, would this still satisfy?