Step 1 :- Demand of page 1 , which is not present in memory.
Step 2 :- Demand of page 3 , which is not present in memory.
Step 3 :- Demand of page 1 , which is already present in memory.
Step 4 :- Demand of page 3 , which is already present in memory.
Step 5 :- Demand of page 4 , which is not present in memory.
Step 6 :- Demand of page 2 , which is not present in memory.
Here we don't have any free frame left in physical memory , so we have to remove some frame based on least frequently used page replacement algorithm.
page 1 : frequency =2 (used two times)
Page 3 : frequency=2 (used two times)
page 4 : frequency=1 (used one time) // least frequently used so this wil be selected for replacement.
Step 7 :- Demand of page 2 , which is already present in memory.
Step 8 :- Demand of page 4 , which is not present in memory.
page 1 :- frequency =2 (used two times)
page 3 :-frequency =2 (used two times)
page 2 :-frequency =2 (used two times)
Here when everyone has same frequency so use help of least recently used page replacement algorithm. Here we can see page 1 is the least recently used page so replace this with page 4.
Now we can observe , which page is brought , how many number of times in main memory.
The pages $1,2,3$ and $4$ be brought to the memory $1,1,1,2 $ times, respectively.