• 検索結果がありません。

Information Science 情 報 基 礎

N/A
N/A
Protected

Academic year: 2021

シェア "Information Science 情 報 基 礎"

Copied!
6
0
0

読み込み中.... (全文を見る)

全文

(1)

For each question, choose one correct answer and write its symbol (A–E) in the box.

以下の各問に対して正しい答えを選び,その記号

(A–E)

を枠の中に書いてください.

Q16. Select the output of the following C program.

以下の

C

言語のプログラムを実行したときの出力を次から選べ.

#include <stdio.h>

int main() {

int n = 0;

while ( n++ < 5 ) printf("%d ", n);

return 0;

}

(A) 1 2 3 4 5 (B) 5 4 3 2 1 (C) 0 1 2 3 4 (D) 4 3 2 1 0 (E) None of these

Q17. Select a value that is the closest to the value output by the following C program.

以下の

C

プログラムを実行した時,出力される数値に最も近い値を選べ.

#include <stdio.h>

#include <math.h>

double fx(double x) { return exp(x); }

double intf(double (*f)(double), double a, double b, int n) {

double sum, h;

int i;

h = (b - a) / n;

sum = (f(a) + f(b))/ 2.0;

for ( i = 1; i < n; i += 1 ) { sum += f(a + h * i);

}

return sum * h;

}

int main() { printf(‘‘%f\n’’, intf(&fx, 0.0, 1.0, 10)); return 0;}

(A) e

0.5

(B) e

0.6

(C) e 1 (D) (e + 1) · 0.4 (E)

e+12

(2)

Q18. When the following Java program is executed, what value will be output?

以下の

Java

言語のプログラムを実行させた場合,どの値が出力されるか?

class TClass {

private int val = 0;

public void func(int num) { if (num % 3 != 0) val += num; else val = -val; } public int get() { return val; }

}

class Sample {

public static void main(String args[]){

TClass t = new TClass();

for (int i = 1; i <= 10; i++) t.func(i);

System.out.println(t.get());

} }

(A) 5 (B) 1 (C) 1 (D) 5 (E) None of these

Q19. There are 5 algorithms (with input size n) A, B, C, D, E such that the time complexity of each algorithm is as follows. Which algorithm has the largest time complexity?

入力サイズ

n

に対し,時間計算量が以下のような

5

つのアルゴリズム

A, B, C, D, E

がある. 時間計算量が 一番大きいアルゴリズムはどれか答えよ.

(A) Θ ( n

2

log n )

(B) Θ (n log n) (C) Θ (log n!) (D) Θ (n log log n) (E) Θ ( n

2

log log n )

Q20. Define a Boolean function f using ¯ (negation), (conjunction), and (disjunction) by f (p, q) = (p q) (p q). Which Boolean function is equal to f ?

否定

(¯),論理積 ( ),論理和 ( )

から定義されるブール関数

f (p, q) = (p q) (p q)

と等しい関数を選べ.

(A) p (B) p (C) q (D) q (E) None of these

Q21. Let f be the Boolean function given by f = x

1

x

2

x

3

x

1

x

2

x

3

x

1

x

2

x

3

x

1

x

2

x

3

. Suppose that we can use NOT gates, AND gates of fan-in two and OR gates of fan-in two to form a circuit. What is a minimum number of gates in a circuit that computes f ?

ブール関数

f

f = x

1

x

2

x

3

x

1

x

2

x

3

x

1

x

2

x

3

x

1

x

2

x

3で与えられているとする.ブール関数

f

を論理 回路を用いて計算したい.論理否定ゲート,2入力論理積ゲート,および,2入力論理和ゲートが使用でき

(3)

Q22. Select a repeating decimal number that has no terminating decimal representation.

10

進数表示をした場合に,循環小数となり,かつ有限小数表示を持たない数を選べ.

(A)

5

10 (B) 256

999 (C) 256

1000 (D) 256

1024 (E) None of these

Q23.

Let n be a natural number, and define T(n) by the following recurrence equation:

T (n) = {

1, if n = 1,

T ( n/2 ) + 2n, if n 2.

Which is the closest to T (1024)?

自然数

n

に対して,T

(n)

を以下の再帰式で定める:

T(n) = {

1, n = 1

のとき,

T ( n/2 ) + 2n, n 2

のとき.

T (1024)

に一番近いのはどれか.

(A) 2

9

(B) 2

10

(C) 2

11

(D) 2

12

(E) 2

13

Q24. Let L be a language defined by the regular expression “1

2

3”. Which word does not belong to L?

次の正規表現

“1

2

3”

によって定義される言語を

L

とする.

L

に属さない語を選べ.

(A) 3 (B) 123 (C) 1233 (D) 11223 (E) 111113

Q25. For a regular expression E, L(E) denotes the language defined by E. Choose one which satisfies the condition: L(E) ⊆ { x ∈ { 0, 1 }

|

0

(x) is an odd number } , where

0

(x) denotes the number of 0’s contained in x.

正規表現

E

に対して,L(E)

E

によって定義される言語とする.

L(E) ⊆ { x ∈ { 0, 1 }

|

0

(x)

は奇数

}

を満たすものを選べ. ただし,♯0

(x)

x

に含まれる

0

の個数を指す.

(A) E =

+ 0

(B) E = 00

0

(C) E = 0

00

(D) E = 0(1

01

0)

(E) E = 0(0 + 1 + 0)

(4)

Q26. Select a bit string which means 8-bit two’s complement representation of 5.

8

ビット整数の

5

2

の補数で表わすとどれになるか.

(A) 00000101 (B) 11111010 (C) 01111011 (D) 11111001 (E) None of these

Q27. What is the transposed matrix of the following matrix A

A = (

A

11

A

12

A

21

A

22

)

,

where A

ij

(i, j ∈ { 1, 2 } ) is a submatrix of A and A

tij

is the transposed matrix of A

ij

?

以下の行列

A

の転置行列は何か?

A = (

A

11

A

12

A

21

A

22

) ,

ここで,

A

ij

(i, j ∈ { 1, 2 } )

A

の部分行列で,

A

tij

A

ijの転置行列である.

(A) (

A

t11

A

t12

A

t21

A

t22

)

(B) (

A

t11

A

t21

A

t12

A

t22

)

(C) (

A

11

A

t12

A

t21

A

22

)

(D) (

A

11

A

t21

A

t12

A

22

)

(E) None of these

Q28. A database designer defined the following functional dependencies on the relation R(A, B, C, D, E, F, G). What is a candidate key on R ?

Functional dependencies: A B, BC E, E F , D F G

データベース設計者が関係

R(A, B, C, D, E, F, G)

に対し,次の関数従属性を定義した.関係

R

の候補キー を選択せよ.

関数従属性:

A B, BC E, E F, D F G

(A) { A, C, D } (B) { B, C, D } (C) { B, D } (D) { A, D } (E) None of these

Q29. Let X and Y be independent random variables exponentially distributed with rate λ and µ as P (X x) = 1 e

λx

, and P (Y y) = 1 e

µy

. Let the random variable T = min(X, Y ). How is P (T t) given?

X, Y

は率

λ, µ

の指数分布に従う互いに独立な確率変数であり,

P (X x) = 1 e

λx

P (Y y) = 1 e

µy とする.確率変数

T = min(X, Y )

とすると,P(T

t)

はどのように与えられるか.

(A) 1 e

(λ+µ)t

(B) e

(λ+µ)t

(C) (1 e

λt

)(1 e

µt

) (D) e

λµt

(E) None of these

(5)

Q30. Choose a probability distribution that can be encoded into the two Huffman codes: { 00, 01, 10, 11 } and { 0, 10, 110, 111 } .

ふたつのハフマン符号

{ 00, 01, 10, 11 }

および

{ 0, 10, 110, 111 }

を生成する確率分布を選べ.

(A) { 0.4, 0.35, 0.15, 0.1 } (B) { 0.35, 0.3, 0.25, 0.1 } (C) { 0.3, 0.3, 0.3, 0.1 } (D) { 0.25, 0.25, 0.25, 0.25 }

(E) None of these

(6)

参照

関連したドキュメント

In this paper we give the Nim value analysis of this game and show its relationship with Beatty’s Theorem.. The game is a one-pile counter pickup game for which the maximum number

Comparing the Gauss-Jordan-based algorithm and the algorithm presented in [5], which is based on the LU factorization of the Laplacian matrix, we note that despite the fact that

Restricting the input to n-vertex cubic graphs of girth at least 5, we apply a modified algorithm that is based on selecting vertices of minimum degree, using operations that remove

In Section 3, we study the determining number of trees, providing a linear time algorithm for computing minimum determining sets.. We also show that there exist trees for which

We have formulated and discussed our main results for scalar equations where the solutions remain of a single sign. This restriction has enabled us to achieve sharp results on

Keywords: continuous time random walk, Brownian motion, collision time, skew Young tableaux, tandem queue.. AMS 2000 Subject Classification: Primary:

In order to demonstrate that the CAB algorithm provides a better performance, it has been compared to other optimization approaches such as metaheuristic algorithms Section 4.2

This paper is a sequel to [1] where the existence of homoclinic solutions was proved for a family of singular Hamiltonian systems which were subjected to almost periodic forcing...