To determine the total number of horses in the herd and the ratio of black horses to all horses, we start with the information provided:
- Total number of horses: 88
- Number of white horses: 31
We can find the number of black horses by subtracting the number of white horses from the total:
\[ \text{Number of black horses} = \text{Total horses} - \text{White horses} = 88 - 31 = 57 \]
Now we have 57 black horses.
Next, we can find the ratio of black horses to all horses:
- The ratio of black horses to all horses is calculated as follows:
\[ \text{Ratio of black horses to all horses} = \frac{\text{Number of black horses}}{\text{Total number of horses}} = \frac{57}{88} \]
Thus, the total number of horses in the herd is 88, and the ratio of black horses to all horses is \( \frac{57}{88} \).