## MATA22 Assignment 3

MATA22 Assignment 3
Due Date: On the week March 2-6 in your own tutorials at rst 15 mins

1. This question helps you understand subspace and basis
(a) Let U = f(z1; z2; z3; z4; z5) 2 C : 6z1 = z2; z3 + 2z4 + 3z5 = 0g.
Check if U is a subspace. If U is a subspace, then nd a basis
which span U.
(b) Suppose b1; b2; b3; b4 is a basis of vector space V . Prove that
b1 + b2; b2 + b3; b3 + b4; b4
is also a basis of V:
(c) Prove or disprove : there exist a basis p0; p1; p2; p3 2 P3(R) ( P3(R)
is the set of all polynomial over real number with highest possible
degree = 3 ) such that none of polynomials p0; p1; p2; p3 has degree

(d) Suppose U and W are both ve-dimensional subspaces of R9. Prove
that U \W 6= f0g:
2. This question helps you understand direct sum
(a) Suppose U1; U2; U3:::Un are nite-dimensional subspaces of V such
that
U1 + U2 + U3 + ::: + Un
is a direct sum. Prove that
U1  U2  U3  :::  Un
is also nite-dimensional and
dim(U1  U2  U3  :::  Un) = i=n
i=1dim(Ui):
(b) Let
Ue = ff(x) : R ??! Rjf(??x) = f(x)g
and
Uo = ff(x) : R ??! Rjf(??x) = ??f(x)g
i. Prove Ue; Uo are subspaces.
ii. Prove any functions f(x) : R ??! R ( denote as RR ) can be
represented as sum of an even function and an odd function.
iii. Prove that
RR = Ue  Uo
by using above facts.
(c) Check if the following statement is true. If it’s true, prove it. If not
, show a counter example.
fMnng = fSynng  fSknng
where fSynng means the set of all n by n symmetric matrices and
fSknng means the set of all n by n skew symmetric matrices.
3. This question helps you understand linear map
(a) Suppose a; b 2 R: De ne T : R3 ??! R2 by
T(x; y; z) = (2x ?? 4y + 3z + b; 6x + cxyz):
i. show that T is linear map if and only if a = b = 0.
ii. Can you nd the matrix representation of T, if a = b = 0.
iii. Find the range and kernel of T, if a = b = 0.
(b) Can you give an example of an isomorphism mapping from R3 to
P2(R) ?

# CSC108H Assignment 3

Resubmission with 20% deduction (optional but recommended):Wednesday, December 4 @ 22:00

## Goals of this Assignment

• Write function bodies using dictionaries and file reading.
• Write code to mutate lists and dictionaries.
• Use top down design to break a problem down into subtasks and implement helper functions to complete those tasks.
• Write tests to check whether a function is correct.

## Introduction

This term, we’re building the components of a simple file synchronization system. In the first assignment, you wrote code for computing the hash of input from standard input, so that we can identify when files have changed. In the second assignment, you wrote code to build and traverse a file tree. Finally, in this assignment, you’ll actually implement file synchronization by copying files from a source file tree to a destination file tree. (In essence, you will be implementing the functionality of  without any special options.) You’ll use multiple processes to complete this work in parallel, to (hopefully) speed up the task.

## AI – Game Theory, Social Choice, and Mechanism

(^1) Technically, a multiset, since the same vote may occur multiple times. (^2) … or set of winners if there are ties.

``````Define acycleof votes to be a set of votes that can be written asc 1 c 2
``````

.. .cm, c 2 c 3 … cmc 1 , c 3 c 4 .. .cmc 1 c 2 ,… , cmc 1  c 2 .. .cm 1. Let us say that a voting rulersatisfies theCycles Cancel Out (CCO)criterion if every cycle cancels out with respect tor.

1b. (12 points)From among the (reasonable) voting rules discussed in class, give 3 voting rules that satisfy the CCO criterion, and 3 that do not.

1d. (14 points)CriterionC 1 isstrongerthan criterionC 2 if every rule that satisfiesC 1 also satisfiesC 2. Two criteria areincomparableif neither is stronger than the other. For every pair of criteria among OCO, CCO, and OCCO, say which one is stronger (or that they are incomparable).

1. (A multi-unit auction with externalities.) We are running a multi-unit auction for badminton rackets in the town Externa, where nobody owns one yet and we are the only supplier. Of course, being the only person to own a badminton is no fun; bidders care about which other bidders win rackets as well. In such a setting, where bidders care about what other bidders win, we say that there areexternalities. Let us assume that each agent is awarded at most one racket, and that shuttlecocks and nets are freely available. In the most general bidding language for this setting, each bidder would specify, for every subset of the agents, what her value would be if exactly the agents in that subset won rackets. This is impractical because there are exponentially many subsets. Instead, we will consider more restricted bidding languages. Let us suppose that it is commonly known which agents live close enough to each other that they could play badminton together. This can be represented as a graph, which has an edge between two agents if and only if they live close enough to each other to play together. In the first bidding language, every agentisubmits a single valuevi. The semantics of this are as follows. If the agent does not win a racket, her utility is 0 regardless of who else wins a racket. If she does win a racket, her value is vtimes the number of her neighbors that also win a racket.

(^3) E.g., not dictatorial rules, rules for which there is a candidate that cant possibly win, randomized rules, etc. Also, approval cannot be one of the rules because it is not based on rankings. If you use Cup, Cup only satisfies a criterion if it satisfies it for every way of pairing the candidates.

``````Alice
``````
``````Bob
``````
``````Carol Daniel
``````
``````Eva
``````
``````Frank
``````
``````Figure 1: Externas proximity graph.
``````
``````Suppose we receive the following bids:
``````
``````Alice
``````
``````Bob
``````
``````Carol Daniel
``````
``````Eva
``````
``````Frank
``````
``````4
``````
``````4
``````

(^25) 5 4 Figure 2: Graph with bids. The number next to an agent is that agents bid. Suppose we have three rackets for sale. One valid (but not optimal) allo- cation would be to give rackets to Carol, Daniel, and Eva. Carol would get a (reported) utility of 2, Daniel would get 10 (25, because two of Daniels neighbors have rackets), and Eva 5, for a total of 17. 2a. (12 points)Give the optimal allocation, as well as the VCG (Clarke) payment for each agent. 2b. (13 points)In general (general graphs, bids, numbers of rackets), is the problem of finding the optimal allocation solvable in polynomial time, or NP-hard? (Hint: think about theCliqueproblem (which is almost the same as theIndependent Setproblem).) One year has passed, and we have returned to Externa. Everyones rackets have broken (we are not in the business of selling high-quality rackets here) and they need new ones. However, the people in the town were not entirely happy with our previous system. Specifically, it turned out that each agent only ever played with (at most) a single other agent, so that multiplying the value by the number of neighbors with rackets really made no sense. Also, agents have realized that they would receive different utilities for playing with different agents. In the new system, we must not only decide on who receives rackets, but (for the agents who win rackets) we must also decide on the pairing, i.e.,who plays with whom. Each agent can be paired with at most one other agent. Each agentisubmits a valuevijfor every one of her neighborsj; agentireceivesvij if she is paired withj(and both win rackets), and 0 otherwise. Suppose we receive the following bids:

``````Alice
``````
``````Bob
``````
``````Carol Daniel
``````
``````Frank
``````

## CSCI-UA.0480-11: Intro to Computer Security Homework 1

CSCI-UA.0480-11: Intro to Computer Security Spring 2019
Homework 1
via classes.nyu.edu1. Threat modeling: Imagine you’ve just been hired to produce a comprehensive threat model for
CitiBike , New York’s public bike share system. Describe three security policies, and for each of
them describe a technical mechanism to enforce those policies. Choose one policy each that
deals with a threat from thieves (financially motivated attackers), terrorists (attackers aiming to
cause violent disruption) and trolls (attackers trying to cause inconvenience or annoyance).
2. Hash functions : In class we discussed several desirable properties for hash functions, in
particular one-wayness and collision-resistance . In this exercise, we’ll show that neither property
implies the other. We can do this by counter-example:

## ASSIGNMENT #3 CS246, SPRING 2019

ASSIGNMENT #3 CS246, SPRING 2019
Assignment #3
 Questions 1a, 2a, and 3a are due on Due Date 1; Question 1b, 2b, and 3b are due on Due Date 2.
 On this and subsequent assignments, you will take responsibility for your own testing. This assignment is
designed to get you into the habit of thinking about testing before you start writing your program. If you
look at the deliverables and their due dates, you will notice that there is no C++ code due on Due Date 1.
Instead, you will be asked to submit test suites for C++ programs that you will later submit by Due Date 2.
Test suites will be in a format compatible with that of the latter questions of Assignment 1, so if you did a
good job writing your runSuite script, that experience will serve you well here.
 Design your test suites with care; they are your primary tool for verifying the correctness of your code. Note
that test suite submission zip files are restricted to contain a maximum of 40 tests, and the size of each file
is also restricted to 300 bytes; this is to encourage you not combine all of your testing eggs in one basket.
 You must use the standard C++ I/O streaming and memory management (MM) facilities on this assignment;
you may not use C-style I/O or MM. More concretely, you may #include the following C++ libraries

## Homework Problem Set 5 MATH 8

Homework Problem Set 5
MATH 8
Problem 1: Prove the general Triangle Inequality for any n 2 N and for any real numbers
a1; a2; : : : ; an 2 R:
Xn
i=1
ai

## EECS 281: Data Structures and Algorithms

EECS 281: Data Structures and Algorithms
Lab 10 Assignment
Q1 What kind of algorithms are Prim’s and Kruskal’s? (0.5 pts)
A. brute force
B. greedy
C. divide and conquer
D. branch and bound
E. none of the above 繼續閱讀“EECS 281: Data Structures and Algorithms”

## COMP SCI 2ME3, SFWR ENG 2AA4 Assignment 4

Assignment 4
COMP SCI 2ME3, SFWR ENG 2AA4
Introduction
The purpose of this assignment is to design and specify modules for playing Conway’s
Game of Life. The modules should cover the Model and View portions of the Model View