• Nem Talált Eredményt

Introduction to the Theory of Computing 1. First Midterm Test 2018. October 18.

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Introduction to the Theory of Computing 1. First Midterm Test 2018. October 18."

Copied!
1
0
0

Teljes szövegt

(1)

Introduction to the Theory of Computing 1.

First Midterm Test 2018. October 18.

1. Determine the remainder we get if we divide 4444 by 363.

2. The code written in C below calculates the square of the positive integer n(written in the decimal system). Suppose that the computer uses the “normal” basic operations (ad- dition, subtraction, multiplication, division,...). Determine whether the algorithm is polynomial or not.

x = n; y = 0;

while (x > 0) { x = x-1;

y = y+n;

}

printf(‘‘Result: %d’’, y);

3. * Let n be a positive integer which is divisible by 8 but not divisible by 3. Prove that 3 is a witness of n (i.e. 3 proves the non-primality of n in the Fermat test).

4. Consider the line perpendicularly intersecting the plane 2x − 4y + 7z = 2 at the point (3,1,0). Does this line intersect the line of system of equations x−14 = 2−y5 = z−36 ? 5. Decide whether the vectors below form a generating system

in R3 or not.

a = (3,1,0)T, b = (5,2,1)T, c= (3,2,3)T

6. Decide whether the vectors in R4 below are linearly inde- pendent or not.

u = (2,4,3,6)T, v = (3,6,2,4,)T, w = (1,2,0,0)T

The full solution of each problem is worth 10 points. Show all your work!

Results without proper justification or work shown deserve no credit.

Notes and calculators (and similar devices) cannot be used.

The question denoted by an * is supposed to be more difficult.

Grading: 0-23 points: 1, 24-32 points: 2, 33-41 points: 3, 42-50 points: 4, 50-60 points: 5.

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

Prove that if a system of linear equations has infinitely many solutions, then the set of solutions of it (as a set of vectors in R n ) contains a line.. Compute the matrix A 2018

Results without proper justification or work shown deserve no credit. Calculators (or other devices) are not allowed

Let the set V consist of those vectors in R 5 for which it holds that if we add an appropriate common number to each of their coordinates then we get a vector whose coordinates form

Let the subspace W of R 4 consist of those column vectors whose second coordinate is twice as large, and third coordinate is three times as large as the first one.. (For the

Suppose that the computer uses the “normal” basic operations (addition, subtraction, multiplication, division,...).. Determine whether the algorithm is poly- nomial

Determine for which values of the parameter p the system of equations below is consistent.. Evaluate the determinant below using the

How many positive integers are there which are not greater than 504 and have a multiple which gives 1 as a remainder when divided by 504?. The first two coordinates of the vector a

Show that in this case there is a number a ∈ {1, 2, 3, 4, 5} with the property that the system of linear equations has no such solutions in which the value of one of the variables is