Your first example shows a configuration where password authentication is disabled, and key-based authentication is enabled. The second example is the opposite of the first.
With regard to 'N': The keys used in key-based authentication would typically have at least 128 bits of entropy. To have an equivalent amount of entropy using a password (and thus, to have an equal amount of resistance to a brute-force attack), the password would need to be randomly generated, and its length (N) would need to be at least 20 characters (possibly more depending on the character set used). See How many bits of entropy should a password have to be reasonably future proof (10+ years)? for more info.