>>>>Well, since Edward already solved it I won't press on, especially since time is a premium right now. :-)
>>>>
>>>>However, this excercise brings up an interesting thought. We are extremely dependent on computer machinations to solve our problems for us, and rightly so since many of them can only be solved thru numeric analysis. Nevertheless, it still seems better to use a closed form solution to a problem if it exists for both expediency and the excercise of the mind, :-)
>>>>
>>>Yes, although I think all of us could do the looping code in a matter of 2 or 3 minutes, and while one might spend hours on the math solution, the math solution is none-the-less a thing of beauty compared to the code...and a good mental exercise, as well. Now, who wants to volunteer to prove the math solution by combinatorial anaysis (no induction allowed). (s)
>>
>>Bruce, I didn't use combinatorics to find solution. There is another purely algebra method to do this.
>
>It's probably easier, too. My training has me using combinations/factorials as a medium for deriving solutions for this type of problem, but it's certainly not always the best/easiest way. Though the fastest way may be to guess the solution and use induction to show it works :~)
In math analysis, this problem is actually finding a line crossing 4 points.
Edward Pikman
Independent Consultant