Announcement

Collapse
No announcement yet.

Chop Tree: comments

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Chop Tree: comments

    'use one array x(65535)'

    that would be faster, but you have to have a large array always loaded

    with a tree, you can store Keys; 1, 99, 65535 | very little memory

    this was an experimental tree with limited use
    if it does happen to fill a need:
    - it's way faster than a hash or binary tree
    - always in key order

    i needed something; i'd call an aging stack
    the last item accessed, key gets changed to highest key in tree
    it requires several different trees to keep track of everything
    Last edited by Stanley Durham; 19 May 2009, 03:41 PM.
    stanthemanstan~gmail
    Dead Theory Walking
    Range Trie Tree
    HLib ~ Free Data Container Lib ~ Arrays, Lists, Stacks, Queues, Deques, Trees, Hashes

  • #2
    Stan,

    Nice piece of code there....but what I really like is your dissection of the (impossible) theory of evolution!!! Well done!
    Software makes Hardware Happen

    Comment


    • #3
      thanks, Joe
      stanthemanstan~gmail
      Dead Theory Walking
      Range Trie Tree
      HLib ~ Free Data Container Lib ~ Arrays, Lists, Stacks, Queues, Deques, Trees, Hashes

      Comment


      • #4
        Far from me to put down your nice code but memory is getting bigger all the time and if you want speed it is the way to go.
        But if you have only a few keys to check and you want to save ram, a simple sequential read will do the job just as well with a lot less code. (meaning work)
        Guy, no arguments.

        I used PB arrays for everything for years.

        If you have 50,00 items, a sequential search won't cut it.
        hash is faster

        If you need to have the Keys always in order,
        a tree is a better solution.
        stanthemanstan~gmail
        Dead Theory Walking
        Range Trie Tree
        HLib ~ Free Data Container Lib ~ Arrays, Lists, Stacks, Queues, Deques, Trees, Hashes

        Comment


        • #5
          Stanley,

          I agree that between big files and little files a tree is a good solution and yours is the best so far and most of all if memory is tight
          Old QB45 Programmer

          Comment


          • #6
            Stan about evolution let me say two sentences:1. In fact you are right, that Live can not come as they tell us actually.2. evolution is possible, while only in some limitations.3. The idea, live could start by acccident from anorganic chemical, is much less impossible, then to try to make a clock (that is able to reproduce itself) like this:- put a clock into pieces, - put all pieces into a bag and - shake the bag so long until the accident makes them into the right order to let the clock start working4. conclusion: It doesnt work this way.But note: Actually there is no alternative. Because to just say "God did it." is not an answer to a scientific question. Thats just as if you go to the driving school with a new car modell and when you ask the teacher "how do i switch it on?", he answers "God knows how to."It doesn't really help - does it? :-)Actually we know for sure what doesn't work. But we have no idea where live in a scientific way comes from. At least we can assume that it maybe can't come originally from earth.
            --Theo Gottwald
            ------------------------------------------------
            76706 Dettenheim * Germany * [email protected]
            ------------------------------------------------
            Joses Forum * Theo's Link Site * IT-Berater.org

            Comment


            • #7
              Because to just say "God did it." is not an answer to a scientific question.
              Unless, God did it.
              Then it would be the scientifically correct deduction.

              "...if the entire DNA contained within the cells of a human being was stretched out, it would reach to the Moon and back eight thousand times." http://www.gig.org.uk/education1.htm

              About 10 trillion cells in every adult. (some say 100 trillion)

              Something that complex in a puny 3.5 billion years.

              You do the math.

              Right now; it’s looking pretty good for God, not so good for the Evos.
              stanthemanstan~gmail
              Dead Theory Walking
              Range Trie Tree
              HLib ~ Free Data Container Lib ~ Arrays, Lists, Stacks, Queues, Deques, Trees, Hashes

              Comment


              • #8
                Stan,
                You do the math.
                OK.

                Assuming sufficient resources exist to feed the cells at the this growth rate then, if cells divides every M minutes, how many minutes will it take to get 100,000,000,000,000 cells?
                Code:
                log2(100,000,000,000,000)= 46.5
                so it will take 47xM minutes to grow from 1 cell to in excess of 100 trillion cells.

                M is often quoted as 20 minutes but cells cannot grow fast enough to sustain that rate of division.
                A more realistic time is 1 hour .. but suppose we say 1 day or 1 week or even 1 month for a single cell division then we will still exceed 100 trillion cells in 47 days or 47 weeks or 47 months.

                Just for fun, assuming a cell can divide every month, approximately how many cells will have existed in the last 3.5 billion years?
                Code:
                3.5 billion years x 12 = 4.2E10 months.
                2^4.2E10 = 1.2 E 1,000,000,000
                that's a full 1 billion digits in that number.

                I hope that helps but it escapes me what this has to do with the more important point of trees versus arrays versus hashes.

                Paul.
                Last edited by Paul Dixon; 24 May 2009, 08:50 AM.

                Comment


                • #9
                  Not exactly the math I was talking about.

                  A human takes about 30 years to go from one to 10 trillion cells.

                  What are the odds of going from a rock to man in 3.5 billion years?

                  Code:
                   
                   
                  (1/prebiotic dude odds) x 
                  (1/prebiotic dude comes alive odds) x 
                  (1/prebiotic dude can reproduce odds) x 
                  (1/prebiotic to one-cell odds) x 
                  (1/one-cell to 100 trillion cell guy odds)
                  mutation odds are 10^7
                  many of us have a mutant cell

                  it would take several related mutations for a noticeable result.

                  2 related mutations 10^14 : Dr. Gary Parker

                  3 related mutations 10^21

                  whoops! "..the ocean isn’t big enough to hold enough bacteria to make it likely for you to find a bacterium with three simultaneous or sequential related mutations." Dr. Gary Parker

                  4 relate mutations 10^28
                  whoops! earth isn't big enough

                  If evolution is true, then math demands a massive presence of misses and transitional states.
                  (got to have a bell curve for math to be happy)

                  Why then is not every geological formation and every strata full of such intermediate links? Geology assuredly does not reveal any such finely-graduated organic chain; and this perhaps, is the most obvious and serious objection which can be urged against my theory."
                  Charles Darwin
                  Last edited by Stanley Durham; 25 May 2009, 12:34 PM.
                  stanthemanstan~gmail
                  Dead Theory Walking
                  Range Trie Tree
                  HLib ~ Free Data Container Lib ~ Arrays, Lists, Stacks, Queues, Deques, Trees, Hashes

                  Comment


                  • #10
                    Stan,
                    3 related mutations 10^21

                    whoops! "..the ocean isn’t big enough to hold enough bacteria to make it likely for you to find a bacterium with three simultaneous or sequential related mutations." Dr. Gary Parker
                    I don't follow.
                    10^21 is 70 generations (2^70 = 1.18E21) which, assuming the ludicrously slow cell division rate of once per month, would still give you your 10^21 cells in just 70 months. That's under 6 years of the 3.5 billion you have.

                    The mass of the oceans is about 10^21kg so there would be 1 cell per kilogram of ocean. Why isn't that big enough? The ocean currently supports a lot more than that.

                    I assume this "Dr. Gary Parker" you are quoting is trying to make some point but, assuming you've quoted him correctly and in context, I have to say that I'd have no confidence in any of his conclusions when he can't get the simple calculations on which they are based correct.


                    Paul.

                    Comment


                    • #11
                      Paul,
                      10^21 is 70 generations
                      wrong; 10^21 is 10^21 generations OR 10^21 sample

                      How many atoms are in a cell? ...
                      This is, of course, assuming SMALL cells (0.5 micron is small for a
                      eukaryote) - but if you assume 10 micron cells for a SIMPLE
                      eukaryote, this means 8 000 x more atoms - or 10^14, almost spot
                      on....!
                      Ed Rybicki, PhD; Dept Microbiology; University of Cape Town

                      atoms in a cell: about 10^14
                      four series of related mutation odds: 10^28 (a sample of 10^28 cells OR 10^28 generations)
                      ----------------------------------
                      atoms in sample: 10^42

                      How many atoms are there in the world? ...
                      about 1.33*10^50 atoms
                      Drew Weisenberger, Detector Scientist : http://education.jlab.org/qa/mathatom_05.html

                      you do the math...

                      after corrections:
                      looks like there would be a few atoms left in the word
                      it would only take over 3/4 of the world's atoms
                      my bad
                      Last edited by Stanley Durham; 25 May 2009, 11:34 AM. Reason: bad math as pointed out by Paul
                      stanthemanstan~gmail
                      Dead Theory Walking
                      Range Trie Tree
                      HLib ~ Free Data Container Lib ~ Arrays, Lists, Stacks, Queues, Deques, Trees, Hashes

                      Comment


                      • #12
                        Stan,
                        you do the math...
                        I already did.
                        When multiplying powers the indices are added, not multiplied.

                        1,000 x 1,000 = 1,000,000
                        i.e. 10^3 x 10^3 = 10^(3+3) = 10^6 .. not 10^(3x3)= 10^9 as you seem to imply.


                        Sorry I can't make it simple enough for you to understand.

                        Paul.

                        Comment


                        • #13
                          thanks;
                          made the corrections

                          OK, Joe Onecell made a slight mutational change.
                          He's got a lot of work to do to get to a 10 trillion cell guy.

                          Only trouble is, less the 1/4 of the world's atoms are left.

                          The required sample for 4 related mutational changes took up over 3/4 of the world's atoms.

                          What's Joe going to do now?


                          ----------------
                          added note:

                          the above statement stands!

                          Me
                          4 relate mutations 10^28
                          whoops! earth isn't big enough
                          If 4 "simultaneous or sequential related mutations" takes over half the world's atoms, it's safe to say the "earth isn't big enough" to hold the required sample.
                          Last edited by Stanley Durham; 25 May 2009, 12:28 PM.
                          stanthemanstan~gmail
                          Dead Theory Walking
                          Range Trie Tree
                          HLib ~ Free Data Container Lib ~ Arrays, Lists, Stacks, Queues, Deques, Trees, Hashes

                          Comment


                          • #14
                            Stan,
                            this has nothing to do with "programming" and little to do with trees or chopping them so I'll make this my last post on this matter.

                            First, back to the maths.
                            10^42 is not a quarter of 10^50.
                            10^42 / 10^50 = 10^-8 = 1/100,000,000 not 1/4. You were out by a factor of 25million.

                            Second, if you're talking about different generations then the previous generation dies out, decomposes and becomes material for the next generation. Not all previous cells live forever. Most material is repeatedly recycled through the generations.

                            Third, if your figures have been out initially by astronomical amounts and now, after corrections, by many millions, why do you have any confidence at all in the figure of 10^7 on which you appear to base all your subsequent arguments when it comes from the same source? That figure is clearly wrong. I have no intention of investigating how wrong it is beyond a pointer to here:
                            http://en.wikipedia.org/wiki/Mutation_rate

                            I know it's only Wikipedia but it's likely to be a lot more accurate than the figures you're using.
                            Note this bit:
                            "the mutation rate in eukaryotes is in generally 10-4 to 10-6 mutations per base pair per generation"
                            That's 10 to 1,000 times more frequent than you say and, crucially, it's PER BASE PAIR. If you have a complex organism then mutations are ever more likely.

                            For simplicity, let's just take the middle figure of 10^-5 and we'll ignore the rate increasing with complexity. You then do your 4 steps and instead of 10^28 you end up with 10^20. So you aren't just a factor of 25 million out but you're likely to be out by a further factor of 10^8, giving a total error in you basic calculation of 25 x 10^14.


                            25 x 10^14 is one mighty big error and it still doesn't address the point made that there is easily time for all this to take place in 6 years out of the 3.5 billion and becomes more likely as complexity increases.


                            I hope that helps clarify some misconceptions you have.

                            Paul.

                            Comment


                            • #15
                              ... your figures have been out initially by astronomical amounts ...
                              hangs his head in shame

                              Paul: ... why do you have any confidence at all in the figure of 10^7 on which you appear to base all your subsequent arguments when it comes from the same source?
                              cause that's not my math
                              actually, your source puts it at higher number than Dr. Gary Parker; Biology/Geology

                              Dr. Gary Parker: 10^7
                              "..the ocean isn't big enough to hold enough bacteria to make it likely for you to find a bacterium with three simultaneous or sequential related mutations."
                              Paul: -> Wikipedia
                              "... and for bacteria the rate is around 10-8 per base pair per generation ..."
                              (Rates of Spontaneous Mutation Drake et al. Genetics, 1998)
                              Paul
                              That figure is clearly wrong.
                              Paul, it's 90,000,000 less than what you're link puts it at!

                              Dr. Parker's number is less than your source, so I'll stick with it.

                              me -> Dr. Parker
                              4 relate mutations 10^28
                              whoops! earth isn't big enough
                              Dr. Parker
                              What about trying for four related mutations? One in 10^28. Suddenly, the earth isn't big enough to hold enough organisms to make that very likely. And we're talking about only four mutations. ... Four mutations don’t even make a start toward any real evolution.
                              ===================================
                              4 related mutations: 10^28 (bacteria)
                              ===================================
                              World = 510,072,000 sq/km (CIA Fact Book)
                              Google "510072000 square km to square inches ="
                              World = 7.90613181 × 10^17 square inches
                              bacteria per square inch = sample/earth's square inches
                              bacteria per square inch = (10^28)/(7.90613181 X (10^17))
                              Google "(10^28)/(7.90613181 X (10^17))="
                              (10^28)/(7.90613181 X (10^17)) = 1.26484104 x 10^10 bacteria per square inch
                              Google "1.26484104 x (10^10)="
                              12,648,410,400 bacteria per square inch of the Earth's surface
                              ===================================
                              .
                              * Any further discussions should be in the Café
                              stanthemanstan~gmail
                              Dead Theory Walking
                              Range Trie Tree
                              HLib ~ Free Data Container Lib ~ Arrays, Lists, Stacks, Queues, Deques, Trees, Hashes

                              Comment


                              • #16
                                This may seem unrelated, but how do flus come and go? Isn't it by mutation?

                                Whenever you see this symbol in someone's proof of something take extra caution : '^'
                                How many people do you know that have actually counted to 1,000,000?
                                I'm willing to bet that most people have never counted to 1,000?
                                So these two figures, 10^6 and 10^3, when removed from figures like 10^28 leave you an idea of the amount of guessing, extrapolation, postulation that the proof is using.
                                And if the person that counted to 10^28 would please stand, I have an award for him/her.
                                Rod
                                I want not 'not', not Knot, not Knott, not Nott, not knot, not naught, not nought, but aught.

                                Comment


                                • #17
                                  Originally posted by Rodney Hicks View Post
                                  ...And if the person that counted to 10^28 would please stand, I have an award for him/her.
                                  Does doing it by twosey's count?

                                  ===============================
                                  "Death alone reveals how small
                                  are men's poor bodies."
                                  Juvenal
                                  ===============================
                                  It's a pretty day. I hope you enjoy it.

                                  Gösta

                                  JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
                                  LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

                                  Comment

                                  Working...
                                  X