Results 1 to 4 of 4
Like Tree1Thanks
  • 1 Post By SlipEternal

Math Help - Euclidean algorithm: the number gets smaller with complexity log(k)

  1. #1
    Junior Member
    Joined
    Oct 2012
    From
    Bonn
    Posts
    47
    Thanks
    1

    Euclidean algorithm: the number gets smaller with complexity log(k)

    Hi there

    Given the exercise

    Let 1 \le d \in \mathbb{N} , k=f*d+h , h<f.

    Firstly show that the variable h has (with respect to basis 2) less digits than k. Then conclude that the euclidean algorithm is (ends) in polynomial time in log_2(k).


    I don't find a meaningful beginning. I can write k=k_{d_k} k_{d_k-1} ... k_1 k_0 \text{ while } k_i \in \{0,1\} \forall i as a representation of k in the dual System. Then

    k=k_{d_k} k_{d_k-1} ... k_1 k_0 = \underbrace{f_{d_f} ... f_0}_{=f} * \underbrace{d_{d_d} ... d_0}_{=d} + \underbrace{h_{d_h} ... h_0}_{=h}

    Ok that far. Now what is here the idea? I don't see a track honestly ...

    Regards
    Last edited by huberscher; October 31st 2013 at 12:12 PM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Nov 2010
    Posts
    1,857
    Thanks
    720

    Re: Euclidean algorithm: the number gets smaller with complexity log(k)

    Edit:

    Do you also have 0\le h < f?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Oct 2012
    From
    Bonn
    Posts
    47
    Thanks
    1

    Re: Euclidean algorithm: the number gets smaller with complexity log(k)

    Well it's not written on the exercise sheet but I think we can assume that all those numbers are non-negative integers...
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Nov 2010
    Posts
    1,857
    Thanks
    720

    Re: Euclidean algorithm: the number gets smaller with complexity log(k)

    You have h < f = \dfrac{k-h}{d}. So, h(d+1) < k. This implies that h < \dfrac{k}{d+1} \le \dfrac{k}{1+1} = \dfrac{k}{2}. If k has n digits, then k < 2^n. So, since h < \dfrac{k}{2}, it must be that h < \dfrac{k}{2} < 2^{n-1}, implying h has at most n-1 digits.
    Thanks from huberscher
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Division Algorithm or Euclidean Algorithm
    Posted in the Discrete Math Forum
    Replies: 6
    Last Post: April 10th 2013, 01:10 PM
  2. complexity of this algorithm in my program
    Posted in the Math Software Forum
    Replies: 1
    Last Post: September 3rd 2009, 01:36 PM
  3. Matlab - Determining the complexity of an algorithm
    Posted in the Math Software Forum
    Replies: 5
    Last Post: March 19th 2009, 03:25 AM
  4. Complexity of Algorithm
    Posted in the Discrete Math Forum
    Replies: 9
    Last Post: June 21st 2008, 10:13 AM
  5. Complexity of Prime Algorithm
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: September 3rd 2006, 01:09 PM

Search Tags


/mathhelpforum @mathhelpforum