6 Replies - 2410 Views - Last Post: 29 April 2009 - 05:37 AM

#1 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3089
  • View blog
  • Posts: 19,137
  • Joined: 14-September 07

Modified Fibonacci Sequence

Posted 28 April 2009 - 07:36 PM

edit: bbcode doesn't have sub tags? :\

My understanding is that a fib sequence isn't "modified" unless it is a multiple of the original in some sort (squared, cubed, times an integer etc...).

I'm curious, I'm almost 100% sure I'm right, but teacher/fellow student response is slow, so respond! ;)

In the traditional Fibonacci problem (where a pair of rabbits is born in month 0 and produces one pair of rabbits at 2 months of life and every month thereafter forever) gives the recursive equation

numRabbits at month n: (un) = un-2+un-1

If we changed the problem to say that each rabbit pair now produces 2 pairs of rabbits instead of one the equation becomes:

numRabbits at month n: (un) = 2*un-2+un-1

right? Now, if we run out the numbers, which I wrote in Lua:

--Altered Fibonacci sequence
function fibTwo(number)
	if number <= 1 then
		return 1
	end
	return (2*(fibTwo(number-2))+fibTwo((number-1)))
end

--regular fib sequence
function fib(number)
	if number <= 1 then
		return 1
	end
	return ((fib(number-2))+fib((number-1)))
end


--modified sequence
for i = 0, 10 do
	print(fibTwo(i))
end

--original sequence
for i = 0, 10 do
	print(fib(i))
end




We get a harmonic sequence for our modified equation but because a number divided by the number preceding it does not equal the golden ratio it isn't really a Fibonacci sequence (but a valid sequence none the less?)

If you aren't confused or hate me by this point let me ask: simply multiplying 2 by the original sequence of numbers does not give the correct sequence if the rabbits produce two other pairs of rabbits as opposed to one? I'm sure of that. Here's a visual of the modified sequence:

Attached Image


Thoughts?

This post has been edited by KYA: 28 April 2009 - 07:39 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Modified Fibonacci Sequence

#2 BlakeJustBlake  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 26
  • View blog
  • Posts: 441
  • Joined: 15-February 09

Re: Modified Fibonacci Sequence

Posted 28 April 2009 - 08:07 PM

Simply multiplying 2 by the original sequence won't do that, you're right, because you're not just multiplying 2 by it, you're multiplying 2 by Un-2

What exactly are you getting at here?

This post has been edited by BlakeJustBlake: 28 April 2009 - 08:07 PM

Was This Post Helpful? 0
  • +
  • -

#3 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3089
  • View blog
  • Posts: 19,137
  • Joined: 14-September 07

Re: Modified Fibonacci Sequence

Posted 28 April 2009 - 08:10 PM

Is the new recursive equation considered a fib sequence or merely appears to be one? (i.e. the golden ratio rule...)
Was This Post Helpful? 0
  • +
  • -

#4 BlakeJustBlake  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 26
  • View blog
  • Posts: 441
  • Joined: 15-February 09

Re: Modified Fibonacci Sequence

Posted 28 April 2009 - 09:32 PM

I'd say no, I have no proof against it, but I'm going to go ahead and still say no.
Was This Post Helpful? 1
  • +
  • -

#5 IngeniousHax  Icon User is offline

  • |>|20-514<|{3|2

Reputation: 78
  • View blog
  • Posts: 1,358
  • Joined: 28-March 09

Re: Modified Fibonacci Sequence

Posted 29 April 2009 - 12:38 AM

IDK, maybe it's something like n * (fibonacci code) or maybe you have to use the special number e or log(10).

Here's a wiki on it, maybe you can find something here, there's all kinds of symbols I don't understand.
http://en.wikipedia....ibonacci_number

This post has been edited by IngeniousHax: 29 April 2009 - 12:41 AM

Was This Post Helpful? 0
  • +
  • -

#6 baavgai  Icon User is offline

  • Dreaming Coder
  • member icon

Reputation: 5643
  • View blog
  • Posts: 12,359
  • Joined: 16-October 07

Re: Modified Fibonacci Sequence

Posted 29 April 2009 - 04:41 AM

Fibonacci sequence, as you said, has the identity of "F(n)=F(n-1)+F(n-2)". You could do something funky, like define the starting point as F(0)=4, F(1)=6, instead of 0 and 1, and try to make a case for it. However, chucking in some arbitrary multiple seems to have broken the definition entirely. Also, if you gank the ratio, the series looses a number of other definitions.

The one you're showing is a sequence, but I'd vote no on Fibonacci sequence, modified or otherwise.
Was This Post Helpful? 1
  • +
  • -

#7 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3089
  • View blog
  • Posts: 19,137
  • Joined: 14-September 07

Re: Modified Fibonacci Sequence

Posted 29 April 2009 - 05:37 AM

Thanks guys, that's what I thought. Much appreciated!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1