0% found this document useful (0 votes)
38 views12 pages

AI Questions

Uploaded by

Esmael Elkot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views12 pages

AI Questions

Uploaded by

Esmael Elkot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

‫تصميم وتحليل الخوارزميات‬

12:30-1:30
22/4/2024
‫عبدالرحمن حيدر‬/ ‫د‬.‫ا‬
Faculty of Computers & Information, Assiut University
Course code: CS311
3rd Level
Midterm Exam
Duration: One hour
This exam for the following program(s): CS

(‫* اإلسم الرباعي (بالعربي فقط‬

‫إسماعيل محمد إسماعيل القط‬

‫* رقم الجلوس‬

162021059

‫* المستوي‬

‫االول‬

‫الثاني‬

‫الثالث‬

2014 ‫الرابع‬
‫الرابع ‪2015‬‬

‫الرابع ‪2016‬‬

‫الرابع ‪2017‬‬

‫الرابع ‪2018‬‬

‫الرابع ‪2019‬‬

‫الرابع ‪2020‬‬

‫‪4‬‬

‫* البرنامج‬

‫عام‬

‫بايو‬

‫هندسة‬

‫ذكاء صناعي‬

‫‪5‬‬

‫* رقم المعمل‬

‫‪٠‬ج‬

‫‪٠‬د‬

‫‪٠‬هـ‬

‫‪١‬ب‬

‫‪١‬ج‬
‫‪١‬د‬

‫‪١‬هـ‬

‫‪٢‬أ‬

‫‪٢‬ب‬

‫‪٢‬ج‬

‫‪٢‬د‬

‫‪٢‬هـ‬

‫‪٣‬أ‬

‫‪٣‬ب‬

‫‪٣‬ج‬

‫‪٣‬د‬

‫‪٣‬هـ‬

‫‪٤‬أ‬

‫‪٤‬ب‬

‫‪٤‬ج‬

‫‪٤‬د‬

‫‪٤‬هـ‬

‫‪6‬‬

‫* رقم الكمبيوتر‬

‫‪4‬‬
7

(‫* الكود (قد تمت مراجعة بيانات الطالب ورقم الجلوس‬

BLDH

Will be reviewed

What is the average case time complexity of merge sort?

O(n log n)

O(n^2)

O(n^2 log n)

O(n log n^2)

Will be reviewed

For the given DFS search tree, the edge AF is called:


A search tree edge

A forward edge

A cross edge

A back edge

Will be reviewed

10

What is the asymptotic (Θ-notation) running time of the following algorithm?

Division(n)
while n > 1
do n ← n/2;

Θ(n)

Θ(log n)

Θ(1 / log n)

Θ(n log n)
Will be reviewed

11

DFS traversal of a graph will result into:

Linked list

Tree

Graph with back edges

Array

Will be reviewed

12

What is the adjacency list? And when should it be used?

adjacency list contain some vertices (V) and eges (E) , and it used in an undirected graph to
implement it.
if we say the e=(s,a) mean that the s share a border with a

Will be reviewed

13

Directed acyclic graphs may have cycles.

True

False

Will be reviewed
14

Let f(n) and g(n) be asymptotically nonnegative functions. If f(n)= O(g(n)), and f(n)
= Big-Omega(g(n)), then f(n) = Θ(g(n)).

True

False

Will be reviewed

15

For the given DFS search tree, the edge BE is called:

A search tree edge

A forward edge

A cross edge

A back edge

Will be reviewed

16

A person wants to visit some places. He starts from a vertex and then wants to visit
every place connected to this vertex and so on. What algorithm he should use?

Depth First Search

Breadth First Search

Kruskal’s algorithm

Dijkstra’s algorithm
Will be reviewed

17

The data structure used in standard implementation of DFS is:

Stack

Queue

Linked List

Tree

Will be reviewed

18

For a connected and undirected graph G = (V, E), then |E| ≥ |V|-1.

True

False

Will be reviewed

19

A directed graph has a cycle if and only if its depth-first search reveals a forward edge.

True

False

Will be reviewed
20

The BFS is not a linear-time algorithm of numbers of vertice and edges.

True

False

Will be reviewed

21

log(n!) = Θ(n log n).

True

False

Will be reviewed

22

Al-Khwarizmi multiplication algorithm has better performance than the grade-school


multiplication algorithm according to the big-O notation.

True

False

Will be reviewed

23

For a graph with n vertices and m edges, the time complexity of DFS is:

O(n + m)

O(n)
O(m)

O(n*m)

Will be reviewed

24

Removing a cycle edge may disconnect a graph.

True

False

Will be reviewed

25

A k-ary tree is a tree in which every node has at most k children. In a k-ary tree with n
nodes and height h, which of the following is an upper bound for the maximum
number of leaves as a function of h, k, and n?

h^k

k^h

log_k h

log_k n

Will be reviewed

26

For undirected graphs, the adjacency matrix is not symmetric.

True
False

Will be reviewed

27

Discuss the best case beformance of the randomized divide-and-conquer algorithm


for selection.

the selection work as Sr,S,Sl and the best case is if we find the number which select about it
from the first step in the S sublist,
The divide and conquer with selection is go as breaking the problem into subproblems
SR,Sv,Sl
the best case if find the selected number in the Sv or if we find it in the first index in each Sl,Sr

if we selecte a number k
1- (S,k) ====> (Sl,k) if the k<Sv
2- (S,k) ====> (Sv,k) if the k=Sv
3- (S,k) ====> (Sr,k) if the k>Sv

finally the best case if the selected element(K)is in the Sv

Will be reviewed

28

Let T(n) be defined by T(1) = 7, and T(n+1) = 3n + T(n), for all integers n ≥ 1. Which
of the following represents the order of growth of T(n) as a function of n?

Θ(n)

Θ(n log n)

Θ(n^2)

Θ(n^2 log n)
Will be reviewed

29

BFS uses a queue in place of a stack used in DFS.

True

False

This content is created by the owner of the form. The data you submit will be sent to the form owner. Microsoft is not responsible
for the privacy or security practices of its customers, including those of this form owner. Never give out your password.
Microsoft Forms | AI-Powered surveys, quizzes and polls Create my own form
Privacy and cookies | Terms of use

You might also like