C Algorithms

This is a discussion on C Algorithms within the C Programming forums, part of the General Programming Boards category; I had heard of a C programmer that invested in a book on C algorithms. Do you think this is ...

  1. #1
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584

    C Algorithms

    I had heard of a C programmer that invested in a book on C algorithms. Do you think this is a wise investment? Will this help programming in C and make it better? What kind of algorithms would those be? Thanks...

    --Garfield
    1978 Silver Anniversary Corvette

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    Well, it depends on what you want to do.

    I'd recommend everyone learn about data structures, as they are applicable to all types of computing.

    You can buy books of many different varieties of algorithms. It all depends on what your goal is.

    At the moment, I have a book on Neural Network programming I'm working from, as part of a 500-level college course. The book contains many algorithms for how a neuron learns -- as the programmer, I decide what kind of model to apply, and what pieces of data to apply it upon, and I look up the algorithms that the model I choose uses.

    An algorithm is nothing more that a series of steps, which are clearly defined enough for a computer to follow, that will allow you to realize a desired output. People do long studies to try to figure out good algorithms -- as the programmer, why reinvent the wheel? Take the tools that other people have given you (for example, algorithms to fit an N-order polynomial to a given dataset, algorithms to invert an NxN matrix, etc) and apply them intelligently.

    If every programmer had to rediscover the algorithms they use, we'd never get anything done.

    A lot of the literature you should own depends on your skill level, and the types of programming you do. Certain kinds of programming, especially in math-intensive areas, is hugely dependant on algorithms, and which algorithm you choose for a problem may have HUGE impacts on speed of execution, precision of output, and memory required. For these areas, you SHOULD buy literature, you should do research, etc. But the average user will never need to know, for example, that the optimal weights for ECL batch learning by least squares is equal to the product of the inverse of the time-averaged variance-covariance matrix and the time-averaged cross-correlation vector. You, probably, will never use that algorithm. I have, and will most certainly need it again before the semester is over.

    As a general rule, a few kinds of books or courses are good for ANYONE:
    1) Object-Oriented Programming -- if you use C++, this is a must to learn.
    2) Data Structures -- arrays, linked lists, binary trees, perhaps octrees. Good stuff to make all programmers manage data.
    3) Basic Algorithmic Optimization -- it's not necessary to memorize specific algorithms, necessarily, but it's good to know what people mean when they say something is O(N^2) instead of O(N), for example, and more importantly, to know what this means in regards to a problem you have. Often this will be taught WITH data structures, as they are, to a degree, interrelated.

    Bottom line: Everyone needs to know SOME algorithms of some kind, because they are the heart and soul of computation. But which ones you learn is highly dependant on which ones you need.

  3. #3
    aurė entuluva! mithrandir's Avatar
    Join Date
    Aug 2001
    Posts
    1,209
    Yes go for it - try searching for Knuth's "The Art of Computer Programming" Volumes 1-3(from amazon). Yeah it's probably little a bit heavy for you to take in, but I would serioulsy suggest that you do try to read up on Algorithms as much as possible (after you've got a firm grip on c/c++). Data Structures too are a major area of programming.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting algorithms, worst-case input
    By Leftos in forum C++ Programming
    Replies: 17
    Last Post: 06-15-2009, 01:33 PM
  2. Algorithms and data structures book?
    By Lechx in forum C++ Programming
    Replies: 6
    Last Post: 09-30-2008, 09:05 PM
  3. algorithms
    By ElastoManiac in forum C++ Programming
    Replies: 7
    Last Post: 04-28-2006, 04:45 AM
  4. relative strength of encryption algorithms (blowfish, des, rinjdael...)
    By duck-billed platypus in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-30-2001, 03:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21