Omri
My Algorithms
-
Visual Cryptography
Simple implementation of the visual cryptography scheme based on Moni Naor and Adi Shamir, Visual Cryptography, EUROCRYPT 1994, pp1–12. This technique allows visual information like pictures to be encrypted so that decryption can be done visually.
The code outputs two files. Try printing them on two separate transparencies and putting them one on top of the other to see the hidden message.
-
RLE - Run Length Encoding (Matlab)
A Matlab implementation of RLE (Run Length Encoding) demonstration that takes a string and compresses it.
Works well when long sequences of the same letter appear in the string.
-
LBP - Local Binary Patterns texture operator
Implementation of Local Binary Pattern (LBP), a simple but very efficient texture operator which labels the pixels of an image by thresholding the neighborhood of each pixel with the value of the center pixel. It considers the result as a binary number.
LBP texture operator has become a popular approach in various applications. It can be seen as a unifying approach to the traditionally divergent statistical and structural models of texture analysis.
LBP operator is robust to monotonic gray scale changes caused by illumination variations, etc.
-
Collatz conjecture (Ulam conjecture, Kakutani's problem, wondrous numbers)
The graph of the unsolved Collatz conjecture.
The conjecture is also known as the 3n + 1 conjecture, the Ulam conjecture (after Stanisław Ulam), Kakutani's problem (after Shizuo Kakutani), Thwaites conjecture (after Sir Bryan Thwaites), Hasse's algorithm (after Helmut Hasse) or the Syracuse problem;
The sequence of numbers involved is referred to as the hailstone sequence or hailstone numbers, or as wondrous numbers.
-
Merge Sort demo in Python
Merge sort tutorial in python. Most lines are documented.
-
Merge Sort O(n log n)
Merge sort is an O(n log n) comparison-based sort algorithm. In most implementations it is stable, meaning that it preserves the input order of equal elements in the sorted output. The algorithm uses the a divide and conquer algorithmic paradigm.
Invented by John von Neumann in 1945.
-
Conway's game of life
Simple Matlab implementation of Conway's game of life.
-
Mandelbrot Fractal in Matlab
Mandelbrot fractal calculated in simple Matlab code. Feel free to make the code better.
-
-
IBP Super Resolution
IBP (Iterative Back Projection) Super Resolution example Matlab code for demonstrations. Good as a first example.
-
Longest common subsequence problem - Python
The longest common subsequence problem in Python. Find the longest subsequence for two strings.
An example: LCSubstr_len("abab", "aabb")
Maximal length = 2 LCS string = (['ab'])
-
Longest common subsequence problem
Longest common subsequence (LCS) problem: Find the longest subsequence common to all sequences in a set of two sequences. It is a classic computer science problem, the basis of diff (a file comparison program that outputs the differences between two files), and has applications in bioinformatics.
Example: take two strings a = 'aabbab' b = 'bbaa'
Their LCS is the string 'bba' and it's length is 3.
-
0-1 Knapsack Problem in Matlab
Simple Matlab code for the 0-1 Knapsack problem: "Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than a given limit and the total value is as large as possible"
-
Counting Coins Algorithm - Greedy vs. Dynamic Programming
Counting Coins Algorithm: Dynamic Programming to find the minimum number of coins to make any amount.
A greedy method would not work in many cases (where you wouldn't have a 5 cent coin and you wanted to make 31 cents, for example). This is also shown in the file.
Heavily documented.
-
LSB simple & documented watermarking algorithm
A simple novice watermarking algorithm that uses the LSB (Least significant bit) of a gray image to store a binary (black and white) secret image.
-
2D (two dimentional) fourier transform
Nice readable and heavily commented example of the 2-D Fourier transform. Not an FFT (Fast Fourier Transform). Great as a tutorial.
-
1D (one dimentional) fourier transform
Nice readable and commented example of a 1-D Fourier transform. Not an FFT (Fast Fourier Transform).
-
Selection Sort - О(n²)
Selection sort is an in-place comparison sort algorithm. It is inefficient and performs worse than many other sorting algorithms like merge sort. Nevertheless, it is very simple and can be used for sorting small amounts of data.
-
Error diffusion - Floyd-Steinberg dithering
Error diffusion - Floyd-Steinberg dithering algorithm with error 2D diffusion.
Well documented. Matlab 7
My Algorithm Requests
-
Artificial Neural Network Algorithm
Looking for a C# implementation of a basic neural network algorithm.
Request -
Canny edge detection
Looking for a fast and open implementation of the Canny Edge Detector algorithm.
Request
User login
Search
Search categories
Tags
- sort (11)
- Sorting (11)
- Data Structure (9)
- Graph Theory (9)
- Graphs (9)
- Image Processing (7)
- Dynamic Programming (6)
- Filtering (4)
- Compression (3)
- Data Compression (3)
- more...
Content type
- Algorithm (90)
- Algorithm Request (24)

