How-to articleMethodology & analyticsComputer science

Developing a computer science PhD methodology in Germany: incorporating algorithmic complexity analysis

In algorithmic computer science, a methodology chapter has to connect two kinds of evidence: what can be proved about an algorithm and what can be measured when it runs. This guide shows how researchers in Germany have combined the two, and how to design, measure and report your own complexity analysis so that an examiner can check it.

What you will learn

  • Explain the difference between worst-case, average-case and smoothed analysis, and what each can and cannot claim
  • Describe how German algorithm engineering research links theoretical bounds to experiments
  • Design a runtime and memory experiment that separates the algorithm from its implementation and the machine
  • Estimate empirical scaling from measurements and compare it honestly with an asymptotic bound
  • Meet the documentation, software and archiving expectations of the DFG code and your doctoral regulations

What you will unlearn

  • A big-O bound tells you how fast the program will run.An asymptotic bound describes growth with input size up to constant factors, so measured runtime also depends on constants, memory hierarchy and implementation.
  • Running the algorithm on best, average and worst cases proves its complexity.Worst-case and average-case complexity are established by analysis; experiments show behaviour on the inputs you chose and can only support or challenge that analysis.
  • If my implementation is faster than a published one, my algorithm is better.German studies show that implementations of the same algorithm can differ greatly in speed, so a fair comparison controls implementation quality as well as the algorithm.
  • Timing a run with a stopwatch function is enough.CPU time, wall time and peak memory are easily mismeasured on modern machines, so the measurement method itself needs to be designed and reported.

Skills you will practise

  • Asymptotic analysis
  • Algorithm engineering cycle
  • Benchmark design
  • Reliable runtime measurement
  • Empirical scaling
  • Reproducible research software
  • Methods reporting

Why complexity analysis needs both proof and measurement

Algorithmic complexity analysis describes how the resources an algorithm needs, usually time and memory, grow as the input grows. The standard tools are asymptotic bounds in a stated model of computation: the worst-case bound over all inputs of size n, and the average-case bound under a stated probability distribution over inputs (Cormen et al., 2022). These bounds are mathematical results. They are proved, not observed, and they deliberately ignore constant factors and lower-order terms.

That is their strength and their limit. A worst-case bound guarantees behaviour on every input, but it can be very pessimistic. The simplex method for linear programming is the classic case: exponential in the worst case, yet fast on the problems people actually solve. Spielman and Teng (2004) introduced smoothed analysis to explain this, measuring the worst case of the expected running time when inputs are slightly perturbed at random. For a doctoral methodology the lesson is simple: say which kind of analysis you are doing, under which model and which input assumptions, before you say anything about efficiency.

Measurement answers different questions: how large the constants are, where the asymptotic regime begins, how the algorithm interacts with caches and parallel hardware, and whether it beats the alternatives on realistic inputs. Most computer science PhDs that propose an algorithm need both kinds of evidence, and the methodology chapter has to explain how they fit together.

How researchers in Germany have approached the problem

German computer science has a well-developed tradition here, usually called algorithm engineering, centred on groups at Karlsruhe, Munich, Berlin and elsewhere. Reading a few of its key studies is the quickest way to see what examiners in this tradition expect.

A method, not just a set of results

Sanders (2009), at Karlsruhe, defined algorithm engineering as a general methodology for algorithmic research: a cycle of design, analysis, implementation and experimental evaluation that he compared with Popper's scientific method, supported by realistic machine models, algorithm libraries and benchmarks built from real-world instances. Theory and experiment are treated as complementary, and falsified hypotheses from experiments feed back into new designs. Mendling et al. (2026), a team based mainly in Berlin, Karlsruhe and Hamburg, have since set out a fuller research framework for the field. They distinguish the real-world problem, the algorithmic task, the algorithm design and its implementation, and name the validity threats that each kind of contribution must address, including design, implementation, external and construct validity.

When practice outruns the bound

Route planning shows why the cycle matters. Geisberger et al. (2008), also at Karlsruhe, introduced contraction hierarchies, which preprocess a road network by contracting nodes in order of importance and adding shortcut edges, then answer queries with a bidirectional search. They reported query times five times lower than the best previous hierarchical Dijkstra-based techniques and a distance structure smaller than the original graph. The evidence for this was experimental, on real road networks, rather than a worst-case bound: on arbitrary graphs the method offers no comparable guarantee. A thesis in this style must therefore be explicit about the class of inputs to which its claims apply.

Comparing fairly

Axtmann et al. (2022) at KIT engineered in-place parallel sorting algorithms with a provably cache-efficient blockwise data distribution. Because the sorting literature contained conflicting performance claims, they evaluated 21 state-of-the-art sorting codes on 6 data types, 10 input distributions, 4 machines and 4 memory allocation strategies, with input sizes spanning 7 orders of magnitude, and found that many competitors performed worse than their own published benchmarks suggested. The scale of that design is unusual, but the principle is not: claims of superiority must survive inputs and machines the author did not choose to flatter the method.

At LMU Munich, Kriegel et al. (2017) asked whether runtime experiments in data mining compare algorithms or implementations. Testing clustering and outlier detection methods with and without index acceleration, they found large runtime differences between implementations of the same algorithm, enough to swamp the differences between algorithms that papers report. They concluded that the design of fair and conclusive runtime experiments will always remain a challenge, and recommended comparing methods within one framework and one level of implementation effort.

Measuring correctly

Beyer et al. (2019), also at LMU Munich, examined measurement itself. They showed that common timing approaches miss the CPU time of child processes, that sampling misses short memory peaks, and that hardware sharing changes results: in their experiments, running on hyperthreaded sibling cores increased CPU time by about 53%, and a shared L3 cache had effects of roughly 22% to 39% depending on Turbo Boost. Their solution, the open-source BenchExec framework, uses Linux control groups and namespaces to measure and limit resources and to isolate runs from one another.

German studies on linking complexity analysis and experiments (summarised from the cited papers)
Study (institution)What they studiedProblem reportedHow they handled it
Sanders, 2009 (Karlsruhe)Definition of algorithm engineeringGap between theory and practical performanceDesign, analyse, implement, experiment as one cycle
Geisberger et al., 2008 (Karlsruhe)Route planning on road networksSpeed not explained by a worst-case boundExperimental evidence on real networks, claims limited to that input class
Axtmann et al., 2022 (KIT)In-place parallel sortingConflicting performance claims in the literatureLarge factorial benchmark over codes, data, machines and sizes
Kriegel et al., 2017 (LMU Munich)Clustering and outlier detection runtimesImplementation quality confounds comparisonsCompare within one framework; report implementation details
Beyer et al., 2019 (LMU Munich)Benchmarking of software toolsMismeasured CPU time and memory; hardware interferenceControl groups, isolation and full reporting (BenchExec)

Designing your methodology

The German studies suggest a structure that works for most algorithmic theses. Begin with the task, not the algorithm: define the input, the output, the cost measure that matters to users (time, memory, I/O, energy, communication) and the model of computation in which you will analyse it, such as the RAM model, an external-memory model or a parallel model. The textbook by Sanders et al. (2019) is a useful German reference that treats sequential and parallel models side by side.

  1. State the analytical claim. Give the worst-case or average-case bound you will prove for time and space, with the model and, for average-case claims, the input distribution.
  2. Turn the claim into testable hypotheses. For example, that runtime grows no faster than n log n on the chosen inputs, or that the method is faster than a named baseline beyond a stated input size.
  3. Choose instances deliberately. Combine real-world benchmark instances, synthetic families that vary one property at a time, and adversarial inputs close to your worst case. Say why each set is there.
  4. Choose baselines fairly. Use the strongest available competitors, in their authors' best implementations where possible, or reimplement all methods in one framework (Kriegel et al., 2017).
  5. Plan the measurement before you collect data, including repetitions, warm-up runs, timers and resource limits (Beyer et al., 2019; McGeoch, 2012).
  6. Plan the analysis, including how you will summarise repeated runs and estimate scaling.

A worked example: checking a bound against measurements

The figures below are hypothetical and purely illustrative. Suppose you have proved an O(n log n) worst-case time bound for a new sorting-based method and measured the median of ten timed runs, after warm-up, at five input sizes on one machine.

Illustrative runtime measurements (hypothetical, not real data)
Input size nMedian time (ms)Time / (n log2 n) (ns)
216 (65,536)2.22.10
218 (262,144)10.12.14
220 (1,048,576)46.22.21
222 (4,194,304)217.02.35
224 (16,777,216)1,023.12.54

Two checks are useful. First, divide each time by the bound's growth function. If the bound describes the behaviour, the ratio should level off; here it rises slowly, from 2.10 to 2.54 nanoseconds. Second, fit a straight line to log time against log n: the slope here is about 1.11, slightly above the value of about 1 expected for n log n over this range. Neither check proves anything about the asymptotic bound. Together they suggest that, on this machine, a second effect grows with input size, most plausibly the data outgrowing the caches. The honest write-up reports the proved bound, the measured scaling and the likely explanation, and tests that explanation, for example by measuring cache misses or repeating the experiment on a machine with a different cache size (McGeoch, 2012).

Published papers show both halves of this habit. Veličković et al. (2018) state the time complexity of one graph attention head as O(|V|FF' + |E|F'), where |V| and |E| are the numbers of nodes and edges and F and F' the input and output feature dimensions, and compare it with existing graph convolutional networks. Krizhevsky et al. (2012), by contrast, give no asymptotic analysis but do report the hardware and cost that matter for reproduction: the network was split across two GPUs with 3 GB of memory each and took five to six days to train. A strong thesis gives readers both kinds of information.

Measuring runtime and memory reliably

Measurement is where most avoidable errors happen. The following practices follow from the studies above and from the experimental algorithmics literature (McGeoch, 2012; Beyer et al., 2019).

  • Distinguish CPU time from wall-clock time, and make sure the CPU time of any child processes or threads is counted.
  • Measure peak memory with a method that cannot miss short peaks, such as kernel-level accounting, rather than periodic sampling.
  • Fix and report the hardware state: processor model, core pinning, whether hyperthreading and frequency boosting were enabled, memory size and NUMA layout.
  • Repeat runs, discard or report warm-up runs, and summarise with medians and an interval or spread, not a single number.
  • Report compiler, compiler flags, library versions and the operating system, and record random seeds for randomised algorithms or input generators.
  • Run all competitors on the same machine under the same limits, within one framework where possible (Kriegel et al., 2017).

Working within German research rules

Doctoral research in Germany is governed by the doctoral regulations (Promotionsordnung) of your faculty and by your university's rules on good research practice, which implement the code of the Deutsche Forschungsgemeinschaft (Deutsche Forschungsgemeinschaft, 2019). Several of its guidelines translate directly into methodological requirements for algorithmic work.

  • Quality assurance (guideline 7). Each step is carried out lege artis, and published results explain the quality assurance used, the origin of data and the software used, in a citable form.
  • Documentation (guideline 12). Record everything needed to understand and check a result, including runs that did not support your hypothesis. A versioned experiment log and scripts that regenerate every table meet this requirement in practice.
  • Public access (guideline 13). Results are made available together with the data, methods and software behind them. For research software you wrote yourself, the code expects the source code to be published where this is possible and reasonable.
  • Archiving (guideline 17). Research data underlying published results are generally kept for ten years, so archive your benchmark instances, raw timing data and the exact code version.

Most doctoral regulations also ask you to declare that you wrote the dissertation yourself and to name the aids you used. Check yours early, especially if you plan a cumulative dissertation built from published papers, where co-authored experimental work needs a clear statement of your own contribution.

What to report in the methodology chapter

Minimum reporting set for an algorithmic methodology chapter
ElementWhat to state
Task and cost measureInput, output, the resource measured and why it matters
Model of computationRAM, external-memory, parallel or other, with its assumptions
Analytical resultsWorst-case or average-case bounds, with the input distribution for average case
InstancesReal, synthetic and adversarial sets, with sources and generation parameters
BaselinesCompetitors, their versions, and how implementation effort was equalised
EnvironmentHardware, operating system, compiler and flags, libraries, hardware settings
MeasurementTimers, memory method, repetitions, warm-up, resource limits, tooling
AnalysisSummary statistics, scaling estimates and how they relate to the bounds
AvailabilityRepository and archive for code, instances and raw results

Common mistakes

  • Calling an experiment a "worst-case test" without showing that the inputs are close to the analytical worst case.
  • Claiming a complexity class from a runtime plot over one or two orders of magnitude.
  • Comparing your carefully optimised code with a competitor's unoptimised or differently implemented code.
  • Reporting the best of several runs, or a single run, without saying so.
  • Leaving hardware settings, compiler flags and library versions out of the chapter.
  • Citing a famous paper for a claim it does not make, for example citing an applied deep learning paper as evidence about complexity theory.

A good final test is to ask whether another doctoral researcher, given your repository and chapter, could rerun your experiments and reach the same conclusions about how your measurements relate to your bounds.

Key takeaways

Your next step

Want to apply this to your own study?

  1. 1Tell us your topic, data and deadline
  2. 2A statistician reviews your work with you
  3. 3You get a plan and a quote
Research design support

References

  1. Axtmann, M., Witt, S., Ferizovic, D., & Sanders, P. (2022). Engineering in-place (shared-memory) sorting algorithms. ACM Transactions on Parallel Computing, 9(1), 1–62. https://doi.org/10.1145/3505286
  2. Beyer, D., Löwe, S., & Wendler, P. (2019). Reliable benchmarking: Requirements and solutions. International Journal on Software Tools for Technology Transfer, 21(1), 1–29. https://doi.org/10.1007/s10009-017-0469-y
  3. Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). Introduction to algorithms (4th ed.). MIT Press.
  4. Deutsche Forschungsgemeinschaft. (2019). Guidelines for safeguarding good research practice: Code of conduct (Version 1.2, 2025). Zenodo. https://doi.org/10.5281/zenodo.14281892
  5. Geisberger, R., Sanders, P., Schultes, D., & Delling, D. (2008). Contraction hierarchies: Faster and simpler hierarchical routing in road networks. In C. C. McGeoch (Ed.), Experimental algorithms: WEA 2008 (Lecture Notes in Computer Science, Vol. 5038, pp. 319–333). Springer. https://doi.org/10.1007/978-3-540-68552-4_24
  6. Kriegel, H.-P., Schubert, E., & Zimek, A. (2017). The (black) art of runtime evaluation: Are we comparing algorithms or implementations? Knowledge and Information Systems, 52(2), 341–378. https://doi.org/10.1007/s10115-016-1004-2
  7. Krizhevsky, A., Sutskever, I., & Hinton, G. E. (2012). ImageNet classification with deep convolutional neural networks. In F. Pereira, C. J. C. Burges, L. Bottou, & K. Q. Weinberger (Eds.), Advances in neural information processing systems (Vol. 25, pp. 1097–1105). Curran Associates. https://proceedings.neurips.cc/paper/4824
  8. McGeoch, C. C. (2012). A guide to experimental algorithmics. Cambridge University Press. https://doi.org/10.1017/CBO9780511843747
  9. Mendling, J., Leopold, H., Meyerhenke, H., & Depaire, B. (2026). Methodology of algorithm engineering. ACM Computing Surveys, 58(4), 1–38. https://doi.org/10.1145/3769071
  10. Sanders, P. (2009). Algorithm engineering: An attempt at a definition. In S. Albers, H. Alt, & S. Näher (Eds.), Efficient algorithms (Lecture Notes in Computer Science, Vol. 5760, pp. 321–340). Springer. https://doi.org/10.1007/978-3-642-03456-5_22
  11. Sanders, P., Mehlhorn, K., Dietzfelbinger, M., & Dementiev, R. (2019). Sequential and parallel algorithms and data structures: The basic toolbox. Springer. https://doi.org/10.1007/978-3-030-25209-0
  12. Spielman, D. A., & Teng, S.-H. (2004). Smoothed analysis of algorithms: Why the simplex algorithm usually takes polynomial time. Journal of the ACM, 51(3), 385–463. https://doi.org/10.1145/990308.990310
  13. Veličković, P., Cucurull, G., Casanova, A., Romero, A., Liò, P., & Bengio, Y. (2018). Graph attention networks. In Proceedings of the 6th International Conference on Learning Representations (ICLR 2018). https://openreview.net/forum?id=rJXMpikCZ

How to cite this article

Choose your referencing style, then copy. Check your university's or journal's guide for local variations.

PhD Research Lab Academy. (2026, March 27). Developing a computer science PhD methodology in Germany: incorporating algorithmic complexity analysis. PhD Research Lab. https://www.phdassistance.com/academy/how-to-article/computer-science-phd-methodology-germany/

PhD Research Lab Academy. “Developing a Computer Science PhD Methodology in Germany: Incorporating Algorithmic Complexity Analysis.” PhD Research Lab, 27 Mar. 2026, www.phdassistance.com/academy/how-to-article/computer-science-phd-methodology-germany. Accessed [access date].

PhD Research Lab Academy (2026) Developing a computer science PhD methodology in Germany: incorporating algorithmic complexity analysis. PhD Research Lab. Available at: https://www.phdassistance.com/academy/how-to-article/computer-science-phd-methodology-germany/ (Accessed: [access date]).

PhD Research Lab Academy. “Developing a Computer Science PhD Methodology in Germany: Incorporating Algorithmic Complexity Analysis.” PhD Research Lab. March 27, 2026. https://www.phdassistance.com/academy/how-to-article/computer-science-phd-methodology-germany.

PhD Research Lab Academy, ‘Developing a Computer Science PhD Methodology in Germany: Incorporating Algorithmic Complexity Analysis’ (PhD Research Lab, 27 March 2026) <https://www.phdassistance.com/academy/how-to-article/computer-science-phd-methodology-germany> accessed [access date].

PhD Research Lab Academy. Developing a computer science PhD methodology in Germany: incorporating algorithmic complexity analysis [Internet]. PhD Research Lab; 2026 Mar 27 [cited [access date]]. Available from: https://www.phdassistance.com/academy/how-to-article/computer-science-phd-methodology-germany/

PhD Research Lab Academy, “Developing a computer science PhD methodology in Germany: incorporating algorithmic complexity analysis,” PhD Research Lab, Mar. 27, 2026. [Online]. Available: https://www.phdassistance.com/academy/how-to-article/computer-science-phd-methodology-germany. [Accessed: [access date]].

@online{computer_science_phd_methodology_germany_2026,
  author = {{PhD Research Lab Academy}},
  title = {{Developing a computer science PhD methodology in Germany: incorporating algorithmic complexity analysis}},
  organization = {PhD Research Lab},
  date = {2026-03-27},
  url = {https://www.phdassistance.com/academy/how-to-article/computer-science-phd-methodology-germany},
  urldate = {[access date]}
}

This article is for learning. Use it to understand the method and cite the original sources above in your own work; do not copy or submit it as your own.

Developing a computer science PhD methodology in GermanyNeed help applying it to your study?
Research design support