toy
Guest
Posts: n/a

 11-01-2005
@alf what do you mean?

I understood because I have prior knowledge and familiarity with
Euclid's algorithm..and his explanation was very clear and concise.

Neo
Guest
Posts: n/a

 11-01-2005
"toy" <(E-Mail Removed)> wrote in
news:(E-Mail Removed) ups.com:

>
>
>
>

Euclid's Algo?? Which one.?
Neo

--

Kai-Uwe Bux
Guest
Posts: n/a

 11-01-2005
Alf P. Steinbach wrote:

> * Kai-Uwe Bux:
>>
>> [relevant info, gcd]
>>
>> These ideas should get you started.

>
> Just tell me how you saw what he was trying to do?
>
> Even if it's off-topic.
>

Easy: the following line from the original post gives it away:

I am trying to find integers where 65537i + 3551j = 1

What follows is code that clearly tries a brute force attack to find i and
j. After fixing, the relevant portion looks like so:

for (long i=0; i<65537; i++) {
for (long j=0; j<3511; j++) {
{
x=65337 * i + 3511 * j;
if (x==1) {
cout <<"i: "<< i << " j: "<< j<< endl;
}

}}

Best

Kai-Uwe Bux

makc.the.great@gmail.com
Guest
Posts: n/a

 11-01-2005

Kai-Uwe Bux wrote:
> Alf P. Steinbach wrote:
>
> > * Kai-Uwe Bux:
> >>
> >> [relevant info, gcd]
> >>
> >> These ideas should get you started.

> >
> > Just tell me how you saw what he was trying to do?
> >
> > Even if it's off-topic.
> >

>
> Easy: the following line from the original post gives it away:
>
> I am trying to find integers where 65537i + 3551j = 1
>
> What follows is code that clearly tries a brute force attack to find i and
> j. After fixing, the relevant portion looks like so:
>
> for (long i=0; i<65537; i++) {
> for (long j=0; j<3511; j++) {
> {
> x=65337 * i + 3511 * j;
> if (x==1) {
> cout <<"i: "<< i << " j: "<< j<< endl;
> }
>
> }}
>

Don't you think he should include some negative integers as well, or he
might waste computer resources for nothing.

hint: neither (0,1) nor (1,0) doesn't work, so...

Karl Heinz Buchegger
Guest
Posts: n/a

 11-02-2005
toy wrote:
>
> @alf what do you mean?
>
> I understood because I have prior knowledge and familiarity with
> Euclid's algorithm..and his explanation was very clear and concise.
>

I guess because this looks like a homework assignment in basic
loop handling. And for that, a teacher is not happy with a solution
based on euclids algorithm (probably because a newbie is not able
to write one on his own).

--
Karl Heinz Buchegger
http://www.velocityreviews.com/forums/(E-Mail Removed)

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post RichardOnRails Ruby 3 07-21-2008 01:26 PM Eric_Dexter@msn.com Python 10 08-15-2006 05:00 AM freehomesp@yahoo.com.cn C Programming 1 08-12-2005 06:13 AM jmac@berkeley.edu C Programming 7 07-23-2003 09:51 PM pipi Java 1 07-21-2003 05:02 AM