public static void main(String[] args) throws Exception
	{
		int p[] = {30, 35, 15, 5, 10, 20, 25};
		BUMatrixChainMultiplication bu = new BUMatrixChainMultiplication(p);
		
		System.out.println("Number of scalar multiplications");
		for ( int i = 1; i < p.length; i++) {
			for ( int j = i; j < p.length; j++)
				System.out.print(bu.minCost(i, j) + " ");
			System.out.println();
		}
		
		System.out.println("\nSplit");
		for ( int i = 1; i < p.length; i++) {
			for ( int j = i; j < p.length; j++)
				System.out.print(bu.split(i, j) + " ");
			System.out.println();
		}
	}