Lossless join decomposition

Lossless join decomposition

In database design, a lossless join decomposition is a decomposition of a relation r {\displaystyle r} into relations r 1 , r 2 {\displaystyle r_{1},r_{2}} such that a natural join of the two smaller relations yields back the original relation. This is central in removing redundancy safely from databases while preserving the original data. Lossless join can also be called non-additive. == Definition == A relation r {\displaystyle r} on schema R {\displaystyle R} decomposes losslessly onto schemas R 1 {\displaystyle R_{1}} and R 2 {\displaystyle R_{2}} if π R 1 ( r ) ⋈ π R 2 ( r ) = r {\displaystyle \pi _{R_{1}}(r)\bowtie \pi _{R_{2}}(r)=r} , that is r {\displaystyle r} is the natural join of its projections onto the smaller schemas. A pair ( R 1 , R 2 ) {\displaystyle (R_{1},R_{2})} is a lossless-join decomposition of R {\displaystyle R} or said to have a lossless join with respect to a set of functional dependencies F {\displaystyle F} if any relation r ( R ) {\displaystyle r(R)} that satisfies F {\displaystyle F} decomposes losslessly onto R 1 {\displaystyle R_{1}} and R 2 {\displaystyle R_{2}} . Decompositions into more than two schemas can be defined in the same way. == Criteria == A decomposition R = R 1 ∪ R 2 {\displaystyle R=R_{1}\cup R_{2}} has a lossless join with respect to F {\displaystyle F} if and only if the closure of R 1 ∩ R 2 {\displaystyle R_{1}\cap R_{2}} includes R 1 ∖ R 2 {\displaystyle R_{1}\setminus R_{2}} or R 2 ∖ R 1 {\displaystyle R_{2}\setminus R_{1}} . In other words, one of the following must hold: ( R 1 ∩ R 2 ) → ( R 1 ∖ R 2 ) ∈ F + {\displaystyle (R_{1}\cap R_{2})\to (R_{1}\setminus R_{2})\in F^{+}} ( R 1 ∩ R 2 ) → ( R 2 ∖ R 1 ) ∈ F + {\displaystyle (R_{1}\cap R_{2})\to (R_{2}\setminus R_{1})\in F^{+}} === Criteria for multiple sub-schemas === Multiple sub-schemas R 1 , R 2 , . . . , R n {\displaystyle R_{1},R_{2},...,R_{n}} have a lossless join if there is some way in which we can repeatedly perform lossless joins until all the schemas have been joined into a single schema. Once we have a new sub-schema made from a lossless join, we are not allowed to use any of its isolated sub-schema to join with any of the other schemas. For example, if we can do a lossless join on a pair of schemas R i , R j {\displaystyle R_{i},R_{j}} to form a new schema R i , j {\displaystyle R_{i,j}} , we use this new schema (rather than R i {\displaystyle R_{i}} or R j {\displaystyle R_{j}} ) to form a lossless join with another schema R k {\displaystyle R_{k}} (which may already be joined (e.g., R k , l {\displaystyle R_{k,l}} )). == Example == Let R = { A , B , C , D } {\displaystyle R=\{A,B,C,D\}} be the relation schema, with attributes A, B, C and D. Let F = { A → B C } {\displaystyle F=\{A\rightarrow BC\}} be the set of functional dependencies. Decomposition into R 1 = { A , B , C } {\displaystyle R_{1}=\{A,B,C\}} and R 2 = { A , D } {\displaystyle R_{2}=\{A,D\}} is lossless under F because R 1 ∩ R 2 = A {\displaystyle R_{1}\cap R_{2}=A} and we have a functional dependency A → B C {\displaystyle A\rightarrow BC} . In other words, we have proven that ( R 1 ∩ R 2 → R 1 ∖ R 2 ) ∈ F + {\displaystyle (R_{1}\cap R_{2}\rightarrow R_{1}\setminus R_{2})\in F^{+}} .

Friendica

Friendica (formerly Friendika, originally Mistpark) is a free and open-source software distributed social network. It forms one part of the Fediverse, an interconnected and decentralized network of independently operated servers. == Features == Friendica users can connect with others via their own Friendica server, but may also fully integrate contacts from other platforms including Diaspora, Pump.io, GNU social, email, Discourse and more recently ActivityPub (including Mastodon, Pleroma and Pixelfed) and Bluesky into their 'newsfeed'. In addition to these two way connections, users can also use Friendica as a publishing platform to post content to WordPress, Tumblr, Insanejournal and Libertree. Posting to Google+ was also supported until that service was shut down. In addition, RSS feeds can be ingested. Because users are distributed across many servers, their "addresses" consist of a username, the "@" symbol, and the domain name of the Friendica instance in the same manner email addresses are formed. Twitter support was available but was deprecated due to API changes under Elon Musk's leadership rendering it unusable. Most of the functionality from major microblogging and social networking platforms are available in Friendica; for example, tagging users and groups via "@ mentions"; direct messages; hashtags; photo albums; "likes"; "dislikes"; comments; and re-shares of publicly visible posts. Published items can be edited and updated across the network. Comprehensive settings for privacy and the public visibility of posts allow users to regulate who can read which contributions, or see specific information about the user. Users can also create multiple profiles, allowing different groups of people (such as friends, or work mates) to see a different profile entirely when viewing the same page. User accounts can be downloaded or deleted, and can be imported to a different Friendica server if so required. Public forums can be created under different accounts, which can be switched between if the accounts are registered with the same email address. == Development == There is no corporation behind Friendica. The developers work on a voluntary basis and the project is run informally; the platform itself is used for the communication between the developers. There are different forums within Friendica, such as "Friendica Developers" and "Friendica Support". The source code of Friendica is hosted on GitHub. == Installation == The developers aim to make installation of the software as simple as possible for technical laymen. They argue that decentralization on small servers is a key condition for the freedom of users and their self-determination. The difficulty level is similar to an installation of WordPress. However, the installing on shared hosting is sometimes difficult because of missing PHP5 modules. Some volunteers also run public servers so that newcomers can also avoid the installation of their own software. == List of clients == Friendica implements multiple client-server API variants simultaneously. Along with endpoints needed to use enhanced Friendica features, it also implements the API used by GNU social, Twitter and since version 2021.06 also the one used by Mastodon. As a result, most GNU social and Mastodon clients can be used for Friendica. Examples of Friendica compatible clients include: Raccoon for Friendica, Friendiqa, Fedilab, AndStatus, Twidere and DiCa for Android, friendly for Sailfish OS, friclicli (CLI client), choqok and Friendiqa for Linux and Friendica Mobile for Windows 10. == Reception == Friendica was cited in January 2012 by Infoshop News as an "alternative to Google+ and Facebook" to be used on the Occupy Nigeria movement. In January 2012 Free Software Foundation Europe's blog cited Friendica as a reasonable alternative to centralized and controlled social networks such as Facebook or Google+. Biblical Notes writer J. Randal Matheny described Friendica in January 2012 as "One social networking option flying under the radar until recently deserves consideration as an already stable platform with a wide range of options, applications, plug-ins, and possibilities for opening up the Internet." In February 2012, the German computer magazine c't wrote: "Friendica demonstrates how decentralized social networks can become widely accepted." Another German publication, the professional magazine t3n listed Friendica as a Facebook rival in an online article in March 2012 about Facebook alternatives. It compared Friendica with similar social networks like Diaspora and identi.ca. MSN Tech & Gadgets contributor Emma Boyes wrote about Friendica in May 2012: "why you'll love it: you can use it to access all the other social networks and get recommendations of new friends and groups to join. Friendica is open source and decentralised. There's no corporation behind it and there are extensive privacy settings. You can choose from a variety of user interfaces and it boasts some cool features—for instance, being able to key in a list of your interests and use the 'profile match' feature to recommend other users who share them with you. A word of warning, though, the site is not as user-friendly as the others on this list, so it may be this one is one for the geeks." == Later reviews == Acquisition of Twitter by Elon Musk had revitalized public interest in Fediverse technologies in April 2022. Friendica received favorable reviews, with a PCMag article describing it as "mostly comparable to Facebook", drawing a parallel to Google+ and highlighting using it "for planning events, and its multiple profile feature means you can show a different face to your friends, coworkers, and family". The September 2022 issue of Linux Magazine contains a detailed comparison and walk-through of registering to and using basic functions of Diaspora, Friendica and Mastodon. They describe Friendica as "intuitive" and highlight the "huge choice of account settings" and that "Friendica does not require any specific hardware, so you can use an old computer system as a server." == Vulnerabilities == In September 2020, a hotfix was released to patch a security vulnerability that could leak sensitive information from the server environment since versions released in April 2019 (develop branch) and June 2019 (stable).

Operational taxonomic unit

An operational taxonomic unit (OTU) is an operational definition used to classify groups of closely related individuals. The term was originally introduced in 1963 by Robert R. Sokal and Peter H. A. Sneath in the context of numerical taxonomy, where an "operational taxonomic unit" is simply the group of organisms currently being studied. In this sense, an OTU is a pragmatic definition to group individuals by similarity, equivalent to but not necessarily in line with classical Linnaean taxonomy or modern evolutionary taxonomy. Nowadays, however, the term is commonly used in a different context and refers to clusters of (uncultivated or unknown) organisms, grouped by DNA sequence similarity of a specific taxonomic marker gene (originally coined as mOTU; molecular OTU). In other words, OTUs are pragmatic proxies for "species" at different taxonomic levels, in the absence of traditional systems of biological classification as are available for macroscopic organisms. For several years, OTUs have been the most commonly used units of diversity, especially when analysing small subunit 16S (for prokaryotes) or 18S rRNA (for eukaryotes) marker gene sequence datasets. == Molecular OTU by clustering of marker gene sequences == In the approach represented by DNA barcoding, a particular locus is chosen to be used as the marker gene for classification. This locus should be universally present in the scope selected, variable enough to be different among close-related species, and be flanked by conservative sequences that allow for easy amplification and detection. There are databases containing sequences for such marker genes from many different species, allowing for comparison. (Sometimes only using one locus does not provide sufficient resolution, so multiple marker genes are used. This is the case for plants, where rbcL+matK is common.) Sequences obtained this way can be clustered according to their similarity to one another, and operational taxonomic units are defined based on the similarity threshold set by the researcher. The exact threshold depends on the taxa in question and the mutational rates of the selected locus in the taxon. 97–99% are commonly used, but "it is now recognized to be somewhat arbitrary as sequence variation within and among species varies across taxa". 100% similarity (fully identical) is also common, also known as single variants. It remains debatable how well this commonly used method recapitulates true microbial species phylogeny or ecology. Although OTUs can be calculated differently when using different algorithms or thresholds, research by Schmidt et al. (2014) demonstrated that 16S-derived microbial OTUs were generally ecologically consistent across habitats and several clustering approaches. The number of OTUs defined may be inflated due to errors in DNA sequencing. === OTU clustering approaches === There are three main approaches to clustering OTUs: De novo, for which the clustering is based on similarities between sequencing reads. Closed-reference, for which the clustering is performed against a reference database of sequences. Open-reference, where clustering is first performed against a reference database of sequences, then any remaining sequences that could not be mapped to the reference are clustered de novo. Using a reference provides taxonomic context for the OTUs found. Alternatively, taxonomic context can be found after the construction of clusters by comparing representative sequences from clusters against a reference database. There are also specialized classifiers for this purpose which are much faster than naive comparison using BLAST. === OTU clustering algorithms === Hierarchical clustering algorithms (HCA): uclust & cd-hit & ESPRIT Bayesian clustering: CROP == Molecular OTU by other methods == In addition to similarity-based grouping, marker gene sequences can be sorted into OTUs using molecular phylogeny, k-mer composition, or hybrid methods combining these methods with similarity. There are also Bayesian tree-less methods and machine learning approaches. Using phylogeny often involves manually assigning terminal clades or single nodes to an OTU, so this is usually only done for refinement. Genome skimming can be used to obtain high-copy DNA without the need to choose marker genes or to design PCR primers for the chosen genes. It can provide fairly good coverage of organelle DNA and repetitive elements such as ribosomal DNA, both of which can be used like marker genes in OTU analysis. Whole-genome sequencing is more expensive and involves the production and processing of more data. By considering the entire genome, many (sometimes over 100) marker genes can be used at the same time, producing highly resolved phylogenies that correctly identify problematic taxa. It is also possible to use entire genomes for OTU assignment. For example, genomes from different bacterial species almost always have an average nucleotide identity lower than 95%, a fact that can be used to define new OTUs (and likely new species).

Self-play

Self-play is a technique for improving the performance of reinforcement learning agents. Intuitively, agents learn to improve their performance by playing "against themselves". == Definition and motivation == In multi-agent reinforcement learning experiments, researchers try to optimize the performance of a learning agent on a given task, in cooperation or competition with one or more agents. These agents learn by trial-and-error, and researchers may choose to have the learning algorithm play the role of two or more of the different agents. When successfully executed, this technique has a double advantage: It provides a straightforward way to determine the actions of the other agents, resulting in a meaningful challenge. It increases the amount of experience that can be used to improve the policy, by a factor of two or more, since the viewpoints of each of the different agents can be used for learning. Czarnecki et al argue that most of the games that people play for fun are "Games of Skill", meaning games whose space of all possible strategies looks like a spinning top. In more detail, we can partition the space of strategies into sets L 1 , L 2 , . . . , L n {\displaystyle L_{1},L_{2},...,L_{n}} , such that any i < j , π i ∈ L i , π j ∈ L j {\displaystyle i

Win–stay, lose–switch

In psychology, game theory, statistics, and machine learning, win–stay, lose–switch (also win–stay, lose–shift or Pavlov, named after Ivan Pavlov) is a heuristic learning strategy used to model learning in decision situations. It was first invented as an improvement over randomization in bandit problems. It was later applied to the prisoner's dilemma in order to model the evolution of altruism. In most versions, it starts either with a cooperate, then proceeds as always, or starts with a "probe" of cooperate-defect-cooperate to determine the other player's strategy. A mutual cooperation is regarded as a win. The learning rule bases its decision only on the outcome of the previous play. Outcomes are divided into successes (wins) and failures (losses). If the play on the previous round resulted in a success, then the agent plays the same strategy on the next round. Alternatively, if the play resulted in a failure the agent switches to another action. A large-scale empirical study of players of the game rock, paper, scissors shows that a variation of this strategy is adopted by real-world players of the game, instead of the Nash equilibrium strategy of choosing entirely at random between the three options.

NationBuilder

NationBuilder is a Los Angeles-based technology start-up that develops content management and customer relationship management (CRM) software. Although the company initially targeted political campaigns and nonprofit organizations, it later expanded its marketing efforts to include other people and organizations trying to build an online following, such as artists, musicians and restaurants. The software uses voter data such as names, addresses and other information, such as previous voting records in the case of political campaigns, to allow users to centralize, build and manage campaigns by integrating various communication tools like websites, newsletters, text messaging and social media channels under one platform. Among other features, the software enables users to quickly create websites, build databases through registrations, send targeted newsletters, analyse data from multiple sources and leverage micro-donations. The software's appeal towards political campaigns comes from the combination of a number of previously separate campaigning services, channels and data sources into a single platform that was presented as a facile solution for non-technical users and which enabled political campaigners to quickly deploy campaigns by convincing numerous people to donate. == History == NationBuilder was founded in 2009 in Los Angeles by Jim Gilliam and launched in 2011. In 2012 Joe Green joined NationBuilder as co-founder and president. He left that role 11 months later in February 2013. Gilliam was previously a movie-maker who co-founded Brave New Films with Robert Greenwald and had sought funding for his films through crowd-sourcing. Green, who studied organizing at Harvard and was Mark Zuckerberg's roommate, is also the co-founder of the Causes Facebook app; he left NationBuilder in 2013. Since its founding, the company has helped campaigns raise $1.2 billion. In 2012, NationBuilder announced that 1,000 subscribers have used its software to amass 2.5 million supporters and raise $12 million in campaign donations. In 2015 it has helped raise $264 million, recruit over one million volunteers and coordinate some 129,000 events. By 2016, the company said its software was used by about 40 percent of all contested elections at the state and national level in the U.S., which included 3,000 political campaigns. Using such software is easier in the U.S. than Europe, where comprehensive data protection and privacy laws are in effect since 2018. The Scottish National Party was the first political party to use NationBuilder, harvesting vast amounts of data pertaining to voter activity via websites such as Facebook and Twitter. This revelation prompted outrage over privacy concerns. Guy Herbert of the No2ID campaign called the use of such data harvesting tools by the SNP "utterly hypocritical". == Funding == Investors in NationBuilder include Chris Hughes - the Facebook co-founder, Sean Parker - first president of Facebook and co-founder of Napster and Causes, Dan Senor - the former Republican foreign-policy adviser and Ben Horowitz, co-founder of Andreessen Horowitz. In 2012, it has raised $6.3 million in funding from a number of investors. == Notable implementations == The software is reported to have played a role in some public elections in Europe, the US and New Zealand, as well as non-profit initiatives, and political parties in Australia. Notable users include Bernie Sanders, Mitch McConnell, Andrew Yang, Theresa May, Amnesty International, the NAACP and Donald Trump. === France === La République En Marche used NationBuilder in their campaign for the 2017 National Assembly. === New Zealand === NationBuilder's services are used by New Zealand political parties, including in the campaigns of both the National and Labour parties in the 2017 general election. === United Kingdom === Despite stricter data protection and privacy laws in the UK and EU, NationBuilder was used to significant impact in a number of UK elections, most notably in the 2016 campaign for withdrawal of the United Kingdom from the European Union. The company later made a public announcement that both sides in that campaign had used its software. === United States === NationBuilder was used in the Donald Trump presidential campaign to advance his election efforts and eventually win the 2016 presidential race. Jill Stein of the Green Party, Republican Rick Santorum, and independent supporters of various candidates all used NationBuilder during their 2016 runs for president. During the 2018 US election cycle, political entities paid more than $1 million for the use of NationBuilder. Among the entities paying the most were Donald J. Trump for President, Prosperity Action and the Republican Party of Tennessee.

Absorbing Markov chain

In the mathematical theory of probability, an absorbing Markov chain is a Markov chain in which every state can reach an absorbing state. An absorbing state is a state that, once entered, cannot be left. Like general Markov chains, there can be continuous-time absorbing Markov chains with an infinite state space. However, this article concentrates on the discrete-time discrete-state-space case. == Formal definition == A Markov chain is an absorbing chain if there is at least one absorbing state and it is possible to go from any state to at least one absorbing state in a finite number of steps. In an absorbing Markov chain, a state that is not absorbing is called transient. === Canonical form === Let an absorbing Markov chain with transition matrix P have t transient states and r absorbing states. The rows of P represent sources, while columns represent destinations. By ordering the transient states before the absorbing states, it can be assumed that P has the form P = [ Q R 0 I r ] , {\displaystyle P={\begin{bmatrix}Q&R\\\mathbf {0} &I_{r}\end{bmatrix}},} where Q is a t-by-t matrix, R is a nonzero t-by-r matrix, 0 is an r-by-t zero matrix, and Ir is the r-by-r identity matrix. Thus, Q describes the probability of transitioning from some transient state to another while R describes the probability of transitioning from some transient state to some absorbing state. The probability of transitioning from i to j in exactly k steps is the (i,j)-entry of Pk, further computed below. When considering only transient states, the probability is found in the upper left of Pk, the (i,j)-entry of Qk. == Fundamental matrix == === Expected number of visits to a transient state === A basic property about an absorbing Markov chain is the expected number of visits to a transient state j starting from a transient state i (before being absorbed). This can be established to be given by the (i, j) entry of so-called fundamental matrix N, obtained by summing Qk for all k (from 0 to ∞). It can be proven that N := ∑ k = 0 ∞ Q k = ( I t − Q ) − 1 , {\displaystyle N:=\sum _{k=0}^{\infty }Q^{k}=(I_{t}-Q)^{-1},} where It is the t-by-t identity matrix. The computation of this formula is the matrix equivalent of the geometric series of scalars, ∑ k = 0 ∞ q k = 1 1 − q {\displaystyle {\textstyle \sum }_{k=0}^{\infty }q^{k}={\tfrac {1}{1-q}}} . With the matrix N in hand, also other properties of the Markov chain are easy to obtain. === Expected number of steps before being absorbed === The expected number of steps before being absorbed in any absorbing state, when starting in transient state i can be computed via a sum over transient states. The value is given by the ith entry of the vector t := N 1 , {\displaystyle \mathbf {t} :=N\mathbf {1} ,} where 1 is a length-t column vector whose entries are all 1. === Absorbing probabilities === By induction, P k = [ Q k ( I t − Q k ) N R 0 I r ] . {\displaystyle P^{k}={\begin{bmatrix}Q^{k}&(I_{t}-Q^{k})NR\\\mathbf {0} &I_{r}\end{bmatrix}}.} The probability of eventually being absorbed in the absorbing state j when starting from transient state i is given by the (i,j)-entry of the matrix B := N R {\displaystyle B:=NR} . The number of columns of this matrix equals the number of absorbing states r. An approximation of those probabilities can also be obtained directly from the (i,j)-entry of P k {\displaystyle P^{k}} for a large enough value of k, when i is the index of a transient, and j the index of an absorbing state. This is because ( lim k → ∞ P k ) i , t + j = B i , j {\displaystyle \left(\lim _{k\to \infty }P^{k}\right)_{i,t+j}=B_{i,j}} . === Transient visiting probabilities === The probability of visiting transient state j when starting at a transient state i is the (i,j)-entry of the matrix H := ( N − I t ) ( N dg ) − 1 , {\displaystyle H:=(N-I_{t})(N_{\operatorname {dg} })^{-1},} where Ndg is the diagonal matrix with the same diagonal as N. === Variance on number of transient visits === The variance on the number of visits to a transient state j with starting at a transient state i (before being absorbed) is the (i,j)-entry of the matrix N 2 := N ( 2 N dg − I t ) − N sq , {\displaystyle N_{2}:=N(2N_{\operatorname {dg} }-I_{t})-N_{\operatorname {sq} },} where Nsq is the Hadamard product of N with itself (i.e. each entry of N is squared). === Variance on number of steps === The variance on the number of steps before being absorbed when starting in transient state i is the ith entry of the vector ( 2 N − I t ) t − t sq , {\displaystyle (2N-I_{t})\mathbf {t} -\mathbf {t} _{\operatorname {sq} },} where tsq is the Hadamard product of t with itself (i.e., as with Nsq, each entry of t is squared). == Examples == === String generation === Consider the process of repeatedly flipping a fair coin until the sequence (heads, tails, heads) appears. This process is modeled by an absorbing Markov chain with transition matrix P = [ 1 / 2 1 / 2 0 0 0 1 / 2 1 / 2 0 1 / 2 0 0 1 / 2 0 0 0 1 ] . {\displaystyle P={\begin{bmatrix}1/2&1/2&0&0\\0&1/2&1/2&0\\1/2&0&0&1/2\\0&0&0&1\end{bmatrix}}.} The first state represents the empty string, the second state the string "H", the third state the string "HT", and the fourth state the string "HTH". Although in reality, the coin flips cease after the string "HTH" is generated, the perspective of the absorbing Markov chain is that the process has transitioned into the absorbing state representing the string "HTH" and, therefore, cannot leave. For this absorbing Markov chain, the fundamental matrix is N = ( I − Q ) − 1 = ( [ 1 0 0 0 1 0 0 0 1 ] − [ 1 / 2 1 / 2 0 0 1 / 2 1 / 2 1 / 2 0 0 ] ) − 1 = [ 1 / 2 − 1 / 2 0 0 1 / 2 − 1 / 2 − 1 / 2 0 1 ] − 1 = [ 4 4 2 2 4 2 2 2 2 ] . {\displaystyle {\begin{aligned}N&=(I-Q)^{-1}=\left({\begin{bmatrix}1&0&0\\0&1&0\\0&0&1\end{bmatrix}}-{\begin{bmatrix}1/2&1/2&0\\0&1/2&1/2\\1/2&0&0\end{bmatrix}}\right)^{-1}\\[4pt]&={\begin{bmatrix}1/2&-1/2&0\\0&1/2&-1/2\\-1/2&0&1\end{bmatrix}}^{-1}={\begin{bmatrix}4&4&2\\2&4&2\\2&2&2\end{bmatrix}}.\end{aligned}}} The expected number of steps starting from each of the transient states is t = N 1 = [ 4 4 2 2 4 2 2 2 2 ] [ 1 1 1 ] = [ 10 8 6 ] . {\displaystyle \mathbf {t} =N\mathbf {1} ={\begin{bmatrix}4&4&2\\2&4&2\\2&2&2\end{bmatrix}}{\begin{bmatrix}1\\1\\1\end{bmatrix}}={\begin{bmatrix}10\\8\\6\end{bmatrix}}.} Therefore, the expected number of coin flips before observing the sequence (heads, tails, heads) is 10, the entry for the state representing the empty string. === Games of chance === Games based entirely on chance can be modeled by an absorbing Markov chain. A classic example of this is the ancient Indian board game Snakes and Ladders. The graph on the left plots the probability mass in the lone absorbing state that represents the final square as the transition matrix is raised to larger and larger powers. To determine the expected number of turns to complete the game, compute the vector t as described above and examine tstart, which is approximately 39.2. === Infectious disease testing === Infectious disease testing, either of blood products or in medical clinics, is often taught as an example of an absorbing Markov chain. The public U.S. Centers for Disease Control and Prevention (CDC) model for HIV and for hepatitis B, for example, illustrates the property that absorbing Markov chains can lead to the detection of disease, versus the loss of detection through other means. In the standard CDC model, the Markov chain has five states, a state in which the individual is uninfected, then a state with infected but undetectable virus, a state with detectable virus, and absorbing states of having quit/been lost from the clinic, or of having been detected (the goal). The typical rates of transition between the Markov states are the probability p per unit time of being infected with the virus, w for the rate of window period removal (time until virus is detectable), q for quit/loss rate from the system, and d for detection, assuming a typical rate λ {\displaystyle \lambda } at which the health system administers tests of the blood product or patients in question. It follows that we can "walk along" the Markov model to identify the overall probability of detection for a person starting as undetected, by multiplying the probabilities of transition to each next state of the model as: p ( p + q ) w ( w + q ) d ( d + q ) {\displaystyle {\frac {p}{(p+q)}}{\frac {w}{(w+q)}}{\frac {d}{(d+q)}}} . The subsequent total absolute number of false negative tests—the primary CDC concern—would then be the rate of tests, multiplied by the probability of reaching the infected but undetectable state, times the duration of staying in the infected undetectable state: p ( p + q ) 1 ( w + q ) λ {\displaystyle {\frac {p}{(p+q)}}{\frac {1}{(w+q)}}\lambda } .