In OSPF LSA 3 and LSA 4 are generated by which router?

The Type 3 (Summary) LSA is originated by Area Border Routers into one area to describe links in another area.

The Type 4 (ASBR Summary) LSA is also originated by an ABR, but it is used to describe an ASBR in one area to routers in another area.