Amount Sharing on Common Expenses between multiple Association

Ours is the Apartment by XYZ builder. As per above diagram We have 4 Apartments/blocks here. Though each Apartments/blocks are within the same Compound and Sharing Common gates Gate 1 and Gate 2 that is interconnected we all are registered as different 4 Association. Below is the size of each Blocks or Apartments. Apartment 1 - 34 houses (XYZ builder with Landowner Mr. AA) Apartment 2 - 27 houses (XYZ builder with Landowner Mr. AA) Apartment 3 - 15 houses (XYZ builder with Landowner Mr. BB) Apartment 4 - 15 houses (XYZ builder with Landowner Mr. CC) All the above apartments are developed by XYZ builder. All apartments have their individual association created. However the builder has done the setup like there is common path between the gate 1 (near the Apartment 1 and Apartment 2) and gate 2 at the Apartment 4. The issue we have here is on the Security sharing system as we cannot have seperate security for each apartment as we reside in same compound and we have path connected between Gate 1 and Gate 2. Hence all 4 Apartments/Associations have hired the common security who stands at Gate 1 and Gate 2. Now the debate os how do we share the security amount. Few think we should share the amount based on the total Number of houses across all apartments as the burden is divided acroos all houses. That is in our case total of 91 houses across all apartments. Hence assuming the Security amount per month is 40000 below will be our sharing figures. 40000/91 = 439 per house. And Hence Apartment 1 = 14926 Apartment 2 = 11853 Apartment 3 = 6585 Apartment 4 = 6585 Few think it should be shared based on the association as each of us are different association and number of houses in other association should not bother the other in sharing hte amount. And Hence Apartment 1 = 10000 Apartment 2 = 10000 Apartment 3 = 10000 Apartment 4 = 10000 Each association are talking how it works good for them but no one is ready to talk the logic or take an external advice. I strongly feel we should create an Agreement for whatever we decide but coming to a conclusion is getting on and on debates. Hence I thought to take an advice which is right legally in this kind of situation so that it helps to make an Agreement and which helps all four apartments to be in good relation in future also. :) Need your help in understanding this scenario and guide us so that we do it rightly so that there is no future complications.