I guess i figured out the solution.
i got it from careful observation of mux table. for a and b = 0/1 the output of mux is a.b i.e carry output of half adder.
for other values of a and b the output is (a xnor b). So i think if we take half adder
the input to xor gate are b and s and then...
Truth table of mux: a is selected when s = 0 and b is selected when s =1
so the eqn is (b.s)+(a.sbar)
a b s o/p
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
For half adder the equation is sum = a^b and carry = a.b
truth table...