Ask Your Question
0

Will "solve_right" return integer solutions if one exists?

asked 2016-02-03 20:08:49 +0100

done_with_fish gravatar image

If A is an integer matrix and b is an integer vector, then will the command A.solve_right(b) return an integer vector if the equation Ax=b is solvable over the integers?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-02-03 22:09:04 +0100

vdelecroix gravatar image

The answer is no

sage: A = matrix(2,3, [3,4,1,5,9,2])
sage: A.solve_right(vector((1,2)))
(1/7, 1/7, 0)
sage: A * vector((0,0,1))
(1, 2)
edit flag offensive delete link more

Comments

There is the natural question of how to get integer solutions in an efficient manner... but presumably one could create arbitrarily annoying matrices where that would not be so easy to do programmatically?

kcrisman gravatar imagekcrisman ( 2016-02-04 14:50:07 +0100 )edit

It is not so hard either ;-) Just some arithmetic with Z-modules.

vdelecroix gravatar imagevdelecroix ( 2016-02-04 16:28:39 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-02-03 20:08:49 +0100

Seen: 865 times

Last updated: Feb 03 '16