# How to learn algorithm design and analysis

### Learning algorithm analysis and design need those foundations (whether you need to learn discrete mathematics and linear algebra)

Algorithm analysis and design, the current domestic undergraduate and master’s textbooks seem to be translated from abroad. It sounds quite complicated, if simple to grasp and use or not difficult, most of the content in the data structure are involved, the actual programming is also used more, the difficulty lies in the theoretical study of algorithms, such as the 21st century, one of the seven problems of the NP problem is an algorithmic problem (involves the problem of logical satisfiability).

Simply put, the foundation of the need for the following categories:

1, the basic category (relative to the general undergraduate): (1) to learn the data structure of the algorithm will not be difficult, and the data structure is in fact the use of graph theory, if non-mathematics majors can look at the part of the graph theory of discrete mathematics. (2) Algorithm analysis design time and space complexity calculation, commonly used or Mao’s strategic thinking – space for time. So learn simple order of magnitude operations, involving some knowledge of algebraic formulas and number theory. Just a simple mastery of arithmetic is enough, no need to go deeper.

2, improve the type (graduate level): graph theory, combinatorial mathematics, mathematical logic to specialize in learning, you can use the undergraduate mathematics department of graph theory, combinatorial mathematics, mathematical logic, and other specialized courses in the textbook. Which combinatorial design in combinatorial mathematics to a certain extent and algorithmic design have similarities.

3, research (professional research): this mainly depends on their own research direction, if the research ability is strong, then you can in a very short period of time can be encountered in the mathematical knowledge, there is no ready-made fixed mode. Among them, such as the study of NP problems, need very deep knowledge of logic and number theory foundation. But no matter which research direction, mathematical meticulous thinking and reasoning ability is necessary, which can not be practiced overnight, need a long time to exercise.

The above is just a little bit of personal experience, just for reference.

### What is taught in the Algorithm Analysis and Design course?

The course “Algorithm Analysis and Design” is a professional course that emphasizes both theory and application. This course takes the algorithm design strategy as the knowledge unit, systematically introduces the design method and analysis skill of computer algorithm. The main contents of the course teaching include: Chapter 1, Algorithm Overview; Chapter 2, Recursive and Partitioning Strategies; Chapter 3, Dynamic Programming; Chapter 4, Greedy Algorithm; Chapter 5, Backtracking Method; Chapter 6, Branch-and-Bound Method. Through the introduction of classic as well as practical algorithms, students can master the basic methods of algorithm design. Combined with the analysis of examples, students can deeply understand the skills of algorithm design, as well as the ability to analyze algorithms.

### Algorithm design and analysis of which two steps are needed in the inductive method

Summary of the steps of algorithm design

Figure out the meaning of the topic, list the inputs, outputs, constraints of the topic

Think about how to make the algorithm as small as possible in terms of time complexity

Write pseudo-code or code

Inductive thinking

It is from a special case Starting from

Reasoning to general conclusions

Should be given enough attention as an important thinking in data analysis.

Expansion: Introducing five methods of induction, namely: the method of seeking the same, the method of seeking the different, the method of sharing, the method of common variation and the method of residual, in fact, these methods as early as in ancient times, and then Bacon in the book of the “New Tools” in the generalization and generalization, and finally by Muller to systematically organize and illustrate, and is therefore usually referred to as the “Muller Five Methods”.

### What course should I take just before learning Algorithm Design and Analysis?

First, learn a programming language, C++ is recommended.

Secondly, learn data structures.

### Please, how to learn data structures and algorithms JAVA language in a step by step manner?

1. “I want to learn basic data structures and algorithms!”

Without further ado, read on if you have the heart for it.

2. “What should I prepare for?”

a. This orange book: “Algorithms, 4th Edition”

–Amazon Chinese version: amazon.cn’s page

–Online resources: Algorithms,4thEditionbyRobertSedgewickandKevinWayne

b. Sign up for Coursera and join these 2 courses in order:<Algorithms,1stPart><Algorithms,2ndPart>

Part1:https://www.coursera.org/course/algs4partI

Part2:https://class. coursera.org/algs4partII-006

If the class is not in session, mark it so that you will be alerted by email when it starts.

3. “What should I do?”

First, familiarize yourself with 1.1 and 1.2 of the book, and preferably do all the exercises in the back of the class. From Part1 to Part2, keep up, keep up, keep up!

For more information on doing the exercises in the back of the book, see:

4. “I’m done!”

And then go next door to Stanford’s Open Algorithms class, he also gave a certificate! Because the reference book is basically “CLRS”, so that is to force themselves to carefully study the introduction to algorithms.

—-course name:

<Algorithm Design and Analysis, Part 1>

<Algorithm Design and Analysis, Part 2>