# Deutsch–Jozsa algorithm: why is $f$ constant?

I'm trying to understand how the Deutsch–Jozsa algorithm works with the following circuit:

Circuit in Quirk

Since we have the top 2 wires measuring $$|0\rangle$$ with 100% probability, it means $$U_f$$ is constant. And that's what I'm having trouble understanding...what exactly is constant?

If I isolate $$U_f$$ I get this: Oracle function

I understand the concept of balanced and constant functions, and that an n-bit binary string will have $$2^n$$ mappings, which gives $$2^n$$ possible functions. So how can I see that $$f$$ is constant in the isolated circuit above?

The circuit you gave implements an oracle for a function $$f(x) = 0$$, which is constant.
You can observe that there are no gates leading from the top two wires (inputs $$|x\rangle$$) to the bottom wire (output $$|y\rangle$$). Since the oracle is supposed to transform $$|x\rangle|y\rangle$$ into $$|x\rangle|y \oplus f(x)\rangle$$, and $$|y\rangle$$ always remains unaffected, you can see that $$f(x) = 0$$.