I'm studying the algorithms and couldn't figure out how to write mergesort algoritm in solidity, is there any gas efficient way
Related
I have tried a few backtracking algorithms and successfully converted them to dynamic programming by applying the concept of memoization.
Is it possible to convert every backtracking algorithm to dynamic programming?
If dynamic programming is so much efficient than backtracking, why we still use backtracking?
I try to find or learn what a division algorithm use NTL(Number Theory Library), and complexity of this algorithm. (need algorithms in GF2X module and ZZ)
The implementation of these functions is a lot of code that is difficult to understand what is going in the algorithm.
Has anyone uses NTL? Maybe someone knows standart division and remainder algorithms and their comlexity from number theory and can help?
I can copy-paste listing of some functions.
How to implement the incremental linear programming algorithm for 2-Dimension?
I am looking for implementation details of incremental algorithm of linear programming in 2-D. I am trying to work on red-blue point separation.
There is an algorithm for triangulating a polygon in linear time due to Chazelle (1991), but, AFAIK, there aren't any standard implementations of his algorithm in general mathematical software libraries.
Does anyone know of such an implementation?
See this answer to the question Powerful algorithms too complex to implement:
According to Skiena (author of The Algorithm Design Manual), "[the] algorithm is quite hopeless to implement."
I've looked for an implementation before, but couldn't find one. I think it's safe to assume no-one has implemented it due to its complexity, and I think it also has quite a large constant factor so wouldn't do well against O(n lg n) algorithms that have smaller constant factors.
This is claimed to be an
Implementation of Chazelle's Algorithm for Triangulating a Simple Polygon in Linear Time (mainly C++ and C).
To compute the worst-case running time function of an algorithm what are the steps to be followed? Please some one guide me in that. I think these steps includes some mathematical proof's. If I am correct In which parts of mathematics areas I should be strong? (I guess mathematical Induction,functions, sets are enough)
Thanks
You can find good answers in the following books:
http://www.algorist.com/
"Art of computer programming", Knuth
I think mostly this is: good understanding of the algorithm, combinatorics and computational complexity theory - http://en.wikipedia.org/wiki/Computational_complexity_theory
To learn about computational complexity you need to know Calculus, Combinatorics, Set Theory, Summations amongst other maths topics.
A good book; though fairly theoretical is Introduction To Algorithms by Cormen et. al.