-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
base: main
Are you sure you want to change the base?
Euclidean proof #603
Conversation
Regarding the attribution: ##### 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). |
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 :) |
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. |
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. |
@leios, @Trashtalk217 How do we still want to have the proof in the AAA? |
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! |
There was a problem hiding this 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$$. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Yeah, it feels strange even when I am reading it, and that's written long ago... |
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.