Results 1 to 3 of 3

Math Help - Algorithms

  1. #1
    Junior Member
    Joined
    Jul 2010
    Posts
    55

    Algorithms

    Write the algorithm that puts the first four terms of a list of arbitrary length in increasing order. Show that this algorithm has time complexity 0 (1) in terms of the number of comparisons used.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Oct 2009
    Posts
    5,517
    Thanks
    771
    The forum rules say that it is expected that you will show some effort. Could you write a first draft of the algorithm, say how lists are represented and accessed, or at least tell what exactly your difficulty with this question is?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by ilovemymath View Post
    Write the algorithm that puts the first four terms of a list of arbitrary length in increasing order. Show that this algorithm has time complexity 0 (1) in terms of the number of comparisons used.
    You do realise that this is effectively asking for a sort algorithm for a list of 4 items, don't you?

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Algorithms
    Posted in the Math Software Forum
    Replies: 2
    Last Post: November 4th 2010, 08:25 PM
  2. algorithms
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: March 16th 2010, 02:25 PM
  3. Algorithms
    Posted in the Discrete Math Forum
    Replies: 2
    Last Post: December 17th 2009, 07:11 AM
  4. Algorithms
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: December 4th 2009, 03:06 AM
  5. Algorithms
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: March 4th 2009, 11:33 AM

Search Tags


/mathhelpforum @mathhelpforum