Visual representation of Euclid's GCF algorithm. desmos.com/calculator/sky…
πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/tgoesh
πŸ“…︎ Apr 21 2021
🚨︎ report
Proof of Euclid's Lemma in Idris - Number Theory Algorithms gist.github.com/alahijani…
πŸ‘︎ 18
πŸ’¬︎
πŸ‘€︎ u/SingingNumber
πŸ“…︎ Jan 26 2021
🚨︎ report
Coding Challenge 161: Estimating Ο€ from Random Numbers with Euclid's Algorithm youtube.com/watch?v=EvS_a…
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/Silvabot2k
πŸ“…︎ Mar 14 2021
🚨︎ report
Euclid algorithm

u_n=2^(n)-1

u_(n+p) = u_n * (u_(p)+1) + u_p

We know that GCD(u_n , u_p) =GCD(u_n , u_(n+p))

Then, we have a and b, a >= b, and r the rest of the a and b euclidean division.

I want to get GCD(u_b , u_r) = GCD(u_a , u_b) and GCD(u_a , u_b) = u_(GCD(a , b))

My teacher said me that we can use the Euclid algorithm.

Can you help me ? I don't know how so that

πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Feb 07 2021
🚨︎ report
Using extended euclid algorithm to solve discrete logarithm problem

I've been tasked with showing how the discreet logarithm problem mis 'easy' on a group of integers modulo 'a' prime 'n' under addition, ie:

Find an x such that x . g == h (mod n)

Not so much as looking for an answer so as to just help understanding this shit because my brains about to fucking explode and I can't go get proper support because my uni is closed. My textbook states it's "easy to solve the additive discreet logarithm problem bla bla using extended gcd" but provides nothing furhter on this. It's legit a full stop.

How does one apply this?
I know the extended gcd(a,b), rather than giving just [gcd(a,b)], gives values [x, y, gcd(a,b)] such that x.a + y.b = gcd(a,b)

How does this help me?
Thanks <3

πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/RagingSerenity
πŸ“…︎ May 23 2020
🚨︎ report
Run-times for Euclid's GCD algorithm
πŸ‘︎ 69
πŸ’¬︎
πŸ‘€︎ u/fresh_account2222
πŸ“…︎ Apr 09 2019
🚨︎ report
Long division method and Euclids division Algorithm are almost same, then why is EDA important?
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/OiBruvYouAusieFam
πŸ“…︎ Mar 15 2020
🚨︎ report
Euclid's algorithm - why is it true that the remainder contains the HCF as well.

I'm in my first year studying for a degree in maths. And as an introduction to number theory my textbook talks about Euclid's algorithm for finding the highest common factor (HCF) of two integers.

I can apply it well enough. Say if I wanted to find the HCF of 50 and 34:

50 = 34 * 1 + 16

34 = 16 * 2 + 2

16 = 2 * 8 + 0

So the HCF of 50 and 34 is 2.

I can see that the point of each stage is to find two integers that are smaller and that also contain the highest common factor of the original integers. But I'm having trouble seeing why the remainder also contains the highest common factor.

For example, in the first step to the above problem:

50 = 34 * 1 + 16

I'm looking for the HCF of 50 and 34, so of course 34 has to contain this highest common factor. But why does 16 also contain the HCF? It just seems to be some arbitary remainder.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/MercyButtercups
πŸ“…︎ Dec 16 2019
🚨︎ report
Proof of Bezout Identity using Euclid Algorithm /r/learnmath/comments/fun…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/promach
πŸ“…︎ Apr 05 2020
🚨︎ report
What happens if we apply the Euclid algorithm to two noninteger real number.

By Euclid algorithm, I refer to the algorithm to output GCD of two integers when they were inputted.

As I give two non-integral floating point number (3.14,3.1415) to my program, a very small number (4.440892098500626e-16) is outputted.

How should I interpret the small number?

πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/markpreston54
πŸ“…︎ Apr 09 2019
🚨︎ report
Recursive implementation of Euclid’s algorithm in Shortcuts!

This is an implementation of Euclid's algorithm! It works as a function you can call with a Dictionary, more on that later.

Download: https://www.icloud.com/shortcuts/5b95e1bbefd340e1bf934786723de821

Run it like this: https://www.icloud.com/shortcuts/b1b26e4cd06943d59f5835e5cbf20b95

This works because the Euclid shortcut receives a dictionary like {a: 100, b: 50}. To get the values we store this dict as a variable, then get each key as a variable. This is a really cool way to use named parameters in shortcuts!

From here, we do the standard logic for Euclid's algorithm:

const gcd = (a, b) =&gt;
{ 
  if (b === 0) { return a; }
  else { return gcd(b, a % b); }
}

Enjoy! I hope this use of parameters shines some light on how powerful these can be!

πŸ‘︎ 11
πŸ’¬︎
πŸ‘€︎ u/ReagentX
πŸ“…︎ Sep 20 2018
🚨︎ report
Euclid's Algorithm | The Joy of Numbers #2 youtube.com/attribution_l…
πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/Swadqq
πŸ“…︎ May 31 2018
🚨︎ report
[Homework sort-of] Trying to implement Euclid's GCD algorithm in python, but it won't quite work.

Alright, so I've implemented it like so, and this doesn't seem to work well enough. Any input that actually incurs recursion just returns "none." Neither me nor my professor can quite pin-point what the issue is. Anyone got some ideas?

πŸ‘︎ 4
πŸ’¬︎
πŸ“…︎ Sep 17 2016
🚨︎ report
Creative Algorithms Podcast (Euclid's Algorithm, Google Algorithms, Paint-Bucket Analogy, etc) all on the 'Math Factory' episode of 'Breaking Math' (See Comments for More Info) soundcloud.com/breakingma…
πŸ‘︎ 12
πŸ’¬︎
πŸ“…︎ Jun 13 2017
🚨︎ report
Euclid's algorithm. Why does it work?

Hello fellow learnmathers.

I'm sitting here this fine Friday evening doing some algebra. I can apply Euclid's algorithm just fine and arrive at the correct answer. But I have one problem. Let's take an example.

Find the greatest common divisor of 1859 and 286:

  • Divide 1859 with 286. It goes 6 times with a remainder of 143.

  • Divide 286 with 143. It goes 2 times with no remainder. Thus the greatest common divisor of 1859 is 143.

It was an easy example with only two steps. But it's not intuitive to me why the greatest common divisor of the starting numbers must also be a divisor of the remainder, even when there are many more steps. I don't see the relationship between the remainder and the starting numbers. Is there a way to explain why it works?

πŸ‘︎ 13
πŸ’¬︎
πŸ‘€︎ u/reallyserious
πŸ“…︎ Oct 25 2013
🚨︎ report
Euclid's algorithm pastebin.com/H1NDp6nr
πŸ‘︎ 26
πŸ’¬︎
πŸ‘€︎ u/Veedrac
πŸ“…︎ Sep 19 2014
🚨︎ report
[Linear Algebra] Using Euclid's Extended Algorithm, find x. Help please.

I'm having trouble understanding my teacher's notes and how to solve for x.

I would really appreciate it if someone show step by step on how to get the answer for these problems:

    1. Solve x with 11x mod 23=1. (Answer = 21)
  1. 47x mod 23 =1. (Answer = 8)
  2. 17x mod 23 = 1. (Answer = 19)
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/1271112
πŸ“…︎ Feb 24 2015
🚨︎ report
Euclid's algorithm backwards

Hey guys, just need help with the last detail here! I'm doing diophantic equations and I'm getting stuck when I face longer sequences.

This is what I'm currently dealing with:

16x+9y=1

16=9+7

9=7+2

7=3*2+1

Then

1= 7 - 3(2) = 7 - 3(9-7) = 7 - 3(9-(16-9))

How and when do I get rid of the 7?

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/KingKong1337
πŸ“…︎ Dec 07 2015
🚨︎ report
[Python] Help replicating Euclid's algorithm for computing GCFs

Hello there r/learnprogramming. I'm new to programming and starting with Python, which I've studied on and off for the past few weeks now. For kicks, I'm trying to make Euclid's algorithm as a Python script (specifically, I'm trying to code the flowchart here.)

The code I've made so far can be found on codepad here. For several different inputs, the script works just fine; however, some (especially those with different numbers of digits, though I don't know if this is significant) has it bringing an error which looks like this:

File "C:\Python27\Scripts\stuff\EuclidMethod.py", line 21, in euclid2
    euclid1(number1, number2)
File "C:\Python27\Scripts\stuff\EuclidMethod.py", line 17, in euclid1
    euclid2(number1, number2)
[the above 4 lines repeat over and over until...]
RuntimeError: maximum recursion depth exceeded

This has me stumped, as I'm not sure of a way to script this without using recursion. If additional documentation is needed to more fully explain the code, I'll be happy to provide it. Thanks in advance!

EDIT: answer found by using a while loop. My gratitude to naxir.

πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/Penisdenapoleon
πŸ“…︎ Nov 26 2011
🚨︎ report
Euclid's Algorithm in Pure Shell Script shiroyasha.github.io/arit…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/shiroyasha23
πŸ“…︎ Mar 06 2015
🚨︎ report
Okay, so I've been struggling with this proof involving the Division Theorem and Euclids Algorithm (kinda).

It's a basic proofs class I'm taking, and so far I've done great. But something about this topic just threw me off. I don't know if there was just a missed connection I failed to make in class or what. I don't feel I get the concepts involved all the way. Anyway, last class we learned the Euclidian algorithm, and the division algorithm. He also pointed out the two corollaries that derive out of that, one of them says there is an integer solution to ax+by =1 if and only if the gcd(a,b) = 1. The other, IF i wrote it down correctly, states that ax + by = n has a solution for every n if and only if gcd(a,b) = 1. He also pointed out that the first corollary was very helpful in this proof...... So far I've tinkered with all of this algebraically. But I just end up with a poo mess when I do. I feel there's a connection I'm failing to make because something wasn't really explained to me well enough. Anyway, I'm not looking for the proof to this, but if you can nudge me in the right direction, or help me understand something better, please do. I'm tearing my hair out over this. Thank you so much.

EDIT: I completely forgot to write out the proof haha. Proposition: If a divides bc AND gcd(a,b) =1, then a divides c.

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/toothfairylies
πŸ“…︎ Sep 19 2014
🚨︎ report
Euclid’s Algorithm: An Analysis blog.adamdklein.com/?p=33…
πŸ‘︎ 25
πŸ’¬︎
πŸ‘€︎ u/gst
πŸ“…︎ Jul 17 2011
🚨︎ report
Euclid's algorithm made easy youtube.com/watch?v=OLW4R…
πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/gmsc
πŸ“…︎ Apr 04 2015
🚨︎ report
Euclid's algorithm backwards

Hey guys, just need help with the last detail here! I'm doing diophantic equations and I'm getting stuck when I face longer sequences.

This is what I'm currently dealing with:

16x+9y=1

16=9+7

9=7+2

7=3*2+1

Then

1= 7 - 3(2) = 7 - 3(9-7) = 7 - 3(9-(16-9))

How and when do I get rid of the 7?

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/KingKong1337
πŸ“…︎ Dec 07 2015
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.