Is there a notation for defining if a function is recursively defined?

113 Views Asked by At

Background: I'm working on a paper on high level synthesis, a method which combines the use of programming with digital circuit design. One of the methods I want to explain is called loop unrolling which makes use of concurrency to speed up execution, by duplicating the processing elements.

Unrolling can only be done on any function iff there is no internal relation between iterations, an example of a function with this property would be vector multiplication. My best guess would be something along the lines of $ g \triangleq \{f \in ?? | \forall n \in \mathbb{N}: f[N] does\ not\ contain\ a\ term\ for\ f[N-n]\}$.

Is there a standard or good notation to describe the set of functions which do not contain a recursive term?

Edit: I originally accepted the answer as I could see that there was a slight mismatch between the question as a whole and the formulation of the question in the final paragraph. The previously accepted answer did answer the question as written, although not as intended. I'll clear it up a bit more, apologies for the mess.

1

There are 1 best solutions below

3
On BEST ANSWER

As far as I know, there is no specific notation.

You might write something like

$$f[N]:=\alpha(\{a,b,c,\cdots\})=\alpha(V)$$

where $\alpha$ denotes the expression (or more generally the algorithm) that evaluates the value to be assigned to $f[N]$, and $V=\{a,b,c,\cdots\}$ is the set of variables that appear explicitly in $\alpha$.

Then the absence of a dependency is expressed by

$$f[N-n]\notin V.$$


On second thoughts, though your notation seems to imply an array, this is unlikely as you say $\forall n$. But then, saying that the value of $f_N$ (at iteration $N$) depends on the value $f_{N-n}$ (at iteration $N-n$) only makes sense if the process has enough memory (variables) to realize such a dependency. This is a much more complicated situation.

An example would be a running sum on, say, three elements,

i= 0
a= b= c= s= 0
while True:
    a= b; b= c; c= K[i]
    i= i + 1
    s= s - a + c