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)