• No se han encontrado resultados

3. INGENIERÍA DE DETALLE Y FABRICACIÓN DE UN EQUIPO PORTABLE PARA

4.3. Pruebas para analizar el desempeño del sistema implementado

4.3.5. Descarga del sistema en la provisión de energía a un computador

Three classes of logarithms are of special importance: logarithms to base 10, calledcommon logarithms;

logarithms to basee, callednatural logarithms;and logarithms to base 2, calledbinary logarithms. Some texts write

lnxfor logex and lgxor logx for log2x

The term logx, by itself, usually means log10x; but it is also used for logexin advanced mathematical texts and for log2xin computer science texts.

Frequently, we will require only the floor or the ceiling of a binary logarithm. This can be obtained by looking at the powers of 2. For example,

log2 100

=6 since 26=64 and 27=128 log2 1000

=9 since 28=512 and 29=1024 and so on.

Relationship between the Exponential and Logarithmic Functions

The basic relationship between the exponential and the logarithmic functions f (x)=bx and g(x)=logbx

is that they are inverses of each other; hence the graphs of these functions are related geometrically. This relation-ship is illustrated in Fig. 3-5 where the graphs of the exponential functionf (x)=2x, the logarithmic function g(x) = log2x, and the linear functionh(x) = x appear on the same coordinate axis. Since f (x) = 2x and g(x)=log2xare inverse functions, they are symmetric with respect to the linear functionh(x)=x or, in other words, the liney =x.

Fig. 3-5

Figure 3-5 also indicates another important property of the exponential and logarithmic functions. Specifically, for any positivec, we have

g(c) < h(c) < f (c), that is, g(c) < c < f (c)

In fact, ascincreases in value, the vertical distancesh(c)g(c)andf (c)g(c)increase in value. Moreover, the logarithmic functiong(x)grows very slowly compared with the linear functionh(x), and the exponential functionf (x)grows very quickly compared withh(x).

Sequences

Asequenceis a function from the setN= {1,2,3, . . .}of positive integers into a setA. The notationanis used to denote the image of the integern. Thus a sequence is usually denoted by

a1, a2, a3,. . . or {an:nN} or simply {an}

Sometimes the domain of a sequence is the set{0,1,2, . . .}of nonnegative integers rather thanN. In such a ease we saynbegins with 0 rather than 1.

Afinite sequenceover a setAis a function from{1,2, . . . , m}intoA, and it is usually denoted by a1, a2, . . . , am

Such a finite sequence is sometimes called alistor anm-tuple.

EXAMPLE 3.5

(a) The following are two familiar sequences:

(i) 1,12,13,14, . . .which may be defined byan=n1; (ii) 1,12,14,18, . . .which may be defined bybn=2n

Note that the first sequence begins withn=1 and the second sequence begins withn=0.

(b) The important sequence 1,−1,1,−1, . . .may be formally defined by an=(−1)n+1 or, equivalently, by bn=(−1)n

where the first sequence begins withn=1 and the second sequence begins withn=0.

(c) Strings Suppose a setAis finite andAis viewed as a character set or an alphabet. Then a finite sequence overAis called astringorword, and it is usually written in the forma1a2. . . am, that is, without parentheses.

The numbermof characters in the string is called itslength. One also views the set with zero characters as a string; it is called theempty stringornull string. Strings over an alphabetAand certain operations on these strings will be discussed in detail in Chapter 13.

Summation Symbol, Sums

Here we introduce the summation symbol

(the Greek letter sigma). Consider a sequencea1, a2, a3, . . ..

Then we define the following:

n J=1

aj =a1+a2+ · · · +an and n j=m

aj =am+am+1+ · · · +an

The letterjin the above expressions is called adummy indexordummy variable. Other letters frequently used as dummy variables arei,k,s, andt.

EXAMPLE 3.6

n i=1

aibi =a1b1+a2b2+ · · · +anbn

5 j=2

j2=22+32+42+52=4+9+16+25=54 n

j=1

j =1+2+ · · · +n

The last sum appears very often. It has the valuen(n+1)/2. That is:

1+2+3+ · · · +n= n(n+1)

2 , for example, 1+2+ · · · +50=50(51)

2 =1275 Indexed Classes of Sets

LetIbe any nonempty set, and letSbe a collection of sets. Anindexing functionfromItoSis a function f:IS. For anyiI, we denote the imagef (i)byAi. Thus the indexing functionfis usually denoted by

{Ai|iI} or {Ai}iI or simply {Ai}

The setIis called theindexing set, and the elements ofIare calledindices. Iffis one-to-one and onto, we say thatSis indexed byI.

The concepts of union and intersection are defined for indexed classes of sets as follows:

iIAi = {x|xAi for someiI} and ∩iI Ai = {x|xAifor alliI} In the case thatIis a finite set, this is just the same as our previous definition of union and intersection.

IfIisN, we may denote the union and intersection, respectively, as follows:

A1A2A3. . . and A1A2A3. . .

EXAMPLE 3.7 LetIbe the setZof integers. To eachnZ, we assign the following infinite interval inR:

An= {x|xn} =(−∞, n]

For any real numbera, there exists integersn1andn2such thatn1< a < n2; soaAn2 buta /An1. Hence a∈ ∪nAn but a /∈ ∩nAn

Accordingly,

nAn=R but ∩nAn= ∅ 3.6 RECURSIVELY DEFINED FUNCTIONS

A function is said to berecursively definedif the function definition refers to itself. In order for the definition not to be circular, the function definition must have the following two properties:

(1) There must be certain arguments, calledbase values, for which the function does not refer to itself.

(2) Each time the function does refer to itself, the argument of the function must be closer to a base value.

A recursive function with these two properties is said to bewell-defined.

The following examples should help clarify these ideas.

Factorial Function

The product of the positive integers from 1 ton, inclusive, is called “nfactorial” and is usually denoted byn!.

That is,

n! =n(n−1)(n−2)· · ·3·2·1

It is also convenient to define 0! =1, so that the function is defined for all nonnegative integers. Thus:

0! =1, 1! =1, 2! =2·1=2, 3! =3·2·1=6, 4! =4·3·2·1=24 5! =5·4·3·2·1=120, 6! =6·5·4·3·2·1=720

And so on. Observe that

5! =5·4! =5·24=120 and 6! =6·5! =6·120=720 This is true for every positive integern; that is,

n! =n·(n−1)! Accordingly, the factorial function may also be defined as follows:

Definition 3.1 (Factorial Function):

(a) Ifn=0,thenn! =1.

(b) Ifn >0,thenn! =n·(n−1)!

Observe that the above definition ofn! is recursive, since it refers to itself when it uses(n−1)!. However:

(1) The value ofn! is explicitly given whenn=0 (thus 0 is a base value).

(2) The value ofn!for arbitrarynis defined in terms of a smaller value ofnwhich is closer to the base value 0.

Accordingly, the definition is not circular, or, in other words, the function is well-defined.

EXAMPLE 3.8 Figure 3-6 shows the nine steps to calculate 4! using the recursive definition. Specifically:

Step 1. This defines 4! in terms of 3!, so we must postpone evaluating 4! until we evaluate 3. This postponement is indicated by indenting the next step.

Documento similar