# Probability of having a pre-made pair in a ZZ solve?



## Anonymous (Dec 30, 2010)

So I've been thinking about this for a while, because whenever I get a pre-made pair in ZZ, I get ~17 seconds, and I can't figure out whether to consider this lucky or not. I know that most would consider it lucky in a Fridrich solve, but I would assume that it's considerably more likely to happen in ZZ than in Fridrich because ZZ blockbuilding can utilize pairs made of a corner and a D-edge, as well as normal F2L pairs.

Anyway, I can't see any simple way of calculating this- I've seen a bunch of people give the probability of an F2L pair already solved in Fridrich, but that's about as close as I can ever remember seeing. Does anyone have any ideas on how to figure this out, or better yet, the statistic itself?


----------



## Johannes91 (Jan 2, 2011)

Just to make sure I got it right, you are interested in the position just after EO-line? And the pair can be located anywhere, it just can't contain LL-pieces?

I wrote some code to enumerate all the cases and count the pairs in each one. I'm not completely sure it works correctly, but the numbers seem reasonable. I'll try to verify it later when I have more time.

First column is the number of ce-pairs. Overlapping pairs are counted separately, so a 1x2x2-block has two pairs and a 1x2x3-block has 4. Second column is the number of positions.


```
0	14795608684
1	4820053976
2	850400892
3	99977648
4	8661060
5	564376
6	28404
7	928
8	32
```

That gives a probability of *28.1%* for at least one pair.

On average, there are *0.33...* pairs. That's _exactly_ 1/3, I wonder if there's a cool reason for it...


----------



## StachuK1992 (Jan 3, 2011)

Johannes, could you perhaps publish some of this code? I'm interested in seeing how you do all of this!


----------



## Tim Reynolds (Jan 3, 2011)

Johannes91 said:


> On average, there are *0.33...* pairs. That's _exactly_ 1/3, I wonder if there's a cool reason for it...


 
I think you're correct, here's a proof:

Consider any of the F2L pairs [note that I'm calling F2L pairs any pair with a D layer corner and not one of the edges from the line]. We'll calculate the probability that that pair is formed, ignoring everything else. Pick some position for the edge to be in. Then there is exactly one position for the corner (including twist) that makes it a pair. So given any edge position, the probability that it's a pair is 1/24. So for any F2L pair, there's a 1/24 chance that pair is made. Now, there's 8 F2L pairs, and because expected value is additive, the expected number of pairs is 8*(1/24)=1/3.


----------



## EricReese (Jan 3, 2011)

Anonymous said:


> *I can't figure out whether to consider this lucky or not. I know that most would consider it lucky in a Fridrich solve,*


 
In a Fridrich solve, when people say it was lucky, they usually mean that they got to skip a step in the solve (OLL or PLL).


----------



## cuBerBruce (Jan 3, 2011)

EricReese said:


> In a Fridrich solve, when people say it was lucky, they usually mean that they got to skip a step in the solve (OLL or PLL).


 
In a Fridrich solve, a pre-made pair is not considered lucky as long as it still needs to be inserted into the correct slot.


----------



## EricReese (Jan 3, 2011)

cuBerBruce said:


> In a Fridrich solve, a pre-made pair is not considered lucky as long as it still needs to be inserted into the correct slot.


 
....thats exactly what I was saying. Even when you dont need to insert it its not considered lucky. That's just doing an xcross

Because 90% of the time, you usually have to edit your cross in order to preserve that pair....


----------



## Lucas Garron (Jan 3, 2011)

EricReese said:


> Because 90% of the time, you usually have to edit your cross in order to preserve that pair....


What does that mean, exactly?




Spoiler



Not expecting you to have an answer. Just pointing out that you should think before throwing around numbers and terms for "puzzle theory."


----------



## Anonymous (Jan 3, 2011)

Wow, thanks.

Originally, I was actually thinking of at any time during a ZZ solve, not just after EO-line, but the fact that there's already a 1/3 chance of having a pair after EO line pretty much answers my question of how uncommon it is to have one at some point during the solve.

On a seperate but related note, so you guys don't count a pre-made pair as somewhat lucky? I know it's not a "skip" in the conventional sense, but it always seemed to me that in Fridrich it was reasonably unlikely for that to happen. Maybe I was wrong.

Thanks, Johannes!


----------



## oll+phase+sync (Jan 14, 2011)

Tim Reynolds said:


> I think you're correct, here's a proof:
> 
> Consider any of the F2L pairs [note that I'm calling F2L pairs any pair with a D layer corner and not one of the edges from the line]. We'll calculate the probability that that pair is formed, ignoring everything else. Pick some position for the edge to be in. Then there is exactly one position for the corner (including twist) that makes it a pair. So given any edge position, the probability that it's a pair is 1/24. So for any F2L pair, there's a 1/24 chance that pair is made. Now, there's 8 F2L pairs, and because expected value is *additive*, the expected number of pairs is 8*(1/24)=1/3.



I was amazed by the simplicity of this proof (non ironic - I really like simply solutions)

But why additive? Consider the easy case were I already have 7 Pairs than the probability to have 8 pairs is 1/5 ( there are just 5 places left for the last edge ) instead of 1/24. This means if you are already lucky you have even better chances to get more lucky...

And if the first edge you look at is no F2L pair, it may still consume an F2L corner and chances for the next edge to be a pair are reduced.

Though even if the 1/3 is the correct answer, the proof seems wrong.


----------



## Lucas Garron (Jan 14, 2011)

oll+phase+sync said:


> I was amazed by the simplicity of this proof (non ironic - I really like simply solutions)
> 
> But why additive? Consider the easy case were I already have 7 Pairs than the probability to have 8 pairs is 1/5 ( there are just 5 places left for the last edge ) instead of 1/24. This means if you are already lucky you have even better chances to get more lucky...
> 
> ...


Linearity of expectation. Your objections are completely beside the point.


----------



## oll+phase+sync (Jan 18, 2011)

Lucas Garron said:


> Linearity of expectation.


Ups, can still remember how excited my teacher got, because this is valid for non independent variables  but seems I was less impressed.

So comparing line versus cross, line has 6 free F2L-edges with 8 "junction" points, while cross has only 4 free edges with just 4 junction point. So the expected value of line it twice as high as in the cross case.
After building a 2x1x1 block (first slot) the junctionpoint ratio is even 7 : 3 ...

But what really surprised me at first is the fact that EO has no effect on these numbers.


----------

