CS 236 Homework Assignments
Homework assignments are due by the 11:00 pm on the due date.
Please upload a PDF file containing your solutions to Learning Suite.
Late submissions are not accepted.
Email submissions are not accepted.
Assignment | Assigned Problems | Due Date |
---|---|---|
Homework 1 | only problems 3, 4 | 15 Jan 2025 |
Homework 2 |
only problems 2, 5
(for problem 5, you don't need to use BNF notation) |
17 Jan 2025 |
Homework 3 |
only problems 2, 3, 4, 5
(for problem 4, the start symbol is <expression>) |
24 Jan 2025 |
Homework 4 |
only problems 6, 7
(you don't need to give "output" for problem 7) |
27 Jan 2025 |
Homework 5 |
only problems 4, 5, 7
(for problem 5, only do parts a,b,c (not part d)) |
31 Jan 2025 |
Homework 6 | only problems 1, 5, 6 | 3 Feb 2025 |
Homework 7 |
only problems 1, 2, 5, 6
(for problem 1, assume 'sound' means 'valid') |
5 Feb 2025 |
Homework 8 |
Problem 1.
Use mathematical induction to prove
Use mathematical induction to prove |
10 Feb 2025 |
Homework 9 | only problems 1, 2, 6 | 14 Feb 2025 |
Homework 10 | only problems 6, 7 | 19 Feb 2025 |
Homework 11 |
Problem 1.
Consider the following facts, rules, and queries. Facts: child('Jill','Zed'). child('Ned','Bea'). child('Tim','Jack'). child('Sue','Jack'). child('Anne','Jill'). child('Lou','Jane'). child('Mary','Tim'). child('Ron','Dan'). child('Anna','Kim'). child('Tim','Jill'). child('Mary','Jane'). child('Jill','Bea'). Rules: ancestor(X,Y) :- child(Y,X). ancestor(X,Y) :- child(Y,Z), ancestor(X,Z). Queries: ancestor('Zed','Mary')? a. Write the rules as clauses (disjunctions of literals). b. Write one formal proof of the query using proof-by-contradiction, instantiation, and resolution. Give a justification for each line in your proof. Each step must be a premise or the result of instantiation or resolution. |
21 Feb 2025 |
Homework 12 | only problems 1, 7 | 28 Feb 2025 |
Homework 13a | only problem 1 | 3 Mar 2025 |
Homework 13b |
only problems 2, 3i
(For problem 3, only complete part i: give a relational algebra expression) |
5 Mar 2025 |
Homework 14a |
only problems 1, 2
(for problem 2, only do parts a-e) |
10 Mar 2025 |
Homework 14b |
only problem 6
(For problem 6, ignore the Irreflexive and Asymmetric properties.) |
12 Mar 2025 |
Homework 15a | only problems 1, 2 | 17 Mar 2025 |
Homework 15b | only problems 5, 7 | 19 Mar 2025 |
Homework 16a |
only problems 2gklm, 5
(For problem 2, only complete parts g, k, l, and m) (For problem 5b, ignore the edge weights) |
24 Mar 2025 |
Homework 16b |
only problems 7a
(For problem 7, only complete part a) |
26 Mar 2025 |
Homework 17a |
only problems 2, 4a
(For problem 4, only complete part a) |
28 Mar 2025 |
Homework 17b |
Problem 1.
Consider the directed graph with nodes V and edges E. A diagram of the graph is provided at this link: Graph V = { a, b, c, d, e, f } E = { (a,b), (b,d), (c,b), (d,a), (e,d), (e,f), (f,e) } Follow parts a-d below to show the steps of finding the strongly connected components in the graph. a. Draw the diagram for the reverse-edge graph. b. Draw the DFS-forest for the reverse-edge graph. (When there is a choice of nodes to visit, choose the one that is first in alphabetic order.) c. Give the postorder numbers for the nodes in the reverse-edge graph. Assign numbers starting with the number 1. d. Draw the DFS-tree for each strong component in the order it is found. (When there is a choice of nodes to visit, choose the one that is first in alphabetic order.) |
31 Mar 2025 |
Homework 18a | only problem 3 | 4 Apr 2025 |
Homework 18b | only problem 4 | 7 Apr 2025 |
Homework 18c | only problem 6a | 9 Apr 2025 |
Homework 18d | only problem 7a | 11 Apr 2025 |
Homework 18e | only problem 7c | 14 Apr 2025 |