Algorithms have many uses, including sorting, searching, filtering, classifying, ranking and recommending. In IB Digital Society, the important point is that an algorithm is a sequence of defined instructions used to solve a problem or perform a task, not necessarily a form of artificial intelligence.
This topic is part of 3.2D Uses of algorithms and is shared by SL and HL. Each use handles data differently:
| Use | What the algorithm does | Example |
|---|---|---|
| Sorting | Arranges items according to a rule, such as alphabetical order, price or date. | Ordering search results by publication date. |
| Searching | Locates an item or value within a dataset. | Finding a student's record using an identification number. |
| Filtering | Includes or excludes items according to selected conditions. | Showing only flights below a chosen price. |
| Classifying | Assigns data to predefined categories based on its characteristics. | Labelling an email as spam or not spam. |
| Ranking | Places items in an order based on calculated relevance or priority. | Ordering web pages in search results. |
| Recommending | Suggests items by analysing data such as previous choices or similarities between users. | Suggesting music based on listening history. |
The key distinction is that sorting changes the order of items, filtering changes which items are displayed, and classifying assigns items to categories. One algorithmic system may combine several of these processes.
System: Gmail uses algorithms to analyse and classify incoming email. Example specifics: Its spam-filtering system processes message characteristics and user feedback to place suspected spam outside the main inbox. Impacts and implications: This can reduce exposure to scams and unwanted messages, but incorrect classification may hide legitimate communication. Concepts: The example demonstrates systems because user feedback affects later filtering, and values and ethics because designers must balance security, accuracy and user control.
In an exam, define the use precisely and apply it to the scenario. A common misconception is that every algorithm uses AI. Many sorting, searching and filtering algorithms follow fixed instructions without machine learning.