HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to show that f(x) is primitive recursive?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
showprimitiverecursivethathow

Problem

Let


$$f(x)=\begin{cases} x \quad \text{if Goldbach's conjecture is true
}\\ 0 \quad \text{otherwise}\end{cases}$$


Show that f(x) is primitive recursive.

I know a primitive recursive function is obtained by composition or recursion, but I don't know what should I do about this problem.

Solution

Goldbach's conjecture is either true or false. Do a case analysis on the two possibilities. In one case, $f(x)=x$, which is primitive recursive. In the other case, $f(x)=0$, which is also primitive recursive. Therefore $f$ is primitive recursive.

Context

StackExchange Computer Science Q#6122, answer score: 7

Revisions (0)

No revisions yet.