1. ER diagram
The assumptions are as follows:
a). I assume that the art pieces are not necessarily all bought by customers.
b). Artists and Arts are not all preferred by customers. And customers do not have to
all have preferred artists and arts.
2.
Revision 9/6/2016
COMS 561 Assignment I
Fall 2016
Date assigned: 9/7/2016
Due date: 9/21/2016 by 11:50pm
Percentage in your final grade: 10%
Maximum score for the assignment: 100 points
Objectives
1. Practice conceptual database design given database requ
Problem 1
(1)
BC -> A does not hold over the schema R, because:
A
B
C
1
2
3
4
2
3
For these two tuples, BC of the first row is the same as the second one, but As are different.
It violates the definition of the functional dependency.
C ->
COMS 561 Assignment IIPart B
Fall 2016
Date assigned: 9/28/2016
Due date: Wed 10/19/2016 by 11:50pm through BBLearn
Maximum points: 180 points
Objectives
Practice development of applications accessing a backend database management system.
1. Hibernate Obj
Revision: 09/21/2016
COMS 561 Assignment II-Part A
Fall 2016
Date assigned: 9/21/2016
Due date: Friday 09/30/2016 by 11:50pm through BBLearn
Maximum score for the assignment: 80 points
Objectives
Assignment II has two parts. Part A aims to help students p
Assignment 10 Solutions
1. a)
lis r2, 0x0000
ori r2, r2, 0x66b0
;set upper 2 bytes of address
;set lower two bytes of address
li r3, 25
;r3 = 25
stw r3, 0(r2)
; mem[r2] = 25
b)
i. r20 = 0x00000083
ii. r21 = 0x0000AC57
iii. r22 = 0x30002012
iv. Address
300
MAT 378
Exam #1 Solutions
2011-03-02
1. A group of mn people are to be arranged into m teams each with n players.
(a) (5 points) Determine the number of ways if each team has a different name.
Solution.
Two ways. For each, Ive used the team numbers as lab
Solution to Problem F3
based on solution by Neil Spalter
F1. Look for a pattern in the remainders of the derangement numbers Dn , modulo m.
(The modulus m is the divisor that gives the remainder.) Both the pattern itself and
its length are worth thinking
MATH 579 Exam 8 Solutions
1. Let an denote the number of ways to color the squares of a 1 n chessboard using the
colors red, white, and blue, so that no two white squares are adjacent.
The set of permitted colorings can be divided into two categories. Tho
In-class Exercise 3
WRITE YOUR NAME HERE _
1. Consider relational schema R with attributes A, B, C, D, and E, where
dependencies A->B, C->D, and ACE->ABCDE are supposed to hold.
a. For each of the three dependencies, check if it violates BCNF.
Explain.
1)
Answer Key for Exam I
Computer Programming 420
Dr. St. John
Lehman College
City University of New York
11 October 2001
1. True or False:
(a) F All database management systems are relational.
(b) F Every set is a bag.
(c) F Relationships cannot have attrib
KB V
QUIZ 1 - Com8330 - Fall 2016
Duration: 20 minutes Your Name
Your Student Number
[01] Fill out your YES or NO answers in the table:
_- symmsm a
55 yrs!
E) F [02] The empty set is a subset of itself.
(D F [03] A set can be both an element and a sub
Computer Science 228
Project 3
Doubling Lists
Important Notes
This project is worth 300 points.
The recommended due date is 11:59 pm, Friday, March 14, 2014 (right before Spring
Break). The actual due date is 11:59 pm, Monday, March 24, 2014 (right afte
Queues
A list with access only at its front and rear.
2
3
5
7
2
3
5
7
11
11
back or tail
front or head
First-in, first-out (FIFO)
Notes by Yan-Bin Jia
Queue<E> Interface in java.util
Contains all methods expected for a FIFO queue.
Extends Collection.
Seve
Infix Notation
Each binary operator is placed between its operands.
Each unary operator precedes its operand.
-2 + 3 * 5
(-2) + (3 * 5)
Notes by Yan-Bin Jia
Infix Expression Evaluation
Postfix expressions are easy to evaluate:
no subexpressions
precedence
Infix Notation
Each binary operator is placed between its operands.
Each unary operator precedes its operand.
-2 + 3 * 5
(-2) + (3 * 5)
Evaluated in one way using two stacks of different data types
- one to hold operands
- another to hold operators.
Notes
Com S 228
Fall 2012
Exam 1
DO NOT OPEN THIS EXAM UNTIL INSTRUCTED TO DO SO
Name: _
ISU NetID (username): _
Recitation section (please circle one):
1.
2.
3.
4.
5.
6.
M 10:00 am (Edwin)
M 11:00 am (Stephen)
M 4:10 pm (Brandon)
T 10:00 am (Chris, Yifei)
T 11
Com S 228
Spring 2014
Final Exam
DO NOT OPEN THIS EXAM UNTIL INSTRUCTED TO DO SO
Name: _
ISU NetID (username): _
Closed book/notes, no electronic devices, no headphones. Time limit 120 minutes. Partial credit may be
given for partially correct solutions.
Com S 228
Spring 2014
Final Exam Sample Solution
1a) (1)
b) (log )
c) (log )
d) ()
e) ()
f) ()
g) ( + )
2a) a b 2 c d + ^ - 2 ^ ^ a b c 4 5 c d + / - / - b * * b) (a + c * (a + c * (a + b) (a % b) % c) % d
c) (); ()
3a)
b)
c)
public static <E> void revers
Com S 228
Fall 2012
Exam 2 Sample Solution
1. a) (); b) (1); c) ( + ).
2. Element returned by the last next() or previous() is underlined. The final state is in bold.
Code snippet
Output
List and iterator state, or
exception thrown
iter = aList.listIterat
Com S 228
Fall 2012
Exam 2
DO NOT OPEN THIS EXAM UNTIL INSTRUCTED TO DO SO
Name: _
ISU NetID (username): _
Recitation section (please circle one):
1. M
10:00 am (Edwin)
2. M
11:00 am (Stephen)
3. M
4:10 pm (Brandon)
4. T
10:00 am (Chris, Yifei)
5. T
11:00
Com S 228
Fall 2012
Exam 1 Sample Solution
1.
Point p = new Point(0, 0);
Shape s = new Shape(p);
compile error: cannot instantiate the
type Shape
Point p = new Point(0, 0);
Region r = new Rectangle(3, 4, p);
System.out.println(r.perimeter();
Rectangle per
1.
a) A, C and D cannot be the key because they each contain tuples with duplicates. B is the only key
consisting of 1 attribute. A has duplicates of 6. C has duplicates of 8 and D has duplicates of 5. So
cannot uniquely identify the tuple.
b) The functio
COMS 363 HW 2B
5)
a) B is the only key in ABCD.
b) ACD is a superset that is not a key. Any other superset that does not include B is not a key.
c) AB, ABC, ABCD, ABD, BD, BC are all possible super keys.
d) AA and ABCDA are trivial functional dependencies
SELECT snum,ssn FROM students
WHERE name = 'Becky';
SELECT major.name,major.level FROM major, students
WHERE major.snum = students.snum AND students.ssn = '123097834';
SELECT courses.name FROM courses, departments
WHERE courses.department_code = departmen
1.
a) A, C and D cannot be the key because they each contain tuples with duplicates. B is the only key
consisting of 1 attribute. A has duplicates of 6. C has duplicates of 8 and D has duplicates of 5. So
cannot uniquely identify the tuple.
b) The functio
Chapter 3: Linear Regression (COM S 573)
Kris De Brabanter
January 21, 2015
Contents
1 Linear regression
1.1 Introduction . . . . . . . . . . . . . . . .
1.2 Estimation of a regression function . . .
1.3 Estimation of the parameters: Method of
1.4 Simple