标题:[求助]Elementary number theory --- gcd
取消只看楼主
HJin
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:401
专家分:0
注 册:2007-6-9
 问题点数:0 回复次数:2 
[求助]Elementary number theory --- gcd
I have two natural numbers M and N, M>N, and gcd(M, N) = 1. I want to find integers x and y such that

x*M + y*N = 1.

Can you give me x and y in terms of M and N; i.e., express x or y as a function of M and N.

Thanks,

HJin


搜索更多相关主题的帖子: theory gcd number Elementary 
2007-06-21 08:42
HJin
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:401
专家分:0
注 册:2007-6-9
得分:0 
gcd = greatest common divisor

For example,

gcd(4,8) = 4;
gcd(5, 16)=1.

I am working on a system which has no Chinese input. Please don\'t blame me for typing English.
2007-06-21 10:52
HJin
Rank: 6Rank: 6
等 级:贵宾
威 望:27
帖 子:401
专家分:0
注 册:2007-6-9
得分:0 
Mathematics theory says that there exist x and y s.t.

x*M + y*N =1 if gcd(M, N)=1.

And I suspect that there are acutually infinitely many solutions for x and y.

You do not need to find all of them. I only want one of them, preferably expressed in terms of M and N.

Thanks.


I am working on a system which has no Chinese input. Please don\'t blame me for typing English.
2007-06-21 14:40



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-149122-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.093377 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved