There are 32 students that select a favorite topping.
Let x be the total number of students.
1/2 of the students, or 1/2x, choose pepperoni.
1/4 of the students, or 1/4x, choose cheese.
1/8 of the students, or 1/8x, choose sausage.
4 students choose mushrooms.
We know that if we add all of the students together we will get the total number of students, which we defined as x:
1/2x+1/4x+1/8x+4=x
We will use 8 as the common denominator of these fractions:
4/8x+2/8x+1/8x+4=x
Adding like terms,
7/8x+4 = x
Subtract 7/8x from both sides:
7/8x+4-7/8x = x-7/8x
4 = 1x-7/8x
4 = 1/8x
Divide both sides by 1/8:
4÷(1/8) = 1/8x÷(1/8)
4/1 ÷ 1/8 = x
4/1 × 8/1 = x
32/1 = x
32 = x
There are 32 students.