B1. Given is a square $A B C D$. You start at vertex $A$. On each turn, you may walk along a side from one vertex to another.

How many walks of 10 turns are there such that you are back at vertex $A$ after the 10 turns? During a walk, you may pass through $A$ on the way.
B1. From $A$ you have two possibilities: either to $B$ or to $D$. From $B$ (and also from $D$) you have two possibilities for the next turn: either to $A$ or to $C$ (also from $D$ to $A$ or to $C$). From $A$ (and also from $C$) you have two possibilities for the third turn: to $B$ or to $D$ (also to $B$ or to $D$ from $C$). At each step, there are two possibilities. After 9 steps, you are in $B$ or $D$. For the tenth step, you have only one possibility to $A$ either from $B$ or from $D$. In total, there are $2^{9}=512$ different walks.