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.
    fMnng = fSynng  fSknng
    where fSynng means the set of all n by n symmetric matrices and
    fSknng 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

CSC108H Assignment 3

Deadline:Monday, December 2 @ 22:00
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.
繼續閱讀“CSC108H Assignment 3”

CSCB09 Assignment 3: Processes and Parallelism

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.

繼續閱讀“CSCB09 Assignment 3: Processes and Parallelism”

AI – Game Theory, Social Choice, and Mechanism

北美代写,美国作业代写,网课代修,Assignment代写-100%原创(Properties of voting rules.) Alice likes to analyze the outcomes of elections; specifically, she is interested in the different outcomes that different voting rules produce on the same votes. To do so, she executes many different rules on the same set of votes, a painstak- ing process. She likes knowing about properties of voting rules that ease her task. For example, she likes to know which voting rules satisfy the Condorcet criterion, so that if there is a Condorcet winner, she immediately knows that that will be the winner for

  1. those rules, without having to go through the trouble of executing each rule individually. Recently, Alice has become interested in the phenomenon of votes cancelling out. Let us say that a set^1 Sof votescancels out with respect to voting rule rif foreverysetT of votes, the winner^2 thatrproduces forTis the same as the winner thatrproduces forST. For example, the set of votes{a bc, bac, cab}cancels out with respect to the plurality rule: each candidate is ranked first once in this set of votes, so it has no net effect on the outcome of the election. The same set does not cancel out with respect to Borda, though, because from these votes,agets 4 points,bgets 3, andcgets 2, which may affect the outcome of the election. Alice likes to know when a set of votes cancels out with respect to a rule, so that she can just ignore these votes, easing her computation of the winner. Define a pair ofopposite votesto be a pair of votes with completely opposite rankings of the candidates, i.e. the votes can be written asc 1 c 2 .. .cm andcm cm 1 .. .c 1. Let us say that a voting rulersatisfies the Opposites Cancel Out (OCO)criterion if every pair of opposite votes cancels out with respect tor.

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

北美代写,美国作业代写,网课代修,Assignment代写-100%原创1a. (12 points)From among the (reasonable^3 ) voting rules discussed in class, give 3 voting rules that satisfy the OCO criterion, and 3 that do not (and say which ones are which!).

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

.. .cm, c 2 c 3 … cmc 1 , c 3 c 4 .. .cmc 1 c 2 ,… , cmc 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.

北美代写,美国作业代写,网课代修,Assignment代写-100%原创Define a pair ofopposite cyclesof votes to be a cycle, plus all the opposite votes of votes in that cycle. Note that these opposite votes themselves constitute a cycle, the opposite of which is the original cycle. Let us say that a voting rule rsatisfies theOpposite Cycles Cancel Out (OCCO)criterion if every pair of opposite cycles cancels out with respect tor.

北美代写,美国作业代写,网课代修,Assignment代写-100%原创1c. (12 points)From among the (reasonable) voting rules discussed in class, give 5 voting rules that satisfy the OCCO criterion, and 1 that does 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

北美代写,美国作业代写,网课代修,Assignment代写-100%原创(^12) 4 3 2 1 4 Eva 5 5 6 1 5 Figure 3: Graph with bids. Each number is the value that the closer agent on the edge has for playing with the further agent on the edge. Suppose we have four rackets for sale. One valid (but not optimal) outcome would be to pair Alice and Bob, and Daniel and Eva (and give them all rackets), for a total utility of 4 + 1 + 1 + 6 = 12. 2c. (12 points)Give the optimal outcome (pairing and allocation), as well as the VCG (Clarke) payment for each agent. 2d. (13 points)In general (general graphs, bids, numbers of rackets), is the problem of finding the optimal outcome solvable in polynomial time, or NP- hard? (Hint: think about theMaximum-Weighted-Matchingproblem. Keep in mind that the number of rackets is limited, though.)

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:

繼續閱讀“CSCI-UA.0480-11: Intro to Computer Security Homework 1”

Assignment 1: Command Line Arguments and Pointers

Introduction

北美代写,美国作业代写,网课代修,Assignment代写-100%原创Over the course of the four assignments in this course you will implement different components of a simple file synchronization system. For examples, take a look at??or consider the services provided by OneDrive, Dropbox, Google Drive, or Box. The components you’ll be asked to build could also form the basis for a version control system like??or?. In this, assignment, you’ll be writing a program to compute hash values for files.

繼續閱讀“Assignment 1: Command Line Arguments and Pointers”

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

繼續閱讀“ASSIGNMENT #3 CS246, SPRING 2019”

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”