Sunday, 12 November 2017

Week 3 [13-19.11.17] Bubble Sort: An Archaeological Algorithmic Analysis

Hello everyone,

most of presented articles are about empirical and applied computer science. This time I want to referto the theoretical field of computer science - algorithms! Don't worry it's just about bubble sort :) It was one of the first algorithms I've learnt years before going to university so it is definitely my sentimental one. The article below presents it's history and pros and cons of using and teaching this algorithm. I think that similar reasoning can be applied to other algorithms and topics.

Link:
http://cygnus-x1.cs.duke.edu/courses/cps182s/compsci342s/cps182s/fall03/latex/checkout/bubble182.pdf


1. Do you find learning algorithms important? Why?
2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?
3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?

31 comments:

  1. 1. Do you find learning algorithms important? Why?

    First of all in my opinion it is important to understand them no matter are we going to use them ever.
    It is important to know when to use them and which of them. Especially the performances leverage - how the memory will be accessed, moved and data stored, the cost for the improvement and scalability, the quality of the output itself. You don't have to be an expert in algorithms, but you have to know some basics, like basic sorting, searching, and how to evaluate the efficiency of given code.

    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?

    I remember all of the algorithms because I am using them on daily basis in my work. To list some of them: binary search, selection sort, insertion sort, recursive algorithms, merge sort, quick sort, graphs and many many more.

    3. Do you agree that bubble sort achieves popularity due to its name? Do you know any other algorithms with funny names?

    In my opinion bubble sort achieves popularity due to its simplicity. It is often used to introduce the concept of an algorithm, or a sorting algorithm, to introductory computer science students. So why is it called bubble sort? Air bubbles that are more buoyant than surrounding water rise to the top. Similarly, list elements with greater value than their surrounding elements “bubble” to the end of the list. For me names of the algorithms are not funny.

    ReplyDelete
    Replies
    1. Thanks for your comment. I agree that understanding algorithms is impotant and helps to evaluate the efficiency of given code. Nice explanation of the name.

      Delete
  2. 1. Do you find learning algorithms important? Why?

    I don't think that learning of the algorithms is very important. When it comes to programming you need to know when to use which sorting alghoritm.
    But in general more useful is algorithmic thinking instead of knowledge how particular alghoritm is built (I know that they are two different things :-)).

    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?

    I will start from last question, I never took part in any competitions. From school I don't remeber much about algorihms, but I took course on Coursera on algorithms. I use them on the daily basis, but I don't care which one should I choose (when it comes to sorting) I work in R&D so I have got other interest.

    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?
    Seriously I don't know answer for first question. My favorite one always was and always will be Merge Sort. When it comes to algorithms I don't know any with funny names. But when it comes to programming languages I know some (mostly esoteric ones) i.e: Brainfuck, Shakespeare, Pikachu, Malbolge :D.

    ReplyDelete
    Replies
    1. Thank you for your comment. I agree that programming is possible without knowledge of algorithms but we should learn them to become familiar with algorithmic thinking.

      Yes, programming languages have varity of names! I haven't heard about that ones.

      Delete
  3. 1. Personally, I believe that learning algorithms is valuable, because it shows how to split a problem into smaller pieces. And how to achieve a goal.

    2. I had a special lecture at my university, which was just about algorithms and data structures. We learned many kinds of sorting algorithms there and we were using some Math to prove their complexity, etc.
    But what now, after some time? I'm using standard libraries which chooses the best algorithms for me. I can be sure that executing "sort" method on the array I'm not using Bubble Sort mentioned here, which is a slow one.
    On the other hand, when it comes to Machine Learning, algorithms should be chosen carefully. In my opinion, this is a field of science where you have to know more about algorithms.

    3. I'm not sure if Bubble Sort is a catchy name. I've never thought about it. And to be honest, I think the popularity of this particular algorithm comes from its simplicity, so it is a good starting point for learning.

    ReplyDelete
    Replies
    1. Thank you for your comment. I agree that one of the reason of learning algorithms is to now how to split problem into smaller ones.
      And yes, bubble sort is a slow one what they mentioned in the articlea and questioned if it is even worth to teach.

      Delete
    2. This comment has been removed by the author.

      Delete
  4. I have to admit that though I did not enjoy it much, I find learning algorithms very important, if not crucial for efficient programming, though of course it's possible to work and live without them. I guess the knowledge of algorithms is no different than any other piece of information, you remember the one you use most often. So I do remember the ones that were/are crucial for fulfilling my day-to-day duties and obligations. Unfortunately, I cannot recall any funny names of algorithms.

    ReplyDelete
    Replies
    1. Thanks for your comment. I can't agree that knowledge of algorithms is the same as any other piece of information. When you learn algorithms you learn how to think and solve problems not only particular schema.

      Delete
  5. In my opinion learning algorithms should be one of the most important topics during secondary education. It is one of the best ways to improve the ability of logical thinking. Moreover the skill of using algorithms can be more useful in future than for example perfect orthography.

    The most interesting group of alghorithms I have learned during my studies were graph algorithms. Nowdays during data processing I prepare just siple control flow statements. For all classical problems usually there is ready solution prepared by another programist.

    ReplyDelete
    Replies
    1. Thank you for your input. I agree that graph algorithms are interesting and I think they are becoming more and more popular due to social network analysis.

      Delete
  6. 1. Me too, I think that learning algorithms is important. Many new problems can be solved with already existing algorithms. It's also very helpful for developing skills and intuition to solve new problems and design novel solutions.
    2. Bubble sort was probably the first formal algorithm that encountered at the university so it stuck in my memory. I also remember some algorithms related to machine learning like k-means, stochastic gradient descent or backpropagation. But I guess you meant more something like the breadth-search or Dijkstra's algorithm. Usually, I don't use any algorithms directly. Maybe the last one I tried to implement based on the description was the "a*" algorithm for finding paths.
    3. Partially it may be true. After all, it's very easy to remember that name and the algorithm itself is easy so maybe these both features combined led to the algorithm's popularity.

    ReplyDelete
    Replies
    1. Thanks for your comment. Machine learning algorithms are also extremely useful and interesting!

      Delete
  7. 1. Do you find learning algorithms important? Why?

    I roughly say this subject is for student classification. Before computer science most of scientific stuff where mathematicians. They teach and contribiute in the way there where told. However I do not think that this subject is obsolete.

    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?

    Many algorithms I store in books on my bookshelf. I remember little. Algorithms that is used to use for artificial intelligence or artificial networks stayed in my mind because I used them recently. Moreover I hava account on the Hacker Rank. I belive this is the page that gather best people in the algorithmic domain.

    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?

    What do you mean funny names. Every algorithm name is funny :-) I have some sentiments for "algorytm kopcowy" and breadth-first algorithm.

    ReplyDelete
    Replies
    1. Thanks for your input. Hakcer Rank! I also have account on Hacker Rank. They regulary publish some reports where Poland is always on a high position.

      Delete
  8. 1. Do you find learning algorithms important? Why?
    In my opinion learning algorithms is very important especially for computer science students. I agree with Piotr that it may improve the ability of logical thinking. Moreover learning algorithms is the first step to programming. On the other hand I think that in our daily life we use algorithms subconsciously.

    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?
    Besides bubble sort I still remember insert sort and quick sort but not in details of course. Sometimes I use algorithms but already prepared – I do not modify them. I have never heard about any competitions in terms of algorithms – maybe because it’s not my cup of tea..

    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?
    I partially agree with Cezary that bubble sort achieves popularity due to its simplicity, however I think that its name is easy to remember and that could also have an impact. I know only one algorithm with funny name - the Little Brother algorithm for appending to the end of a linked list.

    ReplyDelete
    Replies
    1. Thanks for your comment. I have never heard athe name Little Brother algorithm! :)

      Delete
  9. Hello,

    1. Do you find learning algorithms important? Why?
    In my opinion it is crucial to understand algorithms. We do not have to be an expert and we do not have to optimize it. Nevertheless proper understanding and let’s say parameterization of them is very important. It is a good practice to try re-implement them by yourself.

    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?
    I use algorithms required by process mining. Alpha, Alpha*, Heuristic Miner, Fuzzy Miner, but I remember AVL Tree, bubble sort, merge sort, quick sort and so on.

    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?
    The name of algorithm (even Bubble sort) is not such important as its simplicity. This is a key of its success :) (Even if it has not won the best sorting Algorithm Award!). Most of students and IT geeks have to implement this Algorithm at the beginning of their adventure with algorithms :).

    ReplyDelete
    Replies
    1. Thank you for your input. Yes, bubble sort is the simple one but is it really worth to teach?

      Delete
  10. Hi,

    Learning how to interpret, use and develop algorithms is one of the most important tasks in computer scientist eduaction! I am sure that not even in computer scientist's career it is crutial. Imagine business (or any other) processes - those are algorithms too :)

    First tough algorithm I had to implement at the beginning of studies was Djikstra algorithm for finding the optimal path.
    No, I've never participated in any competition.

    Bubble sort and any kind of funny-named process/algorithm/protocol in computer science makes diving in this field more friendly and generally easier. I, personally, love this kind of approach.

    ReplyDelete
  11. 1. Do you find learning algorithms important? Why?
    I think that learning algorithms can develop our mind, and according to me, is an important skill. even for people not connected with it world.
    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participated in any competition?
    I 'm never participate in competitions. But I remember the red-black tree, and the algorithm "Dikstra"
    3. Do you agree that bubble sort of popularity is due to its name? Do you know any other algorithms with funny names?
    I think that this algorithm is suitable for beginners. The name certainly encourages learning. But I have always been interested in algorithms that solve practical problems.

    ReplyDelete
  12. 1. Do you find learning algorithms important? Why?
    It teaches you how to approach problems and how to think about problems in real life. You can take a problem and divide it into smaller sets of problems etc.
    It's important to understand how things can be solved and by learning algorithms we learn how to solve the problems.

    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?

    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?
    Dijkstra, quick sort, also many machine learning algorithms kmeans, SVM. Yes I think I was during my first year of university I was taking part in the competition don't really rember what was the outcome beside that I haven't won=)

    3. I think it's popular because it's name is a kind of describing how it works if someone will use a little bit of imagination.

    ReplyDelete
  13. They help solve complex problems. Algorithms can perform calculation, data processing and automated reasoning tasks.
    Few that pop-up on my mind are: bubble sort, merge sort, quick sort,Alpha, Heuristic Miner, Fuzzy Miner.
    Bubble sort algorithm is good to learn how algorithms works. Still most funny is for me salesman problem (komiwojazera) it is not algorithm but related to topic :)

    ReplyDelete
  14. 1. I used to find learning algorithms important for two reasons. First of all, I like having knowledge, how the “engine” of programming code is constructed, how it works. Secondly, I’ve loved mathematics from early childhood so as such this is simply very interesting for me :-)

    2. I particularly remember the ant colony optimization algorithm. It aims to search for an optimal path in a graph, based on the behavior of ants seeking a path between their colony and a source of food.
    In the real world, when ants find food, they return to their colony leaving a trace of pheromones. When another ant encounters this trace, it ceases to move randomly and follows the path toward food.
    So when one ant finds a good (short) path, other ants will follow that path, also leaving the pheromones, thus increasing their intensity. Ultimately all the ants will move along the same best route, and the remaining paths will be forgotten (evaporated).
    This algorithm is a probabilistic technique for solving computational problems which can be reduced to finding good paths through graphs.

    3. I rather think algorithms’ popularity depends more on their useful factors and the names are often given just to remember them better or because of mathematicians’ sense of humor ;-)
    By the way, the algorithm I mentioned above in point 2 has fanny name :-)

    ReplyDelete
  15. 1. Do you find learning algorithms important? Why?

    In my opinion learning algorithms may help to think logical and break down the problems into details. In practice it is good to know how the algorithm we use work as we can decide if particular algorithm is proper for the case we work on.

    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?

    I did not graduated in IT, so I did not had a chance to learn algorithms at the university. I never participated in any competition. Currently I work as a BI developer, so I use algorithms, but not implement them by myself, rather choose the proper one from the predefined bundle.

    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?

    Maybe :) But I think that nowadays it is so popular because it is one of the first algorithms learned by students and almost everyone knows it :)
    I cannot remind at this moment any funny names of the algorithms, but I remember the story that my husband told me some time ago. At the IT classes in secondary school he got a task to invent sorting algorithm. He created one at home. Teacher checked it at the next lesson and said that such algorithm already exists and it is called bubble sort :)

    ReplyDelete
  16. 1. Do you find learning algorithms important? Why?
    I think it is vital to understand algorithms even if we do not develop them further. Algorithms develop skills and simplify complex problems.

    2. What algorithms do you remember from university? How often do you use algorithms?
    There are many algorithms which I have learnt at the university. Apart from sorting algorithms I have learnt many statistical algorithms (K-means, Nearest-Neighbors, SVM algorithms etc.) and I still use them in my work and studies.

    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?
    Unfortunately, I don't know any other 'funny' names of algorithms. I don't think that the popularity of an algorithm depends on its name.

    ReplyDelete
  17. Thanks Kasia for choosing this topic. I agree with Piotr that learning algorithms should be one of the most important topics in high school. This is one of the best ways to improve your thinking ability. Likewise, you wrote in one of the comments that when you learn the algorithms, you learn to think and solve problems not just in a specific scheme. The learning of algorithms can also be understood in many ways. In my opinion, in today's world you do not need to be able to recreate algorithms - no matter what kind of area it is, but you have to understand the rules of its operation and know its strengths and weaknesses. When I work with students - I'm a mathematician - I don’t force them to remember much I let them even bring notes for exams but I require them to be able to apply this knowledge. Access to information is practically unlimited and you need to know how to use it. It is similar to algorithms – it’s important to understand the operation and to know the strengths and weaknesses. In my opinion, the name of the algorithm often decides to interest him but not about his applications - I think so.

    ReplyDelete
  18. 1. Do you find learning algorithms important? Why?
    I think- yes if we are involved in any branch of computer science. I found that my colleagues, without a university education, have lack of common knowledge about, for example, the complexity of the task that they are writing, which sometimes leads to unexpected issues of their code. However, does everybody needs to have to learn algorithms? I think that it would be nice just to show how we can systematize our thoughts and actions in the smooth stream.

    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?
    I'm not a person who likes to compete with others, but for my own satisfaction, I like to solve problems at HackerRank.com website. However, because of my job, I use algorithms every day.
    But are we use them just like at the university? No, fortunately, we do not have to think about the best implementation of every piece of a puzzle of our programs (so bubble sort vs bucket sort, or Knuth–Morris–Pratt vs Rabin–Karp) because that would take ages. Most of the job is done by standard language libraries and frameworks.

    3. Do you agree that bubble sort achieves popularity due to its name? Do you know any other algorithms with funny names?
    I would say that it is popular rather from its simplicity :) Round robin is funny if you imagine Robin (from Batman) with overweight.

    ReplyDelete
  19. 1. Do you find learning algorithms important? Why?
    No, It's meaningless. In my opinion creating them on demand is better. It's harder, but it improves our brain.
    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?
    Any kind of sorting. Not often enough. Yes, long time ago in high school.
    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?
    Let's say that I agree. My colleagues already posted most of them. +1 for Round robin.

    ReplyDelete
  20. 1. Do you find learning algorithms important? Why?
    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?
    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?

    1. There are many informatics fields where algorithms are essential so learning them could be really useful. Especially where you have to deal with big amounts of data or hardware capacity limits.

    2. Not many actually, I tried to learn how to think in algorithmic way or measure computational complexity then to learn specifics of many algorithms. No, I've never participated in any algorithmic competition

    3. Totally! Every time I say its name to person who is not from IT that person shouts with curiosity about bubble sort :)

    ReplyDelete
  21. 1. Do you find learning algorithms important? Why?
    Machine learning is the future that is why such algorithms are important

    2. What algorithms do you remember from university? How often do you use algorithms? Have you ever participate in any competition?
    I do not participate in any competitions. To be honest I never was a fan of “book” knowledge. I use in my work many different algorithms but often I have problems with naming them. I fully understand what I am using, how they work but names were never my strong side 😊

    3. Do you agree that bubble sort achives popularity due to its name? Do you know any other algorithms with funny names?
    No

    ReplyDelete