// Numbas version: finer_feedback_settings {"name": "Counting by cases", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": 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.
\nNote 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$ | \nNumber of $\\var{w}$-letter words with exactly $n$ vowels | \n
| $0$ | \n[[0]] | \n
| $1$ | \n[[1]] | \n
| $2$ | \n[[2]] | \n
| $3$ | \n[[3]] | \n
| $4$ | \n[[4]] | \n
| $5$ | \n[[5]] | \n
| TOTAL | \n[[6]] | \n
", "variableReplacements": [], "useCustomName": false, "unitTests": [], "type": "gapfill", "customName": "", "gaps": [{"valuegenerators": [], "checkingAccuracy": 0.001, "vsetRangePoints": 5, "variableReplacements": [], "useCustomName": false, "unitTests": [], "type": "jme", "customName": "", "failureRate": 1, "vsetRange": [0, 1], "checkingType": "absdiff", "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "answer": "{A0}", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": "0.5", "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "scripts": {}}, {"valuegenerators": [], "checkingAccuracy": 0.001, "vsetRangePoints": 5, "variableReplacements": [], "useCustomName": false, "unitTests": [], "type": "jme", "customName": "", "failureRate": 1, "vsetRange": [0, 1], "checkingType": "absdiff", "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "answer": "{A1}", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": "0.5", "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "scripts": {}}, {"valuegenerators": [], "checkingAccuracy": 0.001, "vsetRangePoints": 5, "variableReplacements": [], "useCustomName": false, "unitTests": [], "type": "jme", "customName": "", "failureRate": 1, "vsetRange": [0, 1], "checkingType": "absdiff", "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "answer": "{A2}", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": "0.5", "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "scripts": {}}, {"valuegenerators": [], "checkingAccuracy": 0.001, "vsetRangePoints": 5, "variableReplacements": [], "useCustomName": false, "unitTests": [], "type": "jme", "customName": "", "failureRate": 1, "vsetRange": [0, 1], "checkingType": "absdiff", "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "answer": "{A3}", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": "0.5", "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "scripts": {}}, {"valuegenerators": [], "checkingAccuracy": 0.001, "vsetRangePoints": 5, "variableReplacements": [], "useCustomName": false, "unitTests": [], "type": "jme", "customName": "", "failureRate": 1, "vsetRange": [0, 1], "checkingType": "absdiff", "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "answer": "{A4}", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": "0.5", "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "scripts": {}}, {"valuegenerators": [], "checkingAccuracy": 0.001, "vsetRangePoints": 5, "variableReplacements": [], "useCustomName": false, "unitTests": [], "type": "jme", "customName": "", "failureRate": 1, "vsetRange": [0, 1], "checkingType": "absdiff", "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "answer": "{A5}", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": "0.5", "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "scripts": {}}, {"valuegenerators": [], "checkingAccuracy": 0.001, "vsetRangePoints": 5, "variableReplacements": [], "useCustomName": false, "unitTests": [], "type": "jme", "customName": "", "failureRate": 1, "vsetRange": [0, 1], "checkingType": "absdiff", "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "answer": "{total}", "showCorrectAnswer": true, "showFeedbackIcon": true, "marks": "0.5", "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "scripts": {}}], "customMarkingAlgorithm": "", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "sortAnswers": false, "marks": 0, "extendBaseMarkingAlgorithm": true, "scripts": {}}, {"stepsPenalty": 0, "variableReplacements": [], "failureRate": 1, "type": "jme", "valuegenerators": [], "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "prompt": "
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)}$.
\nThe 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
\nnumber 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}$.
\nAlternatively, it is all the words except those with no vowels
\nnumber 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]}$.
", "type": "question", "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/"}], "resources": []}]}], "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/"}]}