Number of vertices (nodes) in a Tree
The number of all vertices in a tree with branching factor "b" and depth "d" is
V = 1 + b2 + b3 +…+ bd-1 = (bd – 1)/(b-1)
The number of edges is E = V -1
The number of all vertices in a tree with branching factor "b" and depth "d" is
V = 1 + b2 + b3 +…+ bd-1 = (bd – 1)/(b-1)
The number of edges is E = V -1
You may need to export a nice chart from Excel to EPS so that you include it in your Latex project. Here is one way how you do it.
1. You need to install Adobe Universal PostScript Windows Driver Installer 1.0.6 (or newer). If you have Vista or Windows 7 or some newer version run the installer with compatibility for Windows XP SP3.
- To set the compatibility for the installer, right click the file and select "Properties". Then from the "Compatibility " tab select "Run this program in compatibility mode for:" and select "Windows XP (Service Pack 3)"

2. Open your Excel File.
3. Select your chart.
4. Select from the (File) menu print
5. Select the Adobe printer in my case this is "Generic PostScript Printer"
6. Ensure that "Select Chart" is the selected option in "Print what" area. If you did not selected the chart then this will option will not be selected. Go to Step 3.
7. Select print to file check box.
8. Go to Properties

9. In the properties dialog window select "Layout" tab then press "Advanced" button

10. In the Advanced properties dialog window, under the node "Postcript options:" select "Encapsulated Postscript (EPS)"

11. In the printer dialogue window, when you press "Print" you will be asked for the file name to be saved. You are not asked ensure that you have selected "Print to file" Step 7. Write the path and the file name something like "c:\chart.ps". If you don't include the full path I don't know where the file will be saved by default.

12. Use ps2eps to convert the saved PS format file into EPS format.
I have just seen one tutorial about using VTune to profile an application. The tutorial covers the different aspects that should be analyzed to understand the performance of the application – including cache misses, thread parallelisim, cache line sharing, cycles per instructions (CPI). The tutorial is available at "Using Intel® VTune™ Performance Analyzer Events/ Ratios & Optimizing Applications".
I have problems in making transitions between the sentences. I have attended one workshop about academic writing by Geoff Jordan. He has given us few exercise and also a table with the different words that we can use for transitions. I have found this table very useful particularly when writing papers. I will post it here hoping it will be useful for somebody else too.
Table of transition phrases for different purposes.
|
Purpose |
Phrase |
|
Illustration |
thus, for example, for instance, namely, to illustrate, in other words, in particular, specifically, such as |
|
Contrast |
on the contrary, contrarily, notwithstanding, but, however, nevertheless, in spite of, in contrast, yet, on the other hand, rather, or, nor, conversely, at the same time, while this may be true |
|
Addition |
and, in addition to, furthermore, moreover, besides, than, too, also, both-and, another, equally important, first, second, etc., again, further, last, finally, not only-but also, last but not least, as well as, in the second place, next, likewise, similarly, in fact, as a result, consequently, in the same way, for example, for instance, however, thus, therefore, otherwise |
|
Time |
after, afterward, before, then, once, next, last, at last, at length, first, second, etc., at first, formerly, rarely, usually, another, finally, soon, meanwhile, at the same time, for a minute, hour, day, etc., during the morning, day, week, etc., generally, in order to, subsequently, previously, in the meantime, immediately, eventually, concurrently, simultaneously |
|
Space |
at the left, at the right, in the center, on the side, along the edge, on top, below, beneath, under, around, above, over, straight ahead, at the top, at the bottom, surrounding, opposite, at the rear, at the front, in the front of, beside, behind, next to, nearby, in the distance, beyond, in the front, in the foreground, within sight, out of sight, across, under, nearer, adjacent, in the background |
|
Concession |
although, at any rate, at least, still, thought, even though, granted that, while it may be true, in spite of, of course |
|
Similarity of comparison |
similarly, likewise, in like fashion, in like manner, analogous to |
|
Emphasis |
above all, indeed, truly, of course, certainly, surely, in fact, really, in truth, again, besides, also, furthermore, in addition |
|
Details |
specifically, especially, in particular, to explain, to list, to enumerate, in detail, namely, including |
|
Examples |
for example, for instance, to illustrate, thus, in other words, as an illustration, in particular |
|
Consequence of result |
so that, with the result that, thus, consequently, hence, accordingly, for this reason, therefore, so, because, since, due to, as a result, in other words, then |
|
Summary |
therefore, finally, last but not least, consequently, thus, in short, in conclusion, in brief, as a result, accordingly |
|
Suggestion |
For this purpose, results suggests that, to this end, with this in mind, whit this purpose in mind, therefore |
One of my favorite quotes: "Luck is what happens when preparation meets opportunity" – Seneca.
This morning my friend handed me an article about luck "Be lucky – it's and easy skill to learn" by Prof. Richard Wiseman. I liked this article a lot and want to share it here.
Prof. Wiseman has studied the luck and what makes people feel lucky or unlucky. Insights from this great work are that people's thoughts and behavior are responsible for their good or bad fortune. He conveys an experiment of more than 400 people that describe themselves as either lucky or unlucky. In this experiment, each person is given a newspaper and asked to count the number of pictures in it. It takes about 2 minutes for the unlucky people to find out that there are 43 pictures, whereas the lucky group finds the number in just few seconds. The reason is that on the second page there is a message written with 2" (5cm) big letter "Stop counting. There are 43 photographs in this newspaper.". The lucky group sees it but the unlucky group misses it.
This experiment reveals that:
"Unlucky people miss chance opportunities because they are too focused on looking for something else. They go to parties intent on finding their perfect partner and so miss opportunities to make good friends. They look through newspapers determined to find certain types of job advertisements and as a result miss other types of jobs. Lucky people are more relaxed and open, and therefore see what is there rather than just what they are looking for."
To see if unlucky people can become lucky, Prof. Wiseman sets another experiment – "Luck School". For one month, participants carry out exercises that would help them increase their skills in spotting opportunities, listen to their intuition, think they are lucky and be more optimistic by trying to find the good in the bad luck. The results from the experiment are positive – unlucky people become lucky and lucky people become luckier. Even one of the participants from the unlucky group, after graduating from the "luck school" successfully passes the driving test after three years of trying.
In this article I will describe how to programmatically translate an instruction address from a Win32 executable to a source line. The described approach uses the Microsoft debugger engine dbgeng.dll. Therefore you should have it installed. If you don’t have it, you can download and install the Windows debugger WinDbg which will install dbgeng.dll.
To use this approach you will need to have installed windows debugger engine – dbgeng.dll. If you don’t have it, install WinDbg debugger. This will install dbgeng.dll
Many debuggers support debugging at source code level. The debugger is capable to provide debugging at the source level by translating instruction addresses to lines in source code files. In our approach we use the same mechanisms that debuggers use. This particular solution, to translate an instruction address to a source line, uses functionality provided by the windows debugger engine dbgeng.dll.
In overview, we create a process from the Win32 executable file from which we want to translate instruction addresses. Then we attach the debugger engine to the created process. To create a process and attach the debugger to it we use CreateProcessAndAttach function. When the debugger is attached, we call function GetLineByOffset to do the actual translation. After we finish with the translation task we terminate the process with the function TerminateCurrentProcess. Besides these procedures there are few more things that are necessary to do which I explain in the implementation.
First we create objects that implement the following COM interfaces: IDebugControl , IDebugClient, IDebugSymbols. To create these objects we use function DebugCreate.
static IDebugClient5 *dbgClient5 = NULL; static IDebugSymbols *dbgSymbols = NULL; static IDebugControl *dbgControl = NULL; ... DebugCreate(__uuidof(IDebugControl), (void**) & dbgControl); DebugCreate(__uuidof(IDebugClient), (void **) & dbgClient5); DebugCreate(__uuidof(IDebugSymbols), (void **) & dbgSymbols);
Before crating the process from the executable we set the debugger engine filters so that the target process breaks into the debugger immediately after it is created. To set the debugger filters we use function SetSpecificFilterParameters.
DEBUG_SPECIFIC_FILTER_PARAMETERS filter[10];
for (int i = 0; i < 10; i++) {
filter[i].ExecutionOption = DEBUG_FILTER_BREAK;
filter[i].ContinueOption = DEBUG_FILTER_GO_HANDLED;
filter[i].TextSize = 0;
filter[i].CommandSize = 0;
filter[i].ArgumentSize = 0;
}
dbgControl->SetSpecificFilterParameters(0, 10, filter);
Using function CreateProcessAndAttach we create a windows debug process and attach the debugger to it.
ULONG64 server = 0; PSTR commandLine = executableName; ULONG processId = 0; ULONG attachFlags = 0; dbgClient5->CreateProcessAndAttach( server, commandLine, DEBUG_PROCESS, processId, attachFlags);
To translate the instruction address to a source line we call function GetLineByOffset.
ULONG64 offset = instrAddress; ULONG fileNameBufferSize = MAX_FILE_NAME_SIZE; memset(sourceInfo->fileName, 0, fileNameBufferSize); sourceInfo->lineNo = 0; sourceInfo->fileSize = 0; sourceInfo->displacement = 0; HRESULT isOk = dbgSymbols->GetLineByOffset( offset, &sourceInfo->lineNo, sourceInfo->fileName, fileNameBufferSize, &sourceInfo->fileSize, &sourceInfo->displacement);
If we want to translate multiple addresses, we have to call function GetLineByOffset multiple times without repeating the earlier operations. After we finish with the translation we detatch the debugger from the process by terminating the process with function TerminateCurrentProcess.
HRESULT isOk = dbgClient5->TerminateCurrentProcess();
The code complete source code is available for download from InstructionToSourceLine.zip. Note that the instruction address provided as input should be a decimal number but not hexadecimal.
There is also a C# implementation of this tool that you can download from InstructionToSourceLineCSharp.zip. This C# implementation consists of 2 parts – DbgEngManaged and InstructionToSourceLineCSharp. DbgEngManaged is a managed c++ library wrapper for the debugger engine DbgEng.dll. InstructionToSourceLineCSharp is a C# console application that references DbgEngManaged library. Note that the error handling here is not done properly so don't judge me for it
The provided code here is something that I have quickly prototyped and decided to share for those who for some reason need to use the debugger engine. It can also serve as an example of using native and managed code together.
I have just seen one Google advertisement of an agency that offers their services for helping foreigners to issue NIE – Número de Identidad de Extranjero – number. The subject agency charges the insane 165 Euros + Expenses for a NIE number application on your behalf.
20 Years since the Exodus of the Turks in Bulgaria

![]() |
![]() |
We crossed the border on the 10th day, 25 June. Because of the excitement, the time we waited at the border didn’t look long. Actually, considering the time we waited for many trivial things such as making photos, the time we spent at the border seemed like an instant. Some time in the afternoon we were finally at the side of the Republic of Turkey. I didn’t even realize the crossing of the border. But I remember that on the Turkish side there was some order and peace unlike the big chaos on the Bulgarian side.

![]() |
![]() |
On Nov 13, 1989 (after 3 months and a half) at about sunset time we set out for Bulgaria. It was morning when we arrived at the border. There were many people returning. Seeing this confirmed that we are not doing wrong. My mother and my grandfather arranged the moving of the luggage from the truck to a cargo train. It took almost the whole day. It was very unpleasant weather – dark, cold, and rainy. We crossed the border at about 18:00 and were welcomed, as we had expected, with the sarcastic smiles of the Bulgarian customs officers and their inquisition, “What happened in your Turkey? Why do you return? Didn’t you like it?”.
Department of the Computer Science and Engineering at University of San Diego ranked conferences and journals in high performance computing based on their impact. According to their rank, the top conferences in the area are better than the journals. The table below is my shameless copy&paste from the original document “Judging the Impact of Conference and Journal Publications in High Performance Computing”. Conferences in the table are classified in three different classes and grouped based on their importance/impact.
|
Grouping
|
Archival Journals
(Combined areas)
|
General High Performance Computing
|
Related Conferences in Programming Languages
|
Related Conferences in Architecture
|
Related Conferences (cross-discipline & other areas)
|
|
Group 1
|
TPDS, JPDC, CPE, TOPLAS, TOSE, SPE, TOCS, TOC, Micro
|
SC, PPOPP, HPDC, ICS
|
PLDI, POPL, OOPSLA
|
ISCA, Micro, HPCA
|
ASPLOS, PACT, SPAA, Sigmetrics, SOSP
|
|
Group 2
|
IJPP, PC, PPL, CL, JILP, JSA, IJHPCA, SP
|
IPDPS, Europar, ICCS, ICPP, ISCOPE, CLUSTER, SCPPSC, CCGrid
|
CC, LCPC, CGO
|
ICCD, ISHPC
|
|
|
Group 3
|
–
|
PARA, HCW IRREGULAR
|
FDDO
|
PACS, CAECW
|
EPIC, Interact, MTEAC
|
To exmplain to a friend the different uses and semantics of "const" in c++ I come accross one very nicely written article "The C++ ‘const’ Declaration: Why & How". It concludes with an example that has all the possible uses of "const" in one statement. I copy & paste it here.
Of course one sometimes needs to combine some of these different uses of ‘const’ which can get confusing as in
const int*const Method3(const int*const&)const;
where the 5 uses ‘const’ respectively mean that the variable pointed to by the returned pointer & the returned pointer itself won’t be alterable and that the method does not alter the variable pointed to by the given pointer, the given pointer itself & the object of which it is a method!