here is the problem


The following problems require you to make some assumptions. Be sure to specify them.

What is the shortest the address on a typical letter could be, if it is to get to a unique human recipient? (Assume the permitted characters are A-Z, 0-9). Explain your assumptions and show your work. You will need a calculator that can do logarithms.

Please, help - I don't even understand what logs would have to do with this problem.

Thanks, Vertica

ya, me neither. If there are 4 billion people you need to support 4 billion addresses or one 32-bit integer (convienient!)

So, if the chars are A-Z and 0-9 you have a base-36 numbering system to work with.

How many digits of base-36 numbers do you need?

(in base-36, 10 == decimal 36, 100 == decimal 36*36, 1000 == 36*36*36)

I suppose you could use logs to aid in figuring that out, but it seems pretty simple.

How many digits of base-36 numbers do you need?

That's exactly the question that logarithms will answer. Were invented to answer.

Going back to the definition: a^x=b --> log_a(b)=x, we have 36 as the base, and we know the result of the exponentiation is something in the vecinity of 4B. (4 Gigapeople??)

So a=36, and b=4,000,000,000. The equation on the left can't be solved directly for x, but the log identity gives an equation that can.

ceil(log_36(4,000,000,000)) = the minimum number of symbols chosen from a 36-member set, needed to uniquely identify one element out of a list of 4 billion items.

Sure, that result can be obtained without too much hassle by guessing, but it's faster AND THE WAY THEY WANT you to do the problem : )

A few assumptions I can think of:
-we know how many people there are on the planet
-there are 4 billion
*the number will not grow beyond 36^(ceil(log_36(4B))) during the expected system lifetime of our new addressing system
*addresses will be assigned to all humans without collisions
-a typical human recipient will be able to correctly identify their own unique address under the new system
-a typical human recipient will be able to REMEMBER their own unique address
*some mail routing/delivery system will be implemented that is compatible with the new unique-human-ID addressing scheme.
and finally,
-enough people will be able to be convinced that replacing the old system (name, city address, state, country) with the new system (a 7-digit address) is a good idea.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.