@@ -0,0 +1,1083 @@
+/**%0A * Created by Max on 27.08.16.%0A */%0Apublic class Test %7B%0A    public static void main(String%5B%5D args) %7B%0A%0A        System.out.println(%22Collisions: %22 + collisionsOneClass(2, 4));%0A    %7D%0A%0A%0A    private static double collisionsOneClass(int size, int count) %7B%0A        // aa bb ccc dddd%0A        // 2,2   3,1  4,1%0A        int collisions = 0;%0A        for (int i = 1; i %3C count; i++) %7B%0A            System.out.println(%22Schritt %22 + i + %22:%22);%0A            int cc = size * ((count - i) * size);%0A            System.out.println(size + %22 * %22 + %22((%22 + ((count + %22-%22 + i)) + %22) * %22 + size + %22)%22);%0A            System.out.println(%22Kollisionen: %22 + cc + %22%22);%0A            collisions += cc;%0A            System.out.println(%22Collisionen bisher: %22 + collisions + %22%22);%0A%0A        %7D%0A        int formel = (int)Math.pow(size,size) * (fac(count-1));%0A        System.out.println(%22Formel: %22 + formel);%0A%0A        return collisions;%0A    %7D%0A%0A    public static int fac(int n) %7B%0A        int fact = 1; // this  will be the result%0A        for (int i = 1; i %3C= n; i++) %7B%0A            fact *= i;%0A        %7D%0A        return fact;%0A    %7D%0A%7D%0A

Test class added. Algo for one class size