Skip to main content

Coding and Mathematics ( Importance Of Maths In Programming )

Everyone wants to become a good coder but only a few manage to achieve this you know why?
BECAUSE everyone wants to code and no one really wants to be a good mathematician which is the basic requirement to be a coder, yet very few know this fact and try to be a mathematician first than a coder.

What exactly is coding?
It is the process of solving different technical problems using a programming language. The technical problems can vary from printing a simple "Hello World" program to solving "2 SAT Problem" using mathematics.

You might today be able to solve a few problems using your technical skills but it would help you in the long run only if you're fundamentals of mathematics are also clear.
By mathematics, I don't mean the whole of it but some important topics such as Discrete Math, Algebra, Number Theory, etc.

Here are some concepts of mathematics that you will use mostly in solving the technical problems :


  • Fundamentals
    • Binary Exponentiation
    • Euclidean algorithm for computing the greatest common divisor
    • Extended Euclidean Algorithm
    • Linear Diophantine Equations
    • Fibonacci Numbers
  • Prime numbers
    • Sieve of Eratosthenes
    • Sieve of Eratosthenes With Linear Time Complexity
    • Primality tests
    • Integer factorization
  • Number-theoretic functions
    • Euler's totient function
    • Number of divisors/sum of divisors
    • Discrete Log
    • Primitive Root
    • Discrete Root
    • Montgomery Multiplication
  • Number systems
    • Balanced Ternary
    • Gray code
  • Modular arithmetic
    • Modular Inverse
    • Linear Congruence Equation
    • Chinese Remainder Theorem
    • Factorial modulo
    So, it won't be wrong to say that both Programming and Mathematics go on Parallelly.
  • Without mathematics, you may understand the code for a moment, and then you may cram it but you'll be only able to optimize it and recreate it when you know the flow of code and what exactly is happening in the code. Mathematics is a key tool that would enable you to do the same. So practice mathematics and be a great coder.
    Go through the above topics as they are of utmost importance to all the coders.
    Happy Coding !!!

    Comments

    Post a Comment

    Your Feedback Will Help Us To Improve...

    Most Popular Posts

    On Which Coding Platform Should I Practice?

    Which is the best online platform to practice, how to improve my coding skills? This post is all about giving answers to all such questions. If you're a beginner who has got no idea what programming is then I would recommend you step by step practice any programming language on Hackerrank. Hackerrank has modules that are self-explanatory and would slowly make you understand all the terminologies which are generally used and with practice, you'll be better at it. Moreover, if you're still not able to understand anything you can always search for your answers on GeekForGeeks or HackerEarth both of them provide one of the best tutorials on any topic. If you're an intermediate who's comfortable with any programming language then you can always improve your problem-solving skills studying Data Structures and Algorithms and practicing it. You can also improve by competitive coding. The best place to start with competitive programming according to me would be ...

    Symmetric and Identical Trees

    In this blog, we're going to cover Symmetric Tree and Identical Tree problems. These are quite similar problems, in the Symmetric tree we are provided with a single tree, but for checking identical trees we're provided two trees. What is a Symmetric Tree? A tree is called symmetric if it contains a mirror image of itself when divided from the center(root). This means that the left portion of the tree should be symmetric to the right portion of the tree. Example of a Symmetric Tree: What are Identical Trees? Two trees are said to be identical when they have the same data and the arrangement of data is also the same in them. Example of Identical Trees: In symmetric trees, the left portion of the tree is compared to the right portion of the tree. Whereas in the case of identical trees the left portion of one tree is compared with the left portion of another tree similarly, the right portion of one tree is compared with the right portion of another tree. Implementation Symmetric Tr...