Re: [sage-support] Chinese Remainder Theorem

2011-09-23 Thread Santanu Sarkar
Thank you.

On 23 September 2011 10:38, D. S. McNeil dsm...@gmail.com wrote:

 On Fri, Sep 23, 2011 at 12:39 AM, Santanu Sarkar
 sarkar.santanu@gmail.com wrote:
  I want to find integer such that
  x= 1 mod 3
  x=2  mod 5
  x=3  mod 7
  like this system of congruences using Chinese Remainder Theorem.
  In Sage, crt() function takes only 4 argument.

 sage: help(CRT)

 crt(a, b, m=None, n=None)
Returns a solution to a Chinese Remainder Theorem problem.

INPUT:

- ``a``, ``b`` - two residues (elements of some ring for which
  extended gcd is available), or two lists, one of residues and
  one of moduli.
 [...]

If ``a`` and ``b`` are lists, returns a simultaneous solution to
the congruences `x\equiv a_i\pmod{b_i}`, if one exists.

.. SEEALSO::

- :func:`CRT_list`


 sage: CRT([1,2,3],[3,5,7])
 52
 sage: x = CRT([1,2,3],[3,5,7])
 sage: x % 3, x % 5, x % 7
 (1, 2, 3)


 Doug

 --
 To post to this group, send email to sage-support@googlegroups.com
 To unsubscribe from this group, send email to
 sage-support+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/sage-support
 URL: http://www.sagemath.org


-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Chinese Remainder Theorem

2011-09-22 Thread Santanu Sarkar
I want to find integer such that
x= 1 mod 3
x=2  mod 5
x=3  mod 7
like this system of congruences using Chinese Remainder Theorem.
In Sage, crt() function takes only 4 argument.

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Chinese Remainder Theorem

2011-09-22 Thread D. S. McNeil
On Fri, Sep 23, 2011 at 12:39 AM, Santanu Sarkar
sarkar.santanu@gmail.com wrote:
 I want to find integer such that
 x= 1 mod 3
 x=2  mod 5
 x=3  mod 7
 like this system of congruences using Chinese Remainder Theorem.
 In Sage, crt() function takes only 4 argument.

sage: help(CRT)

crt(a, b, m=None, n=None)
Returns a solution to a Chinese Remainder Theorem problem.

INPUT:

- ``a``, ``b`` - two residues (elements of some ring for which
  extended gcd is available), or two lists, one of residues and
  one of moduli.
[...]

If ``a`` and ``b`` are lists, returns a simultaneous solution to
the congruences `x\equiv a_i\pmod{b_i}`, if one exists.

.. SEEALSO::

- :func:`CRT_list`


sage: CRT([1,2,3],[3,5,7])
52
sage: x = CRT([1,2,3],[3,5,7])
sage: x % 3, x % 5, x % 7
(1, 2, 3)


Doug

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] Chinese Remainder Theorem

2011-05-15 Thread Santanu Sarkar
I want  to find x using Chinese Remainder Theorem such that

x=a_1 mod b_1
x=a_2 mod  b_2
x=a_3 mod b_3
x=a_4 mod b_4

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: [sage-support] Chinese Remainder Theorem

2011-05-15 Thread Justin C. Walker

On May 15, 2011, at 22:30 , Santanu Sarkar wrote:

 I want  to find x using Chinese Remainder Theorem such that
 
 x=a_1 mod b_1
 x=a_2 mod  b_2
 x=a_3 mod b_3
 x=a_4 mod b_4

Try

sage: CRT?

HTH

Justin

--
Justin C. Walker, Curmudgeon-at-Large
() The ASCII Ribbon Campaign
/\ Help Cure HTML Email



-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org