{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2025-12-14T01:33:56.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2025-12-14T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":47078,"title":"Sum of infinite series.","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 169.8px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 84.9px; transform-origin: 407px 84.9px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eA series T(k,x,n), whose k-th term is given b:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eT(k,x,n) = (x^k)* [ n*(n-1)*....(n-k+1)]/ [k*(k-1).....1] and T(0,x,n) = 1\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eFind the sum S = sum(T(k,x,n)) for k = 0 to inf.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ex will greater than -1 and n will be negative.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eHint: Try binomial expansion or something like binomial compression.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function S = binomial(x,n)\r\n  S = (1-n)^(x) % something similar can be an easy solution.\r\nend","test_suite":"%%\r\nx = 1;\r\nn = -1;\r\ny_correct = 0.5;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 3;\r\nn = -1;\r\ny_correct = 0.25;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 3;\r\nn = -1;\r\ny_correct = 0.25;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 0;\r\nn = -3;\r\ny_correct = 1;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 3;\r\nn = -1;\r\ny_correct = 0.25;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 1;\r\nn = -2;\r\ny_correct = 0.25;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":442401,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":21,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2020-10-25T09:23:00.000Z","updated_at":"2026-03-01T15:20:05.000Z","published_at":"2020-10-25T09:23:00.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA series T(k,x,n), whose k-th term is given b:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eT(k,x,n) = (x^k)* [ n*(n-1)*....(n-k+1)]/ [k*(k-1).....1] and T(0,x,n) = 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the sum S = sum(T(k,x,n)) for k = 0 to inf.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ex will greater than -1 and n will be negative.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHint: Try binomial expansion or something like binomial compression.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":47083,"title":"sum of binomial series","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 199.6px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 99.8px; transform-origin: 407px 99.8px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe k-th term of the series T(k,x,n) is given as:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eT(k,x,n) =k* (x^(k-1))*((n!)/(k!*(n-k)!)).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ewhere n! = 1*2*3......n\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eFind the sum S = sum(T(k,x,n)) for k = 1 to n.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eHint : try binomial expansion of (1+x)^n and its derivative, for a smarter solution.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function S = derivative_binomial(x,n)\r\n  S = (x-1)*(1-n)^(x+1) % Try something similar\r\nend","test_suite":"%%\r\nx = 0;\r\nn = 3;\r\ny_correct = 3;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 0;\r\nn = 4;\r\ny_correct = 4;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 1;\r\nn = 3;\r\ny_correct = 12;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 3;\r\nn = 4;\r\ny_correct = 256;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 4;\r\nn = 3;\r\ny_correct = 75;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":442401,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":26,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2020-10-25T16:53:49.000Z","updated_at":"2026-03-02T09:20:40.000Z","published_at":"2020-10-25T16:53:49.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe k-th term of the series T(k,x,n) is given as:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eT(k,x,n) =k* (x^(k-1))*((n!)/(k!*(n-k)!)).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ewhere n! = 1*2*3......n\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the sum S = sum(T(k,x,n)) for k = 1 to n.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHint : try binomial expansion of (1+x)^n and its derivative, for a smarter solution.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":51471,"title":"Find integer solutions to an equation with a sum of binomial coefficients","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 145.25px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 72.625px; transform-origin: 407px 72.625px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 115.125px 7.91667px; transform-origin: 115.125px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eTheorem 1 of chapter 27 of the book \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 70.425px 7.91667px; transform-origin: 70.425px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eDiophantine Equations\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 198.45px 7.91667px; transform-origin: 198.45px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e by Louis J. Mordell shows that the equation                                            \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 34px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 17px; text-align: left; transform-origin: 384px 17px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"vertical-align:-14px\"\u003e\u003cimg src=\"data:image/png;base64,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\" alt=\"y^2 = (x choose 0) + (x choose 1) + (x choose 2) + (x choose 3)\" style=\"width: 186.5px; height: 34px;\" width=\"186.5\" height=\"34\"\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 137.7px 7.91667px; transform-origin: 137.7px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ehas a finite number of real, integer solutions \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAmCAYAAABnE91tAAACbklEQVRoge2ZYZHjMAyFPw5hsARMoAiCwAzKIAxKIRgKoRxCIRhKoffD1sXJpakt2+1ex29mZ6fjWo4USe/JhYaGhoaGr4EBLp9+iAwMwKmWcQPcgK7WAW9AB1wBW9qwAWb+7+AIOmAC+pIG55IGfwF+gLv/n40RV1rfhoECfv0ADyo2tg+iw/mW1Y9GXL1+K7L8kwgPxR7n96HH+Wg0my268jLAmf3AniijRTpvo/f29pqtrB05n5UEo98ciwGnMSa/74EL1Nbew39HKxkkyLfA3p54lbVX8mRG2axvOCpMRef3PYKDxaEeF8RSZStBuvNvEOzB2taGxs+Vg6m4sry9nnoiU3rIMzaKoXJ51mTkBOjMOsVVTTASkq3jztrIusz3MKBs1DkBMiwB2nvwkpDets1SmQBeqWUJUDJx5AQIljdbe/qXXrN1cog8+yMBMiwBmpU2YiFqP2TN2OyBdLb+iwmdypRpOaT7IkPhAWZ/ztV/vhCfucKEydB299HvDftQ8fuXnTNFX0n2xrLmhLJShIlSurtlXVJbhjGss9LggnnjNdu8OjcUoSkvRN0npbaPDpNbxhHX7LZ3LKEekuCZnXX50945hdmakg2io9R3XRNLXe9BGEAU65YJ7Iv1cPwIe4gGckZKxl/IJBFx8FmT7VgG02ffsQfr4f6ZPEmwnf1icKfA2DOVMBJ5jjbVz6Rnn5R89ggk9V2Tqi16zXUi3VEZqIvds1vq3SxKcDRvUn5tSZ2jrlRQ+APl56qONEq+sDCVlEjqiHCm4nxoaxqPQCgLNJljecMvw5/88VBYT6vMa488DQ0NDQ3vxB/S+dLV0jP65QAAAABJRU5ErkJggg==\" alt=\"(x,y)\" style=\"width: 36px; height: 19px;\" width=\"36\" height=\"19\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 57.55px 7.91667px; transform-origin: 57.55px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. One of them has \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAkCAYAAADFGRdYAAABb0lEQVRoge2YbZGDMBCGHw91gIEaQAEKcFAHdVALaEDCeaiFaMBC70f6Dh9zBY6ESXK3z0x+0WY2L/vuLgHDMAzDMMqkBe47V5soxqRcgAF47Vz3NGGmpcUf3gFfK0siVWnCTIsDHhu/qfACPc8PJz9qfJZsceMfWw322eeJF+l6cizFIqu50E3UQpdvpaL8timrbdWtH2mAnnnl7yfPW+atc09aS9TQVR850AdkteA9JdSAnztqfHo2QMdcvDVq9s8ra+sWeqA3UawmlJJS3HFM+ViZFKvABlltyZVRpIGya9CUaFYTGu2jpGYGRLWa6PlbU2lUq4Ev1krNkO+bnLqbI7LVOuYiHa1JuXQ31dhoVmvfm02vHLqDe+XS3R5E7mqOMSjVJb0B2bC06wVZrTny5wteiB6f0sNio+m81OIFKm0ckNU0GP+aZc1Yer/aeF4CstrRkgGMH7Ofqn698Tx3dD67FjEMwzAMwzDO5xv4Ur5E4b6XigAAAABJRU5ErkJggg==\" alt=\"x = 7\" style=\"width: 36.5px; height: 18px;\" width=\"36.5\" height=\"18\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 30.3417px 7.91667px; transform-origin: 30.3417px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e because \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYYAAAAnCAYAAAALt+8aAAAHOklEQVR4nO2dbZGzMBSFjwcc1EANVMEqqIM6qINaQEMl1EMtrIZa2PcHPcMtJSFAAlze88wws7P9IiS5J/eDAAghhBBCCCGEEEIIIYQQQmyHA4AzgCuAC4Bq3dMRQoj/ngrADxq7fEVjpxfjDOAPwAPA6/33631CQgghlueIxg4/Afyisct/aASiOKf3j1oPoUYrDvIchBBiWSo0dvlk/scF/F/n/0Wo0e8Z0HOQ1yCEEMtyBnDr+f8djV3uey0rIcP/gIRBiC1xxD7m4wHNipdxc0Ulvjmh/7pcsZAwhKAweOy0Cs0F/F37RBL5QesiDh0vNAZiq5zQrGrocTJ3Ndagnd6fu2Q9u/Kc0HjhjAm/0FyP1D5jGDfU94smHzNSoelLxstrjA+HMOZ+z3tqi0CbdEczrpnPHTs3KAyrLRD+4K8DePFtAt0DdA9TjudK55jCDfFzT1nlUBD4GU/CwBjwL5o22IRhymQ+IH79vM1H8oN2TtaYLm5P+LwOFLQHvtvOhUCqB0BBWYUz/K1OftBcZGucPAgDjQFXUKGDA2iRioQJ0Ou5v/8+oRlH1sjHDD1FvUZrADwJww8aIeie7wmtURzyYNn20Bjw6L1zPr4wb+zaee1JGCo0bY95+hzvqQuHVbwFZsPPa/z4DKyI0RiVEgYavBxG+obGIAzxRN4wUs42AM25hVY9F7STOmQcK7SG74TywnDDtBBXiCfCfWPbH3oPJ723eRfDGvM544weBz0wT8JALzJmixgeGrID94T3FKOGn1VaiNLCwI7MMUBvGF4J0mjkDCPlbMMZzbnF2mHDKkOe6BLCwDGS4/tPA9/D9sSEnf3h0Svow+bN5owxrrgvaPvMkzCwX/8S3hNr13ng9aJc1vzxjHgShhS44sxZiZCzDTWGV7p29Tjk9XgThiFoJEPCTuNnvaopydmtYNvzwrx2PNCOUY/CYO89CI015hhDc+iI73vNFiOkSEdsuwqmj70JA2OQOQ3F0m3g76XkrvYmDDXiOwnYVWX3+IW/+WdDZ4+Z32MNokdh6Ip+dwwc0fZzn+E/ot8b51YZg5zQxk1jyQy+Zlef58CJHd7f58293ZMwMIyUu/R2aWGgx5ASDtuTMHBuxSbx8X0eV3wn61MrmrZEd/uGKz4LClLKkFnJY9vtURiAT6/B2l4WJtzRv1iip9BdEFaY4FHaKoi+SWg7qEKrWKFjTLIjNKjHHDmM+Z6EoUQYCVjP60lJru5BGCp8hs9qpC+wumXXqbmZPubOx7FjpFty+/v+PAXCikYstPbEd8J6rjCsaZ+64vCLeJEPi4BinuRorGvadUMrtF4Fbzq5Ro4xg1HCkJ8SYSRgHa8nNXnuWRgOCN+kNrYE/IDPhdyUipSlhcH2XSi/YK9P33cz8tEVUs/CALS3AdjvC1Vr2R1V+45J9sCqdt8Ps158r+xFGEqFkYBlhYEx9tTB7FkYLEd8r/zHVpZ1E7lbxy5KYzYmVKXG0tS+vIrXUBK54LPsduqYmAVXGn3JH95Es1fmCoM1THOOuUZnThhpK21gaHNMfX4OYYgldMccORK/B3yKw9jvTLkPYivY6x7ru1vP+yiCobHiWRi4OGLbuuNzMXGwP2wVmVsOeEsoj2EvwjAnjLSFNnCijxW2vQkDkFa2GMJGAPYiDH33OTwQ9zK8CgNFsDsPmGDndVjsOQv8wW5m31OFwxT2EEoqGUYCyreBCcS53o7nUJKlwrw2eRGG1L6z77tj+kJm6yLBeRwKj1lxWGzTT148Wx5V0ltYO7nTPQ/PwhBaZeSiZBvmiAKwT2EA2jZN8QCnjuccXtPUqqTY52wf37CMMKxhnxgGjH1uzM2fWeCFYPxqqJ461+9JGObDBFWpXFCpNqSKQmxxskdhoMcw5Q5Whl08VCUBbQg0Fje3oaTU/JPHqiR7Y2cIO94XEQZ7UtwL/H/AuzDw3pKSVSil2lAnfCdLpEPsURiYY5gSR+ZWy14KRmw+ZWhvqDGPD/aYY7ACGGqn3Utrkdxvt6bY0zbac/AuDHQtS5YUl2iD3fohtHU0yzdjY9GbMBzR7ukTiyP3VQhaA9l3LnMEZS3szVmh8cXXx1x/j8IADLe1dNj4i7kJL4909yYpocClhYEDqWTYL3cbYk8eGxuasJUtpSZLTmGw5aQUdAoh9/sJ7aLbvW5PtMLKJ8F53IrbJlW7fTj24TTEqzDYa9HtS3oUi1eKrvKjK8CJ1L2zkOWSOY1sSWGwYaSSfZZ76/AxcdrYZnLPnvfzuRE5r0dOYeDeNd0dUrknUMw7so+htWOWbfbs5bNtfJYIH2nJKqSxeBUG4PNacGzwWFz4eWON58G1RfiQm9UeyJ2BPbRhDtx2weNqXIjJsDpk7/csCCGESKSGr4SVEEKIjHCzLsbtaozb5lcIIcTOsDdu8LGAEgUhhPiP4T7fXkvbhBBCCCGEEEIIIYQQQgghhBBCLMw/W1zhyJXSTA8AAAAASUVORK5CYII=\" alt=\"y^2 = 1 + 7 + 21 + 35 + 64 = 8^2\" style=\"width: 195px; height: 19.5px;\" width=\"195\" height=\"19.5\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 3.88333px 7.91667px; transform-origin: 3.88333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42.25px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21.125px; text-align: left; transform-origin: 384px 21.125px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 107.217px 7.91667px; transform-origin: 107.217px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function that takes a value \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAAAoCAYAAAD9htTzAAACkklEQVR4nO2Z25GjMBBFbw5k4ARIgAiIwBnwMf9k4BSIgRDIwSk4BlLwfqjv6iLDYvDMgmr6VLns0gv1Q90tDDiO4ziO4ziO4ziO4ziO4zg/xgXAFUBrv9O+1vpzoMLyfpdkPDU1gB7AAOBpn176r9L+xHvC0aiffqqNsnQmx0P2W1pfAeAu7d3GtU8DDTUiCFUhCFwjCNUvT51QYWrYvZ9mpxz6/FZkuyE43WAyZUmDKBwNtNWbge87SWW68AZGxKjQ4n0HOz0lopFG5JOD5ugR5XgcvJdvhx6Yu2AaFXJ2tlnogfejN/IhGhWyzT9zpBXQ3jL1qOpO0ao020pujg5TI+0NE0dXdyVCuGYpnnvo/ssVQZgCMS/t9cAjqztGgwbTvJTV5XUOeh6VwrxED6TgOQjaITqX5iVGhQbhvgTE0vxucwr7ZlUIBJlTfSiFrX2zuVcbzzzIO6Y6/dXWH/EPCluot02PmCbXtDK647wVEi+nVFJa8DAqDAhypYqmAbgOv6mTAfHOmJ5IOvcNQaf6vDQK0PCVPbPESs5Nc0Ya+y8r/WdCX2cxXCvdSv8dQXn6FoJ3KyqzxOtJKm1cekleeg73uSki8UXjkjWrlf6zwPzX4FUxsLZmob9ANCBDoDoojcbIojmahYmemMvMONLi/A5/SmpE76YBWbrrCdGQCMwbDYiGWHr7rs7gvAlDoXo3DaIRJM1Hw8wYrYrTcKb3z9xfEvx3HgiKVaUyH/FkMYSxTfO5zuuScdrXIxZgT+svkUe1fChU/iBtLBA0jGmY6jGt9GrEsp2hjv/NfdncRtbTk9vDjbQK84qGuhtecwrHafWnhmK7VoC1rMX7F+exkvzkbxjHcRzHcRzHcZxfwR+hzjgyLDVwrgAAAABJRU5ErkJggg==\" alt=\"x = xmax\" style=\"width: 52.5px; height: 20px;\" width=\"52.5\" height=\"20\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003e­\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 118.242px 7.91667px; transform-origin: 118.242px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and returns a two-column matrix with \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAmCAYAAABnE91tAAACbklEQVRoge2ZYZHjMAyFPw5hsARMoAiCwAzKIAxKIRgKoRxCIRhKoffD1sXJpakt2+1ex29mZ6fjWo4USe/JhYaGhoaGr4EBLp9+iAwMwKmWcQPcgK7WAW9AB1wBW9qwAWb+7+AIOmAC+pIG55IGfwF+gLv/n40RV1rfhoECfv0ADyo2tg+iw/mW1Y9GXL1+K7L8kwgPxR7n96HH+Wg0my268jLAmf3AniijRTpvo/f29pqtrB05n5UEo98ciwGnMSa/74EL1Nbew39HKxkkyLfA3p54lbVX8mRG2axvOCpMRef3PYKDxaEeF8RSZStBuvNvEOzB2taGxs+Vg6m4sry9nnoiU3rIMzaKoXJ51mTkBOjMOsVVTTASkq3jztrIusz3MKBs1DkBMiwB2nvwkpDets1SmQBeqWUJUDJx5AQIljdbe/qXXrN1cog8+yMBMiwBmpU2YiFqP2TN2OyBdLb+iwmdypRpOaT7IkPhAWZ/ztV/vhCfucKEydB299HvDftQ8fuXnTNFX0n2xrLmhLJShIlSurtlXVJbhjGss9LggnnjNdu8OjcUoSkvRN0npbaPDpNbxhHX7LZ3LKEekuCZnXX50945hdmakg2io9R3XRNLXe9BGEAU65YJ7Iv1cPwIe4gGckZKxl/IJBFx8FmT7VgG02ffsQfr4f6ZPEmwnf1icKfA2DOVMBJ5jjbVz6Rnn5R89ggk9V2Tqi16zXUi3VEZqIvds1vq3SxKcDRvUn5tSZ2jrlRQ+APl56qONEq+sDCVlEjqiHCm4nxoaxqPQCgLNJljecMvw5/88VBYT6vMa488DQ0NDQ3vxB/S+dLV0jP65QAAAABJRU5ErkJggg==\" alt=\"(x, y)\" style=\"width: 36px; height: 19px;\" width=\"36\" height=\"19\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 29.1667px 7.91667px; transform-origin: 29.1667px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e pairs for \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAAAoCAYAAAD9htTzAAAC1UlEQVR4nO2a3XGrMBCFTw90QAM0QAVUQAc85N0duAVqoAR6cAuugRacB+mMDjJcEowUuLPfDOOMAEmrXe2PCGAYhmEYhmEYhmFcmRLA3f8aJ6ME0AN4+av62+kYSqycCUAHoPjLSRkOU86JMeXspATQArjhPWCXvr39cIwawIj0yqmxPt81GU9NA2DAfPEGud9K+wv7hMulnN6P88R78lEAeEh7f/DY2eBCTnBC1XACN3BCDeuvLpJLOUvjcsybbxvh0vrW/90knkMyOgThqKB6Z193zHfgiLwxZ0LwCjf83sBOS4W51X8ag1rMXczjgD5/yoAgxzPTmNmgBR4pWOz2cihLvUIuw8gGLfCRoO+cylKvcNn4s0ScAaVKU5eUdXRCoVnpZTO5JXrMlZTaTdRIU9RWcO6aqfh/E5NaOGEKhLiUywKPPIGgN+gwj0uXKl6XoOWx8GNcogVS8NSCHnEK3iMYl8YleoUOrjwAQmr+8O8UMv4kc4rXQyl833f/buufZxxkjalG3/r+J/yDwnc0+ElPmAfXODPKmToDQVk/qdFYnHKR4oSHXmGEkyteaCqA/fCXazIi1IzxjqRx3xF2PceLDYyKr/2Y1ZZ8WpG//OSVcuP+mdAEhO5a6TfuP+AWT08hWFtxMSu876TKPxcXyWvjcJ6/8kg8aFzTZr1x/yzw8HcthhUI8Sm+XyAokC5QDZRKo2fRGM3ERHdMufAcueGEBk8j+ORKHQMbBOumApm66w5RlwgsKw0Iilg7fVdjOAXqhvZeqT+f0xWqdVMh6kHieDQuPKNZcWxcWn+mOCTYzRE7KfWB7BNuYXVRGY84Nl0Y2zSe63t99JzeGzA/xyzgDPDyZUFquPijtDFBUDembmrAPNNrENJ2ujp+m/vy73bSn+7cAaakTRhX1NXx80q78Jxmf6ootmsG2EhfrL/4HjNJ+08owzAMwzAMwzCMDb4BkIRTCxuZ9zgAAAAASUVORK5CYII=\" alt=\"x \u003c= xmax\" style=\"width: 52.5px; height: 20px;\" width=\"52.5\" height=\"20\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 54.8333px 7.91667px; transform-origin: 54.8333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Sort the pairs in order of increasing \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ex\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.94167px 7.91667px; transform-origin: 1.94167px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function xy = Mordell(xmax)\r\n  xy = f(xmax);\r\nend","test_suite":"%%\r\nxmax = 2;\r\nxy = Mordell(xmax);\r\nn_correct = 3;  %  Be careful here\r\nassert(isequal(size(xy,1),n_correct))\r\n\r\n%%\r\nxmax = 10;\r\nxy = Mordell(xmax);\r\nn_correct = 4;\r\nxy_last = [7 8];\r\nassert(isequal(size(xy,1),n_correct) \u0026\u0026 isequal(xy(end,:),xy_last));\r\n\r\n%%\r\nxmax = 50;\r\nxy = Mordell(xmax);\r\nn_correct = 5;\r\nPS_correct = -2340;\r\nassert(isequal(size(xy,1),n_correct) \u0026\u0026 isequal(prod(sum(xy,2)),PS_correct));\r\n\r\n%%\r\nxmax = 100;\r\nxy = Mordell(xmax);\r\nn_correct = 6;\r\nPS_correct = -781560;\r\nassert(isequal(size(xy,1),n_correct) \u0026\u0026 isequal(prod(sum(xy,2)),PS_correct));\r\n    \r\n%%\r\nxmax = 500;\r\nxy = Mordell(xmax);\r\nn_correct = 6;\r\nPS_correct = -781560;\r\nassert(isequal(size(xy,1),n_correct) \u0026\u0026 isequal(prod(sum(xy,2)),PS_correct));\r\n\r\n%%\r\nxmax = 1000;\r\nxy = Mordell(xmax);\r\nPS_correct = -7377144840;\r\nassert(isequal(prod(sum(xy,2)),PS_correct));\r\n\r\n%%\r\nxmax = 5000;\r\nxy = Mordell(xmax);\r\nPSD_correct = 4254584400;\r\nassert(isequal(prod(sum(diff(xy),2)),PSD_correct));\r\n\r\n%%\r\nxmax = 10000;\r\nxy = Mordell(xmax);\r\nSPCS_correct = 7776998;\r\nassert(isequal(sum(prod(cumsum(xy),2)),SPCS_correct));","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":46909,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-04-19T03:35:35.000Z","updated_at":"2021-04-19T15:20:33.000Z","published_at":"2021-04-19T03:38:41.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTheorem 1 of chapter 27 of the book \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eDiophantine Equations\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e by Louis J. Mordell shows that the equation                                            \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"true\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"y^2 = (x choose 0) + (x choose 1) + (x choose 2) + (x choose 3)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey^2={x \\\\choose 0} + {x \\\\choose 1} + {x \\\\choose 2} + {x \\\\choose 3} \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ehas a finite number of real, integer solutions \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"(x,y)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e(x, y)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. One of them has \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x = 7\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex = 7\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e because \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"y^2 = 1 + 7 + 21 + 35 + 64 = 8^2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey^2 = 1 + 7 + 21 + 35 = 64 = 8^2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function that takes a value \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x = xmax\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex = x_{max}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e­\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and returns a two-column matrix with \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"(x, y)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e(x, y)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e pairs for \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x \u0026lt;= xmax\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex \\\\le x_{max}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. Sort the pairs in order of increasing \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":44502,"title":"Anyone for tennis?  Your chances of winning a (standard) game","description":"Imagine you are playing tennis, and for _each point_ played your chance of winning is |x| % (input as a |\u003chttps://au.mathworks.com/help/matlab/ref/uint8.html uint8\u003e|).  Given the \u003chttp://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx ITF's scoring system for a \"standard game\" of tennis\u003e (excerpted below), please determine your likelihood of winning a game (output as a |\u003chttps://au.mathworks.com/help/matlab/ref/single.html single\u003e|).  \r\n\r\nNote that as |x| is taken to be the same for every point in this problem, it does not matter whether you are serving or not.  \r\n\r\nEXAMPLE\r\n\r\n x = uint8(40)\r\n chance = single(0.2642707692307693)\r\n\r\n-----\r\n\r\n*\"* A standard game is scored as follows with the server’s score being called first:\r\n\r\n* No point - “Love”\r\n* First point - “15”\r\n* Second point - “30”\r\n* Third point - “40”\r\n* Fourth point - “Game”\r\n\r\nexcept that if each player/team has won three points, the score is “Deuce”.\r\nAfter “Deuce”, the score is “Advantage” for the player/team who wins the next point. If that same player/team also wins the next point, that player/team wins the “Game”; if the opposing player/team wins the next point, the score is again “Deuce”. A player/team needs to win two consecutive points immediately after “Deuce” to win the “Game”. *\"*\r\n\r\n-----\r\n\r\nSee also \u003chttps://www.mathworks.com/matlabcentral/cody/problems/44503 Problem 44503. Anyone for tennis? Your chances of winning a tie-break game\u003e.","description_html":"\u003cp\u003eImagine you are playing tennis, and for \u003ci\u003eeach point\u003c/i\u003e played your chance of winning is \u003ctt\u003ex\u003c/tt\u003e % (input as a \u003ctt\u003e\u003ca href = \"https://au.mathworks.com/help/matlab/ref/uint8.html\"\u003euint8\u003c/a\u003e\u003c/tt\u003e).  Given the \u003ca href = \"http://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx\"\u003eITF's scoring system for a \"standard game\" of tennis\u003c/a\u003e (excerpted below), please determine your likelihood of winning a game (output as a \u003ctt\u003e\u003ca href = \"https://au.mathworks.com/help/matlab/ref/single.html\"\u003esingle\u003c/a\u003e\u003c/tt\u003e).\u003c/p\u003e\u003cp\u003eNote that as \u003ctt\u003ex\u003c/tt\u003e is taken to be the same for every point in this problem, it does not matter whether you are serving or not.\u003c/p\u003e\u003cp\u003eEXAMPLE\u003c/p\u003e\u003cpre\u003e x = uint8(40)\r\n chance = single(0.2642707692307693)\u003c/pre\u003e\u003cp\u003e-----\u003c/p\u003e\u003cp\u003e\u003cb\u003e\"\u003c/b\u003e A standard game is scored as follows with the server’s score being called first:\u003c/p\u003e\u003cul\u003e\u003cli\u003eNo point - “Love”\u003c/li\u003e\u003cli\u003eFirst point - “15”\u003c/li\u003e\u003cli\u003eSecond point - “30”\u003c/li\u003e\u003cli\u003eThird point - “40”\u003c/li\u003e\u003cli\u003eFourth point - “Game”\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eexcept that if each player/team has won three points, the score is “Deuce”.\r\nAfter “Deuce”, the score is “Advantage” for the player/team who wins the next point. If that same player/team also wins the next point, that player/team wins the “Game”; if the opposing player/team wins the next point, the score is again “Deuce”. A player/team needs to win two consecutive points immediately after “Deuce” to win the “Game”. \u003cb\u003e\"\u003c/b\u003e\u003c/p\u003e\u003cp\u003e-----\u003c/p\u003e\u003cp\u003eSee also \u003ca href = \"https://www.mathworks.com/matlabcentral/cody/problems/44503\"\u003eProblem 44503. Anyone for tennis? Your chances of winning a tie-break game\u003c/a\u003e.\u003c/p\u003e","function_template":"function chance = standardGame(x)\r\n\r\n    % Your comments \r\n    \r\nend","test_suite":"%% Please do not try to hack the Test Suite.  \r\n% The Test Suite will be updated if inappropriate submissions are received.  \r\n% This includes hard-coded (pre-calculated, externally calculated, manually calculated) 'solutions'.\r\nfiletext = fileread('standardGame.m');\r\nvec = [923273, 144780, 713710, 217788, 507812, 992110, 170355, 264270, 376851, 475014];\r\nmsg = 'Please do not hard-code your ''solution''.';\r\nassert( all( arrayfun(@(z) isempty(strfind(filetext, num2str(z))), vec) ) , msg )\r\n\r\n%% Test self-consistency:  \r\n% There are only two players, so the chances for each should add up to one.  \r\nassert( abs(standardGame(100)+standardGame(0) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(90)+standardGame(10) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(80)+standardGame(20) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(70)+standardGame(30) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(60)+standardGame(40) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(50)+standardGame(50) - 1)  \u003c 20 * eps(single(1)) )\r\n\r\n%%\r\nx = uint8(50);\r\ny_correct = 0.50;\r\nassert( isequal(standardGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(0);\r\ny_correct = 0;\r\nassert( isequal(standardGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(100);\r\ny_correct = 1;\r\nassert( isequal(standardGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(5);\r\ny_correct = 0.0000923273480663;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(10);\r\ny_correct = 0.0014478048780488;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(15);\r\ny_correct = 0.0071371057046980;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(20);\r\ny_correct = 0.0217788235294118;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(25);\r\ny_correct = 0.0507812500000000;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(30);\r\ny_correct = 0.0992110344827586;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(35);\r\ny_correct = 0.1703553555045871;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(40);\r\ny_correct = 0.2642707692307693;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(45);\r\ny_correct = 0.3768514975247527;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(49);\r\ny_correct = 0.4750149924031987;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%% Test adherence to instructions\r\nfor i = 1:5\r\n    x = uint8( randi(100) );\r\n    assert( isequal(class(standardGame(x)), 'single') )\r\nend;\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":64439,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":4,"test_suite_updated_at":"2018-01-18T10:56:38.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2018-01-18T00:25:34.000Z","updated_at":"2019-07-02T13:23:52.000Z","published_at":"2018-01-18T01:51:18.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eImagine you are playing tennis, and for\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eeach point\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e played your chance of winning is\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e % (input as a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://au.mathworks.com/help/matlab/ref/uint8.html\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003euint8\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e). Given the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eITF's scoring system for a \\\"standard game\\\" of tennis\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (excerpted below), please determine your likelihood of winning a game (output as a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://au.mathworks.com/help/matlab/ref/single.html\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003esingle\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eNote that as\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is taken to be the same for every point in this problem, it does not matter whether you are serving or not.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEXAMPLE\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ x = uint8(40)\\n chance = single(0.2642707692307693)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e-----\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e A standard game is scored as follows with the server’s score being called first:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eNo point - “Love”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFirst point - “15”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSecond point - “30”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThird point - “40”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFourth point - “Game”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eexcept that if each player/team has won three points, the score is “Deuce”. After “Deuce”, the score is “Advantage” for the player/team who wins the next point. If that same player/team also wins the next point, that player/team wins the “Game”; if the opposing player/team wins the next point, the score is again “Deuce”. A player/team needs to win two consecutive points immediately after “Deuce” to win the “Game”.\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e-----\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSee also\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/44503\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProblem 44503. Anyone for tennis? Your chances of winning a tie-break game\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44503,"title":"Anyone for tennis?  Your chances of winning a tie-break game","description":"Imagine you are playing tennis and the score has reached 'six games all' in a Tie-break Set, so therefore the next game shall be a 'tie-break game', which is now to be played to decide the outcome of this set.  For _each point_ played in the tie-break game your chance of winning is |x| % (input as a |\u003chttps://au.mathworks.com/help/matlab/ref/uint8.html uint8\u003e|).  Given the \u003chttp://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx ITF's scoring system for a \"tie-break game\" of tennis\u003e (excerpted below), please determine your likelihood of winning the tie-break game (output as a |\u003chttps://au.mathworks.com/help/matlab/ref/single.html single\u003e|).  \r\n\r\nNote that as |x| is taken to be the same for every point in this problem, it does not matter whether you are serving or not.  \r\n\r\nEXAMPLE\r\n\r\n x = uint8(40)\r\n chance = single(0.2125443387076924)\r\n\r\n-----\r\n\r\n*\"* During a tie-break game, points are scored “Zero”, “1”, “2”, “3”, etc. The first player/team to win seven points wins the “Game” and “Set”, provided there is a margin of two points over the opponent(s). If necessary, the tie-break game shall continue until this margin is achieved. *\"*\r\n\r\n-----\r\n\r\nSee also \u003chttps://www.mathworks.com/matlabcentral/cody/problems/44502 Problem 44502. Anyone for tennis? Your chances of winning a (standard) game\u003e.","description_html":"\u003cp\u003eImagine you are playing tennis and the score has reached 'six games all' in a Tie-break Set, so therefore the next game shall be a 'tie-break game', which is now to be played to decide the outcome of this set.  For \u003ci\u003eeach point\u003c/i\u003e played in the tie-break game your chance of winning is \u003ctt\u003ex\u003c/tt\u003e % (input as a \u003ctt\u003e\u003ca href = \"https://au.mathworks.com/help/matlab/ref/uint8.html\"\u003euint8\u003c/a\u003e\u003c/tt\u003e).  Given the \u003ca href = \"http://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx\"\u003eITF's scoring system for a \"tie-break game\" of tennis\u003c/a\u003e (excerpted below), please determine your likelihood of winning the tie-break game (output as a \u003ctt\u003e\u003ca href = \"https://au.mathworks.com/help/matlab/ref/single.html\"\u003esingle\u003c/a\u003e\u003c/tt\u003e).\u003c/p\u003e\u003cp\u003eNote that as \u003ctt\u003ex\u003c/tt\u003e is taken to be the same for every point in this problem, it does not matter whether you are serving or not.\u003c/p\u003e\u003cp\u003eEXAMPLE\u003c/p\u003e\u003cpre\u003e x = uint8(40)\r\n chance = single(0.2125443387076924)\u003c/pre\u003e\u003cp\u003e-----\u003c/p\u003e\u003cp\u003e\u003cb\u003e\"\u003c/b\u003e During a tie-break game, points are scored “Zero”, “1”, “2”, “3”, etc. The first player/team to win seven points wins the “Game” and “Set”, provided there is a margin of two points over the opponent(s). If necessary, the tie-break game shall continue until this margin is achieved. \u003cb\u003e\"\u003c/b\u003e\u003c/p\u003e\u003cp\u003e-----\u003c/p\u003e\u003cp\u003eSee also \u003ca href = \"https://www.mathworks.com/matlabcentral/cody/problems/44502\"\u003eProblem 44502. Anyone for tennis? Your chances of winning a (standard) game\u003c/a\u003e.\u003c/p\u003e","function_template":"function chance = tiebreakGame(x)\r\n\r\n    % Your comments \r\n    \r\nend","test_suite":"%% Please do not try to hack the Test Suite.  \r\n% The Test Suite will be updated if inappropriate submissions are received.  \r\n% This includes hard-coded (pre-calculated, externally calculated, manually calculated) 'solutions'.\r\n\r\n% EDIT (2019-06-24).  Anti-hacking provision\r\n% Ensure builtin function will be called.  (Probably only the second of these will work.)  \r\n! del fileread.m\r\n! rm -v fileread.m\r\n% Disallow certain words  \r\nRE = regexp(fileread('tiebreakGame.m'), '\\w+', 'match');\r\ntabooWords = {'ans', 'assert', 'freepass'};\r\ntestResult = cellfun( @(z) ismember(z, tabooWords), RE );\r\nmsg = ['Please do not do that in your code!' char([10 13]) ...\r\n    'Found: ' strjoin(RE(testResult)) '.' char([10 13]) ...\r\n    'Banned word.' char([10 13])];\r\nassert(~any(  cellfun( @(z) ismember(z, tabooWords), RE )  ), msg)\r\n% END EDIT (2019-06-24)\r\n\r\nfiletext = fileread('tiebreakGame.m');\r\nvec = [5242178 5616877 7920095 4815022 1826772 5089792,5089793 1134259 2125443 3458492 4684486];\r\nmsg = 'Please do not hard-code your ''solution''.';\r\nassert( all( arrayfun(@(z) isempty(strfind(filetext, num2str(z))), vec) ) , msg )\r\n\r\n%% Test self-consistency:  \r\n% There are only two players, so the chances for each should add up to one.  \r\nassert( abs(tiebreakGame(100)+tiebreakGame(0) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(90)+tiebreakGame(10) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(80)+tiebreakGame(20) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(70)+tiebreakGame(30) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(60)+tiebreakGame(40) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(50)+tiebreakGame(50) - 1)  \u003c 20 * eps(single(1)) )\r\n\r\n%%\r\nx = uint8(50);\r\ny_correct = 0.50;\r\nassert( isequal(tiebreakGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(0);\r\ny_correct = 0;\r\nassert( isequal(tiebreakGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(100);\r\ny_correct = 1;\r\nassert( isequal(tiebreakGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(5);\r\ny_correct = 0.0000005242178465;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(10);\r\ny_correct = 0.0000561687707317;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(15);\r\ny_correct = 0.0007920095157735;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(20);\r\ny_correct = 0.0048150226823529;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(25);\r\ny_correct = 0.0182677268981934;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(30);\r\ny_correct = 0.0508979303379310;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(35);\r\ny_correct = 0.1134259300865006;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(40);\r\ny_correct = 0.2125443387076924;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(45);\r\ny_correct = 0.3458492328206313;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(49);\r\ny_correct = 0.4684486239083455;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%% Test adherence to instructions\r\nfor i = 1:5\r\n    x = uint8( randi(100) );\r\n    assert( isequal(class(tiebreakGame(x)), 'single') )\r\nend;\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":64439,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":4,"test_suite_updated_at":"2019-07-02T13:20:57.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-01-18T10:19:54.000Z","updated_at":"2019-07-02T13:20:57.000Z","published_at":"2018-01-18T10:57:34.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eImagine you are playing tennis and the score has reached 'six games all' in a Tie-break Set, so therefore the next game shall be a 'tie-break game', which is now to be played to decide the outcome of this set. For\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eeach point\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e played in the tie-break game your chance of winning is\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e % (input as a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://au.mathworks.com/help/matlab/ref/uint8.html\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003euint8\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e). Given the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eITF's scoring system for a \\\"tie-break game\\\" of tennis\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (excerpted below), please determine your likelihood of winning the tie-break game (output as a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://au.mathworks.com/help/matlab/ref/single.html\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003esingle\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eNote that as\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is taken to be the same for every point in this problem, it does not matter whether you are serving or not.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEXAMPLE\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ x = uint8(40)\\n chance = single(0.2125443387076924)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e-----\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e During a tie-break game, points are scored “Zero”, “1”, “2”, “3”, etc. The first player/team to win seven points wins the “Game” and “Set”, provided there is a margin of two points over the opponent(s). If necessary, the tie-break game shall continue until this margin is achieved.\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e-----\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSee also\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/44502\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProblem 44502. Anyone for tennis? Your chances of winning a (standard) game\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":47078,"title":"Sum of infinite series.","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 169.8px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 84.9px; transform-origin: 407px 84.9px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eA series T(k,x,n), whose k-th term is given b:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eT(k,x,n) = (x^k)* [ n*(n-1)*....(n-k+1)]/ [k*(k-1).....1] and T(0,x,n) = 1\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eFind the sum S = sum(T(k,x,n)) for k = 0 to inf.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ex will greater than -1 and n will be negative.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eHint: Try binomial expansion or something like binomial compression.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function S = binomial(x,n)\r\n  S = (1-n)^(x) % something similar can be an easy solution.\r\nend","test_suite":"%%\r\nx = 1;\r\nn = -1;\r\ny_correct = 0.5;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 3;\r\nn = -1;\r\ny_correct = 0.25;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 3;\r\nn = -1;\r\ny_correct = 0.25;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 0;\r\nn = -3;\r\ny_correct = 1;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 3;\r\nn = -1;\r\ny_correct = 0.25;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 1;\r\nn = -2;\r\ny_correct = 0.25;\r\nassert(abs(binomial(x,n)-y_correct)\u003c1e-5)","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":442401,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":21,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2020-10-25T09:23:00.000Z","updated_at":"2026-03-01T15:20:05.000Z","published_at":"2020-10-25T09:23:00.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eA series T(k,x,n), whose k-th term is given b:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eT(k,x,n) = (x^k)* [ n*(n-1)*....(n-k+1)]/ [k*(k-1).....1] and T(0,x,n) = 1\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the sum S = sum(T(k,x,n)) for k = 0 to inf.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ex will greater than -1 and n will be negative.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHint: Try binomial expansion or something like binomial compression.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":47083,"title":"sum of binomial series","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 199.6px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 99.8px; transform-origin: 407px 99.8px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eThe k-th term of the series T(k,x,n) is given as:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eT(k,x,n) =k* (x^(k-1))*((n!)/(k!*(n-k)!)).\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003ewhere n! = 1*2*3......n\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eFind the sum S = sum(T(k,x,n)) for k = 1 to n.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eHint : try binomial expansion of (1+x)^n and its derivative, for a smarter solution.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 20.8px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.4px; text-align: left; transform-origin: 384px 10.4px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function S = derivative_binomial(x,n)\r\n  S = (x-1)*(1-n)^(x+1) % Try something similar\r\nend","test_suite":"%%\r\nx = 0;\r\nn = 3;\r\ny_correct = 3;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 0;\r\nn = 4;\r\ny_correct = 4;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 1;\r\nn = 3;\r\ny_correct = 12;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 3;\r\nn = 4;\r\ny_correct = 256;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n%%\r\nx = 4;\r\nn = 3;\r\ny_correct = 75;\r\nassert(abs(derivative_binomial(x,n)-y_correct)\u003c1e-5)\r\n\r\n\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":442401,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":26,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2020-10-25T16:53:49.000Z","updated_at":"2026-03-02T09:20:40.000Z","published_at":"2020-10-25T16:53:49.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThe k-th term of the series T(k,x,n) is given as:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eT(k,x,n) =k* (x^(k-1))*((n!)/(k!*(n-k)!)).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ewhere n! = 1*2*3......n\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFind the sum S = sum(T(k,x,n)) for k = 1 to n.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eHint : try binomial expansion of (1+x)^n and its derivative, for a smarter solution.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":51471,"title":"Find integer solutions to an equation with a sum of binomial coefficients","description":null,"description_html":"\u003cdiv style = \"text-align: start; line-height: 20.4333px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 145.25px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 72.625px; transform-origin: 407px 72.625px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 115.125px 7.91667px; transform-origin: 115.125px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eTheorem 1 of chapter 27 of the book \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 70.425px 7.91667px; transform-origin: 70.425px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003eDiophantine Equations\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 198.45px 7.91667px; transform-origin: 198.45px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e by Louis J. Mordell shows that the equation                                            \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e  \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 34px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 17px; text-align: left; transform-origin: 384px 17px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"vertical-align:-14px\"\u003e\u003cimg src=\"data:image/png;base64,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\" alt=\"y^2 = (x choose 0) + (x choose 1) + (x choose 2) + (x choose 3)\" style=\"width: 186.5px; height: 34px;\" width=\"186.5\" height=\"34\"\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 137.7px 7.91667px; transform-origin: 137.7px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003ehas a finite number of real, integer solutions \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAmCAYAAABnE91tAAACbklEQVRoge2ZYZHjMAyFPw5hsARMoAiCwAzKIAxKIRgKoRxCIRhKoffD1sXJpakt2+1ex29mZ6fjWo4USe/JhYaGhoaGr4EBLp9+iAwMwKmWcQPcgK7WAW9AB1wBW9qwAWb+7+AIOmAC+pIG55IGfwF+gLv/n40RV1rfhoECfv0ADyo2tg+iw/mW1Y9GXL1+K7L8kwgPxR7n96HH+Wg0my268jLAmf3AniijRTpvo/f29pqtrB05n5UEo98ciwGnMSa/74EL1Nbew39HKxkkyLfA3p54lbVX8mRG2axvOCpMRef3PYKDxaEeF8RSZStBuvNvEOzB2taGxs+Vg6m4sry9nnoiU3rIMzaKoXJ51mTkBOjMOsVVTTASkq3jztrIusz3MKBs1DkBMiwB2nvwkpDets1SmQBeqWUJUDJx5AQIljdbe/qXXrN1cog8+yMBMiwBmpU2YiFqP2TN2OyBdLb+iwmdypRpOaT7IkPhAWZ/ztV/vhCfucKEydB299HvDftQ8fuXnTNFX0n2xrLmhLJShIlSurtlXVJbhjGss9LggnnjNdu8OjcUoSkvRN0npbaPDpNbxhHX7LZ3LKEekuCZnXX50945hdmakg2io9R3XRNLXe9BGEAU65YJ7Iv1cPwIe4gGckZKxl/IJBFx8FmT7VgG02ffsQfr4f6ZPEmwnf1icKfA2DOVMBJ5jjbVz6Rnn5R89ggk9V2Tqi16zXUi3VEZqIvds1vq3SxKcDRvUn5tSZ2jrlRQ+APl56qONEq+sDCVlEjqiHCm4nxoaxqPQCgLNJljecMvw5/88VBYT6vMa488DQ0NDQ3vxB/S+dLV0jP65QAAAABJRU5ErkJggg==\" alt=\"(x,y)\" style=\"width: 36px; height: 19px;\" width=\"36\" height=\"19\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 57.55px 7.91667px; transform-origin: 57.55px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. One of them has \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAkCAYAAADFGRdYAAABb0lEQVRoge2YbZGDMBCGHw91gIEaQAEKcFAHdVALaEDCeaiFaMBC70f6Dh9zBY6ESXK3z0x+0WY2L/vuLgHDMAzDMMqkBe47V5soxqRcgAF47Vz3NGGmpcUf3gFfK0siVWnCTIsDHhu/qfACPc8PJz9qfJZsceMfWw322eeJF+l6cizFIqu50E3UQpdvpaL8timrbdWtH2mAnnnl7yfPW+atc09aS9TQVR850AdkteA9JdSAnztqfHo2QMdcvDVq9s8ra+sWeqA3UawmlJJS3HFM+ViZFKvABlltyZVRpIGya9CUaFYTGu2jpGYGRLWa6PlbU2lUq4Ev1krNkO+bnLqbI7LVOuYiHa1JuXQ31dhoVmvfm02vHLqDe+XS3R5E7mqOMSjVJb0B2bC06wVZrTny5wteiB6f0sNio+m81OIFKm0ckNU0GP+aZc1Yer/aeF4CstrRkgGMH7Ofqn698Tx3dD67FjEMwzAMwzDO5xv4Ur5E4b6XigAAAABJRU5ErkJggg==\" alt=\"x = 7\" style=\"width: 36.5px; height: 18px;\" width=\"36.5\" height=\"18\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 30.3417px 7.91667px; transform-origin: 30.3417px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e because \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,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\" alt=\"y^2 = 1 + 7 + 21 + 35 + 64 = 8^2\" style=\"width: 195px; height: 19.5px;\" width=\"195\" height=\"19.5\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 3.88333px 7.91667px; transform-origin: 3.88333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42.25px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 21.125px; text-align: left; transform-origin: 384px 21.125px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 107.217px 7.91667px; transform-origin: 107.217px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function that takes a value \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAAAoCAYAAAD9htTzAAACkklEQVR4nO2Z25GjMBBFbw5k4ARIgAiIwBnwMf9k4BSIgRDIwSk4BlLwfqjv6iLDYvDMgmr6VLns0gv1Q90tDDiO4ziO4ziO4ziO4ziO4zg/xgXAFUBrv9O+1vpzoMLyfpdkPDU1gB7AAOBpn176r9L+xHvC0aiffqqNsnQmx0P2W1pfAeAu7d3GtU8DDTUiCFUhCFwjCNUvT51QYWrYvZ9mpxz6/FZkuyE43WAyZUmDKBwNtNWbge87SWW68AZGxKjQ4n0HOz0lopFG5JOD5ugR5XgcvJdvhx6Yu2AaFXJ2tlnogfejN/IhGhWyzT9zpBXQ3jL1qOpO0ao020pujg5TI+0NE0dXdyVCuGYpnnvo/ssVQZgCMS/t9cAjqztGgwbTvJTV5XUOeh6VwrxED6TgOQjaITqX5iVGhQbhvgTE0vxucwr7ZlUIBJlTfSiFrX2zuVcbzzzIO6Y6/dXWH/EPCluot02PmCbXtDK647wVEi+nVFJa8DAqDAhypYqmAbgOv6mTAfHOmJ5IOvcNQaf6vDQK0PCVPbPESs5Nc0Ya+y8r/WdCX2cxXCvdSv8dQXn6FoJ3KyqzxOtJKm1cekleeg73uSki8UXjkjWrlf6zwPzX4FUxsLZmob9ANCBDoDoojcbIojmahYmemMvMONLi/A5/SmpE76YBWbrrCdGQCMwbDYiGWHr7rs7gvAlDoXo3DaIRJM1Hw8wYrYrTcKb3z9xfEvx3HgiKVaUyH/FkMYSxTfO5zuuScdrXIxZgT+svkUe1fChU/iBtLBA0jGmY6jGt9GrEsp2hjv/NfdncRtbTk9vDjbQK84qGuhtecwrHafWnhmK7VoC1rMX7F+exkvzkbxjHcRzHcRzHcZxfwR+hzjgyLDVwrgAAAABJRU5ErkJggg==\" alt=\"x = xmax\" style=\"width: 52.5px; height: 20px;\" width=\"52.5\" height=\"20\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 7.91667px; transform-origin: 0px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-style: italic; \"\u003e­\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 118.242px 7.91667px; transform-origin: 118.242px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e and returns a two-column matrix with \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAmCAYAAABnE91tAAACbklEQVRoge2ZYZHjMAyFPw5hsARMoAiCwAzKIAxKIRgKoRxCIRhKoffD1sXJpakt2+1ex29mZ6fjWo4USe/JhYaGhoaGr4EBLp9+iAwMwKmWcQPcgK7WAW9AB1wBW9qwAWb+7+AIOmAC+pIG55IGfwF+gLv/n40RV1rfhoECfv0ADyo2tg+iw/mW1Y9GXL1+K7L8kwgPxR7n96HH+Wg0my268jLAmf3AniijRTpvo/f29pqtrB05n5UEo98ciwGnMSa/74EL1Nbew39HKxkkyLfA3p54lbVX8mRG2axvOCpMRef3PYKDxaEeF8RSZStBuvNvEOzB2taGxs+Vg6m4sry9nnoiU3rIMzaKoXJ51mTkBOjMOsVVTTASkq3jztrIusz3MKBs1DkBMiwB2nvwkpDets1SmQBeqWUJUDJx5AQIljdbe/qXXrN1cog8+yMBMiwBmpU2YiFqP2TN2OyBdLb+iwmdypRpOaT7IkPhAWZ/ztV/vhCfucKEydB299HvDftQ8fuXnTNFX0n2xrLmhLJShIlSurtlXVJbhjGss9LggnnjNdu8OjcUoSkvRN0npbaPDpNbxhHX7LZ3LKEekuCZnXX50945hdmakg2io9R3XRNLXe9BGEAU65YJ7Iv1cPwIe4gGckZKxl/IJBFx8FmT7VgG02ffsQfr4f6ZPEmwnf1icKfA2DOVMBJ5jjbVz6Rnn5R89ggk9V2Tqi16zXUi3VEZqIvds1vq3SxKcDRvUn5tSZ2jrlRQ+APl56qONEq+sDCVlEjqiHCm4nxoaxqPQCgLNJljecMvw5/88VBYT6vMa488DQ0NDQ3vxB/S+dLV0jP65QAAAABJRU5ErkJggg==\" alt=\"(x, y)\" style=\"width: 36px; height: 19px;\" width=\"36\" height=\"19\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 29.1667px 7.91667px; transform-origin: 29.1667px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e pairs for \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-6px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGkAAAAoCAYAAAD9htTzAAAC1UlEQVR4nO2a3XGrMBCFTw90QAM0QAVUQAc85N0duAVqoAR6cAuugRacB+mMDjJcEowUuLPfDOOMAEmrXe2PCGAYhmEYhmEYhmFcmRLA3f8aJ6ME0AN4+av62+kYSqycCUAHoPjLSRkOU86JMeXspATQArjhPWCXvr39cIwawIj0yqmxPt81GU9NA2DAfPEGud9K+wv7hMulnN6P88R78lEAeEh7f/DY2eBCTnBC1XACN3BCDeuvLpJLOUvjcsybbxvh0vrW/90knkMyOgThqKB6Z193zHfgiLwxZ0LwCjf83sBOS4W51X8ag1rMXczjgD5/yoAgxzPTmNmgBR4pWOz2cihLvUIuw8gGLfCRoO+cylKvcNn4s0ScAaVKU5eUdXRCoVnpZTO5JXrMlZTaTdRIU9RWcO6aqfh/E5NaOGEKhLiUywKPPIGgN+gwj0uXKl6XoOWx8GNcogVS8NSCHnEK3iMYl8YleoUOrjwAQmr+8O8UMv4kc4rXQyl833f/buufZxxkjalG3/r+J/yDwnc0+ElPmAfXODPKmToDQVk/qdFYnHKR4oSHXmGEkyteaCqA/fCXazIi1IzxjqRx3xF2PceLDYyKr/2Y1ZZ8WpG//OSVcuP+mdAEhO5a6TfuP+AWT08hWFtxMSu876TKPxcXyWvjcJ6/8kg8aFzTZr1x/yzw8HcthhUI8Sm+XyAokC5QDZRKo2fRGM3ERHdMufAcueGEBk8j+ORKHQMbBOumApm66w5RlwgsKw0Iilg7fVdjOAXqhvZeqT+f0xWqdVMh6kHieDQuPKNZcWxcWn+mOCTYzRE7KfWB7BNuYXVRGY84Nl0Y2zSe63t99JzeGzA/xyzgDPDyZUFquPijtDFBUDembmrAPNNrENJ2ujp+m/vy73bSn+7cAaakTRhX1NXx80q78Jxmf6ootmsG2EhfrL/4HjNJ+08owzAMwzAMwzCMDb4BkIRTCxuZ9zgAAAAASUVORK5CYII=\" alt=\"x \u003c= xmax\" style=\"width: 52.5px; height: 20px;\" width=\"52.5\" height=\"20\"\u003e\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 54.8333px 7.91667px; transform-origin: 54.8333px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. Sort the pairs in order of increasing \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"font-family: \u0026quot;STIXGeneral\u0026quot;, \u0026quot;STIXGeneral-webfont\u0026quot;, serif; font-style: italic; font-weight: 400; color: rgb(0, 0, 0);\"\u003ex\u003c/span\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 1.94167px 7.91667px; transform-origin: 1.94167px 7.91667px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function xy = Mordell(xmax)\r\n  xy = f(xmax);\r\nend","test_suite":"%%\r\nxmax = 2;\r\nxy = Mordell(xmax);\r\nn_correct = 3;  %  Be careful here\r\nassert(isequal(size(xy,1),n_correct))\r\n\r\n%%\r\nxmax = 10;\r\nxy = Mordell(xmax);\r\nn_correct = 4;\r\nxy_last = [7 8];\r\nassert(isequal(size(xy,1),n_correct) \u0026\u0026 isequal(xy(end,:),xy_last));\r\n\r\n%%\r\nxmax = 50;\r\nxy = Mordell(xmax);\r\nn_correct = 5;\r\nPS_correct = -2340;\r\nassert(isequal(size(xy,1),n_correct) \u0026\u0026 isequal(prod(sum(xy,2)),PS_correct));\r\n\r\n%%\r\nxmax = 100;\r\nxy = Mordell(xmax);\r\nn_correct = 6;\r\nPS_correct = -781560;\r\nassert(isequal(size(xy,1),n_correct) \u0026\u0026 isequal(prod(sum(xy,2)),PS_correct));\r\n    \r\n%%\r\nxmax = 500;\r\nxy = Mordell(xmax);\r\nn_correct = 6;\r\nPS_correct = -781560;\r\nassert(isequal(size(xy,1),n_correct) \u0026\u0026 isequal(prod(sum(xy,2)),PS_correct));\r\n\r\n%%\r\nxmax = 1000;\r\nxy = Mordell(xmax);\r\nPS_correct = -7377144840;\r\nassert(isequal(prod(sum(xy,2)),PS_correct));\r\n\r\n%%\r\nxmax = 5000;\r\nxy = Mordell(xmax);\r\nPSD_correct = 4254584400;\r\nassert(isequal(prod(sum(diff(xy),2)),PSD_correct));\r\n\r\n%%\r\nxmax = 10000;\r\nxy = Mordell(xmax);\r\nSPCS_correct = 7776998;\r\nassert(isequal(sum(prod(cumsum(xy),2)),SPCS_correct));","published":true,"deleted":false,"likes_count":1,"comments_count":1,"created_by":46909,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2021-04-19T03:35:35.000Z","updated_at":"2021-04-19T15:20:33.000Z","published_at":"2021-04-19T03:38:41.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTheorem 1 of chapter 27 of the book \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eDiophantine Equations\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e by Louis J. Mordell shows that the equation                                            \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e  \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"true\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"y^2 = (x choose 0) + (x choose 1) + (x choose 2) + (x choose 3)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey^2={x \\\\choose 0} + {x \\\\choose 1} + {x \\\\choose 2} + {x \\\\choose 3} \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003ehas a finite number of real, integer solutions \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"(x,y)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e(x, y)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. One of them has \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x = 7\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex = 7\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e because \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"y^2 = 1 + 7 + 21 + 35 + 64 = 8^2\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ey^2 = 1 + 7 + 21 + 35 = 64 = 8^2\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. \u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function that takes a value \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x = xmax\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex = x_{max}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e­\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and returns a two-column matrix with \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"(x, y)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e(x, y)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e pairs for \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x \u0026lt;= xmax\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex \\\\le x_{max}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. Sort the pairs in order of increasing \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"false\\\"/\u003e\u003cw:attr w:name=\\\"altTextString\\\" w:val=\\\"x\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"},{"id":44502,"title":"Anyone for tennis?  Your chances of winning a (standard) game","description":"Imagine you are playing tennis, and for _each point_ played your chance of winning is |x| % (input as a |\u003chttps://au.mathworks.com/help/matlab/ref/uint8.html uint8\u003e|).  Given the \u003chttp://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx ITF's scoring system for a \"standard game\" of tennis\u003e (excerpted below), please determine your likelihood of winning a game (output as a |\u003chttps://au.mathworks.com/help/matlab/ref/single.html single\u003e|).  \r\n\r\nNote that as |x| is taken to be the same for every point in this problem, it does not matter whether you are serving or not.  \r\n\r\nEXAMPLE\r\n\r\n x = uint8(40)\r\n chance = single(0.2642707692307693)\r\n\r\n-----\r\n\r\n*\"* A standard game is scored as follows with the server’s score being called first:\r\n\r\n* No point - “Love”\r\n* First point - “15”\r\n* Second point - “30”\r\n* Third point - “40”\r\n* Fourth point - “Game”\r\n\r\nexcept that if each player/team has won three points, the score is “Deuce”.\r\nAfter “Deuce”, the score is “Advantage” for the player/team who wins the next point. If that same player/team also wins the next point, that player/team wins the “Game”; if the opposing player/team wins the next point, the score is again “Deuce”. A player/team needs to win two consecutive points immediately after “Deuce” to win the “Game”. *\"*\r\n\r\n-----\r\n\r\nSee also \u003chttps://www.mathworks.com/matlabcentral/cody/problems/44503 Problem 44503. Anyone for tennis? Your chances of winning a tie-break game\u003e.","description_html":"\u003cp\u003eImagine you are playing tennis, and for \u003ci\u003eeach point\u003c/i\u003e played your chance of winning is \u003ctt\u003ex\u003c/tt\u003e % (input as a \u003ctt\u003e\u003ca href = \"https://au.mathworks.com/help/matlab/ref/uint8.html\"\u003euint8\u003c/a\u003e\u003c/tt\u003e).  Given the \u003ca href = \"http://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx\"\u003eITF's scoring system for a \"standard game\" of tennis\u003c/a\u003e (excerpted below), please determine your likelihood of winning a game (output as a \u003ctt\u003e\u003ca href = \"https://au.mathworks.com/help/matlab/ref/single.html\"\u003esingle\u003c/a\u003e\u003c/tt\u003e).\u003c/p\u003e\u003cp\u003eNote that as \u003ctt\u003ex\u003c/tt\u003e is taken to be the same for every point in this problem, it does not matter whether you are serving or not.\u003c/p\u003e\u003cp\u003eEXAMPLE\u003c/p\u003e\u003cpre\u003e x = uint8(40)\r\n chance = single(0.2642707692307693)\u003c/pre\u003e\u003cp\u003e-----\u003c/p\u003e\u003cp\u003e\u003cb\u003e\"\u003c/b\u003e A standard game is scored as follows with the server’s score being called first:\u003c/p\u003e\u003cul\u003e\u003cli\u003eNo point - “Love”\u003c/li\u003e\u003cli\u003eFirst point - “15”\u003c/li\u003e\u003cli\u003eSecond point - “30”\u003c/li\u003e\u003cli\u003eThird point - “40”\u003c/li\u003e\u003cli\u003eFourth point - “Game”\u003c/li\u003e\u003c/ul\u003e\u003cp\u003eexcept that if each player/team has won three points, the score is “Deuce”.\r\nAfter “Deuce”, the score is “Advantage” for the player/team who wins the next point. If that same player/team also wins the next point, that player/team wins the “Game”; if the opposing player/team wins the next point, the score is again “Deuce”. A player/team needs to win two consecutive points immediately after “Deuce” to win the “Game”. \u003cb\u003e\"\u003c/b\u003e\u003c/p\u003e\u003cp\u003e-----\u003c/p\u003e\u003cp\u003eSee also \u003ca href = \"https://www.mathworks.com/matlabcentral/cody/problems/44503\"\u003eProblem 44503. Anyone for tennis? Your chances of winning a tie-break game\u003c/a\u003e.\u003c/p\u003e","function_template":"function chance = standardGame(x)\r\n\r\n    % Your comments \r\n    \r\nend","test_suite":"%% Please do not try to hack the Test Suite.  \r\n% The Test Suite will be updated if inappropriate submissions are received.  \r\n% This includes hard-coded (pre-calculated, externally calculated, manually calculated) 'solutions'.\r\nfiletext = fileread('standardGame.m');\r\nvec = [923273, 144780, 713710, 217788, 507812, 992110, 170355, 264270, 376851, 475014];\r\nmsg = 'Please do not hard-code your ''solution''.';\r\nassert( all( arrayfun(@(z) isempty(strfind(filetext, num2str(z))), vec) ) , msg )\r\n\r\n%% Test self-consistency:  \r\n% There are only two players, so the chances for each should add up to one.  \r\nassert( abs(standardGame(100)+standardGame(0) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(90)+standardGame(10) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(80)+standardGame(20) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(70)+standardGame(30) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(60)+standardGame(40) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(standardGame(50)+standardGame(50) - 1)  \u003c 20 * eps(single(1)) )\r\n\r\n%%\r\nx = uint8(50);\r\ny_correct = 0.50;\r\nassert( isequal(standardGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(0);\r\ny_correct = 0;\r\nassert( isequal(standardGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(100);\r\ny_correct = 1;\r\nassert( isequal(standardGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(5);\r\ny_correct = 0.0000923273480663;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(10);\r\ny_correct = 0.0014478048780488;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(15);\r\ny_correct = 0.0071371057046980;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(20);\r\ny_correct = 0.0217788235294118;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(25);\r\ny_correct = 0.0507812500000000;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(30);\r\ny_correct = 0.0992110344827586;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(35);\r\ny_correct = 0.1703553555045871;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(40);\r\ny_correct = 0.2642707692307693;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(45);\r\ny_correct = 0.3768514975247527;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(49);\r\ny_correct = 0.4750149924031987;\r\nassert( abs( standardGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%% Test adherence to instructions\r\nfor i = 1:5\r\n    x = uint8( randi(100) );\r\n    assert( isequal(class(standardGame(x)), 'single') )\r\nend;\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":64439,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":4,"test_suite_updated_at":"2018-01-18T10:56:38.000Z","rescore_all_solutions":true,"group_id":1,"created_at":"2018-01-18T00:25:34.000Z","updated_at":"2019-07-02T13:23:52.000Z","published_at":"2018-01-18T01:51:18.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eImagine you are playing tennis, and for\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eeach point\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e played your chance of winning is\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e % (input as a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://au.mathworks.com/help/matlab/ref/uint8.html\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003euint8\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e). Given the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eITF's scoring system for a \\\"standard game\\\" of tennis\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (excerpted below), please determine your likelihood of winning a game (output as a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://au.mathworks.com/help/matlab/ref/single.html\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003esingle\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eNote that as\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is taken to be the same for every point in this problem, it does not matter whether you are serving or not.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEXAMPLE\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ x = uint8(40)\\n chance = single(0.2642707692307693)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e-----\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e A standard game is scored as follows with the server’s score being called first:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eNo point - “Love”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFirst point - “15”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSecond point - “30”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eThird point - “40”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"ListParagraph\\\"/\u003e\u003cw:numPr\u003e\u003cw:numId w:val=\\\"1\\\"/\u003e\u003c/w:numPr\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eFourth point - “Game”\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eexcept that if each player/team has won three points, the score is “Deuce”. After “Deuce”, the score is “Advantage” for the player/team who wins the next point. If that same player/team also wins the next point, that player/team wins the “Game”; if the opposing player/team wins the next point, the score is again “Deuce”. A player/team needs to win two consecutive points immediately after “Deuce” to win the “Game”.\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e-----\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSee also\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/44503\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProblem 44503. Anyone for tennis? Your chances of winning a tie-break game\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"},{"id":44503,"title":"Anyone for tennis?  Your chances of winning a tie-break game","description":"Imagine you are playing tennis and the score has reached 'six games all' in a Tie-break Set, so therefore the next game shall be a 'tie-break game', which is now to be played to decide the outcome of this set.  For _each point_ played in the tie-break game your chance of winning is |x| % (input as a |\u003chttps://au.mathworks.com/help/matlab/ref/uint8.html uint8\u003e|).  Given the \u003chttp://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx ITF's scoring system for a \"tie-break game\" of tennis\u003e (excerpted below), please determine your likelihood of winning the tie-break game (output as a |\u003chttps://au.mathworks.com/help/matlab/ref/single.html single\u003e|).  \r\n\r\nNote that as |x| is taken to be the same for every point in this problem, it does not matter whether you are serving or not.  \r\n\r\nEXAMPLE\r\n\r\n x = uint8(40)\r\n chance = single(0.2125443387076924)\r\n\r\n-----\r\n\r\n*\"* During a tie-break game, points are scored “Zero”, “1”, “2”, “3”, etc. The first player/team to win seven points wins the “Game” and “Set”, provided there is a margin of two points over the opponent(s). If necessary, the tie-break game shall continue until this margin is achieved. *\"*\r\n\r\n-----\r\n\r\nSee also \u003chttps://www.mathworks.com/matlabcentral/cody/problems/44502 Problem 44502. Anyone for tennis? Your chances of winning a (standard) game\u003e.","description_html":"\u003cp\u003eImagine you are playing tennis and the score has reached 'six games all' in a Tie-break Set, so therefore the next game shall be a 'tie-break game', which is now to be played to decide the outcome of this set.  For \u003ci\u003eeach point\u003c/i\u003e played in the tie-break game your chance of winning is \u003ctt\u003ex\u003c/tt\u003e % (input as a \u003ctt\u003e\u003ca href = \"https://au.mathworks.com/help/matlab/ref/uint8.html\"\u003euint8\u003c/a\u003e\u003c/tt\u003e).  Given the \u003ca href = \"http://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx\"\u003eITF's scoring system for a \"tie-break game\" of tennis\u003c/a\u003e (excerpted below), please determine your likelihood of winning the tie-break game (output as a \u003ctt\u003e\u003ca href = \"https://au.mathworks.com/help/matlab/ref/single.html\"\u003esingle\u003c/a\u003e\u003c/tt\u003e).\u003c/p\u003e\u003cp\u003eNote that as \u003ctt\u003ex\u003c/tt\u003e is taken to be the same for every point in this problem, it does not matter whether you are serving or not.\u003c/p\u003e\u003cp\u003eEXAMPLE\u003c/p\u003e\u003cpre\u003e x = uint8(40)\r\n chance = single(0.2125443387076924)\u003c/pre\u003e\u003cp\u003e-----\u003c/p\u003e\u003cp\u003e\u003cb\u003e\"\u003c/b\u003e During a tie-break game, points are scored “Zero”, “1”, “2”, “3”, etc. The first player/team to win seven points wins the “Game” and “Set”, provided there is a margin of two points over the opponent(s). If necessary, the tie-break game shall continue until this margin is achieved. \u003cb\u003e\"\u003c/b\u003e\u003c/p\u003e\u003cp\u003e-----\u003c/p\u003e\u003cp\u003eSee also \u003ca href = \"https://www.mathworks.com/matlabcentral/cody/problems/44502\"\u003eProblem 44502. Anyone for tennis? Your chances of winning a (standard) game\u003c/a\u003e.\u003c/p\u003e","function_template":"function chance = tiebreakGame(x)\r\n\r\n    % Your comments \r\n    \r\nend","test_suite":"%% Please do not try to hack the Test Suite.  \r\n% The Test Suite will be updated if inappropriate submissions are received.  \r\n% This includes hard-coded (pre-calculated, externally calculated, manually calculated) 'solutions'.\r\n\r\n% EDIT (2019-06-24).  Anti-hacking provision\r\n% Ensure builtin function will be called.  (Probably only the second of these will work.)  \r\n! del fileread.m\r\n! rm -v fileread.m\r\n% Disallow certain words  \r\nRE = regexp(fileread('tiebreakGame.m'), '\\w+', 'match');\r\ntabooWords = {'ans', 'assert', 'freepass'};\r\ntestResult = cellfun( @(z) ismember(z, tabooWords), RE );\r\nmsg = ['Please do not do that in your code!' char([10 13]) ...\r\n    'Found: ' strjoin(RE(testResult)) '.' char([10 13]) ...\r\n    'Banned word.' char([10 13])];\r\nassert(~any(  cellfun( @(z) ismember(z, tabooWords), RE )  ), msg)\r\n% END EDIT (2019-06-24)\r\n\r\nfiletext = fileread('tiebreakGame.m');\r\nvec = [5242178 5616877 7920095 4815022 1826772 5089792,5089793 1134259 2125443 3458492 4684486];\r\nmsg = 'Please do not hard-code your ''solution''.';\r\nassert( all( arrayfun(@(z) isempty(strfind(filetext, num2str(z))), vec) ) , msg )\r\n\r\n%% Test self-consistency:  \r\n% There are only two players, so the chances for each should add up to one.  \r\nassert( abs(tiebreakGame(100)+tiebreakGame(0) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(90)+tiebreakGame(10) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(80)+tiebreakGame(20) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(70)+tiebreakGame(30) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(60)+tiebreakGame(40) - 1)  \u003c 20 * eps(single(1)) )\r\nassert( abs(tiebreakGame(50)+tiebreakGame(50) - 1)  \u003c 20 * eps(single(1)) )\r\n\r\n%%\r\nx = uint8(50);\r\ny_correct = 0.50;\r\nassert( isequal(tiebreakGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(0);\r\ny_correct = 0;\r\nassert( isequal(tiebreakGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(100);\r\ny_correct = 1;\r\nassert( isequal(tiebreakGame(x), y_correct) )\r\n\r\n%%\r\nx = uint8(5);\r\ny_correct = 0.0000005242178465;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(10);\r\ny_correct = 0.0000561687707317;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(15);\r\ny_correct = 0.0007920095157735;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(20);\r\ny_correct = 0.0048150226823529;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(25);\r\ny_correct = 0.0182677268981934;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(30);\r\ny_correct = 0.0508979303379310;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(35);\r\ny_correct = 0.1134259300865006;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(40);\r\ny_correct = 0.2125443387076924;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(45);\r\ny_correct = 0.3458492328206313;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%%\r\nx = uint8(49);\r\ny_correct = 0.4684486239083455;\r\nassert( abs( tiebreakGame(x) - y_correct ) \u003c 10 * eps(single(y_correct)) )\r\n\r\n%% Test adherence to instructions\r\nfor i = 1:5\r\n    x = uint8( randi(100) );\r\n    assert( isequal(class(tiebreakGame(x)), 'single') )\r\nend;\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":64439,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":4,"test_suite_updated_at":"2019-07-02T13:20:57.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2018-01-18T10:19:54.000Z","updated_at":"2019-07-02T13:20:57.000Z","published_at":"2018-01-18T10:57:34.000Z","restored_at":null,"restored_by":null,"spam":false,"simulink":false,"admin_reviewed":false,"description_opc":"{\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"targetMode\":\"\",\"relationshipId\":\"rId2\",\"target\":\"/matlab/output.xml\"}],\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"relationship\":[],\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\\n\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eImagine you are playing tennis and the score has reached 'six games all' in a Tie-break Set, so therefore the next game shall be a 'tie-break game', which is now to be played to decide the outcome of this set. For\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:i/\u003e\u003c/w:rPr\u003e\u003cw:t\u003eeach point\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e played in the tie-break game your chance of winning is\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e % (input as a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://au.mathworks.com/help/matlab/ref/uint8.html\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003euint8\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e). Given the\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://www.itftennis.com/procircuit/about-pro-circuit/rules-regulations.aspx\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eITF's scoring system for a \\\"tie-break game\\\" of tennis\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e (excerpted below), please determine your likelihood of winning the tie-break game (output as a\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://au.mathworks.com/help/matlab/ref/single.html\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003esingle\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e).\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eNote that as\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:rFonts w:cs=\\\"monospace\\\"/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ex\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e is taken to be the same for every point in this problem, it does not matter whether you are serving or not.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eEXAMPLE\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ x = uint8(40)\\n chance = single(0.2125443387076924)]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e-----\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e During a tie-break game, points are scored “Zero”, “1”, “2”, “3”, etc. The first player/team to win seven points wins the “Game” and “Set”, provided there is a margin of two points over the opponent(s). If necessary, the tie-break game shall continue until this margin is achieved.\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:b/\u003e\u003c/w:rPr\u003e\u003cw:t\u003e\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e-----\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eSee also\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.mathworks.com/matlabcentral/cody/problems/44502\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eProblem 44502. Anyone for tennis? Your chances of winning a (standard) game\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"term":"tag:\"binomial\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"binomial\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"binomial\"","","\"","binomial","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f4a0194bf40\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f4a0194bea0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f4a0194b4a0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f4a0194c1c0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f4a0194c120\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f4a0194c080\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f4a0194bfe0\u003e":"tag:\"binomial\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f4a0194bfe0\u003e":"tag:\"binomial\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"search","password":"J3bGPZzQ7asjJcCk","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"binomial\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"binomial\"","","\"","binomial","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f4a0194bf40\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f4a0194bea0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f4a0194b4a0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f4a0194c1c0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f4a0194c120\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f4a0194c080\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f4a0194bfe0\u003e":"tag:\"binomial\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f4a0194bfe0\u003e":"tag:\"binomial\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":47078,"difficulty_rating":"easy"},{"id":47083,"difficulty_rating":"easy"},{"id":51471,"difficulty_rating":"easy-medium"},{"id":44502,"difficulty_rating":"hard"},{"id":44503,"difficulty_rating":"hard"}]}}