{"year": "2009", "tier": "T4", "problem_label": "1", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "How many ways can the integers from -7 to 7 be arranged in a sequence such that the absolute value of the numbers in the sequence is nondecreasing?", "solution": "128", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n1. [3]", "solution_match": "\nAnswer: "}} {"year": "2009", "tier": "T4", "problem_label": "1", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "How many ways can the integers from -7 to 7 be arranged in a sequence such that the absolute value of the numbers in the sequence is nondecreasing?", "solution": "Each of the pairs $a,-a$ must occur in increasing order of $a$ for $a=1, \\ldots, 7$, but $a$ can either occur before or after $-a$, for a total of $2^{7}=128$ possible sequences.", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n1. [3]", "solution_match": "\nSolution: "}} {"year": "2009", "tier": "T4", "problem_label": "2", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "Two jokers are added to a 52 card deck and the entire stack of 54 cards is shuffled randomly. What is the expected number of cards that will be between the two jokers?", "solution": "$52 / 3$", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n2. [3]", "solution_match": "\nAnswer: "}} {"year": "2009", "tier": "T4", "problem_label": "2", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "Two jokers are added to a 52 card deck and the entire stack of 54 cards is shuffled randomly. What is the expected number of cards that will be between the two jokers?", "solution": "Each card has an equal likelihood of being either on top of the jokers, in between them, or below the jokers. Thus, on average, $1 / 3$ of them will land between the two jokers.", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n2. [3]", "solution_match": "\nSolution: "}} {"year": "2009", "tier": "T4", "problem_label": "3", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "In how many ways can you rearrange the letters of \"HMMTHMMT\" such that the consecutive substring \"HMMT\" does not appear?", "solution": "361", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n3. [4]", "solution_match": "\nAnswer: "}} {"year": "2009", "tier": "T4", "problem_label": "3", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "In how many ways can you rearrange the letters of \"HMMTHMMT\" such that the consecutive substring \"HMMT\" does not appear?", "solution": "There are $8!/(4!2!2!)=420$ ways to order the letters. If the permuted letters contain \"HMMT\", there are $5 \\cdot 4!/ 2!=60$ ways to order the other letters, so we subtract these. However, we have subtracted \"HMMTHMMT\" twice, so we add it back once to obtain 361 possibilities.", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n3. [4]", "solution_match": "\nSolution: "}} {"year": "2009", "tier": "T4", "problem_label": "4", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "How many functions $f:\\{1,2,3,4,5\\} \\rightarrow\\{1,2,3,4,5\\}$ satisfy $f(f(x))=f(x)$ for all $x \\in\\{1,2,3,4,5\\}$ ?", "solution": "196", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n4. [4]", "solution_match": "\nAnswer: "}} {"year": "2009", "tier": "T4", "problem_label": "4", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "How many functions $f:\\{1,2,3,4,5\\} \\rightarrow\\{1,2,3,4,5\\}$ satisfy $f(f(x))=f(x)$ for all $x \\in\\{1,2,3,4,5\\}$ ?", "solution": "A fixed point of a function $f$ is an element $a$ such that $f(a)=a$. The condition is equivalent to the property that $f$ maps every number to a fixed point. Counting by the number of fixed points of $f$, the total number of such functions is\n\n$$\n\\begin{aligned}\n\\sum_{k=1}^{5}\\binom{5}{k} k^{5-k} & =1 \\cdot\\left(5^{0}\\right)+5 \\cdot\\left(1^{4}+4^{1}\\right)+10 \\cdot\\left(2^{3}+3^{2}\\right) \\\\\n& =1+25+10 \\cdot 17 \\\\\n& =196\n\\end{aligned}\n$$", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n4. [4]", "solution_match": "\nSolution: "}} {"year": "2009", "tier": "T4", "problem_label": "5", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "Let $s(n)$ denote the number of 1's in the binary representation of $n$. Compute\n\n$$\n\\frac{1}{255} \\sum_{0 \\leq n<16} 2^{n}(-1)^{s(n)}\n$$", "solution": "45", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n5. [4]", "solution_match": "\nAnswer: "}} {"year": "2009", "tier": "T4", "problem_label": "5", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "Let $s(n)$ denote the number of 1's in the binary representation of $n$. Compute\n\n$$\n\\frac{1}{255} \\sum_{0 \\leq n<16} 2^{n}(-1)^{s(n)}\n$$", "solution": "Notice that if $n<8,(-1)^{s(n)}=(-1) \\cdot(-1)^{s(n+8)}$ so the sum becomes $\\frac{1}{255}\\left(1-2^{8}\\right) \\sum_{0 \\leq n<8} 2^{n}(-1)^{s(n)}=$ 45.", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n5. [4]", "solution_match": "\nSolution: "}} {"year": "2009", "tier": "T4", "problem_label": "6", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "How many sequences of 5 positive integers $(a, b, c, d, e)$ satisfy $a b c d e \\leq a+b+c+d+e \\leq 10$ ?", "solution": "116", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n6. [5]", "solution_match": "\nAnswer: "}} {"year": "2009", "tier": "T4", "problem_label": "6", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "How many sequences of 5 positive integers $(a, b, c, d, e)$ satisfy $a b c d e \\leq a+b+c+d+e \\leq 10$ ?", "solution": "We count based on how many 1's the sequence contains. If $a=b=c=d=e=1$ then this gives us 1 possibility. If $a=b=c=d=1$ and $e \\neq 1$, $e$ can be $2,3,4,5,6$. Each such sequence $(1,1,1,1, e)$ can be arranged in 5 different ways, for a total of $5 \\cdot 5=25$ ways in this case.\nIf three of the numbers are 1 , the last two can be $(2,2),(3,3),(2,3),(2,4)$, or $(2,5)$. Counting ordering, this gives a total of $2 \\cdot 10+3 \\cdot 20=80$ possibilities.\n\nIf two of the numbers are 1 , the other three must be equal to 2 for the product to be under 10 , and this yields 10 more possibilities.\nThus there are $1+25+80+10=116$ such sequences.", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n6. [5]", "solution_match": "\nSolution: "}} {"year": "2009", "tier": "T4", "problem_label": "7", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "Paul fills in a $7 \\times 7$ grid with the numbers 1 through 49 in a random arrangement. He then erases his work and does the same thing again (to obtain two different random arrangements of the numbers in the grid). What is the expected number of pairs of numbers that occur in either the same row as each other or the same column as each other in both of the two arrangements?", "solution": "$147 / 2$", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n7. [7]", "solution_match": "\nAnswer: "}} {"year": "2009", "tier": "T4", "problem_label": "7", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "Paul fills in a $7 \\times 7$ grid with the numbers 1 through 49 in a random arrangement. He then erases his work and does the same thing again (to obtain two different random arrangements of the numbers in the grid). What is the expected number of pairs of numbers that occur in either the same row as each other or the same column as each other in both of the two arrangements?", "solution": "Each of the $\\binom{49}{2}$ pairs of numbers has a probability of $\\frac{14 \\cdot\\binom{7}{2}}{\\binom{49}{2}}=1 / 4$ of being in the same row or column in one of the arrangements, so the expected number that are in the same row or column in both arrangements is\n\n$$\n\\binom{49}{2} \\cdot(1 / 4)^{2}=\\frac{147}{2}\n$$", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n7. [7]", "solution_match": "\nSolution: "}} {"year": "2009", "tier": "T4", "problem_label": "8", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "There are 5 students on a team for a math competition. The math competition has 5 subject tests. Each student on the team must choose 2 distinct tests, and each test must be taken by exactly two people. In how many ways can this be done?", "solution": "2040", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n8. [7]", "solution_match": "\nAnswer: "}} {"year": "2009", "tier": "T4", "problem_label": "8", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "There are 5 students on a team for a math competition. The math competition has 5 subject tests. Each student on the team must choose 2 distinct tests, and each test must be taken by exactly two people. In how many ways can this be done?", "solution": "We can model the situation as a bipartite graph on 10 vertices, with 5 nodes representing the students and the other 5 representing the tests. We now simply want to count the number of bipartite graphs on these two sets such that there are two edges incident on each vertex.\nNotice that in such a graph, we can start at any vertex and follow one of the edges eminating from it, then follow the other edge eminating from the second vertex, etc, and in this manner we must eventually end up back at the starting vertex, so the graph is partitioned into even cycles. Since each vertex has degree two, we cannot have a 2 -cycle, so we must have either a 10 -cycle or a 4 -cycle and a 6 -cycle.\nIn the former case, starting with Person $A$, there are 5 ways to choose one of his tests. This test can be taken by one of 4 other people, who can take one of 4 other tests, which can be taken by one of 3 other people, etc, so the number of 10 -cycles we obtain in this way is $5!\\cdot 4!$. However, it does not matter which of the first person's tests we choose first in a given 10 -cycle, so we overcounted by a factor of 2 . Thus there are $5!\\cdot 4!/ 2=1440$ possibilities in this case.\nIn the latter case, there are $\\binom{5}{3}^{2}=100$ ways to choose which three people and which three tests are in the 6 -cycle. After choosing this, a similar argument to that above shows there are $2!\\cdot 1!/ 2$ possible 4 -cycles and $3!\\cdot 2!/ 2$ possible 6 -cycles, for a total of $100 \\cdot 1 \\cdot 6=600$ possibilities in this case.\nThus there are a total of 2040 ways they can take the tests.", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n8. [7]", "solution_match": "\nSolution: "}} {"year": "2009", "tier": "T4", "problem_label": "9", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "The squares of a $3 \\times 3$ grid are filled with positive integers such that 1 is the label of the upperleftmost square, 2009 is the label of the lower-rightmost square, and the label of each square divides the one directly to the right of it and the one directly below it. How many such labelings are possible?", "solution": "2448", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n9. [5]", "solution_match": "\nAnswer: "}} {"year": "2009", "tier": "T4", "problem_label": "9", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "The squares of a $3 \\times 3$ grid are filled with positive integers such that 1 is the label of the upperleftmost square, 2009 is the label of the lower-rightmost square, and the label of each square divides the one directly to the right of it and the one directly below it. How many such labelings are possible?", "solution": "We factor 2009 as $7^{2} \\cdot 41$ and place the 41 's and the 7 's in the squares separately. The number of ways to fill the grid with 1 's and 41 's so that the divisibility property is satisfied is equal to the number of nondecreasing sequences $a_{1}, a_{2}, a_{3}$ where each $a_{i} \\in\\{0,1,2,3\\}$ and the sequence is not $0,0,0$ and not $1,1,1$ (here $a_{i}$ corresponds to the number of 41 's in the $i$ th column.) Thus there are $\\binom{3+4-1}{3}-2=18$ ways to choose which squares are divisible by 41 .\nTo count the arrangements of divisibility by 7 and 49 , we consider three cases.\nIf 49 divides the middle square, then each of the squares to the right and below it are divisible 49. The two squares in the top row (besides the upper left) can be $(1,1),(1,7),(1,49),(7,7),(7,49)$, or $(49,49)$ (in terms of the highest power of 7 dividing the square). The same is true, independently, for the two blank squares on the left column, for a total of $6^{2}=36$ possibilities in this case.\nIf 1 is the highest power of 7 dividing the middle square, there are also 36 possibilities by a similar argument.\nIf 7 is the highest power of 7 dividing the middle square, there are 8 possibilities for the upper right three squares. Thus there are 64 possibilities in this case.\nThus there are a total of 136 options for the divisibility of each number by 7 and $7^{2}$, and 18 options for the divisibility of the numbers by 41 . Since each number divides 2009 , this uniquely determines the numbers, and so there are a total of $18 \\cdot 136=2448$ possibilities.", "metadata": {"resource_path": "HarvardMIT/segmented/en-122-2009-feb-comb-solutions.jsonl", "problem_match": "\n9. [5]", "solution_match": "\nSolution: "}} {"year": "2009", "tier": "T4", "problem_label": "10", "problem_type": "Combinatorics", "exam": "HMMT", "problem": "Given a rearrangement of the numbers from 1 to $n$, each pair of consecutive elements $a$ and $b$ of the sequence can be either increasing (if $a