• Nem Talált Eredményt

Introduction to the Theory of Computing I. Second repeat of the midterm

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Introduction to the Theory of Computing I. Second repeat of the midterm"

Copied!
2
0
0

Teljes szövegt

(1)

Introduction to the Theory of Computing I.

Second repeat of the midterm 21 December, 2020

1. Before the holidays a candy shop decides to sell the leftover candies for a lower price in pre-boxed holiday packages. The estimated number of the remaining candies is between 400 and 600. If 12 candies are packed in every box, then there are 7 candies left, while if they try to create giant packages with 50 candies in each of them, then in the last box one candy is missing.

How many candies are left when 16 candies are packed in every box?

2. Assume that n = 987654321. Apply the appropriate algorithm that was told in the lecture to determine the greatest common divisor of 98n+ 27 and 76n+ 21. (Document every step of the algorithm.)

3. A ray of light coming from the source P(5; −6; 28) goes through the point Q(14; 15; 16) and also passes through the plate glass with the equation x+ 3y −z = 1 (not necessarily in this order).

a) Determine the intersection of the ray and the glass.

b) Decide if the points P and Q are on the same side of the glass or not.

(We can assume that the light travels in a straight line and it passes through the glass without changing its direction.)

4. Let V be the set of those vectors in R4 whose coordinates (ordered by position) form a geometric progression, i.e. the quotient of the consecutive coordinates is the same (if we divide the coordinate with the greater index by the coordinate with the smaller index). Decide if V is a subspace of R4 or not.

5. Let us consider the following vectors in R4:

u =

 1 0 2 0

 , v =

 0 1 0 2

, w =

 1 1 1 1

and a =

 p p+ 1 p+ 2

2p

 .

Determine the possible values of p for which the statement a ∈ span{u, v, w}

holds.

(2)

6*. Let n = 898989. . .89 be the positive integer with 134 digits whose (2k −1)th digits are 8 and whose (2k)th digits are 9 (counted from the left, where k = 1, . . . ,67). What is the remainder of n when divided by 67.

During the midterm any written lecture notes or books can be used, but cooperation with another person is forbidden. Solutions built upon the usage of a calculator or a computer program are not accepted. The detailed computations that lead to the conclusions form important parts of the solutions, hence they have to be submitted as well.

You have 90 minutes to work on the problems and extra 25 minutes to scan and upload your solutions. Each problem is worth 10 points. To obtain a signature you have to achieve at least 24 points. The problem marked with an * is supposed to be more difficult.

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

Any direct involvement in teacher training comes from teaching a Sociology of Education course (primarily undergraduate, but occasionally graduate students in teacher training take

In this article, I discuss the need for curriculum changes in Finnish art education and how the new national cur- riculum for visual art education has tried to respond to

Write your name on every sheet you work on, and write your Neptun code and the number of the group you are registered to in Neptun (A1, A2 or A3) on the first page.. You have 90

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

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

Additionally, if two rows (and columns) of the input matrix are proportional to each other, then it is optimal to represent them with the same distribution function in the layout,

The most important source of benefits is the interest savings. If some of the pool accounts are in negative while others show positive balances, then the positive accounts

Also, if λ ∈ R is a non-zero real number and v is a non-zero space vector, then we define λv the following way: we multiply the length of v by |λ| and the direction of the product