logo

Crowdly

FUNDAMENTOS DE COMPUTACION

Looking for FUNDAMENTOS DE COMPUTACION test answers and solutions? Browse our comprehensive collection of verified answers for FUNDAMENTOS DE COMPUTACION at online.upr.edu.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Prove that f(n)=5n2+6n+7f(n)=5n2+6n+7f( n ) = 5n^2+6n+7 is O(n2)O(n2)O( n^2 )

Matching each statement with the correct sequence in a formal proof.

View this question

If an algorithm with input integer nn can return the result in f(n)=3.3×108×nf( n ) = 3.3 \times 10^{-8} \times n seconds.

How long can this algorithm finish when n=230n=2^{30}?

0%
0%
0%
100%
View this question

If an algorithm with input integer nn can return the result in f(n)=3.3×1010×2nf( n ) = 3.3 \times 10^{-10} \times 2^n seconds.

How long can this algorithm finish when n=63n=63?

0%
0%
0%
100%
View this question

If an algorithm with input integer nn can return the result in f(n)=3.3×1010×n2f( n ) = 3.3 \times 10^{-10} \times n^2 seconds.

How long can this algorithm finish when n=230n=2^{30}?

100%
0%
0%
0%
View this question

Suppose a sequence is defined as:

a0a0a_0 = 9

ai=2×ai1+5a_i = 2 \times a_{i-1} + 5 for all i1i \geq 1

Determine aia_i when ii is 3.

View this question
Show the outline of a proof for x[P(x)Q(x)]x[P(x)Q(x)]\forall x [ P(x) \to Q(x) ], where the domain of xxx is the set of all integers.
View this question

Let A=[a0,a1,,am1]A=[a0,a1,,am1]A=[a_0, a_1, \cdots, a_{m-1}] be a list of mmm distinct integers. 

Let B=[b0,b1,,bn1]B=[b_0, b_1, \cdots, b_{n-1}] be a list of nn distinct integers. 

Find the correct sequence of statements for an algorithm that return the intersection ABA \cap B.

View this question

Given the algorithm below and an input A=[1,6,2,7,5,8,4,3]A=[1,6,2,7,5,8,4,3], determine the return when the input value xx is 5.

procedure Alg2(x, A): A is a list of n integers

1    i = 0

2    while (i < n)

3        if (x == A[i])

4            break

5        end of if

6        i = i + 1

7    end of while

8    if (i < n)

9        location = i

a    else:

b        location = -1

c    end of if

d    return location

0%
0%
100%
0%
View this question

Given the algorithm below and an input A=[1,6,2,7,5,8,4,3]A=[1,6,2,7,5,8,4,3]A=[1,6,2,7,5,8,4,3], determine the return when the input value xxx is 0.

procedure Alg2(x, A): A is a list of n integers

1    i = 0

2    while (i < n)

3        if (x == A[i])

4            break

5        end of if

6        i = i + 1

7    end of while

8    if (i < n)

9        location = i

a    else:

b        location = -1

c    end of if

d    return location

0%
0%
0%
100%
View this question

Given the algorithm below and an input [1,6,2,7,5,8,4,3][1,6,2,7,5,8,4,3][1,6,2,7,5,8,4,3], determine the value of mmm after the body of the "for loop" (line 2 to line 6) is executed 3 times.

procedure Alg1(A): A is a list of n integers

1    m = A[0]

2    for i = 1 to n-1

3        if m < A[i] then 

4            m = A[i]

5        end of if

6    end of for

7    return m

0%
0%
100%
0%
View this question

Want instant access to all verified answers on online.upr.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!