Results 1 to 3 of 3

Math Help - Algorithm and Integers problem

  1. #1
    Banned
    Joined
    Sep 2008
    Posts
    21

    Exclamation Algorithm and Integers problem

    hello ppl. please help me solve these two questions. i need them ASAP please. i also need to know, how do u calculate them, specially the second one (No 4)
    Thank you for helping me
    Attached Thumbnails Attached Thumbnails Algorithm and Integers problem-8-2-.jpg   Algorithm and Integers problem-4.jpg  
    Follow Math Help Forum on Facebook and Google+

  2. #2
    is up to his old tricks again! Jhevon's Avatar
    Joined
    Feb 2007
    From
    New York, USA
    Posts
    11,663
    Thanks
    3
    Quote Originally Posted by narbe View Post
    hello ppl. please help me solve these two questions. i need them ASAP please. i also need to know, how do u calculate them, specially the second one (No 4)
    Thank you for helping me
    for (4)

    do you realize that by successive squaring you are multiplying the power of x by 2 each time, while if you take the approach of multiplying x by itself, you are adding 1 to the power each time? in the first approach, how many time would you have to square then? will it be faster than adding 1 each time?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Sep 2008
    From
    Edmonton
    Posts
    67
    for the first question

    linear
    go to the first element, it is not 7, keep going, second element, not 7, keep going... until you reach an element larger than 7, then you know 7 is not in this sequence (since it is sorted)

    binary
    go to the middle element, it is smaller then seven, so use the right subset
    go to the middle of this subset, it is larger than 7 so use the left subset of this
    and so on, i think you get what i'm saying
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. An algorithm problem .. Big Oh
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: February 19th 2011, 09:21 PM
  2. Replies: 7
    Last Post: August 3rd 2010, 02:31 PM
  3. Matrix of integers whose inverse is full of integers
    Posted in the Advanced Algebra Forum
    Replies: 2
    Last Post: March 19th 2010, 03:02 PM
  4. Replies: 4
    Last Post: February 24th 2008, 04:08 PM
  5. Nth term for integers resulting from an algorithm...
    Posted in the Discrete Math Forum
    Replies: 4
    Last Post: January 17th 2007, 05:24 AM

Search Tags


/mathhelpforum @mathhelpforum