About

I’m a programmer who likes puzzles and learning about the Universe we live in and how things work. I also like helping others learn stuff. This is my blog dedicated to algorithm problems, where I discuss problems from mainly two sources: LightOJ and UVa.

Contact

If you want to get in touch with me, feel free to post a comment on this blog, or send me a private message at LightOJ —my user ID is 1790.

Feel free to suggest to me new problems to solve and write about. I can’t promise that I will be able to handle every problem, but I’ll give it a shot… maybe :).

Advice for Beginners

From time to time I get asked the question “What can you recommend to get better for programming contests? Can you suggest any tutorials/articles/books/etc.?”. I have decided to collect my usual answer in one place, where it can be updated with further links/information if necessary.

I have moved this information into its own page: Advice for Beginners.

Other things I have done that you may find interesting:

  • Every once in a while I prepare programming contests targeted to beginners. You can find out more about them here: “Free For All” Programming Contests.
  • I have also made all the code from my solutions available, in the hope that it may be helpful, although you can argue that giving away the answer to a puzzle actually does more harm than good. My take on this is that looking at the code of other programmers, while it can be confusing and ruin the thrill of the challenge, is very helpful as a starting point and a good source of inspiration to create your own methods of solving problems in the future. Also, the reality is that if you want to look at the code of others, there are already many other places where you can do so (like for example TopCoder’s SRM archive). Use these resources wisely.

Blogs from other programmers:

  • I, ME AND MYSELF — Blog of Zobayer Hasan. Filled with good articles about various programming topics.
  • I solved a problem — Blog of Md. Arifuzzaman Arif. A good collection of articles about algorithm problems.
  • Algorithm Programming — Blog of Mohammad Samiul Islam. A few good introductory articles.

Credits

Software I use to maintain this blog:

  • Pandoc to write all entries and then export them to HTML.
  • gnuplot to create some graphs.
  • Graphviz to create some more graphs.
  • Inkscape to create even more graphs.

Services I use:

  • mathURL to create pretty images of paragraph–level math.
  • MathJax to display in–line math.

Thanks to Google for the blogger service, and to the authors of all other tools, big and small, that I use everyday and I’m forgetting at the moment.

Terms of Use

It is a joy for me to release everything I write or do into the public domain. Have fun!

8 comments:

  1. I'm really impressed. I must say this is one of the best programming tutorial I've seen. Most tutorails will tell you the solution, some will explain but this one actually motivates you to think! Amazing work, please write some more.

    Thanks for sharing :)

    ReplyDelete
    Replies
    1. Thanks for the kind words. I intend to keep writing entries that hopefully *guide* people to find the answers by themselves, because that is the most helpful thing I can think of. It's nice to hear that there's people who appreciate this approach :).

      If you have any specific problem in mind that you'd like to see in this blog, just let me know.

      Delete
    2. Here is a fascinating problem for you to write about. I'm sure you would enjoy solving it if you haven't solved it before.

      UVA - 11118 Prisoners Boxes And Pieces of Paper

      Delete
  2. Hey! You got my blog listed there ( Algorithm Programming ) :D. Thanks for the honor. I didn't know people actually knew that existed! I started that blog last year but didn't continue. Solving problems can be time consuming. But I have come to realize, if we don't give anything to the community, we will not get anything back. To show gratitude towards all the people out there who is helping me, I need to in turn help someone else in my own way, even if little. I will start writing again from today :)

    ReplyDelete
  3. Dear Leonardo. Here is a annoying problem, that sounds so simple. I am wondering if you know how to solve it.

    http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=25&page=show_problem&problem=3792

    Game of connect it is called. The arena is a graph. The first player chooses two vertices s and t. Then for the rest of the game the second player wants to connect s with t while the first player wants to disconnect s from t. Both persons play in turn, second player selects an edge, first player deletes an unselected edge, etc.

    My intuition is that the solution consists in a simple simulation of the game, implementing a dominating strategy for each player. It seems that both players want to choose edges that belong both to a shortest s-t-path and a smallest s-t-cut. But clearly among those edges some are a better choice than others. What is the right dominant strategy? And what are the graph minors that caracterize graphs where player 2 can always win?

    Do you have an idea Leonardo?
    Best wishes (and I am curious of your ideas)
    Christoph Dürr

    ReplyDelete
  4. Hey! Interesting Blog. Where are you from? Are you Student, Teacher?

    ReplyDelete
    Replies
    1. By post, he is an amazing teacher :D

      Delete
  5. hi, i am great fan of your blog .. can you provide an explanation of Question Colorful Board (Light oj: http://lightoj.com/volume_showproblem.php?problem=1246).

    ReplyDelete