In the first act of a play all the actors were on stage. The second act opened with 1/2 the actors onstage and then 5 actors left. After that 1/2 the remaining actors left, and 4 actors remained on stage. How many actors were onstage in the first act?

number of actors on stage in first act --- x

number of actors on stage at end of 2nd act = x/2 - 5
then 1/2 of those left, leaving us with:
(1/2)(x/2 - 5) = 4
x/2 - 5 = 8
x/2 = 13
x = 26

To solve this problem, we can work backwards from the given information.

Let's denote the number of actors onstage in the first act as "x".

According to the information provided, the second act opened with 1/2 the actors onstage. This means there were (1/2) * x = x/2 actors onstage at the beginning of the second act.

After that, 5 actors left the stage. So, the total number of actors still on stage at that point was (x/2) - 5.

According to the next piece of information, 1/2 of the remaining actors left, leaving 4 actors on stage. Thus, we have the equation (1/2) * ((x/2) - 5) = 4.

Simplifying this equation, we get (1/2) * (x/2 - 5) = 4.
Multiply both sides by 2 to eliminate the fraction: x/2 - 5 = 8.
Add 5 to both sides: x/2 = 13.
Multiply both sides by 2 to find the value of x: x = 26.

Therefore, there were 26 actors onstage in the first act.