## A tricky mutual information inequality

Let $$X_0, X_1, X_2$$ be three independently distributed bits, let $$B$$ be a random variable such that $$I(X_0:B)=0$$, $$I(X_1:B)=0$$, and $$I(X_2:B)=0$$, I need to prove that $$I(X_0, X_1, X_2:B)\leq 1$$

(where $$I(M:N)$$ is Shannon’s mutual information).

I can demonstrate that $$I(X_0, X_1, X_2:B)\leq 2$$, by using chain rule of mutual information $$I(X_0, X_1, X_2 : B)= I(X_0:B)+I(X_1,X_2:B|X_0) = H(X_1,X_2|X_0) – H(X_1,X_2|B,X_0) = 2 – H(X_1,X_2|B,X_0) \leq 2$$.

(where $$H(.)$$ is Shannon’s binary entropy).

But I am unable to go further, please help.

## tricky question

A man lives on the 100th floor of an apartment building. On rainy days he rides the elevator all the way up. However, on sunny days, he goes half way and takes the stairs the rest of the way. Why?
Guess What ?

## tricky question

In a one-story pink house, there was a pink person, a pink cat, a pink fish, a pink computer, a pink chair, a pink table, a pink telephone, a pink shower– everything was pink!
What color were the stairs?
Guess What ??

## Finding minimum and maximum distance from a tricky curve equation to a given point without Lagrange multipliers.

For the given curve function given as the quadratic equation:

$$g(x,y)=x^2+4x-y^2-4y-8=0;$$

and $$P=(8,6) \in \mathbb{R}^{2}$$. Im finding the minimum and maximum distance from $$P$$ to the curve $$g(x,y)$$. I can solve this using Lagrange multipliers method by taking $$f(x,y)=(x-8)^2+(y-6)^2,$$

the squared distance from $$P$$ and finding $$x,y$$ and $$\lambda$$ such $$\nabla f= \lambda\nabla g$$. But for this particular is hard to find $$\lambda$$ using Lagrange multipliers method. Im almost sure this problem can be solved a lot easier, so I was thinking to factor $$g(x,y)$$ as a more common curve but I cant do it. I meant to factor $$g(x,y)$$ as $$(x+2)^2+(y-2)^2=16$$ but this is not correct as I originally have $$-y^2$$. Any help finishing this proof the easier way will be appreciated. Thanks!

## Tricky system of differences

We have a sequence $$q(0,k)=q(0,k+44)$$ for $$k\geqslant0$$ with special conditions, which gives us

• $$q(0,k)=q(0,k±22)$$

• $$q(0,11)=q(0,11(2n+1))=12$$

and the first terms are $$0,2,4,6,8,6,8,8,10,10,12,12$$

Next we have for $$n>0$$

• $$q(n,k)=q(n,4(8n+3)±k)$$

• $$q(n,0)=q(n,4(8n+3))=0$$

and if we define $$q_1(n,k)=q(n+1,k)-q(n,k)$$ so

• $$q_2(n,k)=q_1(n+1,k)-q_1(n,k)=0, 6n+9\geqslant k$$

• $$q_3(n,k)=q_2(n+1,k+6)-q_2(n,k)=0, 12n+4\geqslant k$$

• $$q_4(n,k)=q_3(n+1,k+12)-q_3(n,k)=0, 20n-4\geqslant k$$

• $$q_5(n,k)=q_4(n+1,k+20)-q_4(n,k)=0, 26n+15\geqslant k$$

From these conditions we need to show that

$$\sum\limits_{k=1}^{4(8n+3)} q_1(n,k) = 8(77n+31)$$ $$\sum\limits_{k=1}^{4(8n+3)} q(n,k) = 4(77n^2-3(5n-6))$$

It means that we need to identify $$q(n,k)$$ for $$0\leqslant k\leqslant 2(8n+3)$$.

How can we do this?

## Request for help with a tricky Riccati differential equation

Long story short, I’m working through a model derivation right now and have arrived at a tricky Riccati Differential Equation that I am afraid has pushed me beyond the limits of my talent. The equation is as follows:

$$\frac{dE}{dt}=c\left(\frac{1-\exp(ht)}{1-g\exp(ht)}\right)+bE+aE^{2}.$$

$$a$$, $$b$$, $$c$$, $$g$$, and $$h$$ are all constant.

I have a strong feeling that I am missing something here, but I am having a very difficult time figuring out what. I would greatly appreciate if someone would please help me with this; and additionally if you can point me in the right direction, please provide a further reference that I may investigate in case I have a case like this in the future.

Thank you!

## Tricky merge with dates in r – expand rows from one df to match another

So I have two dataframes, in a tidy format:

  df1 <- data.frame(date=as.Date(paste0('2018-12-',c(11,15,18,22,25,29))), balance=c(-500,-250,0,250,-300,500), account='salary')   df2 <- data.frame(date=as.Date(paste0('2018-12-',c(16,22,27))), balance=c(1000, 700, 250), account='budget') 

Now, this is balance of my budget account and my daily account. the sum of the “balance” column from both thee dataframes would give the amount of money I have on any given day.

However, as there is only a row in the dataframe if a transfer that changes the balance is made, it complicates the computation. The merge has to be done, so for every time there is a row in the one dataframe, there has to be row in the other dataframe, that correponds to the balance in that account on that day. So the result in the toy example would be this:

  df.result <- data.frame(date=as.Date(paste0('2018-12-',c(11,15,16,18,22,25,27,29))), balance.salary=c(-500,-250,-250,0,250,-300,-300,500), balance.budget=c(1000,1000,1000,1000,700,700,250,250)) 

Notice how even though I don’t have information for the budget-account from the first date that the salay-account has a row, I’m using the information from the first time there is a row from the budget account.

here I have changed the column names for the balance-variable, so that one row can have the balance for both, but this is not the essential part of the solution, only that the result can be computed like this:

  df.result$balance.total <- df.result$  balance.salary + df.result\$  balance.budget 

I have tried using crossing() as per this answer, Copying row from one df into everyone row in another, but isn’t useful in this case, as far as I can tell.

Thank you.