// Numbas version: finer_feedback_settings {"metadata": {"description": "
Find the lowest common multiple and highest common factors of given numbers. Also a question on identifying prime numbers.
", "licence": "Creative Commons Attribution 4.0 International"}, "timing": {"timeout": {"action": "none", "message": ""}, "allowPause": true, "timedwarning": {"action": "none", "message": ""}}, "name": "Divisibility and factors of integers", "navigation": {"browse": true, "onleave": {"action": "none", "message": ""}, "preventleave": true, "showfrontpage": true, "allowregen": true, "reverse": true, "showresultspage": "oncompletion"}, "showQuestionGroupNames": false, "question_groups": [{"pickQuestions": 1, "pickingStrategy": "all-ordered", "name": "Group", "questions": [{"name": "Lowest common multiples: train timetable example", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}], "rulesets": {}, "functions": {"newtime": {"parameters": [["minutes", "number"]], "language": "javascript", "type": "string", "definition": "var newdate = new Date(1970,1,1,12,minutes,00);\nmins = (newdate.getMinutes() < 10) ? (\"0\" + newdate.getMinutes()) : newdate.getMinutes();\nhrs = newdate.getHours();\nreturn hrs+':'+mins\n"}}, "ungrouped_variables": ["c", "d", "lcm1"], "metadata": {"description": "Two trains arrive at the same platform with different periods. Compute the LCM of the two periods to find the time they clash.
\nThis is a context question testing the student's ability to identify the lowest common multiple of two integer values which are not multiples of each other.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "variable_groups": [], "advice": "Trains intended for platform A arrive at every multiple of $\\var{c}$ minutes after midday. Trains intended for platform B arrive at every multiple of $\\var{d}$ minutes after midday. There will be a clash when these times coincide.
\nThe first such time is the lowest common multiple of $\\var{c}$ and $\\var{d}$.
\nTo calculate the lowest common multiple of two numbers, you first need to calculate a list of common multiples for the individual numbers and then look for numbers that appear in both lists.
\nMultiples of $\\var{c}$ are $\\var{c}, \\var{2c}, \\var{3c}, \\var{4c}, \\var{5c}$, $\\var{6c}$, $\\var{7c}$, $\\var{8c}$, $\\var{9c}$, $\\var{10c}$, $\\var{11c}$, $\\var{12c}$...
\nMultiples of $\\var{d}$ are $\\var{d}, \\var{2d}, \\var{3d}, \\var{4d}, \\var{5d}$, $\\var{6d}$, $\\var{7d}$, $\\var{8d}$, $\\var{9d}$, $\\var{10d}$, $\\var{11d}$, $\\var{12d}$...
\nThe first number which appears in both lists is $\\var{lcm1}$. This is the lowest common multiple of $\\var{c}$ and $\\var{d}$.
\nThis means that there will be a clash in the arrival timetable at {newtime(lcm1)}, $\\var{lcm1}$ minutes after midday.
", "statement": "A small train station hosts 2 north-bound platforms, platforms A and B.
\nScheduled trains arrive at platform A every $\\var{c}$ minutes, and at platform B every $\\var{d}$ minutes. The trains arrive and depart in less than a minute.
\nAt midday, trains arrive simultaneously at both platforms. Immediately after they depart, an electrical fault causes platform A to become unusable and the entirety of the arriving trains are diverted to arrive at platform B.
", "preamble": {"js": "", "css": ""}, "variables": {"c": {"templateType": "anything", "description": "", "name": "c", "group": "Ungrouped variables", "definition": "random(8..11)"}, "lcm1": {"templateType": "anything", "description": "", "name": "lcm1", "group": "Ungrouped variables", "definition": "lcm(c,d)"}, "d": {"templateType": "anything", "description": "", "name": "d", "group": "Ungrouped variables", "definition": "random(6..11 except c)"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "How long after midday will it be before there is a clash in the arrival timetable?
\n[[0]] minutes
", "gaps": [{"variableReplacementStrategy": "originalfirst", "marks": "3", "scripts": {}, "correctAnswerStyle": "plain", "type": "numberentry", "correctAnswerFraction": false, "maxValue": "lcm1", "allowFractions": false, "minValue": "lcm1", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "notationStyles": ["plain", "en", "si-en"], "mustBeReducedPC": 0}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}], "tags": ["lowest common multiples", "taxonomy"], "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Lowest common multiples", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}, {"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}], "rulesets": {}, "functions": {}, "ungrouped_variables": [], "metadata": {"description": "This is a simple question testing the student on their ability to calculate the lowest common multiple of two integers which are:
\nPart a) - coprime;
\nPart b) - where the greatest common divisor between the two integers is greater than one and not equal to either given number; and
\nPart c) - where one of the integer is a multiple of the other.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "variable_groups": [{"variables": ["a", "b", "lcm_ab"], "name": "part c"}, {"variables": ["c", "d", "lcm_cd"], "name": "part a"}, {"variables": ["f", "g", "lcm_fg", "gcd_fg"], "name": "part b"}], "advice": "Here are the times tables for $\\var{a}$ and $\\var{b}$.
\n$\\var{a}$ | \n$\\var{2a}$ | \n$\\var{3a}$ | \n$\\var{4a}$ | \n$\\var{5a}$ | \n$\\var{6a}$ | \n$\\var{7a}$ | \n$\\var{8a}$ | \n$\\var{9a}$ | \n$\\var{10a}$ | \n$\\var{11a}$ | \n$\\var{12a}$ | \n$\\var{13a}$ | \n
$\\var{b}$ | \n$\\var{2b}$ | \n$\\var{3b}$ | \n$\\var{4b}$ | \n$\\var{5b}$ | \n$\\var{6b}$ | \n$\\var{7b}$ | \n$\\var{8b}$ | \n$\\var{9b}$ | \n$\\var{10b}$ | \n$\\var{11b}$ | \n$\\var{12b}$ | \n$\\var{13b}$ | \n
The first number which appears in both lists is $\\var{a*b}$.
\nAlternately, notice that $\\var{a}$ and $\\var{b}$ don't have any factors in common, so their greatest common divisor is $1$. So the lowest common multiple is just the product of the two numbers.
\n\nThe lowest common multiple of $\\var{f}$ and $\\var{g}$ will be the product of the two numbers, divided by the greatest common divisor.
\nThe greatest common divisor of $\\var{f}$ and $\\var{g}$ is $\\var{gcd_fg}$.
\nTherefore, the lowest common multiple will is
\n\\[\\frac{\\var{f}\\times\\var{g}}{\\var{gcd_fg}}=\\var{lcm_fg}\\text{.}\\]
\n$\\var{d}$ is a multiple of $\\var{c}$, as $\\var{d/c}\\times\\var{c}=\\var{d}.$
\nThe lowest common multiple of $\\var{c}$ and $\\var{d}$ will therefore be $\\var{d/c} \\times \\var{c} = 1 \\times \\var{d} = \\var{d}$.
", "statement": "The lowest common multiple of two numbers is the first number which appears in both numbers' times tables.
", "preamble": {"js": "", "css": ""}, "variables": {"a": {"templateType": "anything", "description": "", "name": "a", "group": "part c", "definition": "random([2,3,5,7,11,13])"}, "lcm_fg": {"templateType": "anything", "description": "", "name": "lcm_fg", "group": "part b", "definition": "lcm(f,g)"}, "lcm_ab": {"templateType": "anything", "description": "", "name": "lcm_ab", "group": "part c", "definition": "lcm(a,b)"}, "c": {"templateType": "anything", "description": "", "name": "c", "group": "part a", "definition": "random(2..10)"}, "lcm_cd": {"templateType": "anything", "description": "", "name": "lcm_cd", "group": "part a", "definition": "lcm(c,d)"}, "g": {"templateType": "anything", "description": "", "name": "g", "group": "part b", "definition": "random([10,12,14,16,18,22,27] except f)"}, "gcd_fg": {"templateType": "anything", "description": "", "name": "gcd_fg", "group": "part b", "definition": "gcd(f,g)"}, "b": {"templateType": "anything", "description": "", "name": "b", "group": "part c", "definition": "random([2,3,5,7,11,13] except a)"}, "f": {"templateType": "anything", "description": "", "name": "f", "group": "part b", "definition": "random([10,12,14,16,18,22])"}, "d": {"templateType": "anything", "description": "", "name": "d", "group": "part a", "definition": "random(2..6)*c"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "lcm_ab", "allowFractions": false, "prompt": "What is the lowest common multiple of $\\var{a}$ and $\\var{b}$?
", "mustBeReducedPC": 0, "minValue": "lcm_ab", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "lcm_fg", "allowFractions": false, "prompt": "What is the lowest common multiple of $\\var{f}$ and $\\var{g}$?
", "mustBeReducedPC": 0, "minValue": "lcm_fg", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "notationStyles": ["plain", "en", "si-en"], "maxValue": "lcm_cd", "allowFractions": false, "prompt": "What is the lowest common multiple of $\\var{c}$ and $\\var{d}$?
", "mustBeReducedPC": 0, "minValue": "lcm_cd", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "marks": 1, "showCorrectAnswer": true}], "tags": ["lowest common multiples", "taxonomy"], "variablesTest": {"maxRuns": 100, "condition": ""}}, {"name": "Prime numbers", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Chris Graham", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/369/"}], "variable_groups": [{"variables": ["a", "b", "d", "f", "h", "j", "k", "sqrtd", "hlist"], "name": "Part b"}], "preamble": {"js": "", "css": ""}, "type": "question", "parts": [{"minAnswers": 0, "answers": ["Prime
", "Composite
"], "showCorrectAnswer": true, "shuffleAnswers": false, "minMarks": 0, "maxMarks": 0, "displayType": "radiogroup", "showFeedbackIcon": true, "marks": 0, "maxAnswers": 0, "type": "m_n_x", "layout": {"expression": "", "type": "all"}, "steps": [{"variableReplacementStrategy": "originalfirst", "type": "information", "showCorrectAnswer": true, "marks": 0, "variableReplacements": [], "scripts": {}, "showFeedbackIcon": true, "prompt": "A number that only has two factors - itself and 1 - is known as a prime number.
\nA number that can be divided without remainder by numbers other than itself and 1 is known as a composite number.
"}], "variableReplacementStrategy": "originalfirst", "matrix": [["1", 0], ["1", 0], [0, "1"], ["1", "0"], ["0", "1"], [0, "1"], ["1", "0"]], "warningType": "none", "scripts": {}, "choices": ["$\\displaystyle\\var{b}$
", "$\\displaystyle\\var{k}$
", "$\\displaystyle\\var{f}$
", "$\\displaystyle\\var{a}$
", "$\\displaystyle\\var{d}$
", "$\\displaystyle\\var{h}$
", "$\\displaystyle\\var{j}$
"], "shuffleChoices": false, "variableReplacements": [], "stepsPenalty": 0}], "advice": "\n\nThe numbers and their factors are given below:
\nNumber | \nPrime/Composite | \nFactors | \n
$\\var{b}$ | \nPrime | \n$1$, $\\var{b}$ | \n
$\\var{k}$ | \nPrime | \n$1$, $\\var{k}$ | \n
$\\var{f}$ | \nComposite | \n$1$, $2$, $\\var{f/2}$, $\\var{f}$ | \n
$\\var{a}$ | \nPrime | \n$1$, $\\var{a}$ | \n
$\\var{d}$ | \nComposite | \n$1$, $\\var{sqrtd}$, $\\var{d}$ | \n
$\\var{h}$ | \nComposite | \n$\\var{latex(hlist)}$ | \n
$\\var{j}$ | \nPrime | \n$1$, $\\var{j}$ | \n
Identify which of the following are prime numbers.
", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "Sort a list of numbers into \"prime\" or \"composite\".
"}}, {"name": "Finding the highest common factor of two numbers", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Lauren Richards", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1589/"}], "variable_groups": [], "functions": {}, "rulesets": {}, "ungrouped_variables": ["sixfac", "fourfac", "hc"], "metadata": {"description": "This question tests the student's ability to identify the factors of some composite numbers and the highest common factors of two numbers.
", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "advice": "i)
\n$\\var{fourfac}$ has four factors: $1$, $3$, $\\var{fourfac/3}$ and $\\var{fourfac}$.
\nIt is possible to pair the factors up to prove that they are factors.
\n\\[
\\begin{align}
1\\times\\var{fourfac}&=\\var{fourfac}\\text{.}\\\\
3\\times\\var{fourfac/3}&=\\var{fourfac}\\text{.}\\\\
\\end{align}
\\]
ii)
\n$\\var{sixfac}$ has six factors: $1$, $2$, $3$, $\\var{sixfac/3}$, $\\var{sixfac/2}$ and $\\var{sixfac}$.
\nAgain, it is possible to pair the factors up to prove that they are factors.
\n\\[
\\begin{align}
1\\times\\var{sixfac}&=\\var{sixfac}\\text{.}\\\\
2\\times\\var{sixfac/2}&=\\var{sixfac}\\text{.}\\\\
3\\times\\var{sixfac/3}&=\\var{sixfac}\\text{.}\\\\
\\end{align}
\\]
We now look for common factors between the two lists of factors, and the highest common factor will be the largest of these.
\n\nFor $\\var{fourfac}$ and $\\var{sixfac}$, the highest common factor is $\\var{hc}$.
\nDividing both the numerator and denominator by the highest common factor gives:
\n\\[ \\frac{\\var{sixfac}}{\\var{fourfac}} = \\frac{\\frac{\\var{sixfac}}{\\var{hc}}}{\\frac{\\var{fourfac}}{\\var{hc}}} = \\frac{\\var{sixfac/hc}}{\\var{fourfac/hc}}\\text{.}\\]
\n", "statement": "
Simplify $\\var{sixfac}/\\var{fourfac}$ by finding the highest common factor.
", "preamble": {"css": "fraction {\n display: inline-block;\n vertical-align: middle;\n}\nfraction > numerator, fraction > denominator {\n float: left;\n width: 100%;\n text-align: center;\n line-height: 2.5em;\n}\nfraction > numerator {\n border-bottom: 1px solid;\n padding-bottom: 5px;\n}\nfraction > denominator {\n padding-top: 5px;\n}\nfraction input {\n line-height: 1em;\n}\n\nfraction .part {\n margin: 0;\n}\n\n.table-responsive, .fractiontable {\n display:inline-block;\n}\n.fractiontable {\n padding: 0; \n border: 0;\n}\n\n.fractiontable .tddenom \n{\n text-align: center;\n}\n\n.fractiontable .tdnum \n{\n border-bottom: 1px solid black; \n text-align: center;\n}\n\n\n.fractiontable tr {\n height: 3em;\n}\n", "js": ""}, "variables": {"fourfac": {"templateType": "anything", "description": "", "name": "fourfac", "group": "Ungrouped variables", "definition": "random(27,33,39)"}, "hc": {"templateType": "anything", "description": "", "name": "hc", "group": "Ungrouped variables", "definition": "gcd(sixfac,fourfac)"}, "sixfac": {"templateType": "anything", "description": "", "name": "sixfac", "group": "Ungrouped variables", "definition": "random(12,18)"}}, "parts": [{"variableReplacementStrategy": "originalfirst", "prompt": "Identify the factors of the following numbers in ascending order.
\ni) Factors of $\\var{fourfac}$: $1$, [[4]], [[5]], $\\var{fourfac}$
\n\nii) Factors of $\\var{sixfac}$: [[0]], $2$, [[1]], [[2]], $\\var{sixfac/2}$, [[3]]
", "gaps": [{"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "marks": "0.5", "maxValue": "1", "allowFractions": false, "minValue": "1", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "marks": "0.5", "maxValue": "3", "allowFractions": false, "minValue": "3", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "marks": "0.5", "maxValue": "{sixfac/3}", "allowFractions": false, "minValue": "{sixfac/3}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "marks": "0.5", "maxValue": "{sixfac}", "allowFractions": false, "minValue": "{sixfac}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "marks": "0.5", "maxValue": "3", "allowFractions": false, "minValue": "3", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "mustBeReducedPC": 0}, {"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "marks": "0.5", "maxValue": "{fourfac/3}", "allowFractions": false, "minValue": "{fourfac/3}", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "mustBeReducedPC": 0}], "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "gapfill", "marks": 0, "scripts": {}}, {"variableReplacementStrategy": "originalfirst", "prompt": "What is the heighest common factor of $\\var{fourfac}$ and $\\var{sixfac}$?
\nThe heighest common factor is [[0]]
", "stepsPenalty": 0, "gaps": [{"variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "correctAnswerStyle": "plain", "type": "numberentry", "marks": "1", "maxValue": "hc", "allowFractions": false, "minValue": "hc", "mustBeReduced": false, "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "mustBeReducedPC": 0}], "variableReplacements": [], "showFeedbackIcon": true, "scripts": {}, "type": "gapfill", "marks": 0, "steps": [{"variableReplacementStrategy": "originalfirst", "prompt": "If the same number appears in a list of factors for two numbers, it is a common factor. The largest of these common factors is the highest common factor.
", "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "information", "marks": 0, "scripts": {}}], "showCorrectAnswer": true}, {"variableReplacementStrategy": "originalfirst", "prompt": "Use the result above to reduce the following fraction to its simplest form.
\n$\\displaystyle \\frac{\\var{sixfac}}{\\var{fourfac}} = $
To simplify the fraction, divide both the numerator and denominator by the highest common factor.
", "variableReplacements": [], "showFeedbackIcon": true, "showCorrectAnswer": true, "type": "information", "marks": 0, "scripts": {}}], "showCorrectAnswer": true}], "tags": ["composite numbers", "factors", "Factors", "highest common factors", "prime numbers", "taxonomy"], "variablesTest": {"maxRuns": 100, "condition": ""}}]}], "showstudentname": true, "duration": 0, "type": "exam", "feedback": {"allowrevealanswer": true, "advicethreshold": 0, "intro": "", "showanswerstate": true, "feedbackmessages": [], "showtotalmark": true, "showactualmark": true, "enterreviewmodeimmediately": true, "showexpectedanswerswhen": "inreview", "showpartfeedbackmessageswhen": "always", "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showadvicewhen": "never"}, "percentPass": 0, "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}], "extensions": [], "custom_part_types": [], "resources": []}