Searching or Search Algorithms, Types of Searching, Need of Searching

Searching:- Searching is the algorithmic process of finding location or position of an element/item in given data structure.

सर्चिंग एक अल्गोरिथम पर आधारित युक्ति है जिससे किसी दिए गए डाटा स्ट्रक्चर में, एक एलिमेंट या आइटम की लोकेशन या पोजीशन को खोजा जाता है।

Classification of searching-
सर्चिंग का वर्गीकरण-

सर्चिंग युक्तियों को निम्न दो प्रकार से वर्गीकृत किया गया है -

1. Internal and External Searching:- 

A.) Internal Searching(इंटर्नल सर्चिंग):-

if the whole data structure is loaded on primary memory and after that we find an item in it, then this type of searching method is called internal searching. 
It is very effective technique for small data structure and short list. But if the memory size of the data structure is larger than primary memory then we cannot perform internal searching. 
Thus, Internal searching is not effective method for large data structure or huge list. It is faster than external searching.

यदि सम्पूर्ण डाटा स्ट्रक्चर को प्राइमरी मेमोरी पर लोड करने के पश्चात उसमें आइटम को खोजा जाता है तब इस प्रकार की सर्चिंग युक्ति को इंटरनल सर्चिंग कहा जाता है।
यह कम एलिमेंट्स रखने वाले छोटे डाटा स्ट्रक्चर या लिस्ट के लिए एक प्रभावी युक्ति है। परंतु यदि डाटा स्ट्रक्चर का आकार प्राइमरी मेमोरी से भी बड़ा है तब हम इंटर्नल सर्चिंग लागू नही कर सकते है।
अतः यह अधिक एलिमेंट्स रखने वाले बड़े डाटा स्ट्रक्चर या लिस्ट के लिए एक प्रभावी युक्ति नहीं है। 
यह एक्सटर्नल सर्चिंग की तुलना में तीव्र गति से कार्य करती है।

B.) External Searching(एक्सटर्नल सर्चिंग):-

If we divide a large data structure in several parts and upload them one by one in primary memory and after that we search an item in each part of data structure then this type of searching method is called External searching. 
Hence, external searching is used in place of internal searching for large data structure or list.
It is slower than internal searching. 

यदि किसी वृहद डाटा स्ट्रक्चर को, कई छोटे-छोटे एक समान भागों में विभाजित कर, प्रत्येक भाग को एक के बाद एक श्रेणी क्रम में प्राइमरी मेमोरी पर लोड किया जाता है एवं इसके  पश्चात उस भाग में आइटम को खोजा जाता है तब इस प्रकार की सर्चिंग युक्ति को एक्सटर्नल सर्चिंग कहा जाता है। 
अतः यह अधिक एलिमेंट्स रखने वाले वृहद डाटा स्ट्रक्चर या लिस्ट के लिए एक प्रभावी युक्ति है। 
यह इंटर्नल सर्चिंग की तुलना में धीमी गति से कार्य करती है। 

In other words, we can say that "internal searching is performed on primary memory and external searching is performed on secondary memory."

दूसरे शब्दों में हम कह सकते है कि " इंटर्नल सर्चिंग प्राइमरी मेमोरी पर एवं एक्सटर्नल सर्चिंग सेकेंडरी मेमोरी पर क्रियान्वित की जाती है।"

2. Static and Dynamic Searching:-

A.) Static Searching:-

if searching operation will not affect size of data structure then this type of searching method is called static searching.
Example:-traversing or visiting elements of an array/stack/queue etc

यदि सर्चिंग आपरेशन के द्वारा डाटा स्ट्रक्चर के आकार में किसी भी प्रकार का परिवर्तन नही किया जाता है तब इस प्रकार की सर्चिंग युक्ति को स्टेटिक सर्चिंग कहा जाता है।
उदाहरण:- अरे/स्टैक/क्यू इत्यादि में एलिमेंट्स को ट्रैवर्स या विजिट करना।

B.) Dynamic Searching:-

If searching operation will make change in size of data structure (increase or decrease) then this type of searching is called dynamic searching.
Example:- insertion and deletion of an element in array/stack/queue etc.

यदि सर्चिंग आपरेशन के द्वारा डाटा स्ट्रक्चर के आकार में किसी भी प्रकार का परिवर्तन (वृद्धि या कमी) किया जाता है तब इस प्रकार की सर्चिंग युक्ति को डायनामिक सर्चिंग कहा जाता है।
उदाहरण:- अरे/स्टैक/क्यू इत्यादि में किसी एलिमेंट का इंसर्शन या डिलिशन करना।


Need of searching- 
In computer science, Accessing data or information is very important and necessary work. Now If user want to search a specific record in any data structure or list through a key value then this work is done by a searching method. 
It is very fast process and if record is found then it will provide location of that record. Otherwise, search becomes unsuccessful. 
With the help of searchin, we can easily find any data or information in large data structure. If searching method is not exist then user will have to give more money, time and efforts for accessing data or information.

कंप्यूटर विज्ञान में, डाटा या इनफार्मेशन प्राप्त करना, एक महत्वपूर्ण एवं अनिवार्य कार्य है। अब यदि यूजर किसी डेटा स्ट्रक्चर में एक विशेष रिकॉर्ड को की-वैल्यू देकर खोजना चाहता है तब यह कार्य सर्चिंग युक्ति द्वारा किया जाता है।
यह कार्य अत्यंत तीव्र गति से किया जाता है एवं यदि रिकॉर्ड प्राप्त होता है तब उसकी लोकेशन प्रदान की जाती है अन्यथा सर्चिंग को असफल मन जाता है।
सर्चिंग की सहायता से हम किसी वृहद डेटा स्ट्रक्चर से डेटा या इनफार्मेशन को आसानी से प्राप्त कर सकते है।
यदि सर्चिंग युक्ति उपलब्ध न हो तब यूजर को डेटा या इनफार्मेशन प्राप्त करने के लिए अत्यधिक पैसा, समय एवं श्रम खर्च करना पड़ता हैं।

Generally we use following three Searching Algorithms :-
सामान्यतः हम निम्न तीन सर्चिंग अल्गोरिथम का प्रयोग करते है- 
1.) Linear Search
2.) Binary Search
3.) Interpolation Search

No comments:

Post a Comment

Stack Data Structure, Push, Pop and Peek Operations , Applications of Stack

Stack is a linear data structure. It is collection of ordered data elements. It is also known as LIFO system (last in first out). It means i...