Firstly number of objects are 4.That are one base HTML file and 3 Images.So there are 4 request-response pair
A Web page (also called a document) consists of objects. An object is simply a file—such as an HTML file, a JPEG image, a Java applet, or a video clip—that is addressable by a single URL. Most Web pages consist of a base HTML file and several referenced objects. For example, if a Web page contains HTML text and five JPEG images, then the Web page has six objects: the base HTML file plus the five images. The base HTML file references the other objects in the page with the objects’ URLs.
Kurose & Ross
Secondly I find following different solution
Interpretation 1: We are concerned with only total number of Application layer messages.
So in persistent HTTP without pipelining total messages are ( 1 + 2*4 + 1) =10
1 HTTP client process msg to initiate TCP connection to server.
4 pair of req-response msgs = 8 msgs
1 HTTP client process msg to initiate close TCP connection to server.
In non-persistent total messages are (4*6) =16
Each of the 4 objects need 4 msgs. ( 1 intiate TCP + 2 req-resp + 1 + initiate close TCP)
So the ans is 16-10=6.
Interpretation 2: We are concerned with only total number of Transport layer segments send
So in persistent HTTP without pipelining total messages are ( 2 + 2*4 + 2) =12
2 mgs to establish TCP connection establishment ( 3 way handshake )
4 pair of req-response msgs = 8 msgs
2 mgs to terminate TCP connection ( in this I am assuming Client's last request piggybanks FIN and next Server to Client msg piggybanks reponse with ack of client to server FIN and also server includes Server to client Fin.So this reduces 4 way handshake to terminate TCP connection to 2 msgs. I am not sure that it works this way.Any correction/ insight would be helpful :) )
In non-persistent total messages are (6*4) =24
So ans = 12
Interpretation 3: I don't know why but connection termination is not included.Like in mentioned answer https://gateoverflow.in/66837/made-easy-2017#. So this is interpretation2 without extra msgs for connection termination.Ans = (2+2)*4 - (2 + 2*4) = 6.