diff --git a/Intermediate/Combinatorics/main.tex b/Intermediate/Combinatorics/main.tex new file mode 100755 index 0000000..41df0fd --- /dev/null +++ b/Intermediate/Combinatorics/main.tex @@ -0,0 +1,250 @@ +% https://git.betalupi.com/Mark/latex-packages +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +% Last built with version 1.1.0 +\documentclass[solutions]{ormc_handout} + +\newcommand{\nck}[2] { + \ensuremath{ + {}_{#1}C_{#2} + } +} + +\newcommand{\npk}[2] { + \ensuremath{ + {}_{#1}P_{#2} + } +} + + +\begin{document} + + \maketitle + + + {Combinatorics} + {Prepared by Mark on \today} + + \section{Getting started} + + An ordered arrangement of objects is called a \textit{permutation}. An unordered selection\footnotemark of objects is called a \textit{combination}. All the following problems involve permutations.\\ + + \footnotetext{A ``combination lock'' cares about the order of its digits, so its name is inaccurate. Such an object is actually a \textit{permutation} lock!} + + + \problem{} + How many different ways are there to rearrange the letters ABCDE? \\ + + \begin{solution} + $5 \times 4 \times 3 \times 2 \times 1 = 120$ + \end{solution} + + \vfill + + \problem{} + How many different ways are there to arrange the letters ABCDEFG...XYZ? \\ + The answer is a \textit{very} big number. You should not fully resolve your answer. \\ + \hint{When you see a problem that's as big as this one, it's often wise to try and understand a simpler case first. Look at \ref{ABCDE} again, and try to create a general strategy.} + + + \begin{instructornote} + A hint for students that are stuck: \\ + In \ref{ABCDE}, start with five blank spaces. How many choices are there for A's position? \\ + Once A is placed, how many are left for B? + \end{instructornote} + + \vfill + \pagebreak + + \definition{} + The \textit{factorial} of a positive integer $x$ is $x \times (x-1) \times ... \times 1$. We denote this $x!$. \\ + For example, $8! = 8 \times 7 \times 6 \times 5 \times 4 \times 3 \times 2 \times 1 = 40320$. + + \problem{} + Compute $\frac{10!}{8!}$ + \vfill + + \problem{} + Convince yourself that $(n+1)! = n! \times (n+1)$, and use this fact to show that $0! = 1$. + \vfill + + \problem{} + How many ways are there to choose three student council officers from a class of 20 students? \\ + How many ways are there to choose a president, a vice-president, and a treasurer from the same class? \\ + \hint{You answers should be different. In which case does order matter?} + + \begin{instructornote} + Have your students consider the non-unique arrangements and count how many are redundant. + \end{instructornote} + + \vfill + \pagebreak + + \problem{} + Say you have 4 red balls and 3 green balls. How many different ways can you arrange them on the table in font of you? \\ + + \begin{solution} + Consider the sequence RRRRGGG. There are $4!$ ways to rearrange the red balls, and $3!$ ways to rearrange the green balls. This is true for any sequence. \\ + + So, our solution is $\frac{7!}{3!4!}$. + \end{solution} + + \vfill + + \problem{} + How many \textit{unique} anagrams can we create from the word CRESCENDO? + + + \begin{solution} + CRESCENDO = CC EE RSNDO, our solution is $\frac{9!}{2!2!} = 90720$ + \end{solution} + \vfill + + \problem{}<3fromABCDE> + Given the letters ABCDE, how many different three-letter words can we make without repeating letters? + \vfill + \pagebreak + + \section{Permutations} + + It would be convenient to have a general tool for counting permutations. Let us try to create one. \\ + (Remember, permutations are \textit{ordered} arrangements of objects.) + + First, let's create a function $\npk{n}{k}$, which tells us how many $k$-object permutations we can choose from a group of $n$ objects. + + \problem{} + What is $\npk{5}{3}$? \\ + \hint{See \ref{3fromABCDE}} + + + \vfill + ``Choosing $k$ items from $n$'' is a lot like splitting our $n$ objects into two groups: those we choose, and those we don't. \\ + + \begin{center} + \begin{tikzpicture} + % Points + \path [draw=black, fill=black] (0,0) circle (5pt); + \path [draw=black, fill=black] (1,0) circle (5pt); + \path [draw=black, fill=white] (2,0) circle (5pt); + + % "Choose these" bracket + \draw[shift={(-0.5, -1)}, color=orange, thick] (0pt,0pt) -- (0pt,3pt); + \draw[color=orange, thick] (-0.5, -1) -- (2.5, -1) node[below, midway] {Choose $k$ objects}; + \draw[shift={(2.5, -1)}, color=orange, thick] (0pt,0pt) -- (0pt,3pt); + + + \draw[-] (3, -0.5) -- (3, 0.5); + + \path [draw=black, fill=white] (4,0) circle (5pt); + \path [draw=black, fill=black] (5,0) circle (5pt); + + % "Leave these" bracket + \draw[shift={(3.5, -1)}, color=orange, thick] (0pt,0pt) -- (0pt,3pt); + \draw[color=orange, thick] (3.5, -1) -- (5.5, -1) node[below, midway] {Leave the rest}; + \draw[shift={(5.5, -1)}, color=orange, thick] (0pt,0pt) -- (0pt,3pt); + \end{tikzpicture} + \end{center} + + If we rearrange these, we get different permutations. How can we count them? + + \problem{} + Using the above diagram, create a formula for $\npk{n}{k}$. \\ + \hint{We're counting \textit{permutations}, so the order of items in the first group matters.} + + \begin{solution} + $\npk{n}{k}= \frac{n!}{(n-k)!}$ + + There are $n!$ possible arrangements of $n$ objects. However, since the order of the elements not chosen does not matter, we'll end up with $(n-k)!$ redundant orderings of each. + \end{solution} + + + \vfill + \pagebreak + + \section{Combinations} + + Now, let's count \textit{combinations}. \\ + Here, we care about \textit{which} items we choose, but not \textit{how} we choose them. We'll make a function $\nck{n}{k}$, or \textit{``n choose k''}. This will tell us how many different ways we can choose $k$ items from a set of $n$. + + \problem{} + Find an expression for $\nck{n}{k}$ by modifying your definition of $\npk{n}{k}$. + + + \vfill + + Usually, $\nck{n}{k}$ is written as $\binom{n}{k}$. This is also called the \textit{binomial coefficient}. + + \section{Applications} + + \problem{} + Use the meaning of \nck{n}{k} to explain why $\nck{n}{k} = \nck{n}{n - k}$ + + \vfill + + \problem{} + Use the formula of $\nck{n}{k}$ to explain why $\nck{n}{k} = \nck{n}{n - k}$ + + \vfill + + \problem{} + How many ways can a class of 27 people be seated in 30 seats? + + \vfill + \pagebreak + + + \problem{} + The following is the map of a city. Each line is a one-way road, you can only drive up or right. \\ + How many different paths can you take from A to B? \\ + How many of them go through the center point? \\ + + \begin{tikzpicture} + \draw [step=0.5,gray] (0,0) grid (7*0.5,4*0.5); + + \path [draw=black, fill=black] (0 * 0.5, 0 * 0.5) circle (2pt) node[below] {A}; + \path [draw=black, fill=black] (3 * 0.5, 2 * 0.5) circle (2pt); + \path [draw=black, fill=black] (7 * 0.5, 4 * 0.5) circle (2pt) node[above] {B}; + \end{tikzpicture} + + \vfill + + \problem{} + How many ways can you put 19 identical balls into 6 bins, so that no bin is empty? + + \vfill + + \problem{} + Given an exam with 4 problems, how many ways are there to assign positive point values to each problem so that the exam contains a total of 100 points? + + \vfill + + \problem{} + How many ways can we split the number 2016 into a sum of positive integers? + + \vfill + + \problem{} + A staircase must be built up a wall. It will start 4.5 meters away from the wall, which is 1.5 meters tall. The height of each step is exactly 30 centimeters. The width of each step must be an integer multiple of 50 centimeters. In how many ways can the staircase be constructed? + + \vfill + \pagebreak + + \section{Bonus problems} + + \problem{} + A toy consists of a ring with 3 red beads and 7 blue beads on it. If two configurations of beads differ only by rotations and reflections, they are considered the same toy. How many different toys are there? + + \vfill + + \problem{} + At a math circle meeting, 10 students are given 10 problems. Any two students solved a different number of problems, and every problem is solved by the same number of students. Yan solved problems 1 through 5, but did not solve problems 6 through 9. Did he solve problem 10? + + \vfill + + \problem{} + A stressed-out student consumes at least one espresso every day of a particular year, drinking $500$ overall. Prove that on some consecutive sequence of whole days the student drinks exactly $100$ espressos. + \note{This problem is significantly harder than anything else in the handout.} + + \vfill + +\end{document} diff --git a/Intermediate/Probability/main.tex b/Intermediate/Probability/main.tex new file mode 100755 index 0000000..b0702c8 --- /dev/null +++ b/Intermediate/Probability/main.tex @@ -0,0 +1,343 @@ +% https://git.betalupi.com/Mark/latex-packages +% use [nosolutions] flag to hide solutions. +% use [solutions] flag to show solutions. +% Last built with version 1.1.0 +\documentclass[solutions]{ormc_handout} + + +% Quick P() macro. +% \P is already defined, +% but we won't need it in this doc. +\renewcommand{\P}[1] {P(#1)} +\newcommand{\Pt}[1] { + \ensuremath{\P{\text{#1}}} +} + +\begin{document} + + \maketitle + + + {Probability} + { + Prepared by Mark on \today \\ + Based on a handout by Oleg Gleizer + } + +\problem{} +A Zoo manager thinks of a way +to set up a new pavilion. +He has 7 different plants +and 12 different animals. \\ + +\begin{itemize} + \item How many ways are there to choose two animals and three plants? + \vfill + \item The manager finds that he only has 5 exhibits available. How many different sets of animals can he choose, if only one can be in each exhibit time? + \vfill +\end{itemize} + +\problem{} +How many different 7-symbol license plates are possible if the first three symbols are letters and the remaining four are digits 0-9? \\ +\hint{Symbols can repeat, but letters must be uppercase} +\vfill + +\pagebreak + +\problem{} +There are two plates on a table. +One plate has 10 identical candies, +the other has 8 different fruits. \\ + +\begin{itemize} + \item How many ways are there to choose one candy? + \vfill + \item How many ways are there to choose seven candies? + \vfill + \item How many ways are there to choose five fruits? + \vfill + \item How many ways are there to choose three candies and six fruits? + \vfill + \item Gregory chooses two fruits and two candies, and lines up the four objects on the table. In how many ways can he do it? + \vfill + \item Gregory chooses five fruits and seven candies, and lines up the twelve objects on the table. In how many ways can he do it? + \vfill +\end{itemize} + + +\pagebreak + + + +\vspace{190pt} + +\pagebreak + +\begin{center} +\section{Probability} +\end{center} +\vspace{10pt} + +A \textit{probability}, also known as a \textit{chance}, is a number showing how likely some event is to happen. Let us call the event $X$. Then the probability of $X$ taking place is + +$$ +\P{X} = \frac{ + \text{The number of the outcomes such that $X$ happens.} +}{ + \text{The number of all the possible outcomes.} +} +$$ + +Note that by definition, $0 \leq P(X) \leq 1$. \\ + +In some of the following problems, we will be flipping a coin. Let us use $H$ to represent the event of the coin landing heads, and $T$, the event of the coin landing tails. + + +\problem{} +Compute each of the following: +\begin{enumerate} + \item \Pt{Rolling a six-sided die and getting 2} + \item \Pt{Flipping a coin twice and getting the sequence HH} + \item \Pt{Flipping a coin twice and getting one head and one tail in any order} + \item \Pt{Rolling two six-sided dice and getting a sum of 5} +\end{enumerate} + + +\vfill +\pagebreak + +Some parts of the previous problem involve repeated trials: two dice, or two coins. You may have solved these by listing out all the possible outcomes. Though this simple approach works for small problems, it isn't particularly useful for larger ones: ten coin flips create 1024 possible outcomes, and ten dice rolls, 60466174. + +\medskip + +A better way to think about repeated trials is as a ``tree,'' where each outcome represents a path. The following tree represents two coin flips, and the four paths down it (from left to right) correspond to the four possible outcomes: HH, HT, TH, TT. + +% Ugly hack +\tikzstyle{level 1}=[level distance=3.5cm, sibling distance=3.5cm] +\tikzstyle{level 2}=[level distance=3.5cm, sibling distance=2cm] +\tikzstyle{split} = [text width=1em, text centered] +\tikzstyle{tsplit} = [text width=0, text centered] +\tikzstyle{end} = [minimum width=3pt, inner sep=0pt] + +\begin{center} + \begin{tikzpicture}[grow=right] + \node[tsplit] {} + child { + node[split] {T} + child { + node[end, label=right:{T\ \ \ (TT)}] {} + edge from parent + } + child { + node[end, label=right:{H\ \ \ (TH)}] {} + edge from parent + } + edge from parent + } + child { + node[split] {H} + child { + node[end, label=right:{T\ \ \ (HT)}] {} + edge from parent + } + child { + node[end, label=right:{H\ \ \ (HH)}] {} + edge from parent + } + edge from parent + }; +\end{tikzpicture} +\end{center} + +If we label each edge with the probability of each event, we can calculate the probability of each outcome by multiplying the edges we passed: + +\begin{center} + \begin{tikzpicture}[grow=right] + \node[tsplit] {} + child { + node[split] {T} + child { + node[end, label=right:{T\ \ \ ({TT, $\frac{1}{4}$})}] {} + edge from parent + node[below] {$\frac{1}{2}$} + } + child { + node[end, label=right:{H\ \ \ ({TH, $\frac{1}{4}$})}] {} + edge from parent + node[below] {$\frac{1}{2}$} + } + edge from parent + node[below] {$\frac{1}{2}$} + } + child { + node[split] {H} + child { + node[end, label=right:{T\ \ \ ({HT, $\frac{1}{4}$})}] {} + edge from parent + node[below] {$\frac{1}{2}$} + } + child { + node[end, label=right:{H\ \ \ ({HH, $\frac{1}{4}$})}] {} + edge from parent + node[below] {$\frac{1}{2}$} + } + edge from parent + node[below] {$\frac{1}{2}$} + }; +\end{tikzpicture} +\end{center} + +We can formalize this idea as follows: + +\proposition{} +If we have two independent events $A$ and $B$, then $\Pt{A and B} = \P{A} \times \P{B}$. \\ +Usually we write $\Pt{A and B}$ as $\P{A \cap B}$. \\ + +\vfill + +Here's another important thought: + +\proposition{} +If the probability of event $A$ happening is $\P{A}$, the probability of $A$ \textit{not} happening is $1 - \P{A}$ + +\pagebreak + +\problem{} +There are three cans of white paint and two cans of black paint in a dark storage room. You take two cans out without looking. What is the probability that you'll choose two cans of the same color? +\vfill + +\problem{} +Hospital records show that of patients +suffering from a certain disease, +75\% die of it. What is the probability +that of 5 randomly selected patients, +4 will recover? \\ +\hint{What is the probability of a patient recovering?} +\vfill + +\problem{} +When Oleg calls his daughter Anya, +the chance of the call getting through is 60\%. +How likely is it to have at least one connection +in four calls? +\vfill + +\problem{} +The chance of a runner to improve +his own personal record in a race is $p$. +What is the probability that his record will improve after 3 races? +\vfill + +\newpage + +\problem{} +You toss a pair of fair dice five times. +What is the probability that you get a sum of ten exactly two times? +\vfill + +\problem{} +You toss a pair of fair dice five times. +What is the probability that you get ten +at least twice? +\vfill + +\problem{} +A fair coin is tossed 4 times. What is the chance of getting more heads than tails? +\vfill + + + +\problem{} +A pharmaceutical study shows that a new drug causes negative side effects in 3 of every 100 patients. +To check the number, a researcher chooses 5 random people to survey. +Assuming the study is accurate, what is the probabilty of the following? \\ + +\begin{enumerate} + \item None of the five patients experience side effects. + \item At least two experience side effects. +\end{enumerate} + +\vfill +\pagebreak + +\problem{} +You pick up a natural number (positive integer) +at random. What is the probability +that the number is divisible by either two +or three? + +\vfill + +\problem{} +Three players are tossing a fair coin. +The first to have a HEAD wins. +What are the players' chances of winning? + +\vfill + +\section{Harder Probabilities} + +\problem{} +Oleg wrote ten letters to Math Circle parents +and addressed the ten envelopes. However, he +left the final stages of mailing to a careless clerk who +didn't pay attention, inserting the letters +into the envelopes at random. +(However, he did manage to fit exactly +one letter in each envelope.) +What is the probability that exactly nine of +the ten letters is correctly addressed? + +\vfill + +\problem{} +On a sold-out flight, the first person to +board the plane forgot which seat was his +and chose a random seat. Subsequent passengers +took their assigned seat if available, or a +randomly chosen seat if not. When the last +person boards, there is only one seat left. +What is the probability that this was the +seat assigned to the last passenger? + +\vfill +\pagebreak + +\problem{} +Your new neighbor has two children. +Assuming that it is equally likely +for a child to be a boy or a girl, +what is the probability that both +of the neighbor's children are girls? +Does the probability change if you +discover that one of the children +is indeed a girl? If so, how? + +\vfill + + +\problem{} +A bag contains a marble which is either +black or white --- but we don't know which. +We put a white marble into the bag and shake it. +We then draw out a white marble. +What is the probability that the marble +left inside the bag is also white? + +\vfill + +\problem{The Monty Hall Problem} +You are a contestant on a certain game show. +There are three doors. +Behind one door is a brand-new car. +Behind the other two doors are goats. +You are invited to choose one of the doors. +Before opening the selected door, the game show host +opens one of the other two doors, revealing a goat. +You can now either keep your (original) +choice, or switch to the other unopened door. +Which choice gives you a better chance of winning +the car? Does it matter? Explain your answer. +\vfill + +\end{document} \ No newline at end of file