NLP for CP
Addressing Constraint Programming with Natural Language Processing
Home
Resources
Publications
Correct
predictions are in
blue
. If we detect only a subset of a labelled sentence, we highlight the caught part as
blue
, the missing part
light blue.
False positives
are in
green
and
false negatives
are in
red
.
Problem 024 (Langford's number problem) — Constraint detection
Consider
two
sets
of
the
numbers
from
1
to
4
.
The
problem
is
to
arrange
the
eight
numbers
in
the
two
sets
into
a
single
sequence
in
which
the
two
1
``
s
appear
one
number
apart
,
the
two
2
``
s
appear
two
numbers
apart
,
the
two
3
``
s
appear
three
numbers
apart
,
and
the
two
4
``
s
appear
four
numbers
apart
.
The
problem
generalizes
to
the
L
-LRB-
k
,
n
-RRB-
problem
,
which
is
to
arrange
k
sets
of
numbers
1
to
n
,
so
that
each
appearance
of
the
number
m
is
m
numbers
on
from
the
last
.
For
example
,
the
L
-LRB-
3,9
-RRB-
problem
is
to
arrange
3
sets
of
the
numbers
1
to
9
so
that
the
first
two
1
``
s
and
the
second
two
1
``
s
appear
one
number
apart
,
the
first
two
2
``
s
and
the
second
two
2
``
s
appear
two
numbers
apart
,
etc.
.
Problem 024 (Langford's number problem) — Detection of the decisions and objects to be modeled
Consider
two
sets
of
the
numbers
from
1
to
4
.
The
problem
is
to
arrange
the
eight
numbers
in
the
two
sets
into
a
single
sequence
in
which
the
two
1
``
s
appear
one
number
apart
,
the
two
2
``
s
appear
two
numbers
apart
,
the
two
3
``
s
appear
three
numbers
apart
,
and
the
two
4
``
s
appear
four
numbers
apart
.
The
problem
generalizes
to
the
L
-LRB-
k
,
n
-RRB-
problem
,
which
is
to
arrange
k
sets
of
numbers
1
to
n
,
so
that
each
appearance
of
the
number
m
is
m
numbers
on
from
the
last
.
For
example
,
the
L
-LRB-
3,9
-RRB-
problem
is
to
arrange
3
sets
of
the
numbers
1
to
9
so
that
the
first
two
1
``
s
and
the
second
two
1
``
s
appear
one
number
apart
,
the
first
two
2
``
s
and
the
second
two
2
``
s
appear
two
numbers
apart
,
etc.
.
Back to list