Notes/UNB/Year 5/Semester 2/CS4725/Final Review.md

3.3 KiB

Instructions:

12 FRQ, written answers 3 MCQ, multiple choice 1 Matching question, algorithms (role of algorithms) 15 total questions (?)

1 A4 size double sided hand written notes allowed (Important!!!) 2 hour exam Partial marks allowed for partially correct answers Bring a calculator (Important!!!)

Part 1 Important Questions

Horn form for logic? Why are these conditions not solvable without a truth table?

Part 2 Important Questions

1

Arithmetic assertions can be written in first order logic with the predicate symbol <, the function symbols + and x, and the constant symbols 0 and 1. Additional predicates can also be defined with bi-conditionals a) Represent the property "x is and even number" Ax Even(x) <=> Ey x=y+y b) Represent the property "x is prime" Ax Prime(x) <=> Ey,z x=y * z => y = 1 V z = 1
c) Goldbach's conjecture is the conjecture (unproven as of yet) that "every even number is equal to the sum of two primes". Represent this conjecture as a logical sentence. Ax Even(x)=> Ey,z Prime(y) /\ Prime(z) /\ x=y+z

2

Find the values for the probabilities a and b in joint probability table below so that the binary variables X and Y are independent

X Y P(X, Y)
t t 3/5
t f 1/5
f t a
f f b
Due to probability being max 1, we know that a + b must be 1/5
P(Yt)/P(Yf) = a/b = 3
b = 1/20
a = 3/20

3

idk where R comes from, look into slides about bayes theorem Show the three forms of independence in Equation (12.11) are equivalent P(a|b) = P(a) or P(b|a) = P(b) or P(a /\ b) = P(a) * P(b) / R(?)

First two are logically the same, just inverted

From bayes theorem P(a | b) * P(b) = P(a) * P(b) / R(?)

P(a /\ b) = P(a | b) * P(b)

4

Consider the following propability distrobutions:

A P(A)
t 0.8
f 0.2
A B P(B|A)
t t 0.9
t f 0.1
f t 0.6
f f 0.4
B C P(C|B)
t t 0.8
t f 0.2
f t 0.8
f f 0.2
Given these tables and no other assumptions, calculate the following probabilities.
a. P(a, ~b)
= P(a) * P(~b a)
= 0.8 * 0.1
= 0.08
b. P(b)
= P(bt a) * P(a) + P(bt ~a) * P(~a)
= 0.9 * 0.8 + 0.6 * 0.2
= 0.84

5

Let A and B be Boolean Random variables. You are given the following probabilities P(A=true) = 0.5 P(B=true |A=true) = 1 P(B=true) = 0.75

What is P(B=true|A=false)?

6

Consider the XOR function of three binary input attributes, which produces the value 1 if and only if an odd number of the three input attributes has value 1.

Draw a minimal sized decision tree for the three input XOR function.

Three layer decision three, A > B > C. Output of tree would be 0 1 1 0 1 0 0 1 if on the left of the decision is always 0 and 1 is right

7

Consider the problem of separating N data points into +ve and -ve examples using a linear separator. Clearly this can always be done for N=2 points on a line of dimension d=1, regardless of how many points are labeled or where they are located (unless the points are in the same place)

a) Show that it can always be done for N=3 points on a plane of dimension d=2 unless they are co-linear.

b) Show that it cannot (or can we?) always be done for N=4 points on a plane of dimension d=2