public static boolean partition(ArrayList<Integer> list){
		int w = 0;
		
		for (int i = 0; i < list.size(); i++) {
			w = w + list.get(i);
		}
		
		if(w % 2 == 1) return false;
		
		int[][] matrix = new int[list.size()][w];
		
		for (int i = 0; i < matrix.length; i++) {
			for (int j = 0; j < w/2; j++) {
				if( j == 0 ){
					matrix[i][j] = 1;
				}else if ( i == 0){
					matrix[i][j] = 0;
				}else if ( matrix[i-1][j] == 1 || (list.get(i) <= j && matrix[i-1][j-list.get(i)] == 1)){
					matrix[i][j] = 1;
				}else{
					matrix[i][j] = 0;
				}
			}
		}
		
		return true;
	}