// Numbas version: exam_results_page_options {"name": "Counting by cases", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

Suppose you have a hypothetical new alphabet with $\\var{c+v}$ letters: $\\var{c}$ consonants and $\\var{v}$ vowels.

\n

Note that the NUMBAS syntax for $C(n,r)$ is comb(n,r).

Simple counting exercise. Students are encouraged to look for the smart way of counting.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "parts": [{"vsetRangePoints": 5, "variableReplacements": [], "failureRate": 1, "type": "jme", "valuegenerators": [], "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "prompt": "

How many different $\\var{w}$-letter words can you make with this alphabet?

", "useCustomName": false, "unitTests": [], "customName": "", "vsetRange": [0, 1], "checkingType": "absdiff", "answer": "{(v+c)^w}", "marks": "0.5", "checkingAccuracy": 0.001, "scripts": {}}, {"prompt": "

Fill out the following table

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 $n$ Number of $\\var{w}$-letter words with exactly $n$ vowels $0$ [[0]] $1$ [[1]] $2$ [[2]] $3$ [[3]] $4$ [[4]] $5$ [[5]] TOTAL [[6]]
\n

How many $\\var{w}$-letter words have at least one vowel?

", "useCustomName": false, "unitTests": [], "customName": "", "vsetRange": [0, 1], "checkingType": "absdiff", "answer": "{ans3}", "steps": [{"prompt": "

It may be simpler to take the total number of words, and subtract the number of words with no vowels.

", "variableReplacements": [], "useCustomName": false, "unitTests": [], "type": "information", "customName": "", "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": 0, "extendBaseMarkingAlgorithm": true, "scripts": {}}], "marks": 1, "checkingAccuracy": 0.001, "scripts": {}}], "name": "Counting by cases", "advice": "

(a) The number of words is $(\\var{c} + \\var{v})^\\var{w} = \\var{c+v}^\\var{w}$.

\n

(b) The number of $\\var{w}$-letter words with exactly $n$ vowels is

\n

(number of ways of choosing positions of the vowels) $\\times$ (number of ways of choosing the vowels) $\\times$ (number of ways of choosing the consonants) = $\\begin{pmatrix} \\var{w} \\\\ n \\end{pmatrix} \\times \\var{v}^n \\times \\var{c}^{(\\var{w}-n)}$.

\n

The total is

\n

$\\displaystyle \\sum\\limits_{n=0}^\\var{w} \\left( \\begin{pmatrix} \\var{w} \\\\ n \\end{pmatrix} \\times \\var{v}^n \\times \\var{c}^{(\\var{w}-n)} \\right) = (\\var{v} + \\var{c})^\\var{w}$.

\n

(c) The number of words with at least one vowel is

\n

number of words with exactly one vowel + number of words with exactly two vowels + number of words with exactly three vowels + number of words with exactly four vowels + number of words with exactly five vowels = $\\var{answers[1]} + \\var{answers[2]} +\\var{answers[3]} +\\var{answers[4]} +\\var{answers[5]} = \\var{ans3}$.

\n

Alternatively, it is all the words except those with no vowels

\n

number of words $-$ number of words with exactly zero vowels = $(\\var{v} + \\var{c})^\\var{w} - \\var{c}^\\var{w} = \\var{(v+c)^w - answers[0]}$.

", "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Sean Gardiner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2443/"}]}]}], "contributors": [{"name": "Daniel Mansfield", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/743/"}, {"name": "Sean Gardiner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2443/"}]}