for (int i = 1; i < costs.length; i += 2) {
costs[i][0] = 1;
costs[i][1] = 1;
}
ICounter c = new Counter(costs, 0, 4);
CostAutomaton cauto = new CostAutomaton(auto, c);
solver.post(IntConstraintFactory.cost_regular(vars, cost, cauto));
solver.set(IntStrategyFactory.lexico_LB(vars));