// Numbas version: finer_feedback_settings {"name": "Information rate and minimum distance", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {"random_codeword": {"definition": "join(repeat(random(0,1),n),'')", "type": "number", "language": "jme", "parameters": [["n", "number"]]}, "minimum_distance": {"definition": "function hamming_distance(a,b) {\n var d = 0;\n for(var i=0;i$C = \\{\\var{latex(join(codes[0],','))} \\}$

\n

Information rate: [[0]]

\n

Minimum distance: [[1]]

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "

You have not given your answer to the correct precision.

", "marks": 1, "precisionPartialCredit": "0", "maxValue": "information_rates[0]", "minValue": "information_rates[0]", "strictPrecision": false, "showCorrectAnswer": true, "precision": "3", "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"marks": 1, "maxValue": "minimum_distances[0]", "minValue": "minimum_distances[0]", "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

$C = \\{\\var{latex(join(codes[1],','))} \\}$

\n

Information rate: [[0]]

\n

Minimum distance: [[1]]

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "

You have not given your answer to the correct precision.

", "marks": 1, "precisionPartialCredit": "0", "maxValue": "information_rates[1]", "minValue": "information_rates[1]", "strictPrecision": false, "showCorrectAnswer": true, "precision": "3", "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"marks": 1, "maxValue": "minimum_distances[1]", "minValue": "minimum_distances[1]", "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}, {"prompt": "

$C = \\{\\var{latex(join(codes[2],','))} \\}$

\n

Information rate: [[0]]

\n

Minimum distance: [[1]]

", "marks": 0, "gaps": [{"precisionType": "dp", "precisionMessage": "

You have not given your answer to the correct precision.

", "marks": 1, "precisionPartialCredit": "0", "maxValue": "information_rates[2]", "minValue": "information_rates[2]", "strictPrecision": false, "showCorrectAnswer": true, "precision": "3", "scripts": {}, "type": "numberentry", "showPrecisionHint": false}, {"marks": 1, "maxValue": "minimum_distances[2]", "minValue": "minimum_distances[2]", "showCorrectAnswer": true, "scripts": {}, "type": "numberentry", "showPrecisionHint": false}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "statement": "

Find the information rate and minimum distance for the following codes.

\n

(Round your answers to three decimal places)

\n

", "variable_groups": [], "progress": "in-progress", "preamble": {"css": "", "js": ""}, "variables": {"word_lengths": {"definition": "shuffle([2,3,4,5,6])[0..3]", "templateType": "anything", "group": "Ungrouped variables", "name": "word_lengths", "description": ""}, "information_rates": {"definition": "map(log(len(codes[j]))/log(2)/word_lengths[j],j,0..2)", "templateType": "anything", "group": "Ungrouped variables", "name": "information_rates", "description": ""}, "minimum_distances": {"definition": "map(minimum_distance(code),code,codes)", "templateType": "anything", "group": "Ungrouped variables", "name": "minimum_distances", "description": ""}, "codes": {"definition": "map(distinct(repeat(random_codeword(n),random(3..8))),n,word_lengths)", "templateType": "anything", "group": "Ungrouped variables", "name": "codes", "description": ""}}, "metadata": {"notes": "", "description": "", "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/"}]}