Students helping students, join us in improving Bored of Studies by donating and supporting future students!
yeah, I suppose it was just a matter of reducing it to a circular permutations problem...One shortcut you can employ for the brute force method is to note that only the cylic order of a to e matters for the value of the given expression (rather than the actual permutation). So it suffices to check 4! = 24 cases.
Yep.yeah, I suppose it was just a matter of reducing it to a circular permutations problem...
wait, you could view it as a bracelets problem, then you'd only have to check 12 cases
that's not guaranteed to work 100% of the time but sure... you do you...We can also contstruct an optimal permutation by basically using a greedy algorithm or ideas from the rearrangement inequality.
Actually, it does always work here, and will also allow us to find an optimal permutation for any finite set (in fact, multiset) of real numbers (here the set was {1, 2, 3, 4, 5}). The interested student may wish to try proving this as an exercise.that's not guaranteed to work 100% of the time but sure... you do you...