Answer
See below
Work Step by Step
The number of possible codes for 6 houses is:
$4096^6=4,722,366,482,869,645,213,696$
The number of ways that 6 houses can have 6 distinct codes is: $_{4096}P_6=\frac{4096!}{4090!}=4,705,096,570,216,277,114,880$
The probability that at least 2 of the 6 houses have the same code: $P=1-\frac{4,705,096,570,216,277,114,880}{4,722,366,482,869,645,213,696}=0.003657$