// Numbas version: exam_results_page_options {"name": "Counting 2: a deck of cards", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"statement": "

When using the pigeonhole principle, you will often need to decide what are the pigeons and what are the containers.

\n

In a standard deck of 52 cards, each card is one of 4 different suits (of which there are 2 red and 2 black suits) and one of 13 different values. 

\n

Suppose you are dealt a hand of $\\var{n}$ cards from a standard deck. 

", "variables": {"n": {"definition": "random(14..40)", "description": "", "name": "n", "group": "Ungrouped variables", "templateType": "anything"}}, "preamble": {"js": "", "css": ""}, "ungrouped_variables": ["n"], "tags": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "rulesets": {}, "variable_groups": [], "functions": {}, "extensions": [], "metadata": {"description": "

Applicaiton of the pigeonhole principle

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

The hand is guaranteed to contain at least how many cards sharing the same colour?

", "useCustomName": false, "unitTests": [], "customName": "", "vsetRange": [0, 1], "checkingType": "absdiff", "answer": "{ceil(n/2)}", "steps": [{"prompt": "

Let the cards be the pigeons, and let the two colours be the containers. By the pigeonhole principle there is one colour which has at least $\\left\\lceil \\dfrac{\\var{n}}{2}\\right\\rceil$ cards.

", "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": {}}, {"stepsPenalty": 0, "variableReplacements": [], "failureRate": 1, "type": "jme", "valuegenerators": [], "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "prompt": "

The hand is guaranteed to contain at least how many cards of the same suit?

", "useCustomName": false, "unitTests": [], "customName": "", "vsetRange": [0, 1], "checkingType": "absdiff", "answer": "{ceil(n/4)}", "steps": [{"prompt": "

Let the cards be the pigeons, and let the four suits be the containers. By the pigeonhole principle there is one (perhaps more, but at least one) suit which has at least $\\left\\lceil \\dfrac{\\var{n}}{4}\\right\\rceil$ cards.

", "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": {}}, {"stepsPenalty": 0, "variableReplacements": [], "failureRate": 1, "type": "jme", "valuegenerators": [], "customMarkingAlgorithm": "", "showPreview": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "showFeedbackIcon": true, "vsetRangePoints": 5, "extendBaseMarkingAlgorithm": true, "checkVariableNames": false, "prompt": "

The hand is guaranteed to contain at least how many cards sharing the same value?

", "useCustomName": false, "unitTests": [], "customName": "", "vsetRange": [0, 1], "checkingType": "absdiff", "answer": "{ceil(n/13)}", "steps": [{"prompt": "

Let the cards be the pigeons, and let the thirteen values be the containers. By the pigeonhole principle there is one (perhaps more, but at least one) value which has at least $\\left\\lceil \\dfrac{\\var{n}}{13}\\right\\rceil$ cards.

", "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 2: a deck of cards", "advice": "

a. $\\left\\lceil \\dfrac{\\var{n}}{2} \\right\\rceil = \\var{ceil(n/2)}$.

\n

b. $\\left\\lceil \\dfrac{\\var{n}}{4} \\right\\rceil = \\var{ceil(n/4)}$.

\n

c. $\\left\\lceil \\dfrac{\\var{n}}{13} \\right\\rceil = \\var{ceil(n/13)}$.

", "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/"}]}