Thông tin

Hạn chót Không có hạn chót
Giới hạn nộp bài 2 bài nộp
mỗi 1 giờ

Đăng nhập

[Part4 Theory] Table Constraints


Câu hỏi 1: Element3D

Assume a 3D element constraint T[W][X][Y]=Z. T is 3D array of integers with dimensions \(4 \times 5 \times 10\). \(D(W)={0..3},D(X)={0..4},D(Y)={0..9},D(Z)=[100..200]\) We would like to model this constraint using a table constraint. What are the dimensions of the table constraint (number of rows = number of tuples, number of columns = arity of tuples/number of variables) ? Write your answer as "nRows,nColumns". For instance: 12,3

Câu hỏi 2: Eternity2 (tuples)

For the Eternity2 edge matching problem. Assuming a board 10x10 and a set of 100 pieces (assumed to be all different and without rotation symmetries). How many tuples will contain the table constraint ?

Câu hỏi 3: Eternity2 (number of constraints)

For the Eternity2 edge matching problem. Assuming a board 10x10 and a set of 100 pieces (they are all different and do not contain rotation symmetries). How many table constraints will be posted in the model ?

Câu hỏi 4: Eternity2 (table arity)

For the Eternity2 edge matching problem. Assuming a board 10x10 and a set of 100 pieces (they are all different and do not contain rotation symmetries). What will be the arity (number of variables in the scope) of any single table constraint.

Câu hỏi 5:

A regular constraint has the form \(regular([x_1,...,x_n],automaton)\) where automaton is a finate state automaton

  • \(\Sigma=\{0..k\}\) is the input alphabet (a finite, non-empty set of symbols).
  • \(s_{0}\) is an initial state, an element of \(S\)
  • \(\delta\) is the state-transition function: \(\delta :S\times \Sigma \rightarrow S\)
  • \(F\) is the set of final states, a subset of \(S\)

We have seen that this constraint can be modeled with a table constraints.

Select all the true statements.

Câu hỏi 6: STR2 Algo

In the STR2 filtering algorihtm for table constraints. How many StateInt's are necessary to maintain in a reversible way (on backtrack) the set of valid tuples ?

Câu hỏi 7: Reversible Sparse BitSet

Let us assume an implementation of the Reversible Sparse BitSet on a machine where the word length is 4 bits (instead of 64 when long are used).

Given the current state of a Reversible Sparse BitSet rsbs:

  • nWords: 4
  • words: 1111|1111|1111|1111
  • nonZeroIdx: {0,1,2,3}
  • nNonZero: 4

And the following bitsets:

  • bitset1: 0001|0100|0110|0011
  • bitset2: 1000|1110|0101|1010
  • bitset3: 1110|0001|1001|1110

What is the resulting state of the Reversible Sparse BitSet after the following lines:

sm.saveState();
rsbs.and(bitset2);
rsbs.and(bitset3);
sm.saveState();
rsbs.and(bitset1);
sm.restoreState();
Câu hỏi 8: General Table Constraint

Select all the true statements