private static int[] createServingBowl(String distPath, int nfruits) throws Exception {
        double[] dist = new double[12];
        int[] bowl = new int[12];
        
        Scanner sc = new Scanner(new File(distPath));
        // read the first 11 possibilities
        for (int i = 0; i < 11; ++i)
            dist[i] = sc.nextDouble();
        sc.close();
        
        // prefix sum
        for (int i = 1; i < 11; ++i) {
            dist[i] = dist[i-1] + dist[i];
        }

        if (dist[10] > 1)
            throw new Exception("Distribution does not sum to 1!" + dist[10]);
        dist[11] = 1; // the last is always 1

        for (int i = 0; i < nfruits; ++i) {
            double r = random.nextDouble();
            int f = -1;
            for (int j = 0; j < 12; ++j) {
                if (r < dist[j]) {
                    f = j;
                    break;
                }
                    
            }
            assert f != -1;
            bowl[f]++;
        }

        int total = 0;
        for (int i = 0; i < 12; ++i)
            total += bowl[i];

        assert total == nfruits;

        return bowl;
    }