Addition-subtraction Chain
   HOME
*





Addition-subtraction Chain
An addition-subtraction chain, a generalization of addition chains to include subtraction, is a sequence ''a''0, ''a''1, ''a''2, ''a''3, ... that satisfies :a_0 = 1, \, :\textk > 0,\ a_k = a_i \pm a_j\text0 \leq i,j < k. An addition-subtraction chain for ''n'', of length ''L'', is an addition-subtraction chain such that a_L = n. That is, one can thereby compute ''n'' by ''L'' additions and/or subtractions. (Note that ''n'' need not be positive. In this case, one may also include ''a''−1 = 0 in the sequence, so that ''n'' = −1 can be obtained by a chain of length 1.) By definition, every addition chain is also an addition-subtraction chain, but not vice versa. Therefore, the length of the ''shortest'' addition-subtraction chain for ''n'' is bounded above by the length of the shortest addition chain for ''n''. In general, however, the determination of a minimal addition-subtraction chain (like the problem of determining a minimum addition chain ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Addition Chain
In mathematics, an addition chain for computing a positive integer can be given by a sequence of natural numbers starting with 1 and ending with , such that each number in the sequence is the sum of two previous numbers. The ''length'' of an addition chain is the number of sums needed to express all its numbers, which is one less than the cardinality of the sequence of numbers. Examples As an example: (1,2,3,6,12,24,30,31) is an addition chain for 31 of length 7, since :2 = 1 + 1 :3 = 2 + 1 :6 = 3 + 3 :12 = 6 + 6 :24 = 12 + 12 :30 = 24 + 6 :31 = 30 + 1 Addition chains can be used for addition-chain exponentiation. This method allows exponentiation with integer exponents to be performed using a number of multiplications equal to the length of an addition chain for the exponent. For instance, the addition chain for 31 leads to a method for computing the 31st power of any number using only seven multiplications, instead of the 30 multiplications that one would get from repeated mult ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Sequence
In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is called the ''length'' of the sequence. Unlike a set, the same elements can appear multiple times at different positions in a sequence, and unlike a set, the order does matter. Formally, a sequence can be defined as a function from natural numbers (the positions of elements in the sequence) to the elements at each position. The notion of a sequence can be generalized to an indexed family, defined as a function from an ''arbitrary'' index set. For example, (M, A, R, Y) is a sequence of letters with the letter 'M' first and 'Y' last. This sequence differs from (A, R, M, Y). Also, the sequence (1, 1, 2, 3, 5, 8), which contains the number 1 at two different positions, is a valid sequence. Sequences can be ''finite'', as in these examples, or ''infi ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Vectorial Addition Chain
In mathematics, for positive integers ''k'' and ''s'', a vectorial addition chain is a sequence ''V'' of ''k''-dimensional vectors of nonnegative integers ''v''''i'' for −''k'' + 1 ≤ ''i'' ≤ ''s'' together with a sequence ''w'', such that : : ::: ⋮ ::: ⋮ : : ''v''''i'' =''v''''j''+''v''''r'' for all 1≤''i''≤''s'' with -''k''+1≤''j'', ''r''≤''i''-1 : ''v''''s'' = 'n''0,...,''n''''k''-1: ''w'' = (''w''1,...''w''''s''), ''w''''i''=(''j,r''). For example, a vectorial addition chain for 2,18,3is :''V''=( ,0,0 ,1,0 ,0,1 ,1,0 ,2,0 ,4,0 ,4,0 0,8,0 1,9,0 1,9,1 2,18,2 2,18,3 :''w''=((-2,-1),(1,1),(2,2),(-2,3),(4,4),(1,5),(0,6),(7,7),(0,8)) Vectorial addition chains are well suited to perform multi-exponentiation: :Input: Elements ''x''0,...,''x''''k''-1 of an abelian group ''G'' and a vectorial addition chain of dimension ''k'' computing 'n''''0'',...,''n''''k''-1 :Output:The element ''x''0''n''0...''x''''k''-1''n''''r' ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

NP-complete
In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by trying all possible solutions. # the problem can be used to simulate every other problem for which we can verify quickly that a solution is correct. In this sense, NP-complete problems are the hardest of the problems to which solutions can be verified quickly. If we could find solutions of some NP-complete problem quickly, we could quickly find the solutions of every other problem to which a given solution can be easily verified. The name "NP-complete" is short for "nondeterministic polynomial-time complete". In this name, "nondeterministic" refers to nondeterministic Turing machines, a way of mathematically formalizing the idea of a brute-force search algorithm. Polynomial time refers to an amount of time that is considered "quick" for a dete ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

NP-hard
In computational complexity theory, NP-hardness ( non-deterministic polynomial-time hardness) is the defining property of a class of problems that are informally "at least as hard as the hardest problems in NP". A simple example of an NP-hard problem is the subset sum problem. A more precise specification is: a problem ''H'' is NP-hard when every problem ''L'' in NP can be reduced in polynomial time to ''H''; that is, assuming a solution for ''H'' takes 1 unit time, ''H''s solution can be used to solve ''L'' in polynomial time. As a consequence, finding a polynomial time algorithm to solve any NP-hard problem would give polynomial time algorithms for all the problems in NP. As it is suspected that P≠NP, it is unlikely that such an algorithm exists. It is suspected that there are no polynomial-time algorithms for NP-hard problems, but that has not been proven. Moreover, the class P, in which all problems can be solved in polynomial time, is contained in the NP class. De ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Addition-chain Exponentiation
In mathematics and computer science, optimal addition-chain exponentiation is a method of exponentiation by a positive integer power that requires a minimal number of multiplications. Using ''the form of'' the shortest addition chain, with multiplication instead of addition, computes the desired exponent (instead of multiple) of the base. (This corresponds to .) Each exponentiation in the chain can be evaluated by multiplying two of the earlier exponentiation results. More generally, ''addition-chain exponentiation'' may also refer to exponentiation by non-minimal addition chains constructed by a variety of algorithms (since a shortest addition chain is very difficult to find). The shortest addition-chain algorithm requires no more multiplications than binary exponentiation and usually less. The first example of where it does better is for ''a''15, where the binary method needs six multiplications but the shortest addition chain requires only five: :a^ = a \times (a \times \ti ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Elliptic Curve
In mathematics, an elliptic curve is a smooth, projective, algebraic curve of genus one, on which there is a specified point . An elliptic curve is defined over a field and describes points in , the Cartesian product of with itself. If the field's characteristic is different from 2 and 3, then the curve can be described as a plane algebraic curve which consists of solutions for: :y^2 = x^3 + ax + b for some coefficients and in . The curve is required to be non-singular, which means that the curve has no cusps or self-intersections. (This is equivalent to the condition , that is, being square-free {{no footnotes, date=December 2015 In mathematics, a square-free element is an element ''r'' of a unique factorization domain ''R'' that is not divisible by a non-trivial square. This means that every ''s'' such that s^2\mid r is a unit of ''R''. A ... in .) It is always understood that the curve is really sitting in the projective plane, with the point being the uniqu ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Hardware Multiplier
A binary multiplier is an electronic circuit used in digital electronics, such as a computer, to multiply two binary numbers. A variety of computer arithmetic techniques can be used to implement a digital multiplier. Most techniques involve computing the set of ''partial products,'' which are then summed together using binary adders. This process is similar to long multiplication, except that it uses a base-2 ( binary) numeral system. History Between 1947 and 1949 Arthur Alec Robinson worked for English Electric Ltd, as a student apprentice, and then as a development engineer. Crucially during this period he studied for a PhD degree at the University of Manchester, where he worked on the design of the hardware multiplier for the early Mark 1 computer. However, until the late 1970s, most minicomputers did not have a multiply instruction, and so programmers used a "multiply routine" which repeatedly shifts and accumulates partial results, often written using loop unwinding. M ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Booth Encoding
Booth's multiplication algorithm is a multiplication algorithm that multiplies two signed binary numbers in two's complement notation. The algorithm was invented by Andrew Donald Booth in 1950 while doing research on crystallography at Birkbeck College in Bloomsbury, London. Booth's algorithm is of interest in the study of computer architecture. The algorithm Booth's algorithm examines adjacent pairs of bits of the 'N'-bit multiplier ''Y'' in signed two's complement representation, including an implicit bit below the least significant bit, ''y''−1 = 0. For each bit ''y''''i'', for ''i'' running from 0 to ''N'' − 1, the bits ''y''''i'' and ''y''''i''−1 are considered. Where these two bits are equal, the product accumulator ''P'' is left unchanged. Where ''y''''i'' = 0 and ''y''''i''−1 = 1, the multiplicand times 2''i'' is added to ''P''; and where ''y''i = 1 and ''y''i−1 = 0, the multiplicand times 2''i'' is subtracted from ''P''. The final value of ''P'' is the s ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


SIAM J
Thailand ( ), historically known as Siam () and officially the Kingdom of Thailand, is a country in Southeast Asia, located at the centre of the Indochinese Peninsula, spanning , with a population of almost 70 million. The country is bordered to the north by Myanmar and Laos, to the east by Laos and Cambodia, to the south by the Gulf of Thailand and Malaysia, and to the west by the Andaman Sea and the extremity of Myanmar. Thailand also shares maritime borders with Vietnam to the southeast, and Indonesia and India to the southwest. Bangkok is the nation's capital and largest city. Tai peoples migrated from southwestern China to mainland Southeast Asia from the 11th century. Indianised kingdoms such as the Mon, Khmer Empire and Malay states ruled the region, competing with Thai states such as the Kingdoms of Ngoenyang, Sukhothai, Lan Na and Ayutthaya, which also rivalled each other. European contact began in 1511 with a Portuguese diplomatic mission to Ayutthaya, w ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]