Swaptastic Part 2

As a follow-up to my post about the Euro 2016 Panini Stickers, I’ve now completed the collection with the help of an online swapping site and by buying the last 39 stickers directly from Panini. I also managed to write a new simulator, this time with additional collectors involved.

I assume that each of N collectors will buy a packet of stickers and add any new stickers to their album. Then they attempt to swap any leftovers with the rest of their friends. The intersect function in R makes this pretty easy to code up. Every collector who finishes the album stops buying stickers.

Here’s the R code for a single simulation of the swapping algorithm, with defaults for the Euro 2016 album:

stickerswaps <- function(number.collectors=2, number.stickers=680,
pack.size=5, packs.purchased=1, target.collections=1, cutoff=50)

  # we set a flag to once a collector has completed the album
  # later we can change this to when all but one collector has completed

    for(i in 1:number.collectors)

    # After acquiring new stickers, each possible pair of collectors exchanges their swaps
    for (i in 1:number.collectors-1)
      for (j in potential.swappers)
        # each collector works out which stickers they need
        # each collector works out their swaps
        # now work out what j has for i
        # and what i has for j
        # how many do we swap?
        # update the collections and the total number swapped across all pairs
        if (number.swapped>0) {
          # NB this assumes collectors always swap the lowest number stickers first
    } # end of swaps

    # increment the number of rounds

    # calculate the number of complete collections
  } # end of while loop


What is the benefit to a collector of having a friend to swap with? The figure below compares someone collecting alone to a collector with one single friend to swap with. As I mentioned last time, the single collector has to buy about 340 packets of stickers on average. Meanwhile, someone with a sticker swapping buddy has to buy about 240 packs of stickers on average - that’s a hundred fewer packets of stickers on average. The value of a friend is about £50!

I then increased the number of collectors. As you can see from the figure below, the distribution creeps ever leftward and tightens up around the mean. The larger your friendship group, the closer you get to only having to buy enough packets of stickers to fill the album. This makes sense if the stickers are equally rare: you should be able to exchange your swaps with those belonging to your friends. Note that this shows the number of packets that the first collector has to buy.

Now let’s look at a similar graph for the penultimate collector to finish. I chose the second-to-last collector because the last person has no one to swap with. You will see that these distributions overlap a lot more. The unluckiest player in the 10 collector scenario has to buy as many stickers as the luckiest players in the 3 collector scenario. As each collector finishes it becomes an N-1 collector scenario for the remaining collectors and this will involve buying more packets.

Finally, let’s look at the distributions for how many stickers each collector has to collect when there are five of them. On average the last collector to finish has to buy about forty more packets of stickers than the first collector to finish. The final collector also has a much wider range of possible outcomes as it will depend on how close to finishing she is when her friends complete their collections.

Part 3 will look at what happens when the stickers are not equally rare.

You May Also Enjoy

Swaptastic Part 3: The Shiny App
Euro 2016 Panini Stickers
· Football, Stats, Modelling, Programming, R, Sixteen

⇠ In the space between this and that

Album Digest, June 2016 ⇢