Jump to content

Thaivisa Need Your Help


webfact

Recommended Posts

Thaivisa is currently adjusting some of their software.

For that task we use a URL shortener to cut long URL's short: http://z.pe

The short URL looks like this example: http://z.pe/RB9

I know that George was sick during Math class at school and I am in a similar situation. :)

We are wondering how many 3 number/letter combination's are possible until they ran out of opportunities.

mathematicians - your opinion please!

Thanks

Link to comment
Share on other sites

I'm guessing you are looking for permutations rather than combinations, i.e. ABC is not the same as BCA?

I think the answer is number of letters in the alphabet (the English alphabet presumably?) in lower case + the number of letters in upper case plus the number of digits, all multiplied by itself three times:

(26+26+10)*(26+26+10)*(26+26+10) = 238,328 permutations

But I have probably forgot something, school is long way back. On the other hand paulfr had the same suggestions so maybe not.

Sophon

Link to comment
Share on other sites

I thought routers ignore url letter case

Not true. Case sensitive vs. non-case sensitive is mostly a matter of the OS the web server is running on. Linux and other *nix-es are case sensitive, Windows is not. So case sensitive URLs are pretty common on the web.

On Linux there are ways around case-sensitive URLs, e.g. the URL rewriting module thaivisa uses for thread URLs ignores the case, but try to change other parts of the url that describe the file path on the server (/forum/index.php) and it will fail.

Depending on the exact use-case for the shortened URLs it might be better not to make them case sensitive - for instance if the URLs are shortened so people can memorize them more easily.

Available combinations

3 characters

case sensitive alphabet plus numbers 62^3 = 238.328

case in-sensitive alphabet plus numbers 36^3 = 46.656

4 characters

case sensitive alphabet plus numbers 62^4 = 14.776.336

case in-sensitive alphabet plus numbers 36^4 = 1.679.616

welo

Link to comment
Share on other sites

That would be the number of non repeating combinations with 62 possible characters (i.e. the same character can only be used once and the order is irrelevant like for instance when drawing lottery numbers). The result is reached like this:

(62*61*60)/(3*2*1) = 37,820

But this tells us how many different ways you can pick three different numbers/characters out of 62 possible options. It doesn't allow for combinations where the same character is used more than once, and 123, 132, 213, 231, 312 and 321 would all be considered the same combination.

As mentioned earlier, I'm pretty sure we are talking about permutations not combinations here. And the same letter/number can be used more than once

Sophon

Link to comment
Share on other sites

That would be the number of non repeating combinations with 62 possible characters (i.e. the same character can only be used once and the order is irrelevant like for instance when drawing lottery numbers). The result is reached like this:

(62*61*60)/(3*2*1) = 37,820

But this tells us how many different ways you can pick three different numbers/characters out of 62 possible options. It doesn't allow for combinations where the same character is used more than once, and 123, 132, 213, 231, 312 and 321 would all be considered the same combination.

As mentioned earlier, I'm pretty sure we are talking about permutations not combinations here. And the same letter/number can be used more than once

Sophon

Okay. If I use the permutations calculator, the answer comes up 226,920. You're getting 238,328. I don't know which is right but probably your answer is. My hat is off to you just because you actually know what the word permutations means. I have never heard of it. I just know how to do a search on Google for whatever calculator I need. I have never needed this one. Probably never will. Most of my dilemmas involve how many gallons will fit in tank of ?? by ?? size or finding the unknown length of a leg of a triangle. But I'm pretty sure that if these folks really need to know these kinds of things on a regular basis, the ol' Internet has a calculator that will give them the answer.

Edited by kandahar
Link to comment
Share on other sites

Domain names are not case sensitive, regardless of Linux or Windows servers.

This statement appears to be correct. I just tried it with some tinyurl.com links and regardles of case (small/ capital) the links showed up correctly. (WIN XP, IE)

To the OP:

Better leave any service which allows only three characters alone since you would run out of link names very quickly!

opalhort

Edited by opalhort
Link to comment
Share on other sites

Domain names are not case sensitive, regardless of Linux or Windows servers.

Correct!

However, we are talking about the part of the URL that follows the domain name, you may call that 'path' or 'filename' or whatever.

But I admit that talking about routers would rather imply that we talk about domain names which are - as you pointed out - case-insensitive.

welo

Link to comment
Share on other sites

The Formula for Permutation is :

nPk i.e. k objects from a set of n

(n!)

---------

(n-k)!

This formula only applies for sequences where each element (in our case letter or digit) can appear only once, like a lady picking k 'winners' out of a bowl where n distinct elements are represented once each.

http://z.pe/RRR would not be a possible combination then.

It's late though so...

Edited by welo
Link to comment
Share on other sites

That would be the number of non repeating combinations with 62 possible characters (i.e. the same character can only be used once and the order is irrelevant like for instance when drawing lottery numbers). The result is reached like this:

(62*61*60)/(3*2*1) = 37,820

But this tells us how many different ways you can pick three different numbers/characters out of 62 possible options. It doesn't allow for combinations where the same character is used more than once, and 123, 132, 213, 231, 312 and 321 would all be considered the same combination.

As mentioned earlier, I'm pretty sure we are talking about permutations not combinations here. And the same letter/number can be used more than once

Sophon

Okay. If I use the permutations calculator, the answer comes up 226,920. You're getting 238,328. I don't know which is right but probably your answer is. My hat is off to you just because you actually know what the word permutations means. I have never heard of it. I just know how to do a search on Google for whatever calculator I need. I have never needed this one. Probably never will. Most of my dilemmas involve how many gallons will fit in tank of ?? by ?? size or finding the unknown length of a leg of a triangle. But I'm pretty sure that if these folks really need to know these kinds of things on a regular basis, the ol' Internet has a calculator that will give them the answer.

That's because your calculater calculates the number of permutations where the same character can only be used once, which is not the case here. If using your calculater you should select the "event multiples" option.

The correct number of permutations for this discussion when selecting three characters from 62 possible where the same character can be used more than once is 238,328.

Sophon

Link to comment
Share on other sites

Hi, I wonder if it is a good idea to rely on 3rd party services like z.pe, because you give control out of hands and you never know what might happen with them in the future. It would not be the first time a free service disappears without warning, destroying 1000.000's of websites !

There are enough short domainnames available, especially under the .li top level domain, so you could easy set up subdomains (better then redirects!) by yourself, and e.g. when you buy the (available) http://tvf.li you can create subdomains like http://1.tvf.li until http://zzz.tvf.li and millions of combinations are possible, when host tvf.li under one.com it won't cost you much, just the hosting.

Success.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.










×
×
  • Create New...