{"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":42762,"title":"Is 3D point set Co-Planar?","description":"This Challenge is to determine if four 3D integer points are co-planar.\r\nGiven a 4x3 matrix representing four x,y,z integer points, output True if the set is co-planar and False otherwise.\r\n\r\nExamples\r\n\r\n m = [0 0 0;1 0 0;0 1 0;0 0 1] \r\n Output: False, this point set is non-coplanar.\r\n\r\n m = [0 0 0;0 0 1;1 1 0;1 1 1]\r\n Output: True, this point set is co-planar.\r\n\r\nReference: The \u003chttp://68.173.157.131/Contest/Tetrahedra March 2016 Al Zimmermann Non-Coplanar contest\u003e is to maximize the number of points in an NxNxN cube with no 4 points in a common plane. Future challenge will be to find N=2 and N=3 solutions.\r\n\r\nTheory: Plane is defined as Ax+By+cZ=D. [A,B,C] can be found using cross of 3 points. D can be found by substitution using any of these 3 points. Co-Planarity of the fourth point is True if Ax4+By4+Cz4==D\r\n","description_html":"\u003cp\u003eThis Challenge is to determine if four 3D integer points are co-planar.\r\nGiven a 4x3 matrix representing four x,y,z integer points, output True if the set is co-planar and False otherwise.\u003c/p\u003e\u003cp\u003eExamples\u003c/p\u003e\u003cpre\u003e m = [0 0 0;1 0 0;0 1 0;0 0 1] \r\n Output: False, this point set is non-coplanar.\u003c/pre\u003e\u003cpre\u003e m = [0 0 0;0 0 1;1 1 0;1 1 1]\r\n Output: True, this point set is co-planar.\u003c/pre\u003e\u003cp\u003eReference: The \u003ca href = \"http://68.173.157.131/Contest/Tetrahedra\"\u003eMarch 2016 Al Zimmermann Non-Coplanar contest\u003c/a\u003e is to maximize the number of points in an NxNxN cube with no 4 points in a common plane. Future challenge will be to find N=2 and N=3 solutions.\u003c/p\u003e\u003cp\u003eTheory: Plane is defined as Ax+By+cZ=D. [A,B,C] can be found using cross of 3 points. D can be found by substitution using any of these 3 points. Co-Planarity of the fourth point is True if Ax4+By4+Cz4==D\u003c/p\u003e","function_template":"function TF = iscoplanar(m)\r\n% m is a 4x3 matrix\r\n  TF=false;\r\nend","test_suite":"%%\r\nm=[0 0 1;1 1 0;1 0 1;2 0 0];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 1;1 1 0;1 0 1;2 1 2];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 1;1 1 0;1 0 1;0 1 0];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 1;1 1 0;1 0 1;2 1 0];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 1;1 1 0;1 0 1;2 0 1];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[2 0 0;1 2 0;2 1 1;2 2 2];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[2 0 0;1 2 0;2 1 1;2 1 2];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 0;1 0 0;0 1 0;0 0 1];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 0;1 0 0;0 1 0;1 1 1];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 0;1 0 0;0 1 0;1 1 0];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 0;0 0 1;1 1 1;1 1 0];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n\r\n%0 0 0 \r\n%1 0 0 \r\n%0 1 0 \r\n%0 0 1 \r\n%1 1 1","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":26,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-05T21:58:07.000Z","updated_at":"2026-04-04T03:46:57.000Z","published_at":"2016-03-06T19:31:31.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\u003eThis Challenge is to determine if four 3D integer points are co-planar. Given a 4x3 matrix representing four x,y,z integer points, output True if the set is co-planar and False otherwise.\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\u003eExamples\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ m = [0 0 0;1 0 0;0 1 0;0 0 1] \\n Output: False, this point set is non-coplanar.\\n\\n m = [0 0 0;0 0 1;1 1 0;1 1 1]\\n Output: True, this point set is co-planar.]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eReference: The\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://68.173.157.131/Contest/Tetrahedra\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eMarch 2016 Al Zimmermann Non-Coplanar contest\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is to maximize the number of points in an NxNxN cube with no 4 points in a common plane. Future challenge will be to find N=2 and N=3 solutions.\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\u003eTheory: Plane is defined as Ax+By+cZ=D. [A,B,C] can be found using cross of 3 points. D can be found by substitution using any of these 3 points. Co-Planarity of the fourth point is True if Ax4+By4+Cz4==D\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":42355,"title":"Minimum Set (A+A)U(A*A) OEIS A263996","description":"This Challenge is to find an integer vector A that creates the minimum set size for (A+A) U (A*A) for a given vector length, \u003chttps://oeis.org/A263996 OEIS A263996\u003e. The length, best value, Prime_max, and Value_max will be provided. \r\n\r\nThe \u003chttps://oeis.org/A263996 OEIS A263996\u003e gives the minimum set sizes thru length 50. Length 7 has best value 26 with Prime_max 5 and Value_max 8. A=[1 2 3 4 5 6 8] yields [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 24 25 30 32 36 40 48 64].\r\nThe \u003chttp://68.173.157.131/Contest/SumsAndProducts1/FinalReport Al Zimmermann Sums Contest Final Report\u003e extends A263996 for lengths 40:40:1000 with complete vector solutions. The contest winner, Rokicki, noted his method used P-smooth sets, hill climbing, and random swaps. The contest was a little tougher with only L given.\r\n\r\nExample Input/Output:\r\nL=9;Best=36;pmax=5;vmax=12;\r\nv = SP(L,Best,pmax,vmax); Yields v=[1 2 3 4 5 6 8 10 12]\r\n\r\nTheory/Hints: The V superset is found using \u003chttp://www.mathworks.com/matlabcentral/cody/problems/1298-p-smooth-numbers psmooth(pmax,vmax)\u003e . One observation is that for every v element the set v contains prod of all v element factor permutations. The time eater will be score evaluation. Residual evaluation suggested. A history screen, prior to score evaluation, of prior processed vectors is essential. A quick history pre-screen is vector sum. Replace testing of only values that are not factors of other numbers (eg 2,3 no replace) enables a reasonable time rolling score solution without random for the small test case values. ","description_html":"\u003cp\u003eThis Challenge is to find an integer vector A that creates the minimum set size for (A+A) U (A*A) for a given vector length, \u003ca href = \"https://oeis.org/A263996\"\u003eOEIS A263996\u003c/a\u003e. The length, best value, Prime_max, and Value_max will be provided.\u003c/p\u003e\u003cp\u003eThe \u003ca href = \"https://oeis.org/A263996\"\u003eOEIS A263996\u003c/a\u003e gives the minimum set sizes thru length 50. Length 7 has best value 26 with Prime_max 5 and Value_max 8. A=[1 2 3 4 5 6 8] yields [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 24 25 30 32 36 40 48 64].\r\nThe \u003ca href = \"http://68.173.157.131/Contest/SumsAndProducts1/FinalReport\"\u003eAl Zimmermann Sums Contest Final Report\u003c/a\u003e extends A263996 for lengths 40:40:1000 with complete vector solutions. The contest winner, Rokicki, noted his method used P-smooth sets, hill climbing, and random swaps. The contest was a little tougher with only L given.\u003c/p\u003e\u003cp\u003eExample Input/Output:\r\nL=9;Best=36;pmax=5;vmax=12;\r\nv = SP(L,Best,pmax,vmax); Yields v=[1 2 3 4 5 6 8 10 12]\u003c/p\u003e\u003cp\u003eTheory/Hints: The V superset is found using \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1298-p-smooth-numbers\"\u003epsmooth(pmax,vmax)\u003c/a\u003e . One observation is that for every v element the set v contains prod of all v element factor permutations. The time eater will be score evaluation. Residual evaluation suggested. A history screen, prior to score evaluation, of prior processed vectors is essential. A quick history pre-screen is vector sum. Replace testing of only values that are not factors of other numbers (eg 2,3 no replace) enables a reasonable time rolling score solution without random for the small test case values.\u003c/p\u003e","function_template":"function v = SP(L,Best,pmax,vmax)\r\n% Only L and \u003c=Best need to be satisfied\r\n% pmax and vmax are suggestions when using psmooth numbers\r\n  v=[1:L-1 vmax];\r\nend","test_suite":"%%\r\ntic\r\npass=true;\r\nL=8;Best=30;pmax=5;vmax=10;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=39;Best=335;pmax=7;vmax=100;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=50;Best=486;pmax=7;vmax=144;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=40;Best=348;pmax=7;vmax=120;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=80;Best=1001;pmax=11;vmax=300;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=120;Best=1847;pmax=11;vmax=480;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=160;Best=2864;pmax=11;vmax=840;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=200;Best=4000;pmax=13;vmax=900;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=280;Best=6632;pmax=13;vmax=1800;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-06-04T19:18:55.000Z","updated_at":"2016-02-22T02:59:36.000Z","published_at":"2016-02-22T02:59:36.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\u003eThis Challenge is to find an integer vector A that creates the minimum set size for (A+A) U (A*A) for a given vector length,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://oeis.org/A263996\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eOEIS A263996\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The length, best value, Prime_max, and Value_max will be provided.\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\u003eThe\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://oeis.org/A263996\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eOEIS A263996\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e gives the minimum set sizes thru length 50. Length 7 has best value 26 with Prime_max 5 and Value_max 8. A=[1 2 3 4 5 6 8] yields [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 24 25 30 32 36 40 48 64]. The\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://68.173.157.131/Contest/SumsAndProducts1/FinalReport\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eAl Zimmermann Sums Contest Final Report\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e extends A263996 for lengths 40:40:1000 with complete vector solutions. The contest winner, Rokicki, noted his method used P-smooth sets, hill climbing, and random swaps. The contest was a little tougher with only L given.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eExample Input/Output: L=9;Best=36;pmax=5;vmax=12; v = SP(L,Best,pmax,vmax); Yields v=[1 2 3 4 5 6 8 10 12]\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\u003eTheory/Hints: The V superset is found using\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/1298-p-smooth-numbers\\\"\u003e\u003cw:r\u003e\u003cw:t\u003epsmooth(pmax,vmax)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e . One observation is that for every v element the set v contains prod of all v element factor permutations. The time eater will be score evaluation. Residual evaluation suggested. A history screen, prior to score evaluation, of prior processed vectors is essential. A quick history pre-screen is vector sum. Replace testing of only values that are not factors of other numbers (eg 2,3 no replace) enables a reasonable time rolling score solution without random for the small test case values.\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":42765,"title":"Maximize Non-Co-Planar Points in an N-Cube","description":"This Challenge is to find a set with the maximum number of integer points that create planar surfaces with a maximum of three points from the set. No four points may be co-planar.\r\nGiven the size N and the number of expected points Q find a set of Q points. Only N=2/Q=5 and N=3/Q=8 will be tested. N=4/Q=10 or N=5/Q=13 are too large to process.\r\n\r\n  N=2 contains 8 points [0,0,0;0,1,0;1,0,0;1,1,0;0,0,1;0,1,1;1,0,1;1,1,1]\r\n  N=3 contains 27 points [0,0,0;0,0,1;0,0,2;...2,2,2]\r\n\r\nOutput is a Qx3 matrix of the non-co-planar points.\r\n\r\nReference: The \u003chttp://68.173.157.131/Contest/Tetrahedra March 2016 Al Zimmermann Non-Coplanar contest\u003e is N=primes less than 100. Maximize the number of points in an NxNxN cube with no 4 points in a common plane.\r\n\r\nTheory: The N=2 and N=3 cases can be processed by brute force if care is taken. Assumption of [0,0,0] greatly reduces number of cases. Solving \u003chttp://www.mathworks.com/matlabcentral/cody/problems/42762-is-3d-point-set-co-planar Cody Co-Planar Check\u003e may improve speed. ","description_html":"\u003cp\u003eThis Challenge is to find a set with the maximum number of integer points that create planar surfaces with a maximum of three points from the set. No four points may be co-planar.\r\nGiven the size N and the number of expected points Q find a set of Q points. Only N=2/Q=5 and N=3/Q=8 will be tested. N=4/Q=10 or N=5/Q=13 are too large to process.\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eN=2 contains 8 points [0,0,0;0,1,0;1,0,0;1,1,0;0,0,1;0,1,1;1,0,1;1,1,1]\r\nN=3 contains 27 points [0,0,0;0,0,1;0,0,2;...2,2,2]\r\n\u003c/pre\u003e\u003cp\u003eOutput is a Qx3 matrix of the non-co-planar points.\u003c/p\u003e\u003cp\u003eReference: The \u003ca href = \"http://68.173.157.131/Contest/Tetrahedra\"\u003eMarch 2016 Al Zimmermann Non-Coplanar contest\u003c/a\u003e is N=primes less than 100. Maximize the number of points in an NxNxN cube with no 4 points in a common plane.\u003c/p\u003e\u003cp\u003eTheory: The N=2 and N=3 cases can be processed by brute force if care is taken. Assumption of [0,0,0] greatly reduces number of cases. Solving \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/42762-is-3d-point-set-co-planar\"\u003eCody Co-Planar Check\u003c/a\u003e may improve speed.\u003c/p\u003e","function_template":"function m=MaxNonCoplanarPts(N,Q);\r\n% Place Q or more points in an 0:N-1 #D grid such that each plane created uses only 3 points from the set provided\r\n% N is Cube size\r\n% Q is expected number of points in solution\r\n% Hint: Point [0,0,0] can be assumed to be in the solution for N=2 and N=3\r\n% N=3 is the 27 points [0,0,0;0,0,1;0,0,2;...2,2,2]\r\n  m=[];\r\nend","test_suite":"%%\r\nN=2;\r\nQ=5;\r\nm=MaxNonCoplanarPts(N,Q);\r\nm=floor(abs(m))\r\n% Perform m check\r\nvalid=1;\r\nif size(m,1)\u003cQ,valid=0;end % Must be Q pts or more\r\nif max(m(:))\u003eN-1,valid=0;end\r\npset=nchoosek(1:size(m,1),4);\r\nfor i=1:length(pset)\r\n m4=m(pset(i,:),:);\r\n% Coplanar check method courtesy of Tim\r\n if ~det([m4 ones(4,1)]) % coplanar det=0\r\n  valid=0;\r\n  break\r\n end\r\nend\r\nassert(isequal(1,valid))\r\n%%\r\nN=3;\r\nQ=8;\r\nm=MaxNonCoplanarPts(N,Q);\r\nm=floor(abs(m))\r\n% Perform m check\r\nvalid=1;\r\nif size(m,1)\u003cQ,valid=0;end % Must be Q pts or more\r\nif max(m(:))\u003eN-1,valid=0;end\r\npset=nchoosek(1:size(m,1),4);\r\nfor i=1:length(pset)\r\n m4=m(pset(i,:),:);\r\n% Coplanar check method courtesy of Tim\r\n if ~det([m4 ones(4,1)]) % coplanar det=0\r\n  valid=0;\r\n  break\r\n end\r\nend\r\nassert(isequal(1,valid))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-07T00:22:02.000Z","updated_at":"2016-03-07T01:01:33.000Z","published_at":"2016-03-07T01:01:33.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\u003eThis Challenge is to find a set with the maximum number of integer points that create planar surfaces with a maximum of three points from the set. No four points may be co-planar. Given the size N and the number of expected points Q find a set of Q points. Only N=2/Q=5 and N=3/Q=8 will be tested. N=4/Q=10 or N=5/Q=13 are too large to process.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[N=2 contains 8 points [0,0,0;0,1,0;1,0,0;1,1,0;0,0,1;0,1,1;1,0,1;1,1,1]\\nN=3 contains 27 points [0,0,0;0,0,1;0,0,2;...2,2,2]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOutput is a Qx3 matrix of the non-co-planar points.\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\u003eReference: The\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://68.173.157.131/Contest/Tetrahedra\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eMarch 2016 Al Zimmermann Non-Coplanar contest\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is N=primes less than 100. Maximize the number of points in an NxNxN cube with no 4 points in a common plane.\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\u003eTheory: The N=2 and N=3 cases can be processed by brute force if care is taken. Assumption of [0,0,0] greatly reduces number of cases. Solving\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/42762-is-3d-point-set-co-planar\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eCody Co-Planar Check\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e may improve speed.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":42762,"title":"Is 3D point set Co-Planar?","description":"This Challenge is to determine if four 3D integer points are co-planar.\r\nGiven a 4x3 matrix representing four x,y,z integer points, output True if the set is co-planar and False otherwise.\r\n\r\nExamples\r\n\r\n m = [0 0 0;1 0 0;0 1 0;0 0 1] \r\n Output: False, this point set is non-coplanar.\r\n\r\n m = [0 0 0;0 0 1;1 1 0;1 1 1]\r\n Output: True, this point set is co-planar.\r\n\r\nReference: The \u003chttp://68.173.157.131/Contest/Tetrahedra March 2016 Al Zimmermann Non-Coplanar contest\u003e is to maximize the number of points in an NxNxN cube with no 4 points in a common plane. Future challenge will be to find N=2 and N=3 solutions.\r\n\r\nTheory: Plane is defined as Ax+By+cZ=D. [A,B,C] can be found using cross of 3 points. D can be found by substitution using any of these 3 points. Co-Planarity of the fourth point is True if Ax4+By4+Cz4==D\r\n","description_html":"\u003cp\u003eThis Challenge is to determine if four 3D integer points are co-planar.\r\nGiven a 4x3 matrix representing four x,y,z integer points, output True if the set is co-planar and False otherwise.\u003c/p\u003e\u003cp\u003eExamples\u003c/p\u003e\u003cpre\u003e m = [0 0 0;1 0 0;0 1 0;0 0 1] \r\n Output: False, this point set is non-coplanar.\u003c/pre\u003e\u003cpre\u003e m = [0 0 0;0 0 1;1 1 0;1 1 1]\r\n Output: True, this point set is co-planar.\u003c/pre\u003e\u003cp\u003eReference: The \u003ca href = \"http://68.173.157.131/Contest/Tetrahedra\"\u003eMarch 2016 Al Zimmermann Non-Coplanar contest\u003c/a\u003e is to maximize the number of points in an NxNxN cube with no 4 points in a common plane. Future challenge will be to find N=2 and N=3 solutions.\u003c/p\u003e\u003cp\u003eTheory: Plane is defined as Ax+By+cZ=D. [A,B,C] can be found using cross of 3 points. D can be found by substitution using any of these 3 points. Co-Planarity of the fourth point is True if Ax4+By4+Cz4==D\u003c/p\u003e","function_template":"function TF = iscoplanar(m)\r\n% m is a 4x3 matrix\r\n  TF=false;\r\nend","test_suite":"%%\r\nm=[0 0 1;1 1 0;1 0 1;2 0 0];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 1;1 1 0;1 0 1;2 1 2];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 1;1 1 0;1 0 1;0 1 0];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 1;1 1 0;1 0 1;2 1 0];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 1;1 1 0;1 0 1;2 0 1];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[2 0 0;1 2 0;2 1 1;2 2 2];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[2 0 0;1 2 0;2 1 1;2 1 2];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 0;1 0 0;0 1 0;0 0 1];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 0;1 0 0;0 1 0;1 1 1];\r\ny_correct = false;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 0;1 0 0;0 1 0;1 1 0];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n%%\r\nm=[0 0 0;0 0 1;1 1 1;1 1 0];\r\ny_correct = true;\r\nassert(isequal(iscoplanar(m),y_correct))\r\n\r\n%0 0 0 \r\n%1 0 0 \r\n%0 1 0 \r\n%0 0 1 \r\n%1 1 1","published":true,"deleted":false,"likes_count":1,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":26,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-05T21:58:07.000Z","updated_at":"2026-04-04T03:46:57.000Z","published_at":"2016-03-06T19:31:31.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\u003eThis Challenge is to determine if four 3D integer points are co-planar. Given a 4x3 matrix representing four x,y,z integer points, output True if the set is co-planar and False otherwise.\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\u003eExamples\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[ m = [0 0 0;1 0 0;0 1 0;0 0 1] \\n Output: False, this point set is non-coplanar.\\n\\n m = [0 0 0;0 0 1;1 1 0;1 1 1]\\n Output: True, this point set is co-planar.]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eReference: The\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://68.173.157.131/Contest/Tetrahedra\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eMarch 2016 Al Zimmermann Non-Coplanar contest\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is to maximize the number of points in an NxNxN cube with no 4 points in a common plane. Future challenge will be to find N=2 and N=3 solutions.\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\u003eTheory: Plane is defined as Ax+By+cZ=D. [A,B,C] can be found using cross of 3 points. D can be found by substitution using any of these 3 points. Co-Planarity of the fourth point is True if Ax4+By4+Cz4==D\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":42355,"title":"Minimum Set (A+A)U(A*A) OEIS A263996","description":"This Challenge is to find an integer vector A that creates the minimum set size for (A+A) U (A*A) for a given vector length, \u003chttps://oeis.org/A263996 OEIS A263996\u003e. The length, best value, Prime_max, and Value_max will be provided. \r\n\r\nThe \u003chttps://oeis.org/A263996 OEIS A263996\u003e gives the minimum set sizes thru length 50. Length 7 has best value 26 with Prime_max 5 and Value_max 8. A=[1 2 3 4 5 6 8] yields [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 24 25 30 32 36 40 48 64].\r\nThe \u003chttp://68.173.157.131/Contest/SumsAndProducts1/FinalReport Al Zimmermann Sums Contest Final Report\u003e extends A263996 for lengths 40:40:1000 with complete vector solutions. The contest winner, Rokicki, noted his method used P-smooth sets, hill climbing, and random swaps. The contest was a little tougher with only L given.\r\n\r\nExample Input/Output:\r\nL=9;Best=36;pmax=5;vmax=12;\r\nv = SP(L,Best,pmax,vmax); Yields v=[1 2 3 4 5 6 8 10 12]\r\n\r\nTheory/Hints: The V superset is found using \u003chttp://www.mathworks.com/matlabcentral/cody/problems/1298-p-smooth-numbers psmooth(pmax,vmax)\u003e . One observation is that for every v element the set v contains prod of all v element factor permutations. The time eater will be score evaluation. Residual evaluation suggested. A history screen, prior to score evaluation, of prior processed vectors is essential. A quick history pre-screen is vector sum. Replace testing of only values that are not factors of other numbers (eg 2,3 no replace) enables a reasonable time rolling score solution without random for the small test case values. ","description_html":"\u003cp\u003eThis Challenge is to find an integer vector A that creates the minimum set size for (A+A) U (A*A) for a given vector length, \u003ca href = \"https://oeis.org/A263996\"\u003eOEIS A263996\u003c/a\u003e. The length, best value, Prime_max, and Value_max will be provided.\u003c/p\u003e\u003cp\u003eThe \u003ca href = \"https://oeis.org/A263996\"\u003eOEIS A263996\u003c/a\u003e gives the minimum set sizes thru length 50. Length 7 has best value 26 with Prime_max 5 and Value_max 8. A=[1 2 3 4 5 6 8] yields [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 24 25 30 32 36 40 48 64].\r\nThe \u003ca href = \"http://68.173.157.131/Contest/SumsAndProducts1/FinalReport\"\u003eAl Zimmermann Sums Contest Final Report\u003c/a\u003e extends A263996 for lengths 40:40:1000 with complete vector solutions. The contest winner, Rokicki, noted his method used P-smooth sets, hill climbing, and random swaps. The contest was a little tougher with only L given.\u003c/p\u003e\u003cp\u003eExample Input/Output:\r\nL=9;Best=36;pmax=5;vmax=12;\r\nv = SP(L,Best,pmax,vmax); Yields v=[1 2 3 4 5 6 8 10 12]\u003c/p\u003e\u003cp\u003eTheory/Hints: The V superset is found using \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/1298-p-smooth-numbers\"\u003epsmooth(pmax,vmax)\u003c/a\u003e . One observation is that for every v element the set v contains prod of all v element factor permutations. The time eater will be score evaluation. Residual evaluation suggested. A history screen, prior to score evaluation, of prior processed vectors is essential. A quick history pre-screen is vector sum. Replace testing of only values that are not factors of other numbers (eg 2,3 no replace) enables a reasonable time rolling score solution without random for the small test case values.\u003c/p\u003e","function_template":"function v = SP(L,Best,pmax,vmax)\r\n% Only L and \u003c=Best need to be satisfied\r\n% pmax and vmax are suggestions when using psmooth numbers\r\n  v=[1:L-1 vmax];\r\nend","test_suite":"%%\r\ntic\r\npass=true;\r\nL=8;Best=30;pmax=5;vmax=10;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=39;Best=335;pmax=7;vmax=100;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=50;Best=486;pmax=7;vmax=144;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=40;Best=348;pmax=7;vmax=120;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=80;Best=1001;pmax=11;vmax=300;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=120;Best=1847;pmax=11;vmax=480;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=160;Best=2864;pmax=11;vmax=840;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=200;Best=4000;pmax=13;vmax=900;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n%%\r\ntic\r\npass=true;\r\nL=280;Best=6632;pmax=13;vmax=1800;\r\nv = SP(L,Best,pmax,vmax);\r\nv=unique(floor(v));\r\nv(v\u003c1)=[];\r\nif length(v)~=L,pass=false;end\r\nvm2=zeros(1,v(end)*v(end));\r\nLv=length(v);\r\nvr=repmat(v,Lv,1);vrp=vr';\r\nvp=vr+vrp;\r\n%vp=repmat(v,Lv,1)+repmat(v',1,Lv);\r\nvm2(vp(:))=1;\r\nvm=vr.*vrp;\r\n%vm=repmat(v,Lv,1).*repmat(v',1,Lv);\r\nvm2(vm(:))=1;\r\nscr=nnz(vm2);\r\nif scr\u003eBest,pass=false;end\r\ntoc\r\nassert(pass)\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":2,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2015-06-04T19:18:55.000Z","updated_at":"2016-02-22T02:59:36.000Z","published_at":"2016-02-22T02:59:36.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\u003eThis Challenge is to find an integer vector A that creates the minimum set size for (A+A) U (A*A) for a given vector length,\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://oeis.org/A263996\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eOEIS A263996\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e. The length, best value, Prime_max, and Value_max will be provided.\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\u003eThe\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"https://oeis.org/A263996\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eOEIS A263996\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e gives the minimum set sizes thru length 50. Length 7 has best value 26 with Prime_max 5 and Value_max 8. A=[1 2 3 4 5 6 8] yields [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 18 20 24 25 30 32 36 40 48 64]. The\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://68.173.157.131/Contest/SumsAndProducts1/FinalReport\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eAl Zimmermann Sums Contest Final Report\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e extends A263996 for lengths 40:40:1000 with complete vector solutions. The contest winner, Rokicki, noted his method used P-smooth sets, hill climbing, and random swaps. The contest was a little tougher with only L given.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eExample Input/Output: L=9;Best=36;pmax=5;vmax=12; v = SP(L,Best,pmax,vmax); Yields v=[1 2 3 4 5 6 8 10 12]\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\u003eTheory/Hints: The V superset is found using\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/1298-p-smooth-numbers\\\"\u003e\u003cw:r\u003e\u003cw:t\u003epsmooth(pmax,vmax)\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e . One observation is that for every v element the set v contains prod of all v element factor permutations. The time eater will be score evaluation. Residual evaluation suggested. A history screen, prior to score evaluation, of prior processed vectors is essential. A quick history pre-screen is vector sum. Replace testing of only values that are not factors of other numbers (eg 2,3 no replace) enables a reasonable time rolling score solution without random for the small test case values.\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":42765,"title":"Maximize Non-Co-Planar Points in an N-Cube","description":"This Challenge is to find a set with the maximum number of integer points that create planar surfaces with a maximum of three points from the set. No four points may be co-planar.\r\nGiven the size N and the number of expected points Q find a set of Q points. Only N=2/Q=5 and N=3/Q=8 will be tested. N=4/Q=10 or N=5/Q=13 are too large to process.\r\n\r\n  N=2 contains 8 points [0,0,0;0,1,0;1,0,0;1,1,0;0,0,1;0,1,1;1,0,1;1,1,1]\r\n  N=3 contains 27 points [0,0,0;0,0,1;0,0,2;...2,2,2]\r\n\r\nOutput is a Qx3 matrix of the non-co-planar points.\r\n\r\nReference: The \u003chttp://68.173.157.131/Contest/Tetrahedra March 2016 Al Zimmermann Non-Coplanar contest\u003e is N=primes less than 100. Maximize the number of points in an NxNxN cube with no 4 points in a common plane.\r\n\r\nTheory: The N=2 and N=3 cases can be processed by brute force if care is taken. Assumption of [0,0,0] greatly reduces number of cases. Solving \u003chttp://www.mathworks.com/matlabcentral/cody/problems/42762-is-3d-point-set-co-planar Cody Co-Planar Check\u003e may improve speed. ","description_html":"\u003cp\u003eThis Challenge is to find a set with the maximum number of integer points that create planar surfaces with a maximum of three points from the set. No four points may be co-planar.\r\nGiven the size N and the number of expected points Q find a set of Q points. Only N=2/Q=5 and N=3/Q=8 will be tested. N=4/Q=10 or N=5/Q=13 are too large to process.\u003c/p\u003e\u003cpre class=\"language-matlab\"\u003eN=2 contains 8 points [0,0,0;0,1,0;1,0,0;1,1,0;0,0,1;0,1,1;1,0,1;1,1,1]\r\nN=3 contains 27 points [0,0,0;0,0,1;0,0,2;...2,2,2]\r\n\u003c/pre\u003e\u003cp\u003eOutput is a Qx3 matrix of the non-co-planar points.\u003c/p\u003e\u003cp\u003eReference: The \u003ca href = \"http://68.173.157.131/Contest/Tetrahedra\"\u003eMarch 2016 Al Zimmermann Non-Coplanar contest\u003c/a\u003e is N=primes less than 100. Maximize the number of points in an NxNxN cube with no 4 points in a common plane.\u003c/p\u003e\u003cp\u003eTheory: The N=2 and N=3 cases can be processed by brute force if care is taken. Assumption of [0,0,0] greatly reduces number of cases. Solving \u003ca href = \"http://www.mathworks.com/matlabcentral/cody/problems/42762-is-3d-point-set-co-planar\"\u003eCody Co-Planar Check\u003c/a\u003e may improve speed.\u003c/p\u003e","function_template":"function m=MaxNonCoplanarPts(N,Q);\r\n% Place Q or more points in an 0:N-1 #D grid such that each plane created uses only 3 points from the set provided\r\n% N is Cube size\r\n% Q is expected number of points in solution\r\n% Hint: Point [0,0,0] can be assumed to be in the solution for N=2 and N=3\r\n% N=3 is the 27 points [0,0,0;0,0,1;0,0,2;...2,2,2]\r\n  m=[];\r\nend","test_suite":"%%\r\nN=2;\r\nQ=5;\r\nm=MaxNonCoplanarPts(N,Q);\r\nm=floor(abs(m))\r\n% Perform m check\r\nvalid=1;\r\nif size(m,1)\u003cQ,valid=0;end % Must be Q pts or more\r\nif max(m(:))\u003eN-1,valid=0;end\r\npset=nchoosek(1:size(m,1),4);\r\nfor i=1:length(pset)\r\n m4=m(pset(i,:),:);\r\n% Coplanar check method courtesy of Tim\r\n if ~det([m4 ones(4,1)]) % coplanar det=0\r\n  valid=0;\r\n  break\r\n end\r\nend\r\nassert(isequal(1,valid))\r\n%%\r\nN=3;\r\nQ=8;\r\nm=MaxNonCoplanarPts(N,Q);\r\nm=floor(abs(m))\r\n% Perform m check\r\nvalid=1;\r\nif size(m,1)\u003cQ,valid=0;end % Must be Q pts or more\r\nif max(m(:))\u003eN-1,valid=0;end\r\npset=nchoosek(1:size(m,1),4);\r\nfor i=1:length(pset)\r\n m4=m(pset(i,:),:);\r\n% Coplanar check method courtesy of Tim\r\n if ~det([m4 ones(4,1)]) % coplanar det=0\r\n  valid=0;\r\n  break\r\n end\r\nend\r\nassert(isequal(1,valid))\r\n","published":true,"deleted":false,"likes_count":0,"comments_count":0,"created_by":3097,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":6,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2016-03-07T00:22:02.000Z","updated_at":"2016-03-07T01:01:33.000Z","published_at":"2016-03-07T01:01:33.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\u003eThis Challenge is to find a set with the maximum number of integer points that create planar surfaces with a maximum of three points from the set. No four points may be co-planar. Given the size N and the number of expected points Q find a set of Q points. Only N=2/Q=5 and N=3/Q=8 will be tested. N=4/Q=10 or N=5/Q=13 are too large to process.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"code\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003e\u003c![CDATA[N=2 contains 8 points [0,0,0;0,1,0;1,0,0;1,1,0;0,0,1;0,1,1;1,0,1;1,1,1]\\nN=3 contains 27 points [0,0,0;0,0,1;0,0,2;...2,2,2]]]\u003e\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eOutput is a Qx3 matrix of the non-co-planar points.\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\u003eReference: The\u003c/w:t\u003e\u003c/w:r\u003e\u003cw:r\u003e\u003cw:t\u003e \u003c/w:t\u003e\u003c/w:r\u003e\u003cw:hyperlink w:docLocation=\\\"http://68.173.157.131/Contest/Tetrahedra\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eMarch 2016 Al Zimmermann Non-Coplanar contest\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e is N=primes less than 100. Maximize the number of points in an NxNxN cube with no 4 points in a common plane.\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\u003eTheory: The N=2 and N=3 cases can be processed by brute force if care is taken. Assumption of [0,0,0] greatly reduces number of cases. Solving\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/42762-is-3d-point-set-co-planar\\\"\u003e\u003cw:r\u003e\u003cw:t\u003eCody Co-Planar Check\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:hyperlink\u003e\u003cw:r\u003e\u003cw:t\u003e may improve speed.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\"},{\"partUri\":\"/matlab/output.xml\",\"contentType\":\"text/xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?\u003e\u003cembeddedOutputs\u003e\u003cmetaData\u003e\u003cevaluationState\u003emanual\u003c/evaluationState\u003e\u003clayoutState\u003ecode\u003c/layoutState\u003e\u003coutputStatus\u003eready\u003c/outputStatus\u003e\u003c/metaData\u003e\u003coutputArray type=\\\"array\\\"/\u003e\u003cregionArray type=\\\"array\\\"/\u003e\u003c/embeddedOutputs\u003e\"}]}"}],"term":"tag:\"zimmermann\"","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:\"zimmermann\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"zimmermann\"","","\"","zimmermann","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f2f41ed51f8\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f2f41ed5158\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f2f41ed4898\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f2f41ed5478\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f2f41ed53d8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f2f41ed5338\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f2f41ed5298\u003e":"tag:\"zimmermann\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f2f41ed5298\u003e":"tag:\"zimmermann\""},"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:\"zimmermann\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"zimmermann\"","","\"","zimmermann","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f2f41ed51f8\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f2f41ed5158\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f2f41ed4898\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f2f41ed5478\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f2f41ed53d8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f2f41ed5338\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f2f41ed5298\u003e":"tag:\"zimmermann\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f2f41ed5298\u003e":"tag:\"zimmermann\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":42762,"difficulty_rating":"easy-medium"},{"id":42355,"difficulty_rating":"unrated"},{"id":42765,"difficulty_rating":"unrated"}]}}