Department of Computer Science | Institute of Theoretical Computer Science | CADMO

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// Program: RadonicStephan // Author: Stefan Radonic #include #include #include #include using namespace std; // POST: the word w_i^F is drawn void f (const unsigned int i) { if(i==0){ ifm::forward(2); } else { ifm::left(25); ifm::save(); ifm::right(25); ifm::restore(); ifm::right(25); f(i-1); ifm::forward(); ifm::save(); ifm::right(25); f(i-1); ifm::forward(); ifm::restore(); ifm::left(25); f(i-1); } } int main () { std::cout<> n; // draw w_n = w_n(F) f(n); return 0; }