Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How many triangles does your perl script "see"?

by Perl Mouse (Chaplain)
on Oct 27, 2005 at 15:20 UTC ( [id://503373]=note: print w/replies, xml ) Need Help??


in reply to How many triangles does your perl script "see"?

What's the puzzle? Is the puzzle to scan the image can reconstruct the graph - and once you've done so, count the triangles? Or can you just give the edges and vertices to the program as input? In the latter case, the puzzle becomes really simple, as any non-trivial 3-cycle will be a triangle. (JH - HF - FJ is a trivial cycle, but JB - BI - IJ isn't).
Perl --((8:>*
  • Comment on Re: How many triangles does your perl script "see"?

Replies are listed 'Best First'.
Re^2: How many triangles does your perl script "see"?
by pg (Canon) on Oct 27, 2005 at 15:29 UTC

    Actually the latter case can not be logically resolved, as the number of triangles not only depends on the linkage, but also the geo-location of each point (things like what if three points are located on one straight line etc.)

    In the latter case, the question needs to be changed to something like "what is the maximum number of triangles can be formed" or something similar.

      Actually the latter case can not be logically resolved, as the number of triangles not only depends on the linkage, but also the geo-location of each point (things like what if three points are located on one straight line etc.)
      That's what I wrote, wasn't it? Three co-linear points form a trivial 3-cycle. And we want to avoid those.
      Perl --((8:>*
Re^2: How many triangles does your perl script "see"?
by Skeeve (Parson) on Oct 27, 2005 at 15:29 UTC

    Don't scan. Just put in whatever you think is needed by you program (except for the solution of course).

    When I wrote my script I gave it much information like: Which nodes are linked with which other nodes, which nodes are on one line and so on.


    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://503373]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-25 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found