Try   HackMD

台灣人工智慧學校新竹分校第一期技術領袖培訓班資格考試考古題

參考解答會在選項前以星號(*)標記,不過目前並不保證一定正確,各位高手可以自行編輯(需登入)更正答案或提供各題詳解。
感謝一同討論解題的各位: Paul, 陳彥吉, 游聲峰Robert, Sean, Moony Hsieh, johnson, 怡中

Calculus

  1. Let the function
    f(x)=ax3+bx2+cx+d
    . Suppose that
    f(0)=4
    is a critical point of
    f
    and
    f(1)=2
    is a point of inflection, find
    a
    ,
    b
    ,
    c
    and
    d
    .
    Hint: The critical point of
    f
    is the point such that
    f(x)=0
    , and the point of inflection of
    f
    satify
    f(x)=0
    .
    (
    A
    )
    a=1
    ,
    b=5
    ,
    c=8
    ,
    d=6

    (
    B
    )
    a=13
    ,
    b=3
    ,
    c=5
    ,
    d=4

    *(
    C
    )
    a=3
    ,
    b=9
    ,
    c=0
    ,
    d=4

    (
    D
    )
    a=6
    ,
    b=11
    ,
    c=1
    ,
    d=2

f(x)=ax3+bx2+cx+d
f(x)=3ax2+2bx+c

f(x)=6ax+2b

Then solve:
f(0)=d=4
(1)
f(1)=a+b+c+d=2
(2)
f(0)=c=0
(3)
f(1)=6a+2b=0
(4)

  1. Find the
    (x,y){(x,y)|2x2y2=1}
    which minimizes the distance from
    (3,0)
    , and what is the minimal distance
    d
    ?
    (
    A
    )
    (x,y)=(3,±4)
    ,
    d=2

    (
    B
    )
    (x,y)=(8,17)
    ,
    d=23

    (
    C
    )
    (x,y)=(3,0)
    ,
    d=3

    *(
    D
    )
    (x,y)=(3,±1)
    ,
    d=5

The points given in (A)(B)(C) doesn't meet the equation.

  1. Find the equation of the tangent line to
    y=2x
    at
    (1,2)

    *(
    A
    )
    y=xln4ln4+2

    (
    B
    )
    y=8xexpx4x+3

    (
    C
    )
    y=x3+1

    (
    D
    )
    y=ln6x+9x

Only the equation listed in (A) is a linear equation

  1. Let
    f(x,y)=sin(x2y)
    , find
    2f(2,4)xy

    (
    A
    ) 5 (
    B
    ) 9 (
    C
    ) 4 *(
    D
    ) 0

2f(2,4)xy=sin(x2y)2x=0

  1. Let
    z=f(xy,yx)
    , what is
    zx+zy
    ?
    (
    A
    ) 1 *(
    B
    ) 0 (
    C
    ) 6 (
    D
    ) 2

Always results in pairs of postive and negative terms that have same values.

Linear Algebra

  1. Let
    A=[121012132]
    , find a matrix
    B
    such that
    AB=A2+2A

    (
    A
    )
    [321072116]
    * (
    B
    )
    [321032134]
    (
    C
    )
    [3783371354]
    (
    D
    )
    [921724636]

B=A1(A2+2A)=A+2I
where
I
denotes the identity matrix.

  1. What is the rank of
    [123451001011111223555571111]
    ?
    (
    A
    ) 5 (
    B
    ) 6 (
    C
    ) 2 *(
    D
    ) 3

Please checkout the definition of rank

  1. Find the eigenvalues of the following matrix

    [1122112222112211]?
    Hint: Try Gaussian elimination first.
    (
    A
    ) 0,1,-6 (
    B
    ) 3,5,-10 *(
    C
    ) 0,6,-2 (
    D
    ) 0,6,12

  2. Find the solution set for the following linear matrix equation

    Ax=[101022030445][x1x2x3x4]=[217]
    *(
    A
    )
    {[t+2t3t1]|tF}
    (
    B
    )
    {[t+210tt3t+1]|tF}
    (
    C
    )
    {[t3tt101]|tF}

    (
    D
    )
    {[3ttt+105]|tF}

  3. For which

    x is
    A=LU
    decomposiition impossible?
    A=[1203x1011]

    *(
    A
    )
    x=6
    (
    B
    )
    x=4
    (
    C
    )
    x=12
    (
    D
    )
    x=0

If

A is invertible, then it admits an LU factorization if and only if all its leading principal minors are nonzero.

Statistics & Probability

  1. Which of the following statements are true?
    I. Qualitative variables could be multiplied.
    II. Categorical variables could be continuous variables.
    III. Quantitative variables could be discrete variables.
    (

    A) I only (
    B
    ) II only (
    C
    ) III only (
    D
    ) I and II *(
    E
    ) I and III

  2. Assume that

    P(A)=0.4 and
    P(B)=0.3
    , and
    P(A
    or
    B)=0.7
    ,
    P(A)P(B)=0.12
    . Which of following statements are true?
    I.
    A
    and
    B
    are mutually exclusive
    II.
    P(A
    and
    B)=0.7

    III.
    A
    and
    B
    are independent event
    (
    A
    ) I only (
    B
    ) II only (
    C
    ) III only (
    D
    ) I and II *(
    E
    ) I and III

  3. A variable follow normal distribution. It has a mean value of

    80 and a standard deviation of
    15
    . If a z-score is
    2
    , what's value on the normal distribution?
    (
    A
    ) 68 (
    B
    ) 95 (
    C
    ) 99 *(
    D
    ) 110 (
    E
    ) 125

  4. A distribution that skewness value above

    2.5 (
    SK>2.5
    ), whicch of following statements are true?
    *(
    A
    ) mean > median > mode
    (
    B
    ) mode > mean > median
    (
    C
    ) mode > median > mean
    (
    D
    ) mean = median = mode
    (
    E
    ) none above

  5. Assuming

    P(A1)=0.3,
    P(A2)=0.7
    ,
    P(B|A1)=0.2
    , and
    P(B|A2)=0.4
    ,
    {A1,A2}
    is a partition of
    U
    , then
    P(A1|B)
    ?
    (
    A
    ) 0.111 *(
    B
    ) 0.177 (
    C
    ) 0.272 (
    D
    ) 0.323 (
    E
    ) 0.37

  6. Assume that

    X is a random variable and its
    E(X)=100
    and
    σ2(X)=10
    . The variable
    Y
    is a linear function of
    X
    ,
    Y=2X+50
    . That
    E(Y)
    and
    σ2(Y)
    , which of following statements are true?
    I.
    E(Y)=100

    II.
    E(Y)=200

    III.
    σ2(Y)=10

    IV.
    σ2(Y)=40

    (
    A
    ) I only (
    B
    ) II only (
    C
    ) III only *(
    D
    ) IV only (
    E
    ) none above

  7. In each case state whether you expect the two variables

    x and
    y
    indicated to have positive, negative, or zero correlation. Which of following statements is negative?
    (
    A
    ) The number
    x
    of pafes in a book and the age
    y
    of the author.
    (
    B
    ) The number
    x
    of pafes in a book and the age
    y
    of the intended reader.
    *(
    C
    ) The weight
    x
    of an automobile and the fuel economy
    y
    in miles per gallon.
    (
    D
    ) The weight
    x
    of an automobile and the reading
    y
    on its odometer.
    (
    E
    ) The amount
    x
    of a sedative a person took an hour ago and the time
    y
    it takes him to respond to a stimulus.

  8. As the figure, which of following staements are true?

    Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More →

    (
    A
    ) Set I. SSE < Set II. SSE (SSE: sum of the squared errors)
    (
    B
    ) A random pattern of residuals supports a linear model.
    *(
    C
    )
    y=β1x+β2
    , Set I.
    r2=0
    and Set II.
    r2>0

    (
    D
    )
    y=β1x+β2
    , Set I.
    r2<0
    and Set II.
    r2=0

    (
    E
    ) none above.

  9. A sample of size

    n=150 has mean
    x=30
    and standard deviation
    s=3
    . Without knowing anything else about the sample, what can be said about the number of observations that lie in the interval
    (24,36)

    *(
    A
    ) At least 75%
    (
    B
    ) At least 85%
    (
    C
    ) At least 90%
    (
    D
    ) At least 95%
    (
    E
    ) none above

s2=n(1p)(2s)2n
1=(1p)4

p=75%

  1. Which following table is a valid probability distribution of a discrete random variable?

(

A)

x -2 0 2 4 6
P(x) 0.2 0.5 0.2 0.1 0.1
(
B
)
x 0 1 2 3 4
- - - - - -
P(x) 0.2 0.2 0.2 0.1 0.1
(
C
)
x 0.5 0.25 0.3 0.4 0.7
- - - - - -
P(x) 0.2 -0.3 0.2 -0.1 0.1
*(
D
)
x -1 0 1 3 5
- - - - - -
P(x) 0.2 0.3 0.2 0.2 0.1
(
E
) none above

Programming

本部份共有兩大題(合計三小題),每題依序為6分,8分,6,分,合計20分。程式題請使用偽代碼(pseudocode) 作答。
Pseudocode is a simple way of writing programming code in English. Pseudocode is not actual programming language. It uses short phrases to write code for programs before you actually create it in a specific language. The purpose of using pseudocode is that it is easier for people to understand the logic behind the algorithms.

・ Rules for pseudo code, Write only one statement per line
・ Available keywords: IF, ELSE, ENDIF, WHILE, ENDWHILE, REPEAT, UNTIL, FUNCTION, FOR, PRINT, LENGTH

example 1:

function example1(x){
    y<-"hello, ";
    print(y,x);
}
X <- "AI";
example1(X);

The output of example 1: hello, AI

example 2:

function example2(n){
    var y[n];
    for (i from 0 to n-1){
        y[i] <- i+1;
    }
    return y;
}

a <- 0;
while(a<4){
    a <- a+1;
    if(a != 2)
        print(example2(a));
    print(",");
}

The output of example 2: [1],[1,2,3],[1,2,3,4]

  1. Define a function which satisfies the following requirement.
    Given an integer
    N1
    , please return all integers
    X
    , betwenn
    1
    and
    N
    , which are indivisible by 5. For example, input fun(6) and get the output
    1,2,3,4,6
    .

參考解答:

function func(n) {
    var y[n-n/5];
    var c = 1;
    var i = 0;
    while ( i < n-n/5-1){
        if (c%5 != 0) {
            y[i] = c;
        }
    }
    return y;
}
  1. (1) Write down the output of the following codes.
function func1(x,i,j) {
    var a;
    a <- x[i];
    x[i] <- x[j];
    x[j] <- a;
}

function func2(data) {
    var i, j;
    for (i from 0 to length(data)-1){
        for (j from 0 to length(data)-1-i){
        if (data[j] > data[j+1])
            func1(data, j, j+1);
        }
    }
}

參考解答: [1, 1, 5, 6, 8, 9, 13, 22]

Please check Bubble sort.

(2) Define a function which satisfies the following staement.
Given

{xn}, a list of unsorted numbers, return the sum of the first quartile
Q1
and the third quartile
Q3
.
Hints:

Qx={az+1if z+1>nx4>zaz+az+12if nx4=z

  1. z
    is an integer
  2. n
    is the length of given list of numbers
  3. {an}
    is the sorted list of
    {xn}

參考解答:

function swap(x,i,j) {
    var a;
    a <- x[i];
    x[i] <- x[j];
    x[j] <- a;
}

function sort(data) {
    var i, j;
    for (i from 0 to length(data)-1){
        for (j from 0 to length(data)-1-i){
        if (data[j] > data[j+1])
            func1(data, j, j+1);
        }
    }
}

function func(data) {
    var len = length(data);
    var x[len] = sort(data);
    var q1, q3;
    if (len%4 == 0) {
        q1 = (x[len/4-1] + x[len/4])/2;
        q3 = (x[(len*3)/4-1] + x[(len*3)%4])/2;
    }
    else{
        q1 = x[len/4] ;
        q3 = x[(len*3)/4] ;
    }
    return q1+q3;
}