zavidovych 0 Newbie Poster

Hi gurus,

here comes the problem:

N ambassadors discuss serious business at the circular table. Each ambassador`s attitudes towards other ones are described as N-1 float numbers between -1 and 1 (from hatred to love). Atmosphere between two neighbors equals the average of their mutual attitudes e.g. Amb1 likes Amb2 next to him (at = 0.6) while Amb2 wants to nuke Amb1`s country (at = -1), atmosphere between Amb1 and Amb2 equals (0.6 -1)/2 = -0.2, a slight hostility. Summing such atmospheres between every pair of neighbor ambassadors we yield the number showing the total atmosphere in the room. I have to arrange ambassadors in a way giving the maximal total atmosphere number.

After randomizing I have a 2d array of attitudes (rows - ambassadors, cols - their attitudes). Now apparently it is time to try every one of N! possible arrangements in order to find the best one. Could you please suggest and idea of how to implement it? Apparently some recursion will go, won`t it?

many thanks for your time