Binary GCD Algorithm
   HOME





Binary GCD Algorithm
The binary GCD algorithm, also known as Stein's algorithm or the binary Euclidean algorithm, is an algorithm that computes the greatest common divisor (GCD) of two nonnegative integers. Stein's algorithm uses simpler arithmetic operations than the conventional Euclidean algorithm; it replaces division with arithmetic shifts, comparisons, and subtraction. Although the algorithm in its contemporary form was first published by the physicist and programmer Josef Stein in 1967, it was known by the 2nd century BCE, in ancient China. Algorithm The algorithm finds the GCD of two nonnegative numbers u and v by repeatedly applying these identities: # \gcd(u, 0) = u: everything divides zero, and u is the largest number that divides u. # \gcd(2u, 2v) = 2 \cdot \gcd(u, v): 2 is a common divisor. # \gcd(u, 2v) = \gcd(u, v) if u is odd: 2 is then not a common divisor. # \gcd(u, v) = \gcd(u, v - u) if u, v odd and u \leq v. As GCD is commutative (\gcd(u, v) = \gcd(v, u)), those identities st ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Binary GCD Algorithm Visualisation
Binary may refer to: Science and technology Mathematics * Binary number, a representation of numbers using only two values (0 and 1) for each digit * Binary function, a function that takes two arguments * Binary operation, a mathematical operation that takes two arguments * Binary relation, a relation involving two elements * Finger binary, a system for counting in binary numbers on the fingers of human hands Computing * Binary code, the representation of text and data using only the digits 1 and 0 * Bit, or binary digit, the basic unit of information in computers * Binary file, composed of something other than human-readable text ** Executable, a type of binary file that contains machine code for the computer to execute * Binary tree, a computer tree data structure in which each node has at most two children * Binary-coded decimal, a method for encoding for decimal digits in binary sequences Astronomy * Binary star, a star system with two stars in it * Binary planet, ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Schönhage–Strassen Algorithm
The Schönhage–Strassen algorithm is an asymptotically fast multiplication algorithm for large integers, published by Arnold Schönhage and Volker Strassen in 1971. It works by recursively applying fast Fourier transform (FFT) over the integers modulo 2^n + 1. The run-time bit complexity to multiply two -digit numbers using the algorithm is O(n \cdot \log n \cdot \log \log n) in big notation. The Schönhage–Strassen algorithm was the asymptotically fastest multiplication method known from 1971 until 2007. It is asymptotically faster than older methods such as Karatsuba and Toom–Cook multiplication, and starts to outperform them in practice for numbers beyond about 10,000 to 100,000 decimal digits. In 2007, Martin Fürer published an algorithm with faster asymptotic complexity. In 2019, David Harvey and Joris van der Hoeven demonstrated that multi-digit multiplication has theoretical O(n\log n) complexity; however, their algorithm has constant factors which make it im ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Burlington, VT
Burlington, officially the City of Burlington, is the most populous city in the U.S. state of Vermont and the seat of Chittenden County. It is located south of the Canada–United States border and south of Montreal. As of the 2020 United States census, the population was 44,743. It is the least populous city in the 50 U.S. states to be the most populous city in its state. A regional college town, Burlington is home to the University of Vermont (UVM) and Champlain College. Vermont's largest hospital, the UVM Medical Center, is within the city limits. The City of Burlington owns Vermont's largest airport, the Patrick Leahy Burlington International Airport, located in neighboring South Burlington. In 2015, Burlington became the first city in the U.S. to run entirely on renewable energy. History Early history to early 20th century King George II of Great Britain placed the western border of the Province of New Hampshire twenty miles east of the Hudson River. However, Ge ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Malmö
Malmö is the List of urban areas in Sweden by population, third-largest city in Sweden, after Stockholm and Gothenburg, and the List of urban areas in the Nordic countries, sixth-largest city in Nordic countries, the Nordic region. Located on the Øresund, Öresund Øresund, strait on the southwestern coast of Sweden, it is the largest city in Scania, with a municipal population of 365,644 in 2024, and is the Governors of Skåne County, gubernatorial seat of Skåne County. Malmö received its city privileges in 1353, and today Metropolitan Malmö, Malmö's metropolitan region is home to over 700,000 people. Malmö is the site of Sweden's only Fixed link, fixed direct link to continental Europe, the Öresund Bridge, completed in 2000. The bridge connects Sweden to Denmark, and carries both road and rail traffic. The Öresund Region, which includes Malmö and Copenhagen, is home to four million people. The city was one of the earliest and most-Industrial Revolution, industri ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Graduate Texts In Mathematics
Graduate Texts in Mathematics (GTM) () is a series of graduate-level textbooks in mathematics published by Springer-Verlag. The books in this series, like the other Springer-Verlag mathematics series, are yellow books of a standard size (with variable numbers of pages). The GTM series is easily identified by a white band at the top of the book. The books in this series tend to be written at a more advanced level than the similar Undergraduate Texts in Mathematics series, although there is a fair amount of overlap between the two series in terms of material covered and difficulty level. List of books #''Introduction to Axiomatic Set Theory'', Gaisi Takeuti, Wilson M. Zaring (1982, 2nd ed., ) #''Measure and Category – A Survey of the Analogies between Topological and Measure Spaces'', John C. Oxtoby (1980, 2nd ed., ) #''Topological Vector Spaces'', H. H. Schaefer, M. P. Wolff (1999, 2nd ed., ) #''A Course in Homological Algebra'', Peter Hilton, Urs Stammbach (1997, 2 ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Springer-Verlag
Springer Science+Business Media, commonly known as Springer, is a German multinational publishing company of books, e-books and peer-reviewed journals in science, humanities, technical and medical (STM) publishing. Originally founded in 1842 in Berlin, it expanded internationally in the 1960s, and through mergers in the 1990s and a sale to venture capitalists it fused with Wolters Kluwer and eventually became part of Springer Nature in 2015. Springer has major offices in Berlin, Heidelberg, Dordrecht, and New York City. History Julius Springer founded Springer-Verlag in Berlin in 1842 and his son Ferdinand Springer grew it from a small firm of 4 employees into Germany's then second-largest academic publisher with 65 staff in 1872.Chronology
". Springer Science+Business Media.
In 1964, Springer expanded its business internationally, ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

The Art Of Computer Programming
''The Art of Computer Programming'' (''TAOCP'') is a comprehensive multi-volume monograph written by the computer scientist Donald Knuth presenting programming algorithms and their analysis. it consists of published volumes 1, 2, 3, 4A, and 4B, with more expected to be released in the future. The Volumes 1–5 are intended to represent the central core of computer programming for sequential machines; the subjects of Volumes 6 and 7 are important but more specialized. When Knuth began the project in 1962, he originally conceived of it as a single book with twelve chapters. The first three volumes of what was then expected to be a seven-volume set were published in 1968, 1969, and 1973. Work began in earnest on Volume 4 in 1973, but was suspended in 1977 for work on typesetting prompted by the second edition of Volume 2. Writing of the final copy of Volume 4A began in longhand in 2001, and the first online pre-fascicle, 2A, appeared later in 2001. The first published installment ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Least Common Multiple
In arithmetic and number theory, the least common multiple (LCM), lowest common multiple, or smallest common multiple (SCM) of two integers ''a'' and ''b'', usually denoted by , is the smallest positive integer that is divisible by both ''a'' and ''b''. Since division of integers by zero is undefined, this definition has meaning only if ''a'' and ''b'' are both different from zero. However, some authors define lcm(''a'', 0) as 0 for all ''a'', since 0 is the only common multiple of ''a'' and 0. The least common multiple of the denominators of two fractions is the "lowest common denominator" (lcd), and can be used for adding, subtracting or comparing the fractions. The least common multiple of more than two integers ''a'', ''b'', ''c'', . . . , usually denoted by , is defined as the smallest positive integer that is divisible by each of ''a'', ''b'', ''c'', . . . Overview A multiple of a number is the product of that number and an integer. For example, 10 is a multiple of ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Extended Euclidean Algorithm
In arithmetic and computer programming, the extended Euclidean algorithm is an extension to the Euclidean algorithm, and computes, in addition to the greatest common divisor (gcd) of integers ''a'' and ''b'', also the coefficients of Bézout's identity, which are integers ''x'' and ''y'' such that : ax + by = \gcd(a, b). This is a certifying algorithm, because the gcd is the only number that can simultaneously satisfy this equation and divide the inputs. It allows one to compute also, with almost no extra cost, the quotients of ''a'' and ''b'' by their greatest common divisor. also refers to a very similar algorithm for computing the polynomial greatest common divisor and the coefficients of Bézout's identity of two univariate polynomials. The extended Euclidean algorithm is particularly useful when ''a'' and ''b'' are coprime. With that provision, ''x'' is the modular multiplicative inverse of ''a'' modulo ''b'', and ''y'' is the modular multiplicative inverse of ''b'' mod ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


The Nine Chapters On The Mathematical Art
''The Nine Chapters on the Mathematical Art'' is a Chinese mathematics book, composed by several generations of scholars from the 10th–2nd century BCE, its latest stage being from the 1st century CE. This book is one of the earliest surviving mathematical texts from China, the others being the '' Suan shu shu'' (202 BCE – 186 BCE) and ''Zhoubi Suanjing'' (compiled throughout the Han until the late 2nd century CE). It lays out an approach to mathematics that centres on finding the most general methods of solving problems, which may be contrasted with the approach common to ancient Greek mathematicians, who tended to deduce propositions from an initial set of axioms. Entries in the book usually take the form of a statement of a problem, followed by the statement of the solution and an explanation of the procedure that led to the solution. These were commented on by Liu Hui in the 3rd century. The book was later included in the early Tang collection, the '' Ten Computational C ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Han Dynasty
The Han dynasty was an Dynasties of China, imperial dynasty of China (202 BC9 AD, 25–220 AD) established by Liu Bang and ruled by the House of Liu. The dynasty was preceded by the short-lived Qin dynasty (221–206 BC) and a warring interregnum known as the Chu–Han Contention (206–202 BC), and it was succeeded by the Three Kingdoms period (220–280 AD). The dynasty was briefly interrupted by the Xin dynasty (9–23 AD) established by the usurping regent Wang Mang, and is thus separated into two periods—the #Western Han (202 BC – 9 AD), Western Han (202 BC9 AD) and the #Eastern Han (25–220 AD), Eastern Han (25–220 AD). Spanning over four centuries, the Han dynasty is considered a Golden ages of China, golden age in Chinese history, and had a permanent impact on Chinese identity in later periods. The majority ethnic group of modern China refer to themselves as the "Han people" or "Han Chinese". The spoken Chinese ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Number Fields
In mathematics, an algebraic number field (or simply number field) is an extension field K of the field of rational numbers such that the field extension K / \mathbb has finite degree (and hence is an algebraic field extension). Thus K is a field that contains \mathbb and has finite dimension when considered as a vector space over The study of algebraic number fields, that is, of algebraic extensions of the field of rational numbers, is the central topic of algebraic number theory. This study reveals hidden structures behind the rational numbers, by using algebraic methods. Definition Prerequisites The notion of algebraic number field relies on the concept of a field. A field consists of a set of elements together with two operations, namely addition, and multiplication, and some distributivity assumptions. These operations make the field into an abelian group under addition, and they make the nonzero elements of the field into another abelian group under multiplication. A ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]