Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Learning Algorithms..

Learning Algorithms..

Scheduled Pinned Locked Moved The Lounge
helpquestionlearning
23 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Monster Maker

    Introduction to Algorithms" not working for me.. any other shallow sources to learn.. or made easy tutorials..!! Please share your experience..how can we learn them effectively!! A confused student..will appreciate your help..

    What? I failed in English! UNPOSSIBLE..

    C Offline
    C Offline
    CPallini
    wrote on last edited by
    #4

    Wirth's classic book[^], is clear and concise (warning: PASCAL inside :rolleyes: ).

    Veni, vidi, vici.

    M OriginalGriffO 2 Replies Last reply
    0
    • M Monster Maker

      I got it, but you can apply anything only after you understand it.. so i was looking for the "reference".. where i can learn about the correct approach of attacking them!

      What? I failed in English! UNPOSSIBLE

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #5

      Monster Maker wrote:

      but you can apply anything only after you understand it

      Nonsense! I can apply a "hello world" program from a book in any programming language without knowing what the heck is going on. Look at a very basic C# program:

      using System;

      namespace MyConsoleApp
      {
      class Program
      {
      static void Main(string[] args)
      {
      Console.WriteLine("Hello World!");
      }
      }
      }

      I don't need to know what the Console class is (or even what a class is) to make it work, and to extend it to do "useful" things. Or what a static method is, or why strings are immutable, or what the different between WriteLine and Write is, or how to enter a double quote in a string, or...you get the idea. The point is that implementing the simple stuff gives you the grounds for understanding it, and the same thing is true of algorithms. Sitting there looking at it and hoping inspiration will strike doesn't help much, certainly in the early days. Trying it out does. As I found out when first meeting the QuickSort algorithm. It's a PITA to work out from the format algorithm what the heck it does and how it does it, but when you try it out on paper a little light bulb lights up over your head (probably rather slowly these days, since they are all energy saving and take a week or so to get bright enough to read by).

      The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      M 1 Reply Last reply
      0
      • C CPallini

        Wirth's classic book[^], is clear and concise (warning: PASCAL inside :rolleyes: ).

        Veni, vidi, vici.

        M Offline
        M Offline
        Monster Maker
        wrote on last edited by
        #6

        Thanks for your concern sir, the book got nice reviews too..something i was looking for..!! and yes..i can handle PASCAL.. :P

        What? I failed in English! UNPOSSIBLE

        1 Reply Last reply
        0
        • C CPallini

          Wirth's classic book[^], is clear and concise (warning: PASCAL inside :rolleyes: ).

          Veni, vidi, vici.

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #7

          Dated, but a real goodie, even in these OOPs days (I suspect he would have written it rather differently now). And a damn sight more readable them Knuth's "The Art of Computer Programming" even if that did go into a lot more detail! :laugh:

          The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          D 1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            Monster Maker wrote:

            but you can apply anything only after you understand it

            Nonsense! I can apply a "hello world" program from a book in any programming language without knowing what the heck is going on. Look at a very basic C# program:

            using System;

            namespace MyConsoleApp
            {
            class Program
            {
            static void Main(string[] args)
            {
            Console.WriteLine("Hello World!");
            }
            }
            }

            I don't need to know what the Console class is (or even what a class is) to make it work, and to extend it to do "useful" things. Or what a static method is, or why strings are immutable, or what the different between WriteLine and Write is, or how to enter a double quote in a string, or...you get the idea. The point is that implementing the simple stuff gives you the grounds for understanding it, and the same thing is true of algorithms. Sitting there looking at it and hoping inspiration will strike doesn't help much, certainly in the early days. Trying it out does. As I found out when first meeting the QuickSort algorithm. It's a PITA to work out from the format algorithm what the heck it does and how it does it, but when you try it out on paper a little light bulb lights up over your head (probably rather slowly these days, since they are all energy saving and take a week or so to get bright enough to read by).

            The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

            M Offline
            M Offline
            Monster Maker
            wrote on last edited by
            #8

            In east we call this implementation..what you are calling applying..!! :P And i know what the hello world program is....were you practicing writing it down again? :D ....anyways i ll follow your approach of dry run.. thanks for your..help!

            What? I failed in English? UNPOSSIBLE

            1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              Use them. The key to understanding anything is applying it. Just looking at an algorithm as text is difficult, actually doing it - even by hand on paper - makes it a lot clearer what is going on.

              The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

              A Offline
              A Offline
              Alicia247
              wrote on last edited by
              #9

              I found this algorithm tutorial and hope that this link can help http://www.topcoder.com/tc?d1=tutorials&d2=alg\_index&module=Static

              1 Reply Last reply
              0
              • OriginalGriffO OriginalGriff

                Dated, but a real goodie, even in these OOPs days (I suspect he would have written it rather differently now). And a damn sight more readable them Knuth's "The Art of Computer Programming" even if that did go into a lot more detail! :laugh:

                The universe is composed of electrons, neutrons, protons and......morons. (ThePhantomUpvoter)

                D Offline
                D Offline
                dusty_dex
                wrote on last edited by
                #10

                OriginalGriff wrote:

                And a damn sight more readable them Knuth's "The Art of Computer Programming"

                Nope, for me AOCP was far easier to digest than any dry academic text on algorithms. Knuth rated sections by difficulty and provides a reading map at the front so you knew which bits can be skipped without discovering later that you missed a vital subject. Another reason to skip Pascal books is that array indexing isn't zero-based as it usually is for C-like languages, which is common parlance in most modern programming languages.

                C D 2 Replies Last reply
                0
                • D dusty_dex

                  OriginalGriff wrote:

                  And a damn sight more readable them Knuth's "The Art of Computer Programming"

                  Nope, for me AOCP was far easier to digest than any dry academic text on algorithms. Knuth rated sections by difficulty and provides a reading map at the front so you knew which bits can be skipped without discovering later that you missed a vital subject. Another reason to skip Pascal books is that array indexing isn't zero-based as it usually is for C-like languages, which is common parlance in most modern programming languages.

                  C Offline
                  C Offline
                  CPallini
                  wrote on last edited by
                  #11

                  dusty_dex wrote:

                  Another reason to skip Pascal books is that array indexing isn't zero-based as it usually is for C-like languages

                  That's should not be a problem for anyone able to read Knuth's books. Moreover one should be used to deal with 1-based indices too, unless he/she really want to miss Lua. :-D

                  Veni, vidi, vici.

                  1 Reply Last reply
                  0
                  • M Monster Maker

                    Introduction to Algorithms" not working for me.. any other shallow sources to learn.. or made easy tutorials..!! Please share your experience..how can we learn them effectively!! A confused student..will appreciate your help..

                    What? I failed in English! UNPOSSIBLE..

                    A Offline
                    A Offline
                    Amarnath S
                    wrote on last edited by
                    #12

                    Just a little "not-so-good" luck with timing. Professor Sedgewick's Algorithms 1[^] and Algorithms II[^] courses are on their last day today. But, stay tuned to the Coursera site - Professor Sedgewick says that he will offer those courses again later this year. One of the best Algorithms courses ever.

                    M 1 Reply Last reply
                    0
                    • M Monster Maker

                      Introduction to Algorithms" not working for me.. any other shallow sources to learn.. or made easy tutorials..!! Please share your experience..how can we learn them effectively!! A confused student..will appreciate your help..

                      What? I failed in English! UNPOSSIBLE..

                      E Offline
                      E Offline
                      Espen Harlinn
                      wrote on last edited by
                      #13

                      Robert Sedgewicks

                      • Algorithms in C++, Parts 1-4: Fundamentals, Data Structure, Sorting, Searching, Third Edition[^]
                      • Algorithms in C++ Part 5: Graph Algorithms[^]

                      Sedgewick writes fairly well - and C++ will show you that some Os are bigger than others. Numerical Recipes 3rd Edition: The Art of Scientific Computing[^] would also be a good investment. You can also get the C++ source code for all of the above books.

                      Monster Maker wrote:

                      how can we learn them effectively

                      By using them to solve real problems. Some of the stuff is easy, some it requires a fair amount of effort. The usual route is to take one step at a time.

                      Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                      M 1 Reply Last reply
                      0
                      • D dusty_dex

                        OriginalGriff wrote:

                        And a damn sight more readable them Knuth's "The Art of Computer Programming"

                        Nope, for me AOCP was far easier to digest than any dry academic text on algorithms. Knuth rated sections by difficulty and provides a reading map at the front so you knew which bits can be skipped without discovering later that you missed a vital subject. Another reason to skip Pascal books is that array indexing isn't zero-based as it usually is for C-like languages, which is common parlance in most modern programming languages.

                        D Offline
                        D Offline
                        Dexterus
                        wrote on last edited by
                        #14

                        Array indexing is completely irrelevant to understanding why and how the little monsters on that printed page to what they say they do when ran by a computer. A very clear/clean language and good writing skills are the best tools. There should be no malloc/objects/elevated language paradigms in learning programming from 0. The hardest thing ever is figuring out why i = i + 1 is allowed.

                        D 1 Reply Last reply
                        0
                        • M Monster Maker

                          Introduction to Algorithms" not working for me.. any other shallow sources to learn.. or made easy tutorials..!! Please share your experience..how can we learn them effectively!! A confused student..will appreciate your help..

                          What? I failed in English! UNPOSSIBLE..

                          R Offline
                          R Offline
                          Ranjan D
                          wrote on last edited by
                          #15

                          Here's one I found out for you http://www.personal.kent.edu/~rmuhamma/Algorithms/algorithm.html[^] It's just for understanding , However you need to implement the same for a better experience :)

                          Ranjan.D

                          M 1 Reply Last reply
                          0
                          • D Dexterus

                            Array indexing is completely irrelevant to understanding why and how the little monsters on that printed page to what they say they do when ran by a computer. A very clear/clean language and good writing skills are the best tools. There should be no malloc/objects/elevated language paradigms in learning programming from 0. The hardest thing ever is figuring out why i = i + 1 is allowed.

                            D Offline
                            D Offline
                            dusty_dex
                            wrote on last edited by
                            #16

                            I suggested it because habits formed at a fundamental stage of learning new things, are the more difficult ones to let go of. There are plenty of algorithm books in C/C++ too.

                            1 Reply Last reply
                            0
                            • E Espen Harlinn

                              Robert Sedgewicks

                              • Algorithms in C++, Parts 1-4: Fundamentals, Data Structure, Sorting, Searching, Third Edition[^]
                              • Algorithms in C++ Part 5: Graph Algorithms[^]

                              Sedgewick writes fairly well - and C++ will show you that some Os are bigger than others. Numerical Recipes 3rd Edition: The Art of Scientific Computing[^] would also be a good investment. You can also get the C++ source code for all of the above books.

                              Monster Maker wrote:

                              how can we learn them effectively

                              By using them to solve real problems. Some of the stuff is easy, some it requires a fair amount of effort. The usual route is to take one step at a time.

                              Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                              M Offline
                              M Offline
                              Monster Maker
                              wrote on last edited by
                              #17

                              That is the quality answer i was looking for...thanks a lot sir! Do these books include relevant mathematics needed to understand algos.. if not where should i refer?

                              What? I failed in English exam! UNPOSSIBLE

                              E 1 Reply Last reply
                              0
                              • A Amarnath S

                                Just a little "not-so-good" luck with timing. Professor Sedgewick's Algorithms 1[^] and Algorithms II[^] courses are on their last day today. But, stay tuned to the Coursera site - Professor Sedgewick says that he will offer those courses again later this year. One of the best Algorithms courses ever.

                                M Offline
                                M Offline
                                Monster Maker
                                wrote on last edited by
                                #18

                                Ohh no..rightly said..HARD LUCK Will keep looking for courses like this...!!

                                What? I failed in English Exam! UNPOSSIBLE

                                1 Reply Last reply
                                0
                                • R Ranjan D

                                  Here's one I found out for you http://www.personal.kent.edu/~rmuhamma/Algorithms/algorithm.html[^] It's just for understanding , However you need to implement the same for a better experience :)

                                  Ranjan.D

                                  M Offline
                                  M Offline
                                  Monster Maker
                                  wrote on last edited by
                                  #19

                                  Hey, they were..nice. more readable..!! Thanks ranjan..! :)

                                  What? I failed in English Exam! UNPOSSIBLE

                                  1 Reply Last reply
                                  0
                                  • M Monster Maker

                                    That is the quality answer i was looking for...thanks a lot sir! Do these books include relevant mathematics needed to understand algos.. if not where should i refer?

                                    What? I failed in English exam! UNPOSSIBLE

                                    E Offline
                                    E Offline
                                    Espen Harlinn
                                    wrote on last edited by
                                    #20

                                    Monster Maker wrote:

                                    Do these books include relevant mathematics needed to understand algos..

                                    Most of the material is focused on helping the reader understand what actually goes on - you get code where a mathematican would take the time honoured shortcut it can easily be shown ... and skip ahead to what can easily be explained ... I think wikipedia would be a good source for any missing formulaes, like Ford–Fulkerson algorithm[^] - you will certainly learn some of the mathematics, but that is not the primary focus of the books. Good luck, you're in for an interesting journey :thumbsup:

                                    Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                                    M 1 Reply Last reply
                                    0
                                    • E Espen Harlinn

                                      Monster Maker wrote:

                                      Do these books include relevant mathematics needed to understand algos..

                                      Most of the material is focused on helping the reader understand what actually goes on - you get code where a mathematican would take the time honoured shortcut it can easily be shown ... and skip ahead to what can easily be explained ... I think wikipedia would be a good source for any missing formulaes, like Ford–Fulkerson algorithm[^] - you will certainly learn some of the mathematics, but that is not the primary focus of the books. Good luck, you're in for an interesting journey :thumbsup:

                                      Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra

                                      M Offline
                                      M Offline
                                      Monster Maker
                                      wrote on last edited by
                                      #21

                                      Hmm nice..reference!! And thanks for the wishes... as my prime focus would be learning the approach that how we actually form new algorithms.. rather than understanding and applying the old ones!! Stay Excellent!! :)

                                      1010111011

                                      1 Reply Last reply
                                      0
                                      • M Monster Maker

                                        Introduction to Algorithms" not working for me.. any other shallow sources to learn.. or made easy tutorials..!! Please share your experience..how can we learn them effectively!! A confused student..will appreciate your help..

                                        What? I failed in English! UNPOSSIBLE..

                                        A Offline
                                        A Offline
                                        Amarnath S
                                        wrote on last edited by
                                        #22

                                        A free online Algorithms course is starting on 1 July 2013 on Coursera - Algorithms[^]. The teacher is Prof. Tim Roughgarden from Stanford. Seems to be a great course.

                                        M 1 Reply Last reply
                                        0
                                        • A Amarnath S

                                          A free online Algorithms course is starting on 1 July 2013 on Coursera - Algorithms[^]. The teacher is Prof. Tim Roughgarden from Stanford. Seems to be a great course.

                                          M Offline
                                          M Offline
                                          Monster Maker
                                          wrote on last edited by
                                          #23

                                          Thanks for your concern Mr. Amarnath..!! :) :-D :-D :laugh:

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups