Re: c language




"Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:xn0eijrlfobzhs6000@xxxxxxxxxxxxxxxxxxxx
Josh Sebastian wrote:


Nobody posted a solution that uses the more interesting algorithms for
computing the sequence, so I thought I'd post what I wrote one day
long ago when I decided to do it as fast as I possibly could.

I'm curious, is there an applicatin for very fast computation of
fibonacci sequences ? (Other than intellectual satisfaction, that is).

http://en.wikipedia.org/wiki/Fibonacci_sequence

<quote>
this sequence was described by the Indian mathematicians Gopala and Hemachandra in 1150, who were investigating the possible ways of exactly bin packing items of length 1 and 2. In the West, it was first studied by Leonardo of Pisa, who was also known as Fibonacci (c. 1200), to describe the growth of an idealised (although biologically unrealistic) rabbit population.
[...]
Fibonacci is also stated as having described the sequence "encoded in the ancestry of a male bee." This turns out to be the Fibonacci sequence. One can derive this truth by taking the following facts:

* If an egg is laid by a single female, it hatches a male.
* If, however, the egg is fertilized by a male, it hatches a female.
* Thus, a male bee will always have one parent, and a female bee will have two.
[...]
The Fibonacci numbers are important in the run-time analysis of Euclid's algorithm to determine the greatest common divisor of two integers.

Yuri Matiyasevich was able to show that the Fibonacci numbers can be defined by a Diophantine equation, which led to his original solution of Hilbert's tenth problem.

The Fibonacci numbers occur in a formula about the diagonals of Pascal's triangle (see binomial coefficient).

Every positive integer can be written in a unique way as the sum of one or more distinct Fibonacci numbers in such a way that the sum does not include any two consecutive Fibonacci numbers. This is known as Zeckendorf's theorem, and a sum of Fibonacci numbers that satisfies these conditions is called a Zeckendorf representation.

Fibonacci numbers are also used by some pseudorandom number generators.

In music Fibonacci numbers are sometimes used to determine tunings, and, as in visual art, to determine the length or size of content or formal elements. Examples include Béla Bartók's Music for Strings, Percussion, and Celesta. In addition, the syllables of the lyrics of parts of the Tool song Lateralus follow the Fibonacci sequence in each line, for instance "Black/Then/White are/All I see/In my infancy/Red and yellow then came to be".

Since the conversion factor 1.609 for miles to kilometers is close to the golden mean φ, the decomposition of distance in miles into a sum of Fibonacci numbers becomes nearly the kilometer sum when the Fibonacci numbers are replaced by their successors. This method amounts to a radix 2 number register in base φ being shifted. To go from kilometers to miles shift the register down the Fibonacci sequence instead.

Fibonacci sequences have been noted to appear in biological settings, such as the branching patterns of leaves in grasses and flowers, branching in bushes and trees, the arrangement of tines on a pine cone, seeds on a raspberry, spiral patterns in horns and shells. The scales on the surface of a pineapple are arranged in two interlocking spirals, eight spirals in one direction, thirteen in the other; each being a Fibonacci number. Przemyslaw Prusinkiewicz has advanced the idea that these can be in part understood as the expression of certain algebraic constraints on free groups, specifically as certain Lindenmayer grammars. Generally one sees Fibonacci numbers arise in the study of the fractal Fuchsian groups and Kleinian groups, and systems that possess such symmetries. For example, the solutions to reaction-diffusion differential equations (such as that seen in the Belousov-Zhabotinsky reaction) can show such a patterning; in biology, genes often express themselves through gene regulatory networks, that is, in terms of several enzymes controlling a reaction, which can be modelled with reaction-diffusion equations. Such systems rarely give the Fibonacci sequence exactly or directly; rather, the relationship occurs deeper in the theory. Similar patterns also occur in non-biological systems, such as in sphere packing models.
</quote>

- Oliver

.



Relevant Pages

  • Re: Whats with this sequence?
    ... number and the corresponding Fibonacci number. ... Starting with the first triangle number and the first ... Gives this resulting sequence -- ... difference table is all zeroes from its 3rd row onward. ...
    (sci.math)
  • ++var VS var++
    ... that ++var is faster than var++ as it just adds one and returns the value, ... The above code generates 17 seconds if the compiler is using optimising and ... As I previously said, I was experimenting with the fibonacci sequence, so I ...
    (alt.comp.lang.learn.c-cpp)
  • Re: 1/89 and the Fibonacci sequence-
    ... You will see the Fibonacci numbers being generated when you develop the power series, and you will see them to fall into place when you multiply out the identity ... All power series developments of reciprocals of polynomials yield recurrent relations for the coefficients. ... >>Then adding the Fibonacci sequence in this manner -- ... >>Will this continue repeating the period of 1/89>no matter how many fibonacci numbers are added>in this manner? ...
    (sci.math)
  • Re: Fibonacci program
    ... spartacus wrote: ... i have to program a cobol program where the prompt lists the fibonacci ... number sequence with a maximum of 9 digits. ... So you are a newbie at school and your prof/teacher throws a zinger at you and you really don't know which way is up - 'Fibonacci', 'Compute', 'On Size Error' ..... ...
    (comp.lang.cobol)
  • Re: Whats with this sequence?
    ... number and the corresponding Fibonacci number. ... Gives this resulting sequence -- ... The 3rd deltas are the ... are the (deltas of triangles) minus. ...
    (sci.math)