Count the total number of arrangements of a,b,c,d,e,f such that
(a) a and b are side-by-side
(b) a occurring somewhere before b
For part (a), I know the answer is represented by $4!\times 10$ but I don't know the logic behind it, if someone could explain that it would be great.
For part (b), The a will occur before the b in half the cases so I can just say the following if I'm not wrong here.
$$6! \times \frac 1 2$$
Edit: something occured to me about part (a). If a and b had to appear in the order ab then it would just count as one element and the answer would be $5!$ but since a and b can also appear as ba it would just be $2 \times 5!$ which evaluates to the same thing as $4! \times 10$. Lemme know if my thinking is wrong here.
For the first part consider $a,b$ together as an element. Then there are $5$ elements and the total number of arrangements of $5$ elements is $5!$ and we can write $a,b$ together in $2$ ways, $a,b$ or $b,a$. So total number is $5! \times2.$
For part b your logic is right.