Problem C-6.12
The coupon collector problem characterizes the expected number of days that it takes to
get ncoupons if one receives one of these coupons at random every day in the mail. This
number is approximately nln n. Use this fact to compare the number of TCP connections
that are initiated in a sequential port scan, going from port 1 to 65535, directed at some
host, to the expected number that are requested in a random port scan, which requests a
random port each time (uniformly and independently) until it has probed all of the ports.
Problem C-6.13
Describe a modification to the random port scan, as described in the previous exercise, so
that it still uses a randomly generated sequence of port numbers but will now have exactly
the same number of attempted TCP connections as a sequential port scan.
29