. .

Posts by: Tamás Bolner

0

Algebraic formulas and matrix symmetry

pic01

This post features two examples of algebraic manipulation and their relation to the symmetry of the matrices representing the expressions. The algebraic expressions we investigate are quadratic, multivariate and can be written in the matrix form:

0

Two chromatic chord progressions

Two chromatic chord progressions

While most diatonic chord progressions are based on the relations of the roots, some chromatic progressions can be thought as movements of voices. 1. If we have a minor triad in root position, and we move the 1st down and the 5th up by a semitone, then we get a minor triad in 6/3 position, and the root of the new chord is below the old one by a major third. Let`s see an example in D minor. The chords are: Dm, Bbm, F#m, Dm. The semitone movements are repeated 3 times, to get back to Dm, because 3×4 =

0

Graph editor and Matrix generator

Graph editor and Matrix generator

Making matrix representations of graphs always takes a lot of time. For practicing algebraic or spectral graph theory on computer algebra systems, one has to create a lot of graphs. A handy tool can make this easy, which allows to draw graphs and generate code e.g. for Maple with one click. Well I couldn’t find a tool like that, so I made one on the weekend in C#. With it, you can draw custom graphs, including: arbitrary loops, parallel edges, directed edges, etc. and can generate code for these computer algebra systems: Maple, MATLAB, Maxima. Then the code can be

0

Exception class with printf-like parameters for C++

When raising exceptions it is good to make their error texts as detailed as possible. Usually this isn’t an easy task, cause it involves type conversions and string operations. This is why I’ve implemented this class, which can be instantiated by printf-like parameters as easily as this line: throw(new FException("Invalid tag: ‘%s’. At line: %d.", tag, line));

0

Deadlocks and graph theory

thumb

When accessing a database through a series of transactions, a deadlock can occur any time. They are natural companions of transactions. We can decrease their likelihood by rigorously  accessing the records and the tables always in the same order, but over a level of complexity we can never be 100% free of them. This is a fair price for the ACID properties. Deadlocks occur very rarely,  and when this happens, the only thing to do is to repeat the transaction in the process which had been interrupted by the deadlock detection demon of the database. This is very small performance

0

When will quantity turn into quality?

When will quantity turn into quality?

Final position of the one and only Botvinnik – Fischer game (1962). Click on the image to enlarge. Analyzed the position with the 64 bit Rybka 3, and even after the depth of 39 moves it still can’t see that this is a draw. I wonder how many moves would reveal this draw for a chess program. It is really hard to estimate. The program tries every variation without repeating a position 3 times – because that means draw by the laws – and without any exchange, because that would also lead to draw in this situation, if white keeps

,
0

An interesting proof of Turán’s theorem

prof_turan

In the past few days I have been reading a nice book about graph theory, including solving the exercises in it. Once I encountered an exercise which I couldn’t solve, so made a little research, and found that the solution is the proof of the Turán’s theorem. The usual proof for this theorem is built on induction, but later I have found a proof which is using a basic inequality. I am sure that I’m not the first one who have seen this solution, although I couldn’t find it on the net yet.

0

SDL TTF for x64 as static library

SDL TTF for x64 as static library

I compiled a static, 64 bit version of the Simple DirectMedia Layer library last Christmas, plus the sdl_ttf and the Freetype library. Now these can be downloded here in this zip file:  

0

Threading events and Intel Building Blocks

The Intel Threading Building Blocks library (TBB) is a useful cross-platform C++ library, which contains many high and low level tools for developing multi-threaded applications. One feature I required but couldn’t find in TBB is a class similar to AutoResetEvent in the .NET framework. That class allows simple synchronization of two threads. One of them is waiting the event to be triggered, while the other triggers the event at a point. I have implemented this class in C++, using atomic operations from TBB, which guaranties that if the two threads are running on different cores, then their caches get synced

0

SharpMIDI

SharpMIDI is an easy to use library for .NET 3.5, written in C# and C++, which allows to use MIDI playback and device query functions on 32 and 64 bit (AMD64) Windows systems.