捡钱2009-02-18 01:21:39

1.
You are given a suit of playing cards, 13 cards—Ace through King. For the purpose of this game, consider the Ace as being worth 1, Jack 11, Queen 12 and King 13.
You are to divide the 13 cards into 2 face-down piles: a pile of 6 and a pile of 7.
Each pile is then shuffled thoroughly.
The top card from each pile is flipped and their product is calculated.
This process is then repeated 5 more times, until only one card from the pile of 7 remains face down.
The 6 products are summed up.
How do you divide the deck to maximize the expected sum of the products?

2.
There is a lie detector which can detect lies with 90% accuracy. (If a person lies, the machine will beep 90% of the time, and if a person tells the truth it will stay silent 90% of the time.) Suppose that 85% of people tell the truth.
If a person answers a question and the machine beeps, what is the probability that they are telling the truth?

3.
How many distinct ways are there to rearrange the letters in the word ‘REARRANGE’?
What if the N and the G always had to be adjacent?
4.
Let x1, x 2, x 3… x 8 be a permutation of the integers 1, 2, 3, …, 8. For each permutation, form the sum
| x 1 – x 2| + | x 3 – x 4| + | x 5 – x 6| + | x 7 – x 8|
Find the average value of all such sums.
5.
You are receiving data over a network. Packets are supposed to arrive once per millisecond. Occasionally, there is a pause of about 200 milliseconds between arrivals. What might be causing that latency? (Do not spend more than two minutes on this question.)
6.
Describe a parallel (multi-threaded) implementation of QuickSort that runs on a computer with n processors.
7.
You are debugging on an Intel x86 processor. You are looking at the following line of 16 bytes of memory dump. The values are displayed in hexadecimal notation.
0x004b56a0 56 4f 50 55 00 00 00 00 00 00 00 00 00 00 00 00 00
What data type do you think is at address 0x004b56a0?
What would the above line of memory look like if the integer 65538 was written to memory location 0x004b56a8?
9FFEA
8.
What is the purpose of each of the following C# functions?

static public double Calc(long n)
{
long z = 0;
for (long x = -n; x <= n; x++)
for (long y = -n; y <= n; y++)
if (x * x + y * y <= n * n)
z++;
return ((double)z) / (n * n)
}

static public double Calc(int n)
{
double x = 1;
double y = 1;
for (int j = 1; j < 1000; j++)
{
y = y * n / j;
x += y;
}
return x;
}
精灵宝钻2009-02-18 08:20:03
pi
捡钱2009-02-18 13:35:03
pi是倒数第二,e expotetial function最后一道。
IIIX2009-02-18 16:06:34
第一题和第二题都是和概率论有关的,我试试讲讲第一题的思路,不敢说会解题
IIIX2009-02-18 16:14:01
最后留下的是不是ace要听天由命,但是大牌分摊在两边,可能得到的
捡钱2009-02-19 01:01:42
是的, 别的题请TRY TRY.
饼干也需要爱啊2009-02-19 04:18:14
回复:第一题和第二题都是和概率论有关的,我试试讲讲第一题的思路,不敢说会解题
IIIX2009-02-19 15:07:14
嗯,这个是的。所以我只是说说思路,集体恐怕要排个式子比较一下。
IIIX2009-02-19 15:43:40
可能要把大牌均匀分摊与一边大牌多一边大牌少的所有组合情况的期望值都列出来比较一下了
饼干也需要爱啊2009-02-20 05:37:40
回复:回复:第一题和第二题都是和概率论有关的,我试试讲讲第一题的思路,不敢说会解题
IIIX2009-02-20 06:28:39
嗯,这个非常有可能是正解。不过,呵呵,科学么,光看不行。真的要
IIIX2009-02-20 06:36:44
IT方面的我爱莫能助,我不是学这个的。第三题很简单了。第二题也不是太难,但是这个题