Results 1 to 2 of 2

Thread: "Find y and x such that by + ax = gcd(a,b) in the Gaussian integers"

  1. #1
    Full Member
    Join Date
    Mar 2016
    Posts
    839

    "Find y and x such that by + ax = gcd(a,b) in the Gaussian integers"

    Hi all. I'm having a big brainfart and I can't seem to grasp what I really think is an easy problem. The full text says:

    4) For the following pairs (b, a) find y and x such that by + ax = d where d = GCD(a, b).

    b) (b, a) = (18 - 16i, 7 - 2i) in the ring [tex]\mathbb{Z}[i][/tex]
    I started by dividing

    [tex]\dfrac{18-16i}{7-2i}=\dfrac{158}{53}-\dfrac{76i}{53}[/tex]

    I then rounded each of these values to the nearest Gaussian integer to get 3 - i

    [tex](3-i)(7-2i)=19-13i \implies 18-16i=(3-i)(7-2i)-(1+3i)[/tex]

    That gives me the quotient and remainder to "feed" to the next round of division

    [tex]\dfrac{7-2i}{-1-3i}=\dfrac{-1}{10}+\dfrac{23i}{10}[/tex]

    Rounding these values again gives me 0 + 2i

    [tex](0+2i)(-1-3i)=6-2i \implies 7-2i=(0+2i)(-1-3i)+1[/tex]

    Got another quotient and non-zero remainder, so I go again

    [tex]\dfrac{-1-3i}{1}=1(-1-3i)+0[/tex]

    The remainder is zero, so I stop here. But now I have to build back up, to figure out what x and y are. I tried using the matrix method, but it fell apart:

    [tex]\begin{pmatrix}1&1\\ 1&0\end{pmatrix} \cdot \begin{pmatrix}2i&1\\ 1&0\end{pmatrix} \cdot \begin{pmatrix}3-i&1\\ 1&0\end{pmatrix} \cdot \begin{pmatrix}0\\ 1\end{pmatrix} = \begin{pmatrix}1+2i\\ \:2i\end{pmatrix}[/tex]

    Ought to give me my values for x and y, but it's wrong for some reason.

    [tex](1+2i)(18-16i)+(2i)(7-2i)=54+34i[/tex]

    Instead of giving me the GCD(18-16i, 7-2i) = 1.

    Every step I did matches up nicely with the in-class examples we worked... only the end result is wrong for this problem. The only thing I can maybe think of is that the examples we worked all involved only real numbers. Does this method just not work for complex numbers, or something? Any help or insight would be greatly appreciated.

  2. #2
    New Member
    Join Date
    Nov 2017
    Location
    Brussels, Belgium
    Posts
    15
    Hi ksdhart2,

    I notice that this question has been left unanswered for some time, and I don't know if you are still interested in the answer. Anyway, here it goes.

    I'm not quite familiar with your "matrix method". I will start by explaining how I would solve that using another method, and I will come back later to your method, because the first method can help understanding what is wrong with your approach.

    Iin this method, the total amount of computation is the same as with matrices, but it has the advantage that you can check each line of the computation. If the final answer is wrong, this allows you to locate the error more easily.

    Let [tex]b=18-16i[/tex] and [tex]a=7-2i[/tex]. The idea is to write a series of equations:

    [tex]\displaystyle\qquad by + ax = z[/tex]

    and to combine them until we get an equation with [tex]z=\gcd(b,a)[/tex]. Note that [tex]\gcd(b,a)[/tex] is defined up to a unit ([tex]\pm1[/tex] or [tex]\pm i[/tex]).

    We start with the obvious two equations:

    [tex]\displaystyle\qquad\begin{align*}
    1\cdot b + 0\cdot a &= 18-16i\\
    0\cdot b + 1\cdot a &= 7 - 2i
    \end{align*}
    [/tex]

    Next, we divide [tex]18-16i[/tex] by [tex]7 - 2i[/tex]; the rounded quotient is [tex]3-i[/tex]. We subtract [tex]3-i[/tex] times the second equation from the first, giving:

    [tex]\displaystyle\qquad
    1\cdot b + (-3 + i)\cdot a = -1 - 3i
    [/tex]

    You can then repeat the process (the next quotient is [tex]2i[/tex]) until you get an equation with [tex]z = 0[/tex]. The next to last equation will have [tex]z = \gcd(b,a)[/tex] and will be your answer.

    In fact, it is not necessary to write all the equations in full. You can simply keep a table with all the variables.

    [tex]\displaystyle
    \qquad\begin{array}{c|c|c|c}
    y & x & z & q\\[2pt]
    \hline
    1 & 0 & 18 - 16i & \\
    0 & 1 & 7 - 2i & 3 - i\\
    1 & -3+i & -1 - 3i & 2i\\
    -2i & 3+6i & 1 & -1-3i\\
    7-2i & -(18-16i) & 0 &
    \end{array}
    [/tex]

    The column labeled [tex]q[/tex] contains the rounded quotient of the last two [tex]z[/tex] values. The next to last row contains the answer:

    [tex]\displaystyle\qquad
    (-2i)(18-16i) + (3+6i)(7-2i) = 1
    [/tex]

    As I mentioned before, if the answer is wrong, you can check each line of the table to locate the error.

    As far as your matrix method is concerned, you are apparently building the solution from the bottom up. This means that you should multiply the matrices in the reverse order. Indeed, we have:

    [tex]\displaystyle\qquad
    \begin{pmatrix}3-i & 1\\ 1 & 0\end{pmatrix}
    \begin{pmatrix}2i & 1\\ 1 & 0\end{pmatrix}
    \begin{pmatrix}1 & 1\\ 1 & 0\end{pmatrix}
    \begin{pmatrix}0 \\ 1\end{pmatrix}
    =\begin{pmatrix}3+6i\\2i\end{pmatrix}
    [/tex]

    This gives you the solution, except that one sign is wrong. The explanation is in the last line of the table. You are actually rebuilding the solution from a solution of [tex]by - ax = 0[/tex] instead of [tex]by + ax = 0[/tex]. You should check your course material for the exact definition of the method.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •