State Measuring complexity

Measuring complexity: Many algorithms have an integer n, or two integers m and n, as input - e.g., addition, multiplication, exponentiation, factorisation and primality testing. When we want to describe or analyse the `easiness' or `hardness' of the algorithm, we want to measure its `running time' as a function of the `size' of the input value(s).

If the input value is n, then it is usual to use the number of (decimal) digits, or bits (binary digits), required to store n as a measure of the size of n.

Given input n, the number of decimal digits in n is given by

[log10 n] +1;

where [x], pronounced `floor of x', denotes the greatest integer less than or equal to x. The number of binary digits or bits is similarly given by

[lg n] +1;

where we use the abbreviation lg x for log2 x (this notation is common, but not completely standard).

   Related Questions in Mathematics

  • Q : Problem on Maple (a) Solve the

    (a) Solve the following  by: (i) First reducing the system of first order differentiat equations to a second order differential equation. (ii) Decoupling the following linear system of equa

  • Q : What is Non-Logical Vocabulary

    Non-Logical Vocabulary: 1. Predicates, called also relation symbols, each with its associated arity. For our needs, we may assume that the number of predicates is finite. But this is not essential. We can have an infinite list of predicates, P

  • Q : Solve each equation by factoring A

    A college student invested part of a $25,000 inheritance at 7% interest and the rest at 6%.  If his annual interest is $1,670 how much did he invest at 6%?  If I told you the answer is $8,000, in your own words, using complete sentences, explain how you

  • Q : Problem on sales and budget XYZ Farm

    XYZ Farm Supply data regarding the store's operations follow: • Sales are budgeted at $480,000 for November, $430,000 for December, and $340,000 for January. • Collections are expected

  • Q : Simulation with Arena An office of

    An office of state license bureau has two types of arrivals. Individuals interested in purchasing new plates are characterized to have inter-arrival times distributed as EXPO(6.8) and service times as TRIA(808, 13.7, 15.2); all times are in minutes. Individuals who want to renew or apply for a new d

  • Q : Abstract Boolean Algebra I. Boolean

    I. Boolean Algebra Define an abstract Boolean Algebra, B,  as follows:  The three operations are:  +   ( x + y addition) ( x y multiplic

  • Q : Problem on Fermats method A public key

    A public key for RSA is published as n = 17947 and a = 3. (i) Use Fermat’s method to factor n. (ii) Check that this defines a valid system and find the private key X.

    Q : Nonlinear integer programming problem

    Explain Nonlinear integer programming problem with an example ?

  • Q : Explain trading of call options Explain

    Explain trading of call options.

  • Q : Linear programming model of a Cabinet

    A cabinet company produces cabinets used in mobile and motor homes. Cabinets produced for motor homes are smaller and made from less expensive materials than those for mobile homes. The home office in Dayton Ohio has just distributed to its individual manufacturing ce

©TutorsGlobe All rights reserved 2022-2023.