-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
If we try to find first 9 tuples of {b,q,r} that satisfies 68 = b*q + r, we get this result:
doctest:
iex> use Ckini
iex> [b, q, r] = Var.new_many(3)
iex> run(9, {b, q, r}, [logo(from_number(68), b, q, r), gt1o(q)])
[]
code: run(9, {b, q, r}, [logo(from_number(68), b, q, r), gt1o(q)]) === []
left: [
{[1], [:_0, :_1 | :_2], [1, 1, 0, 0, 0, 0, 1]},
{[], [:_0, :_1 | :_2], [0, 0, 1, 0, 0, 0, 1]},
{[0, 1], [0, 1, 1], [0, 0, 1]},
{[0, 0, 1], [1, 1], [0, 0, 1]},
{[1, 0, 1], [0, 1], [1, 1, 0, 1, 0, 1]},
{[0, 1, 1], [0, 1], [0, 0, 0, 0, 0, 1]},
{[1, 1, 1], [0, 1], [1, 1, 0, 0, 1]}
]
right: []
(Finished in 590.2 seconds)
The answers given is not wrong, but incomplete. This example is extracted from from the book (pg. 55):
The book show the correct 9 results.
Metadata
Metadata
Assignees
Labels
No labels