How do I write this circuit (returns 1 if the number of 1s in input is odd, otherwise returns 0) using a MUX?
It is absolutely trivial to implement a 3-input Boolean function using an 8-to-1 mux because, literally, an 8-to-1 mux's function is, given three bits of "select" input, choose one of its eight data inputs. What is a truth table, if not that precise definition, using a mux whose data inputs are degenerately connected to HIGH and LOW values?

Here's a visual that might help, mapping a 2x1 mux schematic symbol to it's truth table.







simulate this circuit &ndash; Schematic created using CircuitLab

But like I said, that is trivial. A more interesting question is, can you do the same thing with a smaller 4-to-1 MUX. Start with the truth table, and for a start consider the first two rows:

b2 b1 b0 v
0  0  0  0
0  0  1  1


When b2=0 and b1=0, v = b0... now map that to the behavior of a 4-to-1 multiplexer where b2 and b1 are your select bits. When b2 = 0 and b1 = 0, then multiplexer input 0 = b0. Carry on that reasoning for the subsequent three pairs of rows and you can implement any three input boolean function using a 4-to-1 mux, but you will, as I commented earlier, need access to an inverter and LOW and HIGH in many cases to pull this off.

A clever trick... you can use a similar reasoning to demonstrate for yourself that a 2x1 mux represents a universal gate, similar to NAND and NOR. The proof is left as an exercise to the reader.