The decision regarding submarines is not mathematical alone. As the admiral often says, it's a team sport. Canada is so vast, and its coastlines so long, that we could never have enough submarines to assign them everywhere. Teamwork consists of monitoring, communications, command and control. The important thing is to do a good job identifying the places where threats can emerge. When such a place is identified, you have to determine whether you want to use a submarine, ships or aircraft, in the case of defence, or, other systems located in space. You also have to determine whether the Coast Guard, the RCMP or other organizations have responsibility in the situation.
The location of submarines is very difficult to detect. Even if they're just outside a harbour, and are not in the immediate vicinity of the threat, the threat is unaware of that fact. The submarine sends out a signal that encourages the threat to think twice or three times before doing anything hostile, because it cannot identify the submarine's location.
It's a set of systems, and that's how submarines are used.