  Measurement-based quantum computing (MBQC), an alternate paradigm for
formulating quantum algorithms, can lead to potentially more flexible and
efficient implementations as well as to theoretical insights on the role of
entanglement in a quantum algorithm. Using the graph-theoretical ZX-calculus,
we describe and apply a general scheme for reformulating quantum circuits as
MBQC implementations. After illustrating the method using the two-qubit
Deutsch-Jozsa algorithm, we derive a ZX graph-diagram that encodes a general
MBQC implementation for the three-qubit Deutsch-Jozsa algorithm. This graph
describes an 11-qubit cluster state on which single-qubit measurements are used
to execute the algorithm. Particular sets of choices of the axes for the
measurements can be used to implement any realization of the oracle. In
addition, we derive an equivalent lattice cluster state for the algorithm.
