Proof of this logarithm exercise

46 Views Asked by At

How can I proof that this function:

$f(x, y) = - y \log(x) - (1 - y) \log(1 - x)$

is the same as this function:

$g(x, y) = - \log(y x + (1 - y) (1 - x))$

being $y = \{0,1\}$ ?

(explanation step by step is needed)

2

There are 2 best solutions below

2
On BEST ANSWER

You can just try $y=0,1$:

$y=0:$ $$f=-\log(1-x)$$ $$g=-\log(1-x)$$

$y=1:$ $$f=-\log(x)$$ $$g=-\log(x)$$

1
On

You need to show $f(x,0) = g(x,0)$ and $f(x,1) = g(x,1)$ because $y = 0$ or $1$. We have $f(x,0) = -\log(1-x) = g(x,0)$, and $f(x,1) = -\log x = g(x,1)$. Thus you are done.