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

Re^8: Data visualisation.

by BrowserUk (Patriarch)
on Jan 05, 2014 at 09:54 UTC ( [id://1069371]=note: print w/replies, xml ) Need Help??


in reply to Re^7: Data visualisation.
in thread Data visualisation.

Nothing, really. It just mentions them.... I'll still calculate the intersection point where the lines *would* meet, were they long enough.

Oh, okay.

Though I have to say that it sounds like you are now performing 3 "triangle inequality" checks for every possible triangle (for my 17 node dataset that is 3*15! or nearly 4 Trillion additions and 4 Trillion comparisons) for no real purpose. Ie pure make-work....

For Dirk80's 24 node dataset, that rises to 1.8 trillion trillion redundant calculations.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^9: Data visualisation.
by roboticus (Chancellor) on Jan 05, 2014 at 18:13 UTC

    BrowserUk:

    We're only picking three points for each triangle, and the point order doesn't matter, so the number of calls to chk_triangle_inequality during the exhaustive check for your dataset is n!/((n-3)!*3!). For your dataset, it's 680 calls, and 2024 for Dirk80's dataset. If it were trillions of checks, I'd've pressed ^C long before it ended. ;^D

    Currently the check is pointless busywork, but since TSP problem is interesting to me, and printing interesting clues might spur ideas, so I threw it in for fun. I frequently litter my programs with print statements showing intermediate steps, or call functions whose results may be interesting. I delete it when it proves valueless to me, and then clean it up when I'm through. But I can't always predict beforehand which functions I'll find to be junk.

    For example, when I was playing with your Bloom filter example, I put various print statements in my program, and noticed that one of the values was approaching an "interesting" value, allowing me to figure out the distributions.

    Update: As AM said, wrong formula! Fixed.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      Strange ... wrong formula but correct values???

      s/2/3/ ;-)

      so the number of calls to chk_triangle_inequality during the exhaustive check for your dataset is n!/((n-2)!*2!). For your dataset, it's 680 calls, and 2024 for Dirk80's dataset.

      Indeed. I found completely the wrong formula.

      (BTW: it is simply all combinations of 3 from N; so if you have a calculator with an nCr button ... )


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
Re^9: Data visualisation.
by Anonymous Monk on Jan 05, 2014 at 10:17 UTC
    nosense!

      Argh! You're right. For Dirk80's dataset it is only 1.1 billion trillion. My mistake.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        try again...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 21:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found