Why study algorithm and data structure

Why study algorithm and data structure

Why study algorithm and data structure

Many young programmers scour the web trying to find answers to this question: How to study algorithm and Data structure? Certainly, a good place to start... But I believe a more relevant question would be this: What are algorithms and data structures, and why should I study them?

Let’s start with this motivating quote: “Every program depends on algorithms and data structures, but few programs depend on the invention of brand new ones.” -- Kernighan & Pike

What is an algorithm?

Wikipedia says “an algorithm is a self-contained step-by-step set of operations to be performed. Algorithms perform the calculation, data processing, and/or automated reasoning tasks.”

You’d be surprised that there are still some of us who could be tripping on words while trying to explain algorithms, data structures, and their importance. Simply put, whether you are cooking a burger or adding two numbers, there’s an algorithm working its magic there. From monitoring stock markets to oil crises to determining crop yield to pairing soul mates, algorithms are omnipresent.

One definition from the Internet is this: An algorithm is a detailed step-by-step instruction set or formula for solving a problem or completing a task. You need to tell your computer what task to perform, right? You need algorithms or specific computational procedures to achieve the input–output relationship. Repetition, sequencing, and conditional logic or decision are computational concepts that manifest in your everyday life. Your morning routine can be an algorithm. Can you guess how?

Read Also:
AI Is Better Than Us At Monitoring Images And Video

There’s this great TEDEd cartoonby Harvard computer scientist David J. Malan you should see.

Algorithms are much more than instructions. It doesn’t matter if you call them algorithms or programming basics, what matters is that they teach you to define clear steps and conceptualize solutions in terms of distinct steps in a process.

As we are computer science-mad people, I should do some fancy talking about a few algorithm types. Shopping for the prom dress, investing in stocks, or driving to the mall, you are using thegreedy algorithm. In the hope of finding a global optimum, you find the locally optimum choice at each stage (Wikipedia). I beg your pardon? (Say it with a Brit accent, if you please. I love it.)

If you know the famoustraveling salesman problem in computational mathematics, then you’ll know how you can apply to delivering meals to homebound people.

Readthis articleabout a two-year project led by Prof. William Cook from the University of Waterloo, Canada. His math team added new dimensions to the TSP; they calculated the shortest distance possible to get to almost 25,000 pubs in the UK using Google Maps. The route is circular, with the longest distance being 50 hours and the average distance being an hour. If you want to go to each pub on this list, get ready for 28,270 miles.

Read Also:
5 Ways Cloud Vendors are Dealing with Data Privacy Concerns

Like Cook said: “We did not set out to improve the lot of a wandering pub aficionado.” But I guess they did just the same!

It is all about forgetting future consequences and taking the best you can this minute. This I understand! What approach would you use to find a name in a phonebook?Thebrute-force algorithm.

On a good day, you go through the zillion names and find it quickly, that is, trying all possibilities till you get a solution that is good enough. A criminal can use the brute-force method, which is a trial-and-error approach, to crack data that is encrypted. This one doesn’t work so well if the complexity (size) of the problem increases.

Do you recall in the late 90s IBM’s Deep Blue used brute force methods to defeat the then reigning chess champion, Garry Kasparov? We have moved on and computational abilities have progressed beyond belief.

You havedata compression algorithmsusing mp3 to JPEG to Zip that reduce the file size by saving oodles of time and space.Huffmanis a widely used one; most repeating bytes represent the least number of bits.

Read Also:
What Exactly is Data Stewardship and Why Do You Need It?

 



HR & Workforce Analytics Summit 2017 San Francisco

19
Jun
2017
HR & Workforce Analytics Summit 2017 San Francisco

$200 off with code DATA200

Read Also:
Good models + Bad data = Bad analysis

M.I.E. SUMMIT BERLIN 2017

20
Jun
2017
M.I.E. SUMMIT BERLIN 2017

15% off with code 7databe

Read Also:
4 emerging technologies that will drive digital businesses

Sentiment Analysis Symposium

27
Jun
2017
Sentiment Analysis Symposium

15% off with code 7WDATA

Read Also:
Understanding Machine Learning

Data Analytics and Behavioural Science Applied to Retail and Consumer Markets

28
Jun
2017
Data Analytics and Behavioural Science Applied to Retail and Consumer Markets

15% off with code 7WDATA

Read Also:
10 big investment ideas for 2016 #business #intelligence #software – Business

AI, Machine Learning and Sentiment Analysis Applied to Finance

28
Jun
2017
AI, Machine Learning and Sentiment Analysis Applied to Finance

15% off with code 7WDATA

Read Also:
Analytics 3.0 and Data-Driven Transformation

Leave a Reply

Your email address will not be published. Required fields are marked *