Full analysis of the first part of the exam in SHAD 2020

Hello! Iโ€™m Azat Kalmykov, curator at ShAD Helper. We continue our series of articles in which we analyze the tasks for entering the ShAD. This time we (I, Nikolai Proskurin and Alexander Kurilkin) will look at the decisions of the first stage of selection in the ShAD this year, which ended recently. So let's get started.

A. Local minimum


At what values โ€‹โ€‹of the parameter a antiderivative of the function f(x)=(x4โˆ’(a+1)x3+(aโˆ’2)x2+2ax)expsinโกx2+25x2+2has at most one local minimum?

Decision
, โ€” . , . , , ( ).

, , , , f(x)=x4โˆ’(a+1)x3+(aโˆ’2)x2+2ax. , : โˆ’1,0,2,a. , f(x)=(x+1)x(xโˆ’2)(xโˆ’a).

, +โ†’โˆ’โ†’+โ†’โˆ’โ†’+, . , a=โˆ’1,0,2. , .

B. Limit


Determine at what value athis limit is 1e:

limxโ†’+inf(cosโก1x)xa


Decision
, a=1. 1xโ†’0, :

cosโก1x=1โˆ’12!x+14!x2โˆ’16!x3+โ€ฆ



. , , , , . , . :

1โˆ’12x<cosโก1x<1โˆ’12x+124x2



xโ†’+โˆž, x, . , eโˆ’1/2. , :

limxโ†’+โˆž(1โˆ’12x+124x2)x=expโก(limxโ†’+โˆžxlnโก(1โˆ’12x+124x2))=


=expโก(limxโ†’+0lnโก(1โˆ’x2+x224)x)



, . :

limxโ†’+โˆž(cosโก1x)x=eโˆ’1/2โ‡’limxโ†’+โˆž(cosโก1x)x/a=eโˆ’1/2a



a=12.

: , , .

C. Local minimum


At what minimum step length gradient descent cannot find the minimum function x4+cosโก2, if x0=1?

Decision
, :

xk+1=xkโˆ’ฮปโ–ฝf(xk)

.

โ€” , .

โ–ฝf(xk)=4xk3



x0, x1:

x1=x0โˆ’ฮป4x03=1โˆ’4ฮป



, x1=โˆ’1, x0, . , , ยซยป - 1โˆ’1. , , x1=โˆ’1โ‡”ฮป=0.5( 0). , ฮป.

, . |xn+1|โ‰ค|xn||1โˆ’4ฮป|. , 0.5>ฮป>0โ‡’|1โˆ’4ฮป|<1

:|x1|=|1โˆ’4ฮป|โ‰ค1|1โˆ’4ฮป|=x0|1โˆ’4ฮป|

. |xn+1|=|xnโˆ’4ฮปxn3|=|xn||1โˆ’4ฮปxn2|. xn<1โ‡’xn2<1. |xn+1|โ‰ค|xn||1โˆ’4ฮป|. .

, , |xn|โ‰ค|x0||1โˆ’4ฮป|n=|1โˆ’4ฮป|n. , |1โˆ’4ฮป|<1, |xn|. .


D. Own vector


Determine at which values โ€‹โ€‹of the parameter a vector (11a)is an eigenvector of the matrix

(a1โˆ’112โˆ’1001)



Decision
, vโ‰ 0A, โˆƒฮป: Av=ฮปv. :

(a1โˆ’112โˆ’1001)(11a)=(13โˆ’aa)=ฮป(11a)



. ฮป=1, โ€” a=2, , . , a=2.

E. Qualifier


At what parameter values amaximum determinant of the matrix inverse to this?

(aโˆ’7โˆ’36โˆ’10โˆ’a20a9)



Decision
:

det(a)=|aโˆ’7โˆ’36โˆ’10โˆ’a20a9|=a|โˆ’10โˆ’a2a9|โˆ’6|โˆ’7โˆ’3a9|=a4โˆ’108a+376



detโ€ฒ(a)=4a3โˆ’108=0โ‡”a=3



, , , , , det(a), det(a)โ‰ฅdet(3)>0a=3. , det(Aโˆ’1)=det(A)โˆ’1, , a=3.

F. Projections


Given points B(1,2,โˆ’3)and C(2,2,1)as well as the plane ฮฑ:2xโˆ’2y+z=0 and ฮฒ:โˆ’x+2y+3z=0. Find the coordinates of the pointAif it is known that its orthogonal projection onto ฮฑcoincides with the projection of the point Bbut on ฮฒ- with point projection .

Decision
A=(x,y,z), B, , B. , , ฮฑnยฏ1(2,โˆ’2,1). :

{x=2t1+1y=โˆ’2t1+2z=t1โˆ’3



, A, Cฮฒ. : nยฏ2(โˆ’1,2,3), :

{x=โˆ’t2+2y=โˆ’2t2+2z=3t2+1



. t1t2, :

{2t1+1=โˆ’t2+2โˆ’2t1+2=2t2+2โ‡”{3=t2+4โˆ’2t1+2=2t2+2โ‡”{t2=โˆ’1t1=1



, , A(3,0,โˆ’2), .

G. Domino


In the distant constellation of Tau Ceti, on each half of the knuckle of dominoes is from 0before Npoints, and for each pair of numbers (a,b)such that aand bwhole from 0before N, there is exactly one domino containing both of these numbers. The space tourist flew in and picked up an inverted knuckle at random. At whatN the mathematical expectation of the module of the difference in the number of points on one and the other half of this domino will be equal 2?

Decision
ฮพ, ฮฉฮพ(ฮฉ). :

E(ฮพ)=โˆ‘kโˆˆฮพ(ฮฉ)kPr[ฮพ=k]=2



Akโ€” , K, Pr[ฮพ=k]=|Ak||ฮฉ|. |ฮฉ|, :

โˆ‘kโˆˆฮพ(ฮฉ)k|Ak|=2|ฮฉ|



|ฮฉ|. -, . -, , . ,

|ฮฉ|=n+1+n(n+1)2

.

. , 0 n. k? nโˆ’k+1: โ€” (0,k),(1,k+1),โ€ฆ,(nโˆ’k,n). :

โˆ‘kโˆˆฮพ(ฮฉ)k|Ak|=โˆ‘k=0nk(nโˆ’k+1)=(n+1)โˆ‘k=0nkโˆ’โˆ‘k=0nk2=n(n+1)22โˆ’


โˆ’n(n+1)(2n+1)6=n(n+1)(n+2)6



:

n(n+1)(n+2)6=(n+1)(n+2)



n>0, , n=6.

H. Exam


Two friends decided to go together for exams at the SHAD and agreed to meet at the entrance from 14:00 to 15:00, but did not agree on what time. The moment of arrival of each of them is distributed evenly over this period of time, but the friends are impatient, so after 15 minutes of waiting they despair to wait and come in alone. It is known that they met.

Find the likelihood that both came before 14:45.

Decision
, , . , 60x60. x , y โ€” .

ยซ ยป . ยซ 14:45ยป 2 . , , , , ยซ 14:45ยป , ยซ ยป 3 . , 57.

I. Random variable


Distribution density of a random variable ฮพis equal to p(x)=1sinโกxat xfrom ฯ€/2before 2arctanโกeand zero for all the others x.

Find a value that this random variable does not exceed with probability12.

Decision
:

Pr(ฮพโ‰คx)=โˆซฯ€/2xdtsinโกt=โˆซ1tanโกx/2duu=lnโกtanโกx2



:

lnโกtanโกx2=12โ‡”tanโกx2=e1/2โ‡”x=2tanโˆ’1โกe1/2



J. Find the mean


Condition
2
256Mb
input.txt
output.txt

. : n a0,a1,โ€ฆ,anโˆ’1.

- !

l r. .

lr:

alโ‹…al+1โ‹…โ€ฆโ‹…arrโˆ’l+1




n(1โ‰คnโ‰ค300โ€ฏ000).

n ai(0.01โ‰คaiโ‰ค100) .

q(1โ‰คqโ‰ค100โ€ฏ000) โ€” .

qliri(0โ‰คliโ‰คri<n) โ€” i- .


6 .

.

1


8
79.02 36.68 79.83 76.00 95.48 48.84 49.95 91.91
10
0 0
0 1
0 2
0 3
0 4
0 5
0 6
0 7
1 7
2 7
79.020000
53.837288
61.391865
64.756970
69.986085
65.913194
63.352986
66.369195
64.735454
71.164108


2


1
1.00
1
0 0
1.000000


3


8
1.34 1.37 1.40 1.44 1.91 1.95 1.96 1.97
5
1 4
2 7
4 6
0 3
2 6
1.515518
1.752724
1.939879
1.387008
1.712233


, xy=elnโกx+lnโกy. .

Decision
. (1), O(1).

. sums, sums[i]=a[0]+a[1]+โ‹ฏ+a[i]. sums[i]=sums[iโˆ’1]+a[i], O(n). lrโ€” sums[r]โˆ’sums[lโˆ’1]. , rโˆ’l+1. O(1)O(n).

. , , , . , , e. , lnโก((a[l]โ‹…...โ‹…a[r])1rโˆ’l+1)=lnโกa[l]โ‹…โ‹ฏโ‹…a[r]rโˆ’l+1=lnโกa[l]+โ‹ฏ+lnโกa[r]rโˆ’l+1, (1).

: gist.github.com/Azatik1000/0b0d8496785169a8ac0d35a8c9e8e59f

K. Delete last


Condition
2
256Mb
input.txt
output.txt

an. .

, .

, , .


n(1โ‰คnโ‰ค300โ€ฏ000). nai(0โ‰คaiโ‰ค1โ€ฏ000โ€ฏ000โ€ฏ000).


m(0โ‰คm<n) โ€” , .

mโ€” , . , , .

1


10
1 1 5 2 4 3 3 4 2 5
5
1 5 2 4 3


2


1
1000000000
0


3


10
1 2 3 3 2 1 4 1 2 0
5
1 2 3 2 1


Decision
unordered_set (C++) / HashSet (Java) / set (Python), . , , . , . , -. reverse O(n). - (1), O(n).

: gist.github.com/Azatik1000/2fef745e23c23eb020f21878980cae08

L. Bulletin board


Condition
3
256Mb
input.txt
output.txt

, .

Wร—H, a b. , . , .

. , , . , .

. (0,0), โ€” (W,H). .

, .


W, Ha, b(1โ‰คW, Hโ‰ค100โ€ฏ000, 1โ‰คaโ‰คW, 1โ‰คbโ‰คH).

n(0โ‰คnโ‰ค100) โ€” .

n(xld,yld)(xru,yru)(0โ‰คxld<xruโ‰คW,0โ‰คyld<yruโ‰คH). , .. .


(xld,yld)(xru,yru), . a(, b). .

.

, .

1


11 8 2 7
4
1 5 3 7
2 2 4 5
5 3 9 4
5 3 7 8
9 0 11 8


2


11 8 7 3
4
1 5 3 7
2 2 4 5
5 3 9 4
5 3 7 8
4 0 11 3


3


11 8 4 4
4
1 5 3 7
2 2 4 5
5 3 9 4
5 3 7 8
7 4 11 8


Decision
, . , Wโˆ—n.

x( 0Wโˆ’a), . , xx+a, . , ยซยป xx+a, y- . , (y1,y2), y1y2โ€” y- , . y2โ€” y1.

, (0,0)(h,h), . , , , . , , . , , .

. O(Wโˆ—nโˆ—logโกn)O(n).

: gist.github.com/Azatik1000/2c07ebdd866ce20a4b5f5e6ee7408ad7

All Articles