Results 1 to 4 of 4

Math Help - Recursion or typo?

  1. #1
    Newbie
    Joined
    Jun 2012
    From
    Canada
    Posts
    2

    Recursion or typo?

    Hi there, new user here. would appreciate it alot if someone can help me out with this problem.

    I am looking at the solution and I cannot seem to figure out how they are going line by line.

    imgur: the simple image sharer

    see above, can someone please explain how they went from

    rec(n) = rec(n-1) + 2
    rec(n-1) = (rec(n - 2) + 2) + 2 = rec(n - 2) + 2 X 2 <--- how is it times 2?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor Reckoner's Avatar
    Joined
    May 2008
    From
    Baltimore, MD (USA)
    Posts
    1,024
    Thanks
    75
    Awards
    1

    Re: Recursion or typo?

    Quote Originally Posted by warpstar View Post
    rec(n) = rec(n-1) + 2
    rec(n-1) = (rec(n - 2) + 2) + 2 = rec(n - 2) + 2 X 2 <--- how is it times 2?
    Well, you've made a typo in your post. That second line should be \mathrm{rec}(n), not \mathrm{rec}(n-1). I don't see anything wrong with the text in the image however.

    To answer your question, you should know that 2 + 2 = 2\cdot2 and that 2 + 2\cdot2 = 2 + 2 + 2 = 3\cdot2. You're adding an extra 2 each time.

    In general, a + a = 2a and \overbrace{a+a+a+a+\cdots+a}^{n\ \mathrm{terms}} = na. This is simple arithmetic.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2012
    From
    Canada
    Posts
    2

    Re: Recursion or typo?

    Thanks, I feel like an idiot.

    But can you explain what they did on line two? I thought line 2 was rec(n-1) since they were using recursion and inputing n-1 into the previous eq. ?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor Reckoner's Avatar
    Joined
    May 2008
    From
    Baltimore, MD (USA)
    Posts
    1,024
    Thanks
    75
    Awards
    1

    Re: Recursion or typo?

    Quote Originally Posted by warpstar View Post
    Thanks, I feel like an idiot.

    But can you explain what they did on line two? I thought line 2 was rec(n-1) since they were using recursion and inputing n-1 into the previous eq. ?
    They substituted \mathrm{rec}(n-1)=\mathrm{rec}(n-2)+2. So we have

    \mathrm{rec}(n) = \mathrm{rec}(n-1)+2 = \left(\mathrm{rec}(n-2)+2\right)+2

    =\left(\left(\mathrm{rec}(n-3)+2\right)+2\right)+2

    and so on.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Calculating average rate is this a typo ?
    Posted in the Math Topics Forum
    Replies: 3
    Last Post: June 7th 2012, 08:54 AM
  2. Replies: 5
    Last Post: May 27th 2012, 01:33 PM
  3. Wondering if this is a typo?
    Posted in the Number Theory Forum
    Replies: 1
    Last Post: April 30th 2009, 01:01 PM
  4. HW typo--
    Posted in the Calculus Forum
    Replies: 3
    Last Post: March 22nd 2006, 09:35 AM

Search Tags


/mathhelpforum @mathhelpforum