Results 1 to 5 of 5

Math Help - Recursion

  1. #1
    Newbie
    Joined
    Sep 2008
    Posts
    6

    Recursion

    I am using the textbook Mathematical Structures for Computer Science - A Modern Approach to Discrete Mathematics (6e) by Judith L. Gersting.

    I don't understand what is going on at all in any of the section 2.4s examples. If someone could explain how the book arrives at the following answers for these questions, I would be very appreciative.

    Write the first five values in the sequence
    :
    1. S(1) = 10
    S(n) = S(n-1) + 10 for n >= 2

    The books answer is: 10, 20, 30, 40, 50

    7. M(1) = 2
    M(2) = 2
    M(n) = 2M(n - 1) + M(n - 2) for n >= 2

    The books answer is: 2, 2, 6, 14, 34
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Aug 2007
    From
    USA
    Posts
    3,110
    Thanks
    2
    S(1) is the first term of the sequence
    S(2) is the second term of the sequence
    S(3) is the third term of the sequence

    S(27) is the 27th term of the sequence

    S(n) is just some term of the sequence
    S(n-1) is the term just prior to "just some term of the sequence"
    S(n-2) is the term TWO prior to "just some term of the sequence"

    Fir the first example

    S(n) = S(n-1) + 10

    S(1) = 10
    S(2) = S(1) + 10 = 10+10 = 20
    S(3) = S(2) + 10 = 20+10 = 30

    You show the second example.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Sep 2008
    Posts
    6
    I understand what you did for #1, but I don't see how it could relate to #7. It seems odd that the first and second number in the sequence are the same.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Sep 2008
    Posts
    6
    M(n) = 2M(n - 1) + M(n - 2) for n >= 2

    M(1) = 2
    M(2) = 2
    M(3) = M(2)*2 + M(1) = (2 * 2) + 2 = 6
    M(4) = M(3)*2 + M(2) = (2 * 6) + 2 = 14
    M(5) = M(4)*2 + M(3) = (2 * 14) + 6 = 34


    I think that's the correct way to do it. Am i right?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Rhymes with Orange Chris L T521's Avatar
    Joined
    May 2008
    From
    Chicago, IL
    Posts
    2,844
    Thanks
    3
    Quote Originally Posted by meditate View Post
    M(n) = 2M(n - 1) + M(n - 2) for n >= 2

    M(1) = 2
    M(2) = 2
    M(3) = M(2)*2 + M(1) = (2 * 2) + 2 = 6
    M(4) = M(3)*2 + M(2) = (2 * 6) + 2 = 14
    M(5) = M(4)*2 + M(3) = (2 * 14) + 6 = 34


    I think that's the correct way to do it. Am i right?
    Yes!

    --Chris
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Recursion help.
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: March 28th 2010, 02:23 PM
  2. recursion
    Posted in the Discrete Math Forum
    Replies: 3
    Last Post: December 13th 2009, 07:00 AM
  3. Recursion Depth
    Posted in the Algebra Forum
    Replies: 0
    Last Post: October 27th 2009, 11:01 AM
  4. transfinite recursion
    Posted in the Discrete Math Forum
    Replies: 0
    Last Post: October 25th 2009, 07:57 PM
  5. Recursion
    Posted in the Discrete Math Forum
    Replies: 1
    Last Post: September 16th 2008, 06:24 PM

Search Tags


/mathhelpforum @mathhelpforum