Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Do we use these data structures?

  1. Mar 14, 2013 #1
    I have seen many data structures like stacks, queue, binary search tree, avl tree etc.
    Except stack and queue do we actually use these data structure outside the field of computers?

    Suppose I want to store by books(or any other stuff) according to some priority I would not use a binary heap to store my things, will I? I will just keep them in sorted order.

    So the question is - that are these data structures only optimal for computers or can they be used outside computers too?
  2. jcsd
  3. Mar 14, 2013 #2


    User Avatar

    Graph data structures are used in different disciplines. For example, the transportation industry relies heavily on graphs (the abstract data type) in order to plan shortest routes, most efficient routes, etc.. The Traveling Salesman Problem is an example of using data structures for business travel (not computers).

    Pick up some books on algorithms or advanced data structures and you'll get a better understanding of their uses outside of computers / programming.
  4. Mar 15, 2013 #3
    Okay I guess I didn't make my question clear enough. What I meant to ask was that the algorithms we study - are they good enough to be used by humans too. Of - course they are good for the use of computers but we don't seem to use these algorithms when we have to do a similar task.
    For eg:- We won't use a min-heap to find minimal element, we won't use quicksort to sort elements etc.
  5. Mar 15, 2013 #4


    User Avatar
    Homework Helper

    Mechanical card sorters use a bin sort, where operator has to collect and reload the input tray for each charcter of the field used to sort the cards.

    Libraries use catalogues similar in concept to a search tree, you select a draw based on the leading letters of a title (or author), then further reduce this to a group of cards based on the tabs separating the groups of cards in each drawer.
  6. Mar 19, 2013 #5
    It's not about the quality of the algorithm. It's the fact that a computer solves a task algorithmically and humans have different ways of doing it.

    The way humans sort things is pretty the same as the insertion sort algorithm: they find the highest element, move it to the top, then repeat for the next highest element.

    Binary search is used many times in by humans too, for example those stupid games where some says "guess a number" and then tells if you it's higher or lower, etc.

    There's many examples of ways in ways in which humans do use computational algorithms, and as you have noticed, many examples of ways in which they prefer to use natural intelligence.
  7. Mar 21, 2013 #6


    User Avatar
    Gold Member

    When you look up something in a dictionary or phone book, just for example, you probably are approximating a binary heap algorithm. Besides opening the phone book randomly and starting to do a binary search, I know that Smith ('S' in this example) is already towards the end of the alphabet, so I'm not going to open the phone book right in the middle to start searching for Smith. To search for Abbott, I would open it immediately very near the beginning.
  8. Apr 23, 2013 #7
    What I actually wanted to ask was - In a computer science course we study different algorithms and data structures to efficiently store data and get our results. Of-course these methods are used in programs and applications.

    But why don't we use these techniques outside the realm of computers. If I want to keep my books such that latest one is one the top shelf why don't people use a heap or something?
    OR perhaps people do use these techniques but don't realize that these are named computer techniques?
  9. Apr 23, 2013 #8


    User Avatar
    Gold Member

    These abstractions are used all the time. We stand in a queue at the grocery store (but in the US, we call it a waiting line, not a queue or FIFO). We stack papers and go through them starting with the one on top (last in, first out, or LIFO--but people have no name for this approach). Some organizations have call lists, where the starting caller contacts maybe 5 people, and each person then contacts another 5 people. And there are lots of other examples. We sort things to make them easier to find--as in the phone book.

    The fact is, the data structures came AFTER all those real-life strategies, and programmers gave them descriptive names and created yet newer ones with more precise definitions (think, doubly linked lists) to help solve programming problems. That's why so many have names from real life--tree, heap, pruning, etc
  10. Apr 24, 2013 #9
    Since the mechanism of natural intelligence is not yet understood, I think this is an open question.

    No doubt we know all of the physical laws required to create a computerised "human brain" but we don't know how to fit the parts together.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook