logo

Crowdly

Browser

Add to Chrome

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!

Given the following algorithm, matching each statement to the correct sequence for complexity analysis.

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

1    for i = 1 to n-1 do

2        x = a_ix = a_i

3        j = i − 1

4        while (j \geq\geq 0) do

5            if x \geq a_jx \geq a_j then

6                break

7            end if

8            a_{j+1} = a_ja_{j+1} = a_j

9            j = j − 1

a        end while

b        a_{j+1} = xa_{j+1} = x

c    end for

d    return A

View this question

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

Let B=[b_0, b_1, \cdots, b_{n-1}]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 returns the cardinality of A \cap BA \cap B.

View this question

Consider a function f: R \to Rf: R \to R, f(x) = 3x+7f(x) = 3x+7.

Determine the correct sequence to prove the following statement. 

ff is surjective.

If a statement is not used in the proof, you have to choose "Not used".

View this question

Consider a function f: R \to Rf: R \to R, f(x) = 3x+7f(x) = 3x+7.

Determine the correct sequence to prove the following statement. 

ff is injective.

If a statement is not used in the proof, you have to choose "Not used".

View this question

Problem 6 in the 29th International Mathematical Olympiad (1988) is considered one of the hardest problems in IMO.

IMO-29 Probem 6: Let aa and bb be positive integers such that ab+1ab+1 divides a^2+b^2a^2+b^2. Show that \frac{a^2+b^2}{ab+1}\frac{a^2+b^2}{ab+1} is the square of an integers.

To prove this problem, we first describe the problem using the techniques we have learned in this course.

1) Define a function f: N^2 \to Qf: N^2 \to Q with f(x,y) = \frac{x^2+y^2}{xy+1}f(x,y) = \frac{x^2+y^2}{xy+1}.

2) Let Z^+Z^+ be the domain of variables aa, bb, and kk, prove the following logic statement:

\forall a \forall b [(f(a,b) \in Z^+) \to (\exists k (f(a, b)=k^2))]\forall a \forall b [(f(a,b) \in Z^+) \to (\exists k (f(a, b)=k^2))]

Next, choose the correct step for each statement in the formal proof.

View this question

Given the following recursive algorithm to calculate the summation of the square of the first nnn positive integers.

procedure square_sum( n )

1    if (n==1)

2        s = 1

3    else

4        s = (n*n) + square_sum(n-1)

5    end of if

6    return s

View this question

Let bR+bR+b \in R^+ and nNn \in N. Determine the sequence of codes in an efficient recursive algorithm to return bnb^n

procedure power_bin(b, n)

View this question

What is the Big-O notation that can best describe the power_bin(b,n) algorithm?

0%
0%
0%
100%
View this question

What is the Big-O notation that can best describe the power(b,n) algorithm?

0%
0%
0%
0%
View this question

What is the Big-O notation that can best describe the merge sort algorithm when the input is a list of nnn elements?

0%
0%
0%
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!

Browser

Add to Chrome