PDA

View Full Version : Which letters/digits they use in Pepsi cap codes




Doctor Q
Apr 2, 2005, 08:58 PM
Last year, I had a lot of trouble with the legibility of the codes inside the winning Pepsi/iTunes caps. I would sometimes have to guess what a letter was, e.g., M vs. N or U vs. V. I'd type it one way, have it rejected by iTunes, and type it the other way(s) until I got it right. I'm sure I wasn't the only one who ran into this problem.

This year, the codes are much more readable. They are printed in a clearer style and appear darker. Since I've won a good number of them so far, I had a good sample size with which to study the codes they use, which are alphanumeric (made from letters and digits) and each 10 characters long, e.g., P3E4P 6S7I9.

I found that they use these 29 digits and letters:3 4 6 7 9
A B C E F G H I J K L M N O P Q R S T V W X Y Zand they never use these 7 digits and letters:0 1 2 5 8
D UThe reason is clear: legibility! This way, we can't confuse 0-D-O, 1-I, 2-Z, 5-S, 8-B, or U-V.

To test this theory, I decided to use look-alike characters when entering codes for tunes I won. I started with some caps that had Os. I found that I could enter either O or 0 for an O on a winning cap and it would be accepted by iTunes. The same for Is: you can type either I or 1. And the same for Us; you can type either U or V.

This was nice work by Pepsi/Apple, and I appreciate it. We get fewer frustrations; they get fewer annoyed customers or service calls.

I'll have to win some more caps before I can try entering D for O, 2 for Z, 5 for S, and 8 for B. If you have any winning caps with O, Z, S, or B, please enter it as D or 2 or 5 or 8 instead and post here to tell us if it worked. There is only about a week left in the promotion!



Dr. Dastardly
Apr 2, 2005, 09:08 PM
WOW pretty impressive foresight their part. Wouldn't of thought about it myself but now that you point it out it seems so obvious. I wonder if this was a problem last time and thats why they thought to do this.

Doctor Q
Apr 2, 2005, 09:28 PM
I wonder if this was a problem last time and thats why they thought to do this.I assume it was. Hey, maybe they did it just for ME!

Now, just to be compulsive (who, me?), I considered that my results could in theory be random luck.

In theory, it could be that they use all letter and digits in their codes and it was just random chance that my particular collection of caps had no 0s, 1s, 2s, 5s, 8s, Ds, or Us.

However, I've won 64 tunes so far (my method is patent pending) and I've computed the odds of my caps having only those letters and digits if Pepsi used them all:Odds: (29/36)^(64*10)

Reason: There are 29 letter and digits in my caps.
There are 36 possible letters and digits.
I have 64 winning caps.
There are 10 letters and digits per cap.That means there is only one chance in 8010^60 (eighty times ten to the sixtieth power) that my results were simply luck. That's one in 80 decillion in the British usage and one in 80 novemdecillion in the American usage, a number so big that you probably never heard of it!

And, of course, the particular letter and digits that don't occur in my caps are ones that can be confused typographically.

Suffice it to say that I'm convinced that they purposely limited their choice of letters and digits.

homerjward
Apr 2, 2005, 09:42 PM
WOW pretty impressive foresight their part. Wouldn't of thought about it myself but now that you point it out it seems so obvious. I wonder if this was a problem last time and thats why they thought to do this.
forget the foresight, it's pretty impressive he figured it out! :eek:

Nermal
Apr 2, 2005, 09:45 PM
To test this theory, I decided to use look-alike characters when entering codes for tunes I won. I started with some caps that had Os. I found that I could enter either O or 0 for an O on a winning cap and it would be accepted by iTunes

Once you've bought a song with O, can you then go through again and use 0 and get another song? :D

And if so, can I have a free song or two for coming up with the idea? ;)

pdpfilms
Apr 2, 2005, 10:08 PM
Once you've bought a song with O, can you then go through again and use 0 and get another song?

And if so, can I have a free song or two for coming up with the idea

Unfotunately, according to what he's saying, that won't work..... that's why they don't use those letters in the codes. for instance, the code 03E40 6S7I9 and o3E4o 6S7I9 would be one in the same... enter in one, and the other becomes void. Sorry.

However, I've won 64 tunes so far (my method is patent pending)

Patent Pending, eh?? Hmmm.... you wouldn't be tipping the bottle, would you?

dotdotdot
Apr 2, 2005, 10:16 PM
You went and counted 64 bottle caps numbers??

Uh... yeah... uh... theres... uh... nothing wrong with that... :rolleyes: :p

Doctor Q
Apr 2, 2005, 10:43 PM
You went and counted 64 bottle caps numbers??Not exactly. I looked them over to see if I could find the whole alphabet and all ten digits. And, all by myself, without even a calculator, I figured out that there were 640 letters and digits in all by multiplying 64 by 10. Clever, eh? ;)

Patent Pending, eh?? Hmmm.... you wouldn't be tipping the bottle, would you?OK, since you twisted my arm, I'll tell you my patent pending technique:

1. Find some coworkers who don't care about iTunes (I'm surprised there ARE such people, but it's true in my case).

2. Get them to agree to switch from canned Pepsi to 20oz bottles for a month or two. (We buy them together in bulk.)

3. Get them to agree to give you their winning caps in exchange for hearty thanks.

4. Drink Pepsi instead of your usual favorite (Dr Pepper).

Here's a photo of my winners so far. I took this shot while setting up the shot I'm using for my avatar this week. Which is why I had all the caps laid out. Which is why I thought to look at which letters were used.

dotdotdot
Apr 2, 2005, 10:52 PM
Well I have a Ben and Jerry's Ice Cream carton with 17 Winning caps!!

Harry K.
Apr 2, 2005, 10:56 PM
As cheap as it sounds, no one in my family drinks coke or pepsi or even a lot of soda for that matter, so my father (who recycles on a regular basis) asked the lady in charge of the recycling center to save winning caps for us.

She deserves a great thanks- we've gotten about 20 winning caps so far + a cap that gives a free 3 liter coke!

Doctor Q
Apr 3, 2005, 12:21 AM
My wife just opened a Pepsi and won again (that's number 65), and by luck she got a code with both a B and a Z.

When entering it, we typed 8 instead of B and 2 instead of Z and it was accepted!

So all that remains to prove the theory about the lookalike characters is for somebody to get a code with an O or an S. If you get an O, type a D instead. If you get an S, type a 5 instead. Then post here to report if it was accepted. There's no risk; if it isn't accepted, you just correct it and click again and it'll then be accepted.

Edit (the next day): We got winner number 66 today, and the code had an "S". We typed "5" and the code still worked! The last test is to find a cap with a letter O and type letter D instead.

tech4all
Apr 3, 2005, 01:01 AM
How long did it take to get to 65? That sure is a lot of Pepsi! :)

Doctor Q
Apr 3, 2005, 01:44 AM
How long did it take to get to 65? That sure is a lot of Pepsi! :)Urp! Yes it is.

It took a little under 2 months, which is how long it's been since the third week of the promotion. We didn't have the Pepsi/iTunes bottles in stores here at first after the promotion began January 31st. But I've had half a dozen thirsty people helping me on and off since then.

Doctor Q
Apr 3, 2005, 03:11 AM
Tee hee. I couldn't resist taking a snapshot of the display when I used my 65th cap to buy a certain Keane song.

I guess you're not allowed to interrupt the downloading of this song! :D

vieoray
Apr 3, 2005, 03:52 PM
i know someone who works for pepsi. he drives a truck, and he gets a discount on pepsi products. before the promotion i asked if he used iTunes, and he said he didn't, so i got him to save all his caps for me. he also saved the caps of his friends from work. its worked out nice :)

very interesting, doctor q.

Doctor Q
Apr 3, 2005, 08:07 PM
i know someone who works for pepsi. he drives a truck, and he gets a discount on pepsi products. before the promotion i asked if he used iTunes, and he said he didn't, so i got him to save all his caps for me. he also saved the caps of his friends from work. its worked out nice :)How many?

PlaceofDis
Apr 3, 2005, 08:10 PM
i was about to say.... i have gotten both Z and 2 in my winning caps, as well as a B i believe

Doctor Q
Apr 3, 2005, 08:59 PM
i was about to say.... i have gotten both Z and 2 in my winning caps, as well as a B i believeAccording to my theory, you could have gotten a Z and a B, but not a 2. Is the cap still around so you can check?

PlaceofDis
Apr 3, 2005, 09:02 PM
According to my theory, you could have gotten a Z and a B, but not a 2. Is the cap still around so you can check?

i dont have the cap but i know it was a two because i remember entering it as a Z at first, because thats what i though it was, i had to figure out the problem and turned out that Z really was a two! annoying to say the least

Doctor Q
Apr 3, 2005, 09:51 PM
i dont have the cap but i know it was a two because i remember entering it as a Z at first, because thats what i though it was, i had to figure out the problem and turned out that Z really was a two! annoying to say the leastHow surprising. That shows that my theory about the missing letter is wrong, at least for the 2. I will watch for further Zs or 2s in my own caps and try entering them as the other.

PlaceofDis
Apr 3, 2005, 09:53 PM
How surprising. That shows that my theory about the missing letter is wrong, at least for the 2. I will watch for further Zs or 2s in my own caps and try entering them as the other.

i personally doubt they have too much control over which letters/numbers are possible, after all they have to come up with a certain number of codes, and while there are a lot of possible combinations, there probably is a program that comes up with the codes, they probably just try not to use certain numbers/letters, but some are bound to get through

clayj
Apr 3, 2005, 09:59 PM
i personally doubt they have too much control over which letters/numbers are possible, after all they have to come up with a certain number of codes, and while there are a lot of possible combinations, there probably is a program that comes up with the codes, they probably just try not to use certain numbers/letters, but some are bound to get throughYou are correct, sir. There's an algorithm that's used to process the code that you enter, to make sure it's valid... this is designed to prevent people from just sitting there and typing in "random" codes. The odds of any given possible code actually being valid are VERY low.

A similar system (patented, actually) is used by Microsoft... the product key for Office or Windows (or other Microsoft apps and products) is a 25 character code that uses any letter or number, but no vowels, zeroes, or ones (29 characters), to produce over 10^36 possible codes. Within that code is encoded the product, its platform, its version, and a host of other information. It's basically impossible to forge a Microsoft product code if you don't already have one... the algorithm, of course, is highly complicated and EXTREMELY secret. (And it's not stored on your machine... it's stored on a Microsoft server and is used to validate your product activations.)

PlaceofDis
Apr 3, 2005, 10:03 PM
You are correct, sir. There's an algorithm that's used to process the code that you enter, to make sure it's valid... this is designed to prevent people from just sitting there and typing in "random" codes. The odds of any given possible code actually being valid are VERY low.

A similar system (patented, actually) is used by Microsoft... the product key for Office or Windows (or other Microsoft apps and products) is a 25 character code that uses any letter or number, but no vowels, zeroes, or ones (28 characters), to produce over 10^36 possible codes. Within that code is encoded the product, its platform, its version, and a host of other information. It's basically impossible to forge a Microsoft product code if you don't already have one... the algorithm, of course, is highly complicated and EXTREMELY secret. (And it's not stored on your machine... it's stored on a Microsoft server and is used to validate your product activations.)

thats interesting, just imagine if someone was able to crack that though, that would be a huge mess LoL, and i imagine the person who came up with the original coding and algorithm had to be paid big bucks not to leak it, i find all of this fascinating of course because im a geek

clayj
Apr 3, 2005, 10:09 PM
thats interesting, just imagine if someone was able to crack that though, that would be a huge mess LoL, and i imagine the person who came up with the original coding and algorithm had to be paid big bucks not to leak it, i find all of this fascinating of course because im a geekWell, don't forget that the processing of product codes is handled on the SERVER... so even if you figured out the algorithm for whether a product code is *valid*, you'd still have to know what elements went into it to determine the product, version, platform, country, and all sorts of other stuff. In other words, if I knew the algorithm to determine if a code is valid, I still don't know what needs to be IN the code in order for the server to validate. I might accidentally come up with a product code for the Japanese version of Office 2000, rather than for the American version of Windows XP SP-2.

FWIW, I did see a web page once inside Microsoft that talked about the stuff that's encoded in a PID (Product ID)... it's HIDEOUSLY complicated. No one's ever gonna break it... and even if they do, if they notice a particular product code being used repeatedly, they can just terminate that code from the server and render it useless.

PlaceofDis
Apr 3, 2005, 10:20 PM
Well, don't forget that the processing of product codes is handled on the SERVER... so even if you figured out the algorithm for whether a product code is *valid*, you'd still have to know what elements went into it to determine the product, version, platform, country, and all sorts of other stuff. In other words, if I knew the algorithm to determine if a code is valid, I still don't know what needs to be IN the code in order for the server to validate. I might accidentally come up with a product code for the Japanese version of Office 2000, rather than for the American version of Windows XP SP-2.

FWIW, I did see a web page once inside Microsoft that talked about the stuff that's encoded in a PID (Product ID)... it's HIDEOUSLY complicated. No one's ever gonna break it... and even if they do, if they notice a particular product code being used repeatedly, they can just terminate that code from the server and render it useless.


ah yeah, but still hacking the algorithm would be quite a feat in and of itself, i suppose there would be more damage done if the Servers were hacked then, which i wonder how often that happens are attempts are made to hack 'em

vieoray
Apr 3, 2005, 10:44 PM
How many?

93 so far :)

PlaceofDis
Apr 3, 2005, 10:57 PM
93 so far :)

whoa!! wanna share? ;) i wish i was that lucky, btw when do you have to have your codes entered by?

Doctor Q
Apr 4, 2005, 02:05 AM
I used to think that the codes had to have a checksum built in to prevent people from guessing codes easily. For example, if 3 of the characters were computed from the other 7, then even if you picked 7 of the characters of a valid code, your chances of guessing the other 3 would be 1 in 29^3, i.e., chances of 1 in 24,389, so you'd take an average of 12,194 guesses before you'd get one right. The poor odds are the deterrent.

However, I now think that a checksum is not necessary, for two reasons, both of which show that they can verify codes without worrying about people guessing them.

Reason #1: The codespace (number of possible codes) is 29^10, which is much larger than the number of codes they've actually used (200,000,000). If I did my logarithms right, your chances of guessing a random code even with no checksums are 1 in 2,103,536. Not likely.

Reason #2: If you put in a code, the server has to make two decisions: (1) is it valid? and (2) has it already been used? To handle (2), it must store information (some kind of table) to know which caps have been used. I believe that handling (2) will take care of (1) as well.

They wouldn't necessarily have to store a table of size 29^10 = 420,707,233,000,000 to do this. Here's a programming technique they might have used to prevent the table from being so huge: Suppose they created a one-to-one mapping between integers (1, 2, 3, etc.) and the character space (the 29^10 possible codes). On the server, they make a table of size 200,000,000 bits (that's only 24MB), initially all zero. When you enter a code, the reverse mapping is applied to the code to produce the integer. If it is 1 thru 200,000,000, it's valid. If not, it's invalid. Then the table is checked. For integer n, the nth bit is checked. If it is 0, it is set to 1 and you get your tune credit. If it is 1, you or somebody else has already used this code.

By the way, when the promotion is over, the number of 1's in the table is the number of tunes redeemed and the number of 0's is the number of caps distributed but never claimed. I'd sure like to know those numbers!

Doctor Q
Apr 4, 2005, 12:54 PM
A more likely implementation is as follows:

They generate the codes as random combinations of letters and digits, while filling in a hash table. The hashing function is much simpler to create than the one-to-one function I described in the previous post.

Each slot in the hash table holds a list of codes that hash to that slot. The bigger the hash table size, the more sparse it will be, with the fewest collisions and the shortest average list size. Each code has a used/unused bit, set to "unused" initially.

When you redeem a cap, the code is hashed to find the hash table slot. If the code is not in the list for that hash table slot, the code is invalid. If the code is marked "used", the code was previously used. Otherwise, it is changed from "unused" to "used" and you get your tune credit.

If stored efficiently, the table would be a percentage larger than the size of the codes, i.e., 10 x 200,000,000 bytes, or about 1.9GB. As with the previous implementations, no checksum is required to keep customers from easily guessing codes.

I wonder if they check the randomly generated codes to make sure they don't accidentally include profane or politically incorrect words? With random codes, this isn't very likely, but it's possible. The only word of 4 or more letters I've found in my codes so far is WILE (http://dictionary.reference.com/search?q=wile).

clayj
Apr 4, 2005, 04:05 PM
I'm surprised the Apple iTunes codes include vowels... the Microsoft product IDs (previously mentioned) don't include any vowels, zeroes (0/O), or ones (1/I), so there's no chance of any words (especially dirty words) showing up in any codes. Sure, it's unlikely to happen, but what happens if someone finds a code that includes a combination like "DIK" or worse? ;)

vieoray
Apr 4, 2005, 04:10 PM
whoa!! wanna share? ;) i wish i was that lucky, btw when do you have to have your codes entered by?

there's a limit of 200 per user, so if i get that many i would be glad to share. the promotion ends april 30, but you have until about the end of may to use the codes (dont remember the exact date, i think may 23)

Doctor Q
Apr 4, 2005, 04:58 PM
Sure, it's unlikely to happen, but what happens if someone finds a code that includes a combination like "DIK" or worse? ;)If they are American, they probably take great offense, claim it was done on purpose, start a blog about it, demand that the practice stop, insist that they be paid for their mental anguish, and appear on lots of talk shows to discuss it.

Doctor Q
Apr 4, 2005, 11:00 PM
The last test is to find a cap with a letter O and type letter D instead.I got one with an O today. I typed a D instead and it was accepted. That completes my test of each cap assignment.

I have shown that the Pepsi code rules are as follows:There are 24 possible letters and 5 possible digits, for a total of 29 choices for each of the 10 characters.

No codes have 0 or D.
For an O, you can enter O or 0 or D.

No codes have 1.
For an I, you can enter I or 1.

No codes have 2.
For a Z, you can enter Z or 2 (but see note below).

No codes have 5.
For an S, you can enter S or 5.

No codes have 8.
For a B, you can enter B or 8.

No codes have U.
For a V, you can enter V or U.

Note: PlaceofDis remembers having to type "2" rather than "Z", which I can't explain, unless it was last year, not this year. I will keep watching for 2s and Zs. But the chances that 2s are valid and I have not gotten one are very slight.

Doctor Q
Apr 6, 2005, 01:08 AM
Who wants to know the probabilities that you'll find letter Q in your iTunes Pepsi code?

If your favorite letter isn't Q, the probabilities are the same for YOUR favorite letter (unless your favorite letter is a D or a U, which they don't use). We will assume (since we can't tell) that all letters and digits are equally likely in each code position.

Probability of getting at least one Q: 29.6% (1 in 3.38)

Probability of getting exactly one Q: 25.1% (1 in 3.98)

Probability of getting exactly two Qs: 4.04% (1 in 24.8)

Probability of getting exactly three Qs: 0.39% (1 in 260)

Probability of getting exactly four Qs: 0.024% (1 in 4,157)

Probability of getting exactly five Qs: 0.0010% (1 in 97,004)

Probability of getting exactly six Qs: 0.000031% (1 in 3,259,332)

Probability of getting exactly seven Qs: 0.00000063% (1 in 159,707,253)

Probability of getting exactly eight Qs: 0.0000000084% (1 in 11,924,808,200)

Probability of getting exactly nine Qs: 0.000000000067% (1 in 1,502,530,000,000)

Probability of getting exactly ten Qs: 0.00000000000024% (1 in 420,707,000,000,000)

:( Bad news: 70.4% of the time (1 out of every 1.42 times) you will find no Q at all in your Pepsi code. I'm disappointed with such codes, but I reluctantly redeem them anyway.

:) Good news: Your probability of getting either no Qs, 1 Q, 2 Qs, 3Qs, 4 Qs, 5 Qs, 6 Qs, 7 Qs, 8 Qs, 9 Qs, or 10 Qs is 100%!

For those of you still reading, here is the formula:

Probability of getting n of a given letter =( 28 ^ ( 10 - n ) ) x 10!
-------------------------------
( 29 ^ 10 ) x n! x ( 10 - n )!

wordmunger
Apr 6, 2005, 05:38 AM
I'm not a big pepsi drinker. But I STILL have not seen any iTunes bottles in NC. Kinda weird.

I did see a few last year, and bought 3 or 4. No winners, though!

vieoray
Apr 6, 2005, 07:11 AM
I'm not a big pepsi drinker. But I STILL have not seen any iTunes bottles in NC. Kinda weird.

I did see a few last year, and bought 3 or 4. No winners, though!

i live in nc as well, and i have a hard time seeing them in stores. like i said, i have a friend that drives a truck for pepsi, and he has plenty of them, but he only delivers to businesses.

telecomm
Apr 6, 2005, 08:00 AM
...I've won 64 tunes so far (my method is patent pending) and I've computed the odds of my caps having only those letters and digits if Pepsi used them all: Odds: 1 in (29/36)^(64*10)


Very nice investigative work! This calculation, though, is a bit off... (29/36)^(64*10) is an incredibly small number (a fraction raised to a power greater than 1), I think you meant that the odds are 1 in (36/29)^(64*10).

Doctor Q
Apr 6, 2005, 07:01 PM
Very nice investigative work! This calculation, though, is a bit off... (29/36)^(64*10) is an incredibly small number (a fraction raised to a power greater than 1), I think you meant that the odds are 1 in (36/29)^(64*10).You are correct. Thanks. I said the chances were "1 in (29/36)^(64*10)" when I meant the chance is (29/36)^(64*10). I'll fix my post.