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

Learn moreOpportunities for recent engineering grads.

Apply Today1Rank

17Badges

18090Score

Alfonso Nieto-Castanon submitted Solution 510598 to Problem 2621. Solve Linear equations

on 8 Oct 2014

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

Alfonso Nieto-Castanon submitted Solution 509627 to Problem 2620. Determine the Anti-diagonal of a Magic Square

on 8 Oct 2014

Alfonso Nieto-Castanon submitted Solution 509704 to Problem 1457. USC Spring 2013 ACM: Walking on Thin Ice

on 7 Oct 2014

Alfonso Nieto-Castanon submitted Solution 509561 to Problem 2617. Yet Another Path Finder

on 7 Oct 2014

Alfonso Nieto-Castanon submitted Solution 509558 to Problem 2617. Yet Another Path Finder

on 7 Oct 2014

Alfonso Nieto-Castanon submitted Solution 509545 to Problem 2617. Yet Another Path Finder

on 7 Oct 2014

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

Alfonso Nieto-Castanon submitted Solution 507608 to Problem 2291. GJam 2014 Qualifier: Deceitful War (Small)

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 507607 to Problem 1457. USC Spring 2013 ACM: Walking on Thin Ice

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 507601 to Problem 1457. USC Spring 2013 ACM: Walking on Thin Ice

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 507597 to Problem 1457. USC Spring 2013 ACM: Walking on Thin Ice

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 507428 to Problem 1457. USC Spring 2013 ACM: Walking on Thin Ice

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 507427 to Problem 2262. GJam 2011 Africa Qualifier B: Optimum Profit

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 507426 to Problem 2262. GJam 2011 Africa Qualifier B: Optimum Profit

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 507420 to Problem 2260. GJam 2011 Africa Qual A: Maximum Loop Size

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 507409 to Problem 2291. GJam 2014 Qualifier: Deceitful War (Small)

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 507400 to Problem 2291. GJam 2014 Qualifier: Deceitful War (Small)

on 2 Oct 2014

Alfonso Nieto-Castanon submitted Solution 506633 to Problem 2494. What is the nth step in Conway's Life?

on 30 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506631 to Problem 2242. Wayfinding 5 - Travel contour

on 30 Sep 2014

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

Alfonso Nieto-Castanon submitted Solution 506629 to Problem 2220. Wayfinding 3 - passed areas

on 30 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506628 to Problem 2220. Wayfinding 3 - passed areas

on 30 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506613 to Problem 2219. Wayfinding 2 - traversing

on 30 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506612 to Problem 2219. Wayfinding 2 - traversing

on 30 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506600 to Problem 2218. Wayfinding 1 - crossing

on 30 Sep 2014

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

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

on 29 Sep 2014

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

on 29 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506527 to Problem 2606. Decrypt the cypher using XOR encryption (for beginners)

on 29 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506523 to Problem 2606. Decrypt the cypher using XOR encryption (for beginners)

on 29 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506518 to Problem 2606. Decrypt the cypher using XOR encryption (for beginners)

on 29 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506516 to Problem 2606. Decrypt the cypher using XOR encryption (for beginners)

on 29 Sep 2014

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

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

on 29 Sep 2014

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

on 29 Sep 2014

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

on 29 Sep 2014

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

on 29 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506257 to Problem 2512. longest common semi-substring

on 29 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506255 to Problem 2512. longest common semi-substring

on 29 Sep 2014

Alfonso Nieto-Castanon submitted Solution 506254 to Problem 2512. longest common semi-substring

on 29 Sep 2014