This lively and engaging textbook explains the things you have to know
in order to read empirical papers in the social and health sciences, as well
as techniques you need to build statistical models of your own. The author,
David A. Freedman, explains the basic ideas of association and regression,
and takes you through the current models that link these ideas to causality.
DescriptionnnThe well-known magician David Copperfield loves to show the following trick: a square with N rows and N columns of different pictures appears on a TV screen. Let us number all the pictures in the following order: n1nn2nn...nnNnn:nn:nn...nn:nnN*(N-1)+1nnN*(N-1)+2nn...nnN*NnnnEach member of the audience is asked to put a finger on the upper left picture (i.e., picture number one) and The Magic begins: the magician tells the audience to move the finger k1 times through the pictures (each move is a shift of the finger to the adjacent picture up, down, left or right provided that there is a picture to move to), then with a slight movement of his hand he removes some of the pictures with an exclamation "You are not there!", and ... it is true - your finger is not pointing to any of the pictures removed. Then again, he tells the audience to make k2 moves, and so on. At the end he removes all the pictures but one and smiling triumphantly declares, "I've caught you" (applause). nnJust now, David is trying to repeat this trick. Unfortunately, he had a hard day before, and you know how hard to conjure with a headache. You have to write a program that will help David to make his trick. nInputnnThe input contains a single integer number N (2<> kj when i <> j). xi,1, xi,2, ... , xi, mi are the numbers of the pictures David should remove after the audience will make ki moves (the number of the pictures removed is arbitrary, but each picture should be listed only once, and at least one picture should be removed on each turn). nnA description of the every next turn should begin with a new line. All numbers on each line should be separated by one space. After e iterations, all pictures except one should be removed. nSample Inputnn3nSample Outputnn8 4 6n13 9n10 7 1n7 8n11 3 5