Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

A Look at Recurrence Relations

$
0
0
i haven been given this question to solve and i have having truble understanding the problem and that the function f actually does.

III  Calculating  Programs
Suppose that you are part of a team developing an avionics software system. There is a component 
in the system that reads values from the physical environment, transforms those values into natural 
numbers and converts them using a function f defined as:
f(0) =0, f(1) =1, and
f(k+2)  = f(k) +f(k+1) for k≥0 .
According to the system requirements, there are three program variables x, y, and n that need to 
be updated every few seconds maintaining the following system invariant:
(1)       x = f(n)  ∧  y = f(n+1)    .
It is assumed that this invariant should be valid throughout the execution of the system. The 
requirements also specify that the value of the program variable n is initially zero and should be 
incremented by 1 whenever x and y are updated. Now, answer the following questions:
Question 1 (5%) 
What are the values of f(0), f(1), f(2) and f(3) ?   Your answer should make clear how the definition 
of f is used.



any help is appreciated , i dont want the answer just a more in depth explanation of whats going on

thanks dale

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>