Homework Help: Given this modification to Euclid's algorithm, prove [...]

1. Dec 2, 2017

s3a

1. The problem statement, all variables and given/known data
PROBLEM STATEMENT:
http://dpaste.com/0GN9MQ2

BOOK'S SOLUTION:
http://dpaste.com/0ZQ0YQM

2. Relevant equations
1. m ⋅ u + n ⋅ v = 2ab
2. GCD(a,b) ⋅ LCM(a,b) = ab
3. z = 2 * LCM(a,b)
4. z ?=? (m ⋅ u + n ⋅ v) / GCD(a,b)
3. The attempt at a solution
How does the author go from m ⋅ u + n ⋅ v = 2ab and GCD(a,b) ⋅ LCM(a,b) = ab to z = 2 * LCM(a,b)?

All I can think of is (m ⋅ u + n ⋅ v)/2 = GCD(a,b) ⋅ LCM(a,b) ⇒ (m ⋅ u + n ⋅ v) / GCD(a,b) = 2 ⋅ LCM(a,b). Is z = (m ⋅ u + n ⋅ v) / GCD(a,b)? If so, could someone please elaborate on the book's solution for that part? I don't see how one would go from it either being the case that z = u or that z = v (from the Pascal-style pseudo-code) to it being the case that z = (m ⋅ u + n ⋅ v) / GCD(a,b). Otherwise, if I'm completely off, could someone please just generally clarify how to solve this problem?

I would GREATLY appreciate it if someone could help me fully understand the solution to this problem!

P.S.
Also, what's the significance of all this? In other words, in addition to the solving of the problem itself, what's the big-picture takeaway from all this? Like, in simple terms, what was E. Dijkstra's motivation for doing this?

2. Dec 7, 2017

PF_Help_Bot

Thanks for the thread! This is an automated courtesy bump. Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post? The more details the better.