public static void combi(int n)
{
if(n<=18 || n>=136)
{
return;
}
//there're 5 situations for dasixi
// 1. each of 4 wind tile have 3 same tiles but not all 4
//denominator is 136 choose n
double denominator = Combinatorics.Combinations(136, n);
double numerator = 4*4*4*4;
numerator *= Combinatorics.Combinations(120,n-12) - Combinatorics.Combinations(30,n-12)*Math.Pow(4,n-12);
// 2. 1 of 4 wind, have 4 same tiles as a Gong, other 3 have 3 same tiles
double numerator1 = Combinatorics.Combinations(4,1) *4*4*4;
numerator1 *= Combinatorics.Combinations(120,n-13) - Combinatorics.Combinations(30,n-13)*Math.Pow(4,n-13);
numerator += numerator1;
// 3. 2 of 4 wind, have 4 same tiles as a Gong, other 2 have 3 same tiles
double numerator2 = Combinatorics.Combinations(4,2) *4*4;
numerator2 *= Combinatorics.Combinations(120,n-14) - Combinatorics.Combinations(30,n-14)*Math.Pow(4,n-14);
numerator += numerator2;
// 4. 3 of 4 wind, have 4 same tiles as a Gong, other 1 have 3 same tiles
double numerator3 = Combinatorics.Combinations(4,3) *4;
numerator3 *= Combinatorics.Combinations(120,n-15) - Combinatorics.Combinations(30,n-15)*Math.Pow(4,n-15);
numerator += numerator3;
// 5. 4 of 4 wind, have 4 same tiles as a Gong
double numerator4 = Combinatorics.Combinations(4,4);
numerator4 *= Combinatorics.Combinations(120,n-16) - Combinatorics.Combinations(30,n-16)*Math.Pow(4,n-16);
numerator += numerator4;
double result = numerator/denominator;
//console write result as percentage
Console.WriteLine(string.Format("{1} -- {0:P}", result,n));
}
I worried all the past week. I didn’t know why until I figured it out on Sunday, when I took a bath without any of my screens.
Ramp season is over for 2023, it’s been the summer break and the innovation season is coming after it. this is the 3rd year @Apple and I used to it. therefore my body feel tired when my spirit loosed.
But I can’t stop last week since emergency happened, my body is eager to break. the contradiction makes me worry.
is it the RC? I don’t think so. I realized the panic is not for the routine work, but from my vision.
I decided to go South Asia for my career in next decade, I believe it’s the trending that can’t be reversed. I decided to take the advantage as many people did 30 years ago, people from Hong Kong, Taiwan, Singapore, they came to Mainland with new mindset. They grow up with those new factories in China.
I was panic because I’m not ready, nobody can. People always do something they’re not prepared, especially when they want to ahead of others. I will do it which means I should do something for it. I was panic because of I didn’t.
It’s easy when I realized the root cause, just did something be prepared. Here’re the things:
it’s been 30 years since the supply chain shift to China, read books or papers.
how to manage the supply chain? what’s the theory? why it’s the trending South Asia?
What is South Asia? there’re 10 countries, they have difference political, religion, languages, why they were an alien?
history of Vietnam, why Vietnam is the first target when supply chain need a new factory.