TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lattice Quadrilaterals on Project Euler

21 pointsby aabalkanover 11 years ago

6 comments

ClayFergusonover 11 years ago
Mind blower #2: How many different shapes can a brain with 4 neurons recognize? 94. Evolution of vision neurons actually would have started out using a "chance built" circuit that could solve this 94-item 'recognition' problem. Then the DNA that solved the 94 would run repeatedly to recursively form the rest of the retina, giving the brain higher resolution, but using only one 94-pattern-solving DNA recursively. I think the major advancements in neural nets will come about once we start "wiring up" brains in interesting ways like this rather than the current "layer training" approach...The brain is recursive, and needs recursive wiring to be simulated.
thearn4over 11 years ago
Basically, you&#x27;re looking for the rectangular equivalent of A189414 (<a href="http://oeis.org/A189414" rel="nofollow">http:&#x2F;&#x2F;oeis.org&#x2F;A189414</a>).<p>Tricky problem, even for PE. I started to retool some earlier success with it towards a quasi-DP approach, but have since got caught up in other things.
throwaway_yy2Diover 11 years ago
Suggestion: use rot13 if you say anything potentially spoiler-y.
评论 #7202830 未加载
评论 #7202827 未加载
评论 #7202828 未加载
评论 #7204631 未加载
susi22over 11 years ago
Btw, the problem was solved by 61 people so far.<p>Random thoughts:<p>I think the mod is just there to distract or for hinting that you shouldn&#x27;t come up with a brute force method.<p>Observations:<p>1. Assume an infinite grid. Add 3 random points _not_ on a line. Clearly, they&#x27;ll be a convex set (a triangle).<p>2. Add a 4th point such that it is not on an existing line.<p>You&#x27;ve now a quadrilateral.<p>So for the case of Q(2,2) = 94 = choose(9,4) - 32. 32 is the number of points that would make 3 of the 4 points lie on a line.<p>Come up with a recurrence relations and solve it.
评论 #7203728 未加载
ClayFergusonover 11 years ago
Traveling Salesman Problem... Will this algorithm work?<p>Algorithm:<p>1) Take a square space and divide it into 4 squares.<p>2) Find all 94 quadrilaterals that the &#x27;nodes&#x27; can form.<p>3) For each quadrilateral, that has points in common with the original, do recursion (I.e. go to step #1 for each of the 94)<p>4) Keep repeating until some minimal square size (resolution) is reached.<p>Find the path with the shortest &#x27;Error&#x27; and that&#x27;s an approximation to the traveling salesman problem.<p>&#x27;Error&#x27; is defined as the sum of the distances of all travel waypoints to the nearest quadrilateral path line.
Bootvisover 11 years ago
I&#x27;ve solved about 60 problems on Project Euler but I&#x27;ve no clue about problems where a mod suddenly shows up in the question. How do these type of questions work?
评论 #7202802 未加载
评论 #7203193 未加载
评论 #7202844 未加载