Skip to content

Euclidean proof #603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Trashtalk217
Copy link
Contributor

I thought it may be helpfull to provide a proof with the euclidean algorithm, since it is not directly obvious why the algorithm computes the greatest common divisor.

I don't know how the attribution, but I'll probably just give full credit to James Schloss, to avoid any confusion.

@Gathros Gathros added the Chapter Edit This changes the archive's chapters. (md files are edited.) label May 31, 2019
@june128
Copy link
Member

june128 commented Jun 8, 2019

Regarding the attribution:
If you add this as a comment to this PR (replacing AUTHOR with your name), you can add something like the following to the license section of contents/euclidean_algorithm/euclidean_algorithm.md:

##### Text
The text of this chapter was written by [James Schloss](https://github.com/leios) and is licensed under the [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/legalcode).
+ The proof was written by [YOUR NAME](LINK TO YOUR GITHUB/WEBSITE/WHATEVER) and is licensed under the [Creative Commons Attribution-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-sa/4.0/legalcode).

@june128 june128 requested a review from leios June 8, 2019 21:57
@Trashtalk217
Copy link
Contributor Author

I'd rather just give the rights to James since I don't want my real name in the book (yet) and I feel like writing "written by Trashtalk217" is a bit unprofessional.

@june128
Copy link
Member

june128 commented Jun 9, 2019

I'd rather just give the rights to James since I don't want my real name in the book (yet) and I feel like writing "written by Trashtalk217" is a bit unprofessional.

Fair enough. We can always change it in the future after all :)

@leios
Copy link
Member

leios commented Jun 12, 2019

Thanks for the submission, we should certainly be adding proofs!

Should we provide a common format for proofs in the case that future proofs are added? (For example, should all proofs look like this: http://cheng.staff.shef.ac.uk/proofguide/proofguide.pdf).

I need to look at this proof a bit more rigorously and decide what we need for this section, in particular.

@dovisutu
Copy link
Contributor

dovisutu commented Jun 13, 2019

Yup, there should be a proof format.
like this?

$$
\begin{align}
& \forall a,b \in \mathbb{N}, &  \quad \exists n \implies n & = (a,b) \\
& \therefore                  &                           n & \mid a, \; n \mid b\\
& \therefore                  &                           n & \mid a-b\\
& \therefore                  &                     (a-b,a) & = n
\end{align}
$$

Render

@Trashtalk217
Copy link
Contributor Author

Trashtalk217 commented Jul 12, 2019

Honestly I don't feel comfortable writing easy to read proofs yet. I still think proofs in the algorithm archive are a neat idea, but I don't think I'm qualified to write them. Maybe later.

Maybe just use @dovisutu 's proof, that could work.

@Amaras
Copy link
Member

Amaras commented Oct 23, 2021

@leios, @Trashtalk217 How do we still want to have the proof in the AAA?

@leios
Copy link
Member

leios commented Oct 26, 2021

My issue here is that I suck at proofs. If someone else can look at this and say it is valid and easy to read, I am happy to merge!

Copy link
Member

@Amaras Amaras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at it, I think the proof is a bit too verbose, and it was not that easy to understand.

However, I cannot recommend @dovisutu's proof, since it's way too formal for a non-mathy audience, which is probably our target audience (and also because it sadly doesn't make any sense formally)


Some intuition as to why the Euclidean Algorithm works lies in it's proof. Only a proof for the subtraction method will be given at this point, but the modular version follows the same line of reasoning.

Given two positive integers $$a$$ and $$b$$, they have a greatest common divisor $$d$$. There is always a common divisor, because every number is divisable by 1. Since $$a$$ and $$b$$ is divisable by $$d$$, $$a - b$$ is also divisable by $$d$$ ($$b < a$$). Let's call this value $$c$$. Now we once more have two numbers $$b$$ and $$c$$, which are both divisable by $$d$$. This process can be continued until the values are equal: this is the greatest common divisor $$d$$.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Given two positive integers $$a$$ and $$b$$, they have a greatest common divisor $$d$$. There is always a common divisor, because every number is divisable by 1. Since $$a$$ and $$b$$ is divisable by $$d$$, $$a - b$$ is also divisable by $$d$$ ($$b < a$$). Let's call this value $$c$$. Now we once more have two numbers $$b$$ and $$c$$, which are both divisable by $$d$$. This process can be continued until the values are equal: this is the greatest common divisor $$d$$.
Given two positive integers $$a$$ and $$b$$, they have a greatest common divisor $$d$$. There is always a common divisor, because every number is divisible by 1. Since $$a$$ and $$b$$ are divisible by $$d$$, $$a - b$$ is also divisible by $$d$$ ($$b < a$$). Let's call this value $$c$$. Now we once more have two numbers $$b$$ and $$c$$, which are both divisible by $$d$$. This process can be continued until the values are equal: this is the greatest common divisor $$d$$.

Also, what happens with the edge case b=0, since you haven't talked about it, and it's not been discussed in the chapter yet?

@@ -166,6 +166,12 @@ Here's a video on the Euclidean algorithm:
<iframe width="560" height="315" src="https://www.youtube.com/embed/h86RzlyHfUE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>

## Proof

Some intuition as to why the Euclidean Algorithm works lies in it's proof. Only a proof for the subtraction method will be given at this point, but the modular version follows the same line of reasoning.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Some intuition as to why the Euclidean Algorithm works lies in it's proof. Only a proof for the subtraction method will be given at this point, but the modular version follows the same line of reasoning.
Some intuition as to why the Euclidean Algorithm works lies in its proof. Only a proof for the subtraction method will be given at this point, but the modular version follows the same line of reasoning.

@dovisutu
Copy link
Contributor

dovisutu commented Nov 6, 2021

Yeah, it feels strange even when I am reading it, and that's written long ago...
I don't think I'd rewrite this though, for I really can't get the time to do so.
So maybe someone can write a more viable version than mine. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chapter Edit This changes the archive's chapters. (md files are edited.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants