Each face of a cube is painted randomly one of the colors red, orange, yellow, green, blue or purple. What is the probability that the cube has at least one pair of faces that share an edge and are the same color? Express your answer as a decimal to the nearest thousandth.
To solve the problem, we will first calculate the total number of ways to paint the cube and then determine the number of ways to paint the cube such that no two adjacent (sharing an edge) faces are the same color. Finally, we will use these counts to find the desired probability.
1. **Total ways to paint the cube:**
Each of the 6 faces of the cube can be painted in one of 6 colors (red, orange, yellow, green, blue, purple). Therefore, the total number of ways to paint all the faces of the cube is given by:
\[
6^6 = 46656
\]
2. **Ways to paint the cube with no adjacent faces the same color:**
We will use the principle of complementary counting. Let’s find how many ways there are to paint the cube such that no two adjacent faces share the same color.
We will use the chromatic polynomial for a cube which can be represented as a graph. The graph of a cube has 8 vertices (the corners of the cube) and 12 edges (the edges of the cube). Each face of the cube is adjacent to 4 other faces.
To find the number of valid colorings, we can use Kő’s theorem which provides that the number of ways to color the graph with \( k \) colors such that no two adjacent vertices share the same color is given by the chromatic polynomial \( P(G, k) \). For a cube, the formula is:
\[
P(G, k) = k(k - 1)^2(k - 2)^3
\]
Here, \( k \) is the number of colors available. Plugging in our \( k = 6 \):
\[
P(G, 6) = 6 \cdot 5^2 \cdot 4^3
\]
Calculating this step by step:
- \( 5^2 = 25 \)
- \( 4^3 = 64 \)
So, we compute:
\[
P(G, 6) = 6 \cdot 25 \cdot 64
\]
Calculating this gives:
\[
6 \cdot 25 = 150
\]
\[
150 \cdot 64 = 9600
\]
Thus, the total number of ways to paint the cube such that no two adjacent faces are the same color is:
\[
9600
\]
3. **Calculating the number of ways to paint the cube such that at least one pair of adjacent faces is the same color:**
We now will use complementary counting to find the number of ways where at least one pair of adjacent faces are the same color. This is simply the difference between the total number of paintings and the paintings with no adjacent faces being the same color:
\[
\text{Unwanted cases} = 6^6 - P(G, 6) = 46656 - 9600 = 37056
\]
4. **Finding the probability:**
The probability that the cube has at least one pair of adjacent faces sharing the same color is given by the ratio of the unwanted cases to the total cases:
\[
P(\text{at least one pair same}) = \frac{37056}{46656}
\]
Calculating this,
\[
P = \frac{37056}{46656} \approx 0.7935
\]
Finally, rounding to the nearest thousandth gives us:
\[
\boxed{0.794}
\]