// Numbas version: exam_results_page_options {"name": "Numerical reasoning - ratio recipe", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"describesol": {"definition": "if(ratios[j]=1,\"$U$ is not more than $\"+u[j]+\"$.\",\"$\"+ratios[j]+\"$ is not more than $\"+u[j]+\"$, i.e. $U$ is not more than $\"+(u[j]/ratios[j])+\"$.\")", "type": "string", "language": "jme", "parameters": [["j", "number"]]}}, "name": "Numerical reasoning - ratio recipe", "tags": ["chain rule", "proportion", "ratio"], "type": "question", "advice": "

The proportions {ratios[0]}:{ratios[1]}:{ratios[2]} have to be preserved.

\n

So if we use $\\simplify{{ratios[0]}*U}$ {units} of $x$ then we must use $\\simplify{{ratios[1]}*U}$ {units} of $y$ and $\\simplify{{ratios[2]}*U}$ {units} of $z$, to get $\\var{ratiototal}U$ {units} of the preparation.

\n

We would like $U$ to be as big as possible.

\n

As we have $\\var{u[0]}$ {units} of $x$, {describesol(0)}

\n

As we have $\\var{u[1]}$ {units} of $y$, {describesol(1)}

\n

As we have $\\var{u[2]}$ {units} of $z$, {describesol(2)}

\n

So the maximum value of $U$ is $\\var{lots}$ and we can make $\\var{lots} \\times \\var{ratiototal} = \\var{amount}$ {units} of the preparation.

", "rulesets": {}, "parts": [{"prompt": "

How many {units} of the preparation can be made from a stock of materials consisting of {u[0]} {units} of $x$, {u[1]} {units} of $y$, and {u[2]} {units} of $z$?

\n

[[0]] {units}

", "marks": 0, "gaps": [{"marks": 1, "maxValue": "amount", "minValue": "amount", "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "extensions": ["stats"], "statement": "

A certain preparation consists of liquids $x$, $y$ and $z$ in the proportion {ratios[0]}:{ratios[1]}:{ratios[2]}.

", "variable_groups": [], "progress": "ready", "preamble": {"css": "", "js": ""}, "variables": {"rv": {"definition": "vector(ratios)", "templateType": "anything", "group": "Ungrouped variables", "name": "rv", "description": ""}, "rawratios": {"definition": "shuffle([random(1..7 except 3),random(1..7 except 3),3])", "templateType": "anything", "group": "Ungrouped variables", "name": "rawratios", "description": ""}, "lots": {"definition": "floor(min(map(u[j]/ratios[j],j,0..2)\t))", "templateType": "anything", "group": "Ungrouped variables", "name": "lots", "description": ""}, "uv": {"definition": "vector(u)", "templateType": "anything", "group": "Ungrouped variables", "name": "uv", "description": ""}, "rgcd": {"definition": "gcd(gcd(rawratios[0],rawratios[1]),rawratios[2])", "templateType": "anything", "group": "Ungrouped variables", "name": "rgcd", "description": ""}, "amount": {"definition": "lots*ratiototal", "templateType": "anything", "group": "Ungrouped variables", "name": "amount", "description": ""}, "u": {"definition": "//amount of each liquid\n map(random(3..10)*ratios[j],j,0..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "u", "description": ""}, "ratios": {"definition": "map(rawratios[j]/rgcd,j,0..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "ratios", "description": ""}, "units": {"definition": "random('litres','gallons','millilitres')", "templateType": "anything", "group": "Ungrouped variables", "name": "units", "description": ""}, "ratiototal": {"definition": "sum(ratios)", "templateType": "anything", "group": "Ungrouped variables", "name": "ratiototal", "description": ""}}, "metadata": {"notes": "", "description": "

Given ratio of ingredients in a preparation, and amounts of each ingredient, work out how much of the preparation you can make.

\n

Based on question 5 from section 3 of the maths-aid workbook on numerical reasoning.

", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}