Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

artificial intelligence homwork Task1: Curriculum of Computer Science Department - 3 marks Your task is to create a knowledge base describing courses and their prerequisites.

artificial intelligence homwork image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Task1: Curriculum of Computer Science Department - 3 marks Your task is to create a knowledge base describing courses and their prerequisites. The graph below shows the courses and their prerequisites. As shown in the graph, a solid directed arrow from CS15 to CS16 indicates that CS15 is a prerequisite to CS16. A dotted arrow means that ONE of the these courses is a prerequisite of the course. For example, to take CS33, you have to take either CS16 or CS18. Course names are constants, so you have to use lowercase letters (cs22,cs33, etc) in your code. More facts about the transcript are: - CS15, CS17, CS33, CS141 and CS126 are only offered in the fall. - CS16,CS18,CS22,CS32,CS166 are only offered in the spring. You also have a set of rules as follows: - A course is introductory if it's offered in the fall and has no prerequisites, or if it's offered in the spring and its prerequisite that has no prerequisites. - A course is intermediate if it is not introductory, but its prerequisites are all introductory courses. - A course is upper level if its prerequisites are not introductory courses, or if its prerequisites are CS22 and introductions. - Course may only be of one level; i.e., introductory courses may not also be intermediate courses, etc. A. Considering the fact, that fall semester is over and Sarah were able to complete 4 courses only and failed in CS33. You should now add a set of facts that students have taken some courses using the has_taken predicate (i.e., has_taken(sarah, cs15)). B. Then, you need to add one more rule to test the eligibility of a student to take a course in the spring: can_take(Student, Course), true when Student is eligible to take Course (i.e, they have taken the necessary prerequisites). - In the following graphs, assume that if there is ever a choice amongst multiple nodes, both the BFS and DFSalgorithms will choose the left-most node first. Starting from the green node at the top, which algorithmwill visit the least number of nodes before visiting the yellow goal node? a. BFS b. DFS c. Neither BFS nor DFS will ever encounterthe goal node in this graph. d. BFS and DFS encounter same number ofnodes before encounter the goal node Please Choose your answer and explain why in details!! - In the following graphs, assume that if there is ever a choice amongst multiple nodes, both the BFS and DFSalgorithms will choose the left-most node first. Starting from the green node at the top, which algorithmwill visit the least number of nodes before visiting the yellow goal node? a. BFS b. DFS c. Neither BFS nor DFS will ever encounterthe goal node in this graph. d. BFS and DFS encounter same number ofnodes before encounter the goal node. Please choose your answer and explain why in details - Consider the following graph. If there is ever a decision between multiple neighbor nodes in the BFSor DFS algorithms, assume we always choose the letter closest to the beginning of the alphabet first. - In what order will the nodes be visited using a Breadth First Search? - Please show you answer in detail. - In what order will the nodes bevisited using a Depth First Search? Please show you answer in detail

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

What tools might be helpful?

Answered: 1 week ago