Skip to content
Mino Dojo

Counting 7-bag: how far apart can the same piece be?

A column that puts numbers on the limits of luck in 7-bag: repeat odds, the gap until a piece returns, the longest S and Z run and the first 10 pieces.

7-bag is a very simple mechanism: put the 7 kinds of piece in a bag and draw them one at a time. Yet once you start counting, the feelings you get while playing, such as “the I never comes” or “I keep getting S and Z”, turn out to have clear upper limits and probabilities. This column lays out the 7-bag numbers that the lessons did not cover, staying within what you can check on a calculator.

A bag can come out in 5040 orders

7 pieces can be ordered in 7×6×5×4×3×2×1 = 5040 ways, and every order is equally likely. The chance that the first piece is an I is 1 in 7; the chance that it is an S, Z or O is 3 in 7 (about 43%). This is why so many openers branch with rules like “if the first piece is S, Z or O, build a different shape”: it happens too often to ignore.

The same piece twice in a row: 1 in 49

A bag holds only one of each piece, so the same piece can come twice in a row only at a bag boundary. The chance that the last piece of one bag and the first piece of the next are the same is 1 in 7.

|
An example where S comes twice in a row at the bag boundary. This happens at 1 boundary in 7.

A boundary comes only once every 7 pieces, so at any random moment the chance that the next piece is the same again is 1/7 × 1/7 = 1/49, about 2%. With a fully random generator it would happen 1 time in 7 (about 14%), so in 7-bag a repeat is quite a rare event. And the same piece never comes three times in a row.

How far apart can the same piece be?

Count the pieces from one appearance of a piece to the next appearance of the same piece. If it comes straight away, that is “1 piece later”; the farthest is “13 pieces later”. Its position in the earlier bag and its position in the next bag each have 7 equally likely values, so counting all 49 cases gives the table below.

How many pieces laterProbability
1 piece later (in a row)1/49 (about 2%)
4 pieces later4/49 (about 8%)
7 pieces later7/49 (about 14%)
10 pieces later4/49 (about 8%)
13 pieces later (the longest)1/49 (about 2%)

The probabilities form a hill with its peak at 7 pieces later. Each step of one piece away from the peak takes off 1/49, and the average is exactly 7 pieces later. Behind the obvious fact that “an I comes once every 7 pieces on average”, the real gap varies from 1 piece to 13.

When you open a well and wait for an I to score a Quad, in the worst case 12 pieces come in between. Can you stack those 12 pieces, that is 48 cells, into the 9 columns outside the well without leaving a hole? Whether to wait for the I comes down to whether your stack is low enough to absorb this worst case.

Compared with fully random

What would happen if every piece were chosen independently, each with a 1 in 7 chance?

EventFully random7-bag
The next 7 pieces include every kindAbout 0.6%100% from the start of a bag
No I for 13 pieces in a rowAbout 13%0%
The same piece twice in a rowAbout 14%About 2%
The same piece three times in a rowAbout 2%0%

With a fully random generator, roughly 1 time in 7 you would wait 13 pieces and still not get an I. Opening a well and waiting would not work as a tactic. By putting an upper limit on the swings of luck, 7-bag makes this a game in which planning is worth the effort.

S and Z in a row: 4 at most

The awkward thing in flat stacking is S and Z pieces coming one after another. In 7-bag this has an upper limit too. Each bag holds one S and one Z, so the longest run is 4 pieces: the last 2 pieces of one bag are S and Z, and the first 2 pieces of the next bag are S and Z as well.

|
The worst order: S and Z pieces 4 times in a row.

The chance that the last 2 pieces of a bag are S and Z is 1 in 21, and the chance that the first 2 pieces of the next bag are S and Z is also 1 in 21, so the chance of this worst order at any one boundary is 1 in 441. It hardly ever happens, but knowing the worst that can happen gives you a rule of thumb: “keep room to place 2 S or Z pieces and you will almost never be in trouble”.

The first 10 pieces: about 1.06 million orders

An opening perfect clear is decided by the first 10 pieces. The 7 pieces of the first bag come in 5040 orders and the first 3 pieces of the second bag in 7×6×5 = 210, which makes 5040×210 = 1,058,400 orders in total.

That looks like a lot, but for a computer it is a number that can be checked in full. When the lessons on this site give a figure such as “about 85% when every order is checked”, it is the result of counting them all in this way. 7-bag is “easy to read” not only for people but for computation as well.

Summary

  • The same piece comes twice in a row only at a bag boundary, with a probability of about 2%. It never comes three times in a row.
  • The gap between two appearances of the same piece is 1 to 13 pieces, 7 on average. If you wait for an I, in the worst case 12 pieces come in between.
  • A run of S and Z pieces is 4 long at most.
  • The first 10 pieces come in about 1.06 million orders, and all of them can be counted.