diff --git a/Competitive Coding/Dynamic Programming/Edit Distance/readme.md b/Competitive Coding/Dynamic Programming/Edit Distance/readme.md new file mode 100644 index 000000000..29760025e --- /dev/null +++ b/Competitive Coding/Dynamic Programming/Edit Distance/readme.md @@ -0,0 +1,16 @@ +## Edit distance + Edit distance is a way of quantifying how dissimilar two strings (e.g., words) are to one another by counting the minimum number of operations required to transform one string into the other. + +![](http://www.ideserve.co.in/learn/img/editDistance_0.gif) + + Given two strings a and b on an alphabet Σ, the edit distance d(a, b) is the minimum-weight series of edit operations that transforms a into b. +* Insertion of a single symbol. If a = uv, then inserting the symbol x produces uxv. This can also be denoted ε→x, using ε to denote the empty string. +* Deletion of a single symbol changes uxv to uv (x→ε). +* Substitution of a single symbol x for a symbol y ≠ x changes uxv to uyv (x→y). + + +#### Applications +* Computational biology and natural language processing, e.g. the correction of spelling mistakes or OCR errors +* Approximate string matching, where the objective is to find matches for short strings in many longer texts, in situations where a small number of differences is to be expected. + +[More info](https://en.wikipedia.org/wiki/Edit_distance) diff --git a/Competitive Coding/Graphs/Shortest Path/Bellman Ford/Bellman-Ford_readme.md b/Competitive Coding/Graphs/Shortest Path/Bellman Ford/readme.md similarity index 66% rename from Competitive Coding/Graphs/Shortest Path/Bellman Ford/Bellman-Ford_readme.md rename to Competitive Coding/Graphs/Shortest Path/Bellman Ford/readme.md index 21fea890d..1934049a2 100644 --- a/Competitive Coding/Graphs/Shortest Path/Bellman Ford/Bellman-Ford_readme.md +++ b/Competitive Coding/Graphs/Shortest Path/Bellman Ford/readme.md @@ -1,7 +1,13 @@ -Bellman Ford Algorithm:- +## Bellman Ford Algorithm -Description:- +#### Description This is a dynamic programming based algorithm, this algorithm gives shortest distance from a particular source in a graph to all its other vertices. -Working:- +--------- +![](http://users.informatik.uni-halle.de/~jopsi/dssea/bellman_ford.gif) + +----------- +#### Working We initialize the distance of source as '0' and all other vertices as 'INFINITE'. Now if the number of vertices in a graph is 'V' , then all the vertices are processed 'V-1' times, at each iteration for an edge 'uv' if 'dist[v]>dist[u]+weight of uv' , then update dist[v]=dist[u]+weight of uv. + +[More info](https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm) diff --git a/Security Algorithms/Cryptography/RSA Algortihm/README.md b/Security Algorithms/Cryptography/RSA Algortihm/README.md new file mode 100644 index 000000000..43bbd62b6 --- /dev/null +++ b/Security Algorithms/Cryptography/RSA Algortihm/README.md @@ -0,0 +1,17 @@ +## RSA + One of the first public-key cryptosystems and is widely used for secure data transmission. In such a cryptosystem, the encryption key is public and it is different from the decryption key which is kept secret (private). In RSA, this asymmetry is based on the practical difficulty of the factorization of the product of two large prime numbers, the **factoring problem**. + +#### Designers +Ron Rivest, Adi Shamir, and Leonard Adleman + +--------------- + +![](https://globlib4u.files.wordpress.com/2013/10/image1_e.gif) +-------------- +#### Operation + +A basic principle behind RSA is the observation that it is practical to find three very large positive integers e, d and n such that with modular exponentiation for all integer m (with 0 ≤ m < n): +** (m^e)^d ~ m mod n ** +and that even knowing e and n or even m it can be extremely difficult to find d. + +[More info](https://en.wikipedia.org/wiki/RSA_(cryptosystem))