zoukankan      html  css  js  c++  java
  • The Proof of Fibonacci GCD

    [Large ext{The Proof of Fibonacci GCD} ]

    [ ext{By Sangber} ]


    ( ext{Fibonacci Sequence})

    (quad quad ext{If we record sequence} {F_n} ext{as Fibonacci Sequence, then }{F_n} ext{ will have these properties:})

    [F_i = egin{cases}1, & ileq 2 \ F_{i-1} + F_{i-2}, & mathrm{otherwise}end{cases} ]

    (quad quad ext{So we can see that } {F_n} ext{ is like “1,1,2,3,5,8,13,21...”.})


    ( ext{GCD})

    (quad quad ext{“GCD” is the abbreviation of “Greatest Common Divisor”.})
    (quad quad ext{And we often record } (a, b) ext{ as the GCD of } a ext{ and } b.)
    (quad quad ext{For example, } (12, 15) = 3, (48, 36) = 12.)


    ( ext{Two Theorems about GCD})

    ( ext{Euclidean theorem})

    [(a, b) = (b, a mod b), a, b in N_{+} ]

    ( ext{The proof: })

    • ( ext{If } a = b, (a, b) = a = b, ext{we can surely tell that the theorem is established.})
    • ( ext{If } a < b, (b, a mod b) = (b, a) = (a, b), ext{the theorem is established.})
    • ( ext{If } a > b, ext{we can assume that } a = k imes b + r, (k in N_{+}, 0 le r < b), ext{ so } a mod b = r. \ ext{As for } forall d, ext{meeting that } d|a land d|b, d|(a - k imes b), ext{ actually it means } d | r. \ ext{So we can tell that } (a, b) = (b, r), ext{ that is, } (a, b) = (b, a mod b).)

    ( ext{Stein's Algorithm})

    [(a, b) = (a, b - a),b > a ]

    ( ext{The proof:})
    ( ext{Actually, the proof of it is similar to that of Euclidean theorem, you can finish it yourselves.})


    ( ext{One Lemma})

    [(F_n,F_{n - 1})=1, n in N_{+} ]

    ( ext{The Proof}):

    • ( ext{In the case of } n = 1 ext{ and } n = 2, ext{ the lemma is established obviously.})
    • ( ext{In the case of } n ge 2 :)
      ( ext{Obviously:})

    [F_n > F_{n - 1} > F_{n - 2}, F_n = F_{n - 1} + F_{n - 2} ]

    [ herefore F_n mod F_{n - 1} = F_{n - 2} ]

    (quad ext{According to Euclidean theorem and the lemma above:})

    [(F_n,F_{n-1})=(F_{n-1},F_n mod F_{n-1})=(F_{n-1},F_{n-2}) ]

    [ herefore (F_n,F_{n-1})=(F_{n-1},F_{n-2})=(F_{n-2},F_{n-3})= cdots =(F_1,F_2)=1 ]


    ( ext{Fibonacci GCD})

    (quad quad ext{Here is the expression of the Fibonacci GCD:})

    [forall n,m in ext{Z}^{+},(F_n, F_m) = F_{(n, m)} ]


    ( ext{The Proof of Fibonacci GCD})

    ( ext{We assume that } n<m.)
    ( ext{Then we use } F_n ext{ and }F_{n+1} ext{ to express } F_{n + 2},F_{n + 3},F_{n + 4},F_{n + 5}cdots)

    [egin{aligned} & F_{n + 2} = 1 F_n + 1 F_{n + 1} \ & F_{n + 3} = 1 F_n + 2 F_{n + 1} \ & F_{n + 4} = 2 F_n + 3 F_{n + 1} \ & F_{n + 5} = 3 F_n + 5 F_{n + 1} end{aligned} \ cdots cdots ]

    ( ext{We can see that in the expressions above, the coefficients of } F_n ext{ and } F_{n + 1} ext{ meet the properties of the Fibonacci Sequence.})

    [ herefore F_m=F_{m - n - 1} imes F_n + F_{m - n} imes F_{n + 1} ]

    [ herefore (F_n, F_m) = (F_n, F_{m - n - 1} imes F_n + F_{m - n} imes F_{n + 1}) ]

    ( ext{And obviously we can see that :})

    [F_n|F_{m-n-1} imes F_n ]

    [ herefore (F_n,F_m)=(F_n,F_{m-n} imes F_{n+1}) ]

    ( ext{According to the lemma above:})

    [(F_n, F_{n + 1}) = 1 ]

    [ herefore (F_n, F_m) = (F_n, F_{m - n}) ]

    ( ext{All in all:})

    [ ext{If }n<m,(F_n,F_m)=(F_n,F_{m-n}) ]

    ( ext{We can see that }, ext{the change rule of } n ext{ and } m ext{ meet Stein's Algorithm,so we finally discovered that })

    [(F_n,F_m)=F_{(n,m)} ]


    [Large ext{That's all, thanks!} ]

    [Huge Qomega Q ]

  • 相关阅读:
    Examples
    Examples
    Examples
    Examples
    Examples
    Examples
    Examples
    Examples
    Examples
    如何把随机数或者对象添加到ArrayList集合
  • 原文地址:https://www.cnblogs.com/zsbzsb/p/12006583.html
Copyright © 2011-2022 走看看