luni, 13 ianuarie 2014

Science and Engineering with VB6

Download: Markov Chain Exploration


Here I am uploading a VB6 application which shows a Markov chain example (this is update # 9, the package contains version 1, 2 and 3). The application can be used for weather prediction and other various experiments related to probabilities. The mathematics used in this program can be found here: [http://en.wikipedia.org/wiki/Examples_of_Markov_chains]. The "Markov chain" inventor was Andrei A. Markov, a famous Russian mathematician and a disciple of the renowned Pafnuty Lvovich Chebyshev (after which the famous inequality is named). Markov graduated from St. Petersburg University in 1878, and at the age of 30, he became a professor of the same university and a member of the St. Petersburg Academy of Sciences. He published over 120 scientific papers on number theory, continued fraction theory, differential equations, probability, and statistics. His classical book, “Calculus of Probabilities”, was published four times in Russian and was translated into German. Many of his papers were devoted to creating a new field of research, Markov chains. The solution of many fundamental problems of modern science and technology would not be possible without his contributions. Markov’s work in this area was mainly motivated by his efforts to extend the laws of large numbers and central limit theorem to dependent sequences, which was believed to be an impossible goal the time. In 1923, Norbert Wiener became the first to treat rigorously a continuous time Markov process, and the foundation of a general theory followed suite during the 1930’s with the pioneering work of Andrei Kolmogorov. It is fitting that these mathematical objects bear Markov’s name, acknowledging his trailblazing role in the development of processes that exhibit the Markov property. In fact, as early as 1926, just twenty years after his initial discoveries, a paper by the Russian mathematician S. N. Bernstein used the phrase “Markov chain”. Markov was also interested in poetry and he made studies of poetic style. He had a son of the same name) who was born on September 9, 1903 and who followed his father to also become himself a renowned mathematician. Markov was born on 14 June 1856 in Ryazan, Russia, and died on 20 July 1922 in Petrograd (now St. Petersburg), Russia (the application has been written by Dr. Paul Gagniuc).





Download: Big Genetic Algorithm


This is a complete Genetic Algorithm Class full with all the features you will ever need. If you are new to Genetic Algorithms you will find extensive documentation (both in code and in separate textfiles) to help you understand what it is and how it works. Just run the examples and make out for youself if you want to learn more. You can use this class in your own projects to help you solve many kinds of problems. I provide 5 different examples to help you on your way. These examples are : - find the values in a formula - draw the biggest circle - fill a 3x3 grid so that rows and columns have the same sum - 0/1 knapsack problem - And of course : The traveling salesman All examples are kept simple and have their own explanation-textfiles. The list of features : (don't worry if you don't understand this at first, full explanation is provided in code and in separate textfiles) Supported encoding types : Binary, Alphabetic, Long integer and Double (real numbers) Selection methods : Rank, Roulette Wheel or Tournament Crossover methods : One point, Two point, Uniform, Half-uniform or Edge recombination Mutation : can be Fixed or Adaptive, numerical encoding can have mutation happen the usual way it's done with numbers, or bit-like Reproduction methods : Replace weakest, replace parents or replace random. Two Social disasters : Judgement Day or Packing Also supports : Random-Offspring generation, Crossover and mutation on full-gene or anywhere in a gene (and this for all encoding types !!) Let the class create it's own population or provide your own... All these settings are easy to modify using the GA-control panel and can be saved/loaded from a file. Complete statistics can be kept during the generation cycles and saved to a file. The only thing you need to do is choose an encoding type and provide a fitness function, my class does the rest. I am open to questions, suggestions, remarks and constructive critisism. Thierry email : thierry.van.mol@hotmail.com







Download: FIR filters and convolution

This demo shows how to compute a low/highpass FIR filter and use it on a time-domain signal trough convolution. It also shows frequency spectrum of the filter kernel and the filtered signal.