Do we use these data structures?

In summary, humans use the same algorithms and data structures as computers do, but they often use them in a different way.
  • #1
Avichal
295
0
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?
 
Technology news on Phys.org
  • #2
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.
 
  • #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.
 
  • #4
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.
 
  • #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.
 
  • #6
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.
 
  • #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?
 
  • #8
Avichal said:
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?

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
 
  • #9
Avichal said:
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?

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.
 

1. What are data structures and why do we use them?

Data structures are ways of organizing and storing data in a computer so that it can be accessed and used efficiently. We use data structures to help solve problems and perform tasks more efficiently, such as searching, sorting, and organizing data.

2. How do data structures improve the performance of computer programs?

Data structures allow for faster retrieval, insertion, and deletion of data, which can greatly improve the performance of computer programs. By organizing data in a specific way, data structures can reduce the time and resources needed to process and manipulate data.

3. What are the most commonly used data structures?

The most commonly used data structures include arrays, linked lists, stacks, queues, trees, and graphs. Each of these data structures has its own unique way of organizing data and is used for different types of problems and tasks.

4. How do we choose which data structure to use for a specific problem?

The choice of data structure depends on the type of data and the operations that need to be performed on it. For example, if we need to access data quickly and in a specific order, we might choose to use a tree or a hash table. It is important to understand the strengths and weaknesses of each data structure and choose the one that best fits the problem at hand.

5. Can we use multiple data structures in one program?

Yes, it is common to use multiple data structures in one program. In fact, using a combination of data structures can often lead to more efficient and effective solutions to problems. For example, a program might use a hash table to quickly retrieve data and a linked list to store the data in a specific order.

Similar threads

  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
Replies
1
Views
279
  • Programming and Computer Science
Replies
11
Views
995
  • Programming and Computer Science
Replies
15
Views
2K
  • Programming and Computer Science
Replies
10
Views
3K
  • Programming and Computer Science
4
Replies
107
Views
5K
  • Programming and Computer Science
Replies
19
Views
2K
  • Programming and Computer Science
Replies
22
Views
921
  • Programming and Computer Science
Replies
2
Views
633
Back
Top