The reaction of two equivalents of $\mathrm{Mg}$ with 1,4 -dibromobutane produces compound $\mathrm{A}$. The reaction of A with two equivalents of $\mathrm{CH}_{3} \mathrm{CHO}$ (acetaldehyde), followed by work-up with dilute aqueous acid, produces compound $\mathrm{B}$, having the formula $\mathrm{C}_{8} \mathrm{H}_{18} \mathrm{O}_{2}$. What are the structures of $\mathrm{A}$ and $\mathrm{B}$ ?