AI Assistant Reddit

AI Assistant Reddit — independent reviews, comparisons, pricing and step-by-step guides on Aizhi.

  • Natural language understanding

    Natural language understanding

    Natural language understanding (NLU) or natural language interpretation (NLI) is a subset of natural language processing in artificial intelligence that deals with machine reading comprehension. NLU has been considered an AI-hard problem. There is considerable commercial interest in the field because of its application to automated reasoning, machine translation, question answering, news-gathering, text categorization, voice-activation, archiving, and large-scale content analysis. == History == The program STUDENT, written in 1964 by Daniel Bobrow for his PhD dissertation at MIT, is one of the earliest known attempts at NLU by a computer. Eight years after John McCarthy coined the term artificial intelligence, Bobrow's dissertation (titled Natural Language Input for a Computer Problem Solving System) showed how a computer could understand simple natural language input to solve algebra word problems. A year later, in 1965, Joseph Weizenbaum at MIT wrote ELIZA, an interactive program that carried on a dialogue in English on any topic, the most popular being psychotherapy. ELIZA worked by simple parsing and substitution of key words into canned phrases and Weizenbaum sidestepped the problem of giving the program a database of real-world knowledge or a rich lexicon. Yet ELIZA gained surprising popularity as a toy project and can be seen as a very early precursor to current commercial systems such as those used by Ask.com. In 1969, Roger Schank at Stanford University introduced the conceptual dependency theory for NLU. This model, partially influenced by the work of Sydney Lamb, was extensively used by Schank's students at Yale University, such as Robert Wilensky, Wendy Lehnert, and Janet Kolodner. In 1970, William A. Woods introduced the augmented transition network (ATN) to represent natural language input. Instead of phrase structure rules ATNs used an equivalent set of finite-state automata that were called recursively. ATNs and their more general format called "generalized ATNs" continued to be used for a number of years. In 1971, Terry Winograd finished writing SHRDLU for his PhD thesis at MIT. SHRDLU could understand simple English sentences in a restricted world of children's blocks to direct a robotic arm to move items. The successful demonstration of SHRDLU provided significant momentum for continued research in the field. Winograd continued to be a major influence in the field with the publication of his book Language as a Cognitive Process. At Stanford, Winograd would later advise Larry Page, who co-founded Google. In the 1970s and 1980s, the natural language processing group at SRI International continued research and development in the field. A number of commercial efforts based on the research were undertaken, e.g., in 1982 Gary Hendrix formed Symantec Corporation originally as a company for developing a natural language interface for database queries on personal computers. However, with the advent of mouse-driven graphical user interfaces, Symantec changed direction. A number of other commercial efforts were started around the same time, e.g., Larry R. Harris at the Artificial Intelligence Corporation and Roger Schank and his students at Cognitive Systems Corp. In 1983, Michael Dyer developed the BORIS system at Yale which bore similarities to the work of Roger Schank and W. G. Lehnert. The third millennium saw the introduction of systems using machine learning for text classification, such as the IBM Watson. However, experts debate how much "understanding" such systems demonstrate: e.g., according to John Searle, Watson did not even understand the questions. John Ball, cognitive scientist and inventor of the Patom Theory, supports this assessment. Natural language processing has made inroads for applications to support human productivity in service and e-commerce, but this has largely been made possible by narrowing the scope of the application. There are thousands of ways to request something in a human language that still defies conventional natural language processing. According to Wibe Wagemans, "To have a meaningful conversation with machines is only possible when we match every word to the correct meaning based on the meanings of the other words in the sentence – just like a 3-year-old does without guesswork." == Scope and context == The umbrella term "natural language understanding" can be applied to a diverse set of computer applications, ranging from small, relatively simple tasks such as short commands issued to robots, to highly complex endeavors such as the full comprehension of newspaper articles or poetry passages. Many real-world applications fall between the two extremes, for instance text classification for the automatic analysis of emails and their routing to a suitable department in a corporation does not require an in-depth understanding of the text, but needs to deal with a much larger vocabulary and more diverse syntax than the management of simple queries to database tables with fixed schemata. Throughout the years various attempts at processing natural language or English-like sentences presented to computers have taken place at varying degrees of complexity. Some attempts have not resulted in systems with deep understanding, but have helped overall system usability. For example, Wayne Ratliff originally developed the Vulcan program with an English-like syntax to mimic the English speaking computer in Star Trek. Vulcan later became the dBase system whose easy-to-use syntax effectively launched the personal computer database industry. Systems with an easy-to-use or English-like syntax are, however, quite distinct from systems that use a rich lexicon and include an internal representation (often as first order logic) of the semantics of natural language sentences. Hence the breadth and depth of "understanding" aimed at by a system determine both the complexity of the system (and the implied challenges) and the types of applications it can deal with. The "breadth" of a system is measured by the sizes of its vocabulary and grammar. The "depth" is measured by the degree to which its understanding approximates that of a fluent native speaker. At the narrowest and shallowest, English-like command interpreters require minimal complexity, but have a small range of applications. Narrow but deep systems explore and model mechanisms of understanding, but they still have limited application. Systems that attempt to understand the contents of a document such as a news release beyond simple keyword matching and to judge its suitability for a user are broader and require significant complexity, but they are still somewhat shallow. Systems that are both very broad and very deep are beyond the current state of the art. == Components and architecture == Regardless of the approach used, most NLU systems share some common components. The system needs a lexicon of the language and a parser and grammar rules to break sentences into an internal representation. The construction of a rich lexicon with a suitable ontology requires significant effort, e.g., the Wordnet lexicon required many person-years of effort. The system also needs theory from semantics to guide the comprehension. The interpretation capabilities of a language-understanding system depend on the semantic theory it uses. Competing semantic theories of language have specific trade-offs in their suitability as the basis of computer-automated semantic interpretation. These range from naive semantics or stochastic semantic analysis to the use of pragmatics to derive meaning from context. Semantic parsers convert natural-language texts into formal meaning representations. Advanced applications of NLU also attempt to incorporate logical inference within their framework. This is generally achieved by mapping the derived meaning into a set of assertions in predicate logic, then using logical deduction to arrive at conclusions. Therefore, systems based on functional languages such as Lisp need to include a subsystem to represent logical assertions, while logic-oriented systems such as those using the language Prolog generally rely on an extension of the built-in logical representation framework. The management of context in NLU can present special challenges. A large variety of examples and counter examples have resulted in multiple approaches to the formal modeling of context, each with specific strengths and weaknesses.

    Read more →
  • Communication-avoiding algorithm

    Communication-avoiding algorithm

    Communication-avoiding algorithms minimize movement of data within a memory hierarchy for improving its running-time and energy consumption. These minimize the total of two costs (in terms of time and energy): arithmetic and communication. Communication, in this context refers to moving data, either between levels of memory or between multiple processors over a network. It is much more expensive than arithmetic. == Formal theory == === Two-level memory model === A common computational model in analyzing communication-avoiding algorithms is the two-level memory model: There is one processor and two levels of memory. Level 1 memory is infinitely large. Level 0 memory ("cache") has size M {\displaystyle M} . In the beginning, input resides in level 1. In the end, the output resides in level 1. Processor can only operate on data in cache. The goal is to minimize data transfers between the two levels of memory. === Matrix multiplication === Corollary 6.2: More general results for other numerical linear algebra operations can be found in. The following proof is from. == Motivation == Consider the following running-time model: Measure of computation = Time per FLOP = γ Measure of communication = No. of words of data moved = β ⇒ Total running time = γ·(no. of FLOPs) + β·(no. of words) From the fact that β >> γ as measured in time and energy, communication cost dominates computation cost. Technological trends indicate that the relative cost of communication is increasing on a variety of platforms, from cloud computing to supercomputers to mobile devices. The report also predicts that gap between DRAM access time and FLOPs will increase 100× over coming decade to balance power usage between processors and DRAM. Energy consumption increases by orders of magnitude as we go higher in the memory hierarchy. United States president Barack Obama cited communication-avoiding algorithms in the FY 2012 Department of Energy budget request to Congress: New Algorithm Improves Performance and Accuracy on Extreme-Scale Computing Systems. On modern computer architectures, communication between processors takes longer than the performance of a floating-point arithmetic operation by a given processor. ASCR researchers have developed a new method, derived from commonly used linear algebra methods, to minimize communications between processors and the memory hierarchy, by reformulating the communication patterns specified within the algorithm. This method has been implemented in the TRILINOS framework, a highly-regarded suite of software, which provides functionality for researchers around the world to solve large scale, complex multi-physics problems. == Objectives == Communication-avoiding algorithms are designed with the following objectives: Reorganize algorithms to reduce communication across all memory hierarchies. Attain the lower-bound on communication when possible. The following simple example demonstrates how these are achieved. === Matrix multiplication example === Let A, B and C be square matrices of order n × n. The following naive algorithm implements C = C + A B: for i = 1 to n for j = 1 to n for k = 1 to n C(i,j) = C(i,j) + A(i,k) B(k,j) Arithmetic cost (time-complexity): n2(2n − 1) for sufficiently large n or O(n3). Rewriting this algorithm with communication cost labelled at each step for i = 1 to n {read row i of A into fast memory} - n2 reads for j = 1 to n {read C(i,j) into fast memory} - n2 reads {read column j of B into fast memory} - n3 reads for k = 1 to n C(i,j) = C(i,j) + A(i,k) B(k,j) {write C(i,j) back to slow memory} - n2 writes Fast memory may be defined as the local processor memory (CPU cache) of size M and slow memory may be defined as the DRAM. Communication cost (reads/writes): n3 + 3n2 or O(n3) Since total running time = γ·O(n3) + β·O(n3) and β >> γ the communication cost is dominant. The blocked (tiled) matrix multiplication algorithm reduces this dominant term: ==== Blocked (tiled) matrix multiplication ==== Consider A, B and C to be n/b-by-n/b matrices of b-by-b sub-blocks where b is called the block size; assume three b-by-b blocks fit in fast memory. for i = 1 to n/b for j = 1 to n/b {read block C(i,j) into fast memory} - b2 × (n/b)2 = n2 reads for k = 1 to n/b {read block A(i,k) into fast memory} - b2 × (n/b)3 = n3/b reads {read block B(k,j) into fast memory} - b2 × (n/b)3 = n3/b reads C(i,j) = C(i,j) + A(i,k) B(k,j) - {do a matrix multiply on blocks} {write block C(i,j) back to slow memory} - b2 × (n/b)2 = n2 writes Communication cost: 2n3/b + 2n2 reads/writes << 2n3 arithmetic cost Making b as large possible: 3b2 ≤ M we achieve the following communication lower bound: 31/2n3/M1/2 + 2n2 or Ω (no. of FLOPs / M1/2) == Previous approaches for reducing communication == Most of the approaches investigated in the past to address this problem rely on scheduling or tuning techniques that aim at overlapping communication with computation. However, this approach can lead to an improvement of at most a factor of two. Ghosting is a different technique for reducing communication, in which a processor stores and computes redundantly data from neighboring processors for future computations. Cache-oblivious algorithms represent a different approach introduced in 1999 for fast Fourier transforms, and then extended to graph algorithms, dynamic programming, etc. They were also applied to several operations in linear algebra as dense LU and QR factorizations. The design of architecture specific algorithms is another approach that can be used for reducing the communication in parallel algorithms, and there are many examples in the literature of algorithms that are adapted to a given communication topology.

    Read more →
  • Enterprise architecture

    Enterprise architecture

    Enterprise architecture (EA) is a business function concerned with the structures and behaviours of a business, especially business roles and processes that create and use business data. The international definition according to the Federation of Enterprise Architecture Professional Organizations is "a well-defined practice for conducting enterprise analysis, design, planning, and implementation, using a comprehensive approach at all times, for the successful development and execution of strategy. Enterprise architecture applies architecture principles and practices to guide organizations through the business, information, process, and technology changes necessary to execute their strategies. These practices utilize the various aspects of an enterprise to identify, motivate, and achieve these changes." The United States Federal Government is an example of an organization that practices EA, in this case with its Capital Planning and Investment Control processes. Companies such as Independence Blue Cross, Intel, Volkswagen AG, and InterContinental Hotels Group also use EA to improve their business architectures as well as to improve business performance and productivity. Additionally, the Federal Enterprise Architecture's reference guide aids federal agencies in the development of their architectures. == Introduction == As a discipline, EA "proactively and holistically lead[s] enterprise responses to disruptive forces by identifying and analyzing the execution of change" towards organizational goals. EA gives business and IT leaders recommendations for policy adjustments and provides best strategies to support and enable business development and change within the information systems the business depends on. EA provides a guide for decision making towards these objectives. The National Computing Centre's EA best practice guidance states that an EA typically "takes the form of a comprehensive set of cohesive models that describe the structure and functions of an enterprise. The individual models in an EA are arranged in a logical manner that provides an ever-increasing level of detail about the enterprise." Important players within EA include enterprise architects and solutions architects. Enterprise architects are at the top level of the architect hierarchy, meaning they have more responsibilities than solutions architects. While solutions architects focus on their own relevant solutions, enterprise architects focus on solutions for and the impact on the whole organization. Enterprise architects oversee many solution architects and business functions. As practitioners of EA, enterprise architects support an organization's strategic vision by acting to align people, process, and technology decisions with actionable goals and objectives that result in quantifiable improvements toward achieving that vision. The practice of EA "analyzes areas of common activity within or between organizations, where information and other resources are exchanged to guide future states from an integrated viewpoint of strategy, business, and technology." === Definitions === The term enterprise can be defined as an organizational unit, organization, or collection of organizations that share a set of common goals and collaborate to provide specific products or services to customers. In that sense, the term enterprise covers various types of organizations, regardless of their size, ownership model, operational model, or geographical distribution. It includes those organizations' complete sociotechnical system, including people, information, processes, and technologies. Enterprise as a sociotechnical system defines the scope of EA. The term architecture refers to fundamental concepts or properties of a system in its environment; and embodied in its elements, relationships, and in the principles of its design and evolution. A methodology for developing and using architecture to guide the transformation of a business from a baseline state to a target state, sometimes through several transition states, is usually known as an enterprise architecture framework. A framework provides a structured collection of processes, techniques, artifact descriptions, reference models, and guidance for the production and use of an enterprise-specific architecture description. Open-source tools supporting EA practice, such as the Essential Project, have also been evaluated for suitability in academic and commercial training contexts. Paramount to changing the EA is the identification of a sponsor. Their mission, vision, strategy, and the governance framework define all roles, responsibilities, and relationships involved in the anticipated transformation. Changes considered by enterprise architects typically include innovations in the structure or processes of an organization; innovations in the use of information systems or technologies; the integration and/or standardization of business processes; and improvement of the quality and timeliness of business information. According to the standard ISO/IEC/IEEE 42010, the product used to describe the architecture of a system is called an architectural description. In practice, an architectural description contains a variety of lists, tables, and diagrams. These are models known as views. In the case of EA, these models describe the logical business functions or capabilities, business processes, human roles and actors, the physical organization structure, data flows and data stores, business applications and platform applications, hardware, and communications infrastructure. The first use of the term "enterprise architecture" is often incorrectly attributed to John Zachman's 1987 A framework for information systems architecture. The first publication to use it was instead a National Institute of Standards (NIST) Special Publication on the challenges of information system integration. The NIST article describes EA as consisting of several levels. Business unit architecture is the top level and might be a total corporate entity or a sub-unit. It establishes for the whole organization necessary frameworks for "satisfying both internal information needs" as well as the needs of external entities, which include cooperating organizations, customers, and federal agencies. The lower levels of the EA that provide information to higher levels are more attentive to detail on behalf of their superiors. In addition to this structure, business unit architecture establishes standards, policies, and procedures that either enhance or stymie the organization's mission. The main difference between these two definitions is that Zachman's concept was the creation of individual information systems optimized for business, while NIST's described the management of all information systems within a business unit. The definitions in both publications, however, agreed that due to the "increasing size and complexity of the [i]mplementations of [i]nformation systems... logical construct[s] (or architecture) for defining and controlling the interfaces and... [i]ntegration of all the components of a system" is necessary. Zachman in particular urged for a "strategic planning methodology." == Overview == === Schools of thought === Within the field of enterprise architecture, there are three overarching schools: Enterprise IT Design, Enterprise Integrating, and Enterprise Ecosystem Adaption. Which school one subscribes to will impact how they see the EA's purpose and scope, as well as the means of achieving it, the skills needed to conduct it, and the locus of responsibility for conducting it. Under Enterprise IT Design, the main purpose of EA is to guide the process of planning and designing an enterprise's IT/IS capabilities to meet the desired organizational objectives, often by greater alignment between IT/IS and business concerns. Architecture proposals and decisions are limited to the IT/IS aspects of the enterprise and other aspects service only as inputs. The Enterprise Integrating school believes that the purpose of EA is to create a greater coherency between the various concerns of an enterprise (HR, IT, Operations, etc.), including the link between strategy formulation and execution. Architecture proposals and decisions here encompass all aspects of the enterprise. The Enterprise Ecosystem Adaption school states that the purpose of EA is to foster and maintain the learning capabilities of enterprises so they may be sustainable. Consequently, a great deal of emphasis is put on improving the capabilities of the enterprise to improve itself, to innovate, and to coevolve with its environment. Typically, proposals and decisions encompass both the enterprise and its environment. === Benefits, challenges, and criticisms === The benefits of EA are achieved through its direct and indirect contributions to organizational goals. Notable benefits include support in the areas related to design and re-design of the organizational structures during mergers, acquisitions, or

    Read more →
  • Ontology-based data integration

    Ontology-based data integration

    Ontology-based data integration involves the use of one or more ontologies to effectively combine data or information from multiple heterogeneous sources. It is one of the multiple data integration approaches and may be classified as Global-As-View (GAV). The effectiveness of ontology‑based data integration is closely tied to the consistency and expressivity of the ontology used in the integration process. == Background == Data from multiple sources are characterized by multiple types of heterogeneity. The following hierarchy is often used: Syntactic heterogeneity: is a result of differences in representation format of data Schematic or structural heterogeneity: the native model or structure to store data differ in data sources leading to structural heterogeneity. Schematic heterogeneity that particularly appears in structured databases is also an aspect of structural heterogeneity. Semantic heterogeneity: differences in interpretation of the 'meaning' of data are source of semantic heterogeneity System heterogeneity: use of different operating system, hardware platforms lead to system heterogeneity Ontologies, as formal models of representation with explicitly defined concepts and named relationships linking them, are used to address the issue of semantic heterogeneity in data sources. In domains like bioinformatics and biomedicine, the rapid development, adoption and public availability of ontologies [1] Archived 2007-06-16 at the Wayback Machine has made it possible for the data integration community to leverage them for semantic integration of data and information. == The role of ontologies == Ontologies enable the unambiguous identification of entities in heterogeneous information systems and assertion of applicable named relationships that connect these entities together. Specifically, ontologies play the following roles: Content Explication The ontology enables accurate interpretation of data from multiple sources through the explicit definition of terms and relationships in the ontology. Query Model In some systems like SIMS, the query is formulated using the ontology as a global query schema. Verification The ontology verifies the mappings used to integrate data from multiple sources. These mappings may either be user specified or generated by a system. == Approaches using ontologies for data integration == There are three main architectures that are implemented in ontology‑based data integration applications, namely, Single ontology approach A single ontology is used as a global reference model in the system. This is the simplest approach as it can be simulated by other approaches. SIMS is a prominent example of this approach. The Structured Knowledge Source Integration component of Research Cyc is another prominent example of this approach. (Title = Harnessing Cyc to Answer Clinical Researchers' Ad Hoc Queries). The Gellish Taxonomic Dictionary-Ontology follows this approach as well. Multiple ontologies Multiple ontologies, each modeling an individual data source, are used in combination for integration. Though, this approach is more flexible than the single ontology approach, it requires creation of mappings between the multiple ontologies. Ontology mapping is a challenging issue and is focus of large number of research efforts in computer science [2]. The OBSERVER system is an example of this approach. Hybrid approaches The hybrid approach involves the use of multiple ontologies that subscribe to a common, top-level vocabulary. The top-level vocabulary defines the basic terms of the domain. Thus, the hybrid approach makes it easier to use multiple ontologies for integration in presence of the common vocabulary.

    Read more →
  • Magisto

    Magisto

    Magisto provided an online video editing tool (both as a web application and a mobile app) for automated video editing and production. In 2019, the company was acquired by Vimeo for an estimated US$200 million. The Magisto app contained a library of music. The music, largely by independent artists, was sorted by mood and is licensed for in-app use. Magisto had a freemium business model where users can create basic video clips for free. In addition, advanced business, professional and personal service tiers are available via various subscription plans, unlocking more features; such as longer videos, HD, premium themes, customization, and control features. == History == Magisto was founded in 2009 as SightEra (LTD) by Oren Boiman (CEO) and Alex Rav-Acha (CTO). Boiman, frustrated with the amount of time it took editing together videos of his daughter, wanted an easier to use application to capture and share videos. Boiman, a computer scientist that graduated from Tel Aviv University, followed with graduate work in computer vision at the Weizmann Institute of Science. Boiman developed several patent-pending image analysis technologies that analyze unedited videos to identify the most interesting parts. The system recognized faces, animals, landscapes, action sequences, movements and other important content within the video, as well as analyzing speech and audio. These scenes are then edited together, along with music and effects. Magisto was launched publicly on September 20, 2011, as a video editing software web application through which users could upload unedited video footage, choose a title and soundtrack and have their video edited for them automatically. On the following day, Magisto was added to YouTube Create's collection of video production applications. The Magisto iPhone app was launched publicly at the 2012 International Consumer Electronics Show (CES) in Las Vegas. At CES, the company was also awarded first place in the 2012 CES Mobile App Showdown. In August 2012, Magisto launched the Android app on Google Play. In September 2012, Magisto launched a Google Chrome App and announced Google Drive integration. In March 2013, Magisto claimed it had 5 million users. Google listed Magisto as an "Editors’ Choice" on its list of "Best Apps of 2013". In September 2013, the company claimed that 10 million users had downloaded the App. In February 2014, Magisto claimed that they had 20 million users, with 2 million new users per month. The company also confirmed investment from Mail.Ru. In September 2014, Magisto rolled out a feature called 'Instagram Ready' which allowed users to upload 15 second clips that are automatically formatted for Instagram. In the same month, Magisto launched a feature for iOS and Android users, called 'Surprise Me', which created video from still photography on users’ smartphones. In October 2014, Magisto was placed 9th on the 2014 Deloitte Israel Technology Fast 50 list and named as a finalist in the Red Herring's Top 100 Europe award. In July 2015, Magisto released an editing theme dedicated to Jerry Garcia. In April 2019, the company was acquired by Vimeo, the IAC-owned platform for hosting, sharing and monetizing streamed video, for an estimated $200 million. === Financing === In 2011, the company received more than $5.5 million in a Series B venture round funding from Magma Venture Partners and Horizons Ventures. In September 2011, at the same time as the public launch of their web application, Magisto announced a $5.5 million Series B funding round led by Li Ka-shing’s Horizons Ventures. Li Ka-Shing is known for making early-stage investments in companies like Facebook, Spotify, SecondMarket and Siri. In October 2013, the company received $13 million in funding from Qualcomm and Sandisk. In 2014, the company received $2 million in Venture Funding from Magma Venture Partners, Qualcomm Ventures, Horizons Ventures and the Mail.Ru Group. == Awards == Magisto won first place at Technonomy3, an annual Internet Technology start-up competition in Israel. Judges of the competition included Jeff Pulver, TechCrunch editor Mike Butcher, investor Yaron Samid, Bessemer Venture Partners Israel partner Adam Fisher and Brad McCarty of The Next Web. Magisto won first place at CES 2012 Mobile app competition, during the launch of Magisto iOS mobile app. Magisto was awarded twice the Google Play Editor's Choice and was part of iPhone App Store Best App awards for 2013 and 2014, and Wired Essential iPad Apps. Magisto was declared by Deloitte as the 7th fastest growing company in Europe, the Middle East, and Africa in 2016.

    Read more →
  • Two-phase commit protocol

    Two-phase commit protocol

    In transaction processing, databases, and computer networking, the two-phase commit protocol (2PC, tupac) is a type of atomic commitment protocol (ACP). It is a distributed algorithm that coordinates all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) the transaction. This protocol (a specialised type of consensus protocol) achieves its goal even in many cases of temporary system failure (involving either process, network node, communication, etc. failures), and is thus widely used. However, it is not resilient to all possible failure configurations, and in rare cases, manual intervention is needed to remedy an outcome. To accommodate recovery from failure (automatic in most cases) the protocol's participants use logging of the protocol's states. Log records, which are typically slow to generate but survive failures, are used by the protocol's recovery procedures. Many protocol variants exist that primarily differ in logging strategies and recovery mechanisms. Though usually intended to be used infrequently, recovery procedures compose a substantial portion of the protocol, due to many possible failure scenarios to be considered and supported by the protocol. In a "normal execution" of any single distributed transaction (i.e., when no failure occurs, which is typically the most frequent situation), the protocol consists of two phases: The commit-request phase (or voting phase), in which a coordinator process attempts to prepare all the transaction's participating processes (named participants, cohorts, or workers) to take the necessary steps for either committing or aborting the transaction and to vote, either "Yes": commit (if the transaction participant's local portion execution has ended properly), or "No": abort (if a problem has been detected with the local portion), and The commit phase, in which, based on voting of the participants, the coordinator decides whether to commit (only if all have voted "Yes") or abort the transaction (otherwise), and notifies the result to all the participants. The participants then follow with the needed actions (commit or abort) with their local transactional resources (also called recoverable resources; e.g., database data) and their respective portions in the transaction's other output (if applicable). The two-phase commit (2PC) protocol should not be confused with the two-phase locking (2PL) protocol, a concurrency control protocol. == Assumptions == The protocol works in the following manner: one node is a designated coordinator, which is the master site, and the rest of the nodes in the network are designated the participants. The protocol assumes that: there is stable storage at each node with a write-ahead log, no node crashes forever, the data in the write-ahead log is never lost or corrupted in a crash, and any two nodes can communicate with each other. The last assumption is not too restrictive, as network communication can typically be rerouted. The first two assumptions are much stronger; if a node is totally destroyed then data can be lost. The protocol is initiated by the coordinator after the last step of the transaction has been reached. The participants then respond with an agreement message or an abort message depending on whether the transaction has been processed successfully at the participant. == Basic algorithm == === Commit request (or voting) phase === The coordinator sends a query to commit message to all participants and waits until it has received a reply from all participants. The participants execute the transaction up to the point where they will be asked to commit. They each write an entry to their undo log and an entry to their redo log. Each participant replies with: either an agreement message (participant votes Yes to commit), if the participant's actions succeeded; or an abort message (participant votes No to commit), if the participant experiences a failure that will make it impossible to commit. === Commit (or completion) phase === ==== Success ==== If the coordinator received an agreement message from all participants during the commit-request phase: The coordinator sends a commit message to all the participants. Each participant completes the operation, and releases all the locks and resources held during the transaction. Each participant sends an acknowledgement to the coordinator. The coordinator completes the transaction when all acknowledgements have been received. ==== Failure ==== If any participant votes No during the commit-request phase (or the coordinator's timeout expires): The coordinator sends a rollback message to all the participants. Each participant undoes the transaction using the undo log, and releases the resources and locks held during the transaction. Each participant sends an acknowledgement to the coordinator. The coordinator undoes the transaction when all acknowledgements have been received. ==== Message flow ==== Coordinator Participant QUERY TO COMMIT --------------------------------> VOTE YES/NO prepare/abort <------------------------------- commit/abort COMMIT/ROLLBACK --------------------------------> ACKNOWLEDGEMENT commit/abort <-------------------------------- end An next to the record type means that the record is forced to stable storage. == Disadvantages == The greatest disadvantage of the two-phase commit protocol is that it is a blocking protocol. If the coordinator fails permanently, some participants will never resolve their transactions: After a participant has sent an agreement message as a response to the commit-request message from the coordinator, it will block until a commit or rollback is received. A two-phase commit protocol cannot dependably recover from a failure of both the coordinator and a cohort member during the commit phase. If only the coordinator had failed, and no cohort members had received a commit message, it could safely be inferred that no commit had happened. If, however, both the coordinator and a cohort member failed, it is possible that the failed cohort member was the first to be notified, and had actually done the commit. Even if a new coordinator is selected, it cannot confidently proceed with the operation until it has received an agreement from all cohort members, and hence must block until all cohort members respond. == Implementing the two-phase commit protocol == === Common architecture === In many cases the 2PC protocol is distributed in a computer network. It is easily distributed by implementing multiple dedicated 2PC components similar to each other, typically named transaction managers (TMs; also referred to as 2PC agents or Transaction Processing Monitors), that carry out the protocol's execution for each transaction (e.g., The Open Group's X/Open XA). The databases involved with a distributed transaction, the participants, both the coordinator and participants, register to close TMs (typically residing on respective same network nodes as the participants) for terminating that transaction using 2PC. Each distributed transaction has an ad hoc set of TMs, the TMs to which the transaction participants register. A leader, the coordinator TM, exists for each transaction to coordinate 2PC for it, typically the TM of the coordinator database. However, the coordinator role can be transferred to another TM for performance or reliability reasons. Rather than exchanging 2PC messages among themselves, the participants exchange the messages with their respective TMs. The relevant TMs communicate among themselves to execute the 2PC protocol schema above, "representing" the respective participants, for terminating that transaction. With this architecture the protocol is fully distributed (does not need any central processing component or data structure), and scales up with number of network nodes (network size) effectively. This common architecture is also effective for the distribution of other atomic commitment protocols besides 2PC, since all such protocols use the same voting mechanism and outcome propagation to protocol participants. === Protocol optimizations === Database research has been done on ways to get most of the benefits of the two-phase commit protocol while reducing costs by protocol optimizations and protocol operations saving under certain system's behavior assumptions. ==== Presumed abort and presumed commit ==== Presumed abort or Presumed commit are common such optimizations. An assumption about the outcome of transactions, either commit, or abort, can save both messages and logging operations by the participants during the 2PC protocol's execution. For example, when presumed abort, if during system recovery from failure no logged evidence for commit of some transaction is found by the recovery procedure, then it assumes that the transaction has been aborted, and acts accordingly. This means that it does not matter if aborts are logged at all, and such logging can be saved under this assumption. Typical

    Read more →
  • Semantic integration

    Semantic integration

    Semantic integration is the process of interrelating information from diverse sources, for example calendars and to do lists, email archives, presence information (physical, psychological, and social), documents of all sorts, contacts (including social graphs), search results, and advertising and marketing relevance derived from them. In this regard, semantics focuses on the organization of and action upon information by acting as an intermediary between heterogeneous data sources, which may conflict not only by structure but also context or value. == Applications and methods == In enterprise application integration (EAI), semantic integration can facilitate or even automate the communication between computer systems using metadata publishing. Metadata publishing potentially offers the ability to automatically link ontologies. One approach to (semi-)automated ontology mapping requires the definition of a semantic distance or its inverse, semantic similarity and appropriate rules. Other approaches include so-called lexical methods, as well as methodologies that rely on exploiting the structures of the ontologies. For explicitly stating similarity/equality, there exist special properties or relationships in most ontology languages. OWL, for example has "owl:equivalentClass", "owl:equivalentProperty" and "owl:sameAs". Eventually system designs may see the advent of composable architectures where published semantic-based interfaces are joined together to enable new and meaningful capabilities. These could predominately be described by means of design-time declarative specifications, that could ultimately be rendered and executed at run-time. Semantic integration can also be used to facilitate design-time activities of interface design and mapping. In this model, semantics are only explicitly applied to design and the run-time systems work at the syntax level. This "early semantic binding" approach can improve overall system performance while retaining the benefits of semantic driven design. == Semantic integration situations == From the industry use case, it has been observed that the semantic mappings were performed only within the scope of the ontology class or the datatype property. These identified semantic integrations are (1) integration of ontology class instances into another ontology class without any constraint, (2) integration of selected instances in one ontology class into another ontology class by the range constraint of the property value and (3) integration of ontology class instances into another ontology class with the value transformation of the instance property. Each of them requires a particular mapping relationship, which is respectively: (1) equivalent or subsumption mapping relationship, (2) conditional mapping relationship that constraints the value of property (data range) and (3) transformation mapping relationship that transforms the value of property (unit transformation). Each identified mapping relationship can be defined as either (1) direct mapping type, (2) data range mapping type or (3) unit transformation mapping type. == KG vs. RDB approaches == In the case of integrating supplemental data source, KG(Knowledge graph) formally represents the meaning involved in information by describing concepts, relationships between things, and categories of things. These embedded semantics with the data offer significant advantages such as reasoning over data and dealing with heterogeneous data sources. The rules can be applied on KG more efficiently using graph query. For example, the graph query does the data inference through the connected relations, instead of repeated full search of the tables in relational database. KG facilitates the integration of new heterogeneous data by just adding new relationships between existing information and new entities. This facilitation is emphasized for the integration with existing popular linked open data source such as Wikidata.org. SQL query is tightly coupled and rigidly constrained by datatype within the specific database and can join tables and extract data from tables, and the result is generally a table, and a query can join tables by any columns which match by datatype. SPARQL query is the standard query language and protocol for Linked Open Data on the web and loosely coupled with the database so that it facilitates the reusability and can extract data through the relations free from the datatype, and not only extract but also generate additional knowledge graph with more sophisticated operations(logic: transitive/symmetric/inverseOf/functional). The inference based query (query on the existing asserted facts without the generation of new facts by logic) can be fast comparing to the reasoning based query (query on the existing plus the generated/discovered facts based on logic). The information integration of heterogeneous data sources in traditional database is intricate, which requires the redesign of the database table such as changing the structure and/or addition of new data. In the case of semantic query, SPARQL query reflects the relationships between entities in a way that aligned with human's understanding of the domain, so the semantic intention of the query can be seen on the query itself. Unlike SPARQL, SQL query, which reflects the specific structure of the database and derived from matching the relevant primary and foreign keys of tables, loses the semantics of the query by missing the relationships between entities. Below is the example that compares SPARQL and SQL queries for medications that treats "TB of vertebra". SELECT ?medication WHERE { ?diagnosis a example:Diagnosis . ?diagnosis example:name “TB of vertebra” . ?medication example:canTreat ?diagnosis . } SELECT DRUG.medID FROM DIAGNOSIS, DRUG, DRUG_DIAGNOSIS WHERE DIAGNOSIS.diagnosisID=DRUG_DIAGNOSIS.diagnosisID AND DRUG.medID=DRUG_DIAGNOSIS.medID AND DIAGNOSIS.name=”TB of vertebra” == Examples == The Pacific Symposium on Biocomputing has been a venue for the popularization of the ontology mapping task in the biomedical domain, and a number of papers on the subject can be found in its proceedings.

    Read more →
  • Artificial intelligence industry in Canada

    Artificial intelligence industry in Canada

    The artificial intelligence industry in Canada is a rapidly expanding sector. Although Canada held a pioneering role in the early development of artificial intelligence, transforming research excellence into broad commercial adoption has proven challenging. Despite globally recognized scientific achievements and a deep pool of skilled experts, by June 2024, Canada recorded the lowest rate of AI integration among OECD countries, with only 12% of firms implementing AI in their products or services. However, AI adoption has shown significant momentum—doubling from mid-2024 to mid-2025, rising from 6.1% to 12.2%. As of September 2025, Statistics Canada indicated that while about one-third of Canadian businesses had no plans to adopt artificial intelligence in the next year, 14.5% reported intentions to begin using AI for producing goods or delivering services. The primary reasons for not moving forward with AI were lack of relevance, insufficient knowledge, and privacy concerns. According to Public Works Canada (PwC), the pace of AI adoption in Canada is roughly three-quarters of the United States rate, highlighting a notable gap between the two countries in business integration of this technology. British-Canadian computer scientist Geoffrey Hinton stated in 2025 that Canadian companies are adopting artificial intelligence at a slower pace, which may result in the loss of the country's early advantages in the field. At the "All In AI" conference held in Montreal in September 2025, the Minister of Artificial Intelligence and Digital Innovation Evan Solomon, described "Building digital sovereignty" as the most pressing democratic issue of the time. He introduced a 26-person task force focused on updating Canada's AI strategy. In their 2024 report " "Learning Together for Responsible Artificial Intelligence" report, the Innovation, Science, and Economic Development Canada stressed that public awareness, trust, and AI literacy are essential for the responsible adoption and governance of AI in Canada. Montreal workshops in 2021 expanded the OECD's 2019 definition of AI as "the set of computer techniques that enable a machine (e.g., a computer or telephone) to perform tasks that typically require intelligence, such as reasoning or learning. It is also referred to as the automation of intelligent tasks. Scientific developments in AI, such as deep-learning techniques, have made it possible to design access to huge amounts of data and ever-increasing computing power. These new techniques have been rapidly deployed on a large scale in all areas of social life, in transport, education, culture and health." == Federal investments and policy == The 2025 federal budget allocates over $1 billion over the next five years to bolster Canada's artificial intelligence and quantum computing ecosystem. == Industry landscape or research hubs == AlexNet, an influential deep convolutional neural network developed at the University of Toronto by Alex Krizhevsky, Ilya Sutskever, and Geoffrey Hinton, marked a pivotal turning point in modern artificial intelligence. In 2012, it achieved a dramatic reduction in error rates for the ImageNet Large Scale Visual Recognition Challenge (ILSVRC), showcasing the practical power of deep learning and GPU acceleration. The success of AlexNet helped cement Canada’s reputation for AI leadership and inspired rapid adoption of deep learning across the technology sector, with ongoing impact in both academic and commercial domains. In healthcare, AlexNet has been adapted for medical imaging to assist with analyzing radiographs, mammograms, and other scans, including identifying abnormalities and supporting clinical diagnosis. In 2015, the Ottawa-based start-up Advanced Symbolics Inc. (ASI) began developing Polly, an artificial intelligence system designed to analyze and anticipate how target audiences behave—enabling more effective communication strategies and advertising campaigns. Polly was named after its first assignment analyzing the politics of Brexit. The AI gained widespread attention in 2016 for accurately forecasting both the Brexit referendum and the 2016 U.S. presidential election won by Donald Trump. The company states that Polly is used by organizations in diverse sectors—including healthcare, politics, entertainment, and mental health research—to support decision-making based on predictive analytics. Chartwatch, an AI tool developed in Canada, has been shown to reduce unexpected hospital deaths by 26% according to a 2024 study. The system analyzes patient data to detect subtle signs of deterioration, supporting healthcare teams in providing timely interventions. === Notable figures in AI in Canada === Geoffrey Hinton's decades-long work eventually formed the foundation of artificial intelligence, which earned him the Nobel Prize for physics in 2024. Yoshua Bengio, who won the Turing Award in 2018 for his pioneering work in deep learning, founded what would become Mila in 1993. Mila, is currently a collaboration between four Montreal-based academic partners.—the Pan-Canadian Artificial Intelligence Strategy includes Alberta's Amii, Toronto's Vector Institute, and Mila. Fakhreddine Karray's work on operational AI has had tangible impact across several Canadian-relevant sectors, notably intelligent transportation systems, virtual healthcare, and driver safety. === AI in the oil and gas industry === According to a 2020 Ernst & Young report the oil and gas industry in Canada is using AI in automating routine, repetitive, and dangerous tasks with technologies like robotic process automation and machine learning; optimizing production and processing; enhancing transportation logistics; improving equipment operation and monitoring; and enabling preventative maintenance. AI is also deployed for data analysis to improve prediction and decision-making, and is expected to automate up to 50% of job competencies in upstream oil and gas by 2040. Oilsands giant Suncor Energy operates a large fleet of autonomous trucks and has started using AI in its dispatch system at the Mildred Lake mine. As of 2024, AI manages routine tasks such as allocating trucks to dump stations and sending them to refuelling locations. === Indigenous and Inuit Innovation in AI === Indigenous organizations have been working on the creation of new technologies for language revitalization in partnership with National Research Council of Canada since the mid-2010s. In 2025, Inuit researchers and technology partners launched an AI-powered initiative to support the revitalization and preservation of Inuktitut, demonstrating how artificial intelligence can be adapted for Indigenous language and cultural priorities. A 2025 CBC article notes that, while AI can help revitalize Inuktitut, Inuit leaders emphasize concerns about data sovereignty, information ownership, and the need for Indigenous leadership to ensure transparency, privacy, and accountability in AI development. == Regulation == Canada's Artificial Intelligence and Data Act (AIDA) was proposed in November 2022, as part of the Digital Charter Implementation Act (Bill C-27). As well voluntary codes, such as the September 2023 Code of Conduct for Generative AI, and landmark investments in advanced computing infrastructure and the Canadian Artificial Intelligence Safety Institute (CAISI) reflect Canada's commitment to both safety and global competitiveness. == AI infrastructure == Canada has undertaken efforts to expand its AI computing infrastructure at both provincial and federal levels. The federal government's Canadian Sovereign AI Compute Strategy, allocated up to C$2 billion in Budget 2024, aims to enhance computing capacity to support domestic AI industry growth and AI adoption across the economy, with up to C$700 million designated to mobilize private sector investment in new or expanded data centres. Alberta has introduced an AI Data Centres Strategy to position itself as a leading North American destination for data centre investment, targeting C$100 billion worth of AI data centres under development by 2030. One major project under Alberta's strategy is the Wonder Valley AI Data Centre Park near Grande Prairie, which was exempted from provincial environmental impact assessment in April 2026 but still requires permits demonstrating safe construction and operation. According to Statista, as of April 2026, Canada has 287 data centres.

    Read more →
  • How Data Happened

    How Data Happened

    How Data Happened: A History from the Age of Reason to the Age of Algorithms is a 2023 non-fiction book written by Columbia University professors Chris Wiggins and Matthew L. Jones. The book explores the history of data and statistics from the end of the 18th century to the present day. == Content == The book starts at the end of the 18th century, when European states began tabulating physical resources, and ends at the present day, when algorithms manipulate our personal information as a commodity. It looks at the rise of data and statistics, and how early statistical methods were used to justify eugenics, quantify supposed racial differences, and develop military and industrial applications. The authors also discuss the impact of the internet and e-commerce on data collection, the rise of data science, and the consequences of government-run surveillance systems collecting vast amounts of personal data for customized, targeted advertising. They emphasize the importance of privacy and democracy and propose remedies to the problems caused by mass data collection, including stronger regulation of the tech industry and collective action by its employees. The book is a historical analysis that provides context for understanding the debates surrounding data and its control. The book has 336 pages and was published in 2023 by W. W. Norton & Company.

    Read more →
  • List of algorithms

    List of algorithms

    An algorithm is a fundamental set of rules or defined procedures that are typically designed and used to be a simpler way to solve a specific problem or a broad set of problems. Simply speaking, algorithms define different processes, sets of rules and regulations, or methodologies that are to be followed through in calculations, data processing, data mining, pattern recognition, automated reasoning or other problem-solving operations. With the increasing automation of services, more and more decisions are being made by algorithms. Some general examples are risk assessments, anticipatory policing, and pattern recognition technology. The following is a list of well-known algorithms. == Automated planning == == Combinatorial algorithms == === General combinatorial algorithms === Brent's algorithm: finds a cycle in function value iterations using only two iterators Floyd's cycle-finding algorithm: finds a cycle in function value iterations Gale–Shapley algorithm: solves the stable matching problem Pseudorandom number generators (uniformly distributed—see also List of pseudorandom number generators for other PRNGs with varying degrees of convergence and varying statistical quality): ACORN generator Blum Blum Shub Lagged Fibonacci generator Linear congruential generator Mersenne Twister === Graph algorithms === Blossom algorithm: algorithm for constructing maximum-cardinality matching on graphs. Coloring algorithm: algorithms for graph (vertex or edge) coloring (subject to constraints, e.g. proper coloring or list coloring) Hopcroft–Karp algorithm: convert a bipartite graph to a maximum-cardinality matching Hungarian algorithm: algorithm for finding a perfect matching Prüfer coding: conversion between a labeled tree and its Prüfer sequence Tarjan's off-line lowest common ancestors algorithm: computes lowest common ancestors for pairs of nodes in a tree Topological sort: finds linear order of nodes (e.g. jobs) based on their dependencies. ==== Graph drawing ==== Coin graph drawing algorithms for finite connected planar graphs (approximately computing the theoretical circle-packing given by the Koebe-Andreev-Thurston theorem). See also Fáry's theorem on straight-line drawings of planar graphs. Force-based algorithms (also known as force-directed algorithms or spring-based algorithms) Spectral layout ==== Network theory ==== Network analysis Link analysis Girvan–Newman algorithm: detect communities in complex systems Web link analysis Hyperlink-Induced Topic Search (HITS) (also known as Hubs and authorities) PageRank TrustRank Flow networks Dinic's algorithm: is a strongly polynomial algorithm for computing the maximum flow in a flow network. Edmonds–Karp algorithm: implementation of Ford–Fulkerson Ford–Fulkerson algorithm: computes the maximum flow in a graph Karger's algorithm: a Monte Carlo method to compute the minimum cut of a connected graph Push–relabel algorithm: computes a maximum flow in a graph ==== Routing for graphs ==== Edmonds' algorithm (also known as Chu–Liu/Edmonds' algorithm): find maximum or minimum branchings Euclidean minimum spanning tree: algorithms for computing the minimum spanning tree of a set of points in the plane Longest path problem: find a simple path of maximum length in a given graph Minimum spanning tree Borůvka's algorithm Kruskal's algorithm Prim's algorithm Reverse-delete algorithm Nonblocking minimal spanning switch say, for a telephone exchange Shortest path problem Bellman–Ford algorithm: computes shortest paths in a weighted graph (where some of the edge weights may be negative) Dijkstra's algorithm: computes shortest paths in a graph with non-negative edge weights Floyd–Warshall algorithm: solves the all pairs shortest path problem in a weighted, directed graph Johnson's algorithm: all pairs shortest path algorithm in sparse weighted directed graph Transitive closure problem: find the transitive closure of a given binary relation Traveling salesman problem Christofides algorithm Nearest neighbour algorithm Vehicle routing problem Clarke and Wright Saving algorithm Warnsdorff's rule: a heuristic method for solving the Knight's tour problem ==== Graph search ==== A: special case of best-first search that uses heuristics to improve speed B: a best-first graph search algorithm that finds the least-cost path from a given initial node to any goal node (out of one or more possible goals) Backtracking: abandons partial solutions when they are found not to satisfy a complete solution Beam search: is a heuristic search algorithm that is an optimization of best-first search that reduces its memory requirement Beam stack search: integrates backtracking with beam search Best-first search: traverses a graph in the order of likely importance using a priority queue Bidirectional search: find the shortest path from an initial vertex to a goal vertex in a directed graph Breadth-first search: traverses a graph level by level Brute-force search: an exhaustive and reliable search method, but computationally inefficient in many applications D: an incremental heuristic search algorithm Depth-first search: traverses a graph branch by branch Dijkstra's algorithm: a special case of A for which no heuristic function is used General Problem Solver: a seminal theorem-proving algorithm intended to work as a universal problem solver machine. Iterative deepening depth-first search (IDDFS): a state space search strategy Jump point search: an optimization to A which may reduce computation time by an order of magnitude using further heuristics Lexicographic breadth-first search (also known as Lex-BFS): a linear time algorithm for ordering the vertices of a graph SSS: state space search traversing a game tree in a best-first fashion similar to that of the A search algorithm Uniform-cost search: a tree search that finds the lowest-cost route where costs vary ==== Subgraphs ==== Cliques Bron–Kerbosch algorithm: a technique for finding maximal cliques in an undirected graph MaxCliqueDyn maximum clique algorithm: find a maximum clique in an undirected graph Strongly connected components Kosaraju's algorithm Path-based strong component algorithm Tarjan's strongly connected components algorithm Subgraph isomorphism problem === Sequence algorithms === ==== Approximate sequence matching ==== Bitap algorithm: fuzzy algorithm that determines if strings are approximately equal. Phonetic algorithms Daitch–Mokotoff Soundex: a Soundex refinement which allows matching of Slavic and Germanic surnames Double Metaphone: an improvement on Metaphone Match rating approach: a phonetic algorithm developed by Western Airlines Metaphone: an algorithm for indexing words by their sound, when pronounced in English NYSIIS: phonetic algorithm, improves on Soundex Soundex: a phonetic algorithm for indexing names by sound, as pronounced in English String metrics: computes a similarity or dissimilarity (distance) score between two pairs of text strings Damerau–Levenshtein distance: computes a distance measure between two strings, improves on Levenshtein distance Dice's coefficient (also known as the Dice coefficient): a similarity measure related to the Jaccard index Hamming distance: sum number of positions which are different Jaro–Winkler distance: is a measure of similarity between two strings Levenshtein edit distance: computes a metric for the amount of difference between two sequences Trigram search: search for text when the exact syntax or spelling of the target object is not precisely known ==== Selection algorithms ==== Introselect Quickselect ==== Sequence search ==== Linear search: locates an item in an unsorted sequence Selection algorithm: finds the kth largest item in a sequence Sorted lists Binary search algorithm: locates an item in a sorted sequence Eytzinger binary search: cache friendly binary search algorithm Fibonacci search technique: search a sorted sequence using a divide and conquer algorithm that narrows down possible locations with the aid of Fibonacci numbers Jump search (or block search): linear search on a smaller subset of the sequence Predictive search: binary-like search which factors in magnitude of search term versus the high and low values in the search. Sometimes called dictionary search or interpolated search. Uniform binary search: an optimization of the classic binary search algorithm Ternary search: a technique for finding the minimum or maximum of a function that is either strictly increasing and then strictly decreasing or vice versa ==== Sequence merging ==== k-way merge algorithm Simple merge algorithm Union (merge, with elements on the output not repeated) ==== Sequence permutations ==== Fisher–Yates shuffle (also known as the Knuth shuffle): randomly shuffle a finite set Heap's permutation generation algorithm: interchange elements to generate next permutation Schensted algorithm: constructs a pair of Young tableaux from a permutation Steinhaus–Johnson–Trotter algorithm (also known as the Johnson–Trotter algorithm):

    Read more →
  • Documentation science

    Documentation science

    Documentation science is the study of the recording and retrieval of information. It includes methods for storing, retrieving, and sharing of information captured on physical as well as digital documents. This field is closely linked to the fields of library science and information science but has its own theories and practices. The term documentation science was coined by Belgian lawyer and peace activist Paul Otlet. He is considered to be the forefather of information science. He along with Henri La Fontaine laid the foundations of documentation science as a field of study. Professionals in this field are called documentalists. Over the years, documentation science has grown to become a large and important field of study. Evolving from traditional practices like archiving and retrieval to modern theories about the nature of documents, novel methods for organizing digital information, and applications in libraries, research, healthcare, business, and technology and more. This field continues to evolve in the digital age. == Developments in documentation science == 1895: The International Institute of Bibliography (originally Institut International de Bibliographie, IIB) was established on 12 September 1895, in Brussels, Belgium by Paul Otlet and Henri La Fontaine. It aimed to catalog all recorded knowledge using a universal classification system now known as the Universal Decimal Classification (UDC). 1931: International Institute of Bibliography (originally Institut International de Bibliographie, IIB) was renamed The International Institute for Documentation, (Institut International de Documentation, IID). 1934: Paul Otlet envisioned a “radiated library,” a global network of interconnected documents accessible from anywhere via telecommunication. This early idea is now seen as a forerunner of the internet. 1937: American Documentation Institute was founded (1968 nameshift to American Society for Information Science). 1951: Suzanne Briet published Qu'est-ce que la documentation? where she proposed that “a document is evidence in support of a fact,” expanding the definition to include objects such as animals in zoos when they are part of a scientific study. This was a significant theoretical shift in defining documents. 1965-1990: Documentation departments were established, for example, large research libraries, online computer retrieval systems and more. The persons doing the searches were called documentalists. But with the appearance of first CD-ROM databases in the mid-1980s and later the internet in 1990s, these intermediary searches decreased and most such departments closed or merged with other departments. 1996: "Dokvit", Documentation Studies, was established in 1996 at the University of Tromsø in Norway. 2001: The Document Academy was established. It is an international network that celebrates documentation. It was conducted by The Program of Documentation Studies, University of Tromsø, Norway and The School of Information Management and Systems, UC Berkeley. 2003: The first Document Research Conference (DOCAM), a series of conferences made by the Document Academy. DOCAM '03 (2003) was held 13–15 August 2003 at The School of Information Management and Systems (SIMS) at the University of California, Berkeley. 2007: Michael Buckland, Ronald Day, and Birger Hjørland expanded the theoretical foundations of documentation science. They researched and explored documents to be social artifacts, the role of ideology in classification, and how documents influenced knowledge systems. 2010s: The concept of post-documentation or “documentality” began in the 2010s, which focused on how digital traces (e.g., tweets, logs) function as documents without traditional physical form. This led to new thinking in document theory. 2016–present: The Document Academy's DOCAM conferences have continued, offering ongoing developments in the theory and practice of documentation. Themes include affect, memory, activism, and born-digital records. 2017: The journal Information Research published special issues addressing “document theory,” including views on documentation in virtual environments and digital archives. 2020–present: The growth of research data management (RDM) and open science has made documentation practices central to data sharing, metadata standards, and reproducibility in scientific work. == Theoretical foundations == Documentation science has some deep theories that explain what a document is, how people use documents, and how they are organized. These concepts were introduced by scholars who have not only studied libraries, but also philosophy, language, and social sciences. Suzanne Briet described a document as “any material form of evidence” that is made to be used as proof or to share information. An antelope in a zoo, for example, can be a document because it is being studied, classified, and described. Documents are not just things or materials but are also shaped by society. Michael Buckland noted that documents have meaning only when people agree they are useful or valid as information. He explained a document becomes a document when someone decides to use it as evidence. Ronald Day wrote about how documentation is not neutral, it can be influenced by power, ideology, and politics. He claimed that classification systems, like how libraries organize books, are not just technical tools. They also show what kinds of knowledge are seen as more important than others. In recent years, new theories have been introduced, like “documentality” by Maurizio Ferraris. He proposed that a document does not have to be a paper or file, it can also be something digital like a tweet, a database entry, or a log file, as long as it leaves a trace that can be looked at later. This theory helps explain modern digital documents. == Methodologies and practice == Documentation science includes many methods that help people collect, organize, store, and find information. These practices are used in libraries, archives, research labs, companies, and now also in online systems. === Collecting and creating documents === In the past, documentation work included gathering books, articles, reports, and other printed materials. People created records of these materials manually, using catalog cards, indexes, or bibliographies. Paul Otlet’s work with the Universal Bibliographic Repertory is one example. He created millions of card entries to organize knowledge from around the world. Today, documents are not only created by humans. Computers and machines also generate documents, like log files, metadata, and sensor data. These need new tools and methods for collection and management. === Organizing information === Organizing documents has always been a foundational element of documentation science. Methods like classification (dividing things into groups) and indexing (making lists of topics or keywords) help individuals find what they need. A widely used system is the Universal Decimal Classification (UDC) developed by Otlet and La Fontaine. Another is the Library of Congress Classification (LCC) used in the majority of U.S. libraries. Indexing can be performed by humans or by software programs that read the text and add tags to documents. Metadata is also used to describe documents. Metadata is “data about data” like the title, author, date, and subject of a document. Standards like Dublin Core are used in digital libraries to keep metadata consistent. === Retrieval and access === One of the main objectives of documentation is helping users find the right document. This is called information retrieval. In the past, this meant using catalog drawers or printed indexes. Today, people use search engines, databases, and digital libraries. Modern retrieval tools use Boolean logic, ranking algorithms, and sometimes machine learning to show the most useful results first. This is part of what is studied in both documentation science and information retrieval. === Preservation and archiving === Documents require long-term storage. This is called preservation of documents. Printed documents can be damaged by light, pests, or even time on the other hand digital documents can be deemed worthless if formats become outdated or storage facilities fail. Archivists use methods like migration, which includes moving files to new formats, and emulation, which replicates obsolete systems, to preserve materials. These methods and tools are ever changing as new technologies develop. But the main objective of documentation has remained the same, which is to keep information safe, organized, and easy to find. == Documentation in the digital age == With the expansion of the internet, computers, and cloud storage, documents are no longer just books, papers, or reports. They can now be emails, tweets, videos, websites, databases, or even log files created by machines. === Born-digital documents === Many documents today are created directly in digital form. These are called born-digit

    Read more →
  • Algorithmic logic

    Algorithmic logic

    Algorithmic logic is a calculus of programs that allows the expression of semantic properties of programs by appropriate logical formulas. It provides a framework that enables proving the formulas from the axioms of program constructs such as assignment, iteration and composition instructions and from the axioms of the data structures in question see Mirkowska & Salwicki (1987), Banachowski et al. (1977). The following diagram helps to locate algorithmic logic among other logics. [ P r o p o s i t i o n a l l o g i c o r S e n t e n t i a l c a l c u l u s ] ⊂ [ P r e d i c a t e c a l c u l u s o r F i r s t o r d e r l o g i c ] ⊂ [ C a l c u l u s o f p r o g r a m s o r Algorithmic logic ] {\displaystyle \qquad \left[{\begin{array}{l}\mathrm {Propositional\ logic} \\or\\\mathrm {Sentential\ calculus} \end{array}}\right]\subset \left[{\begin{array}{l}\mathrm {Predicate\ calculus} \\or\\\mathrm {First\ order\ logic} \end{array}}\right]\subset \left[{\begin{array}{l}\mathrm {Calculus\ of\ programs} \\or\\{\mbox{Algorithmic logic}}\end{array}}\right]} The formalized language of algorithmic logic (and of algorithmic theories of various data structures) contains three types of well formed expressions: Terms - i.e. expressions denoting operations on elements of data structures, formulas - i.e. expressions denoting the relations among elements of data structures, programs - i.e. algorithms - these expressions describe the computations. For semantics of terms and formulas consult pages on first-order logic and Tarski's semantics. The meaning of a program K {\displaystyle K} is the set of possible computations of the program. Algorithmic logic is one of many logics of programs. Another logic of programs is dynamic logic, see dynamic logic, Harel, Kozen & Tiuryn (2000).

    Read more →
  • Himmat (app)

    Himmat (app)

    Himmat is a women's safety mobile application of Delhi Police. It was launched by Home Minister Rajnath Singh on 1 January 2015. The app is freely available for Android mobile phones and can be downloaded from Delhi Police website. Delhi Police plans to launch app for other platforms in future. Low registrations and other problems resulted in a parliamentary panel calling the app a failure in 2018. Himmat has gone on to be called as one of India's best safety apps for women.

    Read more →
  • Nike+iPod

    Nike+iPod

    The Nike+iPod Sport Kit is an activity tracker device, developed by Nike, Inc., which measures and records the distance and pace of a walk or run. The Nike+iPod consists of a small transmitter device attached to or embedded in a shoe, which communicates with either the Nike+ Sportband, or a receiver plugged into an iPod Nano. It can also work directly with a 2nd Generation iPod Touch (or higher), iPhone 3GS, iPhone 4, iPhone 4S, iPhone 5, The Nike+iPod was announced on May 23, 2006. On September 7, 2010, Nike released the Nike+ Running App (originally called Nike+ GPS) on the App Store, which used a tracking engine powered by MotionX that does not require the separate shoe sensor or pedometer. This application works using the accelerometer and GPS of the iPhone and the accelerometer of the iPod Touch, which does not have a GPS chip. Nike+Running is compatible with the iPhone 6 and iPhone 6 Plus down to iPhone 3GS and iPod touch. On June 21, 2012, Nike released Nike+ Running App for Android. The current app is compatible with all Android phones running 4.0.3 and up. == Overview == The sensor and iPod kit were revealed on May 20, 2006. The kit stores information such as the elapsed time of the workout, the distance traveled, pace, and calories burned by the individual. Nike+ was a collaboration between Nike and Apple; the platform consisted of an iPod, a wireless chip, Nike shoes that accepted the wireless chip, an iTunes membership, and a Nike+ online community. iPods using Nike iPod require a sensor and remote. The next upgraded product was the Sportband kit, which was announced in April 2008. The kit allows users to store run information without the iPod Nano. The Sportband consists of two parts: a rubber holding strap which is worn around the wrist, and a receiver which resembles a USB key-disk. The receiver displays information comparable to that of the iPod kit on the built-in display. After a run, the receiver can be plugged straight into a USB port and the software will upload the run information automatically to the Nike+ website. As of August 2008 "Nike+iPod for the Gym" launched, allowing users to record their cardio workouts directly to their iPods. No Sport kit or shoe sensor is required; all that is needed is a compatible iPod (1st–6th generation iPod Nano or 2nd/3rd gen iPod Touch) and an enabled piece of cardio equipment. As of March 2009, the seven largest commercial equipment providers were shipping enabled equipment (Life Fitness, Technogym, Precor USA, Star Trac, Cybex International, Matrix Fitness and Free Motion). The models of compatible cardio equipment include treadmills, stationary bicycles, stair climbers, ellipticals, and others such as Precor's Adaptive Motion Trainer. Once the user syncs an iPod with iTunes, the cardio workouts are automatically stored at Nikeplus.com, where each workout is visualized and tracked based on the number of calories burned. The calories are converted to "CardioMiles", at a ratio of 100:1, allowing cardio users to take full advantage of all the tools and features of Nikeplus.com, and allow them to engage in challenges with other runners, walkers and cardio users, using a common currency. With the release of the second-generation iPod Touch in 2008, Apple Inc. included a built-in ability to receive Nike+ signals, which allowed the iPod to connect directly to the wireless sensor thus eliminating the need for an external receiver to be connected. Apple also added this capability to the iPhone 3GS (released 2009), iPhone 4 (2010), and third-generation iPod Touch (2009). Those devices use their Broadcom Bluetooth chipset to receive the signals. On June 7, 2010, Polar and Nike introduced the Polar WearLink+ that works with Nike+. This new product works with the Nike+ SportBand and the fifth generation iPod nano in conjunction with the Nike+ iPod Sport Kit. Polar WearLink+ that works with Nike+ communicates directly with the fifth generation iPod nano and Nike+ SportBand using a proprietary digital protocol but it is dual-mode so it is also compatible with most Polar training computers (all those using 5 kHz analog transmission technology). Nike+ had 18 million global users as of April 2013. One year later, Nike updated the number of global users to 28 million. In iOS 6.1.2 (and possibly higher), a hole in the compatibility for the app has allowed jailbroken iPad users to use the native Nike + iPod iPhone and iPod app by moving the app bundle and setting permissions for the app. On April 30, 2018, Nike retired services for legacy Nike wearable devices, such as the Nike+ FuelBand and the Nike+ SportWatch GPS, and previous versions of apps, including Nike Run Club and Nike Training Club version 4.X and lower. Likewise, Nike no longer supported the Nike+ Connect software that transferred data to a NikePlus Profile or the Nike+ Fuel/FuelBand and Nike+ Move apps. == Sports kit equipment == The kit consists of two pieces: a piezoelectric sensor with a Nordic Semiconductor nRF2402 transmitter that is mounted under the inner sole of the shoe and a receiver that connects to the iPod. They communicate using a 2.4 GHz wireless radio and use Nordic Semiconductor's "ShockBurst" network protocol. The wireless data is encrypted in transit, but some uniquely identifying data is sent in the plain. The wireless protocol was reverse engineered and documented by Dmitry Grinberg in 2011. Nike recommends that the shoe be a Nike+ model with a special pocket in which to place the device. Nike has released the sensor for individual sale meaning that consumers no longer have to purchase the whole set (the iPod receiver and sensor). As the sensor battery cannot be replaced, a new one must be purchased every time the battery runs out. Aftermarket solutions are available to users who do not want to use shoes with built-in or hand-made pockets for the foot sensor, such as shoe pouches and containment devices designed to affix the sensor against the shoe laces. No matter how the sensor is integrated with the user's shoes, care must be taken that it is firmly fixed in place and will not jerk around while in use, which would degrade the accuracy. == Sports kit usage == The Sports Kit can be used to track running, which it refers to as "workouts". New workouts are started by plugging the receiving unit into the iPod, then navigating through the iPod menu system. The user chooses a goal for the workout, which might be to cover a specific distance, or burn a number of calories, or work out for a specified time. A workout can also be started without a goal, which is called a "Basic Workout". When the workout goal has been set, the receiver seeks the sensor, possibly asking the user to "walk around to activate [the] sensor". The user then must press the center button on the iPod to begin the workout. Audio feedback is provided in the user's choice of generic male or female voice by the iPod over the course of the workout, depending on the type of workout chosen. For goal-oriented workouts, the feedback will correspond to significant milestones toward the goal. In a distance workout, for example, the audio feedback will inform the user as each mile or kilometer has been completed, as well as the half-way point of the workout, and a countdown of four 100-meter increments at the end of the workout. The iPod's control wheel functions change slightly during a workout. The Pause button now not only pauses the music but also the workout. Similarly, the Menu button is used to access the controls to end the workout. The Forward and Back buttons are unchanged, performing audio track skip and reverse functions. The Center button has two functions: audio feedback about the current distance, time, and pace are provided when the button is tapped once, while if the button is held down the iPod skips to the "PowerSong" - an audio track chosen by the user, generally intended for motivation. In addition to the in-workout audio feedback, there are pre-recorded congratulations provided by Lance Armstrong, Tiger Woods, Joan Benoit Samuelson, and Paula Radcliffe whenever a user achieves a personal best (such as fastest mile, fastest 5K, fastest 10K, longest run yet) or reaches certain long-term milestones (such as 250 miles, 500 kilometers). This "celebrity feedback" is heard after the usual end-of-run statistics. While the Sports Kit can be used immediately after purchase, it will report more accurate results if it is calibrated before the first usage and then regularly afterwards. For calibration, the user finds a fixed known distance of at least 0.25 mile or 400 meters and then sets the Nike+ to calibration mode for the walk or run over that distance. When the walk or run is complete, the device calibrates itself and future workout reporting will reflect statistics closer to that individual user's workout style. Consumer Reports magazine tested the device and found it accurate as long as you keep an even pace. In workouts with varied pa

    Read more →
  • Two-phase commit protocol

    Two-phase commit protocol

    In transaction processing, databases, and computer networking, the two-phase commit protocol (2PC, tupac) is a type of atomic commitment protocol (ACP). It is a distributed algorithm that coordinates all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) the transaction. This protocol (a specialised type of consensus protocol) achieves its goal even in many cases of temporary system failure (involving either process, network node, communication, etc. failures), and is thus widely used. However, it is not resilient to all possible failure configurations, and in rare cases, manual intervention is needed to remedy an outcome. To accommodate recovery from failure (automatic in most cases) the protocol's participants use logging of the protocol's states. Log records, which are typically slow to generate but survive failures, are used by the protocol's recovery procedures. Many protocol variants exist that primarily differ in logging strategies and recovery mechanisms. Though usually intended to be used infrequently, recovery procedures compose a substantial portion of the protocol, due to many possible failure scenarios to be considered and supported by the protocol. In a "normal execution" of any single distributed transaction (i.e., when no failure occurs, which is typically the most frequent situation), the protocol consists of two phases: The commit-request phase (or voting phase), in which a coordinator process attempts to prepare all the transaction's participating processes (named participants, cohorts, or workers) to take the necessary steps for either committing or aborting the transaction and to vote, either "Yes": commit (if the transaction participant's local portion execution has ended properly), or "No": abort (if a problem has been detected with the local portion), and The commit phase, in which, based on voting of the participants, the coordinator decides whether to commit (only if all have voted "Yes") or abort the transaction (otherwise), and notifies the result to all the participants. The participants then follow with the needed actions (commit or abort) with their local transactional resources (also called recoverable resources; e.g., database data) and their respective portions in the transaction's other output (if applicable). The two-phase commit (2PC) protocol should not be confused with the two-phase locking (2PL) protocol, a concurrency control protocol. == Assumptions == The protocol works in the following manner: one node is a designated coordinator, which is the master site, and the rest of the nodes in the network are designated the participants. The protocol assumes that: there is stable storage at each node with a write-ahead log, no node crashes forever, the data in the write-ahead log is never lost or corrupted in a crash, and any two nodes can communicate with each other. The last assumption is not too restrictive, as network communication can typically be rerouted. The first two assumptions are much stronger; if a node is totally destroyed then data can be lost. The protocol is initiated by the coordinator after the last step of the transaction has been reached. The participants then respond with an agreement message or an abort message depending on whether the transaction has been processed successfully at the participant. == Basic algorithm == === Commit request (or voting) phase === The coordinator sends a query to commit message to all participants and waits until it has received a reply from all participants. The participants execute the transaction up to the point where they will be asked to commit. They each write an entry to their undo log and an entry to their redo log. Each participant replies with: either an agreement message (participant votes Yes to commit), if the participant's actions succeeded; or an abort message (participant votes No to commit), if the participant experiences a failure that will make it impossible to commit. === Commit (or completion) phase === ==== Success ==== If the coordinator received an agreement message from all participants during the commit-request phase: The coordinator sends a commit message to all the participants. Each participant completes the operation, and releases all the locks and resources held during the transaction. Each participant sends an acknowledgement to the coordinator. The coordinator completes the transaction when all acknowledgements have been received. ==== Failure ==== If any participant votes No during the commit-request phase (or the coordinator's timeout expires): The coordinator sends a rollback message to all the participants. Each participant undoes the transaction using the undo log, and releases the resources and locks held during the transaction. Each participant sends an acknowledgement to the coordinator. The coordinator undoes the transaction when all acknowledgements have been received. ==== Message flow ==== Coordinator Participant QUERY TO COMMIT --------------------------------> VOTE YES/NO prepare/abort <------------------------------- commit/abort COMMIT/ROLLBACK --------------------------------> ACKNOWLEDGEMENT commit/abort <-------------------------------- end An next to the record type means that the record is forced to stable storage. == Disadvantages == The greatest disadvantage of the two-phase commit protocol is that it is a blocking protocol. If the coordinator fails permanently, some participants will never resolve their transactions: After a participant has sent an agreement message as a response to the commit-request message from the coordinator, it will block until a commit or rollback is received. A two-phase commit protocol cannot dependably recover from a failure of both the coordinator and a cohort member during the commit phase. If only the coordinator had failed, and no cohort members had received a commit message, it could safely be inferred that no commit had happened. If, however, both the coordinator and a cohort member failed, it is possible that the failed cohort member was the first to be notified, and had actually done the commit. Even if a new coordinator is selected, it cannot confidently proceed with the operation until it has received an agreement from all cohort members, and hence must block until all cohort members respond. == Implementing the two-phase commit protocol == === Common architecture === In many cases the 2PC protocol is distributed in a computer network. It is easily distributed by implementing multiple dedicated 2PC components similar to each other, typically named transaction managers (TMs; also referred to as 2PC agents or Transaction Processing Monitors), that carry out the protocol's execution for each transaction (e.g., The Open Group's X/Open XA). The databases involved with a distributed transaction, the participants, both the coordinator and participants, register to close TMs (typically residing on respective same network nodes as the participants) for terminating that transaction using 2PC. Each distributed transaction has an ad hoc set of TMs, the TMs to which the transaction participants register. A leader, the coordinator TM, exists for each transaction to coordinate 2PC for it, typically the TM of the coordinator database. However, the coordinator role can be transferred to another TM for performance or reliability reasons. Rather than exchanging 2PC messages among themselves, the participants exchange the messages with their respective TMs. The relevant TMs communicate among themselves to execute the 2PC protocol schema above, "representing" the respective participants, for terminating that transaction. With this architecture the protocol is fully distributed (does not need any central processing component or data structure), and scales up with number of network nodes (network size) effectively. This common architecture is also effective for the distribution of other atomic commitment protocols besides 2PC, since all such protocols use the same voting mechanism and outcome propagation to protocol participants. === Protocol optimizations === Database research has been done on ways to get most of the benefits of the two-phase commit protocol while reducing costs by protocol optimizations and protocol operations saving under certain system's behavior assumptions. ==== Presumed abort and presumed commit ==== Presumed abort or Presumed commit are common such optimizations. An assumption about the outcome of transactions, either commit, or abort, can save both messages and logging operations by the participants during the 2PC protocol's execution. For example, when presumed abort, if during system recovery from failure no logged evidence for commit of some transaction is found by the recovery procedure, then it assumes that the transaction has been aborted, and acts accordingly. This means that it does not matter if aborts are logged at all, and such logging can be saved under this assumption. Typical

    Read more →