decision structures summing up this approachour algorithm is basically checking each possible value against all the others to determine if it is the largest with just three values the result is quite simplebut how would this solution look if we were trying to find the max of five valuesthen we would need three boolean expressionseach consisting of four conditions anded together the complex expressions result from the fact that each decision is designed to stand on its owninformation from one test is ignored in the subsequent tests to see what meanlook back at our simple max of three code suppose the first decision discovers that is greater than but not greater than at this pointwe know that must be the max unfortunatelyour code ignores thispython will go ahead and evaluate the next expressiondiscover it to be falseand finally execute the else strategy decision tree one way to avoid the redundant tests of the previous algorithm is to use decision tree approach suppose we start with simple test > this knocks either or out of contention to be the max if the condition is truewe just need to see which is largerx or should the initial condition be falsethe result boils down to choice between and as you can seethe first decision "branchesinto two possibilitieseach of which is another decisionhence the name decision tree figure shows the situation in flowchart this flowchart translates easily into nested if-else statements if > if > max elsemax elseif > max elsemax the strength of this approach is its efficiency no matter what the ordering of the three valuesthis algorithm will make exactly two comparisons and assign the correct value to max howeverthe structure of this approach is more complicated than the firstand it suffers similar complexity explosion should we try this design with more than three values as challengeyou might see if you can design decision tree to find the max of four values (you will need if-elses nested three levels deep leading to eight assignment statements strategy sequential processing so farwe have designed two very different algorithmsbut neither one seems particularly elegant perhaps there is yet third way when designing an algorithma good starting place is to ask