In a class of 20boys, 16 play soccer,12 played hockey and 2 are not allowed to play games.find how student play.

1: soccer and hockey
2: only hockey

To find the number of students who play both soccer and hockey, and the number of students who play only hockey, we can use set theory and basic arithmetic.

Step 1: Determine the number of boys who play soccer and hockey.
Given:
- Total number of boys in the class = 20
- Number of boys who play soccer = 16
- Number of boys who play hockey = 12

To find how many boys play both soccer and hockey, we can calculate the intersection of the sets. Mathematically, this can be represented as:

Number of boys who play both soccer and hockey = Number of boys who play soccer ∩ Number of boys who play hockey

Substituting the given values:
Number of boys who play both soccer and hockey = 16 ∩ 12
Number of boys who play both soccer and hockey = 4

So, 4 students play both soccer and hockey.

Step 2: Determine the number of boys who play only hockey.
To find the number of boys who play only hockey, we need to subtract the number of boys who play both soccer and hockey from the total number of boys who play hockey.

Number of boys who play only hockey = Number of boys who play hockey - Number of boys who play both soccer and hockey

Substituting the given values:
Number of boys who play only hockey = 12 - 4
Number of boys who play only hockey = 8

So, 8 students play only hockey.

To summarize:
1. The number of students who play both soccer and hockey is 4.
2. The number of students who play only hockey is 8.