Answer: There are 15 ghosts in a haunted house.
Step-by-step explanation:
Since we have given that
Total number of ghosts, goblins and ghouls = 51
On Friday,
Let the number of goblins be x
Let the number of ghosts be
![(x)/(2)](https://img.qammunity.org/2019/formulas/mathematics/college/jv98wqj304sbrc0ky6fnlgw2ggdu01cfcz.png)
Let the number of ghouls be
![51-x-(x)/(2)=51-(3x)/(2)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/r4aqfmci62rdtx85t2wew3r2ifofs4r18d.png)
On Saturday,
Two-thirds of the ghouls each became a ghost,
So, it becomes
![(2)/(3)* (51-(3x)/(2))=34-x](https://img.qammunity.org/2019/formulas/mathematics/middle-school/o10vkfee7top954nxwbkifvluwwsraebjm.png)
Now, number of ghost becomes
![(x)/(2)+34-x=34-(x)/(2)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/cejd5dh0461cg892iq9656anrz79uzt2td.png)
and number of ghouls becomes
![51-(3x)/(2)-34+x=17-(x)/(2)](https://img.qammunity.org/2019/formulas/mathematics/middle-school/q6ew7xz8btxgbnk909njtz1ydxo03x7jwm.png)
On Sunday,
Number of ghosts each became a goblin = 11
So, Number of goblins becomes
![x+11](https://img.qammunity.org/2019/formulas/mathematics/middle-school/fcuq41j5713vuf5vxh6127bvkz5b9avphe.png)
Now, according to question , we have a ratio of ghouls to goblins i.e. 1:3
So, it becomes,
![(17-(x)/(2))/(x+11)=(1)/(3)\\\\(34-x)/(2x+22)=(1)/(3)\\\\102-3x=2x+22\\\\102-22=2x+3x\\\\80=5x\\\\(80)/(5)=x\\\\16=x](https://img.qammunity.org/2019/formulas/mathematics/middle-school/whzttbfdy240m6i7zm38t8rufg3ns0x6un.png)
So, number of ghosts is given by
![34-(x)/(2)-11\\\\=23-(x)/(2)\\\\=23-(16)/(2)\\\\=23-8\\\\=15](https://img.qammunity.org/2019/formulas/mathematics/middle-school/312yhxsscdo927yg8qbi6gsu8cx875yim5.png)
So, there are 15 ghosts in a haunted house.