We know,
Total number of trees=Number of rows×Number of columns
The total number of trees is fixed.
∴ Minimum number of rows of tree results in maximum number of tree in each row.
Also, each row contains the same type of fruit tree.
∴ We need to find the greatest common factor of 32,24 and 40.
Using prime factorization,
32=2×2×2×2×2
40=23×5
24=2×2×2×3
⇒ GCD =8
∴ Required number of fruit trees in each row is 8.
Rows of orange trees are 4.
Rows of mango trees are 5.
Rows of pear trees are 3.
Hence, total number of fruit trees are 4+5+3=12