Announcement

Collapse
No announcement yet.

Idea?

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

  • #31
    Originally posted by KyrosKrane
    You forgot to count the current node if left or right is not null. Initialize count = 1 to fix it. =)
    Given my track record in this thread, I'm probably missing something, but isn't a leaf node defined as a childless node (for a tree structure, at least)? If left is null xor right is null, then it would still have a child, and not be a leaf. The only childless case, when both are null, is the time he does count. Seems algorithmically accurate to me.

    I assumed the use of "left" and "right" were simplifications made for the web post. If not, then Kyros' point was probably the problem.

    Originally posted by Itek
    I think they meant N=0 to be the base case, because the math shows they did use, as required for N -is-a-member-of-positive-integers-, 1 when they did 2^(2*1)
    Bah ... you're right. I ran into that when I did the proof myself, but forgot about that by the time I came back and read through Eleena's post. Oops

    Originally posted by Itek
    Reason: You have to prove the statement for ALL N and showing N and N-1 only shows it's true from the base case TO the number N, where proving it for N+1 shows it's true for the base case and ALL other N which are 1 or more larger than the base case. (If it's true for 0 it's true for 0+1, 1+1, 2+1, etc.)
    N from N-1 seems like it would still be valid, albiet slightly more work, since the number N itself is arbitrary. Seeking to prove the statement true for a number N, opens (N-N[baseCase]) recusive proofs, since to prove N you need N-1, and to prove N-1 you need N-2, etc until you reach N[baseCase+1] - N[baseCase], which you can prove immediately via the inductive proof. So once you decrement your way down to the base case, the proof by induction would allow you to quickly get back to your original N, for any N.

    The way you write it out certainly does make "find N+1 given N" seem like the more official way - which was what I saught afterall. So thanks

    Comment


    • #32
      Easy fix for all the people who are afraid of hitting the wrong button:

      Are you sure you want to destroy all the items on a_crag_spider's corpse?

      Are you sure you want to loot all the items on a_crag_spider's corpse?
      Draggar De'Vir
      92 Assassin - Povar




      Xzorsh
      57 Druid of Tunare - Povar
      47 Druid of Tunare - Lockjaw

      Hark! Who is that, prowling along the fields! It is Draggar De'VIr, hands clutching two hardened pitas! He cries gutterally: "In the name of Thor the Mighty, I hereby void your warranty, and send you back to God!!!"

      "No one can predict the future, so we all should eat our desserts first!" - Gaye from 'The Maelstorm's Eye" (Cloakmaster's Cycle book 3)

      Comment


      • #33
        Are you sure you want to destroy all the items on a_crag_spider's corpse?

        "of course I want to loot all items, why do you think I hit the button"

        DOH

        Message boxes become another mindless click once you get it the habit, to the point you don't read them. If you were naked at bind, and someone popped a "translocate karana" box, you'd click it without thinking b/c you expect it to be a rez.
        Last edited by Eleena Transient; 05-12-2004, 03:55 PM.
        Rasper Helpdesk

        Atlane's Appendix

        Comment


        • #34
          yeah, not to follow my own de-rail a confirmation box would just clutter stuff up and accidents would happen anyway...

          the /hidecorpses looted seems the best way to go...

          although... if you start looting and stop you have to turn it off, zone and zone back to re-loot a corpse if you missed something... could be a pain...

          the summoned bag destruction seems to be pretty nifty as well...

          As for the de-rail...

          yes a leaf is ONLY a node with NO children (so you only count the current node if both left and right are null, which is why it's the "base case" for stopping the recursion with a return 1 statement)

          yes my mistake was all "left" and "right" statements should have been written "node.left" and "node.right" (and in fact it would not compile as written as "left" and "right" would be undefined variables)

          and yes, I did nearly gouge out my eyes and dance blind in the street when I realized my mistake after taking 10 steps out of the room and going "oh, wait... that should be NODE-DOT-Left/Right... CRAP!"

          (ever want to walk back in and say "hey I made a mistake can I correct it?" after a test? I wanted to twice in one day... *sigh* ... oh well, it's over now.)
          In My (Not Always) Humble Opinion, except where I quote someone. If I don't know I say so.
          I suck at this game, your mileage WILL vary. My path is probably NON-optimal.
          Private Messages attended to promptly.

          Comment


          • #35
            I was actually thinking that, I had figured that you had left them out for the sake of simplicity.

            The good news about written code on tests is that while they will probably notice it, you'll probably get close to full credit. The people grading the test have likely made similar mistakes before and probably won't screw you over just because you missed one thing.

            [VxM]

            Comment


            • #36
              Originally posted by Itek

              although... if you start looting and stop you have to turn it off, zone and zone back to re-loot a corpse if you missed something... could be a pain...
              there's a way to turn it back on... I did it yesterday by accident.. something like /hidecorpse none .. or something...

              Alliance Artisan
              Proud owner of Artisan's Prize.

              Comment


              • #37
                true, but you have to zone in/zone out to "unhide" already hidden corpses if I remember right... but i've never used the command so I could certainly be wrong (succoring inside the zone would probably work too for the druids/wizards doing massive AE slaughters)

                Got my grades back. 79% on the Math test and 90% on the CompSci ... got B's in both classes and probably made the Dean's List for the semester.... *dance*
                In My (Not Always) Humble Opinion, except where I quote someone. If I don't know I say so.
                I suck at this game, your mileage WILL vary. My path is probably NON-optimal.
                Private Messages attended to promptly.

                Comment


                • #38
                  Originally posted by Dunthor Warsmith
                  but isn't a leaf node defined as a childless node (for a tree structure, at least)? If left is null xor right is null, then it would still have a child, and not be a leaf.
                  Gah, you're right, I misread the question. I was counting all nodes, not all leaves.
                  Sir KyrosKrane Sylvanblade
                  Master Artisan (300 + GM Trophy in all) of Luclin (Veeshan)
                  Master Fisherman (200) and possibly Drunk (2xx + 20%), not sober enough to tell!
                  Lightbringer, Redeemer, and Valiant servant of Erollisi Marr

                  Comment


                  • #39
                    Originally posted by Dunthor Warsmith
                    ... have a habit of just clicking "Yes" to dialogs thrown at them ...
                    That got me thinking... wouldn't it be fun if there was a bag you could assign with stuff you could throw at mobs?

                    Imagine after doing some (ae) farming, and then you get asked to join an exp group, and you didn't have time to sell and bank stuff. Imagine throwing rusty daggers, sandals, etc at a mob. No, it does not have to do alot of damage, maybe 1 or 2 damage, but it adds alot of fun factor to the game. Maybe the damage ratio could be related to the weight of the object?

                    Imagine being in a raid, and all dps casters are oom... think of the spamage.

                    "Rallos Zek has been hit with a leather boot for 1 damage!"

                    -Fin

                    Comment


                    • #40
                      "you hurt my head like math!" -- kiki to gwynn, sluggy freelance.

                      (sorry, couldn't resist, i'll shut up now)
                      eti et al
                      (etitameh regit, birgite silverbow,
                      cotterpinn, felryn, gelflyng, & henson)
                      i am an angry spork-flinging plaid wildebeest!
                      crimson fist ~*~*~ tholuxe paells
                      etitameh@crimson-fist.org

                      Comment


                      • #41
                        Originally posted by Itek
                        true, but you have to zone in/zone out to "unhide" already hidden corpses if I remember right... but i've never used the command so I could certainly be wrong (succoring inside the zone would probably work too for the druids/wizards doing massive AE slaughters)
                        You don't. At least the other week when I was slaughtering some kobolds for spring water I forgot to loot one water, and of course the corpse hid itself. One /hidecorpse none later and all the poor dead doggies appeared without any zoning.

                        Comment


                        • #42
                          hmm... I seem to remember when you DID have to zone to unhide corpses ... of course that was... a long time ago ... (pre-december 2001 iirc)

                          since i've never turned it on, i've never needed to turn it off
                          In My (Not Always) Humble Opinion, except where I quote someone. If I don't know I say so.
                          I suck at this game, your mileage WILL vary. My path is probably NON-optimal.
                          Private Messages attended to promptly.

                          Comment


                          • #43
                            Originally posted by Eleena Transient
                            Are you sure you want to destroy all the items on a_crag_spider's corpse?

                            "of course I want to loot all items, why do you think I hit the button"

                            DOH

                            Message boxes become another mindless click once you get it the habit, to the point you don't read them. If you were naked at bind, and someone popped a "translocate karana" box, you'd click it without thinking b/c you expect it to be a rez.
                            Reminds me of something I once did...

                            C:\WINDOWS\> dir a:

                            Long directory listing follows. I determine that the files on the disk are worthless.

                            C:\WINDOWS\> del *.*
                            All files in the directory will be deleted!
                            Are you sure (Y/N)?y


                            Duh, I wouldn't have said to delete them if I didn't want to. Why do you waste my time?

                            C:\WINDOWS\>

                            oh...
                            [65 Arch Convoker] Master Trezark S`Dious (Dark Elf) <Walkers>

                            Comment

                            Working...
                            X