I'm trying to figure out the solution to the following problem: $4585a+6734b=7$, where $a$ and $b$ are integers. I am familiar with how to calculate the $\gcd$, but how can $a$ and $b$ be directly calculated?
I am revising for an exam and have just realised that the euclidean algorithm questions in past exams are much harder than in homeworks! So i need some help please.  I have a question here, i already have the solution to it but i dont understand it that well, so i would like someone to please explain what is going on ect, and dont worry about avoiding giving me the full solution as i already have it so a full solution would be good!  Here is the question:  Use euclids Algorithm to find $gcd(172,20)$.  Hence solve $172a + 20b = 1000$ giving all solutions in terms of parameter t. List any solutions for which $a,b&gt;0$.  So it wants the answers in terms of parameter t, which is something i am not familiar with and cannot find in my books.   I have the solution in the solutions paper as   $$172= 8\times20+12 $$ $$20=1\times 12 + 8$$ $$12=1 \times 8 +4$$ $$8=2\times 4+0$$  thus $gcd(172,20)=4$  then   $$4= 12-8=12-(20-12)=2\times 12 - 20$$  $$=2\times(172-8\times20)-20$$  $$=2 \times 172 -17 \times20$$   multiplying by 250 we get   $$1000=500 \times 172 -4250 \times 20$$  so one solution is $a=500, b=-4250$  So, I understand everything up until here!!  Now it says,  Generally, $$a=500-t \frac{20}{4}=500-t$$            $$b=-4250+t \frac{172}{4}=-4250+43t$$  To have $a,b&gt;0$, we need $$500-5t&gt;0, (100&gt;t)$$ to have $a&gt;b$ we need $$-4250+43t&gt;0,(t&gt;98.8)$$$  Need $t=99$, $a=5$, $b=7$  Could someone please help explain what is going on in this last bit of working out? I am pretty good at euclidean algorithm usually but havent seen this type before an am panicking  bit as so close to exam! Any help appreciated how to find t and the other positive solutions would be great!  Please could you show me exactly how it is done here as my lecturer is quite strict with us using his exact methods. Many thanks
Determine a user's timezone Is there a standard way for a web server to be able to determine a user's timezone within a web page?   Perhaps from an HTTP header or part of the user-agent string? The idea behind the sum of powers of 2 I know that the sum of power of $2$ is $2^{n+1}-1$, and I know the mathematical induction proof. But does anyone know how $2^{n+1}-1$ comes up in the first place.  For example, sum of n numbers is $\frac{n(n+1)}{2}$. The idea is that we replicate the set and put it in a rectangle, hence we can do the trick. What is the logic behind the sum of power of $2$ formula? Ubuntu in VirtualBox wants to install on every boot I have installed Ubuntu 11.10 using Virtual Box in my Windows XP. I have use Ubuntu 11.10 iso to install it. First time when I installed every thing was fine but when I shutdown the VirtualBox and start Ubuntu again, it asks me to install Ubuntu and try Ubuntu without installing.  Do I need to do some extra settings? How can I determine if it is possible to check luggage during a layover? A common desire among some travelers with long layovers is to leave the airport for a while, and perhaps do some shopping, or even buy goods in the airport.  But this then often necessitates the ability to check additional luggage during the layover, for the remainder of the journey.  There might be other reasons to want to check luggage mid-journey as well.  Are there any general rules one can use to determine whether this is an option in a given airport when traveling with a given airline, and the associated costs (when it is possible)? Hartshorne Theorem 8.17 Reset select value to default How to make a ISO file out of a folder containing Windows setup files I copied the Windows 8 CD to my HDD. I want to convert that folder to an ISO and use that to create a bootable USB.  Please tell me how I can make an ISO image out of that folder containing files.  This is my folder which I want to convert to a ISO file: Number of Homomorphisms from $\Bbb{Z}_m$ to $\Bbb{Z}_n$ This question coutesy of Allan Clark's "Elements of Abstract Algebra" (60$\zeta$).   Find the number of homomorphisms from $\Bbb{Z}_m\to \Bbb{Z}_n$ as a function of $m$ and $n$.  This is stumping me, can anyone help? Beamer text and image on the same slide I ran into the "mysterious"  \pdfendlink ended up in different nesting level than \pdfstartlink   error.  According to , "this happens when hyperref is used under pdftex and a citation splits across a page boundary".  The given solution is to manual fix the citation to not split across the page boundary.  However, this workaround isn't feasible for me, as the documents are automatically generated on a server with no user interaction.  Is there any solution to the problem known, perhaps an experimental hyperref action or a patch to pdftex?  (Probably, one could use luatex to solve the problem, but for other reasons, luatex is not an option in this project.)  MWE:  \documentclass[%draft               ]{article} \usepackage{hyperref} \setlength{\textwidth}{3cm} \setlength{\textheight}{3cm}  \begin{document} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna \href{http://www.tug.org/errors}{aliquyam erat, sed diam voluptua.} \end{document} Why were there 3-7-9 Rings of Power? What was Mr. Anderson (Neo) selling on discs to Choi? Can't plot with gnuplot on my Mac Using Vim I often want to replace a block of code with a block that I just yanked.  But when I delete the block of code that is to be replaced, that block itself goes into the register which erases the block I just yanked. So I've got in the habit of yanking, then inserting, then deleting what I didn't want, but with large blocks of code this gets messy trying to keep the inserted block and the block to delete separate.  So what is the slickest and quickest way to replace text in Vim?   is there a way to delete text without putting it into the register? is there a way to say e.g. "replace next word" or "replace up to next paragraph" or is the best way to somehow use the multi-register feature? How to extract the n-th elements from a list of tuples? Contradiction between law of conservation of energy and law of conservation of momentum? Yesterday, while studying a simple question, a rather strange doubt hit my mind:     Consider a ball of mass $m$ moving with velocity $v$ that collides with a wall in a perfectly elastic collision and rebounds back with the same velocity. Taking the direction of initial motion of the ball as positive, the change in momentum of the ball is $-2mv$ and the wall is clearly at rest.   So, in order to obey the law of conservation of momentum, the wall must gain a momentum of $2mv$.  Now, this itself confused me a lot. I then applied the law of conservation of kinetic energy to this situation, and clearly the magnitudes of the initial and final velocities of the ball are equal, so kinetic energy of the ball is conserved and hence the final kinetic energy of the wall must be zero in order to conserve energy.  Now, this contradicts with the law of conservation of momentum, which says that the wall must gain momentum of $2mv$.  One more point: If we are talking about a wall then it is an important fact, which must be considered, that the wall is fixed on earth and so the mass of the wall is equivalent to that of earth, say $M$. If the law of conservation of momentum is applied now then we get velocity of the wall, say $V=2mv/M$ which is no doubt an extremely small value. But, the law of conservation of energy strictly says that the velocity of the wall must be exactly zero, not even the smallest value is allowed (theoretically speaking).   Please clarify this and correct me anywhere if I'm wrong. I have tried my best to make it clear what I want to ask :). Move Lifejacket and Lifeboat to Answer Badges section in Help Center The new blog post  mentions the new badges  and  are answer badges, but they are listed on the  under Question Badges:    Since you earn these primarily by posting an answer (you're not required to do anything about the question, though editing it will probably help), they definitely belong to the Answer Badges. Is it shell portable to run a command on the same line after variable assignment? How to make text aligned left/center/right in the same line? How do I change which mirror I get updates and software from?