Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(a) Express the following Predicate Calculus statement in Prolog. cxy((Parent(x,c)BiologicalParent(y,c))x=yAdopted(c)) (5 marks) (b) Write a recursive Prolog predicate fib(N, F) to compute the Fibonacci series

image text in transcribed

(a) Express the following Predicate Calculus statement in Prolog. cxy((Parent(x,c)BiologicalParent(y,c))x=yAdopted(c)) (5 marks) (b) Write a recursive Prolog predicate fib(N, F) to compute the Fibonacci series 0,1,2,3,5,8,13,21 (5 marks) (c) Write a Python function myDotProd(a,b) which computes the dot-product of 2 vectors of equal size using a loop. You are not to use the numpy.dot() operation. (5 marks) (d) Write Python code for a simple perceptron decision function buyCocktail( x), which decides on whether to buy an expensive cocktail or not based on the following inputs where x=[x1,x2,x3]. x1=1 means you have plenty of cash, x1=0 means you do not. x2=1 means you want to impress a new girlfriend, 0 means you don't. x3=1 means it's a busy exciting night on the town, 0 means it is not. Choose the weights and threshold (or bias) so that if you want to impress someone, you will buy cocktails no matter what. However, if you are not out to impress but it's an exciting night and you have plenty of cash, you will buy a cocktail. Otherwise you will not buy a cocktail. (5 marks) (e) Suppose you were to train a perceptron to behave as described in part(d) instead of handcrafting the weights. Write down an appropriate list of input training vectors and the corresponding list of desired outputs which could be used to train such a perceptron

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_2

Step: 3

blur-text-image_3

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

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

Describe the ethical issues involved in conducting HRD evaluation

Answered: 1 week ago

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago

Question

1. Diagnose and solve a transfer of training problem.

Answered: 1 week ago