Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Alfonso Nieto-Castanon

View profile information

Personal Profile

http://www.alfnie.com

1Rank
17Badges
18090Score

Alfonso Nieto-Castanon submitted a Comment to Problem 2582. Cut an orange

Perhaps I am misinterpreting, but it seems to me that some of your testsuite solutions are incorrect. For example, for N=5 I seem to be getting 19 instead of 27 cubes entirely within the sphere. I double-check using this code: x=rand(1e6,3); r=sum((x-.5).^2,2)<.25; inside=accumarray(ceil(x*N),r); outside=accumarray(ceil(x*N),~r) ; disp([nnz(inside&~outside) nnz(inside&outside)]); Could you please let me know if I am misinterpreting, and if so which 8 additional cubes would you consider within the sphere?

on 8 Oct 2014 at 5:19

Alfonso Nieto-Castanon submitted a Comment to Problem 2617. Yet Another Path Finder

In the example, and in the first problem of the testsuite, perhaps it should read r=3; c=3 (instead of r=3; c=4)? Also some of the testsuite problems seem to have multiple solutions (non-unique shortest-path solution)...

on 6 Oct 2014 at 5:36

Alfonso Nieto-Castanon submitted a Comment to Problem 2220. Wayfinding 3 - passed areas

please consider breaking the testsuite into multiple tests to avoid the "clear F" issue (and to make debugging simpler)

on 30 Sep 2014 at 4:16

Alfonso Nieto-Castanon submitted a Comment to Problem 633. Create Circular Perfect Square Sequence

In general, sure, you can easily write these sort of heuristic-search algorithms without explicitly using recursion, or you could use non-search-based approaches, such as annealing, integer linear programming, etc. Now if you are asking whether exhaustive or other polynomial-time approaches are possible/practical for this problem I am not really sure about that. I believe this problem reduces to finding a full hamiltonian cycle over an N-node graph, so the only hope of bringing this out of the NP-hard umbrella would be exploiting some properties of these particular networks arising from the properties of perfect numbers, but so far I do not see any useful trick in this regard (so in short, perhaps it is possible but I do not know how; any thoughts?)

on 30 Sep 2014 at 2:19

Alfonso Nieto-Castanon liked Solution 506512

on 29 Sep 2014 at 16:56

Alfonso Nieto-Castanon submitted a Comment to Problem 2523. longest common substring : Skipped character version

perhaps add another test to avoid non-general solutions? (e.g. str1='abaa' str2='aaab' should return 'aaa')

on 29 Sep 2014 at 8:45