diff --git a/LoopoverBFSImprove.java b/LoopoverBFSImprove.java index 2739924..f3cc9f4 100644 --- a/LoopoverBFSImprove.java +++ b/LoopoverBFSImprove.java @@ -1,6 +1,6 @@ import java.util.*; /** - * given a chain of Loopover states: + * given a length-3 chain of Loopover states: * ex. (5,5,{},{})-->(5,5,{0,1,2},{0,1})-->(5,5,{0,1,2,3},{0,1,2}) * make the BFS trees of every adjacent pair of states; * then find the upper bound on the total state transformation @@ -37,7 +37,7 @@ private static int[] scrambleAction(int R, int C, int[] mvseq, int[][] mvactions for (int mvi:mvseq) out=prodperm(out,mvactions[mvi]); return out; } - private static void improve(int R, int C, String[] Rfrees, String[] Cfrees, int threshold, int P, boolean[] allActions) { + private static boolean improve(int R, int C, String[] Rfrees, String[] Cfrees, int threshold, int P, boolean[] allActions) { System.out.println(R+"x"+C+"\n"+Arrays.toString(Rfrees)+","+Arrays.toString(Cfrees)+"\nthreshold="+threshold+", P="+P); int M=0; for (int mr=0; mr5 - );*/ + )) { + improve(6,6, + new String[] {"000011","000011","000001"}, + new String[] {"000011","000001","000001"}, + 27,7, + new boolean[] {true,true} + ); + } System.out.println("time="+(System.currentTimeMillis()-st)); - //TODO: REVERT BACK TO 2-WAY BFS OPT? - //TODO: 6x6:4x5-5x5-6x6: 38,5; 6x6:4x4-4x5-5x5:27,X - //TODO: 6x6:0x0-2x2-3x3: <27? - //TODO: 3-WAY 6x6:4x4-4x5-5x5-6x6 - //TODO: 4-WAY 5x5:0x0-2x2-3x3-4x4-5x5 } }