{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-06T14:01:22.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-06T00: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":42581,"title":"Create sequnce 1 4 9 16 25.........","description":"Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input","description_html":"\u003cp\u003eCreate sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input\u003c/p\u003e","function_template":"function y = prntseq(x)\r\n% Enter code\r\nend","test_suite":"%%\r\nx = 25;\r\ny_correct = [1 4 9 16 25];\r\nassert(isequal(prntseq(x),y_correct))\r\n%%\r\nx = 100;\r\ny_correct = [1 4 9 16 25 36 49 64 81 100];\r\nassert(isequal(prntseq(x),y_correct))\r\n%%\r\nx = 9;\r\ny_correct = [1 4 9];\r\nassert(isequal(prntseq(x),y_correct))\r\n%%\r\nx = 36;\r\ny_correct = [1 4 9 16 25 36];\r\nassert(isequal(prntseq(x),y_correct))","published":true,"deleted":false,"likes_count":4,"comments_count":0,"created_by":46868,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":414,"test_suite_updated_at":"2015-08-28T11:26:07.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-08-28T11:17:32.000Z","updated_at":"2026-02-08T06:17:39.000Z","published_at":"2015-08-28T11:26:07.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\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"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\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\u003eCreate sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input\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":45229,"title":"Bell Triangle","description":"Form the bell triangle upto nth bell number posotion;\r\n\r\n* if n=5\r\n* \r\n y= [1     0     0     0     0;\r\n     1     2     0     0     0;\r\n     2     3     5     0     0;\r\n     5     7    10    15     0;\r\n    15    20    27    37    52]\r\n\r\nsince 5th bell number is 52.\r\n","description_html":"\u003cp\u003eForm the bell triangle upto nth bell number posotion;\u003c/p\u003e\u003cul\u003e\u003cli\u003eif n=5\u003c/li\u003e\u003cli\u003ey= [1     0     0     0     0;\r\n     1     2     0     0     0;\r\n     2     3     5     0     0;\r\n     5     7    10    15     0;\r\n    15    20    27    37    52]\u003c/li\u003e\u003c/ul\u003e\u003cp\u003esince 5th bell number is 52.\u003c/p\u003e","function_template":"function y = Bell_tri(n)\r\nend","test_suite":"%%\r\nn = 1;\r\ny_correct = 1;\r\nassert(isequal(Bell_tri(n),y_correct))\r\n%%\r\nn = 5;\r\ny_correct = [1 0 0 0 0; 1 2 0 0 0; 2 3 5 0 0; 5 7 10 15 0; 15 20 27 37 52];\r\nassert(isequal(Bell_tri(n),y_correct))\r\n%%\r\nn = 9;\r\ny_correct = [ 1           0           0           0           0           0           0           0           0;\r\n           1           2           0           0           0           0           0           0           0;\r\n           2           3           5           0           0           0           0           0           0;\r\n           5           7          10          15           0           0           0           0           0;\r\n          15          20          27          37          52           0           0           0           0;\r\n          52          67          87         114         151         203           0           0           0;\r\n         203         255         322         409         523         674         877           0           0;\r\n         877        1080        1335        1657        2066        2589        3263        4140           0;\r\n        4140        5017        6097        7432        9089       11155       13744       17007       21147];\r\nassert(isequal(Bell_tri(n),y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":363598,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":53,"test_suite_updated_at":"2019-12-11T00:40:02.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2019-12-11T00:37:30.000Z","updated_at":"2026-01-13T23:37:08.000Z","published_at":"2019-12-11T00:40:02.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\u003eForm the bell triangle upto nth bell number posotion;\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\u003eif n=5\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\u003ey= [1 0 0 0 0; 1 2 0 0 0; 2 3 5 0 0; 5 7 10 15 0; 15 20 27 37 52]\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\u003esince 5th bell number is 52.\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":2737,"title":"Prouhet–Tarry–Escott (basic)","description":"Inspired by \u003chttp://www.mathworks.com/matlabcentral/cody/problems/660-find-a-subset-that-divides-the-vector-into-equal-halves problem 660.\u003e\r\n\r\nGiven n return two disjoint sets of integers _A_ and _B_ with same cardinality having following property:\r\n\r\n\u003c\u003chttps://i.imgur.com/gSW7nWy.png\u003e\u003e\r\n\r\nfor i = 1:n\r\n\r\nTry to minimize sets cardinality. ","description_html":"\u003cp\u003eInspired by \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/660-find-a-subset-that-divides-the-vector-into-equal-halves\"\u003eproblem 660.\u003c/a\u003e\u003c/p\u003e\u003cp\u003eGiven n return two disjoint sets of integers \u003ci\u003eA\u003c/i\u003e and \u003ci\u003eB\u003c/i\u003e with same cardinality having following property:\u003c/p\u003e\u003cimg src = \"https://i.imgur.com/gSW7nWy.png\"\u003e\u003cp\u003efor i = 1:n\u003c/p\u003e\u003cp\u003eTry to minimize sets cardinality.\u003c/p\u003e","function_template":"function [A, B] = prouhet(n)\r\n  A = 1:n;\r\n  B = -A;\r\nend","test_suite":"%%\r\nn = 1;\r\n[A, B] = prouhet(n);\r\nassert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\nassert(isempty(intersect(A, B)));\r\nassert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\nassert(isequal(sum(A(:).^(1:n),1), sum(B(:).^(1:n),1)));\r\ndisp(sprintf('Each set has %i elements.', numel(A)))\r\n%%\r\nn = 2;\r\n[A, B] = prouhet(n);\r\nassert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\nassert(isempty(intersect(A, B)));\r\nassert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\nassert(isequal(sum(A(:).^(1:n),1), sum(B(:).^(1:n),1)));\r\ndisp(sprintf('Each set has %i elements.', numel(A)))\r\n%%\r\nn = 5;\r\n[A, B] = prouhet(n);\r\nassert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\nassert(isempty(intersect(A, B)));\r\nassert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\nassert(isequal(sum(A(:).^(1:n),1), sum(B(:).^(1:n),1)));\r\ndisp(sprintf('Each set has %i elements.', numel(A)))\r\n%%\r\nn = 7;\r\n[A, B] = prouhet(n);\r\nassert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\nassert(isempty(intersect(A, B)));\r\nassert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\nassert(isequal(sum(A(:).^(1:n),1), sum(B(:).^(1:n),1)));\r\ndisp(sprintf('Each set has %i elements.', numel(A)))\r\n%%\r\n%n = 9;\r\n%[A, B] = prouhet(n);\r\n%assert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\n%assert(isempty(intersect(A, B)));\r\n%assert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\n%assert(isequal(sum(uint64(A(:)).^uint64(1:n)), sum(uint64(A(:)).^uint64(1:n))));\r\n%disp(sprintf('Each set has %i elements.', numel(A)))\r\n%if numel(A) \u003c=20\r\n%    disp('A:')\r\n%    disp(A)\r\n%    disp('B:')\r\n%    disp(B)\r\n%end\r\n%%\r\n% test info\r\n%\r\n% larger n will be added later\r\n%\r\n% scoring function will be added later as well\r\n% scoring will be entirely based on size of output: smaller output == better score\r\n% something like this:\r\n%\r\n% score = 0;\r\n% for n = 1:25\r\n%   [A, B] = prouhet(n)\r\n%   assert(...);\r\n%   score = score + numel(A);\r\n% end\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":2,"created_by":14358,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":"2016-10-08T00:11:00.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-08T09:56:20.000Z","updated_at":"2020-07-22T23:41:27.000Z","published_at":"2016-10-07T08:07:12.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\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.JPEG\"}],\"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\u003eInspired by\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.mathworks.com/matlabcentral/cody/problems/660-find-a-subset-that-divides-the-vector-into-equal-halves\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eproblem 660.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eGiven n return two disjoint sets of integers\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\u003eA\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\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\u003eB\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e with same cardinality having following property:\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:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\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\u003efor i = 1: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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTry to minimize sets cardinality.\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\"},{\"partUri\":\"/media/image1.JPEG\",\"contentType\":\"image/JPEG\",\"content\":\"data:image/JPEG;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/wAALCAAiAFYBAREA/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/9oACAEBAAA/AOyutU1rQfiN/ZWu63eDRdXOdKuo1iURS55gc7Pf5T9OuTjsp9CvJYisfiPVoWPR0EBI/OIipdAt9Vs9Pa11e8F9PFKwS72KhmjPKllXgEZ2nHXbnvVjV9RXSdIur90kZYIy5Eabm/AZGfpkVbTPlruIZsDJAwCafWX4htNSvtBu7fR9QNhqLJm3uNisFccgEMCMHoeOhrkfAerXfifS5odQ1bUrXXNOk+z6jafuhskH8QGz7rYyPxHOM1tajoevRtHd6X4lvmkhdXazuY4WiuFByUJCBlJGRuzx6Vsahq0Gm3FhDMkpa+uBbxFFBAfaW554GFY/gaLPURd6nfWyhwtrsRgyY+Ygk4OeeCvGBjryCMZPjzSdK1vwld2Oqh/LkwIDEuZRP/AYx3bPbvk54zWh4attVtPDWnW+t3KXOpxwqtxKg4Zv6nGMnucnjNS69PfWvh7UrjTIfOv47aR7aPGd8gUlRjvzjiuZ0OCW58QXlndrqlzp/wBhgVXvFlEcswZmkk+fG058sAKBjaSABXYyIVtXSAbWCFYwuFwccY4IH5Vg+Rr/APeuf/AqH/4zXRLnaM9cVw2qaAZfihpusaHcfZ76OPZrAC5jltyPkDf9NCQNvsMngAHu647xfbzTa1pUxtrya3tbe6mjFrvDNclUSNdycrlXl5JA65OK2/D+nS2GlWxvdkmqPbwi+uFHM0qoFLE9+lYN4ni7/hI5b5ND0y8ghJSxEmptF5SkYZyvlMN7c854HA6sWln1Px60ZFv4a0WN+xk1Z3A/AQj+dafha31iHSTLr1xBLqlxM8k4tyTFHztVEzzgKo/HJrcoorP1qa/g0e6l0xLZr1UPk/apCkQb1YgHgdffpx1rmNMbxjplp5MXhnS5WYmSWZ9aYvM56ux8jkn8gMAYAAqC/uvHepXMGnvBomk2s0ircyR37S3AiJ+YR/IoDEZAPbPHrXfUVycd/wCIZr26Q28yIEl2r5QCribam1iOW8td3cEuMDAIq8Lu5h011trec3Usgji3+e4Un+Ji65Cjr0xxUPgyCez0a4tLiCWFor66ZRIG+ZXmZwQzAFh8/XFdJRRWR4mtZr7w5e2UKs32lBDJtGWEbMFcgdyELED2rNt/7YJibUWlAIYxqiyZAMj7Q/lYG4J5YORjIOO9ZetaZd6xq2rhbKdhcfZrFVeHakkCsWlbeeV/1jjIO75AQDxXe0UUUUUUUUUUUV//2Q==\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":42581,"title":"Create sequnce 1 4 9 16 25.........","description":"Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input","description_html":"\u003cp\u003eCreate sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input\u003c/p\u003e","function_template":"function y = prntseq(x)\r\n% Enter code\r\nend","test_suite":"%%\r\nx = 25;\r\ny_correct = [1 4 9 16 25];\r\nassert(isequal(prntseq(x),y_correct))\r\n%%\r\nx = 100;\r\ny_correct = [1 4 9 16 25 36 49 64 81 100];\r\nassert(isequal(prntseq(x),y_correct))\r\n%%\r\nx = 9;\r\ny_correct = [1 4 9];\r\nassert(isequal(prntseq(x),y_correct))\r\n%%\r\nx = 36;\r\ny_correct = [1 4 9 16 25 36];\r\nassert(isequal(prntseq(x),y_correct))","published":true,"deleted":false,"likes_count":4,"comments_count":0,"created_by":46868,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":414,"test_suite_updated_at":"2015-08-28T11:26:07.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2015-08-28T11:17:32.000Z","updated_at":"2026-02-08T06:17:39.000Z","published_at":"2015-08-28T11:26:07.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\",\"relationshipId\":\"rId1\",\"target\":\"/matlab/document.xml\"},{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/output\",\"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\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\u003eCreate sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input\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":45229,"title":"Bell Triangle","description":"Form the bell triangle upto nth bell number posotion;\r\n\r\n* if n=5\r\n* \r\n y= [1     0     0     0     0;\r\n     1     2     0     0     0;\r\n     2     3     5     0     0;\r\n     5     7    10    15     0;\r\n    15    20    27    37    52]\r\n\r\nsince 5th bell number is 52.\r\n","description_html":"\u003cp\u003eForm the bell triangle upto nth bell number posotion;\u003c/p\u003e\u003cul\u003e\u003cli\u003eif n=5\u003c/li\u003e\u003cli\u003ey= [1     0     0     0     0;\r\n     1     2     0     0     0;\r\n     2     3     5     0     0;\r\n     5     7    10    15     0;\r\n    15    20    27    37    52]\u003c/li\u003e\u003c/ul\u003e\u003cp\u003esince 5th bell number is 52.\u003c/p\u003e","function_template":"function y = Bell_tri(n)\r\nend","test_suite":"%%\r\nn = 1;\r\ny_correct = 1;\r\nassert(isequal(Bell_tri(n),y_correct))\r\n%%\r\nn = 5;\r\ny_correct = [1 0 0 0 0; 1 2 0 0 0; 2 3 5 0 0; 5 7 10 15 0; 15 20 27 37 52];\r\nassert(isequal(Bell_tri(n),y_correct))\r\n%%\r\nn = 9;\r\ny_correct = [ 1           0           0           0           0           0           0           0           0;\r\n           1           2           0           0           0           0           0           0           0;\r\n           2           3           5           0           0           0           0           0           0;\r\n           5           7          10          15           0           0           0           0           0;\r\n          15          20          27          37          52           0           0           0           0;\r\n          52          67          87         114         151         203           0           0           0;\r\n         203         255         322         409         523         674         877           0           0;\r\n         877        1080        1335        1657        2066        2589        3263        4140           0;\r\n        4140        5017        6097        7432        9089       11155       13744       17007       21147];\r\nassert(isequal(Bell_tri(n),y_correct))\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":363598,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":53,"test_suite_updated_at":"2019-12-11T00:40:02.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2019-12-11T00:37:30.000Z","updated_at":"2026-01-13T23:37:08.000Z","published_at":"2019-12-11T00:40:02.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\u003eForm the bell triangle upto nth bell number posotion;\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\u003eif n=5\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\u003ey= [1 0 0 0 0; 1 2 0 0 0; 2 3 5 0 0; 5 7 10 15 0; 15 20 27 37 52]\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\u003esince 5th bell number is 52.\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":2737,"title":"Prouhet–Tarry–Escott (basic)","description":"Inspired by \u003chttp://www.mathworks.com/matlabcentral/cody/problems/660-find-a-subset-that-divides-the-vector-into-equal-halves problem 660.\u003e\r\n\r\nGiven n return two disjoint sets of integers _A_ and _B_ with same cardinality having following property:\r\n\r\n\u003c\u003chttps://i.imgur.com/gSW7nWy.png\u003e\u003e\r\n\r\nfor i = 1:n\r\n\r\nTry to minimize sets cardinality. ","description_html":"\u003cp\u003eInspired by \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/660-find-a-subset-that-divides-the-vector-into-equal-halves\"\u003eproblem 660.\u003c/a\u003e\u003c/p\u003e\u003cp\u003eGiven n return two disjoint sets of integers \u003ci\u003eA\u003c/i\u003e and \u003ci\u003eB\u003c/i\u003e with same cardinality having following property:\u003c/p\u003e\u003cimg src = \"https://i.imgur.com/gSW7nWy.png\"\u003e\u003cp\u003efor i = 1:n\u003c/p\u003e\u003cp\u003eTry to minimize sets cardinality.\u003c/p\u003e","function_template":"function [A, B] = prouhet(n)\r\n  A = 1:n;\r\n  B = -A;\r\nend","test_suite":"%%\r\nn = 1;\r\n[A, B] = prouhet(n);\r\nassert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\nassert(isempty(intersect(A, B)));\r\nassert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\nassert(isequal(sum(A(:).^(1:n),1), sum(B(:).^(1:n),1)));\r\ndisp(sprintf('Each set has %i elements.', numel(A)))\r\n%%\r\nn = 2;\r\n[A, B] = prouhet(n);\r\nassert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\nassert(isempty(intersect(A, B)));\r\nassert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\nassert(isequal(sum(A(:).^(1:n),1), sum(B(:).^(1:n),1)));\r\ndisp(sprintf('Each set has %i elements.', numel(A)))\r\n%%\r\nn = 5;\r\n[A, B] = prouhet(n);\r\nassert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\nassert(isempty(intersect(A, B)));\r\nassert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\nassert(isequal(sum(A(:).^(1:n),1), sum(B(:).^(1:n),1)));\r\ndisp(sprintf('Each set has %i elements.', numel(A)))\r\n%%\r\nn = 7;\r\n[A, B] = prouhet(n);\r\nassert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\nassert(isempty(intersect(A, B)));\r\nassert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\nassert(isequal(sum(A(:).^(1:n),1), sum(B(:).^(1:n),1)));\r\ndisp(sprintf('Each set has %i elements.', numel(A)))\r\n%%\r\n%n = 9;\r\n%[A, B] = prouhet(n);\r\n%assert(isequal(A, round(A)) \u0026\u0026 isequal(B, round(B)))\r\n%assert(isempty(intersect(A, B)));\r\n%assert(isequal(numel(A), numel(B), numel(unique(A)), numel(unique(B))));\r\n%assert(isequal(sum(uint64(A(:)).^uint64(1:n)), sum(uint64(A(:)).^uint64(1:n))));\r\n%disp(sprintf('Each set has %i elements.', numel(A)))\r\n%if numel(A) \u003c=20\r\n%    disp('A:')\r\n%    disp(A)\r\n%    disp('B:')\r\n%    disp(B)\r\n%end\r\n%%\r\n% test info\r\n%\r\n% larger n will be added later\r\n%\r\n% scoring function will be added later as well\r\n% scoring will be entirely based on size of output: smaller output == better score\r\n% something like this:\r\n%\r\n% score = 0;\r\n% for n = 1:25\r\n%   [A, B] = prouhet(n)\r\n%   assert(...);\r\n%   score = score + numel(A);\r\n% end\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":2,"created_by":14358,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":7,"test_suite_updated_at":"2016-10-08T00:11:00.000Z","rescore_all_solutions":false,"group_id":1,"created_at":"2014-12-08T09:56:20.000Z","updated_at":"2020-07-22T23:41:27.000Z","published_at":"2016-10-07T08:07:12.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\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/image\",\"targetMode\":\"\",\"relationshipId\":\"rId1\",\"target\":\"/media/image1.JPEG\"}],\"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\u003eInspired by\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.mathworks.com/matlabcentral/cody/problems/660-find-a-subset-that-divides-the-vector-into-equal-halves\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eproblem 660.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\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\u003eGiven n return two disjoint sets of integers\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\u003eA\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e and\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\u003eB\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e with same cardinality having following property:\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:customXml w:element=\\\"image\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"height\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"width\\\" w:val=\\\"-1\\\"/\u003e\u003cw:attr w:name=\\\"relationshipId\\\" w:val=\\\"rId1\\\"/\u003e\u003c/w:customXmlPr\u003e\u003c/w:customXml\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\u003efor i = 1: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\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTry to minimize sets cardinality.\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\"},{\"partUri\":\"/media/image1.JPEG\",\"contentType\":\"image/JPEG\",\"content\":\"data:image/JPEG;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/wAALCAAiAFYBAREA/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/9oACAEBAAA/AOyutU1rQfiN/ZWu63eDRdXOdKuo1iURS55gc7Pf5T9OuTjsp9CvJYisfiPVoWPR0EBI/OIipdAt9Vs9Pa11e8F9PFKwS72KhmjPKllXgEZ2nHXbnvVjV9RXSdIur90kZYIy5Eabm/AZGfpkVbTPlruIZsDJAwCafWX4htNSvtBu7fR9QNhqLJm3uNisFccgEMCMHoeOhrkfAerXfifS5odQ1bUrXXNOk+z6jafuhskH8QGz7rYyPxHOM1tajoevRtHd6X4lvmkhdXazuY4WiuFByUJCBlJGRuzx6Vsahq0Gm3FhDMkpa+uBbxFFBAfaW554GFY/gaLPURd6nfWyhwtrsRgyY+Ygk4OeeCvGBjryCMZPjzSdK1vwld2Oqh/LkwIDEuZRP/AYx3bPbvk54zWh4attVtPDWnW+t3KXOpxwqtxKg4Zv6nGMnucnjNS69PfWvh7UrjTIfOv47aR7aPGd8gUlRjvzjiuZ0OCW58QXlndrqlzp/wBhgVXvFlEcswZmkk+fG058sAKBjaSABXYyIVtXSAbWCFYwuFwccY4IH5Vg+Rr/APeuf/AqH/4zXRLnaM9cVw2qaAZfihpusaHcfZ76OPZrAC5jltyPkDf9NCQNvsMngAHu647xfbzTa1pUxtrya3tbe6mjFrvDNclUSNdycrlXl5JA65OK2/D+nS2GlWxvdkmqPbwi+uFHM0qoFLE9+lYN4ni7/hI5b5ND0y8ghJSxEmptF5SkYZyvlMN7c854HA6sWln1Px60ZFv4a0WN+xk1Z3A/AQj+dafha31iHSTLr1xBLqlxM8k4tyTFHztVEzzgKo/HJrcoorP1qa/g0e6l0xLZr1UPk/apCkQb1YgHgdffpx1rmNMbxjplp5MXhnS5WYmSWZ9aYvM56ux8jkn8gMAYAAqC/uvHepXMGnvBomk2s0ircyR37S3AiJ+YR/IoDEZAPbPHrXfUVycd/wCIZr26Q28yIEl2r5QCribam1iOW8td3cEuMDAIq8Lu5h011trec3Usgji3+e4Un+Ji65Cjr0xxUPgyCez0a4tLiCWFor66ZRIG+ZXmZwQzAFh8/XFdJRRWR4mtZr7w5e2UKs32lBDJtGWEbMFcgdyELED2rNt/7YJibUWlAIYxqiyZAMj7Q/lYG4J5YORjIOO9ZetaZd6xq2rhbKdhcfZrFVeHakkCsWlbeeV/1jjIO75AQDxXe0UUUUUUUUUUUV//2Q==\"}]}"}],"term":"tag:\"Magic Numbers\"","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:\"Magic Numbers\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"Magic Numbers\"","","\"","Magic Numbers","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f17c277c140\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f17c277c0a0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f17c277b7e0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f17c277c3c0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f17c277c320\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f17c277c280\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f17c277c1e0\u003e":"tag:\"Magic Numbers\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f17c277c1e0\u003e":"tag:\"Magic Numbers\""},"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:\"Magic Numbers\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"Magic Numbers\"","","\"","Magic Numbers","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f17c277c140\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f17c277c0a0\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f17c277b7e0\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f17c277c3c0\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f17c277c320\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f17c277c280\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f17c277c1e0\u003e":"tag:\"Magic Numbers\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f17c277c1e0\u003e":"tag:\"Magic Numbers\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":42581,"difficulty_rating":"easy-medium"},{"id":45229,"difficulty_rating":"easy-medium"},{"id":2737,"difficulty_rating":"unrated"}]}}