{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-26T00:14:02.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":"2026-04-26T00: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":60291,"title":"Minimize a quadratic function","description":"Write a function to minimize the function . The coefficients a, b, and c will be positive. Give the coefficients in a vector coeffs = [a b c d e f g], return the point  at which the function is minimum as well as the minimum value. ","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: 63px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 31.5px; transform-origin: 407px 31.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; 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: 125.892px 8px; transform-origin: 125.892px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function to minimize the function \u003c/span\u003e\u003c/span\u003e\u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HwYC/igM5ZAqn2fPjQ490FGS81LkJ5nreAjkB3Co6NozeWpBDncjLZ4KWfuQFb9DqXFeW+dJrKjy+OkOCPgtyzm7fHao4njkTgj4HamxHbI7VWs8tiECfocbZEfvjSs5E6xhdbreyh/9ETvyRZsFOE8w3CRzV8UOhfx0RSpxc4BklxGJbTVbz/es+3j2QEAIaNs/Ie6Slw0PBE8fAeV+saOSHMPFLcCnD8fJtpCICLbP9SuTW01iBz6eAgDaHcs7MdmtyO5YLlZ8OOriK6m2D/JzCmow2jAQGAgMBAYCA4GBQDYCg/xkQzUKDgQGAgOBgcBAYCBwCggM8nMKvTjaMBAYCAwEBgIDgYFANgKD/GRDNQoOBAYCA4GBwEBgIHAKCPwfcEsLgvomIdUAAAAASUVORK5CYII=\" width=\"287.5\" height=\"19.5\" alt=\"F(x,y,z) =ax^2+by^2+cz^2-dxy+exz+fz+g\" style=\"width: 287.5px; height: 19.5px;\"\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: 110.717px 8px; transform-origin: 110.717px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. The coefficients a, b, and c will be positive. Give the coefficients in a vector \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: 92.4px 8px; transform-origin: 92.4px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; \"\u003ecoeffs = [a b c d e f g]\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: 52.8917px 8px; transform-origin: 52.8917px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, return the point \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAlCAYAAAC9DeznAAAEzElEQVRoQ+2aS6hNURjH750rYcQAYUApJh4RGVEmBvIYSLeUx0BSKEY3A8RAMvBIuinPMpBSJETkWRQxQEiMvGLO/3c7Xy27vdfrnN1xr73r3+nuvfb61vr+33Pt29vTXF3VQG9XpTfCexoCumwEDQFDjIDRWu8GYW+X1/2vit+ohV0QvsYuMMUDUP4VYbPwKFbAfzZulvZ7OEVHsQSg/LvC2kb5QZOChEvCshhdxRJwX5PdFnYExTcD0MBi4ZAwPxSOYgjYr0nWCOMa3SZp4KpGvxPImZVXiABCz3thu3A0SXwzeLJU8FpYIlyrUkeIgMb62zMkQvePFgmlM4UI+Km3zoTcqL01Duu3KUuPCFOEN2U79RGwSi+cE1YL54e1murbnIWhXRJR2jv5CDiml9YLY4ToxqK+vQzZmYki96rCkI8A4tccIRSmTDOwvVJYJMwTRhRcz5oU5qRbxMNyLkq85cIMYaQwtcJLX7aeHdevtxIJLIJ9nQ6M8ZXo6HG8UFpF+pQLcy+EuZFaIt69FSYJxD0uUzTKvyF8bCnllX6DNXJALkRcFCCa+aYVxhsB3G7Hiy2OVy3nsx4sEEpjvO57DdlHwG+9/CCBAHeBtnlTNF10v0AugQxCWtWCA3r/6zFVGiUy12zBPSKxoxO8pB2yqee/C8Rxd83W8fbpfmWZqWe2xtJEXBcBlj9QDIt7JtTRRVuSQ86BEhlsfoKQG+6YF6PZ1DIaYx9ynwu7hVB/ZASU9gN1EWAVFAvGi5YWNmAb6cSveVuZt/JsS8BCc9bAvJcjjaorBGAhX1o7azcJhhTkhiHXzckRWGinybeSvOgVVev0VpM+D/ikGT8IsUm4uADeH9uyPtyvrgtFE6e53J6F5HdQ6GQPQ0LGo1JySnYSTi1DXQW7Vsn92FI2lyQKBi7ztjqsnzkHBF/FU7Z+9EghUKzSBsf6FOPN3h5NWXm4R2MAl/dAKlfrzntmLFaO4n1bO2j9JPs7Qp/gq3jKtoJxVPY9PgIosx4KKUcRdnpKo/RYsDzgVig7dd9ty5EzKmNj7mbNWH7pJj0ITVpV2EuVZx+j+jMINR2SL0qrpVBowJJg3lfGYfHUx98E6v1TjoKLFQrxmONtK0ndUIXyKBlzjj3cPMA8M1trKlpkjjzyy62C0RTnrfobeSi/cl8hAkITYM0WZtg434zd6sDtB+gYIdN9bqHDNpBbMblVV+XBl4Skyit61r5EAwkacIiA0AcZPOOEwHEAyoMQ14ItdlINlT1334cE4mtuxWSdu6/sTJFXdgSBEU139oiBTaxYs+XCKm8cNLoQAYyxReeGh1h3xTr5mJ3zLy8Q/VTwbrawkJA8CHjSemebfjloLBqJVV9leTKqWYshAKFWS7fT0vuIsNY+tcRjzpwkmSPPPc21ogIlcxX7AkLXQiHYQ8USgBAsZkAInX3EWryNs0Oz3LmLiT0kv115hJZ1AhGBY2jCkHtIF/0fESw0hQDzhJsdJAFlnBVOOl7mUyBWuEK4LpAvUo8FUuWFyCw+Ny+JPv5IJQCBhKFOtvcpm3SrmLKqKmWuOsYm6yaHgDoWHjsniZH4y8eimKPg2Hm7Nm6oEdA1RdUluCGgLs1GztsQEKmouoY1BNSl2ch5/wDVtiw136/QBgAAAABJRU5ErkJggg==\" width=\"48\" height=\"18.5\" alt=\"(x,y,z)\" style=\"width: 48px; height: 18.5px;\"\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: 74.675px 8px; transform-origin: 74.675px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e at which the function is minimum as well as the minimum value. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [x,y,z,Fmin] = minimizeQuadratic(coeffs)\r\n  y = fminsearch(polyval(coeffs,x));\r\n  z = y;\r\n  Fmin = 0;\r\nend","test_suite":"%%\r\n[x,y,z,Fmin] = minimizeQuadratic([5 1 2 2 4 6 0]);\r\nx_correct = 3/2;\r\ny_correct = 3/2;\r\nz_correct = -3;\r\nFmin_correct = -9;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic([5 2 1 2 4 6 0]);\r\nx_correct = 12;\r\ny_correct = 6;\r\nz_correct = -27;\r\nFmin_correct = -81;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic([5 1 2 -2 4 6 1]);\r\nx_correct = 3/2;\r\ny_correct = -3/2;\r\nz_correct = -3;\r\nFmin_correct = -8;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic(1:7);\r\nx_correct = -30/37;\r\ny_correct = -30/37;\r\nz_correct = -12/37;\r\nFmin_correct = 223/37;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic(7:-1:1);\r\nx_correct = 18/353;\r\ny_correct = 6/353;\r\nz_correct = -76/353;\r\nFmin_correct = 277/353;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic([8 4 5 1 3 2 -9]);\r\nx_correct = 24/599;\r\ny_correct = 3/599;\r\nz_correct = -127/599;\r\nFmin_correct = -9.212020033388981;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic([4 2 7 8 -9 -11 3]);\r\nx_correct = -99/193;\r\ny_correct = -198/193;\r\nz_correct = 88/193;\r\nFmin_correct = 95/193;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\ng = 12*rand();\r\n[x,y,z,Fmin] = minimizeQuadratic([12*rand(1,3) 0 0 0 g]);\r\nx_correct = 0;\r\ny_correct = 0;\r\nz_correct = 0;\r\nFmin_correct = g;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\nc = 12*rand; \r\nf = 12*rand;\r\ng = 13*rand;\r\n[x,y,z,Fmin] = minimizeQuadratic([1 1 c 0 0 f g]);\r\nx_correct = 0;\r\ny_correct = 0;\r\nz_correct = -f/(2*c);\r\nFmin_correct = g-f^2/(4*c);\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2024-05-12T05:32:04.000Z","deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2024-05-12T05:31:16.000Z","updated_at":"2025-09-30T13:49:23.000Z","published_at":"2024-05-12T05:31:22.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\u003eWrite a function to minimize the function \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=\\\"F(x,y,z) =ax^2+by^2+cz^2-dxy+exz+fz+g\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eF(x,y,z) = ax^2 + by^2 + cz^2 – d x y + e x z + f z + g\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. The coefficients a, b, and c will be positive. Give the coefficients in a vector \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\u003ecoeffs = [a b c d e f g]\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, return the point \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,z)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e(x,y,z)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e at which the function is minimum as well as the minimum value. \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":59691,"title":"Find the minimum element coprime to the rest in a set of 10 consecutive integers","description":"In this video, Dr Barker argued that a set of 10 consecutive integers must have at least one integer coprime to the rest. For example, in the set 20:29, both 23 and 29 are coprime to the other elements of the set. \r\nThe argument proceeds like this: In a set of 10 consecutive integers, five are even, and five are odd. The even numbers are not coprime because they share a factor of 2 (at least). Of the five odd numbers, at most two will be divisible by 3, one will be divisible by 5, and one will be divisible by 7. Aside from 1, the remaining number will not be divisible by any number less than 10, and if the remaining number is divisible by a number greater than 10, there cannot be another number in the set divisible by the same number. Therefore, at least one of the numbers in the set is coprime to the others. \r\nWrite a function that takes the smallest number in the set and produces the smallest number coprime to the others as well as the number of coprime integers. If the input is 20, then the function should return 23 and 2. ","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: 207px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 103.5px; transform-origin: 407px 103.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 42px; 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 21px; text-align: left; transform-origin: 384px 21px; 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: 7.775px 8px; transform-origin: 7.775px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIn \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.youtube.com/watch?v=gcU-EB4J6vA\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003ethis video\u003c/span\u003e\u003c/span\u003e\u003c/a\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: 269.15px 8px; transform-origin: 269.15px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, Dr Barker argued that a set of 10 consecutive integers must have at least one integer \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Coprime_integers\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003ecoprime\u003c/span\u003e\u003c/span\u003e\u003c/a\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: 49.375px 8px; transform-origin: 49.375px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e to the rest. For example, in the set 20:29, both 23 and 29 are coprime to the other elements of the set. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 105px; 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 52.5px; text-align: left; transform-origin: 384px 52.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: 383.9px 8px; transform-origin: 383.9px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe argument proceeds like this: In a set of 10 consecutive integers, five are even, and five are odd. The even numbers are not coprime because they share a factor of 2 (at least). Of the five odd numbers, at most two will be divisible by 3, one will be divisible by 5, and one will be divisible by 7. Aside from 1, the remaining number will not be divisible by any number less than 10, and if the remaining number is divisible by a number greater than 10, there cannot be another number in the set divisible by the same number. Therefore, at least one of the numbers in the set is coprime to the others. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; 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 21px; text-align: left; transform-origin: 384px 21px; 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: 378.325px 8px; transform-origin: 378.325px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function that takes the smallest number in the set and produces the smallest number coprime to the others as well as the number of coprime integers. If the input is 20, then the function should return 23 and 2. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [y,nc] = minCoprime(n)\r\n  y = n; \r\n  nc = randi(5);\r\nend","test_suite":"%%\r\nn = 1;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 1;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 2;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 7;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 20;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 23;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 20;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 23;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 100;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 101;\r\nnc_correct = 4;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 658;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 659;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 2898;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 2899;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 39574;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 39577;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 488843;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 488843;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 5129442;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 5129443;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 69641285;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 69641287;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 777444111;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 777444113;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 8264599137;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 8264599139;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 90909090909;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 90909090911;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nfor k = 1:10000\r\n    [y(k),nc(k)] = minCoprime(k);\r\nend\r\nh = histc(y,unique(y));\r\ny9 = y(h==9);\r\nsum_correct = 50025620;\r\nsumu_correct = 12622928;\r\nhist_correct = [572 4856 4190 382];\r\nnprime_correct = 5132;\r\ny9_correct = [53 107 163 217 269 319 373 427 479 533 583 641 689 743 797 851 901 959 1007 1061 1117 1169 1219 1273 1327 1381 1433 1487 1537 1591 1643 1697 1751 1807 1859 1909 1961 2017 2069 2123 2173 2227 2279 2333 2389 2441 2491];\r\nassert(isequal(sum(y),sum_correct))\r\nassert(isequal(sum(unique(y)),sumu_correct))\r\nassert(isequal(histcounts(nc,4),hist_correct))\r\nassert(isequal(sum(isprime(y)),nprime_correct))\r\n\r\n%%\r\nfiletext = fileread('minCoprime.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'assert') || contains(filetext,'regexp'); \r\nassert(~illegal)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2024-03-10T13:44:13.000Z","deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2024-03-10T13:44:07.000Z","updated_at":"2025-05-10T14:33:51.000Z","published_at":"2024-03-10T13:44:14.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\u003eIn \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.youtube.com/watch?v=gcU-EB4J6vA\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ethis video\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, Dr Barker argued that a set of 10 consecutive integers must have at least one integer \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Coprime_integers\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ecoprime\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e to the rest. For example, in the set 20:29, both 23 and 29 are coprime to the other elements of the set. \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\u003eThe argument proceeds like this: In a set of 10 consecutive integers, five are even, and five are odd. The even numbers are not coprime because they share a factor of 2 (at least). Of the five odd numbers, at most two will be divisible by 3, one will be divisible by 5, and one will be divisible by 7. Aside from 1, the remaining number will not be divisible by any number less than 10, and if the remaining number is divisible by a number greater than 10, there cannot be another number in the set divisible by the same number. Therefore, at least one of the numbers in the set is coprime to the others. \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 the smallest number in the set and produces the smallest number coprime to the others as well as the number of coprime integers. If the input is 20, then the function should return 23 and 2. \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\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":60291,"title":"Minimize a quadratic function","description":"Write a function to minimize the function . The coefficients a, b, and c will be positive. Give the coefficients in a vector coeffs = [a b c d e f g], return the point  at which the function is minimum as well as the minimum value. ","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: 63px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 31.5px; transform-origin: 407px 31.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"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 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space-collapse: preserve; 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: 125.892px 8px; transform-origin: 125.892px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function to minimize the function \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAj8AAAAnCAYAAADgtinoAAAT00lEQVR4Xu2da+h32RTHZ967e2USwouRaw1GREYuJZLkNqSnIZcXkyRC0ZMXyCVpyi2mJzEGISWFMkXkWq7xAkXilVu8Z33mOd9pPXv2Ofty9j7nd9mnVv/n+f3275y9v3uttb977bX3ufqqcQ0EBgIDgYHAQGAgMBA4IwSuPqO2jqYOBAYCA4GBwEBgIDAQuGqQn6EEA4GBwEBgIDAQGAicFQKD/JxVd4/GDgQGAgO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AYCBwCggM8nMKvTjaMBAYCAwEBgIDgYFANgKD/GRDNQoOBAYCA4GBwEBgIHAKCPwfcEsLgvomIdUAAAAASUVORK5CYII=\" width=\"287.5\" height=\"19.5\" alt=\"F(x,y,z) =ax^2+by^2+cz^2-dxy+exz+fz+g\" style=\"width: 287.5px; height: 19.5px;\"\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: 110.717px 8px; transform-origin: 110.717px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e. The coefficients a, b, and c will be positive. Give the coefficients in a vector \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: 92.4px 8px; transform-origin: 92.4px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"font-family: Menlo, Monaco, Consolas, \u0026quot;Courier New\u0026quot;, monospace; \"\u003ecoeffs = [a b c d e f g]\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: 52.8917px 8px; transform-origin: 52.8917px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, return the point \u003c/span\u003e\u003c/span\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAlCAYAAAC9DeznAAAEzElEQVRoQ+2aS6hNURjH750rYcQAYUApJh4RGVEmBvIYSLeUx0BSKEY3A8RAMvBIuinPMpBSJETkWRQxQEiMvGLO/3c7Xy27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nrfobeSi/cl8hAkITYM0WZtg434zd6sDtB+gYIdN9bqHDNpBbMblVV+XBl4Skyit61r5EAwkacIiA0AcZPOOEwHEAyoMQ14ItdlINlT1334cE4mtuxWSdu6/sTJFXdgSBEU139oiBTaxYs+XCKm8cNLoQAYyxReeGh1h3xTr5mJ3zLy8Q/VTwbrawkJA8CHjSemebfjloLBqJVV9leTKqWYshAKFWS7fT0vuIsNY+tcRjzpwkmSPPPc21ogIlcxX7AkLXQiHYQ8USgBAsZkAInX3EWryNs0Oz3LmLiT0kv115hJZ1AhGBY2jCkHtIF/0fESw0hQDzhJsdJAFlnBVOOl7mUyBWuEK4LpAvUo8FUuWFyCw+Ny+JPv5IJQCBhKFOtvcpm3SrmLKqKmWuOsYm6yaHgDoWHjsniZH4y8eimKPg2Hm7Nm6oEdA1RdUluCGgLs1GztsQEKmouoY1BNSl2ch5/wDVtiw136/QBgAAAABJRU5ErkJggg==\" width=\"48\" height=\"18.5\" alt=\"(x,y,z)\" style=\"width: 48px; height: 18.5px;\"\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: 74.675px 8px; transform-origin: 74.675px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e at which the function is minimum as well as the minimum value. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [x,y,z,Fmin] = minimizeQuadratic(coeffs)\r\n  y = fminsearch(polyval(coeffs,x));\r\n  z = y;\r\n  Fmin = 0;\r\nend","test_suite":"%%\r\n[x,y,z,Fmin] = minimizeQuadratic([5 1 2 2 4 6 0]);\r\nx_correct = 3/2;\r\ny_correct = 3/2;\r\nz_correct = -3;\r\nFmin_correct = -9;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic([5 2 1 2 4 6 0]);\r\nx_correct = 12;\r\ny_correct = 6;\r\nz_correct = -27;\r\nFmin_correct = -81;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic([5 1 2 -2 4 6 1]);\r\nx_correct = 3/2;\r\ny_correct = -3/2;\r\nz_correct = -3;\r\nFmin_correct = -8;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic(1:7);\r\nx_correct = -30/37;\r\ny_correct = -30/37;\r\nz_correct = -12/37;\r\nFmin_correct = 223/37;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic(7:-1:1);\r\nx_correct = 18/353;\r\ny_correct = 6/353;\r\nz_correct = -76/353;\r\nFmin_correct = 277/353;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic([8 4 5 1 3 2 -9]);\r\nx_correct = 24/599;\r\ny_correct = 3/599;\r\nz_correct = -127/599;\r\nFmin_correct = -9.212020033388981;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\n[x,y,z,Fmin] = minimizeQuadratic([4 2 7 8 -9 -11 3]);\r\nx_correct = -99/193;\r\ny_correct = -198/193;\r\nz_correct = 88/193;\r\nFmin_correct = 95/193;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\ng = 12*rand();\r\n[x,y,z,Fmin] = minimizeQuadratic([12*rand(1,3) 0 0 0 g]);\r\nx_correct = 0;\r\ny_correct = 0;\r\nz_correct = 0;\r\nFmin_correct = g;\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)\r\n\r\n%%\r\nc = 12*rand; \r\nf = 12*rand;\r\ng = 13*rand;\r\n[x,y,z,Fmin] = minimizeQuadratic([1 1 c 0 0 f g]);\r\nx_correct = 0;\r\ny_correct = 0;\r\nz_correct = -f/(2*c);\r\nFmin_correct = g-f^2/(4*c);\r\nassert(abs(x-x_correct)\u003c1e-12)\r\nassert(abs(y-y_correct)\u003c1e-12)\r\nassert(abs(z-z_correct)\u003c1e-12)\r\nassert(abs(Fmin-Fmin_correct)\u003c1e-12)","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2024-05-12T05:32:04.000Z","deleted_by":null,"deleted_at":null,"solvers_count":8,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2024-05-12T05:31:16.000Z","updated_at":"2025-09-30T13:49:23.000Z","published_at":"2024-05-12T05:31:22.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\u003eWrite a function to minimize the function \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=\\\"F(x,y,z) =ax^2+by^2+cz^2-dxy+exz+fz+g\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eF(x,y,z) = ax^2 + by^2 + cz^2 – d x y + e x z + f z + g\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e. The coefficients a, b, and c will be positive. Give the coefficients in a vector \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\u003ecoeffs = [a b c d e f g]\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e, return the point \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,z)\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003e(x,y,z)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003cw:r\u003e\u003cw:t\u003e at which the function is minimum as well as the minimum value. \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":59691,"title":"Find the minimum element coprime to the rest in a set of 10 consecutive integers","description":"In this video, Dr Barker argued that a set of 10 consecutive integers must have at least one integer coprime to the rest. For example, in the set 20:29, both 23 and 29 are coprime to the other elements of the set. \r\nThe argument proceeds like this: In a set of 10 consecutive integers, five are even, and five are odd. The even numbers are not coprime because they share a factor of 2 (at least). Of the five odd numbers, at most two will be divisible by 3, one will be divisible by 5, and one will be divisible by 7. Aside from 1, the remaining number will not be divisible by any number less than 10, and if the remaining number is divisible by a number greater than 10, there cannot be another number in the set divisible by the same number. Therefore, at least one of the numbers in the set is coprime to the others. \r\nWrite a function that takes the smallest number in the set and produces the smallest number coprime to the others as well as the number of coprime integers. If the input is 20, then the function should return 23 and 2. ","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: 207px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 103.5px; transform-origin: 407px 103.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 42px; 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 21px; text-align: left; transform-origin: 384px 21px; 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: 7.775px 8px; transform-origin: 7.775px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eIn \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://www.youtube.com/watch?v=gcU-EB4J6vA\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003ethis video\u003c/span\u003e\u003c/span\u003e\u003c/a\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: 269.15px 8px; transform-origin: 269.15px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e, Dr Barker argued that a set of 10 consecutive integers must have at least one integer \u003c/span\u003e\u003c/span\u003e\u003ca target='_blank' href = \"https://en.wikipedia.org/wiki/Coprime_integers\"\u003e\u003cspan style=\"\"\u003e\u003cspan style=\"text-decoration-line: underline; \"\u003ecoprime\u003c/span\u003e\u003c/span\u003e\u003c/a\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: 49.375px 8px; transform-origin: 49.375px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003e to the rest. For example, in the set 20:29, both 23 and 29 are coprime to the other elements of the set. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 105px; 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 52.5px; text-align: left; transform-origin: 384px 52.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: 383.9px 8px; transform-origin: 383.9px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eThe argument proceeds like this: In a set of 10 consecutive integers, five are even, and five are odd. The even numbers are not coprime because they share a factor of 2 (at least). Of the five odd numbers, at most two will be divisible by 3, one will be divisible by 5, and one will be divisible by 7. Aside from 1, the remaining number will not be divisible by any number less than 10, and if the remaining number is divisible by a number greater than 10, there cannot be another number in the set divisible by the same number. Therefore, at least one of the numbers in the set is coprime to the others. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 42px; 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 21px; text-align: left; transform-origin: 384px 21px; 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: 378.325px 8px; transform-origin: 378.325px 8px; unicode-bidi: normal; \"\u003e\u003cspan style=\"\"\u003eWrite a function that takes the smallest number in the set and produces the smallest number coprime to the others as well as the number of coprime integers. If the input is 20, then the function should return 23 and 2. \u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function [y,nc] = minCoprime(n)\r\n  y = n; \r\n  nc = randi(5);\r\nend","test_suite":"%%\r\nn = 1;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 1;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 2;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 7;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 20;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 23;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 20;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 23;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 100;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 101;\r\nnc_correct = 4;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 658;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 659;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 2898;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 2899;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 39574;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 39577;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 488843;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 488843;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 5129442;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 5129443;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 69641285;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 69641287;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 777444111;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 777444113;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 8264599137;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 8264599139;\r\nnc_correct = 2;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nn = 90909090909;\r\n[y,nc] = minCoprime(n);\r\ny_correct = 90909090911;\r\nnc_correct = 3;\r\nassert(isequal(y,y_correct))\r\nassert(isequal(nc,nc_correct))\r\n\r\n%%\r\nfor k = 1:10000\r\n    [y(k),nc(k)] = minCoprime(k);\r\nend\r\nh = histc(y,unique(y));\r\ny9 = y(h==9);\r\nsum_correct = 50025620;\r\nsumu_correct = 12622928;\r\nhist_correct = [572 4856 4190 382];\r\nnprime_correct = 5132;\r\ny9_correct = [53 107 163 217 269 319 373 427 479 533 583 641 689 743 797 851 901 959 1007 1061 1117 1169 1219 1273 1327 1381 1433 1487 1537 1591 1643 1697 1751 1807 1859 1909 1961 2017 2069 2123 2173 2227 2279 2333 2389 2441 2491];\r\nassert(isequal(sum(y),sum_correct))\r\nassert(isequal(sum(unique(y)),sumu_correct))\r\nassert(isequal(histcounts(nc,4),hist_correct))\r\nassert(isequal(sum(isprime(y)),nprime_correct))\r\n\r\n%%\r\nfiletext = fileread('minCoprime.m');\r\nillegal = contains(filetext, 'assignin') || contains(filetext, 'assert') || contains(filetext,'regexp'); \r\nassert(~illegal)\r\n","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":46909,"edited_by":46909,"edited_at":"2024-03-10T13:44:13.000Z","deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2024-03-10T13:44:07.000Z","updated_at":"2025-05-10T14:33:51.000Z","published_at":"2024-03-10T13:44:14.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\u003eIn \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://www.youtube.com/watch?v=gcU-EB4J6vA\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ethis video\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e, Dr Barker argued that a set of 10 consecutive integers must have at least one integer \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://en.wikipedia.org/wiki/Coprime_integers\\\"\u003e\u003cw:r\u003e\u003cw:rPr\u003e\u003cw:u/\u003e\u003c/w:rPr\u003e\u003cw:t\u003ecoprime\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e to the rest. For example, in the set 20:29, both 23 and 29 are coprime to the other elements of the set. \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\u003eThe argument proceeds like this: In a set of 10 consecutive integers, five are even, and five are odd. The even numbers are not coprime because they share a factor of 2 (at least). Of the five odd numbers, at most two will be divisible by 3, one will be divisible by 5, and one will be divisible by 7. Aside from 1, the remaining number will not be divisible by any number less than 10, and if the remaining number is divisible by a number greater than 10, there cannot be another number in the set divisible by the same number. Therefore, at least one of the numbers in the set is coprime to the others. \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 the smallest number in the set and produces the smallest number coprime to the others as well as the number of coprime integers. If the input is 20, then the function should return 23 and 2. \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\"}]}"}],"term":"tag:\"dr barker\"","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:\"dr barker\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"dr barker\"","","\"","dr barker","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f5726750510\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f5726750470\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f572447fb58\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f5726750790\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f57267506f0\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f5726750650\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f57267505b0\u003e":"tag:\"dr barker\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f57267505b0\u003e":"tag:\"dr barker\""},"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":"cody-search","password":"78X075ddcV44","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:\"dr barker\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"dr barker\"","","\"","dr barker","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f5726750510\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f5726750470\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f572447fb58\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f5726750790\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f57267506f0\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f5726750650\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f57267505b0\u003e":"tag:\"dr barker\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f57267505b0\u003e":"tag:\"dr barker\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":60291,"difficulty_rating":"easy-medium"},{"id":59691,"difficulty_rating":"medium"}]}}