Step 1: Model the condition.
"All black boxes are consecutive" \(\Rightarrow\) the set of black boxes must form a single contiguous block (interval) among the 6 positions.
Step 2: Count all non-empty intervals among 6 positions.
Choose the start and end of the black block: for length \(1\) there are \(6\) choices; for length \(2\), \(5\) choices; \(\dots\); for length \(6\), \(1\) choice.
\[ \text{Total ways} = 6+5+4+3+2+1 = \frac{6\cdot 7}{2} = 21. \] \[ \boxed{21} \]
This count can also be found by viewing the arrangement as a composition: some white boxes, then a block of black boxes, then more white boxes.
Setting up the composition. Write the arrangement as \(W^aB^kW^b\), meaning \(a\) white boxes, then \(k\ge1\) consecutive black boxes, then \(b\) white boxes, with \[ a+k+b=6,\quad a,b\ge0,\quad k\ge1. \]
Counting for each block length \(k\). For a fixed \(k\) (from 1 to 6), \(a+b=6-k\), and the number of non-negative integer pairs \((a,b)\) satisfying this is \(6-k+1=7-k\). Summing over all possible \(k\): \[ \sum_{k=1}^{6}(7-k)=6+5+4+3+2+1=21. \]
The block-composition method confirms the same total of 21 valid ways.
So the correct answer is 21.
Find the value of $\log_{20} 100 + \log_{20} 1000 + \log_{20} 10000 \quad \bigl[\textit{Assume that } \log 2 = 0.3\bigr].$
If $x^{2}-ax-21=0$ and $x^{2}-3ax+35=0$ with $a>0$ have a common root, then $a$ equals:
If $a,b,c$ are distinct positive real numbers and $a^2+b^2+c^2=1$, then $ab+bc+ca$ is
At the end of a business conference, the ten people present all shake hands with each other once. How many handshakes will there be altogether?
$A,B,C,D$ are four towns, any three of which are non-colinear. In how many ways can we construct three roads (each road joins a pair of towns) so that the roads do not form a triangle?
Nine squares are chosen at random on a chessboard. What is the probability that they form a square of size $3\times 3$?