平成 31 年度 筑波大学大学院博士課程 システム情報工学研究科 コンピュータサイエンス専攻 博士前期課程 ( 一般入学試験 8 月期 ) 試験問題基礎科目 ( 数学, 情報基礎 ) Mathematics/Fundamentals of Computer Science [ 注意事項 ][Inst

Similar documents
平成 31 年度 筑波大学大学院博士課程システム情報工学研究科コンピュータサイエンス専攻 博士前期課程 ( 一般入学試験 2 月期 ) 試験問題基礎科目 ( 数学, 情報基礎 ) Mathematics/Fundamentals of Computer Science [ 注意事項 ][Instru

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

h23w1.dvi

Page 1 of 6 B (The World of Mathematics) November 20, 2006 Final Exam 2006 Division: ID#: Name: 1. p, q, r (Let p, q, r are propositions. ) (10pts) (a

L3 Japanese (90570) 2008

1 # include < stdio.h> 2 # include < string.h> 3 4 int main (){ 5 char str [222]; 6 scanf ("%s", str ); 7 int n= strlen ( str ); 8 for ( int i=n -2; i

02-2-数学活用能力検査_問題_H30.indd


2

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1

Visual Evaluation of Polka-dot Patterns Yoojin LEE and Nobuko NARUSE * Granduate School of Bunka Women's University, and * Faculty of Fashion Science,

H18-2.dvi

Quiz 1 ID#: Name: 1. p, q, r (Let p, q and r be propositions. Determine whether the following equation holds or not by completing the truth table belo

Microsoft Word - PCM TL-Ed.4.4(特定電気用品適合性検査申込のご案内)

AtCoder Regular Contest 073 Editorial Kohei Morita(yosupo) A: Shiritori if python3 a, b, c = input().split() if a[len(a)-1] == b[0] and b[len(

Microsoft Word - j201drills27.doc

Level 3 Japanese (90570) 2011

大学院入試試験問題(修士)

Studies of Foot Form for Footwear Design (Part 9) : Characteristics of the Foot Form of Young and Elder Women Based on their Sizes of Ball Joint Girth


,,,,., C Java,,.,,.,., ,,.,, i



浜松医科大学紀要

soturon.dvi

Introduction Purpose This training course describes the configuration and session features of the High-performance Embedded Workshop (HEW), a key tool


A Nutritional Study of Anemia in Pregnancy Hematologic Characteristics in Pregnancy (Part 1) Keizo Shiraki, Fumiko Hisaoka Department of Nutrition, Sc

NINJAL Research Papers No.3

( ) ( ) 30 ( ) 27 [1] p LIFO(last in first out, ) (push) (pup) 1

JOURNAL OF THE JAPANESE ASSOCIATION FOR PETROLEUM TECHNOLOGY VOL. 66, NO. 6 (Nov., 2001) (Received August 10, 2001; accepted November 9, 2001) Alterna



Microsoft Word - j201drills27.doc

On the Wireless Beam of Short Electric Waves. (VII) (A New Electric Wave Projector.) By S. UDA, Member (Tohoku Imperial University.) Abstract. A new e

joho09.ppt


lagged behind social progress. During the wartime Chonaikai did cooperate with military activities. But it was not Chonaikai alone that cooperated. Al

untitled

Bull. of Nippon Sport Sci. Univ. 47 (1) Devising musical expression in teaching methods for elementary music An attempt at shared teaching


1 Fig. 1 Extraction of motion,.,,, 4,,, 3., 1, 2. 2.,. CHLAC,. 2.1,. (256 ).,., CHLAC. CHLAC, HLAC. 2.3 (HLAC ) r,.,. HLAC. N. 2 HLAC Fig. 2



II

A Feasibility Study of Direct-Mapping-Type Parallel Processing Method to Solve Linear Equations in Load Flow Calculations Hiroaki Inayoshi, Non-member

52-2.indb



untitled

elemmay09.pub


PowerPoint Presentation


鹿大広報149号

LIFO(last in first out, ) 1 FIFO(first in first out, ) 2 2 PUSH POP : 1

企業の信頼性を通じたブランド構築に関する考察

先端社会研究 ★5★号/4.山崎

202

alternating current component and two transient components. Both transient components are direct currents at starting of the motor and are sinusoidal

udc-2.dvi

kut-paper-template.dvi


Analysis of Algorithms

untitled

入学検定料支払方法の案内 1. 入学検定料支払い用ページにアクセス ポータルの入学検定料支払いフォームから 入学検定料支払い用 URL の ここをクリック / Click here をクリックしてください クリックを行うと 入学検定料支払い用のページが新たに開かれます ( 検定料支払い用ページは ポ

Pari-gp /7/5 1 Pari-gp 3 pq


L1 What Can You Blood Type Tell Us? Part 1 Can you guess/ my blood type? Well,/ you re very serious person/ so/ I think/ your blood type is A. Wow!/ G

西川町広報誌NETWORKにしかわ2011年1月号


\615L\625\761\621\745\615\750\617\743\623\6075\614\616\615\606.PS

How to read the marks and remarks used in this parts book. Section 1 : Explanation of Code Use In MRK Column OO : Interchangeable between the new part

- June 0 0

LC304_manual.ai

2 except for a female subordinate in work. Using personal name with SAN/KUN will make the distance with speech partner closer than using titles. Last

fx-9860G Manager PLUS_J

1 ( 8:12) Eccles. 1:8 2 2

How to read the marks and remarks used in this parts book. Section 1 : Explanation of Code Use In MRK Column OO : Interchangeable between the new part

28 Horizontal angle correction using straight line detection in an equirectangular image

How to read the marks and remarks used in this parts book. Section 1 : Explanation of Code Use In MRK Column OO : Interchangeable between the new part

n 2 n (Dynamic Programming : DP) (Genetic Algorithm : GA) 2 i

学部ゼミ新規申請方法 (Blackboard 9.1) Seminar Application Method for Undergraduate Seminar Courses ゼミ新規申請は Blackboard で受け付けます! 次セメスターにゼミ履修を希望する学生は 下記マニュアルに従ってゼミ

国土技術政策総合研究所 研究資料

(Please read the instructions on the backside.)

[2] , [3] 2. 2 [4] 2. 3 BABOK BABOK(Business Analysis Body of Knowledge) BABOK IIBA(International Institute of Business Analysis) BABOK 7

「プログラミング言語」 SICP 第4章 ~超言語的抽象~ その6

untitled

How to read the marks and remarks used in this parts book. Section 1 : Explanation of Code Use In MRK Column OO : Interchangeable between the new part


VE-GP32DL_DW_ZA

NKK NEWS 2012


M-SOLUTIONS writer: yokozuna A: Sum of Interior Angles For International Readers: English editorial starts on page 7. N 180(N 2) C++ #i n

(check matrices and minimum distances) H : a check matrix of C the minimum distance d = (the minimum # of column vectors of H which are linearly depen

01_31窶愴胆1窶窶ー窶慊イfiツ。01-16

ohp03.dvi

Study on Application of the cos a Method to Neutron Stress Measurement Toshihiko SASAKI*3 and Yukio HIROSE Department of Materials Science and Enginee


GP05取説.indb

Transcription:

平成 31 年度 筑波大学大学院博士課程 システム情報工学研究科 コンピュータサイエンス専攻 博士前期課程 ( 一般入学試験 8 月期 ) 試験問題基礎科目 ( 数学, 情報基礎 ) Mathematics/Fundamentals of Computer Science [ 注意事項 ][Instructions] 1. 試験開始の合図があるまで, 問題の中を見てはいけません. また, 筆記用具を手に持ってはいけません. Do NOT open this booklet before the examination starts. In addition, do not have a pen in hand before the examination starts. 2. 試験開始の合図のあとで, 全ての解答用紙の定められた欄に, 研究科, 専攻, 受験番号を記入すること. Fill in the designated spaces on each answer sheet with the name of the graduate school, name of your main field, and the examination number after the examination starts. 3. この問題は全部で 15 ページ ( 表紙を除く ) です.1 7 ページは日本語版,8 15 ページは英語版です. This booklet consists of 15 pages, excluding the cover sheet. The Japanese version is shown on pages 1 7 and the English version on pages 8 15. 4. 解答用紙 ( 罫線有り ) を 3 枚, 下書き用紙 ( 白紙 ) を 1 枚配布します. You are given three answer sheets (ruled paper) and one draft sheet (white paper). 5. 問題は全部で 5 問あります. このうち,3 問選択すること. 問題ごとに解答用紙を分けて記入すること. There are five problems. Select three problems. Write your answer to each problem in a different answer sheet. 6. 解答用紙に解答を記述する際に, 問題番号を必ず明記すること. When writing the answers, clearly label the problem number on each answer sheet. 平成 30 年 8 月 23 日

I I I I A 2 2 1 1 2 2 1 3 A = 0 0 1 1 1 1 1 2 (1) A rank A (2) X 4 rank A O AX = O X (3) Y rank A 4 rank A Y X = O Y O (2) O 1

II II II II (1) (a), (b) (a) π 0 sin x 1 + cos 2 x dx (b) π 0 x sin x 1 + cos 2 x dx (2) 2 f(u, v) f(2x z, 3y z) = 0 xyz S (a), (b) f(u, v) u, v f u (u, v), f v (u, v) (a) S (x 0, y 0, z 0 ) (b) S L L 2

III III III III N 0 ack : N N N n + 1 (m = 0) ack(m, n) = ack(m 1, 1) (m > 0 n = 0) ack(m 1, ack(m, n 1)) (m > 0 n > 0) S = {x N x < 5} f : S S f(n) = ack(1, n) mod 5 a mod b a b 0 R S S R = { x, f(x) x S} (1) ack(2, 0) (2) n N ack(1, n) = n + 2 (3) f f g (4) R 1 (5) R R R R R 3

IV IV IV IV int C 1 node node 1 2 malloc struct node { int value ; struct node * left ; struct node * right ; }; 1: node 1: node struct node *new_node( int value, struct node *left, struct node *right ) value left right void traverse( struct node *n ) n 4

# include <stdlib.h> # include <stdio.h> struct node * new_ node ( int value, struct node * left, struct node * right ) { struct node * n = malloc ( sizeof ( struct node )); n-> value = value ; n-> left = left ; n-> right = right ; return (n); } void traverse ( struct node * n) { if ( n == NULL ) return ; traverse (n-> left ); printf ("%d\n", n-> value ); traverse (n-> right ); } 2: 1 (1) main() int main () { struct node * top ; top = new_node (5, new_node (9, NULL, NULL ), new_node (7, NULL, NULL )); traverse ( top ); return (0); } (2) traverse() void pre_order_traverse( struct node *n ) n void post_order_traverse( struct node *n ) n (3) traverse() insert() insert() (a) (e) 5

struct node *insert( struct node *top, int value ) top NULL top value value top value top struct node *insert(struct node *top, int value) { if (top == NULL) return (new_node(value, NULL, NULL)); if (value < (a) ) (b) = insert( (c) ); else (d) = insert( (e) ); return (top); } (4) (3) insert() 3 5 7 9 main() insert() insert() int main () { struct node * top = NULL ; top = insert ( top, 5); top = insert ( top, 7); top = insert ( top, 9); traverse ( top ); return (0); } (5) (4) main() 3 5 7 9 insert() 3 5 7 9 insert() 1 (6) (3) insert() insert() N 1 insert() N 6

V V V V 1 0 0 0 4 2 a 3 a 2 a 1 a 0 p (1) a 3 a 2 a 1 a 0 p 0000 0 0001 0 0010 1 1000 0 (2) (1) (3) a 3 a 2 a 1 a 0 p 4 3 (4) (3) AND OR NOT 7

Write the answers to Problem I on one answer sheet, and clearly label it at the top of the page as Problem I. Do not write answers to other problems on the answer sheet. Problem I Answer the following questions regarding the matrix A; (1) Find the rank of the matrix A. A = 2 2 1 1 2 2 1 3 0 0 1 1 1 1 1 2 (2) Let X be a matrix whose rank is 4 rank A, and O be a zero matrix. Find a matrix X such that AX = O. (3) Let Y be a matrix where the number of rows equals rank A, the number of columns equals four, and the rank equals rank A. Find a matrix Y such that Y X = O. The number of columns and rows of the O are not needed to be the same as those of O in Question (2).. 8

Write the answers to Problem II on one answer sheet, and clearly label it at the top of the page as Problem II. Do not write answers to other problems on the answer sheet. Problem II (1) Evaluate the definite integrals (a) and (b) below. (a) π 0 sin x 1 + cos 2 x dx (b) π 0 x sin x 1 + cos 2 x dx (2) Consider the surface S in the xyz space expressed as f(2x z, 3y z) = 0 using the partially differentiable function f(u, v) of two variables. Answer Questions (a) and (b) below. In the answers, use the symbols f u (u, v) and f v (u, v) to denote the partial derivatives of f(u, v) with respect to u and v, respectively. (a) Find the normal vector and the equation of the tangent plane to the surface S at the point (x 0, y 0, z 0 ) on the surface S. (b) Show that any tangent plane to the surface S is parallel to some line L passing through the origin. Also, find the equation of the line L. 9

Write the answers to Problem III on one answer sheet, and clearly label it at the top of the page as Problem III. Do not write answers to other problems on the answer sheet. Problem III Let N be the set of natural numbers (including 0) and ack : N N N be the function defined as follows: n + 1 (m = 0) ack(m, n) = ack(m 1, 1) (m > 0 and n = 0) ack(m 1, ack(m, n 1)) (m > 0 and n > 0). We also define the set S to be {x N x < 5} and the function f : S S to be f(n) = ack(1, n) mod 5. Here, a mod b represents the remainder when a natural number a is divided by a natural number b 0. Let the binary relation R S S be R = { x, f(x) x S}. Answer the following questions. (1) Calculate the value of ack(2, 0). Show the calculation steps. (2) Prove that ack(1, n) = n + 2 holds for all n N. (3) Prove that the function f is bijective and find the inverse function g of f. (4) A binary relation is called an equivalence relation if it is reflexive, transitive, and symmetric. Show that R is not an equivalence relation by finding a counterexample. (5) The symbol is used to denote the composition of relations. Prove that the relation R R R R R is an equivalence relation. 10

Write the answers to Problem IV on one answer sheet, and clearly label it at the top of the page as Problem IV. Do not write answers to other problems on the answer sheet. Problem IV A data structure that stores int values using a binary tree is implemented in the C language. Each node of the binary tree uses the structure node defined in Figure 1. The structure node is manipulated with the functions in Table 1. Figure 2 shows the implementation of the functions. Note that the function malloc always succeeds. Answer the following questions. struct node { int value ; struct node * left ; struct node * right ; }; Figure 1: The definition of the structure node. Table 1: The functions that manipulate the structure node. Function struct node *new_node( int value, struct node *left, struct node *right ) Description Create a new node, assign the stored value to value, set the pointer of the left child node as left, set the pointer of the right child node as right, and return the pointer of the created node. void traverse( struct node *n ) Print out the values stored in the tree, whose root node is pointed to by n, to standard output in in-order (i.e., the order of the output is the set of values stored in the left subtree, the value of the root node, and the set of values stored in the right subtree). 11

# include <stdlib.h> # include <stdio.h> struct node * new_ node ( int value, struct node * left, struct node * right ) { struct node * n = malloc ( sizeof ( struct node )); n-> value = value ; n-> left = left ; n-> right = right ; return (n); } void traverse ( struct node * n) { if ( n == NULL ) return ; traverse (n-> left ); printf ("%d\n", n-> value ); traverse (n-> right ); } Figure 2: The implementation of the functions shown in Table 1. (1) Answer the output on the standard output when the following function main() is executed. int main () { struct node * top ; top = new_node (5, new_node (9, NULL, NULL ), new_node (7, NULL, NULL )); traverse ( top ); return (0); } (2) Considering methods for depth-first traversal of a binary tree, besides the in-order implemented by the function traverse(), there are also pre-order and post-order. The functions which traverse the binary tree in pre-order and post-order are shown in the following table. Define these functions. Function void pre_order_traverse( struct node *n ) Description Print out the values of the nodes stored in the binary tree, whose root node is pointed to by n, to standard output in pre-order (i.e., the order of the output is the value of the root node, the set of values stored in the left subtree, and the set of values stored in the right subtree). void post_order_traverse( struct node *n ) Print out the values of the nodes stored in the binary tree, whose root node is pointed to by n, to standard output in post-order (i.e., the order of the output is the set of values stored in the left subtree, the set of values stored in the right subtree, and the value of the root node). 12

(3) The function insert() shown in the following table inserts a value to a binary tree so that the output of the function traverse() is in ascending order. We assume that any value already stored in the binary tree is not given to the function. Fill in the blanks (a) to (e) below to complete this function. Function struct node *insert( struct node *top, int value ) Description When the pointer top is NULL, create a node, assign the value value to the node, and return the pointer of the node. Otherwise, when the value value is less than the value stored in the node pointed by top, call this function recursively to store the value value in the left subtree and return the pointer top; when the value value is greater than the value stored in the node pointed by top, call this function recursively to store the value value in the right subtree and return the pointer top. struct node *insert(struct node *top, int value) { if (top == NULL) return (new_node(value, NULL, NULL)); if (value < (a) ) (b) = insert( (c) ); else (d) = insert( (e) ); return (top); } (4) The function main() that inserts three values 5, 7, and 9 in an empty binary tree using the function insert() implemented in Question (3) is shown in the following figure. Answer the number of times that the function insert() is called when this function is executed (including the number of recursive calls to the function insert()). int main () { struct node * top = NULL ; top = insert ( top, 5); top = insert ( top, 7); top = insert ( top, 9); traverse ( top ); return (0); } (5) The function main() shown in Question (4) inserts three values 5, 7, and 9 in this order to an empty binary tree. The number of calls to the function insert() may vary according to the order of insertion. Answer an insertion order of the values 5, 7, and 9 to an empty binary tree that minimizes the number of times that the function insert() is called. 13

(6) Assume that N different values were inserted to an empty binary tree in an order that minimizes the number of calls to the function insert() shown in Question (3). Answer, in terms of N, the number of times that the function insert() is called when another value is inserted to this binary tree. 14

Write the answers to Problem V on one answer sheet, and clearly label it at the top of the page as Problem V. Do not write answers to other problems on the answer sheet. Problem V Let us develop a combinational logic circuit such that the output becomes 1 if the input is a prime number, and becomes 0 otherwise. Here, when the input is 0, the output becomes 0. The input is expressed as four digits, from the most significant bit, a 3 a 2 a 1 a 0 and the output is p. Answer the following questions. (1) Complete the following truth table. a 3 a 2 a 1 a 0 p 0000 0 0001 0 0010 1 1000 0 (2) Complete the following Karnaugh map corresponding to the truth table in Question (1). (3) Write an example logical formula of p in the disjunctive normal form using a 3, a 2, a 1, and a 0. Here, this formula is a disjunction of four terms and each term is a conjunction of three variables (or their negation). (4) Illustrate the formula answered in Question (3) using the following logic circuit symbols. AND OR NOT 15