text:
February 25

Pre-1600

 * 138 – Roman emperor Hadrian adopts Antoninus Pius as his son, effectively making him his successor.
 * 628 – Khosrow II, the last great Shah of the Sasanian Empire (Iran), is overthrown by his son Kavadh II.
 * 1336 – Four thousand defenders of Pilenai commit mass suicide rather than be taken captive by the Teutonic Knights.

1601–1900

 * 1705 – George Frideric Handel's opera Nero premiered in Hamburg.
 * 1836 – Samuel Colt is granted a United States patent for his revolver firearm.
 * 1843 – Lord George Paulet occupies the Kingdom of Hawaii in the name of Great Britain in the Paulet affair.
 * 1870 – Hiram Rhodes Revels, a Republican from Mississippi, is sworn into the United States Senate, becoming the first African American ever to sit in Congress.
 * 1875 – Guangxu Emperor of Qing dynasty China begins his reign, under Empress Dowager Cixi's regency.

1901–present

 * 1912 – Marie-Adélaïde, the eldest of six daughters of Guillaume IV, becomes the first reigning Grand Duchess of Luxembourg.
 * 1916 – World War I: In the Battle of Verdun, a German unit captures Fort Douaumont, keystone of the French defences, without a fight.
 * 1918 – World War I: German forces capture Tallinn to virtually complete the occupation of Estonia.
 * 1921 – Georgian capital Tbilisi falls to the invading Russian forces after heavy fighting and the Russians declare the Georgian Soviet Socialist Republic.
 * 1932 – Adolf Hitler, having been stateless for seven years, obtains German citizenship when he is appointed a Brunswick state official by Dietrich Klagges, a fellow Nazi. As a result, Hitler is able to run for Reichspräsident in the 1932 election.
 * 1933 – Launch of the USS Ranger (CV-4) at Newport News, Virginia. It is the first purpose-built aircraft carrier to be commissioned by the US Navy.
 * 1939 – As part of British air raid precautions, the first of 2.5 million Anderson shelters is constructed in a garden in Islington, north London.
 * 1941 – The outlawed Communist Party of the Netherlands organises a general strike in German-occupied Amsterdam to protest against Nazi persecution of Dutch Jews.
 * 1947 – The formal abolition of Prussia is proclaimed by the Allied Control Council, the Prussian government having already been abolished by the Preußenschlag of 1932.
 * 1947  – Soviet NKVD forces in Hungary abduct Béla Kovács—secretary-general of the majority Independent Smallholders' Party—and deport him to the USSR in defiance of Parliament. His arrest is an important turning point in the Communist takeover of Hungary.
 * 1948 – In a coup d'état led by Klement Gottwald, the Communist Party of Czechoslovakia takes control of government in Prague to end the Third Czechoslovak Republic.
 * 1951 – The first Pan American Games are officially opened in Buenos Aires by Argentine President Juan Perón.
 * 1956 – In his speech On the Cult of Personality and Its Consequences, Nikita Khrushchev, leader of the Soviet Union, denounces Stalin.
 * 1980 – The government of Suriname is overthrown by a military coup led by Dési Bouterse.
 * 1986 – People Power Revolution: President of the Philippines Ferdinand Marcos flees the nation after 20 years of rule; Corazon Aquino becomes the Philippines' first female president.
 * 1991 – Disbandment of the Warsaw Pact at a meeting of its members in Budapest.
 * 1994 – American-Israeli extremist Baruch Goldstein commits a mass shooting at the Cave of the Patriarchs mausoleum, leaving 29 dead and over 100 injured before he was disarmed and beaten to death by survivors.
 * 1999 – Alitalia Flight 1553 crashes at Genoa Cristoforo Colombo Airport in Genoa, Italy, killing four.
 * 2009 – Soldiers of the Bangladesh Rifles mutiny at their headquarters in Pilkhana, Dhaka, Bangladesh, resulting in 74 deaths, including 57 army officials.
 * 2009 – Turkish Airlines Flight 1951 crashed during landing at the Amsterdam Schiphol Airport, Netherlands, primarily due to a faulty radio altimeter, resulting in the death of nine passengers and crew including all three pilots.
 * 2015 – At least 310 people are killed in avalanches in northeastern Afghanistan.
 * 2016 – Three people are killed and fourteen others injured in a series of shootings in the small Kansas cities of Newton and Hesston.

Pre-1600

 * 1259 – Infanta Branca of Portugal, daughter of King Afonso III of Portugal and Urraca of Castile (d. 1321)
 * 1337 – Wenceslaus I, Duke of Luxembourg (d. 1383)
 * 1475 – Edward Plantagenet, 17th Earl of Warwick, last male member of the House of York (d. 1499)
 * 1540 – Henry Howard, 1st Earl of Northampton, English aristocrat and courtier (d. 1614)
 * 1543 – Sharaf Khan Bidlisi, Emir of Bitlis (d. 1603)
 * 1591 – Friedrich Spee, German poet and author (d. 1635)

1601–1900

 * 1643 – Ahmed II, Ottoman sultan (d. 1695)
 * 1663 – Peter Anthony Motteux, French-English author, playwright and translator (d. 1718)
 * 1670 – Maria Margarethe Kirch, German astronomer and mathematician (d. 1720)
 * 1682 – Giovanni Battista Morgagni, Italian anatomist and pathologist (d. 1771)
 * 1707 – Carlo Goldoni, Italian playwright and composer (d. 1793)
 * 1714 – René Nicolas Charles Augustin de Maupeou, French lawyer and politician, Lord Chancellor of France (d. 1792)
 * 1728 – John Wood, the Younger, English architect, designed the Royal Crescent (d. 1782)
 * 1752 – John Graves Simcoe, English-Canadian general and politician, 1st Lieutenant Governor of Upper Canada (d. 1806)
 * 1755 – François René Mallarmé, French lawyer and politician (d. 1835)
 * 1778 – José de San Martín, Argentinian general and politician, 1st President of Peru (d. 1850)
 * 1806 – Emma Catherine Embury, American author and poet (d. 1863)
 * 1809 – John Hart, English-Australian politician, 10th Premier of South Australia (d. 1873)
 * 1812 – Carl Christian Hall, Danish lawyer and politician, 6th Prime Minister of Denmark (d. 1888)
 * 1816 – Giovanni Morelli, Italian historian and critic (d. 1891)
 * 1833 – John St. John, American lawyer and politician, 8th Governor of Kansas (d. 1916)
 * 1841 – Pierre-Auguste Renoir, French painter and sculptor (d. 1919)
 * 1842 – Karl May, German author, poet, and playwright (d. 1912)
 * 1845 – George Reid, Scottish-Australian lawyer and politician, 4th Prime Minister of Australia (d. 1918)
 * 1855 – Cesário Verde, Portuguese poet and author (d. 1886)
 * 1856 – Karl Gotthard Lamprecht, German historian and academic (d. 1915)
 * 1856  – Mathias Zdarsky, Czech-Austrian skier, painter, and sculptor (d. 1940)
 * 1857 – Robert Bond, Canadian politician; first Prime Minister of Newfoundland (d. 1927)
 * 1860 – William Ashley, English historian and academic (d. 1927)
 * 1865 – Andranik, Armenian general (d. 1927)
 * 1866 – Benedetto Croce, Italian philosopher and politician (d. 1952)
 * 1869 – Phoebus Levene, Russian-American biochemist and physician (d. 1940)
 * 1873 – Enrico Caruso, Italian-American tenor; the most popular operatic tenor of the early 20th century and the first great recording star. (d. 1921)
 * 1877 – Erich von Hornbostel, Austrian musicologist and scholar (d. 1935)
 * 1881 – William Z. Foster, American union leader and politician (d. 1961)
 * 1881  – Alexei Rykov, Russian politician, Premier of Russia (d. 1938)
 * 1883 – Princess Alice, Countess of Athlone (d. 1981)
 * 1885 – Princess Alice of Battenberg, mother of Prince Philip, Duke of Edinburgh (d. 1969)
 * 1888 – John Foster Dulles, American soldier, lawyer, and politician, 52nd United States Secretary of State (d. 1959)
 * 1890 – Myra Hess, English pianist and educator (d. 1965)
 * 1894 – Meher Baba, Indian spiritual master (d. 1969)
 * 1898 – William Astbury, physicist and molecular biologist (d. 1961)

1901–present

 * 1901 – Vince Gair, Australian politician, 27th Premier of Queensland (d. 1980)
 * 1901  – Zeppo Marx, American comedian and theatrical agent (d. 1979)
 * 1903 – King Clancy, Canadian ice hockey player, referee, and coach (d. 1986)
 * 1905 – Perry Miller, American historian, author, and academic (d. 1963)
 * 1906 – Mary Coyle Chase, American journalist and playwright (d. 1981)
 * 1907 – Sabahattin Ali, Turkish journalist, author, and poet (d. 1948)
 * 1908 – Mary Locke Petermann, American cellular biochemist (d. 1975)
 * 1908  – Frank G. Slaughter, American physician and author (d. 2001)
 * 1910 – Millicent Fenwick, American journalist and politician (d. 1992)
 * 1913 – Jim Backus, American actor and screenwriter (d. 1989)
 * 1913  – Gert Fröbe, German actor (d. 1988)
 * 1915 – S. Rajaratnam, Singaporean politician, 1st Senior Minister of Singapore (d. 2006)
 * 1917 – Anthony Burgess, English author, playwright, and critic (d. 1993)
 * 1918 – Bobby Riggs, American tennis player (d. 1995)
 * 1919 – Monte Irvin, American baseball player and executive (d. 2016)
 * 1920 – Philip Habib, American academic and diplomat, Assistant Secretary of State for East Asian and Pacific Affairs (d. 1992)
 * 1921 – Pierre Laporte, Canadian journalist, lawyer, and politician, Deputy Premier of Quebec (d. 1970)
 * 1921  – Andy Pafko, American baseball player and manager (d. 2013)
 * 1922 – Molly Reilly, Canadian aviator (d. 1980)
 * 1924 – Hugh Huxley, English-American biologist and academic (d. 2013)
 * 1925 – Lisa Kirk, American actress and singer (d. 1990)
 * 1925  – Shehu Shagari, Nigerian politician, 6th President of Nigeria (d. 2018)
 * 1926 – Masatoshi Gündüz Ikeda, Japanese-Turkish mathematician and academic (d. 2003)
 * 1927 – Ralph Stanley, American singer and banjo player (d. 2016)
 * 1928 – Paul Elvstrøm, Danish yachtsman (d. 2016)
 * 1928  – Larry Gelbart, American author and screenwriter (d. 2009)
 * 1928  – A. Leon Higginbotham, Jr., American civil rights advocate, historian, and judge (d. 1998)
 * 1928  – Richard G. Stern, American author and academic (d. 2013)
 * 1930 – Wendy Beckett, British nun and art critic (d. 2018)
 * 1932 – Tony Brooks, English racing driver (d. 2022)
 * 1932  – Faron Young, American country music singer-songwriter and guitarist (d. 1996)
 * 1934 – Tony Lema, American golfer (d. 1966)
 * 1935 – Oktay Sinanoglu, Turkish physical chemist and molecular biophysicist (d. 2015)
 * 1937 – Tom Courtenay, English actor
 * 1937  – Bob Schieffer, American political author, journalist and TV interviewer
 * 1938 – Diane Baker, American actress and producer
 * 1938  – Herb Elliott, Australian athlete
 * 1938  – Farokh Engineer, Indian cricketer
 * 1940 – Ron Santo, American baseball player and sportscaster (d. 2010)
 * 1941 – David Puttnam, English film producer and academic
 * 1942 – Karen Grassle, American actress
 * 1943 – George Harrison, English singer-songwriter, guitarist and film producer (d. 2001)
 * 1944 – François Cevert, French racing driver (d. 1973)
 * 1946 – Jean Todt, French racing driver and team manager
 * 1947 – Lee Evans, American sprinter and athletics coach (d. 2021)
 * 1949 – Ric Flair, American professional wrestler
 * 1949  – Amin Maalouf, Lebanese-French journalist and author
 * 1950 – Francisco Fernández Ochoa, Spanish skier (d. 2006)
 * 1950  – Neil Jordan, Irish film director, screenwriter and author
 * 1950  – Néstor Kirchner, Argentine politician; 51st President of Argentina (d. 2010)
 * 1951 – Don Quarrie, Jamaican sprinter and coach
 * 1952 – Joey Dunlop, Northern Irish motorcyclist (d. 2000)
 * 1953 – José María Aznar, Spanish politician; Prime Minister of Spain, 1996–2004
 * 1953  – John Doe, American musician, singer-songwriter, actor, and poet
 * 1957 – Raymond McCreesh, Irish Republican, hunger striker (d. 1981)
 * 1957 – Tharman Shanmugaratnam, Singaporean economist and politician; 5th Senior Minister and 9th President of Singapore
 * 1958 – Kurt Rambis, Greek-American basketball player, coach, and executive
 * 1962 – Birgit Fischer, German kayaker
 * 1963 – Paul O'Neill, American baseball player and sportscaster
 * 1965 – Carrot Top, American comedian
 * 1965  – Veronica Webb, American model, actress, and writer
 * 1966 – Alexis Denisof, American actor
 * 1966  – Téa Leoni, American actress
 * 1967 – Ed Balls, English politician; Shadow Chancellor of the Exchequer
 * 1968 – Lesley Boone, American actress and producer
 * 1968  – Oumou Sangaré, Malian musician
 * 1971 – Sean Astin, American actor, director and producer
 * 1971  – Daniel Powter, Canadian singer-songwriter and musician
 * 1973 – Anson Mount, American actor
 * 1974 – Dominic Raab, English politician; First Secretary of State and Secretary of State for Foreign and Commonwealth Affairs
 * 1975 – Chelsea Handler, American comedian, actress, author, and television host
 * 1976 – Rashida Jones, American actress and writer
 * 1976  – Samaki Walker, American basketball player
 * 1979 – Napoleon Harris, American football player and politician
 * 1981 – Park Ji-sung, South Korean footballer
 * 1982 – Maria Kanellis, American professional wrestler, actress, and model
 * 1982  – Flavia Pennetta, Italian tennis player
 * 1982  – Anton Volchenkov, Russian ice hockey player
 * 1985 – Joakim Noah, French-American basketball player
 * 1986 – Justin Berfield, American actor, writer, and producer
 * 1986  – Jameela Jamil, English actress and presenter
 * 1986  – James Phelps, English actor
 * 1986  – Oliver Phelps, English actor
 * 1987 – Justin Abdelkader, American ice hockey player
 * 1988 – Tom Marshall, English photo colouriser and artist
 * 1988  – Gerald McCoy, American football player
 * 1989 – Jimmer Fredette, American basketball player
 * 1989  – Kana Hanazawa, Japanese voice actress and singer
 * 1989  – E'Twaun Moore, American basketball player
 * 1990 – Félix Peña, Dominican baseball player
 * 1992 – Joakim Nordström, Swedish ice hockey player
 * 1992  – Jorge Soler, Cuban baseball player
 * 1993 – Erick Fedde, American baseball player
 * 1993  – Lukáš Sedlák, Czech ice hockey player
 * 1994 – Fred VanVleet, American basketball player
 * 1995 – Mario Hezonja, Croatian basketball player
 * 1995  – Viktoriya Tomova, Bulgarian tennis player
 * 1997 – Isabelle Fuhrman, American actress
 * 1997  – Thon Maker, South Sudanese-Australian basketball player
 * 1999 – Gianluigi Donnarumma, Italian footballer
 * 1999  – Rocky, South Korean singer, dancer and songwriter
 * 2001 – Vernon Carey Jr., American basketball player
 * 2003 – Brandin Podziemski, American basketball player
 * 2005 – Noah Jupe, English actor

Pre-1600

 * 806 – Tarasios, patriarch of Constantinople
 * 891 – Fujiwara no Mototsune, Japanese regent (b. 836)
 * 1099 – Anselm of Ribemont, Frankish nobleman and participant of the First Crusade
 * 1522 – William Lily, English scholar and educator (b. 1468)
 * 1536 – Berchtold Haller, German-Swiss theologian and reformer (b. 1492)
 * 1547 – Vittoria Colonna, marchioness of Pescara (b. 1490)

1601–1900

 * 1601 – Robert Devereux, 2nd Earl of Essex, English general and politician, Lord Lieutenant of Ireland (b. 1566)
 * 1634 – Albrecht von Wallenstein, Austrian general and politician (b. 1583)
 * 1636 – Santorio Santorio, Italian biologist (b. 1561)
 * 1655 – Daniël Heinsius, Flemish poet and scholar (b. 1580)
 * 1682 – Alessandro Stradella, Italian composer (b. 1639)
 * 1710 – Daniel Greysolon, Sieur du Lhut, French soldier and explorer (b. 1639)
 * 1713 – Frederick I of Prussia (b. 1657)
 * 1723 – Christopher Wren, English architect, designed St Paul's Cathedral (b. 1632)
 * 1756 – Eliza Haywood, English actress and poet (b. 1693)
 * 1796 – Samuel Seabury, American bishop (b. 1729)
 * 1805 – Thomas Pownall, English politician, Governor of the Province of Massachusetts Bay (b. 1722)
 * 1819 – Francisco Manoel de Nascimento, Portuguese-French poet and educator (b. 1734)
 * 1822 – William Pinkney, American politician and diplomat, 7th United States Attorney General (b. 1764)
 * 1841 – Philip P. Barbour, American lawyer, judge, and politician, 12th Speaker of the United States House of Representatives (b. 1783)
 * 1850 – Daoguang Emperor of China (b. 1782)
 * 1852 – Thomas Moore, Irish poet and lyricist (b. 1779)
 * 1865 – Otto Ludwig, German author, playwright, and critic (b. 1813)
 * 1870 – Henrik Hertz, Danish poet and playwright (b. 1797)
 * 1877 – Jung Bahadur Rana, Nepalese ruler (b. 1816)
 * 1878 – Townsend Harris, American merchant, politician, and diplomat, United States Ambassador to Japan (b. 1804)
 * 1899 – Paul Reuter, German-English journalist and businessman, founded Reuters (b. 1816)

1901–present

 * 1906 – Anton Arensky, Russian pianist and composer (b. 1861)
 * 1910 – Worthington Whittredge, American painter and educator (b. 1820)
 * 1911 – Friedrich Spielhagen, German author, theorist, and translator (b. 1829)
 * 1912 – William IV, Grand Duke of Luxembourg (b. 1852)
 * 1914 – John Tenniel, English illustrator (b. 1820)
 * 1915 – Charles Edwin Bessey, American botanist, author, and academic (b. 1845)
 * 1920 – Marcel-Auguste Dieulafoy, French archaeologist and engineer (b. 1844)
 * 1928 – William O'Brien, Irish journalist and politician (b. 1852)
 * 1934 – Elizabeth Gertrude Britton, American botanist and academic (b. 1857)
 * 1934  – John McGraw, American baseball player and manager (b. 1873)
 * 1945 – Mário de Andrade, Brazilian author, poet, and photographer (b. 1893)
 * 1950 – George Minot, American physician and academic, Nobel Prize laureate (b. 1885)
 * 1953 – Sergei Winogradsky, Ukrainian-Russian microbiologist and ecologist (b. 1856)
 * 1954 – Joseph Beech, American Methodist missionary and educator (b. 1867)
 * 1957 – Mark Aldanov, Russian author and critic (b. 1888)
 * 1957  – Bugs Moran, American mob boss (b. 1893)
 * 1963 – Melville J. Herskovits, American anthropologist and academic (b. 1895)
 * 1964 – Alexander Archipenko, Ukrainian sculptor and illustrator (b. 1887)
 * 1964  – Grace Metalious, American author (b. 1924)
 * 1970 – Mark Rothko, Latvian-American painter and academic (b. 1903)
 * 1971 – Theodor Svedberg, Swedish chemist and academic, Nobel Prize laureate (b. 1884)
 * 1972 – Gottfried Fuchs, German-Canadian Olympic soccer player (b. 1889)
 * 1975 – Elijah Muhammad, American religious leader (b. 1897)
 * 1978 – Daniel James, Jr., American general and pilot (b. 1920)
 * 1980 – Robert Hayden, American poet and academic (b. 1913)
 * 1983 – Tennessee Williams, American playwright, and poet (b. 1911)
 * 1996 – Haing S. Ngor, Cambodian-American physician and author (b. 1940)
 * 1997 – Andrei Sinyavsky, Russian journalist and publisher (b. 1925)
 * 1998 – W. O. Mitchell, Canadian author and playwright (b. 1914)
 * 1999 – Glenn T. Seaborg, American chemist and academic, Nobel Prize laureate (b. 1912)
 * 2001 – A. R. Ammons, American poet and critic (b. 1926)
 * 2001  – Don Bradman, Australian international cricketer; holder of world record batting average (b. 1908)
 * 2005 – Peter Benenson, English lawyer, founded Amnesty International (b. 1921)
 * 2008 – Hans Raj Khanna, Indian judge and advocate; upholder of civil liberties (b. 1912)
 * 2010 – Ihsan Dogramaci, Turkish pediatrician and academic (b. 1915)
 * 2012 – Louisiana Red, American singer-songwriter and guitarist (b. 1932)
 * 2015 – Harve Bennett, American screenwriter and producer (b. 1930)
 * 2015 – Ariel Camacho, Mexican musician and singer-songwriter; (b. 1992)
 * 2015 – Eugenie Clark, American biologist and academic; noted ichthyologist (b. 1922)
 * 2017 – Bill Paxton, American actor and filmmaker (b. 1955)
 * 2020 – Dmitry Yazov, last Marshal of the Soviet Union (b. 1924)
 * 2022 – Farrah Forke, American actress (b. 1968)
 * 2022  – Shirley Hughes, English author and illustrator (b. 1927)
 * 2023 – Gordon Pinsent, Canadian actor, director and screenwriter (b. 1930)

Holidays and observances

 * Christian feast days:
 * Æthelberht of Kent
 * Blessed Ciriaco María Sancha y Hervás
 * Gerland of Agrigento
 * John Roberts, writer and missionary (Anglican Communion)
 * Hamburg Matthiae-mahl, feast of Hanseatic League cities on the mediaeval first day of spring
 * Blessed Maria Adeodata Pisani
 * Blessed Robert of Arbrissel, founder of Fontevraud Abbey
 * Saint Walpurga (she was canonised on 1 May c. 870 and Walpurgis Night is celebrated 30 April)
 * February 25 (Eastern Orthodox liturgics)
 * Kitano Baika-sai or "Plum Blossom Festival" (Kitano Tenman-gu Shrine, Kyoto, Japan)
 * Memorial Day for the Victims of the Communist Dictatorships (Hungary)
 * National Day (Kuwait)
 * People Power Day (Philippines)
 * Revolution Day in Suriname
 * Soviet Occupation Day (Georgia)

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: February 25


text:
Finite-state machine

A finite-state machine (FSM) or finite-state automaton (FSA, plural: automata), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some inputs; the change from one state to another is called a transition. An FSM is defined by a list of its states, its initial state, and the inputs that trigger each transition. Finite-state machines are of two types—deterministic finite-state machines and non-deterministic finite-state machines. For any non-deterministic finite-state machine, an equivalent deterministic one can be constructed.

The behavior of state machines can be observed in many devices in modern society that perform a predetermined sequence of actions depending on a sequence of events with which they are presented. Simple examples are: vending machines, which dispense products when the proper combination of coins is deposited; elevators, whose sequence of stops is determined by the floors requested by riders; traffic lights, which change sequence when cars are waiting; combination locks, which require the input of a sequence of numbers in the proper order.

The finite-state machine has less computational power than some other models of computation such as the Turing machine. The computational power distinction means there are computational tasks that a Turing machine can do but an FSM cannot. This is because an FSM's memory is limited by the number of states it has. A finite-state machine has the same computational power as a Turing machine that is restricted such that its head may only perform "read" operations, and always has to move from left to right. FSMs are studied in the more general field of automata theory.

Example: coin-operated turnstile
An example of a simple mechanism that can be modeled by a state machine is a turnstile. A turnstile, used to control access to subways and amusement park rides, is a gate with three rotating arms at waist height, one across the entryway. Initially the arms are locked, blocking the entry, preventing patrons from passing through. Depositing a coin or token in a slot on the turnstile unlocks the arms, allowing a single customer to push through. After the customer passes through, the arms are locked again until another coin is inserted.

Considered as a state machine, the turnstile has two possible states: Locked and Unlocked. There are two possible inputs that affect its state: putting a coin in the slot (coin) and pushing the arm (push). In the locked state, pushing on the arm has no effect; no matter how many times the input push is given, it stays in the locked state. Putting a coin in – that is, giving the machine a coin input – shifts the state from Locked to Unlocked. In the unlocked state, putting additional coins in has no effect; that is, giving additional coin inputs does not change the state. A customer pushing through the arms gives a push input and resets the state to Locked.

The turnstile state machine can be represented by a state-transition table, showing for each possible state, the transitions between them (based upon the inputs given to the machine) and the outputs resulting from each input:
 * {| class="wikitable"

! Current State ! Input ! Next State ! Output ! rowspan="2"|Locked ! rowspan="2"|Unlocked The turnstile state machine can also be represented by a directed graph called a state diagram (above). Each state is represented by a node (circle). Edges (arrows) show the transitions from one state to another. Each arrow is labeled with the input that triggers that transition. An input that doesn't cause a change of state (such as a coin input in the Unlocked state) is represented by a circular arrow returning to the original state. The arrow into the Locked node from the black dot indicates it is the initial state.
 * coin || Unlocked || Unlocks the turnstile so that the customer can push through.
 * push || Locked || None
 * push || Locked || None
 * coin || Unlocked || None
 * push || Locked || When the customer has pushed through, locks the turnstile.
 * }
 * }

Concepts and terminology
A state is a description of the status of a system that is waiting to execute a transition. A transition is a set of actions to be executed when a condition is fulfilled or when an event is received. For example, when using an audio system to listen to the radio (the system is in the "radio" state), receiving a "next" stimulus results in moving to the next station. When the system is in the "CD" state, the "next" stimulus results in moving to the next track. Identical stimuli trigger different actions depending on the current state.

In some finite-state machine representations, it is also possible to associate actions with a state:
 * an entry action: performed when entering the state, and
 * an exit action: performed when exiting the state.

State/Event table
Several state-transition table types are used. The most common representation is shown below: the combination of current state (e.g. B) and input (e.g. Y) shows the next state (e.g. C). The complete action's information is not directly described in the table and can only be added using footnotes. An FSM definition including the full action's information is possible using state tables (see also virtual finite-state machine).

UML state machines
The Unified Modeling Language has a notation for describing state machines. UML state machines overcome the limitations of traditional finite-state machines while retaining their main benefits. UML state machines introduce the new concepts of hierarchically nested states and orthogonal regions, while extending the notion of actions. UML state machines have the characteristics of both Mealy machines and Moore machines. They support actions that depend on both the state of the system and the triggering event, as in Mealy machines, as well as entry and exit actions, which are associated with states rather than transitions, as in Moore machines.

SDL state machines
The Specification and Description Language is a standard from ITU that includes graphical symbols to describe actions in the transition: SDL embeds basic data types called "Abstract Data Types", an action language, and an execution semantic in order to make the finite-state machine executable.
 * send an event
 * receive an event
 * start a timer
 * cancel a timer
 * start another concurrent state machine
 * decision

Other state diagrams
There are a large number of variants to represent an FSM such as the one in figure 3.

Usage
In addition to their use in modeling reactive systems presented here, finite-state machines are significant in many different areas, including electrical engineering, linguistics, computer science, philosophy, biology, mathematics, video game programming, and logic. Finite-state machines are a class of automata studied in automata theory and the theory of computation. In computer science, finite-state machines are widely used in modeling of application behavior (control theory), design of hardware digital systems, software engineering, compilers, network protocols, and computational linguistics.

Classification
Finite-state machines can be subdivided into acceptors, classifiers, transducers and sequencers.

Acceptors

Acceptors (also called detectors or recognizers) produce binary output, indicating whether or not the received input is accepted. Each state of an acceptor is either accepting or non accepting. Once all input has been received, if the current state is an accepting state, the input is accepted; otherwise it is rejected. As a rule, input is a sequence of symbols (characters); actions are not used. The start state can also be an accepting state, in which case the acceptor accepts the empty string. The example in figure 4 shows an acceptor that accepts the string "nice". In this acceptor, the only accepting state is state 7.

A (possibly infinite) set of symbol sequences, called a formal language, is a regular language if there is some acceptor that accepts exactly that set. For example, the set of binary strings with an even number of zeroes is a regular language (cf. Fig. 5), while the set of all strings whose length is a prime number is not.

An acceptor could also be described as defining a language that would contain every string accepted by the acceptor but none of the rejected ones; that language is accepted by the acceptor. By definition, the languages accepted by acceptors are the regular languages.

The problem of determining the language accepted by a given acceptor is an instance of the algebraic path problem—itself a generalization of the shortest path problem to graphs with edges weighted by the elements of an (arbitrary) semiring.

An example of an accepting state appears in Fig. 5: a deterministic finite automaton (DFA) that detects whether the binary input string contains an even number of 0s.

S1 (which is also the start state) indicates the state at which an even number of 0s has been input. S1 is therefore an accepting state. This acceptor will finish in an accept state, if the binary string contains an even number of 0s (including any binary string containing no 0s). Examples of strings accepted by this acceptor are ε (the empty string), 1, 11, 11..., 00, 010, 1010, 10110, etc.

Classifiers
Classifiers are a generalization of acceptors that produce n-ary output where n is strictly greater than two.

Transducers

Transducers produce output based on a given input and/or a state using actions. They are used for control applications and in the field of computational linguistics.

In control applications, two types are distinguished:

 * Moore machine: The FSM uses only entry actions, i.e., output depends only on state. The advantage of the Moore model is a simplification of the behaviour. Consider an elevator door. The state machine recognizes two commands: "command_open" and "command_close", which trigger state changes. The entry action (E:) in state "Opening" starts a motor opening the door, the entry action in state "Closing" starts a motor in the other direction closing the door. States "Opened" and "Closed" stop the motor when fully opened or closed. They signal to the outside world (e.g., to other state machines) the situation: "door is open" or "door is closed".

 * Mealy machine: The FSM also uses input actions, i.e., output depends on input and state. The use of a Mealy FSM leads often to a reduction of the number of states. The example in figure 7 shows a Mealy FSM implementing the same behaviour as in the Moore example (the behaviour depends on the implemented FSM execution model and will work, e.g., for virtual FSM but not for event-driven FSM). There are two input actions (I:): "start motor to close the door if command_close arrives" and "start motor in the other direction to open the door if command_open arrives". The "opening" and "closing" intermediate states are not shown.

Sequencers
Sequencers (also called generators) are a subclass of acceptors and transducers that have a single-letter input alphabet. They produce only one sequence, which can be seen as an output sequence of acceptor or transducer outputs.

Determinism
A further distinction is between deterministic (DFA) and non-deterministic (NFA, GNFA) automata. In a deterministic automaton, every state has exactly one transition for each possible input. In a non-deterministic automaton, an input can lead to one, more than one, or no transition for a given state. The powerset construction algorithm can transform any nondeterministic automaton into a (usually more complex) deterministic automaton with identical functionality.

A finite-state machine with only one state is called a "combinatorial FSM". It only allows actions upon transition into a state. This concept is useful in cases where a number of finite-state machines are required to work together, and when it is convenient to consider a purely combinatorial part as a form of FSM to suit the design tools.

Alternative semantics
There are other sets of semantics available to represent state machines. For example, there are tools for modeling and designing logic for embedded controllers. They combine hierarchical state machines (which usually have more than one current state), flow graphs, and truth tables into one language, resulting in a different formalism and set of semantics. These charts, like Harel's original state machines, support hierarchically nested states, orthogonal regions, state actions, and transition actions.

Mathematical model
In accordance with the general classification, the following formal definitions are found.

A deterministic finite-state machine or deterministic finite-state acceptor is a quintuple $$(\Sigma, S, s_0, \delta, F)$$, where:
 * $$\Sigma$$ is the input alphabet (a finite non-empty set of symbols);
 * $$S$$ is a finite non-empty set of states;
 * $$s_0$$ is an initial state, an element of $$S$$;
 * $$\delta$$ is the state-transition function: $$\delta: S \times \Sigma \rightarrow S$$ (in a nondeterministic finite automaton it would be $$\delta: S \times \Sigma \rightarrow \mathcal{P}(S)$$, i.e. $$\delta$$ would return a set of states);
 * $$F$$ is the set of final states, a (possibly empty) subset of $$S$$.

For both deterministic and non-deterministic FSMs, it is conventional to allow $$\delta$$ to be a partial function, i.e. $$\delta(s, x)$$ does not have to be defined for every combination of $$s \isin S$$ and $$x \isin \Sigma$$. If an FSM $$M$$ is in a state $$s$$, the next symbol is $$x$$ and $$\delta(s, x)$$ is not defined, then $$M$$ can announce an error (i.e. reject the input). This is useful in definitions of general state machines, but less useful when transforming the machine. Some algorithms in their default form may require total functions.

A finite-state machine has the same computational power as a Turing machine that is restricted such that its head may only perform "read" operations, and always has to move from left to right. That is, each formal language accepted by a finite-state machine is accepted by such a kind of restricted Turing machine, and vice versa.

A finite-state transducer is a sextuple $$(\Sigma, \Gamma, S, s_0, \delta, \omega)$$, where:
 * $$\Sigma$$ is the input alphabet (a finite non-empty set of symbols);
 * $$\Gamma$$ is the output alphabet (a finite non-empty set of symbols);
 * $$S$$ is a finite non-empty set of states;
 * $$s_0$$ is the initial state, an element of $$S$$;
 * $$\delta$$ is the state-transition function: $$\delta: S \times \Sigma \rightarrow S$$;
 * $$\omega$$ is the output function.

If the output function depends on the state and input symbol ($$\omega: S \times \Sigma \rightarrow \Gamma$$) that definition corresponds to the Mealy model, and can be modelled as a Mealy machine. If the output function depends only on the state ($$\omega: S \rightarrow \Gamma$$) that definition corresponds to the Moore model, and can be modelled as a Moore machine. A finite-state machine with no output function at all is known as a semiautomaton or transition system.

If we disregard the first output symbol of a Moore machine, $$\omega(s_0)$$, then it can be readily converted to an output-equivalent Mealy machine by setting the output function of every Mealy transition (i.e. labeling every edge) with the output symbol given of the destination Moore state. The converse transformation is less straightforward because a Mealy machine state may have different output labels on its incoming transitions (edges). Every such state needs to be split in multiple Moore machine states, one for every incident output symbol.

Optimization
Optimizing an FSM means finding a machine with the minimum number of states that performs the same function. The fastest known algorithm doing this is the Hopcroft minimization algorithm. Other techniques include using an implication table, or the Moore reduction procedure. Additionally, acyclic FSAs can be minimized in linear time.

Hardware applications
In a digital circuit, an FSM may be built using a programmable logic device, a programmable logic controller, logic gates and flip flops or relays. More specifically, a hardware implementation requires a register to store state variables, a block of combinational logic that determines the state transition, and a second block of combinational logic that determines the output of an FSM. One of the classic hardware implementations is the Richards controller.

In a Medvedev machine, the output is directly connected to the state flip-flops minimizing the time delay between flip-flops and output.

Through state encoding for low power state machines may be optimized to minimize power consumption.

Software applications
The following concepts are commonly used to build software applications with finite-state machines:
 * Automata-based programming
 * Event-driven finite-state machine
 * Virtual finite-state machine
 * State design pattern

Finite-state machines and compilers
Finite automata are often used in the frontend of programming language compilers. Such a frontend may comprise several finite-state machines that implement a lexical analyzer and a parser. Starting from a sequence of characters, the lexical analyzer builds a sequence of language tokens (such as reserved words, literals, and identifiers) from which the parser builds a syntax tree. The lexical analyzer and the parser handle the regular and context-free parts of the programming language's grammar.

General

 * Wagner, F., "Modeling Software with Finite State Machines: A Practical Approach", Auerbach Publications, 2006, ISBN 0-8493-8086-3.
 * ITU-T, Recommendation Z.100 Specification and Description Language (SDL)
 * Samek, M., Practical Statecharts in C/C++, CMP Books, 2002, ISBN 1-57820-110-1.
 * Samek, M., Practical UML Statecharts in C/C++, 2nd Edition, Newnes, 2008, ISBN 0-7506-8706-1.
 * Gardner, T., Advanced State Management, 2007
 * Cassandras, C., Lafortune, S., "Introduction to Discrete Event Systems". Kluwer, 1999, ISBN 0-7923-8609-4.
 * Timothy Kam, Synthesis of Finite State Machines: Functional Optimization. Kluwer Academic Publishers, Boston 1997, ISBN 0-7923-9842-4
 * Tiziano Villa, Synthesis of Finite State Machines: Logic Optimization. Kluwer Academic Publishers, Boston 1997, ISBN 0-7923-9892-0
 * Carroll, J., Long, D., Theory of Finite Automata with an Introduction to Formal Languages. Prentice Hall, Englewood Cliffs, 1989.
 * Kohavi, Z., Switching and Finite Automata Theory. McGraw-Hill, 1978.
 * Gill, A., Introduction to the Theory of Finite-state Machines. McGraw-Hill, 1962.
 * Ginsburg, S., An Introduction to Mathematical Machine Theory. Addison-Wesley, 1962.
 * Ginsburg, S., An Introduction to Mathematical Machine Theory. Addison-Wesley, 1962.

Finite Markov chain processes

 * "We may think of a Markov chain as a process that moves successively through a set of states s1, s2, …, sr. … if it is in state si it moves on to the next stop to state sj with probability pij. These probabilities can be exhibited in the form of a transition matrix" (Kemeny (1959), p. 384)

Finite Markov-chain processes are also known as subshifts of finite type.

 * Chapter 6 "Finite Markov Chains".
 * Chapter 6 "Finite Markov Chains".

title: Finite-state machine


text:
Functional programming

In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. It is a declarative programming paradigm in which function definitions are trees of expressions that map values to other values, rather than a sequence of imperative statements which update the running state of the program.

In functional programming, functions are treated as first-class citizens, meaning that they can be bound to names (including local identifiers), passed as arguments, and returned from other functions, just as any other data type can. This allows programs to be written in a declarative and composable style, where small functions are combined in a modular manner.

Functional programming is sometimes treated as synonymous with purely functional programming, a subset of functional programming which treats all functions as deterministic mathematical functions, or pure functions. When a pure function is called with some given arguments, it will always return the same result, and cannot be affected by any mutable state or other side effects. This is in contrast with impure procedures, common in imperative programming, which can have side effects (such as modifying the program's state or taking input from a user). Proponents of purely functional programming claim that by restricting side effects, programs can have fewer bugs, be easier to debug and test, and be more suited to formal verification.

Functional programming has its roots in academia, evolving from the lambda calculus, a formal system of computation based only on functions. Functional programming has historically been less popular than imperative programming, but many functional languages are seeing use today in industry and education, including Common Lisp, Scheme,   Clojure, Wolfram Language, Racket, Erlang,  Elixir, OCaml,  Haskell, and F#. Lean is a functional programming language commonly used for verifying mathematical theorems. Functional programming is also key to some languages that have found success in specific domains, like JavaScript in the Web, R in statistics, J, K and Q in financial analysis, and XQuery/XSLT for XML. Domain-specific declarative languages like SQL and Lex/Yacc use some elements of functional programming, such as not allowing mutable values. In addition, many other programming languages support programming in a functional style or have implemented features from functional programming, such as C++11, C#, Kotlin, Perl, PHP, Python, Go, Rust, Raku, Scala, and Java (since Java 8).

History
The lambda calculus, developed in the 1930s by Alonzo Church, is a formal system of computation built from function application. In 1937 Alan Turing proved that the lambda calculus and Turing machines are equivalent models of computation, showing that the lambda calculus is Turing complete. Lambda calculus forms the basis of all functional programming languages. An equivalent theoretical formulation, combinatory logic, was developed by Moses Schönfinkel and Haskell Curry in the 1920s and 1930s.

Church later developed a weaker system, the simply-typed lambda calculus, which extended the lambda calculus by assigning a data type to all terms. This forms the basis for statically typed functional programming.

The first high-level functional programming language, Lisp, was developed in the late 1950s for the IBM 700/7000 series of scientific computers by John McCarthy while at Massachusetts Institute of Technology (MIT). Lisp functions were defined using Church's lambda notation, extended with a label construct to allow recursive functions. Lisp first introduced many paradigmatic features of functional programming, though early Lisps were multi-paradigm languages, and incorporated support for numerous programming styles as new paradigms evolved. Later dialects, such as Scheme and Clojure, and offshoots such as Dylan and Julia, sought to simplify and rationalise Lisp around a cleanly functional core, while Common Lisp was designed to preserve and update the paradigmatic features of the numerous older dialects it replaced.

Information Processing Language (IPL), 1956, is sometimes cited as the first computer-based functional programming language. It is an assembly-style language for manipulating lists of symbols. It does have a notion of generator, which amounts to a function that accepts a function as an argument, and, since it is an assembly-level language, code can be data, so IPL can be regarded as having higher-order functions. However, it relies heavily on the mutating list structure and similar imperative features.

Kenneth E. Iverson developed APL in the early 1960s, described in his 1962 book A Programming Language (ISBN 9780471430148). APL was the primary influence on John Backus's FP. In the early 1990s, Iverson and Roger Hui created J. In the mid-1990s, Arthur Whitney, who had previously worked with Iverson, created K, which is used commercially in financial industries along with its descendant Q.

In the mid-1960s, Peter Landin invented SECD machine, the first abstract machine for a functional programming language, described a correspondence between ALGOL 60 and the lambda calculus, and proposed the ISWIM programming language.

John Backus presented FP in his 1977 Turing Award lecture "Can Programming Be Liberated From the von Neumann Style? A Functional Style and its Algebra of Programs". He defines functional programs as being built up in a hierarchical way by means of "combining forms" that allow an "algebra of programs"; in modern language, this means that functional programs follow the principle of compositionality. Backus's paper popularized research into functional programming, though it emphasized function-level programming rather than the lambda-calculus style now associated with functional programming.

The 1973 language ML was created by Robin Milner at the University of Edinburgh, and David Turner developed the language SASL at the University of St Andrews. Also in Edinburgh in the 1970s, Burstall and Darlington developed the functional language NPL. NPL was based on Kleene Recursion Equations and was first introduced in their work on program transformation. Burstall, MacQueen and Sannella then incorporated the polymorphic type checking from ML to produce the language Hope. ML eventually developed into several dialects, the most common of which are now OCaml and Standard ML.

In the 1970s, Guy L. Steele and Gerald Jay Sussman developed Scheme, as described in the Lambda Papers and the 1985 textbook Structure and Interpretation of Computer Programs. Scheme was the first dialect of lisp to use lexical scoping and to require tail-call optimization, features that encourage functional programming.

In the 1980s, Per Martin-Löf developed intuitionistic type theory (also called constructive type theory), which associated functional programs with constructive proofs expressed as dependent types. This led to new approaches to interactive theorem proving and has influenced the development of subsequent functional programming languages.

The lazy functional language, Miranda, developed by David Turner, initially appeared in 1985 and had a strong influence on Haskell. With Miranda being proprietary, Haskell began with a consensus in 1987 to form an open standard for functional programming research; implementation releases have been ongoing as of 1990.

More recently it has found use in niches such as parametric CAD in the OpenSCAD language built on the CGAL framework, although its restriction on reassigning values (all values are treated as constants) has led to confusion among users who are unfamiliar with functional programming as a concept.

Functional programming continues to be used in commercial settings.

Concepts
A number of concepts and paradigms are specific to functional programming, and generally foreign to imperative programming (including object-oriented programming). However, programming languages often cater to several programming paradigms, so programmers using "mostly imperative" languages may have utilized some of these concepts.

First-class and higher-order functions
Higher-order functions are functions that can either take other functions as arguments or return them as results. In calculus, an example of a higher-order function is the differential operator $$d/dx$$, which returns the derivative of a function $$f$$.

Higher-order functions are closely related to first-class functions in that higher-order functions and first-class functions both allow functions as arguments and results of other functions. The distinction between the two is subtle: "higher-order" describes a mathematical concept of functions that operate on other functions, while "first-class" is a computer science term for programming language entities that have no restriction on their use (thus first-class functions can appear anywhere in the program that other first-class entities like numbers can, including as arguments to other functions and as their return values).

Higher-order functions enable partial application or currying, a technique that applies a function to its arguments one at a time, with each application returning a new function that accepts the next argument. This lets a programmer succinctly express, for example, the successor function as the addition operator partially applied to the natural number one.

Pure functions
Pure functions (or expressions) have no side effects (memory or I/O). This means that pure functions have several useful properties, many of which can be used to optimize the code:
 * If the result of a pure expression is not used, it can be removed without affecting other expressions.
 * If a pure function is called with arguments that cause no side-effects, the result is constant with respect to that argument list (sometimes called referential transparency or idempotence), i.e., calling the pure function again with the same arguments returns the same result. (This can enable caching optimizations such as memoization.)
 * If there is no data dependency between two pure expressions, their order can be reversed, or they can be performed in parallel and they cannot interfere with one another (in other terms, the evaluation of any pure expression is thread-safe).
 * If the entire language does not allow side-effects, then any evaluation strategy can be used; this gives the compiler freedom to reorder or combine the evaluation of expressions in a program (for example, using deforestation).

While most compilers for imperative programming languages detect pure functions and perform common-subexpression elimination for pure function calls, they cannot always do this for pre-compiled libraries, which generally do not expose this information, thus preventing optimizations that involve those external functions. Some compilers, such as gcc, add extra keywords for a programmer to explicitly mark external functions as pure, to enable such optimizations. Fortran 95 also lets functions be designated pure. C++11 added  keyword with similar semantics.

Recursion
Iteration (looping) in functional languages is usually accomplished via recursion. Recursive functions invoke themselves, letting an operation be repeated until it reaches the base case. In general, recursion requires maintaining a stack, which consumes space in a linear amount to the depth of recursion. This could make recursion prohibitively expensive to use instead of imperative loops. However, a special form of recursion known as tail recursion can be recognized and optimized by a compiler into the same code used to implement iteration in imperative languages. Tail recursion optimization can be implemented by transforming the program into continuation passing style during compiling, among other approaches.

The Scheme language standard requires implementations to support proper tail recursion, meaning they must allow an unbounded number of active tail calls. Proper tail recursion is not simply an optimization; it is a language feature that assures users that they can use recursion to express a loop and doing so would be safe-for-space. Moreover, contrary to its name, it accounts for all tail calls, not just tail recursion. While proper tail recursion is usually implemented by turning code into imperative loops, implementations might implement it in other ways. For example, Chicken intentionally maintains a stack and lets the stack overflow. However, when this happens, its garbage collector will claim space back, allowing an unbounded number of active tail calls even though it does not turn tail recursion into a loop.

Common patterns of recursion can be abstracted away using higher-order functions, with catamorphisms and anamorphisms (or "folds" and "unfolds") being the most obvious examples. Such recursion schemes play a role analogous to built-in control structures such as loops in imperative languages.

Most general purpose functional programming languages allow unrestricted recursion and are Turing complete, which makes the halting problem undecidable, can cause unsoundness of equational reasoning, and generally requires the introduction of inconsistency into the logic expressed by the language's type system. Some special purpose languages such as Coq allow only well-founded recursion and are strongly normalizing (nonterminating computations can be expressed only with infinite streams of values called codata). As a consequence, these languages fail to be Turing complete and expressing certain functions in them is impossible, but they can still express a wide class of interesting computations while avoiding the problems introduced by unrestricted recursion. Functional programming limited to well-founded recursion with a few other constraints is called total functional programming.

Strict versus non-strict evaluation
Functional languages can be categorized by whether they use strict (eager) or non-strict (lazy) evaluation, concepts that refer to how function arguments are processed when an expression is being evaluated. The technical difference is in the denotational semantics of expressions containing failing or divergent computations. Under strict evaluation, the evaluation of any term containing a failing subterm fails. For example, the expression:

print length([2+1, 3*2, 1/0, 5-4])

fails under strict evaluation because of the division by zero in the third element of the list. Under lazy evaluation, the length function returns the value 4 (i.e., the number of items in the list), since evaluating it does not attempt to evaluate the terms making up the list. In brief, strict evaluation always fully evaluates function arguments before invoking the function. Lazy evaluation does not evaluate function arguments unless their values are required to evaluate the function call itself.

The usual implementation strategy for lazy evaluation in functional languages is graph reduction. Lazy evaluation is used by default in several pure functional languages, including Miranda, Clean, and Haskell.

argues for lazy evaluation as a mechanism for improving program modularity through separation of concerns, by easing independent implementation of producers and consumers of data streams. Launchbury 1993 describes some difficulties that lazy evaluation introduces, particularly in analyzing a program's storage requirements, and proposes an operational semantics to aid in such analysis. Harper 2009 proposes including both strict and lazy evaluation in the same language, using the language's type system to distinguish them.

Type systems
Especially since the development of Hindley–Milner type inference in the 1970s, functional programming languages have tended to use typed lambda calculus, rejecting all invalid programs at compilation time and risking false positive errors, as opposed to the untyped lambda calculus, that accepts all valid programs at compilation time and risks false negative errors, used in Lisp and its variants (such as Scheme), as they reject all invalid programs at runtime when the information is enough to not reject valid programs. The use of algebraic datatypes makes manipulation of complex data structures convenient; the presence of strong compile-time type checking makes programs more reliable in absence of other reliability techniques like test-driven development, while type inference frees the programmer from the need to manually declare types to the compiler in most cases.

Some research-oriented functional languages such as Coq, Agda, Cayenne, and Epigram are based on intuitionistic type theory, which lets types depend on terms. Such types are called dependent types. These type systems do not have decidable type inference and are difficult to understand and program with. But dependent types can express arbitrary propositions in higher-order logic. Through the Curry–Howard isomorphism, then, well-typed programs in these languages become a means of writing formal mathematical proofs from which a compiler can generate certified code. While these languages are mainly of interest in academic research (including in formalized mathematics), they have begun to be used in engineering as well. Compcert is a compiler for a subset of the C programming language that is written in Coq and formally verified.

A limited form of dependent types called generalized algebraic data types (GADT's) can be implemented in a way that provides some of the benefits of dependently typed programming while avoiding most of its inconvenience. GADT's are available in the Glasgow Haskell Compiler, in OCaml and in Scala, and have been proposed as additions to other languages including Java and C#.

Referential transparency
Functional programs do not have assignment statements, that is, the value of a variable in a functional program never changes once defined. This eliminates any chances of side effects because any variable can be replaced with its actual value at any point of execution. So, functional programs are referentially transparent.

Consider C assignment statement, this changes the value assigned to the variable. Let us say that the initial value of  was , then two consecutive evaluations of the variable   yields   and   respectively. Clearly, replacing  with either   or   gives a program a different meaning, and so the expression is not referentially transparent. In fact, assignment statements are never referentially transparent.

Now, consider another function such as  is transparent, as it does not implicitly change the input x and thus has no such side effects. Functional programs exclusively use this type of function and are therefore referentially transparent.

Data structures
Purely functional data structures are often represented in a different way to their imperative counterparts. For example, the array with constant access and update times is a basic component of most imperative languages, and many imperative data-structures, such as the hash table and binary heap, are based on arrays. Arrays can be replaced by maps or random access lists, which admit purely functional implementation, but have logarithmic access and update times. Purely functional data structures have persistence, a property of keeping previous versions of the data structure unmodified. In Clojure, persistent data structures are used as functional alternatives to their imperative counterparts. Persistent vectors, for example, use trees for partial updating. Calling the insert method will result in some but not all nodes being created.

Comparison to imperative programming
Functional programming is very different from imperative programming. The most significant differences stem from the fact that functional programming avoids side effects, which are used in imperative programming to implement state and I/O. Pure functional programming completely prevents side-effects and provides referential transparency.

Higher-order functions are rarely used in older imperative programming. A traditional imperative program might use a loop to traverse and modify a list. A functional program, on the other hand, would probably use a higher-order "map" function that takes a function and a list, generating and returning a new list by applying the function to each list item.

Imperative vs. functional programming
The following two examples (written in JavaScript) achieve the same effect: they multiply all even numbers in an array by 10 and add them all, storing the final sum in the variable "result".

Traditional imperative loop:

Functional programming with higher-order functions: Sometimes the abstractions offered by functional programming might lead to development of more robust code that avoids certain issues that might arise when building upon large amount of complex, imperative code, such as off-by-one errors (see Greenspun's tenth rule).

Simulating state
There are tasks (for example, maintaining a bank account balance) that often seem most naturally implemented with state. Pure functional programming performs these tasks, and I/O tasks such as accepting user input and printing to the screen, in a different way.

The pure functional programming language Haskell implements them using monads, derived from category theory. Monads offer a way to abstract certain types of computational patterns, including (but not limited to) modeling of computations with mutable state (and other side effects such as I/O) in an imperative manner without losing purity. While existing monads may be easy to apply in a program, given appropriate templates and examples, many students find them difficult to understand conceptually, e.g., when asked to define new monads (which is sometimes needed for certain types of libraries).

Functional languages also simulate states by passing around immutable states. This can be done by making a function accept the state as one of its parameters, and return a new state together with the result, leaving the old state unchanged.

Impure functional languages usually include a more direct method of managing mutable state. Clojure, for example, uses managed references that can be updated by applying pure functions to the current state. This kind of approach enables mutability while still promoting the use of pure functions as the preferred way to express computations.

Alternative methods such as Hoare logic and uniqueness have been developed to track side effects in programs. Some modern research languages use effect systems to make the presence of side effects explicit.

Efficiency issues
Functional programming languages are typically less efficient in their use of CPU and memory than imperative languages such as C and Pascal. This is related to the fact that some mutable data structures like arrays have a very straightforward implementation using present hardware. Flat arrays may be accessed very efficiently with deeply pipelined CPUs, prefetched efficiently through caches (with no complex pointer chasing), or handled with SIMD instructions. It is also not easy to create their equally efficient general-purpose immutable counterparts. For purely functional languages, the worst-case slowdown is logarithmic in the number of memory cells used, because mutable memory can be represented by a purely functional data structure with logarithmic access time (such as a balanced tree). However, such slowdowns are not universal. For programs that perform intensive numerical computations, functional languages such as OCaml and Clean are only slightly slower than C according to The Computer Language Benchmarks Game. For programs that handle large matrices and multidimensional databases, array functional languages (such as J and K) were designed with speed optimizations.

Immutability of data can in many cases lead to execution efficiency by allowing the compiler to make assumptions that are unsafe in an imperative language, thus increasing opportunities for inline expansion. Even if the involved copying that may seem implicit when dealing with persistent immutable data structures might seem computationally costly, some functional programming languages, like Clojure solve this issue by implementing mechanisms for safe memory sharing between formally immutable data. Rust distinguishes itself by its approach to data immutability which involves immutable references and a concept called lifetimes.

Immutable data with separation of identity and state and shared-nothing schemes can also potentially be more well-suited for concurrent and parallel programming by the virtue of reducing or eliminating the risk of certain concurrency hazards, since concurrent operations are usually atomic and this allows eliminating the need for locks. This is how for example  classes are implemented, where some of them are immutable variants of the corresponding classes that are not suitable for concurrent use. Functional programming languages often have a concurrency model that instead of shared state and synchronization, leverages message passing mechanisms (such as the actor model, where each actor is a container for state, behavior, child actors and a message queue). This approach is common in Erlang/Elixir or Akka.

Lazy evaluation may also speed up the program, even asymptotically, whereas it may slow it down at most by a constant factor (however, it may introduce memory leaks if used improperly). Launchbury 1993 discusses theoretical issues related to memory leaks from lazy evaluation, and O'Sullivan et al. 2008 give some practical advice for analyzing and fixing them. However, the most general implementations of lazy evaluation making extensive use of dereferenced code and data perform poorly on modern processors with deep pipelines and multi-level caches (where a cache miss may cost hundreds of cycles).

Abstraction cost
Some functional programming languages might not optimize abstractions such as higher order functions like "map" or "filter" as efficiently as the underlying imperative operations. Consider, as an example, the following two ways to check if 5 is an even number in Clojure: When benchmarked using the Criterium tool on a Ryzen 7900X GNU/Linux PC in a Leiningen REPL 2.11.2, running on Java VM version 22 and Clojure version 1.11.1, the first implementation, which is implemented as:

has the mean execution time of 4.76 ms, while the second one, in which  is a direct invocation of the underlying Java method, has a mean execution time of 2.8 μs – roughly 1700 times faster. Part of that can be attributed to the type checking and exception handling involved in the implementation of, so let's take for instance the lo library for Go, which implements various higher-order functions common in functional programming languages using generics. In a benchmark provided by the library's author, calling  is 4% slower than an equivalent   loop and has the same allocation profile, which can be attributed to various compiler optimizations, such as inlining.

One distinguishing feature of Rust are zero-cost abstractions. This means that using them imposes no additional runtime overhead. This is achieved thanks to the compiler using loop unrolling, where each iteration of a loop, be it imperative or using iterators, is converted into a standalone Assembly instruction, without the overhead of the loop controlling code. If an iterative operation writes to an array, the resulting array's elements will be stored in specific CPU registers, allowing for constant-time access at runtime.

Functional programming in non-functional languages
It is possible to use a functional style of programming in languages that are not traditionally considered functional languages. For example, both D and Fortran 95 explicitly support pure functions.

JavaScript, Lua, Python and Go had first class functions from their inception. Python had support for "lambda", "map", "reduce", and "filter" in 1994, as well as closures in Python 2.2, though Python 3 relegated "reduce" to the   standard library module. First-class functions have been introduced into other mainstream languages such as PHP 5.3, Visual Basic 9, C# 3.0, C++11, and Kotlin.

In PHP, anonymous classes, closures and lambdas are fully supported. Libraries and language extensions for immutable data structures are being developed to aid programming in the functional style.

In Java, anonymous classes can sometimes be used to simulate closures; however, anonymous classes are not always proper replacements to closures because they have more limited capabilities. Java 8 supports lambda expressions as a replacement for some anonymous classes.

In C#, anonymous classes are not necessary, because closures and lambdas are fully supported. Libraries and language extensions for immutable data structures are being developed to aid programming in the functional style in C#.

Many object-oriented design patterns are expressible in functional programming terms: for example, the strategy pattern simply dictates use of a higher-order function, and the visitor pattern roughly corresponds to a catamorphism, or fold.

Similarly, the idea of immutable data from functional programming is often included in imperative programming languages, for example the tuple in Python, which is an immutable array, and Object.freeze in JavaScript.

Comparison to logic programming
Logic programming can be viewed as a generalisation of functional programming, in which functions are a special case of relations. For example, the function, mother(X) = Y, (every X has only one mother Y) can be represented by the relation mother(X, Y). Whereas functions have a strict input-output pattern of arguments, relations can be queried with any pattern of inputs and outputs. Consider the following logic program: The program can be queried, like a functional program, to generate mothers from children: But it can also be queried backwards, to generate children: It can even be used to generate all instances of the mother relation: Compared with relational syntax, functional syntax is a more compact notation for nested functions. For example, the definition of maternal grandmother in functional syntax can be written in the nested form: The same definition in relational notation needs to be written in the unnested form: Here  means if and  means and.

However, the difference between the two representations is simply syntactic. In Ciao Prolog, relations can be nested, like functions in functional programming: Ciao transforms the function-like notation into relational form and executes the resulting logic program using the standard Prolog execution strategy.

Text editors
Emacs, a highly extensible text editor family uses its own Lisp dialect for writing plugins. The original author of the most popular Emacs implementation, GNU Emacs and Emacs Lisp, Richard Stallman considers Lisp one of his favorite programming languages.

Helix, since version 24.03 supports previewing AST as S-expressions, which are also the core feature of the Lisp programming language family.

Spreadsheets
Spreadsheets can be considered a form of pure, zeroth-order, strict-evaluation functional programming system. However, spreadsheets generally lack higher-order functions as well as code reuse, and in some implementations, also lack recursion. Several extensions have been developed for spreadsheet programs to enable higher-order and reusable functions, but so far remain primarily academic in nature.

Academia
Functional programming is an active area of research in the field of programming language theory. There are several peer-reviewed publication venues focusing on functional programming, including the International Conference on Functional Programming, the Journal of Functional Programming, and the Symposium on Trends in Functional Programming.

Industry
Functional programming has been employed in a wide range of industrial applications. For example, Erlang, which was developed by the Swedish company Ericsson in the late 1980s, was originally used to implement fault-tolerant telecommunications systems, but has since become popular for building a range of applications at companies such as Nortel, Facebook, Électricité de France and WhatsApp. Scheme, a dialect of Lisp, was used as the basis for several applications on early Apple Macintosh computers and has been applied to problems such as training-simulation software and telescope control. OCaml, which was introduced in the mid-1990s, has seen commercial use in areas such as financial analysis, driver verification, industrial robot programming and static analysis of embedded software. Haskell, though initially intended as a research language, has also been applied in areas such as aerospace systems, hardware design and web programming.

Other functional programming languages that have seen use in industry include Scala, F#, Wolfram Language, Lisp, Standard ML  and Clojure. Scala has been widely used in Data science, while ClojureScript, Elm or PureScript are some of the functional frontend programming languages used in production. Elixir's Phoenix framework is also used by some relatively popular commercial projects, such as Font Awesome or Allegro (one of the biggest e-commerce platforms in Poland) 's classified ads platform Allegro Lokalnie.

Functional "platforms" have been popular in finance for risk analytics (particularly with large investment banks). Risk factors are coded as functions that form interdependent graphs (categories) to measure correlations in market shifts, similar in manner to Gröbner basis optimizations but also for regulatory frameworks such as Comprehensive Capital Analysis and Review. Given the use of OCaml and Caml variations in finance, these systems are sometimes considered related to a categorical abstract machine. Functional programming is heavily influenced by category theory.

Education
Many universities teach functional programming. Some treat it as an introductory programming concept while others first teach imperative programming methods.

Outside of computer science, functional programming is used to teach problem-solving, algebraic and geometric concepts. It has also been used to teach classical mechanics, as in the book Structure and Interpretation of Classical Mechanics.

In particular, Scheme has been a relatively popular choice for teaching programming for years.

title: Functional programming


text:
Talk:Fundamental theorem of calculus/Archive 1

I don't think the proof is correct: you use the mean value theorem, but that theorem

only applies to differentiable functions. At that point you don't know yet that

F is differentiable.

Modern proofs do not rely on geometry. This is a faulty approach. RoseParks

Where does geometry come into this?

Besides, proofs are either correct or incorrect. Whilst we should strive for elegance, an inelegant proof is still a proof. User:GWO

It has nothing to do with elegance or lack thereof. Rather the fact that you used the mvt to prove the ftoc is incorrect for the reason RoseParks stated: You do not yet know that F is differentiable. In fact you are assuming that F is differentiable (through the mvt) and then using this illegally to prove the ftoc. makes very little sense to me and a lot of others too I am sure. :-)

Assessment comment
Substituted at 06:32, 7 May 2016 (UTC)


text:
February 29

February 29 is a leap day (or "leap year day")—an intercalary date added periodically to create leap years in the Julian and Gregorian calendars. It is the 60th day of a leap year in both Julian and Gregorian calendars, and 306 days remain until the end of the leap year. It is the last day of February in leap years, with the exception of 1712 in Sweden. It is also the last day of meteorological winter in the Northern Hemisphere and the last day of meteorological summer in the Southern Hemisphere in leap years.

In the Gregorian calendar, the standard civil calendar used in most of the world, February 29 is added in each year that is an integer multiple of four, unless it is evenly divisible by 100 but not by 400. For example, 1900 was not a leap year, but 2000 was. The Julian calendar—since 1923 a liturgical calendar—has a February 29 every fourth year without exception. Consequently, February 29 in the Julian calendar, since 1900, falls 13 days later than February 29 in the Gregorian, until the year 2100.

The convention of using February 29 was not widely accepted before the 15th century; from Julian's edict until the 16th century (formally), February 24 was doubled instead.

Pre-1600

 * 888 – Odo, count of Paris, is crowned king of West Francia (France) by Archbishop Walter of Sens at Compiègne.
 * 1504 – Christopher Columbus uses his knowledge of a lunar eclipse that night to convince Jamaican natives to provide him with supplies.

1601–1900

 * 1644 – Abel Tasman's second Pacific voyage begins as he leaves Batavia in command of three ships.
 * 1704 – In Queen Anne's War, French forces and Native Americans stage a raid on Deerfield, Massachusetts Bay Colony, killing 56 villagers and taking more than 100 captive.
 * 1712 – February 29 is followed by February 30 in Sweden, in a move to abolish the Swedish calendar for a return to the Julian calendar.
 * 1720 – Ulrika Eleonora, Queen of Sweden abdicates in favour of her husband, who becomes King Frederick I on March 24.
 * 1768 – Polish nobles form the Bar Confederation.
 * 1796 – The Jay Treaty between the United States and Great Britain comes into force, facilitating ten years of peaceful trade between the two nations.
 * 1892 – St. Petersburg, Florida is incorporated.

1901–present

 * 1908 – James Madison University is founded at Harrisonburg, Virginia, United States as The State Normal and Industrial School for Women by the Virginia General Assembly.
 * 1912 – The Piedra Movediza (Moving Stone) of Tandil falls and breaks.
 * 1916 – Tokelau is annexed by the United Kingdom.
 * 1916 – In South Carolina, the minimum working age for factory, mill and mine workers is raised from 12 to 14 years old.
 * 1920 – The Czechoslovak National Assembly adopts the Constitution.
 * 1936 – The February 26 Incident in Tokyo ends.
 * 1940 – For her performance as Mammy in Gone with the Wind, Hattie McDaniel becomes the first African American to win an Academy Award.
 * 1940  – Finland initiates Winter War peace negotiations.
 * 1940  – In a ceremony held in Berkeley, California, physicist Ernest Lawrence receives the 1939 Nobel Prize in Physics from Sweden's consul general in San Francisco.
 * 1944 – The Admiralty Islands are invaded in Operation Brewer, led by American general Douglas MacArthur, in World War II.
 * 1960 – The 5.7 Agadir earthquake shakes coastal Morocco with a maximum perceived intensity of X (Extreme), destroying Agadir and leaving 12,000 dead and another 12,000 injured.
 * 1964 – British Eagle International Airlines Flight 802/6 crashes into the Glungezer mountain in the Tux Alps of Austria, killing all 75 people aboard.
 * 1972 – South Korea withdraws 11,000 of its 48,000 troops from Vietnam as part of Nixon's Vietnamization policy in the Vietnam War.
 * 1980 – Gordie Howe of the Hartford Whalers makes NHL history as he scores his 800th goal.
 * 1984 – Pierre Trudeau announces his retirement as Liberal Party leader and Prime Minister of Canada.
 * 1988 – South African archbishop Desmond Tutu is arrested along with 100 other clergymen during a five-day anti-apartheid demonstration in Cape Town.
 * 1988  – Svend Robinson becomes the first member of the House of Commons of Canada to come out as gay.
 * 1992 – A referendum is begun in Bosnia and Herzegovina for the determination of Bosnian independence.
 * 1996 – Faucett Perú Flight 251 crashes in the Andes; all 123 passengers and crew are killed.
 * 1996  – The Siege of Sarajevo officially ends.
 * 2000 – Chechens attack a guard post near Ulus Kert, eventually killing 84 Russian paratroopers during the Second Chechen War.
 * 2004 – Jean-Bertrand Aristide is removed as president of Haiti following a coup.
 * 2008 – The United Kingdom's Ministry of Defence withdraws Prince Harry from a tour of Afghanistan after news of his deployment is leaked to foreign media.
 * 2008  – Misha Defonseca admits to fabricating her memoir, Misha: A Mémoire of the Holocaust Years, in which she claims to have lived with a pack of wolves in the woods during the Holocaust.
 * 2012 – North Korea agrees to suspend uranium enrichment and nuclear and long-range missile tests in return for US food aid.
 * 2016 – At least 40 people are killed and 58 others wounded following a suicide bombing by ISIL at a Shi'ite funeral in the city of Miqdadiyah, Diyala.
 * 2020  – During a demonstration, pro-government colectivos shoot at disputed President and Speaker of the National Assembly Juan Guaidó and his supporters in Barquisimeto, Venezuela, leaving five injured.
 * 2020  – The United States and the Taliban sign the Doha Agreement for bringing peace to Afghanistan.
 * 2020 – Muhyiddin Yassin is appointed as the 8th Prime Minister of Malaysia, amid the 2020 Malaysian political crisis.
 * 2024 – The Flour massacre (also known as the Al-Rashid massacre) took place on al-Rashid street at the Al-Nabulsi roundabout to the west of Gaza City in the Palestinian territory of the Gaza Strip where more than 100 Palestinians were killed and over 750 were wounded after Israeli forces opened fire on Palestinians waiting for humanitarian aid amidst the Israel–Hamas war.

Pre-1600

 * 1468 – Pope Paul III (d. 1549)
 * 1528 – Albert V, Duke of Bavaria (d. 1579)
 * 1528  – Domingo Báñez, Spanish theologian (d. 1604)
 * 1572 – Edward Cecil, 1st Viscount Wimbledon (d. 1638)
 * 1576 – Antonio Neri, Florentine priest and glassmaker (d. 1614)

1601–1900

 * 1640 – Benjamin Keach, Particular Baptist preacher and author whose name is given to Keach's Catechism (d. 1704)
 * 1692 – John Byrom, English poet and educator (d. 1763)
 * 1724 – Eva Marie Veigel, Austrian-English dancer (d. 1822)
 * 1736 – Ann Lee, English-American religious leader, founder of the Shakers (d. 1784)
 * 1792 – Gioachino Rossini, Italian composer (d. 1868)
 * 1812 – James Milne Wilson, Scottish-Australian soldier and politician, eighth Premier of Tasmania (d. 1880)
 * 1828 – Emmeline B. Wells, American journalist, poet and activist (d. 1921)
 * 1836 – Dickey Pearce, American baseball player and manager (d. 1908)
 * 1840 – Theodor Leber, German ophthalmologist (d. 1917)
 * 1852 – Frank Gavan Duffy, Irish-Australian lawyer and judge, fourth Chief Justice of Australia (d. 1936)
 * 1852 – Prince George Maximilianovich, 6th Duke of Leuchtenberg (d. 1912)
 * 1860 – Herman Hollerith, American statistician and businessman, co-founder of the Computing-Tabulating-Recording Company (d. 1929)
 * 1884 – Richard S. Aldrich, American lawyer and politician (d. 1941)
 * 1892 – Augusta Savage, American sculptor (d. 1962)
 * 1896 – Morarji Desai, Indian civil servant and politician, fourth Prime Minister of India (d. 1995)
 * 1896 – William A. Wellman, American actor, director, producer and screenwriter (d. 1975)

1901–present

 * 1904 – Jimmy Dorsey, American saxophonist, composer and bandleader (d. 1957)
 * 1904  – Pepper Martin, American baseball player and manager (d. 1965)
 * 1908 – Balthus, French-Swiss painter and illustrator (d. 2001)
 * 1908  – Dee Brown, American historian and author (d. 2002)
 * 1908  – Alf Gover, English cricketer and coach (d. 2001)
 * 1908  – Louie Myfanwy Thomas, Welsh writer (d. 1968)
 * 1912 – Kamil Tolon, Turkish industrialist (d. 1978)
 * 1916 – James B. Donovan, American lawyer (d. 1970)
 * 1916  – Leonard Shoen, founder of U-Haul Corp. (d. 1999)
 * 1920 – Fyodor Abramov, Russian author and critic (d. 1983)
 * 1920  – Arthur Franz, American actor (d. 2006)
 * 1920  – James Mitchell, American actor and dancer (d. 2010)
 * 1920  – Michèle Morgan, French-American actress and singer (d. 2016)
 * 1920 – Rolland W. Redlin, American lawyer and politician (d. 2011)
 * 1924 – David Beattie, New Zealand judge and politician, 14th Governor-General of New Zealand (d. 2001)
 * 1924  – Carlos Humberto Romero, Salvadoran politician, President of El Salvador (d. 2017)
 * 1924  – Al Rosen, American baseball player and manager (d. 2015)
 * 1928 – Joss Ackland, English actor (d. 2023)
 * 1928  – Jean Adamson, British writer and illustrator (Topsy and Tim)
 * 1928  – Vance Haynes, American archaeologist, geologist and author
 * 1928  – Michael Henshall, English Anglican suffragan bishop (d. 2017)
 * 1928  – Seymour Papert, South African mathematician and computer scientist, co-creator of the Logo programming language (d. 2016)
 * 1928  – Tempest Storm, born Annie Banks, "The Queen Of Exotic Dancers", American burlesque performer and actress (d. 2021)
 * 1932 – Gene H. Golub, American mathematician and academic (d. 2007)
 * 1932 – Masten Gregory, American race car driver (d. 1985)
 * 1932 – Reri Grist, American soprano and actress
 * 1932 – Jaguar, Brazilian cartoonist
 * 1932 – Gavin Stevens, Australian cricketer
 * 1936 – Nh. Dini, Indonesian writer (d. 2018)
 * 1936 – Jack R. Lousma, American colonel, astronaut and politician
 * 1936 – Henri Richard, Canadian ice hockey player (d. 2020)
 * 1936 – Alex Rocco, American actor (d. 2015)
 * 1940 – Sonja Barend, Dutch talk show host
 * 1944 – Dennis Farina, American police officer and actor (d. 2013)
 * 1944  – Nicholas Frayling, English priest and academic
 * 1944  – Phyllis Frelich, American actress (d. 2014)
 * 1944  – Steve Mingori, American baseball player (d. 2008)
 * 1944  – Paolo Eleuteri Serpieri, Italian author and illustrator
 * 1944  – Lennart Svedberg, Swedish ice hockey player (d. 1972).
 * 1944  – Saeed Poursamimi, Iranian actor
 * 1948 – Hermione Lee, English author, critic and academic
 * 1948  – Manoel Maria, Brazilian footballer
 * 1948  – Patricia A. McKillip, American author (d. 2022)
 * 1952 – Tim Powers, American author and educator
 * 1952  – Raisa Smetanina, Russian cross-country skier
 * 1952  – Bart Stupak, American police officer and politician
 * 1956 – Knut Agnred, Swedish singer, actor and comedian
 * 1956  – Jonathan Coleman, English-Australian radio and television host (d. 2021)
 * 1956  – Bob Speller, Canadian businessman and politician, 30th Canadian Minister of Agriculture (d. 2021)
 * 1956  – Aileen Wuornos, American serial killer (d. 2002)
 * 1960 – Khaled, Algerian singer-songwriter
 * 1960  – Richard Ramirez, American serial killer and sex offender (d. 2013)
 * 1960  – Tony Robbins, American author and motivational activist
 * 1964 – Dave Brailsford, English cyclist and coach
 * 1964  – Carmel Busuttil, former Maltese footballer
 * 1964  – Lyndon Byers, Canadian ice hockey player and radio host
 * 1964  – Mervyn Warren, American tenor, composer and producer
 * 1968 – Chucky Brown, American basketball player and coach
 * 1968  – Gareth Farr, New Zealand composer and percussionist
 * 1968  – Pete Fenson, American curler
 * 1968  – Bryce Paup, American football player and coach
 * 1968  – Howard Tayler, American author and illustrator
 * 1968  – Eugene Volokh, Ukrainian-American lawyer and educator
 * 1968  – Frank Woodley, Australian actor, producer and screenwriter
 * 1972 – Sylvie Lubamba, Italian showgirl
 * 1972  – Mike Pollitt, English footballer and coach
 * 1972  – Antonio Sabàto Jr., Italian-American model and actor
 * 1972  – Pedro Sánchez, Prime Minister of Spain
 * 1972  – Dave Williams, American singer (d. 2002)
 * 1972  – Saul Williams, American singer-songwriter
 * 1972  – Pedro Zamora, Cuban-American activist and educator (d. 1994)
 * 1976 – Vonteego Cummings, American basketball player
 * 1976  – Katalin Kovács, Hungarian sprint kayaker
 * 1976  – Terrence Long, American baseball player
 * 1976  – Ja Rule, American rapper and actor
 * 1980 – Çağdaş Atan, Turkish footballer and coach
 * 1980  – Simon Gagné, Canadian ice hockey player
 * 1980  – Rubén Plaza, Spanish cyclist
 * 1980  – Clinton Toopi, New Zealand rugby league player
 * 1980  – Taylor Twellman, American soccer player and sportscaster
 * 1980  – Peter Scanavino, American actor (Law & Order: Special Victims Unit)
 * 1984 – Darren Ambrose, English footballer
 * 1984  – Rica Imai, Japanese model and actress
 * 1984  – Cullen Jones, American swimmer
 * 1984  – Nuria Martínez, Spanish basketball player
 * 1984  – Lena Raine, American video game composer and producer
 * 1984  – Rakhee Thakrar, English actress
 * 1984  – Cam Ward, Canadian ice hockey player
 * 1984  – Mark Foster, American singer, songwriter and musician
 * 1988 – Lena Gercke, German model and television host
 * 1988  – Benedikt Höwedes, German footballer
 * 1988  – Brent Macaffer, Australian Rules footballer
 * 1988  – Hannah Mills, Welsh sports sailor
 * 1992 – Sean Abbott, Australian cricketer
 * 1992  – Eric Kendricks, American football player
 * 1992  – Jessica Long, American paralympic swimmer
 * 1992  – Jessie T. Usher, American actor
 * 1992  – Saphir Taïder, Algerian footballer
 * 1996 – Nelson Asofa-Solomona, New Zealand rugby league player
 * 1996  – Norberto Briasco, Argentine-Armenian footballer
 * 1996  – Reece Prescod, British sprinter
 * 1996  – Claudia Williams, New Zealand tennis player
 * 2000 – Tyrese Haliburton, American basketball player
 * 2000  – Ferran Torres, Spanish footballer
 * 2000  – Jesper Lindstrøm, Danish footballer
 * 2004 – Lydia Jacoby, American swimmer

Pre-1600

 * 468 – Pope Hilarius
 * 992 – Oswald of Worcester, Anglo-Saxon archbishop and saint (b. 925)
 * 1460 – Albert III, Duke of Bavaria-Munich (b. 1401)
 * 1528 – Patrick Hamilton, Scottish Protestant reformer and martyr (b. 1504)
 * 1592 – Alessandro Striggio, Italian composer and diplomat (b. 1536/1537)
 * 1600 – Caspar Hennenberger, German pastor, historian and cartographer (b. 1529)

1601–1900

 * 1604 – John Whitgift, English archbishop and academic (b. 1530)
 * 1712 – Johann Conrad Peyer, Swiss anatomist (b. 1653)
 * 1744 – John Theophilus Desaguliers, French-English physicist and philosopher (b. 1683)
 * 1792 – Johann Andreas Stein, German piano builder (b. 1728)
 * 1820 – Johann Joachim Eschenburg, German historian and critic (b. 1743)
 * 1848 – Louis-François Lejeune, French general, painter and lithographer (b. 1775)
 * 1856 – Auguste Chapdelaine, French Christian missionary (b. 1814)
 * 1868 – Ludwig I of Bavaria (b. 1786)
 * 1880 – James Milne Wilson, Scottish-Australian soldier and politician, 8th Premier of Tasmania (b. 1812)

1901–present

 * 1904 – Patrick O'Sullivan, Irish-Australian politician (b. 1818)
 * 1904  – Henri Joseph Anastase Perrotin, French astronomer (b. 1845)
 * 1908 – Pat Garrett, American sheriff (b. 1850)
 * 1908  – John Hope, 1st Marquess of Linlithgow, Scottish-Australian politician, 1st Governor-General of Australia (b. 1860)
 * 1916 – John Nanson, English-Australian journalist and politician (b. 1863)
 * 1920 – Ernie Courtney, American baseball player (b. 1875)
 * 1924 – Frederic Chapple, Australian educator (b. 1845)
 * 1928 – Adolphe Appia, Swiss architect and theorist (b. 1862)
 * 1928  – Ina Coolbrith, American poet and librarian (b. 1841)
 * 1932 – Arthur Mills Lea, Australian entomologist (b. 1868)
 * 1932  – Giuseppe Vitali, Italian mathematician (b. 1875)
 * 1940 – E. F. Benson, English archaeologist and author (b. 1867)
 * 1944 – Pehr Evind Svinhufvud, Finnish lawyer, judge and politician, 3rd President of Finland (b. 1861)
 * 1948 – Robert Barrington-Ward, English lawyer and journalist (b. 1891)
 * 1952 – Sarah Ann Jenyns, Australian entrepreneur (b. 1865)
 * 1956 – Elpidio Quirino, Filipino lawyer and politician, 6th President of the Philippines (b. 1890)
 * 1960 – Melvin Purvis, American police officer and FBI agent (b. 1903)
 * 1960  – Walter Yust, American journalist and author (b. 1894)
 * 1964 – Frank Albertson, American actor and singer (b. 1909)
 * 1968 – Tore Ørjasæter, Norwegian poet and educator (b. 1886)
 * 1972 – Tom Davies, American football player and coach (b. 1896)
 * 1976 – Florence P. Dwyer, American politician (b. 1902)
 * 1980 – Yigal Allon, Israeli general and politician, Prime Minister of Israel (b. 1918)
 * 1980  – Gil Elvgren, American painter and illustrator (b. 1914)
 * 1984 – Ludwik Starski, Polish screenwriter and songwriter (b. 1903)
 * 1992 – Ruth Pitter, English poet and author (b. 1897)
 * 1996 – Frank Daniel, Czech-American director, producer and screenwriter (b. 1926)
 * 1996  – Wes Farrell, American singer-songwriter and producer (b. 1939)
 * 1996  – Ralph Rowe, American baseball player, coach and manager (b. 1924)
 * 2000 – Dennis Danell, American guitarist (b. 1961)
 * 2004 – Kagamisato Kiyoji, Japanese sumo wrestler, the 42nd Yokozuna (b. 1923)
 * 2004  – Jerome Lawrence, American playwright and author (b. 1915)
 * 2004  – Harold Bernard St. John, Barbadian lawyer and politician, 3rd Prime Minister of Barbados (b. 1931)
 * 2004  – Lorrie Wilmot, South African cricketer (b. 1943)
 * 2008 – Janet Kagan, American author (b. 1946)
 * 2008  – Erik Ortvad, Danish painter and illustrator (b. 1917)
 * 2008  – Akira Yamada, Japanese scholar and philosopher (b. 1922)
 * 2012 – Davy Jones, English singer, guitarist and actor (b. 1945)
 * 2012  – Sheldon Moldoff, American illustrator (b. 1920)
 * 2012  – P. K. Narayana Panicker, Indian social leader (b. 1930)
 * 2016 – Wenn V. Deramas, Filipino director and screenwriter (b. 1966)
 * 2016  – Gil Hill, American police officer, actor and politician (b. 1931)
 * 2016  – Josefin Nilsson, Swedish singer (b. 1969)
 * 2016  – Mumtaz Qadri, Pakistani assassin, executed (b. 1985)
 * 2016  – Louise Rennison, English author (b. 1951)
 * 2020 – Dieter Laser, German actor (b. 1942)
 * 2020  – Éva Székely, Hungarian Hall of Fame swimmer and 1952 Olympic champion (b. 1927)
 * 2024  – Ali Hassan Mwinyi, 2nd President of Tanzania and 3rd President of Zanzibar (b. 1925)
 * 2024  – Brian Mulroney, 18th Prime Minister of Canada (b. 1939)

Holidays and observances

 * As a Christian feast day:
 * Saint John Cassian
 * February 29 in the Orthodox church
 * Rare Disease Day (in leap years; usually celebrated in common years on February 28)
 * Bachelor's Day (Ireland and United Kingdom)

title: February 29